@ponti-studios/ui 2.0.1 → 3.0.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 (319) hide show
  1. package/README.md +36 -3
  2. package/dist/auth/index.d.ts +3 -0
  3. package/dist/auth/index.js +3 -0
  4. package/dist/components/data-display/accordion.d.ts +10 -0
  5. package/dist/components/data-display/accordion.js +53 -0
  6. package/{src/components/data-display/index.ts → dist/components/data-display/index.d.ts} +1 -10
  7. package/dist/components/data-display/index.js +8 -0
  8. package/dist/components/data-display/metric-card.d.ts +9 -0
  9. package/dist/components/data-display/metric-card.js +25 -0
  10. package/dist/components/data-display/sort-controls.d.ts +13 -0
  11. package/dist/components/data-display/sort-controls.js +57 -0
  12. package/dist/components/data-display/sort-row.d.ts +10 -0
  13. package/dist/components/data-display/sort-row.js +52 -0
  14. package/dist/components/data-display/table.d.ts +10 -0
  15. package/dist/components/data-display/table.js +57 -0
  16. package/dist/components/feedback/alert.d.ts +9 -0
  17. package/dist/components/feedback/alert.js +38 -0
  18. package/dist/components/feedback/empty-state.d.ts +18 -0
  19. package/dist/components/feedback/empty-state.js +36 -0
  20. package/{src/components/feedback/index.ts → dist/components/feedback/index.d.ts} +2 -0
  21. package/dist/components/feedback/index.js +7 -0
  22. package/dist/components/feedback/progress.d.ts +6 -0
  23. package/dist/components/feedback/progress.js +25 -0
  24. package/dist/components/feedback/skeleton.d.ts +2 -0
  25. package/dist/components/feedback/skeleton.js +11 -0
  26. package/dist/components/feedback/spinner.d.ts +14 -0
  27. package/dist/components/feedback/spinner.js +27 -0
  28. package/dist/components/feedback/update-guard.d.ts +13 -0
  29. package/dist/components/feedback/update-guard.js +38 -0
  30. package/dist/components/filters/active-filters-bar.d.ts +14 -0
  31. package/dist/components/filters/active-filters-bar.js +44 -0
  32. package/dist/components/filters/filter-chip.d.ts +11 -0
  33. package/dist/components/filters/filter-chip.js +33 -0
  34. package/dist/components/filters/filter-select.d.ts +17 -0
  35. package/dist/components/filters/filter-select.js +46 -0
  36. package/dist/components/filters/index.js +4 -0
  37. package/dist/components/forms/checkbox.d.ts +4 -0
  38. package/dist/components/forms/checkbox.js +24 -0
  39. package/dist/components/forms/date-month-select.d.ts +11 -0
  40. package/dist/components/forms/date-month-select.js +47 -0
  41. package/dist/components/forms/date-picker.d.ts +60 -0
  42. package/dist/components/forms/date-picker.js +193 -0
  43. package/dist/components/forms/date-utils.d.ts +14 -0
  44. package/dist/components/forms/date-utils.js +18 -0
  45. package/dist/components/forms/drop-zone.d.ts +42 -0
  46. package/dist/components/forms/drop-zone.js +184 -0
  47. package/{src/components/forms/index.ts → dist/components/forms/index.d.ts} +3 -9
  48. package/dist/components/forms/index.js +17 -0
  49. package/dist/components/forms/input.d.ts +3 -0
  50. package/dist/components/forms/input.js +15 -0
  51. package/dist/components/forms/label.d.ts +3 -0
  52. package/dist/components/forms/label.js +14 -0
  53. package/dist/components/forms/passkey-management.d.ts +14 -0
  54. package/dist/components/forms/passkey-management.js +132 -0
  55. package/dist/components/forms/radio-group.d.ts +6 -0
  56. package/dist/components/forms/radio-group.js +28 -0
  57. package/dist/components/forms/select.d.ts +18 -0
  58. package/dist/components/forms/select.js +103 -0
  59. package/dist/components/forms/slider.d.ts +9 -0
  60. package/dist/components/forms/slider.js +25 -0
  61. package/dist/components/forms/stepper.d.ts +15 -0
  62. package/dist/components/forms/stepper.js +41 -0
  63. package/dist/components/forms/switch.d.ts +6 -0
  64. package/dist/components/forms/switch.js +21 -0
  65. package/dist/components/forms/text-field.d.ts +15 -0
  66. package/dist/components/forms/text-field.js +46 -0
  67. package/dist/components/forms/text-field.types.d.ts +8 -0
  68. package/dist/components/forms/textarea.d.ts +3 -0
  69. package/dist/components/forms/textarea.js +14 -0
  70. package/dist/components/layout/index.js +5 -0
  71. package/dist/components/layout/particle-background.d.ts +19 -0
  72. package/dist/components/layout/particle-background.js +171 -0
  73. package/dist/components/layout/scroll-area.d.ts +9 -0
  74. package/dist/components/layout/scroll-area.js +35 -0
  75. package/dist/components/layout/section-intro.d.ts +12 -0
  76. package/dist/components/layout/section-intro.js +28 -0
  77. package/dist/components/layout/surface-panel.d.ts +7 -0
  78. package/dist/components/layout/surface-panel.js +11 -0
  79. package/dist/components/navigation/app-navigation.d.ts +67 -0
  80. package/dist/components/navigation/app-navigation.js +106 -0
  81. package/{src/components/navigation/index.ts → dist/components/navigation/index.d.ts} +1 -7
  82. package/dist/components/navigation/index.js +4 -0
  83. package/dist/components/navigation/pagination-controls.d.ts +7 -0
  84. package/dist/components/navigation/pagination-controls.js +50 -0
  85. package/dist/components/navigation/tabs.d.ts +7 -0
  86. package/dist/components/navigation/tabs.js +35 -0
  87. package/dist/components/overlays/bottom-sheet.d.ts +20 -0
  88. package/dist/components/overlays/bottom-sheet.js +101 -0
  89. package/dist/components/overlays/command.d.ts +29 -0
  90. package/dist/components/overlays/command.js +123 -0
  91. package/dist/components/overlays/dialog.d.ts +30 -0
  92. package/dist/components/overlays/dialog.js +105 -0
  93. package/dist/components/overlays/dropdown-menu.d.ts +29 -0
  94. package/dist/components/overlays/dropdown-menu.js +128 -0
  95. package/dist/components/overlays/index.d.ts +7 -0
  96. package/dist/components/overlays/index.js +8 -0
  97. package/dist/components/overlays/popover.d.ts +14 -0
  98. package/dist/components/overlays/popover.js +56 -0
  99. package/dist/components/overlays/sheet.d.ts +27 -0
  100. package/dist/components/overlays/sheet.js +81 -0
  101. package/dist/components/overlays/tooltip.d.ts +10 -0
  102. package/dist/components/overlays/tooltip.js +23 -0
  103. package/dist/components/primitives/avatar.d.ts +14 -0
  104. package/dist/components/primitives/avatar.js +72 -0
  105. package/dist/components/primitives/badge.d.ts +7 -0
  106. package/dist/components/primitives/badge.js +27 -0
  107. package/dist/components/primitives/button.d.ts +13 -0
  108. package/dist/components/primitives/button.js +113 -0
  109. package/{src/components/primitives/button.types.ts → dist/components/primitives/button.types.d.ts} +4 -6
  110. package/dist/components/primitives/card.d.ts +9 -0
  111. package/dist/components/primitives/card.js +56 -0
  112. package/{src/components/primitives/index.ts → dist/components/primitives/index.d.ts} +1 -9
  113. package/dist/components/primitives/index.js +7 -0
  114. package/dist/components/primitives/segmented-control.d.ts +20 -0
  115. package/dist/components/primitives/segmented-control.js +27 -0
  116. package/dist/components/primitives/separator.d.ts +4 -0
  117. package/dist/components/primitives/separator.js +16 -0
  118. package/dist/constants/chart-colors.d.ts +33 -0
  119. package/dist/constants/chart-colors.js +31 -0
  120. package/dist/hooks/index.js +9 -0
  121. package/{src/hooks/sort.types.ts → dist/hooks/sort.types.d.ts} +2 -4
  122. package/dist/hooks/use-api-client.d.ts +30 -0
  123. package/dist/hooks/use-api-client.js +106 -0
  124. package/dist/hooks/use-debounced-value.d.ts +1 -0
  125. package/dist/hooks/use-debounced-value.js +12 -0
  126. package/dist/hooks/use-derived-filter-state.d.ts +20 -0
  127. package/dist/hooks/use-derived-filter-state.js +39 -0
  128. package/dist/hooks/use-filter-state.d.ts +12 -0
  129. package/dist/hooks/use-filter-state.js +37 -0
  130. package/dist/hooks/use-media-query.d.ts +6 -0
  131. package/dist/hooks/use-media-query.js +27 -0
  132. package/dist/hooks/use-mobile.d.ts +1 -0
  133. package/dist/hooks/use-mobile.js +14 -0
  134. package/dist/hooks/use-sort.d.ts +11 -0
  135. package/dist/hooks/use-sort.js +14 -0
  136. package/{src/index.ts → dist/index.d.ts} +4 -32
  137. package/dist/index.js +15 -0
  138. package/dist/integrations/service-worker.d.ts +2 -0
  139. package/dist/integrations/service-worker.js +2 -0
  140. package/dist/lib/auth.d.ts +2 -0
  141. package/dist/lib/auth.js +7 -0
  142. package/dist/lib/clipboard.d.ts +1 -0
  143. package/dist/lib/clipboard.js +10 -0
  144. package/dist/lib/index.js +4 -0
  145. package/{src/lib/slot.tsx → dist/lib/slot.d.ts} +2 -15
  146. package/dist/lib/slot.js +14 -0
  147. package/dist/lib/utils.d.ts +2 -0
  148. package/dist/lib/utils.js +8 -0
  149. package/dist/native/components.d.ts +41 -0
  150. package/dist/native/components.js +135 -0
  151. package/dist/native/index.js +3 -0
  152. package/dist/native/theme.d.ts +19 -0
  153. package/dist/native/theme.js +58 -0
  154. package/dist/styles/tokens/css-vars.d.ts +7 -0
  155. package/dist/styles/tokens/css-vars.js +5 -0
  156. package/dist/styles/tokens/generated/dark.colors.generated.d.ts +40 -0
  157. package/dist/styles/tokens/generated/dark.colors.generated.js +39 -0
  158. package/dist/styles/tokens/generated/foundations.generated.d.ts +323 -0
  159. package/dist/styles/tokens/generated/foundations.generated.js +453 -0
  160. package/dist/styles/tokens/generated/light.colors.generated.d.ts +40 -0
  161. package/dist/styles/tokens/generated/light.colors.generated.js +39 -0
  162. package/dist/styles/tokens/index.d.ts +317 -0
  163. package/dist/styles/tokens/index.js +14 -0
  164. package/dist/styles.css +1 -1
  165. package/dist/translations/en.d.ts +34 -0
  166. package/dist/translations/index.d.ts +39 -0
  167. package/dist/translations/ui-provider.d.ts +9 -0
  168. package/dist/translations/ui-provider.js +16 -0
  169. package/dist/types/upload.d.ts +36 -0
  170. package/package.json +50 -33
  171. package/src/components/data-display/accordion.stories.tsx +0 -57
  172. package/src/components/data-display/accordion.tsx +0 -86
  173. package/src/components/data-display/metric-card.stories.tsx +0 -48
  174. package/src/components/data-display/metric-card.tsx +0 -20
  175. package/src/components/data-display/sort-controls.stories.tsx +0 -45
  176. package/src/components/data-display/sort-controls.tsx +0 -96
  177. package/src/components/data-display/sort-row.tsx +0 -88
  178. package/src/components/data-display/table.stories.tsx +0 -75
  179. package/src/components/data-display/table.tsx +0 -80
  180. package/src/components/feedback/alert.stories.tsx +0 -51
  181. package/src/components/feedback/alert.tsx +0 -64
  182. package/src/components/feedback/empty-state.tsx +0 -76
  183. package/src/components/feedback/progress.stories.tsx +0 -54
  184. package/src/components/feedback/progress.tsx +0 -41
  185. package/src/components/feedback/skeleton.stories.tsx +0 -36
  186. package/src/components/feedback/skeleton.tsx +0 -7
  187. package/src/components/feedback/spinner.stories.tsx +0 -52
  188. package/src/components/feedback/spinner.tsx +0 -47
  189. package/src/components/feedback/update-guard.stories.tsx +0 -28
  190. package/src/components/feedback/update-guard.tsx +0 -57
  191. package/src/components/filters/active-filters-bar.stories.tsx +0 -114
  192. package/src/components/filters/active-filters-bar.tsx +0 -61
  193. package/src/components/filters/filter-chip.tsx +0 -57
  194. package/src/components/filters/filter-select.stories.tsx +0 -71
  195. package/src/components/filters/filter-select.tsx +0 -68
  196. package/src/components/forms/checkbox.stories.tsx +0 -35
  197. package/src/components/forms/checkbox.tsx +0 -38
  198. package/src/components/forms/date-month-select.stories.tsx +0 -26
  199. package/src/components/forms/date-month-select.tsx +0 -79
  200. package/src/components/forms/date-picker.stories.tsx +0 -188
  201. package/src/components/forms/date-picker.tsx +0 -303
  202. package/src/components/forms/date-utils.ts +0 -37
  203. package/src/components/forms/drop-zone.stories.tsx +0 -140
  204. package/src/components/forms/drop-zone.tsx +0 -298
  205. package/src/components/forms/input.stories.tsx +0 -47
  206. package/src/components/forms/input.tsx +0 -24
  207. package/src/components/forms/label.stories.tsx +0 -16
  208. package/src/components/forms/label.tsx +0 -25
  209. package/src/components/forms/passkey-management.stories.tsx +0 -85
  210. package/src/components/forms/passkey-management.tsx +0 -168
  211. package/src/components/forms/radio-group.stories.tsx +0 -46
  212. package/src/components/forms/radio-group.tsx +0 -44
  213. package/src/components/forms/select.stories.tsx +0 -207
  214. package/src/components/forms/select.tsx +0 -182
  215. package/src/components/forms/slider.stories.tsx +0 -70
  216. package/src/components/forms/slider.tsx +0 -50
  217. package/src/components/forms/stepper.stories.tsx +0 -111
  218. package/src/components/forms/stepper.tsx +0 -66
  219. package/src/components/forms/switch.stories.tsx +0 -144
  220. package/src/components/forms/switch.tsx +0 -39
  221. package/src/components/forms/text-field.stories.tsx +0 -87
  222. package/src/components/forms/text-field.tsx +0 -75
  223. package/src/components/forms/text-field.types.ts +0 -9
  224. package/src/components/forms/textarea.stories.tsx +0 -150
  225. package/src/components/forms/textarea.tsx +0 -22
  226. package/src/components/layout/particle-background.stories.tsx +0 -38
  227. package/src/components/layout/particle-background.tsx +0 -378
  228. package/src/components/layout/scroll-area.stories.tsx +0 -91
  229. package/src/components/layout/scroll-area.tsx +0 -79
  230. package/src/components/layout/section-intro.stories.tsx +0 -29
  231. package/src/components/layout/section-intro.tsx +0 -31
  232. package/src/components/layout/surface-panel.stories.tsx +0 -32
  233. package/src/components/layout/surface-panel.tsx +0 -23
  234. package/src/components/navigation/app-navigation.stories.tsx +0 -217
  235. package/src/components/navigation/app-navigation.tsx +0 -234
  236. package/src/components/navigation/pagination-controls.stories.tsx +0 -41
  237. package/src/components/navigation/pagination-controls.tsx +0 -46
  238. package/src/components/navigation/tabs.stories.tsx +0 -48
  239. package/src/components/navigation/tabs.tsx +0 -52
  240. package/src/components/overlays/bottom-sheet.stories.tsx +0 -52
  241. package/src/components/overlays/bottom-sheet.tsx +0 -179
  242. package/src/components/overlays/command.stories.tsx +0 -65
  243. package/src/components/overlays/command.tsx +0 -227
  244. package/src/components/overlays/dialog.stories.tsx +0 -148
  245. package/src/components/overlays/dialog.tsx +0 -203
  246. package/src/components/overlays/dropdown-menu.stories.tsx +0 -74
  247. package/src/components/overlays/dropdown-menu.tsx +0 -236
  248. package/src/components/overlays/index.ts +0 -56
  249. package/src/components/overlays/popover.stories.tsx +0 -51
  250. package/src/components/overlays/popover.tsx +0 -78
  251. package/src/components/overlays/sheet.stories.tsx +0 -68
  252. package/src/components/overlays/sheet.tsx +0 -155
  253. package/src/components/overlays/tooltip.stories.tsx +0 -29
  254. package/src/components/overlays/tooltip.tsx +0 -41
  255. package/src/components/primitives/avatar-placeholder.svg +0 -13
  256. package/src/components/primitives/avatar.stories.tsx +0 -72
  257. package/src/components/primitives/avatar.tsx +0 -136
  258. package/src/components/primitives/badge.stories.tsx +0 -43
  259. package/src/components/primitives/badge.tsx +0 -43
  260. package/src/components/primitives/button.stories.tsx +0 -113
  261. package/src/components/primitives/button.tsx +0 -131
  262. package/src/components/primitives/card.stories.tsx +0 -59
  263. package/src/components/primitives/card.tsx +0 -66
  264. package/src/components/primitives/segmented-control.stories.tsx +0 -54
  265. package/src/components/primitives/segmented-control.tsx +0 -73
  266. package/src/components/primitives/separator.stories.tsx +0 -34
  267. package/src/components/primitives/separator.tsx +0 -27
  268. package/src/constants/chart-colors.ts +0 -39
  269. package/src/env.d.ts +0 -9
  270. package/src/hooks/use-api-client.ts +0 -122
  271. package/src/hooks/use-debounced-value.ts +0 -12
  272. package/src/hooks/use-derived-filter-state.ts +0 -70
  273. package/src/hooks/use-filter-state.ts +0 -66
  274. package/src/hooks/use-media-query.ts +0 -69
  275. package/src/hooks/use-mobile.tsx +0 -19
  276. package/src/hooks/use-sort.ts +0 -20
  277. package/src/lib/auth.ts +0 -5
  278. package/src/lib/clipboard.ts +0 -8
  279. package/src/lib/utils.ts +0 -6
  280. package/src/native/components.tsx +0 -198
  281. package/src/native/theme.tsx +0 -69
  282. package/src/storybook/controls.ts +0 -117
  283. package/src/storybook/options.ts +0 -52
  284. package/src/styles/build.ts +0 -1
  285. package/src/styles/index.css +0 -423
  286. package/src/styles/nokia.css +0 -36
  287. package/src/styles/package.css +0 -3
  288. package/src/styles/tokens/chart-colors.stories.tsx +0 -189
  289. package/src/styles/tokens/color-systems.stories.tsx +0 -190
  290. package/src/styles/tokens/css-vars.ts +0 -15
  291. package/src/styles/tokens/generated/dark-class.css +0 -39
  292. package/src/styles/tokens/generated/dark.colors.generated.ts +0 -39
  293. package/src/styles/tokens/generated/dark.css +0 -39
  294. package/src/styles/tokens/generated/foundations.css +0 -149
  295. package/src/styles/tokens/generated/foundations.generated.ts +0 -454
  296. package/src/styles/tokens/generated/light.colors.generated.ts +0 -39
  297. package/src/styles/tokens/generated/light.css +0 -39
  298. package/src/styles/tokens/index.ts +0 -70
  299. package/src/styles/tokens/layout.stories.tsx +0 -50
  300. package/src/styles/tokens/scripts/check-foundations.mjs +0 -126
  301. package/src/styles/tokens/scripts/check-source.mjs +0 -53
  302. package/src/styles/tokens/source/dark.tokens.json +0 -138
  303. package/src/styles/tokens/source/foundations.tokens.json +0 -344
  304. package/src/styles/tokens/source/light.tokens.json +0 -138
  305. package/src/styles/tokens/style-dictionary.dark-class.json +0 -16
  306. package/src/styles/tokens/style-dictionary.dark-storybook.json +0 -16
  307. package/src/styles/tokens/style-dictionary.dark.json +0 -21
  308. package/src/styles/tokens/style-dictionary.foundations.json +0 -21
  309. package/src/styles/tokens/style-dictionary.light-storybook.json +0 -16
  310. package/src/styles/tokens/style-dictionary.light.json +0 -21
  311. package/src/styles/tokens/typography.stories.tsx +0 -157
  312. package/src/translations/en.ts +0 -34
  313. package/src/translations/index.ts +0 -32
  314. package/src/types/upload.ts +0 -42
  315. /package/{src/components/filters/index.ts → dist/components/filters/index.d.ts} +0 -0
  316. /package/{src/components/layout/index.ts → dist/components/layout/index.d.ts} +0 -0
  317. /package/{src/hooks/index.ts → dist/hooks/index.d.ts} +0 -0
  318. /package/{src/lib/index.ts → dist/lib/index.d.ts} +0 -0
  319. /package/{src/native/index.ts → dist/native/index.d.ts} +0 -0
@@ -1,126 +0,0 @@
1
- import { readFileSync } from "node:fs";
2
- import { createRequire } from "node:module";
3
-
4
- const require = createRequire(import.meta.url);
5
- const tailwindTheme = require.resolve("tailwindcss/theme.css");
6
- const tailwind = readFileSync(tailwindTheme, "utf8");
7
- const sourceTokens = JSON.parse(
8
- readFileSync(new URL("../source/foundations.tokens.json", import.meta.url), "utf8"),
9
- );
10
- const generated = readFileSync(new URL("../generated/foundations.css", import.meta.url), "utf8");
11
-
12
- const declarations = (css) =>
13
- [...css.matchAll(/(--[\w-]+):\s*([^;]+);/g)].map(([, name, value]) => [name, value.trim()]);
14
- const expected = declarations(tailwind);
15
- const actual = declarations(generated);
16
- const failures = [];
17
- const normalize = (value) =>
18
- value
19
- .replaceAll(/\b0px\b/g, "0")
20
- .replaceAll(/ 0 0 (rgb\()/g, " $1")
21
- .replaceAll(/\s+/g, " ")
22
- .trim();
23
- const expectedValues = new Map(expected);
24
- const generatedNames = new Set();
25
-
26
- const requiredNames = [
27
- "--spacing",
28
- "--font-sans",
29
- "--font-serif",
30
- "--font-mono",
31
- ...[
32
- "xs",
33
- "sm",
34
- "base",
35
- "lg",
36
- "xl",
37
- "2xl",
38
- "3xl",
39
- "4xl",
40
- "5xl",
41
- "6xl",
42
- "7xl",
43
- "8xl",
44
- "9xl",
45
- ].flatMap((name) => [`--text-${name}`, `--text-line-height-${name}`]),
46
- ...[
47
- "thin",
48
- "extralight",
49
- "light",
50
- "normal",
51
- "medium",
52
- "semibold",
53
- "bold",
54
- "extrabold",
55
- "black",
56
- ].map((name) => `--font-weight-${name}`),
57
- ...["tighter", "tight", "normal", "wide", "wider", "widest"].map((name) => `--tracking-${name}`),
58
- ...["tight", "snug", "normal", "relaxed", "loose"].map((name) => `--leading-${name}`),
59
- ...["xs", "sm", "md", "lg", "xl", "2xl", "3xl", "4xl", "full"].map((name) => `--radius-${name}`),
60
- ...["2xs", "xs", "sm", "md", "lg", "xl", "2xl", "none"].map((name) => `--shadow-${name}`),
61
- ...["sm", "md", "lg", "xl", "2xl"].map((name) => `--breakpoint-${name}`),
62
- ...["3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "4xl", "5xl", "6xl", "7xl"].map(
63
- (name) => `--container-${name}`,
64
- ),
65
- ...["auto", "0", "10", "20", "30", "40", "50"].map((name) => `--z-index-${name}`),
66
- ...["in", "out", "in-out"].map((name) => `--ease-${name}`),
67
- ...["75", "100", "150", "200", "300", "500", "700", "1000"].map((name) => `--duration-${name}`),
68
- ...["spin", "ping", "pulse", "bounce"].map((name) => `--animate-${name}`),
69
- ];
70
-
71
- const sourceNames = new Set();
72
- const collectSourceNames = (node, path = []) => {
73
- if (!node || typeof node !== "object") return;
74
- if (Object.hasOwn(node, "$value")) {
75
- sourceNames.add(`--${path.join("-")}`);
76
- return;
77
- }
78
- for (const [key, value] of Object.entries(node)) {
79
- if (!key.startsWith("$")) collectSourceNames(value, [...path, key]);
80
- }
81
- };
82
- collectSourceNames(sourceTokens);
83
-
84
- // Font families use our own system-ui stack ordering rather than Tailwind's
85
- // exact default wording — every other foundation name is meant to stay
86
- // aligned with Tailwind's own scale, but font-* is exempt from that check.
87
- const brandOverrideNames = new Set(["--font-sans", "--font-serif", "--font-mono"]);
88
-
89
- for (const [name, value] of actual) {
90
- if (generatedNames.has(name)) failures.push(`duplicate generated foundation variable: ${name}`);
91
- generatedNames.add(name);
92
-
93
- if (brandOverrideNames.has(name)) continue;
94
-
95
- const tailwindValue = expectedValues.get(name);
96
- if (tailwindValue !== undefined && normalize(value) !== normalize(tailwindValue)) {
97
- failures.push(`${name}: generated ${value}; Tailwind ${tailwindValue}`);
98
- }
99
- }
100
-
101
- for (const name of requiredNames) {
102
- if (!generatedNames.has(name))
103
- failures.push(`required Tailwind foundation variable is missing: ${name}`);
104
- }
105
-
106
- for (const name of sourceNames) {
107
- if (!generatedNames.has(name)) failures.push(`missing generated foundation variable: ${name}`);
108
- }
109
- for (const name of generatedNames) {
110
- if (!sourceNames.has(name))
111
- failures.push(`generated foundation variable has no source token: ${name}`);
112
- }
113
-
114
- if (/--[\w-]+:\s*var\(--[\w-]+\)/.test(generated))
115
- failures.push("generated foundations contain a custom-property alias");
116
- if (/--tracking-[\w-]+:\s*-?\d+(?:\.\d+)?\s*;/.test(generated))
117
- failures.push("tracking values must carry a CSS unit");
118
-
119
- if (failures.length) {
120
- console.error(failures.join("\n"));
121
- process.exit(1);
122
- }
123
-
124
- console.log(
125
- `Foundation conformance passed (${actual.length} generated variables; ${expectedValues.size} Tailwind variables available for comparison).`,
126
- );
@@ -1,53 +0,0 @@
1
- import { fileURLToPath } from "node:url";
2
- import { readdirSync, readFileSync, statSync } from "node:fs";
3
- import { join, relative } from "node:path";
4
-
5
- const sourceDirectory = fileURLToPath(new URL("../../../", import.meta.url));
6
- const sourceFiles = [];
7
-
8
- function collectFiles(directory) {
9
- for (const entry of readdirSync(directory)) {
10
- const path = join(directory, entry);
11
- if (entry === "generated" && statSync(path).isDirectory()) continue;
12
- if (statSync(path).isDirectory()) collectFiles(path);
13
- else if (/\.(css|ts|tsx)$/.test(entry)) sourceFiles.push(path);
14
- }
15
- }
16
-
17
- collectFiles(sourceDirectory);
18
-
19
- const checks = [
20
- { name: "Radix imports", pattern: /@radix-ui\// },
21
- { name: "legacy semantic utility classes", pattern: /(?:\bbg-canvas\b|\bborder-default\b)/ },
22
- {
23
- name: "invalid shadcn semantic classes",
24
- pattern: /(?:text|bg|border)-foreground-foreground\b/,
25
- },
26
- ];
27
- const failures = [];
28
-
29
- for (const file of sourceFiles) {
30
- const source = readFileSync(file, "utf8");
31
- for (const check of checks) {
32
- if (check.name === "legacy semantic utility classes" && file.endsWith(".css")) continue;
33
- // Native styles address semantic color tokens through bracket notation;
34
- // these are token lookups, not the deprecated utility classes.
35
- if (check.name === "legacy semantic utility classes") {
36
- let tokenSource = source.replace(/\[\s*["'](?:bg-canvas|border-default)["']\s*\]/g, "__semantic_token_access__");
37
- if (file.endsWith("color-systems.stories.tsx")) {
38
- tokenSource = tokenSource.replace(/token:\s*"(?:bg-canvas|border-default)"/g, 'token: "__token-name__"');
39
- }
40
- if (check.pattern.test(tokenSource)) failures.push(`${check.name}: ${relative(sourceDirectory, file)}`);
41
- continue;
42
- }
43
- if (check.pattern.test(source))
44
- failures.push(`${check.name}: ${relative(sourceDirectory, file)}`);
45
- }
46
- }
47
-
48
- if (failures.length > 0) {
49
- console.error(failures.join("\n"));
50
- process.exit(1);
51
- }
52
-
53
- console.log(`Source contract passed (${sourceFiles.length} source files checked).`);
@@ -1,138 +0,0 @@
1
- {
2
- "$extensions": {
3
- "org.ponti.license": "MIT",
4
- "org.ponti.identity": "mono"
5
- },
6
- "background": {
7
- "$type": "color",
8
- "$value": "rgb(10, 10, 10)"
9
- },
10
- "card": {
11
- "$type": "color",
12
- "$value": "rgb(17, 17, 17)"
13
- },
14
- "secondary": {
15
- "$type": "color",
16
- "$value": "rgb(26, 26, 26)"
17
- },
18
- "popover": {
19
- "$type": "color",
20
- "$value": "rgb(17, 17, 17)"
21
- },
22
- "muted": {
23
- "$type": "color",
24
- "$value": "rgb(20, 20, 20)"
25
- },
26
- "text-primary": {
27
- "$type": "color",
28
- "$value": "rgb(250, 250, 250)"
29
- },
30
- "text-secondary": {
31
- "$type": "color",
32
- "$value": "rgb(163, 163, 163)"
33
- },
34
- "tertiary": {
35
- "$type": "color",
36
- "$value": "{text-secondary}"
37
- },
38
- "primary": {
39
- "$type": "color",
40
- "$value": "rgb(237, 237, 237)"
41
- },
42
- "accent": {
43
- "$type": "color",
44
- "$value": "rgb(30, 41, 59)"
45
- },
46
- "destructive": {
47
- "$type": "color",
48
- "$value": "rgb(220, 38, 38)"
49
- },
50
- "success": {
51
- "$type": "color",
52
- "$value": "rgb(34, 197, 94)"
53
- },
54
- "warning": {
55
- "$type": "color",
56
- "$value": "rgb(245, 158, 11)"
57
- },
58
- "text-success": {
59
- "$type": "color",
60
- "$value": "rgb(74, 222, 128)"
61
- },
62
- "text-warning": {
63
- "$type": "color",
64
- "$value": "rgb(252, 211, 77)"
65
- },
66
- "success-foreground": {
67
- "$type": "color",
68
- "$value": "rgb(10, 10, 10)"
69
- },
70
- "warning-foreground": {
71
- "$type": "color",
72
- "$value": "rgb(10, 10, 10)"
73
- },
74
- "primary-foreground": {
75
- "$type": "color",
76
- "$value": "rgb(10, 10, 10)"
77
- },
78
- "accent-foreground": {
79
- "$type": "color",
80
- "$value": "rgb(147, 197, 253)"
81
- },
82
- "destructive-foreground": {
83
- "$type": "color",
84
- "$value": "rgb(255, 255, 255)"
85
- },
86
- "text-destructive": {
87
- "$type": "color",
88
- "$value": "rgb(252, 165, 165)"
89
- },
90
- "text-accent": {
91
- "$type": "color",
92
- "$value": "rgb(96, 165, 250)"
93
- },
94
- "border-default": {
95
- "$type": "color",
96
- "$value": "rgb(38, 38, 38)"
97
- },
98
- "focus-ring": {
99
- "$type": "color",
100
- "$value": "rgb(59, 130, 246)"
101
- },
102
- "chart-1": {
103
- "$type": "color",
104
- "$value": "rgb(59, 130, 246)"
105
- },
106
- "chart-2": {
107
- "$type": "color",
108
- "$value": "rgb(237, 237, 237)"
109
- },
110
- "chart-3": {
111
- "$type": "color",
112
- "$value": "rgb(115, 115, 115)"
113
- },
114
- "chart-4": {
115
- "$type": "color",
116
- "$value": "rgb(147, 197, 253)"
117
- },
118
- "chart-5": {
119
- "$type": "color",
120
- "$value": "rgb(63, 63, 70)"
121
- },
122
- "chart-positive": {
123
- "$type": "color",
124
- "$value": "rgb(34, 197, 94)"
125
- },
126
- "chart-negative": {
127
- "$type": "color",
128
- "$value": "rgb(239, 68, 68)"
129
- },
130
- "chart-neutral": {
131
- "$type": "color",
132
- "$value": "rgb(163, 163, 163)"
133
- },
134
- "overlay-scrim": {
135
- "$type": "color",
136
- "$value": "rgb(0, 0, 0)"
137
- }
138
- }
@@ -1,344 +0,0 @@
1
- {
2
- "$description": "Non-color foundations copied from tailwindcss@4.3.3/theme.css. Keep this file value-for-value aligned with Tailwind.",
3
- "spacing": { "$type": "dimension", "$value": { "value": 0.25, "unit": "rem" } },
4
- "spacing-scale": {
5
- "$type": "dimension",
6
- "0": { "$value": { "value": 0, "unit": "rem" } },
7
- "px": { "$value": { "value": 1, "unit": "px" } },
8
- "0-5": { "$value": { "value": 0.125, "unit": "rem" } },
9
- "1": { "$value": { "value": 0.25, "unit": "rem" } },
10
- "1-5": { "$value": { "value": 0.375, "unit": "rem" } },
11
- "2": { "$value": { "value": 0.5, "unit": "rem" } },
12
- "2-5": { "$value": { "value": 0.625, "unit": "rem" } },
13
- "3": { "$value": { "value": 0.75, "unit": "rem" } },
14
- "3-5": { "$value": { "value": 0.875, "unit": "rem" } },
15
- "4": { "$value": { "value": 1, "unit": "rem" } },
16
- "5": { "$value": { "value": 1.25, "unit": "rem" } },
17
- "6": { "$value": { "value": 1.5, "unit": "rem" } },
18
- "7": { "$value": { "value": 1.75, "unit": "rem" } },
19
- "8": { "$value": { "value": 2, "unit": "rem" } },
20
- "9": { "$value": { "value": 2.25, "unit": "rem" } },
21
- "10": { "$value": { "value": 2.5, "unit": "rem" } },
22
- "11": { "$value": { "value": 2.75, "unit": "rem" } },
23
- "12": { "$value": { "value": 3, "unit": "rem" } },
24
- "14": { "$value": { "value": 3.5, "unit": "rem" } },
25
- "16": { "$value": { "value": 4, "unit": "rem" } },
26
- "20": { "$value": { "value": 5, "unit": "rem" } },
27
- "24": { "$value": { "value": 6, "unit": "rem" } },
28
- "28": { "$value": { "value": 7, "unit": "rem" } },
29
- "32": { "$value": { "value": 8, "unit": "rem" } },
30
- "36": { "$value": { "value": 9, "unit": "rem" } },
31
- "40": { "$value": { "value": 10, "unit": "rem" } },
32
- "44": { "$value": { "value": 11, "unit": "rem" } },
33
- "48": { "$value": { "value": 12, "unit": "rem" } },
34
- "52": { "$value": { "value": 13, "unit": "rem" } },
35
- "56": { "$value": { "value": 14, "unit": "rem" } },
36
- "60": { "$value": { "value": 15, "unit": "rem" } },
37
- "64": { "$value": { "value": 16, "unit": "rem" } },
38
- "72": { "$value": { "value": 18, "unit": "rem" } },
39
- "80": { "$value": { "value": 20, "unit": "rem" } },
40
- "96": { "$value": { "value": 24, "unit": "rem" } }
41
- },
42
- "font": {
43
- "$type": "fontFamily",
44
- "sans": {
45
- "$value": [
46
- "Geist",
47
- "system-ui",
48
- "-apple-system",
49
- "BlinkMacSystemFont",
50
- "Segoe UI",
51
- "Roboto",
52
- "Helvetica Neue",
53
- "Noto Sans",
54
- "Arial",
55
- "sans-serif",
56
- "Apple Color Emoji",
57
- "Segoe UI Emoji",
58
- "Segoe UI Symbol",
59
- "Noto Color Emoji"
60
- ]
61
- },
62
- "serif": {
63
- "$value": [
64
- "system-ui",
65
- "-apple-system",
66
- "BlinkMacSystemFont",
67
- "Segoe UI",
68
- "Roboto",
69
- "Helvetica Neue",
70
- "Noto Sans",
71
- "Arial",
72
- "sans-serif",
73
- "Apple Color Emoji",
74
- "Segoe UI Emoji",
75
- "Segoe UI Symbol",
76
- "Noto Color Emoji"
77
- ]
78
- },
79
- "mono": {
80
- "$value": [
81
- "Geist Mono",
82
- "ui-monospace",
83
- "SFMono-Regular",
84
- "Menlo",
85
- "Monaco",
86
- "Consolas",
87
- "Liberation Mono",
88
- "Courier New",
89
- "monospace"
90
- ]
91
- }
92
- },
93
- "text": {
94
- "$type": "dimension",
95
- "xs": { "$value": { "value": 0.75, "unit": "rem" } },
96
- "sm": { "$value": { "value": 0.875, "unit": "rem" } },
97
- "base": { "$value": { "value": 1, "unit": "rem" } },
98
- "lg": { "$value": { "value": 1.125, "unit": "rem" } },
99
- "xl": { "$value": { "value": 1.25, "unit": "rem" } },
100
- "2xl": { "$value": { "value": 1.5, "unit": "rem" } },
101
- "3xl": { "$value": { "value": 1.875, "unit": "rem" } },
102
- "4xl": { "$value": { "value": 2.25, "unit": "rem" } },
103
- "5xl": { "$value": { "value": 3, "unit": "rem" } },
104
- "6xl": { "$value": { "value": 3.75, "unit": "rem" } },
105
- "7xl": { "$value": { "value": 4.5, "unit": "rem" } },
106
- "8xl": { "$value": { "value": 6, "unit": "rem" } },
107
- "9xl": { "$value": { "value": 8, "unit": "rem" } }
108
- },
109
- "text-line-height": {
110
- "$type": "number",
111
- "xs": { "$value": 1.3333333333 },
112
- "sm": { "$value": 1.4285714286 },
113
- "base": { "$value": 1.5 },
114
- "lg": { "$value": 1.5555555556 },
115
- "xl": { "$value": 1.4 },
116
- "2xl": { "$value": 1.3333333333 },
117
- "3xl": { "$value": 1.2 },
118
- "4xl": { "$value": 1.1111111111 },
119
- "5xl": { "$value": 1 },
120
- "6xl": { "$value": 1 },
121
- "7xl": { "$value": 1 },
122
- "8xl": { "$value": 1 },
123
- "9xl": { "$value": 1 }
124
- },
125
- "font-weight": {
126
- "$type": "fontWeight",
127
- "thin": { "$value": 100 },
128
- "extralight": { "$value": 200 },
129
- "light": { "$value": 300 },
130
- "normal": { "$value": 400 },
131
- "medium": { "$value": 500 },
132
- "semibold": { "$value": 600 },
133
- "bold": { "$value": 700 },
134
- "extrabold": { "$value": 800 },
135
- "black": { "$value": 900 }
136
- },
137
- "tracking": {
138
- "$type": "dimension",
139
- "tighter": { "$value": { "value": -0.05, "unit": "em" } },
140
- "tight": { "$value": { "value": -0.025, "unit": "em" } },
141
- "normal": { "$value": { "value": 0, "unit": "em" } },
142
- "wide": { "$value": { "value": 0.025, "unit": "em" } },
143
- "wider": { "$value": { "value": 0.05, "unit": "em" } },
144
- "widest": { "$value": { "value": 0.1, "unit": "em" } }
145
- },
146
- "leading": {
147
- "$type": "number",
148
- "tight": { "$value": 1.25 },
149
- "snug": { "$value": 1.375 },
150
- "normal": { "$value": 1.5 },
151
- "relaxed": { "$value": 1.625 },
152
- "loose": { "$value": 2 }
153
- },
154
- "radius": {
155
- "$type": "dimension",
156
- "xs": { "$value": { "value": 0.125, "unit": "rem" } },
157
- "sm": { "$value": { "value": 0.25, "unit": "rem" } },
158
- "md": { "$value": { "value": 0.375, "unit": "rem" } },
159
- "lg": { "$value": { "value": 0.5, "unit": "rem" } },
160
- "xl": { "$value": { "value": 0.75, "unit": "rem" } },
161
- "2xl": { "$value": { "value": 1, "unit": "rem" } },
162
- "3xl": { "$value": { "value": 1.5, "unit": "rem" } },
163
- "4xl": { "$value": { "value": 2, "unit": "rem" } },
164
- "full": { "$value": { "value": 9999, "unit": "px" } }
165
- },
166
- "shadow": {
167
- "$type": "shadow",
168
- "2xs": {
169
- "$value": [
170
- {
171
- "color": "rgb(0 0 0 / 0.05)",
172
- "offsetX": { "value": 0, "unit": "px" },
173
- "offsetY": { "value": 1, "unit": "px" },
174
- "blur": { "value": 0, "unit": "px" },
175
- "spread": { "value": 0, "unit": "px" }
176
- }
177
- ]
178
- },
179
- "xs": {
180
- "$value": [
181
- {
182
- "color": "rgb(0 0 0 / 0.05)",
183
- "offsetX": { "value": 0, "unit": "px" },
184
- "offsetY": { "value": 1, "unit": "px" },
185
- "blur": { "value": 2, "unit": "px" },
186
- "spread": { "value": 0, "unit": "px" }
187
- }
188
- ]
189
- },
190
- "sm": {
191
- "$value": [
192
- {
193
- "color": "rgb(0 0 0 / 0.1)",
194
- "offsetX": { "value": 0, "unit": "px" },
195
- "offsetY": { "value": 1, "unit": "px" },
196
- "blur": { "value": 3, "unit": "px" },
197
- "spread": { "value": 0, "unit": "px" }
198
- },
199
- {
200
- "color": "rgb(0 0 0 / 0.1)",
201
- "offsetX": { "value": 0, "unit": "px" },
202
- "offsetY": { "value": 1, "unit": "px" },
203
- "blur": { "value": 2, "unit": "px" },
204
- "spread": { "value": -1, "unit": "px" }
205
- }
206
- ]
207
- },
208
- "md": {
209
- "$value": [
210
- {
211
- "color": "rgb(0 0 0 / 0.1)",
212
- "offsetX": { "value": 0, "unit": "px" },
213
- "offsetY": { "value": 4, "unit": "px" },
214
- "blur": { "value": 6, "unit": "px" },
215
- "spread": { "value": -1, "unit": "px" }
216
- },
217
- {
218
- "color": "rgb(0 0 0 / 0.1)",
219
- "offsetX": { "value": 0, "unit": "px" },
220
- "offsetY": { "value": 2, "unit": "px" },
221
- "blur": { "value": 4, "unit": "px" },
222
- "spread": { "value": -2, "unit": "px" }
223
- }
224
- ]
225
- },
226
- "lg": {
227
- "$value": [
228
- {
229
- "color": "rgb(0 0 0 / 0.1)",
230
- "offsetX": { "value": 0, "unit": "px" },
231
- "offsetY": { "value": 10, "unit": "px" },
232
- "blur": { "value": 15, "unit": "px" },
233
- "spread": { "value": -3, "unit": "px" }
234
- },
235
- {
236
- "color": "rgb(0 0 0 / 0.1)",
237
- "offsetX": { "value": 0, "unit": "px" },
238
- "offsetY": { "value": 4, "unit": "px" },
239
- "blur": { "value": 6, "unit": "px" },
240
- "spread": { "value": -4, "unit": "px" }
241
- }
242
- ]
243
- },
244
- "xl": {
245
- "$value": [
246
- {
247
- "color": "rgb(0 0 0 / 0.1)",
248
- "offsetX": { "value": 0, "unit": "px" },
249
- "offsetY": { "value": 20, "unit": "px" },
250
- "blur": { "value": 25, "unit": "px" },
251
- "spread": { "value": -5, "unit": "px" }
252
- },
253
- {
254
- "color": "rgb(0 0 0 / 0.1)",
255
- "offsetX": { "value": 0, "unit": "px" },
256
- "offsetY": { "value": 8, "unit": "px" },
257
- "blur": { "value": 10, "unit": "px" },
258
- "spread": { "value": -6, "unit": "px" }
259
- }
260
- ]
261
- },
262
- "2xl": {
263
- "$value": [
264
- {
265
- "color": "rgb(0 0 0 / 0.25)",
266
- "offsetX": { "value": 0, "unit": "px" },
267
- "offsetY": { "value": 25, "unit": "px" },
268
- "blur": { "value": 50, "unit": "px" },
269
- "spread": { "value": -12, "unit": "px" }
270
- }
271
- ]
272
- },
273
- "none": {
274
- "$value": [
275
- {
276
- "color": "transparent",
277
- "offsetX": { "value": 0, "unit": "px" },
278
- "offsetY": { "value": 0, "unit": "px" },
279
- "blur": { "value": 0, "unit": "px" },
280
- "spread": { "value": 0, "unit": "px" }
281
- }
282
- ]
283
- }
284
- },
285
- "breakpoint": {
286
- "$type": "dimension",
287
- "sm": { "$value": { "value": 40, "unit": "rem" } },
288
- "md": { "$value": { "value": 48, "unit": "rem" } },
289
- "lg": { "$value": { "value": 64, "unit": "rem" } },
290
- "xl": { "$value": { "value": 80, "unit": "rem" } },
291
- "2xl": { "$value": { "value": 96, "unit": "rem" } }
292
- },
293
- "container": {
294
- "$type": "dimension",
295
- "3xs": { "$value": { "value": 16, "unit": "rem" } },
296
- "2xs": { "$value": { "value": 18, "unit": "rem" } },
297
- "xs": { "$value": { "value": 20, "unit": "rem" } },
298
- "sm": { "$value": { "value": 24, "unit": "rem" } },
299
- "md": { "$value": { "value": 28, "unit": "rem" } },
300
- "lg": { "$value": { "value": 32, "unit": "rem" } },
301
- "xl": { "$value": { "value": 36, "unit": "rem" } },
302
- "2xl": { "$value": { "value": 42, "unit": "rem" } },
303
- "3xl": { "$value": { "value": 48, "unit": "rem" } },
304
- "4xl": { "$value": { "value": 56, "unit": "rem" } },
305
- "5xl": { "$value": { "value": 64, "unit": "rem" } },
306
- "6xl": { "$value": { "value": 72, "unit": "rem" } },
307
- "7xl": { "$value": { "value": 80, "unit": "rem" } }
308
- },
309
- "z-index": {
310
- "$type": "number",
311
- "auto": { "$value": "auto" },
312
- "0": { "$value": 0 },
313
- "10": { "$value": 10 },
314
- "20": { "$value": 20 },
315
- "30": { "$value": 30 },
316
- "40": { "$value": 40 },
317
- "50": { "$value": 50 }
318
- },
319
- "ease": {
320
- "$type": "cubicBezier",
321
- "in": { "$value": [0.4, 0, 1, 1] },
322
- "out": { "$value": [0, 0, 0.2, 1] },
323
- "in-out": { "$value": [0.4, 0, 0.2, 1] },
324
- "drawer": { "$value": [0.32, 0.72, 0, 1] }
325
- },
326
- "duration": {
327
- "$type": "duration",
328
- "75": { "$value": "75ms" },
329
- "100": { "$value": "100ms" },
330
- "150": { "$value": "150ms" },
331
- "200": { "$value": "200ms" },
332
- "300": { "$value": "300ms" },
333
- "500": { "$value": "500ms" },
334
- "700": { "$value": "700ms" },
335
- "1000": { "$value": "1000ms" }
336
- },
337
- "animate": {
338
- "$type": "string",
339
- "spin": { "$value": "spin 1s linear infinite" },
340
- "ping": { "$value": "ping 1s cubic-bezier(0, 0, 0.2, 1) infinite" },
341
- "pulse": { "$value": "pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite" },
342
- "bounce": { "$value": "bounce 1s infinite" }
343
- }
344
- }