@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,117 +0,0 @@
1
- import type { InputType } from "storybook/internal/csf";
2
-
3
- type StorybookControlTable = NonNullable<InputType["table"]>;
4
-
5
- type StorybookControlCondition = NonNullable<InputType["if"]>;
6
-
7
- type StorybookControl = InputType;
8
-
9
- type SelectControlConfig = {
10
- controlType?: "select" | "radio" | "inline-radio" | "check" | "inline-check" | "multi-select";
11
- defaultValue?: boolean | number | string | null;
12
- if?: StorybookControlCondition;
13
- labels?: Record<string, string>;
14
- mapping?: Record<string, unknown>;
15
- table?: StorybookControlTable;
16
- };
17
-
18
- const commonControlsExclude = /^(className|style|children|asChild|on[A-Z].*|render[A-Z].*)$/;
19
-
20
- const hiddenControl = {
21
- control: false,
22
- table: {
23
- disable: true,
24
- },
25
- } satisfies StorybookControl;
26
-
27
- function withDefaultValue(
28
- control: StorybookControl,
29
- defaultValue?: boolean | number | string | null,
30
- ): StorybookControl {
31
- if (defaultValue === undefined) {
32
- return control;
33
- }
34
-
35
- return {
36
- ...control,
37
- table: {
38
- ...control.table,
39
- defaultValue: {
40
- summary: String(defaultValue),
41
- },
42
- },
43
- };
44
- }
45
-
46
- function booleanControl(description: string, defaultValue?: boolean): StorybookControl {
47
- return withDefaultValue(
48
- {
49
- control: "boolean",
50
- description,
51
- },
52
- defaultValue,
53
- );
54
- }
55
-
56
- function textControl(description: string, defaultValue?: string): StorybookControl {
57
- return withDefaultValue(
58
- {
59
- control: "text",
60
- description,
61
- },
62
- defaultValue,
63
- );
64
- }
65
-
66
- function numberControl(
67
- description: string,
68
- config?: {
69
- defaultValue?: number;
70
- max?: number;
71
- min?: number;
72
- step?: number;
73
- },
74
- ): StorybookControl {
75
- return withDefaultValue(
76
- {
77
- control: {
78
- max: config?.max,
79
- min: config?.min,
80
- step: config?.step,
81
- type: "number",
82
- },
83
- description,
84
- },
85
- config?.defaultValue,
86
- );
87
- }
88
-
89
- function selectControl<T extends boolean | number | string | null>(
90
- options: readonly T[],
91
- description: string,
92
- config?: SelectControlConfig,
93
- ): StorybookControl {
94
- return withDefaultValue(
95
- {
96
- control: {
97
- type: config?.controlType ?? "select",
98
- },
99
- description,
100
- options,
101
- ...(config?.if ? { if: config.if } : {}),
102
- ...(config?.labels ? { labels: config.labels } : {}),
103
- ...(config?.mapping ? { mapping: config.mapping } : {}),
104
- ...(config?.table ? { table: config.table } : {}),
105
- },
106
- config?.defaultValue,
107
- );
108
- }
109
-
110
- export {
111
- booleanControl,
112
- commonControlsExclude,
113
- hiddenControl,
114
- numberControl,
115
- selectControl,
116
- textControl,
117
- };
@@ -1,52 +0,0 @@
1
- import type { TextFieldType } from "../components/forms/text-field.types";
2
-
3
- const buttonVariantOptions = [
4
- "default",
5
- "destructive",
6
- "ghost",
7
- "link",
8
- "outline",
9
- "secondary",
10
- ] as const;
11
-
12
- const inputTypeOptions = ["text", "email", "password", "search", "number", "tel", "url"] as const;
13
-
14
- const textFieldTypeOptions = [
15
- "text",
16
- "email",
17
- "password",
18
- "search",
19
- ] satisfies readonly TextFieldType[];
20
-
21
- const checkboxStateOptions = [true, false, "indeterminate"] as const;
22
-
23
- const switchSizeOptions = ["default", "sm"] as const;
24
- const drawerDirectionOptions = ["top", "bottom", "left", "right"] as const;
25
- const loadingSizeOptions = ["sm", "md", "lg", "xl", "2xl", "3xl"] as const;
26
- const codeBlockLanguageOptions = [
27
- "typescript",
28
- "tsx",
29
- "javascript",
30
- "jsx",
31
- "python",
32
- "bash",
33
- "sql",
34
- "json",
35
- "html",
36
- "css",
37
- "yaml",
38
- "dockerfile",
39
- "markdown",
40
- "graphql",
41
- ] as const;
42
-
43
- export {
44
- buttonVariantOptions,
45
- checkboxStateOptions,
46
- codeBlockLanguageOptions,
47
- drawerDirectionOptions,
48
- inputTypeOptions,
49
- loadingSizeOptions,
50
- switchSizeOptions,
51
- textFieldTypeOptions,
52
- };
@@ -1 +0,0 @@
1
- import "./package.css";
@@ -1,423 +0,0 @@
1
- /*
2
- * DESIGN SYSTEM STYLESHEET — @ponti-studios/ui
3
- *
4
- * This file provides the design tokens and shared component styles consumed
5
- * by your project. It does NOT import Tailwind CSS — your project owns that.
6
- *
7
- * Required in your project's entry CSS BEFORE this import:
8
- *
9
- * @import "tailwindcss";
10
- * @import "@ponti-studios/ui/styles.css";
11
- *
12
- * If you omit the Tailwind import you may see missing CSS variables
13
- * (e.g., --tw-shadow-color) or utilities that fail to resolve.
14
- */
15
-
16
- @reference "tailwindcss";
17
- @import "./tokens/generated/foundations.css";
18
- @import "./tokens/generated/light.css";
19
- @import "./tokens/generated/dark.css" (prefers-color-scheme: dark);
20
- @import "./tokens/generated/dark-class.css";
21
- @import "./animations.css";
22
- @import "./nokia.css";
23
-
24
- @theme {
25
- --animate-accordion-down: accordion-down 200ms ease-out;
26
- --animate-accordion-up: accordion-up 200ms ease-out;
27
- --animate-in: fade-in 150ms ease-out, zoom-in 150ms ease-out;
28
- --animate-out: fade-out 120ms ease-in, zoom-out 120ms ease-in;
29
- --animate-fade-in: fade-in 150ms ease-out;
30
- --animate-fade-out: fade-out 120ms ease-in;
31
- --animate-zoom-in: zoom-in 150ms ease-out;
32
- --animate-zoom-out: zoom-out 120ms ease-in;
33
- --animate-progress-shimmer: progress-shimmer 1.1s linear infinite;
34
- }
35
-
36
- @utility fade-in-0 {
37
- animation-name: fade-in;
38
- }
39
- @utility fade-out-0 {
40
- animation-name: fade-out;
41
- }
42
- @utility zoom-in-95 {
43
- animation-name: zoom-in;
44
- }
45
- @utility zoom-out-95 {
46
- animation-name: zoom-out;
47
- }
48
-
49
- /*
50
- Values are generated from the DTCG source;
51
- this file only names the roles consumed by web components.
52
- */
53
- @theme inline {
54
- --color-background: var(--background);
55
- --color-foreground: var(--text-primary);
56
- --color-card: var(--card);
57
- --color-card-foreground: var(--text-primary);
58
- --color-popover: var(--popover);
59
- --color-popover-foreground: var(--text-primary);
60
- --color-primary: var(--primary);
61
- --color-primary-foreground: var(--primary-foreground);
62
- --color-secondary: var(--secondary);
63
- --color-secondary-foreground: var(--text-primary);
64
- --color-muted: var(--muted);
65
- --color-muted-foreground: var(--text-secondary);
66
- --color-accent: var(--accent);
67
- --color-accent-foreground: var(--accent-foreground);
68
- /* Distinct from --color-accent: this pairs with the page background for
69
- * standalone text/icons/borders (inline links, upload affordances). */
70
- --color-accent-text: var(--text-accent);
71
- --color-destructive: var(--destructive);
72
- --color-destructive-foreground: var(--destructive-foreground);
73
- /* Distinct from --color-destructive: that pairs with white for solid
74
- * backgrounds (buttons, badges) and is the same value in both themes.
75
- * This pairs with the page background for standalone text (error
76
- * messages, alert copy) and must differ per theme to stay AA-compliant. */
77
- --color-destructive-text: var(--text-destructive);
78
- --color-success: var(--success);
79
- --color-success-foreground: var(--success-foreground);
80
- --color-success-text: var(--text-success);
81
- --color-warning: var(--warning);
82
- --color-warning-foreground: var(--warning-foreground);
83
- --color-warning-text: var(--text-warning);
84
- --color-border: var(--border-default);
85
- --color-input: var(--border-default);
86
- --color-ring: var(--focus-ring);
87
- }
88
-
89
- @utility display-1 {
90
- font-size: clamp(2.5rem, 5vw, 6rem);
91
- font-family: var(--font-sans);
92
- font-weight: var(--font-weight-semibold);
93
- line-height: 1.1;
94
- letter-spacing: var(--tracking-tight);
95
- }
96
- @utility display-2 {
97
- font-size: clamp(2rem, 3vw, 3.5rem);
98
- font-family: var(--font-sans);
99
- font-weight: var(--font-weight-semibold);
100
- line-height: 1.15;
101
- letter-spacing: var(--tracking-tight);
102
- }
103
- @utility ref-tag {
104
- font-family: var(--font-mono);
105
- font-size: var(--text-xs);
106
- color: var(--tertiary);
107
- letter-spacing: var(--tracking-wide);
108
- }
109
- /* Quiet state-change "settle" — used on state-bearing indicators
110
- * (Badge, StatusBadge, FilterChip) when their represented value changes. */
111
- @utility state-settle {
112
- transition:
113
- transform 120ms ease-out,
114
- opacity 120ms ease-out;
115
- }
116
- @utility pb-safe-area-inset-bottom {
117
- padding-bottom: env(safe-area-inset-bottom);
118
- }
119
- @utility mb-safe-area-inset-bottom {
120
- margin-bottom: env(safe-area-inset-bottom);
121
- }
122
- @utility min-h-screen {
123
- min-height: 100vh;
124
- min-height: 100dvh;
125
- }
126
- @utility min-h-screen-dynamic {
127
- min-height: 100dvh;
128
- }
129
- /* ── scroll-fade ──
130
- * Progressive opacity mask on scroll-container edges.
131
- * Uses CSS custom properties so consumers can override the fade size
132
- * or disable the mask without a class order dependency:
133
- *
134
- * <div class="scroll-fade-x overflow-x-auto [--scroll-fade-size:24px]">
135
- * <div class="scroll-fade-y overflow-y-auto scroll-fade-none md:scroll-fade">
136
- *
137
- * Default fade size: 16 px (scoped to the element via inline var).
138
- * Disable with scroll-fade-none (sets --scroll-fade-mask: none). */
139
- @utility scroll-fade-x {
140
- mask-image: var(
141
- --scroll-fade-mask,
142
- linear-gradient(
143
- to right,
144
- transparent,
145
- black var(--scroll-fade-size, 16px),
146
- black calc(100% - var(--scroll-fade-size, 16px)),
147
- transparent
148
- )
149
- );
150
- }
151
- @utility scroll-fade-y {
152
- mask-image: var(
153
- --scroll-fade-mask,
154
- linear-gradient(
155
- to bottom,
156
- transparent,
157
- black var(--scroll-fade-size, 16px),
158
- black calc(100% - var(--scroll-fade-size, 16px)),
159
- transparent
160
- )
161
- );
162
- }
163
- @utility scroll-fade-l {
164
- mask-image: var(
165
- --scroll-fade-mask,
166
- linear-gradient(to right, transparent, black var(--scroll-fade-size, 16px))
167
- );
168
- }
169
- @utility scroll-fade-r {
170
- mask-image: var(
171
- --scroll-fade-mask,
172
- linear-gradient(to left, transparent, black var(--scroll-fade-size, 16px))
173
- );
174
- }
175
- @utility scroll-fade-t {
176
- mask-image: var(
177
- --scroll-fade-mask,
178
- linear-gradient(to bottom, transparent, black var(--scroll-fade-size, 16px))
179
- );
180
- }
181
- @utility scroll-fade-b {
182
- mask-image: var(
183
- --scroll-fade-mask,
184
- linear-gradient(to top, transparent, black var(--scroll-fade-size, 16px))
185
- );
186
- }
187
- @utility scroll-fade-none {
188
- --scroll-fade-mask: none;
189
- }
190
- /* Hides the native scrollbar so a custom overlay affordance (ScrollArea's
191
- * Scrollbar/Thumb) can stand in for it. */
192
- @utility scrollbar-hide {
193
- scrollbar-width: none;
194
- -ms-overflow-style: none;
195
- &::-webkit-scrollbar {
196
- display: none;
197
- }
198
- }
199
- @utility h-screen {
200
- height: 100vh;
201
- height: 100dvh;
202
- }
203
-
204
- /* Responsive dropdown surfaces keep their menu/listbox semantics while
205
- * becoming thumb-reachable sheets on compact viewports. */
206
- .ui-mobile-sheet-backdrop {
207
- display: none;
208
- }
209
- .ui-mobile-sheet-positioner {
210
- z-index: var(--z-index-50);
211
- }
212
- .ui-mobile-sheet-close {
213
- display: none;
214
- }
215
- @media (max-width: 767px) {
216
- .ui-mobile-sheet-backdrop {
217
- position: fixed;
218
- z-index: var(--z-index-50);
219
- display: block;
220
- background: color-mix(in srgb, var(--overlay-scrim) 50%, transparent);
221
- inset: 0;
222
- }
223
- .ui-mobile-sheet-positioner {
224
- position: fixed !important;
225
- z-index: calc(var(--z-index-50) + 1) !important;
226
- display: block;
227
- width: 100% !important;
228
- height: auto !important;
229
- max-height: none !important;
230
- transform: none !important;
231
- inset: auto 0 0 !important;
232
- }
233
- .ui-mobile-sheet-popup {
234
- width: 100% !important;
235
- min-width: 0 !important;
236
- max-width: none !important;
237
- max-height: min(75dvh, var(--available-height, 75dvh)) !important;
238
- border-start-start-radius: var(--radius-2xl) !important;
239
- border-start-end-radius: var(--radius-2xl) !important;
240
- border-end-start-radius: 0 !important;
241
- border-end-end-radius: 0 !important;
242
- padding-bottom: max(var(--spacing-scale-4), env(safe-area-inset-bottom)) !important;
243
- overscroll-behavior: contain;
244
- }
245
- .ui-mobile-popover-popup {
246
- padding-block-start: calc(var(--spacing-scale-12) + var(--spacing-scale-2)) !important;
247
- }
248
- .ui-mobile-sheet-close {
249
- position: absolute;
250
- z-index: var(--z-index-10);
251
- top: var(--spacing-scale-2);
252
- right: var(--spacing-scale-3);
253
- display: grid;
254
- width: var(--spacing-scale-12);
255
- height: var(--spacing-scale-12);
256
- place-items: center;
257
- border: 1px solid var(--border-default);
258
- border-radius: var(--radius-full);
259
- color: var(--text-secondary);
260
- background: var(--background);
261
- cursor: pointer;
262
- }
263
- .ui-mobile-sheet-close svg {
264
- width: var(--spacing-scale-5);
265
- height: var(--spacing-scale-5);
266
- }
267
- [data-slot="dropdown-menu-content"] [data-slot^="dropdown-menu-item"],
268
- [data-slot="select-content"] [data-slot="select-item"] {
269
- min-height: var(--spacing-scale-12);
270
- }
271
- [data-slot="dropdown-menu-content"][data-open],
272
- [data-slot="select-content"][data-open],
273
- [data-slot="popover-content"][data-open] {
274
- animation: sheet-slide-in-bottom 300ms var(--ease-drawer);
275
- }
276
- [data-slot="dropdown-menu-content"][data-closed],
277
- [data-slot="select-content"][data-closed],
278
- [data-slot="popover-content"][data-closed] {
279
- animation: sheet-slide-out-bottom 200ms var(--ease-drawer);
280
- }
281
- }
282
-
283
- /* Shared layout rhythm. Product components own their layout; this does not
284
- * define visual component families. */
285
- .page-shell {
286
- @apply relative mx-auto flex w-full flex-col gap-12 px-4 py-16 md:gap-16 md:px-6 md:py-20;
287
- }
288
- .page-shell-detail {
289
- @apply relative mx-auto flex w-full flex-col gap-10 px-4 py-16 md:gap-12 md:px-6 md:py-20;
290
- }
291
- .page-bleed {
292
- @apply flex w-full flex-col;
293
- }
294
- .layout-stack {
295
- @apply flex flex-col gap-4;
296
- }
297
- .list-row {
298
- @apply flex gap-4 px-0 py-6 md:gap-6 md:py-8;
299
- }
300
- .list-media {
301
- @apply border-border bg-card relative isolate flex shrink-0 items-center justify-center overflow-hidden rounded-md border p-2 shadow-none;
302
- }
303
- .list-media-wide {
304
- @apply h-14 w-32;
305
- }
306
- .list-media-square {
307
- @apply size-10 sm:size-12;
308
- }
309
- .list-media-placeholder {
310
- @apply pointer-events-none absolute inset-0 flex items-center justify-center gap-1.5 transition-opacity duration-150;
311
- }
312
- .section {
313
- @apply border-border flex flex-col gap-4 border-b px-4 py-12 md:px-6 md:py-16;
314
- }
315
- .section-hero {
316
- @apply gap-6 py-16 md:py-20;
317
- }
318
- .detail-hero {
319
- @apply gap-4 py-10 md:gap-6 md:py-16;
320
- }
321
- .section-compact {
322
- @apply gap-4 py-8 md:py-12;
323
- }
324
- .detail-navigation {
325
- @apply flex flex-col gap-6 sm:flex-row sm:justify-between;
326
- }
327
- .detail-navigation-link {
328
- @apply flex min-h-9 flex-col justify-center gap-1;
329
- }
330
-
331
- .ui-flat-card {
332
- @apply bg-card border-border rounded-md border p-3;
333
- }
334
-
335
- .ui-data-label {
336
- @apply text-muted-foreground text-xs font-medium uppercase tracking-wider;
337
- }
338
-
339
- .ui-data-value {
340
- @apply text-foreground text-base font-semibold tabular-nums;
341
- }
342
-
343
- .ui-eyebrow {
344
- @apply text-muted-foreground text-xs font-medium uppercase tracking-widest;
345
- }
346
-
347
- /* Command rows: action hints stay silent until the row is highlighted,
348
- * so the list scans clean and the affordance appears exactly when usable. */
349
- [data-slot="command-item"] [data-slot="command-shortcut"] {
350
- opacity: 0;
351
- transition: opacity 120ms ease-out;
352
- }
353
- [data-slot="command-item"][data-highlighted] [data-slot="command-shortcut"] {
354
- opacity: 1;
355
- }
356
-
357
- @layer base {
358
- :root {
359
- color-scheme: light;
360
- }
361
- @media (prefers-color-scheme: dark) {
362
- :root {
363
- color-scheme: dark;
364
- }
365
- }
366
- /* Manual override: toggling `.dark` on <html> beats the OS preference. */
367
- :root.dark {
368
- color-scheme: dark;
369
- }
370
- html,
371
- body {
372
- background-color: var(--color-background);
373
- color: var(--color-foreground);
374
- font-family: var(--font-sans);
375
- -webkit-font-smoothing: antialiased;
376
- -moz-osx-font-smoothing: grayscale;
377
- }
378
- * {
379
- border-color: var(--color-border, currentColor);
380
- }
381
- *:focus {
382
- outline: none;
383
- }
384
- *:focus-visible {
385
- outline: 2px solid var(--color-ring);
386
- outline-offset: 2px;
387
- border-radius: inherit;
388
- }
389
- button {
390
- cursor: pointer;
391
- font-family: inherit;
392
- }
393
- label {
394
- color: var(--color-foreground);
395
- font-size: var(--text-sm);
396
- font-weight: var(--font-weight-medium);
397
- line-height: 1;
398
- }
399
- :where(.peer:disabled) ~ label {
400
- cursor: not-allowed;
401
- opacity: 0.7;
402
- }
403
- h1,
404
- h2,
405
- h3,
406
- h4,
407
- h5,
408
- h6 {
409
- font-family: var(--font-sans);
410
- font-weight: 600;
411
- letter-spacing: var(--tracking-tight);
412
- }
413
- @media (prefers-reduced-motion: reduce) {
414
- *,
415
- ::before,
416
- ::after {
417
- animation-duration: 0.01ms !important;
418
- animation-iteration-count: 1 !important;
419
- transition-duration: 0.01ms !important;
420
- scroll-behavior: auto !important;
421
- }
422
- }
423
- }
@@ -1,36 +0,0 @@
1
- /*
2
- * Undocumented "nokia" Navigation variant — Nokia 3310-style monochrome LCD
3
- * skin for the mobile Sheet menu. Not part of the public API surface (no
4
- * README/Storybook entry); opt in via `<Navigation variant="nokia">`.
5
- */
6
- @theme {
7
- --color-nokia-screen: #c8d6a6;
8
- --color-nokia-screen-deep: #b0c188;
9
- --color-nokia-ink: #26331b;
10
- --color-nokia-bezel: #1a1a1a;
11
- --font-nokia: ui-monospace, "SF Mono", "Courier New", monospace;
12
- }
13
-
14
- /* No `position: relative` here — SheetContent is `position: fixed` via its
15
- * own Tailwind class, and a same-specificity `.nokia-screen { position:
16
- * relative }` loaded later in the cascade would silently win and break the
17
- * sheet's fixed/inset layout (bit us once already; see labs' app.css). The
18
- * `::before` overlay below still gets a positioning context from the
19
- * ancestor's `fixed`, so this class never needs to set position itself. */
20
- .nokia-screen {
21
- background-image: repeating-linear-gradient(
22
- to bottom,
23
- rgb(0 0 0 / 0.05) 0,
24
- rgb(0 0 0 / 0.05) 1px,
25
- transparent 1px,
26
- transparent 3px
27
- );
28
- }
29
-
30
- .nokia-screen::before {
31
- content: "";
32
- position: absolute;
33
- inset: 0;
34
- box-shadow: inset 0 0 12px 2px rgb(0 0 0 / 0.25);
35
- pointer-events: none;
36
- }
@@ -1,3 +0,0 @@
1
- @import "tailwindcss" source(none);
2
- @import "./index.css";
3
- @source "../components";