Skip to content

The Open Standard for Generative UI

Release fixes (#196)

subhamf29ee5db8447
diff --git a/js/packages/react-ui/package.json b/js/packages/react-ui/package.json
index e1e659055..bc21a2654 100644
--- a/js/packages/react-ui/package.json
+++ b/js/packages/react-ui/package.json
@@ -2,7 +2,7 @@
"type": "module",
"name": "@crayonai/react-ui",
"license": "MIT",
- "version": "0.8.28",
+ "version": "0.8.29",
"description": "Component library for Generative UI SDK",
"main": "dist/index.js",
"types": "dist/index.d.ts",
diff --git a/js/packages/react-ui/src/components/MarkDownRenderer/markDownRenderer.scss b/js/packages/react-ui/src/components/MarkDownRenderer/markDownRenderer.scss
index 470ac172c..70c3897fc 100644
--- a/js/packages/react-ui/src/components/MarkDownRenderer/markDownRenderer.scss
+++ b/js/packages/react-ui/src/components/MarkDownRenderer/markDownRenderer.scss
@@ -57,53 +57,72 @@
& h4,
& h5,
& h6 {
- @include cssUtils.typography(title, medium);
- font-weight: 300;
- margin-top: 12px;
- margin-bottom: 8px;
- + * {
- margin-top: 0;
+ @include cssUtils.typography(heading, extra-small);
+ color: cssUtils.$primary-text;
+ margin-bottom: 18px;
+ &:has(+ p) {
+ margin-bottom: 8px;
}
-
+ strong {
- font-weight: 400;
+ @include cssUtils.typography(heading, extra-small);
}
}
/* Paragraph Styles */
& p {
- line-height: 1.4;
- margin-bottom: 20px;
- font-weight: 300;
+ color: cssUtils.$primary-text;
+ @include cssUtils.typography(body, default);
+ margin-bottom: 0;
+ &:has(+ p) {
+ margin-bottom: 18px;
+ }
}
& strong {
color: cssUtils.$primary-text;
- font-weight: 600;
+ @include cssUtils.typography(body, heavy);
}
& li {
- margin-top: 8px;
margin-bottom: 8px;
- padding-left: 6px;
- font-weight: 300;
+ @include cssUtils.typography(body, default);
+ :last-child {
+ margin-bottom: 0;
+ }
&::marker {
- font-weight: 400;
- color: color-mix(in oklab, cssUtils.$primary-text 65%, transparent);
+ @include cssUtils.typography(body, default);
+ color: cssUtils.$secondary-text;
}
}
+ & li ul {
+ margin-top: 8px;
+ }
+ & li li {
+ margin-top: 8px;
+ }
+ & li ol {
+ margin-top: 8px;
+ }
& ol {
list-style-type: decimal;
padding-left: 20px;
margin-bottom: 20px;
- font-weight: 300;
+ @include cssUtils.typography(body, default);
+ color: cssUtils.$primary-text;
+ :last-child {
+ margin-bottom: 0;
+ }
}
& ul {
list-style-type: disc;
padding-left: 20px;
- margin-bottom: 20px;
- font-weight: 300;
+ margin-bottom: 24px;
+ @include cssUtils.typography(body, default);
+ color: cssUtils.$primary-text;
+ :last-child {
+ margin-bottom: 0;
+ }
}
& .crayon-code-block-syntax-highlighter {
@@ -121,7 +140,6 @@
}
& hr {
- color: color-mix(in oklab, cssUtils.$primary-text 30%, transparent);
margin-top: 48px;
margin-bottom: 48px;
+ * {
@@ -145,7 +163,7 @@
}
& blockquote strong {
- font-weight: 600;
+ @include cssUtils.typography(body, heavy);
}
& blockquote > *:first-child::before {
diff --git a/js/packages/react-ui/src/components/ThemeProvider/themePresets.ts b/js/packages/react-ui/src/components/ThemeProvider/themePresets.ts
index a10e998b7..b932fca7d 100644
--- a/js/packages/react-ui/src/components/ThemeProvider/themePresets.ts
+++ b/js/packages/react-ui/src/components/ThemeProvider/themePresets.ts
@@ -1,7 +1,10 @@
const commonTheme = ({ font }: { font: string }) => ({
fontHeadingLarge: `600 28px/1.15 ${font}`,
+ fontHeadingLargeLetterSpacing: "-0.25px",
fontHeadingMedium: `600 24px/1.15 ${font}`,
- fontHeadingSmall: `500 18px/1.25 ${font}`,
+ fontHeadingMediumLetterSpacing: "-0.25px",
+ fontHeadingSmall: `600 18px/1.25 ${font}`,
+ fontHeadingSmallLetterSpacing: "-0.1px",
fontHeadingExtraSmall: `500 16px/1.25 ${font}`,
fontBody: `400 16px/1.5 ${font}`,
fontBodySmall: `400 14px/1.5 ${font}`,
@@ -34,7 +37,7 @@ export const themePresets = {
backgroundFills: "rgba(250,250,250,1)",
containerFills: "rgba(253, 253, 253)",
overlayFills: "rgba(0, 0, 0, 0.4)",
- sunkFills: "rgba(0, 0, 0, 0.06)",
+ sunkFills: "rgba(0, 0, 0, 0.04)",
dangerFills: "rgba(203,63,73,0.1)",
successFills: "rgba(13,160,93,0.1)",
infoFills: "rgba(56, 148, 255, 0.1)",
@@ -42,12 +45,13 @@ export const themePresets = {
invertedFills: "rgba(21, 21, 21, 1)",
elevatedFills: "rgba(255, 255, 255, 0.6)",
sunkBgFills: "rgba(0, 0, 0, 0.04)",
+ highlightSubtle: "rgba(0, 0, 0, 0.02)",
// Border colors
- strokeDefault: "rgba(0, 0, 0, 0.04)",
- strokeInteractiveEl: "rgba(0, 0, 0, 0.08)",
+ strokeDefault: "rgba(0, 0, 0, 0.06)",
+ strokeInteractiveEl: "rgba(0, 0, 0, 0.1)",
strokeInteractiveElSelected: "rgba(21,21,21,1)",
- strokeEmphasis: "rgba(0, 0, 0, 0.2)",
+ strokeEmphasis: "rgba(0, 0, 0, 0.3)",
strokeAccent: "rgba(255, 255, 255, 0.08)",
strokeAccentEmphasis: "rgba(255, 255, 255, 0.3)",
strokeInfo: "rgba(56, 148, 255, 0.08)",
@@ -61,11 +65,11 @@ export const themePresets = {
// Text colors
primaryText: "rgba(0, 0, 0, 1)",
- secondaryText: "rgba(0, 0, 0, 0.4)",
+ secondaryText: "rgba(0, 0, 0, 0.5)",
disabledText: "rgba(0, 0, 0, 0.2)",
linkText: "rgba(0, 0, 0, 1)",
accentPrimaryText: "rgba(255, 255, 255, 1)",
- accentSecondaryText: "rgba(255, 255, 255, 0.4)",
+ accentSecondaryText: "rgba(255, 255, 255, 0.5)",
accentDisabledText: "rgba(255, 255, 255, 0.2)",
successPrimaryText: "rgba(8,93,58,1)",
successInvertedText: "rgba(220, 250, 230, 1)",
@@ -75,7 +79,7 @@ export const themePresets = {
dangerSecondaryText: "rgba(203, 63, 73, 1)",
dangerDisabledText: "rgba(235, 167, 171, 1)",
dangerInvertedPrimaryText: "rgba(255, 255, 255, 1)",
- dangerInvertedSecondaryText: "rgba(255, 255, 255, 0.4)",
+ dangerInvertedSecondaryText: "rgba(255, 255, 255, 0.5)",
dangerInvertedDisabledText: "rgba(255, 255, 255, 0.2)",
infoPrimaryText: "rgba(21,93,177,1)",
infoInvertedText: "rgba(219, 236, 255, 1)",
@@ -136,7 +140,7 @@ export const themePresets = {
backgroundFills: "rgba(21,21,21,1)",
containerFills: "rgba(28,28,28,1)",
overlayFills: "rgba(0, 0, 0, 0.4)",
- sunkFills: "rgba(255,255,255,0.08)",
+ sunkFills: "rgba(255,255,255,0.06)",
dangerFills: "rgba(203,63,73,0.2)",
successFills: "rgba(13,160, 94, 0.2)",
infoFills: "rgba(56, 148, 255, 0.2)",
@@ -144,12 +148,13 @@ export const themePresets = {
elevatedFills: "rgba(255, 255, 255, 0.06)",
invertedFills: "rgba(253, 253, 253, 1)",
sunkBgFills: "rgba(0, 0, 0, 0.16)",
+ highlightSubtle: "rgba(255, 255, 255, 0.03)",
// Border colors
- strokeDefault: "rgba(255, 255, 255, 0.04)",
- strokeInteractiveEl: "rgba(255, 255, 255, 0.1)",
+ strokeDefault: "rgba(255, 255, 255, 0.06)",
+ strokeInteractiveEl: "rgba(255, 255, 255, 0.12)",
strokeInteractiveElSelected: "rgba(253, 253, 253, 1)",
- strokeEmphasis: "rgba(255, 255, 255, 0.2)",
+ strokeEmphasis: "rgba(255, 255, 255, 0.4)",
strokeAccent: "rgba(0, 0, 0, 0.08)",
strokeAccentEmphasis: "rgba(0, 0, 0, 0.3)",
strokeInfo: "rgba(56, 148, 255, 0.2)",
@@ -163,11 +168,11 @@ export const themePresets = {
// Text colors
primaryText: "rgba(255, 255, 255, 1)",
- secondaryText: "rgba(255, 255, 255, 0.4)",
+ secondaryText: "rgba(255, 255, 255, 0.5)",
disabledText: "rgba(255, 255, 255, 0.2)",
linkText: "rgba(255, 255, 255, 1)",
accentPrimaryText: "rgba(0,0,0,1)",
- accentSecondaryText: "rgba(0,0,0,0.4)",
+ accentSecondaryText: "rgba(0,0,0,0.5)",
accentDisabledText: "rgba(0,0,0,0.2)",
successPrimaryText: "rgba(23,178,106,1)",
successInvertedText: "rgba(2, 79, 48, 1)",
@@ -177,7 +182,7 @@ export const themePresets = {
dangerSecondaryText: "rgba(167, 39, 47, 1)",
dangerDisabledText: "rgba(130, 26, 32, 1)",
dangerInvertedPrimaryText: "rgba(255, 255, 255, 1)",
- dangerInvertedSecondaryText: "rgba(255, 255, 255, 0.4)",
+ dangerInvertedSecondaryText: "rgba(255, 255, 255, 0.5)",
dangerInvertedDisabledText: "rgba(255, 255, 255, 0.2)",
infoPrimaryText: "rgba(70,160,247,1)",
infoInvertedText: "rgba(13, 75, 148, 1)",