themelia-react-ui 2.0.4 → 2.0.6

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 (715) hide show
  1. package/CHANGELOG.md +211 -0
  2. package/MIGRATION.md +119 -0
  3. package/README.md +122 -20
  4. package/dist/{accordion-96o0pN62.js → accordion-0tQUZ20r.js} +13 -13
  5. package/dist/accordion-0tQUZ20r.js.map +1 -0
  6. package/dist/{action-menu-CHgs8vmj.js → action-menu-C0gjzLyE.js} +48 -45
  7. package/dist/action-menu-C0gjzLyE.js.map +1 -0
  8. package/dist/{affordance-geometry.generated-B8yGOr8-.js → affordance-geometry.generated-P-aVJisu.js} +36 -36
  9. package/dist/affordance-geometry.generated-P-aVJisu.js.map +1 -0
  10. package/dist/{ai-artifact-BZUGwBq6.js → ai-artifact-CGGpQryR.js} +281 -230
  11. package/dist/ai-artifact-CGGpQryR.js.map +1 -0
  12. package/dist/app-shell-EHuuRDGy.js +321 -0
  13. package/dist/app-shell-EHuuRDGy.js.map +1 -0
  14. package/dist/{attachment-DkoqHPPl.js → attachment-BCpA4e7i.js} +10 -10
  15. package/dist/{attachment-DkoqHPPl.js.map → attachment-BCpA4e7i.js.map} +1 -1
  16. package/dist/{auth-D2FVZ1MH.js → auth-B0girIk_.js} +49 -52
  17. package/dist/auth-B0girIk_.js.map +1 -0
  18. package/dist/{avatar-DWO_HHhB.js → avatar-B9Jnp-T-.js} +8 -8
  19. package/dist/avatar-B9Jnp-T-.js.map +1 -0
  20. package/dist/{badge-DErMA7ul.js → badge-wWauMgAt.js} +5 -5
  21. package/dist/{badge-DErMA7ul.js.map → badge-wWauMgAt.js.map} +1 -1
  22. package/dist/base/accordion.js +1 -1
  23. package/dist/base/action-menu.js +1 -1
  24. package/dist/base/attachment.js +1 -1
  25. package/dist/base/avatar.js +1 -1
  26. package/dist/base/badge.js +1 -1
  27. package/dist/base/batch-action-bar.js +1 -1
  28. package/dist/base/buttons.js +1 -1
  29. package/dist/base/cards.js +2 -2
  30. package/dist/base/carousel.js +3 -3
  31. package/dist/base/cascader.js +2 -372
  32. package/dist/base/chart.js +1 -1
  33. package/dist/base/choice-inputs.js +2 -2
  34. package/dist/base/code-block.js +1 -1
  35. package/dist/base/combobox.js +2 -2
  36. package/dist/base/command.js +1 -1
  37. package/dist/base/copyable.js +1 -1
  38. package/dist/base/date-pickers.js +2 -2
  39. package/dist/base/display.js +6 -6
  40. package/dist/base/feedback.js +4 -4
  41. package/dist/base/forms-numeric.js +1 -1
  42. package/dist/base/forms.js +2 -2
  43. package/dist/base/inline-edit.js +10 -10
  44. package/dist/base/item.js +1 -1
  45. package/dist/base/media-gallery.js +1 -1
  46. package/dist/base/metadata-list.js +1 -1
  47. package/dist/base/navigation.js +7 -7
  48. package/dist/base/popover-menu.js +1 -1
  49. package/dist/base/popover.js +1 -1
  50. package/dist/base/qr-code.js +1 -1
  51. package/dist/base/repeaters.js +200 -193
  52. package/dist/base/repeaters.js.map +1 -1
  53. package/dist/base/sheet.js +1 -1
  54. package/dist/base/sidebar.js +2 -2
  55. package/dist/base/signature-pad.js +8 -8
  56. package/dist/base/signature-pad.js.map +1 -1
  57. package/dist/base/skeleton.js +1 -1
  58. package/dist/base/spinner.js +6 -6
  59. package/dist/base/spinner.js.map +1 -1
  60. package/dist/base/structure.js +1 -1
  61. package/dist/base/table.js +1 -1
  62. package/dist/base/text-inputs.js +2 -2
  63. package/dist/base/toaster.js +36 -36
  64. package/dist/base/toaster.js.map +1 -1
  65. package/dist/base/tree.js +1 -1
  66. package/dist/base/upload-queue.js +1 -1
  67. package/dist/base/upload.js +3 -3
  68. package/dist/base/value-inputs.js +1 -1
  69. package/dist/{batch-action-bar-CdfIkCsV.js → batch-action-bar-BoqWIIpV.js} +7 -7
  70. package/dist/batch-action-bar-BoqWIIpV.js.map +1 -0
  71. package/dist/blocks/admin.js +21 -21
  72. package/dist/blocks/admin.js.map +1 -1
  73. package/dist/blocks/ai.js +267 -247
  74. package/dist/blocks/ai.js.map +1 -1
  75. package/dist/blocks/analytics/usage-card.js +1 -1
  76. package/dist/blocks/analytics.js +537 -543
  77. package/dist/blocks/analytics.js.map +1 -1
  78. package/dist/blocks/collaboration.js +1 -1
  79. package/dist/blocks/commerce/receipt.js +1 -1
  80. package/dist/blocks/commerce.js +1330 -1250
  81. package/dist/blocks/commerce.js.map +1 -1
  82. package/dist/blocks/data-display.js +2 -2
  83. package/dist/blocks/onboarding.js +6 -6
  84. package/dist/blocks/onboarding.js.map +1 -1
  85. package/dist/blocks/planning.js +11 -11
  86. package/dist/blocks/timelines.js +1 -1
  87. package/dist/{breadcrumbs-B-WFKecD.js → breadcrumbs-Bp9Ke7kd.js} +7 -7
  88. package/dist/breadcrumbs-Bp9Ke7kd.js.map +1 -0
  89. package/dist/{button-DkmK-z8E.js → button-ChBovTx0.js} +3 -3
  90. package/dist/button-ChBovTx0.js.map +1 -0
  91. package/dist/{buttons-BbfzgczK.js → buttons-DeW0bQeK.js} +16 -16
  92. package/dist/buttons-DeW0bQeK.js.map +1 -0
  93. package/dist/cards-CNXnmvV5.js +69 -0
  94. package/dist/cards-CNXnmvV5.js.map +1 -0
  95. package/dist/cascader-CrAl9zD5.js +439 -0
  96. package/dist/cascader-CrAl9zD5.js.map +1 -0
  97. package/dist/chart-I7ROnsl8.js +162 -0
  98. package/dist/chart-I7ROnsl8.js.map +1 -0
  99. package/dist/{checkbox-CzYUTPeJ.js → checkbox-MoyHIAPs.js} +3 -3
  100. package/dist/{checkbox-CzYUTPeJ.js.map → checkbox-MoyHIAPs.js.map} +1 -1
  101. package/dist/choice-inputs-DHGtx0QV.js +789 -0
  102. package/dist/choice-inputs-DHGtx0QV.js.map +1 -0
  103. package/dist/{code-block-CGNaUtAE.js → code-block-BSJyq9e-.js} +9 -9
  104. package/dist/code-block-BSJyq9e-.js.map +1 -0
  105. package/dist/{collapsible-Do4G0zcC.js → collapsible-BzJ91LUG.js} +5 -5
  106. package/dist/{collapsible-Do4G0zcC.js.map → collapsible-BzJ91LUG.js.map} +1 -1
  107. package/dist/{collection-content-C0e8SsTm.js → collection-content-CSnwtOTH.js} +3 -3
  108. package/dist/{collection-content-C0e8SsTm.js.map → collection-content-CSnwtOTH.js.map} +1 -1
  109. package/dist/combobox-Bcvu5J8O.js +363 -0
  110. package/dist/combobox-Bcvu5J8O.js.map +1 -0
  111. package/dist/combobox-C2JiSQPc.js +915 -0
  112. package/dist/combobox-C2JiSQPc.js.map +1 -0
  113. package/dist/{command-D8NrBj-b.js → command-9e52NPgK.js} +11 -11
  114. package/dist/command-9e52NPgK.js.map +1 -0
  115. package/dist/{comments-Di4w0H_S.js → comments-BsgErEqd.js} +44 -39
  116. package/dist/comments-BsgErEqd.js.map +1 -0
  117. package/dist/components/base/action-menu/action-menu.d.ts +7 -1
  118. package/dist/components/base/buttons/button-group.recipes.d.ts +2 -2
  119. package/dist/components/base/cards/card.recipes.d.ts +6 -4
  120. package/dist/components/base/cards/partials/card-primitives.d.ts +9 -2
  121. package/dist/components/base/cards/partials/smart-card-header-row.d.ts +3 -1
  122. package/dist/components/base/cards/smart-card.types.d.ts +3 -4
  123. package/dist/components/base/cascader/cascader-panel.d.ts +76 -0
  124. package/dist/components/base/chart/chart.d.ts +6 -1
  125. package/dist/components/base/choice-inputs/choice-types.d.ts +5 -1
  126. package/dist/components/base/choice-inputs/pill-radio-group.d.ts +7 -6
  127. package/dist/components/base/combobox/combobox-field.d.ts +2 -2
  128. package/dist/components/base/combobox/index.d.ts +4 -2
  129. package/dist/components/base/date-pickers/date-picker-internals.d.ts +3 -1
  130. package/dist/components/base/date-pickers/datepicker.types.d.ts +10 -4
  131. package/dist/components/base/date-pickers/time-picker.d.ts +17 -3
  132. package/dist/components/base/feedback/alert.d.ts +1 -1
  133. package/dist/components/base/feedback/state-display.d.ts +5 -1
  134. package/dist/components/base/feedback/state-display.strings.d.ts +9 -0
  135. package/dist/components/base/forms/form-field.d.ts +7 -2
  136. package/dist/components/base/forms/form-sizing.d.ts +7 -7
  137. package/dist/components/base/forms/workflow.d.ts +7 -1
  138. package/dist/components/base/forms-numeric/coordinates-input.d.ts +8 -1
  139. package/dist/components/base/forms-numeric/decimal-input.d.ts +2 -2
  140. package/dist/components/base/forms-numeric/dimensions-input.d.ts +4 -1
  141. package/dist/components/base/forms-numeric/numeric-composite-field.d.ts +12 -0
  142. package/dist/components/base/forms-numeric/weight-input.d.ts +6 -1
  143. package/dist/components/base/metadata-list/metadata-list.d.ts +1 -1
  144. package/dist/components/base/navigation/dropdown-menu.d.ts +1 -1
  145. package/dist/components/base/navigation/language-switcher.d.ts +12 -4
  146. package/dist/components/base/navigation/page-header/page-header-commands.d.ts +14 -7
  147. package/dist/components/base/navigation/page-header/page-header.d.ts +10 -3
  148. package/dist/components/base/popover/popover.d.ts +3 -3
  149. package/dist/components/base/popover/popover.recipes.d.ts +10 -6
  150. package/dist/components/base/repeaters/key-value-editor.d.ts +2 -1
  151. package/dist/components/base/sheet/sheet.d.ts +2 -0
  152. package/dist/components/base/sidebar/index.d.ts +1 -1
  153. package/dist/components/base/sidebar/sidebar.d.ts +29 -5
  154. package/dist/components/base/toaster/index.d.ts +1 -0
  155. package/dist/components/base/upload/avatar-upload.d.ts +2 -1
  156. package/dist/components/base/upload/image-upload.d.ts +2 -1
  157. package/dist/components/blocks/ai/ai-citation/types.d.ts +2 -0
  158. package/dist/components/blocks/ai/ai-file-tree/types.d.ts +1 -1
  159. package/dist/components/blocks/ai/ai-reasoning/types.d.ts +2 -0
  160. package/dist/components/blocks/ai/ai-sources/types.d.ts +2 -0
  161. package/dist/components/blocks/ai/ai-tool-call/types.d.ts +5 -1
  162. package/dist/components/blocks/ai/ai.strings.d.ts +2 -0
  163. package/dist/components/blocks/analytics/metric/metric.d.ts +4 -0
  164. package/dist/components/blocks/analytics/metric-comparison/metric-comparison.d.ts +4 -0
  165. package/dist/components/blocks/analytics/metric-grid/metric-grid.d.ts +4 -5
  166. package/dist/components/blocks/analytics/types.d.ts +2 -2
  167. package/dist/components/blocks/analytics/usage-card/usage-card.strings.d.ts +2 -0
  168. package/dist/components/blocks/commerce/cart-summary/cart-summary.d.ts +1 -1
  169. package/dist/components/blocks/commerce/cart-summary/types.d.ts +3 -1
  170. package/dist/components/blocks/commerce/discount-stack/discount-stack.d.ts +1 -1
  171. package/dist/components/blocks/commerce/discount-stack/types.d.ts +3 -1
  172. package/dist/components/blocks/commerce/fulfillment-group/fulfillment-group.d.ts +1 -1
  173. package/dist/components/blocks/commerce/fulfillment-group/types.d.ts +11 -2
  174. package/dist/components/blocks/commerce/index.d.ts +7 -6
  175. package/dist/components/blocks/commerce/inventory-section/inventory-section.d.ts +1 -1
  176. package/dist/components/blocks/commerce/inventory-section/types.d.ts +7 -2
  177. package/dist/components/blocks/commerce/invoice-header/index.d.ts +2 -1
  178. package/dist/components/blocks/commerce/invoice-header/invoice-header.d.ts +1 -1
  179. package/dist/components/blocks/commerce/invoice-header/types.d.ts +20 -6
  180. package/dist/components/blocks/commerce/invoice-line-items/invoice-line-items.d.ts +1 -1
  181. package/dist/components/blocks/commerce/invoice-line-items/types.d.ts +24 -7
  182. package/dist/components/blocks/commerce/invoice-mini/index.d.ts +2 -1
  183. package/dist/components/blocks/commerce/invoice-mini/types.d.ts +7 -1
  184. package/dist/components/blocks/commerce/order-customer/order-customer.d.ts +1 -1
  185. package/dist/components/blocks/commerce/order-customer/types.d.ts +9 -1
  186. package/dist/components/blocks/commerce/order-status/types.d.ts +4 -0
  187. package/dist/components/blocks/commerce/refund-status/refund-status.d.ts +1 -1
  188. package/dist/components/blocks/commerce/refund-status/types.d.ts +3 -1
  189. package/dist/components/blocks/commerce/shipment-tracking/shipment-tracking.d.ts +1 -1
  190. package/dist/components/blocks/commerce/shipment-tracking/types.d.ts +3 -1
  191. package/dist/components/blocks/commerce/tax-breakdown/tax-breakdown.d.ts +1 -1
  192. package/dist/components/blocks/commerce/tax-breakdown/types.d.ts +3 -1
  193. package/dist/components/blocks/data-display/empty-state/empty-state.types.d.ts +4 -3
  194. package/dist/components/features/activities/activities.types.d.ts +26 -13
  195. package/dist/components/features/activities/hooks/use-activity-resources.d.ts +2 -1
  196. package/dist/components/features/activities/partials/activity-marker.d.ts +7 -3
  197. package/dist/components/features/activities/partials/activity-row.d.ts +24 -0
  198. package/dist/components/features/ai-chat/hooks/use-ai-chat-scroll.d.ts +1 -1
  199. package/dist/components/features/appointment-calendar/appointment-calendar.d.ts +1 -1
  200. package/dist/components/features/appointment-calendar/appointment-calendar.types.d.ts +4 -2
  201. package/dist/components/features/combobox/async-resource-combobox.d.ts +2 -2
  202. package/dist/components/features/combobox/combobox.d.ts +2 -2
  203. package/dist/components/features/combobox/hooks/use-combobox-core.d.ts +2 -1
  204. package/dist/components/features/combobox/hooks/use-combobox-state.d.ts +1 -0
  205. package/dist/components/features/combobox/hooks/use-load-more.d.ts +1 -0
  206. package/dist/components/features/combobox/types.d.ts +37 -8
  207. package/dist/components/features/email-composer/types.d.ts +3 -1
  208. package/dist/components/features/event-calendar/colors.d.ts +2 -2
  209. package/dist/components/features/event-calendar/event-calendar.types.d.ts +4 -0
  210. package/dist/components/features/filters/facets/date-facet.d.ts +4 -2
  211. package/dist/components/features/filters/facets/range-facet.d.ts +12 -0
  212. package/dist/components/features/filters/facets/select-facet.d.ts +2 -1
  213. package/dist/components/features/filters/filters.strings.d.ts +4 -0
  214. package/dist/components/features/filters/filters.types.d.ts +6 -3
  215. package/dist/components/features/filters/partials/date-filter-content.d.ts +3 -2
  216. package/dist/components/features/filters/partials/filter-editor-header.d.ts +16 -0
  217. package/dist/components/features/filters/partials/filter-popover-content.d.ts +5 -3
  218. package/dist/components/features/filters/partials/nested-filter-options.d.ts +21 -0
  219. package/dist/components/features/filters/partials/range-filter-content.d.ts +12 -0
  220. package/dist/components/features/filters/partials/regular-filter-content.d.ts +2 -1
  221. package/dist/components/features/filters/utils/filter-utils.d.ts +25 -3
  222. package/dist/components/features/global-search/global-search.types.d.ts +2 -0
  223. package/dist/components/features/global-search/partials/global-search-input.d.ts +10 -0
  224. package/dist/components/features/global-search/partials/global-search-result-row.d.ts +7 -1
  225. package/dist/components/features/media-library/hooks/use-media-library.d.ts +1 -1
  226. package/dist/components/features/media-library/media-library.d.ts +1 -1
  227. package/dist/components/features/media-library/media-library.strings.d.ts +8 -0
  228. package/dist/components/features/media-library/media-library.types.d.ts +50 -12
  229. package/dist/components/features/media-library/partials/media-library-partials.d.ts +4 -4
  230. package/dist/components/features/mentions/hooks/use-mentions.d.ts +16 -1
  231. package/dist/components/features/mentions/partials/mention-inline-suggestions.d.ts +5 -1
  232. package/dist/components/features/mentions/utils/split-html-by-mentions.d.ts +1 -7
  233. package/dist/components/features/overlays/hooks/use-overlay-visibility.d.ts +2 -2
  234. package/dist/components/features/products/components/product-options-matrix.d.ts +1 -1
  235. package/dist/components/features/products/components/product-variant-editor.d.ts +1 -1
  236. package/dist/components/features/products/components/product-variants-manager.d.ts +1 -1
  237. package/dist/components/features/products/products.strings.d.ts +9 -1
  238. package/dist/components/features/products/products.types.d.ts +45 -8
  239. package/dist/components/features/questionnaire/questionnaire.types.d.ts +3 -0
  240. package/dist/components/features/resource/resource.d.ts +6 -2
  241. package/dist/components/features/resource/resource.types.d.ts +14 -1
  242. package/dist/components/features/rich-text-editor/form-rich-text-editor.d.ts +1 -1
  243. package/dist/components/features/rich-text-editor/partials/caret-helpers.d.ts +1 -1
  244. package/dist/components/features/rich-text-editor/partials/editor-field-aria.d.ts +14 -0
  245. package/dist/components/features/rich-text-editor/partials/image-uploads.d.ts +1 -1
  246. package/dist/components/features/rich-text-editor/partials/rich-text-editor-toolbar.d.ts +3 -1
  247. package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +12 -2
  248. package/dist/components/features/rich-text-editor/rich-text-editor.types.d.ts +17 -3
  249. package/dist/components/features/schema-form/hooks/use-schema-form.d.ts +5 -1
  250. package/dist/components/features/schema-form/partials/schema-form-field.d.ts +3 -1
  251. package/dist/components/features/schema-form/schema-form.utils.d.ts +1 -1
  252. package/dist/components/features/suggestions/suggestions.types.d.ts +1 -1
  253. package/dist/components/features/table/data-table.d.ts +1 -1
  254. package/dist/components/features/table/index.d.ts +1 -0
  255. package/dist/components/features/table/partials/resource-cell.d.ts +22 -5
  256. package/dist/components/features/table/table-body.d.ts +1 -1
  257. package/dist/components/features/table/table-helpers.d.ts +6 -3
  258. package/dist/components/features/table/table.strings.d.ts +3 -0
  259. package/dist/components/features/table/table.types.d.ts +18 -2
  260. package/dist/components/layout/app-shell/app-shell.types.d.ts +35 -6
  261. package/dist/components/layout/app-shell/index.d.ts +1 -1
  262. package/dist/components/layout/app-shell/shell-regions.d.ts +27 -0
  263. package/dist/components/layout/app-shell/sidebar-inset-layout.d.ts +1 -1
  264. package/dist/components/layout/app-shell/stacked-layout.d.ts +1 -1
  265. package/dist/components/layout/app-shell/topbar-sidebar-layout.d.ts +1 -1
  266. package/dist/components/layout/containers/two-column-layout.d.ts +2 -0
  267. package/dist/components/layout/header/header.recipes.d.ts +6 -0
  268. package/dist/components/layout/header/header.types.d.ts +9 -8
  269. package/dist/components/layout/layout.types.d.ts +5 -3
  270. package/dist/components/layout/navigation/section-nav/section-nav.d.ts +5 -0
  271. package/dist/components/layout/navigation/side-nav.d.ts +3 -2
  272. package/dist/components/layout/normalize-layout-path.d.ts +1 -0
  273. package/dist/components/layout/page/index.d.ts +2 -1
  274. package/dist/components/layout/page/page.d.ts +1 -0
  275. package/dist/components/layout/page/page.strings.d.ts +11 -0
  276. package/dist/components/layout/page/page.types.d.ts +69 -17
  277. package/dist/components/layout/page/partials/page-header.d.ts +1 -1
  278. package/dist/components/layout/settings/settings.d.ts +10 -3
  279. package/dist/components/layout/sidebar/app-sidebar.d.ts +1 -1
  280. package/dist/components/layout/sidebar/components/sidebar-grouped-navigation.d.ts +1 -1
  281. package/dist/components/layout/sidebar/components/sidebar-navigation.d.ts +1 -1
  282. package/dist/components/layout/sidebar/index.d.ts +2 -1
  283. package/dist/components/layout/sidebar/sidebar-navigation-rail.d.ts +38 -0
  284. package/dist/components/layout/sidebar/sidebar.context.d.ts +6 -7
  285. package/dist/components/layout/sidebar/sidebar.types.d.ts +50 -10
  286. package/dist/components/layout/sidebar/sidebar.utils.d.ts +9 -1
  287. package/dist/components/layout/workspace/workspace.types.d.ts +8 -1
  288. package/dist/components/primitives/link.d.ts +3 -2
  289. package/dist/components/primitives/money.d.ts +1 -1
  290. package/dist/components/primitives/number.d.ts +1 -1
  291. package/dist/components/typography/rich-text/rich-text-tree.d.ts +7 -5
  292. package/dist/components/ui/alert-dialog.d.ts +2 -2
  293. package/dist/components/ui/combobox.d.ts +1 -1
  294. package/dist/components/ui/dialog.d.ts +2 -2
  295. package/dist/components/ui/overlay-layer.d.ts +18 -0
  296. package/dist/components/ui/sheet.d.ts +5 -1
  297. package/dist/components/ui/sidebar-state.d.ts +82 -0
  298. package/dist/components/ui/sidebar.d.ts +5 -17
  299. package/dist/{containers-CRmHf7GP.js → containers-CSdc32h9.js} +26 -18
  300. package/dist/containers-CSdc32h9.js.map +1 -0
  301. package/dist/{control-group-recipes-DBXmfh2E.js → control-group-recipes-fMuFo0H7.js} +6 -6
  302. package/dist/control-group-recipes-fMuFo0H7.js.map +1 -0
  303. package/dist/{copyable-CnGCZdX4.js → copyable-3fdHfMR3.js} +7 -7
  304. package/dist/{copyable-CnGCZdX4.js.map → copyable-3fdHfMR3.js.map} +1 -1
  305. package/dist/{data-display-D4oujtx0.js → data-display-Cmj-xZYl.js} +271 -279
  306. package/dist/data-display-Cmj-xZYl.js.map +1 -0
  307. package/dist/{date-Q7jnXxpk.js → date-Br0FicVv.js} +5 -5
  308. package/dist/{date-Q7jnXxpk.js.map → date-Br0FicVv.js.map} +1 -1
  309. package/dist/date-picker-CyQlFYsP.js +1617 -0
  310. package/dist/date-picker-CyQlFYsP.js.map +1 -0
  311. package/dist/date-pickers-tj2MXmXd.js +185 -0
  312. package/dist/date-pickers-tj2MXmXd.js.map +1 -0
  313. package/dist/{display-BB4BL_-K.js → display-CT_N2a3w.js} +9 -9
  314. package/dist/{display-BB4BL_-K.js.map → display-CT_N2a3w.js.map} +1 -1
  315. package/dist/dropdown-menu-C08iIugv.js +194 -0
  316. package/dist/dropdown-menu-C08iIugv.js.map +1 -0
  317. package/dist/features/activities.js +388 -326
  318. package/dist/features/activities.js.map +1 -1
  319. package/dist/features/ai-chat.js +46 -32
  320. package/dist/features/ai-chat.js.map +1 -1
  321. package/dist/features/appointment-calendar.js +130 -130
  322. package/dist/features/appointment-calendar.js.map +1 -1
  323. package/dist/features/async-preview.js +11 -10
  324. package/dist/features/async-preview.js.map +1 -1
  325. package/dist/features/combobox.js +1 -1
  326. package/dist/features/comments.js +1 -1
  327. package/dist/features/data-view.js +13 -13
  328. package/dist/features/data-view.js.map +1 -1
  329. package/dist/features/email-composer.js +243 -239
  330. package/dist/features/email-composer.js.map +1 -1
  331. package/dist/features/event-calendar.js +197 -199
  332. package/dist/features/event-calendar.js.map +1 -1
  333. package/dist/features/filters.js +2 -2
  334. package/dist/features/global-search.js +168 -143
  335. package/dist/features/global-search.js.map +1 -1
  336. package/dist/features/kanban.js +19 -30
  337. package/dist/features/kanban.js.map +1 -1
  338. package/dist/features/map/style.css +15 -0
  339. package/dist/features/map.js +369 -343
  340. package/dist/features/map.js.map +1 -1
  341. package/dist/features/media-library.js +1202 -975
  342. package/dist/features/media-library.js.map +1 -1
  343. package/dist/features/mentions.js +2 -2
  344. package/dist/features/overlays.js +1 -1
  345. package/dist/features/products.js +1270 -1183
  346. package/dist/features/products.js.map +1 -1
  347. package/dist/features/questionnaire.js +160 -153
  348. package/dist/features/questionnaire.js.map +1 -1
  349. package/dist/features/resource-assignment.js +8 -8
  350. package/dist/features/resource.js +119 -113
  351. package/dist/features/resource.js.map +1 -1
  352. package/dist/features/rich-text-editor.js +28 -19
  353. package/dist/features/rich-text-editor.js.map +1 -1
  354. package/dist/features/schema-form.js +297 -256
  355. package/dist/features/schema-form.js.map +1 -1
  356. package/dist/features/suggestions.js +57 -50
  357. package/dist/features/suggestions.js.map +1 -1
  358. package/dist/features/sync.js +3 -3
  359. package/dist/features/table.js +1 -1
  360. package/dist/features/theme-tweaker.js +470 -470
  361. package/dist/features/theme-tweaker.js.map +1 -1
  362. package/dist/feedback-Dzo1xtAU.js +246 -0
  363. package/dist/feedback-Dzo1xtAU.js.map +1 -0
  364. package/dist/{field-affordance-recipes-DjwGx8eM.js → field-affordance-recipes-D6H7tVJi.js} +5 -5
  365. package/dist/field-affordance-recipes-D6H7tVJi.js.map +1 -0
  366. package/dist/field-control-attributes-B6i335wr.js +18 -0
  367. package/dist/field-control-attributes-B6i335wr.js.map +1 -0
  368. package/dist/{field-state-recipes-BVA2CWHo.js → field-state-recipes-7sza8QbC.js} +4 -2
  369. package/dist/{field-state-recipes-BVA2CWHo.js.map → field-state-recipes-7sza8QbC.js.map} +1 -1
  370. package/dist/filters-Dl80yYtN.js +2415 -0
  371. package/dist/filters-Dl80yYtN.js.map +1 -0
  372. package/dist/form-field-CAPdwdnZ.js +74 -0
  373. package/dist/form-field-CAPdwdnZ.js.map +1 -0
  374. package/dist/{form-sizing-NXgjkmBG.js → form-sizing-CgcrUbLU.js} +5 -5
  375. package/dist/form-sizing-CgcrUbLU.js.map +1 -0
  376. package/dist/{forms-BV5m5aQF.js → forms-B3W8CH7-.js} +17 -13
  377. package/dist/forms-B3W8CH7-.js.map +1 -0
  378. package/dist/forms-numeric-CwjQJe-O.js +991 -0
  379. package/dist/forms-numeric-CwjQJe-O.js.map +1 -0
  380. package/dist/{header-BA697l4a.js → header-ZIIsRKxP.js} +145 -141
  381. package/dist/header-ZIIsRKxP.js.map +1 -0
  382. package/dist/header.recipes-BigdJjw1.js +6 -0
  383. package/dist/header.recipes-BigdJjw1.js.map +1 -0
  384. package/dist/hooks/use-files.d.ts +2 -0
  385. package/dist/{hooks-BQ-L7Uu2.js → hooks-BitHSh-Y.js} +27 -15
  386. package/dist/hooks-BitHSh-Y.js.map +1 -0
  387. package/dist/{icon-badge-COWbCCWu.js → icon-badge-npxF1SLX.js} +4 -4
  388. package/dist/{icon-badge-COWbCCWu.js.map → icon-badge-npxF1SLX.js.map} +1 -1
  389. package/dist/index.js +4 -5
  390. package/dist/{input-Cdw4k0fb.js → input-7KAc7XQL.js} +9 -9
  391. package/dist/{input-Cdw4k0fb.js.map → input-7KAc7XQL.js.map} +1 -1
  392. package/dist/input-DIREVYHs.js +21 -0
  393. package/dist/input-DIREVYHs.js.map +1 -0
  394. package/dist/{interaction-recipes-XR9ZpVYL.js → interaction-recipes-4wZ2tvfb.js} +2 -2
  395. package/dist/{interaction-recipes-XR9ZpVYL.js.map → interaction-recipes-4wZ2tvfb.js.map} +1 -1
  396. package/dist/item-FfWnaYST.js +278 -0
  397. package/dist/item-FfWnaYST.js.map +1 -0
  398. package/dist/layout/app-shell.js +1 -1
  399. package/dist/layout/auth.js +1 -1
  400. package/dist/layout/containers.js +1 -1
  401. package/dist/layout/header.js +1 -1
  402. package/dist/layout/hooks.js +1 -1
  403. package/dist/layout/navigation.js +1 -1
  404. package/dist/layout/page.js +2 -2
  405. package/dist/layout/settings.js +1 -1
  406. package/dist/layout/sidebar.js +3 -3
  407. package/dist/layout/workspace.js +1 -1
  408. package/dist/layout.js +12 -12
  409. package/dist/layout.types-E_GAApzO.js +30 -0
  410. package/dist/layout.types-E_GAApzO.js.map +1 -0
  411. package/dist/lib/affordance-geometry.generated.d.ts +35 -35
  412. package/dist/lib/control-group-recipes.d.ts +5 -5
  413. package/dist/lib/field-affordance-recipes.d.ts +2 -2
  414. package/dist/lib/field-control-attributes.d.ts +11 -0
  415. package/dist/lib/field-state-recipes.d.ts +2 -0
  416. package/dist/lib/format.d.ts +1 -0
  417. package/dist/lib/motion-recipes.d.ts +3 -0
  418. package/dist/lib/navigation-row-recipes.d.ts +7 -7
  419. package/dist/lib/overlay-anatomy-recipes.d.ts +3 -3
  420. package/dist/lib/portal-recipes.d.ts +3 -0
  421. package/dist/lib/surface-recipes.d.ts +1 -1
  422. package/dist/lib/token-merge.generated.d.ts +18 -15
  423. package/dist/lib/utils.js +1 -1
  424. package/dist/map-demo-tile.svg +1 -1
  425. package/dist/{media-gallery-CSl5W1Fy.js → media-gallery-C81DAnKI.js} +6 -6
  426. package/dist/{media-gallery-CSl5W1Fy.js.map → media-gallery-C81DAnKI.js.map} +1 -1
  427. package/dist/{mentions-RKOQaaIB.js → mentions-qOnedSt4.js} +237 -168
  428. package/dist/mentions-qOnedSt4.js.map +1 -0
  429. package/dist/message-BJHnn43M.js +135 -0
  430. package/dist/message-BJHnn43M.js.map +1 -0
  431. package/dist/{metadata-list-qVV7AVxa.js → metadata-list-XkqZ_UXH.js} +64 -64
  432. package/dist/metadata-list-XkqZ_UXH.js.map +1 -0
  433. package/dist/{motion-recipes-ChBg4HBq.js → motion-recipes-DitYv6P2.js} +10 -2
  434. package/dist/motion-recipes-DitYv6P2.js.map +1 -0
  435. package/dist/navigation-BgtPJAhi.js +288 -0
  436. package/dist/navigation-BgtPJAhi.js.map +1 -0
  437. package/dist/navigation-Bt-v7rWP.js +261 -0
  438. package/dist/navigation-Bt-v7rWP.js.map +1 -0
  439. package/dist/{navigation-row-recipes-WZEs-hYo.js → navigation-row-recipes-BGVLvU_O.js} +9 -9
  440. package/dist/navigation-row-recipes-BGVLvU_O.js.map +1 -0
  441. package/dist/normalize-layout-path-BmEgg6fu.js +14 -0
  442. package/dist/normalize-layout-path-BmEgg6fu.js.map +1 -0
  443. package/dist/{number-E_OiIfJz.js → number-CYqBcrSj.js} +79 -87
  444. package/dist/number-CYqBcrSj.js.map +1 -0
  445. package/dist/overflow-tab-bar-BQCA2Zn2.js +172 -0
  446. package/dist/overflow-tab-bar-BQCA2Zn2.js.map +1 -0
  447. package/dist/overlays-CC8zI3Du.js +1017 -0
  448. package/dist/overlays-CC8zI3Du.js.map +1 -0
  449. package/dist/page-BoQ1VaFJ.js +331 -0
  450. package/dist/page-BoQ1VaFJ.js.map +1 -0
  451. package/dist/page-header-commands-DIKspJfx.js +193 -0
  452. package/dist/page-header-commands-DIKspJfx.js.map +1 -0
  453. package/dist/{pagination-Ch8X_47u.js → pagination-Br8TdV9A.js} +7 -7
  454. package/dist/{pagination-Ch8X_47u.js.map → pagination-Br8TdV9A.js.map} +1 -1
  455. package/dist/popover-k8TdUcAt.js +201 -0
  456. package/dist/popover-k8TdUcAt.js.map +1 -0
  457. package/dist/{popover-menu-BYaCdFhf.js → popover-menu-yn-o0kyA.js} +7 -7
  458. package/dist/{popover-menu-BYaCdFhf.js.map → popover-menu-yn-o0kyA.js.map} +1 -1
  459. package/dist/{popover.recipes-D3j8R8Yp.js → popover.recipes-DJ0AkUan.js} +19 -12
  460. package/dist/popover.recipes-DJ0AkUan.js.map +1 -0
  461. package/dist/portal-recipes-DyUXqUtD.js +9 -0
  462. package/dist/portal-recipes-DyUXqUtD.js.map +1 -0
  463. package/dist/{primitives-Du64iDbb.js → primitives-BkkQjYl7.js} +23 -18
  464. package/dist/primitives-BkkQjYl7.js.map +1 -0
  465. package/dist/primitives.js +4 -4
  466. package/dist/{progress-BvF2oCdV.js → progress-DZFXXzPs.js} +9 -9
  467. package/dist/{progress-BvF2oCdV.js.map → progress-DZFXXzPs.js.map} +1 -1
  468. package/dist/{receipt-D789Jwyy.js → receipt-C7LhOg7Q.js} +7 -7
  469. package/dist/receipt-C7LhOg7Q.js.map +1 -0
  470. package/dist/rich-text-BnTzZjIo.js +45 -0
  471. package/dist/rich-text-BnTzZjIo.js.map +1 -0
  472. package/dist/{rich-text-editor-Cm1dpUpQ.js → rich-text-editor-CAurDwT5.js} +501 -424
  473. package/dist/rich-text-editor-CAurDwT5.js.map +1 -0
  474. package/dist/rich-text-editor-toolbar-DbXig7Jk.js +99 -0
  475. package/dist/rich-text-editor-toolbar-DbXig7Jk.js.map +1 -0
  476. package/dist/rich-text-tree-BqyQ_7-R.js +66 -0
  477. package/dist/rich-text-tree-BqyQ_7-R.js.map +1 -0
  478. package/dist/{sanitize-html-DsQmI48u.js → sanitize-html-BWkH4dLM.js} +29 -16
  479. package/dist/sanitize-html-BWkH4dLM.js.map +1 -0
  480. package/dist/{scroll-area-La5RXsEk.js → scroll-area-Bj6CRUif.js} +2 -2
  481. package/dist/{scroll-area-La5RXsEk.js.map → scroll-area-Bj6CRUif.js.map} +1 -1
  482. package/dist/{separator-DAEV0w65.js → separator-B9ewiCGO.js} +2 -2
  483. package/dist/{separator-DAEV0w65.js.map → separator-B9ewiCGO.js.map} +1 -1
  484. package/dist/{separator-GNfPG-90.js → separator-DM6gs2vu.js} +3 -3
  485. package/dist/{separator-GNfPG-90.js.map → separator-DM6gs2vu.js.map} +1 -1
  486. package/dist/services/actions.js +1 -1
  487. package/dist/settings-DZPHgpx4.js +155 -0
  488. package/dist/settings-DZPHgpx4.js.map +1 -0
  489. package/dist/sheet-C4DHsgLk.js +250 -0
  490. package/dist/sheet-C4DHsgLk.js.map +1 -0
  491. package/dist/sidebar-C8BnDwTH.js +709 -0
  492. package/dist/sidebar-C8BnDwTH.js.map +1 -0
  493. package/dist/sidebar-CmD6a-HK.js +1004 -0
  494. package/dist/sidebar-CmD6a-HK.js.map +1 -0
  495. package/dist/skeleton-DDgdhmu9.js +265 -0
  496. package/dist/skeleton-DDgdhmu9.js.map +1 -0
  497. package/dist/smart-card-B6vLxqa_.js +617 -0
  498. package/dist/smart-card-B6vLxqa_.js.map +1 -0
  499. package/dist/{structure-C0V0_Fyf.js → structure-DZJ2wbAU.js} +2 -2
  500. package/dist/{structure-C0V0_Fyf.js.map → structure-DZJ2wbAU.js.map} +1 -1
  501. package/dist/style.css +1 -1
  502. package/dist/{surface-recipes-BKRVW8Os.js → surface-recipes-C8mNycaY.js} +2 -2
  503. package/dist/{surface-recipes-BKRVW8Os.js.map → surface-recipes-C8mNycaY.js.map} +1 -1
  504. package/dist/{table-DH7rozUv.js → table-CBonSdTp.js} +573 -519
  505. package/dist/table-CBonSdTp.js.map +1 -0
  506. package/dist/{table-CpvnzJn9.js → table-CXSPHH25.js} +75 -71
  507. package/dist/table-CXSPHH25.js.map +1 -0
  508. package/dist/tabs-C4Kr_hCr.js +192 -0
  509. package/dist/tabs-C4Kr_hCr.js.map +1 -0
  510. package/dist/{text-inputs-DXItiR0O.js → text-inputs-jdkS3ReG.js} +18 -18
  511. package/dist/text-inputs-jdkS3ReG.js.map +1 -0
  512. package/dist/theme.css +40 -37
  513. package/dist/{timelines-DmtztAY_.js → timelines-CoPwdJP0.js} +13 -12
  514. package/dist/timelines-CoPwdJP0.js.map +1 -0
  515. package/dist/tooltip-31NwIpTo.js +113 -0
  516. package/dist/tooltip-31NwIpTo.js.map +1 -0
  517. package/dist/{tree-CV11PURP.js → tree-CeYVzdFE.js} +9 -9
  518. package/dist/{tree-CV11PURP.js.map → tree-CeYVzdFE.js.map} +1 -1
  519. package/dist/typography/rich-text.js +1 -1
  520. package/dist/{typography-CSyJrh28.js → typography-C7-YMW1S.js} +12 -12
  521. package/dist/{typography-CSyJrh28.js.map → typography-C7-YMW1S.js.map} +1 -1
  522. package/dist/typography.js +1 -1
  523. package/dist/ui-provider-C-74NVLc.js +178 -0
  524. package/dist/ui-provider-C-74NVLc.js.map +1 -0
  525. package/dist/ui-provider.js +2 -3
  526. package/dist/{upload-C9SA0X-8.js → upload-Hdm5gObf.js} +309 -296
  527. package/dist/upload-Hdm5gObf.js.map +1 -0
  528. package/dist/{upload-queue-DhQJiSRc.js → upload-queue-D0sYPuqo.js} +16 -14
  529. package/dist/upload-queue-D0sYPuqo.js.map +1 -0
  530. package/dist/{usage-card-DVTRDmGz.js → usage-card-9s8hLDfn.js} +24 -17
  531. package/dist/usage-card-9s8hLDfn.js.map +1 -0
  532. package/dist/{utils-CF3c95Io.js → utils-DhuoqFy4.js} +255 -165
  533. package/dist/utils-DhuoqFy4.js.map +1 -0
  534. package/dist/value-inputs-D3aPgq9H.js +980 -0
  535. package/dist/value-inputs-D3aPgq9H.js.map +1 -0
  536. package/dist/{value-typography-ClupF0Gz.js → value-typography-uSzzG9Gf.js} +32 -26
  537. package/dist/value-typography-uSzzG9Gf.js.map +1 -0
  538. package/dist/{workspace-9EFVXUyk.js → workspace-CC8Vchiu.js} +51 -50
  539. package/dist/workspace-CC8Vchiu.js.map +1 -0
  540. package/docs/consumer-skill/SKILL.md +4 -3
  541. package/docs/consumer-skill/agents/themelia-ui-designer.md +96 -0
  542. package/docs/consumer-skill/examples/app-layout.tsx +52 -1
  543. package/docs/consumer-skill/examples/commerce-lines.tsx +271 -0
  544. package/docs/consumer-skill/examples/custom-composition.tsx +21 -0
  545. package/docs/consumer-skill/examples/detail.tsx +5 -4
  546. package/docs/consumer-skill/examples/edit.tsx +3 -3
  547. package/docs/consumer-skill/examples/editable-sections.tsx +38 -0
  548. package/docs/consumer-skill/examples/index-table.tsx +4 -4
  549. package/docs/consumer-skill/examples/manifest.json +38 -1
  550. package/docs/consumer-skill/examples/product-media.tsx +41 -0
  551. package/docs/consumer-skill/examples/product-parts.tsx +81 -0
  552. package/docs/consumer-skill/examples/rhf-edit-page.tsx +1 -1
  553. package/docs/consumer-skill/examples/rhf-overlay-form.tsx +24 -11
  554. package/docs/consumer-skill/examples/token-domain-structure.tsx +68 -0
  555. package/docs/consumer-skill/references/agents-md.md +21 -19
  556. package/docs/consumer-skill/references/analytics.md +33 -1
  557. package/docs/consumer-skill/references/commerce-composition.md +97 -0
  558. package/docs/consumer-skill/references/component-contracts.json +21249 -14205
  559. package/docs/consumer-skill/references/composition-mapping.md +17 -3
  560. package/docs/consumer-skill/references/composition.md +177 -32
  561. package/docs/consumer-skill/references/critique-rubric.md +98 -0
  562. package/docs/consumer-skill/references/custom-composition.md +261 -0
  563. package/docs/consumer-skill/references/data-reading.md +79 -0
  564. package/docs/consumer-skill/references/design-contract.md +12 -9
  565. package/docs/consumer-skill/references/discovery.md +27 -3
  566. package/docs/consumer-skill/references/domain-structures.md +124 -0
  567. package/docs/consumer-skill/references/installation.md +62 -8
  568. package/docs/consumer-skill/references/integration.md +59 -1
  569. package/docs/consumer-skill/references/product-composition.md +94 -0
  570. package/docs/consumer-skill/references/public-api.json +3044 -445
  571. package/docs/consumer-skill/references/review.md +87 -10
  572. package/docs/consumer-skill/references/rhf-workflows.md +79 -0
  573. package/docs/consumer-skill/references/screen-archetypes.md +19 -7
  574. package/docs/consumer-skill/references/screen-decisions.md +126 -0
  575. package/docs/consumer-skill/references/theming.md +24 -20
  576. package/docs/consumer-skill/references/tokens.json +9 -9
  577. package/docs/consumer-skill/references/view-craft.md +153 -0
  578. package/docs/consumer-skill/references/view-spec.md +73 -0
  579. package/docs/consumer-skill/references/workflows.md +7 -1
  580. package/docs/consumer-skill/scripts/composition-policy.mjs +176 -26
  581. package/docs/consumer-skill/scripts/composition-schema.mjs +1 -1
  582. package/docs/consumer-skill/scripts/composition.mjs +61 -5
  583. package/docs/consumer-skill/scripts/discovery.mjs +54 -0
  584. package/docs/consumer-skill/scripts/inspect-component.mjs +1 -1
  585. package/docs/consumer-skill/scripts/inspection.mjs +73 -18
  586. package/docs/consumer-skill/scripts/setup-skills.mjs +79 -7
  587. package/docs/consumer-skill/scripts/surface-policy.mjs +5 -5
  588. package/docs/consumer-skills/themelia-components/SKILL.md +14 -13
  589. package/docs/consumer-skills/themelia-composition/SKILL.md +16 -17
  590. package/docs/consumer-skills/themelia-design/SKILL.md +55 -0
  591. package/docs/consumer-skills/themelia-foundation/SKILL.md +2 -1
  592. package/docs/consumer-skills/themelia-tokenization/SKILL.md +24 -17
  593. package/package.json +4 -2
  594. package/templates/admin-shell-template.tsx +1 -2
  595. package/templates/customers-template.tsx +18 -16
  596. package/dist/accordion-96o0pN62.js.map +0 -1
  597. package/dist/action-menu-CHgs8vmj.js.map +0 -1
  598. package/dist/affordance-geometry.generated-B8yGOr8-.js.map +0 -1
  599. package/dist/ai-artifact-BZUGwBq6.js.map +0 -1
  600. package/dist/app-shell-D63ATkIK.js +0 -237
  601. package/dist/app-shell-D63ATkIK.js.map +0 -1
  602. package/dist/auth-D2FVZ1MH.js.map +0 -1
  603. package/dist/avatar-DWO_HHhB.js.map +0 -1
  604. package/dist/base/cascader.js.map +0 -1
  605. package/dist/batch-action-bar-CdfIkCsV.js.map +0 -1
  606. package/dist/breadcrumbs-B-WFKecD.js.map +0 -1
  607. package/dist/button-DkmK-z8E.js.map +0 -1
  608. package/dist/buttons-BbfzgczK.js.map +0 -1
  609. package/dist/cards-4JTWqvVe.js +0 -68
  610. package/dist/cards-4JTWqvVe.js.map +0 -1
  611. package/dist/chart-C19flDQb.js +0 -155
  612. package/dist/chart-C19flDQb.js.map +0 -1
  613. package/dist/choice-inputs-JLtij2y4.js +0 -776
  614. package/dist/choice-inputs-JLtij2y4.js.map +0 -1
  615. package/dist/code-block-CGNaUtAE.js.map +0 -1
  616. package/dist/combobox-CBJDs6w_.js +0 -877
  617. package/dist/combobox-CBJDs6w_.js.map +0 -1
  618. package/dist/combobox-hbhSS18O.js +0 -355
  619. package/dist/combobox-hbhSS18O.js.map +0 -1
  620. package/dist/command-D8NrBj-b.js.map +0 -1
  621. package/dist/comments-Di4w0H_S.js.map +0 -1
  622. package/dist/containers-CRmHf7GP.js.map +0 -1
  623. package/dist/control-group-recipes-DBXmfh2E.js.map +0 -1
  624. package/dist/data-display-D4oujtx0.js.map +0 -1
  625. package/dist/date-picker-zOt1oNss.js +0 -1542
  626. package/dist/date-picker-zOt1oNss.js.map +0 -1
  627. package/dist/date-pickers-cj8IXbDC.js +0 -179
  628. package/dist/date-pickers-cj8IXbDC.js.map +0 -1
  629. package/dist/dropdown-menu-CjY8Vt7W.js +0 -193
  630. package/dist/dropdown-menu-CjY8Vt7W.js.map +0 -1
  631. package/dist/feedback-DZNL5Lg1.js +0 -239
  632. package/dist/feedback-DZNL5Lg1.js.map +0 -1
  633. package/dist/field-affordance-recipes-DjwGx8eM.js.map +0 -1
  634. package/dist/filters-BcT-uoFy.js +0 -2209
  635. package/dist/filters-BcT-uoFy.js.map +0 -1
  636. package/dist/form-field-CsgRmdit.js +0 -63
  637. package/dist/form-field-CsgRmdit.js.map +0 -1
  638. package/dist/form-sizing-NXgjkmBG.js.map +0 -1
  639. package/dist/forms-BV5m5aQF.js.map +0 -1
  640. package/dist/forms-numeric-Cd33AKbD.js +0 -906
  641. package/dist/forms-numeric-Cd33AKbD.js.map +0 -1
  642. package/dist/header-BA697l4a.js.map +0 -1
  643. package/dist/hooks-BQ-L7Uu2.js.map +0 -1
  644. package/dist/input-DOPL5_QE.js +0 -21
  645. package/dist/input-DOPL5_QE.js.map +0 -1
  646. package/dist/item-BvZ2DR_x.js +0 -277
  647. package/dist/item-BvZ2DR_x.js.map +0 -1
  648. package/dist/layout.types-Cn7aUzJp.js +0 -20
  649. package/dist/layout.types-Cn7aUzJp.js.map +0 -1
  650. package/dist/mentions-RKOQaaIB.js.map +0 -1
  651. package/dist/message-INU2xsxu.js +0 -128
  652. package/dist/message-INU2xsxu.js.map +0 -1
  653. package/dist/metadata-list-qVV7AVxa.js.map +0 -1
  654. package/dist/motion-recipes-ChBg4HBq.js.map +0 -1
  655. package/dist/navigation-BQNcg1jT.js +0 -269
  656. package/dist/navigation-BQNcg1jT.js.map +0 -1
  657. package/dist/navigation-DLF3E1IC.js +0 -145
  658. package/dist/navigation-DLF3E1IC.js.map +0 -1
  659. package/dist/navigation-row-recipes-WZEs-hYo.js.map +0 -1
  660. package/dist/number-E_OiIfJz.js.map +0 -1
  661. package/dist/overflow-tab-bar-CrbqMteP.js +0 -284
  662. package/dist/overflow-tab-bar-CrbqMteP.js.map +0 -1
  663. package/dist/overlays-BlKynmde.js +0 -1004
  664. package/dist/overlays-BlKynmde.js.map +0 -1
  665. package/dist/page-CIwNUtGr.js +0 -227
  666. package/dist/page-CIwNUtGr.js.map +0 -1
  667. package/dist/page-header-commands-DFMlNYzN.js +0 -128
  668. package/dist/page-header-commands-DFMlNYzN.js.map +0 -1
  669. package/dist/popover-uwzX2vo7.js +0 -198
  670. package/dist/popover-uwzX2vo7.js.map +0 -1
  671. package/dist/popover.recipes-D3j8R8Yp.js.map +0 -1
  672. package/dist/primitives-Du64iDbb.js.map +0 -1
  673. package/dist/receipt-D789Jwyy.js.map +0 -1
  674. package/dist/rich-text-CLJEf76s.js +0 -78
  675. package/dist/rich-text-CLJEf76s.js.map +0 -1
  676. package/dist/rich-text-editor-Cm1dpUpQ.js.map +0 -1
  677. package/dist/rich-text-editor-toolbar-L__e4x47.js +0 -94
  678. package/dist/rich-text-editor-toolbar-L__e4x47.js.map +0 -1
  679. package/dist/safe-image-src-C6kQSMBZ.js +0 -17
  680. package/dist/safe-image-src-C6kQSMBZ.js.map +0 -1
  681. package/dist/sanitize-html-DsQmI48u.js.map +0 -1
  682. package/dist/settings-BA2iboic.js +0 -174
  683. package/dist/settings-BA2iboic.js.map +0 -1
  684. package/dist/sheet-DoAxTb2J.js +0 -213
  685. package/dist/sheet-DoAxTb2J.js.map +0 -1
  686. package/dist/sidebar-ByqKR_W5.js +0 -512
  687. package/dist/sidebar-ByqKR_W5.js.map +0 -1
  688. package/dist/sidebar-D2iSnGJ7.js +0 -619
  689. package/dist/sidebar-D2iSnGJ7.js.map +0 -1
  690. package/dist/skeleton-CUj8O5Bd.js +0 -264
  691. package/dist/skeleton-CUj8O5Bd.js.map +0 -1
  692. package/dist/smart-card-CqkzQsK-.js +0 -614
  693. package/dist/smart-card-CqkzQsK-.js.map +0 -1
  694. package/dist/table-CpvnzJn9.js.map +0 -1
  695. package/dist/table-DH7rozUv.js.map +0 -1
  696. package/dist/tabs-eqVsJZWO.js +0 -191
  697. package/dist/tabs-eqVsJZWO.js.map +0 -1
  698. package/dist/text-inputs-DXItiR0O.js.map +0 -1
  699. package/dist/theme-scope-BJ6eE2xt.js +0 -50
  700. package/dist/theme-scope-BJ6eE2xt.js.map +0 -1
  701. package/dist/timelines-DmtztAY_.js.map +0 -1
  702. package/dist/tooltip-B4hjKtoV.js +0 -111
  703. package/dist/tooltip-B4hjKtoV.js.map +0 -1
  704. package/dist/ui-provider-CQCuCBcy.js +0 -136
  705. package/dist/ui-provider-CQCuCBcy.js.map +0 -1
  706. package/dist/upload-C9SA0X-8.js.map +0 -1
  707. package/dist/upload-queue-DhQJiSRc.js.map +0 -1
  708. package/dist/usage-card-DVTRDmGz.js.map +0 -1
  709. package/dist/use-mobile-vaLKwgyf.js +0 -15
  710. package/dist/use-mobile-vaLKwgyf.js.map +0 -1
  711. package/dist/utils-CF3c95Io.js.map +0 -1
  712. package/dist/value-inputs-C0o70p-U.js +0 -980
  713. package/dist/value-inputs-C0o70p-U.js.map +0 -1
  714. package/dist/value-typography-ClupF0Gz.js.map +0 -1
  715. package/dist/workspace-9EFVXUyk.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"schema-form.js","names":["Text","copyRoleProps","Stack","Card","compositionRhythm","Input","FormField","Textarea","ToggleField","CardCheckboxGroup","Select","SwitchCard","CardRadioGroup","ContentBlock","TagsInput","DecimalInput","EmptyState","SCHEMA_FORM_COLUMNS","SCHEMA_FORM_FIELD_WIDTH","isFieldHidden","field","values","error","onError","isFieldDisabled","getVisibleFields","fields","resolveSchemaSections","visibleFields","schema","fieldsByKey","usedKeys","sections","section","sectionFields","key","defaultColumns","unsectioned","defaultSectionTitle","toStringValue","value","toStringArray","item","toBooleanValue","parseNumberValue","trimmed","rawValue","parsed","integer","formatJsonValue","indent","parseJsonValue","getDefaultValues","defaultValue","shouldRequireValue","normalizeErrors","next","message","errors","useSchemaForm","externalErrors","isControlled","initialValues","useMemo","internalValues","setInternalValues","useState","validationErrors","setValidationErrors","mergedErrors","setValues","useCallback","nextValues","onValueChange","setFieldValue","fieldValue","current","onFieldChange","reset","validate","nextErrors","formatRequiredError","validators","validator","result","validationError","SchemaFormActions","cn","className","showReset","Button","disabled","resetDisabled","submitting","onReset","resetLabel","submitDisabled","submitLabel","SchemaFormEmpty","getFieldHint","getTextDisplayValue","parseTextValue","parseNumberFieldValue","parseJsonFieldValue","optionIconNode","option","Icon","JsonFieldControl","text","setText","parseError","setParseError","isFocused","setIsFocused","useEffect","commit","strings","fieldId","event","SchemaFormFieldRenderer","fieldType","commonFieldProps","controlClassName","describedBy","checked","displayValue","decimalPlaces","options","inputType","nativeInputProps","defaultSchemaFormStrings","label","toDomId","SectionHeading","SchemaForm","stringsProp","generatedId","useId","formId","id","useStrings","form","columns","hasFields","helpers","shouldShowActions","showActions","onSubmit","actionsSlot","resolvedSubmitLabel","resolvedResetLabel","renderFieldNode","fieldDisabled","context","nextValue","defaultField","fieldClassName","renderField","renderSectionFields","renderPlainSection","custom","renderSection","sectionClassName","Fragment","renderCardSection","actions","empty","emptySlot","layout","contentClassName","title","description","headerSlot","footerSlot"],"sources":["../../src/components/features/schema-form/schema-form.utils.ts","../../src/components/features/schema-form/hooks/use-schema-form.ts","../../src/components/features/schema-form/partials/schema-form-actions.tsx","../../src/components/features/schema-form/partials/schema-form-empty.tsx","../../src/components/features/schema-form/partials/schema-form-field.tsx","../../src/components/features/schema-form/schema-form.strings.ts","../../src/components/features/schema-form/schema-form.tsx"],"sourcesContent":["import type {\n\tResolvedSchemaFormSection,\n\tSchemaFormField,\n\tSchemaFormFieldWidth,\n\tSchemaFormSchema,\n\tSchemaFormValue,\n\tSchemaFormValues,\n} from './schema-form.types';\n\ntype SchemaFormErrorHandler = (error: unknown) => void;\n\n/*\n * Container widths, not viewport widths — a schema form is as often rendered in\n * a drawer or a side panel as at page width, and keyed to the screen it kept\n * three field columns inside a 320px drawer. 448/576 clears every width these\n * forms render at today (672-814px) while collapsing below a real drawer.\n */\nexport const SCHEMA_FORM_COLUMNS: Record<1 | 2 | 3, string> = {\n\t1: 'grid grid-cols-1 gap-space-xl',\n\t2: 'grid grid-cols-1 gap-space-xl @md/schema-form:grid-cols-2',\n\t3: 'grid grid-cols-1 gap-space-xl @md/schema-form:grid-cols-2 @xl/schema-form:grid-cols-3',\n};\n\nexport const SCHEMA_FORM_FIELD_WIDTH: Record<SchemaFormFieldWidth, string> = {\n\tauto: '',\n\thalf: '@md/schema-form:col-span-1',\n\tthird: '@xl/schema-form:col-span-1',\n\tfull: '@md/schema-form:col-span-full @xl/schema-form:col-span-full',\n};\n\nexport function isFieldHidden(\n\tfield: SchemaFormField,\n\tvalues: SchemaFormValues,\n\tonError?: SchemaFormErrorHandler,\n): boolean {\n\tif (typeof field.hidden === 'function') {\n\t\ttry {\n\t\t\treturn field.hidden(values);\n\t\t} catch (error) {\n\t\t\tonError?.(error);\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn field.hidden ?? false;\n}\n\nexport function isFieldDisabled(\n\tfield: SchemaFormField,\n\tvalues: SchemaFormValues,\n\tonError?: SchemaFormErrorHandler,\n): boolean {\n\tif (typeof field.disabled === 'function') {\n\t\ttry {\n\t\t\treturn field.disabled(values);\n\t\t} catch (error) {\n\t\t\tonError?.(error);\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn field.disabled ?? false;\n}\n\nexport function getVisibleFields(\n\tfields: SchemaFormField[],\n\tvalues: SchemaFormValues,\n\tonError?: SchemaFormErrorHandler,\n): SchemaFormField[] {\n\treturn fields.filter((field) => !isFieldHidden(field, values, onError));\n}\n\nexport function resolveSchemaSections(\n\tschema: SchemaFormSchema,\n\tvalues: SchemaFormValues,\n\tdefaultSectionTitle: string,\n\tdefaultColumns: 1 | 2 | 3,\n\tonError?: SchemaFormErrorHandler,\n): ResolvedSchemaFormSection[] {\n\tconst visibleFields = getVisibleFields(schema.fields, values, onError);\n\tconst fieldsByKey = new Map(visibleFields.map((field) => [field.key, field]));\n\tconst usedKeys = new Set<string>();\n\tconst sections: ResolvedSchemaFormSection[] = [];\n\n\tfor (const section of schema.sections ?? []) {\n\t\tconst sectionFields = section.fields\n\t\t\t? section.fields\n\t\t\t\t\t.map((key) => fieldsByKey.get(key))\n\t\t\t\t\t.filter((field): field is SchemaFormField => field !== undefined)\n\t\t\t: visibleFields.filter((field) => field.sectionId === section.id);\n\n\t\tfor (const field of sectionFields) {\n\t\t\tusedKeys.add(field.key);\n\t\t}\n\n\t\tsections.push({\n\t\t\tid: section.id,\n\t\t\ttitle: section.title,\n\t\t\tdescription: section.description,\n\t\t\ticon: section.icon,\n\t\t\tfields: sectionFields,\n\t\t\tcolumns: section.columns ?? defaultColumns,\n\t\t\tfooterSlot: section.footerSlot,\n\t\t\tclassName: section.className,\n\t\t});\n\t}\n\n\tconst unsectioned = visibleFields.filter((field) => !usedKeys.has(field.key));\n\tif (unsectioned.length > 0 || sections.length === 0) {\n\t\tsections.unshift({\n\t\t\tid: 'default',\n\t\t\ttitle: schema.sections?.length ? defaultSectionTitle : undefined,\n\t\t\tfields: unsectioned,\n\t\t\tcolumns: defaultColumns,\n\t\t});\n\t}\n\n\treturn sections.filter((section) => section.fields.length > 0);\n}\n\nexport function toStringValue(value: SchemaFormValue): string {\n\tif (value === undefined || value === null) return '';\n\tif (typeof value === 'string') return value;\n\tif (typeof value === 'number' || typeof value === 'boolean') return String(value);\n\treturn JSON.stringify(value);\n}\n\nexport function toStringArray(value: SchemaFormValue): string[] {\n\tif (!Array.isArray(value)) return [];\n\treturn value.map((item) => String(item));\n}\n\nexport function toBooleanValue(value: SchemaFormValue): boolean {\n\treturn value === true || value === 'true' || value === 1;\n}\n\nexport function parseNumberValue(rawValue: string, integer = false): number | null {\n\tconst trimmed = rawValue.trim();\n\tif (trimmed.length === 0) return null;\n\tconst parsed = integer ? Number.parseInt(trimmed, 10) : Number.parseFloat(trimmed);\n\treturn Number.isNaN(parsed) ? null : parsed;\n}\n\nexport function formatJsonValue(value: SchemaFormValue, indent = 2): string {\n\tif (value === undefined || value === null) return '';\n\tif (typeof value === 'string') return value;\n\ttry {\n\t\treturn JSON.stringify(value, null, indent);\n\t} catch {\n\t\treturn String(value);\n\t}\n}\n\nexport function parseJsonValue(rawValue: string): { value: SchemaFormValue; valid: boolean } {\n\tconst trimmed = rawValue.trim();\n\tif (trimmed.length === 0) return { value: null, valid: true };\n\n\ttry {\n\t\treturn { value: JSON.parse(trimmed) as SchemaFormValue, valid: true };\n\t} catch {\n\t\treturn { value: rawValue, valid: false };\n\t}\n}\n","import { useCallback, useMemo, useState } from 'react';\n\nimport type {\n\tSchemaFormErrors,\n\tSchemaFormField,\n\tSchemaFormSubmitHelpers,\n\tSchemaFormValue,\n\tSchemaFormValues,\n} from '../schema-form.types';\nimport { isFieldHidden } from '../schema-form.utils';\n\nexport interface UseSchemaFormOptions {\n\tfields: SchemaFormField[];\n\tvalue?: SchemaFormValues;\n\tdefaultValue?: SchemaFormValues;\n\terrors?: SchemaFormErrors;\n\tonValueChange?: (values: SchemaFormValues) => void;\n\tonFieldChange?: (key: string, value: SchemaFormValue, values: SchemaFormValues) => void;\n\tformatRequiredError: (label: string) => string;\n\tvalidationError: string;\n\tonError?: (error: unknown) => void;\n}\n\nexport interface UseSchemaFormResult extends SchemaFormSubmitHelpers {\n\tvalues: SchemaFormValues;\n\terrors: SchemaFormErrors;\n\tgetFieldError: (key: string) => string | undefined;\n\tgetFieldValue: (key: string) => SchemaFormValue;\n\tsetFieldValue: (key: string, value: SchemaFormValue) => void;\n\tsetValues: (values: SchemaFormValues) => void;\n\treset: () => SchemaFormValues;\n\tvalidate: () => boolean;\n}\n\nfunction getDefaultValues(fields: SchemaFormField[], defaultValue?: SchemaFormValues): SchemaFormValues {\n\tconst values: SchemaFormValues = { ...defaultValue };\n\n\tfor (const field of fields) {\n\t\tif (field.defaultValue !== undefined && values[field.key] === undefined) {\n\t\t\tvalues[field.key] = field.defaultValue;\n\t\t}\n\t}\n\n\treturn values;\n}\n\nfunction shouldRequireValue(value: SchemaFormValue): boolean {\n\tif (value === undefined || value === null) return true;\n\tif (typeof value === 'string') return value.trim().length === 0;\n\tif (Array.isArray(value)) return value.length === 0;\n\treturn false;\n}\n\nfunction normalizeErrors(errors?: SchemaFormErrors): SchemaFormErrors {\n\tconst next: SchemaFormErrors = {};\n\tfor (const [key, message] of Object.entries(errors ?? {})) {\n\t\tif (message) next[key] = message;\n\t}\n\treturn next;\n}\n\nexport function useSchemaForm({\n\tfields,\n\tvalue,\n\tdefaultValue,\n\terrors: externalErrors,\n\tonValueChange,\n\tonFieldChange,\n\tformatRequiredError,\n\tvalidationError,\n\tonError,\n}: UseSchemaFormOptions): UseSchemaFormResult {\n\tconst isControlled = value !== undefined;\n\tconst initialValues = useMemo(\n\t\t() => getDefaultValues(fields, defaultValue),\n\t\t[defaultValue, fields],\n\t);\n\tconst [internalValues, setInternalValues] = useState<SchemaFormValues>(() => initialValues);\n\tconst [validationErrors, setValidationErrors] = useState<SchemaFormErrors>({});\n\tconst values = useMemo(\n\t\t() => (isControlled ? { ...initialValues, ...value } : internalValues),\n\t\t[initialValues, internalValues, isControlled, value],\n\t);\n\n\tconst mergedErrors = useMemo(\n\t\t() => ({\n\t\t\t...validationErrors,\n\t\t\t...normalizeErrors(externalErrors),\n\t\t}),\n\t\t[externalErrors, validationErrors],\n\t);\n\n\tconst setValues = useCallback(\n\t\t(nextValues: SchemaFormValues) => {\n\t\t\tif (!isControlled) setInternalValues(nextValues);\n\t\t\tonValueChange?.(nextValues);\n\t\t},\n\t\t[isControlled, onValueChange],\n\t);\n\n\tconst setFieldValue = useCallback(\n\t\t(key: string, fieldValue: SchemaFormValue) => {\n\t\t\tconst nextValues = { ...values, [key]: fieldValue };\n\t\t\tif (!isControlled) setInternalValues(nextValues);\n\t\t\tsetValidationErrors((current) => {\n\t\t\t\tif (!current[key]) return current;\n\t\t\t\tconst next = { ...current };\n\t\t\t\tdelete next[key];\n\t\t\t\treturn next;\n\t\t\t});\n\t\t\tonFieldChange?.(key, fieldValue, nextValues);\n\t\t\tonValueChange?.(nextValues);\n\t\t},\n\t\t[isControlled, onFieldChange, onValueChange, values],\n\t);\n\n\tconst reset = useCallback(() => {\n\t\tconst nextValues = getDefaultValues(fields, defaultValue);\n\t\tif (!isControlled) setInternalValues(nextValues);\n\t\tsetValidationErrors({});\n\t\tonValueChange?.(nextValues);\n\t\treturn nextValues;\n\t}, [defaultValue, fields, isControlled, onValueChange]);\n\n\tconst validate = useCallback(() => {\n\t\tconst nextErrors: SchemaFormErrors = {};\n\n\t\tfor (const field of fields) {\n\t\t\tif (isFieldHidden(field, values, onError)) continue;\n\n\t\t\tconst fieldValue = values[field.key];\n\t\t\tif (field.required && shouldRequireValue(fieldValue)) {\n\t\t\t\tnextErrors[field.key] = formatRequiredError(field.label);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst validators = Array.isArray(field.validate)\n\t\t\t\t? field.validate\n\t\t\t\t: field.validate\n\t\t\t\t\t? [field.validate]\n\t\t\t\t\t: [];\n\n\t\t\tfor (const validator of validators) {\n\t\t\t\ttry {\n\t\t\t\t\tconst result = validator(fieldValue, values, field);\n\t\t\t\t\tif (typeof result === 'string' && result.length > 0) {\n\t\t\t\t\t\tnextErrors[field.key] = result;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} catch (error) {\n\t\t\t\t\tonError?.(error);\n\t\t\t\t\tnextErrors[field.key] = validationError;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tsetValidationErrors(nextErrors);\n\t\treturn Object.keys(nextErrors).length === 0;\n\t}, [fields, formatRequiredError, onError, validationError, values]);\n\n\tconst getFieldError = useCallback(\n\t\t(key: string) => mergedErrors[key],\n\t\t[mergedErrors],\n\t);\n\n\tconst getFieldValue = useCallback(\n\t\t(key: string) => values[key],\n\t\t[values],\n\t);\n\n\treturn {\n\t\tvalues,\n\t\terrors: mergedErrors,\n\t\tgetFieldError,\n\t\tgetFieldValue,\n\t\tsetFieldValue,\n\t\tsetValues,\n\t\treset,\n\t\tvalidate,\n\t};\n}\n","import { Button } from '../../../base/buttons';\nimport { Stack } from '../../../base/structure';\nimport {compositionRhythm} from '../../../base/structure/composition.recipes';\nimport { cn } from '../../../../lib/utils';\n\nexport interface SchemaFormActionsProps {\n\t/** Copy for the submit button. */\n\tsubmitLabel: string;\n\t/** Copy for the reset button. */\n\tresetLabel: string;\n\t/** Renders the reset. */\n\tshowReset?: boolean;\n\t/** Renders the entry as unselectable. */\n\tdisabled?: boolean;\n\t/** Disables the submit button. */\n\tsubmitDisabled?: boolean;\n\t/** Disables the reset button. */\n\tresetDisabled?: boolean;\n\t/** Shows the pending state on submit. */\n\tsubmitting?: boolean;\n\tonReset?: () => void;\n\t/** Merged onto the outermost node. */\n\tclassName?: string;\n}\n\nexport function SchemaFormActions({\n\tsubmitLabel,\n\tresetLabel,\n\tshowReset = false,\n\tdisabled = false,\n\tsubmitDisabled = false,\n\tresetDisabled = false,\n\tsubmitting = false,\n\tonReset,\n\tclassName,\n}: SchemaFormActionsProps) {\n\treturn (\n\t\t<Stack direction=\"horizontal\" align=\"center\" justify=\"end\" gap={compositionRhythm.commands} className={cn('schema-form-actions--component', className)}>\n\t\t\t{!!showReset && (\n\t\t\t\t<Button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\tbuttonStyle=\"outline\"\n\t\t\t\t\tdisabled={disabled || resetDisabled || submitting}\n\t\t\t\t\tonClick={onReset}\n\t\t\t\t>\n\t\t\t\t\t{resetLabel}\n\t\t\t\t</Button>\n\t\t\t)}\n\t\t\t<Button\n\t\t\t\ttype=\"submit\"\n\t\t\t\ttone=\"primary\"\n\t\t\t\tloading={submitting}\n\t\t\t\tdisabled={disabled || submitDisabled}\n\t\t\t>\n\t\t\t\t{submitLabel}\n\t\t\t</Button>\n\t\t</Stack>\n\t);\n}\n\nSchemaFormActions.displayName = 'SchemaFormActions';\n","import { EmptyState } from '../../../blocks/data-display';\nimport { cn } from '../../../../lib/utils';\n\nexport interface SchemaFormEmptyProps {\n\t/** Surface title. */\n\ttitle: string;\n\t/** Supporting copy shown under the label. */\n\tdescription: string;\n\t/** Merged onto the outermost node. */\n\tclassName?: string;\n}\n\nexport function SchemaFormEmpty({ title, description, className }: SchemaFormEmptyProps) {\n\treturn (\n\t\t<EmptyState\n\t\t\ttitle={title}\n\t\t\tdescription={description}\n\t\t\tpadding=\"md\"\n\t\t\tborder\n\t\t\tclassName={cn('schema-form-empty--component bg-muted/30', className)}\n\t\t/>\n\t);\n}\n\nSchemaFormEmpty.displayName = 'SchemaFormEmpty';\n","import { useEffect, useState, type ElementType } from 'react';\n\nimport { CardCheckboxGroup, CardRadioGroup, Select, SwitchCard, ToggleField } from '../../../base/choice-inputs';\nimport { FormField } from '../../../base/forms';\nimport { Input, Textarea } from '../../../base/text-inputs';\nimport { TagsInput } from '../../../base/value-inputs';\nimport { DecimalInput } from '../../../base/forms-numeric';\nimport { cn } from '../../../../lib/utils';\n\nimport type { SchemaFormStrings } from '../schema-form.strings';\nimport type {\n\tSchemaFormField,\n\tSchemaFormFieldContext,\n\tSchemaFormValue,\n\tSchemaFormValues,\n} from '../schema-form.types';\nimport {\n\tformatJsonValue,\n\tparseJsonValue,\n\tparseNumberValue,\n\ttoBooleanValue,\n\ttoStringArray,\n\ttoStringValue,\n} from '../schema-form.utils';\n\nexport interface SchemaFormFieldRendererProps extends SchemaFormFieldContext {\n\t/** Overrides this surface's own copy. */\n\tstrings: SchemaFormStrings;\n\t/** Merged onto the outermost node. */\n\tclassName?: string;\n}\n\nfunction getFieldHint(field: SchemaFormField): string | undefined {\n\treturn field.hint ?? field.description;\n}\n\nfunction getTextDisplayValue(\n\tfield: SchemaFormField,\n\tvalue: SchemaFormValue,\n\tvalues: SchemaFormValues,\n\tonError?: (error: unknown) => void,\n): string {\n\tif (field.formatValue) {\n\t\ttry {\n\t\t\treturn field.formatValue(value, values);\n\t\t} catch (error) {\n\t\t\tonError?.(error);\n\t\t}\n\t}\n\treturn toStringValue(value);\n}\n\nfunction parseTextValue(\n\tfield: SchemaFormField,\n\trawValue: string,\n\tvalues: SchemaFormValues,\n\tonError?: (error: unknown) => void,\n): SchemaFormValue {\n\tif (field.parseValue) {\n\t\ttry {\n\t\t\treturn field.parseValue(rawValue, values);\n\t\t} catch (error) {\n\t\t\tonError?.(error);\n\t\t}\n\t}\n\treturn rawValue;\n}\n\nfunction parseNumberFieldValue(\n\tfield: SchemaFormField,\n\trawValue: string,\n\tvalues: SchemaFormValues,\n\tinteger: boolean,\n\tonError?: (error: unknown) => void,\n): SchemaFormValue {\n\tif (field.parseValue) {\n\t\ttry {\n\t\t\treturn field.parseValue(rawValue, values);\n\t\t} catch (error) {\n\t\t\tonError?.(error);\n\t\t}\n\t}\n\treturn parseNumberValue(rawValue, integer);\n}\n\nfunction parseJsonFieldValue(\n\tfield: SchemaFormField,\n\trawValue: string,\n\tvalues: SchemaFormValues,\n\tonError?: (error: unknown) => void,\n): { value: SchemaFormValue; valid: boolean } {\n\tif (field.type === 'json' && field.parseValue) {\n\t\ttry {\n\t\t\treturn { value: field.parseValue(rawValue, values), valid: true };\n\t\t} catch (error) {\n\t\t\tonError?.(error);\n\t\t\treturn { value: rawValue, valid: false };\n\t\t}\n\t}\n\treturn parseJsonValue(rawValue);\n}\n\nfunction optionIconNode(option: { icon?: ElementType }) {\n\tif (!option.icon) return undefined;\n\tconst Icon = option.icon;\n\treturn <Icon className=\"size-icon\" aria-hidden=\"true\" />;\n}\n\nfunction JsonFieldControl({\n\tfield,\n\tvalue,\n\tvalues,\n\terror,\n\tdisabled,\n\tfieldId,\n\tonValueChange,\n\tonError,\n\tstrings,\n}: SchemaFormFieldContext & { strings: SchemaFormStrings }) {\n\tconst indent = field.type === 'json' ? field.jsonIndent ?? 2 : 2;\n\tconst [text, setText] = useState(() => formatJsonValue(value, indent));\n\tconst [parseError, setParseError] = useState<string | undefined>();\n\tconst [isFocused, setIsFocused] = useState(false);\n\n\tuseEffect(() => {\n\t\tif (!isFocused) setText(formatJsonValue(value, indent));\n\t}, [indent, isFocused, value]);\n\n\tif (field.type !== 'json') return null;\n\n\tconst commit = (rawValue: string) => {\n\t\tconst parsed = parseJsonFieldValue(field, rawValue, values, onError);\n\t\tsetParseError(parsed.valid ? undefined : strings.jsonParseError);\n\t\tonValueChange(parsed.value);\n\t\treturn parsed;\n\t};\n\n\treturn (\n\t\t<FormField\n\t\t\tlabel={field.label}\n\t\t\trequired={field.required}\n\t\t\thint={getFieldHint(field)}\n\t\t\thelperText={field.helperText}\n\t\t\terror={error ?? parseError}\n\t\t\thtmlFor={fieldId}\n\t\t\tsupportingTextId={`${fieldId}-supporting`}\n\t\t\tclassName=\"schema-form-field--component schema-form-field--json\"\n\t\t>\n\t\t\t<Textarea\n\t\t\t\tid={fieldId}\n\t\t\t\tname={field.key}\n\t\t\t\tvalue={text}\n\t\t\t\trows={field.rows ?? 6}\n\t\t\t\tdisabled={disabled}\n\t\t\t\tinvalid={Boolean(error ?? parseError)}\n\t\t\t\tplaceholder={field.placeholder}\n\t\t\t\tspellCheck={false}\n\t\t\t\tclassName={cn('font-mono', field.controlClassName)}\n\t\t\t\tonFocus={() => setIsFocused(true)}\n\t\t\t\tonChange={(event) => {\n\t\t\t\t\tconst next = event.target.value;\n\t\t\t\t\tsetText(next);\n\t\t\t\t\tconst parsed = parseJsonFieldValue(field, next, values, onError);\n\t\t\t\t\tsetParseError(parsed.valid ? undefined : strings.jsonParseError);\n\t\t\t\t\tonValueChange(parsed.value);\n\t\t\t\t}}\n\t\t\t\tonBlur={() => {\n\t\t\t\t\tsetIsFocused(false);\n\t\t\t\t\tconst parsed = commit(text);\n\t\t\t\t\tif (parsed.valid) setText(formatJsonValue(parsed.value, indent));\n\t\t\t\t}}\n\t\t\t\t{...field.textareaProps}\n\t\t\t\t\taria-describedby={[field.textareaProps?.['aria-describedby'], error || parseError || field.helperText || getFieldHint(field) ? `${fieldId}-supporting` : undefined].filter(Boolean).join(' ') || undefined}\n\t\t\t/>\n\t\t</FormField>\n\t);\n}\n\nexport function SchemaFormFieldRenderer({\n\tfield,\n\tvalue,\n\tvalues,\n\terror,\n\tdisabled,\n\trequired,\n\tfieldId,\n\tonValueChange,\n\tonError,\n\tstrings,\n\tclassName,\n}: SchemaFormFieldRendererProps) {\n\tconst fieldType = field.type ?? 'text';\n\tconst commonFieldProps = {\n\t\tlabel: field.label,\n\t\trequired,\n\t\thint: getFieldHint(field),\n\t\thelperText: field.helperText,\n\t\terror,\n\t\thtmlFor: fieldId,\n\t\tsupportingTextId: `${fieldId}-supporting`,\n\t\tclassName: cn('schema-form-field--component', className),\n\t};\n\n\tconst controlClassName = field.controlClassName;\n\tconst describedBy = error || field.helperText || getFieldHint(field) ? `${fieldId}-supporting` : undefined;\n\n\tif (fieldType === 'custom' && field.type === 'custom') {\n\t\treturn (\n\t\t\t<div className={cn('schema-form-field--component schema-form-field--custom', className)}>\n\t\t\t\t{field.render({ field, value, values, error, disabled, required, fieldId, onValueChange, onError })}\n\t\t\t</div>\n\t\t);\n\t}\n\n\tif (fieldType === 'switch' && field.type === 'switch') {\n\t\tconst checked = toBooleanValue(value);\n\t\tif (field.switchStyle === 'card') {\n\t\t\treturn (\n\t\t\t\t<FormField error={error} supportingTextId={`${fieldId}-supporting`} className={cn('schema-form-field--component schema-form-field--switch-card', className)}>\n\t\t\t\t\t<SwitchCard\n\t\t\t\t\tlabel={field.label}\n\t\t\t\t\t\tdescription={field.description}\n\t\t\t\t\t\thint={field.hint}\n\t\t\t\t\t\tname={field.key}\n\t\t\t\t\t\tvalue={checked}\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tinvalid={Boolean(error)}\n\t\t\t\t\t\tclassName={controlClassName}\n\t\t\t\t\t\tonValueChange={(next) => onValueChange(next)}\n\t\t\t\t\t\t{...field.switchCardProps}\n\t\t\t\t\taria-describedby={[field.switchCardProps?.['aria-describedby'], error ? `${fieldId}-supporting` : undefined].filter(Boolean).join(' ') || undefined}\n\t\t\t\t\t/>\n\t\t\t\t</FormField>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<FormField error={error} supportingTextId={`${fieldId}-supporting`} className={cn('schema-form-field--component schema-form-field--switch', className)}>\n\t\t\t\t<ToggleField\n\t\t\t\t\tlabel={field.label}\n\t\t\t\t\tdescription={field.description ?? field.hint}\n\t\t\t\t\tname={field.key}\n\t\t\t\t\tvalue={checked}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tinvalid={Boolean(error)}\n\t\t\t\t\tclassName={controlClassName}\n\t\t\t\t\tonValueChange={(next) => onValueChange(next)}\n\t\t\t\t\t{...field.switchProps}\n\t\t\t\t\taria-describedby={[field.switchProps?.['aria-describedby'], error ? `${fieldId}-supporting` : undefined].filter(Boolean).join(' ') || undefined}\n\t\t\t\t/>\n\t\t\t</FormField>\n\t\t);\n\t}\n\n\tif (fieldType === 'json') {\n\t\treturn (\n\t\t\t<JsonFieldControl\n\t\t\t\tfield={field}\n\t\t\t\tvalue={value}\n\t\t\t\tvalues={values}\n\t\t\t\terror={error}\n\t\t\t\tdisabled={disabled}\n\t\t\t\trequired={required}\n\t\t\t\tfieldId={fieldId}\n\t\t\t\tonValueChange={onValueChange}\n\t\t\t\tonError={onError}\n\t\t\t\tstrings={strings}\n\t\t\t/>\n\t\t);\n\t}\n\n\tif (fieldType === 'textarea' && field.type === 'textarea') {\n\t\tconst displayValue = getTextDisplayValue(field, value, values, onError);\n\t\treturn (\n\t\t\t<FormField {...commonFieldProps}>\n\t\t\t\t<Textarea\n\t\t\t\t\taria-describedby={describedBy}\n\t\t\t\t\tid={fieldId}\n\t\t\t\t\tname={field.key}\n\t\t\t\t\tvalue={displayValue}\n\t\t\t\t\trows={field.rows}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\trequired={required}\n\t\t\t\t\tinvalid={Boolean(error)}\n\t\t\t\t\tplaceholder={field.placeholder}\n\t\t\t\t\tclassName={controlClassName}\n\t\t\t\t\tonChange={(event) => onValueChange(parseTextValue(field, event.target.value, values, onError))}\n\t\t\t\t\t{...field.textareaProps}\n\t\t\t\t/>\n\t\t\t</FormField>\n\t\t);\n\t}\n\n\tif ((fieldType === 'number' || fieldType === 'integer' || fieldType === 'decimal') && (\n\t\tfield.type === 'number' || field.type === 'integer' || field.type === 'decimal'\n\t)) {\n\t\tconst displayValue = getTextDisplayValue(field, value, values, onError);\n\t\tconst integer = field.type === 'integer';\n\t\tconst decimalPlaces = integer ? 0 : field.decimalPlaces ?? (field.type === 'decimal' ? 2 : 4);\n\t\treturn (\n\t\t\t<FormField {...commonFieldProps}>\n\t\t\t\t<DecimalInput\n\t\t\t\t\tid={fieldId}\n\t\t\t\t\tname={field.key}\n\t\t\t\t\tvalue={displayValue}\n\t\t\t\t\tmin={field.min}\n\t\t\t\t\tmax={field.max}\n\t\t\t\t\tstep={field.step}\n\t\t\t\t\tdecimalPlaces={decimalPlaces}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\trequired={required}\n\t\t\t\t\tinvalid={Boolean(error)}\n\t\t\t\t\tplaceholder={field.placeholder}\n\t\t\t\t\tclassName={controlClassName}\n\t\t\t\t\tonChange={(event) => {\n\t\t\t\t\t\tconst rawValue = event.target.value;\n\t\t\t\t\t\tonValueChange(parseNumberFieldValue(field, rawValue, values, integer, onError));\n\t\t\t\t\t}}\n\t\t\t\t\t{...field.numberProps}\n\t\t\t\t\taria-describedby={[field.numberProps?.['aria-describedby'], describedBy].filter(Boolean).join(' ') || undefined}\n\t\t\t\t/>\n\t\t\t</FormField>\n\t\t);\n\t}\n\n\tif (fieldType === 'select' && field.type === 'select') {\n\t\tconst options = field.options.map((option) => ({\n\t\t\tvalue: option.value,\n\t\t\tlabel: option.label,\n\t\t\tdisabled: option.disabled,\n\t\t\ticon: optionIconNode(option),\n\t\t}));\n\n\t\treturn (\n\t\t\t<FormField {...commonFieldProps}>\n\t\t\t\t<Select\n\t\t\t\t\tname={field.key}\n\t\t\t\t\tvalue={toStringValue(value)}\n\t\t\t\t\toptions={options}\n\t\t\t\t\tallowClear={field.allowClear}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\trequired={required}\n\t\t\t\t\tinvalid={Boolean(error)}\n\t\t\t\t\tplaceholder={field.placeholder}\n\t\t\t\t\taria-label={field.label}\n\t\t\t\t\tclassName={controlClassName}\n\t\t\t\t\tonValueChange={(next) => onValueChange(next ?? null)}\n\t\t\t\t\t{...field.selectProps}\n\t\t\t\t\taria-describedby={[field.selectProps?.['aria-describedby'], describedBy].filter(Boolean).join(' ') || undefined}\n\t\t\t\t/>\n\t\t\t</FormField>\n\t\t);\n\t}\n\n\tif (fieldType === 'radio-cards' && field.type === 'radio-cards') {\n\t\treturn (\n\t\t\t<FormField {...commonFieldProps}>\n\t\t\t\t<CardRadioGroup\n\t\t\t\t\tname={field.key}\n\t\t\t\t\tvalue={toStringValue(value)}\n\t\t\t\t\toptions={field.options}\n\t\t\t\t\tcolumns={field.columns}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tinvalid={Boolean(error)}\n\t\t\t\t\tclassName={controlClassName}\n\t\t\t\t\tonValueChange={(next) => onValueChange(next)}\n\t\t\t\t\t{...field.radioProps}\n\t\t\t\t\taria-describedby={[field.radioProps?.['aria-describedby'], describedBy].filter(Boolean).join(' ') || undefined}\n\t\t\t\t/>\n\t\t\t</FormField>\n\t\t);\n\t}\n\n\tif (fieldType === 'checkbox-cards' && field.type === 'checkbox-cards') {\n\t\treturn (\n\t\t\t<FormField {...commonFieldProps}>\n\t\t\t\t<CardCheckboxGroup\n\t\t\t\t\tname={field.key}\n\t\t\t\t\tvalue={toStringArray(value)}\n\t\t\t\t\toptions={field.options}\n\t\t\t\t\tcolumns={field.columns}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tinvalid={Boolean(error)}\n\t\t\t\t\tclassName={controlClassName}\n\t\t\t\t\tonValueChange={(next) => onValueChange(next)}\n\t\t\t\t\t{...field.checkboxProps}\n\t\t\t\t\taria-describedby={[field.checkboxProps?.['aria-describedby'], describedBy].filter(Boolean).join(' ') || undefined}\n\t\t\t\t/>\n\t\t\t</FormField>\n\t\t);\n\t}\n\n\tif (fieldType === 'tags' && field.type === 'tags') {\n\t\treturn (\n\t\t\t<FormField {...commonFieldProps}>\n\t\t\t\t<TagsInput\n\t\t\t\t\tid={fieldId}\n\t\t\t\t\tvalue={toStringArray(value)}\n\t\t\t\t\trecommendations={field.recommendations}\n\t\t\t\t\tmaxTags={field.maxTags}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tinvalid={Boolean(error)}\n\t\t\t\t\tplaceholder={field.placeholder}\n\t\t\t\t\tclassName={controlClassName}\n\t\t\t\t\tonValueChange={(next) => onValueChange(next)}\n\t\t\t\t\t{...field.tagsProps}\n\t\t\t\t\taria-describedby={[field.tagsProps?.['aria-describedby'], describedBy].filter(Boolean).join(' ') || undefined}\n\t\t\t\t/>\n\t\t\t</FormField>\n\t\t);\n\t}\n\n\tconst inputType = fieldType === 'text' ? 'text' : fieldType;\n\tconst nativeInputProps = field.type === undefined || field.type === 'text' || field.type === 'email' || field.type === 'password' || field.type === 'url' || field.type === 'tel' || field.type === 'search' ? field.inputProps : undefined;\n\tconst displayValue = getTextDisplayValue(field, value, values, onError);\n\n\treturn (\n\t\t<FormField {...commonFieldProps}>\n\t\t\t<Input\n\t\t\t\tid={fieldId}\n\t\t\t\tname={field.key}\n\t\t\t\ttype={inputType}\n\t\t\t\tvalue={displayValue}\n\t\t\t\tdisabled={disabled}\n\t\t\t\trequired={required}\n\t\t\t\tinvalid={Boolean(error)}\n\t\t\t\tplaceholder={field.placeholder}\n\t\t\t\tclassName={controlClassName}\n\t\t\t\tonChange={(event) => onValueChange(parseTextValue(field, event.target.value, values, onError))}\n\t\t\t\t{...nativeInputProps}\n\t\t\t\taria-describedby={[nativeInputProps?.['aria-describedby'], describedBy].filter(Boolean).join(' ') || undefined}\n\t\t\t/>\n\t\t</FormField>\n\t);\n}\n\nSchemaFormFieldRenderer.displayName = 'SchemaFormFieldRenderer';\n","export interface SchemaFormStrings {\n\tsubmitLabel: string;\n\tresetLabel: string;\n\tdefaultSectionTitle: string;\n\temptyTitle: string;\n\temptyDescription: string;\n\tjsonParseError: string;\n\tvalidationError: string;\n\tformatRequiredError: (label: string) => string;\n}\n\nexport const defaultSchemaFormStrings: SchemaFormStrings = {\n\tsubmitLabel: 'Save changes',\n\tresetLabel: 'Reset',\n\tdefaultSectionTitle: 'General',\n\temptyTitle: 'No fields configured',\n\temptyDescription: 'Add fields to the schema to render a form.',\n\tjsonParseError: 'Enter valid JSON.',\n\tvalidationError: 'Invalid value.',\n\tformatRequiredError: (label) => `${label} is required.`,\n};\n","import { Fragment, useId, useMemo } from 'react';\n\nimport { Card } from '../../base/cards';\nimport { ContentBlock } from '../../base/display';\nimport { Stack } from '../../base/structure';\nimport {compositionRhythm} from '../../base/structure/composition.recipes';\nimport { Text } from '../../typography';\nimport {copyRoleProps} from '../../typography/text.styles';\nimport { useStrings } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\n\nimport { useSchemaForm } from './hooks';\nimport {\n\tSchemaFormActions,\n\tSchemaFormEmpty,\n\tSchemaFormFieldRenderer,\n} from './partials';\nimport {\n\tdefaultSchemaFormStrings,\n\ttype SchemaFormStrings,\n} from './schema-form.strings';\nimport type {\n\tResolvedSchemaFormSection,\n\tSchemaFormField,\n\tSchemaFormFieldContext,\n\tSchemaFormProps,\n\tSchemaFormSubmitHelpers,\n} from './schema-form.types';\nimport {\n\tSCHEMA_FORM_COLUMNS,\n\tSCHEMA_FORM_FIELD_WIDTH,\n\tisFieldDisabled,\n\tresolveSchemaSections,\n} from './schema-form.utils';\n\nfunction toDomId(value: string): string {\n\treturn value.replace(/[^a-zA-Z0-9_-]/g, '-');\n}\n\nfunction SectionHeading({ section }: { section: ResolvedSchemaFormSection }) {\n\tif (!section.title && !section.description) return null;\n\n\treturn (\n\t\t<Stack gap=\"normal\" className=\"schema-form--section-heading\">\n\t\t\t{!!section.title && (\n\t\t\t\t<Text {...copyRoleProps.subsection} className=\"schema-form--section-title\">\n\t\t\t\t\t{section.title}\n\t\t\t\t</Text>\n\t\t\t)}\n\t\t\t{!!section.description && (\n\t\t\t\t<Text {...copyRoleProps.structuralDescription} className=\"schema-form--section-description\">\n\t\t\t\t\t{section.description}\n\t\t\t\t</Text>\n\t\t\t)}\n\t\t</Stack>\n\t);\n}\n\nexport function SchemaForm({\n\tschema,\n\tvalue,\n\tdefaultValue,\n\terrors,\n\tdisabled = false,\n\tlayout = 'form',\n\tcolumns = 2,\n\tid,\n\tname,\n\ttitle,\n\tdescription,\n\theaderSlot,\n\tfooterSlot,\n\tactionsSlot,\n\temptySlot,\n\tshowActions,\n\tsubmitLabel,\n\tresetLabel,\n\tsubmitDisabled = false,\n\tresetDisabled = false,\n\tsubmitting = false,\n\tonValueChange,\n\tonFieldChange,\n\tonSubmit,\n\tonReset,\n\tonError,\n\trenderField,\n\trenderSection,\n\tstrings: stringsProp,\n\tclassName,\n\tcontentClassName,\n\tsectionClassName,\n\tfieldClassName,\n}: SchemaFormProps) {\n\tconst generatedId = useId();\n\tconst formId = id ?? `schema-form-${generatedId}`;\n\tconst strings: SchemaFormStrings = useStrings(defaultSchemaFormStrings, stringsProp);\n\tconst form = useSchemaForm({\n\t\tfields: schema.fields,\n\t\tvalue,\n\t\tdefaultValue,\n\t\terrors,\n\t\tonValueChange,\n\t\tonFieldChange,\n\t\tformatRequiredError: strings.formatRequiredError,\n\t\tvalidationError: strings.validationError,\n\t\tonError,\n\t});\n\n\tconst sections = useMemo(\n\t\t() => resolveSchemaSections(schema, form.values, strings.defaultSectionTitle, columns, onError),\n\t\t[columns, form.values, onError, schema, strings.defaultSectionTitle],\n\t);\n\tconst hasFields = sections.some((section) => section.fields.length > 0);\n\n\tconst helpers: SchemaFormSubmitHelpers = {\n\t\tsetFieldValue: form.setFieldValue,\n\t\tsetValues: form.setValues,\n\t\treset: form.reset,\n\t\tvalidate: form.validate,\n\t};\n\n\tconst shouldShowActions = showActions ?? Boolean(onSubmit || onReset || actionsSlot);\n\tconst resolvedSubmitLabel = submitLabel ?? strings.submitLabel;\n\tconst resolvedResetLabel = resetLabel ?? strings.resetLabel;\n\n\tconst renderFieldNode = (field: SchemaFormField) => {\n\t\tconst fieldId = `${formId}-${toDomId(field.key)}`;\n\t\tconst fieldDisabled = disabled || isFieldDisabled(field, form.values, onError);\n\t\tconst context: SchemaFormFieldContext = {\n\t\t\tfield,\n\t\t\tvalue: form.getFieldValue(field.key),\n\t\t\tvalues: form.values,\n\t\t\terror: form.getFieldError(field.key),\n\t\t\tdisabled: fieldDisabled,\n\t\t\trequired: Boolean(field.required),\n\t\t\tfieldId,\n\t\t\tonValueChange: (nextValue) => form.setFieldValue(field.key, nextValue),\n\t\t\tonError,\n\t\t};\n\t\tconst defaultField = (\n\t\t\t<SchemaFormFieldRenderer\n\t\t\t\t{...context}\n\t\t\t\tstrings={strings}\n\t\t\t/>\n\t\t);\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tkey={field.key}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'schema-form--field',\n\t\t\t\t\tSCHEMA_FORM_FIELD_WIDTH[field.width ?? 'auto'],\n\t\t\t\t\tfield.className,\n\t\t\t\t\tfieldClassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{renderField?.({ ...context, defaultField }) ?? defaultField}\n\t\t\t</div>\n\t\t);\n\t};\n\n\tconst renderSectionFields = (section: ResolvedSchemaFormSection) => (\n\t\t<div className={cn('schema-form--section-fields', SCHEMA_FORM_COLUMNS[section.columns])}>\n\t\t\t{section.fields.map(renderFieldNode)}\n\t\t</div>\n\t);\n\n\tconst renderPlainSection = (section: ResolvedSchemaFormSection) => {\n\t\tconst fields = renderSectionFields(section);\n\t\tconst custom = renderSection?.({ section, fields, values: form.values });\n\t\tif (custom !== undefined && custom !== null) {\n\t\t\treturn <Fragment key={section.id}>{custom}</Fragment>;\n\t\t}\n\n\t\treturn (\n\t\t\t<Stack\n\t\t\t\tkey={section.id}\n\t\t\t\trender={<section />}\n\t\t\t\tgap=\"lg\"\n\t\t\t\tclassName={cn('schema-form--section', section.className, sectionClassName)}\n\t\t\t>\n\t\t\t\t<SectionHeading section={section} />\n\t\t\t\t{fields}\n\t\t\t\t{!!section.footerSlot && (\n\t\t\t\t\t<div className=\"schema-form--section-footer\">\n\t\t\t\t\t\t{section.footerSlot}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Stack>\n\t\t);\n\t};\n\n\tconst renderCardSection = (section: ResolvedSchemaFormSection) => {\n\t\tconst fields = renderSectionFields(section);\n\t\tconst custom = renderSection?.({ section, fields, values: form.values });\n\t\tif (custom !== undefined && custom !== null) {\n\t\t\treturn <Fragment key={section.id}>{custom}</Fragment>;\n\t\t}\n\n\t\treturn (\n\t\t\t<ContentBlock\n\t\t\t\tkey={section.id}\n\t\t\t\tclassName={cn('schema-form--section-card', section.className, sectionClassName)}\n\t\t\t\ticon={section.icon}\n\t\t\t\ttitle={section.title}\n\t\t\t\tdescription={section.description}\n\t\t\t\tfooterSlot={section.footerSlot}\n\t\t\t>\n\t\t\t\t{fields}\n\t\t\t</ContentBlock>\n\t\t);\n\t};\n\n\tconst actions = actionsSlot ?? (\n\t\tshouldShowActions ? (\n\t\t\t<SchemaFormActions\n\t\t\t\tsubmitLabel={resolvedSubmitLabel}\n\t\t\t\tresetLabel={resolvedResetLabel}\n\t\t\t\tshowReset={Boolean(onReset)}\n\t\t\t\tdisabled={disabled}\n\t\t\t\tsubmitDisabled={submitDisabled}\n\t\t\t\tresetDisabled={resetDisabled}\n\t\t\t\tsubmitting={submitting}\n\t\t\t\tonReset={() => {\n\t\t\t\t\tconst nextValues = form.reset();\n\t\t\t\t\tonReset?.(nextValues, helpers);\n\t\t\t\t}}\n\t\t\t/>\n\t\t) : null\n\t);\n\n\tconst empty = emptySlot ?? (\n\t\t<SchemaFormEmpty\n\t\t\ttitle={strings.emptyTitle}\n\t\t\tdescription={strings.emptyDescription}\n\t\t/>\n\t);\n\n\treturn (\n\t\t<form\n\t\t\tid={formId}\n\t\t\tname={name}\n\t\t\tnoValidate\n\t\t\tclassName={cn('schema-form--component @container/schema-form', className)}\n\t\t\tonSubmit={async (event) => {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tif (disabled || submitDisabled || submitting) return;\n\t\t\t\tconst valid = form.validate();\n\t\t\t\tif (!valid) return;\n\t\t\t\ttry {\n\t\t\t\t\tawait onSubmit?.(form.values, helpers, event);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tonError?.(error);\n\t\t\t\t}\n\t\t\t}}\n\t\t>\n\t\t\t{layout === 'cards' ? (\n\t\t\t\t<Stack gap={compositionRhythm.subjects} className={cn('schema-form--cards', contentClassName)}>\n\t\t\t\t\t{!!(title ?? schema.title ?? description ?? schema.description ?? headerSlot) && (\n\t\t\t\t\t\t<Stack direction=\"horizontal\" align=\"start\" justify=\"between\" gap=\"xl\" className=\"schema-form--header\">\n\t\t\t\t\t\t<Stack gap=\"normal\" className=\"min-w-0\">\n\t\t\t\t\t\t\t\t{!!(title ?? schema.title) && (\n\t\t\t\t\t\t\t\t\t<Text type=\"inherit\" size=\"base\" weight=\"semibold\" className=\"schema-form--title\">\n\t\t\t\t\t\t\t\t\t\t{title ?? schema.title}\n\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{!!(description ?? schema.description) && (\n\t\t\t\t\t\t\t\t\t<Text type=\"secondary\" className=\"schema-form--description\">\n\t\t\t\t\t\t\t\t\t\t{description ?? schema.description}\n\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t{headerSlot}\n\t\t\t\t\t\t</Stack>\n\t\t\t\t\t)}\n\t\t\t\t\t{hasFields ? sections.map(renderCardSection) : empty}\n\t\t\t\t\t{footerSlot}\n\t\t\t\t\t{actions}\n\t\t\t\t</Stack>\n\t\t\t) : (\n\t\t\t\t\t<Card\n\t\t\t\t\t\tsurface=\"flat\"\n\t\t\t\t\t\tpadding=\"none\"\n\t\t\t\t\t\tclassName=\"schema-form--surface\"\n\t\t\t\t\t\tgap={compositionRhythm.subjects}\n\t\t\t\t\t\tcontentGap={compositionRhythm.subjects}\n\t\t\t\t\t\tcontentClassName={cn('schema-form--content', contentClassName)}\n\t\t\t\t\t\ttitle={title ?? schema.title}\n\t\t\t\t\t\tdescription={description ?? schema.description}\n\t\t\t\t\t\theaderEnd={headerSlot}\n\t\t\t\t\t\tfooterSlot={\n\t\t\t\t\t\t\tfooterSlot || actions ? (\n\t\t\t\t\t\t\t\t<Stack gap=\"lg\" className=\"schema-form--footer\">\n\t\t\t\t\t\t\t\t\t{footerSlot}\n\t\t\t\t\t\t\t\t\t{actions}\n\t\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t) : undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{hasFields ? sections.map(renderPlainSection) : empty}\n\t\t\t\t\t</Card>\n\t\t\t)}\n\t\t</form>\n\t);\n}\n\nSchemaForm.displayName = 'SchemaForm';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAiBA,IAAaiB,IAAiD;CAC7D,GAAG;CACH,GAAG;CACH,GAAG;AACJ,GAEaC,KAAgE;CAC5E,MAAM;CACN,MAAM;CACN,OAAO;CACP,MAAM;AACP;AAEA,SAAgBC,EACf,GACA,GACA,GACU;CACV,IAAI,OAAOC,EAAM,UAAW,YAC3B,IAAI;EACH,OAAOA,EAAM,OAAOC,CAAM;CAC3B,SAASC,GAAO;EAEf,OADAC,IAAUD,CAAK,GACR;CACR;CAED,OAAOF,EAAM,UAAU;AACxB;AAEA,SAAgBI,GACf,GACA,GACA,GACU;CACV,IAAI,OAAOJ,EAAM,YAAa,YAC7B,IAAI;EACH,OAAOA,EAAM,SAASC,CAAM;CAC7B,SAASC,GAAO;EAEf,OADAC,IAAUD,CAAK,GACR;CACR;CAED,OAAOF,EAAM,YAAY;AAC1B;AAEA,SAAgBK,GACf,GACA,GACA,GACoB;CACpB,OAAOC,EAAO,QAAQ,MAAU,CAACP,EAAcC,GAAOC,GAAQE,CAAO,CAAC;AACvE;AAEA,SAAgBI,GACf,GACA,GACA,GACA,GACA,GAC8B;CAC9B,IAAMC,IAAgBH,GAAiBI,EAAO,QAAQR,GAAQE,CAAO,GAC/DO,IAAc,IAAI,IAAIF,EAAc,KAAK,MAAU,CAACR,EAAM,KAAKA,CAAK,CAAC,CAAC,GACtEW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,EAAO;GACnC,WAAW+I;GACX,YACCC,KAAcR,IACb,kBAACnK,GAAD;IAAO,KAAI;IAAK,WAAU;IAA1B,UAAA,CACE2K,GACAR,CACK;GACJ,CAAA,IAAA,KAAA;GAGJ,UAAAtB,KAAY/G,EAAS,IAAI+H,EAAkB,IAAIO;EAC3C,CAAA;CAEH,CAAA;AAER;AAEA,EAAW,cAAc"}
1
+ {"version":3,"file":"schema-form.js","names":["Text","copyRoleProps","Stack","Card","compositionRhythm","Input","FormField","Textarea","ToggleField","CardCheckboxGroup","Select","SwitchCard","CardRadioGroup","ContentBlock","TagsInput","DecimalInput","EmptyState","SCHEMA_FORM_COLUMNS","SCHEMA_FORM_FIELD_WIDTH","isFieldHidden","field","values","error","onError","isFieldDisabled","getVisibleFields","fields","resolveSchemaSections","visibleFields","schema","fieldsByKey","usedKeys","sections","section","sectionFields","key","defaultColumns","unsectioned","defaultSectionTitle","toStringValue","value","toStringArray","item","toBooleanValue","parseNumberValue","trimmed","rawValue","parsed","integer","formatJsonValue","quoteString","indent","parseJsonValue","getDefaultValues","defaultValue","shouldRequireValue","normalizeErrors","next","message","errors","useSchemaForm","externalErrors","options","isControlled","initialValues","useMemo","internalValues","setInternalValues","useState","validationErrors","setValidationErrors","invalidParsedFields","useRef","committedValues","currentValues","currentOptions","useLayoutEffect","mergedErrors","writeValues","useCallback","nextValues","setValues","setFieldValue","fieldValue","current","setFieldParseValidity","valid","reset","onValueChange","validate","nextErrors","hasParseError","formatRequiredError","validators","validator","result","validationError","min","max","SchemaFormActions","cn","className","showReset","Button","disabled","resetDisabled","submitting","onReset","resetLabel","submitDisabled","submitLabel","SchemaFormEmpty","getFieldHint","getTextDisplayValue","parseTextValue","parseNumberFieldValue","NumberFieldControl","inputProps","editing","draft","setDraft","acceptedDraft","onParseError","onFocus","event","onBlur","text","onParsedChange","parseJsonFieldValue","optionIconNode","option","Icon","JsonFieldControl","quoteParsedString","setText","parseError","setParseError","isFocused","setIsFocused","lastParse","useEffect","acceptedParse","onParseValidityChange","commit","strings","fieldId","SchemaFormFieldRenderer","fieldType","commonFieldProps","controlClassName","describedBy","checked","displayValue","decimalPlaces","inputType","nativeInputProps","defaultSchemaFormStrings","label","toDomId","SectionHeading","SchemaForm","stringsProp","generatedId","useId","formId","id","useStrings","form","columns","hasFields","helpers","shouldShowActions","showActions","onSubmit","actionsSlot","resolvedSubmitLabel","resolvedResetLabel","renderFieldNode","fieldDisabled","context","nextValue","defaultField","fieldClassName","renderField","renderSectionFields","renderPlainSection","custom","renderSection","sectionClassName","Fragment","renderCardSection","actions","empty","emptySlot","submittedValues","layout","contentClassName","title","description","headerSlot","footerSlot"],"sources":["../../src/components/features/schema-form/schema-form.utils.ts","../../src/components/features/schema-form/hooks/use-schema-form.ts","../../src/components/features/schema-form/partials/schema-form-actions.tsx","../../src/components/features/schema-form/partials/schema-form-empty.tsx","../../src/components/features/schema-form/partials/schema-form-field.tsx","../../src/components/features/schema-form/schema-form.strings.ts","../../src/components/features/schema-form/schema-form.tsx"],"sourcesContent":["import type {\n\tResolvedSchemaFormSection,\n\tSchemaFormField,\n\tSchemaFormFieldWidth,\n\tSchemaFormSchema,\n\tSchemaFormValue,\n\tSchemaFormValues,\n} from './schema-form.types';\n\ntype SchemaFormErrorHandler = (error: unknown) => void;\n\n/*\n * Container widths, not viewport widths — a schema form is as often rendered in\n * a drawer or a side panel as at page width, and keyed to the screen it kept\n * three field columns inside a 320px drawer. 448/576 clears every width these\n * forms render at today (672-814px) while collapsing below a real drawer.\n */\nexport const SCHEMA_FORM_COLUMNS: Record<1 | 2 | 3, string> = {\n\t1: 'grid grid-cols-1 gap-space-xl',\n\t2: 'grid grid-cols-1 gap-space-xl @md/schema-form:grid-cols-2',\n\t3: 'grid grid-cols-1 gap-space-xl @md/schema-form:grid-cols-2 @xl/schema-form:grid-cols-3',\n};\n\nexport const SCHEMA_FORM_FIELD_WIDTH: Record<SchemaFormFieldWidth, string> = {\n\tauto: '',\n\thalf: '@md/schema-form:col-span-1',\n\tthird: '@xl/schema-form:col-span-1',\n\tfull: '@md/schema-form:col-span-full @xl/schema-form:col-span-full',\n};\n\nexport function isFieldHidden(\n\tfield: SchemaFormField,\n\tvalues: SchemaFormValues,\n\tonError?: SchemaFormErrorHandler,\n): boolean {\n\tif (typeof field.hidden === 'function') {\n\t\ttry {\n\t\t\treturn field.hidden(values);\n\t\t} catch (error) {\n\t\t\tonError?.(error);\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn field.hidden ?? false;\n}\n\nexport function isFieldDisabled(\n\tfield: SchemaFormField,\n\tvalues: SchemaFormValues,\n\tonError?: SchemaFormErrorHandler,\n): boolean {\n\tif (typeof field.disabled === 'function') {\n\t\ttry {\n\t\t\treturn field.disabled(values);\n\t\t} catch (error) {\n\t\t\tonError?.(error);\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn field.disabled ?? false;\n}\n\nexport function getVisibleFields(\n\tfields: SchemaFormField[],\n\tvalues: SchemaFormValues,\n\tonError?: SchemaFormErrorHandler,\n): SchemaFormField[] {\n\treturn fields.filter((field) => !isFieldHidden(field, values, onError));\n}\n\nexport function resolveSchemaSections(\n\tschema: SchemaFormSchema,\n\tvalues: SchemaFormValues,\n\tdefaultSectionTitle: string,\n\tdefaultColumns: 1 | 2 | 3,\n\tonError?: SchemaFormErrorHandler,\n): ResolvedSchemaFormSection[] {\n\tconst visibleFields = getVisibleFields(schema.fields, values, onError);\n\tconst fieldsByKey = new Map(visibleFields.map((field) => [field.key, field]));\n\tconst usedKeys = new Set<string>();\n\tconst sections: ResolvedSchemaFormSection[] = [];\n\n\tfor (const section of schema.sections ?? []) {\n\t\tconst sectionFields = section.fields\n\t\t\t? section.fields\n\t\t\t\t\t.map((key) => fieldsByKey.get(key))\n\t\t\t\t\t.filter((field): field is SchemaFormField => field !== undefined)\n\t\t\t: visibleFields.filter((field) => field.sectionId === section.id);\n\n\t\tfor (const field of sectionFields) {\n\t\t\tusedKeys.add(field.key);\n\t\t}\n\n\t\tsections.push({\n\t\t\tid: section.id,\n\t\t\ttitle: section.title,\n\t\t\tdescription: section.description,\n\t\t\ticon: section.icon,\n\t\t\tfields: sectionFields,\n\t\t\tcolumns: section.columns ?? defaultColumns,\n\t\t\tfooterSlot: section.footerSlot,\n\t\t\tclassName: section.className,\n\t\t});\n\t}\n\n\tconst unsectioned = visibleFields.filter((field) => !usedKeys.has(field.key));\n\tif (unsectioned.length > 0 || sections.length === 0) {\n\t\tsections.unshift({\n\t\t\tid: 'default',\n\t\t\ttitle: schema.sections?.length ? defaultSectionTitle : undefined,\n\t\t\tfields: unsectioned,\n\t\t\tcolumns: defaultColumns,\n\t\t});\n\t}\n\n\treturn sections.filter((section) => section.fields.length > 0);\n}\n\nexport function toStringValue(value: SchemaFormValue): string {\n\tif (value === undefined || value === null) return '';\n\tif (typeof value === 'string') return value;\n\tif (typeof value === 'number' || typeof value === 'boolean') return String(value);\n\treturn JSON.stringify(value);\n}\n\nexport function toStringArray(value: SchemaFormValue): string[] {\n\tif (!Array.isArray(value)) return [];\n\treturn value.map((item) => String(item));\n}\n\nexport function toBooleanValue(value: SchemaFormValue): boolean {\n\treturn value === true || value === 'true' || value === 1;\n}\n\nexport function parseNumberValue(rawValue: string, integer = false): number | null {\n\tconst trimmed = rawValue.trim();\n\tif (trimmed.length === 0) return null;\n\tconst parsed = integer ? Number.parseInt(trimmed, 10) : Number.parseFloat(trimmed);\n\treturn Number.isNaN(parsed) ? null : parsed;\n}\n\nexport function formatJsonValue(value: SchemaFormValue, indent = 2, quoteString = false): string {\n\tif (value === undefined || value === null) return '';\n\tif (typeof value === 'string') return quoteString ? JSON.stringify(value) : value;\n\ttry {\n\t\treturn JSON.stringify(value, null, indent);\n\t} catch {\n\t\treturn String(value);\n\t}\n}\n\nexport function parseJsonValue(rawValue: string): { value: SchemaFormValue; valid: boolean } {\n\tconst trimmed = rawValue.trim();\n\tif (trimmed.length === 0) return { value: null, valid: true };\n\n\ttry {\n\t\treturn { value: JSON.parse(trimmed) as SchemaFormValue, valid: true };\n\t} catch {\n\t\treturn { value: rawValue, valid: false };\n\t}\n}\n","import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';\n\nimport type {\n\tSchemaFormErrors,\n\tSchemaFormField,\n\tSchemaFormSubmitHelpers,\n\tSchemaFormValue,\n\tSchemaFormValues,\n} from '../schema-form.types';\nimport { isFieldHidden } from '../schema-form.utils';\n\nexport interface UseSchemaFormOptions {\n\tfields: SchemaFormField[];\n\tvalue?: SchemaFormValues;\n\tdefaultValue?: SchemaFormValues;\n\terrors?: SchemaFormErrors;\n\tonValueChange?: (values: SchemaFormValues) => void;\n\tonFieldChange?: (key: string, value: SchemaFormValue, values: SchemaFormValues) => void;\n\tformatRequiredError: (label: string) => string;\n\tvalidationError: string;\n\tonError?: (error: unknown) => void;\n}\n\nexport interface UseSchemaFormResult extends SchemaFormSubmitHelpers {\n\tvalues: SchemaFormValues;\n\terrors: SchemaFormErrors;\n\tgetFieldError: (key: string) => string | undefined;\n\tgetFieldValue: (key: string) => SchemaFormValue;\n\t/** Reads the latest values, including writes made in the current event. */\n\tgetValues: () => SchemaFormValues;\n\tsetFieldValue: (key: string, value: SchemaFormValue) => void;\n\tsetValues: (values: SchemaFormValues) => void;\n\t/** Registers a field editor's current parse validity with form validation. */\n\tsetFieldParseValidity: (key: string, valid: boolean) => void;\n\treset: () => SchemaFormValues;\n\tvalidate: () => boolean;\n}\n\nfunction getDefaultValues(fields: SchemaFormField[], defaultValue?: SchemaFormValues): SchemaFormValues {\n\tconst values: SchemaFormValues = { ...defaultValue };\n\n\tfor (const field of fields) {\n\t\tif (field.defaultValue !== undefined && values[field.key] === undefined) {\n\t\t\tvalues[field.key] = field.defaultValue;\n\t\t}\n\t}\n\n\treturn values;\n}\n\nfunction shouldRequireValue(value: SchemaFormValue): boolean {\n\tif (value === undefined || value === null) return true;\n\tif (typeof value === 'string') return value.trim().length === 0;\n\tif (Array.isArray(value)) return value.length === 0;\n\treturn false;\n}\n\nfunction normalizeErrors(errors?: SchemaFormErrors): SchemaFormErrors {\n\tconst next: SchemaFormErrors = {};\n\tfor (const [key, message] of Object.entries(errors ?? {})) {\n\t\tif (message) next[key] = message;\n\t}\n\treturn next;\n}\n\nexport function useSchemaForm(options: UseSchemaFormOptions): UseSchemaFormResult {\n\tconst { fields, value, defaultValue, errors: externalErrors } = options;\n\tconst isControlled = value !== undefined;\n\tconst initialValues = useMemo(\n\t\t() => getDefaultValues(fields, defaultValue),\n\t\t[defaultValue, fields],\n\t);\n\tconst [internalValues, setInternalValues] = useState<SchemaFormValues>(() => initialValues);\n\tconst [validationErrors, setValidationErrors] = useState<SchemaFormErrors>({});\n\tconst invalidParsedFields = useRef(new Set<string>());\n\tconst values = useMemo(\n\t\t() => (isControlled ? { ...initialValues, ...value } : internalValues),\n\t\t[initialValues, internalValues, isControlled, value],\n\t);\n\tconst committedValues = useRef(values);\n\tconst currentValues = useRef(values);\n\tconst currentOptions = useRef(options);\n\tuseLayoutEffect(() => {\n\t\tcommittedValues.current = values;\n\t\tcurrentValues.current = values;\n\t}, [values]);\n\tuseLayoutEffect(() => {\n\t\tcurrentOptions.current = options;\n\t}, [options]);\n\n\tconst mergedErrors = useMemo(\n\t\t() => ({\n\t\t\t...validationErrors,\n\t\t\t...normalizeErrors(externalErrors),\n\t\t}),\n\t\t[externalErrors, validationErrors],\n\t);\n\n\tconst writeValues = useCallback((nextValues: SchemaFormValues) => {\n\t\tcurrentValues.current = nextValues;\n\t\tif (currentOptions.current.value === undefined) {\n\t\t\tsetInternalValues(nextValues);\n\t\t\treturn;\n\t\t}\n\t\t// Compose same-event controlled proposals. Later events read the\n\t\t// committed parent value if the owner declined the proposal.\n\t\tqueueMicrotask(() => {\n\t\t\tif (currentValues.current === nextValues) currentValues.current = committedValues.current;\n\t\t});\n\t}, []);\n\n\tconst setValues = useCallback(\n\t\t(nextValues: SchemaFormValues) => {\n\t\t\twriteValues(nextValues);\n\t\t\tcurrentOptions.current.onValueChange?.(nextValues);\n\t\t},\n\t\t[writeValues],\n\t);\n\n\tconst setFieldValue = useCallback(\n\t\t(key: string, fieldValue: SchemaFormValue) => {\n\t\t\tconst nextValues = { ...currentValues.current, [key]: fieldValue };\n\t\t\twriteValues(nextValues);\n\t\t\tsetValidationErrors((current) => {\n\t\t\t\tif (!current[key]) return current;\n\t\t\t\tconst next = { ...current };\n\t\t\t\tdelete next[key];\n\t\t\t\treturn next;\n\t\t\t});\n\t\t\tcurrentOptions.current.onFieldChange?.(key, fieldValue, nextValues);\n\t\t\tcurrentOptions.current.onValueChange?.(nextValues);\n\t\t},\n\t\t[writeValues],\n\t);\n\n\tconst setFieldParseValidity = useCallback((key: string, valid: boolean) => {\n\t\tif (valid) invalidParsedFields.current.delete(key);\n\t\telse invalidParsedFields.current.add(key);\n\t}, []);\n\n\tconst reset = useCallback(() => {\n\t\tconst { fields, defaultValue, onValueChange } = currentOptions.current;\n\t\tconst nextValues = getDefaultValues(fields, defaultValue);\n\t\twriteValues(nextValues);\n\t\tinvalidParsedFields.current.clear();\n\t\tsetValidationErrors({});\n\t\tonValueChange?.(nextValues);\n\t\treturn nextValues;\n\t}, [writeValues]);\n\n\tconst validate = useCallback(() => {\n\t\tconst { fields, formatRequiredError, onError, validationError } = currentOptions.current;\n\t\tconst values = currentValues.current;\n\t\tconst nextErrors: SchemaFormErrors = {};\n\t\tlet hasParseError = false;\n\n\t\tfor (const field of fields) {\n\t\t\tif (isFieldHidden(field, values, onError)) continue;\n\t\t\tif (field.type === 'json' && invalidParsedFields.current.has(field.key)) {\n\t\t\t\thasParseError = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst fieldValue = values[field.key];\n\t\t\tif (field.required && shouldRequireValue(fieldValue)) {\n\t\t\t\tnextErrors[field.key] = formatRequiredError(field.label);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst validators = Array.isArray(field.validate)\n\t\t\t\t? field.validate\n\t\t\t\t: field.validate\n\t\t\t\t\t? [field.validate]\n\t\t\t\t\t: [];\n\n\t\t\tfor (const validator of validators) {\n\t\t\t\ttry {\n\t\t\t\t\tconst result = validator(fieldValue, values, field);\n\t\t\t\t\tif (typeof result === 'string' && result.length > 0) {\n\t\t\t\t\t\tnextErrors[field.key] = result;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} catch (error) {\n\t\t\t\t\tonError?.(error);\n\t\t\t\t\tnextErrors[field.key] = validationError;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!nextErrors[field.key] && typeof fieldValue === 'number' &&\n\t\t\t\t(field.type === 'number' || field.type === 'integer' || field.type === 'decimal')) {\n\t\t\t\tconst { min, max } = { min: field.min, max: field.max, ...field.numberProps };\n\t\t\t\tif ((min !== undefined && fieldValue < min) || (max !== undefined && fieldValue > max)) {\n\t\t\t\t\tnextErrors[field.key] = validationError;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tsetValidationErrors(nextErrors);\n\t\treturn !hasParseError && Object.keys(nextErrors).length === 0;\n\t}, []);\n\n\tconst getFieldError = useCallback(\n\t\t(key: string) => mergedErrors[key],\n\t\t[mergedErrors],\n\t);\n\n\tconst getFieldValue = useCallback(\n\t\t(key: string) => values[key],\n\t\t[values],\n\t);\n\tconst getValues = useCallback(() => currentValues.current, []);\n\n\treturn {\n\t\tvalues,\n\t\terrors: mergedErrors,\n\t\tgetFieldError,\n\t\tgetFieldValue,\n\t\tgetValues,\n\t\tsetFieldValue,\n\t\tsetValues,\n\t\tsetFieldParseValidity,\n\t\treset,\n\t\tvalidate,\n\t};\n}\n","import { Button } from '../../../base/buttons';\nimport { Stack } from '../../../base/structure';\nimport {compositionRhythm} from '../../../base/structure/composition.recipes';\nimport { cn } from '../../../../lib/utils';\n\nexport interface SchemaFormActionsProps {\n\t/** Copy for the submit button. */\n\tsubmitLabel: string;\n\t/** Copy for the reset button. */\n\tresetLabel: string;\n\t/** Renders the reset. */\n\tshowReset?: boolean;\n\t/** Renders the entry as unselectable. */\n\tdisabled?: boolean;\n\t/** Disables the submit button. */\n\tsubmitDisabled?: boolean;\n\t/** Disables the reset button. */\n\tresetDisabled?: boolean;\n\t/** Shows the pending state on submit. */\n\tsubmitting?: boolean;\n\tonReset?: () => void;\n\t/** Merged onto the outermost node. */\n\tclassName?: string;\n}\n\nexport function SchemaFormActions({\n\tsubmitLabel,\n\tresetLabel,\n\tshowReset = false,\n\tdisabled = false,\n\tsubmitDisabled = false,\n\tresetDisabled = false,\n\tsubmitting = false,\n\tonReset,\n\tclassName,\n}: SchemaFormActionsProps) {\n\treturn (\n\t\t<Stack direction=\"horizontal\" align=\"center\" justify=\"end\" gap={compositionRhythm.commands} className={cn('schema-form-actions--component', className)}>\n\t\t\t{!!showReset && (\n\t\t\t\t<Button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\tbuttonStyle=\"outline\"\n\t\t\t\t\tdisabled={disabled || resetDisabled || submitting}\n\t\t\t\t\tonClick={onReset}\n\t\t\t\t>\n\t\t\t\t\t{resetLabel}\n\t\t\t\t</Button>\n\t\t\t)}\n\t\t\t<Button\n\t\t\t\ttype=\"submit\"\n\t\t\t\ttone=\"primary\"\n\t\t\t\tloading={submitting}\n\t\t\t\tdisabled={disabled || submitDisabled}\n\t\t\t>\n\t\t\t\t{submitLabel}\n\t\t\t</Button>\n\t\t</Stack>\n\t);\n}\n\nSchemaFormActions.displayName = 'SchemaFormActions';\n","import { EmptyState } from '../../../blocks/data-display';\nimport { cn } from '../../../../lib/utils';\n\nexport interface SchemaFormEmptyProps {\n\t/** Surface title. */\n\ttitle: string;\n\t/** Supporting copy shown under the label. */\n\tdescription: string;\n\t/** Merged onto the outermost node. */\n\tclassName?: string;\n}\n\nexport function SchemaFormEmpty({ title, description, className }: SchemaFormEmptyProps) {\n\treturn (\n\t\t<EmptyState\n\t\t\ttitle={title}\n\t\t\tdescription={description}\n\t\t\tpadding=\"md\"\n\t\t\tborder\n\t\t\tclassName={cn('schema-form-empty--component bg-muted/30', className)}\n\t\t/>\n\t);\n}\n\nSchemaFormEmpty.displayName = 'SchemaFormEmpty';\n","import { useEffect, useRef, useState, type ElementType } from 'react';\n\nimport { CardCheckboxGroup, CardRadioGroup, Select, SwitchCard, ToggleField } from '../../../base/choice-inputs';\nimport { FormField } from '../../../base/forms';\nimport { Input, Textarea } from '../../../base/text-inputs';\nimport { TagsInput } from '../../../base/value-inputs';\nimport { DecimalInput, type DecimalInputProps } from '../../../base/forms-numeric';\nimport { cn } from '../../../../lib/utils';\n\nimport type { SchemaFormStrings } from '../schema-form.strings';\nimport type {\n\tSchemaFormField,\n\tSchemaFormFieldContext,\n\tSchemaFormNumberField,\n\tSchemaFormValue,\n\tSchemaFormValues,\n} from '../schema-form.types';\nimport {\n\tformatJsonValue,\n\tparseJsonValue,\n\tparseNumberValue,\n\ttoBooleanValue,\n\ttoStringArray,\n\ttoStringValue,\n} from '../schema-form.utils';\n\nexport interface SchemaFormFieldRendererProps extends SchemaFormFieldContext {\n\t/** Overrides this surface's own copy. */\n\tstrings: SchemaFormStrings;\n\t/** Merged onto the outermost node. */\n\tclassName?: string;\n\t/** Reports whether the JSON editor can parse its current draft. */\n\tonParseValidityChange?: (key: string, valid: boolean) => void;\n}\n\nfunction getFieldHint(field: SchemaFormField): string | undefined {\n\treturn field.hint ?? field.description;\n}\n\nfunction getTextDisplayValue(\n\tfield: SchemaFormField,\n\tvalue: SchemaFormValue,\n\tvalues: SchemaFormValues,\n\tonError?: (error: unknown) => void,\n): string {\n\tif (field.formatValue) {\n\t\ttry {\n\t\t\treturn field.formatValue(value, values);\n\t\t} catch (error) {\n\t\t\tonError?.(error);\n\t\t}\n\t}\n\treturn toStringValue(value);\n}\n\nfunction parseTextValue(\n\tfield: SchemaFormField,\n\trawValue: string,\n\tvalues: SchemaFormValues,\n\tonError?: (error: unknown) => void,\n): SchemaFormValue {\n\tif (field.parseValue) {\n\t\ttry {\n\t\t\treturn field.parseValue(rawValue, values);\n\t\t} catch (error) {\n\t\t\tonError?.(error);\n\t\t}\n\t}\n\treturn rawValue;\n}\n\nfunction parseNumberFieldValue(\n\tfield: SchemaFormField,\n\trawValue: string,\n\tvalues: SchemaFormValues,\n\tinteger: boolean,\n\tonError?: (error: unknown) => void,\n): SchemaFormValue {\n\tif (field.parseValue) {\n\t\ttry {\n\t\t\treturn field.parseValue(rawValue, values);\n\t\t} catch (error) {\n\t\t\tonError?.(error);\n\t\t}\n\t}\n\treturn parseNumberValue(rawValue, integer);\n}\n\nfunction NumberFieldControl({\n\tfield,\n\tvalue,\n\tvalues,\n\tonParsedChange,\n\tonParseError,\n\tonFocus,\n\tonBlur,\n\t...inputProps\n}: Pick<SchemaFormFieldContext, 'value' | 'values'>\n\t& {\n\t\tfield: SchemaFormNumberField;\n\t\tonParsedChange: SchemaFormFieldContext['onValueChange'];\n\t\tonParseError?: SchemaFormFieldContext['onError'];\n\t}\n\t& Omit<DecimalInputProps, 'value' | 'defaultValue' | 'onChange'>) {\n\tconst editing = useRef(false);\n\tconst [draft, setDraft] = useState<{ text: string; value: SchemaFormValue } | null>(null);\n\t// A parent can accept the parsed value or replace it. Only an accepted edit\n\t// can keep intermediate text such as \"1.\" or \"0.0\" in the field.\n\tconst acceptedDraft = draft && Object.is(draft.value, value) ? draft : null;\n\tif (draft && !acceptedDraft) setDraft(null);\n\n\treturn (\n\t\t<DecimalInput\n\t\t\t{...inputProps}\n\t\t\tvalue={acceptedDraft?.text ?? getTextDisplayValue(field, value, values, onParseError)}\n\t\t\tonFocus={(event) => {\n\t\t\t\tediting.current = true;\n\t\t\t\tonFocus?.(event);\n\t\t\t}}\n\t\t\tonBlur={(event) => {\n\t\t\t\tediting.current = false;\n\t\t\t\tsetDraft(null);\n\t\t\t\tonBlur?.(event);\n\t\t\t}}\n\t\t\tonChange={(event) => {\n\t\t\t\tconst text = event.target.value;\n\t\t\t\tconst next = parseNumberFieldValue(field, text, values, field.type === 'integer', onParseError);\n\t\t\t\tif (editing.current) setDraft({ text, value: next });\n\t\t\t\tonParsedChange(next);\n\t\t\t}}\n\t\t/>\n\t);\n}\n\nfunction parseJsonFieldValue(\n\tfield: SchemaFormField,\n\trawValue: string,\n\tvalues: SchemaFormValues,\n\tonError?: (error: unknown) => void,\n): { value: SchemaFormValue; valid: boolean } {\n\tif (field.type === 'json' && field.parseValue) {\n\t\ttry {\n\t\t\treturn { value: field.parseValue(rawValue, values), valid: true };\n\t\t} catch (error) {\n\t\t\tonError?.(error);\n\t\t\treturn { value: rawValue, valid: false };\n\t\t}\n\t}\n\treturn parseJsonValue(rawValue);\n}\n\nfunction optionIconNode(option: { icon?: ElementType }) {\n\tif (!option.icon) return undefined;\n\tconst Icon = option.icon;\n\treturn <Icon className=\"size-icon\" aria-hidden=\"true\" />;\n}\n\nfunction JsonFieldControl({\n\tfield,\n\tvalue,\n\tvalues,\n\terror,\n\tdisabled,\n\tfieldId,\n\tonValueChange,\n\tonError,\n\tstrings,\n\tonParseValidityChange,\n}: SchemaFormFieldRendererProps) {\n\tconst indent = field.type === 'json' ? field.jsonIndent ?? 2 : 2;\n\tconst quoteParsedString = !field.parseValue;\n\tconst [text, setText] = useState(() => formatJsonValue(value, indent));\n\tconst [parseError, setParseError] = useState<string | undefined>();\n\tconst [isFocused, setIsFocused] = useState(false);\n\tconst lastParse = useRef<ReturnType<typeof parseJsonFieldValue> | null>(null);\n\n\tuseEffect(() => {\n\t\tif (isFocused) return;\n\t\tconst acceptedParse = lastParse.current && Object.is(lastParse.current.value, value) ? lastParse.current : null;\n\t\tsetText(formatJsonValue(value, indent, quoteParsedString && !!acceptedParse?.valid));\n\t\tif (!acceptedParse && lastParse.current) {\n\t\t\tlastParse.current = null;\n\t\t\tsetParseError(undefined);\n\t\t\tonParseValidityChange?.(field.key, true);\n\t\t}\n\t}, [field.key, indent, isFocused, onParseValidityChange, quoteParsedString, value]);\n\n\tuseEffect(() => () => onParseValidityChange?.(field.key, true), [field.key, onParseValidityChange]);\n\n\tif (field.type !== 'json') return null;\n\n\tconst commit = (rawValue: string) => {\n\t\tconst parsed = parseJsonFieldValue(field, rawValue, values, onError);\n\t\tlastParse.current = parsed;\n\t\tsetParseError(parsed.valid ? undefined : strings.jsonParseError);\n\t\tonParseValidityChange?.(field.key, parsed.valid);\n\t\tonValueChange(parsed.value);\n\t\treturn parsed;\n\t};\n\n\treturn (\n\t\t<FormField\n\t\t\tlabel={field.label}\n\t\t\trequired={field.required}\n\t\t\thint={getFieldHint(field)}\n\t\t\thelperText={field.helperText}\n\t\t\terror={error ?? parseError}\n\t\t\thtmlFor={fieldId}\n\t\t\tsupportingTextId={`${fieldId}-supporting`}\n\t\t\tclassName=\"schema-form-field--component schema-form-field--json\"\n\t\t>\n\t\t\t<Textarea\n\t\t\t\tid={fieldId}\n\t\t\t\tname={field.key}\n\t\t\t\tvalue={text}\n\t\t\t\trows={field.rows ?? 6}\n\t\t\t\tdisabled={disabled}\n\t\t\t\tinvalid={Boolean(error ?? parseError)}\n\t\t\t\tplaceholder={field.placeholder}\n\t\t\t\tspellCheck={false}\n\t\t\t\tclassName={cn('font-mono', field.controlClassName)}\n\t\t\t\tonFocus={() => setIsFocused(true)}\n\t\t\t\tonChange={(event) => {\n\t\t\t\t\tconst next = event.target.value;\n\t\t\t\t\tsetText(next);\n\t\t\t\t\tcommit(next);\n\t\t\t\t}}\n\t\t\t\tonBlur={() => {\n\t\t\t\t\tsetIsFocused(false);\n\t\t\t\t\tconst parsed = commit(text);\n\t\t\t\t\tif (parsed.valid) setText(formatJsonValue(parsed.value, indent, quoteParsedString));\n\t\t\t\t}}\n\t\t\t\t{...field.textareaProps}\n\t\t\t\t\taria-describedby={[field.textareaProps?.['aria-describedby'], error || parseError || field.helperText || getFieldHint(field) ? `${fieldId}-supporting` : undefined].filter(Boolean).join(' ') || undefined}\n\t\t\t/>\n\t\t</FormField>\n\t);\n}\n\nexport function SchemaFormFieldRenderer({\n\tfield,\n\tvalue,\n\tvalues,\n\terror,\n\tdisabled,\n\trequired,\n\tfieldId,\n\tonValueChange,\n\tonError,\n\tstrings,\n\tclassName,\n\tonParseValidityChange,\n}: SchemaFormFieldRendererProps) {\n\tconst fieldType = field.type ?? 'text';\n\tconst commonFieldProps = {\n\t\tlabel: field.label,\n\t\trequired,\n\t\thint: getFieldHint(field),\n\t\thelperText: field.helperText,\n\t\terror,\n\t\thtmlFor: fieldId,\n\t\tsupportingTextId: `${fieldId}-supporting`,\n\t\tclassName: cn('schema-form-field--component', className),\n\t};\n\n\tconst controlClassName = field.controlClassName;\n\tconst describedBy = error || field.helperText || getFieldHint(field) ? `${fieldId}-supporting` : undefined;\n\n\tif (fieldType === 'custom' && field.type === 'custom') {\n\t\treturn (\n\t\t\t<div className={cn('schema-form-field--component schema-form-field--custom', className)}>\n\t\t\t\t{field.render({ field, value, values, error, disabled, required, fieldId, onValueChange, onError })}\n\t\t\t</div>\n\t\t);\n\t}\n\n\tif (fieldType === 'switch' && field.type === 'switch') {\n\t\tconst checked = toBooleanValue(value);\n\t\tif (field.switchStyle === 'card') {\n\t\t\treturn (\n\t\t\t\t<FormField error={error} supportingTextId={`${fieldId}-supporting`} className={cn('schema-form-field--component schema-form-field--switch-card', className)}>\n\t\t\t\t\t<SwitchCard\n\t\t\t\t\tlabel={field.label}\n\t\t\t\t\t\tdescription={field.description}\n\t\t\t\t\t\thint={field.hint}\n\t\t\t\t\t\tname={field.key}\n\t\t\t\t\t\tvalue={checked}\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tinvalid={Boolean(error)}\n\t\t\t\t\t\tclassName={controlClassName}\n\t\t\t\t\t\tonValueChange={(next) => onValueChange(next)}\n\t\t\t\t\t\t{...field.switchCardProps}\n\t\t\t\t\taria-describedby={[field.switchCardProps?.['aria-describedby'], error ? `${fieldId}-supporting` : undefined].filter(Boolean).join(' ') || undefined}\n\t\t\t\t\t/>\n\t\t\t\t</FormField>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<FormField error={error} supportingTextId={`${fieldId}-supporting`} className={cn('schema-form-field--component schema-form-field--switch', className)}>\n\t\t\t\t<ToggleField\n\t\t\t\t\tlabel={field.label}\n\t\t\t\t\tdescription={field.description ?? field.hint}\n\t\t\t\t\tname={field.key}\n\t\t\t\t\tvalue={checked}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tinvalid={Boolean(error)}\n\t\t\t\t\tclassName={controlClassName}\n\t\t\t\t\tonValueChange={(next) => onValueChange(next)}\n\t\t\t\t\t{...field.switchProps}\n\t\t\t\t\taria-describedby={[field.switchProps?.['aria-describedby'], error ? `${fieldId}-supporting` : undefined].filter(Boolean).join(' ') || undefined}\n\t\t\t\t/>\n\t\t\t</FormField>\n\t\t);\n\t}\n\n\tif (fieldType === 'json') {\n\t\treturn (\n\t\t\t<JsonFieldControl\n\t\t\t\tfield={field}\n\t\t\t\tvalue={value}\n\t\t\t\tvalues={values}\n\t\t\t\terror={error}\n\t\t\t\tdisabled={disabled}\n\t\t\t\trequired={required}\n\t\t\t\tfieldId={fieldId}\n\t\t\t\tonValueChange={onValueChange}\n\t\t\t\tonError={onError}\n\t\t\t\tstrings={strings}\n\t\t\t\tonParseValidityChange={onParseValidityChange}\n\t\t\t/>\n\t\t);\n\t}\n\n\tif (fieldType === 'textarea' && field.type === 'textarea') {\n\t\tconst displayValue = getTextDisplayValue(field, value, values, onError);\n\t\treturn (\n\t\t\t<FormField {...commonFieldProps}>\n\t\t\t\t<Textarea\n\t\t\t\t\taria-describedby={describedBy}\n\t\t\t\t\tid={fieldId}\n\t\t\t\t\tname={field.key}\n\t\t\t\t\tvalue={displayValue}\n\t\t\t\t\trows={field.rows}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\trequired={required}\n\t\t\t\t\tinvalid={Boolean(error)}\n\t\t\t\t\tplaceholder={field.placeholder}\n\t\t\t\t\tclassName={controlClassName}\n\t\t\t\t\tonChange={(event) => onValueChange(parseTextValue(field, event.target.value, values, onError))}\n\t\t\t\t\t{...field.textareaProps}\n\t\t\t\t/>\n\t\t\t</FormField>\n\t\t);\n\t}\n\n\tif ((fieldType === 'number' || fieldType === 'integer' || fieldType === 'decimal') && (\n\t\tfield.type === 'number' || field.type === 'integer' || field.type === 'decimal'\n\t)) {\n\t\tconst integer = field.type === 'integer';\n\t\tconst decimalPlaces = integer ? 0 : field.decimalPlaces ?? (field.type === 'decimal' ? 2 : 4);\n\t\treturn (\n\t\t\t<FormField {...commonFieldProps}>\n\t\t\t\t<NumberFieldControl\n\t\t\t\t\tfield={field}\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tvalues={values}\n\t\t\t\t\tonParsedChange={onValueChange}\n\t\t\t\t\tonParseError={onError}\n\t\t\t\t\tid={fieldId}\n\t\t\t\t\tname={field.key}\n\t\t\t\t\tmin={field.min}\n\t\t\t\t\tmax={field.max}\n\t\t\t\t\tstep={field.step}\n\t\t\t\t\tdecimalPlaces={decimalPlaces}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\trequired={required}\n\t\t\t\t\tinvalid={Boolean(error)}\n\t\t\t\t\tplaceholder={field.placeholder}\n\t\t\t\t\tclassName={controlClassName}\n\t\t\t\t\t{...field.numberProps}\n\t\t\t\t\taria-describedby={[field.numberProps?.['aria-describedby'], describedBy].filter(Boolean).join(' ') || undefined}\n\t\t\t\t/>\n\t\t\t</FormField>\n\t\t);\n\t}\n\n\tif (fieldType === 'select' && field.type === 'select') {\n\t\tconst options = field.options.map((option) => ({\n\t\t\tvalue: option.value,\n\t\t\tlabel: option.label,\n\t\t\tdisabled: option.disabled,\n\t\t\ticon: optionIconNode(option),\n\t\t}));\n\n\t\treturn (\n\t\t\t<FormField {...commonFieldProps}>\n\t\t\t\t<Select\n\t\t\t\t\tname={field.key}\n\t\t\t\t\tvalue={toStringValue(value)}\n\t\t\t\t\toptions={options}\n\t\t\t\t\tallowClear={field.allowClear}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\trequired={required}\n\t\t\t\t\tinvalid={Boolean(error)}\n\t\t\t\t\tplaceholder={field.placeholder}\n\t\t\t\t\taria-label={field.label}\n\t\t\t\t\tclassName={controlClassName}\n\t\t\t\t\tonValueChange={(next) => onValueChange(next ?? null)}\n\t\t\t\t\t{...field.selectProps}\n\t\t\t\t\taria-describedby={[field.selectProps?.['aria-describedby'], describedBy].filter(Boolean).join(' ') || undefined}\n\t\t\t\t/>\n\t\t\t</FormField>\n\t\t);\n\t}\n\n\tif (fieldType === 'radio-cards' && field.type === 'radio-cards') {\n\t\treturn (\n\t\t\t<FormField {...commonFieldProps}>\n\t\t\t\t<CardRadioGroup\n\t\t\t\t\tname={field.key}\n\t\t\t\t\tvalue={toStringValue(value)}\n\t\t\t\t\toptions={field.options}\n\t\t\t\t\tcolumns={field.columns}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tinvalid={Boolean(error)}\n\t\t\t\t\tclassName={controlClassName}\n\t\t\t\t\tonValueChange={(next) => onValueChange(next)}\n\t\t\t\t\t{...field.radioProps}\n\t\t\t\t\taria-describedby={[field.radioProps?.['aria-describedby'], describedBy].filter(Boolean).join(' ') || undefined}\n\t\t\t\t/>\n\t\t\t</FormField>\n\t\t);\n\t}\n\n\tif (fieldType === 'checkbox-cards' && field.type === 'checkbox-cards') {\n\t\treturn (\n\t\t\t<FormField {...commonFieldProps}>\n\t\t\t\t<CardCheckboxGroup\n\t\t\t\t\tname={field.key}\n\t\t\t\t\tvalue={toStringArray(value)}\n\t\t\t\t\toptions={field.options}\n\t\t\t\t\tcolumns={field.columns}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tinvalid={Boolean(error)}\n\t\t\t\t\tclassName={controlClassName}\n\t\t\t\t\tonValueChange={(next) => onValueChange(next)}\n\t\t\t\t\t{...field.checkboxProps}\n\t\t\t\t\taria-describedby={[field.checkboxProps?.['aria-describedby'], describedBy].filter(Boolean).join(' ') || undefined}\n\t\t\t\t/>\n\t\t\t</FormField>\n\t\t);\n\t}\n\n\tif (fieldType === 'tags' && field.type === 'tags') {\n\t\treturn (\n\t\t\t<FormField {...commonFieldProps}>\n\t\t\t\t<TagsInput\n\t\t\t\t\tid={fieldId}\n\t\t\t\t\tvalue={toStringArray(value)}\n\t\t\t\t\trecommendations={field.recommendations}\n\t\t\t\t\tmaxTags={field.maxTags}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tinvalid={Boolean(error)}\n\t\t\t\t\tplaceholder={field.placeholder}\n\t\t\t\t\tclassName={controlClassName}\n\t\t\t\t\tonValueChange={(next) => onValueChange(next)}\n\t\t\t\t\t{...field.tagsProps}\n\t\t\t\t\taria-describedby={[field.tagsProps?.['aria-describedby'], describedBy].filter(Boolean).join(' ') || undefined}\n\t\t\t\t/>\n\t\t\t</FormField>\n\t\t);\n\t}\n\n\tconst inputType = fieldType === 'text' ? 'text' : fieldType;\n\tconst nativeInputProps = field.type === undefined || field.type === 'text' || field.type === 'email' || field.type === 'password' || field.type === 'url' || field.type === 'tel' || field.type === 'search' ? field.inputProps : undefined;\n\tconst displayValue = getTextDisplayValue(field, value, values, onError);\n\n\treturn (\n\t\t<FormField {...commonFieldProps}>\n\t\t\t<Input\n\t\t\t\tid={fieldId}\n\t\t\t\tname={field.key}\n\t\t\t\ttype={inputType}\n\t\t\t\tvalue={displayValue}\n\t\t\t\tdisabled={disabled}\n\t\t\t\trequired={required}\n\t\t\t\tinvalid={Boolean(error)}\n\t\t\t\tplaceholder={field.placeholder}\n\t\t\t\tclassName={controlClassName}\n\t\t\t\tonChange={(event) => onValueChange(parseTextValue(field, event.target.value, values, onError))}\n\t\t\t\t{...nativeInputProps}\n\t\t\t\taria-describedby={[nativeInputProps?.['aria-describedby'], describedBy].filter(Boolean).join(' ') || undefined}\n\t\t\t/>\n\t\t</FormField>\n\t);\n}\n\nSchemaFormFieldRenderer.displayName = 'SchemaFormFieldRenderer';\n","export interface SchemaFormStrings {\n\tsubmitLabel: string;\n\tresetLabel: string;\n\tdefaultSectionTitle: string;\n\temptyTitle: string;\n\temptyDescription: string;\n\tjsonParseError: string;\n\tvalidationError: string;\n\tformatRequiredError: (label: string) => string;\n}\n\nexport const defaultSchemaFormStrings: SchemaFormStrings = {\n\tsubmitLabel: 'Save changes',\n\tresetLabel: 'Reset',\n\tdefaultSectionTitle: 'General',\n\temptyTitle: 'No fields configured',\n\temptyDescription: 'Add fields to the schema to render a form.',\n\tjsonParseError: 'Enter valid JSON.',\n\tvalidationError: 'Invalid value.',\n\tformatRequiredError: (label) => `${label} is required.`,\n};\n","import { Fragment, useId, useMemo } from 'react';\n\nimport { Card } from '../../base/cards';\nimport { ContentBlock } from '../../base/display';\nimport { Stack } from '../../base/structure';\nimport {compositionRhythm} from '../../base/structure/composition.recipes';\nimport { Text } from '../../typography';\nimport {copyRoleProps} from '../../typography/text.styles';\nimport { useStrings } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\n\nimport { useSchemaForm } from './hooks';\nimport {\n\tSchemaFormActions,\n\tSchemaFormEmpty,\n\tSchemaFormFieldRenderer,\n} from './partials';\nimport {\n\tdefaultSchemaFormStrings,\n\ttype SchemaFormStrings,\n} from './schema-form.strings';\nimport type {\n\tResolvedSchemaFormSection,\n\tSchemaFormField,\n\tSchemaFormFieldContext,\n\tSchemaFormProps,\n\tSchemaFormSubmitHelpers,\n} from './schema-form.types';\nimport {\n\tSCHEMA_FORM_COLUMNS,\n\tSCHEMA_FORM_FIELD_WIDTH,\n\tisFieldDisabled,\n\tresolveSchemaSections,\n} from './schema-form.utils';\n\nfunction toDomId(value: string): string {\n\treturn value.replace(/[^a-zA-Z0-9_-]/g, '-');\n}\n\nfunction SectionHeading({ section }: { section: ResolvedSchemaFormSection }) {\n\tif (!section.title && !section.description) return null;\n\n\treturn (\n\t\t<Stack gap=\"normal\" className=\"schema-form--section-heading\">\n\t\t\t{!!section.title && (\n\t\t\t\t<Text {...copyRoleProps.subsection} className=\"schema-form--section-title\">\n\t\t\t\t\t{section.title}\n\t\t\t\t</Text>\n\t\t\t)}\n\t\t\t{!!section.description && (\n\t\t\t\t<Text {...copyRoleProps.structuralDescription} className=\"schema-form--section-description\">\n\t\t\t\t\t{section.description}\n\t\t\t\t</Text>\n\t\t\t)}\n\t\t</Stack>\n\t);\n}\n\nexport function SchemaForm({\n\tschema,\n\tvalue,\n\tdefaultValue,\n\terrors,\n\tdisabled = false,\n\tlayout = 'form',\n\tcolumns = 2,\n\tid,\n\tname,\n\ttitle,\n\tdescription,\n\theaderSlot,\n\tfooterSlot,\n\tactionsSlot,\n\temptySlot,\n\tshowActions,\n\tsubmitLabel,\n\tresetLabel,\n\tsubmitDisabled = false,\n\tresetDisabled = false,\n\tsubmitting = false,\n\tonValueChange,\n\tonFieldChange,\n\tonSubmit,\n\tonReset,\n\tonError,\n\trenderField,\n\trenderSection,\n\tstrings: stringsProp,\n\tclassName,\n\tcontentClassName,\n\tsectionClassName,\n\tfieldClassName,\n}: SchemaFormProps) {\n\tconst generatedId = useId();\n\tconst formId = id ?? `schema-form-${generatedId}`;\n\tconst strings: SchemaFormStrings = useStrings(defaultSchemaFormStrings, stringsProp);\n\tconst form = useSchemaForm({\n\t\tfields: schema.fields,\n\t\tvalue,\n\t\tdefaultValue,\n\t\terrors,\n\t\tonValueChange,\n\t\tonFieldChange,\n\t\tformatRequiredError: strings.formatRequiredError,\n\t\tvalidationError: strings.validationError,\n\t\tonError,\n\t});\n\n\tconst sections = useMemo(\n\t\t() => resolveSchemaSections(schema, form.values, strings.defaultSectionTitle, columns, onError),\n\t\t[columns, form.values, onError, schema, strings.defaultSectionTitle],\n\t);\n\tconst hasFields = sections.some((section) => section.fields.length > 0);\n\n\tconst helpers: SchemaFormSubmitHelpers = {\n\t\tsetFieldValue: form.setFieldValue,\n\t\tsetValues: form.setValues,\n\t\treset: form.reset,\n\t\tvalidate: form.validate,\n\t};\n\n\tconst shouldShowActions = showActions ?? Boolean(onSubmit || onReset || actionsSlot);\n\tconst resolvedSubmitLabel = submitLabel ?? strings.submitLabel;\n\tconst resolvedResetLabel = resetLabel ?? strings.resetLabel;\n\n\tconst renderFieldNode = (field: SchemaFormField) => {\n\t\tconst fieldId = `${formId}-${toDomId(field.key)}`;\n\t\tconst fieldDisabled = disabled || isFieldDisabled(field, form.values, onError);\n\t\tconst context: SchemaFormFieldContext = {\n\t\t\tfield,\n\t\t\tvalue: form.getFieldValue(field.key),\n\t\t\tvalues: form.values,\n\t\t\terror: form.getFieldError(field.key),\n\t\t\tdisabled: fieldDisabled,\n\t\t\trequired: Boolean(field.required),\n\t\t\tfieldId,\n\t\t\tonValueChange: (nextValue) => form.setFieldValue(field.key, nextValue),\n\t\t\tonError,\n\t\t};\n\t\tconst defaultField = (\n\t\t\t<SchemaFormFieldRenderer\n\t\t\t\t{...context}\n\t\t\t\tstrings={strings}\n\t\t\t\tonParseValidityChange={form.setFieldParseValidity}\n\t\t\t/>\n\t\t);\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tkey={field.key}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'schema-form--field',\n\t\t\t\t\tSCHEMA_FORM_FIELD_WIDTH[field.width ?? 'auto'],\n\t\t\t\t\tfield.className,\n\t\t\t\t\tfieldClassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{renderField?.({ ...context, defaultField }) ?? defaultField}\n\t\t\t</div>\n\t\t);\n\t};\n\n\tconst renderSectionFields = (section: ResolvedSchemaFormSection) => (\n\t\t<div className={cn('schema-form--section-fields', SCHEMA_FORM_COLUMNS[section.columns])}>\n\t\t\t{section.fields.map(renderFieldNode)}\n\t\t</div>\n\t);\n\n\tconst renderPlainSection = (section: ResolvedSchemaFormSection) => {\n\t\tconst fields = renderSectionFields(section);\n\t\tconst custom = renderSection?.({ section, fields, values: form.values });\n\t\tif (custom !== undefined && custom !== null) {\n\t\t\treturn <Fragment key={section.id}>{custom}</Fragment>;\n\t\t}\n\n\t\treturn (\n\t\t\t<Stack\n\t\t\t\tkey={section.id}\n\t\t\t\trender={<section />}\n\t\t\t\tgap=\"lg\"\n\t\t\t\tclassName={cn('schema-form--section', section.className, sectionClassName)}\n\t\t\t>\n\t\t\t\t<SectionHeading section={section} />\n\t\t\t\t{fields}\n\t\t\t\t{!!section.footerSlot && (\n\t\t\t\t\t<div className=\"schema-form--section-footer\">\n\t\t\t\t\t\t{section.footerSlot}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Stack>\n\t\t);\n\t};\n\n\tconst renderCardSection = (section: ResolvedSchemaFormSection) => {\n\t\tconst fields = renderSectionFields(section);\n\t\tconst custom = renderSection?.({ section, fields, values: form.values });\n\t\tif (custom !== undefined && custom !== null) {\n\t\t\treturn <Fragment key={section.id}>{custom}</Fragment>;\n\t\t}\n\n\t\treturn (\n\t\t\t<ContentBlock\n\t\t\t\tkey={section.id}\n\t\t\t\tclassName={cn('schema-form--section-card', section.className, sectionClassName)}\n\t\t\t\ticon={section.icon}\n\t\t\t\ttitle={section.title}\n\t\t\t\tdescription={section.description}\n\t\t\t\tfooterSlot={section.footerSlot}\n\t\t\t>\n\t\t\t\t{fields}\n\t\t\t</ContentBlock>\n\t\t);\n\t};\n\n\tconst actions = actionsSlot ?? (\n\t\tshouldShowActions ? (\n\t\t\t<SchemaFormActions\n\t\t\t\tsubmitLabel={resolvedSubmitLabel}\n\t\t\t\tresetLabel={resolvedResetLabel}\n\t\t\t\tshowReset={Boolean(onReset)}\n\t\t\t\tdisabled={disabled}\n\t\t\t\tsubmitDisabled={submitDisabled}\n\t\t\t\tresetDisabled={resetDisabled}\n\t\t\t\tsubmitting={submitting}\n\t\t\t\tonReset={() => {\n\t\t\t\t\tconst nextValues = form.reset();\n\t\t\t\t\tonReset?.(nextValues, helpers);\n\t\t\t\t}}\n\t\t\t/>\n\t\t) : null\n\t);\n\n\tconst empty = emptySlot ?? (\n\t\t<SchemaFormEmpty\n\t\t\ttitle={strings.emptyTitle}\n\t\t\tdescription={strings.emptyDescription}\n\t\t/>\n\t);\n\n\treturn (\n\t\t<form\n\t\t\tid={formId}\n\t\t\tname={name}\n\t\t\tnoValidate\n\t\t\tclassName={cn('schema-form--component @container/schema-form', className)}\n\t\t\tonSubmit={async (event) => {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tif (disabled || submitDisabled || submitting) return;\n\t\t\t\tconst submittedValues = form.getValues();\n\t\t\t\tconst valid = form.validate();\n\t\t\t\tif (!valid) return;\n\t\t\t\ttry {\n\t\t\t\t\tawait onSubmit?.(submittedValues, helpers, event);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tonError?.(error);\n\t\t\t\t}\n\t\t\t}}\n\t\t>\n\t\t\t{layout === 'cards' ? (\n\t\t\t\t<Stack gap={compositionRhythm.subjects} className={cn('schema-form--cards', contentClassName)}>\n\t\t\t\t\t{!!(title ?? schema.title ?? description ?? schema.description ?? headerSlot) && (\n\t\t\t\t\t\t<Stack direction=\"horizontal\" align=\"start\" justify=\"between\" gap=\"xl\" className=\"schema-form--header\">\n\t\t\t\t\t\t<Stack gap=\"normal\" className=\"min-w-0\">\n\t\t\t\t\t\t\t\t{!!(title ?? schema.title) && (\n\t\t\t\t\t\t\t\t\t<Text type=\"inherit\" size=\"base\" weight=\"semibold\" className=\"schema-form--title\">\n\t\t\t\t\t\t\t\t\t\t{title ?? schema.title}\n\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{!!(description ?? schema.description) && (\n\t\t\t\t\t\t\t\t\t<Text type=\"secondary\" className=\"schema-form--description\">\n\t\t\t\t\t\t\t\t\t\t{description ?? schema.description}\n\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t{headerSlot}\n\t\t\t\t\t\t</Stack>\n\t\t\t\t\t)}\n\t\t\t\t\t{hasFields ? sections.map(renderCardSection) : empty}\n\t\t\t\t\t{footerSlot}\n\t\t\t\t\t{actions}\n\t\t\t\t</Stack>\n\t\t\t) : (\n\t\t\t\t\t<Card\n\t\t\t\t\t\tsurface=\"flat\"\n\t\t\t\t\t\tpadding=\"none\"\n\t\t\t\t\t\tclassName=\"schema-form--surface\"\n\t\t\t\t\t\tgap={compositionRhythm.subjects}\n\t\t\t\t\t\tcontentGap={compositionRhythm.subjects}\n\t\t\t\t\t\tcontentClassName={cn('schema-form--content', contentClassName)}\n\t\t\t\t\t\ttitle={title ?? schema.title}\n\t\t\t\t\t\tdescription={description ?? schema.description}\n\t\t\t\t\t\theaderEnd={headerSlot}\n\t\t\t\t\t\tfooterSlot={\n\t\t\t\t\t\t\tfooterSlot || actions ? (\n\t\t\t\t\t\t\t\t<Stack gap=\"lg\" className=\"schema-form--footer\">\n\t\t\t\t\t\t\t\t\t{footerSlot}\n\t\t\t\t\t\t\t\t\t{actions}\n\t\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t) : undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{hasFields ? sections.map(renderPlainSection) : empty}\n\t\t\t\t\t</Card>\n\t\t\t)}\n\t\t</form>\n\t);\n}\n\nSchemaForm.displayName = 'SchemaForm';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAiBA,IAAaiB,KAAiD;CAC7D,GAAG;CACH,GAAG;CACH,GAAG;AACJ,GAEaC,KAAgE;CAC5E,MAAM;CACN,MAAM;CACN,OAAO;CACP,MAAM;AACP;AAEA,SAAgBC,EACf,GACA,GACA,GACU;CACV,IAAI,OAAOC,EAAM,UAAW,YAC3B,IAAI;EACH,OAAOA,EAAM,OAAOC,CAAM;CAC3B,SAASC,GAAO;EAEf,OADAC,IAAUD,CAAK,GACR;CACR;CAED,OAAOF,EAAM,UAAU;AACxB;AAEA,SAAgBI,GACf,GACA,GACA,GACU;CACV,IAAI,OAAOJ,EAAM,YAAa,YAC7B,IAAI;EACH,OAAOA,EAAM,SAASC,CAAM;CAC7B,SAASC,GAAO;EAEf,OADAC,IAAUD,CAAK,GACR;CACR;CAED,OAAOF,EAAM,YAAY;AAC1B;AAEA,SAAgBK,GACf,GACA,GACA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AAC5L,GAAD;GACC,SAAQ;GACR,SAAQ;GACR,WAAU;GACV,KAAKC,EAAkB;GACvB,YAAYA,EAAkB;GAC9B,kBAAkBgG,EAAG,wBAAwBgG,CAAgB;GAC7D,OAAOC,KAASxK,EAAO;GACvB,aAAayK,KAAezK,EAAO;GACnC,WAAW0K;GACX,YACCC,KAAcT,IACb,kBAAC7L,GAAD;IAAO,KAAI;IAAK,WAAU;IAA1B,UAAA,CACEsM,GACAT,CACK;GACJ,CAAA,IAAA,KAAA;GAGJ,UAAAtB,KAAYzI,EAAS,IAAIyJ,EAAkB,IAAIO;EAC3C,CAAA;CAEH,CAAA;AAER;AAEA,EAAW,cAAc"}
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import { useStrings as e } from "../lib/strings.js";
3
- import { t } from "../utils-CF3c95Io.js";
4
- import { t as n } from "../feedback-DZNL5Lg1.js";
3
+ import { t } from "../utils-DhuoqFy4.js";
4
+ import { t as n } from "../feedback-Dzo1xtAU.js";
5
5
  import { t as r } from "../use-debounced-callback-Cx1h-hdv.js";
6
- import { r as i } from "../combobox-CBJDs6w_.js";
6
+ import { r as i } from "../combobox-C2JiSQPc.js";
7
7
  import { useCallback as a, useEffect as o, useMemo as s, useRef as c, useState as l } from "react";
8
8
  import { jsx as u, jsxs as d } from "react/jsx-runtime";
9
9
  //#region src/components/features/suggestions/hooks/use-suggestions.ts
@@ -86,60 +86,67 @@ var h = {
86
86
  //#endregion
87
87
  //#region src/components/features/suggestions/suggestions.tsx
88
88
  function g(r) {
89
- let { fetchData: a, itemKey: o, itemText: c, onValueChange: l, renderItem: f, minQueryLength: p = 1, debounceMs: g = 250, requestDelay: _ = 0, preload: v = !1, query: y, defaultQuery: b, onQueryChange: x, value: S, defaultValue: C, allowClear: w = !0, clearInputOnClose: T = !1, open: E, defaultOpen: D, onOpenChange: O, disabled: k = !1, className: A, onError: j, renderError: M, strings: N } = r, P = e(h, N), { items: F, isLoading: I, query: L, setQuery: R, value: z, setValue: B, open: V, setOpen: H, error: U, isError: W, retry: G } = m({
90
- fetchData: a,
91
- minQueryLength: p,
92
- debounceMs: g,
93
- requestDelay: _,
94
- preload: v,
95
- query: y,
96
- defaultQuery: b,
97
- onQueryChange: x,
98
- value: S,
99
- defaultValue: C,
100
- onValueChange: l,
101
- open: E,
102
- defaultOpen: D,
103
- onOpenChange: O,
104
- onError: j
105
- }), K = s(() => ({
106
- placeholder: P.placeholder,
107
- noResults: P.emptyMessage,
108
- searching: P.loadingMessage,
109
- typeToSearch: P.startTypingMessage
110
- }), [P]), q = W && U !== null ? M?.({
111
- error: U,
112
- query: L,
113
- retry: G
89
+ let { fetchData: o, itemKey: l, itemText: f, onValueChange: p, renderItem: g, minQueryLength: _ = 1, debounceMs: v = 250, requestDelay: y = 0, preload: b = !1, query: x, defaultQuery: S, onQueryChange: C, value: w, defaultValue: T, allowClear: E = !0, clearInputOnClose: D = !1, open: O, defaultOpen: k, onOpenChange: A, disabled: j = !1, className: M, onError: N, renderError: P, strings: F } = r, I = e(h, F), L = c(null), { items: R, isLoading: z, query: B, setQuery: V, value: H, setValue: U, open: W, setOpen: G, error: K, isError: q, retry: J } = m({
90
+ fetchData: o,
91
+ minQueryLength: _,
92
+ debounceMs: v,
93
+ requestDelay: y,
94
+ preload: b,
95
+ query: x,
96
+ defaultQuery: S,
97
+ onQueryChange: C,
98
+ value: w,
99
+ defaultValue: T,
100
+ onValueChange: p,
101
+ open: O,
102
+ defaultOpen: k,
103
+ onOpenChange: A,
104
+ onError: N
105
+ }), Y = s(() => ({
106
+ placeholder: I.placeholder,
107
+ noResults: I.emptyMessage,
108
+ searching: I.loadingMessage,
109
+ typeToSearch: I.startTypingMessage
110
+ }), [I]), X = a(() => {
111
+ W || G(!0), L.current?.focus(), J();
112
+ }, [
113
+ W,
114
+ J,
115
+ G
116
+ ]), Z = q && K !== null ? P?.({
117
+ error: K,
118
+ query: B,
119
+ retry: X
114
120
  }) ?? /* @__PURE__ */ u(n, {
115
121
  variant: "inline",
116
- title: P.errorMessage,
117
- onRetry: G,
118
- retryLabel: P.retry,
122
+ title: I.errorMessage,
123
+ onRetry: X,
124
+ retryLabel: I.retry,
119
125
  className: "suggestions-combobox--error"
120
126
  }) : null;
121
127
  return /* @__PURE__ */ d("div", {
122
- className: t("suggestions--component suggestions-combobox--component", A),
128
+ className: t("suggestions--component suggestions-combobox--component", M),
123
129
  children: [/* @__PURE__ */ u(i, {
130
+ ref: L,
124
131
  className: "suggestions-combobox--control",
125
- items: F,
126
- searchValue: L,
127
- onSearchValueChange: R,
128
- selectedValue: z,
129
- onSelectedValueChange: B,
130
- getItemLabel: c,
131
- getItemKey: (e) => String(o(e)),
132
- renderItem: f,
133
- minSearchLength: p,
134
- loading: I,
135
- strings: K,
136
- clearable: w,
137
- open: V,
138
- onOpenChange: (e) => {
139
- H(e), !e && T && R("");
140
- },
141
- disabled: k
142
- }), q]
132
+ items: R,
133
+ searchValue: B,
134
+ onSearchValueChange: V,
135
+ selectedValue: H,
136
+ onSelectedValueChange: U,
137
+ getItemLabel: f,
138
+ getItemKey: (e) => String(l(e)),
139
+ renderItem: g,
140
+ minSearchLength: _,
141
+ loading: !q && z,
142
+ showListContent: !q,
143
+ strings: Y,
144
+ clearable: E,
145
+ open: W,
146
+ onOpenChange: G,
147
+ clearSearchOnClose: D && !q,
148
+ disabled: j
149
+ }), Z]
143
150
  });
144
151
  }
145
152
  g.displayName = "SuggestionsCombobox";
@@ -1 +1 @@
1
- {"version":3,"file":"suggestions.js","names":["ErrorState","useDebouncedCallback","Combobox","wait","signal","timer","handleAbort","resolve","ms","isAbortError","error","useSuggestions","controlledQuery","controlledValue","controlledOpen","config","items","setItems","useState","internalQuery","setInternalQuery","defaultQuery","internalValue","setInternalValue","defaultValue","internalOpen","setInternalOpen","defaultOpen","isLoading","setIsLoading","setError","reloadTick","setReloadTick","fetchDataRef","useRef","fetchData","onErrorRef","onError","query","value","open","setQuery","useCallback","nextQuery","onQueryChange","setValue","nextValue","onValueChange","setOpen","nextOpen","onOpenChange","retry","current","runFetch","delayBeforeRequest","result","debounceMs","useEffect","controller","minQueryLength","preload","requestDelay","defaultSuggestionsStrings","SuggestionsCombobox","stringsProp","props","strings","useStrings","comboboxStrings","useMemo","errorNode","isError","renderError","cn","className","itemText","itemKey","item","allowClear","isOpen","clearInputOnClose"],"sources":["../../src/components/features/suggestions/hooks/use-suggestions.ts","../../src/components/features/suggestions/suggestions.strings.ts","../../src/components/features/suggestions/suggestions.tsx"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react';\n\nimport { DEFAULT_DEBOUNCE_MS, useDebouncedCallback } from '../../../../hooks/use-debounced-callback';\n\nimport type {\n\tUseSuggestionsConfig,\n\tUseSuggestionsResult,\n} from '../suggestions.types';\n\nconst wait = (ms: number, signal: AbortSignal): Promise<void> =>\n\tnew Promise((resolve) => {\n\t\tif (signal.aborted) {\n\t\t\tresolve();\n\t\t\treturn;\n\t\t}\n\n\t\tconst timer = setTimeout(() => {\n\t\t\tsignal.removeEventListener('abort', handleAbort);\n\t\t\tresolve();\n\t\t}, ms);\n\t\tconst handleAbort = () => {\n\t\t\tclearTimeout(timer);\n\t\t\tresolve();\n\t\t};\n\t\tsignal.addEventListener('abort', handleAbort, { once: true });\n\t});\n\nfunction isAbortError(error: unknown): boolean {\n\treturn Boolean(error && (error as { name?: string }).name === 'AbortError');\n}\n\n/**\n * Headless data-fetching state machine for the suggestions feature.\n *\n * Returns the search/selection/open state plus the latest items + loading flag.\n * Consumers that want a different visual layer can build their own UI on top\n * of this hook without touching `<SuggestionsCombobox>`.\n */\nexport function useSuggestions<T>(\n\tconfig: UseSuggestionsConfig<T>,\n): UseSuggestionsResult<T> {\n\tconst {\n\t\tfetchData,\n\t\tminQueryLength = 1,\n\t\tdebounceMs = DEFAULT_DEBOUNCE_MS,\n\t\trequestDelay = 0,\n\t\tpreload = false,\n\t\tquery: controlledQuery,\n\t\tdefaultQuery = '',\n\t\tonQueryChange,\n\t\tvalue: controlledValue,\n\t\tdefaultValue = null,\n\t\tonValueChange,\n\t\topen: controlledOpen,\n\t\tdefaultOpen = false,\n\t\tonOpenChange,\n\t\tonError,\n\t} = config;\n\n\tconst [items, setItems] = useState<T[]>([]);\n\tconst [internalQuery, setInternalQuery] = useState(defaultQuery);\n\tconst [internalValue, setInternalValue] = useState<T | null>(defaultValue);\n\tconst [internalOpen, setInternalOpen] = useState(defaultOpen);\n\tconst [isLoading, setIsLoading] = useState<boolean>(false);\n\tconst [error, setError] = useState<unknown | null>(null);\n\tconst [reloadTick, setReloadTick] = useState(0);\n\tconst fetchDataRef = useRef(fetchData);\n\tconst onErrorRef = useRef(onError);\n\n\tfetchDataRef.current = fetchData;\n\tonErrorRef.current = onError;\n\n\tconst query = controlledQuery ?? internalQuery;\n\tconst value = controlledValue !== undefined ? controlledValue : internalValue;\n\tconst open = controlledOpen ?? internalOpen;\n\n\tconst setQuery = useCallback((nextQuery: string) => {\n\t\tif (controlledQuery === undefined) {\n\t\t\tsetInternalQuery(nextQuery);\n\t\t}\n\t\tonQueryChange?.(nextQuery);\n\t}, [controlledQuery, onQueryChange]);\n\n\tconst setValue = useCallback((nextValue: T | null) => {\n\t\tif (controlledValue === undefined) {\n\t\t\tsetInternalValue(nextValue);\n\t\t}\n\t\tonValueChange?.(nextValue);\n\t}, [controlledValue, onValueChange]);\n\n\tconst setOpen = useCallback((nextOpen: boolean) => {\n\t\tif (controlledOpen === undefined) {\n\t\t\tsetInternalOpen(nextOpen);\n\t\t}\n\t\tonOpenChange?.(nextOpen);\n\t}, [controlledOpen, onOpenChange]);\n\n\tconst retry = useCallback(() => {\n\t\tsetReloadTick((current) => current + 1);\n\t}, []);\n\n\tconst runFetch = useDebouncedCallback(\n\t\t(\n\t\t\tnextQuery: string,\n\t\t\tdelayBeforeRequest: number,\n\t\t\tsignal: AbortSignal,\n\t\t) => {\n\t\t\tvoid (async () => {\n\t\t\t\tsetIsLoading(true);\n\t\t\t\tsetError(null);\n\t\t\t\ttry {\n\t\t\t\t\tif (delayBeforeRequest > 0) {\n\t\t\t\t\t\tawait wait(delayBeforeRequest, signal);\n\t\t\t\t\t}\n\t\t\t\t\tif (signal.aborted) return;\n\n\t\t\t\t\tconst result = await fetchDataRef.current(nextQuery, { signal });\n\t\t\t\t\tif (!signal.aborted) {\n\t\t\t\t\t\tsetItems(Array.isArray(result) ? result : []);\n\t\t\t\t\t}\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (!signal.aborted && !isAbortError(error)) {\n\t\t\t\t\t\tsetItems((current) => (current.length === 0 ? current : []));\n\t\t\t\t\t\tsetError(error);\n\t\t\t\t\t\tonErrorRef.current?.(error, nextQuery);\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tif (!signal.aborted) {\n\t\t\t\t\t\tsetIsLoading(false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})();\n\t\t},\n\t\tdebounceMs,\n\t);\n\n\tuseEffect(() => {\n\t\tconst controller = new AbortController();\n\n\t\tconst shouldQuery =\n\t\t\tquery.length >= minQueryLength ||\n\t\t\t(preload && query.length === 0);\n\n\t\tif (!shouldQuery) {\n\t\t\tsetItems((current) => (current.length === 0 ? current : []));\n\t\t\tsetError(null);\n\t\t\tsetIsLoading(false);\n\t\t\treturn () => controller.abort();\n\t\t}\n\n\t\trunFetch(query, requestDelay, controller.signal);\n\n\t\treturn () => {\n\t\t\trunFetch.cancel();\n\t\t\tcontroller.abort();\n\t\t};\n\t}, [\n\t\tminQueryLength,\n\t\tpreload,\n\t\tquery,\n\t\treloadTick,\n\t\trequestDelay,\n\t\trunFetch,\n\t]);\n\n\treturn {\n\t\titems,\n\t\tisLoading,\n\t\terror,\n\t\tisError: error !== null,\n\t\tretry,\n\t\tquery,\n\t\tsetQuery,\n\t\tvalue,\n\t\tsetValue,\n\t\topen,\n\t\tsetOpen,\n\t};\n}\n","/**\n * Default user-facing strings for `<SuggestionsCombobox>`.\n *\n * Consumers wire backend i18n at the call site:\n *\n * <SuggestionsCombobox strings={{ emptyMessage: t('search.empty') }} … />\n */\n\nexport interface SuggestionsStrings {\n\tplaceholder: string;\n\temptyMessage: string;\n\tloadingMessage: string;\n\tstartTypingMessage: string;\n\terrorMessage: string;\n\tretry: string;\n}\n\nexport const defaultSuggestionsStrings: SuggestionsStrings = {\n\tplaceholder: 'Search...',\n\temptyMessage: 'No results found.',\n\tloadingMessage: 'Searching...',\n\tstartTypingMessage: 'Type to search.',\n\terrorMessage: 'Failed to load suggestions.',\n\tretry: 'Retry',\n};\n","import { useMemo } from 'react';\n\nimport { Combobox } from '../combobox';\nimport { ErrorState } from '../../base/feedback';\nimport { useStrings } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\n\nimport { useSuggestions } from './hooks';\nimport { defaultSuggestionsStrings } from './suggestions.strings';\nimport type { SuggestionsComboboxProps } from './suggestions.types';\n\nexport function SuggestionsCombobox<T>(props: SuggestionsComboboxProps<T>) {\n\tconst {\n\t\tfetchData,\n\t\titemKey,\n\t\titemText,\n\t\tonValueChange,\n\t\trenderItem,\n\t\tminQueryLength = 1,\n\t\tdebounceMs = 250,\n\t\trequestDelay = 0,\n\t\tpreload = false,\n\t\tquery: controlledQuery,\n\t\tdefaultQuery,\n\t\tonQueryChange,\n\t\tvalue: controlledValue,\n\t\tdefaultValue,\n\t\tallowClear = true,\n\t\tclearInputOnClose = false,\n\t\topen: controlledOpen,\n\t\tdefaultOpen,\n\t\tonOpenChange,\n\t\tdisabled = false,\n\t\tclassName,\n\t\tonError,\n\t\trenderError,\n\t\tstrings: stringsProp,\n\t} = props;\n\n\tconst strings = useStrings(defaultSuggestionsStrings, stringsProp);\n\n\tconst {\n\t\titems,\n\t\tisLoading,\n\t\tquery,\n\t\tsetQuery,\n\t\tvalue,\n\t\tsetValue,\n\t\topen,\n\t\tsetOpen,\n\t\terror,\n\t\tisError,\n\t\tretry,\n\t} = useSuggestions<T>({\n\t\tfetchData,\n\t\tminQueryLength,\n\t\tdebounceMs,\n\t\trequestDelay,\n\t\tpreload,\n\t\tquery: controlledQuery,\n\t\tdefaultQuery,\n\t\tonQueryChange,\n\t\tvalue: controlledValue,\n\t\tdefaultValue,\n\t\tonValueChange,\n\t\topen: controlledOpen,\n\t\tdefaultOpen,\n\t\tonOpenChange,\n\t\tonError,\n\t});\n\n\tconst comboboxStrings = useMemo(\n\t\t() => ({\n\t\t\tplaceholder: strings.placeholder,\n\t\t\tnoResults: strings.emptyMessage,\n\t\t\tsearching: strings.loadingMessage,\n\t\t\ttypeToSearch: strings.startTypingMessage,\n\t\t}),\n\t\t[strings],\n\t);\n\n\tconst errorNode = isError && error !== null\n\t\t? renderError?.({ error, query, retry }) ?? (\n\t\t\t<ErrorState\n\t\t\t\tvariant=\"inline\"\n\t\t\t\ttitle={strings.errorMessage}\n\t\t\t\tonRetry={retry}\n\t\t\t\tretryLabel={strings.retry}\n\t\t\t\tclassName=\"suggestions-combobox--error\"\n\t\t\t/>\n\t\t)\n\t\t: null;\n\n\treturn (\n\t\t<div className={cn('suggestions--component suggestions-combobox--component', className)}>\n\t\t\t<Combobox<T>\n\t\t\t\tclassName=\"suggestions-combobox--control\"\n\t\t\t\titems={items}\n\t\t\t\tsearchValue={query}\n\t\t\t\tonSearchValueChange={setQuery}\n\t\t\t\tselectedValue={value}\n\t\t\t\tonSelectedValueChange={setValue}\n\t\t\t\tgetItemLabel={itemText}\n\t\t\t\tgetItemKey={(item) => String(itemKey(item))}\n\t\t\t\trenderItem={renderItem}\n\t\t\t\tminSearchLength={minQueryLength}\n\t\t\t\tloading={isLoading}\n\t\t\t\tstrings={comboboxStrings}\n\t\t\t\tclearable={allowClear}\n\t\t\t\topen={open}\n\t\t\t\tonOpenChange={(isOpen) => {\n\t\t\t\t\tsetOpen(isOpen);\n\t\t\t\t\tif (!isOpen && clearInputOnClose) {\n\t\t\t\t\t\tsetQuery('');\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\tdisabled={disabled}\n\t\t\t/>\n\t\t\t{errorNode}\n\t\t</div>\n\t);\n}\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0DAA0DC,CAAS;EAAtF,UAAA,CACC,kBAACxE,GAAD;GACC,WAAU;GACH;GACP,aAAaoC;GACb,qBAAqBG;GACrB,eAAeF;GACf,uBAAuBM;GACvB,cAAc8B;GACd,aAAa,MAAS,OAAOC,EAAQC,CAAI,CAAC;GAC9B;GACZ,iBAAiBlB;GACjB,SAAS/B;GACT,SAASwC;GACT,WAAWU;GACL;GACN,eAAe,MAAW;IAEzB,AADA9B,EAAQ+B,CAAM,GACV,CAACA,KAAUC,KACdvC,EAAS,EAAE;GAEb;GACU;EACV,CAAA,GACA6B,CACG;;AAEP;AAEA,EAAoB,cAAc"}
1
+ {"version":3,"file":"suggestions.js","names":["ErrorState","useDebouncedCallback","Combobox","wait","signal","timer","handleAbort","resolve","ms","isAbortError","error","useSuggestions","controlledQuery","controlledValue","controlledOpen","config","items","setItems","useState","internalQuery","setInternalQuery","defaultQuery","internalValue","setInternalValue","defaultValue","internalOpen","setInternalOpen","defaultOpen","isLoading","setIsLoading","setError","reloadTick","setReloadTick","fetchDataRef","useRef","fetchData","onErrorRef","onError","query","value","open","setQuery","useCallback","nextQuery","onQueryChange","setValue","nextValue","onValueChange","setOpen","nextOpen","onOpenChange","retry","current","runFetch","delayBeforeRequest","result","debounceMs","useEffect","controller","minQueryLength","preload","requestDelay","defaultSuggestionsStrings","SuggestionsCombobox","stringsProp","props","strings","useStrings","inputRef","comboboxStrings","useMemo","retryQuery","errorNode","isError","renderError","cn","className","itemText","itemKey","item","allowClear","clearInputOnClose"],"sources":["../../src/components/features/suggestions/hooks/use-suggestions.ts","../../src/components/features/suggestions/suggestions.strings.ts","../../src/components/features/suggestions/suggestions.tsx"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react';\n\nimport { DEFAULT_DEBOUNCE_MS, useDebouncedCallback } from '../../../../hooks/use-debounced-callback';\n\nimport type {\n\tUseSuggestionsConfig,\n\tUseSuggestionsResult,\n} from '../suggestions.types';\n\nconst wait = (ms: number, signal: AbortSignal): Promise<void> =>\n\tnew Promise((resolve) => {\n\t\tif (signal.aborted) {\n\t\t\tresolve();\n\t\t\treturn;\n\t\t}\n\n\t\tconst timer = setTimeout(() => {\n\t\t\tsignal.removeEventListener('abort', handleAbort);\n\t\t\tresolve();\n\t\t}, ms);\n\t\tconst handleAbort = () => {\n\t\t\tclearTimeout(timer);\n\t\t\tresolve();\n\t\t};\n\t\tsignal.addEventListener('abort', handleAbort, { once: true });\n\t});\n\nfunction isAbortError(error: unknown): boolean {\n\treturn Boolean(error && (error as { name?: string }).name === 'AbortError');\n}\n\n/**\n * Headless data-fetching state machine for the suggestions feature.\n *\n * Returns the search/selection/open state plus the latest items + loading flag.\n * Consumers that want a different visual layer can build their own UI on top\n * of this hook without touching `<SuggestionsCombobox>`.\n */\nexport function useSuggestions<T>(\n\tconfig: UseSuggestionsConfig<T>,\n): UseSuggestionsResult<T> {\n\tconst {\n\t\tfetchData,\n\t\tminQueryLength = 1,\n\t\tdebounceMs = DEFAULT_DEBOUNCE_MS,\n\t\trequestDelay = 0,\n\t\tpreload = false,\n\t\tquery: controlledQuery,\n\t\tdefaultQuery = '',\n\t\tonQueryChange,\n\t\tvalue: controlledValue,\n\t\tdefaultValue = null,\n\t\tonValueChange,\n\t\topen: controlledOpen,\n\t\tdefaultOpen = false,\n\t\tonOpenChange,\n\t\tonError,\n\t} = config;\n\n\tconst [items, setItems] = useState<T[]>([]);\n\tconst [internalQuery, setInternalQuery] = useState(defaultQuery);\n\tconst [internalValue, setInternalValue] = useState<T | null>(defaultValue);\n\tconst [internalOpen, setInternalOpen] = useState(defaultOpen);\n\tconst [isLoading, setIsLoading] = useState<boolean>(false);\n\tconst [error, setError] = useState<unknown | null>(null);\n\tconst [reloadTick, setReloadTick] = useState(0);\n\tconst fetchDataRef = useRef(fetchData);\n\tconst onErrorRef = useRef(onError);\n\n\tfetchDataRef.current = fetchData;\n\tonErrorRef.current = onError;\n\n\tconst query = controlledQuery ?? internalQuery;\n\tconst value = controlledValue !== undefined ? controlledValue : internalValue;\n\tconst open = controlledOpen ?? internalOpen;\n\n\tconst setQuery = useCallback((nextQuery: string) => {\n\t\tif (controlledQuery === undefined) {\n\t\t\tsetInternalQuery(nextQuery);\n\t\t}\n\t\tonQueryChange?.(nextQuery);\n\t}, [controlledQuery, onQueryChange]);\n\n\tconst setValue = useCallback((nextValue: T | null) => {\n\t\tif (controlledValue === undefined) {\n\t\t\tsetInternalValue(nextValue);\n\t\t}\n\t\tonValueChange?.(nextValue);\n\t}, [controlledValue, onValueChange]);\n\n\tconst setOpen = useCallback((nextOpen: boolean) => {\n\t\tif (controlledOpen === undefined) {\n\t\t\tsetInternalOpen(nextOpen);\n\t\t}\n\t\tonOpenChange?.(nextOpen);\n\t}, [controlledOpen, onOpenChange]);\n\n\tconst retry = useCallback(() => {\n\t\tsetReloadTick((current) => current + 1);\n\t}, []);\n\n\tconst runFetch = useDebouncedCallback(\n\t\t(\n\t\t\tnextQuery: string,\n\t\t\tdelayBeforeRequest: number,\n\t\t\tsignal: AbortSignal,\n\t\t) => {\n\t\t\tvoid (async () => {\n\t\t\t\tsetIsLoading(true);\n\t\t\t\tsetError(null);\n\t\t\t\ttry {\n\t\t\t\t\tif (delayBeforeRequest > 0) {\n\t\t\t\t\t\tawait wait(delayBeforeRequest, signal);\n\t\t\t\t\t}\n\t\t\t\t\tif (signal.aborted) return;\n\n\t\t\t\t\tconst result = await fetchDataRef.current(nextQuery, { signal });\n\t\t\t\t\tif (!signal.aborted) {\n\t\t\t\t\t\tsetItems(Array.isArray(result) ? result : []);\n\t\t\t\t\t}\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (!signal.aborted && !isAbortError(error)) {\n\t\t\t\t\t\tsetItems((current) => (current.length === 0 ? current : []));\n\t\t\t\t\t\tsetError(error);\n\t\t\t\t\t\tonErrorRef.current?.(error, nextQuery);\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tif (!signal.aborted) {\n\t\t\t\t\t\tsetIsLoading(false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})();\n\t\t},\n\t\tdebounceMs,\n\t);\n\n\tuseEffect(() => {\n\t\tconst controller = new AbortController();\n\n\t\tconst shouldQuery =\n\t\t\tquery.length >= minQueryLength ||\n\t\t\t(preload && query.length === 0);\n\n\t\tif (!shouldQuery) {\n\t\t\tsetItems((current) => (current.length === 0 ? current : []));\n\t\t\tsetError(null);\n\t\t\tsetIsLoading(false);\n\t\t\treturn () => controller.abort();\n\t\t}\n\n\t\trunFetch(query, requestDelay, controller.signal);\n\n\t\treturn () => {\n\t\t\trunFetch.cancel();\n\t\t\tcontroller.abort();\n\t\t};\n\t}, [\n\t\tminQueryLength,\n\t\tpreload,\n\t\tquery,\n\t\treloadTick,\n\t\trequestDelay,\n\t\trunFetch,\n\t]);\n\n\treturn {\n\t\titems,\n\t\tisLoading,\n\t\terror,\n\t\tisError: error !== null,\n\t\tretry,\n\t\tquery,\n\t\tsetQuery,\n\t\tvalue,\n\t\tsetValue,\n\t\topen,\n\t\tsetOpen,\n\t};\n}\n","/**\n * Default user-facing strings for `<SuggestionsCombobox>`.\n *\n * Consumers wire backend i18n at the call site:\n *\n * <SuggestionsCombobox strings={{ emptyMessage: t('search.empty') }} … />\n */\n\nexport interface SuggestionsStrings {\n\tplaceholder: string;\n\temptyMessage: string;\n\tloadingMessage: string;\n\tstartTypingMessage: string;\n\terrorMessage: string;\n\tretry: string;\n}\n\nexport const defaultSuggestionsStrings: SuggestionsStrings = {\n\tplaceholder: 'Search...',\n\temptyMessage: 'No results found.',\n\tloadingMessage: 'Searching...',\n\tstartTypingMessage: 'Type to search.',\n\terrorMessage: 'Failed to load suggestions.',\n\tretry: 'Retry',\n};\n","import { useCallback, useMemo, useRef } from 'react';\n\nimport { Combobox } from '../combobox';\nimport { ErrorState } from '../../base/feedback';\nimport { useStrings } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\n\nimport { useSuggestions } from './hooks';\nimport { defaultSuggestionsStrings } from './suggestions.strings';\nimport type { SuggestionsComboboxProps } from './suggestions.types';\n\nexport function SuggestionsCombobox<T>(props: SuggestionsComboboxProps<T>) {\n\tconst {\n\t\tfetchData,\n\t\titemKey,\n\t\titemText,\n\t\tonValueChange,\n\t\trenderItem,\n\t\tminQueryLength = 1,\n\t\tdebounceMs = 250,\n\t\trequestDelay = 0,\n\t\tpreload = false,\n\t\tquery: controlledQuery,\n\t\tdefaultQuery,\n\t\tonQueryChange,\n\t\tvalue: controlledValue,\n\t\tdefaultValue,\n\t\tallowClear = true,\n\t\tclearInputOnClose = false,\n\t\topen: controlledOpen,\n\t\tdefaultOpen,\n\t\tonOpenChange,\n\t\tdisabled = false,\n\t\tclassName,\n\t\tonError,\n\t\trenderError,\n\t\tstrings: stringsProp,\n\t} = props;\n\n\tconst strings = useStrings(defaultSuggestionsStrings, stringsProp);\n\tconst inputRef = useRef<HTMLInputElement>(null);\n\n\tconst {\n\t\titems,\n\t\tisLoading,\n\t\tquery,\n\t\tsetQuery,\n\t\tvalue,\n\t\tsetValue,\n\t\topen,\n\t\tsetOpen,\n\t\terror,\n\t\tisError,\n\t\tretry,\n\t} = useSuggestions<T>({\n\t\tfetchData,\n\t\tminQueryLength,\n\t\tdebounceMs,\n\t\trequestDelay,\n\t\tpreload,\n\t\tquery: controlledQuery,\n\t\tdefaultQuery,\n\t\tonQueryChange,\n\t\tvalue: controlledValue,\n\t\tdefaultValue,\n\t\tonValueChange,\n\t\topen: controlledOpen,\n\t\tdefaultOpen,\n\t\tonOpenChange,\n\t\tonError,\n\t});\n\n\tconst comboboxStrings = useMemo(\n\t\t() => ({\n\t\t\tplaceholder: strings.placeholder,\n\t\t\tnoResults: strings.emptyMessage,\n\t\t\tsearching: strings.loadingMessage,\n\t\t\ttypeToSearch: strings.startTypingMessage,\n\t\t}),\n\t\t[strings],\n\t);\n\tconst retryQuery = useCallback(() => {\n\t\tif (!open) setOpen(true);\n\t\tinputRef.current?.focus();\n\t\tretry();\n\t}, [open, retry, setOpen]);\n\n\tconst errorNode = isError && error !== null\n\t\t? renderError?.({ error, query, retry: retryQuery }) ?? (\n\t\t\t<ErrorState\n\t\t\t\tvariant=\"inline\"\n\t\t\t\ttitle={strings.errorMessage}\n\t\t\t\tonRetry={retryQuery}\n\t\t\t\tretryLabel={strings.retry}\n\t\t\t\tclassName=\"suggestions-combobox--error\"\n\t\t\t/>\n\t\t)\n\t\t: null;\n\n\treturn (\n\t\t<div className={cn('suggestions--component suggestions-combobox--component', className)}>\n\t\t\t<Combobox<T>\n\t\t\t\tref={inputRef}\n\t\t\t\tclassName=\"suggestions-combobox--control\"\n\t\t\t\titems={items}\n\t\t\t\tsearchValue={query}\n\t\t\t\tonSearchValueChange={setQuery}\n\t\t\t\tselectedValue={value}\n\t\t\t\tonSelectedValueChange={setValue}\n\t\t\t\tgetItemLabel={itemText}\n\t\t\t\tgetItemKey={(item) => String(itemKey(item))}\n\t\t\t\trenderItem={renderItem}\n\t\t\t\tminSearchLength={minQueryLength}\n\t\t\t\tloading={!isError && isLoading}\n\t\t\t\tshowListContent={!isError}\n\t\t\t\tstrings={comboboxStrings}\n\t\t\t\tclearable={allowClear}\n\t\t\t\topen={open}\n\t\t\t\tonOpenChange={setOpen}\n\t\t\t\tclearSearchOnClose={clearInputOnClose && !isError}\n\t\t\t\tdisabled={disabled}\n\t\t\t/>\n\t\t\t{errorNode}\n\t\t</div>\n\t);\n}\n\nSuggestionsCombobox.displayName = 'SuggestionsCombobox';\n"],"mappings":";;;;;;;;;AASA,IAAMG,KAAQ,GAAY,MACzB,IAAI,SAAS,MAAY;CACxB,IAAIC,EAAO,SAAS;EACnB,EAAQ;EACR;CACD;CAEA,IAAMC,IAAQ,iBAAiB;EAE9B,AADAD,EAAO,oBAAoB,SAASE,CAAW,GAC/CC,EAAQ;CACT,GAAGC,CAAE,GACCF,UAAoB;EAEzB,AADA,aAAaD,CAAK,GAClBE,EAAQ;CACT;CACA,EAAO,iBAAiB,SAASD,GAAa,EAAE,MAAM,GAAK,CAAC;AAC7D,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;GACZ,iBAAiBpB;GACjB,SAAS,CAACc,KAAW7C;GACrB,iBAAiB,CAAC6C;GAClB,SAASJ;GACT,WAAWW;GACL;GACN,cAAchC;GACd,oBAAoBiC,KAAqB,CAACR;GAChC;EACV,CAAA,GACAD,CACG;;AAEP;AAEA,EAAoB,cAAc"}
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { useStrings as e } from "../lib/strings.js";
3
- import { a as t, c as n } from "../typography-CSyJrh28.js";
4
- import { t as r } from "../structure-C0V0_Fyf.js";
5
- import { i, r as a } from "../choice-inputs-JLtij2y4.js";
3
+ import { a as t, c as n } from "../typography-C7-YMW1S.js";
4
+ import { t as r } from "../structure-DZJ2wbAU.js";
5
+ import { i, r as a } from "../choice-inputs-DHGtx0QV.js";
6
6
  import { useEffect as o, useMemo as s } from "react";
7
7
  import { jsx as c, jsxs as l } from "react/jsx-runtime";
8
8
  import { Controller as u, useForm as d } from "react-hook-form";
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import { A as e, C as t, D as n, E as r, M as i, N as a, O as o, S as s, T as c, _ as l, a as u, b as d, c as f, d as p, f as m, g as h, h as g, i as _, j as v, k as y, l as b, m as x, n as S, o as C, p as w, r as T, s as E, t as D, u as O, v as k, w as A, x as j, y as M } from "../table-DH7rozUv.js";
2
+ import { A as e, C as t, D as n, E as r, M as i, N as a, O as o, S as s, T as c, _ as l, a as u, b as d, c as f, d as p, f as m, g as h, h as g, i as _, j as v, k as y, l as b, m as x, n as S, o as C, p as w, r as T, s as E, t as D, u as O, v as k, w as A, x as j, y as M } from "../table-CBonSdTp.js";
3
3
  export { D as AvatarCell, b as CellStack, O as CellValue, h as ColumnVisibilityToggle, S as CurrencyCell, m as DataTable, o as DataTableActions, k as DataTableBody, p as DataTableFilterBar, l as DataTableHeader, x as DataTableToolbar, T as DateCell, _ as DateMetaCell, g as FullscreenToggle, y as Pagination, E as ResourceCell, u as StatusCell, C as StatusClusterCell, f as TableLink, M as addSelectionColumn, d as createHeaderSelectionCheckbox, j as createRowSelectionCheckbox, e as defaultDataTableStrings, s as getCellClassName, i as getDataTableScrollContainer, t as getRowClassName, A as getSelectedRowsData, c as handleColumnVisibilityChange, r as handleRowSelectionChange, n as handleSortingChange, v as mergeDataTableStrings, a as useDataTableScrollState, w as useDataTableSize };