@scalepad/ui 0.1.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/.ai/rules/date-handling.md +39 -0
- package/.ai/rules/figma-design-system.md +372 -0
- package/.ai/rules/figma-lm-design-system-keys.md +680 -0
- package/.ai/rules/file-extensions.md +13 -0
- package/.ai/rules/modal-confirmation-mutation.md +56 -0
- package/.ai/rules/react-hooks.md +29 -0
- package/.ai/rules/styling.md +83 -0
- package/AGENTS.md +37 -0
- package/README.md +125 -0
- package/figma.config.json +9 -0
- package/package.json +127 -0
- package/scripts/install-ai-rules.mjs +136 -0
- package/src/ThemeProvider.tsx +57 -0
- package/src/charts.ts +32 -0
- package/src/components/ActionCard/ActionCard.css.ts +60 -0
- package/src/components/ActionCard/ActionCard.tsx +154 -0
- package/src/components/ActionCard/index.ts +2 -0
- package/src/components/Anchor/Anchor.tsx +47 -0
- package/src/components/Anchor/index.ts +2 -0
- package/src/components/AppliedFiltersManagerBar/AppliedFiltersManagerBar.tsx +105 -0
- package/src/components/AppliedFiltersManagerBar/FilterBadge.css.ts +23 -0
- package/src/components/AppliedFiltersManagerBar/FilterBadge.tsx +50 -0
- package/src/components/AppliedFiltersManagerBar/index.ts +5 -0
- package/src/components/Badge/Badge.css.ts +72 -0
- package/src/components/Badge/Badge.figma.tsx +43 -0
- package/src/components/Badge/Badge.tsx +159 -0
- package/src/components/Badge/index.ts +2 -0
- package/src/components/BreadCrumb/BreadCrumb.tsx +62 -0
- package/src/components/BreadCrumb/index.ts +2 -0
- package/src/components/BulkActionBar/BulkActionBar.css.ts +26 -0
- package/src/components/BulkActionBar/BulkActionBar.tsx +164 -0
- package/src/components/BulkActionBar/index.ts +2 -0
- package/src/components/Button/Button.css.ts +272 -0
- package/src/components/Button/Button.figma.tsx +74 -0
- package/src/components/Button/Button.tsx +84 -0
- package/src/components/Button/index.ts +2 -0
- package/src/components/Charts/ChartTooltip.figma.tsx +33 -0
- package/src/components/Charts/ChartTooltip.tsx +101 -0
- package/src/components/Charts/MiniBarSparkline.tsx +75 -0
- package/src/components/Charts/StackedPatternBarChart.tsx +494 -0
- package/src/components/Charts/TrendAreaChart.css.ts +23 -0
- package/src/components/Charts/TrendAreaChart.tsx +210 -0
- package/src/components/Charts/index.ts +12 -0
- package/src/components/CodePanel/CodePanel.css.ts +113 -0
- package/src/components/CodePanel/CodePanel.tsx +121 -0
- package/src/components/CodePanel/index.ts +2 -0
- package/src/components/CommentComposer/CommentComposer.css.ts +60 -0
- package/src/components/CommentComposer/CommentComposer.tsx +181 -0
- package/src/components/CommentComposer/index.ts +2 -0
- package/src/components/ConfirmationModal/ConfirmationModal.tsx +149 -0
- package/src/components/ConfirmationModal/index.ts +2 -0
- package/src/components/ConfirmationTooltip/ConfirmationTooltip.tsx +132 -0
- package/src/components/ConfirmationTooltip/index.ts +2 -0
- package/src/components/DataDialog.figma.tsx +33 -0
- package/src/components/DataDialog.tsx +46 -0
- package/src/components/DataTable/DataTable.tsx +1042 -0
- package/src/components/DataTable/RowExpandToggle.tsx +105 -0
- package/src/components/DataTable/RowGroupHeader.tsx +190 -0
- package/src/components/DataTable/createActionsColumn.tsx +86 -0
- package/src/components/DataTable/index.ts +25 -0
- package/src/components/DatePicker/CustomRangePicker.tsx +59 -0
- package/src/components/DatePicker/DateInput.tsx +329 -0
- package/src/components/DatePicker/DateNavigator.tsx +486 -0
- package/src/components/DatePicker/DatePicker.tsx +242 -0
- package/src/components/DatePicker/MonthlyRangePicker.tsx +231 -0
- package/src/components/DatePicker/QuarterlyRangePicker.tsx +224 -0
- package/src/components/DatePicker/QuickPicksSidebar.tsx +242 -0
- package/src/components/DatePicker/YearlyRangePicker.tsx +171 -0
- package/src/components/DatePicker/index.ts +7 -0
- package/src/components/DatePicker/types.ts +12 -0
- package/src/components/DesignSystemPrimitives/FluidGrid.tsx +44 -0
- package/src/components/DesignSystemPrimitives/InteractivePrimitives.tsx +177 -0
- package/src/components/DesignSystemPrimitives/LayoutPrimitives.tsx +220 -0
- package/src/components/DesignSystemPrimitives/LayoutPrimitives.types.tsx +15 -0
- package/src/components/DesignSystemPrimitives/SurfacePrimitives.tsx +46 -0
- package/src/components/DesignSystemPrimitives/index.ts +55 -0
- package/src/components/Details/Details.css.ts +74 -0
- package/src/components/Details/Details.tsx +140 -0
- package/src/components/Details/index.ts +2 -0
- package/src/components/DownloadCard/DownloadCard.css.ts +22 -0
- package/src/components/DownloadCard/DownloadCard.tsx +63 -0
- package/src/components/DownloadCard/index.ts +2 -0
- package/src/components/Drawer/Drawer.css.ts +32 -0
- package/src/components/Drawer/Drawer.tsx +236 -0
- package/src/components/Drawer/hooks/useDetailDrawer.ts +61 -0
- package/src/components/Drawer/hooks/useDetailDrawerNavigation.ts +125 -0
- package/src/components/Drawer/hooks/useDetailDrawerNavigationContext.ts +66 -0
- package/src/components/EditableRichText/EditableRichText.css.ts +72 -0
- package/src/components/EditableRichText/EditableRichText.tsx +324 -0
- package/src/components/EditableRichText/index.ts +2 -0
- package/src/components/EditableSelect/EditableSelect.css.ts +62 -0
- package/src/components/EditableSelect/EditableSelect.tsx +224 -0
- package/src/components/EditableSelect/index.ts +2 -0
- package/src/components/EditableText/EditableText.tsx +377 -0
- package/src/components/EditableText/index.ts +2 -0
- package/src/components/EmptyState/EmptyState.figma.tsx +33 -0
- package/src/components/EmptyState/EmptyState.tsx +230 -0
- package/src/components/EmptyState/index.ts +2 -0
- package/src/components/ErrorBoundary.tsx +135 -0
- package/src/components/ErrorState/ErrorState.tsx +197 -0
- package/src/components/ErrorState/index.ts +2 -0
- package/src/components/FeatureCard.tsx +42 -0
- package/src/components/FilterMenu/FilterMenu.figma.tsx +30 -0
- package/src/components/FilterMenu/FilterMenu.tsx +198 -0
- package/src/components/FilterMenu/FilterSubMenuTypes/BooleanFilterSubmenu.tsx +46 -0
- package/src/components/FilterMenu/FilterSubMenuTypes/SearchableFilterSubmenu.tsx +239 -0
- package/src/components/FilterMenu/FilterSubMenuTypes/index.ts +8 -0
- package/src/components/FilterMenu/defaultFilterSchemas.ts +63 -0
- package/src/components/FilterMenu/helpers.ts +115 -0
- package/src/components/FilterMenu/index.ts +35 -0
- package/src/components/FilterMenu/types.ts +101 -0
- package/src/components/IconButton/IconButton.css.ts +272 -0
- package/src/components/IconButton/IconButton.figma.tsx +47 -0
- package/src/components/IconButton/IconButton.tsx +72 -0
- package/src/components/IconButton/README.md +230 -0
- package/src/components/IconButton/index.ts +2 -0
- package/src/components/InfiniteScrollSentinel.tsx +86 -0
- package/src/components/InfiniteScrollTrigger.tsx +78 -0
- package/src/components/InfoCard.figma.tsx +47 -0
- package/src/components/InfoCard.tsx +216 -0
- package/src/components/KbdHint/KbdHint.tsx +23 -0
- package/src/components/KbdHint/index.ts +2 -0
- package/src/components/LabeledField/LabeledField.tsx +21 -0
- package/src/components/LabeledField/index.ts +2 -0
- package/src/components/LookupSelect/LookupSelect.css.ts +149 -0
- package/src/components/LookupSelect/LookupSelect.tsx +325 -0
- package/src/components/LookupSelect/index.ts +2 -0
- package/src/components/Menu/Menu.css.ts +89 -0
- package/src/components/Menu/Menu.tsx +105 -0
- package/src/components/Menu/index.ts +2 -0
- package/src/components/MessageBox/MessageBox.tsx +168 -0
- package/src/components/MessageBox/index.ts +2 -0
- package/src/components/MetricDisplay/MetricDisplay.tsx +55 -0
- package/src/components/MetricDisplay/index.ts +1 -0
- package/src/components/MultiSelect/MultiSelect.tsx +278 -0
- package/src/components/MultiSelect/index.ts +2 -0
- package/src/components/Notifications/Notifications.tsx +12 -0
- package/src/components/Notifications/README.md +93 -0
- package/src/components/Notifications/index.ts +4 -0
- package/src/components/Notifications/showToast.tsx +100 -0
- package/src/components/PropertyRow/PropertyRow.tsx +96 -0
- package/src/components/PropertyRow/index.ts +2 -0
- package/src/components/RadioTile/RadioTile.tsx +253 -0
- package/src/components/RadioTile/index.ts +2 -0
- package/src/components/RichText/FormattingToolbar.css.ts +69 -0
- package/src/components/RichText/FormattingToolbar.tsx +112 -0
- package/src/components/RichText/RichTextInline.css.ts +54 -0
- package/src/components/RichText/RichTextInline.tsx +318 -0
- package/src/components/RichText/formattingCommands.ts +181 -0
- package/src/components/RichText/formattingTypes.ts +34 -0
- package/src/components/RichText/index.ts +49 -0
- package/src/components/RichText/richTextExtensions.ts +111 -0
- package/src/components/RichText/richTextHelpers.ts +65 -0
- package/src/components/RichText/richTextImage.ts +253 -0
- package/src/components/RichText/richTextImageHandlers.ts +244 -0
- package/src/components/RichText/richTextProse.css.ts +261 -0
- package/src/components/RichTextEditor/RichTextEditor.css.ts +82 -0
- package/src/components/RichTextEditor/RichTextEditor.tsx +204 -0
- package/src/components/RichTextEditor/index.ts +2 -0
- package/src/components/RichTextView/RichTextView.css.ts +11 -0
- package/src/components/RichTextView/RichTextView.tsx +114 -0
- package/src/components/RichTextView/index.ts +2 -0
- package/src/components/Schedule/Schedule.tsx +35 -0
- package/src/components/SchedulePicker/SchedulePicker.css.ts +42 -0
- package/src/components/SchedulePicker/SchedulePicker.tsx +130 -0
- package/src/components/SchedulePicker/index.ts +2 -0
- package/src/components/SearchableList/types.ts +30 -0
- package/src/components/SearchableSubMenu/SearchableSubMenu.css.ts +25 -0
- package/src/components/SearchableSubMenu/SearchableSubMenu.tsx +139 -0
- package/src/components/SearchableSubMenu/index.ts +2 -0
- package/src/components/Select/README.md +114 -0
- package/src/components/Select/Select.css.ts +110 -0
- package/src/components/Select/Select.tsx +133 -0
- package/src/components/Select/index.ts +2 -0
- package/src/components/SelectCreatable/SelectCreatable.css.ts +16 -0
- package/src/components/SelectCreatable/SelectCreatable.tsx +203 -0
- package/src/components/SelectCreatable/index.ts +2 -0
- package/src/components/SettingsCard/SettingsCard.tsx +98 -0
- package/src/components/SettingsCard/index.ts +2 -0
- package/src/components/Sidebar/Sidebar.css.ts +91 -0
- package/src/components/Sidebar/Sidebar.tsx +129 -0
- package/src/components/Sidebar/index.ts +5 -0
- package/src/components/SimpleList/SimpleList.css.ts +12 -0
- package/src/components/SimpleList/SimpleList.tsx +44 -0
- package/src/components/SimpleList/index.ts +2 -0
- package/src/components/SimpleTable/SimpleTable.tsx +296 -0
- package/src/components/SimpleTable/index.ts +2 -0
- package/src/components/SlashRichTextEditor/SelectionBubbleMenu.css.ts +62 -0
- package/src/components/SlashRichTextEditor/SelectionBubbleMenu.tsx +85 -0
- package/src/components/SlashRichTextEditor/SlashCommandMenu.css.ts +124 -0
- package/src/components/SlashRichTextEditor/SlashCommandMenu.tsx +168 -0
- package/src/components/SlashRichTextEditor/SlashRichTextEditor.css.ts +81 -0
- package/src/components/SlashRichTextEditor/SlashRichTextEditor.tsx +538 -0
- package/src/components/SlashRichTextEditor/SlashSuggestionExtension.ts +48 -0
- package/src/components/SlashRichTextEditor/index.ts +13 -0
- package/src/components/SlashRichTextEditor/types.ts +48 -0
- package/src/components/StatCard/StatCard.css.ts +70 -0
- package/src/components/StatCard/StatCard.tsx +201 -0
- package/src/components/StatCard/index.ts +1 -0
- package/src/components/StatusBadge/StatusBadge.tsx +70 -0
- package/src/components/StatusBadge/index.ts +2 -0
- package/src/components/StatusIndicator/StatusIndicator.tsx +67 -0
- package/src/components/StatusIndicator/index.ts +6 -0
- package/src/components/SubNavigation/SubNavigation.css.ts +72 -0
- package/src/components/SubNavigation/SubNavigation.tsx +104 -0
- package/src/components/SubNavigation/index.ts +2 -0
- package/src/components/SuspenseLoader.tsx +22 -0
- package/src/components/Table/SortableColumnHeader.tsx +99 -0
- package/src/components/Table/TableSkeletonRows.figma.tsx +22 -0
- package/src/components/Table/TableSkeletonRows.tsx +113 -0
- package/src/components/Table/index.ts +9 -0
- package/src/components/TableActionsMenu.tsx +58 -0
- package/src/components/TableCard.tsx +29 -0
- package/src/components/TableContainer/TableContainer.tsx +86 -0
- package/src/components/TableContainer/index.ts +2 -0
- package/src/components/TableControlBar/TableControlBar.tsx +156 -0
- package/src/components/TableControlBar/TableSelectionButton.tsx +57 -0
- package/src/components/TableControlBar/index.ts +13 -0
- package/src/components/TableControlBar/useTableControlBar.tsx +314 -0
- package/src/components/TableSelection/TableSelection.tsx +43 -0
- package/src/components/TableSelection/index.ts +5 -0
- package/src/components/Tabs/README.md +76 -0
- package/src/components/Tabs/Tabs.css.ts +54 -0
- package/src/components/Tabs/Tabs.figma.tsx +47 -0
- package/src/components/Tabs/Tabs.tsx +96 -0
- package/src/components/Tabs/index.ts +8 -0
- package/src/components/TextInput/README.md +98 -0
- package/src/components/TextInput/SearchTextInput.figma.tsx +22 -0
- package/src/components/TextInput/SearchTextInput.tsx +150 -0
- package/src/components/TextInput/TextInput.figma.tsx +44 -0
- package/src/components/TextInput/TextInput.tsx +42 -0
- package/src/components/TextInput/index.ts +4 -0
- package/src/components/ThemeSwitcher.figma.tsx +28 -0
- package/src/components/ThemeSwitcher.tsx +69 -0
- package/src/components/TrendBadge/TrendBadge.tsx +76 -0
- package/src/components/TrendBadge/index.ts +2 -0
- package/src/components/TruncatedText.tsx +115 -0
- package/src/components/Typography/Text.tsx +74 -0
- package/src/components/Typography/Title.tsx +100 -0
- package/src/components/Typography/index.ts +4 -0
- package/src/geist-fonts.ts +48 -0
- package/src/hooks/index.ts +31 -0
- package/src/hooks/useFilters.ts +152 -0
- package/src/hooks/useInfiniteScroll.ts +62 -0
- package/src/hooks/usePlatform.ts +33 -0
- package/src/hooks/useServerTable.ts +495 -0
- package/src/hooks/useTableSelection.ts +102 -0
- package/src/hooks/useTableSort.ts +259 -0
- package/src/index.ts +483 -0
- package/src/mantine.ts +25 -0
- package/src/theme/mantineVars.ts +12 -0
- package/src/theme/themeContract.css.ts +131 -0
- package/src/theme/themeVars.ts +31 -0
- package/src/theme.ts +168 -0
- package/src/tokens/color-types.ts +107 -0
- package/src/tokens/colors.ts +243 -0
- package/src/tokens/index.ts +14 -0
- package/src/tokens/radius.ts +17 -0
- package/src/tokens/semantic-colors.ts +224 -0
- package/src/tokens/semantic-tokens-css.ts +53 -0
- package/src/tokens/shadows.ts +11 -0
- package/src/tokens/spacing.ts +20 -0
- package/src/tokens/text-styles.ts +179 -0
- package/src/tokens/typography.ts +40 -0
- package/src/tokens/zIndex.ts +27 -0
- package/src/types/mantine-theme.d.ts +17 -0
- package/src/types/tanstack-table.d.ts +22 -0
- package/src/utils/avatar.ts +150 -0
- package/src/utils/chartHelpers.ts +53 -0
- package/src/utils/color-props.ts +77 -0
- package/src/utils/createDesignComponent.tsx +104 -0
- package/src/utils/nestFlatRows.ts +111 -0
- package/src/utils/withStaticComponents.ts +6 -0
package/src/index.ts
ADDED
|
@@ -0,0 +1,483 @@
|
|
|
1
|
+
// UI package public API - Explicit named exports only
|
|
2
|
+
|
|
3
|
+
// Type augmentations - imported for side effects
|
|
4
|
+
// oxlint-disable-next-line import/no-unassigned-import
|
|
5
|
+
import './types/tanstack-table.d.ts';
|
|
6
|
+
// oxlint-disable-next-line import/no-unassigned-import
|
|
7
|
+
import './types/mantine-theme.d.ts';
|
|
8
|
+
|
|
9
|
+
// Theme
|
|
10
|
+
export { mantineVars } from './theme/mantineVars';
|
|
11
|
+
export { tokens } from './theme/themeContract.css';
|
|
12
|
+
export { toCssVar } from './theme/themeVars';
|
|
13
|
+
export type {
|
|
14
|
+
BackgroundColorVar,
|
|
15
|
+
IconColorVar,
|
|
16
|
+
StrokeColorVar,
|
|
17
|
+
TextColorVar,
|
|
18
|
+
} from './theme/themeVars';
|
|
19
|
+
export { ThemeProvider } from './ThemeProvider';
|
|
20
|
+
export type { ThemeProviderProps } from './ThemeProvider';
|
|
21
|
+
export { toZIndexVar, zIndex } from './tokens';
|
|
22
|
+
export type { ZIndexKey } from './tokens';
|
|
23
|
+
|
|
24
|
+
// Components
|
|
25
|
+
export { ActionCard } from './components/ActionCard';
|
|
26
|
+
export type { ActionCardProps } from './components/ActionCard';
|
|
27
|
+
export { AppliedFiltersManagerBar } from './components/AppliedFiltersManagerBar';
|
|
28
|
+
export type {
|
|
29
|
+
AppliedFiltersManagerBarProps,
|
|
30
|
+
FilterCategory,
|
|
31
|
+
} from './components/AppliedFiltersManagerBar';
|
|
32
|
+
export { Anchor } from './components/Anchor';
|
|
33
|
+
export type { AnchorProps } from './components/Anchor';
|
|
34
|
+
export { Badge } from './components/Badge';
|
|
35
|
+
export type { BadgeProps } from './components/Badge';
|
|
36
|
+
export { BulkActionBar } from './components/BulkActionBar';
|
|
37
|
+
export type { BulkActionBarProps } from './components/BulkActionBar';
|
|
38
|
+
export { Button } from './components/Button';
|
|
39
|
+
export type { ButtonProps } from './components/Button';
|
|
40
|
+
export { CodePanel } from './components/CodePanel';
|
|
41
|
+
export type { CodePanelProps, CodePanelTab } from './components/CodePanel';
|
|
42
|
+
export { ConfirmationModal } from './components/ConfirmationModal';
|
|
43
|
+
export type { ConfirmationModalProps } from './components/ConfirmationModal';
|
|
44
|
+
export { ConfirmationTooltip } from './components/ConfirmationTooltip';
|
|
45
|
+
export type { ConfirmationTooltipProps } from './components/ConfirmationTooltip';
|
|
46
|
+
export {
|
|
47
|
+
createActionsColumn,
|
|
48
|
+
DataTable,
|
|
49
|
+
RowExpandToggle,
|
|
50
|
+
RowGroupHeader,
|
|
51
|
+
} from './components/DataTable';
|
|
52
|
+
export type {
|
|
53
|
+
CreateActionsColumnOptions,
|
|
54
|
+
DataTableColumnConfigurator,
|
|
55
|
+
DataTableColumnConfiguratorItem,
|
|
56
|
+
DataTableColumnMeta,
|
|
57
|
+
DataTableProps,
|
|
58
|
+
RowExpandToggleProps,
|
|
59
|
+
RowGroupHeaderAggregate,
|
|
60
|
+
RowGroupHeaderProps,
|
|
61
|
+
} from './components/DataTable';
|
|
62
|
+
export { Details } from './components/Details';
|
|
63
|
+
export type { DetailsProps } from './components/Details';
|
|
64
|
+
|
|
65
|
+
export { notifications } from '@mantine/notifications';
|
|
66
|
+
export { DataDialog } from './components/DataDialog';
|
|
67
|
+
export type { DataDialogProps } from './components/DataDialog';
|
|
68
|
+
export { DateInput, DateNavigator, DatePicker } from './components/DatePicker';
|
|
69
|
+
export type {
|
|
70
|
+
DateInputProps,
|
|
71
|
+
DateNavigatorProps,
|
|
72
|
+
DatePickerGranularity,
|
|
73
|
+
DatePickerProps,
|
|
74
|
+
DateRange,
|
|
75
|
+
} from './components/DatePicker';
|
|
76
|
+
export { DownloadCard } from './components/DownloadCard';
|
|
77
|
+
export type { DownloadCardProps } from './components/DownloadCard';
|
|
78
|
+
export { Drawer } from './components/Drawer/Drawer';
|
|
79
|
+
export type { DrawerProps } from './components/Drawer/Drawer';
|
|
80
|
+
export { EmptyState } from './components/EmptyState';
|
|
81
|
+
export type {
|
|
82
|
+
EmptyStateAction,
|
|
83
|
+
EmptyStateProps,
|
|
84
|
+
} from './components/EmptyState';
|
|
85
|
+
export { ErrorBoundary } from './components/ErrorBoundary';
|
|
86
|
+
export type { ErrorBoundaryProps } from './components/ErrorBoundary';
|
|
87
|
+
export { ErrorState } from './components/ErrorState';
|
|
88
|
+
export type {
|
|
89
|
+
ErrorStateAction,
|
|
90
|
+
ErrorStateProps,
|
|
91
|
+
} from './components/ErrorState';
|
|
92
|
+
export { FeatureCard } from './components/FeatureCard';
|
|
93
|
+
export type { FeatureCardProps } from './components/FeatureCard';
|
|
94
|
+
export { FilterMenu } from './components/FilterMenu';
|
|
95
|
+
export type { FilterItem, FilterMenuProps } from './components/FilterMenu';
|
|
96
|
+
export type {
|
|
97
|
+
FilterSchema,
|
|
98
|
+
FilterValue,
|
|
99
|
+
SearchableFilterItemsController,
|
|
100
|
+
SearchableFilterItemsStatus,
|
|
101
|
+
} from './components/FilterMenu/types';
|
|
102
|
+
export { InfiniteScrollSentinel } from './components/InfiniteScrollSentinel';
|
|
103
|
+
export type { InfiniteScrollSentinelProps } from './components/InfiniteScrollSentinel';
|
|
104
|
+
export { InfiniteScrollTrigger } from './components/InfiniteScrollTrigger';
|
|
105
|
+
export type {
|
|
106
|
+
InfiniteScrollState,
|
|
107
|
+
InfiniteScrollTriggerProps,
|
|
108
|
+
} from './components/InfiniteScrollTrigger';
|
|
109
|
+
export { InfoCard } from './components/InfoCard';
|
|
110
|
+
export type { InfoCardProps } from './components/InfoCard';
|
|
111
|
+
export { KbdHint } from './components/KbdHint';
|
|
112
|
+
export type { KbdHintProps } from './components/KbdHint';
|
|
113
|
+
export { LabeledField } from './components/LabeledField';
|
|
114
|
+
export type { LabeledFieldProps } from './components/LabeledField';
|
|
115
|
+
export { MessageBox } from './components/MessageBox';
|
|
116
|
+
export type { MessageBoxProps } from './components/MessageBox';
|
|
117
|
+
export {
|
|
118
|
+
Notifications,
|
|
119
|
+
showErrorToast,
|
|
120
|
+
showSuccessToast,
|
|
121
|
+
} from './components/Notifications';
|
|
122
|
+
export type {
|
|
123
|
+
ShowToastAction,
|
|
124
|
+
ShowToastOptions,
|
|
125
|
+
} from './components/Notifications';
|
|
126
|
+
export type {
|
|
127
|
+
SearchableListAsyncProps,
|
|
128
|
+
SearchableListSearchMode,
|
|
129
|
+
} from './components/SearchableList/types';
|
|
130
|
+
export {
|
|
131
|
+
DayView,
|
|
132
|
+
DEFAULT_SCHEDULE_LABELS,
|
|
133
|
+
getLabel,
|
|
134
|
+
MobileMonthView,
|
|
135
|
+
MonthView,
|
|
136
|
+
Schedule,
|
|
137
|
+
ScheduleEvent,
|
|
138
|
+
ScheduleHeader,
|
|
139
|
+
WeekView,
|
|
140
|
+
YearView,
|
|
141
|
+
} from './components/Schedule/Schedule';
|
|
142
|
+
export type {
|
|
143
|
+
DateStringValue,
|
|
144
|
+
DateTimeStringValue,
|
|
145
|
+
DayViewProps,
|
|
146
|
+
MonthViewProps,
|
|
147
|
+
RenderEventBody,
|
|
148
|
+
ScheduleEventData,
|
|
149
|
+
ScheduleLabels,
|
|
150
|
+
ScheduleLabelsOverride,
|
|
151
|
+
ScheduleLayout,
|
|
152
|
+
ScheduleMode,
|
|
153
|
+
ScheduleProps,
|
|
154
|
+
ScheduleRecurrenceData,
|
|
155
|
+
ScheduleViewLevel,
|
|
156
|
+
WeekViewProps,
|
|
157
|
+
YearViewProps,
|
|
158
|
+
} from './components/Schedule/Schedule';
|
|
159
|
+
export { SearchableSubMenu } from './components/SearchableSubMenu';
|
|
160
|
+
export type { SearchableSubMenuProps } from './components/SearchableSubMenu';
|
|
161
|
+
export { SettingsCard } from './components/SettingsCard';
|
|
162
|
+
export type { SettingsCardProps } from './components/SettingsCard';
|
|
163
|
+
export { SimpleList } from './components/SimpleList';
|
|
164
|
+
export type {
|
|
165
|
+
SimpleListItemProps,
|
|
166
|
+
SimpleListProps,
|
|
167
|
+
} from './components/SimpleList';
|
|
168
|
+
export { SimpleTable } from './components/SimpleTable';
|
|
169
|
+
export type {
|
|
170
|
+
SimpleTableColumn,
|
|
171
|
+
SimpleTableProps,
|
|
172
|
+
} from './components/SimpleTable';
|
|
173
|
+
export {
|
|
174
|
+
getStatusVariant,
|
|
175
|
+
StatusIndicator,
|
|
176
|
+
} from './components/StatusIndicator';
|
|
177
|
+
export type {
|
|
178
|
+
DeploymentStatus,
|
|
179
|
+
DeviceStatus,
|
|
180
|
+
StatusIndicatorProps,
|
|
181
|
+
} from './components/StatusIndicator';
|
|
182
|
+
export { SuspenseLoader } from './components/SuspenseLoader';
|
|
183
|
+
export { SortableColumnHeader, TableSkeletonRows } from './components/Table';
|
|
184
|
+
export type {
|
|
185
|
+
SkeletonColumnConfig,
|
|
186
|
+
SortableColumnHeaderProps,
|
|
187
|
+
TableSkeletonRowsProps,
|
|
188
|
+
} from './components/Table';
|
|
189
|
+
export { TableActionsMenu } from './components/TableActionsMenu';
|
|
190
|
+
export type { TableActionsMenuProps } from './components/TableActionsMenu';
|
|
191
|
+
export { TableCard } from './components/TableCard';
|
|
192
|
+
export type { TableCardProps } from './components/TableCard';
|
|
193
|
+
export { TableContainer } from './components/TableContainer';
|
|
194
|
+
export type { TableContainerProps } from './components/TableContainer';
|
|
195
|
+
export {
|
|
196
|
+
TableControlBar,
|
|
197
|
+
TableSelectionButton,
|
|
198
|
+
useTableControlBar,
|
|
199
|
+
} from './components/TableControlBar';
|
|
200
|
+
export type {
|
|
201
|
+
TableControlBarProps,
|
|
202
|
+
TableSelectionButtonProps,
|
|
203
|
+
UseTableControlBarProps,
|
|
204
|
+
UseTableControlBarReturn,
|
|
205
|
+
} from './components/TableControlBar';
|
|
206
|
+
export {
|
|
207
|
+
SelectAllCheckbox,
|
|
208
|
+
SelectionCheckbox,
|
|
209
|
+
} from './components/TableSelection';
|
|
210
|
+
export type {
|
|
211
|
+
SelectAllCheckboxProps,
|
|
212
|
+
SelectionCheckboxProps,
|
|
213
|
+
} from './components/TableSelection';
|
|
214
|
+
export { Sidebar } from './components/Sidebar';
|
|
215
|
+
export type {
|
|
216
|
+
SidebarGroupLabelProps,
|
|
217
|
+
SidebarItemProps,
|
|
218
|
+
} from './components/Sidebar';
|
|
219
|
+
export { SubNavigation } from './components/SubNavigation';
|
|
220
|
+
export type { SubNavigationProps } from './components/SubNavigation';
|
|
221
|
+
export { Tabs } from './components/Tabs';
|
|
222
|
+
export type {
|
|
223
|
+
TabsListProps,
|
|
224
|
+
TabsPanelProps,
|
|
225
|
+
TabsProps,
|
|
226
|
+
TabsTabProps,
|
|
227
|
+
} from './components/Tabs';
|
|
228
|
+
export { ThemeSwitcher } from './components/ThemeSwitcher';
|
|
229
|
+
export type { ThemeSwitcherProps } from './components/ThemeSwitcher';
|
|
230
|
+
export { TruncatedText } from './components/TruncatedText';
|
|
231
|
+
export type { TruncatedTextProps } from './components/TruncatedText';
|
|
232
|
+
export { PropertyRow } from './components/PropertyRow';
|
|
233
|
+
export type { PropertyRowProps } from './components/PropertyRow';
|
|
234
|
+
export { RadioTile } from './components/RadioTile';
|
|
235
|
+
export type { RadioTileProps } from './components/RadioTile';
|
|
236
|
+
export { RichTextEditor } from './components/RichTextEditor';
|
|
237
|
+
export type { RichTextEditorProps } from './components/RichTextEditor';
|
|
238
|
+
export {
|
|
239
|
+
SlashRichTextEditor,
|
|
240
|
+
SlashSuggestionExtension,
|
|
241
|
+
} from './components/SlashRichTextEditor';
|
|
242
|
+
export type {
|
|
243
|
+
SlashCommand,
|
|
244
|
+
SlashRichTextEditorHandle,
|
|
245
|
+
SlashRichTextEditorProps,
|
|
246
|
+
SlashSuggestionState,
|
|
247
|
+
} from './components/SlashRichTextEditor';
|
|
248
|
+
export { RichTextView } from './components/RichTextView';
|
|
249
|
+
export type { RichTextViewProps } from './components/RichTextView';
|
|
250
|
+
export { RichTextInline } from './components/RichText/RichTextInline';
|
|
251
|
+
export type { RichTextInlineProps } from './components/RichText/RichTextInline';
|
|
252
|
+
export { EditableRichText } from './components/EditableRichText';
|
|
253
|
+
export type { EditableRichTextProps } from './components/EditableRichText';
|
|
254
|
+
// Shared rich-text foundation. Every editor/viewer above is a thin chrome
|
|
255
|
+
// wrapper around `RichText`'s extensions + toolbar + helpers, so consumers
|
|
256
|
+
// that need to extend or compose the toolbar (custom slash commands,
|
|
257
|
+
// custom formatting set) reach for the symbols below.
|
|
258
|
+
export {
|
|
259
|
+
BLOCKS_ONLY_FORMATTING_COMMANDS,
|
|
260
|
+
DEFAULT_RICH_TEXT_IMAGE_MAX_BYTES,
|
|
261
|
+
FormattingToolbar,
|
|
262
|
+
getRichTextExtensions,
|
|
263
|
+
installRichTextImageHandlers,
|
|
264
|
+
isDocEmpty,
|
|
265
|
+
plainTextFromDoc,
|
|
266
|
+
resolveFormattingCommands,
|
|
267
|
+
RICH_TEXT_FILE_ID_ATTRIBUTE,
|
|
268
|
+
RICH_TEXT_IMAGE_CLASS,
|
|
269
|
+
richTextDocFromPlainText,
|
|
270
|
+
STANDARD_FORMATTING_COMMANDS,
|
|
271
|
+
useRichTextImageLoader,
|
|
272
|
+
useRichTextImageUploader,
|
|
273
|
+
} from './components/RichText';
|
|
274
|
+
export type {
|
|
275
|
+
FormattingToolbarCommand,
|
|
276
|
+
FormattingToolbarProps,
|
|
277
|
+
FormattingToolbarVariant,
|
|
278
|
+
GetRichTextExtensionsOptions,
|
|
279
|
+
RichTextImageEditorConfig,
|
|
280
|
+
RichTextImageLoaderConfig,
|
|
281
|
+
RichTextImageLoaderHandle,
|
|
282
|
+
RichTextImageUploadConfig,
|
|
283
|
+
RichTextImageUploadError,
|
|
284
|
+
RichTextImageUploadResponse,
|
|
285
|
+
RichTextImageUploadResult,
|
|
286
|
+
} from './components/RichText';
|
|
287
|
+
export type { JSONContent } from '@tiptap/react';
|
|
288
|
+
|
|
289
|
+
// Input components with Figma design specifications
|
|
290
|
+
export { CommentComposer } from './components/CommentComposer';
|
|
291
|
+
export type { CommentComposerProps } from './components/CommentComposer';
|
|
292
|
+
export { MultiSelect } from './components/MultiSelect';
|
|
293
|
+
export type { MultiSelectProps } from './components/MultiSelect';
|
|
294
|
+
export { Select } from './components/Select';
|
|
295
|
+
export type { SelectProps } from './components/Select';
|
|
296
|
+
export { SelectCreatable } from './components/SelectCreatable';
|
|
297
|
+
export type { SelectCreatableProps } from './components/SelectCreatable';
|
|
298
|
+
export { LookupSelect } from './components/LookupSelect';
|
|
299
|
+
export type {
|
|
300
|
+
LookupSelectOption,
|
|
301
|
+
LookupSelectProps,
|
|
302
|
+
} from './components/LookupSelect';
|
|
303
|
+
export { SearchTextInput, TextInput } from './components/TextInput';
|
|
304
|
+
export type {
|
|
305
|
+
SearchTextInputProps,
|
|
306
|
+
TextInputProps,
|
|
307
|
+
} from './components/TextInput';
|
|
308
|
+
export { EditableText } from './components/EditableText';
|
|
309
|
+
export type {
|
|
310
|
+
EditableTextHandle,
|
|
311
|
+
EditableTextProps,
|
|
312
|
+
} from './components/EditableText';
|
|
313
|
+
export { EditableSelect } from './components/EditableSelect';
|
|
314
|
+
export type { EditableSelectProps } from './components/EditableSelect';
|
|
315
|
+
export { SchedulePicker } from './components/SchedulePicker';
|
|
316
|
+
export type {
|
|
317
|
+
FiscalQuarterValue,
|
|
318
|
+
SchedulePickerProps,
|
|
319
|
+
} from './components/SchedulePicker';
|
|
320
|
+
|
|
321
|
+
// StatCard component for displaying dashboard metrics
|
|
322
|
+
export { StatCard } from './components/StatCard';
|
|
323
|
+
export type { StatCardProps } from './components/StatCard';
|
|
324
|
+
|
|
325
|
+
export { StatusBadge } from './components/StatusBadge';
|
|
326
|
+
export type {
|
|
327
|
+
StatusBadgeProps,
|
|
328
|
+
StatusBadgeTone,
|
|
329
|
+
} from './components/StatusBadge';
|
|
330
|
+
export { TrendBadge } from './components/TrendBadge';
|
|
331
|
+
export type { TrendBadgeProps, TrendDirection } from './components/TrendBadge';
|
|
332
|
+
|
|
333
|
+
// IconButton component with Figma design specifications
|
|
334
|
+
export { IconButton } from './components/IconButton';
|
|
335
|
+
export type {
|
|
336
|
+
IconButtonProps,
|
|
337
|
+
IconButtonVariant,
|
|
338
|
+
} from './components/IconButton';
|
|
339
|
+
|
|
340
|
+
// MetricDisplay component for consistent metric/KPI display
|
|
341
|
+
export { MetricDisplay } from './components/MetricDisplay';
|
|
342
|
+
export type { MetricDisplayProps } from './components/MetricDisplay';
|
|
343
|
+
|
|
344
|
+
// Typography components with variant-driven styling from Figma text-style tokens
|
|
345
|
+
export { Text, Title } from './components/Typography';
|
|
346
|
+
export type { TextProps, TitleProps } from './components/Typography';
|
|
347
|
+
export type {
|
|
348
|
+
BodyVariant,
|
|
349
|
+
HeadingVariant,
|
|
350
|
+
TextStyleVariant,
|
|
351
|
+
} from './tokens/text-styles';
|
|
352
|
+
|
|
353
|
+
// Chart components are in a separate entry point to avoid pulling recharts
|
|
354
|
+
// into the main bundle. Import from '@scalepad/ui/charts' instead.
|
|
355
|
+
|
|
356
|
+
// Hooks
|
|
357
|
+
export { useFilters } from './hooks/useFilters';
|
|
358
|
+
export type { UseFiltersOptions, UseFiltersReturn } from './hooks/useFilters';
|
|
359
|
+
export { useDetailDrawer } from './components/Drawer/hooks/useDetailDrawer';
|
|
360
|
+
export type {
|
|
361
|
+
DetailDrawerSearch,
|
|
362
|
+
UseDetailDrawerOptions,
|
|
363
|
+
UseDetailDrawerReturn,
|
|
364
|
+
} from './components/Drawer/hooks/useDetailDrawer';
|
|
365
|
+
export { useDetailDrawerNavigation } from './components/Drawer/hooks/useDetailDrawerNavigation';
|
|
366
|
+
export type {
|
|
367
|
+
UseDetailDrawerNavigationOptions,
|
|
368
|
+
UseDetailDrawerNavigationReturn,
|
|
369
|
+
} from './components/Drawer/hooks/useDetailDrawerNavigation';
|
|
370
|
+
export { useDetailDrawerNavigationContext } from './components/Drawer/hooks/useDetailDrawerNavigationContext';
|
|
371
|
+
export type {
|
|
372
|
+
DetailDrawerNavigationContext,
|
|
373
|
+
UseDetailDrawerNavigationContextOptions,
|
|
374
|
+
} from './components/Drawer/hooks/useDetailDrawerNavigationContext';
|
|
375
|
+
export { useInfiniteScroll } from './hooks/useInfiniteScroll';
|
|
376
|
+
export type { UseInfiniteScrollOptions } from './hooks/useInfiniteScroll';
|
|
377
|
+
export { useServerTable } from './hooks/useServerTable';
|
|
378
|
+
export type {
|
|
379
|
+
ListResponse,
|
|
380
|
+
UseServerTableOptions,
|
|
381
|
+
UseServerTableReturn,
|
|
382
|
+
} from './hooks/useServerTable';
|
|
383
|
+
export { useTableSelection } from './hooks/useTableSelection';
|
|
384
|
+
export type { UseTableSelectionReturn } from './hooks/useTableSelection';
|
|
385
|
+
export { useTableSort } from './hooks/useTableSort';
|
|
386
|
+
export type {
|
|
387
|
+
UseTableSortOptions,
|
|
388
|
+
UseTableSortReturn,
|
|
389
|
+
} from './hooks/useTableSort';
|
|
390
|
+
export { usePlatform } from './hooks/usePlatform';
|
|
391
|
+
|
|
392
|
+
// Utils
|
|
393
|
+
export {
|
|
394
|
+
AVATAR_PALETTE,
|
|
395
|
+
clientInitial,
|
|
396
|
+
colorForKey,
|
|
397
|
+
initials,
|
|
398
|
+
} from './utils/avatar';
|
|
399
|
+
export type { AvatarColor } from './utils/avatar';
|
|
400
|
+
export { resolveColorToken } from './utils/color-props';
|
|
401
|
+
export type {
|
|
402
|
+
BackgroundColor,
|
|
403
|
+
BackgroundColorProp,
|
|
404
|
+
ComponentColorProp,
|
|
405
|
+
DesignSystemColorProps,
|
|
406
|
+
IconColor,
|
|
407
|
+
SemanticColor,
|
|
408
|
+
StrokeColor,
|
|
409
|
+
StrokeColorProp,
|
|
410
|
+
TextColor,
|
|
411
|
+
TextColorProp,
|
|
412
|
+
} from './utils/color-props';
|
|
413
|
+
export { nestFlatRows } from './utils/nestFlatRows';
|
|
414
|
+
export type { NestFlatRowsOptions, WithSubRows } from './utils/nestFlatRows';
|
|
415
|
+
|
|
416
|
+
// Design system primitives - wrapped Mantine components with typed color props
|
|
417
|
+
// These replace direct Mantine re-exports for components where color enforcement matters
|
|
418
|
+
export {
|
|
419
|
+
Alert,
|
|
420
|
+
Avatar,
|
|
421
|
+
Box,
|
|
422
|
+
Card,
|
|
423
|
+
Center,
|
|
424
|
+
Container,
|
|
425
|
+
Divider,
|
|
426
|
+
Flex,
|
|
427
|
+
FluidGrid,
|
|
428
|
+
Grid,
|
|
429
|
+
Group,
|
|
430
|
+
Loader,
|
|
431
|
+
Menu,
|
|
432
|
+
NavLink,
|
|
433
|
+
Paper,
|
|
434
|
+
SimpleGrid,
|
|
435
|
+
Stack,
|
|
436
|
+
Switch,
|
|
437
|
+
} from './components/DesignSystemPrimitives';
|
|
438
|
+
export type {
|
|
439
|
+
AlertProps,
|
|
440
|
+
AvatarProps,
|
|
441
|
+
BoxProps,
|
|
442
|
+
CardProps,
|
|
443
|
+
CenterProps,
|
|
444
|
+
ContainerProps,
|
|
445
|
+
DividerProps,
|
|
446
|
+
FlexProps,
|
|
447
|
+
FluidGridProps,
|
|
448
|
+
GridProps,
|
|
449
|
+
GroupProps,
|
|
450
|
+
LoaderProps,
|
|
451
|
+
MenuItemProps,
|
|
452
|
+
MenuItemVariant,
|
|
453
|
+
NavLinkProps,
|
|
454
|
+
PaperProps,
|
|
455
|
+
SimpleGridProps,
|
|
456
|
+
StackProps,
|
|
457
|
+
SwitchProps,
|
|
458
|
+
} from './components/DesignSystemPrimitives';
|
|
459
|
+
|
|
460
|
+
// Raw Mantine pass-throughs.
|
|
461
|
+
// Prefer `@scalepad/ui/mantine` for new imports when no wrapped primitive exists.
|
|
462
|
+
export {
|
|
463
|
+
AppShell,
|
|
464
|
+
Burger,
|
|
465
|
+
Checkbox,
|
|
466
|
+
Code,
|
|
467
|
+
Modal,
|
|
468
|
+
NativeSelect,
|
|
469
|
+
PasswordInput,
|
|
470
|
+
Popover,
|
|
471
|
+
Progress,
|
|
472
|
+
SegmentedControl,
|
|
473
|
+
Skeleton,
|
|
474
|
+
Table,
|
|
475
|
+
Textarea,
|
|
476
|
+
Tooltip,
|
|
477
|
+
UnstyledButton,
|
|
478
|
+
} from './mantine';
|
|
479
|
+
export type {
|
|
480
|
+
PopoverProps,
|
|
481
|
+
ProgressProps,
|
|
482
|
+
UnstyledButtonProps,
|
|
483
|
+
} from './mantine';
|
package/src/mantine.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Raw Mantine pass-through exports.
|
|
2
|
+
// Prefer wrapped design-system primitives from `@scalepad/ui` when available.
|
|
3
|
+
|
|
4
|
+
export {
|
|
5
|
+
AppShell,
|
|
6
|
+
Burger,
|
|
7
|
+
Checkbox,
|
|
8
|
+
Code,
|
|
9
|
+
Modal,
|
|
10
|
+
NativeSelect,
|
|
11
|
+
PasswordInput,
|
|
12
|
+
Popover,
|
|
13
|
+
Progress,
|
|
14
|
+
SegmentedControl,
|
|
15
|
+
Skeleton,
|
|
16
|
+
Table,
|
|
17
|
+
Textarea,
|
|
18
|
+
Tooltip,
|
|
19
|
+
UnstyledButton,
|
|
20
|
+
} from '@mantine/core';
|
|
21
|
+
export type {
|
|
22
|
+
PopoverProps,
|
|
23
|
+
ProgressProps,
|
|
24
|
+
UnstyledButtonProps,
|
|
25
|
+
} from '@mantine/core';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mantine theme as typed CSS variable references for vanilla-extract.
|
|
3
|
+
* Use mantineVars for theme tokens, breakpoints, light/dark selectors, RTL.
|
|
4
|
+
* Values are provided by MantineProvider; this file only exposes references.
|
|
5
|
+
* (Plain .ts so we can export themeToVars result which includes functions; use in .css.ts via import.)
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { themeToVars } from '@mantine/vanilla-extract';
|
|
9
|
+
|
|
10
|
+
import { mantineTheme } from '../theme';
|
|
11
|
+
|
|
12
|
+
export const mantineVars = themeToVars(mantineTheme);
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AUTO-GENERATED - DO NOT EDIT
|
|
3
|
+
* Generated from: packages/figma-tokens (semantic-colors, border-radius, spacing, shadows)
|
|
4
|
+
* Theme contract for vanilla-extract: typed references to CSS variables injected by ThemeProvider.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { createGlobalThemeContract } from '@vanilla-extract/css';
|
|
8
|
+
|
|
9
|
+
export const tokens = createGlobalThemeContract({
|
|
10
|
+
color: {
|
|
11
|
+
text: {
|
|
12
|
+
title: 'color-text-title',
|
|
13
|
+
dangerDefault: 'color-text-danger-default',
|
|
14
|
+
link: 'color-text-link',
|
|
15
|
+
default: 'color-text-default',
|
|
16
|
+
disabledDefault: 'color-text-disabled-default',
|
|
17
|
+
subduedDefault: 'color-text-subdued-default',
|
|
18
|
+
primaryDefault: 'color-text-primary-default',
|
|
19
|
+
primaryLight: 'color-text-primary-light',
|
|
20
|
+
warningDefault: 'color-text-warning-default',
|
|
21
|
+
successDefault: 'color-text-success-default',
|
|
22
|
+
dangerDisabled: 'color-text-danger-disabled',
|
|
23
|
+
informationDefault: 'color-text-information-default',
|
|
24
|
+
dangerStrong: 'color-text-danger-strong',
|
|
25
|
+
warningStrong: 'color-text-warning-strong',
|
|
26
|
+
successStrong: 'color-text-success-strong',
|
|
27
|
+
informationStrong: 'color-text-information-strong',
|
|
28
|
+
subduedStrong: 'color-text-subdued-strong',
|
|
29
|
+
inverse: 'color-text-inverse',
|
|
30
|
+
},
|
|
31
|
+
background: {
|
|
32
|
+
default: 'color-background-default',
|
|
33
|
+
defaultHover: 'color-background-default-hover',
|
|
34
|
+
body: 'color-background-body',
|
|
35
|
+
disabledDefault: 'color-background-disabled-default',
|
|
36
|
+
transparent: 'color-background-transparent',
|
|
37
|
+
primaryFilled: 'color-background-primary-filled',
|
|
38
|
+
primaryFilledHover: 'color-background-primary-filled-hover',
|
|
39
|
+
warningFilled: 'color-background-warning-filled',
|
|
40
|
+
successFilled: 'color-background-success-filled',
|
|
41
|
+
subduedLight: 'color-background-subdued-light',
|
|
42
|
+
subduedUltralight: 'color-background-subdued-ultralight',
|
|
43
|
+
dangerFilled: 'color-background-danger-filled',
|
|
44
|
+
subduedFilled: 'color-background-subdued-filled',
|
|
45
|
+
warningFilledHover: 'color-background-warning-filled-hover',
|
|
46
|
+
successFilledHover: 'color-background-success-filled-hover',
|
|
47
|
+
dangerFilledHover: 'color-background-danger-filled-hover',
|
|
48
|
+
subduedFilledHover: 'color-background-subdued-filled-hover',
|
|
49
|
+
dangerLight: 'color-background-danger-light',
|
|
50
|
+
primaryLight: 'color-background-primary-light',
|
|
51
|
+
warningLight: 'color-background-warning-light',
|
|
52
|
+
successLight: 'color-background-success-light',
|
|
53
|
+
primaryLightHover: 'color-background-primary-light-hover',
|
|
54
|
+
warningLightHover: 'color-background-warning-light-hover',
|
|
55
|
+
successLightHover: 'color-background-success-light-hover',
|
|
56
|
+
dangerLightHover: 'color-background-danger-light-hover',
|
|
57
|
+
subduedLightHover: 'color-background-subdued-light-hover',
|
|
58
|
+
informationFilled: 'color-background-information-filled',
|
|
59
|
+
informationFilledHover: 'color-background-information-filled-hover',
|
|
60
|
+
informationLight: 'color-background-information-light',
|
|
61
|
+
informationLightHover: 'color-background-information-light-hover',
|
|
62
|
+
inverseFilled: 'color-background-inverse-filled',
|
|
63
|
+
inverseFilledHover: 'color-background-inverse-filled-hover',
|
|
64
|
+
input: 'color-background-input',
|
|
65
|
+
backdrop: 'color-background-backdrop',
|
|
66
|
+
},
|
|
67
|
+
stroke: {
|
|
68
|
+
default: 'color-stroke-default',
|
|
69
|
+
light: 'color-stroke-light',
|
|
70
|
+
primaryDefault: 'color-stroke-primary-default',
|
|
71
|
+
successDefault: 'color-stroke-success-default',
|
|
72
|
+
dangerDefault: 'color-stroke-danger-default',
|
|
73
|
+
subduedStrong: 'color-stroke-subdued-strong',
|
|
74
|
+
warningDefault: 'color-stroke-warning-default',
|
|
75
|
+
informationDefault: 'color-stroke-information-default',
|
|
76
|
+
focusDefault: 'color-stroke-focus-default',
|
|
77
|
+
inverse: 'color-stroke-inverse',
|
|
78
|
+
subduedDefault: 'color-stroke-subdued-default',
|
|
79
|
+
strong: 'color-stroke-strong',
|
|
80
|
+
icon: 'color-stroke-icon',
|
|
81
|
+
focusStrong: 'color-stroke-focus-strong',
|
|
82
|
+
},
|
|
83
|
+
icon: {
|
|
84
|
+
light: 'color-icon-light',
|
|
85
|
+
dangerDefault: 'color-icon-danger-default',
|
|
86
|
+
dangerDisabled: 'color-icon-danger-disabled',
|
|
87
|
+
warningDefault: 'color-icon-warning-default',
|
|
88
|
+
warningStrong: 'color-icon-warning-strong',
|
|
89
|
+
dangerStrong: 'color-icon-danger-strong',
|
|
90
|
+
informationDefault: 'color-icon-information-default',
|
|
91
|
+
informationStrong: 'color-icon-information-strong',
|
|
92
|
+
successDefault: 'color-icon-success-default',
|
|
93
|
+
successStrong: 'color-icon-success-strong',
|
|
94
|
+
default: 'color-icon-default',
|
|
95
|
+
inverse: 'color-icon-inverse',
|
|
96
|
+
primaryDefault: 'color-icon-primary-default',
|
|
97
|
+
primaryStrong: 'color-icon-primary-strong',
|
|
98
|
+
medium: 'color-icon-medium',
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
radius: {
|
|
102
|
+
xs: 'radius-xs',
|
|
103
|
+
lg: 'radius-lg',
|
|
104
|
+
xl: 'radius-xl',
|
|
105
|
+
md: 'radius-md',
|
|
106
|
+
sm: 'radius-sm',
|
|
107
|
+
full: 'radius-full',
|
|
108
|
+
'2xl': 'radius-2xl',
|
|
109
|
+
'3xl': 'radius-3xl',
|
|
110
|
+
default: 'radius-default',
|
|
111
|
+
},
|
|
112
|
+
spacing: {
|
|
113
|
+
'3xs': 'spacing-3xs',
|
|
114
|
+
'2xs': 'spacing-2xs',
|
|
115
|
+
xs: 'spacing-xs',
|
|
116
|
+
md: 'spacing-md',
|
|
117
|
+
lg: 'spacing-lg',
|
|
118
|
+
xl: 'spacing-xl',
|
|
119
|
+
'2xl': 'spacing-2xl',
|
|
120
|
+
'3xl': 'spacing-3xl',
|
|
121
|
+
'4xl': 'spacing-4xl',
|
|
122
|
+
'5xl': 'spacing-5xl',
|
|
123
|
+
sm: 'spacing-sm',
|
|
124
|
+
},
|
|
125
|
+
shadow: {
|
|
126
|
+
sm: 'shadow-sm',
|
|
127
|
+
md: 'shadow-md',
|
|
128
|
+
lg: 'shadow-lg',
|
|
129
|
+
xl: 'shadow-xl',
|
|
130
|
+
},
|
|
131
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme contract value types and helper for use in React (inline styles, Mantine props).
|
|
3
|
+
* Contract values are variable names (e.g. 'color-background-primary-light'); use toCssVar()
|
|
4
|
+
* when you need a full CSS value for style or bg.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import type { tokens } from './themeContract.css';
|
|
8
|
+
|
|
9
|
+
/** Union of background color variable names from the theme contract */
|
|
10
|
+
export type BackgroundColorVar =
|
|
11
|
+
(typeof tokens.color.background)[keyof typeof tokens.color.background];
|
|
12
|
+
|
|
13
|
+
/** Union of text color variable names from the theme contract */
|
|
14
|
+
export type TextColorVar =
|
|
15
|
+
(typeof tokens.color.text)[keyof typeof tokens.color.text];
|
|
16
|
+
|
|
17
|
+
/** Union of stroke/border color variable names from the theme contract */
|
|
18
|
+
export type StrokeColorVar =
|
|
19
|
+
(typeof tokens.color.stroke)[keyof typeof tokens.color.stroke];
|
|
20
|
+
|
|
21
|
+
/** Union of icon color variable names from the theme contract */
|
|
22
|
+
export type IconColorVar =
|
|
23
|
+
(typeof tokens.color.icon)[keyof typeof tokens.color.icon];
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Convert a theme contract variable name to a CSS var() value.
|
|
27
|
+
* Use when passing a contract value into style or Mantine props (e.g. bg, backgroundColor).
|
|
28
|
+
*/
|
|
29
|
+
export function toCssVar(varName: string): string {
|
|
30
|
+
return `var(--${varName})`;
|
|
31
|
+
}
|