@raintonic/formaui 0.3.1 → 0.9.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 (238) hide show
  1. package/CHANGELOG.md +80 -35
  2. package/README.md +22 -26
  3. package/fesm2022/raintonic-formaui-cdk-drag-drop.mjs +39 -41
  4. package/fesm2022/raintonic-formaui-cdk-drag-drop.mjs.map +1 -1
  5. package/fesm2022/raintonic-formaui-cdk-form-field.mjs +207 -3
  6. package/fesm2022/raintonic-formaui-cdk-form-field.mjs.map +1 -1
  7. package/fesm2022/raintonic-formaui-cdk-overlay.mjs +27 -2
  8. package/fesm2022/raintonic-formaui-cdk-overlay.mjs.map +1 -1
  9. package/fesm2022/raintonic-formaui-cdk-virtual-scroll.mjs +5 -12
  10. package/fesm2022/raintonic-formaui-cdk-virtual-scroll.mjs.map +1 -1
  11. package/fesm2022/raintonic-formaui-components-accordion.mjs +8 -5
  12. package/fesm2022/raintonic-formaui-components-accordion.mjs.map +1 -1
  13. package/fesm2022/raintonic-formaui-components-alert.mjs +16 -2
  14. package/fesm2022/raintonic-formaui-components-alert.mjs.map +1 -1
  15. package/fesm2022/raintonic-formaui-components-autocomplete.mjs +255 -462
  16. package/fesm2022/raintonic-formaui-components-autocomplete.mjs.map +1 -1
  17. package/fesm2022/raintonic-formaui-components-avatar.mjs +34 -59
  18. package/fesm2022/raintonic-formaui-components-avatar.mjs.map +1 -1
  19. package/fesm2022/raintonic-formaui-components-badge.mjs +2 -2
  20. package/fesm2022/raintonic-formaui-components-badge.mjs.map +1 -1
  21. package/fesm2022/raintonic-formaui-components-breadcrumb.mjs +4 -4
  22. package/fesm2022/raintonic-formaui-components-breadcrumb.mjs.map +1 -1
  23. package/fesm2022/raintonic-formaui-components-button-group.mjs +2 -2
  24. package/fesm2022/raintonic-formaui-components-button-group.mjs.map +1 -1
  25. package/fesm2022/raintonic-formaui-components-button.mjs +15 -20
  26. package/fesm2022/raintonic-formaui-components-button.mjs.map +1 -1
  27. package/fesm2022/raintonic-formaui-components-card.mjs +2 -2
  28. package/fesm2022/raintonic-formaui-components-card.mjs.map +1 -1
  29. package/fesm2022/raintonic-formaui-components-checkbox.mjs +2 -2
  30. package/fesm2022/raintonic-formaui-components-checkbox.mjs.map +1 -1
  31. package/fesm2022/raintonic-formaui-components-chip.mjs +97 -0
  32. package/fesm2022/raintonic-formaui-components-chip.mjs.map +1 -0
  33. package/fesm2022/raintonic-formaui-components-data-table.mjs +69 -29
  34. package/fesm2022/raintonic-formaui-components-data-table.mjs.map +1 -1
  35. package/fesm2022/raintonic-formaui-components-date-picker.mjs +223 -144
  36. package/fesm2022/raintonic-formaui-components-date-picker.mjs.map +1 -1
  37. package/fesm2022/raintonic-formaui-components-divider.mjs +2 -2
  38. package/fesm2022/raintonic-formaui-components-divider.mjs.map +1 -1
  39. package/fesm2022/raintonic-formaui-components-drawer.mjs +2 -2
  40. package/fesm2022/raintonic-formaui-components-drawer.mjs.map +1 -1
  41. package/fesm2022/raintonic-formaui-components-dropdown-menu.mjs +888 -0
  42. package/fesm2022/raintonic-formaui-components-dropdown-menu.mjs.map +1 -0
  43. package/fesm2022/raintonic-formaui-components-dual-tier-navigation.mjs +774 -0
  44. package/fesm2022/raintonic-formaui-components-dual-tier-navigation.mjs.map +1 -0
  45. package/fesm2022/raintonic-formaui-components-empty-state.mjs +2 -2
  46. package/fesm2022/raintonic-formaui-components-empty-state.mjs.map +1 -1
  47. package/fesm2022/raintonic-formaui-components-file-upload.mjs +2 -2
  48. package/fesm2022/raintonic-formaui-components-file-upload.mjs.map +1 -1
  49. package/fesm2022/raintonic-formaui-components-form-field.mjs +81 -50
  50. package/fesm2022/raintonic-formaui-components-form-field.mjs.map +1 -1
  51. package/fesm2022/raintonic-formaui-components-icon.mjs +2 -2
  52. package/fesm2022/raintonic-formaui-components-icon.mjs.map +1 -1
  53. package/fesm2022/raintonic-formaui-components-input.mjs +47 -12
  54. package/fesm2022/raintonic-formaui-components-input.mjs.map +1 -1
  55. package/fesm2022/raintonic-formaui-components-list.mjs +4 -4
  56. package/fesm2022/raintonic-formaui-components-list.mjs.map +1 -1
  57. package/fesm2022/raintonic-formaui-components-number-input.mjs +20 -12
  58. package/fesm2022/raintonic-formaui-components-number-input.mjs.map +1 -1
  59. package/fesm2022/raintonic-formaui-components-paginator.mjs +2 -2
  60. package/fesm2022/raintonic-formaui-components-paginator.mjs.map +1 -1
  61. package/fesm2022/raintonic-formaui-components-password-input.mjs +35 -110
  62. package/fesm2022/raintonic-formaui-components-password-input.mjs.map +1 -1
  63. package/fesm2022/raintonic-formaui-components-popover.mjs +3 -2
  64. package/fesm2022/raintonic-formaui-components-popover.mjs.map +1 -1
  65. package/fesm2022/raintonic-formaui-components-progressbar.mjs +3 -2
  66. package/fesm2022/raintonic-formaui-components-progressbar.mjs.map +1 -1
  67. package/fesm2022/raintonic-formaui-components-radio.mjs +5 -6
  68. package/fesm2022/raintonic-formaui-components-radio.mjs.map +1 -1
  69. package/fesm2022/raintonic-formaui-components-select.mjs +257 -412
  70. package/fesm2022/raintonic-formaui-components-select.mjs.map +1 -1
  71. package/fesm2022/raintonic-formaui-components-side-panel.mjs +2 -2
  72. package/fesm2022/raintonic-formaui-components-side-panel.mjs.map +1 -1
  73. package/fesm2022/raintonic-formaui-components-sidebar-nav-menu.mjs +525 -0
  74. package/fesm2022/raintonic-formaui-components-sidebar-nav-menu.mjs.map +1 -0
  75. package/fesm2022/raintonic-formaui-components-skeleton.mjs +2 -2
  76. package/fesm2022/raintonic-formaui-components-skeleton.mjs.map +1 -1
  77. package/fesm2022/raintonic-formaui-components-slider.mjs +2 -2
  78. package/fesm2022/raintonic-formaui-components-slider.mjs.map +1 -1
  79. package/fesm2022/raintonic-formaui-components-spinner.mjs +2 -2
  80. package/fesm2022/raintonic-formaui-components-spinner.mjs.map +1 -1
  81. package/fesm2022/raintonic-formaui-components-stepper.mjs +50 -45
  82. package/fesm2022/raintonic-formaui-components-stepper.mjs.map +1 -1
  83. package/fesm2022/raintonic-formaui-components-strength-meter.mjs +149 -0
  84. package/fesm2022/raintonic-formaui-components-strength-meter.mjs.map +1 -0
  85. package/fesm2022/raintonic-formaui-components-tab.mjs +2 -2
  86. package/fesm2022/raintonic-formaui-components-tab.mjs.map +1 -1
  87. package/fesm2022/raintonic-formaui-components-time-picker.mjs +194 -154
  88. package/fesm2022/raintonic-formaui-components-time-picker.mjs.map +1 -1
  89. package/fesm2022/raintonic-formaui-components-toggle-group.mjs +302 -0
  90. package/fesm2022/raintonic-formaui-components-toggle-group.mjs.map +1 -0
  91. package/fesm2022/raintonic-formaui-components-toggle.mjs +2 -2
  92. package/fesm2022/raintonic-formaui-components-toggle.mjs.map +1 -1
  93. package/fesm2022/raintonic-formaui-components-toolbar.mjs +2 -2
  94. package/fesm2022/raintonic-formaui-components-toolbar.mjs.map +1 -1
  95. package/fesm2022/raintonic-formaui-components-tooltip.mjs +10 -4
  96. package/fesm2022/raintonic-formaui-components-tooltip.mjs.map +1 -1
  97. package/fesm2022/raintonic-formaui-components-topbar.mjs +60 -0
  98. package/fesm2022/raintonic-formaui-components-topbar.mjs.map +1 -0
  99. package/fesm2022/raintonic-formaui-components-tree-select.mjs +59 -69
  100. package/fesm2022/raintonic-formaui-components-tree-select.mjs.map +1 -1
  101. package/fesm2022/raintonic-formaui-components-tree-table.mjs +2 -2
  102. package/fesm2022/raintonic-formaui-components-tree-table.mjs.map +1 -1
  103. package/fesm2022/raintonic-formaui-components-tree.mjs +31 -5
  104. package/fesm2022/raintonic-formaui-components-tree.mjs.map +1 -1
  105. package/fesm2022/raintonic-formaui-core.mjs +279 -1
  106. package/fesm2022/raintonic-formaui-core.mjs.map +1 -1
  107. package/fesm2022/raintonic-formaui-services-breakpoint.mjs +93 -0
  108. package/fesm2022/raintonic-formaui-services-breakpoint.mjs.map +1 -0
  109. package/fesm2022/raintonic-formaui-services-dialog.mjs +314 -16
  110. package/fesm2022/raintonic-formaui-services-dialog.mjs.map +1 -1
  111. package/fesm2022/raintonic-formaui-services-notification.mjs +93 -29
  112. package/fesm2022/raintonic-formaui-services-notification.mjs.map +1 -1
  113. package/fesm2022/raintonic-formaui-services-theme.mjs +46 -196
  114. package/fesm2022/raintonic-formaui-services-theme.mjs.map +1 -1
  115. package/fesm2022/raintonic-formaui.mjs +1 -1
  116. package/fesm2022/raintonic-formaui.mjs.map +1 -1
  117. package/llms-full.txt +2329 -450
  118. package/llms.txt +36 -33
  119. package/package.json +42 -19
  120. package/styles/fonts/Geist-Bold.woff2 +0 -0
  121. package/styles/fonts/Geist-Italic.woff2 +0 -0
  122. package/styles/fonts/Geist-Light.woff2 +0 -0
  123. package/styles/fonts/Geist-Medium.woff2 +0 -0
  124. package/styles/fonts/Geist-Regular.woff2 +0 -0
  125. package/styles/fonts/Geist-SemiBold.woff2 +0 -0
  126. package/styles/fonts/GeistMono-Regular.woff2 +0 -0
  127. package/styles/generated/_tokens.scss +906 -0
  128. package/styles/index.scss +11 -10
  129. package/styles/partials/_brand.scss +46 -0
  130. package/styles/partials/_constants.scss +22 -20
  131. package/styles/partials/_fonts.scss +54 -10
  132. package/styles/partials/_grid.scss +29 -18
  133. package/styles/partials/_mixins.scss +69 -27
  134. package/styles/partials/_motion.scss +28 -33
  135. package/styles/partials/_theme.scss +28 -255
  136. package/styles/partials/_type.scss +117 -0
  137. package/styles/partials/_typography.scss +45 -45
  138. package/styles/partials/_utilities.scss +198 -98
  139. package/styles/partials/components/_button.scss +144 -75
  140. package/styles/partials/components/_dialog.scss +181 -180
  141. package/styles/partials/components/_overlay.scss +87 -87
  142. package/styles/partials/themes/_dark.scss +3 -268
  143. package/styles/partials/themes/_light.scss +4 -268
  144. package/styles/styles.css +7744 -0
  145. package/styles/styles.entry.scss +3 -0
  146. package/styles/utilities.css +4802 -0
  147. package/styles/utilities.entry.scss +3 -0
  148. package/types/raintonic-formaui-cdk-drag-drop.d.ts +0 -1
  149. package/types/raintonic-formaui-cdk-drag-drop.d.ts.map +1 -1
  150. package/types/raintonic-formaui-cdk-form-field.d.ts +118 -2
  151. package/types/raintonic-formaui-cdk-form-field.d.ts.map +1 -1
  152. package/types/raintonic-formaui-cdk-overlay.d.ts +2 -0
  153. package/types/raintonic-formaui-cdk-overlay.d.ts.map +1 -1
  154. package/types/raintonic-formaui-cdk-virtual-scroll.d.ts +0 -1
  155. package/types/raintonic-formaui-cdk-virtual-scroll.d.ts.map +1 -1
  156. package/types/raintonic-formaui-components-accordion.d.ts +1 -1
  157. package/types/raintonic-formaui-components-accordion.d.ts.map +1 -1
  158. package/types/raintonic-formaui-components-alert.d.ts +6 -1
  159. package/types/raintonic-formaui-components-alert.d.ts.map +1 -1
  160. package/types/raintonic-formaui-components-autocomplete.d.ts +73 -116
  161. package/types/raintonic-formaui-components-autocomplete.d.ts.map +1 -1
  162. package/types/raintonic-formaui-components-avatar.d.ts +13 -31
  163. package/types/raintonic-formaui-components-avatar.d.ts.map +1 -1
  164. package/types/raintonic-formaui-components-button.d.ts +4 -10
  165. package/types/raintonic-formaui-components-button.d.ts.map +1 -1
  166. package/types/raintonic-formaui-components-chip.d.ts +43 -0
  167. package/types/raintonic-formaui-components-chip.d.ts.map +1 -0
  168. package/types/raintonic-formaui-components-data-table.d.ts +48 -11
  169. package/types/raintonic-formaui-components-data-table.d.ts.map +1 -1
  170. package/types/raintonic-formaui-components-date-picker.d.ts +59 -23
  171. package/types/raintonic-formaui-components-date-picker.d.ts.map +1 -1
  172. package/types/raintonic-formaui-components-dropdown-menu.d.ts +394 -0
  173. package/types/raintonic-formaui-components-dropdown-menu.d.ts.map +1 -0
  174. package/types/raintonic-formaui-components-dual-tier-navigation.d.ts +87 -0
  175. package/types/raintonic-formaui-components-dual-tier-navigation.d.ts.map +1 -0
  176. package/types/raintonic-formaui-components-form-field.d.ts +51 -21
  177. package/types/raintonic-formaui-components-form-field.d.ts.map +1 -1
  178. package/types/raintonic-formaui-components-input.d.ts +20 -11
  179. package/types/raintonic-formaui-components-input.d.ts.map +1 -1
  180. package/types/raintonic-formaui-components-number-input.d.ts +5 -3
  181. package/types/raintonic-formaui-components-number-input.d.ts.map +1 -1
  182. package/types/raintonic-formaui-components-password-input.d.ts +18 -32
  183. package/types/raintonic-formaui-components-password-input.d.ts.map +1 -1
  184. package/types/raintonic-formaui-components-popover.d.ts.map +1 -1
  185. package/types/raintonic-formaui-components-progressbar.d.ts +1 -1
  186. package/types/raintonic-formaui-components-progressbar.d.ts.map +1 -1
  187. package/types/raintonic-formaui-components-radio.d.ts +1 -2
  188. package/types/raintonic-formaui-components-radio.d.ts.map +1 -1
  189. package/types/raintonic-formaui-components-select.d.ts +107 -76
  190. package/types/raintonic-formaui-components-select.d.ts.map +1 -1
  191. package/types/raintonic-formaui-components-sidebar-nav-menu.d.ts +223 -0
  192. package/types/raintonic-formaui-components-sidebar-nav-menu.d.ts.map +1 -0
  193. package/types/raintonic-formaui-components-stepper.d.ts +4 -2
  194. package/types/raintonic-formaui-components-stepper.d.ts.map +1 -1
  195. package/types/raintonic-formaui-components-strength-meter.d.ts +78 -0
  196. package/types/raintonic-formaui-components-strength-meter.d.ts.map +1 -0
  197. package/types/raintonic-formaui-components-time-picker.d.ts +44 -24
  198. package/types/raintonic-formaui-components-time-picker.d.ts.map +1 -1
  199. package/types/raintonic-formaui-components-toggle-group.d.ts +100 -0
  200. package/types/raintonic-formaui-components-toggle-group.d.ts.map +1 -0
  201. package/types/raintonic-formaui-components-tooltip.d.ts +2 -1
  202. package/types/raintonic-formaui-components-tooltip.d.ts.map +1 -1
  203. package/types/raintonic-formaui-components-topbar.d.ts +48 -0
  204. package/types/raintonic-formaui-components-topbar.d.ts.map +1 -0
  205. package/types/raintonic-formaui-components-tree-select.d.ts +25 -9
  206. package/types/raintonic-formaui-components-tree-select.d.ts.map +1 -1
  207. package/types/raintonic-formaui-components-tree.d.ts +12 -1
  208. package/types/raintonic-formaui-components-tree.d.ts.map +1 -1
  209. package/types/raintonic-formaui-core.d.ts +243 -5
  210. package/types/raintonic-formaui-core.d.ts.map +1 -1
  211. package/types/raintonic-formaui-services-breakpoint.d.ts +44 -0
  212. package/types/raintonic-formaui-services-breakpoint.d.ts.map +1 -0
  213. package/types/raintonic-formaui-services-dialog.d.ts +141 -2
  214. package/types/raintonic-formaui-services-dialog.d.ts.map +1 -1
  215. package/types/raintonic-formaui-services-notification.d.ts +24 -2
  216. package/types/raintonic-formaui-services-notification.d.ts.map +1 -1
  217. package/types/raintonic-formaui-services-theme.d.ts +13 -103
  218. package/types/raintonic-formaui-services-theme.d.ts.map +1 -1
  219. package/types/raintonic-formaui.d.ts +1 -1
  220. package/fesm2022/raintonic-formaui-components-big-menu.mjs +0 -86
  221. package/fesm2022/raintonic-formaui-components-big-menu.mjs.map +0 -1
  222. package/fesm2022/raintonic-formaui-components-menu.mjs +0 -896
  223. package/fesm2022/raintonic-formaui-components-menu.mjs.map +0 -1
  224. package/fesm2022/raintonic-formaui-components-sidebar.mjs +0 -275
  225. package/fesm2022/raintonic-formaui-components-sidebar.mjs.map +0 -1
  226. package/fesm2022/raintonic-formaui-components-tag.mjs +0 -95
  227. package/fesm2022/raintonic-formaui-components-tag.mjs.map +0 -1
  228. package/styles/_fonts-entry.scss +0 -3
  229. package/styles/fonts/inter-tight-latin-italic.woff2 +0 -0
  230. package/styles/fonts/inter-tight-latin.woff2 +0 -0
  231. package/types/raintonic-formaui-components-big-menu.d.ts +0 -73
  232. package/types/raintonic-formaui-components-big-menu.d.ts.map +0 -1
  233. package/types/raintonic-formaui-components-menu.d.ts +0 -403
  234. package/types/raintonic-formaui-components-menu.d.ts.map +0 -1
  235. package/types/raintonic-formaui-components-sidebar.d.ts +0 -185
  236. package/types/raintonic-formaui-components-sidebar.d.ts.map +0 -1
  237. package/types/raintonic-formaui-components-tag.d.ts +0 -43
  238. package/types/raintonic-formaui-components-tag.d.ts.map +0 -1
@@ -1,276 +1,49 @@
1
- // Theme system with CSS variables
2
- @use 'constants' as *;
3
- @use './themes/light' as light;
4
- @use './themes/dark' as dark;
1
+ // Theme system bridges Style Dictionary generated tokens to FormaUI selectors.
2
+ @use '../generated/tokens' as tokens;
5
3
 
6
- // Re-export mixins so existing @use "theme" still works
7
4
  @mixin fui-light-theme {
8
- @include light.fui-light-theme;
5
+ @include tokens.fui-light-theme;
9
6
  }
10
7
  @mixin fui-dark-theme {
11
- @include dark.fui-dark-theme;
8
+ @include tokens.fui-dark-theme;
12
9
  }
13
10
 
14
- // Default theme setup
11
+ // Mode-invariant tokens.
15
12
  :root {
16
- @include fui-light-theme();
17
-
18
- // === SPACING SYSTEM ===
19
- --fui-spacing-01: #{$fui-spacing-01};
20
- --fui-spacing-02: #{$fui-spacing-02};
21
- --fui-spacing-03: #{$fui-spacing-03};
22
- --fui-spacing-04: #{$fui-spacing-04};
23
- --fui-spacing-05: #{$fui-spacing-05};
24
- --fui-spacing-06: #{$fui-spacing-06};
25
- --fui-spacing-07: #{$fui-spacing-07};
26
- --fui-spacing-08: #{$fui-spacing-08};
27
- --fui-spacing-09: #{$fui-spacing-09};
28
- --fui-spacing-10: #{$fui-spacing-10};
29
- --fui-spacing-11: #{$fui-spacing-11};
30
- --fui-spacing-12: #{$fui-spacing-12};
31
-
32
- // === GAP TOKENS (Figma: forma-gap) ===
33
- --fui-gap-4: 4px;
34
- --fui-gap-8: 8px;
35
- --fui-gap-10: 10px;
36
- --fui-gap-16: 16px;
37
- --fui-gap-24: 24px;
38
- --fui-gap-32: 32px;
39
- --fui-gap-40: 40px;
40
- --fui-gap-48: 48px;
41
-
42
- // === PADDING TOKENS (Figma: forma-padding) ===
43
- --fui-padding-8: 8px;
44
- --fui-padding-10: 10px;
45
- --fui-padding-12: 12px;
46
- --fui-padding-16: 16px;
47
- --fui-padding-24: 24px;
48
- --fui-padding-32: 32px;
49
- --fui-padding-40: 40px;
50
- --fui-padding-48: 48px;
51
-
52
- // === TYPOGRAPHY SCALE ===
53
- // Font families
54
- --fui-font-family-sans: 'Inter Tight', sans-serif;
55
- --fui-font-family-mono: 'DM Mono', monospace;
56
-
57
- // Font sizes (rem)
58
- --fui-font-size-01: 0.75rem;
59
- --fui-font-size-02: 0.875rem;
60
- --fui-font-size-03: 1rem;
61
- --fui-font-size-04: 1.125rem;
62
- --fui-font-size-05: 1.25rem;
63
- --fui-font-size-06: 1.5rem;
64
- --fui-font-size-07: 1.875rem;
65
- --fui-font-size-08: 2.25rem;
66
- --fui-font-size-09: 3rem;
67
- --fui-font-size-10: 3.75rem;
68
- --fui-font-size-11: 4.5rem;
69
-
70
- // Font weights
71
- --fui-font-weight-light: 300;
72
- --fui-font-weight-regular: 400;
73
- --fui-font-weight-medium: 500;
74
- --fui-font-weight-semibold: 600;
75
- --fui-font-weight-bold: 700;
76
-
77
- // Line heights
78
- --fui-line-height-condensed: 1.25rem;
79
- --fui-line-height-body: 1.5rem;
80
- --fui-line-height-heading: 1.125rem;
81
- // Detailed line-height scale for utilities
82
- --fui-line-height-01: 1.125rem;
83
- --fui-line-height-02: 1.25rem;
84
- --fui-line-height-03: 1.375rem;
85
- --fui-line-height-04: 1.5rem;
86
- --fui-line-height-05: 1.625rem;
87
- --fui-line-height-06: 1.75rem;
88
- --fui-line-height-07: 2rem;
89
-
90
- // Specific line-heights for typography utilities
91
- --fui-line-height-text-xs: 18px;
92
- --fui-line-height-text-sm: 20px;
93
- --fui-line-height-text-md: 24px;
94
- --fui-line-height-text-lg: 28px;
95
- --fui-line-height-text-xl: 30px;
96
-
97
- --fui-line-height-display-xs: 32px;
98
- --fui-line-height-display-sm: 38px;
99
- --fui-line-height-display-md: 44px;
100
- // For display-lg original design uses 80% (≈38.4px at 3rem); keep multiplier
101
- --fui-line-height-display-lg: 0.8;
102
- --fui-line-height-display-xl: 72px;
103
- --fui-line-height-display-2xl: 90px;
104
-
105
- // Letter spacing
106
- --fui-letter-spacing-tight: -0.01em;
107
- --fui-letter-spacing-normal: 0;
108
- --fui-letter-spacing-wide: 0.02em;
109
-
110
- // === MOTION SYSTEM ===
111
- // Durations
112
- --fui-duration-fast-01: 70ms;
113
- --fui-duration-fast-02: 110ms;
114
- --fui-duration-moderate-01: 150ms;
115
- --fui-duration-moderate-02: 240ms;
116
- --fui-duration-slow-01: 400ms;
117
- --fui-duration-slow-02: 700ms;
118
-
119
- // Easings
120
- --fui-ease-standard: cubic-bezier(0.2, 0, 0.38, 0.9);
121
- --fui-ease-entrance: cubic-bezier(0, 0, 0.38, 0.9);
122
- --fui-ease-exit: cubic-bezier(0.2, 0, 1, 0.9);
123
- --fui-ease-expressive: cubic-bezier(0.4, 0.14, 0.3, 1);
124
-
125
- // === LAYOUT SYSTEM ===
126
- // Border radius (Figma: forma-radius)
127
- --fui-border-radius-xs: 4px;
128
- --fui-border-radius-sm: 8px;
129
- --fui-border-radius-md: 10px;
130
- --fui-border-radius-lg: 16px;
131
- --fui-border-radius-xl: 24px;
132
- --fui-border-radius-pill: 999px;
133
-
134
- // Border widths
135
- --fui-border-width-sm: 1px;
136
- --fui-border-width-md: 2px;
137
- --fui-border-width-lg: 3px;
138
-
139
- // Shadows
140
- --fui-shadow-01: 0 1px 2px rgba(0, 0, 0, 0.1);
141
- --fui-shadow-02: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
142
- --fui-shadow-03: 0 3px 6px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.12);
143
- --fui-shadow-04: 0 10px 20px rgba(0, 0, 0, 0.15), 0 3px 6px rgba(0, 0, 0, 0.1);
144
- --fui-shadow-05: 0 15px 25px rgba(0, 0, 0, 0.15), 0 5px 10px rgba(0, 0, 0, 0.05);
145
-
146
- // === COMPONENT SIZES ===
147
- // Button heights
148
- --fui-button-height-sm: 1.75rem; // 28px
149
- --fui-button-height-md: 2.25rem; // 36px
150
- --fui-button-height-lg: 2.75rem; // 44px
151
- --fui-button-height-xl: 3.25rem; // 52px
152
- --fui-button-height-2xl: 4rem; // 64px
153
-
154
- // Input heights
155
- --fui-input-height: 2.25rem; // 36px (matches --fui-button-height-md)
156
-
157
- // Icon sizes
158
- --fui-icon-size-sm: 0.75rem; // 16px
159
- --fui-icon-size-md: 1.25rem; // 20px
160
- --fui-icon-size-lg: 1.5rem; // 24px
161
- --fui-icon-size-xl: 2rem; // 32px
162
-
163
- // === Z-INDEX SCALE ===
164
- --fui-z-dropdown: 1000;
165
- --fui-z-sticky: 1020;
166
- --fui-z-fixed: 1030;
167
- --fui-z-modal-backdrop: 1040;
168
- --fui-z-modal: 1050;
169
- --fui-z-popover: 1060;
170
- --fui-z-tooltip: 1070;
171
-
172
- // === BREAKPOINTS ===
173
- --fui-breakpoint-xs: #{$fui-breakpoint-xs};
174
- --fui-breakpoint-sm: #{$fui-breakpoint-sm};
175
- --fui-breakpoint-md: #{$fui-breakpoint-md};
176
- --fui-breakpoint-lg: #{$fui-breakpoint-lg};
177
- --fui-breakpoint-xl: #{$fui-breakpoint-xl};
178
- --fui-breakpoint-xxl: #{$fui-breakpoint-xxl};
179
-
180
- // === GRID SYSTEM ===
181
- --fui-grid-columns: #{$fui-grid-columns};
182
- --fui-grid-gutter: #{$fui-grid-gutter};
183
- --fui-container-max-width: #{$fui-container-max-width};
184
-
185
- // === TRANSITIONS ===
186
- // Standard transitions for consistency
187
- --fui-transition-all: all var(--fui-duration-fast-02) var(--fui-ease-standard);
188
- --fui-transition-colors:
189
- background-color var(--fui-duration-fast-02) var(--fui-ease-standard),
190
- border-color var(--fui-duration-fast-02) var(--fui-ease-standard),
191
- color var(--fui-duration-fast-02) var(--fui-ease-standard);
192
- --fui-transition-transform: transform var(--fui-duration-moderate-01) var(--fui-ease-standard);
193
- --fui-transition-opacity: opacity var(--fui-duration-fast-02) var(--fui-ease-standard);
194
- --fui-transition-shadow: box-shadow var(--fui-duration-fast-02) var(--fui-ease-standard);
195
-
196
- // === MOTION: ANIMATION DEFAULTS ===
197
- // Component-level animation tokens that can be themed
198
- --fui-icon-spin-duration: var(--fui-duration-moderate-01);
199
- --fui-icon-spin-timing: linear;
200
- --fui-icon-pulse-duration: var(--fui-duration-slow-01);
201
- --fui-icon-pulse-timing: var(--fui-ease-expressive);
202
-
203
- --fui-opacity-disabled: 0.5;
204
-
205
- --fui-tooltip-background: #334155;
206
- --fui-tooltip-text: #f8fafc;
207
-
208
- // === ADDITIONAL LAYOUT TOKENS ===
209
- --fui-border-radius-none: 0;
210
-
211
- // === FONT SIZE ALIASES (semantic) ===
212
- --fui-font-size-xs: var(--fui-font-size-01);
213
- --fui-font-size-sm: var(--fui-font-size-02);
214
- --fui-font-size-md: var(--fui-font-size-03);
215
-
216
- // === SHADOW ALIASES ===
217
- --fui-shadow-lg: var(--fui-shadow-04);
218
-
219
- // === CARD COMPONENT TOKENS ===
220
- --fui-card-shadow: var(--fui-shadow-02);
221
- --fui-card-shadow-hover: var(--fui-shadow-04);
222
- --fui-card-padding: var(--fui-spacing-05);
223
- --fui-card-border-radius: var(--fui-border-radius-xl);
224
-
225
- // === FOCUS RING TOKENS ===
226
- --fui-focus-ring-width: 2px;
227
- --fui-focus-ring-color: var(--fui-primary-50);
228
- --fui-focus-ring-offset: 2px;
229
-
230
- // === DENSITY SYSTEM ===
231
- --fui-density-scale: 1;
232
-
233
- // Control heights
234
- --fui-control-height-sm: calc(1.5rem * var(--fui-density-scale));
235
- --fui-control-height-md: calc(2.5rem * var(--fui-density-scale));
236
- --fui-control-height-lg: calc(3rem * var(--fui-density-scale));
237
-
238
- // Control padding
239
- --fui-control-padding-sm: calc(var(--fui-spacing-02) * var(--fui-density-scale));
240
- --fui-control-padding-md: calc(var(--fui-spacing-03) * var(--fui-density-scale));
241
- --fui-control-padding-lg: calc(var(--fui-spacing-04) * var(--fui-density-scale));
13
+ @include tokens.fui-tokens-root();
14
+ }
242
15
 
243
- // Cell spacing (for tables)
244
- --fui-cell-padding-y: calc(var(--fui-spacing-03) * var(--fui-density-scale));
245
- --fui-cell-padding-x: calc(var(--fui-spacing-04) * var(--fui-density-scale));
16
+ // Light = default (anche senza attributo) + scopabile via data-theme.
17
+ :root,
18
+ :root[data-theme='light'],
19
+ [data-theme='light'] {
20
+ @include fui-light-theme();
246
21
  }
247
22
 
248
- // Dark theme class
249
- .fui-theme-dark {
23
+ // Dark via data-theme (scopabile su qualsiasi sottoalbero).
24
+ :root[data-theme='dark'],
25
+ [data-theme='dark'] {
250
26
  @include fui-dark-theme();
251
27
  }
252
28
 
253
- // Theme toggle utility
254
- //@media (prefers-color-scheme: dark) {
255
- // :root:not(.fui-theme-light) {
256
- // @include fui-theme($fui-default-primary, $fui-default-secondary, true);
257
- // @include fui-dark-theme();
258
- // }
259
- //}
260
-
261
- // High contrast mode support (WCAG 2.1 AA)
29
+ // High contrast (WCAG 2.1 AA).
262
30
  @media (prefers-contrast: more) {
263
- :root {
264
- --fui-border-color: #000;
31
+ :root,
32
+ [data-theme='light'] {
33
+ --fui-border-default: #000;
265
34
  --fui-text-primary: #000;
266
- --fui-focus-ring-color: #000;
35
+ // Il focus-ring mixin (lib/styles/partials/_mixins.scss) usa --fui-border-primary:
36
+ // sovrascrivere QUELLO per ottenere il ring nero in HC (non --fui-state-focus-ring,
37
+ // che non è consumato dal ring renderizzato).
38
+ --fui-border-primary: #000;
39
+ --fui-state-focus-ring: #000;
267
40
  --fui-border-width-sm: 2px;
268
41
  --fui-border-width-md: 3px;
269
42
  }
270
-
271
- .fui-theme-dark {
272
- --fui-border-color: #fff;
43
+ [data-theme='dark'] {
44
+ --fui-border-default: #fff;
273
45
  --fui-text-primary: #fff;
274
- --fui-focus-ring-color: #fff;
46
+ --fui-border-primary: #fff;
47
+ --fui-state-focus-ring: #fff;
275
48
  }
276
49
  }
@@ -0,0 +1,117 @@
1
+ // FormaUI — Composed type scale (PRD). SCSS mixins + public .fui-type-* classes.
2
+ // Each role bundles font-size + line-height + weight via primitive CSS vars.
3
+
4
+ @mixin fui-type-display {
5
+ font-size: var(--fui-text-5xl);
6
+ line-height: var(--fui-leading-tight);
7
+ font-weight: var(--fui-weight-bold);
8
+ }
9
+ @mixin fui-type-h1 {
10
+ font-size: var(--fui-text-4xl);
11
+ line-height: var(--fui-leading-tight);
12
+ font-weight: var(--fui-weight-bold);
13
+ }
14
+ @mixin fui-type-h2 {
15
+ font-size: var(--fui-text-3xl);
16
+ line-height: var(--fui-leading-tight);
17
+ font-weight: var(--fui-weight-semibold);
18
+ }
19
+ @mixin fui-type-h3 {
20
+ font-size: var(--fui-text-2xl);
21
+ line-height: var(--fui-leading-snug);
22
+ font-weight: var(--fui-weight-semibold);
23
+ }
24
+ @mixin fui-type-h4 {
25
+ font-size: var(--fui-text-xl);
26
+ line-height: var(--fui-leading-snug);
27
+ font-weight: var(--fui-weight-semibold);
28
+ }
29
+ @mixin fui-type-h5 {
30
+ font-size: var(--fui-text-lg);
31
+ line-height: var(--fui-leading-snug);
32
+ font-weight: var(--fui-weight-semibold);
33
+ }
34
+ @mixin fui-type-h6 {
35
+ font-size: var(--fui-text-md);
36
+ line-height: var(--fui-leading-snug);
37
+ font-weight: var(--fui-weight-semibold);
38
+ }
39
+ @mixin fui-type-body-lg {
40
+ font-size: var(--fui-text-md);
41
+ line-height: var(--fui-leading-relaxed);
42
+ font-weight: var(--fui-weight-regular);
43
+ }
44
+ @mixin fui-type-body {
45
+ font-size: var(--fui-text-base);
46
+ line-height: var(--fui-leading-normal);
47
+ font-weight: var(--fui-weight-regular);
48
+ }
49
+ @mixin fui-type-body-sm {
50
+ font-size: var(--fui-text-sm);
51
+ line-height: var(--fui-leading-normal);
52
+ font-weight: var(--fui-weight-regular);
53
+ }
54
+ @mixin fui-type-label {
55
+ font-size: var(--fui-text-sm);
56
+ line-height: var(--fui-leading-normal);
57
+ font-weight: var(--fui-weight-medium);
58
+ }
59
+ @mixin fui-type-label-sm {
60
+ font-size: var(--fui-text-xs);
61
+ line-height: var(--fui-leading-normal);
62
+ font-weight: var(--fui-weight-medium);
63
+ }
64
+ @mixin fui-type-caption {
65
+ font-size: var(--fui-text-xs);
66
+ line-height: var(--fui-leading-snug);
67
+ font-weight: var(--fui-weight-regular);
68
+ }
69
+ @mixin fui-type-code {
70
+ font-family: var(--fui-font-mono);
71
+ font-size: var(--fui-text-sm);
72
+ line-height: var(--fui-leading-normal);
73
+ font-weight: var(--fui-weight-regular);
74
+ }
75
+
76
+ .fui-type-display {
77
+ @include fui-type-display;
78
+ }
79
+ .fui-type-h1 {
80
+ @include fui-type-h1;
81
+ }
82
+ .fui-type-h2 {
83
+ @include fui-type-h2;
84
+ }
85
+ .fui-type-h3 {
86
+ @include fui-type-h3;
87
+ }
88
+ .fui-type-h4 {
89
+ @include fui-type-h4;
90
+ }
91
+ .fui-type-h5 {
92
+ @include fui-type-h5;
93
+ }
94
+ .fui-type-h6 {
95
+ @include fui-type-h6;
96
+ }
97
+ .fui-type-body-lg {
98
+ @include fui-type-body-lg;
99
+ }
100
+ .fui-type-body {
101
+ @include fui-type-body;
102
+ }
103
+ .fui-type-body-sm {
104
+ @include fui-type-body-sm;
105
+ }
106
+ .fui-type-label {
107
+ @include fui-type-label;
108
+ }
109
+ .fui-type-label-sm {
110
+ @include fui-type-label-sm;
111
+ }
112
+ .fui-type-caption {
113
+ @include fui-type-caption;
114
+ }
115
+ .fui-type-code {
116
+ @include fui-type-code;
117
+ }
@@ -1,112 +1,112 @@
1
- .fui-text-xs {
2
- font-size: var(--fui-font-size-01);
1
+ .fui-text-xs {
2
+ font-size: var(--fui-text-sm);
3
3
  font-style: normal;
4
- font-weight: var(--fui-font-weight-regular);
5
- line-height: var(--fui-line-height-text-xs);
4
+ font-weight: var(--fui-weight-regular);
5
+ line-height: var(--fui-leading-normal);
6
6
  letter-spacing: 0.24px;
7
7
  }
8
8
 
9
9
  .fui-text-sm {
10
- font-size: var(--fui-font-size-02);
10
+ font-size: var(--fui-text-base);
11
11
  font-style: normal;
12
- font-weight: var(--fui-font-weight-regular);
13
- line-height: var(--fui-line-height-text-sm);
12
+ font-weight: var(--fui-weight-regular);
13
+ line-height: var(--fui-leading-normal);
14
14
  letter-spacing: 0.56px;
15
15
  }
16
16
 
17
17
  .fui-text-md {
18
- font-size: var(--fui-font-size-03);
18
+ font-size: var(--fui-text-md);
19
19
  font-style: normal;
20
- font-weight: var(--fui-font-weight-regular);
21
- line-height: var(--fui-line-height-text-md);
20
+ font-weight: var(--fui-weight-regular);
21
+ line-height: var(--fui-leading-normal);
22
22
  }
23
23
 
24
24
  .fui-text-lg {
25
- font-size: var(--fui-font-size-04);
25
+ font-size: var(--fui-text-lg);
26
26
  font-style: normal;
27
- font-weight: var(--fui-font-weight-regular);
28
- line-height: var(--fui-line-height-text-lg);
27
+ font-weight: var(--fui-weight-regular);
28
+ line-height: var(--fui-leading-normal);
29
29
  }
30
30
 
31
31
  .fui-text-xl {
32
- font-size: var(--fui-font-size-05);
32
+ font-size: var(--fui-text-xl);
33
33
  font-style: normal;
34
- font-weight: var(--fui-font-weight-regular);
35
- line-height: var(--fui-line-height-text-xl);
34
+ font-weight: var(--fui-weight-regular);
35
+ line-height: var(--fui-leading-normal);
36
36
  }
37
37
 
38
38
  // Display text
39
39
  .fui-display-xs {
40
- font-size: var(--fui-font-size-06);
40
+ font-size: var(--fui-text-2xl);
41
41
  font-style: normal;
42
- font-weight: var(--fui-font-weight-regular);
43
- line-height: var(--fui-line-height-display-xs);
42
+ font-weight: var(--fui-weight-regular);
43
+ line-height: var(--fui-leading-snug);
44
44
  letter-spacing: 0.48px;
45
45
  }
46
46
 
47
47
  .fui-display-sm {
48
- font-size: var(--fui-font-size-07);
48
+ font-size: var(--fui-text-3xl);
49
49
  font-style: normal;
50
- font-weight: var(--fui-font-weight-regular);
51
- line-height: var(--fui-line-height-display-sm);
50
+ font-weight: var(--fui-weight-regular);
51
+ line-height: var(--fui-leading-tight);
52
52
  }
53
53
 
54
54
  .fui-display-md {
55
- font-size: var(--fui-font-size-08);
55
+ font-size: var(--fui-text-4xl);
56
56
  font-style: normal;
57
- font-weight: var(--fui-font-weight-regular);
58
- line-height: var(--fui-line-height-display-md);
57
+ font-weight: var(--fui-weight-regular);
58
+ line-height: var(--fui-leading-tight);
59
59
  }
60
60
 
61
61
  .fui-display-lg {
62
- font-size: var(--fui-font-size-09);
62
+ font-size: var(--fui-text-5xl);
63
63
  font-style: normal;
64
- font-weight: var(--fui-font-weight-regular);
65
- line-height: var(--fui-line-height-display-lg);
64
+ font-weight: var(--fui-weight-regular);
65
+ line-height: var(--fui-leading-tight);
66
66
  }
67
67
 
68
68
  .fui-display-xl {
69
- font-size: var(--fui-font-size-10);
69
+ font-size: var(--fui-text-6xl);
70
70
  font-style: normal;
71
- font-weight: var(--fui-font-weight-regular);
72
- line-height: var(--fui-line-height-display-xl);
71
+ font-weight: var(--fui-weight-regular);
72
+ line-height: var(--fui-leading-tight);
73
73
  letter-spacing: -1.2px;
74
74
  }
75
75
 
76
76
  .fui-display-2xl {
77
- font-size: var(--fui-font-size-11);
77
+ font-size: var(--fui-text-7xl);
78
78
  font-style: normal;
79
- font-weight: var(--fui-font-weight-regular);
80
- line-height: var(--fui-line-height-display-2xl);
79
+ font-weight: var(--fui-weight-regular);
80
+ line-height: var(--fui-leading-tight);
81
81
  letter-spacing: -1.44px;
82
82
  }
83
83
 
84
84
  // Code text
85
85
  .fui-code-01 {
86
- font-family: var(--fui-font-family-mono);
87
- font-size: var(--fui-font-size-01);
88
- line-height: var(--fui-line-height-04);
86
+ font-family: var(--fui-font-mono);
87
+ font-size: var(--fui-text-sm);
88
+ line-height: var(--fui-leading-loose);
89
89
  }
90
90
 
91
91
  .fui-code-02 {
92
- font-family: var(--fui-font-family-mono);
93
- font-size: var(--fui-font-size-02);
94
- line-height: var(--fui-line-height-04);
92
+ font-family: var(--fui-font-mono);
93
+ font-size: var(--fui-text-base);
94
+ line-height: var(--fui-leading-relaxed);
95
95
  }
96
96
 
97
97
  // Helper classes
98
98
  .fui-font-light {
99
- font-weight: var(--fui-font-weight-light);
99
+ font-weight: var(--fui-weight-light);
100
100
  }
101
101
  .fui-font-regular {
102
- font-weight: var(--fui-font-weight-regular);
102
+ font-weight: var(--fui-weight-regular);
103
103
  }
104
104
  .fui-font-medium {
105
- font-weight: var(--fui-font-weight-medium);
105
+ font-weight: var(--fui-weight-medium);
106
106
  }
107
107
  .fui-font-semibold {
108
- font-weight: var(--fui-font-weight-semibold);
108
+ font-weight: var(--fui-weight-semibold);
109
109
  }
110
110
  .fui-font-bold {
111
- font-weight: var(--fui-font-weight-bold);
111
+ font-weight: var(--fui-weight-bold);
112
112
  }