The Open Standard for Generative UI
Theme Provider and storybook config (#16)
Ankit Dase44edc9732b4
diff --git a/frontend-sdk/packages/react-ui/.storybook/main.ts b/frontend-sdk/packages/react-ui/.storybook/main.tsindex 85bb3fb5e..95d62e35f 100644--- a/frontend-sdk/packages/react-ui/.storybook/main.ts+++ b/frontend-sdk/packages/react-ui/.storybook/main.ts@@ -10,8 +10,9 @@ const config: StorybookConfig = {options: {},},previewHead: (head) => `- ${head}- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/normalize.css">+ ${head}+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/normalize.css">+ <link href="https://fonts.googleapis.com/css2?family=Inter+Tight:ital,wght@0,100..900;1,100..900&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap" rel="stylesheet">`,previewBody: (body) => `${body}diff --git a/frontend-sdk/packages/react-ui/.storybook/preview.ts b/frontend-sdk/packages/react-ui/.storybook/preview.tsxsimilarity index 54%rename from frontend-sdk/packages/react-ui/.storybook/preview.tsrename to frontend-sdk/packages/react-ui/.storybook/preview.tsxindex 37914b18f..0b9e76a58 100644--- a/frontend-sdk/packages/react-ui/.storybook/preview.ts+++ b/frontend-sdk/packages/react-ui/.storybook/preview.tsx@@ -1,4 +1,6 @@import type { Preview } from "@storybook/react";+import { ThemeProvider } from "../src/components/ThemeProvider";+import React from "react";const preview: Preview = {parameters: {@@ -9,6 +11,13 @@ const preview: Preview = {},},},+ decorators: [+ (Story) => (+ <ThemeProvider>+ <Story />+ </ThemeProvider>+ ),+ ],};export default preview;diff --git a/frontend-sdk/packages/react-ui/src/components/ThemeProvider/ThemeProvider.tsx b/frontend-sdk/packages/react-ui/src/components/ThemeProvider/ThemeProvider.tsxnew file mode 100644index 000000000..b23710a84--- /dev/null+++ b/frontend-sdk/packages/react-ui/src/components/ThemeProvider/ThemeProvider.tsx@@ -0,0 +1,362 @@+interface ThemeProviderProps {+ // Background colors+ backgroundFills?: string;+ brandElFills?: string;+ brandElHoverFills?: string;+ containerFills?: string;+ overlayFills?: string;+ sunkFills?: string;+ containerHoverFills?: string;+ dangerFills?: string;+ successFills?: string;++ // Border colors+ strokesDefault?: string;+ stocksInteractiveEl?: string;+ stocksInteractiveElHover?: string;+ strokesInteractiveElSelected?: string;++ // Text colors+ brandText?: string;+ brandSecondaryText?: string;+ primaryText?: string;+ secondaryText?: string;+ disabledText?: string;+ dangerText?: string;+ successText?: string;+ linkText?: string;+ infoText?: string;++ // Spacing+ spacing0?: string;+ spacing3xs?: string;+ spacing2xs?: string;+ spacingXs?: string;+ spacingS?: string;+ spacingM?: string;+ spacingL?: string;+ spacingXl?: string;+ spacing2xl?: string;+ spacing3xl?: string;++ // Radius+ rounded0?: string;+ rounded3xs?: string;+ rounded2xs?: string;+ roundedXs?: string;+ roundedS?: string;+ roundedM?: string;+ roundedL?: string;+ roundedXl?: string;+ rounded2xl?: string;+ rounded3xl?: string;+ rounded4xl?: string;+ roundedFull?: string;+ roundedClickable?: string;++ // Font styles+ fontPrimary?: string;+ fontPrimaryLetterSpacing?: string;+ fontTitle?: string;+ fontTitleLetterSpacing?: string;+ fontTitleMedium?: string;+ fontTitleMediumLetterSpacing?: string;+ fontTitleSmall?: string;+ fontTitleSmallLetterSpacing?: string;+ fontBody?: string;+ fontBodyLetterSpacing?: string;+ fontBodyLink?: string;+ fontBodyLinkLetterSpacing?: string;+ fontBodyHeavy?: string;+ fontBodyHeavyLetterSpacing?: string;+ fontBodyMedium?: string;+ fontBodyMediumLetterSpacing?: string;+ fontBodySmallHeavy?: string;+ fontBodySmallHeavyLetterSpacing?: string;+ fontBodySmall?: string;+ fontBodySmallLetterSpacing?: string;+ fontLabel?: string;+ fontLabelLetterSpacing?: string;+ fontLabelHeavy?: string;+ fontLabelHeavyLetterSpacing?: string;+ fontLabelSmall?: string;+ fontLabelSmallLetterSpacing?: string;+ fontLabelSmallHeavy?: string;+ fontLabelSmallHeavyLetterSpacing?: string;+ fontLabelExtraSmall?: string;+ fontLabelExtraSmallLetterSpacing?: string;+ fontLabelExtraSmallHeavy?: string;+ fontLabelExtraSmallHeavyLetterSpacing?: string;+ fontLabelLargeHeavy?: string;+ fontLabelLargeHeavyLetterSpacing?: string;+ fontLabelLarge?: string;+ fontLabelLargeLetterSpacing?: string;+ fontLabelMediumHeavy?: string;+ fontLabelMediumHeavyLetterSpacing?: string;+ fontLabelMedium?: string;+ fontLabelMediumLetterSpacing?: string;+ fontHeadingLarge?: string;+ fontHeadingLargeLetterSpacing?: string;+ fontHeadingMedium?: string;+ fontHeadingMediumLetterSpacing?: string;+ fontHeadingSmall?: string;+ fontHeadingSmallLetterSpacing?: string;++ // Shadows+ shadowS?: string;+ shadowM?: string;+ shadowL?: string;+ shadowXl?: string;+ shadow2xl?: string;+ shadow3xl?: string;+}++const defaultTheme: ThemeProviderProps = {+ // Background colors+ backgroundFills: "rgb(245, 245, 245)",+ brandElFills: "rgb(0, 0, 0)",+ brandElHoverFills: "rgba(0, 0, 0, 0.8)",+ containerFills: "rgb(255, 255, 255)",+ overlayFills: "rgba(0, 0, 0, 0.4)",+ sunkFills: "rgba(0, 0, 0, 0.04)",+ containerHoverFills: "rgba(0, 0, 0, 0.04)",+ dangerFills: "rgba(217, 45, 32, 0.08)",+ successFills: "rgba(7, 148, 85, 0.08)",++ // Border colors+ strokesDefault: "rgba(0, 0, 0, 0.06)",+ stocksInteractiveEl: "rgba(0, 0, 0, 0.12)",+ stocksInteractiveElHover: "rgba(0, 0, 0, 0.4)",+ strokesInteractiveElSelected: "rgba(0, 0, 0, 1)",++ // Text colors+ 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(217, 45, 32, 1)",+ linkText: "rgba(0, 0, 0, 1)",+ infoText: "rgba(0, 0, 0, 0.4)",++ // Spacing+ spacing0: "0px",+ spacing3xs: "2px",+ spacing2xs: "4px",+ spacingXs: "6px",+ spacingS: "8px",+ spacingM: "12px",+ spacingL: "18px",+ spacingXl: "24px",+ spacing2xl: "36px",+ spacing3xl: "48px",++ // Radius+ 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',++ // Primary Font+ fontPrimary: '400 14px/20px "Inter"',+ fontPrimaryLetterSpacing: "0px",++ // Display & Headings+ // Large+ fontHeadingLarge: '600 28px/36px "Inter"',+ fontHeadingLargeLetterSpacing: "0px",+ // Medium+ fontHeadingMedium: '600 24px/32px "Inter"',+ fontHeadingMediumLetterSpacing: "0px",+ // Small+ fontHeadingSmall: '600 18px/24px "Inter"',+ fontHeadingSmallLetterSpacing: "0px",++ // Title Variants+ // Default+ fontTitle: '500 14px/20px "Inter"',+ fontTitleLetterSpacing: "0px",+ // Medium+ fontTitleMedium: '500 16px/24px "Inter"',+ fontTitleMediumLetterSpacing: "0px",+ // Small+ fontTitleSmall: '500 14px/20px "Inter"',+ fontTitleSmallLetterSpacing: "0px",++ // Body Text+ // Regular+ fontBody: '400 14px/18px "Inter"',+ fontBodyLetterSpacing: "0px",+ fontBodyMedium: '400 16px/24px "Inter"',+ fontBodyMediumLetterSpacing: "0px",+ fontBodySmall: '400 14px/20px "Inter"',+ fontBodySmallLetterSpacing: "0px",+ // Heavy+ fontBodyHeavy: '600 16px/24px "Inter"',+ fontBodyHeavyLetterSpacing: "0px",+ fontBodySmallHeavy: '600 14px/20px "Inter"',+ fontBodySmallHeavyLetterSpacing: "0px",+ // Special+ fontBodyLink: '500 14px/18px "Inter"',+ fontBodyLinkLetterSpacing: "0px",++ // Label System+ // Large+ fontLabelLarge: '400 12px/16px "Inter"',+ fontLabelLargeLetterSpacing: "0px",+ fontLabelLargeHeavy: '500 12px/16px "Inter"',+ fontLabelLargeHeavyLetterSpacing: "0px",+ // Regular+ fontLabel: '400 12px/16px "Inter"',+ fontLabelLetterSpacing: "0px",+ fontLabelHeavy: '500 12px/16px "Inter"',+ fontLabelHeavyLetterSpacing: "0px",+ // Medium+ fontLabelMedium: '400 10px/16px "Inter"',+ fontLabelMediumLetterSpacing: "0px",+ fontLabelMediumHeavy: '600 10px/16px "Inter"',+ fontLabelMediumHeavyLetterSpacing: "0px",+ // Small+ fontLabelSmall: '400 10px/16px "Inter"',+ fontLabelSmallLetterSpacing: "0px",+ fontLabelSmallHeavy: '500 10px/16px "Inter"',+ fontLabelSmallHeavyLetterSpacing: "0px",+ // Extra Small+ fontLabelExtraSmall: '400 8px/12px "Inter"',+ fontLabelExtraSmallLetterSpacing: "0px",+ fontLabelExtraSmallHeavy: '500 8px/12px "Inter"',+ fontLabelExtraSmallHeavyLetterSpacing: "0px",++ // Shadows+ shadowS: "0px 2px 4px -2px rgba(0, 0, 0, 0.04), 0px 1px 2px -2px rgba(0, 0, 0, 0.02)",+ shadowM: "0px 2px 2px -2px rgba(0, 0, 0, 0.05), 0px 4px 6px -2px rgba(0, 0, 0, 0.03)",+ shadowL: "0px 4px 4px -2px rgba(0, 0, 0, 0.05), 0px 4px 8px -2px rgba(0, 0, 0, 0.04)",+ shadowXl: "0px 6px 8px -4px rgba(0, 0, 0, 0.12), 0px 4px 20px -6px rgba(0, 0, 0, 0.08)",+ shadow2xl: "0px 6px 10px -6px rgba(0, 0, 0, 0.14), 0px 8px 32px -6px rgba(0, 0, 0, 0.12)",+ shadow3xl: "0px 12px 24px -4px rgba(0, 0, 0, 0.14), 0px 16px 32px -6px rgba(0, 0, 0, 0.12)",+};++export const ThemeProvider = (props: React.PropsWithChildren<ThemeProviderProps>) => {+ const theme = { ...defaultTheme, ...props };++ return (+ <>+ <style>{`+ body {+ --background-fills: ${theme.backgroundFills};+ --brand-el-fills: ${theme.brandElFills};+ --brand-el-hover-fills: ${theme.brandElHoverFills};+ --container-fills: ${theme.containerFills};+ --overlay-fills: ${theme.overlayFills};+ --sunk-fills: ${theme.sunkFills};+ --container-hover-fills: ${theme.containerHoverFills};+ --danger-fills: ${theme.dangerFills};+ --success-fills: ${theme.successFills};++ --strokes-default: ${theme.strokesDefault};+ --stocks-interactive-el: ${theme.stocksInteractiveEl};+ --stocks-interactive-el-hover: ${theme.stocksInteractiveElHover};+ --strokes-interactive-el-selected: ${theme.strokesInteractiveElSelected};++ --brand-text: ${theme.brandText};+ --brand-secondary-text: ${theme.brandSecondaryText};+ --primary-text: ${theme.primaryText};+ --secondary-text: ${theme.secondaryText};+ --disabled-text: ${theme.disabledText};+ --danger-text: ${theme.dangerText};+ --success-text: ${theme.successText};+ --link-text: ${theme.linkText};+ --info-text: ${theme.infoText};++ --spacing-0: ${theme.spacing0};+ --spacing-3xs: ${theme.spacing3xs};+ --spacing-2xs: ${theme.spacing2xs};+ --spacing-xs: ${theme.spacingXs};+ --spacing-s: ${theme.spacingS};+ --spacing-m: ${theme.spacingM};+ --spacing-l: ${theme.spacingL};+ --spacing-xl: ${theme.spacingXl};+ --spacing-2xl: ${theme.spacing2xl};+ --spacing-3xl: ${theme.spacing3xl};++ --rounded-0: ${theme.rounded0};+ --rounded-3xs: ${theme.rounded3xs};+ --rounded-2xs: ${theme.rounded2xs};+ --rounded-xs: ${theme.roundedXs};+ --rounded-s: ${theme.roundedS};+ --rounded-m: ${theme.roundedM};+ --rounded-l: ${theme.roundedL};+ --rounded-xl: ${theme.roundedXl};+ --rounded-2xl: ${theme.rounded2xl};+ --rounded-3xl: ${theme.rounded3xl};+ --rounded-full: ${theme.roundedFull};++ --font-primary: ${theme.fontPrimary};+ --font-primary-letter-spacing: ${theme.fontPrimaryLetterSpacing};+ --font-title: ${theme.fontTitle};+ --font-title-letter-spacing: ${theme.fontTitleLetterSpacing};+ --font-title-medium: ${theme.fontTitleMedium};+ --font-title-medium-letter-spacing: ${theme.fontTitleMediumLetterSpacing};+ --font-title-small: ${theme.fontTitleSmall};+ --font-title-small-letter-spacing: ${theme.fontTitleSmallLetterSpacing};+ --font-body: ${theme.fontBody};+ --font-body-letter-spacing: ${theme.fontBodyLetterSpacing};+ --font-body-link: ${theme.fontBodyLink};+ --font-body-link-letter-spacing: ${theme.fontBodyLinkLetterSpacing};+ --font-body-heavy: ${theme.fontBodyHeavy};+ --font-body-heavy-letter-spacing: ${theme.fontBodyHeavyLetterSpacing};+ --font-body-medium: ${theme.fontBodyMedium};+ --font-body-medium-letter-spacing: ${theme.fontBodyMediumLetterSpacing};+ --font-body-small-heavy: ${theme.fontBodySmallHeavy};+ --font-body-small-heavy-letter-spacing: ${theme.fontBodySmallHeavyLetterSpacing};+ --font-body-small: ${theme.fontBodySmall};+ --font-body-small-letter-spacing: ${theme.fontBodySmallLetterSpacing};+ --font-label: ${theme.fontLabel};+ --font-label-letter-spacing: ${theme.fontLabelLetterSpacing};+ --font-label-heavy: ${theme.fontLabelHeavy};+ --font-label-heavy-letter-spacing: ${theme.fontLabelHeavyLetterSpacing};+ --font-label-small: ${theme.fontLabelSmall};+ --font-label-small-letter-spacing: ${theme.fontLabelSmallLetterSpacing};+ --font-label-small-heavy: ${theme.fontLabelSmallHeavy};+ --font-label-small-heavy-letter-spacing: ${theme.fontLabelSmallHeavyLetterSpacing};+ --font-label-extra-small: ${theme.fontLabelExtraSmall};+ --font-label-extra-small-letter-spacing: ${theme.fontLabelExtraSmallLetterSpacing};+ --font-label-extra-small-heavy: ${theme.fontLabelExtraSmallHeavy};+ --font-label-extra-small-heavy-letter-spacing: ${theme.fontLabelExtraSmallHeavyLetterSpacing};+ --font-label-large-heavy: ${theme.fontLabelLargeHeavy};+ --font-label-large-heavy-letter-spacing: ${theme.fontLabelLargeHeavyLetterSpacing};+ --font-label-large: ${theme.fontLabelLarge};+ --font-label-large-letter-spacing: ${theme.fontLabelLargeLetterSpacing};+ --font-label-medium-heavy: ${theme.fontLabelMediumHeavy};+ --font-label-medium-heavy-letter-spacing: ${theme.fontLabelMediumHeavyLetterSpacing};+ --font-label-medium: ${theme.fontLabelMedium};+ --font-label-medium-letter-spacing: ${theme.fontLabelMediumLetterSpacing};+ --font-heading-large: ${theme.fontHeadingLarge};+ --font-heading-large-letter-spacing: ${theme.fontHeadingLargeLetterSpacing};+ --font-heading-medium: ${theme.fontHeadingMedium};+ --font-heading-medium-letter-spacing: ${theme.fontHeadingMediumLetterSpacing};+ --font-heading-small: ${theme.fontHeadingSmall};+ --font-heading-small-letter-spacing: ${theme.fontHeadingSmallLetterSpacing};++ --shadow-s: ${theme.shadowS};+ --shadow-m: ${theme.shadowM};+ --shadow-l: ${theme.shadowL};+ --shadow-xl: ${theme.shadowXl};+ --shadow-2xl: ${theme.shadow2xl};+ --shadow-3xl: ${theme.shadow3xl};+ }+ `}</style>+ {props.children}+ </>+ );+};diff --git a/frontend-sdk/packages/react-ui/src/components/ThemeProvider/index.ts b/frontend-sdk/packages/react-ui/src/components/ThemeProvider/index.tsnew file mode 100644index 000000000..d380ec38c--- /dev/null+++ b/frontend-sdk/packages/react-ui/src/components/ThemeProvider/index.ts@@ -0,0 +1 @@+export * from "./ThemeProvider";diff --git a/frontend-sdk/packages/react-ui/src/cssUtils.scss b/frontend-sdk/packages/react-ui/src/cssUtils.scssindex 46398296f..5dc5b3aaa 100644--- a/frontend-sdk/packages/react-ui/src/cssUtils.scss+++ b/frontend-sdk/packages/react-ui/src/cssUtils.scss@@ -1,5 +1,4 @@@use "sass:map";-@use "./variables";$colors: (fills: (diff --git a/frontend-sdk/packages/react-ui/src/index.css b/frontend-sdk/packages/react-ui/src/index.cssdeleted file mode 100644index 57427f96e..000000000--- a/frontend-sdk/packages/react-ui/src/index.css+++ /dev/null@@ -1,121 +0,0 @@-@import url("./variables.css");--/* Primary fonts */-.crayon-font-primary {- font: var(--font-primary);- letter-spacing: var(--font-primary-letter-spacing);-}--/* Title fonts */-.crayon-font-title {- font: var(--font-title);- letter-spacing: var(--font-title-letter-spacing);-}--.crayon-font-title-medium {- font: var(--font-title-medium);- letter-spacing: var(--font-title-medium-letter-spacing);-}--.crayon-font-title-small {- font: var(--font-title-small);- letter-spacing: var(--font-title-small-letter-spacing);-}--/* Body fonts */-.crayon-font-body {- font: var(--font-body);- letter-spacing: var(--font-body-letter-spacing);-}--.crayon-font-body-link {- font: var(--font-body-link);- letter-spacing: var(--font-body-link-letter-spacing);-}--.crayon-font-body-heavy {- font: var(--font-body-heavy);- letter-spacing: var(--font-body-heavy-letter-spacing);-}--.crayon-font-body-medium {- font: var(--font-body-medium);- letter-spacing: var(--font-body-medium-letter-spacing);-}--.crayon-font-body-small-heavy {- font: var(--font-body-small-heavy);- letter-spacing: var(--font-body-small-heavy-letter-spacing);-}--.crayon-font-body-small {- font: var(--font-body-small);- letter-spacing: var(--font-body-small-letter-spacing);-}--/* Label fonts */-.crayon-font-label {- font: var(--font-label);- letter-spacing: var(--font-label-letter-spacing);-}--.crayon-font-label-heavy {- font: var(--font-label-heavy);- letter-spacing: var(--font-label-heavy-letter-spacing);-}--.crayon-font-label-small {- font: var(--font-label-small);- letter-spacing: var(--font-label-small-letter-spacing);-}--.crayon-font-label-small-heavy {- font: var(--font-label-small-heavy);- letter-spacing: var(--font-label-small-heavy-letter-spacing);-}--.crayon-font-label-extra-small {- font: var(--font-label-extra-small);- letter-spacing: var(--font-label-extra-small-letter-spacing);-}--.crayon-font-label-extra-small-heavy {- font: var(--font-label-extra-small-heavy);- letter-spacing: var(--font-label-extra-small-heavy-letter-spacing);-}--.crayon-font-label-large-heavy {- font: var(--font-label-large-heavy);- letter-spacing: var(--font-label-large-heavy-letter-spacing);-}--.crayon-font-label-large {- font: var(--font-label-large);- letter-spacing: var(--font-label-large-letter-spacing);-}--.crayon-font-label-medium-heavy {- font: var(--font-label-medium-heavy);- letter-spacing: var(--font-label-medium-heavy-letter-spacing);-}--.crayon-font-label-medium {- font: var(--font-label-medium);- letter-spacing: var(--font-label-medium-letter-spacing);-}--/* Heading fonts */-.crayon-font-heading-large {- font: var(--font-heading-large);- letter-spacing: var(--font-heading-large-letter-spacing);-}--.crayon-font-heading-medium {- font: var(--font-heading-medium);- letter-spacing: var(--font-heading-medium-letter-spacing);-}--.crayon-font-heading-small {- font: var(--font-heading-small);- letter-spacing: var(--font-heading-small-letter-spacing);-}diff --git a/frontend-sdk/packages/react-ui/src/variables.css b/frontend-sdk/packages/react-ui/src/variables.cssdeleted file mode 100644index 5eb8cd430..000000000--- a/frontend-sdk/packages/react-ui/src/variables.css+++ /dev/null@@ -1,181 +0,0 @@-@import url("https://fonts.googleapis.com/css2?family=Inter+Tight:ital,wght@0,100..900;1,100..900&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");-body {- /* Background colors */- --background-fills: rgb(245, 245, 245);- --brand-el-fills: rgb(0, 0, 0);- --brand-el-hover-fills: rgba(0, 0, 0, 0.8);- --container-fills: rgb(255, 255, 255);- --overlay-fills: rgba(0, 0, 0, 0.4);- --sunk-fills: rgba(0, 0, 0, 0.04);- --container-hover-fills: rgba(0, 0, 0, 0.04);- --danger-fills: rgba(217, 45, 32, 0.08);- --success-fills: rgba(7, 148, 85, 0.08);-- /* Border colors */- --strokes-default: rgba(0, 0, 0, 0.06);- --stocks-interactive-el: rgba(0, 0, 0, 0.12);- --stocks-interactive-el-hover: rgba(0, 0, 0, 0.4);- --strokes-interactive-el-selected: rgba(0, 0, 0, 1);-- /* Text colors */- --brand-text: rgba(255, 255, 255, 1);- --brand-secondary-text: rgba(255, 255, 255, 0.4);- --primary-text: rgba(0, 0, 0, 1);- --secondary-text: rgba(0, 0, 0, 0.4);- --disabled-text: rgba(0, 0, 0, 0.2);- --danger-text: rgba(217, 45, 32, 1);- --success-text: rgba(217, 45, 32, 1);- --link-text: rgba(0, 0, 0, 1);- --info-text: rgba(0, 0, 0, 0.4);-- /* Spacing */- --spacing-0: 0px;- --spacing-3xs: 2px;- --spacing-2xs: 4px;- --spacing-xs: 6px;- --spacing-s: 8px;- --spacing-m: 12px;- --spacing-l: 18px;- --spacing-xl: 24px;- --spacing-2xl: 36px;- --spacing-3xl: 48px;-- /* Radius */- --rounded-0: 0px;- --rounded-3xs: 2px;- --rounded-2xs: 4px;- --rounded-xs: 6px;- --rounded-s: 8px;- --rounded-m: 12px;- --rounded-l: 14px;- --rounded-xl: 20px;- --rounded-2xl: 28px;- --rounded-3xl: 32px;- --rounded-full: 999px;-- /* Font */- /* font: weight size/line-height font-family */- /* letter-spacing and paragraph-spacing can't be in the same variable */-- /* font-primary */-- --font-primary: 400 14px/20px "Inter";- --font-primary-letter-spacing: 0px;-- /* font-title */-- --font-title: 500 14px/20px "Inter";- --font-title-letter-spacing: 0px;-- --font-title-medium: 500 16px/24px "Inter";- --font-title-medium-letter-spacing: 0px;-- --font-title-small: 500 14px/20px "Inter";- --font-title-small-letter-spacing: 0px;-- /* font-body */-- --font-body: 400 14px/18px "Inter";- --font-body-letter-spacing: 0px;-- --font-body-link: 500 14px/18px "Inter";- --font-body-link-letter-spacing: 0px;-- --font-body-heavy: 600 16px/24px "Inter";- --font-body-heavy-letter-spacing: 0px;-- --font-body-medium: 400 16px/24px "Inter";- --font-body-medium-letter-spacing: 0px;-- --font-body-small-heavy: 600 14px/20px "Inter";- --font-body-small-heavy-letter-spacing: 0px;-- --font-body-small: 400 14px/20px "Inter";- --font-body-small-letter-spacing: 0px;-- /* font-label */-- --font-label: 400 12px/16px "Inter";- --font-label-letter-spacing: 0px;-- --font-label-heavy: 500 12px/16px "Inter";- --font-label-heavy-letter-spacing: 0px;-- --font-label-small: 400 10px/16px "Inter";- --font-label-small-letter-spacing: 0px;-- --font-label-small-heavy: 500 10px/16px "Inter";- --font-label-small-heavy-letter-spacing: 0px;-- --font-label-extra-small: 400 8px/12px "Inter";- --font-label-extra-small-letter-spacing: 0px;-- --font-label-extra-small-heavy: 500 8px/12px "Inter";- --font-label-extra-small-heavy-letter-spacing: 0px;-- --font-label-large-heavy: 500 12px/16px "Inter";- --font-label-large-heavy-letter-spacing: 0px;-- --font-label-large: 400 12px/16px "Inter";- --font-label-large-letter-spacing: 0px;-- --font-label-medium-heavy: 600 10px/16px "Inter";- --font-label-medium-heavy-letter-spacing: 0px;-- --font-label-medium: 400 10px/16px "Inter";- --font-label-medium-letter-spacing: 0px;-- /* font-heading */-- --font-heading-large: 600 28px/36px "Inter";- --font-heading-large-letter-spacing: 0px;-- --font-heading-medium: 600 24px/32px "Inter";- --font-heading-medium-letter-spacing: 0px;-- --font-heading-small: 600 18px/24px "Inter";- --font-heading-small-letter-spacing: 0px;-- /* shadow */-- --shadow-s: 0px 2px 4px -2px rgba(0, 0, 0, 0.04), 0px 1px 2px -2px rgba(0, 0, 0, 0.02);- --shadow-m: 0px 2px 2px -2px rgba(0, 0, 0, 0.05), 0px 4px 6px -2px rgba(0, 0, 0, 0.03);- --shadow-l: 0px 4px 4px -2px rgba(0, 0, 0, 0.05), 0px 4px 8px -2px rgba(0, 0, 0, 0.04);- --shadow-xl: 0px 6px 8px -4px rgba(0, 0, 0, 0.12), 0px 4px 20px -6px rgba(0, 0, 0, 0.08);- --shadow-2xl: 0px 6px 10px -6px rgba(0, 0, 0, 0.14), 0px 8px 32px -6px rgba(0, 0, 0, 0.12);- --shadow-3xl: 0px 12px 24px -4px rgba(0, 0, 0, 0.14), 0px 16px 32px -6px rgba(0, 0, 0, 0.12);-}--[data-theme="dark"] {- color-scheme: dark;- /* Background colors */- --background-fills: #f5f5f5;- /* this is provided by the user */- --brand-el-fills: #000000;- /* need to provide the opacity */- --brand-el-hover-fills: #000000;- --container-fills: #ffffff;- /* need to provide the opacity */- --overlay-fills: rgba(0, 0, 0, 0.4);- --sunk-fills: #000000;- --container-hover-fills: #ffffff;- --danger-fills: #7f56d9;- --success-fills: #079455;-- /* Border colors */- --strokes-default: #000000;- --stocks-interactive-el: #000000;- --stocks-interactive-el-hover: #000000;- --strokes-interactive-el-selected: #000000;-- /* Text colors */- --brand-text: #ffffff;- --brand-secondary-text: #ffffff;- --primary-text: #ffffff;- --secondary-text: #ffffff;- --disabled-text: #000000;- --danger-text: #d92d20;- --success-text: #079455;- --link-text: #000000;- --info-text: #000000;-}diff --git a/frontend-sdk/pnpm-lock.yaml b/frontend-sdk/pnpm-lock.yamlindex c9619aa9a..b941d865a 100644--- a/frontend-sdk/pnpm-lock.yaml+++ b/frontend-sdk/pnpm-lock.yaml@@ -153,6 +153,9 @@ importers:react-dom:specifier: 19.0.0-rc-66855b96-20241106version: 19.0.0-rc-66855b96-20241106([email protected])+ recharts:+ specifier: ^2.15.1sass:specifier: ^1.83.4version: 1.83.4@@ -168,9 +171,6 @@ importers:tiny-invariant:specifier: ^1.3.3version: 1.3.3- typescript:- specifier: ^5.7.3- version: 5.7.3zustand:specifier: ^5.0.2@@ -190,9 +190,6 @@ importers:'@storybook/blocks':specifier: ^8.5.2version: 8.5.2([email protected]([email protected]))([email protected])([email protected]([email protected]))- '@storybook/manager-api':- specifier: ^8.5.2- version: 8.5.2([email protected]([email protected]))'@storybook/react':specifier: ^8.5.2version: 8.5.2(@storybook/[email protected]([email protected]([email protected])))([email protected]([email protected]))([email protected])([email protected]([email protected]))([email protected])@@ -202,9 +199,6 @@ importers:'@storybook/test':specifier: ^8.5.2version: 8.5.2([email protected]([email protected]))- '@storybook/theming':- specifier: ^8.5.2- version: 8.5.2([email protected]([email protected]))'@types/lodash-es':specifier: ^4.17.12version: 4.17.12@@ -362,6 +356,12 @@ packages:resolution: {integrity: sha512-t8kDRGrKXyp6+tjUh7hw2RLyclsW4TRoRvRHtSyAX9Bb5ldlFh+90YAYY6awRXrlB4G5G2izNeGySpATlFzmOg==}engines: {node: '>=6.9.0'}+ '@chromatic-com/[email protected]':+ resolution: {integrity: sha512-5/bOOYxfwZ2BktXeqcCpOVAoR6UCoeART5t9FVy22hoo8F291zOuX4y3SDgm10B1GVU/ZTtJWPT2X9wZFlxYLg==}+ engines: {node: '>=16.0.0', yarn: '>=1.22.18'}+ peerDependencies:+ storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0+'@date-fns/[email protected]':resolution: {integrity: sha512-LBrd7MiJZ9McsOgxqWX7AaxrDjcFVjWH/tIKJd7pnR7McaslGYOP1QmmiBXdJH/H/yLCT+rcQ7FaPBUxRGUtrg==}@@ -1991,6 +1991,50 @@ packages:resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==}+ resolution: {integrity: sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==}+ engines: {node: '>=12'}+resolution: {integrity: sha512-hTIP/z+t+qKwBDcmmsnmjWTduxCg+5KfdqWQvb2X/8C9+knYY6epN/pfxdDuyVlSVeFz0sM5eEfwIUQ70U4ckg==}@@ -2245,6 +2289,10 @@ packages:resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==}+ resolution: {integrity: sha512-V7/RktU11J3I36Nwq2JnZEM7tNm17eBJz+u25qdxBZeCKiX6BkVSZQjwWIr+IobgnZy+ag73tTZgZi7tr0LrBw==}+ engines: {node: '>=6.0.0'}+resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==}engines: {node: '>=8.6.0'}@@ -2807,6 +2855,12 @@ packages:resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==}+ resolution: {integrity: sha512-K+kTyOPgX+ZujMZ+Rmb7pZdHBvg+DzinG/w4Eh52WOB8/pfO38efnnrtEZNJmjTvLxc16RBYO+tPM68Fg8viBA==}+ engines: {node: '>=16'}+ peerDependencies:+ react: ^16.3.0 || ^17.0.1 || ^18.0.0 || ^19.0.0+resolution: {integrity: sha512-PxuK8inYLlYgM2zZUVBPsaBM5jI40suPeG+naKyx7kpyF032RRlEAUEjkpW9/poTASh/vyWAOVqjGuGw+47isw==}engines: {node: '>=18'}@@ -3186,6 +3240,10 @@ packages:resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==}+ resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==}+ engines: {node: '>= 10.0.0'}+resolution: {integrity: sha512-4/u/j4FrCKdi17jaxuJA0jClGxB1AvU2hw/IuayPc4ay1XGaJs/rbb4v5WKwAjNifjmXK9PIFyuPiaK8azyR9w==}engines: {node: '>=14.0.0'}@@ -3504,6 +3562,19 @@ snapshots:'@babel/helper-string-parser': 7.25.9'@babel/helper-validator-identifier': 7.25.9+ dependencies:+ chromatic: 11.25.2+ filesize: 10.1.6+ jsonfile: 6.1.0+ react-confetti: 6.2.2([email protected])+ storybook: 8.5.2([email protected])+ strip-ansi: 7.1.0+ transitivePeerDependencies:+ - '@chromatic-com/cypress'+ - '@chromatic-com/playwright'+ - react+'@date-fns/[email protected]': {}'@esbuild/[email protected]':@@ -4570,6 +4641,30 @@ snapshots:dependencies:'@babel/types': 7.26.7+ '@types/[email protected]': {}++ '@types/[email protected]': {}++ '@types/[email protected]': {}++ '@types/[email protected]':+ dependencies:+ '@types/d3-color': 3.1.3++ '@types/[email protected]': {}++ '@types/[email protected]':+ dependencies:+ '@types/d3-time': 3.0.4++ '@types/[email protected]':+ dependencies:+ '@types/d3-path': 3.1.0++ '@types/[email protected]': {}++ '@types/[email protected]': {}+'@types/[email protected]': {}'@types/[email protected]': {}@@ -5010,6 +5105,44 @@ snapshots:+ dependencies:+ internmap: 2.0.3++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ dependencies:+ d3-color: 3.1.0++ [email protected]: {}++ dependencies:+ d3-array: 3.2.4+ d3-format: 3.1.0+ d3-interpolate: 3.0.1+ d3-time: 3.1.0+ d3-time-format: 4.1.0++ dependencies:+ d3-path: 3.1.0++ dependencies:+ d3-time: 3.1.0++ dependencies:+ d3-array: 3.2.4++ [email protected]: {}+@@ -5055,7 +5188,7 @@ snapshots:dependencies:- '@babel/runtime': 7.26.0+ '@babel/runtime': 7.26.7csstype: 3.1.3@@ -5286,6 +5419,8 @@ snapshots:+ [email protected]: {}+dependencies:'@nodelib/fs.stat': 2.0.5@@ -5768,6 +5903,11 @@ snapshots:dependencies:safe-buffer: 5.2.1+ dependencies:+ react: 19.0.0-rc-66855b96-20241106+ tween-functions: 1.2.0+dependencies:'@date-fns/tz': 1.2.0@@ -5809,6 +5949,8 @@ snapshots:+ [email protected]: {}+dependencies:react: 19.0.0-rc-66855b96-20241106@@ -5828,6 +5970,14 @@ snapshots:optionalDependencies:'@types/react': 19.0.8+ dependencies:+ fast-equals: 5.2.2+ prop-types: 15.8.1+ react: 19.0.0-rc-66855b96-20241106+ react-dom: 19.0.0-rc-66855b96-20241106([email protected])+dependencies:get-nonce: 1.0.1@@ -5838,7 +5988,7 @@ snapshots:dependencies:- '@babel/runtime': 7.26.0+ '@babel/runtime': 7.26.7dom-helpers: 5.2.1loose-envify: 1.4.0prop-types: 15.8.1@@ -6179,6 +6329,8 @@ snapshots:+ [email protected]: {}+dependencies:acorn: 8.14.0@@ -6225,6 +6377,23 @@ snapshots:+ dependencies:+ '@types/d3-array': 3.2.1+ '@types/d3-ease': 3.0.2+ '@types/d3-interpolate': 3.0.4+ '@types/d3-scale': 4.0.8+ '@types/d3-shape': 3.1.7+ '@types/d3-time': 3.0.4+ '@types/d3-timer': 3.0.2+ d3-array: 3.2.4+ d3-ease: 3.0.1+ d3-interpolate: 3.0.1+ d3-scale: 4.0.2+ d3-shape: 3.2.0+ d3-time: 3.1.0+ d3-timer: 3.0.1+dependencies:esbuild: 0.21.5