Skip to content

The Open Standard for Generative UI

add theme presets (#129)

abhithesysb2a19a4a61ff
diff --git a/js/packages/react-core/package.json b/js/packages/react-core/package.json
index 9d76ec7da..90f9bbd84 100644
--- a/js/packages/react-core/package.json
+++ b/js/packages/react-core/package.json
@@ -1,6 +1,6 @@
{
"name": "@crayonai/react-core",
- "version": "0.7.4",
+ "version": "0.7.5",
"description": "Generative UI SDK",
"license": "MIT",
"main": "dist/index.js",
@@ -21,8 +21,6 @@
"peerDependencies": {
"react": ">=18.0.0",
"react-dom": ">=18.0.0",
- "tailwind-merge": "^2.5.4",
- "tailwindcss-animate": "^1.0.7",
"tiny-invariant": "^1.3.3",
"zustand": "^5.0.2",
"eventsource-parser": "^3.0.0",
diff --git a/js/packages/react-ui/package.json b/js/packages/react-ui/package.json
index 91376dc9f..77868aa43 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.7.9",
+ "version": "0.7.10",
"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/ThemeProvider/index.ts b/js/packages/react-ui/src/components/ThemeProvider/index.ts
index 02ddf2922..32af7eedb 100644
--- a/js/packages/react-ui/src/components/ThemeProvider/index.ts
+++ b/js/packages/react-ui/src/components/ThemeProvider/index.ts
@@ -1,2 +1,3 @@
+export * from "./themePresets";
export * from "./ThemeProvider";
export * from "./types";
diff --git a/js/packages/react-ui/src/components/ThemeProvider/themePresets.ts b/js/packages/react-ui/src/components/ThemeProvider/themePresets.ts
new file mode 100644
index 000000000..9ebc35967
--- /dev/null
+++ b/js/packages/react-ui/src/components/ThemeProvider/themePresets.ts
@@ -0,0 +1,897 @@
+const commonTheme = ({ font }: { font: string }) => ({
+ fontPrimary: `400 16px/20px "${font}"`,
+ fontHeadingLarge: `600 16px/20px "${font}"`,
+ fontHeadingMedium: `600 16px/20px "${font}"`,
+ fontHeadingSmall: `600 16px/20px "${font}"`,
+ fontTitle: `500 16px/20px "${font}"`,
+ fontTitleMedium: `500 16px/20px "${font}"`,
+ fontTitleSmall: `500 16px/20px "${font}"`,
+ fontBody: `400 16px/20px "${font}"`,
+ fontBodyMedium: `400 16px/20px "${font}"`,
+ fontBodySmall: `400 16px/20px "${font}"`,
+ fontBodyHeavy: `600 16px/20px "${font}"`,
+ fontBodySmallHeavy: `600 16px/20px "${font}"`,
+ fontBodyLink: `500 16px/20px "${font}"`,
+ fontLabelLarge: `400 16px/20px "${font}"`,
+ fontLabelLargeHeavy: `500 16px/20px "${font}"`,
+ fontLabel: `400 16px/20px "${font}"`,
+ fontLabelHeavy: `500 16px/20px "${font}"`,
+ fontLabelMedium: `400 16px/20px "${font}"`,
+ fontLabelMediumHeavy: `600 16px/20px "${font}"`,
+ fontLabelSmall: `400 16px/20px "${font}"`,
+ fontLabelSmallHeavy: `500 16px/20px "${font}"`,
+ fontLabelExtraSmall: `400 16px/20px "${font}"`,
+ fontLabelExtraSmallHeavy: `500 16px/20px "${font}"`,
+
+ shadowS: "0px 1px 2px rgba(0, 0, 0, 0.04)",
+ shadowM: "0px 4px 6px rgba(0, 0, 0, 0.04)",
+ shadowL: "0px 1px 8px rgba(0, 0, 0, 0.08)",
+ shadowXl: "0px 10px 15px rgba(0, 0, 0, 0.1)",
+});
+
+export const themePresets = {
+ default: {
+ theme: {
+ ...commonTheme({ font: "Inter" }),
+ backgroundFills: "rgba(245, 245, 245, 1)",
+ brandElFills: "rgba(127, 86, 217, 1)",
+ brandElHoverFills: "rgba(127, 86, 217, 0.8)",
+ containerFills: "rgba(255, 255, 255, 1)",
+ overlayFills: "rgba(0, 0, 0, 0.4)",
+ sunkFills: "rgba(0, 0, 0, 0.04)",
+ containerHoverFills: "rgba(255, 255, 255, 0.04)",
+ dangerFills: "rgba(217, 45, 32, 0.08)",
+ successFills: "rgba(7, 148, 85, 0.08)",
+ strokeDefault: "rgba(0, 0, 0, 0.06)",
+ strokeInteractiveEl: "rgba(0, 0, 0, 0.12)",
+ strokeInteractiveElHover: "rgba(0, 0, 0, 0.4)",
+ strokeInteractiveElSelected: "rgba(0, 0, 0, 1)",
+ brandText: "rgba(255, 255, 255, 1)",
+ brandSecondaryText: "rgba(255, 255, 255, 0.4)",
+ primaryText: "rgba(0, 0, 0, 1)",
+ secondaryText: "rgba(0, 0, 0, 0.4)",
+ disabledText: "rgba(0, 0, 0, 0.2)",
+ dangerText: "rgba(217, 45, 32, 1)",
+ successText: "rgba(7, 148, 85, 1)",
+ linkText: "rgba(0, 0, 0, 1)",
+ infoText: "rgba(56, 148, 255, 1)",
+ chatContainerBg: "rgba(255, 255, 255, 1)",
+ chatAssistantResponseBg: "rgba(255, 255, 255, 1)",
+ chatUserResponseBg: "rgba(127, 86, 217, 1)",
+ chatAssistantResponseText: "rgba(0, 0, 0, 1)",
+ chatUserResponseText: "rgba(255, 255, 255, 1)",
+ spacing0: "0px",
+ spacing3xs: "2px",
+ spacing2xs: "4px",
+ spacingXs: "6px",
+ spacingS: "8px",
+ spacingM: "12px",
+ spacingL: "18px",
+ spacingXl: "24px",
+ spacing2xl: "36px",
+ spacing3xl: "48px",
+ rounded0: "0px",
+ rounded3xs: "1px",
+ rounded2xs: "2px",
+ roundedXs: "4px",
+ roundedS: "6px",
+ roundedM: "8px",
+ roundedL: "10px",
+ roundedXl: "12px",
+ rounded2xl: "16px",
+ rounded3xl: "20px",
+ rounded4xl: "24px",
+ roundedFull: "999px",
+ roundedClickable: "6px",
+ },
+ darkTheme: {
+ ...commonTheme({ font: "Inter" }),
+ backgroundFills: "rgba(28, 28, 28, 1)",
+ brandElFills: "rgba(127, 86, 217, 1)",
+ brandElHoverFills: "rgba(127, 86, 217, 0.8)",
+ containerFills: "rgba(43, 43, 43, 1)",
+ overlayFills: "rgba(0, 0, 0, 0.4)",
+ sunkFills: "rgba(0, 0, 0, 0.2)",
+ containerHoverFills: "rgba(255, 255, 255, 0.1)",
+ dangerFills: "rgba(217, 45, 32, 0.1)",
+ successFills: "rgba(7, 148, 85, 0.1)",
+ strokeDefault: "rgba(255, 255, 255, 0.06)",
+ strokeInteractiveEl: "rgba(255, 255, 255, 0.12)",
+ strokeInteractiveElHover: "rgba(255, 255, 255, 0.4)",
+ strokeInteractiveElSelected: "rgba(255, 255, 255, 1)",
+ brandText: "rgba(255, 255, 255, 1)",
+ brandSecondaryText: "rgba(255, 255, 255, 0.4)",
+ primaryText: "rgba(255, 255, 255, 1)",
+ secondaryText: "rgba(255, 255, 255, 0.6)",
+ disabledText: "rgba(255, 255, 255, 0.2)",
+ dangerText: "rgba(253, 162, 155, 1)",
+ successText: "rgba(117, 224, 167, 1)",
+ linkText: "rgba(255, 255, 255, 1)",
+ infoText: "rgba(125, 179, 247, 1)",
+ chatContainerBg: "rgba(43, 43, 43, 1)",
+ chatAssistantResponseBg: "rgba(43, 43, 43, 1)",
+ chatUserResponseBg: "rgba(127, 86, 217, 1)",
+ chatAssistantResponseText: "rgba(255, 255, 255, 1)",
+ chatUserResponseText: "rgba(255, 255, 255, 1)",
+ spacing0: "0px",
+ spacing3xs: "2px",
+ spacing2xs: "4px",
+ spacingXs: "6px",
+ spacingS: "8px",
+ spacingM: "12px",
+ spacingL: "18px",
+ spacingXl: "24px",
+ spacing2xl: "36px",
+ spacing3xl: "48px",
+ rounded0: "0px",
+ rounded3xs: "1px",
+ rounded2xs: "2px",
+ roundedXs: "4px",
+ roundedS: "6px",
+ roundedM: "8px",
+ roundedL: "10px",
+ roundedXl: "12px",
+ rounded2xl: "16px",
+ rounded3xl: "20px",
+ rounded4xl: "24px",
+ roundedFull: "999px",
+ roundedClickable: "6px",
+ },
+ },
+ classic: {
+ theme: {
+ ...commonTheme({ font: "Geist" }),
+ backgroundFills: "rgba(245, 245, 245, 1)",
+ brandElFills: "rgba(11, 73, 245, 1)",
+ brandElHoverFills: "rgba(11, 73, 245, 0.8)",
+ containerFills: "rgba(255, 255, 255, 1)",
+ overlayFills: "rgba(0, 0, 0, 0.4)",
+ sunkFills: "rgba(0, 0, 0, 0.04)",
+ containerHoverFills: "rgba(255, 255, 255, 0.04)",
+ dangerFills: "rgba(217, 45, 32, 0.08)",
+ successFills: "rgba(7, 148, 85, 0.08)",
+ strokeDefault: "rgba(0, 0, 0, 0.06)",
+ strokeInteractiveEl: "rgba(0, 0, 0, 0.12)",
+ strokeInteractiveElHover: "rgba(0, 0, 0, 0.4)",
+ strokeInteractiveElSelected: "rgba(0, 0, 0, 1)",
+ brandText: "rgba(255, 255, 255, 1)",
+ brandSecondaryText: "rgba(255, 255, 255, 0.4)",
+ primaryText: "rgba(0, 0, 0, 1)",
+ secondaryText: "rgba(0, 0, 0, 0.4)",
+ disabledText: "rgba(0, 0, 0, 0.2)",
+ dangerText: "rgba(217, 45, 32, 1)",
+ successText: "rgba(7, 148, 85, 1)",
+ linkText: "rgba(0, 0, 0, 1)",
+ infoText: "rgba(56, 148, 255, 1)",
+ chatContainerBg: "rgba(243, 246, 252, 1)",
+ chatAssistantResponseBg: "rgba(249, 250, 251, 1)",
+ chatUserResponseBg: "rgba(222, 223, 233, 1)",
+ chatAssistantResponseText: "rgba(0, 0, 0, 1)",
+ chatUserResponseText: "rgba(16, 19, 29, 1)",
+ spacing0: "0px",
+ spacing3xs: "2px",
+ spacing2xs: "4px",
+ spacingXs: "6px",
+ spacingS: "8px",
+ spacingM: "12px",
+ spacingL: "18px",
+ spacingXl: "24px",
+ spacing2xl: "36px",
+ spacing3xl: "48px",
+ rounded0: "0px",
+ rounded3xs: "1px",
+ rounded2xs: "2px",
+ roundedXs: "4px",
+ roundedS: "6px",
+ roundedM: "8px",
+ roundedL: "10px",
+ roundedXl: "12px",
+ rounded2xl: "16px",
+ rounded3xl: "20px",
+ rounded4xl: "24px",
+ roundedFull: "999px",
+ roundedClickable: "6px",
+ },
+ darkTheme: {
+ ...commonTheme({ font: "Geist" }),
+ backgroundFills: "rgba(28, 28, 28, 1)",
+ brandElFills: "rgba(67, 136, 255, 1)",
+ brandElHoverFills: "rgba(67, 136, 255, 0.8)",
+ containerFills: "rgba(43, 43, 43, 1)",
+ overlayFills: "rgba(0, 0, 0, 0.4)",
+ sunkFills: "rgba(0, 0, 0, 0.2)",
+ containerHoverFills: "rgba(255, 255, 255, 0.1)",
+ dangerFills: "rgba(217, 45, 32, 0.1)",
+ successFills: "rgba(7, 148, 85, 0.1)",
+ strokeDefault: "rgba(255, 255, 255, 0.06)",
+ strokeInteractiveEl: "rgba(255, 255, 255, 0.12)",
+ strokeInteractiveElHover: "rgba(255, 255, 255, 0.4)",
+ strokeInteractiveElSelected: "rgba(255, 255, 255, 1)",
+ brandText: "rgba(255, 255, 255, 1)",
+ brandSecondaryText: "rgba(255, 255, 255, 0.4)",
+ primaryText: "rgba(255, 255, 255, 1)",
+ secondaryText: "rgba(255, 255, 255, 0.6)",
+ disabledText: "rgba(255, 255, 255, 0.2)",
+ dangerText: "rgba(253, 162, 155, 1)",
+ successText: "rgba(117, 224, 167, 1)",
+ linkText: "rgba(255, 255, 255, 1)",
+ infoText: "rgba(125, 179, 247, 1)",
+ chatContainerBg: "rgba(16, 19, 29, 1)",
+ chatAssistantResponseBg: "rgba(25, 29, 41, 1)",
+ chatUserResponseBg: "rgba(172, 187, 215, 1)",
+ chatAssistantResponseText: "rgba(255, 255, 255, 1)",
+ chatUserResponseText: "rgba(16, 19, 29, 1)",
+ spacing0: "0px",
+ spacing3xs: "2px",
+ spacing2xs: "4px",
+ spacingXs: "6px",
+ spacingS: "8px",
+ spacingM: "12px",
+ spacingL: "18px",
+ spacingXl: "24px",
+ spacing2xl: "36px",
+ spacing3xl: "48px",
+ rounded0: "0px",
+ rounded3xs: "1px",
+ rounded2xs: "2px",
+ roundedXs: "4px",
+ roundedS: "6px",
+ roundedM: "8px",
+ roundedL: "10px",
+ roundedXl: "12px",
+ rounded2xl: "16px",
+ rounded3xl: "20px",
+ rounded4xl: "24px",
+ roundedFull: "999px",
+ roundedClickable: "6px",
+ },
+ },
+ jade: {
+ theme: {
+ ...commonTheme({ font: "Inter" }),
+ backgroundFills: "rgba(245, 245, 245, 1)",
+ brandElFills: "rgba(0, 165, 115, 1)",
+ brandElHoverFills: "rgba(0, 165, 115, 0.8)",
+ containerFills: "rgba(255, 255, 255, 1)",
+ overlayFills: "rgba(0, 0, 0, 0.4)",
+ sunkFills: "rgba(0, 0, 0, 0.04)",
+ containerHoverFills: "rgba(255, 255, 255, 0.04)",
+ dangerFills: "rgba(217, 45, 32, 0.08)",
+ successFills: "rgba(7, 148, 85, 0.08)",
+ strokeDefault: "rgba(0, 0, 0, 0.06)",
+ strokeInteractiveEl: "rgba(0, 0, 0, 0.12)",
+ strokeInteractiveElHover: "rgba(0, 0, 0, 0.4)",
+ strokeInteractiveElSelected: "rgba(0, 0, 0, 1)",
+ brandText: "rgba(255, 255, 255, 1)",
+ brandSecondaryText: "rgba(255, 255, 255, 0.4)",
+ primaryText: "rgba(0, 0, 0, 1)",
+ secondaryText: "rgba(0, 0, 0, 0.4)",
+ disabledText: "rgba(0, 0, 0, 0.2)",
+ dangerText: "rgba(217, 45, 32, 1)",
+ successText: "rgba(7, 148, 85, 1)",
+ linkText: "rgba(0, 0, 0, 1)",
+ infoText: "rgba(56, 148, 255, 1)",
+ chatContainerBg: "rgba(238, 245, 243, 1)",
+ chatAssistantResponseBg: "rgba(255, 255, 255, 0.8)",
+ chatUserResponseBg: "rgba(206, 229, 222, 1)",
+ chatAssistantResponseText: "rgba(0, 0, 0, 1)",
+ chatUserResponseText: "rgba(40, 54, 50, 1)",
+ spacing0: "0px",
+ spacing3xs: "2px",
+ spacing2xs: "4px",
+ spacingXs: "6px",
+ spacingS: "8px",
+ spacingM: "12px",
+ spacingL: "18px",
+ spacingXl: "24px",
+ spacing2xl: "36px",
+ spacing3xl: "48px",
+ rounded0: "0px",
+ rounded3xs: "1px",
+ rounded2xs: "2px",
+ roundedXs: "4px",
+ roundedS: "6px",
+ roundedM: "8px",
+ roundedL: "10px",
+ roundedXl: "12px",
+ rounded2xl: "16px",
+ rounded3xl: "20px",
+ rounded4xl: "24px",
+ roundedFull: "999px",
+ roundedClickable: "6px",
+ },
+ darkTheme: {
+ ...commonTheme({ font: "Inter" }),
+ backgroundFills: "rgba(28, 28, 28, 1)",
+ brandElFills: "rgba(0, 165, 115, 1)",
+ brandElHoverFills: "rgba(0, 165, 115, 0.8)",
+ containerFills: "rgba(43, 43, 43, 1)",
+ overlayFills: "rgba(0, 0, 0, 0.4)",
+ sunkFills: "rgba(0, 0, 0, 0.2)",
+ containerHoverFills: "rgba(255, 255, 255, 0.1)",
+ dangerFills: "rgba(217, 45, 32, 0.1)",
+ successFills: "rgba(7, 148, 85, 0.1)",
+ strokeDefault: "rgba(255, 255, 255, 0.06)",
+ strokeInteractiveEl: "rgba(255, 255, 255, 0.12)",
+ strokeInteractiveElHover: "rgba(255, 255, 255, 0.4)",
+ strokeInteractiveElSelected: "rgba(255, 255, 255, 1)",
+ brandText: "rgba(255, 255, 255, 1)",
+ brandSecondaryText: "rgba(255, 255, 255, 0.4)",
+ primaryText: "rgba(255, 255, 255, 1)",
+ secondaryText: "rgba(255, 255, 255, 0.6)",
+ disabledText: "rgba(255, 255, 255, 0.2)",
+ dangerText: "rgba(253, 162, 155, 1)",
+ successText: "rgba(117, 224, 167, 1)",
+ linkText: "rgba(255, 255, 255, 1)",
+ infoText: "rgba(125, 179, 247, 1)",
+ chatContainerBg: "rgba(40, 54, 50, 1)",
+ chatAssistantResponseBg: "rgba(67, 91, 83, 1)",
+ chatUserResponseBg: "rgba(191, 228, 208, 1)",
+ chatAssistantResponseText: "rgba(255, 255, 255, 1)",
+ chatUserResponseText: "rgba(40, 54, 50, 1)",
+ spacing0: "0px",
+ spacing3xs: "2px",
+ spacing2xs: "4px",
+ spacingXs: "6px",
+ spacingS: "8px",
+ spacingM: "12px",
+ spacingL: "18px",
+ spacingXl: "24px",
+ spacing2xl: "36px",
+ spacing3xl: "48px",
+ rounded0: "0px",
+ rounded3xs: "1px",
+ rounded2xs: "2px",
+ roundedXs: "4px",
+ roundedS: "6px",
+ roundedM: "8px",
+ roundedL: "10px",
+ roundedXl: "12px",
+ rounded2xl: "16px",
+ rounded3xl: "20px",
+ rounded4xl: "24px",
+ roundedFull: "999px",
+ roundedClickable: "6px",
+ },
+ },
+ play: {
+ theme: {
+ ...commonTheme({ font: "Geist" }),
+ backgroundFills: "rgba(245, 245, 245, 1)",
+ brandElFills: "rgba(255, 167, 195, 1)",
+ brandElHoverFills: "rgba(255, 167, 195, 0.8)",
+ containerFills: "rgba(255, 255, 255, 1)",
+ overlayFills: "rgba(0, 0, 0, 0.4)",
+ sunkFills: "rgba(0, 0, 0, 0.04)",
+ containerHoverFills: "rgba(255, 255, 255, 0.04)",
+ dangerFills: "rgba(217, 45, 32, 0.08)",
+ successFills: "rgba(7, 148, 85, 0.08)",
+ strokeDefault: "rgba(0, 0, 0, 0.06)",
+ strokeInteractiveEl: "rgba(0, 0, 0, 0.12)",
+ strokeInteractiveElHover: "rgba(0, 0, 0, 0.4)",
+ strokeInteractiveElSelected: "rgba(0, 0, 0, 1)",
+ brandText: "rgba(0, 0, 0, 1)",
+ brandSecondaryText: "rgba(255, 255, 255, 0.4)",
+ primaryText: "rgba(0, 0, 0, 1)",
+ secondaryText: "rgba(0, 0, 0, 0.4)",
+ disabledText: "rgba(0, 0, 0, 0.2)",
+ dangerText: "rgba(217, 45, 32, 1)",
+ successText: "rgba(7, 148, 85, 1)",
+ linkText: "rgba(0, 0, 0, 1)",
+ infoText: "rgba(56, 148, 255, 1)",
+ chatContainerBg: "rgba(241, 241, 241, 1)",
+ chatAssistantResponseBg: "rgba(249, 249, 249, 1)",
+ chatUserResponseBg: "rgba(175, 223, 255, 1)",
+ chatAssistantResponseText: "rgba(0, 0, 0, 1)",
+ chatUserResponseText: "rgba(0, 0, 0, 1)",
+ spacing0: "0px",
+ spacing3xs: "2px",
+ spacing2xs: "4px",
+ spacingXs: "6px",
+ spacingS: "8px",
+ spacingM: "12px",
+ spacingL: "18px",
+ spacingXl: "24px",
+ spacing2xl: "36px",
+ spacing3xl: "48px",
+ rounded0: "0px",
+ rounded3xs: "4px",
+ rounded2xs: "8px",
+ roundedXs: "10px",
+ roundedS: "12px",
+ roundedM: "20px",
+ roundedL: "20px",
+ roundedXl: "24px",
+ rounded2xl: "28px",
+ rounded3xl: "32px",
+ rounded4xl: "48px",
+ roundedFull: "999px",
+ roundedClickable: "999px",
+ },
+ darkTheme: {
+ ...commonTheme({ font: "Geist" }),
+ backgroundFills: "rgba(28, 28, 28, 1)",
+ brandElFills: "rgba(255, 186, 208, 1)",
+ brandElHoverFills: "rgba(255, 186, 208, 0.8)",
+ containerFills: "rgba(43, 43, 43, 1)",
+ overlayFills: "rgba(0, 0, 0, 0.4)",
+ sunkFills: "rgba(0, 0, 0, 0.2)",
+ containerHoverFills: "rgba(255, 255, 255, 0.1)",
+ dangerFills: "rgba(217, 45, 32, 0.1)",
+ successFills: "rgba(7, 148, 85, 0.1)",
+ strokeDefault: "rgba(255, 255, 255, 0.06)",
+ strokeInteractiveEl: "rgba(255, 255, 255, 0.12)",
+ strokeInteractiveElHover: "rgba(255, 255, 255, 0.4)",
+ strokeInteractiveElSelected: "rgba(255, 255, 255, 1)",
+ brandText: "rgba(0, 0, 0, 1)",
+ brandSecondaryText: "rgba(255, 255, 255, 0.4)",
+ primaryText: "rgba(255, 255, 255, 1)",
+ secondaryText: "rgba(255, 255, 255, 0.6)",
+ disabledText: "rgba(255, 255, 255, 0.2)",
+ dangerText: "rgba(253, 162, 155, 1)",
+ successText: "rgba(117, 224, 167, 1)",
+ linkText: "rgba(255, 255, 255, 1)",
+ infoText: "rgba(125, 179, 247, 1)",
+ chatContainerBg: "rgba(35, 35, 35, 1)",
+ chatAssistantResponseBg: "rgba(46, 46, 46, 1)",
+ chatUserResponseBg: "rgba(175, 223, 255, 1)",
+ chatAssistantResponseText: "rgba(255, 255, 255, 1)",
+ chatUserResponseText: "rgba(0, 0, 0, 1)",
+ spacing0: "0px",
+ spacing3xs: "2px",
+ spacing2xs: "4px",
+ spacingXs: "6px",
+ spacingS: "8px",
+ spacingM: "12px",
+ spacingL: "18px",
+ spacingXl: "24px",
+ spacing2xl: "36px",
+ spacing3xl: "48px",
+ rounded0: "0px",
+ rounded3xs: "4px",
+ rounded2xs: "8px",
+ roundedXs: "10px",
+ roundedS: "12px",
+ roundedM: "20px",
+ roundedL: "20px",
+ roundedXl: "24px",
+ rounded2xl: "28px",
+ rounded3xl: "32px",
+ rounded4xl: "48px",
+ roundedFull: "999px",
+ roundedClickable: "999px",
+ },
+ },
+ carbon: {
+ theme: {
+ ...commonTheme({ font: "Figtree" }),
+ backgroundFills: "rgba(245, 245, 245, 1)",
+ brandElFills: "rgba(0, 0, 0, 1)",
+ brandElHoverFills: "rgba(0, 0, 0, 0.8)",
+ containerFills: "rgba(255, 255, 255, 1)",
+ overlayFills: "rgba(0, 0, 0, 0.4)",
+ sunkFills: "rgba(0, 0, 0, 0.04)",
+ containerHoverFills: "rgba(255, 255, 255, 0.04)",
+ dangerFills: "rgba(217, 45, 32, 0.08)",
+ successFills: "rgba(7, 148, 85, 0.08)",
+ strokeDefault: "rgba(0, 0, 0, 0.06)",
+ strokeInteractiveEl: "rgba(0, 0, 0, 0.12)",
+ strokeInteractiveElHover: "rgba(0, 0, 0, 0.4)",
+ strokeInteractiveElSelected: "rgba(0, 0, 0, 1)",
+ brandText: "rgba(255, 255, 255, 1)",
+ brandSecondaryText: "rgba(255, 255, 255, 0.4)",
+ primaryText: "rgba(0, 0, 0, 1)",
+ secondaryText: "rgba(0, 0, 0, 0.4)",
+ disabledText: "rgba(0, 0, 0, 0.2)",
+ dangerText: "rgba(217, 45, 32, 1)",
+ successText: "rgba(7, 148, 85, 1)",
+ linkText: "rgba(0, 0, 0, 1)",
+ infoText: "rgba(56, 148, 255, 1)",
+ chatContainerBg: "rgba(241, 241, 241, 1)",
+ chatAssistantResponseBg: "rgba(249, 249, 249, 1)",
+ chatUserResponseBg: "rgba(0, 0, 0, 1)",
+ chatAssistantResponseText: "rgba(0, 0, 0, 1)",
+ chatUserResponseText: "rgba(241, 241, 241, 1)",
+ spacing0: "0px",
+ spacing3xs: "2px",
+ spacing2xs: "4px",
+ spacingXs: "6px",
+ spacingS: "8px",
+ spacingM: "12px",
+ spacingL: "18px",
+ spacingXl: "24px",
+ spacing2xl: "36px",
+ spacing3xl: "48px",
+ rounded0: "0px",
+ rounded3xs: "4px",
+ rounded2xs: "8px",
+ roundedXs: "10px",
+ roundedS: "12px",
+ roundedM: "20px",
+ roundedL: "20px",
+ roundedXl: "24px",
+ rounded2xl: "28px",
+ rounded3xl: "32px",
+ rounded4xl: "48px",
+ roundedFull: "999px",
+ roundedClickable: "999px",
+ },
+ darkTheme: {
+ ...commonTheme({ font: "Figtree" }),
+ backgroundFills: "rgba(28, 28, 28, 1)",
+ brandElFills: "rgba(255, 255, 255, 1)",
+ brandElHoverFills: "rgba(255, 255, 255, 0.8)",
+ containerFills: "rgba(43, 43, 43, 1)",
+ overlayFills: "rgba(0, 0, 0, 0.4)",
+ sunkFills: "rgba(0, 0, 0, 0.2)",
+ containerHoverFills: "rgba(255, 255, 255, 0.1)",
+ dangerFills: "rgba(217, 45, 32, 0.1)",
+ successFills: "rgba(7, 148, 85, 0.1)",
+ strokeDefault: "rgba(255, 255, 255, 0.06)",
+ strokeInteractiveEl: "rgba(255, 255, 255, 0.12)",
+ strokeInteractiveElHover: "rgba(255, 255, 255, 0.4)",
+ strokeInteractiveElSelected: "rgba(255, 255, 255, 1)",
+ brandText: "rgba(0, 0, 0, 1)",
+ brandSecondaryText: "rgba(255, 255, 255, 0.4)",
+ primaryText: "rgba(255, 255, 255, 1)",
+ secondaryText: "rgba(255, 255, 255, 0.6)",
+ disabledText: "rgba(255, 255, 255, 0.2)",
+ dangerText: "rgba(253, 162, 155, 1)",
+ successText: "rgba(117, 224, 167, 1)",
+ linkText: "rgba(255, 255, 255, 1)",
+ infoText: "rgba(125, 179, 247, 1)",
+ chatContainerBg: "rgba(25, 25, 25, 1)",
+ chatAssistantResponseBg: "rgba(41, 41, 41, 1)",
+ chatUserResponseBg: "rgba(255, 255, 255, 1)",
+ chatAssistantResponseText: "rgba(255, 255, 255, 1)",
+ chatUserResponseText: "rgba(25, 25, 25, 1)",
+ spacing0: "0px",
+ spacing3xs: "2px",
+ spacing2xs: "4px",
+ spacingXs: "6px",
+ spacingS: "8px",
+ spacingM: "12px",
+ spacingL: "18px",
+ spacingXl: "24px",
+ spacing2xl: "36px",
+ spacing3xl: "48px",
+ rounded0: "0px",
+ rounded3xs: "4px",
+ rounded2xs: "8px",
+ roundedXs: "10px",
+ roundedS: "12px",
+ roundedM: "20px",
+ roundedL: "20px",
+ roundedXl: "24px",
+ rounded2xl: "28px",
+ rounded3xl: "32px",
+ rounded4xl: "48px",
+ roundedFull: "999px",
+ roundedClickable: "999px",
+ },
+ },
+ neon: {
+ theme: {
+ ...commonTheme({ font: "Space Mono" }),
+ backgroundFills: "rgba(245, 245, 245, 1)",
+ brandElFills: "rgba(221, 244, 43, 1)",
+ brandElHoverFills: "rgba(221, 244, 43, 0.8)",
+ containerFills: "rgba(255, 255, 255, 1)",
+ overlayFills: "rgba(0, 0, 0, 0.4)",
+ sunkFills: "rgba(0, 0, 0, 0.04)",
+ containerHoverFills: "rgba(255, 255, 255, 0.04)",
+ dangerFills: "rgba(217, 45, 32, 0.08)",
+ successFills: "rgba(7, 148, 85, 0.08)",
+ strokeDefault: "rgba(0, 0, 0, 0.06)",
+ strokeInteractiveEl: "rgba(0, 0, 0, 0.12)",
+ strokeInteractiveElHover: "rgba(0, 0, 0, 0.4)",
+ strokeInteractiveElSelected: "rgba(0, 0, 0, 1)",
+ brandText: "rgba(0, 0, 0, 1)",
+ brandSecondaryText: "rgba(255, 255, 255, 0.4)",
+ primaryText: "rgba(0, 0, 0, 1)",
+ secondaryText: "rgba(0, 0, 0, 0.4)",
+ disabledText: "rgba(0, 0, 0, 0.2)",
+ dangerText: "rgba(217, 45, 32, 1)",
+ successText: "rgba(7, 148, 85, 1)",
+ linkText: "rgba(0, 0, 0, 1)",
+ infoText: "rgba(56, 148, 255, 1)",
+ chatContainerBg: "rgba(244, 244, 244, 1)",
+ chatAssistantResponseBg: "rgba(255, 255, 255, 1)",
+ chatUserResponseBg: "rgba(221, 244, 43, 1)",
+ chatAssistantResponseText: "rgba(0, 0, 0, 1)",
+ chatUserResponseText: "rgba(0, 0, 0, 1)",
+ spacing0: "0px",
+ spacing3xs: "2px",
+ spacing2xs: "4px",
+ spacingXs: "6px",
+ spacingS: "8px",
+ spacingM: "12px",
+ spacingL: "18px",
+ spacingXl: "24px",
+ spacing2xl: "36px",
+ spacing3xl: "48px",
+ rounded0: "0px",
+ rounded3xs: "0px",
+ rounded2xs: "0px",
+ roundedXs: "0px",
+ roundedS: "0px",
+ roundedM: "0px",
+ roundedL: "0px",
+ roundedXl: "0px",
+ rounded2xl: "0px",
+ rounded3xl: "0px",
+ rounded4xl: "0px",
+ roundedFull: "999px",
+ roundedClickable: "0px",
+ },
+ darkTheme: {
+ ...commonTheme({ font: "Space Mono" }),
+ backgroundFills: "rgba(28, 28, 28, 1)",
+ brandElFills: "rgba(225, 255, 0, 1)",
+ brandElHoverFills: "rgba(225, 255, 0, 0.8)",
+ containerFills: "rgba(43, 43, 43, 1)",
+ overlayFills: "rgba(0, 0, 0, 0.4)",
+ sunkFills: "rgba(0, 0, 0, 0.2)",
+ containerHoverFills: "rgba(255, 255, 255, 0.1)",
+ dangerFills: "rgba(217, 45, 32, 0.1)",
+ successFills: "rgba(7, 148, 85, 0.1)",
+ strokeDefault: "rgba(255, 255, 255, 0.06)",
+ strokeInteractiveEl: "rgba(255, 255, 255, 0.12)",
+ strokeInteractiveElHover: "rgba(255, 255, 255, 0.4)",
+ strokeInteractiveElSelected: "rgba(255, 255, 255, 1)",
+ brandText: "rgba(0, 0, 0, 1)",
+ brandSecondaryText: "rgba(255, 255, 255, 0.4)",
+ primaryText: "rgba(255, 255, 255, 1)",
+ secondaryText: "rgba(255, 255, 255, 0.6)",
+ disabledText: "rgba(255, 255, 255, 0.2)",
+ dangerText: "rgba(253, 162, 155, 1)",
+ successText: "rgba(117, 224, 167, 1)",
+ linkText: "rgba(255, 255, 255, 1)",
+ infoText: "rgba(125, 179, 247, 1)",
+ chatContainerBg: "rgba(22, 22, 22, 1)",
+ chatAssistantResponseBg: "rgba(22, 22, 22, 1)",
+ chatUserResponseBg: "rgba(42, 45, 20, 1)",
+ chatAssistantResponseText: "rgba(255, 255, 255, 1)",
+ chatUserResponseText: "rgba(225, 255, 0, 1)",
+ spacing0: "0px",
+ spacing3xs: "2px",
+ spacing2xs: "4px",
+ spacingXs: "6px",
+ spacingS: "8px",
+ spacingM: "12px",
+ spacingL: "18px",
+ spacingXl: "24px",
+ spacing2xl: "36px",
+ spacing3xl: "48px",
+ rounded0: "0px",
+ rounded3xs: "0px",
+ rounded2xs: "0px",
+ roundedXs: "0px",
+ roundedS: "0px",
+ roundedM: "0px",
+ roundedL: "0px",
+ roundedXl: "0px",
+ rounded2xl: "0px",
+ rounded3xl: "0px",
+ rounded4xl: "0px",
+ roundedFull: "999px",
+ roundedClickable: "0px",
+ },
+ },
+ candy: {
+ theme: {
+ ...commonTheme({ font: "Inter" }),
+ backgroundFills: "rgba(245, 245, 245, 1)",
+ brandElFills: "rgba(238, 79, 111, 1)",
+ brandElHoverFills: "rgba(238, 79, 111, 0.8)",
+ containerFills: "rgba(255, 255, 255, 1)",
+ overlayFills: "rgba(0, 0, 0, 0.4)",
+ sunkFills: "rgba(0, 0, 0, 0.04)",
+ containerHoverFills: "rgba(255, 255, 255, 0.04)",
+ dangerFills: "rgba(217, 45, 32, 0.08)",
+ successFills: "rgba(7, 148, 85, 0.08)",
+ strokeDefault: "rgba(0, 0, 0, 0.06)",
+ strokeInteractiveEl: "rgba(0, 0, 0, 0.12)",
+ strokeInteractiveElHover: "rgba(0, 0, 0, 0.4)",
+ strokeInteractiveElSelected: "rgba(0, 0, 0, 1)",
+ brandText: "rgba(255, 255, 255, 1)",
+ brandSecondaryText: "rgba(255, 255, 255, 0.4)",
+ primaryText: "rgba(0, 0, 0, 1)",
+ secondaryText: "rgba(0, 0, 0, 0.4)",
+ disabledText: "rgba(0, 0, 0, 0.2)",
+ dangerText: "rgba(217, 45, 32, 1)",
+ successText: "rgba(7, 148, 85, 1)",
+ linkText: "rgba(0, 0, 0, 1)",
+ infoText: "rgba(56, 148, 255, 1)",
+ chatContainerBg: "rgba(244, 244, 244, 1)",
+ chatAssistantResponseBg: "rgba(255, 255, 255, 0.8)",
+ chatUserResponseBg: "rgba(238, 79, 111, 1)",
+ chatAssistantResponseText: "rgba(0, 0, 0, 1)",
+ chatUserResponseText: "rgba(255, 255, 255, 1)",
+ spacing0: "0px",
+ spacing3xs: "2px",
+ spacing2xs: "4px",
+ spacingXs: "6px",
+ spacingS: "8px",
+ spacingM: "12px",
+ spacingL: "18px",
+ spacingXl: "24px",
+ spacing2xl: "36px",
+ spacing3xl: "48px",
+ rounded0: "0px",
+ rounded3xs: "1px",
+ rounded2xs: "2px",
+ roundedXs: "4px",
+ roundedS: "6px",
+ roundedM: "8px",
+ roundedL: "10px",
+ roundedXl: "12px",
+ rounded2xl: "16px",
+ rounded3xl: "20px",
+ rounded4xl: "24px",
+ roundedFull: "999px",
+ roundedClickable: "6px",
+ },
+ darkTheme: {
+ ...commonTheme({ font: "Inter" }),
+ backgroundFills: "rgba(28, 28, 28, 1)",
+ brandElFills: "rgba(247, 76, 101, 1)",
+ brandElHoverFills: "rgba(247, 76, 101, 0.8)",
+ containerFills: "rgba(43, 43, 43, 1)",
+ overlayFills: "rgba(0, 0, 0, 0.4)",
+ sunkFills: "rgba(0, 0, 0, 0.2)",
+ containerHoverFills: "rgba(255, 255, 255, 0.1)",
+ dangerFills: "rgba(217, 45, 32, 0.1)",
+ successFills: "rgba(7, 148, 85, 0.1)",
+ strokeDefault: "rgba(255, 255, 255, 0.06)",
+ strokeInteractiveEl: "rgba(255, 255, 255, 0.12)",
+ strokeInteractiveElHover: "rgba(255, 255, 255, 0.4)",
+ strokeInteractiveElSelected: "rgba(255, 255, 255, 1)",
+ brandText: "rgba(255, 255, 255, 1)",
+ brandSecondaryText: "rgba(255, 255, 255, 0.4)",
+ primaryText: "rgba(255, 255, 255, 1)",
+ secondaryText: "rgba(255, 255, 255, 0.6)",
+ disabledText: "rgba(255, 255, 255, 0.2)",
+ dangerText: "rgba(253, 162, 155, 1)",
+ successText: "rgba(117, 224, 167, 1)",
+ linkText: "rgba(255, 255, 255, 1)",
+ infoText: "rgba(125, 179, 247, 1)",
+ chatContainerBg: "rgba(34, 31, 31, 1)",
+ chatAssistantResponseBg: "rgba(43, 39, 39, 1)",
+ chatUserResponseBg: "rgba(247, 76, 101, 1)",
+ chatAssistantResponseText: "rgba(255, 255, 255, 1)",
+ chatUserResponseText: "rgba(255, 255, 255, 1)",
+ spacing0: "0px",
+ spacing3xs: "2px",
+ spacing2xs: "4px",
+ spacingXs: "6px",
+ spacingS: "8px",
+ spacingM: "12px",
+ spacingL: "18px",
+ spacingXl: "24px",
+ spacing2xl: "36px",
+ spacing3xl: "48px",
+ rounded0: "0px",
+ rounded3xs: "1px",
+ rounded2xs: "2px",
+ roundedXs: "4px",
+ roundedS: "6px",
+ roundedM: "8px",
+ roundedL: "10px",
+ roundedXl: "12px",
+ rounded2xl: "16px",
+ rounded3xl: "20px",
+ rounded4xl: "24px",
+ roundedFull: "999px",
+ roundedClickable: "6px",
+ },
+ },
+ charcoal: {
+ theme: {
+ ...commonTheme({ font: "Figtree" }),
+ backgroundFills: "rgba(245, 245, 245, 1)",
+ brandElFills: "rgba(0, 0, 0, 1)",
+ brandElHoverFills: "rgba(0, 0, 0, 0.8)",
+ containerFills: "rgba(255, 255, 255, 1)",
+ overlayFills: "rgba(0, 0, 0, 0.4)",
+ sunkFills: "rgba(0, 0, 0, 0.04)",
+ containerHoverFills: "rgba(255, 255, 255, 0.04)",
+ dangerFills: "rgba(217, 45, 32, 0.08)",
+ successFills: "rgba(7, 148, 85, 0.08)",
+ strokeDefault: "rgba(0, 0, 0, 0.06)",
+ strokeInteractiveEl: "rgba(0, 0, 0, 0.12)",
+ strokeInteractiveElHover: "rgba(0, 0, 0, 0.4)",
+ strokeInteractiveElSelected: "rgba(0, 0, 0, 1)",
+ brandText: "rgba(255, 255, 255, 1)",
+ brandSecondaryText: "rgba(255, 255, 255, 0.4)",
+ primaryText: "rgba(0, 0, 0, 1)",
+ secondaryText: "rgba(0, 0, 0, 0.4)",
+ disabledText: "rgba(0, 0, 0, 0.2)",
+ dangerText: "rgba(217, 45, 32, 1)",
+ successText: "rgba(7, 148, 85, 1)",
+ linkText: "rgba(0, 0, 0, 1)",
+ infoText: "rgba(56, 148, 255, 1)",
+ chatContainerBg: "rgba(235, 235, 235, 1)",
+ chatAssistantResponseBg: "rgba(208, 208, 208, 1)",
+ chatUserResponseBg: "rgba(217, 217, 217, 1)",
+ chatAssistantResponseText: "rgba(0, 0, 0, 1)",
+ chatUserResponseText: "rgba(53, 53, 53, 1)",
+ spacing0: "0px",
+ spacing3xs: "2px",
+ spacing2xs: "4px",
+ spacingXs: "6px",
+ spacingS: "8px",
+ spacingM: "12px",
+ spacingL: "18px",
+ spacingXl: "24px",
+ spacing2xl: "36px",
+ spacing3xl: "48px",
+ rounded0: "0px",
+ rounded3xs: "1px",
+ rounded2xs: "2px",
+ roundedXs: "4px",
+ roundedS: "6px",
+ roundedM: "8px",
+ roundedL: "10px",
+ roundedXl: "12px",
+ rounded2xl: "16px",
+ rounded3xl: "20px",
+ rounded4xl: "24px",
+ roundedFull: "999px",
+ roundedClickable: "6px",
+ },
+ darkTheme: {
+ ...commonTheme({ font: "Figtree" }),
+ backgroundFills: "rgba(28, 28, 28, 1)",
+ brandElFills: "rgba(255, 255, 255, 1)",
+ brandElHoverFills: "rgba(255, 255, 255, 0.8)",
+ containerFills: "rgba(43, 43, 43, 1)",
+ overlayFills: "rgba(0, 0, 0, 0.4)",
+ sunkFills: "rgba(0, 0, 0, 0.2)",
+ containerHoverFills: "rgba(255, 255, 255, 0.1)",
+ dangerFills: "rgba(217, 45, 32, 0.1)",
+ successFills: "rgba(7, 148, 85, 0.1)",
+ strokeDefault: "rgba(255, 255, 255, 0.06)",
+ strokeInteractiveEl: "rgba(255, 255, 255, 0.12)",
+ strokeInteractiveElHover: "rgba(255, 255, 255, 0.4)",
+ strokeInteractiveElSelected: "rgba(255, 255, 255, 1)",
+ brandText: "rgba(0, 0, 0, 1)",
+ brandSecondaryText: "rgba(255, 255, 255, 0.4)",
+ primaryText: "rgba(255, 255, 255, 1)",
+ secondaryText: "rgba(255, 255, 255, 0.6)",
+ disabledText: "rgba(255, 255, 255, 0.2)",
+ dangerText: "rgba(253, 162, 155, 1)",
+ successText: "rgba(117, 224, 167, 1)",
+ linkText: "rgba(255, 255, 255, 1)",
+ infoText: "rgba(125, 179, 247, 1)",
+ chatContainerBg: "rgba(53, 53, 53, 1)",
+ chatAssistantResponseBg: "rgba(76, 76, 76, 1)",
+ chatUserResponseBg: "rgba(222, 222, 222, 1)",
+ chatAssistantResponseText: "rgba(255, 255, 255, 1)",
+ chatUserResponseText: "rgba(53, 53, 53, 1)",
+ spacing0: "0px",
+ spacing3xs: "2px",
+ spacing2xs: "4px",
+ spacingXs: "6px",
+ spacingS: "8px",
+ spacingM: "12px",
+ spacingL: "18px",
+ spacingXl: "24px",
+ spacing2xl: "36px",
+ spacing3xl: "48px",
+ rounded0: "0px",
+ rounded3xs: "1px",
+ rounded2xs: "2px",
+ roundedXs: "4px",
+ roundedS: "6px",
+ roundedM: "8px",
+ roundedL: "10px",
+ roundedXl: "12px",
+ rounded2xl: "16px",
+ rounded3xl: "20px",
+ rounded4xl: "24px",
+ roundedFull: "999px",
+ roundedClickable: "6px",
+ },
+ },
+};
diff --git a/js/packages/react-ui/src/index.ts b/js/packages/react-ui/src/index.ts
index 5466035c0..5020b2e07 100644
--- a/js/packages/react-ui/src/index.ts
+++ b/js/packages/react-ui/src/index.ts
@@ -39,7 +39,7 @@ export * from "./components/Tag";
export * from "./components/TagBlock";
export * from "./components/TextArea";
export * from "./components/TextContent";
-export { Theme, ThemeProvider } from "./components/ThemeProvider";
+export { Theme, ThemeProvider, themePresets } from "./components/ThemeProvider";
// this is the context providers that are used in the shell
export * from "./context/LayoutContext";
diff --git a/js/pnpm-lock.yaml b/js/pnpm-lock.yaml
index 09d97e05c..013ebdfb5 100644
--- a/js/pnpm-lock.yaml
+++ b/js/pnpm-lock.yaml
@@ -56,12 +56,6 @@ importers:
react-dom:
specifier: '>=18.0.0'
version: 18.3.1([email protected])
- tailwind-merge:
- specifier: ^2.5.4
- version: 2.6.0
- tailwindcss-animate:
- specifier: ^1.0.7
- version: 1.0.7
tiny-invariant:
specifier: ^1.3.3
version: 1.3.3
@@ -4094,14 +4088,6 @@ packages:
resolution: {integrity: sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==}
engines: {node: ^14.18.0 || >=16.0.0}
- resolution: {integrity: sha512-P+Vu1qXfzediirmHOC3xKGAYeZtPcV9g76X+xg2FD4tYgR71ewMA35Y3sCz3zhiN/dwefRpJX0yBcgwi1fXNQA==}
-
- resolution: {integrity: sha512-bl6mpH3T7I3UFxuvDEXLxy/VuFxBk5bbzplh7tXI68mwMokNYd1t9qPBHlnyTwfa4JGC4zP516I1hYYtQ/vspA==}
- peerDependencies:
- tailwindcss: '>=3.0.0 || insiders'
-
resolution: {integrity: sha512-w33E2aCvSDP0tW9RZuNXadXlkHXqFzSkQew/aIa2i/Sj8fThxwovwlXHSPXTbAHwEIhBFXAedUhP2tueAKP8Og==}
engines: {node: '>=14.0.0'}
@@ -8347,10 +8333,6 @@ snapshots:
'@pkgr/core': 0.1.1
tslib: 2.8.1
-
-
dependencies:
'@alloc/quick-lru': 5.2.0