@svadmin/ui 0.70.0 → 0.73.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 (372) hide show
  1. package/README.md +40 -25
  2. package/THIRD_PARTY_NOTICES.md +52 -0
  3. package/dist/actions.js +1 -1
  4. package/dist/app.css +7804 -5188
  5. package/dist/app.theme.css +7738 -5173
  6. package/dist/class-properties.generated.d.ts +1 -0
  7. package/dist/class-properties.generated.js +2 -0
  8. package/dist/classnames.d.ts +8 -0
  9. package/dist/classnames.js +26 -0
  10. package/dist/component-registry.svelte.d.ts +33 -19
  11. package/dist/component-registry.svelte.js +6 -4
  12. package/dist/components/AdminApp.svelte +55 -53
  13. package/dist/components/AdminApp.svelte.d.ts +2 -2
  14. package/dist/components/ApiSettings.svelte +19 -1
  15. package/dist/components/AuditLogDrawer.svelte +14 -3
  16. package/dist/components/AutoForm.svelte +162 -50
  17. package/dist/components/AutoForm.svelte.d.ts +4 -0
  18. package/dist/components/AutoTable.svelte +599 -259
  19. package/dist/components/AutoTable.svelte.d.ts +6 -0
  20. package/dist/components/BoundRecordDetailDrawer.svelte +172 -0
  21. package/dist/components/BoundRecordDetailDrawer.svelte.d.ts +11 -0
  22. package/dist/components/Breadcrumbs.svelte +7 -4
  23. package/dist/components/CancelTaskButton.svelte +9 -5
  24. package/dist/components/ColumnHeaderFilter.svelte +4 -3
  25. package/dist/components/ColumnSettings.svelte +1 -0
  26. package/dist/components/ComboboxField.svelte +118 -36
  27. package/dist/components/ComboboxField.svelte.d.ts +5 -4
  28. package/dist/components/CreatePage.svelte +7 -1
  29. package/dist/components/CreatePage.svelte.d.ts +2 -0
  30. package/dist/components/DateRangeInput.svelte +75 -0
  31. package/dist/components/DateRangeInput.svelte.d.ts +25 -0
  32. package/dist/components/DateTimeInput.svelte +65 -0
  33. package/dist/components/DateTimeInput.svelte.d.ts +19 -0
  34. package/dist/components/DetailDrawer.svelte +4 -0
  35. package/dist/components/DetailDrawer.svelte.d.ts +1 -0
  36. package/dist/components/DevTools.svelte +8 -21
  37. package/dist/components/DraggableGrid.svelte +1 -0
  38. package/dist/components/DraggableHeader.svelte +5 -9
  39. package/dist/components/DraggableHeader.svelte.d.ts +43 -18
  40. package/dist/components/DraggableRowTable.svelte +2 -2
  41. package/dist/components/DynamicFormList.svelte +17 -17
  42. package/dist/components/DynamicFormList.svelte.d.ts +2 -1
  43. package/dist/components/EditPage.svelte +7 -1
  44. package/dist/components/EditPage.svelte.d.ts +2 -0
  45. package/dist/components/EditableTable.svelte +4 -0
  46. package/dist/components/ErrorPage.svelte +3 -1
  47. package/dist/components/FieldDisplay.svelte +14 -0
  48. package/dist/components/FieldDisplay.svelte.d.ts +7 -0
  49. package/dist/components/FieldRenderer.svelte +96 -20
  50. package/dist/components/FileUpload.svelte +250 -0
  51. package/dist/components/FileUpload.svelte.d.ts +32 -0
  52. package/dist/components/FilterBuilder.svelte +236 -268
  53. package/dist/components/FilterBuilder.svelte.d.ts +3 -0
  54. package/dist/components/FilterDropdown.svelte.d.ts +1 -1
  55. package/dist/components/Header.svelte +5 -6
  56. package/dist/components/ImportWizard.svelte +182 -94
  57. package/dist/components/InfiniteList.svelte +22 -8
  58. package/dist/components/InfiniteList.svelte.d.ts +5 -3
  59. package/dist/components/InlineEdit.svelte +114 -44
  60. package/dist/components/JsonSchemaForm.svelte +256 -95
  61. package/dist/components/JsonSchemaForm.svelte.d.ts +12 -1
  62. package/dist/components/Layout.svelte +20 -17
  63. package/dist/components/LazyTaskQueueDrawer.svelte +26 -0
  64. package/dist/components/LazyTaskQueueDrawer.svelte.d.ts +8 -0
  65. package/dist/components/ListPage.svelte +11 -6
  66. package/dist/components/ListPage.svelte.d.ts +2 -0
  67. package/dist/components/LoginPage.svelte +1 -1
  68. package/dist/components/MasterDetailView.svelte +3 -3
  69. package/dist/components/MediaLibraryModal.svelte +5 -2
  70. package/dist/components/MentionsInput.svelte +4 -3
  71. package/dist/components/MoneyInput.svelte +25 -0
  72. package/dist/components/MoneyInput.svelte.d.ts +20 -0
  73. package/dist/components/NavigateToResource.svelte +3 -2
  74. package/dist/components/NumberInput.svelte +25 -0
  75. package/dist/components/NumberInput.svelte.d.ts +19 -0
  76. package/dist/components/NumericInput.svelte +110 -0
  77. package/dist/components/NumericInput.svelte.d.ts +23 -0
  78. package/dist/components/PercentInput.svelte +25 -0
  79. package/dist/components/PercentInput.svelte.d.ts +20 -0
  80. package/dist/components/PermissionMatrix.svelte +4 -3
  81. package/dist/components/ProfilePage.svelte +2 -2
  82. package/dist/components/QuickEditDrawer.svelte +42 -0
  83. package/dist/components/QuickEditDrawer.svelte.d.ts +10 -0
  84. package/dist/components/RecordDetailDrawer.svelte +16 -108
  85. package/dist/components/RecordDetailDrawer.svelte.d.ts +2 -0
  86. package/dist/components/RecordRowActions.svelte +41 -0
  87. package/dist/components/RecordRowActions.svelte.d.ts +14 -0
  88. package/dist/components/ResourceAccessGuard.svelte +7 -5
  89. package/dist/components/ResourceOperationsPage.svelte +25 -19
  90. package/dist/components/ResourceOperationsPage.svelte.d.ts +5 -1
  91. package/dist/components/RetryTaskButton.svelte +9 -5
  92. package/dist/components/RowActions.svelte +5 -3
  93. package/dist/components/SensitiveDataMask.svelte +3 -3
  94. package/dist/components/SettingsPage.svelte +1 -1
  95. package/dist/components/ShowInferencer.svelte +4 -2
  96. package/dist/components/ShowInferencer.svelte.d.ts +2 -0
  97. package/dist/components/ShowPage.svelte +49 -39
  98. package/dist/components/ShowPage.svelte.d.ts +2 -0
  99. package/dist/components/Sidebar.svelte +15 -13
  100. package/dist/components/SplitPaneLayout.svelte +4 -2
  101. package/dist/components/SpreadsheetView.svelte +81 -286
  102. package/dist/components/StepsForm.svelte +166 -49
  103. package/dist/components/StepsForm.svelte.d.ts +1 -0
  104. package/dist/components/SvarAutoTable.svelte +39 -0
  105. package/dist/components/SvarAutoTable.svelte.d.ts +13 -0
  106. package/dist/components/SvarDataGrid.svelte +362 -0
  107. package/dist/components/SvarDataGrid.svelte.d.ts +57 -0
  108. package/dist/components/SvarGridCell.svelte +10 -0
  109. package/dist/components/SvarGridCell.svelte.d.ts +7 -0
  110. package/dist/components/SvarResourceRead.svelte +50 -0
  111. package/dist/components/SvarResourceRead.svelte.d.ts +23 -0
  112. package/dist/components/SvarResourceTable.svelte +63 -0
  113. package/dist/components/SvarResourceTable.svelte.d.ts +42 -0
  114. package/dist/components/SvarResourceTableView.svelte +364 -0
  115. package/dist/components/SvarResourceTableView.svelte.d.ts +4 -0
  116. package/dist/components/TaskDetails.svelte +20 -7
  117. package/dist/components/TaskList.svelte +19 -7
  118. package/dist/components/TaskQueueDrawer.svelte +92 -37
  119. package/dist/components/Toast.svelte +4 -2
  120. package/dist/components/TooltipButton.svelte +1 -1
  121. package/dist/components/TreeSelect.svelte +212 -30
  122. package/dist/components/TreeSelect.svelte.d.ts +3 -1
  123. package/dist/components/ValidatedField.svelte +27 -0
  124. package/dist/components/ValidatedField.svelte.d.ts +35 -0
  125. package/dist/components/account/ImportMembersPage.svelte +2 -2
  126. package/dist/components/account/SecurityLogPage.svelte +3 -1
  127. package/dist/components/account/SettingsEnterprisePage.svelte +7 -5
  128. package/dist/components/account/TeamMembersPage.svelte +1 -1
  129. package/dist/components/auto-table-grid.d.ts +26 -0
  130. package/dist/components/auto-table-grid.js +1 -0
  131. package/dist/components/buttons/CloneButton.svelte +6 -4
  132. package/dist/components/buttons/DeleteButton.svelte +95 -29
  133. package/dist/components/buttons/DeleteButton.svelte.d.ts +2 -0
  134. package/dist/components/buttons/EditButton.svelte +6 -4
  135. package/dist/components/buttons/ExportButton.svelte +22 -4
  136. package/dist/components/buttons/ImportButton.svelte +83 -38
  137. package/dist/components/buttons/ImportButton.svelte.d.ts +6 -10
  138. package/dist/components/buttons/RefreshButton.svelte +48 -8
  139. package/dist/components/buttons/ShowButton.svelte +6 -4
  140. package/dist/components/content/ApiKeyList.svelte +3 -1
  141. package/dist/components/content/ContentPageHeader.svelte +12 -9
  142. package/dist/components/content/ContentPageShell.svelte +8 -9
  143. package/dist/components/content/FileBrowser.svelte +35 -0
  144. package/dist/components/content/FileBrowser.svelte.d.ts +14 -0
  145. package/dist/components/content/FileList.svelte +3 -1
  146. package/dist/components/content/MemberList.svelte +3 -1
  147. package/dist/components/content/MetricBlock.svelte +10 -13
  148. package/dist/components/content/NetworkTable.svelte +6 -4
  149. package/dist/components/content/NetworkTable.svelte.d.ts +1 -0
  150. package/dist/components/content/PageToolbar.svelte +6 -10
  151. package/dist/components/content/SectionHeader.svelte +8 -13
  152. package/dist/components/content/SecurityEventTable.svelte +3 -1
  153. package/dist/components/content/SettingsFieldRow.svelte +9 -23
  154. package/dist/components/content/SettingsGroup.svelte +11 -27
  155. package/dist/components/content/StatusBadge.svelte +3 -8
  156. package/dist/components/content/StatusTabs.svelte +2 -2
  157. package/dist/components/content/WorkspaceLayout.svelte +8 -12
  158. package/dist/components/enterprise/filter-tree.d.ts +48 -0
  159. package/dist/components/enterprise/filter-tree.js +224 -0
  160. package/dist/components/enterprise/json-schema-form.d.ts +39 -0
  161. package/dist/components/enterprise/json-schema-form.js +195 -0
  162. package/dist/components/enterprise/recursive-schema-form.d.ts +30 -0
  163. package/dist/components/enterprise/recursive-schema-form.js +196 -0
  164. package/dist/components/enterprise/spreadsheet-formula.d.ts +12 -0
  165. package/dist/components/enterprise/spreadsheet-formula.js +245 -0
  166. package/dist/components/fieldComponentMap.d.ts +18 -13
  167. package/dist/components/fieldComponentMap.js +100 -47
  168. package/dist/components/fields/AvatarField.svelte +1 -1
  169. package/dist/components/fields/ChoiceField.svelte +16 -0
  170. package/dist/components/fields/ChoiceField.svelte.d.ts +10 -0
  171. package/dist/components/fields/CodeField.svelte +11 -12
  172. package/dist/components/fields/CodeField.svelte.d.ts +1 -1
  173. package/dist/components/fields/DateField.svelte +4 -3
  174. package/dist/components/fields/DateRangeField.svelte +2 -4
  175. package/dist/components/fields/ImageField.svelte +3 -1
  176. package/dist/components/fields/ImagesField.svelte +23 -0
  177. package/dist/components/fields/ImagesField.svelte.d.ts +6 -0
  178. package/dist/components/fields/JsonField.svelte +19 -13
  179. package/dist/components/fields/PasswordField.svelte +5 -0
  180. package/dist/components/fields/PasswordField.svelte.d.ts +6 -0
  181. package/dist/components/fields/date-field-value.d.ts +2 -0
  182. package/dist/components/fields/date-field-value.js +13 -0
  183. package/dist/components/fields/json-value.d.ts +11 -0
  184. package/dist/components/fields/json-value.js +28 -0
  185. package/dist/components/json-schema-form-state.d.ts +37 -0
  186. package/dist/components/json-schema-form-state.js +168 -0
  187. package/dist/components/profile/ActivityTimeline.svelte +2 -2
  188. package/dist/components/record-detail.svelte.d.ts +19 -0
  189. package/dist/components/record-detail.svelte.js +34 -0
  190. package/dist/components/saved-list-views.js +29 -29
  191. package/dist/components/svar-grid-cells.d.ts +14 -0
  192. package/dist/components/svar-grid-cells.js +2 -0
  193. package/dist/components/svar-grid-contract.d.ts +80 -0
  194. package/dist/components/svar-grid-contract.js +159 -0
  195. package/dist/components/svar-grid-interactions.d.ts +54 -0
  196. package/dist/components/svar-grid-interactions.js +174 -0
  197. package/dist/components/svar-grid-loading.d.ts +40 -0
  198. package/dist/components/svar-grid-loading.js +180 -0
  199. package/dist/components/svar-grid-operations.d.ts +37 -0
  200. package/dist/components/svar-grid-operations.js +186 -0
  201. package/dist/components/svar-grid-panes.d.ts +34 -0
  202. package/dist/components/svar-grid-panes.js +66 -0
  203. package/dist/components/svar-grid-resource-loading.d.ts +18 -0
  204. package/dist/components/svar-grid-resource-loading.js +68 -0
  205. package/dist/components/svar-grid-resource-session.svelte.d.ts +29 -0
  206. package/dist/components/svar-grid-resource-session.svelte.js +61 -0
  207. package/dist/components/table-contract.d.ts +13 -0
  208. package/dist/components/table-contract.js +42 -0
  209. package/dist/components/task-utils.js +4 -2
  210. package/dist/components/ui/alert/alert-variants.d.ts +2 -3
  211. package/dist/components/ui/alert/alert-variants.js +1 -2
  212. package/dist/components/ui/alert/alert.svelte +4 -5
  213. package/dist/components/ui/alert/alert.svelte.d.ts +3 -8
  214. package/dist/components/ui/alert/index.js +0 -2
  215. package/dist/components/ui/avatar/avatar-variants.d.ts +2 -3
  216. package/dist/components/ui/avatar/avatar-variants.js +1 -2
  217. package/dist/components/ui/avatar/avatar.svelte +5 -6
  218. package/dist/components/ui/avatar/avatar.svelte.d.ts +3 -8
  219. package/dist/components/ui/badge/badge-variants.d.ts +2 -3
  220. package/dist/components/ui/badge/badge-variants.js +3 -2
  221. package/dist/components/ui/badge/badge.svelte +4 -5
  222. package/dist/components/ui/badge/badge.svelte.d.ts +3 -8
  223. package/dist/components/ui/badge/index.js +0 -2
  224. package/dist/components/ui/button/button-variants.d.ts +2 -3
  225. package/dist/components/ui/button/button-variants.js +5 -3
  226. package/dist/components/ui/button/button.svelte +100 -44
  227. package/dist/components/ui/button/button.svelte.d.ts +8 -12
  228. package/dist/components/ui/button/index.js +0 -2
  229. package/dist/components/ui/command/command-dialog.svelte +3 -1
  230. package/dist/components/ui/command/command-dialog.svelte.d.ts +1 -1
  231. package/dist/components/ui/command/command-group.svelte +4 -2
  232. package/dist/components/ui/command/command-item.svelte +4 -2
  233. package/dist/components/ui/command/command-separator.svelte +3 -1
  234. package/dist/components/ui/command/index.d.ts +5 -5
  235. package/dist/components/ui/input/input.svelte +41 -24
  236. package/dist/components/ui/input/input.svelte.d.ts +5 -4
  237. package/dist/components/ui/sheet/sheet.svelte +9 -3
  238. package/dist/components/ui/sheet/sheet.svelte.d.ts +1 -0
  239. package/dist/components/ui/textarea/textarea.svelte +2 -1
  240. package/dist/components/ui/tooltip/tooltip.svelte +4 -2
  241. package/dist/components.css +3079 -0
  242. package/dist/design-contract.d.ts +13 -0
  243. package/dist/design-contract.js +11 -0
  244. package/dist/design-system.d.ts +15 -0
  245. package/dist/design-system.js +7 -0
  246. package/dist/index.d.ts +15 -1
  247. package/dist/index.js +9 -0
  248. package/dist/inline-value.d.ts +5 -0
  249. package/dist/inline-value.js +24 -0
  250. package/dist/numeric-input.d.ts +2 -0
  251. package/dist/numeric-input.js +9 -0
  252. package/dist/page-chrome.css +12 -49
  253. package/dist/recipes.d.ts +4 -0
  254. package/dist/recipes.js +4 -0
  255. package/dist/rendering/index.d.ts +87 -0
  256. package/dist/rendering/index.js +117 -0
  257. package/dist/styled-system/css/conditions.js +36 -0
  258. package/dist/styled-system/css/css.d.ts +22 -0
  259. package/dist/styled-system/css/css.js +45 -0
  260. package/dist/styled-system/css/cva.d.ts +6 -0
  261. package/dist/styled-system/css/cva.js +87 -0
  262. package/dist/styled-system/css/cx.d.ts +5 -0
  263. package/dist/styled-system/css/cx.js +15 -0
  264. package/dist/styled-system/css/index.d.ts +5 -0
  265. package/dist/styled-system/css/index.js +4 -0
  266. package/dist/styled-system/css/sva.d.ts +4 -0
  267. package/dist/styled-system/css/sva.js +46 -0
  268. package/dist/styled-system/helpers.js +316 -0
  269. package/dist/styled-system/patterns/aspect-ratio.d.ts +20 -0
  270. package/dist/styled-system/patterns/aspect-ratio.js +38 -0
  271. package/dist/styled-system/patterns/bleed.d.ts +21 -0
  272. package/dist/styled-system/patterns/bleed.js +24 -0
  273. package/dist/styled-system/patterns/box.d.ts +20 -0
  274. package/dist/styled-system/patterns/box.js +15 -0
  275. package/dist/styled-system/patterns/center.d.ts +20 -0
  276. package/dist/styled-system/patterns/center.js +21 -0
  277. package/dist/styled-system/patterns/circle.d.ts +20 -0
  278. package/dist/styled-system/patterns/circle.js +25 -0
  279. package/dist/styled-system/patterns/container.d.ts +20 -0
  280. package/dist/styled-system/patterns/container.js +21 -0
  281. package/dist/styled-system/patterns/cq.d.ts +21 -0
  282. package/dist/styled-system/patterns/cq.js +21 -0
  283. package/dist/styled-system/patterns/divider.d.ts +22 -0
  284. package/dist/styled-system/patterns/divider.js +25 -0
  285. package/dist/styled-system/patterns/flex.d.ts +26 -0
  286. package/dist/styled-system/patterns/flex.js +26 -0
  287. package/dist/styled-system/patterns/float.d.ts +23 -0
  288. package/dist/styled-system/patterns/float.js +52 -0
  289. package/dist/styled-system/patterns/grid-item.d.ts +25 -0
  290. package/dist/styled-system/patterns/grid-item.js +25 -0
  291. package/dist/styled-system/patterns/grid.d.ts +24 -0
  292. package/dist/styled-system/patterns/grid.js +27 -0
  293. package/dist/styled-system/patterns/hstack.d.ts +21 -0
  294. package/dist/styled-system/patterns/hstack.js +24 -0
  295. package/dist/styled-system/patterns/index.d.ts +21 -0
  296. package/dist/styled-system/patterns/index.js +20 -0
  297. package/dist/styled-system/patterns/link-overlay.d.ts +20 -0
  298. package/dist/styled-system/patterns/link-overlay.js +24 -0
  299. package/dist/styled-system/patterns/spacer.d.ts +20 -0
  300. package/dist/styled-system/patterns/spacer.js +25 -0
  301. package/dist/styled-system/patterns/square.d.ts +20 -0
  302. package/dist/styled-system/patterns/square.js +24 -0
  303. package/dist/styled-system/patterns/stack.d.ts +23 -0
  304. package/dist/styled-system/patterns/stack.js +24 -0
  305. package/dist/styled-system/patterns/visually-hidden.d.ts +20 -0
  306. package/dist/styled-system/patterns/visually-hidden.js +18 -0
  307. package/dist/styled-system/patterns/vstack.d.ts +21 -0
  308. package/dist/styled-system/patterns/vstack.js +24 -0
  309. package/dist/styled-system/patterns/wrap.d.ts +24 -0
  310. package/dist/styled-system/patterns/wrap.js +25 -0
  311. package/dist/styled-system/recipes/content-header.d.ts +31 -0
  312. package/dist/styled-system/recipes/content-header.js +65 -0
  313. package/dist/styled-system/recipes/content-page.d.ts +34 -0
  314. package/dist/styled-system/recipes/content-page.js +43 -0
  315. package/dist/styled-system/recipes/create-recipe.js +82 -0
  316. package/dist/styled-system/recipes/index.d.ts +17 -0
  317. package/dist/styled-system/recipes/index.js +16 -0
  318. package/dist/styled-system/recipes/metric-block.d.ts +34 -0
  319. package/dist/styled-system/recipes/metric-block.js +76 -0
  320. package/dist/styled-system/recipes/product-list.d.ts +31 -0
  321. package/dist/styled-system/recipes/product-list.js +73 -0
  322. package/dist/styled-system/recipes/product-section.d.ts +31 -0
  323. package/dist/styled-system/recipes/product-section.js +49 -0
  324. package/dist/styled-system/recipes/product-settings-row.d.ts +34 -0
  325. package/dist/styled-system/recipes/product-settings-row.js +58 -0
  326. package/dist/styled-system/recipes/product-settings.d.ts +31 -0
  327. package/dist/styled-system/recipes/product-settings.js +57 -0
  328. package/dist/styled-system/recipes/product-status.d.ts +34 -0
  329. package/dist/styled-system/recipes/product-status.js +45 -0
  330. package/dist/styled-system/recipes/product-toolbar.d.ts +31 -0
  331. package/dist/styled-system/recipes/product-toolbar.js +41 -0
  332. package/dist/styled-system/recipes/product-workspace.d.ts +34 -0
  333. package/dist/styled-system/recipes/product-workspace.js +58 -0
  334. package/dist/styled-system/recipes/surface-metric.d.ts +38 -0
  335. package/dist/styled-system/recipes/surface-metric.js +63 -0
  336. package/dist/styled-system/recipes/surface-table.d.ts +34 -0
  337. package/dist/styled-system/recipes/surface-table.js +62 -0
  338. package/dist/styled-system/recipes/ui-badge.d.ts +31 -0
  339. package/dist/styled-system/recipes/ui-badge.js +38 -0
  340. package/dist/styled-system/recipes/ui-button.d.ts +32 -0
  341. package/dist/styled-system/recipes/ui-button.js +43 -0
  342. package/dist/styled-system/recipes/ui-input.d.ts +31 -0
  343. package/dist/styled-system/recipes/ui-input.js +49 -0
  344. package/dist/styled-system/recipes/ui-textarea.d.ts +31 -0
  345. package/dist/styled-system/recipes/ui-textarea.js +24 -0
  346. package/dist/styled-system/styles.css +1257 -0
  347. package/dist/styled-system/tokens/index.d.ts +9 -0
  348. package/dist/styled-system/tokens/index.js +268 -0
  349. package/dist/styled-system/tokens/tokens.d.ts +36 -0
  350. package/dist/styled-system/types/composition.d.ts +227 -0
  351. package/dist/styled-system/types/conditions.d.ts +236 -0
  352. package/dist/styled-system/types/csstype.d.ts +22570 -0
  353. package/dist/styled-system/types/index.d.ts +6 -0
  354. package/dist/styled-system/types/parts.d.ts +8 -0
  355. package/dist/styled-system/types/pattern.d.ts +78 -0
  356. package/dist/styled-system/types/prop-type.d.ts +223 -0
  357. package/dist/styled-system/types/recipe.d.ts +181 -0
  358. package/dist/styled-system/types/selectors.d.ts +59 -0
  359. package/dist/styled-system/types/static-css.d.ts +56 -0
  360. package/dist/styled-system/types/style-props.d.ts +8088 -0
  361. package/dist/styled-system/types/system-types.d.ts +151 -0
  362. package/dist/styles/aliases.css +49 -0
  363. package/dist/styles/compatibility.epilogue.css +384 -0
  364. package/dist/styles/compatibility.prelude.css +5513 -0
  365. package/dist/styles/conditional-states.css +28 -0
  366. package/dist/styles/conditional-utilities.css +22 -0
  367. package/dist/styles/recipes.css +1262 -0
  368. package/dist/types.d.ts +3 -3
  369. package/dist/utils.d.ts +1 -1
  370. package/dist/utils.js +1 -1
  371. package/package.json +38 -14
  372. package/styles-compatibility.json +12 -0
@@ -0,0 +1,22 @@
1
+ /* eslint-disable */
2
+ import type { SystemStyleObject } from '../types/index';
3
+
4
+ type Styles = SystemStyleObject | undefined | null | false
5
+
6
+ interface CssRawFunction {
7
+ (styles: Styles): SystemStyleObject
8
+ (styles: Styles[]): SystemStyleObject
9
+ (...styles: Array<Styles | Styles[]>): SystemStyleObject
10
+ (styles: Styles): SystemStyleObject
11
+ }
12
+
13
+ interface CssFunction {
14
+ (styles: Styles): string
15
+ (styles: Styles[]): string
16
+ (...styles: Array<Styles | Styles[]>): string
17
+ (styles: Styles): string
18
+
19
+ raw: CssRawFunction
20
+ }
21
+
22
+ export declare const css: CssFunction;
@@ -0,0 +1,45 @@
1
+ import { createCss, createMergeCss, hypenateProperty, withoutSpace } from '../helpers.js';
2
+ import { sortConditions, finalizeConditions } from './conditions.js';
3
+
4
+ const utilities = "aspectRatio:asp,boxDecorationBreak:bx-db,zIndex:z,boxSizing:bx-s,objectPosition:obj-p,objectFit:obj-f,overscrollBehavior:ovs-b,overscrollBehaviorX:ovs-bx,overscrollBehaviorY:ovs-by,position:pos/1,top:top,left:left,inset:inset,insetInline:inset-x/insetX,insetBlock:inset-y/insetY,insetBlockEnd:inset-be,insetBlockStart:inset-bs,insetInlineEnd:inset-e/insetEnd/end,insetInlineStart:inset-s/insetStart/start,right:right,bottom:bottom,float:float,visibility:vis,display:d,hideFrom:hide,hideBelow:show,flexBasis:flex-b,flex:flex,flexDirection:flex-d/flexDir,flexGrow:flex-g,flexShrink:flex-sh,gridTemplateColumns:grid-tc,gridTemplateRows:grid-tr,gridColumn:grid-c,gridRow:grid-r,gridColumnStart:grid-cs,gridColumnEnd:grid-ce,gridAutoFlow:grid-af,gridAutoColumns:grid-ac,gridAutoRows:grid-ar,gap:gap,gridGap:grid-g,gridRowGap:grid-rg,gridColumnGap:grid-cg,rowGap:rg,columnGap:cg,justifyContent:jc,alignContent:ac,alignItems:ai,alignSelf:as,padding:p/1,paddingLeft:pl/1,paddingRight:pr/1,paddingTop:pt/1,paddingBottom:pb/1,paddingBlock:py/1/paddingY,paddingBlockEnd:pbe,paddingBlockStart:pbs,paddingInline:px/paddingX/1,paddingInlineEnd:pe/1/paddingEnd,paddingInlineStart:ps/1/paddingStart,marginLeft:ml/1,marginRight:mr/1,marginTop:mt/1,marginBottom:mb/1,margin:m/1,marginBlock:my/1/marginY,marginBlockEnd:mbe,marginBlockStart:mbs,marginInline:mx/1/marginX,marginInlineEnd:me/1/marginEnd,marginInlineStart:ms/1/marginStart,spaceX:sx,spaceY:sy,outlineWidth:ring-w/ringWidth,outlineColor:ring-c/ringColor,outline:ring/1,outlineOffset:ring-o/ringOffset,focusRing:focus-ring,focusVisibleRing:focus-v-ring,focusRingColor:focus-ring-c,focusRingOffset:focus-ring-o,focusRingWidth:focus-ring-w,focusRingStyle:focus-ring-s,divideX:dvd-x,divideY:dvd-y,divideColor:dvd-c,divideStyle:dvd-s,width:w/1,inlineSize:w-is,minWidth:min-w/minW,minInlineSize:min-w-is,maxWidth:max-w/maxW,maxInlineSize:max-w-is,height:h/1,blockSize:h-bs,minHeight:min-h/minH,minBlockSize:min-h-bs,maxHeight:max-h/maxH,maxBlockSize:max-b,boxSize:size,color:c,fontFamily:ff,fontSize:fs,fontSizeAdjust:fs-a,fontPalette:fp,fontKerning:fk,fontFeatureSettings:ff-s,fontWeight:fw,fontSmoothing:fsmt,fontVariant:fv,fontVariantAlternates:fv-alt,fontVariantCaps:fv-caps,fontVariationSettings:fv-s,fontVariantNumeric:fv-num,letterSpacing:ls,lineHeight:lh,textAlign:ta,textDecoration:td,textDecorationColor:td-c,textEmphasisColor:te-c,textDecorationStyle:td-s,textDecorationThickness:td-t,textUnderlineOffset:tu-o,textTransform:tt,textIndent:ti,textShadow:tsh,textShadowColor:tsh-c/textShadowColor,WebkitTextFillColor:wktf-c,textOverflow:tov,verticalAlign:va,wordBreak:wb,textWrap:tw,truncate:trunc,lineClamp:lc,listStyleType:li-t,listStylePosition:li-pos,listStyleImage:li-img,listStyle:li-s,backgroundPosition:bg-p/bgPosition,backgroundPositionX:bg-p-x/bgPositionX,backgroundPositionY:bg-p-y/bgPositionY,backgroundAttachment:bg-a/bgAttachment,backgroundClip:bg-cp/bgClip,background:bg/1,backgroundColor:bg-c/bgColor,backgroundOrigin:bg-o/bgOrigin,backgroundImage:bg-i/bgImage,backgroundRepeat:bg-r/bgRepeat,backgroundBlendMode:bg-bm/bgBlendMode,backgroundSize:bg-s/bgSize,backgroundGradient:bg-grad/bgGradient,backgroundLinear:bg-linear/bgLinear,backgroundRadial:bg-radial/bgRadial,backgroundConic:bg-conic/bgConic,textGradient:txt-grad,gradientFromPosition:grad-from-pos,gradientToPosition:grad-to-pos,gradientFrom:grad-from,gradientTo:grad-to,gradientVia:grad-via,gradientViaPosition:grad-via-pos,borderRadius:bdr/rounded,borderTopLeftRadius:bdr-tl/roundedTopLeft,borderTopRightRadius:bdr-tr/roundedTopRight,borderBottomRightRadius:bdr-br/roundedBottomRight,borderBottomLeftRadius:bdr-bl/roundedBottomLeft,borderTopRadius:bdr-t/roundedTop,borderRightRadius:bdr-r/roundedRight,borderBottomRadius:bdr-b/roundedBottom,borderLeftRadius:bdr-l/roundedLeft,borderStartStartRadius:bdr-ss/roundedStartStart,borderStartEndRadius:bdr-se/roundedStartEnd,borderStartRadius:bdr-s/roundedStart,borderEndStartRadius:bdr-es/roundedEndStart,borderEndEndRadius:bdr-ee/roundedEndEnd,borderEndRadius:bdr-e/roundedEnd,border:bd,borderWidth:bd-w,borderTopWidth:bd-t-w,borderLeftWidth:bd-l-w,borderRightWidth:bd-r-w,borderBottomWidth:bd-b-w,borderBlockStartWidth:bd-bs-w,borderBlockEndWidth:bd-be-w,borderColor:bd-c,borderInline:bd-x/borderX,borderInlineWidth:bd-x-w/borderXWidth,borderInlineColor:bd-x-c/borderXColor,borderBlock:bd-y/borderY,borderBlockWidth:bd-y-w/borderYWidth,borderBlockColor:bd-y-c/borderYColor,borderLeft:bd-l,borderLeftColor:bd-l-c,borderInlineStart:bd-s/borderStart,borderInlineStartWidth:bd-s-w/borderStartWidth,borderInlineStartColor:bd-s-c/borderStartColor,borderRight:bd-r,borderRightColor:bd-r-c,borderInlineEnd:bd-e/borderEnd,borderInlineEndWidth:bd-e-w/borderEndWidth,borderInlineEndColor:bd-e-c/borderEndColor,borderTop:bd-t,borderTopColor:bd-t-c,borderBottom:bd-b,borderBottomColor:bd-b-c,borderBlockEnd:bd-be,borderBlockEndColor:bd-be-c,borderBlockStart:bd-bs,borderBlockStartColor:bd-bs-c,opacity:op,boxShadow:bx-sh/shadow,boxShadowColor:bx-sh-c/shadowColor,mixBlendMode:mix-bm,filter:filter,brightness:brightness,contrast:contrast,grayscale:grayscale,hueRotate:hue-rotate,invert:invert,saturate:saturate,sepia:sepia,dropShadow:drop-shadow,blur:blur,backdropFilter:bkdp,backdropBlur:bkdp-blur,backdropBrightness:bkdp-brightness,backdropContrast:bkdp-contrast,backdropGrayscale:bkdp-grayscale,backdropHueRotate:bkdp-hue-rotate,backdropInvert:bkdp-invert,backdropOpacity:bkdp-opacity,backdropSaturate:bkdp-saturate,backdropSepia:bkdp-sepia,borderCollapse:bd-cl,borderSpacing:bd-sp,borderSpacingX:bd-sx,borderSpacingY:bd-sy,tableLayout:tbl,transitionTimingFunction:trs-tmf,transitionDelay:trs-dly,transitionDuration:trs-dur,transitionProperty:trs-prop,transition:trs,animation:anim,animationName:anim-n,animationTimingFunction:anim-tmf,animationDuration:anim-dur,animationDelay:anim-dly,animationPlayState:anim-ps,animationComposition:anim-comp,animationFillMode:anim-fm,animationDirection:anim-dir,animationIterationCount:anim-ic,animationRange:anim-r,animationState:anim-s,animationRangeStart:anim-rs,animationRangeEnd:anim-re,animationTimeline:anim-tl,transformOrigin:trf-o,transformBox:trf-b,transformStyle:trf-s,transform:trf,rotate:rotate,rotateX:rotate-x,rotateY:rotate-y,rotateZ:rotate-z,scale:scale,scaleX:scale-x,scaleY:scale-y,translate:translate,translateX:translate-x/x,translateY:translate-y/y,translateZ:translate-z/z,accentColor:ac-c,caretColor:ca-c,scrollBehavior:scr-bhv,scrollbar:scr-bar,scrollbarColor:scr-bar-c,scrollbarGutter:scr-bar-g,scrollbarWidth:scr-bar-w,scrollMargin:scr-m,scrollMarginLeft:scr-ml,scrollMarginRight:scr-mr,scrollMarginTop:scr-mt,scrollMarginBottom:scr-mb,scrollMarginBlock:scr-my/scrollMarginY,scrollMarginBlockEnd:scr-mbe,scrollMarginBlockStart:scr-mbt,scrollMarginInline:scr-mx/scrollMarginX,scrollMarginInlineEnd:scr-me,scrollMarginInlineStart:scr-ms,scrollPadding:scr-p,scrollPaddingBlock:scr-py/scrollPaddingY,scrollPaddingBlockStart:scr-pbs,scrollPaddingBlockEnd:scr-pbe,scrollPaddingInline:scr-px/scrollPaddingX,scrollPaddingInlineEnd:scr-pe,scrollPaddingInlineStart:scr-ps,scrollPaddingLeft:scr-pl,scrollPaddingRight:scr-pr,scrollPaddingTop:scr-pt,scrollPaddingBottom:scr-pb,scrollSnapAlign:scr-sa,scrollSnapStop:scrs-s,scrollSnapType:scrs-t,scrollSnapStrictness:scrs-strt,scrollSnapMargin:scrs-m,scrollSnapMarginTop:scrs-mt,scrollSnapMarginBottom:scrs-mb,scrollSnapMarginLeft:scrs-ml,scrollSnapMarginRight:scrs-mr,scrollSnapCoordinate:scrs-c,scrollSnapDestination:scrs-d,scrollSnapPointsX:scrs-px,scrollSnapPointsY:scrs-py,scrollSnapTypeX:scrs-tx,scrollSnapTypeY:scrs-ty,scrollTimeline:scrtl,scrollTimelineAxis:scrtl-a,scrollTimelineName:scrtl-n,touchAction:tch-a,userSelect:us,overflow:ov,overflowWrap:ov-wrap,overflowX:ov-x,overflowY:ov-y,overflowAnchor:ov-a,overflowBlock:ov-b,overflowInline:ov-i,overflowClipBox:ovcp-bx,overflowClipMargin:ovcp-m,overscrollBehaviorBlock:ovs-bb,overscrollBehaviorInline:ovs-bi,fill:fill,stroke:stk,strokeWidth:stk-w,strokeDasharray:stk-dsh,strokeDashoffset:stk-do,strokeLinecap:stk-lc,strokeLinejoin:stk-lj,strokeMiterlimit:stk-ml,strokeOpacity:stk-op,srOnly:sr,debug:debug,appearance:ap,backfaceVisibility:bfv,clipPath:cp-path,hyphens:hy,mask:msk,maskImage:msk-i,maskSize:msk-s,textSizeAdjust:txt-adj,container:cq,containerName:cq-n,containerType:cq-t,cursor:cursor"
5
+
6
+ const classNameByProp = new Map()
7
+ const shorthands = new Map()
8
+ utilities.split(',').forEach((utility) => {
9
+ const [prop, meta] = utility.split(':')
10
+ const [className, ...shorthandList] = meta.split('/')
11
+ classNameByProp.set(prop, className)
12
+ if (shorthandList.length) {
13
+ shorthandList.forEach((shorthand) => {
14
+ shorthands.set(shorthand === '1' ? className : shorthand, prop)
15
+ })
16
+ }
17
+ })
18
+
19
+ const resolveShorthand = (prop) => shorthands.get(prop) || prop
20
+
21
+ const context = {
22
+
23
+ conditions: {
24
+ shift: sortConditions,
25
+ finalize: finalizeConditions,
26
+ breakpoints: { keys: ["base"] }
27
+ },
28
+ utility: {
29
+ prefix: "svadmin",
30
+ transform: (prop, value) => {
31
+ const key = resolveShorthand(prop)
32
+ const propKey = classNameByProp.get(key) || hypenateProperty(key)
33
+ return { className: `${propKey}_${withoutSpace(value)}` }
34
+ },
35
+ hasShorthand: true,
36
+ toHash: (path, hashFn) => hashFn(path.join(":")),
37
+ resolveShorthand: resolveShorthand,
38
+ }
39
+ }
40
+
41
+ const cssFn = createCss(context)
42
+ export const css = (...styles) => cssFn(mergeCss(...styles))
43
+ css.raw = (...styles) => mergeCss(...styles)
44
+
45
+ export const { mergeCss, assignCss } = createMergeCss(context)
@@ -0,0 +1,6 @@
1
+ /* eslint-disable */
2
+ import type { RecipeCreatorFn } from '../types/recipe';
3
+
4
+ export declare const cva: RecipeCreatorFn
5
+
6
+ export type { RecipeVariant, RecipeVariantProps } from '../types/recipe';
@@ -0,0 +1,87 @@
1
+ import { compact, mergeProps, memo, splitProps, uniq } from '../helpers.js';
2
+ import { css, mergeCss } from './css.js';
3
+
4
+ const defaults = (conf) => ({
5
+ base: {},
6
+ variants: {},
7
+ defaultVariants: {},
8
+ compoundVariants: [],
9
+ ...conf,
10
+ })
11
+
12
+ export function cva(config) {
13
+ const { base, variants, defaultVariants, compoundVariants } = defaults(config)
14
+ const getVariantProps = (variants) => ({ ...defaultVariants, ...compact(variants) })
15
+
16
+ function resolve(props = {}) {
17
+ const computedVariants = getVariantProps(props)
18
+ let variantCss = { ...base }
19
+ for (const [key, value] of Object.entries(computedVariants)) {
20
+ if (variants[key]?.[value]) {
21
+ variantCss = mergeCss(variantCss, variants[key][value])
22
+ }
23
+ }
24
+ const compoundVariantCss = getCompoundVariantCss(compoundVariants, computedVariants)
25
+ return mergeCss(variantCss, compoundVariantCss)
26
+ }
27
+
28
+ function merge(__cva) {
29
+ const override = defaults(__cva.config)
30
+ const variantKeys = uniq(__cva.variantKeys, Object.keys(variants))
31
+ return cva({
32
+ base: mergeCss(base, override.base),
33
+ variants: Object.fromEntries(
34
+ variantKeys.map((key) => [key, mergeCss(variants[key], override.variants[key])]),
35
+ ),
36
+ defaultVariants: mergeProps(defaultVariants, override.defaultVariants),
37
+ compoundVariants: [...compoundVariants, ...override.compoundVariants],
38
+ })
39
+ }
40
+
41
+ function cvaFn(props) {
42
+ return css(resolve(props))
43
+ }
44
+
45
+ const variantKeys = Object.keys(variants)
46
+
47
+ function splitVariantProps(props) {
48
+ return splitProps(props, variantKeys)
49
+ }
50
+
51
+ const variantMap = Object.fromEntries(Object.entries(variants).map(([key, value]) => [key, Object.keys(value)]))
52
+
53
+ return Object.assign(memo(cvaFn), {
54
+ __cva__: true,
55
+ variantMap,
56
+ variantKeys,
57
+ raw: resolve,
58
+ config,
59
+ merge,
60
+ splitVariantProps,
61
+ getVariantProps
62
+ })
63
+ }
64
+
65
+ export function getCompoundVariantCss(compoundVariants, variantMap) {
66
+ let result = {}
67
+ compoundVariants.forEach((compoundVariant) => {
68
+ const isMatching = Object.entries(compoundVariant).every(([key, value]) => {
69
+ if (key === 'css') return true
70
+
71
+ const values = Array.isArray(value) ? value : [value]
72
+ return values.some((value) => variantMap[key] === value)
73
+ })
74
+
75
+ if (isMatching) {
76
+ result = mergeCss(result, compoundVariant.css)
77
+ }
78
+ })
79
+
80
+ return result
81
+ }
82
+
83
+ export function assertCompoundVariant(name, compoundVariants, variants, prop) {
84
+ if (compoundVariants.length > 0 && typeof variants?.[prop] === 'object') {
85
+ throw new Error(`[recipe:${name}:${prop}] Conditions are not supported when using compound variants.`)
86
+ }
87
+ }
@@ -0,0 +1,5 @@
1
+ /* eslint-disable */
2
+ type Argument = string | boolean | null | undefined
3
+
4
+ /** Conditionally join classNames into a single string */
5
+ export declare function cx(...args: Argument[]): string
@@ -0,0 +1,15 @@
1
+ function cx() {
2
+ let str = '',
3
+ i = 0,
4
+ arg
5
+
6
+ for (; i < arguments.length; ) {
7
+ if ((arg = arguments[i++]) && typeof arg === 'string') {
8
+ str && (str += ' ')
9
+ str += arg
10
+ }
11
+ }
12
+ return str
13
+ }
14
+
15
+ export { cx }
@@ -0,0 +1,5 @@
1
+ /* eslint-disable */
2
+ export * from './css';
3
+ export * from './cx';
4
+ export * from './cva';
5
+ export * from './sva';
@@ -0,0 +1,4 @@
1
+ export * from './css.js';
2
+ export * from './cx.js';
3
+ export * from './cva.js';
4
+ export * from './sva.js';
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ import type { SlotRecipeCreatorFn } from '../types/recipe';
3
+
4
+ export declare const sva: SlotRecipeCreatorFn
@@ -0,0 +1,46 @@
1
+ import { compact, getSlotRecipes, memo, splitProps } from '../helpers.js';
2
+ import { cva } from './cva.js';
3
+ import { cx } from './cx.js';
4
+
5
+ export function sva(config) {
6
+ const slots = Object.entries(getSlotRecipes(config)).map(([slot, slotCva]) => [slot, cva(slotCva)])
7
+ const defaultVariants = config.defaultVariants ?? {}
8
+
9
+ const classNameMap = slots.reduce((acc, [slot, cvaFn]) => {
10
+ if (config.className) acc[slot] = cvaFn.config.className
11
+ return acc
12
+ }, {})
13
+
14
+ function svaFn(props) {
15
+ const result = slots.map(([slot, cvaFn]) => [slot, cx(cvaFn(props), classNameMap[slot])])
16
+ return Object.fromEntries(result)
17
+ }
18
+
19
+ function raw(props) {
20
+ const result = slots.map(([slot, cvaFn]) => [slot, cvaFn.raw(props)])
21
+ return Object.fromEntries(result)
22
+ }
23
+
24
+ const variants = config.variants ?? {};
25
+ const variantKeys = Object.keys(variants);
26
+
27
+ function splitVariantProps(props) {
28
+ return splitProps(props, variantKeys);
29
+ }
30
+ const getVariantProps = (variants) => ({ ...defaultVariants, ...compact(variants) })
31
+
32
+ const variantMap = Object.fromEntries(
33
+ Object.entries(variants).map(([key, value]) => [key, Object.keys(value)])
34
+ );
35
+
36
+ return Object.assign(memo(svaFn), {
37
+ __cva__: false,
38
+ raw,
39
+ config,
40
+ variantMap,
41
+ variantKeys,
42
+ classNameMap,
43
+ splitVariantProps,
44
+ getVariantProps,
45
+ })
46
+ }
@@ -0,0 +1,316 @@
1
+ // src/assert.ts
2
+ function isObject(value) {
3
+ return typeof value === "object" && value != null && !Array.isArray(value);
4
+ }
5
+ var isObjectOrArray = (obj) => typeof obj === "object" && obj !== null;
6
+
7
+ // src/compact.ts
8
+ function compact(value) {
9
+ return Object.fromEntries(Object.entries(value ?? {}).filter(([_, value2]) => value2 !== void 0));
10
+ }
11
+
12
+ // src/condition.ts
13
+ var isBaseCondition = (v) => v === "base";
14
+ function filterBaseConditions(c) {
15
+ return c.slice().filter((v) => !isBaseCondition(v));
16
+ }
17
+
18
+ // src/hash.ts
19
+ function toChar(code) {
20
+ return String.fromCharCode(code + (code > 25 ? 39 : 97));
21
+ }
22
+ function toName(code) {
23
+ let name = "";
24
+ let x;
25
+ for (x = Math.abs(code); x > 52; x = x / 52 | 0) name = toChar(x % 52) + name;
26
+ return toChar(x % 52) + name;
27
+ }
28
+ function toPhash(h, x) {
29
+ let i = x.length;
30
+ while (i) h = h * 33 ^ x.charCodeAt(--i);
31
+ return h;
32
+ }
33
+ function toHash(value) {
34
+ return toName(toPhash(5381, value) >>> 0);
35
+ }
36
+
37
+ // src/important.ts
38
+ var importantRegex = /\s*!(important)?/i;
39
+ function isImportant(value) {
40
+ return typeof value === "string" ? importantRegex.test(value) : false;
41
+ }
42
+ function withoutImportant(value) {
43
+ return typeof value === "string" ? value.replace(importantRegex, "").trim() : value;
44
+ }
45
+ function withoutSpace(str) {
46
+ return typeof str === "string" ? str.replaceAll(" ", "_") : str;
47
+ }
48
+
49
+ // src/memo.ts
50
+ var memo = (fn) => {
51
+ const cache = /* @__PURE__ */ new Map();
52
+ const get = (...args) => {
53
+ const key = JSON.stringify(args);
54
+ if (cache.has(key)) {
55
+ return cache.get(key);
56
+ }
57
+ const result = fn(...args);
58
+ cache.set(key, result);
59
+ return result;
60
+ };
61
+ return get;
62
+ };
63
+
64
+ // src/merge-props.ts
65
+ var MERGE_OMIT = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
66
+ function mergeProps(...sources) {
67
+ return sources.reduce((prev, obj) => {
68
+ if (!obj) return prev;
69
+ Object.keys(obj).forEach((key) => {
70
+ if (MERGE_OMIT.has(key)) return;
71
+ const prevValue = prev[key];
72
+ const value = obj[key];
73
+ if (isObject(prevValue) && isObject(value)) {
74
+ prev[key] = mergeProps(prevValue, value);
75
+ } else {
76
+ prev[key] = value;
77
+ }
78
+ });
79
+ return prev;
80
+ }, {});
81
+ }
82
+
83
+ // src/walk-object.ts
84
+ var isNotNullish = (element) => element != null;
85
+ function walkObject(target, predicate, options = {}) {
86
+ const { stop, getKey } = options;
87
+ function inner(value, path = []) {
88
+ if (isObjectOrArray(value)) {
89
+ const result = {};
90
+ for (const [prop, child] of Object.entries(value)) {
91
+ const key = getKey?.(prop, child) ?? prop;
92
+ const childPath = [...path, key];
93
+ if (stop?.(value, childPath)) {
94
+ return predicate(value, path);
95
+ }
96
+ const next = inner(child, childPath);
97
+ if (isNotNullish(next)) {
98
+ result[key] = next;
99
+ }
100
+ }
101
+ return result;
102
+ }
103
+ return predicate(value, path);
104
+ }
105
+ return inner(target);
106
+ }
107
+ function mapObject(obj, fn) {
108
+ if (Array.isArray(obj)) return obj.map((value) => fn(value));
109
+ if (!isObject(obj)) return fn(obj);
110
+ return walkObject(obj, (value) => fn(value));
111
+ }
112
+
113
+ // src/normalize-style-object.ts
114
+ function toResponsiveObject(values, breakpoints) {
115
+ return values.reduce(
116
+ (acc, current, index) => {
117
+ const key = breakpoints[index];
118
+ if (current != null) {
119
+ acc[key] = current;
120
+ }
121
+ return acc;
122
+ },
123
+ {}
124
+ );
125
+ }
126
+ function normalizeStyleObject(styles, context, shorthand = true) {
127
+ const { utility, conditions } = context;
128
+ const { hasShorthand, resolveShorthand } = utility;
129
+ return walkObject(
130
+ styles,
131
+ (value) => {
132
+ return Array.isArray(value) ? toResponsiveObject(value, conditions.breakpoints.keys) : value;
133
+ },
134
+ {
135
+ stop: (value) => Array.isArray(value),
136
+ getKey: shorthand ? (prop) => hasShorthand ? resolveShorthand(prop) : prop : void 0
137
+ }
138
+ );
139
+ }
140
+
141
+ // src/classname.ts
142
+ var fallbackCondition = {
143
+ shift: (v) => v,
144
+ finalize: (v) => v,
145
+ breakpoints: { keys: [] }
146
+ };
147
+ var sanitize = (value) => typeof value === "string" ? value.replaceAll(/[\n\s]+/g, " ") : value;
148
+ function createCss(context) {
149
+ const { utility, hash, conditions: conds = fallbackCondition } = context;
150
+ const formatClassName = (str) => [utility.prefix, str].filter(Boolean).join("-");
151
+ const hashFn = (conditions, className) => {
152
+ let result;
153
+ if (hash) {
154
+ const baseArray = [...conds.finalize(conditions), className];
155
+ result = formatClassName(utility.toHash(baseArray, toHash));
156
+ } else {
157
+ const baseArray = [...conds.finalize(conditions), formatClassName(className)];
158
+ result = baseArray.join(":");
159
+ }
160
+ return result;
161
+ };
162
+ return memo(({ base, ...styles } = {}) => {
163
+ const styleObject = Object.assign(styles, base);
164
+ const normalizedObject = normalizeStyleObject(styleObject, context);
165
+ const classNames = /* @__PURE__ */ new Set();
166
+ walkObject(normalizedObject, (value, paths) => {
167
+ if (value == null) return;
168
+ const important = isImportant(value);
169
+ const [prop, ...allConditions] = conds.shift(paths);
170
+ const conditions = filterBaseConditions(allConditions);
171
+ const transformed = utility.transform(prop, withoutImportant(sanitize(value)));
172
+ let className = hashFn(conditions, transformed.className);
173
+ if (important) className = `${className}!`;
174
+ classNames.add(className);
175
+ });
176
+ return Array.from(classNames).join(" ");
177
+ });
178
+ }
179
+ function compactStyles(...styles) {
180
+ return styles.flat().filter((style) => isObject(style) && Object.keys(compact(style)).length > 0);
181
+ }
182
+ function createMergeCss(context) {
183
+ function resolve(styles) {
184
+ const allStyles = compactStyles(...styles);
185
+ if (allStyles.length === 1) return allStyles;
186
+ return allStyles.map((style) => normalizeStyleObject(style, context));
187
+ }
188
+ function mergeCss(...styles) {
189
+ return mergeProps(...resolve(styles));
190
+ }
191
+ function assignCss(...styles) {
192
+ return Object.assign({}, ...resolve(styles));
193
+ }
194
+ return { mergeCss: memo(mergeCss), assignCss };
195
+ }
196
+
197
+ // src/hypenate-property.ts
198
+ var wordRegex = /([A-Z])/g;
199
+ var msRegex = /^ms-/;
200
+ var hypenateProperty = memo((property) => {
201
+ if (property.startsWith("--")) return property;
202
+ return property.replace(wordRegex, "-$1").replace(msRegex, "-ms-").toLowerCase();
203
+ });
204
+
205
+ // src/is-css-function.ts
206
+ var fns = ["min", "max", "clamp", "calc"];
207
+ var fnRegExp = new RegExp(`^(${fns.join("|")})\\(.*\\)`);
208
+ var isCssFunction = (v) => typeof v === "string" && fnRegExp.test(v);
209
+
210
+ // src/is-css-unit.ts
211
+ var lengthUnits = "cm,mm,Q,in,pc,pt,px,em,ex,ch,rem,lh,rlh,vw,vh,vmin,vmax,vb,vi,svw,svh,lvw,lvh,dvw,dvh,cqw,cqh,cqi,cqb,cqmin,cqmax,%";
212
+ var lengthUnitsPattern = `(?:${lengthUnits.split(",").join("|")})`;
213
+ var lengthRegExp = new RegExp(`^[+-]?[0-9]*.?[0-9]+(?:[eE][+-]?[0-9]+)?${lengthUnitsPattern}$`);
214
+ var isCssUnit = (v) => typeof v === "string" && lengthRegExp.test(v);
215
+
216
+ // src/is-css-var.ts
217
+ var isCssVar = (v) => typeof v === "string" && /^var\(--.+\)$/.test(v);
218
+
219
+ // src/pattern-fns.ts
220
+ var patternFns = {
221
+ map: mapObject,
222
+ isCssFunction,
223
+ isCssVar,
224
+ isCssUnit
225
+ };
226
+ var getPatternStyles = (pattern, styles) => {
227
+ if (!pattern?.defaultValues) return styles;
228
+ const defaults = typeof pattern.defaultValues === "function" ? pattern.defaultValues(styles) : pattern.defaultValues;
229
+ return Object.assign({}, defaults, compact(styles));
230
+ };
231
+
232
+ // src/slot.ts
233
+ var getSlotRecipes = (recipe = {}) => {
234
+ const init = (slot) => ({
235
+ className: [recipe.className, slot].filter(Boolean).join("__"),
236
+ base: recipe.base?.[slot] ?? {},
237
+ variants: {},
238
+ defaultVariants: recipe.defaultVariants ?? {},
239
+ compoundVariants: recipe.compoundVariants ? getSlotCompoundVariant(recipe.compoundVariants, slot) : []
240
+ });
241
+ const slots = recipe.slots ?? [];
242
+ const recipeParts = slots.map((slot) => [slot, init(slot)]);
243
+ for (const [variantsKey, variantsSpec] of Object.entries(recipe.variants ?? {})) {
244
+ for (const [variantKey, variantSpec] of Object.entries(variantsSpec)) {
245
+ recipeParts.forEach(([slot, slotRecipe]) => {
246
+ slotRecipe.variants[variantsKey] ??= {};
247
+ slotRecipe.variants[variantsKey][variantKey] = variantSpec[slot] ?? {};
248
+ });
249
+ }
250
+ }
251
+ return Object.fromEntries(recipeParts);
252
+ };
253
+ var getSlotCompoundVariant = (compoundVariants, slotName) => compoundVariants.filter((compoundVariant) => compoundVariant.css[slotName]).map((compoundVariant) => ({ ...compoundVariant, css: compoundVariant.css[slotName] }));
254
+
255
+ // src/split-props.ts
256
+ function splitProps(props, ...keys) {
257
+ const descriptors = Object.getOwnPropertyDescriptors(props);
258
+ const dKeys = Object.keys(descriptors);
259
+ const split = (k) => {
260
+ const clone = {};
261
+ for (let i = 0; i < k.length; i++) {
262
+ const key = k[i];
263
+ if (descriptors[key]) {
264
+ Object.defineProperty(clone, key, descriptors[key]);
265
+ delete descriptors[key];
266
+ }
267
+ }
268
+ return clone;
269
+ };
270
+ const fn = (key) => split(Array.isArray(key) ? key : dKeys.filter(key));
271
+ return keys.map(fn).concat(split(dKeys));
272
+ }
273
+
274
+ // src/uniq.ts
275
+ var uniq = (...items) => {
276
+ const set = items.reduce((acc, currItems) => {
277
+ if (currItems) {
278
+ currItems.forEach((item) => acc.add(item));
279
+ }
280
+ return acc;
281
+ }, /* @__PURE__ */ new Set([]));
282
+ return Array.from(set);
283
+ };
284
+ export {
285
+ compact,
286
+ createCss,
287
+ createMergeCss,
288
+ filterBaseConditions,
289
+ getPatternStyles,
290
+ getSlotCompoundVariant,
291
+ getSlotRecipes,
292
+ hypenateProperty,
293
+ isBaseCondition,
294
+ isObject,
295
+ mapObject,
296
+ memo,
297
+ mergeProps,
298
+ patternFns,
299
+ splitProps,
300
+ toHash,
301
+ uniq,
302
+ walkObject,
303
+ withoutSpace
304
+ };
305
+
306
+
307
+
308
+
309
+
310
+ export function __spreadValues(a, b) {
311
+ return { ...a, ...b }
312
+ }
313
+
314
+ export function __objRest(source, exclude) {
315
+ return Object.fromEntries(Object.entries(source).filter(([key]) => !exclude.includes(key)))
316
+ }
@@ -0,0 +1,20 @@
1
+ /* eslint-disable */
2
+ import type { SystemStyleObject, ConditionalValue } from '../types/index';
3
+ import type { Properties } from '../types/csstype';
4
+ import type { SystemProperties } from '../types/style-props';
5
+ import type { DistributiveOmit } from '../types/system-types';
6
+ import type { Tokens } from '../tokens/index';
7
+
8
+ export interface AspectRatioProperties {
9
+ ratio?: ConditionalValue<number>
10
+ }
11
+
12
+ interface AspectRatioStyles extends AspectRatioProperties, DistributiveOmit<SystemStyleObject, keyof AspectRatioProperties | 'aspectRatio'> {}
13
+
14
+ interface AspectRatioPatternFn {
15
+ (styles?: AspectRatioStyles): string
16
+ raw: (styles?: AspectRatioStyles) => SystemStyleObject
17
+ }
18
+
19
+
20
+ export declare const aspectRatio: AspectRatioPatternFn;
@@ -0,0 +1,38 @@
1
+ import { getPatternStyles, patternFns } from '../helpers.js';
2
+ import { css } from '../css/index.js';
3
+
4
+ const aspectRatioConfig = {
5
+ transform(props, { map }) {
6
+ const { ratio = 4 / 3, ...rest } = props;
7
+ return {
8
+ position: "relative",
9
+ _before: {
10
+ content: `""`,
11
+ display: "block",
12
+ height: "0",
13
+ paddingBottom: map(ratio, (r) => `${1 / r * 100}%`)
14
+ },
15
+ "&>*": {
16
+ display: "flex",
17
+ justifyContent: "center",
18
+ alignItems: "center",
19
+ overflow: "hidden",
20
+ position: "absolute",
21
+ inset: "0",
22
+ width: "100%",
23
+ height: "100%"
24
+ },
25
+ "&>img, &>video": {
26
+ objectFit: "cover"
27
+ },
28
+ ...rest
29
+ };
30
+ }}
31
+
32
+ export const getAspectRatioStyle = (styles = {}) => {
33
+ const _styles = getPatternStyles(aspectRatioConfig, styles)
34
+ return aspectRatioConfig.transform(_styles, patternFns)
35
+ }
36
+
37
+ export const aspectRatio = (styles) => css(getAspectRatioStyle(styles))
38
+ aspectRatio.raw = getAspectRatioStyle
@@ -0,0 +1,21 @@
1
+ /* eslint-disable */
2
+ import type { SystemStyleObject, ConditionalValue } from '../types/index';
3
+ import type { Properties } from '../types/csstype';
4
+ import type { SystemProperties } from '../types/style-props';
5
+ import type { DistributiveOmit } from '../types/system-types';
6
+ import type { Tokens } from '../tokens/index';
7
+
8
+ export interface BleedProperties {
9
+ inline?: SystemProperties["marginInline"]
10
+ block?: SystemProperties["marginBlock"]
11
+ }
12
+
13
+ interface BleedStyles extends BleedProperties, DistributiveOmit<SystemStyleObject, keyof BleedProperties > {}
14
+
15
+ interface BleedPatternFn {
16
+ (styles?: BleedStyles): string
17
+ raw: (styles?: BleedStyles) => SystemStyleObject
18
+ }
19
+
20
+
21
+ export declare const bleed: BleedPatternFn;