@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
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Semantic color tokens synced from Figma Design System (VCLfybgU3OaUUPrQdBaVmP).
|
|
3
|
+
* Values reference primitives in colors.ts; inline rgba for alpha variants.
|
|
4
|
+
* Figma source of truth: Tokens collection (Light / Dark modes).
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
black,
|
|
9
|
+
dark,
|
|
10
|
+
gray,
|
|
11
|
+
grayAlpha,
|
|
12
|
+
green,
|
|
13
|
+
indigo,
|
|
14
|
+
indigoAlpha,
|
|
15
|
+
red,
|
|
16
|
+
redAlpha,
|
|
17
|
+
teal,
|
|
18
|
+
tealAlpha,
|
|
19
|
+
transparent,
|
|
20
|
+
white,
|
|
21
|
+
yellow,
|
|
22
|
+
yellowAlpha,
|
|
23
|
+
} from './colors';
|
|
24
|
+
|
|
25
|
+
/** Light mode semantic color values */
|
|
26
|
+
export const semanticColors = {
|
|
27
|
+
'text.title': black,
|
|
28
|
+
'text.danger.default': red[6],
|
|
29
|
+
'text.link': green[5],
|
|
30
|
+
'background.default': white,
|
|
31
|
+
'background.default-hover': gray[0],
|
|
32
|
+
'text.default': gray[9],
|
|
33
|
+
'stroke.default': gray[3],
|
|
34
|
+
'stroke.light': gray[2],
|
|
35
|
+
'background.body': gray[0],
|
|
36
|
+
'text.disabled.default': gray[5],
|
|
37
|
+
'background.disabled.default': gray[2],
|
|
38
|
+
'background.transparent': transparent,
|
|
39
|
+
'background.primary.filled': green[8],
|
|
40
|
+
'background.primary.filled-hover': green[7],
|
|
41
|
+
'background.warning.filled': yellow[6],
|
|
42
|
+
'background.success.filled': teal[6],
|
|
43
|
+
'background.subdued.light': gray[2],
|
|
44
|
+
'background.subdued.ultralight': gray[0],
|
|
45
|
+
'background.danger.filled': red[8],
|
|
46
|
+
'background.subdued.filled': gray[4],
|
|
47
|
+
'background.warning.filled-hover': yellow[7],
|
|
48
|
+
'background.success.filled-hover': teal[7],
|
|
49
|
+
'background.danger.filled-hover': red[9],
|
|
50
|
+
'background.subdued.filled-hover': gray[6],
|
|
51
|
+
'background.danger.light': red[0],
|
|
52
|
+
'background.primary.light': green[0],
|
|
53
|
+
'background.warning.light': yellowAlpha['10'],
|
|
54
|
+
'background.success.light': teal[0],
|
|
55
|
+
'text.subdued.default': gray[6],
|
|
56
|
+
'text.primary.default': green[5],
|
|
57
|
+
'text.primary.light': green[5],
|
|
58
|
+
'text.warning.default': yellow[6],
|
|
59
|
+
'text.success.default': teal[6],
|
|
60
|
+
'background.primary.light-hover': green[1],
|
|
61
|
+
'background.warning.light-hover': yellowAlpha['12'],
|
|
62
|
+
'background.success.light-hover': teal[1],
|
|
63
|
+
'background.danger.light-hover': red[1],
|
|
64
|
+
'background.subdued.light-hover': gray[1],
|
|
65
|
+
'stroke.primary.default': green[3],
|
|
66
|
+
'text.danger.disabled': red[4],
|
|
67
|
+
'stroke.success.default': teal[6],
|
|
68
|
+
'stroke.danger.default': red[6],
|
|
69
|
+
'stroke.subdued.strong': gray[6],
|
|
70
|
+
'stroke.warning.default': yellow[6],
|
|
71
|
+
'background.information.filled': indigo[6],
|
|
72
|
+
'background.information.filled-hover': indigo[7],
|
|
73
|
+
'background.information.light': indigoAlpha['10'],
|
|
74
|
+
'background.information.light-hover': indigoAlpha['12'],
|
|
75
|
+
'stroke.information.default': indigo[6],
|
|
76
|
+
'text.information.default': indigo[6],
|
|
77
|
+
'stroke.focus.default': green[5],
|
|
78
|
+
'background.inverse.filled': gray[9],
|
|
79
|
+
'background.inverse.filled-hover': gray[8],
|
|
80
|
+
'icon.light': gray[5],
|
|
81
|
+
'icon.danger.default': red[6],
|
|
82
|
+
'icon.danger.disabled': red[4],
|
|
83
|
+
'text.danger.strong': red[9],
|
|
84
|
+
'text.warning.strong': yellow[9],
|
|
85
|
+
'text.success.strong': teal[9],
|
|
86
|
+
'text.information.strong': indigo[9],
|
|
87
|
+
'icon.warning.default': yellow[6],
|
|
88
|
+
'icon.warning.strong': yellow[9],
|
|
89
|
+
'icon.danger.strong': red[9],
|
|
90
|
+
'icon.information.default': indigo[6],
|
|
91
|
+
'icon.information.strong': indigo[9],
|
|
92
|
+
'icon.success.default': teal[6],
|
|
93
|
+
'icon.success.strong': teal[9],
|
|
94
|
+
'text.subdued.strong': gray[7],
|
|
95
|
+
'icon.default': gray[9],
|
|
96
|
+
'stroke.inverse': white,
|
|
97
|
+
'stroke.subdued.default': gray[2],
|
|
98
|
+
'text.inverse': white,
|
|
99
|
+
'stroke.strong': gray[5],
|
|
100
|
+
'icon.inverse': white,
|
|
101
|
+
'stroke.icon': gray[9],
|
|
102
|
+
'icon.primary.default': green[5],
|
|
103
|
+
'icon.primary.strong': green[8],
|
|
104
|
+
'stroke.focus.strong': green[8],
|
|
105
|
+
'background.input': white,
|
|
106
|
+
'background.backdrop': grayAlpha['9-60'],
|
|
107
|
+
'icon.medium': gray[7],
|
|
108
|
+
} as const;
|
|
109
|
+
|
|
110
|
+
/** Dark mode semantic color values */
|
|
111
|
+
export const semanticColorsDark = {
|
|
112
|
+
'text.title': dark[0],
|
|
113
|
+
'text.danger.default': red[7],
|
|
114
|
+
'text.link': green[3],
|
|
115
|
+
'background.default': dark[6],
|
|
116
|
+
'background.default-hover': dark[5],
|
|
117
|
+
'text.default': white,
|
|
118
|
+
'stroke.default': dark[4],
|
|
119
|
+
'stroke.light': dark[5],
|
|
120
|
+
'background.body': dark[7],
|
|
121
|
+
'text.disabled.default': dark[3],
|
|
122
|
+
'background.disabled.default': dark[6],
|
|
123
|
+
'background.transparent': transparent,
|
|
124
|
+
'background.primary.filled': green[5],
|
|
125
|
+
'background.primary.filled-hover': green[4],
|
|
126
|
+
'background.warning.filled': yellow[8],
|
|
127
|
+
'background.success.filled': teal[8],
|
|
128
|
+
'background.subdued.light': dark[5],
|
|
129
|
+
'background.subdued.ultralight': dark[6],
|
|
130
|
+
'background.danger.filled': red[8],
|
|
131
|
+
'background.subdued.filled': gray[7],
|
|
132
|
+
'background.warning.filled-hover': yellow[9],
|
|
133
|
+
'background.success.filled-hover': teal[9],
|
|
134
|
+
'background.danger.filled-hover': red[9],
|
|
135
|
+
'background.subdued.filled-hover': gray[8],
|
|
136
|
+
'background.danger.light': red[4],
|
|
137
|
+
'background.primary.light': green[9],
|
|
138
|
+
'background.warning.light': yellowAlpha['15'],
|
|
139
|
+
'background.success.light': tealAlpha['15'],
|
|
140
|
+
'text.subdued.default': gray[3],
|
|
141
|
+
'text.primary.default': green[3],
|
|
142
|
+
'text.primary.light': green[4],
|
|
143
|
+
'text.warning.default': yellow[3],
|
|
144
|
+
'text.success.default': teal[3],
|
|
145
|
+
'background.primary.light-hover': green[8],
|
|
146
|
+
'background.warning.light-hover': yellowAlpha['20'],
|
|
147
|
+
'background.success.light-hover': tealAlpha['20'],
|
|
148
|
+
'background.danger.light-hover': red[5],
|
|
149
|
+
'background.subdued.light-hover': dark[6],
|
|
150
|
+
'stroke.primary.default': green[6],
|
|
151
|
+
'text.danger.disabled': redAlpha['50'],
|
|
152
|
+
'stroke.success.default': teal[3],
|
|
153
|
+
'stroke.danger.default': red[7],
|
|
154
|
+
'stroke.subdued.strong': gray[3],
|
|
155
|
+
'stroke.warning.default': yellow[3],
|
|
156
|
+
'background.information.filled': indigo[8],
|
|
157
|
+
'background.information.filled-hover': indigo[9],
|
|
158
|
+
'background.information.light': indigoAlpha['15'],
|
|
159
|
+
'background.information.light-hover': indigoAlpha['20'],
|
|
160
|
+
'stroke.information.default': indigo[3],
|
|
161
|
+
'text.information.default': indigo[3],
|
|
162
|
+
'stroke.focus.default': green[3],
|
|
163
|
+
'background.inverse.filled': dark[0],
|
|
164
|
+
'background.inverse.filled-hover': dark[1],
|
|
165
|
+
'icon.light': dark[3],
|
|
166
|
+
'icon.danger.default': red[7],
|
|
167
|
+
'icon.danger.disabled': redAlpha['50'],
|
|
168
|
+
'text.danger.strong': red[9],
|
|
169
|
+
'text.warning.strong': yellow[9],
|
|
170
|
+
'text.success.strong': teal[9],
|
|
171
|
+
'text.information.strong': indigo[9],
|
|
172
|
+
'icon.warning.default': yellow[5],
|
|
173
|
+
'icon.warning.strong': yellow[9],
|
|
174
|
+
'icon.danger.strong': red[9],
|
|
175
|
+
'icon.information.default': indigo[5],
|
|
176
|
+
'icon.information.strong': indigo[9],
|
|
177
|
+
'icon.success.default': teal[5],
|
|
178
|
+
'icon.success.strong': teal[9],
|
|
179
|
+
'text.subdued.strong': gray[6],
|
|
180
|
+
'icon.default': dark[1],
|
|
181
|
+
'stroke.inverse': dark[6],
|
|
182
|
+
'stroke.subdued.default': gray[6],
|
|
183
|
+
'text.inverse': dark[9],
|
|
184
|
+
'stroke.strong': dark[2],
|
|
185
|
+
'icon.inverse': dark[9],
|
|
186
|
+
'stroke.icon': dark[1],
|
|
187
|
+
'icon.primary.default': green[3],
|
|
188
|
+
'icon.primary.strong': green[1],
|
|
189
|
+
'stroke.focus.strong': green[1],
|
|
190
|
+
'background.input': dark[6],
|
|
191
|
+
'background.backdrop': grayAlpha['9-60'],
|
|
192
|
+
'icon.medium': dark[4],
|
|
193
|
+
} as const;
|
|
194
|
+
|
|
195
|
+
function semanticKeyToCssVarName(key: string): string {
|
|
196
|
+
return `--color-${key.replace(/\./g, '-')}`;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
function buildSemanticColorsCss(
|
|
200
|
+
colorsObj: Record<string, string>,
|
|
201
|
+
selector: string,
|
|
202
|
+
): string {
|
|
203
|
+
const lines = [`${selector} {`];
|
|
204
|
+
for (const [key, value] of Object.entries(colorsObj)) {
|
|
205
|
+
lines.push(` ${semanticKeyToCssVarName(key)}: ${value};`);
|
|
206
|
+
}
|
|
207
|
+
lines.push('}');
|
|
208
|
+
return lines.join('\n');
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/** CSS custom properties for light mode (generated from semanticColors) */
|
|
212
|
+
export const semanticColorsCssLight = buildSemanticColorsCss(
|
|
213
|
+
semanticColors as Record<string, string>,
|
|
214
|
+
':root, [data-mantine-color-scheme="light"]',
|
|
215
|
+
);
|
|
216
|
+
|
|
217
|
+
/** CSS custom properties for dark mode (generated from semanticColorsDark) */
|
|
218
|
+
export const semanticColorsCssDark = buildSemanticColorsCss(
|
|
219
|
+
semanticColorsDark as Record<string, string>,
|
|
220
|
+
'[data-mantine-color-scheme="dark"]',
|
|
221
|
+
);
|
|
222
|
+
|
|
223
|
+
/** Combined CSS for both light and dark modes */
|
|
224
|
+
export const semanticColorsCss = `${semanticColorsCssLight}\n${semanticColorsCssDark}`;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Semantic design token CSS custom properties (radius, spacing, shadows, z-index, font).
|
|
3
|
+
* Injected by ThemeProvider so components can use var(--radius-*), var(--spacing-*), etc.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { figmaRadius } from './radius';
|
|
7
|
+
import { figmaShadows } from './shadows';
|
|
8
|
+
import { figmaSpacing } from './spacing';
|
|
9
|
+
import { figmaFontFamilies } from './typography';
|
|
10
|
+
import { zIndex } from './zIndex';
|
|
11
|
+
|
|
12
|
+
function buildSemanticTokensCss(): string {
|
|
13
|
+
const lines: string[] = [
|
|
14
|
+
':root, [data-mantine-color-scheme="light"], [data-mantine-color-scheme="dark"] {',
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
// Radius
|
|
18
|
+
for (const [key, value] of Object.entries(figmaRadius)) {
|
|
19
|
+
lines.push(` --radius-${key}: ${value};`);
|
|
20
|
+
}
|
|
21
|
+
lines.push(` --radius-default: ${figmaRadius.lg};`);
|
|
22
|
+
|
|
23
|
+
// Spacing
|
|
24
|
+
for (const [key, value] of Object.entries(figmaSpacing)) {
|
|
25
|
+
lines.push(` --spacing-${key}: ${value};`);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Shadows
|
|
29
|
+
for (const [key, value] of Object.entries(figmaShadows)) {
|
|
30
|
+
lines.push(` --shadow-${key}: ${value};`);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Z-index
|
|
34
|
+
for (const [key, value] of Object.entries(zIndex)) {
|
|
35
|
+
lines.push(` --z-index-${key}: ${value};`);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Font families
|
|
39
|
+
lines.push(
|
|
40
|
+
` --font-family-monospace: "${figmaFontFamilies['font-family-monospace']}", "Courier New", monospace;`,
|
|
41
|
+
);
|
|
42
|
+
lines.push(
|
|
43
|
+
` --font-family-body: "${figmaFontFamilies['font-family-body']}", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;`,
|
|
44
|
+
);
|
|
45
|
+
lines.push(
|
|
46
|
+
` --font-family-headings: "${figmaFontFamilies['font-family-headings']}", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;`,
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
lines.push('}');
|
|
50
|
+
return lines.join('\n');
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export const semanticTokensCss = buildSemanticTokensCss();
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AUTO-GENERATED - DO NOT EDIT
|
|
3
|
+
* Generated from: packages/figma-tokens/source/shadows.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export const figmaShadows = {
|
|
7
|
+
sm: '0px 1px 3px 0px rgba(0, 0, 0, 0.10), 0px 1px 2px -1px rgba(0, 0, 0, 0.10)',
|
|
8
|
+
md: '0px 4px 6px -1px rgba(0, 0, 0, 0.10), 0px 2px 4px -2px rgba(0, 0, 0, 0.10)',
|
|
9
|
+
lg: '0px 10px 15px -3px rgba(0, 0, 0, 0.10), 0px 4px -4px 6px rgba(0, 0, 0, 0.10)',
|
|
10
|
+
xl: '0px 20px 25px -5px rgba(0, 0, 0, 0.10), 0px 8px -6px 10px rgba(0, 0, 0, 0.10)',
|
|
11
|
+
} as const;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AUTO-GENERATED - DO NOT EDIT
|
|
3
|
+
* Generated from: packages/figma-tokens/source/spacing.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { rem } from '@mantine/core';
|
|
7
|
+
|
|
8
|
+
export const figmaSpacing = {
|
|
9
|
+
'3xs': rem('2px'),
|
|
10
|
+
'2xs': rem('4px'),
|
|
11
|
+
xs: rem('8px'),
|
|
12
|
+
sm: rem('12px'),
|
|
13
|
+
md: rem('16px'),
|
|
14
|
+
lg: rem('20px'),
|
|
15
|
+
xl: rem('24px'),
|
|
16
|
+
'2xl': rem('32px'),
|
|
17
|
+
'3xl': rem('40px'),
|
|
18
|
+
'4xl': rem('48px'),
|
|
19
|
+
'5xl': rem('64px'),
|
|
20
|
+
} as const;
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AUTO-GENERATED - DO NOT EDIT
|
|
3
|
+
* Generated from: packages/figma-tokens/source/text-styles.json + typography.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { rem } from '@mantine/core';
|
|
7
|
+
|
|
8
|
+
export type TextTransform = 'uppercase' | 'none' | 'capitalize' | 'lowercase';
|
|
9
|
+
|
|
10
|
+
export type TextStyleDefinition = {
|
|
11
|
+
fontFamily: string | undefined;
|
|
12
|
+
fontWeight: number;
|
|
13
|
+
fontSize: string;
|
|
14
|
+
lineHeight: string;
|
|
15
|
+
letterSpacing: number | string;
|
|
16
|
+
textTransform?: TextTransform;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const textStyleVariants = {
|
|
20
|
+
heading1: {
|
|
21
|
+
fontFamily: undefined,
|
|
22
|
+
fontWeight: 700,
|
|
23
|
+
fontSize: rem('48px'),
|
|
24
|
+
lineHeight: rem('48px'),
|
|
25
|
+
letterSpacing: 0,
|
|
26
|
+
},
|
|
27
|
+
heading2: {
|
|
28
|
+
fontFamily: undefined,
|
|
29
|
+
fontWeight: 700,
|
|
30
|
+
fontSize: rem('28px'),
|
|
31
|
+
lineHeight: rem('28px'),
|
|
32
|
+
letterSpacing: 0,
|
|
33
|
+
},
|
|
34
|
+
heading3: {
|
|
35
|
+
fontFamily: undefined,
|
|
36
|
+
fontWeight: 700,
|
|
37
|
+
fontSize: rem('24px'),
|
|
38
|
+
lineHeight: rem('28.8px'),
|
|
39
|
+
letterSpacing: 0,
|
|
40
|
+
},
|
|
41
|
+
heading4: {
|
|
42
|
+
fontFamily: undefined,
|
|
43
|
+
fontWeight: 700,
|
|
44
|
+
fontSize: rem('20px'),
|
|
45
|
+
lineHeight: rem('24px'),
|
|
46
|
+
letterSpacing: 0,
|
|
47
|
+
},
|
|
48
|
+
heading5: {
|
|
49
|
+
fontFamily: undefined,
|
|
50
|
+
fontWeight: 700,
|
|
51
|
+
fontSize: rem('18px'),
|
|
52
|
+
lineHeight: rem('24px'),
|
|
53
|
+
letterSpacing: 0,
|
|
54
|
+
},
|
|
55
|
+
body1: {
|
|
56
|
+
fontFamily: undefined,
|
|
57
|
+
fontWeight: 400,
|
|
58
|
+
fontSize: rem('14px'),
|
|
59
|
+
lineHeight: rem('21px'),
|
|
60
|
+
letterSpacing: 0,
|
|
61
|
+
},
|
|
62
|
+
'body1.strong': {
|
|
63
|
+
fontFamily: undefined,
|
|
64
|
+
fontWeight: 500,
|
|
65
|
+
fontSize: rem('14px'),
|
|
66
|
+
lineHeight: rem('21px'),
|
|
67
|
+
letterSpacing: 0,
|
|
68
|
+
},
|
|
69
|
+
'body1.stronger': {
|
|
70
|
+
fontFamily: undefined,
|
|
71
|
+
fontWeight: 600,
|
|
72
|
+
fontSize: rem('14px'),
|
|
73
|
+
lineHeight: rem('21px'),
|
|
74
|
+
letterSpacing: 0,
|
|
75
|
+
},
|
|
76
|
+
caption1: {
|
|
77
|
+
fontFamily: undefined,
|
|
78
|
+
fontWeight: 400,
|
|
79
|
+
fontSize: rem('13px'),
|
|
80
|
+
lineHeight: rem('19.5px'),
|
|
81
|
+
letterSpacing: rem('0.06px'),
|
|
82
|
+
},
|
|
83
|
+
'caption1.strong': {
|
|
84
|
+
fontFamily: undefined,
|
|
85
|
+
fontWeight: 500,
|
|
86
|
+
fontSize: rem('13px'),
|
|
87
|
+
lineHeight: rem('19.5px'),
|
|
88
|
+
letterSpacing: rem('0.06px'),
|
|
89
|
+
},
|
|
90
|
+
'caption1.stronger': {
|
|
91
|
+
fontFamily: undefined,
|
|
92
|
+
fontWeight: 600,
|
|
93
|
+
fontSize: rem('13px'),
|
|
94
|
+
lineHeight: rem('19.5px'),
|
|
95
|
+
letterSpacing: rem('0.06px'),
|
|
96
|
+
},
|
|
97
|
+
caption2: {
|
|
98
|
+
fontFamily: undefined,
|
|
99
|
+
fontWeight: 400,
|
|
100
|
+
fontSize: rem('12px'),
|
|
101
|
+
lineHeight: rem('18px'),
|
|
102
|
+
letterSpacing: rem('0.165px'),
|
|
103
|
+
},
|
|
104
|
+
'caption2.strong': {
|
|
105
|
+
fontFamily: undefined,
|
|
106
|
+
fontWeight: 500,
|
|
107
|
+
fontSize: rem('12px'),
|
|
108
|
+
lineHeight: rem('18px'),
|
|
109
|
+
letterSpacing: rem('0.165px'),
|
|
110
|
+
},
|
|
111
|
+
'caption2.stronger': {
|
|
112
|
+
fontFamily: undefined,
|
|
113
|
+
fontWeight: 600,
|
|
114
|
+
fontSize: rem('12px'),
|
|
115
|
+
lineHeight: rem('18px'),
|
|
116
|
+
letterSpacing: rem('0.165px'),
|
|
117
|
+
},
|
|
118
|
+
caption3: {
|
|
119
|
+
fontFamily: undefined,
|
|
120
|
+
fontWeight: 400,
|
|
121
|
+
fontSize: rem('11px'),
|
|
122
|
+
lineHeight: rem('16.5px'),
|
|
123
|
+
letterSpacing: 0,
|
|
124
|
+
},
|
|
125
|
+
'caption3.strong': {
|
|
126
|
+
fontFamily: undefined,
|
|
127
|
+
fontWeight: 500,
|
|
128
|
+
fontSize: rem('11px'),
|
|
129
|
+
lineHeight: rem('16.5px'),
|
|
130
|
+
letterSpacing: 0,
|
|
131
|
+
},
|
|
132
|
+
'caption3.stronger': {
|
|
133
|
+
fontFamily: undefined,
|
|
134
|
+
fontWeight: 600,
|
|
135
|
+
fontSize: rem('11px'),
|
|
136
|
+
lineHeight: rem('16.5px'),
|
|
137
|
+
letterSpacing: 0,
|
|
138
|
+
},
|
|
139
|
+
smallCaps: {
|
|
140
|
+
fontFamily: undefined,
|
|
141
|
+
fontWeight: 600,
|
|
142
|
+
fontSize: rem('12px'),
|
|
143
|
+
lineHeight: rem('18px'),
|
|
144
|
+
letterSpacing: rem('0.5px'),
|
|
145
|
+
textTransform: 'uppercase',
|
|
146
|
+
},
|
|
147
|
+
monospaced: {
|
|
148
|
+
fontFamily: 'var(--font-family-monospace)',
|
|
149
|
+
fontWeight: 400,
|
|
150
|
+
fontSize: rem('16px'),
|
|
151
|
+
lineHeight: rem('24px'),
|
|
152
|
+
letterSpacing: 0,
|
|
153
|
+
},
|
|
154
|
+
} as const satisfies Record<string, TextStyleDefinition>;
|
|
155
|
+
|
|
156
|
+
export type TextStyleVariant = keyof typeof textStyleVariants;
|
|
157
|
+
|
|
158
|
+
export type HeadingVariant =
|
|
159
|
+
| 'heading1'
|
|
160
|
+
| 'heading2'
|
|
161
|
+
| 'heading3'
|
|
162
|
+
| 'heading4'
|
|
163
|
+
| 'heading5';
|
|
164
|
+
|
|
165
|
+
export type BodyVariant =
|
|
166
|
+
| 'body1'
|
|
167
|
+
| 'body1.strong'
|
|
168
|
+
| 'body1.stronger'
|
|
169
|
+
| 'caption1'
|
|
170
|
+
| 'caption1.strong'
|
|
171
|
+
| 'caption1.stronger'
|
|
172
|
+
| 'caption2'
|
|
173
|
+
| 'caption2.strong'
|
|
174
|
+
| 'caption2.stronger'
|
|
175
|
+
| 'caption3'
|
|
176
|
+
| 'caption3.strong'
|
|
177
|
+
| 'caption3.stronger'
|
|
178
|
+
| 'smallCaps'
|
|
179
|
+
| 'monospaced';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AUTO-GENERATED - DO NOT EDIT
|
|
3
|
+
* Generated from: packages/figma-tokens/source/typography.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { rem } from '@mantine/core';
|
|
7
|
+
|
|
8
|
+
export const figmaFontFamilies = {
|
|
9
|
+
'font-family-sans': 'Inter',
|
|
10
|
+
'font-family-serif': 'Inter',
|
|
11
|
+
'font-family-monospace': 'Menlo',
|
|
12
|
+
'font-family-headings': 'Inter',
|
|
13
|
+
'font-family-body': 'Inter',
|
|
14
|
+
} as const;
|
|
15
|
+
|
|
16
|
+
export const figmaFontSizes = {
|
|
17
|
+
'paragraph-regular': rem('14px'),
|
|
18
|
+
'paragraph-small': rem('13px'),
|
|
19
|
+
'paragraph-mini': rem('12px'),
|
|
20
|
+
monospaced: rem('16px'),
|
|
21
|
+
'paragraph-tiny': rem('11px'),
|
|
22
|
+
h5: rem('18px'),
|
|
23
|
+
h4: rem('20px'),
|
|
24
|
+
h3: rem('24px'),
|
|
25
|
+
h2: rem('28px'),
|
|
26
|
+
h1: rem('48px'),
|
|
27
|
+
} as const;
|
|
28
|
+
|
|
29
|
+
export const figmaLineHeights = {
|
|
30
|
+
'paragraph-regular': rem('21px'),
|
|
31
|
+
'paragraph-small': rem('19.5px'),
|
|
32
|
+
'paragraph-mini': rem('18px'),
|
|
33
|
+
monospaced: rem('24px'),
|
|
34
|
+
'paragraph-tiny': rem('16.5px'),
|
|
35
|
+
h5: rem('24px'),
|
|
36
|
+
h4: rem('24px'),
|
|
37
|
+
h3: rem('28.8px'),
|
|
38
|
+
h2: rem('28px'),
|
|
39
|
+
h1: rem('48px'),
|
|
40
|
+
} as const;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Z-index design tokens. Single source of truth for stacking order.
|
|
3
|
+
* Aligned with Mantine's scale (app, modal, popover, overlay, max) where applicable.
|
|
4
|
+
* Use in TypeScript (inline styles, Mantine props) or via CSS var(--z-index-*).
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export const zIndex = {
|
|
8
|
+
base: 1,
|
|
9
|
+
resizeHandle: 10,
|
|
10
|
+
bulkActionBar: 20,
|
|
11
|
+
app: 100,
|
|
12
|
+
modal: 200,
|
|
13
|
+
dropdownOverlay: 299,
|
|
14
|
+
popover: 300,
|
|
15
|
+
overlay: 400,
|
|
16
|
+
loading: 1000,
|
|
17
|
+
max: 9999,
|
|
18
|
+
} as const;
|
|
19
|
+
|
|
20
|
+
export type ZIndexKey = keyof typeof zIndex;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Returns the CSS var() for a z-index token. Use in vanilla-extract when you need override capability.
|
|
24
|
+
*/
|
|
25
|
+
export function toZIndexVar(key: ZIndexKey): string {
|
|
26
|
+
return `var(--z-index-${key})`;
|
|
27
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mantine Theme Augmentation
|
|
3
|
+
* Extends Mantine's theme types to include custom font weights
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import '@mantine/core';
|
|
7
|
+
|
|
8
|
+
declare module '@mantine/core' {
|
|
9
|
+
export interface MantineThemeOther {
|
|
10
|
+
style?: string;
|
|
11
|
+
fontWeights?: {
|
|
12
|
+
regular: string; // 400
|
|
13
|
+
medium: string; // 500
|
|
14
|
+
semibold: string; // 600
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import '@tanstack/react-table';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Module augmentation for TanStack Table's ColumnMeta interface.
|
|
5
|
+
* This provides type-safe access to custom column metadata across
|
|
6
|
+
* DataTable and SimpleTable components.
|
|
7
|
+
*/
|
|
8
|
+
declare module '@tanstack/react-table' {
|
|
9
|
+
// oxlint-disable-next-line typescript/no-unused-vars
|
|
10
|
+
interface ColumnMeta<TData extends RowData, TValue> {
|
|
11
|
+
/**
|
|
12
|
+
* Text alignment for the column header and cells
|
|
13
|
+
* @default 'left'
|
|
14
|
+
*/
|
|
15
|
+
align?: 'left' | 'right' | 'center';
|
|
16
|
+
/**
|
|
17
|
+
* Pin column to left or right so it stays in view when scrolling.
|
|
18
|
+
* Used by useServerTable to set initialState.columnPinning and by DataTable for sticky styles.
|
|
19
|
+
*/
|
|
20
|
+
pinned?: 'left' | 'right' | null;
|
|
21
|
+
}
|
|
22
|
+
}
|