themelia-ui 3.0.0 → 3.2.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 (746) hide show
  1. package/.agents/skills/themelia-ui/SKILL.md +60 -33
  2. package/.agents/skills/themelia-ui/manifest.json +23 -0
  3. package/.agents/skills/themelia-ui/references/api-compatibility.md +5 -4
  4. package/.agents/skills/themelia-ui/references/blocks.md +123 -0
  5. package/.agents/skills/themelia-ui/references/composition-ladder.md +8 -8
  6. package/.agents/skills/themelia-ui/references/composition.md +100 -19
  7. package/.agents/skills/themelia-ui/references/forms.md +23 -3
  8. package/.agents/skills/themelia-ui/references/framework-wiring.md +41 -13
  9. package/.agents/skills/themelia-ui/references/i18n.md +4 -2
  10. package/.agents/skills/themelia-ui/references/imports.md +104 -104
  11. package/.agents/skills/themelia-ui/references/installation.md +60 -31
  12. package/.agents/skills/themelia-ui/references/migration.md +156 -5
  13. package/.agents/skills/themelia-ui/references/provider-and-scoping.md +37 -25
  14. package/.agents/skills/themelia-ui/references/reference-workflows.md +43 -0
  15. package/.agents/skills/themelia-ui/references/structure-and-spacing.md +147 -0
  16. package/.agents/skills/themelia-ui/references/theming.md +174 -131
  17. package/.agents/skills/themelia-ui/references/troubleshooting.md +88 -30
  18. package/.agents/skills/themelia-ui/references/verification.md +60 -5
  19. package/CHANGELOG.md +212 -0
  20. package/README.md +48 -60
  21. package/dist/accordion-CHuzMmWL.js +143 -0
  22. package/dist/{action-menu-BNLURfMK.js → action-menu-BwiL_F6I.js} +35 -33
  23. package/dist/{alert-dialog-BMVo6Z-8.js → alert-dialog-Cg2HhuBe.js} +1 -1
  24. package/dist/avatar-Dc_BNYfB.js +93 -0
  25. package/dist/badge-VlJVZjdm.js +45 -0
  26. package/dist/base/accordion.js +1 -1
  27. package/dist/base/action-menu.js +1 -1
  28. package/dist/base/alert-dialog.js +1 -1
  29. package/dist/base/aspect-ratio.js +3 -1
  30. package/dist/base/avatar.js +1 -1
  31. package/dist/base/badge.js +2 -2
  32. package/dist/base/batch-action-bar.js +1 -1
  33. package/dist/base/buttons.js +1 -1
  34. package/dist/base/cards.js +1 -1
  35. package/dist/base/carousel.js +6 -4
  36. package/dist/base/chart.js +1 -1
  37. package/dist/base/choice-inputs.js +1 -1
  38. package/dist/base/combobox.js +1 -1
  39. package/dist/base/command.js +1 -1
  40. package/dist/base/context-menu.js +22 -21
  41. package/dist/base/copyable.js +1 -1
  42. package/dist/base/date-pickers.js +1 -1
  43. package/dist/base/dialog.js +1 -1
  44. package/dist/base/display.js +1 -1
  45. package/dist/base/dropdown-menu.js +1 -1
  46. package/dist/base/feedback.js +1 -1
  47. package/dist/base/forms-numeric.js +1 -1
  48. package/dist/base/forms.js +1 -1
  49. package/dist/base/hover-card.js +26 -23
  50. package/dist/base/input-group.js +1 -1
  51. package/dist/base/item.js +1 -1
  52. package/dist/base/label.js +1 -1
  53. package/dist/base/menubar.js +20 -14
  54. package/dist/base/navigation-menu.js +47 -38
  55. package/dist/base/navigation.js +1 -1
  56. package/dist/base/otp-input.js +36 -30
  57. package/dist/base/overlay.js +1 -1
  58. package/dist/base/popover-menu.js +1 -1
  59. package/dist/base/popover.js +1 -1
  60. package/dist/base/qr-code.js +51 -47
  61. package/dist/base/repeaters.js +1 -1
  62. package/dist/base/resizable.js +2 -0
  63. package/dist/base/sheet.js +1 -1
  64. package/dist/base/sidebar.js +1 -1
  65. package/dist/base/skeleton.js +1 -1
  66. package/dist/base/spinner.js +1 -1
  67. package/dist/base/structure.js +1 -1
  68. package/dist/base/table.js +1 -1
  69. package/dist/base/text-inputs.js +1 -1
  70. package/dist/base/timeline.js +1 -1
  71. package/dist/base/toaster.js +1 -1
  72. package/dist/base/toggle.js +21 -15
  73. package/dist/base/toolbar.js +1 -1
  74. package/dist/base/tooltip.js +1 -1
  75. package/dist/base/typography.js +2 -2
  76. package/dist/base/upload.js +1 -1
  77. package/dist/base/value-inputs.js +1 -1
  78. package/dist/{batch-action-bar-BZYNKXdV.js → batch-action-bar-DZVMVW83.js} +11 -8
  79. package/dist/{admin/patterns → blocks/admin}/access.js +79 -76
  80. package/dist/blocks/admin/commerce.js +2493 -0
  81. package/dist/{patterns → blocks}/analytics.js +312 -303
  82. package/dist/{patterns → blocks}/onboarding.js +27 -23
  83. package/dist/{patterns → blocks}/timelines.js +1 -1
  84. package/dist/buttons-BX2JfL5X.js +173 -0
  85. package/dist/cards-Ddhz43Bz.js +279 -0
  86. package/dist/chart-BkK3Xm10.js +201 -0
  87. package/dist/choice-inputs-NwRxvmZN.js +694 -0
  88. package/dist/combobox-519ubijc.js +292 -0
  89. package/dist/command-JjApYFds.js +156 -0
  90. package/dist/comments-CCQ2QRaU.js +1443 -0
  91. package/dist/components/base/action-menu/action-menu.d.ts +1 -1
  92. package/dist/components/base/action-menu/action-menu.types.d.ts +2 -2
  93. package/dist/components/base/avatar/avatar.d.ts +5 -2
  94. package/dist/components/base/badge/badge.d.ts +10 -10
  95. package/dist/components/base/badge/badge.variants.d.ts +1 -2
  96. package/dist/components/base/badge/index.d.ts +1 -2
  97. package/dist/components/base/buttons/button.d.ts +9 -8
  98. package/dist/components/base/buttons/button.types.d.ts +2 -2
  99. package/dist/components/base/buttons/index.d.ts +1 -1
  100. package/dist/components/base/buttons/text-button.d.ts +1 -1
  101. package/dist/components/base/cards/card-actions.d.ts +1 -1
  102. package/dist/components/base/cards/card.d.ts +3 -1
  103. package/dist/components/base/cards/partials/card-header.d.ts +2 -1
  104. package/dist/components/base/choice-inputs/choice.types.d.ts +2 -2
  105. package/dist/components/base/choice-inputs/partials/choice-parts.d.ts +3 -3
  106. package/dist/components/base/command/command.d.ts +5 -2
  107. package/dist/components/base/display/icon-badge.d.ts +5 -3
  108. package/dist/components/base/display/index.d.ts +1 -1
  109. package/dist/components/base/display/metadata-list.d.ts +6 -6
  110. package/dist/components/base/display/metadata-value.d.ts +1 -1
  111. package/dist/components/base/display/separator.d.ts +2 -2
  112. package/dist/components/base/feedback/alert.d.ts +3 -2
  113. package/dist/components/base/feedback/empty.d.ts +5 -4
  114. package/dist/components/base/feedback/progress-circle.d.ts +2 -2
  115. package/dist/components/base/feedback/progress.d.ts +3 -1
  116. package/dist/components/base/forms/form-field.d.ts +2 -2
  117. package/dist/components/base/input-group/input-group.d.ts +8 -10
  118. package/dist/components/base/item/item.d.ts +2 -2
  119. package/dist/components/base/overlay/index.d.ts +1 -1
  120. package/dist/components/base/overlay/overlay.types.d.ts +7 -5
  121. package/dist/components/base/qr-code/qr-code.d.ts +4 -4
  122. package/dist/components/base/sheet/sheet.d.ts +1 -1
  123. package/dist/components/base/sidebar/sidebar.d.ts +9 -13
  124. package/dist/components/base/spinner/spinner.d.ts +2 -2
  125. package/dist/components/base/structure/adaptive-grid.d.ts +3 -3
  126. package/dist/components/base/structure/bleed.d.ts +4 -2
  127. package/dist/components/base/structure/grid.d.ts +10 -4
  128. package/dist/components/base/structure/index.d.ts +1 -1
  129. package/dist/components/base/structure/split.d.ts +4 -3
  130. package/dist/components/base/structure/stack.d.ts +5 -5
  131. package/dist/components/base/structure/structure.maps.d.ts +2 -1
  132. package/dist/components/base/structure/structure.types.d.ts +10 -4
  133. package/dist/components/base/toggle/toggle.d.ts +2 -2
  134. package/dist/components/base/toolbar/toolbar.d.ts +3 -3
  135. package/dist/components/base/typography/index.d.ts +2 -0
  136. package/dist/components/base/typography/rich-text/rich-text.variants.d.ts +9 -0
  137. package/dist/components/base/typography/text/index.d.ts +1 -0
  138. package/dist/components/base/typography/text/text.d.ts +15 -8
  139. package/dist/components/base/typography/text/text.variants.d.ts +41 -0
  140. package/dist/components/base/value-inputs/color-input.d.ts +1 -7
  141. package/dist/components/base/value-inputs/slider.d.ts +2 -7
  142. package/dist/components/{admin/patterns → blocks/admin}/commerce/vendor-profile.d.ts +2 -1
  143. package/dist/components/{patterns → blocks}/analytics/analytics.strings.d.ts +2 -5
  144. package/dist/components/features/actions/action-adapters.d.ts +3 -3
  145. package/dist/components/features/actions/actions.types.d.ts +3 -5
  146. package/dist/components/features/actions/index.d.ts +1 -1
  147. package/dist/components/features/activities/activities-feed.d.ts +1 -1
  148. package/dist/components/features/activities/activities.types.d.ts +4 -4
  149. package/dist/components/features/activities/activity-parts.d.ts +3 -3
  150. package/dist/components/features/activities/activity-row.d.ts +4 -4
  151. package/dist/components/features/activities/index.d.ts +1 -1
  152. package/dist/components/features/ai-chat/ai-chat.types.d.ts +10 -3
  153. package/dist/components/features/ai-chat/ai-message-surfaces.d.ts +1 -1
  154. package/dist/components/features/ai-chat/ai-work-surfaces.d.ts +1 -1
  155. package/dist/components/features/combobox/combobox.strings.d.ts +2 -2
  156. package/dist/components/features/combobox/fetching-combobox.d.ts +2 -1
  157. package/dist/components/features/combobox/resource-combobox.d.ts +3 -0
  158. package/dist/components/features/combobox/use-suggestions.d.ts +7 -0
  159. package/dist/components/features/event-calendar/event-calendar.types.d.ts +3 -0
  160. package/dist/components/features/media-library/index.d.ts +1 -1
  161. package/dist/components/features/media-library/media-library-parts.d.ts +4 -3
  162. package/dist/components/features/media-library/media-library-views.d.ts +4 -3
  163. package/dist/components/features/media-library/media-library.d.ts +1 -1
  164. package/dist/components/features/media-library/media-library.strings.d.ts +12 -13
  165. package/dist/components/features/media-library/media-library.types.d.ts +11 -9
  166. package/dist/components/features/media-library/media-resource-gallery.d.ts +1 -1
  167. package/dist/components/features/media-library/use-media-library.d.ts +1 -4
  168. package/dist/components/features/overlays/action-overlay-frame.d.ts +1 -1
  169. package/dist/components/features/overlays/index.d.ts +1 -1
  170. package/dist/components/features/overlays/overlay-parts.d.ts +3 -3
  171. package/dist/components/features/overlays/overlays.types.d.ts +8 -7
  172. package/dist/components/features/rich-text-editor/index.d.ts +0 -1
  173. package/dist/components/features/table/data-table-body.d.ts +1 -1
  174. package/dist/components/features/table/data-table-expanded-row.d.ts +27 -0
  175. package/dist/components/features/table/data-table-header.d.ts +1 -1
  176. package/dist/components/features/table/data-table-size.d.ts +1 -1
  177. package/dist/components/features/table/data-table.d.ts +1 -1
  178. package/dist/components/features/table/index.d.ts +1 -1
  179. package/dist/components/features/table/table-helpers.d.ts +9 -3
  180. package/dist/components/features/table/table.strings.d.ts +11 -0
  181. package/dist/components/features/table/table.types.d.ts +60 -2
  182. package/dist/components/features/theme-tweaker/index.d.ts +1 -1
  183. package/dist/components/features/theme-tweaker/theme-tweaker.strings.d.ts +1 -1
  184. package/dist/components/features/theme-tweaker/theme-tweaker.types.d.ts +6 -10
  185. package/dist/components/features/theme-tweaker/theme-tweaker.utils.d.ts +22 -6
  186. package/dist/components/layout/app-shell/topbar-sidebar-layout.d.ts +1 -1
  187. package/dist/components/layout/auth/auth.d.ts +1 -1
  188. package/dist/components/layout/auth/auth.types.d.ts +1 -1
  189. package/dist/components/primitives/value.d.ts +3 -1
  190. package/dist/containers-B8d8U9GS.js +2 -0
  191. package/dist/{copyable-H1TUEY-H.js → copyable-D9Okb1w6.js} +12 -11
  192. package/dist/core.css +2 -2
  193. package/dist/css/access.css +2 -1
  194. package/dist/css/accordion.css +2 -1
  195. package/dist/css/action-menu.css +2 -1
  196. package/dist/css/activities.css +2 -1
  197. package/dist/css/ai-chat.css +2 -1
  198. package/dist/css/analytics.css +2 -1
  199. package/dist/css/app-shell.css +2 -1
  200. package/dist/css/aspect-ratio.css +2 -1
  201. package/dist/css/async-preview.css +2 -1
  202. package/dist/css/auth.css +2 -1
  203. package/dist/css/avatar.css +2 -1
  204. package/dist/css/badge.css +2 -1
  205. package/dist/css/batch-action-bar.css +2 -1
  206. package/dist/css/buttons.css +2 -1
  207. package/dist/css/cards.css +2 -1
  208. package/dist/css/carousel.css +2 -1
  209. package/dist/css/chart.css +2 -1
  210. package/dist/css/choice-inputs.css +2 -1
  211. package/dist/css/combobox.css +2 -1
  212. package/dist/css/combobox2.css +2 -1
  213. package/dist/css/command.css +2 -1
  214. package/dist/css/comments.css +2 -1
  215. package/dist/css/commerce.css +2 -1
  216. package/dist/css/containers.css +2 -1
  217. package/dist/css/copyable.css +2 -1
  218. package/dist/css/data-view.css +2 -1
  219. package/dist/css/date-pickers.css +2 -1
  220. package/dist/css/display.css +2 -1
  221. package/dist/css/dropdown-menu.css +2 -1
  222. package/dist/css/event-calendar.css +2 -1
  223. package/dist/css/feedback.css +2 -1
  224. package/dist/css/filters.css +2 -1
  225. package/dist/css/forms-numeric.css +2 -1
  226. package/dist/css/forms.css +2 -1
  227. package/dist/css/global-search.css +2 -1
  228. package/dist/css/header.css +2 -1
  229. package/dist/css/hover-card.css +2 -1
  230. package/dist/css/input-group.css +2 -1
  231. package/dist/css/item.css +2 -1
  232. package/dist/css/kanban.css +2 -1
  233. package/dist/css/label.css +2 -1
  234. package/dist/css/map.css +2 -1
  235. package/dist/css/media-library.css +2 -1
  236. package/dist/css/mentions.css +2 -1
  237. package/dist/css/menubar.css +2 -1
  238. package/dist/css/navigation-menu.css +2 -1
  239. package/dist/css/navigation.css +2 -1
  240. package/dist/css/navigation2.css +2 -1
  241. package/dist/css/onboarding.css +2 -1
  242. package/dist/css/otp-input.css +2 -1
  243. package/dist/css/overlay.css +2 -1
  244. package/dist/css/overlays.css +2 -1
  245. package/dist/css/page.css +2 -1
  246. package/dist/css/popover-menu.css +2 -1
  247. package/dist/css/popover.css +2 -1
  248. package/dist/css/primitives.css +2 -1
  249. package/dist/css/products.css +2 -1
  250. package/dist/css/qr-code.css +2 -1
  251. package/dist/css/repeaters.css +2 -1
  252. package/dist/css/resizable.css +2 -1
  253. package/dist/css/resource-assignment.css +2 -1
  254. package/dist/css/resource.css +2 -1
  255. package/dist/css/rich-text-editor.css +2 -1
  256. package/dist/css/schema-form.css +2 -1
  257. package/dist/css/sidebar.css +2 -1
  258. package/dist/css/sidebar2.css +2 -1
  259. package/dist/css/skeleton.css +2 -1
  260. package/dist/css/spinner.css +2 -1
  261. package/dist/css/structure.css +2 -1
  262. package/dist/css/sync.css +2 -1
  263. package/dist/css/table.css +2 -1
  264. package/dist/css/table2.css +2 -1
  265. package/dist/css/text-inputs.css +2 -1
  266. package/dist/css/theme-tweaker.css +2 -1
  267. package/dist/css/timeline.css +2 -1
  268. package/dist/css/timelines.css +2 -1
  269. package/dist/css/toaster.css +2 -1
  270. package/dist/css/toggle.css +2 -1
  271. package/dist/css/toolbar.css +2 -1
  272. package/dist/css/tooltip.css +2 -1
  273. package/dist/css/typography.css +2 -1
  274. package/dist/css/upload.css +2 -1
  275. package/dist/css/value-inputs.css +2 -1
  276. package/dist/css/workspace.css +2 -1
  277. package/dist/css-graph.json +1027 -0
  278. package/dist/date-pickers-BwCwKIVM.js +685 -0
  279. package/dist/{dialog-CtFCuTUF.js → dialog-CAnwRNrm.js} +1 -1
  280. package/dist/display-a7AoX_u7.js +664 -0
  281. package/dist/dropdown-menu-Br8kvjrF.js +235 -0
  282. package/dist/empty.js +0 -0
  283. package/dist/features/actions.js +6 -6
  284. package/dist/features/activities.js +219 -216
  285. package/dist/features/ai-chat.js +593 -565
  286. package/dist/features/async-preview.js +105 -286
  287. package/dist/features/combobox.js +328 -314
  288. package/dist/features/comments.js +1 -1
  289. package/dist/features/data-view.js +56 -55
  290. package/dist/features/event-calendar.js +189 -185
  291. package/dist/features/filters.js +1 -1
  292. package/dist/features/global-search.js +259 -260
  293. package/dist/features/kanban.js +39 -37
  294. package/dist/features/map.js +357 -354
  295. package/dist/features/media-library.js +931 -931
  296. package/dist/features/mentions.js +1 -1
  297. package/dist/features/overlays.js +1 -1
  298. package/dist/features/products.js +950 -942
  299. package/dist/features/resource-assignment.js +39 -37
  300. package/dist/features/resource.js +70 -71
  301. package/dist/features/rich-text-editor.js +2 -2
  302. package/dist/features/schema-form.js +342 -338
  303. package/dist/features/sync.js +14 -12
  304. package/dist/features/table.js +1 -1
  305. package/dist/features/theme-tweaker.js +1002 -962
  306. package/dist/feedback-D4qVsKlD.js +430 -0
  307. package/dist/{filters-DOLKRSmb.js → filters-BhsTkWpZ.js} +386 -383
  308. package/dist/forms-C0WeNPFF.js +250 -0
  309. package/dist/forms-numeric-IwQ1ltNf.js +582 -0
  310. package/dist/hooks/use-native-dialog.d.ts +1 -1
  311. package/dist/index.js +2 -2
  312. package/dist/input-group-HS_Z0Ei_.js +119 -0
  313. package/dist/item-M2pmpWXh.js +150 -0
  314. package/dist/{label-DumoMDm6.js → label-HOBXAscw.js} +7 -5
  315. package/dist/layout/app-shell.js +4 -2
  316. package/dist/layout/auth.js +102 -100
  317. package/dist/layout/header.js +190 -180
  318. package/dist/layout/navigation.js +1 -1
  319. package/dist/layout/page.js +18 -16
  320. package/dist/layout/settings.js +2 -2
  321. package/dist/layout/sidebar.js +50 -46
  322. package/dist/layout/workspace.js +71 -69
  323. package/dist/lib/action-presentation.d.ts +3 -3
  324. package/dist/lib/component-vocabulary.d.ts +2 -2
  325. package/dist/lib/css-length.d.ts +2 -0
  326. package/dist/lib/responsive.d.ts +1 -1
  327. package/dist/lib/theming/index.d.ts +1 -0
  328. package/dist/lib/theming/recipes.d.ts +2 -2
  329. package/dist/lib/theming/themes/dense.d.ts +3 -0
  330. package/dist/lib/theming/themes/editorial.d.ts +3 -0
  331. package/dist/lib/theming/themes/index.d.ts +8 -0
  332. package/dist/lib/theming/themes/pair.d.ts +7 -0
  333. package/dist/lib/theming/themes/sharp.d.ts +3 -0
  334. package/dist/lib/theming/themes/soft.d.ts +3 -0
  335. package/dist/lib/theming/themes/types.d.ts +12 -0
  336. package/dist/lib/ui-provider/index.d.ts +1 -1
  337. package/dist/lib/ui-provider/scope.d.ts +5 -8
  338. package/dist/lib/ui-provider/tokens.d.ts +11 -3
  339. package/dist/lib/ui-provider/tokens.generated.d.ts +6 -4
  340. package/dist/lib/ui-provider/types.d.ts +17 -19
  341. package/dist/lib/ui-provider/ui-scope.d.ts +1 -1
  342. package/dist/{mentions-BbsEHlcH.js → mentions-BOxbigwp.js} +113 -111
  343. package/dist/navigation-Bgu7Vc0M.js +622 -0
  344. package/dist/navigation-DiYACqpE.js +216 -0
  345. package/dist/overlay-BuQOl8aP.js +356 -0
  346. package/dist/{overlays-DvVoS3td.js → overlays-1sULyytH.js} +77 -75
  347. package/dist/popover-CA7SP_iz.js +127 -0
  348. package/dist/popover-menu-QXgQeWeG.js +192 -0
  349. package/dist/{primitives-D0bdDozz.js → primitives-BskKlf35.js} +181 -178
  350. package/dist/primitives.js +1 -1
  351. package/dist/profiles/admin.json +6 -36
  352. package/dist/profiles/general.json +6 -96
  353. package/dist/repeaters-CeH20dvr.js +445 -0
  354. package/dist/rich-text-editor-D_Ppm8yh.js +491 -0
  355. package/dist/{sheet-CKcmRbJ9.js → sheet-CJ1-OAla.js} +3 -3
  356. package/dist/sidebar-D8uGqxio.js +421 -0
  357. package/dist/skeleton-BTKNKTdj.js +173 -0
  358. package/dist/spinner-Tc1QCnxM.js +30 -0
  359. package/dist/{structure-D0WGQAP3.js → structure-CynEZ-OY.js} +15 -23
  360. package/dist/style.css +1 -1
  361. package/dist/styles/TOKENS.md +116 -275
  362. package/dist/styles/animation.css +114 -0
  363. package/dist/styles/base.css +7 -6
  364. package/dist/styles/fields.css +45 -63
  365. package/dist/styles/focus.css +12 -0
  366. package/dist/styles/forced-colors.css +11 -10
  367. package/dist/styles/index.css +23 -30
  368. package/dist/styles/map.css +45 -34
  369. package/dist/styles/mentions.css +14 -52
  370. package/dist/styles/overlays.css +7 -7
  371. package/dist/styles/tailwind.css +76 -127
  372. package/dist/styles/targets.css +3 -3
  373. package/dist/styles/theme/colour.css +86 -0
  374. package/dist/styles/theme/density.css +31 -0
  375. package/dist/styles/theme/elevation.css +9 -0
  376. package/dist/styles/theme/layout.css +18 -0
  377. package/dist/styles/theme/motion.css +18 -0
  378. package/dist/styles/theme/shape.css +12 -0
  379. package/dist/styles/theme/size.css +10 -0
  380. package/dist/styles/theme/spacing.css +11 -0
  381. package/dist/styles/theme/typography.css +20 -0
  382. package/dist/styles/tone.css +61 -0
  383. package/dist/table-B7dtIFUx.js +1262 -0
  384. package/dist/table-Ds_eO9av.js +191 -0
  385. package/dist/tailwind.css +76 -127
  386. package/dist/text-inputs-BboE77nZ.js +395 -0
  387. package/dist/theming-C5ygF5uf.js +292 -0
  388. package/dist/theming.js +2 -2
  389. package/dist/{timeline-BdaGRyj-.js → timeline-BR_jNgvz.js} +57 -49
  390. package/dist/{timelines-BB7550mz.js → timelines-DXG1BfIN.js} +69 -67
  391. package/dist/{toaster-bBMgXm8z.js → toaster-CXL8L7Mm.js} +106 -99
  392. package/dist/tokens.json +1027 -636
  393. package/dist/toolbar-DBK-c4yy.js +74 -0
  394. package/dist/tooltip-BPYP-jUm.js +76 -0
  395. package/dist/{typography-BkxEiwQ1.js → typography-DmeR05Er.js} +87 -53
  396. package/dist/{ui-provider-Cmoq6i_D.js → ui-provider-DpzLUD12.js} +117 -69
  397. package/dist/ui-provider.js +1 -1
  398. package/dist/upload-CYuoJykZ.js +968 -0
  399. package/dist/use-async-preview-BFwf9ElY.js +188 -0
  400. package/dist/value-inputs-ng8aVJJZ.js +728 -0
  401. package/docs/README.md +13 -3
  402. package/docs/build/browser-composition-fixture.ts +28 -0
  403. package/docs/build/recipes.md +11484 -10723
  404. package/docs/generated/component-index.json +9809 -9169
  405. package/docs/generated/components/INDEX.md +5 -5
  406. package/docs/generated/components/base--accordion.md +51 -2
  407. package/docs/generated/components/base--action-menu.md +14 -15
  408. package/docs/generated/components/base--alert-dialog.md +3 -4
  409. package/docs/generated/components/base--aspect-ratio.md +3 -4
  410. package/docs/generated/components/base--avatar.md +7 -7
  411. package/docs/generated/components/base--badge.md +159 -27
  412. package/docs/generated/components/base--batch-action-bar.md +6 -7
  413. package/docs/generated/components/base--buttons.md +151 -47
  414. package/docs/generated/components/base--cards.md +107 -14
  415. package/docs/generated/components/base--carousel.md +1 -2
  416. package/docs/generated/components/base--chart.md +44 -8
  417. package/docs/generated/components/base--choice-inputs.md +10 -11
  418. package/docs/generated/components/base--combobox.md +3 -4
  419. package/docs/generated/components/base--command.md +6 -6
  420. package/docs/generated/components/base--context-menu.md +1 -2
  421. package/docs/generated/components/base--copyable.md +6 -7
  422. package/docs/generated/components/base--date-pickers.md +6 -7
  423. package/docs/generated/components/base--dialog.md +6 -7
  424. package/docs/generated/components/base--direction.md +1 -1
  425. package/docs/generated/components/base--display.md +234 -54
  426. package/docs/generated/components/base--dropdown-menu.md +6 -7
  427. package/docs/generated/components/base--feedback.md +71 -18
  428. package/docs/generated/components/base--forms-numeric.md +6 -7
  429. package/docs/generated/components/base--forms.md +84 -14
  430. package/docs/generated/components/base--hover-card.md +3 -4
  431. package/docs/generated/components/base--input-group.md +27 -30
  432. package/docs/generated/components/base--item.md +8 -9
  433. package/docs/generated/components/base--label.md +2 -3
  434. package/docs/generated/components/base--menubar.md +2 -4
  435. package/docs/generated/components/base--navigation-menu.md +2 -3
  436. package/docs/generated/components/base--navigation.md +2 -3
  437. package/docs/generated/components/base--otp-input.md +3 -4
  438. package/docs/generated/components/base--overlay.md +56 -47
  439. package/docs/generated/components/base--popover-menu.md +7 -8
  440. package/docs/generated/components/base--popover.md +9 -10
  441. package/docs/generated/components/base--qr-code.md +7 -8
  442. package/docs/generated/components/base--repeaters.md +6 -7
  443. package/docs/generated/components/base--resizable.md +2 -3
  444. package/docs/generated/components/base--sheet.md +12 -13
  445. package/docs/generated/components/base--sidebar.md +9 -11
  446. package/docs/generated/components/base--skeleton.md +6 -7
  447. package/docs/generated/components/base--slot.md +1 -1
  448. package/docs/generated/components/base--spinner.md +5 -7
  449. package/docs/generated/components/base--structure.md +320 -70
  450. package/docs/generated/components/base--table.md +61 -3
  451. package/docs/generated/components/base--text-inputs.md +17 -18
  452. package/docs/generated/components/base--timeline.md +45 -4
  453. package/docs/generated/components/base--toaster.md +43 -12
  454. package/docs/generated/components/base--toggle.md +11 -12
  455. package/docs/generated/components/base--toolbar.md +7 -8
  456. package/docs/generated/components/base--tooltip.md +5 -6
  457. package/docs/generated/components/base--typography.md +317 -32
  458. package/docs/generated/components/base--upload.md +8 -9
  459. package/docs/generated/components/base--value-inputs.md +9 -38
  460. package/docs/generated/components/{admin--patterns--access.md → blocks--admin--access.md} +15 -6
  461. package/docs/generated/components/{admin--patterns--commerce.md → blocks--admin--commerce.md} +40 -41
  462. package/docs/generated/components/{patterns--analytics.md → blocks--analytics.md} +57 -14
  463. package/docs/generated/components/{patterns--onboarding.md → blocks--onboarding.md} +6 -7
  464. package/docs/generated/components/{patterns--timelines.md → blocks--timelines.md} +6 -7
  465. package/docs/generated/components/features--actions.md +8 -18
  466. package/docs/generated/components/features--activities.md +31 -32
  467. package/docs/generated/components/features--ai-chat.md +15 -15
  468. package/docs/generated/components/features--async-preview.md +5 -6
  469. package/docs/generated/components/features--combobox.md +71 -5
  470. package/docs/generated/components/features--comments.md +0 -1
  471. package/docs/generated/components/features--data-view.md +63 -8
  472. package/docs/generated/components/features--event-calendar.md +1 -2
  473. package/docs/generated/components/features--filters.md +11 -2
  474. package/docs/generated/components/features--global-search.md +1 -2
  475. package/docs/generated/components/features--kanban.md +1 -2
  476. package/docs/generated/components/features--map.md +1 -2
  477. package/docs/generated/components/features--media-library.md +105 -38
  478. package/docs/generated/components/features--mentions.md +7 -7
  479. package/docs/generated/components/features--overlays.md +75 -22
  480. package/docs/generated/components/features--products.md +10 -11
  481. package/docs/generated/components/features--resource-assignment.md +2 -3
  482. package/docs/generated/components/features--resource.md +3 -4
  483. package/docs/generated/components/features--rich-text-editor.md +42 -13
  484. package/docs/generated/components/features--schema-form.md +1 -2
  485. package/docs/generated/components/features--sync.md +2 -3
  486. package/docs/generated/components/features--table.md +162 -12
  487. package/docs/generated/components/features--theme-tweaker.md +30 -15
  488. package/docs/generated/components/forms.md +2 -2
  489. package/docs/generated/components/layout--app-shell.md +41 -11
  490. package/docs/generated/components/layout--auth.md +8 -9
  491. package/docs/generated/components/layout--containers.md +40 -1
  492. package/docs/generated/components/layout--header.md +2 -3
  493. package/docs/generated/components/layout--navigation.md +0 -1
  494. package/docs/generated/components/layout--page.md +33 -5
  495. package/docs/generated/components/layout--settings.md +0 -1
  496. package/docs/generated/components/layout--sidebar.md +47 -7
  497. package/docs/generated/components/layout--workspace.md +3 -4
  498. package/docs/generated/components/primitives.md +128 -17
  499. package/docs/generated/components/theming.md +147 -4
  500. package/docs/generated/components/ui-provider.md +96 -78
  501. package/docs/generated/composition-ladder.md +8 -8
  502. package/docs/generated/consumer-contract.json +5736 -0
  503. package/docs/generated/imports.md +104 -104
  504. package/docs/generated/migration-broad-imports.json +267 -90
  505. package/docs/generated/migration-broad-imports.md +266 -101
  506. package/docs/generated/migration-codemod.json +365 -70
  507. package/docs/generated/migration.md +665 -95
  508. package/docs/generated/profiles.md +27 -27
  509. package/docs/generated/public-api.md +104 -102
  510. package/docs/generated/recipes.json +755 -810
  511. package/docs/generated/workflows/communications-overview/analytics/communications-reference.tsx +19 -0
  512. package/docs/generated/workflows/index.json +691 -0
  513. package/docs/generated/workflows/media-picking/media-library/media-picking-reference.tsx +63 -0
  514. package/docs/generated/workflows/media-picking/media-library/reference-data.ts +3 -0
  515. package/docs/generated/workflows/multi-section-form/form-workflow/multi-section-reference.tsx +46 -0
  516. package/docs/generated/workflows/nested-action-flow/action-overlays/nested-action-reference.tsx +39 -0
  517. package/docs/generated/workflows/record-detail/page-layout/record-detail-reference.tsx +24 -0
  518. package/docs/generated/workflows/resource-index/data-view/resource-index-reference.tsx +51 -0
  519. package/docs/generated/workflows/scoped-resource-selection/combobox/scoped-resource-reference.tsx +50 -0
  520. package/docs/generated/workflows/website-content-editor/media-library/reference-data.ts +3 -0
  521. package/docs/generated/workflows/website-content-editor/rich-text-editor/website-content-reference.tsx +33 -0
  522. package/docs/generated/workflows/workspace-navigation/app-shell/workspace-navigation-reference.tsx +26 -0
  523. package/docs/learn/api-compatibility.md +5 -4
  524. package/docs/learn/blocks.md +123 -0
  525. package/docs/learn/composition.md +100 -19
  526. package/docs/learn/forms.md +23 -3
  527. package/docs/learn/framework-wiring.md +41 -13
  528. package/docs/learn/i18n.md +4 -2
  529. package/docs/learn/installation.md +60 -31
  530. package/docs/learn/migration.md +156 -5
  531. package/docs/learn/provider-and-scoping.md +37 -25
  532. package/docs/learn/reference-workflows.md +43 -0
  533. package/docs/learn/structure-and-spacing.md +147 -0
  534. package/docs/learn/theming.md +174 -131
  535. package/docs/learn/troubleshooting.md +88 -30
  536. package/docs/learn/verification.md +60 -5
  537. package/package.json +42 -473
  538. package/scripts/consumer/codemod.mjs +50 -32
  539. package/scripts/consumer/contract-reader.mjs +42 -0
  540. package/scripts/consumer/css-scan.mjs +51 -0
  541. package/scripts/consumer/diagnose.mjs +136 -0
  542. package/scripts/consumer/find-component.mjs +30 -17
  543. package/scripts/consumer/install-skill.mjs +93 -11
  544. package/src/styles/TOKENS.md +116 -275
  545. package/dist/accordion-6YPJ9XRO.js +0 -135
  546. package/dist/admin/patterns/access.css +0 -15
  547. package/dist/admin/patterns/commerce.css +0 -29
  548. package/dist/admin/patterns/commerce.js +0 -2493
  549. package/dist/avatar-CS7zow2q.js +0 -85
  550. package/dist/badge-CxOuTfVr.js +0 -63
  551. package/dist/base/accordion.css +0 -3
  552. package/dist/base/action-menu.css +0 -6
  553. package/dist/base/alert-dialog.css +0 -4
  554. package/dist/base/aspect-ratio.css +0 -2
  555. package/dist/base/avatar.css +0 -4
  556. package/dist/base/badge.css +0 -2
  557. package/dist/base/batch-action-bar.css +0 -5
  558. package/dist/base/buttons.css +0 -4
  559. package/dist/base/cards.css +0 -13
  560. package/dist/base/carousel.css +0 -5
  561. package/dist/base/chart.css +0 -2
  562. package/dist/base/choice-inputs.css +0 -10
  563. package/dist/base/combobox.css +0 -3
  564. package/dist/base/command.css +0 -9
  565. package/dist/base/context-menu.css +0 -2
  566. package/dist/base/copyable.css +0 -6
  567. package/dist/base/date-pickers.css +0 -11
  568. package/dist/base/dialog.css +0 -4
  569. package/dist/base/display.css +0 -8
  570. package/dist/base/dropdown-menu.css +0 -2
  571. package/dist/base/feedback.css +0 -5
  572. package/dist/base/forms-numeric.css +0 -12
  573. package/dist/base/forms.css +0 -14
  574. package/dist/base/hover-card.css +0 -2
  575. package/dist/base/input-group.css +0 -6
  576. package/dist/base/item.css +0 -9
  577. package/dist/base/label.css +0 -3
  578. package/dist/base/menubar.css +0 -2
  579. package/dist/base/navigation-menu.css +0 -2
  580. package/dist/base/navigation.css +0 -12
  581. package/dist/base/otp-input.css +0 -9
  582. package/dist/base/overlay.css +0 -4
  583. package/dist/base/popover-menu.css +0 -11
  584. package/dist/base/popover.css +0 -3
  585. package/dist/base/qr-code.css +0 -2
  586. package/dist/base/repeaters.css +0 -18
  587. package/dist/base/resizable.css +0 -2
  588. package/dist/base/sheet.css +0 -4
  589. package/dist/base/sidebar.css +0 -12
  590. package/dist/base/skeleton.css +0 -9
  591. package/dist/base/spinner.css +0 -2
  592. package/dist/base/structure.css +0 -2
  593. package/dist/base/table.css +0 -3
  594. package/dist/base/text-inputs.css +0 -2
  595. package/dist/base/timeline.css +0 -9
  596. package/dist/base/toaster.css +0 -2
  597. package/dist/base/toggle.css +0 -2
  598. package/dist/base/toolbar.css +0 -5
  599. package/dist/base/tooltip.css +0 -2
  600. package/dist/base/typography.css +0 -2
  601. package/dist/base/upload.css +0 -10
  602. package/dist/base/value-inputs.css +0 -14
  603. package/dist/buttons-CqXKWty3.js +0 -179
  604. package/dist/cards-C6Ulbkw7.js +0 -271
  605. package/dist/chart-nomhJ87z.js +0 -193
  606. package/dist/choice-inputs-OUDn0kQw.js +0 -680
  607. package/dist/combobox-C8oP92bT.js +0 -266
  608. package/dist/command-Bp3B6pUu.js +0 -143
  609. package/dist/comments-CAnDlyXO.js +0 -1438
  610. package/dist/components/admin/patterns/index.d.ts +0 -2
  611. package/dist/components/features/rich-text-editor/exec-command-engine.d.ts +0 -2
  612. package/dist/components/patterns/index.d.ts +0 -3
  613. package/dist/css/styles.css +0 -1
  614. package/dist/date-pickers-DOwIT-Nk.js +0 -661
  615. package/dist/display-B3Q17h5z.js +0 -645
  616. package/dist/dropdown-menu-TyNLCLML.js +0 -223
  617. package/dist/features/actions.css +0 -11
  618. package/dist/features/activities.css +0 -25
  619. package/dist/features/ai-chat.css +0 -14
  620. package/dist/features/async-preview.css +0 -10
  621. package/dist/features/combobox.css +0 -12
  622. package/dist/features/comments.css +0 -24
  623. package/dist/features/data-view.css +0 -31
  624. package/dist/features/event-calendar.css +0 -17
  625. package/dist/features/filters.css +0 -24
  626. package/dist/features/global-search.css +0 -19
  627. package/dist/features/kanban.css +0 -7
  628. package/dist/features/map.css +0 -15
  629. package/dist/features/media-library.css +0 -27
  630. package/dist/features/mentions.css +0 -17
  631. package/dist/features/overlays.css +0 -11
  632. package/dist/features/products.css +0 -29
  633. package/dist/features/resource-assignment.css +0 -14
  634. package/dist/features/resource.css +0 -15
  635. package/dist/features/rich-text-editor.css +0 -8
  636. package/dist/features/schema-form.css +0 -22
  637. package/dist/features/sync.css +0 -11
  638. package/dist/features/table.css +0 -20
  639. package/dist/features/theme-tweaker.css +0 -27
  640. package/dist/feedback-DRerHGuV.js +0 -469
  641. package/dist/forms-CPrGGif_.js +0 -242
  642. package/dist/forms-numeric-CPVsL7Vf.js +0 -569
  643. package/dist/index.css +0 -3
  644. package/dist/input-group-BYe0rhoB.js +0 -126
  645. package/dist/item-B3yQ26as.js +0 -146
  646. package/dist/layout/app-shell.css +0 -13
  647. package/dist/layout/auth.css +0 -14
  648. package/dist/layout/containers.css +0 -2
  649. package/dist/layout/header.css +0 -20
  650. package/dist/layout/navigation.css +0 -11
  651. package/dist/layout/page.css +0 -15
  652. package/dist/layout/settings.css +0 -16
  653. package/dist/layout/sidebar.css +0 -16
  654. package/dist/layout/workspace.css +0 -15
  655. package/dist/navigation-CsqTA16F.js +0 -614
  656. package/dist/navigation-DzxzPuwg.js +0 -202
  657. package/dist/overlay-WQOsLd69.js +0 -345
  658. package/dist/patterns/analytics.css +0 -15
  659. package/dist/patterns/onboarding.css +0 -11
  660. package/dist/patterns/timelines.css +0 -11
  661. package/dist/popover-DriLnIFc.js +0 -123
  662. package/dist/popover-menu-C2UCMAe7.js +0 -189
  663. package/dist/primitives.css +0 -3
  664. package/dist/repeaters-DuP1N0nw.js +0 -438
  665. package/dist/rich-text-editor-BQXFe9oN.js +0 -595
  666. package/dist/sidebar-D0N6ckJL.js +0 -412
  667. package/dist/skeleton-DGR9df28.js +0 -172
  668. package/dist/spinner-CUAVFecI.js +0 -52
  669. package/dist/styles/FACTORS.md +0 -36
  670. package/dist/styles/SCOPES.md +0 -86
  671. package/dist/styles/themes/default.css +0 -164
  672. package/dist/styles/theming/animation.css +0 -143
  673. package/dist/styles/theming/colors.css +0 -97
  674. package/dist/styles/theming/feedback.css +0 -17
  675. package/dist/styles/theming/field.css +0 -21
  676. package/dist/styles/theming/focus.css +0 -88
  677. package/dist/styles/theming/layers.css +0 -13
  678. package/dist/styles/theming/layout.css +0 -21
  679. package/dist/styles/theming/motion.css +0 -42
  680. package/dist/styles/theming/overlay.css +0 -52
  681. package/dist/styles/theming/sizing.css +0 -118
  682. package/dist/styles/theming/text.css +0 -30
  683. package/dist/styles/theming/typography.css +0 -26
  684. package/dist/styles/tokens/components.css +0 -22
  685. package/dist/styles/tokens/foundation.css +0 -80
  686. package/dist/styles/tokens/layout.css +0 -19
  687. package/dist/styles/tokens/palette.css +0 -88
  688. package/dist/styles/tokens/primitives.css +0 -18
  689. package/dist/styles/tokens/states.css +0 -77
  690. package/dist/table-BC4qqsUb.js +0 -180
  691. package/dist/table-BHDpjajL.js +0 -982
  692. package/dist/text-inputs-DF_lD7pA.js +0 -385
  693. package/dist/theming-D6KRU7hO.js +0 -104
  694. package/dist/toolbar-DWRywF0R.js +0 -68
  695. package/dist/tooltip-t1VQQ2tZ.js +0 -73
  696. package/dist/upload-B38YZeFJ.js +0 -938
  697. package/dist/value-inputs-Q4ymjXlV.js +0 -716
  698. package/src/styles/FACTORS.md +0 -36
  699. package/src/styles/SCOPES.md +0 -86
  700. /package/dist/components/{admin/patterns → blocks/admin}/access/admin.strings.d.ts +0 -0
  701. /package/dist/components/{admin/patterns → blocks/admin}/access/credential-list.d.ts +0 -0
  702. /package/dist/components/{admin/patterns → blocks/admin}/access/index.d.ts +0 -0
  703. /package/dist/components/{admin/patterns → blocks/admin}/access/role-permissions.d.ts +0 -0
  704. /package/dist/components/{admin/patterns → blocks/admin}/access/sensitive-action.d.ts +0 -0
  705. /package/dist/components/{admin/patterns → blocks/admin}/commerce/account.d.ts +0 -0
  706. /package/dist/components/{admin/patterns → blocks/admin}/commerce/address-lines.d.ts +0 -0
  707. /package/dist/components/{admin/patterns → blocks/admin}/commerce/booking.d.ts +0 -0
  708. /package/dist/components/{admin/patterns → blocks/admin}/commerce/cart.d.ts +0 -0
  709. /package/dist/components/{admin/patterns → blocks/admin}/commerce/commerce.strings.d.ts +0 -0
  710. /package/dist/components/{admin/patterns → blocks/admin}/commerce/commerce.types.d.ts +0 -0
  711. /package/dist/components/{admin/patterns → blocks/admin}/commerce/format-amount.d.ts +0 -0
  712. /package/dist/components/{admin/patterns → blocks/admin}/commerce/index.d.ts +0 -0
  713. /package/dist/components/{admin/patterns → blocks/admin}/commerce/inventory-section.d.ts +0 -0
  714. /package/dist/components/{admin/patterns → blocks/admin}/commerce/invoice.d.ts +0 -0
  715. /package/dist/components/{admin/patterns → blocks/admin}/commerce/loyalty.d.ts +0 -0
  716. /package/dist/components/{admin/patterns → blocks/admin}/commerce/order-customer.d.ts +0 -0
  717. /package/dist/components/{admin/patterns → blocks/admin}/commerce/order-detail.d.ts +0 -0
  718. /package/dist/components/{admin/patterns → blocks/admin}/commerce/order-line-item.d.ts +0 -0
  719. /package/dist/components/{admin/patterns → blocks/admin}/commerce/order-transactions.d.ts +0 -0
  720. /package/dist/components/{admin/patterns → blocks/admin}/commerce/order.d.ts +0 -0
  721. /package/dist/components/{admin/patterns → blocks/admin}/commerce/seo-listing.d.ts +0 -0
  722. /package/dist/components/{admin/patterns → blocks/admin}/commerce/seo-score.d.ts +0 -0
  723. /package/dist/components/{admin/patterns → blocks/admin}/commerce/summary-panel.d.ts +0 -0
  724. /package/dist/components/{patterns → blocks}/analytics/activity-heatmap.d.ts +0 -0
  725. /package/dist/components/{patterns → blocks}/analytics/analytics.types.d.ts +0 -0
  726. /package/dist/components/{patterns → blocks}/analytics/chart-card.d.ts +0 -0
  727. /package/dist/components/{patterns → blocks}/analytics/format-metric-value.d.ts +0 -0
  728. /package/dist/components/{patterns → blocks}/analytics/index.d.ts +0 -0
  729. /package/dist/components/{patterns → blocks}/analytics/metric-bar.d.ts +0 -0
  730. /package/dist/components/{patterns → blocks}/analytics/metric-comparison.d.ts +0 -0
  731. /package/dist/components/{patterns → blocks}/analytics/metric-gradient.d.ts +0 -0
  732. /package/dist/components/{patterns → blocks}/analytics/metric-grid.d.ts +0 -0
  733. /package/dist/components/{patterns → blocks}/analytics/metric-micro-grid.d.ts +0 -0
  734. /package/dist/components/{patterns → blocks}/analytics/metric-skeleton.d.ts +0 -0
  735. /package/dist/components/{patterns → blocks}/analytics/metric-trend-chip.d.ts +0 -0
  736. /package/dist/components/{patterns → blocks}/analytics/metric.d.ts +0 -0
  737. /package/dist/components/{patterns → blocks}/analytics/time-ruler.d.ts +0 -0
  738. /package/dist/components/{patterns → blocks}/onboarding/checklist.d.ts +0 -0
  739. /package/dist/components/{patterns → blocks}/onboarding/index.d.ts +0 -0
  740. /package/dist/components/{patterns → blocks}/onboarding/onboarding.strings.d.ts +0 -0
  741. /package/dist/components/{patterns → blocks}/timelines/changelog-timeline.d.ts +0 -0
  742. /package/dist/components/{patterns → blocks}/timelines/index.d.ts +0 -0
  743. /package/dist/components/{patterns → blocks}/timelines/milestones-timeline.d.ts +0 -0
  744. /package/dist/components/{patterns → blocks}/timelines/steps.d.ts +0 -0
  745. /package/dist/components/{patterns → blocks}/timelines/timelines.strings.d.ts +0 -0
  746. /package/dist/styles/{theming/breakpoints.css → breakpoints.css} +0 -0
@@ -1,45 +1,48 @@
1
1
  "use client";
2
- import { t as e } from "../cx--CBrhWH0.js";
3
- import { p as t, t as n } from "../feedback-DRerHGuV.js";
4
- import { c as r } from "../buttons-CqXKWty3.js";
5
- import { t as i } from "../use-latest-CF0678ae.js";
6
- import { l as a } from "../display-B3Q17h5z.js";
7
- import { o } from "../structure-D0WGQAP3.js";
8
- import { t as s } from "../badge-CxOuTfVr.js";
9
- import { u as c } from "../forms-CPrGGif_.js";
10
- import { c as l, l as u } from "../text-inputs-DF_lD7pA.js";
11
- import { a as d, n as f, o as p, s as m, t as h } from "../choice-inputs-OUDn0kQw.js";
12
- import { s as g } from "../value-inputs-Q4ymjXlV.js";
13
- import { u as _ } from "../forms-numeric-CPVsL7Vf.js";
14
- import { PlusIcon as v } from "lucide-react";
15
- import { Fragment as y, useCallback as b, useEffect as x, useId as S, useMemo as C, useRef as w, useState as T } from "react";
16
- import { jsx as E, jsxs as D } from "react/jsx-runtime";
2
+ import "#core.css";
3
+ import { c as e } from "../typography-DmeR05Er.js";
4
+ import { t } from "../cx--CBrhWH0.js";
5
+ import { c as n } from "../buttons-BX2JfL5X.js";
6
+ import { o as r } from "../structure-CynEZ-OY.js";
7
+ import { t as i } from "../badge-VlJVZjdm.js";
8
+ import { p as a, t as o } from "../feedback-D4qVsKlD.js";
9
+ import { l as s } from "../display-a7AoX_u7.js";
10
+ import { a as c, n as l, o as u, s as d, t as f } from "../choice-inputs-NwRxvmZN.js";
11
+ import { c as p, l as m } from "../text-inputs-BboE77nZ.js";
12
+ import { t as h } from "../use-latest-CF0678ae.js";
13
+ import { u as g } from "../forms-C0WeNPFF.js";
14
+ import { u as _ } from "../forms-numeric-IwQ1ltNf.js";
15
+ import { s as v } from "../value-inputs-ng8aVJJZ.js";
16
+ import { PlusIcon as y } from "lucide-react";
17
+ import { Fragment as b, useCallback as x, useEffect as S, useId as C, useMemo as w, useRef as T, useState as E } from "react";
18
+ import { jsx as D, jsxs as O } from "react/jsx-runtime";
19
+ import "#css/schema-form.css";
17
20
  //#region src/components/features/schema-form/schema-form-actions.tsx
18
- function O({ submitLabel: t, resetLabel: n, showReset: i = !1, disabled: a = !1, submitDisabled: s = !1, resetDisabled: c = !1, submitting: l = !1, onReset: u, className: d }) {
19
- return /* @__PURE__ */ D(o, {
21
+ function k({ submitLabel: e, resetLabel: i, showReset: a = !1, disabled: o = !1, submitDisabled: s = !1, resetDisabled: c = !1, submitting: l = !1, onReset: u, className: d }) {
22
+ return /* @__PURE__ */ O(r, {
20
23
  direction: "horizontal",
21
24
  align: "center",
22
25
  justify: "end",
23
- gap: "md",
24
- className: e("schema-form-actions--component", d),
25
- children: [i && /* @__PURE__ */ E(r, {
26
+ gap: "sm",
27
+ className: t("schema-form-actions--component", d),
28
+ children: [a && /* @__PURE__ */ D(n, {
26
29
  type: "button",
27
30
  tone: "neutral",
28
- buttonStyle: "outline",
29
- disabled: a || c || l,
31
+ appearance: "outline",
32
+ disabled: o || c || l,
30
33
  onClick: u,
31
- children: n
32
- }), /* @__PURE__ */ E(r, {
34
+ children: i
35
+ }), /* @__PURE__ */ D(n, {
33
36
  type: "submit",
34
37
  loading: l,
35
- disabled: a || s,
36
- children: t
38
+ disabled: o || s,
39
+ children: e
37
40
  })]
38
41
  });
39
42
  }
40
43
  //#endregion
41
44
  //#region src/components/features/schema-form/schema-form.utils.ts
42
- function k(e, t, n) {
45
+ function A(e, t, n) {
43
46
  if (typeof e.hidden == "function") try {
44
47
  return e.hidden(t);
45
48
  } catch (e) {
@@ -47,7 +50,7 @@ function k(e, t, n) {
47
50
  }
48
51
  return e.hidden ?? !1;
49
52
  }
50
- function A(e, t, n) {
53
+ function j(e, t, n) {
51
54
  if (typeof e.disabled == "function") try {
52
55
  return e.disabled(t);
53
56
  } catch (e) {
@@ -55,11 +58,11 @@ function A(e, t, n) {
55
58
  }
56
59
  return e.disabled ?? !1;
57
60
  }
58
- function j(e, t, n) {
59
- return e.filter((e) => !k(e, t, n));
61
+ function M(e, t, n) {
62
+ return e.filter((e) => !A(e, t, n));
60
63
  }
61
- function M(e, t, n, r, i) {
62
- let a = j(e.fields, t, i), o = new Map(a.map((e) => [e.key, e])), s = /* @__PURE__ */ new Set(), c = [];
64
+ function ee(e, t, n, r, i) {
65
+ let a = M(e.fields, t, i), o = new Map(a.map((e) => [e.key, e])), s = /* @__PURE__ */ new Set(), c = [];
63
66
  for (let t of e.sections ?? []) {
64
67
  let e = t.fields ? t.fields.map((e) => o.get(e)).filter((e) => e !== void 0) : a.filter((e) => e.sectionId === t.id);
65
68
  for (let t of e) s.add(t.key);
@@ -88,16 +91,16 @@ function N(e) {
88
91
  function P(e) {
89
92
  return Array.isArray(e) ? e.map((e) => String(e)) : [];
90
93
  }
91
- function ee(e) {
94
+ function te(e) {
92
95
  return e === !0 || e === "true" || e === 1;
93
96
  }
94
- function te(e, t = !1) {
97
+ function ne(e, t = !1) {
95
98
  let n = e.trim();
96
99
  if (n.length === 0) return null;
97
100
  let r = t ? Number.parseInt(n, 10) : Number.parseFloat(n);
98
101
  return Number.isNaN(r) ? null : r;
99
102
  }
100
- function ne(e, t = 2) {
103
+ function F(e, t = 2) {
101
104
  if (e == null) return "";
102
105
  if (typeof e == "string") return e;
103
106
  try {
@@ -106,7 +109,7 @@ function ne(e, t = 2) {
106
109
  return String(e);
107
110
  }
108
111
  }
109
- function F(e) {
112
+ function I(e) {
110
113
  let t = e.trim();
111
114
  if (t.length === 0) return {
112
115
  value: null,
@@ -127,7 +130,7 @@ function F(e) {
127
130
  function re(e) {
128
131
  return e.replace(/[^a-zA-Z0-9_-]/g, "-");
129
132
  }
130
- var I = {
133
+ var L = {
131
134
  root: "schema-form__root___b94WK",
132
135
  surface: "schema-form__surface___WSXkj",
133
136
  header: "schema-form__header___zj925",
@@ -142,17 +145,16 @@ var I = {
142
145
  widthHalf: "schema-form__widthHalf___E7faH",
143
146
  widthFull: "schema-form__widthFull___jWKKb",
144
147
  widthThird: "schema-form__widthThird___SYTHf",
145
- mono: "schema-form__mono___-wgSa",
146
148
  recommendations: "schema-form__recommendations___O5X6e",
147
149
  recommendation: "schema-form__recommendation___jVRLC",
148
150
  submitError: "schema-form__submitError___UG_Kj"
149
151
  };
150
152
  //#endregion
151
153
  //#region src/components/features/schema-form/schema-form-field.tsx
152
- function L(e) {
154
+ function R(e) {
153
155
  return e.hint ?? e.description;
154
156
  }
155
- function R(e, t, n, r) {
157
+ function z(e, t, n, r) {
156
158
  if (e.formatValue) try {
157
159
  return e.formatValue(t, n);
158
160
  } catch (e) {
@@ -160,7 +162,7 @@ function R(e, t, n, r) {
160
162
  }
161
163
  return N(t);
162
164
  }
163
- function z(e, t, n, r) {
165
+ function B(e, t, n, r) {
164
166
  if (e.parseValue) try {
165
167
  return e.parseValue(t, n);
166
168
  } catch (e) {
@@ -168,15 +170,15 @@ function z(e, t, n, r) {
168
170
  }
169
171
  return t;
170
172
  }
171
- function B(e, t, n, r, i) {
173
+ function V(e, t, n, r, i) {
172
174
  if (e.parseValue) try {
173
175
  return e.parseValue(t, n);
174
176
  } catch (e) {
175
177
  i?.(e);
176
178
  }
177
- return te(t, r);
179
+ return ne(t, r);
178
180
  }
179
- function V(e, t, n, r) {
181
+ function H(e, t, n, r) {
180
182
  if (e.type === "json" && e.parseValue) try {
181
183
  return {
182
184
  value: e.parseValue(t, n),
@@ -188,251 +190,254 @@ function V(e, t, n, r) {
188
190
  valid: !1
189
191
  };
190
192
  }
191
- return F(t);
193
+ return I(t);
192
194
  }
193
- function ie({ field: t, value: n, values: r, error: i, disabled: a, fieldId: o, onValueChange: s, onError: u, strings: d }) {
194
- let f = t.type === "json" ? t.jsonIndent ?? 2 : 2, [p, m] = T(), h = w(null), g = w(n), [_, v] = T(null), y = _ ?? ne(n, f);
195
- return x(() => {
196
- Object.is(n, g.current) || (g.current = n, v(null), m(void 0), h.current?.setCustomValidity(""));
197
- }, [n]), t.type === "json" ? /* @__PURE__ */ E(c, {
198
- label: t.label,
199
- required: t.required,
200
- hint: L(t),
201
- helperText: t.helperText,
202
- error: i ?? p,
203
- htmlFor: o,
195
+ function U({ field: n, value: r, values: i, error: a, disabled: o, fieldId: s, onValueChange: c, onError: l, strings: u }) {
196
+ let d = n.type === "json" ? n.jsonIndent ?? 2 : 2, [f, m] = E(), h = T(null), _ = T(r), [v, y] = E(null), b = v ?? F(r, d);
197
+ return S(() => {
198
+ Object.is(r, _.current) || (_.current = r, y(null), m(void 0), h.current?.setCustomValidity(""));
199
+ }, [r]), n.type === "json" ? /* @__PURE__ */ D(g, {
200
+ label: n.label,
201
+ required: n.required,
202
+ hint: R(n),
203
+ helperText: n.helperText,
204
+ error: a ?? f,
205
+ htmlFor: s,
204
206
  className: "schema-form-field--component",
205
- children: /* @__PURE__ */ E(l, {
207
+ children: /* @__PURE__ */ D(p, {
206
208
  ref: h,
207
- id: o,
208
- name: t.key,
209
- value: y,
210
- rows: t.rows ?? 6,
211
- disabled: a,
212
- invalid: !!(i ?? p),
213
- placeholder: t.placeholder,
209
+ id: s,
210
+ name: n.key,
211
+ value: b,
212
+ rows: n.rows ?? 6,
213
+ disabled: o,
214
+ invalid: !!(a ?? f),
215
+ placeholder: n.placeholder,
214
216
  spellCheck: !1,
215
- className: e(I.mono, t.controlClassName),
217
+ className: t(e({
218
+ size: "inherit",
219
+ mono: !0
220
+ }), n.controlClassName),
216
221
  onChange: (e) => {
217
- let n = e.target.value;
218
- v(n);
219
- let i = V(t, n, r, u);
220
- m(i.valid ? void 0 : d.jsonParseError), e.currentTarget.setCustomValidity(i.valid ? "" : d.jsonParseError), g.current = i.value, s(i.value);
222
+ let t = e.target.value;
223
+ y(t);
224
+ let r = H(n, t, i, l);
225
+ m(r.valid ? void 0 : u.jsonParseError), e.currentTarget.setCustomValidity(r.valid ? "" : u.jsonParseError), _.current = r.value, c(r.value);
221
226
  },
222
227
  onBlur: (e) => {
223
- let n = V(t, y, r, u);
224
- m(n.valid ? void 0 : d.jsonParseError), e.currentTarget.setCustomValidity(n.valid ? "" : d.jsonParseError), g.current = n.value, s(n.value), v(null);
228
+ let t = H(n, b, i, l);
229
+ m(t.valid ? void 0 : u.jsonParseError), e.currentTarget.setCustomValidity(t.valid ? "" : u.jsonParseError), _.current = t.value, c(t.value), y(null);
225
230
  },
226
- ...t.textareaProps
231
+ ...n.textareaProps
227
232
  })
228
233
  }) : null;
229
234
  }
230
- function H({ field: t, value: n, values: r, error: i, disabled: a, required: o, fieldId: y, onValueChange: b, onError: x, strings: S, className: C }) {
231
- let w = t.type ?? "text", T = /* @__PURE__ */ new Set(["radio-cards", "checkbox-cards"]), O = {
232
- label: t.label,
233
- required: o,
234
- hint: L(t),
235
- helperText: t.helperText,
236
- error: i,
237
- htmlFor: !T.has(w) && y,
238
- className: e("schema-form-field--component", C)
239
- }, k = t.controlClassName;
240
- if (t.type === "custom") return /* @__PURE__ */ E("div", {
241
- className: e("schema-form-field--component", C),
242
- children: t.render({
243
- field: t,
235
+ function ie({ field: e, value: n, values: r, error: a, disabled: o, required: s, fieldId: h, onValueChange: b, onError: x, strings: S, className: C }) {
236
+ let w = e.type ?? "text", T = /* @__PURE__ */ new Set(["radio-cards", "checkbox-cards"]), E = {
237
+ label: e.label,
238
+ required: s,
239
+ hint: R(e),
240
+ helperText: e.helperText,
241
+ error: a,
242
+ htmlFor: !T.has(w) && h,
243
+ className: t("schema-form-field--component", C)
244
+ }, k = e.controlClassName;
245
+ if (e.type === "custom") return /* @__PURE__ */ D("div", {
246
+ className: t("schema-form-field--component", C),
247
+ children: e.render({
248
+ field: e,
244
249
  value: n,
245
250
  values: r,
246
- error: i,
247
- disabled: a,
248
- required: o,
249
- fieldId: y,
251
+ error: a,
252
+ disabled: o,
253
+ required: s,
254
+ fieldId: h,
250
255
  onValueChange: b,
251
256
  onError: x
252
257
  })
253
258
  });
254
- if (t.type === "switch") {
255
- let r = ee(n);
256
- return t.switchStyle === "card" ? /* @__PURE__ */ E(c, {
257
- error: i,
258
- className: e("schema-form-field--component", C),
259
- children: /* @__PURE__ */ E(h, {
260
- label: t.label,
261
- description: t.description,
262
- hint: t.hint,
263
- name: t.key,
259
+ if (e.type === "switch") {
260
+ let r = te(n);
261
+ return e.switchStyle === "card" ? /* @__PURE__ */ D(g, {
262
+ error: a,
263
+ className: t("schema-form-field--component", C),
264
+ children: /* @__PURE__ */ D(f, {
265
+ label: e.label,
266
+ description: e.description,
267
+ hint: e.hint,
268
+ name: e.key,
264
269
  value: r,
265
- disabled: a,
266
- invalid: !!i,
270
+ disabled: o,
271
+ invalid: !!a,
267
272
  className: k,
268
273
  onValueChange: b,
269
- ...t.switchCardProps
274
+ ...e.switchCardProps
270
275
  })
271
- }) : /* @__PURE__ */ E(c, {
272
- error: i,
273
- className: e("schema-form-field--component", C),
274
- children: /* @__PURE__ */ E(f, {
275
- label: t.label,
276
- description: t.description ?? t.hint,
277
- name: t.key,
276
+ }) : /* @__PURE__ */ D(g, {
277
+ error: a,
278
+ className: t("schema-form-field--component", C),
279
+ children: /* @__PURE__ */ D(l, {
280
+ label: e.label,
281
+ description: e.description ?? e.hint,
282
+ name: e.key,
278
283
  value: r,
279
- disabled: a,
280
- invalid: !!i,
284
+ disabled: o,
285
+ invalid: !!a,
281
286
  className: k,
282
287
  onValueChange: b,
283
- ...t.switchProps
288
+ ...e.switchProps
284
289
  })
285
290
  });
286
291
  }
287
- if (t.type === "json") return /* @__PURE__ */ E(ie, {
288
- field: t,
292
+ if (e.type === "json") return /* @__PURE__ */ D(U, {
293
+ field: e,
289
294
  value: n,
290
295
  values: r,
291
- error: i,
292
- disabled: a,
293
- required: o,
294
- fieldId: y,
296
+ error: a,
297
+ disabled: o,
298
+ required: s,
299
+ fieldId: h,
295
300
  onValueChange: b,
296
301
  onError: x,
297
302
  strings: S
298
303
  });
299
- if (t.type === "textarea") return /* @__PURE__ */ E(c, {
300
- ...O,
301
- children: /* @__PURE__ */ E(l, {
302
- id: y,
303
- name: t.key,
304
- value: R(t, n, r, x),
305
- rows: t.rows,
306
- disabled: a,
307
- required: o,
308
- invalid: !!i,
309
- placeholder: t.placeholder,
304
+ if (e.type === "textarea") return /* @__PURE__ */ D(g, {
305
+ ...E,
306
+ children: /* @__PURE__ */ D(p, {
307
+ id: h,
308
+ name: e.key,
309
+ value: z(e, n, r, x),
310
+ rows: e.rows,
311
+ disabled: o,
312
+ required: s,
313
+ invalid: !!a,
314
+ placeholder: e.placeholder,
310
315
  className: k,
311
- onChange: (e) => b(z(t, e.target.value, r, x)),
312
- ...t.textareaProps
316
+ onChange: (t) => b(B(e, t.target.value, r, x)),
317
+ ...e.textareaProps
313
318
  })
314
319
  });
315
- if (t.type === "number" || t.type === "integer" || t.type === "decimal") {
316
- let e = t.type === "integer", s = e ? 0 : t.decimalPlaces ?? (t.type === "decimal" ? 2 : 4);
317
- return /* @__PURE__ */ E(c, {
318
- ...O,
319
- children: /* @__PURE__ */ E(_, {
320
- id: y,
321
- name: t.key,
322
- value: R(t, n, r, x),
323
- min: t.min,
324
- max: t.max,
325
- step: t.step,
326
- decimalPlaces: s,
327
- disabled: a,
328
- required: o,
329
- invalid: !!i,
330
- placeholder: t.placeholder,
320
+ if (e.type === "number" || e.type === "integer" || e.type === "decimal") {
321
+ let t = e.type === "integer", i = t ? 0 : e.decimalPlaces ?? (e.type === "decimal" ? 2 : 4);
322
+ return /* @__PURE__ */ D(g, {
323
+ ...E,
324
+ children: /* @__PURE__ */ D(_, {
325
+ id: h,
326
+ name: e.key,
327
+ value: z(e, n, r, x),
328
+ min: e.min,
329
+ max: e.max,
330
+ step: e.step,
331
+ decimalPlaces: i,
332
+ disabled: o,
333
+ required: s,
334
+ invalid: !!a,
335
+ placeholder: e.placeholder,
331
336
  className: k,
332
- onChange: (n) => b(B(t, n.target.value, r, e, x)),
333
- ...t.numberProps
337
+ onChange: (n) => b(V(e, n.target.value, r, t, x)),
338
+ ...e.numberProps
334
339
  })
335
340
  });
336
341
  }
337
- if (t.type === "select") return /* @__PURE__ */ E(c, {
338
- ...O,
339
- children: /* @__PURE__ */ E(m, {
340
- name: t.key,
342
+ if (e.type === "select") return /* @__PURE__ */ D(g, {
343
+ ...E,
344
+ children: /* @__PURE__ */ D(d, {
345
+ name: e.key,
341
346
  value: N(n),
342
- options: t.options.map((e) => ({
347
+ options: e.options.map((e) => ({
343
348
  value: e.value,
344
349
  label: e.label,
345
350
  disabled: e.disabled,
346
351
  icon: e.icon
347
352
  })),
348
- allowClear: t.allowClear,
349
- disabled: a,
350
- required: o,
351
- invalid: !!i,
352
- placeholder: t.placeholder,
353
+ allowClear: e.allowClear,
354
+ disabled: o,
355
+ required: s,
356
+ invalid: !!a,
357
+ placeholder: e.placeholder,
353
358
  className: k,
354
359
  onValueChange: (e) => b(e ?? null),
355
- ...t.selectProps
360
+ ...e.selectProps
356
361
  })
357
362
  });
358
- if (t.type === "radio-cards") return /* @__PURE__ */ E(c, {
359
- ...O,
360
- children: /* @__PURE__ */ E(p, {
361
- name: t.key,
363
+ if (e.type === "radio-cards") return /* @__PURE__ */ D(g, {
364
+ ...E,
365
+ children: /* @__PURE__ */ D(u, {
366
+ name: e.key,
362
367
  value: N(n),
363
- options: t.options,
364
- columns: t.columns,
365
- disabled: a,
366
- invalid: !!i,
368
+ options: e.options,
369
+ columns: e.columns,
370
+ disabled: o,
371
+ invalid: !!a,
367
372
  className: k,
368
373
  onValueChange: b,
369
- ...t.radioProps
374
+ ...e.radioProps
370
375
  })
371
376
  });
372
- if (t.type === "checkbox-cards") return /* @__PURE__ */ E(c, {
373
- ...O,
374
- children: /* @__PURE__ */ E(d, {
375
- name: t.key,
377
+ if (e.type === "checkbox-cards") return /* @__PURE__ */ D(g, {
378
+ ...E,
379
+ children: /* @__PURE__ */ D(c, {
380
+ name: e.key,
376
381
  value: P(n),
377
- options: t.options,
378
- columns: t.columns,
379
- disabled: a,
380
- invalid: !!i,
382
+ options: e.options,
383
+ columns: e.columns,
384
+ disabled: o,
385
+ invalid: !!a,
381
386
  className: k,
382
387
  onValueChange: b,
383
- ...t.checkboxProps
388
+ ...e.checkboxProps
384
389
  })
385
390
  });
386
- if (t.type === "tags") {
387
- let e = P(n), r = (t.recommendations ?? []).filter((t) => !e.includes(t)), o = t.maxTags !== void 0 && e.length >= t.maxTags;
388
- return /* @__PURE__ */ D(c, {
389
- ...O,
390
- children: [/* @__PURE__ */ E(g, {
391
- name: t.key,
392
- value: e,
393
- maxTags: t.maxTags,
394
- disabled: a,
395
- invalid: !!i,
396
- placeholder: t.placeholder,
391
+ if (e.type === "tags") {
392
+ let t = P(n), r = (e.recommendations ?? []).filter((e) => !t.includes(e)), s = e.maxTags !== void 0 && t.length >= e.maxTags;
393
+ return /* @__PURE__ */ O(g, {
394
+ ...E,
395
+ children: [/* @__PURE__ */ D(v, {
396
+ name: e.key,
397
+ value: t,
398
+ maxTags: e.maxTags,
399
+ disabled: o,
400
+ invalid: !!a,
401
+ placeholder: e.placeholder,
397
402
  className: k,
398
403
  onValueChange: b,
399
- ...t.tagsProps
400
- }), r.length > 0 && !o && /* @__PURE__ */ E("div", {
401
- className: I.recommendations,
402
- children: r.map((t) => /* @__PURE__ */ E("button", {
404
+ ...e.tagsProps
405
+ }), r.length > 0 && !s && /* @__PURE__ */ D("div", {
406
+ className: L.recommendations,
407
+ children: r.map((e) => /* @__PURE__ */ D("button", {
403
408
  type: "button",
404
- disabled: a,
405
- className: I.recommendation,
406
- onClick: () => b([...e, t]),
407
- children: /* @__PURE__ */ D(s, {
409
+ disabled: o,
410
+ className: L.recommendation,
411
+ onClick: () => b([...t, e]),
412
+ children: /* @__PURE__ */ O(i, {
408
413
  tone: "neutral",
409
- children: [/* @__PURE__ */ E(v, { "aria-hidden": !0 }), t]
414
+ children: [/* @__PURE__ */ D(y, { "aria-hidden": !0 }), e]
410
415
  })
411
- }, t))
416
+ }, e))
412
417
  })]
413
418
  });
414
419
  }
415
- let A = t;
416
- return /* @__PURE__ */ E(c, {
417
- ...O,
418
- children: /* @__PURE__ */ E(u, {
419
- id: y,
420
- name: t.key,
420
+ let A = e;
421
+ return /* @__PURE__ */ D(g, {
422
+ ...E,
423
+ children: /* @__PURE__ */ D(m, {
424
+ id: h,
425
+ name: e.key,
421
426
  type: w === "text" ? "text" : w,
422
- value: R(t, n, r, x),
423
- disabled: a,
424
- required: o,
425
- invalid: !!i,
426
- placeholder: t.placeholder,
427
+ value: z(e, n, r, x),
428
+ disabled: o,
429
+ required: s,
430
+ invalid: !!a,
431
+ placeholder: e.placeholder,
427
432
  className: k,
428
- onChange: (e) => b(z(t, e.target.value, r, x)),
433
+ onChange: (t) => b(B(e, t.target.value, r, x)),
429
434
  ...A.inputProps
430
435
  })
431
436
  });
432
437
  }
433
438
  //#endregion
434
439
  //#region src/components/features/schema-form/schema-form.strings.ts
435
- var U = {
440
+ var W = {
436
441
  submitLabel: "Save changes",
437
442
  resetLabel: "Reset",
438
443
  submitError: "Changes could not be saved. Please try again.",
@@ -445,68 +450,68 @@ var U = {
445
450
  };
446
451
  //#endregion
447
452
  //#region src/components/features/schema-form/use-schema-form.ts
448
- function W(e, t) {
453
+ function G(e, t) {
449
454
  let n = { ...t ?? {} };
450
455
  for (let t of e) t.defaultValue !== void 0 && n[t.key] === void 0 && (n[t.key] = t.defaultValue);
451
456
  return n;
452
457
  }
453
- function G(e) {
458
+ function K(e) {
454
459
  return e == null ? !0 : typeof e == "string" ? e.trim().length === 0 : Array.isArray(e) ? e.length === 0 : !1;
455
460
  }
456
- function K(e) {
461
+ function q(e) {
457
462
  let t = {};
458
463
  for (let [n, r] of Object.entries(e ?? {})) r && (t[n] = r);
459
464
  return t;
460
465
  }
461
- function q({ fields: e, value: t, defaultValue: n, errors: r, onValueChange: a, onFieldChange: o, requiredError: s, validationError: c, onError: l }) {
462
- let u = t !== void 0, d = C(() => W(e, n), [n, e]), [f, p] = T(() => d), [m, h] = T({}), g = C(() => u ? {
463
- ...d,
466
+ function J({ fields: e, value: t, defaultValue: n, errors: r, onValueChange: i, onFieldChange: a, requiredError: o, validationError: s, onError: c }) {
467
+ let l = t !== void 0, u = w(() => G(e, n), [n, e]), [d, f] = E(() => u), [p, m] = E({}), g = w(() => l ? {
468
+ ...u,
464
469
  ...t ?? {}
465
- } : f, [
466
- d,
467
- f,
470
+ } : d, [
468
471
  u,
472
+ d,
473
+ l,
469
474
  t
470
- ]), _ = i(g), v = C(() => ({
471
- ...m,
472
- ...K(r)
473
- }), [r, m]), y = b((e) => {
474
- _.current = e, u || p(e), a?.(e);
475
+ ]), _ = h(g), v = w(() => ({
476
+ ...p,
477
+ ...q(r)
478
+ }), [r, p]), y = x((e) => {
479
+ _.current = e, l || f(e), i?.(e);
475
480
  }, [
476
- u,
477
- a,
481
+ l,
482
+ i,
478
483
  _
479
- ]), x = b((e, t) => {
484
+ ]), b = x((e, t) => {
480
485
  let n = {
481
486
  ..._.current,
482
487
  [e]: t
483
488
  };
484
- _.current = n, u || p(n), h((t) => {
489
+ _.current = n, l || f(n), m((t) => {
485
490
  if (!t[e]) return t;
486
491
  let { [e]: n, ...r } = t;
487
492
  return r;
488
- }), o?.(e, t, n), a?.(n);
493
+ }), a?.(e, t, n), i?.(n);
489
494
  }, [
490
- u,
491
- o,
495
+ l,
492
496
  a,
497
+ i,
493
498
  _
494
- ]), S = b(() => {
495
- let t = W(e, n);
496
- return _.current = t, u || p(t), h({}), a?.(t), t;
499
+ ]), S = x(() => {
500
+ let t = G(e, n);
501
+ return _.current = t, l || f(t), m({}), i?.(t), t;
497
502
  }, [
498
503
  n,
499
504
  e,
500
- u,
501
- a,
505
+ l,
506
+ i,
502
507
  _
503
- ]), w = b(() => {
508
+ ]), C = x(() => {
504
509
  let t = {}, n = _.current;
505
510
  for (let r of e) {
506
- if (k(r, n, l) || A(r, n, l)) continue;
511
+ if (A(r, n, c) || j(r, n, c)) continue;
507
512
  let e = n[r.key];
508
- if (r.required && G(e)) {
509
- t[r.key] = s(r.label);
513
+ if (r.required && K(e)) {
514
+ t[r.key] = o(r.label);
510
515
  continue;
511
516
  }
512
517
  let i = Array.isArray(r.validate) ? r.validate : r.validate ? [r.validate] : [];
@@ -517,195 +522,194 @@ function q({ fields: e, value: t, defaultValue: n, errors: r, onValueChange: a,
517
522
  break;
518
523
  }
519
524
  } catch (e) {
520
- l?.(e), t[r.key] = c;
525
+ c?.(e), t[r.key] = s;
521
526
  break;
522
527
  }
523
528
  }
524
- return h(t), Object.keys(t).length === 0;
529
+ return m(t), Object.keys(t).length === 0;
525
530
  }, [
526
531
  e,
527
- l,
528
- s,
529
532
  c,
533
+ o,
534
+ s,
530
535
  _
531
536
  ]);
532
537
  return {
533
538
  values: g,
534
539
  errors: v,
535
- getFieldError: b((e) => v[e], [v]),
536
- getFieldValue: b((e) => g[e], [g]),
537
- setFieldValue: x,
540
+ getFieldError: x((e) => v[e], [v]),
541
+ getFieldValue: x((e) => g[e], [g]),
542
+ setFieldValue: b,
538
543
  setValues: y,
539
544
  reset: S,
540
- validate: w
545
+ validate: C
541
546
  };
542
547
  }
543
548
  //#endregion
544
549
  //#region src/components/features/schema-form/schema-form.tsx
545
550
  var ae = {
546
551
  1: void 0,
547
- 2: I.columns2,
548
- 3: I.columns3
552
+ 2: L.columns2,
553
+ 3: L.columns3
549
554
  }, oe = {
550
555
  auto: void 0,
551
- half: I.widthHalf,
552
- third: I.widthThird,
553
- full: I.widthFull
556
+ half: L.widthHalf,
557
+ third: L.widthThird,
558
+ full: L.widthFull
554
559
  };
555
560
  function se({ section: e }) {
556
- return !e.title && !e.description ? null : /* @__PURE__ */ E(a, {
561
+ return !e.title && !e.description ? null : /* @__PURE__ */ D(s, {
557
562
  title: e.title || void 0,
558
563
  description: e.description || void 0,
559
- className: I.sectionHeading
564
+ className: L.sectionHeading
560
565
  });
561
566
  }
562
- function J({ schema: r, value: i, defaultValue: o, errors: s, disabled: c = !1, layout: l = "form", columns: u = 2, id: d, name: f, title: p, description: m, headerSlot: h, footerSlot: g, actionsSlot: _, emptySlot: v, showActions: b, submitLabel: k, resetLabel: j, submitDisabled: N = !1, resetDisabled: P = !1, submitting: ee = !1, onValueChange: te, onFieldChange: ne, onSubmit: F, onReset: L, onError: R, renderField: z, renderSection: B, strings: V, className: ie, contentClassName: W, sectionClassName: G, fieldClassName: K }) {
563
- let J = {
564
- ...U,
567
+ function Y({ schema: e, value: n, defaultValue: r, errors: i, disabled: c = !1, layout: l = "form", columns: u = 2, id: d, name: f, title: p, description: m, headerSlot: h, footerSlot: g, actionsSlot: _, emptySlot: v, showActions: y, submitLabel: x, resetLabel: A, submitDisabled: M = !1, resetDisabled: N = !1, submitting: P = !1, onValueChange: te, onFieldChange: ne, onSubmit: F, onReset: I, onError: R, renderField: z, renderSection: B, strings: V, className: H, contentClassName: U, sectionClassName: G, fieldClassName: K }) {
568
+ let q = {
569
+ ...W,
565
570
  ...V
566
- }, [ce, Y] = T(!1), [le, X] = T(!1), Z = w(!1), ue = w(null), [de, fe] = T(0), Q = ee || le;
567
- x(() => {
571
+ }, [Y, X] = E(!1), [ce, le] = E(!1), Z = T(!1), ue = T(null), [de, fe] = E(0), Q = P || ce;
572
+ S(() => {
568
573
  de && ue.current?.querySelector("[aria-invalid=\"true\"]:not([disabled])")?.focus();
569
574
  }, [de]);
570
- let pe = S(), me = d ?? `schema-form-${pe}`, $ = q({
571
- fields: r.fields,
572
- value: i,
573
- defaultValue: o,
574
- errors: s,
575
+ let pe = C(), me = d ?? `schema-form-${pe}`, $ = J({
576
+ fields: e.fields,
577
+ value: n,
578
+ defaultValue: r,
579
+ errors: i,
575
580
  onValueChange: te,
576
581
  onFieldChange: ne,
577
- requiredError: J.requiredError,
578
- validationError: J.validationError,
582
+ requiredError: q.requiredError,
583
+ validationError: q.validationError,
579
584
  onError: R
580
- }), he = C(() => M(r, $.values, J.defaultSectionTitle, u, R), [
585
+ }), he = w(() => ee(e, $.values, q.defaultSectionTitle, u, R), [
581
586
  u,
582
- J.defaultSectionTitle,
587
+ q.defaultSectionTitle,
583
588
  $.values,
584
589
  R,
585
- r
590
+ e
586
591
  ]), ge = he.length > 0, _e = {
587
592
  setFieldValue: $.setFieldValue,
588
593
  setValues: $.setValues,
589
594
  reset: $.reset,
590
595
  validate: $.validate
591
- }, ve = p ?? r.title, ye = m ?? r.description, be = b ?? !!(F || L || _), xe = (t) => {
592
- let n = `${me}-${re(t.key)}`, r = {
593
- field: t,
594
- value: $.getFieldValue(t.key),
596
+ }, ve = p ?? e.title, ye = m ?? e.description, be = y ?? !!(F || I || _), xe = (e) => {
597
+ let n = `${me}-${re(e.key)}`, r = {
598
+ field: e,
599
+ value: $.getFieldValue(e.key),
595
600
  values: $.values,
596
- error: $.getFieldError(t.key),
597
- disabled: c || Q || A(t, $.values, R),
598
- required: !!t.required,
601
+ error: $.getFieldError(e.key),
602
+ disabled: c || Q || j(e, $.values, R),
603
+ required: !!e.required,
599
604
  fieldId: n,
600
- onValueChange: (e) => $.setFieldValue(t.key, e),
605
+ onValueChange: (t) => $.setFieldValue(e.key, t),
601
606
  onError: R
602
- }, i = /* @__PURE__ */ E(H, {
607
+ }, i = /* @__PURE__ */ D(ie, {
603
608
  ...r,
604
- strings: J
609
+ strings: q
605
610
  });
606
- return /* @__PURE__ */ E("div", {
607
- className: e(oe[t.width ?? "auto"], t.className, K),
611
+ return /* @__PURE__ */ D("div", {
612
+ className: t(oe[e.width ?? "auto"], e.className, K),
608
613
  children: z?.({
609
614
  ...r,
610
615
  defaultField: i
611
616
  }) ?? i
612
- }, t.key);
613
- }, Se = (t) => /* @__PURE__ */ E("div", {
614
- className: e(I.grid, ae[t.columns]),
615
- children: t.fields.map(xe)
616
- }), Ce = (t) => {
617
- let n = Se(t), r = B?.({
618
- section: t,
617
+ }, e.key);
618
+ }, Se = (e) => /* @__PURE__ */ D("div", {
619
+ className: t(L.grid, ae[e.columns]),
620
+ children: e.fields.map(xe)
621
+ }), Ce = (e) => {
622
+ let n = Se(e), r = B?.({
623
+ section: e,
619
624
  fields: n,
620
625
  values: $.values
621
626
  });
622
- return r == null ? l === "cards" ? /* @__PURE__ */ D(a, {
627
+ return r == null ? l === "cards" ? /* @__PURE__ */ O(s, {
623
628
  surface: "bordered",
624
- icon: t.icon,
625
- title: t.title,
626
- description: t.description,
627
- className: e(t.className, G),
628
- children: [n, !!t.footerSlot && /* @__PURE__ */ E("div", {
629
- className: I.sectionFooter,
630
- children: t.footerSlot
629
+ icon: e.icon,
630
+ title: e.title,
631
+ description: e.description,
632
+ className: t(e.className, G),
633
+ children: [n, !!e.footerSlot && /* @__PURE__ */ D("div", {
634
+ className: L.sectionFooter,
635
+ children: e.footerSlot
631
636
  })]
632
- }, t.id) : /* @__PURE__ */ D("section", {
633
- className: e(t.className, G),
637
+ }, e.id) : /* @__PURE__ */ O("section", {
638
+ className: t(e.className, G),
634
639
  children: [
635
- /* @__PURE__ */ E(se, { section: t }),
640
+ /* @__PURE__ */ D(se, { section: e }),
636
641
  n,
637
- !!t.footerSlot && /* @__PURE__ */ E("div", {
638
- className: I.sectionFooter,
639
- children: t.footerSlot
642
+ !!e.footerSlot && /* @__PURE__ */ D("div", {
643
+ className: L.sectionFooter,
644
+ children: e.footerSlot
640
645
  })
641
646
  ]
642
- }, t.id) : /* @__PURE__ */ E(y, { children: r }, t.id);
643
- }, we = _ ?? (be ? /* @__PURE__ */ E(O, {
644
- submitLabel: k ?? J.submitLabel,
645
- resetLabel: j ?? J.resetLabel,
646
- showReset: !!L,
647
+ }, e.id) : /* @__PURE__ */ D(b, { children: r }, e.id);
648
+ }, we = _ ?? (be ? /* @__PURE__ */ D(k, {
649
+ submitLabel: x ?? q.submitLabel,
650
+ resetLabel: A ?? q.resetLabel,
651
+ showReset: !!I,
647
652
  disabled: c,
648
- submitDisabled: N,
649
- resetDisabled: P,
653
+ submitDisabled: M,
654
+ resetDisabled: N,
650
655
  submitting: Q,
651
656
  onReset: () => {
652
- Y(!1), L?.($.reset(), _e);
657
+ X(!1), I?.($.reset(), _e);
653
658
  }
654
- }) : null), Te = v ?? /* @__PURE__ */ E(t, {
655
- title: J.emptyTitle,
656
- description: J.emptyDescription,
657
- padding: "md",
659
+ }) : null), Te = v ?? /* @__PURE__ */ D(a, {
660
+ title: q.emptyTitle,
661
+ description: q.emptyDescription,
658
662
  border: !0
659
- }), Ee = !!(ve || ye || h) && /* @__PURE__ */ E(a, {
663
+ }), Ee = !!(ve || ye || h) && /* @__PURE__ */ D(s, {
660
664
  title: ve || void 0,
661
665
  description: ye || void 0,
662
666
  headerEnd: h,
663
- className: I.header
664
- }), De = !!(g || we) && /* @__PURE__ */ D("div", {
665
- className: I.footer,
667
+ className: L.header
668
+ }), De = !!(g || we) && /* @__PURE__ */ O("div", {
669
+ className: L.footer,
666
670
  children: [g, we]
667
- }), Oe = /* @__PURE__ */ D("div", {
668
- className: e(I.body, W),
669
- children: [ge ? he.map(Ce) : Te, ce && /* @__PURE__ */ E(n, {
670
- className: I.submitError,
671
- title: J.submitError ?? U.submitError,
671
+ }), Oe = /* @__PURE__ */ O("div", {
672
+ className: t(L.body, U),
673
+ children: [ge ? he.map(Ce) : Te, Y && /* @__PURE__ */ D(o, {
674
+ className: L.submitError,
675
+ title: q.submitError ?? W.submitError,
672
676
  description: !1
673
677
  })]
674
678
  });
675
- return /* @__PURE__ */ E("form", {
679
+ return /* @__PURE__ */ D("form", {
676
680
  ref: ue,
677
681
  "aria-busy": Q || void 0,
678
682
  id: me,
679
683
  name: f,
680
684
  noValidate: !0,
681
- className: e("schema-form--component", I.root, ie),
685
+ className: t("schema-form--component", L.root, H),
682
686
  onSubmit: async (e) => {
683
- if (e.preventDefault(), !(c || N || Q || Z.current)) {
687
+ if (e.preventDefault(), !(c || M || Q || Z.current)) {
684
688
  if (!$.validate()) {
685
689
  fe((e) => e + 1);
686
690
  return;
687
691
  }
688
692
  if (e.currentTarget.reportValidity()) {
689
- Z.current = !0, Y(!1), X(!0);
693
+ Z.current = !0, X(!1), le(!0);
690
694
  try {
691
695
  await F?.($.values, _e, e);
692
696
  } catch (e) {
693
- Y(!0), R?.(e);
697
+ X(!0), R?.(e);
694
698
  } finally {
695
- Z.current = !1, X(!1);
699
+ Z.current = !1, le(!1);
696
700
  }
697
701
  }
698
702
  }
699
703
  },
700
- children: l === "cards" ? /* @__PURE__ */ D("div", {
701
- className: I.cards,
704
+ children: l === "cards" ? /* @__PURE__ */ O("div", {
705
+ className: L.cards,
702
706
  children: [
703
707
  Ee,
704
708
  Oe,
705
709
  De
706
710
  ]
707
- }) : /* @__PURE__ */ D("div", {
708
- className: I.surface,
711
+ }) : /* @__PURE__ */ O("div", {
712
+ className: L.surface,
709
713
  children: [
710
714
  Ee,
711
715
  Oe,
@@ -715,4 +719,4 @@ function J({ schema: r, value: i, defaultValue: o, errors: s, disabled: c = !1,
715
719
  });
716
720
  }
717
721
  //#endregion
718
- export { J as SchemaForm, O as SchemaFormActions, H as SchemaFormFieldRenderer, U as defaultSchemaFormStrings, j as getVisibleFields, A as isFieldDisabled, k as isFieldHidden, M as resolveSchemaSections, q as useSchemaForm };
722
+ export { Y as SchemaForm, k as SchemaFormActions, ie as SchemaFormFieldRenderer, W as defaultSchemaFormStrings, M as getVisibleFields, j as isFieldDisabled, A as isFieldHidden, ee as resolveSchemaSections, J as useSchemaForm };