@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.
Files changed (273) hide show
  1. package/.ai/rules/date-handling.md +39 -0
  2. package/.ai/rules/figma-design-system.md +372 -0
  3. package/.ai/rules/figma-lm-design-system-keys.md +680 -0
  4. package/.ai/rules/file-extensions.md +13 -0
  5. package/.ai/rules/modal-confirmation-mutation.md +56 -0
  6. package/.ai/rules/react-hooks.md +29 -0
  7. package/.ai/rules/styling.md +83 -0
  8. package/AGENTS.md +37 -0
  9. package/README.md +125 -0
  10. package/figma.config.json +9 -0
  11. package/package.json +127 -0
  12. package/scripts/install-ai-rules.mjs +136 -0
  13. package/src/ThemeProvider.tsx +57 -0
  14. package/src/charts.ts +32 -0
  15. package/src/components/ActionCard/ActionCard.css.ts +60 -0
  16. package/src/components/ActionCard/ActionCard.tsx +154 -0
  17. package/src/components/ActionCard/index.ts +2 -0
  18. package/src/components/Anchor/Anchor.tsx +47 -0
  19. package/src/components/Anchor/index.ts +2 -0
  20. package/src/components/AppliedFiltersManagerBar/AppliedFiltersManagerBar.tsx +105 -0
  21. package/src/components/AppliedFiltersManagerBar/FilterBadge.css.ts +23 -0
  22. package/src/components/AppliedFiltersManagerBar/FilterBadge.tsx +50 -0
  23. package/src/components/AppliedFiltersManagerBar/index.ts +5 -0
  24. package/src/components/Badge/Badge.css.ts +72 -0
  25. package/src/components/Badge/Badge.figma.tsx +43 -0
  26. package/src/components/Badge/Badge.tsx +159 -0
  27. package/src/components/Badge/index.ts +2 -0
  28. package/src/components/BreadCrumb/BreadCrumb.tsx +62 -0
  29. package/src/components/BreadCrumb/index.ts +2 -0
  30. package/src/components/BulkActionBar/BulkActionBar.css.ts +26 -0
  31. package/src/components/BulkActionBar/BulkActionBar.tsx +164 -0
  32. package/src/components/BulkActionBar/index.ts +2 -0
  33. package/src/components/Button/Button.css.ts +272 -0
  34. package/src/components/Button/Button.figma.tsx +74 -0
  35. package/src/components/Button/Button.tsx +84 -0
  36. package/src/components/Button/index.ts +2 -0
  37. package/src/components/Charts/ChartTooltip.figma.tsx +33 -0
  38. package/src/components/Charts/ChartTooltip.tsx +101 -0
  39. package/src/components/Charts/MiniBarSparkline.tsx +75 -0
  40. package/src/components/Charts/StackedPatternBarChart.tsx +494 -0
  41. package/src/components/Charts/TrendAreaChart.css.ts +23 -0
  42. package/src/components/Charts/TrendAreaChart.tsx +210 -0
  43. package/src/components/Charts/index.ts +12 -0
  44. package/src/components/CodePanel/CodePanel.css.ts +113 -0
  45. package/src/components/CodePanel/CodePanel.tsx +121 -0
  46. package/src/components/CodePanel/index.ts +2 -0
  47. package/src/components/CommentComposer/CommentComposer.css.ts +60 -0
  48. package/src/components/CommentComposer/CommentComposer.tsx +181 -0
  49. package/src/components/CommentComposer/index.ts +2 -0
  50. package/src/components/ConfirmationModal/ConfirmationModal.tsx +149 -0
  51. package/src/components/ConfirmationModal/index.ts +2 -0
  52. package/src/components/ConfirmationTooltip/ConfirmationTooltip.tsx +132 -0
  53. package/src/components/ConfirmationTooltip/index.ts +2 -0
  54. package/src/components/DataDialog.figma.tsx +33 -0
  55. package/src/components/DataDialog.tsx +46 -0
  56. package/src/components/DataTable/DataTable.tsx +1042 -0
  57. package/src/components/DataTable/RowExpandToggle.tsx +105 -0
  58. package/src/components/DataTable/RowGroupHeader.tsx +190 -0
  59. package/src/components/DataTable/createActionsColumn.tsx +86 -0
  60. package/src/components/DataTable/index.ts +25 -0
  61. package/src/components/DatePicker/CustomRangePicker.tsx +59 -0
  62. package/src/components/DatePicker/DateInput.tsx +329 -0
  63. package/src/components/DatePicker/DateNavigator.tsx +486 -0
  64. package/src/components/DatePicker/DatePicker.tsx +242 -0
  65. package/src/components/DatePicker/MonthlyRangePicker.tsx +231 -0
  66. package/src/components/DatePicker/QuarterlyRangePicker.tsx +224 -0
  67. package/src/components/DatePicker/QuickPicksSidebar.tsx +242 -0
  68. package/src/components/DatePicker/YearlyRangePicker.tsx +171 -0
  69. package/src/components/DatePicker/index.ts +7 -0
  70. package/src/components/DatePicker/types.ts +12 -0
  71. package/src/components/DesignSystemPrimitives/FluidGrid.tsx +44 -0
  72. package/src/components/DesignSystemPrimitives/InteractivePrimitives.tsx +177 -0
  73. package/src/components/DesignSystemPrimitives/LayoutPrimitives.tsx +220 -0
  74. package/src/components/DesignSystemPrimitives/LayoutPrimitives.types.tsx +15 -0
  75. package/src/components/DesignSystemPrimitives/SurfacePrimitives.tsx +46 -0
  76. package/src/components/DesignSystemPrimitives/index.ts +55 -0
  77. package/src/components/Details/Details.css.ts +74 -0
  78. package/src/components/Details/Details.tsx +140 -0
  79. package/src/components/Details/index.ts +2 -0
  80. package/src/components/DownloadCard/DownloadCard.css.ts +22 -0
  81. package/src/components/DownloadCard/DownloadCard.tsx +63 -0
  82. package/src/components/DownloadCard/index.ts +2 -0
  83. package/src/components/Drawer/Drawer.css.ts +32 -0
  84. package/src/components/Drawer/Drawer.tsx +236 -0
  85. package/src/components/Drawer/hooks/useDetailDrawer.ts +61 -0
  86. package/src/components/Drawer/hooks/useDetailDrawerNavigation.ts +125 -0
  87. package/src/components/Drawer/hooks/useDetailDrawerNavigationContext.ts +66 -0
  88. package/src/components/EditableRichText/EditableRichText.css.ts +72 -0
  89. package/src/components/EditableRichText/EditableRichText.tsx +324 -0
  90. package/src/components/EditableRichText/index.ts +2 -0
  91. package/src/components/EditableSelect/EditableSelect.css.ts +62 -0
  92. package/src/components/EditableSelect/EditableSelect.tsx +224 -0
  93. package/src/components/EditableSelect/index.ts +2 -0
  94. package/src/components/EditableText/EditableText.tsx +377 -0
  95. package/src/components/EditableText/index.ts +2 -0
  96. package/src/components/EmptyState/EmptyState.figma.tsx +33 -0
  97. package/src/components/EmptyState/EmptyState.tsx +230 -0
  98. package/src/components/EmptyState/index.ts +2 -0
  99. package/src/components/ErrorBoundary.tsx +135 -0
  100. package/src/components/ErrorState/ErrorState.tsx +197 -0
  101. package/src/components/ErrorState/index.ts +2 -0
  102. package/src/components/FeatureCard.tsx +42 -0
  103. package/src/components/FilterMenu/FilterMenu.figma.tsx +30 -0
  104. package/src/components/FilterMenu/FilterMenu.tsx +198 -0
  105. package/src/components/FilterMenu/FilterSubMenuTypes/BooleanFilterSubmenu.tsx +46 -0
  106. package/src/components/FilterMenu/FilterSubMenuTypes/SearchableFilterSubmenu.tsx +239 -0
  107. package/src/components/FilterMenu/FilterSubMenuTypes/index.ts +8 -0
  108. package/src/components/FilterMenu/defaultFilterSchemas.ts +63 -0
  109. package/src/components/FilterMenu/helpers.ts +115 -0
  110. package/src/components/FilterMenu/index.ts +35 -0
  111. package/src/components/FilterMenu/types.ts +101 -0
  112. package/src/components/IconButton/IconButton.css.ts +272 -0
  113. package/src/components/IconButton/IconButton.figma.tsx +47 -0
  114. package/src/components/IconButton/IconButton.tsx +72 -0
  115. package/src/components/IconButton/README.md +230 -0
  116. package/src/components/IconButton/index.ts +2 -0
  117. package/src/components/InfiniteScrollSentinel.tsx +86 -0
  118. package/src/components/InfiniteScrollTrigger.tsx +78 -0
  119. package/src/components/InfoCard.figma.tsx +47 -0
  120. package/src/components/InfoCard.tsx +216 -0
  121. package/src/components/KbdHint/KbdHint.tsx +23 -0
  122. package/src/components/KbdHint/index.ts +2 -0
  123. package/src/components/LabeledField/LabeledField.tsx +21 -0
  124. package/src/components/LabeledField/index.ts +2 -0
  125. package/src/components/LookupSelect/LookupSelect.css.ts +149 -0
  126. package/src/components/LookupSelect/LookupSelect.tsx +325 -0
  127. package/src/components/LookupSelect/index.ts +2 -0
  128. package/src/components/Menu/Menu.css.ts +89 -0
  129. package/src/components/Menu/Menu.tsx +105 -0
  130. package/src/components/Menu/index.ts +2 -0
  131. package/src/components/MessageBox/MessageBox.tsx +168 -0
  132. package/src/components/MessageBox/index.ts +2 -0
  133. package/src/components/MetricDisplay/MetricDisplay.tsx +55 -0
  134. package/src/components/MetricDisplay/index.ts +1 -0
  135. package/src/components/MultiSelect/MultiSelect.tsx +278 -0
  136. package/src/components/MultiSelect/index.ts +2 -0
  137. package/src/components/Notifications/Notifications.tsx +12 -0
  138. package/src/components/Notifications/README.md +93 -0
  139. package/src/components/Notifications/index.ts +4 -0
  140. package/src/components/Notifications/showToast.tsx +100 -0
  141. package/src/components/PropertyRow/PropertyRow.tsx +96 -0
  142. package/src/components/PropertyRow/index.ts +2 -0
  143. package/src/components/RadioTile/RadioTile.tsx +253 -0
  144. package/src/components/RadioTile/index.ts +2 -0
  145. package/src/components/RichText/FormattingToolbar.css.ts +69 -0
  146. package/src/components/RichText/FormattingToolbar.tsx +112 -0
  147. package/src/components/RichText/RichTextInline.css.ts +54 -0
  148. package/src/components/RichText/RichTextInline.tsx +318 -0
  149. package/src/components/RichText/formattingCommands.ts +181 -0
  150. package/src/components/RichText/formattingTypes.ts +34 -0
  151. package/src/components/RichText/index.ts +49 -0
  152. package/src/components/RichText/richTextExtensions.ts +111 -0
  153. package/src/components/RichText/richTextHelpers.ts +65 -0
  154. package/src/components/RichText/richTextImage.ts +253 -0
  155. package/src/components/RichText/richTextImageHandlers.ts +244 -0
  156. package/src/components/RichText/richTextProse.css.ts +261 -0
  157. package/src/components/RichTextEditor/RichTextEditor.css.ts +82 -0
  158. package/src/components/RichTextEditor/RichTextEditor.tsx +204 -0
  159. package/src/components/RichTextEditor/index.ts +2 -0
  160. package/src/components/RichTextView/RichTextView.css.ts +11 -0
  161. package/src/components/RichTextView/RichTextView.tsx +114 -0
  162. package/src/components/RichTextView/index.ts +2 -0
  163. package/src/components/Schedule/Schedule.tsx +35 -0
  164. package/src/components/SchedulePicker/SchedulePicker.css.ts +42 -0
  165. package/src/components/SchedulePicker/SchedulePicker.tsx +130 -0
  166. package/src/components/SchedulePicker/index.ts +2 -0
  167. package/src/components/SearchableList/types.ts +30 -0
  168. package/src/components/SearchableSubMenu/SearchableSubMenu.css.ts +25 -0
  169. package/src/components/SearchableSubMenu/SearchableSubMenu.tsx +139 -0
  170. package/src/components/SearchableSubMenu/index.ts +2 -0
  171. package/src/components/Select/README.md +114 -0
  172. package/src/components/Select/Select.css.ts +110 -0
  173. package/src/components/Select/Select.tsx +133 -0
  174. package/src/components/Select/index.ts +2 -0
  175. package/src/components/SelectCreatable/SelectCreatable.css.ts +16 -0
  176. package/src/components/SelectCreatable/SelectCreatable.tsx +203 -0
  177. package/src/components/SelectCreatable/index.ts +2 -0
  178. package/src/components/SettingsCard/SettingsCard.tsx +98 -0
  179. package/src/components/SettingsCard/index.ts +2 -0
  180. package/src/components/Sidebar/Sidebar.css.ts +91 -0
  181. package/src/components/Sidebar/Sidebar.tsx +129 -0
  182. package/src/components/Sidebar/index.ts +5 -0
  183. package/src/components/SimpleList/SimpleList.css.ts +12 -0
  184. package/src/components/SimpleList/SimpleList.tsx +44 -0
  185. package/src/components/SimpleList/index.ts +2 -0
  186. package/src/components/SimpleTable/SimpleTable.tsx +296 -0
  187. package/src/components/SimpleTable/index.ts +2 -0
  188. package/src/components/SlashRichTextEditor/SelectionBubbleMenu.css.ts +62 -0
  189. package/src/components/SlashRichTextEditor/SelectionBubbleMenu.tsx +85 -0
  190. package/src/components/SlashRichTextEditor/SlashCommandMenu.css.ts +124 -0
  191. package/src/components/SlashRichTextEditor/SlashCommandMenu.tsx +168 -0
  192. package/src/components/SlashRichTextEditor/SlashRichTextEditor.css.ts +81 -0
  193. package/src/components/SlashRichTextEditor/SlashRichTextEditor.tsx +538 -0
  194. package/src/components/SlashRichTextEditor/SlashSuggestionExtension.ts +48 -0
  195. package/src/components/SlashRichTextEditor/index.ts +13 -0
  196. package/src/components/SlashRichTextEditor/types.ts +48 -0
  197. package/src/components/StatCard/StatCard.css.ts +70 -0
  198. package/src/components/StatCard/StatCard.tsx +201 -0
  199. package/src/components/StatCard/index.ts +1 -0
  200. package/src/components/StatusBadge/StatusBadge.tsx +70 -0
  201. package/src/components/StatusBadge/index.ts +2 -0
  202. package/src/components/StatusIndicator/StatusIndicator.tsx +67 -0
  203. package/src/components/StatusIndicator/index.ts +6 -0
  204. package/src/components/SubNavigation/SubNavigation.css.ts +72 -0
  205. package/src/components/SubNavigation/SubNavigation.tsx +104 -0
  206. package/src/components/SubNavigation/index.ts +2 -0
  207. package/src/components/SuspenseLoader.tsx +22 -0
  208. package/src/components/Table/SortableColumnHeader.tsx +99 -0
  209. package/src/components/Table/TableSkeletonRows.figma.tsx +22 -0
  210. package/src/components/Table/TableSkeletonRows.tsx +113 -0
  211. package/src/components/Table/index.ts +9 -0
  212. package/src/components/TableActionsMenu.tsx +58 -0
  213. package/src/components/TableCard.tsx +29 -0
  214. package/src/components/TableContainer/TableContainer.tsx +86 -0
  215. package/src/components/TableContainer/index.ts +2 -0
  216. package/src/components/TableControlBar/TableControlBar.tsx +156 -0
  217. package/src/components/TableControlBar/TableSelectionButton.tsx +57 -0
  218. package/src/components/TableControlBar/index.ts +13 -0
  219. package/src/components/TableControlBar/useTableControlBar.tsx +314 -0
  220. package/src/components/TableSelection/TableSelection.tsx +43 -0
  221. package/src/components/TableSelection/index.ts +5 -0
  222. package/src/components/Tabs/README.md +76 -0
  223. package/src/components/Tabs/Tabs.css.ts +54 -0
  224. package/src/components/Tabs/Tabs.figma.tsx +47 -0
  225. package/src/components/Tabs/Tabs.tsx +96 -0
  226. package/src/components/Tabs/index.ts +8 -0
  227. package/src/components/TextInput/README.md +98 -0
  228. package/src/components/TextInput/SearchTextInput.figma.tsx +22 -0
  229. package/src/components/TextInput/SearchTextInput.tsx +150 -0
  230. package/src/components/TextInput/TextInput.figma.tsx +44 -0
  231. package/src/components/TextInput/TextInput.tsx +42 -0
  232. package/src/components/TextInput/index.ts +4 -0
  233. package/src/components/ThemeSwitcher.figma.tsx +28 -0
  234. package/src/components/ThemeSwitcher.tsx +69 -0
  235. package/src/components/TrendBadge/TrendBadge.tsx +76 -0
  236. package/src/components/TrendBadge/index.ts +2 -0
  237. package/src/components/TruncatedText.tsx +115 -0
  238. package/src/components/Typography/Text.tsx +74 -0
  239. package/src/components/Typography/Title.tsx +100 -0
  240. package/src/components/Typography/index.ts +4 -0
  241. package/src/geist-fonts.ts +48 -0
  242. package/src/hooks/index.ts +31 -0
  243. package/src/hooks/useFilters.ts +152 -0
  244. package/src/hooks/useInfiniteScroll.ts +62 -0
  245. package/src/hooks/usePlatform.ts +33 -0
  246. package/src/hooks/useServerTable.ts +495 -0
  247. package/src/hooks/useTableSelection.ts +102 -0
  248. package/src/hooks/useTableSort.ts +259 -0
  249. package/src/index.ts +483 -0
  250. package/src/mantine.ts +25 -0
  251. package/src/theme/mantineVars.ts +12 -0
  252. package/src/theme/themeContract.css.ts +131 -0
  253. package/src/theme/themeVars.ts +31 -0
  254. package/src/theme.ts +168 -0
  255. package/src/tokens/color-types.ts +107 -0
  256. package/src/tokens/colors.ts +243 -0
  257. package/src/tokens/index.ts +14 -0
  258. package/src/tokens/radius.ts +17 -0
  259. package/src/tokens/semantic-colors.ts +224 -0
  260. package/src/tokens/semantic-tokens-css.ts +53 -0
  261. package/src/tokens/shadows.ts +11 -0
  262. package/src/tokens/spacing.ts +20 -0
  263. package/src/tokens/text-styles.ts +179 -0
  264. package/src/tokens/typography.ts +40 -0
  265. package/src/tokens/zIndex.ts +27 -0
  266. package/src/types/mantine-theme.d.ts +17 -0
  267. package/src/types/tanstack-table.d.ts +22 -0
  268. package/src/utils/avatar.ts +150 -0
  269. package/src/utils/chartHelpers.ts +53 -0
  270. package/src/utils/color-props.ts +77 -0
  271. package/src/utils/createDesignComponent.tsx +104 -0
  272. package/src/utils/nestFlatRows.ts +111 -0
  273. package/src/utils/withStaticComponents.ts +6 -0
package/src/theme.ts ADDED
@@ -0,0 +1,168 @@
1
+ import {
2
+ ActionIcon,
3
+ Card,
4
+ Container,
5
+ createTheme,
6
+ Modal,
7
+ Paper,
8
+ rem,
9
+ Select,
10
+ type MantineThemeOverride,
11
+ } from '@mantine/core';
12
+
13
+ import {
14
+ figmaColors,
15
+ figmaFontFamilies,
16
+ figmaFontSizes,
17
+ figmaLineHeights,
18
+ figmaRadius,
19
+ figmaShadows,
20
+ figmaSpacing,
21
+ textStyleVariants,
22
+ zIndex,
23
+ } from './tokens';
24
+
25
+ const CONTAINER_SIZES: Record<string, string> = {
26
+ xxs: rem('200px'),
27
+ xs: rem('300px'),
28
+ sm: rem('400px'),
29
+ md: rem('500px'),
30
+ lg: rem('600px'),
31
+ xl: rem('1400px'),
32
+ xxl: rem('1600px'),
33
+ };
34
+
35
+ /** ActionIcon/IconButton size → same height as Button for that size (aligns sm IconButton with sm Button) */
36
+ const ICON_BUTTON_SIZES: Record<string, string> = {
37
+ xs: rem('30px'),
38
+ sm: rem('36px'),
39
+ md: rem('42px'),
40
+ lg: rem('50px'),
41
+ xl: rem('60px'),
42
+ };
43
+
44
+ export const mantineTheme: MantineThemeOverride = createTheme({
45
+ /** Put your mantine theme override here */
46
+ colors: {
47
+ ...figmaColors, // Color palettes synced from Figma
48
+ },
49
+ fontFamily: `"${figmaFontFamilies['font-family-body']}", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif`,
50
+ fontFamilyMonospace: `"${figmaFontFamilies['font-family-monospace']}", "Courier New", monospace`,
51
+ headings: {
52
+ fontFamily: `"${figmaFontFamilies['font-family-headings']}", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif`,
53
+ sizes: {
54
+ h1: { fontSize: figmaFontSizes.h1, lineHeight: figmaLineHeights.h1 },
55
+ h2: { fontSize: figmaFontSizes.h2, lineHeight: figmaLineHeights.h2 },
56
+ h3: { fontSize: figmaFontSizes.h3, lineHeight: figmaLineHeights.h3 },
57
+ h4: { fontSize: figmaFontSizes.h4, lineHeight: figmaLineHeights.h4 },
58
+ h5: { fontSize: figmaFontSizes.h4, lineHeight: figmaLineHeights.h4 }, // Fallback to h4
59
+ h6: { fontSize: figmaFontSizes.h4, lineHeight: figmaLineHeights.h4 }, // Fallback to h4
60
+ },
61
+ },
62
+ breakpoints: {
63
+ xxs: '20em',
64
+ xs: '30em',
65
+ sm: '48em',
66
+ md: '64em',
67
+ lg: '72em',
68
+ xl: '80em',
69
+ xxl: '90em',
70
+ '2xl': '100em',
71
+ },
72
+ fontSizes: {
73
+ // Figma paragraph tokens
74
+ xs: figmaFontSizes['paragraph-mini'], // 12px
75
+ sm: figmaFontSizes['paragraph-small'], // 14px
76
+ md: figmaFontSizes['paragraph-regular'], // 16px
77
+ lg: rem('18px'),
78
+ xl: figmaFontSizes.h4, // 20px
79
+ '2xl': figmaFontSizes.h3, // 24px
80
+ '3xl': figmaFontSizes.h2, // 30px
81
+ '4xl': rem('36px'),
82
+ '5xl': figmaFontSizes.h1, // 48px
83
+ },
84
+ spacing: {
85
+ ...figmaSpacing, // Spacing synced from Figma
86
+ // Additional spacing values
87
+ sm: rem('12px'),
88
+ },
89
+ radius: {
90
+ ...figmaRadius, // Border radius synced from Figma
91
+ },
92
+ shadows: {
93
+ ...figmaShadows, // Shadows synced from Figma
94
+ },
95
+ primaryColor: 'primary',
96
+ other: {
97
+ style: 'mantine',
98
+ zIndex: {
99
+ app: zIndex.app,
100
+ modal: zIndex.modal,
101
+ popover: zIndex.popover,
102
+ overlay: zIndex.overlay,
103
+ max: zIndex.max,
104
+ },
105
+ },
106
+ components: {
107
+ /** Put your mantine component override here */
108
+ Container: Container.extend({
109
+ vars: (_, { size, fluid }) => ({
110
+ root: {
111
+ '--container-size': fluid
112
+ ? '100%'
113
+ : size !== undefined && size in CONTAINER_SIZES
114
+ ? CONTAINER_SIZES[size]
115
+ : rem(size),
116
+ },
117
+ }),
118
+ }),
119
+ Paper: Paper.extend({
120
+ defaultProps: {
121
+ p: 'md',
122
+ shadow: 'xl',
123
+ radius: 'md',
124
+ withBorder: true,
125
+ },
126
+ }),
127
+
128
+ Card: Card.extend({
129
+ defaultProps: {
130
+ p: 'xl',
131
+ shadow: 'xl',
132
+ radius: 'var(--radius-default)',
133
+ withBorder: true,
134
+ },
135
+ }),
136
+ Select: Select.extend({
137
+ defaultProps: {
138
+ checkIconPosition: 'right',
139
+ },
140
+ }),
141
+ ActionIcon: ActionIcon.extend({
142
+ vars: (_, { size }) => ({
143
+ root: {
144
+ '--ai-size':
145
+ size !== undefined && size in ICON_BUTTON_SIZES
146
+ ? ICON_BUTTON_SIZES[size as keyof typeof ICON_BUTTON_SIZES]
147
+ : undefined,
148
+ },
149
+ }),
150
+ }),
151
+ // Mantine renders `Modal` titles inside an `<h2>` and styles them with its
152
+ // own defaults. Project the design-system `heading4` token onto every
153
+ // modal title so dialogs across the app share a single, consistent header
154
+ // typography (and so consumers don't need to nest a `<Title variant="…">`
155
+ // element, which would produce invalid `<h2><h4>…</h4></h2>` markup that
156
+ // React 19 surfaces as a `validateDOMNesting` error).
157
+ Modal: Modal.extend({
158
+ styles: {
159
+ title: {
160
+ fontWeight: textStyleVariants.heading4.fontWeight,
161
+ fontSize: textStyleVariants.heading4.fontSize,
162
+ lineHeight: textStyleVariants.heading4.lineHeight,
163
+ letterSpacing: textStyleVariants.heading4.letterSpacing,
164
+ },
165
+ },
166
+ }),
167
+ },
168
+ });
@@ -0,0 +1,107 @@
1
+ /**
2
+ * AUTO-GENERATED - DO NOT EDIT
3
+ * Generated from: packages/figma-tokens/source/semantic-colors.json
4
+ *
5
+ * Typed color token unions grouped by their intended usage.
6
+ * Use these types to restrict color props to only valid tokens.
7
+ */
8
+
9
+ /** Text/foreground color tokens (for the `c` prop on text elements) */
10
+ export type TextColor =
11
+ | 'text.title'
12
+ | 'text.danger.default'
13
+ | 'text.link'
14
+ | 'text.default'
15
+ | 'text.disabled.default'
16
+ | 'text.subdued.default'
17
+ | 'text.primary.default'
18
+ | 'text.primary.light'
19
+ | 'text.warning.default'
20
+ | 'text.success.default'
21
+ | 'text.danger.disabled'
22
+ | 'text.information.default'
23
+ | 'text.danger.strong'
24
+ | 'text.warning.strong'
25
+ | 'text.success.strong'
26
+ | 'text.information.strong'
27
+ | 'text.subdued.strong'
28
+ | 'text.inverse';
29
+
30
+ /** Background color tokens (for the `bg` prop) */
31
+ export type BackgroundColor =
32
+ | 'background.default'
33
+ | 'background.default-hover'
34
+ | 'background.body'
35
+ | 'background.disabled.default'
36
+ | 'background.transparent'
37
+ | 'background.primary.filled'
38
+ | 'background.primary.filled-hover'
39
+ | 'background.warning.filled'
40
+ | 'background.success.filled'
41
+ | 'background.subdued.light'
42
+ | 'background.subdued.ultralight'
43
+ | 'background.danger.filled'
44
+ | 'background.subdued.filled'
45
+ | 'background.warning.filled-hover'
46
+ | 'background.success.filled-hover'
47
+ | 'background.danger.filled-hover'
48
+ | 'background.subdued.filled-hover'
49
+ | 'background.danger.light'
50
+ | 'background.primary.light'
51
+ | 'background.warning.light'
52
+ | 'background.success.light'
53
+ | 'background.primary.light-hover'
54
+ | 'background.warning.light-hover'
55
+ | 'background.success.light-hover'
56
+ | 'background.danger.light-hover'
57
+ | 'background.subdued.light-hover'
58
+ | 'background.information.filled'
59
+ | 'background.information.filled-hover'
60
+ | 'background.information.light'
61
+ | 'background.information.light-hover'
62
+ | 'background.inverse.filled'
63
+ | 'background.inverse.filled-hover'
64
+ | 'background.input'
65
+ | 'background.backdrop';
66
+
67
+ /** Stroke/border color tokens (for borders and dividers) */
68
+ export type StrokeColor =
69
+ | 'stroke.default'
70
+ | 'stroke.light'
71
+ | 'stroke.primary.default'
72
+ | 'stroke.success.default'
73
+ | 'stroke.danger.default'
74
+ | 'stroke.subdued.strong'
75
+ | 'stroke.warning.default'
76
+ | 'stroke.information.default'
77
+ | 'stroke.focus.default'
78
+ | 'stroke.inverse'
79
+ | 'stroke.subdued.default'
80
+ | 'stroke.strong'
81
+ | 'stroke.icon'
82
+ | 'stroke.focus.strong';
83
+
84
+ /** Icon color tokens (for icon fill colors) */
85
+ export type IconColor =
86
+ | 'icon.light'
87
+ | 'icon.danger.default'
88
+ | 'icon.danger.disabled'
89
+ | 'icon.warning.default'
90
+ | 'icon.warning.strong'
91
+ | 'icon.danger.strong'
92
+ | 'icon.information.default'
93
+ | 'icon.information.strong'
94
+ | 'icon.success.default'
95
+ | 'icon.success.strong'
96
+ | 'icon.default'
97
+ | 'icon.inverse'
98
+ | 'icon.primary.default'
99
+ | 'icon.primary.strong'
100
+ | 'icon.medium';
101
+
102
+ /** Any semantic color token */
103
+ export type SemanticColor =
104
+ | TextColor
105
+ | BackgroundColor
106
+ | StrokeColor
107
+ | IconColor;
@@ -0,0 +1,243 @@
1
+ /**
2
+ * Color primitives synced from Figma Design System (VCLfybgU3OaUUPrQdBaVmP).
3
+ * Figma source of truth: Primitives collection.
4
+ */
5
+
6
+ import type { MantineColorsTuple } from '@mantine/core';
7
+
8
+ export const white = '#ffffff';
9
+ export const black = '#000000';
10
+
11
+ export const green: MantineColorsTuple = [
12
+ '#edf7f3',
13
+ '#d5f0e5',
14
+ '#c1e8d7',
15
+ '#b3d9cc',
16
+ '#80c4a8',
17
+ '#4d9b7f',
18
+ '#3a8068',
19
+ '#046548',
20
+ '#017854',
21
+ '#005a3e',
22
+ ];
23
+
24
+ export const blue: MantineColorsTuple = [
25
+ '#e7f5ff',
26
+ '#d0ebff',
27
+ '#a5d8ff',
28
+ '#74c0fc',
29
+ '#4dabf7',
30
+ '#339af0',
31
+ '#228be6',
32
+ '#1c7ed6',
33
+ '#1971c2',
34
+ '#1864ab',
35
+ ];
36
+
37
+ export const red: MantineColorsTuple = [
38
+ '#fff5f5',
39
+ '#ffe3e3',
40
+ '#ffc9c9',
41
+ '#ffa8a8',
42
+ '#ff8787',
43
+ '#ff6b6b',
44
+ '#fa5252',
45
+ '#f03e3e',
46
+ '#e03131',
47
+ '#c92a2a',
48
+ ];
49
+
50
+ export const redAlpha = {
51
+ '10': 'rgba(250, 82, 82, 0.10)',
52
+ '12': 'rgba(250, 82, 82, 0.12)',
53
+ '15': 'rgba(250, 82, 82, 0.15)',
54
+ '20': 'rgba(250, 82, 82, 0.20)',
55
+ '50': 'rgba(224, 49, 49, 0.50)',
56
+ } as const;
57
+
58
+ export const gray: MantineColorsTuple = [
59
+ '#f9fafb',
60
+ '#f3f4f6',
61
+ '#e5e7eb',
62
+ '#d1d5db',
63
+ '#9ca3af',
64
+ '#6b7280',
65
+ '#4b5563',
66
+ '#374151',
67
+ '#1f2937',
68
+ '#111827',
69
+ ];
70
+
71
+ export const grayAlpha = {
72
+ '9-60': 'rgba(17, 24, 39, 0.60)',
73
+ } as const;
74
+
75
+ export const dark: MantineColorsTuple = [
76
+ '#c9c9c9',
77
+ '#b8b8b8',
78
+ '#828282',
79
+ '#696969',
80
+ '#424242',
81
+ '#3b3b3b',
82
+ '#2e2e2e',
83
+ '#242424',
84
+ '#1f1f1f',
85
+ '#141414',
86
+ ];
87
+
88
+ export const primary: MantineColorsTuple = [
89
+ '#edf7f3',
90
+ '#d5f0e5',
91
+ '#c1e8d7',
92
+ '#b3d9cc',
93
+ '#80c4a8',
94
+ '#4d9b7f',
95
+ '#3a8068',
96
+ '#046548',
97
+ '#017854',
98
+ '#005a3e',
99
+ ];
100
+
101
+ export const teal: MantineColorsTuple = [
102
+ '#e6fcf5',
103
+ '#c3fae8',
104
+ '#96f2d7',
105
+ '#63e6be',
106
+ '#38d9a9',
107
+ '#20c997',
108
+ '#12b886',
109
+ '#0ca678',
110
+ '#099268',
111
+ '#087f5b',
112
+ ];
113
+
114
+ export const tealAlpha = {
115
+ '10': 'rgba(18, 184, 134, 0.10)',
116
+ '12': 'rgba(18, 184, 134, 0.12)',
117
+ '15': 'rgba(18, 184, 134, 0.15)',
118
+ '20': 'rgba(18, 184, 134, 0.20)',
119
+ } as const;
120
+
121
+ export const yellow: MantineColorsTuple = [
122
+ '#fff9db',
123
+ '#fff3bf',
124
+ '#ffec99',
125
+ '#ffe066',
126
+ '#ffd43b',
127
+ '#fcc419',
128
+ '#fab005',
129
+ '#f59f00',
130
+ '#f08c00',
131
+ '#e67700',
132
+ ];
133
+
134
+ export const yellowAlpha = {
135
+ '10': 'rgba(250, 176, 5, 0.10)',
136
+ '12': 'rgba(250, 176, 5, 0.12)',
137
+ '15': 'rgba(250, 176, 5, 0.15)',
138
+ '20': 'rgba(250, 176, 5, 0.20)',
139
+ } as const;
140
+
141
+ export const violet: MantineColorsTuple = [
142
+ '#f3f0ff',
143
+ '#e5dbff',
144
+ '#d0bfff',
145
+ '#b197fc',
146
+ '#9775fa',
147
+ '#845ef7',
148
+ '#7950f2',
149
+ '#7048e8',
150
+ '#6741d9',
151
+ '#5f3dc4',
152
+ ];
153
+
154
+ export const grape: MantineColorsTuple = [
155
+ '#f8f0fc',
156
+ '#f3d9fa',
157
+ '#eebefa',
158
+ '#e599f7',
159
+ '#da77f2',
160
+ '#cc5de8',
161
+ '#be4bdb',
162
+ '#ae3ec9',
163
+ '#9c36b5',
164
+ '#862e9c',
165
+ ];
166
+
167
+ export const cyan: MantineColorsTuple = [
168
+ '#e3fafc',
169
+ '#c5f6fa',
170
+ '#99e9f2',
171
+ '#66d9e8',
172
+ '#3bc9db',
173
+ '#22b8cf',
174
+ '#15aabf',
175
+ '#1098ad',
176
+ '#0c8599',
177
+ '#0b7285',
178
+ ];
179
+
180
+ export const orange: MantineColorsTuple = [
181
+ '#fff4e6',
182
+ '#ffe8cc',
183
+ '#ffd8a8',
184
+ '#ffc078',
185
+ '#ffa94d',
186
+ '#ff922b',
187
+ '#fd7e14',
188
+ '#f76707',
189
+ '#e8590c',
190
+ '#d9480f',
191
+ ];
192
+
193
+ export const indigo: MantineColorsTuple = [
194
+ '#edf2ff',
195
+ '#dbe4ff',
196
+ '#bac8ff',
197
+ '#91a7ff',
198
+ '#748ffc',
199
+ '#5c7cfa',
200
+ '#4c6ef5',
201
+ '#4263eb',
202
+ '#3b5bdb',
203
+ '#364fc7',
204
+ ];
205
+
206
+ export const indigoAlpha = {
207
+ '10': 'rgba(76, 110, 245, 0.10)',
208
+ '12': 'rgba(76, 110, 245, 0.12)',
209
+ '15': 'rgba(76, 110, 245, 0.15)',
210
+ '20': 'rgba(76, 110, 245, 0.20)',
211
+ } as const;
212
+
213
+ export const pink: MantineColorsTuple = [
214
+ '#fff0f6',
215
+ '#ffdeeb',
216
+ '#fcc2d7',
217
+ '#faa2c1',
218
+ '#f783ac',
219
+ '#f06595',
220
+ '#e64980',
221
+ '#d6336c',
222
+ '#c2255c',
223
+ '#a61e4d',
224
+ ];
225
+
226
+ export const transparent = 'rgba(255, 255, 255, 0)';
227
+
228
+ export const figmaColors = {
229
+ green,
230
+ blue,
231
+ red,
232
+ gray,
233
+ dark,
234
+ primary,
235
+ teal,
236
+ yellow,
237
+ violet,
238
+ grape,
239
+ cyan,
240
+ orange,
241
+ indigo,
242
+ pink,
243
+ } as const;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * AUTO-GENERATED - DO NOT EDIT
3
+ * Figma Design Tokens
4
+ */
5
+
6
+ export * from './colors';
7
+ export * from './spacing';
8
+ export * from './radius';
9
+ export * from './shadows';
10
+ export * from './typography';
11
+ export * from './text-styles';
12
+ export * from './semantic-colors';
13
+ export * from './color-types';
14
+ export { zIndex, toZIndexVar, type ZIndexKey } from './zIndex';
@@ -0,0 +1,17 @@
1
+ /**
2
+ * AUTO-GENERATED - DO NOT EDIT
3
+ * Generated from: packages/figma-tokens/source/border-radius.json
4
+ */
5
+
6
+ import { rem } from '@mantine/core';
7
+
8
+ export const figmaRadius = {
9
+ xs: rem('2px'),
10
+ sm: rem('4px'),
11
+ md: rem('6px'),
12
+ lg: rem('8px'),
13
+ xl: rem('12px'),
14
+ '2xl': rem('16px'),
15
+ '3xl': rem('24px'),
16
+ full: '9999px',
17
+ } as const;