The Open Standard for Generative UI
bug fix (#142)
Ankit Das2d564acaf977
diff --git a/js/packages/react-ui/package.json b/js/packages/react-ui/package.jsonindex 5b0c29fe5..05bef2e51 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.1",+ "version": "0.8.2","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/Charts/Charts.tsx b/js/packages/react-ui/src/components/Charts/Charts.tsxindex 1fb42b4c7..65a60026f 100644--- a/js/packages/react-ui/src/components/Charts/Charts.tsx+++ b/js/packages/react-ui/src/components/Charts/Charts.tsx@@ -3,6 +3,7 @@ import { uniqueId } from "lodash-es";import { ComponentProps, createContext, forwardRef, useContext, useMemo } from "react";import * as RechartsPrimitive from "recharts";import { useId } from "../../polyfills";+import { useTheme } from "../ThemeProvider";/*** @module Charts@@ -146,6 +147,7 @@ const ChartContainer = forwardRef<>(({ id, className, children, config, rechartsProps, ...props }, ref) => {const uniqueId = useId();const chartId = `crayon-chart-${id || uniqueId.replace(/:/g, "")}`;+ const { theme } = useTheme();return (<ChartContext.Provider value={{ config, id: chartId }}>@@ -153,6 +155,11 @@ const ChartContainer = forwardRef<data-chart={chartId}ref={ref}className={clsx("crayon-chart-container", className)}+ style={{+ // @ts-expect-error+ "--crayon-container-fills": theme.containerFills,+ "--crayon-primary-text": theme.primaryText,+ }}{...props}><ChartStyle id={chartId} config={config} />diff --git a/js/packages/react-ui/src/components/Charts/shared/PortalTooltip/portalTooltip.scss b/js/packages/react-ui/src/components/Charts/shared/PortalTooltip/portalTooltip.scssindex b20843331..d0b39aba1 100644--- a/js/packages/react-ui/src/components/Charts/shared/PortalTooltip/portalTooltip.scss+++ b/js/packages/react-ui/src/components/Charts/shared/PortalTooltip/portalTooltip.scss@@ -43,7 +43,6 @@color: cssUtils.$primary-text;@include cssUtils.typography(label, extra-small);background-color: cssUtils.$bg-container;- box-shadow: cssUtils.$shadow-s;text-transform: capitalize;&-item {diff --git a/js/packages/react-ui/src/components/Table/table.scss b/js/packages/react-ui/src/components/Table/table.scssindex 2ab0708e4..51c6ac421 100644--- a/js/packages/react-ui/src/components/Table/table.scss+++ b/js/packages/react-ui/src/components/Table/table.scss@@ -7,7 +7,7 @@}.crayon-table {- @include cssUtils.typography(label, small);+ @include cssUtils.typography(body, default);width: 100%;caption-side: bottom;border-collapse: collapse;@@ -31,7 +31,7 @@.crayon-table-head {border-bottom: 1px solid cssUtils.$stroke-default;& .crayon-table-head-label {- @include cssUtils.typography(label, small-heavy);+ @include cssUtils.typography(body, heavy);color: cssUtils.$secondary-text;display: inline-flex;flex-grow: 1;@@ -53,7 +53,7 @@}.crayon-table-caption {- @include cssUtils.typography(label, heavy);+ @include cssUtils.typography(body, default);color: cssUtils.$primary-text;margin-top: cssUtils.$spacing-m;}