@langchain/macaw-components 1.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +27 -0
- package/dist/_chunks/ErrorState-CmPX01HV.js +13361 -0
- package/dist/_chunks/ErrorState-CmPX01HV.js.map +1 -0
- package/dist/_chunks/LoadingIndicator-DgtU9aqD.js +80 -0
- package/dist/_chunks/LoadingIndicator-DgtU9aqD.js.map +1 -0
- package/dist/base.css +305 -0
- package/dist/catalog.json +1675 -0
- package/dist/components/Avatar/Avatar.d.ts +28 -0
- package/dist/components/Avatar/Avatar.js +47 -0
- package/dist/components/Avatar/Avatar.js.map +1 -0
- package/dist/components/Avatar/index.d.ts +2 -0
- package/dist/components/Avatar/index.js +2 -0
- package/dist/components/Badge/Badge.d.ts +25 -0
- package/dist/components/Badge/Badge.js +82 -0
- package/dist/components/Badge/Badge.js.map +1 -0
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/Badge/index.js +2 -0
- package/dist/components/Banner/Banner.d.ts +15 -0
- package/dist/components/Banner/Banner.js +102 -0
- package/dist/components/Banner/Banner.js.map +1 -0
- package/dist/components/Banner/index.d.ts +2 -0
- package/dist/components/Banner/index.js +2 -0
- package/dist/components/BarChart/AnimatedBar.d.ts +20 -0
- package/dist/components/BarChart/AnimatedBar.js +65 -0
- package/dist/components/BarChart/AnimatedBar.js.map +1 -0
- package/dist/components/BarChart/BarChart.d.ts +25 -0
- package/dist/components/BarChart/BarChart.js +248 -0
- package/dist/components/BarChart/BarChart.js.map +1 -0
- package/dist/components/BarChart/BarChart.types.d.ts +239 -0
- package/dist/components/BarChart/BarChart.types.js +0 -0
- package/dist/components/BarChart/BarChart.utils.d.ts +51 -0
- package/dist/components/BarChart/BarChart.utils.js +215 -0
- package/dist/components/BarChart/BarChart.utils.js.map +1 -0
- package/dist/components/BarChart/BarChartAxes.d.ts +22 -0
- package/dist/components/BarChart/BarChartAxes.js +144 -0
- package/dist/components/BarChart/BarChartAxes.js.map +1 -0
- package/dist/components/BarChart/BarChartGuides.d.ts +22 -0
- package/dist/components/BarChart/BarChartGuides.js +83 -0
- package/dist/components/BarChart/BarChartGuides.js.map +1 -0
- package/dist/components/BarChart/BarChartPlot.d.ts +40 -0
- package/dist/components/BarChart/BarChartPlot.js +262 -0
- package/dist/components/BarChart/BarChartPlot.js.map +1 -0
- package/dist/components/BarChart/constants.d.ts +21 -0
- package/dist/components/BarChart/constants.js +26 -0
- package/dist/components/BarChart/constants.js.map +1 -0
- package/dist/components/BarChart/index.d.ts +3 -0
- package/dist/components/BarChart/index.js +3 -0
- package/dist/components/Button/Button.d.ts +36 -0
- package/dist/components/Button/Button.js +99 -0
- package/dist/components/Button/Button.js.map +1 -0
- package/dist/components/Button/constants.d.ts +26 -0
- package/dist/components/Button/constants.js +31 -0
- package/dist/components/Button/constants.js.map +1 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Button/index.js +2 -0
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +30 -0
- package/dist/components/ButtonGroup/ButtonGroup.js +26 -0
- package/dist/components/ButtonGroup/ButtonGroup.js.map +1 -0
- package/dist/components/ButtonGroup/index.d.ts +2 -0
- package/dist/components/ButtonGroup/index.js +2 -0
- package/dist/components/Card/Card.d.ts +10 -0
- package/dist/components/Card/Card.js +23 -0
- package/dist/components/Card/Card.js.map +1 -0
- package/dist/components/Card/index.d.ts +2 -0
- package/dist/components/Card/index.js +2 -0
- package/dist/components/ChartCard/ChartCard.d.ts +53 -0
- package/dist/components/ChartCard/ChartCard.js +172 -0
- package/dist/components/ChartCard/ChartCard.js.map +1 -0
- package/dist/components/ChartCard/ChartCardSkeleton.d.ts +7 -0
- package/dist/components/ChartCard/ChartCardSkeleton.js +61 -0
- package/dist/components/ChartCard/ChartCardSkeleton.js.map +1 -0
- package/dist/components/ChartCard/index.d.ts +4 -0
- package/dist/components/ChartCard/index.js +3 -0
- package/dist/components/ChartLegend/ChartLegend.d.ts +19 -0
- package/dist/components/ChartLegend/ChartLegend.js +195 -0
- package/dist/components/ChartLegend/ChartLegend.js.map +1 -0
- package/dist/components/ChartLegend/ChartLegendItemRenderer.d.ts +14 -0
- package/dist/components/ChartLegend/ChartLegendItemRenderer.js +90 -0
- package/dist/components/ChartLegend/ChartLegendItemRenderer.js.map +1 -0
- package/dist/components/ChartLegend/index.d.ts +3 -0
- package/dist/components/ChartLegend/index.js +3 -0
- package/dist/components/ChartLegend/useChartLegendActiveItem.d.ts +7 -0
- package/dist/components/ChartLegend/useChartLegendActiveItem.js +35 -0
- package/dist/components/ChartLegend/useChartLegendActiveItem.js.map +1 -0
- package/dist/components/ChartLegend/utils.d.ts +20 -0
- package/dist/components/ChartLegend/utils.js +33 -0
- package/dist/components/ChartLegend/utils.js.map +1 -0
- package/dist/components/ChartTooltip/ChartTooltip.d.ts +23 -0
- package/dist/components/ChartTooltip/ChartTooltip.js +83 -0
- package/dist/components/ChartTooltip/ChartTooltip.js.map +1 -0
- package/dist/components/ChartTooltip/index.d.ts +2 -0
- package/dist/components/ChartTooltip/index.js +2 -0
- package/dist/components/Checkbox/Checkbox.d.ts +58 -0
- package/dist/components/Checkbox/Checkbox.js +50 -0
- package/dist/components/Checkbox/Checkbox.js.map +1 -0
- package/dist/components/Checkbox/constants.d.ts +28 -0
- package/dist/components/Checkbox/constants.js +57 -0
- package/dist/components/Checkbox/constants.js.map +1 -0
- package/dist/components/Checkbox/getCheckedState.d.ts +6 -0
- package/dist/components/Checkbox/getCheckedState.js +14 -0
- package/dist/components/Checkbox/getCheckedState.js.map +1 -0
- package/dist/components/Checkbox/index.d.ts +3 -0
- package/dist/components/Checkbox/index.js +3 -0
- package/dist/components/CircularProgress/CircularProgress.d.ts +54 -0
- package/dist/components/CircularProgress/CircularProgress.js +85 -0
- package/dist/components/CircularProgress/CircularProgress.js.map +1 -0
- package/dist/components/CircularProgress/index.d.ts +2 -0
- package/dist/components/CircularProgress/index.js +2 -0
- package/dist/components/Code/Code.utils.d.ts +24 -0
- package/dist/components/Code/Code.utils.js +160 -0
- package/dist/components/Code/Code.utils.js.map +1 -0
- package/dist/components/Code/CodeLite.d.ts +19 -0
- package/dist/components/Code/CodeLite.js +146 -0
- package/dist/components/Code/CodeLite.js.map +1 -0
- package/dist/components/Code/CodeLite.utils.d.ts +24 -0
- package/dist/components/Code/CodeLite.utils.js +273 -0
- package/dist/components/Code/CodeLite.utils.js.map +1 -0
- package/dist/components/Code/ImageReplacerExtension.d.ts +9 -0
- package/dist/components/Code/ImageReplacerExtension.js +227 -0
- package/dist/components/Code/ImageReplacerExtension.js.map +1 -0
- package/dist/components/Code/JsonHighlighterExtension.d.ts +4 -0
- package/dist/components/Code/JsonHighlighterExtension.js +172 -0
- package/dist/components/Code/JsonHighlighterExtension.js.map +1 -0
- package/dist/components/Code/constants.d.ts +6 -0
- package/dist/components/Code/constants.js +11 -0
- package/dist/components/Code/constants.js.map +1 -0
- package/dist/components/Code/index.d.ts +30 -0
- package/dist/components/Code/index.js +140 -0
- package/dist/components/Code/index.js.map +1 -0
- package/dist/components/Code/languages/json.d.ts +1 -0
- package/dist/components/Code/languages/json.js +7 -0
- package/dist/components/Code/languages/json.js.map +1 -0
- package/dist/components/Code/languages/languages.d.ts +7 -0
- package/dist/components/Code/languages/languages.js +12 -0
- package/dist/components/Code/languages/languages.js.map +1 -0
- package/dist/components/Code/languages/python.d.ts +1 -0
- package/dist/components/Code/languages/python.js +7 -0
- package/dist/components/Code/languages/python.js.map +1 -0
- package/dist/components/Code/languages/shell.d.ts +7 -0
- package/dist/components/Code/languages/shell.js +241 -0
- package/dist/components/Code/languages/shell.js.map +1 -0
- package/dist/components/Code/languages/typescript.d.ts +1 -0
- package/dist/components/Code/languages/typescript.js +7 -0
- package/dist/components/Code/languages/typescript.js.map +1 -0
- package/dist/components/Code/languages/yaml.d.ts +2 -0
- package/dist/components/Code/languages/yaml.js +44 -0
- package/dist/components/Code/languages/yaml.js.map +1 -0
- package/dist/components/Code/types.d.ts +8 -0
- package/dist/components/Code/types.js +0 -0
- package/dist/components/Code/utils.d.ts +4 -0
- package/dist/components/Code/utils.js +27 -0
- package/dist/components/Code/utils.js.map +1 -0
- package/dist/components/Command/Command.d.ts +78 -0
- package/dist/components/Command/Command.js +78 -0
- package/dist/components/Command/Command.js.map +1 -0
- package/dist/components/Command/CommandMenu.d.ts +65 -0
- package/dist/components/Command/CommandMenu.js +101 -0
- package/dist/components/Command/CommandMenu.js.map +1 -0
- package/dist/components/Command/index.d.ts +4 -0
- package/dist/components/Command/index.js +3 -0
- package/dist/components/ContextMenu/ContextMenu.d.ts +9 -0
- package/dist/components/ContextMenu/ContextMenu.js +43 -0
- package/dist/components/ContextMenu/ContextMenu.js.map +1 -0
- package/dist/components/ContextMenu/index.d.ts +1 -0
- package/dist/components/ContextMenu/index.js +2 -0
- package/dist/components/CopyButton/CopyButton.d.ts +24 -0
- package/dist/components/CopyButton/CopyButton.js +121 -0
- package/dist/components/CopyButton/CopyButton.js.map +1 -0
- package/dist/components/CopyButton/copyToClipboard.d.ts +1 -0
- package/dist/components/CopyButton/copyToClipboard.js +29 -0
- package/dist/components/CopyButton/copyToClipboard.js.map +1 -0
- package/dist/components/CopyButton/index.d.ts +4 -0
- package/dist/components/CopyButton/index.js +4 -0
- package/dist/components/CopyButton/useCopy.d.ts +10 -0
- package/dist/components/CopyButton/useCopy.js +46 -0
- package/dist/components/CopyButton/useCopy.js.map +1 -0
- package/dist/components/Dialog/index.d.ts +49 -0
- package/dist/components/Dialog/index.js +130 -0
- package/dist/components/Dialog/index.js.map +1 -0
- package/dist/components/Divider/Divider.d.ts +9 -0
- package/dist/components/Divider/Divider.js +27 -0
- package/dist/components/Divider/Divider.js.map +1 -0
- package/dist/components/Divider/index.d.ts +2 -0
- package/dist/components/Divider/index.js +2 -0
- package/dist/components/DonutChart/DonutChart.d.ts +101 -0
- package/dist/components/DonutChart/DonutChart.js +197 -0
- package/dist/components/DonutChart/DonutChart.js.map +1 -0
- package/dist/components/DonutChart/DonutChart.utils.d.ts +38 -0
- package/dist/components/DonutChart/DonutChart.utils.js +93 -0
- package/dist/components/DonutChart/DonutChart.utils.js.map +1 -0
- package/dist/components/DonutChart/constants.d.ts +7 -0
- package/dist/components/DonutChart/constants.js +12 -0
- package/dist/components/DonutChart/constants.js.map +1 -0
- package/dist/components/DonutChart/index.d.ts +4 -0
- package/dist/components/DonutChart/index.js +4 -0
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +24 -0
- package/dist/components/DropdownMenu/DropdownMenu.js +149 -0
- package/dist/components/DropdownMenu/DropdownMenu.js.map +1 -0
- package/dist/components/DropdownMenu/index.d.ts +1 -0
- package/dist/components/DropdownMenu/index.js +2 -0
- package/dist/components/EmptyState/EmptyState.d.ts +26 -0
- package/dist/components/EmptyState/EmptyState.js +85 -0
- package/dist/components/EmptyState/EmptyState.js.map +1 -0
- package/dist/components/EmptyState/index.d.ts +2 -0
- package/dist/components/EmptyState/index.js +2 -0
- package/dist/components/ErrorBoundary.d.ts +35 -0
- package/dist/components/ErrorBoundary.js +41 -0
- package/dist/components/ErrorBoundary.js.map +1 -0
- package/dist/components/ErrorMessage/ErrorMessage.d.ts +17 -0
- package/dist/components/ErrorMessage/ErrorMessage.js +146 -0
- package/dist/components/ErrorMessage/ErrorMessage.js.map +1 -0
- package/dist/components/ErrorMessage/index.d.ts +2 -0
- package/dist/components/ErrorMessage/index.js +2 -0
- package/dist/components/ErrorState/ErrorState.d.ts +23 -0
- package/dist/components/ErrorState/ErrorState.js +2 -0
- package/dist/components/ErrorState/index.d.ts +2 -0
- package/dist/components/ErrorState/index.js +2 -0
- package/dist/components/GroupedTabs/GroupedTabs.d.ts +31 -0
- package/dist/components/GroupedTabs/GroupedTabs.js +92 -0
- package/dist/components/GroupedTabs/GroupedTabs.js.map +1 -0
- package/dist/components/GroupedTabs/index.d.ts +2 -0
- package/dist/components/GroupedTabs/index.js +2 -0
- package/dist/components/HoverCard.d.ts +4 -0
- package/dist/components/HoverCard.js +34 -0
- package/dist/components/HoverCard.js.map +1 -0
- package/dist/components/Icon/Icon.d.ts +25 -0
- package/dist/components/Icon/Icon.js +57 -0
- package/dist/components/Icon/Icon.js.map +1 -0
- package/dist/components/Icon/index.d.ts +2 -0
- package/dist/components/Icon/index.js +2 -0
- package/dist/components/IconButton/IconButton.d.ts +35 -0
- package/dist/components/IconButton/IconButton.js +73 -0
- package/dist/components/IconButton/IconButton.js.map +1 -0
- package/dist/components/IconButton/index.d.ts +2 -0
- package/dist/components/IconButton/index.js +2 -0
- package/dist/components/Input/Input.d.ts +72 -0
- package/dist/components/Input/Input.js +221 -0
- package/dist/components/Input/Input.js.map +1 -0
- package/dist/components/Input/index.d.ts +2 -0
- package/dist/components/Input/index.js +2 -0
- package/dist/components/Input/inputStyles.d.ts +28 -0
- package/dist/components/Input/inputStyles.js +45 -0
- package/dist/components/Input/inputStyles.js.map +1 -0
- package/dist/components/Kbd/Kbd.d.ts +15 -0
- package/dist/components/Kbd/Kbd.js +30 -0
- package/dist/components/Kbd/Kbd.js.map +1 -0
- package/dist/components/Kbd/index.d.ts +2 -0
- package/dist/components/Kbd/index.js +2 -0
- package/dist/components/LineChart/LineChart.d.ts +8 -0
- package/dist/components/LineChart/LineChart.js +194 -0
- package/dist/components/LineChart/LineChart.js.map +1 -0
- package/dist/components/LineChart/LineChart.types.d.ts +138 -0
- package/dist/components/LineChart/LineChart.types.js +0 -0
- package/dist/components/LineChart/LineChart.utils.d.ts +29 -0
- package/dist/components/LineChart/LineChart.utils.js +123 -0
- package/dist/components/LineChart/LineChart.utils.js.map +1 -0
- package/dist/components/LineChart/LineChartPlot.d.ts +43 -0
- package/dist/components/LineChart/LineChartPlot.js +306 -0
- package/dist/components/LineChart/LineChartPlot.js.map +1 -0
- package/dist/components/LineChart/constants.d.ts +3 -0
- package/dist/components/LineChart/constants.js +8 -0
- package/dist/components/LineChart/constants.js.map +1 -0
- package/dist/components/LineChart/index.d.ts +2 -0
- package/dist/components/LineChart/index.js +2 -0
- package/dist/components/LinearProgress/LinearProgress.d.ts +16 -0
- package/dist/components/LinearProgress/LinearProgress.js +42 -0
- package/dist/components/LinearProgress/LinearProgress.js.map +1 -0
- package/dist/components/LinearProgress/index.d.ts +2 -0
- package/dist/components/LinearProgress/index.js +2 -0
- package/dist/components/Link/Link.d.ts +30 -0
- package/dist/components/Link/Link.js +51 -0
- package/dist/components/Link/Link.js.map +1 -0
- package/dist/components/Link/index.d.ts +2 -0
- package/dist/components/Link/index.js +2 -0
- package/dist/components/Logo/index.d.ts +17 -0
- package/dist/components/Logo/index.js +705 -0
- package/dist/components/Logo/index.js.map +1 -0
- package/dist/components/MetricChart/MetricChart.d.ts +9 -0
- package/dist/components/MetricChart/MetricChart.js +42 -0
- package/dist/components/MetricChart/MetricChart.js.map +1 -0
- package/dist/components/MetricChart/formatters.d.ts +18 -0
- package/dist/components/MetricChart/formatters.js +34 -0
- package/dist/components/MetricChart/formatters.js.map +1 -0
- package/dist/components/MetricChart/index.d.ts +4 -0
- package/dist/components/MetricChart/index.js +3 -0
- package/dist/components/Pane/Pane.d.ts +29 -0
- package/dist/components/Pane/Pane.js +171 -0
- package/dist/components/Pane/Pane.js.map +1 -0
- package/dist/components/Pane/Pane.utils.d.ts +10 -0
- package/dist/components/Pane/Pane.utils.js +7 -0
- package/dist/components/Pane/Pane.utils.js.map +1 -0
- package/dist/components/Pane/index.d.ts +3 -0
- package/dist/components/Pane/index.js +3 -0
- package/dist/components/PlainTextEditor/hooks/useResizeTextEditor.d.ts +9 -0
- package/dist/components/PlainTextEditor/hooks/useResizeTextEditor.js +76 -0
- package/dist/components/PlainTextEditor/hooks/useResizeTextEditor.js.map +1 -0
- package/dist/components/PlainTextEditor/index.d.ts +18 -0
- package/dist/components/PlainTextEditor/index.js +71 -0
- package/dist/components/PlainTextEditor/index.js.map +1 -0
- package/dist/components/Popover/Popover.d.ts +13 -0
- package/dist/components/Popover/Popover.js +48 -0
- package/dist/components/Popover/Popover.js.map +1 -0
- package/dist/components/Popover/constants.d.ts +1 -0
- package/dist/components/Popover/constants.js +6 -0
- package/dist/components/Popover/constants.js.map +1 -0
- package/dist/components/Popover/index.d.ts +1 -0
- package/dist/components/Popover/index.js +2 -0
- package/dist/components/PortalSlot.d.ts +11 -0
- package/dist/components/PortalSlot.js +41 -0
- package/dist/components/PortalSlot.js.map +1 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts +38 -0
- package/dist/components/ProgressBar/ProgressBar.js +82 -0
- package/dist/components/ProgressBar/ProgressBar.js.map +1 -0
- package/dist/components/ProgressBar/index.d.ts +2 -0
- package/dist/components/ProgressBar/index.js +2 -0
- package/dist/components/RadioButton/RadioButton.d.ts +62 -0
- package/dist/components/RadioButton/RadioButton.js +38 -0
- package/dist/components/RadioButton/RadioButton.js.map +1 -0
- package/dist/components/RadioButton/constants.d.ts +30 -0
- package/dist/components/RadioButton/constants.js +55 -0
- package/dist/components/RadioButton/constants.js.map +1 -0
- package/dist/components/RadioButton/index.d.ts +2 -0
- package/dist/components/RadioButton/index.js +2 -0
- package/dist/components/RadioCard/RadioCard.d.ts +26 -0
- package/dist/components/RadioCard/RadioCard.js +43 -0
- package/dist/components/RadioCard/RadioCard.js.map +1 -0
- package/dist/components/RadioCard/index.d.ts +2 -0
- package/dist/components/RadioCard/index.js +2 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +5 -0
- package/dist/components/RadioGroup/RadioGroup.js +17 -0
- package/dist/components/RadioGroup/RadioGroup.js.map +1 -0
- package/dist/components/RadioGroup/RadioGroupItem.d.ts +5 -0
- package/dist/components/RadioGroup/RadioGroupItem.js +22 -0
- package/dist/components/RadioGroup/RadioGroupItem.js.map +1 -0
- package/dist/components/RadioGroup/index.d.ts +4 -0
- package/dist/components/RadioGroup/index.js +3 -0
- package/dist/components/Select/Select.d.ts +84 -0
- package/dist/components/Select/Select.js +120 -0
- package/dist/components/Select/Select.js.map +1 -0
- package/dist/components/Select/SelectPrimitive.d.ts +17 -0
- package/dist/components/Select/SelectPrimitive.js +126 -0
- package/dist/components/Select/SelectPrimitive.js.map +1 -0
- package/dist/components/Select/index.d.ts +4 -0
- package/dist/components/Select/index.js +3 -0
- package/dist/components/Skeleton/Skeleton.d.ts +13 -0
- package/dist/components/Skeleton/Skeleton.js +25 -0
- package/dist/components/Skeleton/Skeleton.js.map +1 -0
- package/dist/components/Skeleton/index.d.ts +1 -0
- package/dist/components/Skeleton/index.js +2 -0
- package/dist/components/Slider/Slider.d.ts +33 -0
- package/dist/components/Slider/Slider.js +64 -0
- package/dist/components/Slider/Slider.js.map +1 -0
- package/dist/components/Slider/index.d.ts +2 -0
- package/dist/components/Slider/index.js +2 -0
- package/dist/components/SparkLineChart/SparkLineChart.d.ts +14 -0
- package/dist/components/SparkLineChart/SparkLineChart.js +112 -0
- package/dist/components/SparkLineChart/SparkLineChart.js.map +1 -0
- package/dist/components/SparkLineChart/index.d.ts +2 -0
- package/dist/components/SparkLineChart/index.js +2 -0
- package/dist/components/Spinner/Spinner.d.ts +12 -0
- package/dist/components/Spinner/Spinner.js +33 -0
- package/dist/components/Spinner/Spinner.js.map +1 -0
- package/dist/components/Spinner/index.d.ts +1 -0
- package/dist/components/Spinner/index.js +2 -0
- package/dist/components/SplitViewPane/SplitViewPane.d.ts +41 -0
- package/dist/components/SplitViewPane/SplitViewPane.js +314 -0
- package/dist/components/SplitViewPane/SplitViewPane.js.map +1 -0
- package/dist/components/SplitViewPane/SplitViewPaneHeader.d.ts +22 -0
- package/dist/components/SplitViewPane/SplitViewPaneHeader.js +105 -0
- package/dist/components/SplitViewPane/SplitViewPaneHeader.js.map +1 -0
- package/dist/components/SplitViewPane/index.d.ts +2 -0
- package/dist/components/SplitViewPane/index.js +3 -0
- package/dist/components/SplitViewPane/openPaneRegistry.d.ts +2 -0
- package/dist/components/SplitViewPane/openPaneRegistry.js +49 -0
- package/dist/components/SplitViewPane/openPaneRegistry.js.map +1 -0
- package/dist/components/Switch/Switch.d.ts +35 -0
- package/dist/components/Switch/Switch.js +65 -0
- package/dist/components/Switch/Switch.js.map +1 -0
- package/dist/components/Switch/index.d.ts +2 -0
- package/dist/components/Switch/index.js +2 -0
- package/dist/components/Tabs/index.d.ts +27 -0
- package/dist/components/Tabs/index.js +45 -0
- package/dist/components/Tabs/index.js.map +1 -0
- package/dist/components/Text/Text.d.ts +13 -0
- package/dist/components/Text/Text.js +58 -0
- package/dist/components/Text/Text.js.map +1 -0
- package/dist/components/Text/index.d.ts +2 -0
- package/dist/components/Text/index.js +2 -0
- package/dist/components/TextVirtualizer.d.ts +8 -0
- package/dist/components/TextVirtualizer.js +53 -0
- package/dist/components/TextVirtualizer.js.map +1 -0
- package/dist/components/TextWithLinks.d.ts +6 -0
- package/dist/components/TextWithLinks.js +61 -0
- package/dist/components/TextWithLinks.js.map +1 -0
- package/dist/components/Textarea/Textarea.d.ts +47 -0
- package/dist/components/Textarea/Textarea.js +150 -0
- package/dist/components/Textarea/Textarea.js.map +1 -0
- package/dist/components/Textarea/index.d.ts +2 -0
- package/dist/components/Textarea/index.js +2 -0
- package/dist/components/ThinkingState/LoadingIndicator.d.ts +19 -0
- package/dist/components/ThinkingState/LoadingIndicator.js +2 -0
- package/dist/components/ThinkingState/NOTICE +25 -0
- package/dist/components/ThinkingState/ThinkingState.d.ts +21 -0
- package/dist/components/ThinkingState/ThinkingState.js +42 -0
- package/dist/components/ThinkingState/ThinkingState.js.map +1 -0
- package/dist/components/ThinkingState/ThinkingStateTimer.d.ts +9 -0
- package/dist/components/ThinkingState/ThinkingStateTimer.js +43 -0
- package/dist/components/ThinkingState/ThinkingStateTimer.js.map +1 -0
- package/dist/components/ThinkingState/index.d.ts +4 -0
- package/dist/components/ThinkingState/index.js +3 -0
- package/dist/components/Toast/ToastContext.d.ts +5 -0
- package/dist/components/Toast/ToastContext.js +9 -0
- package/dist/components/Toast/ToastContext.js.map +1 -0
- package/dist/components/Toast/index.d.ts +13 -0
- package/dist/components/Toast/index.js +166 -0
- package/dist/components/Toast/index.js.map +1 -0
- package/dist/components/Toast/useToast.d.ts +3 -0
- package/dist/components/Toast/useToast.js +11 -0
- package/dist/components/Toast/useToast.js.map +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts +19 -0
- package/dist/components/Tooltip/Tooltip.js +57 -0
- package/dist/components/Tooltip/Tooltip.js.map +1 -0
- package/dist/components/Tooltip/index.d.ts +3 -0
- package/dist/components/Tooltip/index.js +3 -0
- package/dist/components/TopList/TopList.d.ts +3 -0
- package/dist/components/TopList/TopList.js +186 -0
- package/dist/components/TopList/TopList.js.map +1 -0
- package/dist/components/TopList/TopList.types.d.ts +34 -0
- package/dist/components/TopList/TopList.types.js +0 -0
- package/dist/components/TopList/TopList.utils.d.ts +3 -0
- package/dist/components/TopList/TopList.utils.js +16 -0
- package/dist/components/TopList/TopList.utils.js.map +1 -0
- package/dist/components/TopList/index.d.ts +2 -0
- package/dist/components/TopList/index.js +2 -0
- package/dist/components/Typeahead/Typeahead.d.ts +5 -0
- package/dist/components/Typeahead/Typeahead.js +305 -0
- package/dist/components/Typeahead/Typeahead.js.map +1 -0
- package/dist/components/Typeahead/Typeahead.types.d.ts +99 -0
- package/dist/components/Typeahead/Typeahead.types.js +0 -0
- package/dist/components/Typeahead/Typeahead.utils.d.ts +25 -0
- package/dist/components/Typeahead/Typeahead.utils.js +73 -0
- package/dist/components/Typeahead/Typeahead.utils.js.map +1 -0
- package/dist/components/Typeahead/TypeaheadParts.d.ts +25 -0
- package/dist/components/Typeahead/TypeaheadParts.js +109 -0
- package/dist/components/Typeahead/TypeaheadParts.js.map +1 -0
- package/dist/components/Typeahead/TypeaheadView.d.ts +81 -0
- package/dist/components/Typeahead/TypeaheadView.js +228 -0
- package/dist/components/Typeahead/TypeaheadView.js.map +1 -0
- package/dist/components/Typeahead/index.d.ts +2 -0
- package/dist/components/Typeahead/index.js +2 -0
- package/dist/components/Typeahead/useTypeaheadDomSync.d.ts +15 -0
- package/dist/components/Typeahead/useTypeaheadDomSync.js +43 -0
- package/dist/components/Typeahead/useTypeaheadDomSync.js.map +1 -0
- package/dist/components/Typeahead/useTypeaheadUncontrolledInput.d.ts +11 -0
- package/dist/components/Typeahead/useTypeaheadUncontrolledInput.js +32 -0
- package/dist/components/Typeahead/useTypeaheadUncontrolledInput.js.map +1 -0
- package/dist/components/UnsavedChangesDialog.d.ts +14 -0
- package/dist/components/UnsavedChangesDialog.js +67 -0
- package/dist/components/UnsavedChangesDialog.js.map +1 -0
- package/dist/components/index.d.ts +58 -0
- package/dist/components/index.js +35 -0
- package/dist/components.css +102 -0
- package/dist/contexts/ErrorReporterContext.d.ts +6 -0
- package/dist/contexts/ErrorReporterContext.js +7 -0
- package/dist/contexts/ErrorReporterContext.js.map +1 -0
- package/dist/hooks/AppThemeProvider.d.ts +8 -0
- package/dist/hooks/AppThemeProvider.js +52 -0
- package/dist/hooks/AppThemeProvider.js.map +1 -0
- package/dist/hooks/useColorScheme.d.ts +20 -0
- package/dist/hooks/useColorScheme.js +50 -0
- package/dist/hooks/useColorScheme.js.map +1 -0
- package/dist/icons/LongTailPhosphorIcons.d.ts +51 -0
- package/dist/icons/LongTailPhosphorIcons.js +102 -0
- package/dist/icons/LongTailPhosphorIcons.js.map +1 -0
- package/dist/icons/PaddedPhosphorIcons.d.ts +17 -0
- package/dist/icons/PaddedPhosphorIcons.js +55 -0
- package/dist/icons/PaddedPhosphorIcons.js.map +1 -0
- package/dist/icons/WeightedPhosphorIcons.d.ts +45 -0
- package/dist/icons/WeightedPhosphorIcons.js +96 -0
- package/dist/icons/WeightedPhosphorIcons.js.map +1 -0
- package/dist/icons/index.d.ts +2 -0
- package/dist/icons/index.js +4 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +36 -0
- package/dist/styles.css +10 -0
- package/dist/utilities.css +2 -0
- package/dist/utils/VirtuosoCustomScrollParentContext/index.d.ts +7 -0
- package/dist/utils/VirtuosoCustomScrollParentContext/index.js +15 -0
- package/dist/utils/VirtuosoCustomScrollParentContext/index.js.map +1 -0
- package/dist/utils/VirtuosoCustomScrollParentContext/useScrollParent.d.ts +4 -0
- package/dist/utils/VirtuosoCustomScrollParentContext/useScrollParent.js +10 -0
- package/dist/utils/VirtuosoCustomScrollParentContext/useScrollParent.js.map +1 -0
- package/dist/utils/ZIndexContext.d.ts +5 -0
- package/dist/utils/ZIndexContext.js +13 -0
- package/dist/utils/ZIndexContext.js.map +1 -0
- package/dist/utils/animation.d.ts +37 -0
- package/dist/utils/animation.js +42 -0
- package/dist/utils/animation.js.map +1 -0
- package/dist/utils/chartAxisLayout.d.ts +6 -0
- package/dist/utils/chartAxisLayout.js +8 -0
- package/dist/utils/chartAxisLayout.js.map +1 -0
- package/dist/utils/chartColors.d.ts +38 -0
- package/dist/utils/chartColors.js +78 -0
- package/dist/utils/chartColors.js.map +1 -0
- package/dist/utils/chartConstants.d.ts +10 -0
- package/dist/utils/chartConstants.js +15 -0
- package/dist/utils/chartConstants.js.map +1 -0
- package/dist/utils/chartValues.d.ts +2 -0
- package/dist/utils/chartValues.js +36 -0
- package/dist/utils/chartValues.js.map +1 -0
- package/dist/utils/clamp.d.ts +2 -0
- package/dist/utils/clamp.js +7 -0
- package/dist/utils/clamp.js.map +1 -0
- package/dist/utils/cn.d.ts +2 -0
- package/dist/utils/cn.js +191 -0
- package/dist/utils/cn.js.map +1 -0
- package/dist/utils/componentSizes.d.ts +104 -0
- package/dist/utils/componentSizes.js +104 -0
- package/dist/utils/componentSizes.js.map +1 -0
- package/dist/utils/controlIconSizes.d.ts +10 -0
- package/dist/utils/controlIconSizes.js +32 -0
- package/dist/utils/controlIconSizes.js.map +1 -0
- package/dist/utils/csp-nonce.d.ts +11 -0
- package/dist/utils/csp-nonce.js +17 -0
- package/dist/utils/csp-nonce.js.map +1 -0
- package/dist/utils/get-closest-scroll-parent.d.ts +1 -0
- package/dist/utils/get-closest-scroll-parent.js +16 -0
- package/dist/utils/get-closest-scroll-parent.js.map +1 -0
- package/dist/utils/get-color-by-string.d.ts +1 -0
- package/dist/utils/get-color-by-string.js +10 -0
- package/dist/utils/get-color-by-string.js.map +1 -0
- package/dist/utils/getYAxisLeftMargin.d.ts +10 -0
- package/dist/utils/getYAxisLeftMargin.js +20 -0
- package/dist/utils/getYAxisLeftMargin.js.map +1 -0
- package/dist/utils/icon-types.d.ts +8 -0
- package/dist/utils/icon-types.js +0 -0
- package/dist/utils/lazy-codemirror-loader.d.ts +70 -0
- package/dist/utils/lazy-codemirror-loader.js +79 -0
- package/dist/utils/lazy-codemirror-loader.js.map +1 -0
- package/dist/utils/merge-refs.d.ts +2 -0
- package/dist/utils/merge-refs.js +13 -0
- package/dist/utils/merge-refs.js.map +1 -0
- package/dist/utils/parseTextLinks.d.ts +7 -0
- package/dist/utils/parseTextLinks.js +46 -0
- package/dist/utils/parseTextLinks.js.map +1 -0
- package/dist/utils/prettify-error-payload.d.ts +7 -0
- package/dist/utils/prettify-error-payload.js +188 -0
- package/dist/utils/prettify-error-payload.js.map +1 -0
- package/dist/utils/spacing.d.ts +30 -0
- package/dist/utils/spacing.js +34 -0
- package/dist/utils/spacing.js.map +1 -0
- package/dist/utils/useCodeMirror.d.ts +7 -0
- package/dist/utils/useCodeMirror.js +28 -0
- package/dist/utils/useCodeMirror.js.map +1 -0
- package/dist/utils/useZIndex.d.ts +52 -0
- package/dist/utils/useZIndex.js +62 -0
- package/dist/utils/useZIndex.js.map +1 -0
- package/dist/utils/zIndices.d.ts +42 -0
- package/dist/utils/zIndices.js +46 -0
- package/dist/utils/zIndices.js.map +1 -0
- package/docs/DESIGN.md +134 -0
- package/docs/STYLES.md +568 -0
- package/package.json +619 -0
- package/tailwind.preset.cjs +738 -0
- package/tailwind.preset.d.cts +5 -0
package/docs/STYLES.md
ADDED
|
@@ -0,0 +1,568 @@
|
|
|
1
|
+
# STYLES.md — Design Token Reference
|
|
2
|
+
|
|
3
|
+
Tokens flow in one direction: **Primitives → Semantics → Components**.
|
|
4
|
+
|
|
5
|
+
- **Primitives** (`--neutral-50`, `--brand-400`, …) — raw scale values in `packages/tokens/src/tokens.css`. Never reference these in component code.
|
|
6
|
+
- **Semantic tokens** (`--bg-surface-level-1`, `--text-secondary`, …) — purpose-driven aliases that switch between light and dark mode automatically. Always use these.
|
|
7
|
+
- **Component tokens** (`--button-primary-bg`, …) — owned by a single component. Some live in `packages/components/src/styles/base.css` for Tailwind utility compatibility, but consuming code should treat them as private.
|
|
8
|
+
|
|
9
|
+
Tailwind maps semantic tokens to utility classes via `packages/components/tailwind.preset.cjs`. Always reach for the Tailwind class, not the CSS variable directly:
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
// Good
|
|
13
|
+
<div className="bg-elevated shadow-md rounded-md" />
|
|
14
|
+
|
|
15
|
+
// Avoid — bypasses Tailwind and won't compose with responsive/state modifiers
|
|
16
|
+
<div style={{ backgroundColor: 'var(--bg-elevated)' }} />
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Package CSS contract
|
|
20
|
+
|
|
21
|
+
Import the all-in-one stylesheet once in the application entry point:
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
import '@langchain/macaw-components/styles.css';
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
It loads Inter and Fira Code, the light and dark token values, base and
|
|
28
|
+
component-support rules, and the precompiled utilities needed by the shipped
|
|
29
|
+
components. Its internal `utilities.css` import is generated during the package
|
|
30
|
+
build and is not a public entry point.
|
|
31
|
+
|
|
32
|
+
Use `@langchain/macaw-tokens/tokens.css` instead only when an application needs
|
|
33
|
+
the CSS custom properties without components, fonts, base rules, or utilities.
|
|
34
|
+
Do not import both CSS entries; `styles.css` already includes the tokens.
|
|
35
|
+
|
|
36
|
+
Applications that author semantic Tailwind classes should also use the optional
|
|
37
|
+
Tailwind v3 preset. The preset deliberately has no `content` paths and does not
|
|
38
|
+
replace the stylesheet import:
|
|
39
|
+
|
|
40
|
+
```js
|
|
41
|
+
// tailwind.config.cjs
|
|
42
|
+
module.exports = {
|
|
43
|
+
content: ['./src/**/*.{js,ts,jsx,tsx,mdx}'],
|
|
44
|
+
presets: [require('@langchain/macaw-components/tailwind-preset')],
|
|
45
|
+
};
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
The precompiled stylesheet already covers classes used inside the package, so
|
|
49
|
+
consumers only need to scan their own source. Add or remove `html.dark` to
|
|
50
|
+
switch the token values and Tailwind dark variants together. A nested
|
|
51
|
+
`.dark[data-theme-scope]` region can also opt into dark tokens and button styles.
|
|
52
|
+
|
|
53
|
+
## Usage Rules
|
|
54
|
+
|
|
55
|
+
- Use semantic Tailwind classes from this file; do not hardcode colors or use primitive tokens in component code.
|
|
56
|
+
- Prefer the design-system component to recreating its styles or private tokens. `--button-*`, `.button-primary-*`, and `.button-secondary-*` are private to the Button implementation; use `Button` or `IconButton`.
|
|
57
|
+
- Use `text-*` for copy and `text-icon-*` for standalone icons.
|
|
58
|
+
- Merge conditional classes with `cn` from `@langchain/macaw-components/utils/cn`.
|
|
59
|
+
|
|
60
|
+
When editing `packages/components/tailwind.preset.cjs`, preserve `brand.DEFAULT` alongside the numeric
|
|
61
|
+
`brandPalette` entries so both `bg-brand` and existing `bg-brand-10` utilities
|
|
62
|
+
resolve. New component code still uses semantic classes.
|
|
63
|
+
|
|
64
|
+
## Component Sizes
|
|
65
|
+
|
|
66
|
+
`packages/components/src/utils/componentSizes.ts` defines the target outer-size families
|
|
67
|
+
and exact rem values for new or migrated components. Existing components may
|
|
68
|
+
still differ; check their source and `Foundations/Component Sizes` in Storybook.
|
|
69
|
+
The same tier name is meaningful only within its family.
|
|
70
|
+
|
|
71
|
+
| Family | Tiers | Guidance |
|
|
72
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- | --------------------------------------------------------------------------------------------------- |
|
|
73
|
+
| Visual elements — `VISUAL_ELEMENT_SIZES` (decorated `Icon`, `Avatar`, `Spinner`) | `xxs`, `xs`, `sm`, `md` | Choose `md` for standard UI, smaller tiers for dense/inline UI; expose `xxs` only when needed. |
|
|
74
|
+
| Controls — `CONTROL_SIZES` (`Button`, `IconButton`, `ButtonGroup`, `CopyButton`, `Input`, `CommandInput`, `Select`, `Typeahead`, `GroupedTabs`) | `xs`, `sm`, `md`, `lg` | Choose `md` for standard UI, `sm` for dense UI, `xs` for compact UI; retain `lg` for compatibility. |
|
|
75
|
+
| Selection controls — `SELECTION_CONTROL_SIZES` (`Checkbox`, `RadioButton`, `RadioCard`, `Switch`; `RadioGroupItem` and `Slider` remain intrinsic) | `sm`, `md` | The tier controls indicator geometry, not labeled-row or card height. |
|
|
76
|
+
| Option rows — `OPTION_ROW_SIZES` (menu, select, and typeahead rows) | `sm`, `md` | Use `md` unless the menu is dense; multiline rows may grow. |
|
|
77
|
+
|
|
78
|
+
- Family dimensions measure the **outer border box**. Use `box-sizing: border-box`
|
|
79
|
+
and fit padding, borders, typography, icons, and loading indicators inside it.
|
|
80
|
+
- Visual elements and square selection indicators set width and height. Controls
|
|
81
|
+
set exact height with intrinsic/container width; `Switch` and `Slider` own their widths.
|
|
82
|
+
- Selection indicators retain at least a 24px interactive hit area independent
|
|
83
|
+
of their visual geometry. This hit area does not set row or card height.
|
|
84
|
+
- Option rows and multi-value `Typeahead` use `min-height` and grow with content.
|
|
85
|
+
Plain `Icon`, textareas, labeled selection rows, and cards retain intrinsic total height.
|
|
86
|
+
- Keep component-owned text-label geometry (`Badge`, `Kbd`), intrinsic density
|
|
87
|
+
APIs, typography, chart geometry, progress thickness, and brand assets outside
|
|
88
|
+
the shared outer-box families.
|
|
89
|
+
- Derive supported tiers from the component's family mapping. Some components
|
|
90
|
+
retain additional compatibility tiers; do not create a universal `Size` type.
|
|
91
|
+
|
|
92
|
+
- `Input`, `CommandInput`, and `Textarea` default to the `lg` compatibility tier.
|
|
93
|
+
New consumers should choose `md` explicitly.
|
|
94
|
+
|
|
95
|
+
## Label Casing
|
|
96
|
+
|
|
97
|
+
Use **Title Case** for names of things: field labels, section headings, tabs,
|
|
98
|
+
column headers, menu items, and enumerated values (`Run Filters`, `Sampling
|
|
99
|
+
Rate`, `LLM-as-a-Judge`). Keep minor words lowercase in the middle: `a`, `an`,
|
|
100
|
+
`the`, `and`, `or`, `for`, `to`, `of`, `in`, `on`, `at`, `by`, `with`, `from`,
|
|
101
|
+
`as`.
|
|
102
|
+
|
|
103
|
+
Use **sentence case** for prose: button text, empty states, validation, tooltips,
|
|
104
|
+
helper text, and placeholders (`Load more`, `No evaluators found`, `Rule name is
|
|
105
|
+
required`). Behavioral options are prose even inside a picker. Keep sibling
|
|
106
|
+
labels consistent, and spell named controls exactly as they appear in the UI.
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## Quick Reference
|
|
111
|
+
|
|
112
|
+
Use this table for new or meaningfully touched UI. Existing code still contains
|
|
113
|
+
deprecated aliases during migration; do not churn unrelated call sites just to
|
|
114
|
+
rename classes.
|
|
115
|
+
|
|
116
|
+
| Situation | Class |
|
|
117
|
+
| --------------------------------------------------------- | ------------------------------------------------------------------------------------- |
|
|
118
|
+
| Page / app shell background | `bg-surface-level-1` |
|
|
119
|
+
| Card, panel, sidebar | `bg-surface-level-2` |
|
|
120
|
+
| Popover, tooltip, dropdown | `bg-elevated` |
|
|
121
|
+
| Modal scrim / backdrop | `bg-overlay` for new overlays; some current overlays still use opacity classes |
|
|
122
|
+
| Non-Button brand fill | `bg-brand`; use `<Button />` for CTAs |
|
|
123
|
+
| Tinted brand surface | `bg-brand-subtle` |
|
|
124
|
+
| Tinted brand gradient surface | `bg-brand-subtle-gradient` |
|
|
125
|
+
| Branded illustration backdrop | `bg-brand-illustration` |
|
|
126
|
+
| Purple accent surface | `bg-purple` |
|
|
127
|
+
| Success / Error / Warning tint | `bg-success` / `bg-error` / `bg-warning` |
|
|
128
|
+
| Filled success / error / warning | `bg-success-strong` / `bg-error-strong` / `bg-warning-strong` |
|
|
129
|
+
| Control on-state | `bg-control-active` for new control internals |
|
|
130
|
+
| Selected list item | `bg-selected` for new selection states |
|
|
131
|
+
| Body text | `text-primary` |
|
|
132
|
+
| Secondary / label text | `text-secondary` |
|
|
133
|
+
| Placeholder text | `text-placeholder` |
|
|
134
|
+
| Disabled text | `text-disabled` |
|
|
135
|
+
| Standalone default icon | `text-icon-primary`; icons may inherit text color when paired with labels |
|
|
136
|
+
| Default structural/control border | `border-default`; older controls often still use `border-secondary` |
|
|
137
|
+
| Focus border token | `border-focus`; many current controls still use `border-brand` / `ring-brand` |
|
|
138
|
+
| Error state border | `border-error` |
|
|
139
|
+
| Disabled border | `border-disabled` |
|
|
140
|
+
| Run/system status text | `text-status-green` / `text-status-orange` / `text-status-yellow` / `text-status-red` |
|
|
141
|
+
| Low elevation for floating controls or interaction states | `shadow-sm` |
|
|
142
|
+
| Dropdown / popover shadow | `shadow-md` |
|
|
143
|
+
| Modal / dialog shadow | `shadow-lg` |
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Banners
|
|
148
|
+
|
|
149
|
+
Use `Banner` from `@langchain/macaw-components/Banner` for page-level notices,
|
|
150
|
+
warnings, and announcements.
|
|
151
|
+
|
|
152
|
+
- State the important information in one short sentence. Add a specific `action`
|
|
153
|
+
when the user has a next step.
|
|
154
|
+
- Keep `flush` banners to one line and avoid stacking banners on one page.
|
|
155
|
+
|
|
156
|
+
See `packages/components/src/components/Banner/Banner.stories.tsx` for examples.
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## Cards
|
|
161
|
+
|
|
162
|
+
Use `Card` from `@langchain/macaw-components` for content surfaces. The component
|
|
163
|
+
owns the selected semantic surface, border, radius, and padding; consumers own the
|
|
164
|
+
content and internal layout.
|
|
165
|
+
|
|
166
|
+
## Chart Cards
|
|
167
|
+
|
|
168
|
+
Use `ChartCard` from `@langchain/macaw-components/ChartCard` for consistent
|
|
169
|
+
dashboard visualization shells.
|
|
170
|
+
|
|
171
|
+
- Consumers own charts, legends, data interactions, and empty states. Use the
|
|
172
|
+
`state` prop for standard loading and known data-fetching error states; it
|
|
173
|
+
does not catch chart-rendering exceptions.
|
|
174
|
+
- Set `skeletonVariant` to `bar`, `line`, `donut`, `metric`, or `sparkline` to match the chart
|
|
175
|
+
shape while loading. Use `ChartCardSkeleton` directly for a chart placeholder
|
|
176
|
+
outside a card.
|
|
177
|
+
- Loading and error states have a baseline minimum height. Set an explicit card
|
|
178
|
+
height when the state must exactly match the ready chart and avoid layout
|
|
179
|
+
shift.
|
|
180
|
+
- Set `isMovable` and pass drag listeners through `dragHandleProps` to enable
|
|
181
|
+
reordering; `variant="full-width"` hides the move handle.
|
|
182
|
+
- Use `expandButtonProps` and `menuItems` for optional, feature-owned actions.
|
|
183
|
+
|
|
184
|
+
## Top Lists
|
|
185
|
+
|
|
186
|
+
Use `TopList` from `@langchain/macaw-components/TopList` for ranked top-K
|
|
187
|
+
categorical data. It composes the shared `BarChart` into horizontal rows and
|
|
188
|
+
owns sorting, row limits, truncated category labels, formatted end labels, and
|
|
189
|
+
accessible item interactions. Use `BarChart` directly for grouped, stacked, or
|
|
190
|
+
vertical bars that are not a ranked list.
|
|
191
|
+
|
|
192
|
+
Feature adapters still own fetching, domain-specific “Other” aggregation,
|
|
193
|
+
tooltips, navigation, loading, error, and empty states. Pass a custom comparator
|
|
194
|
+
when a semantic row such as “Other” must stay last regardless of value.
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## Chart Tooltips
|
|
199
|
+
|
|
200
|
+
When a chart needs hover or focus details, compose its content with
|
|
201
|
+
`ChartTooltip`, `ChartTooltipHeader`, `ChartTooltipBody`, and
|
|
202
|
+
`ChartTooltipRow` from `@langchain/macaw-components`. Do not recreate the elevated surface,
|
|
203
|
+
spacing, typography, markers, dividers, or numeric alignment in a feature-local
|
|
204
|
+
tooltip component.
|
|
205
|
+
|
|
206
|
+
The chart library still owns interaction and positioning. For Visx charts, use
|
|
207
|
+
its tooltip state and collision-aware positioning utilities, such as
|
|
208
|
+
`useTooltip` with `TooltipWithBounds` or `TooltipInPortal`, and render
|
|
209
|
+
`ChartTooltip` inside the positioned layer. The generic design-system `Tooltip`
|
|
210
|
+
is intended for trigger-based explanatory copy, not chart coordinates.
|
|
211
|
+
|
|
212
|
+
- Use `ChartTooltipHeader` for the hovered date, bucket, experiment, or other
|
|
213
|
+
primary context.
|
|
214
|
+
- Wrap multiple rows in `ChartTooltipBody`.
|
|
215
|
+
- Use one `ChartTooltipRow` per series and pass `markerColor` when the row maps
|
|
216
|
+
to a chart color.
|
|
217
|
+
- Set `highlighted` on the row matching the currently hovered series.
|
|
218
|
+
- Use `variant="total"` for an aggregate row rather than styling its divider and
|
|
219
|
+
typography locally.
|
|
220
|
+
- Feature-specific charts may compose richer content around these primitives,
|
|
221
|
+
but shared tooltip structure and styling should remain in the design system.
|
|
222
|
+
|
|
223
|
+
See `packages/components/src/components/ChartTooltip/ChartTooltip.stories.tsx` for complete examples.
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## Token Catalog
|
|
228
|
+
|
|
229
|
+
### Surface — `bg-*`
|
|
230
|
+
|
|
231
|
+
Use for background fills of layout regions.
|
|
232
|
+
|
|
233
|
+
Use the lowest level that creates enough separation. Avoid skipping levels unless matching an existing nested table or grouping pattern.
|
|
234
|
+
|
|
235
|
+
| Class | When to use |
|
|
236
|
+
| -------------------------- | ------------------------------------------------ |
|
|
237
|
+
| `bg-surface-level-1` | Root page / app shell background |
|
|
238
|
+
| `bg-surface-level-1-hover` | Hover state on level 1 surface |
|
|
239
|
+
| `bg-surface-level-2` | Cards, panels, sidebars, table header groups |
|
|
240
|
+
| `bg-surface-level-2-hover` | Hover state on level 2 surface |
|
|
241
|
+
| `bg-surface-level-3` | Nested table headers or grouped inner containers |
|
|
242
|
+
| `bg-surface-level-4` | Deepest neutral fill for additional separation |
|
|
243
|
+
| `bg-disabled` | Disabled input or control fill |
|
|
244
|
+
| `bg-elevated` | Popovers, tooltips, dropdowns, context menus |
|
|
245
|
+
| `bg-elevated-hover` | Hover state inside an elevated surface |
|
|
246
|
+
| `bg-elevated-selected` | Selected item inside an elevated surface |
|
|
247
|
+
| `bg-overlay` | Modal backdrop / scrim |
|
|
248
|
+
|
|
249
|
+
### Brand — `bg-brand-*`
|
|
250
|
+
|
|
251
|
+
| Class | When to use |
|
|
252
|
+
| -------------------------- | --------------------------------------------------------- |
|
|
253
|
+
| `bg-brand` | Primary CTA fill, strong brand element |
|
|
254
|
+
| `bg-brand-hover` | Hover on a brand-filled element |
|
|
255
|
+
| `bg-brand-subtle` | Tinted brand surface (selected nav item, brand tag) |
|
|
256
|
+
| `bg-brand-subtle-hover` | Hover on brand-subtle |
|
|
257
|
+
| `bg-brand-subtle-gradient` | Tinted brand gradient surface, currently for info banners |
|
|
258
|
+
| `bg-brand-illustration` | Backdrop for branded illustrations or media |
|
|
259
|
+
| `bg-brand-muted` | Faintest brand tint (highlight in reading views) |
|
|
260
|
+
| `bg-purple` | Purple-tinted accent surface |
|
|
261
|
+
|
|
262
|
+
### Intent — `bg-{intent}-*`
|
|
263
|
+
|
|
264
|
+
| Class | When to use |
|
|
265
|
+
| ------------------- | --------------------------------------- |
|
|
266
|
+
| `bg-success` | Success banner / badge background |
|
|
267
|
+
| `bg-success-subtle` | Faint success tint |
|
|
268
|
+
| `bg-success-strong` | Filled success indicator (icon bg, dot) |
|
|
269
|
+
| `bg-error` | Error banner / invalid field background |
|
|
270
|
+
| `bg-error-subtle` | Faint error tint |
|
|
271
|
+
| `bg-error-strong` | Filled error indicator |
|
|
272
|
+
| `bg-warning` | Warning banner background |
|
|
273
|
+
| `bg-warning-subtle` | Faint warning tint |
|
|
274
|
+
| `bg-warning-strong` | Filled warning indicator |
|
|
275
|
+
|
|
276
|
+
### Control — `bg-control-*` / `text-control-*`
|
|
277
|
+
|
|
278
|
+
Used internally by Checkbox, RadioButton, Switch, and Slider. Prefer those components over applying these tokens directly.
|
|
279
|
+
|
|
280
|
+
| Class | When to use |
|
|
281
|
+
| -------------------------------- | -------------------------------------------- |
|
|
282
|
+
| `bg-control-active` | Checked / on fill |
|
|
283
|
+
| `bg-control-active-hover` | Hover while checked / on |
|
|
284
|
+
| `bg-control-thumb` | Knob or handle surface |
|
|
285
|
+
| `bg-control-disabled` | Disabled control fill |
|
|
286
|
+
| `text-control-active-foreground` | Checkmark or glyph on an active control fill |
|
|
287
|
+
|
|
288
|
+
### Selected — `bg-selected-*`
|
|
289
|
+
|
|
290
|
+
| Class | When to use |
|
|
291
|
+
| ------------------- | ------------------------------------- |
|
|
292
|
+
| `bg-selected` | Selected row / item in a list or tree |
|
|
293
|
+
| `bg-selected-hover` | Hover state on the selected item |
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
### Border — `border-*`
|
|
298
|
+
|
|
299
|
+
| Class | When to use |
|
|
300
|
+
| --------------------- | ---------------------------------------- |
|
|
301
|
+
| `border-default` | Default input, card, or container border |
|
|
302
|
+
| `border-subtle` | Subtle divider |
|
|
303
|
+
| `border-muted` | Very subtle divider |
|
|
304
|
+
| `border-faint` | Hairline separator |
|
|
305
|
+
| `border-strong` | High-contrast border |
|
|
306
|
+
| `border-disabled` | Disabled input border |
|
|
307
|
+
| `border-focus` | Focus ring — apply on `:focus-visible` |
|
|
308
|
+
| `border-error` | Error state border |
|
|
309
|
+
| `border-error-strong` | Strong error border (e.g., toast) |
|
|
310
|
+
| `border-brand` | Brand-accented border |
|
|
311
|
+
| `border-brand-strong` | Strong brand border |
|
|
312
|
+
| `border-brand-subtle` | Faint brand border |
|
|
313
|
+
| `border-warning` | Warning state border |
|
|
314
|
+
| `border-success` | Success state border |
|
|
315
|
+
| `border-purple` | Purple-accented border |
|
|
316
|
+
|
|
317
|
+
### Status Borders — `border-status-*`
|
|
318
|
+
|
|
319
|
+
Use status border tokens for run-state and system-state accents. Do not use them for generic form validation; use intent tokens for that.
|
|
320
|
+
|
|
321
|
+
| Class | When to use |
|
|
322
|
+
| ---------------------- | -------------------------------------------- |
|
|
323
|
+
| `border-status-green` | Successful run or positive status border |
|
|
324
|
+
| `border-status-orange` | Orange run or intermediate status border |
|
|
325
|
+
| `border-status-yellow` | Yellow run or warning-adjacent status border |
|
|
326
|
+
| `border-status-red` | Failed run or negative status border |
|
|
327
|
+
|
|
328
|
+
---
|
|
329
|
+
|
|
330
|
+
### Text — `text-*`
|
|
331
|
+
|
|
332
|
+
| Class | When to use |
|
|
333
|
+
| ------------------------ | ------------------------------------------------- |
|
|
334
|
+
| `text-primary` | Body copy, default text |
|
|
335
|
+
| `text-secondary` | Labels, supporting text |
|
|
336
|
+
| `text-secondary-hover` | Hover state for secondary text |
|
|
337
|
+
| `text-tertiary` | Helper text |
|
|
338
|
+
| `text-tertiary-hover` | Hover state for tertiary text |
|
|
339
|
+
| `text-quaternary` | Very subtle annotations |
|
|
340
|
+
| `text-disabled` | Disabled text |
|
|
341
|
+
| `text-placeholder` | Input placeholder text |
|
|
342
|
+
| `text-error-primary` | High-emphasis error message |
|
|
343
|
+
| `text-error-secondary` | Inline error message |
|
|
344
|
+
| `text-error-tertiary` | Lower-emphasis error message |
|
|
345
|
+
| `text-warning-primary` | High-emphasis warning message |
|
|
346
|
+
| `text-warning-secondary` | Inline warning message |
|
|
347
|
+
| `text-warning-tertiary` | Lower-emphasis warning message |
|
|
348
|
+
| `text-success-primary` | High-emphasis success message |
|
|
349
|
+
| `text-success-secondary` | Inline success message |
|
|
350
|
+
| `text-success-tertiary` | Lower-emphasis success message |
|
|
351
|
+
| `text-brand-primary` | Brand-colored heading or link |
|
|
352
|
+
| `text-brand-secondary` | Secondary brand text |
|
|
353
|
+
| `text-brand-tertiary` | Tertiary brand text |
|
|
354
|
+
| `text-brand-disabled` | Disabled brand text |
|
|
355
|
+
| `text-brand-on-fill` | Text or icon on a brand-filled non-Button surface |
|
|
356
|
+
| `text-purple` | Purple-accented text |
|
|
357
|
+
| `text-link` | Hyperlink text |
|
|
358
|
+
| `text-link-hover` | Hover state for link text |
|
|
359
|
+
|
|
360
|
+
Intent text suffixes express emphasis, not severity: `primary` for prominent
|
|
361
|
+
messages, `secondary` for default inline copy, and `tertiary` for supporting detail.
|
|
362
|
+
Stay within the chosen `text-{error,warning,success}-*` scale.
|
|
363
|
+
|
|
364
|
+
### Status Text — `text-status-*`
|
|
365
|
+
|
|
366
|
+
Use status text tokens for run-state and system-state copy. For generic success, warning, and error messages, use `text-success-secondary`, `text-warning-secondary`, and `text-error-secondary`.
|
|
367
|
+
|
|
368
|
+
| Class | When to use |
|
|
369
|
+
| -------------------- | ------------------------------------------ |
|
|
370
|
+
| `text-status-green` | Successful run or positive status text |
|
|
371
|
+
| `text-status-orange` | Orange run or intermediate status text |
|
|
372
|
+
| `text-status-yellow` | Yellow run or warning-adjacent status text |
|
|
373
|
+
| `text-status-red` | Failed run or negative status text |
|
|
374
|
+
|
|
375
|
+
### Data visualization — `--chart-*`
|
|
376
|
+
|
|
377
|
+
SVG `fill` and `stroke` props cannot consume Tailwind classes, so chart code is
|
|
378
|
+
the documented exception to the Tailwind-only rule: import semantic values from
|
|
379
|
+
`@langchain/macaw-components/utils/chartColors`. Do not reference raw `--viz-*` scales or
|
|
380
|
+
write hex, RGB, or HSL colors in chart code.
|
|
381
|
+
|
|
382
|
+
| Export | When to use |
|
|
383
|
+
| ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
|
384
|
+
| `CHART_SINGLE_FILL_COLOR` | A single-series bar or other ordinary filled chart |
|
|
385
|
+
| `CHART_CATEGORICAL_LINE_COLORS` / `getCategoricalLineChartColor` | Unrelated line series; stronger colors keep thin strokes legible |
|
|
386
|
+
| `CHART_CATEGORICAL_FILL_COLORS` / `getCategoricalFillChartColor` | Bars, areas, donuts, waterfalls, and other filled marks; hue-matched and softer than the line set, with lower luminance in dark mode |
|
|
387
|
+
| `CHART_COMPARISON_COLORS` | Dataset and Experiment comparison charts; paired shades of blue, orange, magenta, acid, and purple |
|
|
388
|
+
| `CHART_OTHER_COLOR` | Aggregated “Other” data only |
|
|
389
|
+
| `CHART_STATUS_COLORS` | Positive, warning, or negative data with that real semantic meaning; `negativeSubtle` is for low-emphasis negative regions |
|
|
390
|
+
| `CHART_STATUS_FILL_COLORS` | Positive, warning, or negative bars, areas, donuts, and other large filled marks; lower luminance in dark mode |
|
|
391
|
+
| `CHART_BREAKDOWN_COLORS` | Input, output, and other token/cost breakdowns |
|
|
392
|
+
|
|
393
|
+
Assignment rules:
|
|
394
|
+
|
|
395
|
+
- Use the line palette only for line strokes. Use the fill palette for every other categorical mark, including bars, areas, donuts, waterfalls, table markers, and run-type fills.
|
|
396
|
+
- Use either palette in index order so adjacent series receive deliberately distant hues. Use `getLineChartColorForKey` or `getFillChartColorForKey` only when a stable standalone assignment is needed without the full series list.
|
|
397
|
+
- Use solid fill colors for stacked bars and areas; gradients reduce color consistency between marks and legends.
|
|
398
|
+
- Use `CHART_STATUS_FILL_COLORS` instead of `CHART_STATUS_COLORS` when semantic status occupies a large filled area.
|
|
399
|
+
- Chart tokens are theme-responsive: define light aliases in `:root` and dark overrides in `html.dark`; never cache their resolved literal values across theme changes.
|
|
400
|
+
- Reserve neutral gray for “Other,” missing, or disabled data.
|
|
401
|
+
- Reserve positive, warning, and negative colors for semantic status. Do not assign them based on series position.
|
|
402
|
+
- Dataset and Experiment comparison charts use `CHART_COMPARISON_COLORS`, ordered as two shades per hue with consistent separation between each pair.
|
|
403
|
+
- Twenty categorical tokens support current high-cardinality usage charts, but prefer grouping, filtering, or small multiples once a chart becomes difficult to read.
|
|
404
|
+
|
|
405
|
+
### Table heatmaps — `--table-heatmap-*`
|
|
406
|
+
|
|
407
|
+
Use `bg-table-heatmap-{negative,positive}-1..5` for diverging Dataset and
|
|
408
|
+
Experiment table cells, with `bg-table-heatmap-neutral` at the midpoint. These
|
|
409
|
+
tokens use muted semantic intent backgrounds so text remains comfortable to
|
|
410
|
+
read across large cell areas; they are not chart-series colors.
|
|
411
|
+
|
|
412
|
+
### Icon — `text-icon-*` and `bg-icon-*`
|
|
413
|
+
|
|
414
|
+
Icons have a separate color namespace so icon and label colors can diverge independently. Apply to `<Icon>` wrappers or SVG elements directly.
|
|
415
|
+
|
|
416
|
+
Source general-purpose icon glyphs from server-safe Phosphor leaf modules such as `@phosphor-icons/react/dist/ssr/Check`; do not import from the package root or the legacy local icon tree. Use `<IconButton>` for interactive icons and `<Icon>` from `@langchain/macaw-components/Icon` when standardized sizing, semantic treatments, or tooltip labels are needed. Direct Phosphor glyphs must set `size` and `weight` explicitly: regular for outline glyphs, fill for intentionally filled states, and bold only where an established direct-rendered glyph must preserve a 2px visual weight.
|
|
417
|
+
|
|
418
|
+
| Class | When to use |
|
|
419
|
+
| -------------------------- | ------------------------------------- |
|
|
420
|
+
| `text-icon-primary` | Default icon |
|
|
421
|
+
| `text-icon-secondary` | Subdued icon |
|
|
422
|
+
| `text-icon-tertiary` | Very subdued icon |
|
|
423
|
+
| `text-icon-disabled` | Disabled icon |
|
|
424
|
+
| `text-icon-brand` | Brand-colored icon |
|
|
425
|
+
| `text-icon-brand-fill` | Foreground color for brand-mark icons |
|
|
426
|
+
| `bg-icon-brand-background` | Background color for brand-mark icons |
|
|
427
|
+
| `text-icon-error` | Error icon |
|
|
428
|
+
| `text-icon-success` | Success icon |
|
|
429
|
+
| `text-icon-warning` | Warning icon |
|
|
430
|
+
|
|
431
|
+
---
|
|
432
|
+
|
|
433
|
+
### Shadow — `shadow-*`
|
|
434
|
+
|
|
435
|
+
| Class | When to use |
|
|
436
|
+
| ----------- | --------------------------------------------------------- |
|
|
437
|
+
| `shadow-sm` | Low elevation for floating controls or interaction states |
|
|
438
|
+
| `shadow-md` | Dropdown, popover shadow |
|
|
439
|
+
| `shadow-lg` | Modal / dialog shadow |
|
|
440
|
+
|
|
441
|
+
Shadows adapt to dark mode. Use `var(--shadow-color-subtle)` only when no named
|
|
442
|
+
shadow can express the required layer.
|
|
443
|
+
|
|
444
|
+
---
|
|
445
|
+
|
|
446
|
+
### Radius — `rounded-*`
|
|
447
|
+
|
|
448
|
+
| Class | Value | When to use |
|
|
449
|
+
| -------------- | ------ | ------------------------------------------ |
|
|
450
|
+
| `rounded-xs` | 3px | Compact labels, tags, and tag-style badges |
|
|
451
|
+
| `rounded-sm` | 4px | Small inputs and icon buttons |
|
|
452
|
+
| `rounded-md` | 6px | Default buttons and most form controls |
|
|
453
|
+
| `rounded-lg` | 8px | Cards, dialogs, and larger content panels |
|
|
454
|
+
| `rounded-xl` | 12px | Sheets and large overlay surfaces |
|
|
455
|
+
| `rounded-full` | 9999px | Pills, default badges, and status dots |
|
|
456
|
+
|
|
457
|
+
Prefer these named values over Tailwind's built-in `rounded-*` scale (e.g. `rounded-lg` from Tailwind defaults to `8px` regardless of our design scale).
|
|
458
|
+
|
|
459
|
+
---
|
|
460
|
+
|
|
461
|
+
### Motion — `duration-*`
|
|
462
|
+
|
|
463
|
+
Use these instead of Tailwind's built-in `duration-{ms}` scale.
|
|
464
|
+
|
|
465
|
+
| Duration class | Value | When to use |
|
|
466
|
+
| ----------------- | ----- | ------------------------------------------- |
|
|
467
|
+
| `duration-fast` | 100ms | Micro-interactions (toggle, checkbox check) |
|
|
468
|
+
| `duration-normal` | 200ms | Default hover / focus transitions |
|
|
469
|
+
| `duration-slow` | 300ms | larger layout shifts |
|
|
470
|
+
| `duration-slower` | 500ms | Entrance animations |
|
|
471
|
+
|
|
472
|
+
---
|
|
473
|
+
|
|
474
|
+
### Spacing — `space-*`
|
|
475
|
+
|
|
476
|
+
4-point scale (`space-1` … `space-9`), the single source of truth is
|
|
477
|
+
`packages/components/src/utils/spacing.ts`. Use it through Tailwind property prefixes:
|
|
478
|
+
`gap-space-4`, `px-space-6`, `mt-space-2`, `p-space-5`, etc. Do not use
|
|
479
|
+
off-scale spacing — `custom/require-spacing-tokens` suggests exact token
|
|
480
|
+
replacements for raw Tailwind values that map to the scale, and
|
|
481
|
+
`custom/no-off-scale-spacing` warns on values outside it.
|
|
482
|
+
|
|
483
|
+
| Step | Value |
|
|
484
|
+
| --------- | ----- |
|
|
485
|
+
| `space-1` | 4px |
|
|
486
|
+
| `space-2` | 8px |
|
|
487
|
+
| `space-3` | 12px |
|
|
488
|
+
| `space-4` | 16px |
|
|
489
|
+
| `space-5` | 24px |
|
|
490
|
+
| `space-6` | 32px |
|
|
491
|
+
| `space-7` | 40px |
|
|
492
|
+
| `space-8` | 48px |
|
|
493
|
+
| `space-9` | 64px |
|
|
494
|
+
|
|
495
|
+
#### Relationship defaults
|
|
496
|
+
|
|
497
|
+
Choose spacing by relationship, not by eye. Small gaps bind one cluster; larger
|
|
498
|
+
gaps separate regions. Modals are one step denser than pages.
|
|
499
|
+
|
|
500
|
+
| Relationship | Utility |
|
|
501
|
+
| --------------------------------------------------------------- | --------------------------- |
|
|
502
|
+
| Title, label, or control ↔ its description, field, or hint | `gap-space-1` |
|
|
503
|
+
| Inline icon ↔ label; action ↔ adjacent action | `gap-space-2` |
|
|
504
|
+
| Section header ↔ body | `gap-space-3` |
|
|
505
|
+
| Related fields/cards; header copy ↔ actions/tabs | `gap-space-4` |
|
|
506
|
+
| Modal header ↔ body ↔ footer | `gap-space-5` |
|
|
507
|
+
| Page section ↔ section; page header/form body ↔ content/actions | `gap-space-6` |
|
|
508
|
+
| Default page horizontal/top inset | `px-space-5` / `pt-space-5` |
|
|
509
|
+
| Card, panel, or modal padding | `p-space-5` |
|
|
510
|
+
| List or table row padding | `px-space-5 py-space-4` |
|
|
511
|
+
|
|
512
|
+
---
|
|
513
|
+
|
|
514
|
+
## Deprecated Aliases
|
|
515
|
+
|
|
516
|
+
These aliases remain for compatibility; do not use them in new code.
|
|
517
|
+
|
|
518
|
+
| Deprecated | Use instead |
|
|
519
|
+
| -------------------------- | -------------------------- |
|
|
520
|
+
| `bg-popover-urgent` | `bg-elevated` |
|
|
521
|
+
| `bg-primary` | `bg-surface-level-1` |
|
|
522
|
+
| `bg-primary-hover` | `bg-surface-level-1-hover` |
|
|
523
|
+
| `bg-primary_hover` | `bg-surface-level-1-hover` |
|
|
524
|
+
| `bg-secondary` | `bg-surface-level-2` |
|
|
525
|
+
| `bg-secondary-hover` | `bg-surface-level-2-hover` |
|
|
526
|
+
| `bg-secondary_hover` | `bg-surface-level-2-hover` |
|
|
527
|
+
| `bg-tertiary` | `bg-surface-level-3` |
|
|
528
|
+
| `bg-quaternary` | `bg-surface-level-4` |
|
|
529
|
+
| `bg-brand-primary` | `bg-brand` |
|
|
530
|
+
| `bg-brand-primary-hover` | `bg-brand-hover` |
|
|
531
|
+
| `bg-brand-secondary` | `bg-brand-subtle` |
|
|
532
|
+
| `bg-brand-secondary-hover` | `bg-brand-subtle-hover` |
|
|
533
|
+
| `bg-brand-tertiary` | `bg-brand-muted` |
|
|
534
|
+
| `bg-success-primary` | `bg-success` |
|
|
535
|
+
| `bg-success-secondary` | `bg-success-subtle` |
|
|
536
|
+
| `bg-error-primary` | `bg-error` |
|
|
537
|
+
| `bg-error-secondary` | `bg-error-subtle` |
|
|
538
|
+
| `bg-warning-primary` | `bg-warning` |
|
|
539
|
+
| `bg-warning-secondary` | `bg-warning-subtle` |
|
|
540
|
+
| `border-primary` | `border-default` |
|
|
541
|
+
| `border-secondary` | `border-subtle` |
|
|
542
|
+
| `border-tertiary` | `border-muted` |
|
|
543
|
+
| `border-quaternary` | `border-faint` |
|
|
544
|
+
|
|
545
|
+
Use the replacement table only for affected classes; do not churn unrelated call sites.
|
|
546
|
+
|
|
547
|
+
---
|
|
548
|
+
|
|
549
|
+
## Progress indicators
|
|
550
|
+
|
|
551
|
+
- Use `LinearProgress` for indeterminate loading and `ProgressBar` for a known
|
|
552
|
+
completion, quota, or usage value.
|
|
553
|
+
- `ProgressBar` represents one value. Keep segmented and categorical displays in
|
|
554
|
+
feature components.
|
|
555
|
+
- Use `sm` in dense tables, `md` by default, and `lg` for emphasis.
|
|
556
|
+
- Choose `color` by meaning; thresholds remain feature-owned.
|
|
557
|
+
- `labelPosition` is `bottom` by default or `top` when the value should precede
|
|
558
|
+
the bar. Compose richer labels outside the component.
|
|
559
|
+
- Provide `aria-label` or `aria-labelledby`. Pair semantic color with visible or
|
|
560
|
+
accessible text.
|
|
561
|
+
|
|
562
|
+
---
|
|
563
|
+
|
|
564
|
+
## Validation
|
|
565
|
+
|
|
566
|
+
Run `pnpm lint` and `pnpm format:check`. Check the affected stories in both themes
|
|
567
|
+
and at narrow widths. The usage rules above also apply where automated lint does
|
|
568
|
+
not enforce them.
|