@1money/component-ui 0.0.1 → 0.0.2

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 (357) hide show
  1. package/es/components/Accordion/style/index.d.ts +1 -1
  2. package/es/components/Accordion/style/index.js +1 -1
  3. package/es/components/Alert/style/index.d.ts +1 -1
  4. package/es/components/Alert/style/index.js +1 -1
  5. package/es/components/Button/style/index.d.ts +1 -1
  6. package/es/components/Button/style/index.js +1 -1
  7. package/es/components/Calendar/style/index.d.ts +1 -1
  8. package/es/components/Calendar/style/index.js +1 -1
  9. package/es/components/Carousel/style/index.d.ts +1 -1
  10. package/es/components/Carousel/style/index.js +1 -1
  11. package/es/components/Checkbox/style/index.d.ts +1 -1
  12. package/es/components/Checkbox/style/index.js +1 -1
  13. package/es/components/CoachMark/style/index.d.ts +1 -1
  14. package/es/components/CoachMark/style/index.js +1 -1
  15. package/es/components/Copy/style/index.d.ts +1 -1
  16. package/es/components/Copy/style/index.js +1 -1
  17. package/es/components/Divider/style/index.d.ts +1 -1
  18. package/es/components/Divider/style/index.js +1 -1
  19. package/es/components/Drawer/style/index.d.ts +1 -1
  20. package/es/components/Drawer/style/index.js +1 -1
  21. package/es/components/Dropdown/style/index.d.ts +1 -1
  22. package/es/components/Dropdown/style/index.js +1 -1
  23. package/es/components/Empty/style/index.d.ts +1 -1
  24. package/es/components/Empty/style/index.js +1 -1
  25. package/es/components/Flex/style/index.d.ts +1 -1
  26. package/es/components/Flex/style/index.js +1 -1
  27. package/es/components/Form/style/index.d.ts +1 -1
  28. package/es/components/Form/style/index.js +1 -1
  29. package/es/components/Grid/style/index.d.ts +1 -1
  30. package/es/components/Grid/style/index.js +1 -1
  31. package/es/components/Icons/style/index.d.ts +1 -1
  32. package/es/components/Icons/style/index.js +1 -1
  33. package/es/components/Input/Amount/style/index.d.ts +1 -1
  34. package/es/components/Input/Amount/style/index.js +1 -1
  35. package/es/components/Input/style/index.d.ts +6 -6
  36. package/es/components/Input/style/index.js +6 -6
  37. package/es/components/Modal/style/index.d.ts +1 -1
  38. package/es/components/Modal/style/index.js +1 -1
  39. package/es/components/Navigation/style/index.d.ts +2 -2
  40. package/es/components/Navigation/style/index.js +2 -2
  41. package/es/components/Notification/style/index.d.ts +1 -1
  42. package/es/components/Notification/style/index.js +1 -1
  43. package/es/components/Pagination/style/index.d.ts +1 -1
  44. package/es/components/Pagination/style/index.js +1 -1
  45. package/es/components/Popconfirm/style/index.d.ts +1 -1
  46. package/es/components/Popconfirm/style/index.js +1 -1
  47. package/es/components/ProForm/style/index.d.ts +1 -1
  48. package/es/components/ProForm/style/index.js +1 -1
  49. package/es/components/Progress/style/index.d.ts +1 -1
  50. package/es/components/Progress/style/index.js +1 -1
  51. package/es/components/Radio/style/index.d.ts +1 -1
  52. package/es/components/Radio/style/index.js +1 -1
  53. package/es/components/Segment/style/index.d.ts +1 -1
  54. package/es/components/Segment/style/index.js +1 -1
  55. package/es/components/Select/style/index.d.ts +1 -1
  56. package/es/components/Select/style/index.js +1 -1
  57. package/es/components/Skeleton/style/index.d.ts +1 -1
  58. package/es/components/Skeleton/style/index.js +1 -1
  59. package/es/components/Slider/style/index.d.ts +1 -1
  60. package/es/components/Slider/style/index.js +1 -1
  61. package/es/components/Space/style/index.d.ts +1 -1
  62. package/es/components/Space/style/index.js +1 -1
  63. package/es/components/Spinner/style/index.d.ts +1 -1
  64. package/es/components/Spinner/style/index.js +1 -1
  65. package/es/components/Step/style/index.d.ts +1 -1
  66. package/es/components/Step/style/index.js +1 -1
  67. package/es/components/Switch/style/index.d.ts +1 -1
  68. package/es/components/Switch/style/index.js +1 -1
  69. package/es/components/Table/style/index.d.ts +1 -1
  70. package/es/components/Table/style/index.js +1 -1
  71. package/es/components/Tabs/style/index.d.ts +1 -1
  72. package/es/components/Tabs/style/index.js +1 -1
  73. package/es/components/Tag/style/index.d.ts +1 -1
  74. package/es/components/Tag/style/index.js +1 -1
  75. package/es/components/Tooltip/style/index.d.ts +1 -1
  76. package/es/components/Tooltip/style/index.js +1 -1
  77. package/es/components/Trigger/style/index.d.ts +1 -1
  78. package/es/components/Trigger/style/index.js +1 -1
  79. package/es/components/Typography/style/index.d.ts +1 -1
  80. package/es/components/Typography/style/index.js +1 -1
  81. package/es/components/Upload/style/index.d.ts +2 -2
  82. package/es/components/Upload/style/index.js +2 -2
  83. package/es/components/VirtualList/style/index.d.ts +1 -1
  84. package/es/components/VirtualList/style/index.js +1 -1
  85. package/es/index.css +1 -1
  86. package/lib/components/Accordion/style/index.d.ts +1 -1
  87. package/lib/components/Accordion/style/index.js +1 -1
  88. package/lib/components/Alert/style/index.d.ts +1 -1
  89. package/lib/components/Alert/style/index.js +1 -1
  90. package/lib/components/Button/style/index.d.ts +1 -1
  91. package/lib/components/Button/style/index.js +1 -1
  92. package/lib/components/Calendar/style/index.d.ts +1 -1
  93. package/lib/components/Calendar/style/index.js +1 -1
  94. package/lib/components/Carousel/style/index.d.ts +1 -1
  95. package/lib/components/Carousel/style/index.js +1 -1
  96. package/lib/components/Checkbox/style/index.d.ts +1 -1
  97. package/lib/components/Checkbox/style/index.js +1 -1
  98. package/lib/components/CoachMark/style/index.d.ts +1 -1
  99. package/lib/components/CoachMark/style/index.js +1 -1
  100. package/lib/components/Copy/style/index.d.ts +1 -1
  101. package/lib/components/Copy/style/index.js +1 -1
  102. package/lib/components/Divider/style/index.d.ts +1 -1
  103. package/lib/components/Divider/style/index.js +1 -1
  104. package/lib/components/Drawer/style/index.d.ts +1 -1
  105. package/lib/components/Drawer/style/index.js +1 -1
  106. package/lib/components/Dropdown/style/index.d.ts +1 -1
  107. package/lib/components/Dropdown/style/index.js +1 -1
  108. package/lib/components/Empty/style/index.d.ts +1 -1
  109. package/lib/components/Empty/style/index.js +1 -1
  110. package/lib/components/Flex/style/index.d.ts +1 -1
  111. package/lib/components/Flex/style/index.js +1 -1
  112. package/lib/components/Form/style/index.d.ts +1 -1
  113. package/lib/components/Form/style/index.js +1 -1
  114. package/lib/components/Grid/style/index.d.ts +1 -1
  115. package/lib/components/Grid/style/index.js +1 -1
  116. package/lib/components/Icons/style/index.d.ts +1 -1
  117. package/lib/components/Icons/style/index.js +1 -1
  118. package/lib/components/Input/Amount/style/index.d.ts +1 -1
  119. package/lib/components/Input/Amount/style/index.js +1 -1
  120. package/lib/components/Input/style/index.d.ts +6 -6
  121. package/lib/components/Input/style/index.js +6 -6
  122. package/lib/components/Modal/style/index.d.ts +1 -1
  123. package/lib/components/Modal/style/index.js +1 -1
  124. package/lib/components/Navigation/style/index.d.ts +2 -2
  125. package/lib/components/Navigation/style/index.js +2 -2
  126. package/lib/components/Notification/style/index.d.ts +1 -1
  127. package/lib/components/Notification/style/index.js +1 -1
  128. package/lib/components/Pagination/style/index.d.ts +1 -1
  129. package/lib/components/Pagination/style/index.js +1 -1
  130. package/lib/components/Popconfirm/style/index.d.ts +1 -1
  131. package/lib/components/Popconfirm/style/index.js +1 -1
  132. package/lib/components/ProForm/style/index.d.ts +1 -1
  133. package/lib/components/ProForm/style/index.js +1 -1
  134. package/lib/components/Progress/style/index.d.ts +1 -1
  135. package/lib/components/Progress/style/index.js +1 -1
  136. package/lib/components/Radio/style/index.d.ts +1 -1
  137. package/lib/components/Radio/style/index.js +1 -1
  138. package/lib/components/Segment/style/index.d.ts +1 -1
  139. package/lib/components/Segment/style/index.js +1 -1
  140. package/lib/components/Select/style/index.d.ts +1 -1
  141. package/lib/components/Select/style/index.js +1 -1
  142. package/lib/components/Skeleton/style/index.d.ts +1 -1
  143. package/lib/components/Skeleton/style/index.js +1 -1
  144. package/lib/components/Slider/style/index.d.ts +1 -1
  145. package/lib/components/Slider/style/index.js +1 -1
  146. package/lib/components/Space/style/index.d.ts +1 -1
  147. package/lib/components/Space/style/index.js +1 -1
  148. package/lib/components/Spinner/style/index.d.ts +1 -1
  149. package/lib/components/Spinner/style/index.js +1 -1
  150. package/lib/components/Step/style/index.d.ts +1 -1
  151. package/lib/components/Step/style/index.js +1 -1
  152. package/lib/components/Switch/style/index.d.ts +1 -1
  153. package/lib/components/Switch/style/index.js +1 -1
  154. package/lib/components/Table/style/index.d.ts +1 -1
  155. package/lib/components/Table/style/index.js +1 -1
  156. package/lib/components/Tabs/style/index.d.ts +1 -1
  157. package/lib/components/Tabs/style/index.js +1 -1
  158. package/lib/components/Tag/style/index.d.ts +1 -1
  159. package/lib/components/Tag/style/index.js +1 -1
  160. package/lib/components/Tooltip/style/index.d.ts +1 -1
  161. package/lib/components/Tooltip/style/index.js +1 -1
  162. package/lib/components/Trigger/style/index.d.ts +1 -1
  163. package/lib/components/Trigger/style/index.js +1 -1
  164. package/lib/components/Typography/style/index.d.ts +1 -1
  165. package/lib/components/Typography/style/index.js +1 -1
  166. package/lib/components/Upload/style/index.d.ts +2 -2
  167. package/lib/components/Upload/style/index.js +2 -2
  168. package/lib/components/VirtualList/style/index.d.ts +1 -1
  169. package/lib/components/VirtualList/style/index.js +1 -1
  170. package/lib/index.css +1 -1
  171. package/package.json +1 -1
  172. package/es/components/Accordion/style/Accordion.scss +0 -127
  173. package/es/components/Alert/style/Alert.scss +0 -89
  174. package/es/components/Button/style/Button.scss +0 -190
  175. package/es/components/Calendar/style/Calendar.scss +0 -377
  176. package/es/components/Carousel/style/Carousel.scss +0 -63
  177. package/es/components/Checkbox/style/Checkbox.scss +0 -235
  178. package/es/components/CoachMark/style/CoachMark.scss +0 -176
  179. package/es/components/Copy/style/Copy.scss +0 -35
  180. package/es/components/Divider/style/Divider.scss +0 -149
  181. package/es/components/Drawer/style/Drawer.scss +0 -163
  182. package/es/components/Dropdown/style/Dropdown.scss +0 -2
  183. package/es/components/Empty/style/Empty.scss +0 -53
  184. package/es/components/Flex/style/Flex.scss +0 -70
  185. package/es/components/Form/style/Form.scss +0 -57
  186. package/es/components/Grid/style/Grid.scss +0 -184
  187. package/es/components/Icons/style/Icons.scss +0 -85
  188. package/es/components/Input/Amount/style/Amount.scss +0 -89
  189. package/es/components/Input/FieldShell/FieldShell.scss +0 -62
  190. package/es/components/Input/Input/Input.scss +0 -131
  191. package/es/components/Input/OTP/OTP.scss +0 -75
  192. package/es/components/Input/TextArea/TextArea.scss +0 -87
  193. package/es/components/Input/Trade/Trade.scss +0 -184
  194. package/es/components/Modal/style/Modal.scss +0 -254
  195. package/es/components/Navigation/style/Nav.scss +0 -174
  196. package/es/components/Navigation/style/Navigation.scss +0 -443
  197. package/es/components/Notification/style/Notification.scss +0 -200
  198. package/es/components/Pagination/style/Pagination.scss +0 -95
  199. package/es/components/Popconfirm/style/Popconfirm.scss +0 -264
  200. package/es/components/ProForm/style/ProForm.scss +0 -118
  201. package/es/components/Progress/style/Progress.scss +0 -120
  202. package/es/components/Radio/style/Radio.scss +0 -431
  203. package/es/components/Segment/style/Segment.scss +0 -80
  204. package/es/components/Select/style/Select.scss +0 -480
  205. package/es/components/Skeleton/style/Skeleton.scss +0 -47
  206. package/es/components/Slider/style/Slider.scss +0 -182
  207. package/es/components/Space/style/Space.scss +0 -40
  208. package/es/components/Spinner/style/Spinner.scss +0 -90
  209. package/es/components/Step/style/Step.scss +0 -91
  210. package/es/components/Switch/style/Switch.scss +0 -126
  211. package/es/components/Table/style/Table.scss +0 -376
  212. package/es/components/Tabs/style/Tabs.scss +0 -100
  213. package/es/components/Tag/style/Tag.scss +0 -103
  214. package/es/components/Tooltip/style/Tooltip.scss +0 -95
  215. package/es/components/Trigger/style/Trigger.scss +0 -18
  216. package/es/components/Typography/style/Typography.scss +0 -132
  217. package/es/components/Upload/style/Upload.scss +0 -44
  218. package/es/components/Upload/style/UploadFileBar.scss +0 -94
  219. package/es/components/VirtualList/style/VirtualList.scss +0 -5
  220. package/es/styles/_api.scss +0 -5
  221. package/es/styles/_settings.scss +0 -5
  222. package/es/styles/index.scss +0 -2
  223. package/es/styles/public/_index.scss +0 -2
  224. package/es/styles/public/_system.scss +0 -1
  225. package/es/styles/public/_theme.scss +0 -3
  226. package/es/styles/recipes/_index.scss +0 -1
  227. package/es/styles/recipes/_variants.scss +0 -110
  228. package/es/styles/system/_index.scss +0 -4
  229. package/es/styles/system/_props.scss +0 -95
  230. package/es/styles/system/_public.scss +0 -5
  231. package/es/styles/system/_sx.scss +0 -81
  232. package/es/styles/theme/_breakpoints.scss +0 -95
  233. package/es/styles/theme/_functions.scss +0 -271
  234. package/es/styles/theme/_index.scss +0 -6
  235. package/es/styles/theme/_mixins.scss +0 -37
  236. package/es/styles/theme/_scales.scss +0 -29
  237. package/es/styles/theme/_values.scss +0 -68
  238. package/es/styles/tokens/_index.scss +0 -11
  239. package/es/styles/tokens/breakpoint/_index.scss +0 -2
  240. package/es/styles/tokens/breakpoint/_primitives.scss +0 -8
  241. package/es/styles/tokens/color/_index.scss +0 -3
  242. package/es/styles/tokens/color/_primitives.scss +0 -42
  243. package/es/styles/tokens/color/_semantic-color.scss +0 -172
  244. package/es/styles/tokens/opacity/_functions.scss +0 -13
  245. package/es/styles/tokens/opacity/_index.scss +0 -3
  246. package/es/styles/tokens/opacity/_primitives.scss +0 -12
  247. package/es/styles/tokens/radius/_index.scss +0 -2
  248. package/es/styles/tokens/radius/_primitives.scss +0 -11
  249. package/es/styles/tokens/shadow/_index.scss +0 -2
  250. package/es/styles/tokens/shadow/_primitives.scss +0 -7
  251. package/es/styles/tokens/sizing/_functions.scss +0 -17
  252. package/es/styles/tokens/sizing/_index.scss +0 -4
  253. package/es/styles/tokens/sizing/_primitives.scss +0 -12
  254. package/es/styles/tokens/sizing/_semantic-sizing.scss +0 -11
  255. package/es/styles/tokens/spacing/_functions.scss +0 -51
  256. package/es/styles/tokens/spacing/_index.scss +0 -4
  257. package/es/styles/tokens/spacing/_primitives.scss +0 -22
  258. package/es/styles/tokens/spacing/_semantic-spacing.scss +0 -22
  259. package/es/styles/tokens/typography/_functions.scss +0 -31
  260. package/es/styles/tokens/typography/_index.scss +0 -4
  261. package/es/styles/tokens/typography/_primitives.scss +0 -27
  262. package/es/styles/tokens/typography/_semantic-typography.scss +0 -216
  263. package/es/styles/utilities/_generator.scss +0 -55
  264. package/es/styles/utilities/_index.scss +0 -14
  265. package/lib/components/Accordion/style/Accordion.scss +0 -127
  266. package/lib/components/Alert/style/Alert.scss +0 -89
  267. package/lib/components/Button/style/Button.scss +0 -190
  268. package/lib/components/Calendar/style/Calendar.scss +0 -377
  269. package/lib/components/Carousel/style/Carousel.scss +0 -63
  270. package/lib/components/Checkbox/style/Checkbox.scss +0 -235
  271. package/lib/components/CoachMark/style/CoachMark.scss +0 -176
  272. package/lib/components/Copy/style/Copy.scss +0 -35
  273. package/lib/components/Divider/style/Divider.scss +0 -149
  274. package/lib/components/Drawer/style/Drawer.scss +0 -163
  275. package/lib/components/Dropdown/style/Dropdown.scss +0 -2
  276. package/lib/components/Empty/style/Empty.scss +0 -53
  277. package/lib/components/Flex/style/Flex.scss +0 -70
  278. package/lib/components/Form/style/Form.scss +0 -57
  279. package/lib/components/Grid/style/Grid.scss +0 -184
  280. package/lib/components/Icons/style/Icons.scss +0 -85
  281. package/lib/components/Input/Amount/style/Amount.scss +0 -89
  282. package/lib/components/Input/FieldShell/FieldShell.scss +0 -62
  283. package/lib/components/Input/Input/Input.scss +0 -131
  284. package/lib/components/Input/OTP/OTP.scss +0 -75
  285. package/lib/components/Input/TextArea/TextArea.scss +0 -87
  286. package/lib/components/Input/Trade/Trade.scss +0 -184
  287. package/lib/components/Modal/style/Modal.scss +0 -254
  288. package/lib/components/Navigation/style/Nav.scss +0 -174
  289. package/lib/components/Navigation/style/Navigation.scss +0 -443
  290. package/lib/components/Notification/style/Notification.scss +0 -200
  291. package/lib/components/Pagination/style/Pagination.scss +0 -95
  292. package/lib/components/Popconfirm/style/Popconfirm.scss +0 -264
  293. package/lib/components/ProForm/style/ProForm.scss +0 -118
  294. package/lib/components/Progress/style/Progress.scss +0 -120
  295. package/lib/components/Radio/style/Radio.scss +0 -431
  296. package/lib/components/Segment/style/Segment.scss +0 -80
  297. package/lib/components/Select/style/Select.scss +0 -480
  298. package/lib/components/Skeleton/style/Skeleton.scss +0 -47
  299. package/lib/components/Slider/style/Slider.scss +0 -182
  300. package/lib/components/Space/style/Space.scss +0 -40
  301. package/lib/components/Spinner/style/Spinner.scss +0 -90
  302. package/lib/components/Step/style/Step.scss +0 -91
  303. package/lib/components/Switch/style/Switch.scss +0 -126
  304. package/lib/components/Table/style/Table.scss +0 -376
  305. package/lib/components/Tabs/style/Tabs.scss +0 -100
  306. package/lib/components/Tag/style/Tag.scss +0 -103
  307. package/lib/components/Tooltip/style/Tooltip.scss +0 -95
  308. package/lib/components/Trigger/style/Trigger.scss +0 -18
  309. package/lib/components/Typography/style/Typography.scss +0 -132
  310. package/lib/components/Upload/style/Upload.scss +0 -44
  311. package/lib/components/Upload/style/UploadFileBar.scss +0 -94
  312. package/lib/components/VirtualList/style/VirtualList.scss +0 -5
  313. package/lib/styles/_api.scss +0 -5
  314. package/lib/styles/_settings.scss +0 -5
  315. package/lib/styles/index.scss +0 -2
  316. package/lib/styles/public/_index.scss +0 -2
  317. package/lib/styles/public/_system.scss +0 -1
  318. package/lib/styles/public/_theme.scss +0 -3
  319. package/lib/styles/recipes/_index.scss +0 -1
  320. package/lib/styles/recipes/_variants.scss +0 -110
  321. package/lib/styles/system/_index.scss +0 -4
  322. package/lib/styles/system/_props.scss +0 -95
  323. package/lib/styles/system/_public.scss +0 -5
  324. package/lib/styles/system/_sx.scss +0 -81
  325. package/lib/styles/theme/_breakpoints.scss +0 -95
  326. package/lib/styles/theme/_functions.scss +0 -271
  327. package/lib/styles/theme/_index.scss +0 -6
  328. package/lib/styles/theme/_mixins.scss +0 -37
  329. package/lib/styles/theme/_scales.scss +0 -29
  330. package/lib/styles/theme/_values.scss +0 -68
  331. package/lib/styles/tokens/_index.scss +0 -11
  332. package/lib/styles/tokens/breakpoint/_index.scss +0 -2
  333. package/lib/styles/tokens/breakpoint/_primitives.scss +0 -8
  334. package/lib/styles/tokens/color/_index.scss +0 -3
  335. package/lib/styles/tokens/color/_primitives.scss +0 -42
  336. package/lib/styles/tokens/color/_semantic-color.scss +0 -172
  337. package/lib/styles/tokens/opacity/_functions.scss +0 -13
  338. package/lib/styles/tokens/opacity/_index.scss +0 -3
  339. package/lib/styles/tokens/opacity/_primitives.scss +0 -12
  340. package/lib/styles/tokens/radius/_index.scss +0 -2
  341. package/lib/styles/tokens/radius/_primitives.scss +0 -11
  342. package/lib/styles/tokens/shadow/_index.scss +0 -2
  343. package/lib/styles/tokens/shadow/_primitives.scss +0 -7
  344. package/lib/styles/tokens/sizing/_functions.scss +0 -17
  345. package/lib/styles/tokens/sizing/_index.scss +0 -4
  346. package/lib/styles/tokens/sizing/_primitives.scss +0 -12
  347. package/lib/styles/tokens/sizing/_semantic-sizing.scss +0 -11
  348. package/lib/styles/tokens/spacing/_functions.scss +0 -51
  349. package/lib/styles/tokens/spacing/_index.scss +0 -4
  350. package/lib/styles/tokens/spacing/_primitives.scss +0 -22
  351. package/lib/styles/tokens/spacing/_semantic-spacing.scss +0 -22
  352. package/lib/styles/tokens/typography/_functions.scss +0 -31
  353. package/lib/styles/tokens/typography/_index.scss +0 -4
  354. package/lib/styles/tokens/typography/_primitives.scss +0 -27
  355. package/lib/styles/tokens/typography/_semantic-typography.scss +0 -216
  356. package/lib/styles/utilities/_generator.scss +0 -55
  357. package/lib/styles/utilities/_index.scss +0 -14
@@ -1,110 +0,0 @@
1
- @use 'sass:list';
2
- @use 'sass:map';
3
- @use '../theme/scales' as scales;
4
-
5
- /// Build a hint string from the first variant's values for the missing keys.
6
- @function -om-variant-hint($template, $missing) {
7
- $lines: '';
8
-
9
- @each $key in $missing {
10
- $val: if(map.has-key($template, '#{$key}'), map.get($template, '#{$key}'), '<value>');
11
- $lines: $lines + ' #{$key}: #{$val}, ';
12
- }
13
-
14
- @return $lines;
15
- }
16
-
17
- /// Auto-generate a variant schema map from a component name and a list of token keys.
18
- /// Uses the system prefix from scales.$om-sys-prefix.
19
- @function om-variant-schema($component, $keys...) {
20
- $schema: ();
21
-
22
- @each $key in $keys {
23
- $schema: map.set($schema, --#{scales.$om-sys-prefix}-#{$component}-#{$key}, '#{$key}');
24
- }
25
-
26
- @return $schema;
27
- }
28
-
29
- /// Validate that every variant contains all token keys required by the schema.
30
- /// Returns $variants unchanged; @errors on any missing key.
31
- @function -om-variant-validate($variants, $schema) {
32
- $required-keys: map.values($schema);
33
- $first-name: null;
34
- $first-tokens: null;
35
-
36
- @each $name, $tokens in $variants {
37
- @if not $first-name {
38
- $first-name: $name;
39
- $first-tokens: $tokens;
40
- }
41
-
42
- $missing: ();
43
-
44
- @each $key in $required-keys {
45
- @if not map.has-key($tokens, '#{$key}') {
46
- $missing: list.append($missing, $key);
47
- }
48
- }
49
-
50
- @if list.length($missing) > 0 {
51
- $hint: '';
52
-
53
- @if $first-tokens and '#{$name}' != '#{$first-name}' {
54
- $hint: ' Example from variant "#{$first-name}": #{-om-variant-hint($first-tokens, $missing)}';
55
- }
56
-
57
- @error 'Variant "#{$name}" is missing #{list.length($missing)} token(s): #{$missing}. Required keys: #{$required-keys}.#{$hint}';
58
- }
59
- }
60
-
61
- @return $variants;
62
- }
63
-
64
- @function om-variant($variants, $name) {
65
- $normalized-name: '#{$name}';
66
-
67
- @if not map.has-key($variants, $normalized-name) {
68
- @error 'Unknown variant "#{$normalized-name}". Available: #{map.keys($variants)}. Hint: add \'\"#{$normalized-name}\": (...)\' to your $variants map.';
69
- }
70
-
71
- @return map.get($variants, $normalized-name);
72
- }
73
-
74
- @function om-variant-value($tokens, $key) {
75
- $normalized-key: '#{$key}';
76
-
77
- @if not map.has-key($tokens, $normalized-key) {
78
- @error 'Variant token map does not define "#{$normalized-key}". Available keys: #{map.keys($tokens)}. Hint: add \'#{$normalized-key}: <value>\' to this variant.';
79
- }
80
-
81
- @return map.get($tokens, $normalized-key);
82
- }
83
-
84
- @function om-variant-extend($base, $overrides) {
85
- @return map.merge($base, $overrides);
86
- }
87
-
88
- @mixin om-variant-apply($schema, $tokens) {
89
- @each $target, $source in $schema {
90
- #{$target}: #{om-variant-value($tokens, $source)};
91
- }
92
- }
93
-
94
- @mixin om-variant-default($variants, $name, $schema) {
95
- $-validated: -om-variant-validate($variants, $schema);
96
-
97
- @include om-variant-apply($schema, om-variant($variants, $name));
98
- }
99
-
100
- @mixin om-variant-classes($variants, $schema, $default: null, $selector-prefix: '&-') {
101
- $-validated: -om-variant-validate($variants, $schema);
102
-
103
- @each $name, $tokens in $variants {
104
- @if not $default or '#{$default}' != '#{$name}' {
105
- #{$selector-prefix}#{$name} {
106
- @include om-variant-apply($schema, $tokens);
107
- }
108
- }
109
- }
110
- }
@@ -1,4 +0,0 @@
1
- // System entrypoint — sx engine and system-owned helpers.
2
- @forward './props';
3
- @forward './sx';
4
- @forward './public';
@@ -1,95 +0,0 @@
1
- // System prop registry — maps shorthand/system keys to CSS properties, scales, and enum aliases.
2
- @use 'sass:map';
3
-
4
- $om-spacing-props: (
5
- 'p': (padding,),
6
- 'pt': (padding-top,),
7
- 'pr': (padding-right,),
8
- 'pb': (padding-bottom,),
9
- 'pl': (padding-left,),
10
- 'px': (padding-left, padding-right),
11
- 'py': (padding-top, padding-bottom),
12
- 'm': (margin,),
13
- 'mt': (margin-top,),
14
- 'mr': (margin-right,),
15
- 'mb': (margin-bottom,),
16
- 'ml': (margin-left,),
17
- 'mx': (margin-left, margin-right),
18
- 'my': (margin-top, margin-bottom),
19
- 'gap': (gap,),
20
- ) !default;
21
- $om-enum-props: (
22
- 'd': (css: display, values: (flex, grid, block, inline, inline-flex, inline-block, none)),
23
- 'flex': (css: flex-direction, values: (row, column, row-reverse, column-reverse)),
24
- 'jc': (css: justify-content, values: (start, end, center, space-between, space-around, space-evenly)),
25
- 'ai': (css: align-items, values: (start, end, center, baseline, stretch)),
26
- 'fw': (css: flex-wrap, values: (wrap, nowrap, wrap-reverse)),
27
- ) !default;
28
- $om-value-aliases: (
29
- justify-content: (start: flex-start, end: flex-end),
30
- align-items: (start: flex-start, end: flex-end),
31
- ) !default;
32
- $om-sizing-props: (
33
- 'w': width,
34
- 'h': height,
35
- ) !default;
36
- $om-scale-props: (
37
- 'radius': (css: border-radius, scale: radius),
38
- 'shadow': (css: box-shadow, scale: shadow),
39
- ) !default;
40
- $om-color-props: (
41
- 'bg': (css: background-color, scale: bg),
42
- 'border': (css: border-color, scale: border),
43
- ) !default;
44
- $om-system-aliases: (
45
- 'display': 'd',
46
- 'flexDirection': 'flex',
47
- 'justifyContent': 'jc',
48
- 'alignItems': 'ai',
49
- 'flexWrap': 'fw',
50
- 'width': 'w',
51
- 'height': 'h',
52
- 'borderRadius': 'radius',
53
- 'boxShadow': 'shadow',
54
- 'bgcolor': 'bg',
55
- 'bgColor': 'bg',
56
- 'borderColor': 'border',
57
- ) !default;
58
-
59
- @function -om-build-system-props() {
60
- $result: ();
61
-
62
- // 1. Spacing — kind = scale, scale = spacing
63
- @each $name, $css-props in $om-spacing-props {
64
- $result: map.merge($result, ('#{$name}': (css: $css-props, kind: scale, flag: spacing, scale: spacing)));
65
- }
66
-
67
- // 2. Enum props — kind = enum
68
- @each $name, $def in $om-enum-props {
69
- $result: map.merge($result, ('#{$name}': (css: (map.get($def, css),), kind: enum, flag: layout, values: map.get($def, values))));
70
- }
71
-
72
- // 3. Sizing props — kind = scale, scale = sizing
73
- @each $name, $css in $om-sizing-props {
74
- $result: map.merge($result, ('#{$name}': (css: ($css,), kind: scale, flag: sizing, scale: sizing)));
75
- }
76
-
77
- // 4. Color props — kind = scale, with per-prop scale assignment
78
- @each $name, $def in $om-color-props {
79
- $result: map.merge($result, ('#{$name}': (css: (map.get($def, css),), kind: scale, flag: color, scale: map.get($def, scale))));
80
- }
81
-
82
- // 5. Scale props (radius, shadow) — kind = scale with named scale
83
- @each $name, $def in $om-scale-props {
84
- $result: map.merge($result, ('#{$name}': (css: (map.get($def, css),), kind: scale, flag: visual, scale: map.get($def, scale))));
85
- }
86
-
87
- // 6. Aliases — copy canonical entry under alias name
88
- @each $alias, $canonical in $om-system-aliases {
89
- $result: map.merge($result, ('#{$alias}': map.get($result, $canonical)));
90
- }
91
-
92
- @return $result;
93
- }
94
-
95
- $om-system-props: -om-build-system-props() !default;
@@ -1,5 +0,0 @@
1
- @use './sx' as sx-engine;
2
-
3
- @mixin sx($config) {
4
- @include sx-engine.om-sx($config);
5
- }
@@ -1,81 +0,0 @@
1
- // System style compiler — resolves `om-sx` config objects into concrete CSS declarations.
2
- @use 'sass:list';
3
- @use 'sass:map';
4
- @use 'sass:meta';
5
- @use 'sass:string';
6
- @use '../tokens' as tokens;
7
- @use '../theme/functions' as theme-functions;
8
- @use '../theme/breakpoints' as breakpoints;
9
- @use './props' as props;
10
-
11
- @function om-alias-value($css-prop, $value) {
12
- $aliases: map.get(props.$om-value-aliases, $css-prop);
13
-
14
- @if $aliases != null and map.has-key($aliases, $value) {
15
- @return map.get($aliases, $value);
16
- }
17
-
18
- @return $value;
19
- }
20
-
21
- @function om-resolve-system-value($value, $config) {
22
- @if not $value { @return null; }
23
-
24
- @if map.get($config, kind) == enum {
25
- @return om-alias-value(list.nth(map.get($config, css), 1), $value);
26
- }
27
-
28
- @return theme-functions.om-token(map.get($config, scale), $value);
29
- }
30
-
31
- @mixin om-apply-system-prop($prop, $value) {
32
- @if $value {
33
- $config: map.get(props.$om-system-props, $prop);
34
-
35
- @if not $config {
36
- #{$prop}: $value;
37
- } @else {
38
- $resolved: om-resolve-system-value($value, $config);
39
-
40
- @each $css-prop in map.get($config, css) {
41
- #{$css-prop}: $resolved;
42
- }
43
- }
44
- }
45
- }
46
-
47
- /// Returns true if $key starts with `&`, indicating a selector nesting trigger.
48
- @function -om-is-selector-key($key) {
49
- @return meta.type-of($key) == 'string' and string.slice($key, 1, 1) == '&';
50
- }
51
-
52
- @mixin om-sx($config) {
53
- // Stage 1 — plain system props (skip breakpoints and selector keys).
54
- @each $prop, $value in $config {
55
- @if not map.has-key(tokens.$om-breakpoints, $prop) and not -om-is-selector-key($prop) {
56
- @include om-apply-system-prop($prop, $value);
57
- }
58
- }
59
-
60
- // Stage 2 — breakpoint nesting (unchanged).
61
- @each $bp-name, $_bp-value in tokens.$om-breakpoints {
62
- @if map.has-key($config, $bp-name) {
63
- $responsive-value: map.get($config, $bp-name);
64
-
65
- @if meta.type-of($responsive-value) == 'map' {
66
- @include breakpoints.om-down($bp-name) {
67
- @include om-sx($responsive-value);
68
- }
69
- }
70
- }
71
- }
72
-
73
- // Stage 3 — selector nesting (&:hover, &:focus-visible, etc.).
74
- @each $prop, $value in $config {
75
- @if -om-is-selector-key($prop) and meta.type-of($value) == 'map' {
76
- #{$prop} {
77
- @include om-sx($value);
78
- }
79
- }
80
- }
81
- }
@@ -1,95 +0,0 @@
1
- // Breakpoint helpers — responsive mixins built from token data.
2
- @use 'sass:list';
3
- @use 'sass:map';
4
- @use 'sass:math';
5
- @use '../tokens' as tokens;
6
-
7
- @mixin om-assert-breakpoints-descending() {
8
- $prev-value: null;
9
-
10
- @each $bp-name, $bp-value in tokens.$om-breakpoints {
11
- @if $prev-value and $bp-value >= $prev-value {
12
- @error '$om-breakpoints must be ordered from large to small, e.g. lg -> md -> sm.';
13
- }
14
-
15
- $prev-value: $bp-value;
16
- }
17
- }
18
-
19
- @include om-assert-breakpoints-descending;
20
-
21
- @function om-breakpoint($bp-name) {
22
- @return map.get(tokens.$om-breakpoints, $bp-name);
23
- }
24
-
25
- // Subtract 0.02px (1px / 50) to avoid overlap with min-width queries at fractional browser zoom levels.
26
- @function om-max-width($value) {
27
- @return $value - math.div(tokens.$om-breakpoint-step, 50);
28
- }
29
-
30
- @function om-next-breakpoint($bp-name) {
31
- $keys: map.keys(tokens.$om-breakpoints);
32
- $index: list.index($keys, $bp-name);
33
-
34
- @if not $index or $index == list.length($keys) {
35
- @return null;
36
- }
37
-
38
- @return list.nth($keys, $index + 1);
39
- }
40
-
41
- @mixin om-down($bp-name) {
42
- $bp-value: om-breakpoint($bp-name);
43
-
44
- @if $bp-value {
45
- @media (max-width: om-max-width($bp-value)) {
46
- @content;
47
- }
48
- }
49
- }
50
-
51
- @mixin om-up($bp-name) {
52
- $bp-value: om-breakpoint($bp-name);
53
-
54
- @if $bp-value {
55
- @media (min-width: $bp-value) {
56
- @content;
57
- }
58
- }
59
- }
60
-
61
- @mixin om-between($min-bp, $max-bp) {
62
- $min-value: om-breakpoint($min-bp);
63
- $max-value: om-breakpoint($max-bp);
64
-
65
- @if $min-value and $max-value {
66
- @media (min-width: $min-value) and (max-width: om-max-width($max-value)) {
67
- @content;
68
- }
69
- }
70
- }
71
-
72
- @mixin om-only($bp-name) {
73
- $bp-value: om-breakpoint($bp-name);
74
- $next-bp-name: om-next-breakpoint($bp-name);
75
-
76
- @if $bp-value {
77
- @if not $next-bp-name {
78
- @include om-down($bp-name) {
79
- @content;
80
- }
81
- } @else {
82
- $next-bp-value: om-breakpoint($next-bp-name);
83
-
84
- @media (min-width: $next-bp-value) and (max-width: om-max-width($bp-value)) {
85
- @content;
86
- }
87
- }
88
- }
89
- }
90
-
91
- @mixin om-respond($bp-name) {
92
- @include om-down($bp-name) {
93
- @content;
94
- }
95
- }
@@ -1,271 +0,0 @@
1
- // Theme functions — generate CSS variable references, themed accessors, and typography vars.
2
- @use 'sass:list';
3
- @use 'sass:math';
4
- @use 'sass:map';
5
- @use 'sass:meta';
6
- @use './scales' as scales;
7
- @use '../tokens' as tokens;
8
-
9
- @function om-scale-map($scale-name) {
10
- @return map.get(scales.$om-theme-scales, $scale-name);
11
- }
12
-
13
- @function om-scale-has($scale-name, $key) {
14
- $scale: om-scale-map($scale-name);
15
-
16
- @return $scale != null and map.has-key($scale, '#{$key}');
17
- }
18
-
19
- @function om-scale-value($scale-name, $key) {
20
- $scale: om-scale-map($scale-name);
21
-
22
- @if not $scale or not map.has-key($scale, '#{$key}') {
23
- @return null;
24
- }
25
-
26
- @return map.get($scale, '#{$key}');
27
- }
28
-
29
- @function om-theme-var-name($scale-name, $key) {
30
- @return --#{scales.$om-sys-prefix}-#{$scale-name}-#{$key};
31
- }
32
-
33
- @function -om-css-fallback($value) {
34
- @return if(meta.type-of($value) == 'list', meta.inspect($value), $value);
35
- }
36
-
37
- @function om-theme-ref($scale-name, $key) {
38
- $value: om-scale-value($scale-name, $key);
39
-
40
- @if not $value {
41
- @return null;
42
- }
43
-
44
- @return var(#{om-theme-var-name($scale-name, $key)}, #{-om-css-fallback($value)});
45
- }
46
-
47
- /// Generic token resolver — returns a CSS variable reference for scales listed in
48
- /// `$om-theme-css-var-scales`, or the raw scale value otherwise.
49
- @function om-token($scale-name, $key) {
50
- @if not list.index(scales.$om-theme-css-var-scales, $scale-name) {
51
- $raw: om-scale-value($scale-name, '#{$key}');
52
-
53
- @if $raw {
54
- @return $raw;
55
- }
56
-
57
- @error 'om-token: "#{$key}" is not defined in non-CSS-var scale "#{$scale-name}".';
58
- }
59
-
60
- $token: om-theme-ref($scale-name, '#{$key}');
61
-
62
- @if $token { @return $token; }
63
-
64
- @if $scale-name == spacing { @return tokens.om-spacing-value($key); }
65
-
66
- @error 'om-token: "#{$key}" is not defined in scale "#{$scale-name}".';
67
- }
68
-
69
- /// Generic scale accessor — use for any registered scale without a dedicated function.
70
- /// Simple: om(radius, 300) → om-token(radius, 300)
71
- /// Semantic: om(bg, 'brand', 'hover') → om-token(bg, 'brand-hover')
72
- @function om($scale, $key, $variant: null) {
73
- $resolved: if($variant, '#{$key}-#{$variant}', $key);
74
-
75
- @return om-token($scale, $resolved);
76
- }
77
-
78
- @function om-spacing($value) { @return om-token(spacing, $value); }
79
-
80
- @function om-radius($key) { @return om-token(radius, $key); }
81
-
82
- @function om-shadow($key) { @return om-token(shadow, $key); }
83
-
84
- @function om-sizing($value) { @return om-token(sizing, $value); }
85
-
86
- @function om-component-height($key) {
87
- $-value: tokens.om-component-height-token($key);
88
-
89
- @return om-token(component-height, $key);
90
- }
91
-
92
- @mixin om-emit-theme-vars($selector: ':root') {
93
- #{$selector} {
94
- @each $scale-name in scales.$om-theme-css-var-scales {
95
- $scale: om-scale-map($scale-name);
96
-
97
- @each $key, $value in $scale {
98
- #{om-theme-var-name($scale-name, $key)}: #{-om-css-fallback(om-scale-value($scale-name, $key))};
99
- }
100
- }
101
- }
102
- }
103
-
104
- @function -om-typography-var-name($category, $size, $suffix) {
105
- @return --#{scales.$om-sys-prefix}-#{$category}-#{$size}-#{$suffix};
106
- }
107
-
108
- @mixin om-emit-typography-vars($selector: ':root') {
109
- $standard-props: (font-size, font-family, line-height, letter-spacing, font-weight);
110
-
111
- #{$selector} {
112
- @each $category, $sizes in tokens.$om-typography-categories {
113
- @each $size, $entry in $sizes {
114
- @each $prop in $standard-props {
115
- $val: map.get($entry, $prop);
116
-
117
- @if $val {
118
- #{-om-typography-var-name($category, $size, $prop)}: #{$val};
119
- }
120
- }
121
-
122
- @if map.has-key($entry, strong) {
123
- $strong-weight: map.get(map.get($entry, strong), font-weight);
124
-
125
- @if $strong-weight {
126
- #{-om-typography-var-name($category, $size, strong-font-weight)}: #{$strong-weight};
127
- }
128
- }
129
-
130
- @if map.has-key($entry, text-decoration) {
131
- #{-om-typography-var-name($category, $size, text-decoration)}: #{map.get($entry, text-decoration)};
132
- }
133
-
134
- @if map.has-key($entry, text-decoration-skip-ink) {
135
- #{-om-typography-var-name($category, $size, text-decoration-skip-ink)}: #{map.get($entry, text-decoration-skip-ink)};
136
- }
137
- }
138
- }
139
- }
140
- }
141
-
142
- @function om-font-size($category, $size) {
143
- $-entry: tokens.om-typography($category, $size);
144
-
145
- @return var(#{-om-typography-var-name($category, $size, font-size)});
146
- }
147
-
148
- @function om-line-height($category, $size) {
149
- $-entry: tokens.om-typography($category, $size);
150
-
151
- @return var(#{-om-typography-var-name($category, $size, line-height)});
152
- }
153
-
154
- @function -om-line-height-ratio($category, $size) {
155
- $entry: tokens.om-typography($category, $size);
156
- $line-height: map.get($entry, line-height);
157
-
158
- @if meta.type-of($line-height) != 'number' {
159
- @error 'Line-height for "#{$category}/#{$size}" must be a number.';
160
- }
161
-
162
- @if math.is-unitless($line-height) {
163
- @return $line-height;
164
- }
165
-
166
- @if math.unit($line-height) == '%' {
167
- @return math.div($line-height, 100%);
168
- }
169
-
170
- $font-size: map.get($entry, font-size);
171
-
172
- @if meta.type-of($font-size) != 'number' or math.is-unitless($font-size) {
173
- @error 'Font-size for "#{$category}/#{$size}" must be a sized number.';
174
- }
175
-
176
- @return math.div($line-height, $font-size);
177
- }
178
-
179
- @function om-line-height-px($category, $size) {
180
- @return calc(#{om-font-size($category, $size)} * #{-om-line-height-ratio($category, $size)});
181
- }
182
-
183
- @function om-font-weight($category, $size) {
184
- $-entry: tokens.om-typography($category, $size);
185
-
186
- @return var(#{-om-typography-var-name($category, $size, font-weight)});
187
- }
188
-
189
- @function om-font-family($category, $size) {
190
- $-entry: tokens.om-typography($category, $size);
191
-
192
- @return var(#{-om-typography-var-name($category, $size, font-family)});
193
- }
194
-
195
- @function om-letter-spacing($category, $size) {
196
- $-entry: tokens.om-typography($category, $size);
197
-
198
- @return var(#{-om-typography-var-name($category, $size, letter-spacing)});
199
- }
200
-
201
- // stylelint-disable order/properties-order -- Mixin emits properties in Figma spec order, not CSS sort order.
202
- @mixin om-typography($category, $size, $strong: false) {
203
- $entry: tokens.om-typography($category, $size);
204
-
205
- font-size: var(#{-om-typography-var-name($category, $size, font-size)});
206
- font-family: var(#{-om-typography-var-name($category, $size, font-family)});
207
- line-height: var(#{-om-typography-var-name($category, $size, line-height)});
208
- letter-spacing: var(#{-om-typography-var-name($category, $size, letter-spacing)});
209
-
210
- @if $strong and map.has-key($entry, strong) {
211
- font-weight: var(#{-om-typography-var-name($category, $size, strong-font-weight)});
212
- } @else {
213
- font-weight: var(#{-om-typography-var-name($category, $size, font-weight)});
214
- }
215
-
216
- @if map.has-key($entry, text-decoration) {
217
- text-decoration: var(#{-om-typography-var-name($category, $size, text-decoration)});
218
- }
219
-
220
- @if map.has-key($entry, text-decoration-skip-ink) {
221
- text-decoration-skip-ink: var(#{-om-typography-var-name($category, $size, text-decoration-skip-ink)});
222
- }
223
- }
224
-
225
- // Semantic color accessors — resolve bg/text/icon/border keys to CSS variable references.
226
- @function om-bg($group, $variant: null) {
227
- $key: if($variant, '#{$group}-#{$variant}', $group);
228
-
229
- @return om-token(bg, $key);
230
- }
231
-
232
- @function om-text($group, $variant: null) {
233
- $key: if($variant, '#{$group}-#{$variant}', $group);
234
-
235
- @return om-token(text, $key);
236
- }
237
-
238
- @function om-icon($group, $variant: null) {
239
- $key: if($variant, '#{$group}-#{$variant}', $group);
240
-
241
- @return om-token(icon, $key);
242
- }
243
-
244
- @function om-border($group, $variant: null) {
245
- $key: if($variant, '#{$group}-#{$variant}', $group);
246
-
247
- @return om-token(border, $key);
248
- }
249
-
250
- // Semantic spacing aliases — validates allowed keys and resolves to primitive spacing tokens.
251
- @function -om-semantic-spacing-token($scale, $key, $scale-name) {
252
- $normalized-key: '#{$key}';
253
-
254
- @if not map.has-key($scale, $normalized-key) {
255
- @error '#{$scale-name} does not define spacing token "#{$normalized-key}"';
256
- }
257
-
258
- @return map.get($scale, $normalized-key);
259
- }
260
-
261
- @function om-gap($key) {
262
- @return om-spacing(-om-semantic-spacing-token(tokens.$om-gap-scale, $key, '$om-gap-scale'));
263
- }
264
-
265
- @function om-component-padding($key) {
266
- @return om-spacing(-om-semantic-spacing-token(tokens.$om-component-padding-scale, $key, '$om-component-padding-scale'));
267
- }
268
-
269
- @function om-section-padding($key) {
270
- @return om-spacing(-om-semantic-spacing-token(tokens.$om-section-padding-scale, $key, '$om-section-padding-scale'));
271
- }
@@ -1,6 +0,0 @@
1
- // Theme entrypoint — internal barrel for theme domain implementation.
2
- @forward './scales';
3
- @forward './functions';
4
- @forward './breakpoints';
5
- @forward './values';
6
- @forward './mixins';