themelia-react-ui 1.0.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (640) hide show
  1. package/CHANGELOG.md +417 -0
  2. package/README.md +67 -16
  3. package/dist/{accordion-B-5Focs8.js → accordion-CQXVcd7Q.js} +15 -15
  4. package/dist/accordion-CQXVcd7Q.js.map +1 -0
  5. package/dist/action-menu-BTpyPWJ2.js +264 -0
  6. package/dist/action-menu-BTpyPWJ2.js.map +1 -0
  7. package/dist/affordance-geometry.generated-CCIXb2A1.js +68 -0
  8. package/dist/affordance-geometry.generated-CCIXb2A1.js.map +1 -0
  9. package/dist/{ai-artifact-B5tPpXnS.js → ai-artifact-2PQ2fItc.js} +206 -215
  10. package/dist/ai-artifact-2PQ2fItc.js.map +1 -0
  11. package/dist/{app-shell-at8Kt4l_.js → app-shell-BE_j8-AT.js} +11 -10
  12. package/dist/app-shell-BE_j8-AT.js.map +1 -0
  13. package/dist/{attachment-BO2R47wn.js → attachment-q69dlt5Y.js} +14 -14
  14. package/dist/attachment-q69dlt5Y.js.map +1 -0
  15. package/dist/auth-M3vGMgDR.js +723 -0
  16. package/dist/auth-M3vGMgDR.js.map +1 -0
  17. package/dist/{avatar-Bpzty83c.js → avatar-djdaaQ_s.js} +15 -13
  18. package/dist/avatar-djdaaQ_s.js.map +1 -0
  19. package/dist/{badge-BZXZT9wd.js → badge-0tATj-tW.js} +9 -9
  20. package/dist/badge-0tATj-tW.js.map +1 -0
  21. package/dist/base/accordion.js +1 -1
  22. package/dist/base/action-menu.js +1 -1
  23. package/dist/base/attachment.js +1 -1
  24. package/dist/base/avatar.js +1 -1
  25. package/dist/base/badge.js +1 -1
  26. package/dist/base/buttons.js +3 -2
  27. package/dist/base/cards.js +3 -3
  28. package/dist/base/carousel.js +33 -35
  29. package/dist/base/carousel.js.map +1 -1
  30. package/dist/base/cascader.js +246 -222
  31. package/dist/base/cascader.js.map +1 -1
  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 +1 -1
  36. package/dist/base/command.js +1 -1
  37. package/dist/base/copyable.js +1 -1
  38. package/dist/base/date-pickers.js +3 -3
  39. package/dist/base/display.js +7 -7
  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 +94 -92
  44. package/dist/base/inline-edit.js.map +1 -1
  45. package/dist/base/item.js +1 -1
  46. package/dist/base/media-gallery.js +1 -1
  47. package/dist/base/navigation.js +6 -6
  48. package/dist/base/popover-menu.js +1 -1
  49. package/dist/base/popover.js +1 -1
  50. package/dist/base/qr-code.js +7 -4
  51. package/dist/base/qr-code.js.map +1 -1
  52. package/dist/base/repeaters.js +53 -53
  53. package/dist/base/repeaters.js.map +1 -1
  54. package/dist/base/sheet.js +1 -1
  55. package/dist/base/sidebar.js +1 -1
  56. package/dist/base/signature-pad.js +84 -82
  57. package/dist/base/signature-pad.js.map +1 -1
  58. package/dist/base/skeleton.js +1 -1
  59. package/dist/base/spinner.js +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 +7 -7
  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/blocks/admin.js +228 -219
  70. package/dist/blocks/admin.js.map +1 -1
  71. package/dist/blocks/ai.js +182 -212
  72. package/dist/blocks/ai.js.map +1 -1
  73. package/dist/blocks/analytics/usage-card.js +1 -1
  74. package/dist/blocks/analytics.js +665 -620
  75. package/dist/blocks/analytics.js.map +1 -1
  76. package/dist/blocks/collaboration.js +2 -2
  77. package/dist/blocks/commerce/receipt.js +1 -1
  78. package/dist/blocks/commerce.js +1439 -1553
  79. package/dist/blocks/commerce.js.map +1 -1
  80. package/dist/blocks/data-display.js +1 -1
  81. package/dist/blocks/onboarding.js +6 -6
  82. package/dist/blocks/onboarding.js.map +1 -1
  83. package/dist/blocks/planning.js +88 -97
  84. package/dist/blocks/planning.js.map +1 -1
  85. package/dist/blocks/timelines.js +1 -1
  86. package/dist/{breadcrumbs-DdQ_I5ra.js → breadcrumbs-BG_FfMK4.js} +10 -9
  87. package/dist/breadcrumbs-BG_FfMK4.js.map +1 -0
  88. package/dist/button-BS3KDg00.js +674 -0
  89. package/dist/button-BS3KDg00.js.map +1 -0
  90. package/dist/{button-BS6l5JUw.js → button-R9CCoH7A.js} +3 -3
  91. package/dist/button-R9CCoH7A.js.map +1 -0
  92. package/dist/buttons-DS0ZIwJ_.js +99 -0
  93. package/dist/buttons-DS0ZIwJ_.js.map +1 -0
  94. package/dist/{cards-Cum56XOF.js → cards-QoJ4syG9.js} +12 -12
  95. package/dist/{cards-Cum56XOF.js.map → cards-QoJ4syG9.js.map} +1 -1
  96. package/dist/chart-DwYRKKc-.js +152 -0
  97. package/dist/chart-DwYRKKc-.js.map +1 -0
  98. package/dist/checkbox-B7ygNTYp.js +35 -0
  99. package/dist/checkbox-B7ygNTYp.js.map +1 -0
  100. package/dist/choice-inputs-DrJ17tpL.js +752 -0
  101. package/dist/choice-inputs-DrJ17tpL.js.map +1 -0
  102. package/dist/{code-block-xHKbAJDj.js → code-block-CD0B7M93.js} +27 -27
  103. package/dist/code-block-CD0B7M93.js.map +1 -0
  104. package/dist/{collapsible-DsnktFNv.js → collapsible-oMUGM4tr.js} +3 -3
  105. package/dist/{collapsible-DsnktFNv.js.map → collapsible-oMUGM4tr.js.map} +1 -1
  106. package/dist/{collection-content-C4fthJV_.js → collection-content-Ys-OZOkY.js} +3 -3
  107. package/dist/{collection-content-C4fthJV_.js.map → collection-content-Ys-OZOkY.js.map} +1 -1
  108. package/dist/combobox-6dvVny2q.js +272 -0
  109. package/dist/combobox-6dvVny2q.js.map +1 -0
  110. package/dist/combobox-CB7039j7.js +865 -0
  111. package/dist/combobox-CB7039j7.js.map +1 -0
  112. package/dist/{command-C0xe7u9B.js → command-kPMPjIxJ.js} +35 -31
  113. package/dist/command-kPMPjIxJ.js.map +1 -0
  114. package/dist/{comments-DviPLnwy.js → comments-You0Bzbr.js} +434 -409
  115. package/dist/comments-You0Bzbr.js.map +1 -0
  116. package/dist/components/base/accordion/accordion-variants.d.ts +3 -3
  117. package/dist/components/base/action-menu/action-menu.d.ts +7 -2
  118. package/dist/components/base/avatar/stacked-avatars.d.ts +5 -4
  119. package/dist/components/base/badge/badge.d.ts +1 -1
  120. package/dist/components/base/badge/badge.recipes.d.ts +4 -4
  121. package/dist/components/base/buttons/base-button.d.ts +7 -0
  122. package/dist/components/base/buttons/button-group.recipes.d.ts +2 -2
  123. package/dist/components/base/buttons/button.recipes.d.ts +10 -19
  124. package/dist/components/base/buttons/button.variants.d.ts +1 -0
  125. package/dist/components/base/buttons/loader-button.d.ts +3 -1
  126. package/dist/components/base/buttons/text-button.d.ts +2 -2
  127. package/dist/components/base/buttons/use-pending-button-focus.d.ts +3 -0
  128. package/dist/components/base/cards/card.recipes.d.ts +13 -5
  129. package/dist/components/base/cards/partials/card-primitives.d.ts +9 -4
  130. package/dist/components/base/cards/smart-card.types.d.ts +1 -1
  131. package/dist/components/base/carousel/carousel.d.ts +3 -1
  132. package/dist/components/base/chart/chart.d.ts +7 -7
  133. package/dist/components/base/choice-inputs/checkbox.d.ts +6 -7
  134. package/dist/components/base/choice-inputs/choice-types.d.ts +10 -1
  135. package/dist/components/base/choice-inputs/pill-radio-group.d.ts +9 -0
  136. package/dist/components/base/choice-inputs/select-popup.d.ts +9 -1
  137. package/dist/components/base/choice-inputs/switch-card.d.ts +1 -1
  138. package/dist/components/base/date-pickers/date-picker-field.d.ts +23 -0
  139. package/dist/components/base/date-pickers/date-picker.recipes.d.ts +5 -18
  140. package/dist/components/base/date-pickers/datepicker.types.d.ts +16 -3
  141. package/dist/components/base/display/alert-dialog.d.ts +8 -2
  142. package/dist/components/base/display/content-block.d.ts +4 -2
  143. package/dist/components/base/display/date-block.d.ts +1 -1
  144. package/dist/components/base/display/dialog.d.ts +12 -5
  145. package/dist/components/base/display/surface-title.d.ts +6 -1
  146. package/dist/components/base/feedback/alert.d.ts +1 -1
  147. package/dist/components/base/feedback/state-display.d.ts +5 -4
  148. package/dist/components/base/forms/form-field.d.ts +1 -0
  149. package/dist/components/base/forms/form-sizing.d.ts +35 -3
  150. package/dist/components/base/forms/workflow.d.ts +2 -0
  151. package/dist/components/base/forms-numeric/coordinates-input.d.ts +3 -0
  152. package/dist/components/base/forms-numeric/rounding-mode-select.d.ts +4 -1
  153. package/dist/components/base/navigation/dropdown-menu.d.ts +2 -2
  154. package/dist/components/base/navigation/language-switcher.d.ts +4 -1
  155. package/dist/components/base/navigation/overflow-tab-bar.d.ts +7 -0
  156. package/dist/components/base/navigation/page-header/page-header.d.ts +4 -1
  157. package/dist/components/base/navigation/tabs.d.ts +3 -5
  158. package/dist/components/base/popover/popover.recipes.d.ts +3 -3
  159. package/dist/components/base/qr-code/qr-code.d.ts +2 -0
  160. package/dist/components/base/sheet/index.d.ts +29 -1
  161. package/dist/components/base/sheet/sheet.d.ts +14 -5
  162. package/dist/components/base/spinner/spinner.d.ts +3 -2
  163. package/dist/components/base/structure/structure.types.d.ts +1 -1
  164. package/dist/components/base/table/index.d.ts +1 -1
  165. package/dist/components/base/text-inputs/clear-native-field.d.ts +2 -0
  166. package/dist/components/base/text-inputs/input-group.d.ts +2 -2
  167. package/dist/components/base/text-inputs/input-trailing-action.d.ts +3 -0
  168. package/dist/components/base/upload/upload.recipes.d.ts +11 -0
  169. package/dist/components/base/value-inputs/date-time-input.d.ts +4 -2
  170. package/dist/components/base/value-inputs/tags-input.d.ts +2 -0
  171. package/dist/components/blocks/admin/api-key-list/api-key-list.types.d.ts +1 -1
  172. package/dist/components/blocks/analytics/format-metric-value.d.ts +11 -1
  173. package/dist/components/blocks/analytics/index.d.ts +1 -1
  174. package/dist/components/blocks/analytics/types.d.ts +1 -1
  175. package/dist/components/blocks/analytics/use-metric-format-options.d.ts +3 -0
  176. package/dist/components/blocks/collaboration/message/message.recipes.d.ts +12 -0
  177. package/dist/components/blocks/commerce/address-card/address-card.d.ts +1 -1
  178. package/dist/components/blocks/commerce/address-card/types.d.ts +3 -1
  179. package/dist/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.d.ts +4 -0
  180. package/dist/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.types.d.ts +2 -2
  181. package/dist/components/blocks/commerce/discount-stack/types.d.ts +1 -1
  182. package/dist/components/blocks/commerce/inventory-section/types.d.ts +4 -1
  183. package/dist/components/blocks/commerce/loyalty-points/types.d.ts +1 -1
  184. package/dist/components/blocks/commerce/order-status/types.d.ts +4 -0
  185. package/dist/components/blocks/commerce/payment-method/payment-method.d.ts +1 -1
  186. package/dist/components/blocks/commerce/payment-method/types.d.ts +3 -1
  187. package/dist/components/blocks/commerce/seo-listing/seo-listing-card.d.ts +1 -1
  188. package/dist/components/blocks/commerce/seo-listing/types.d.ts +3 -1
  189. package/dist/components/blocks/commerce/vendor-profile/types.d.ts +4 -1
  190. package/dist/components/blocks/data-display/dense-info-card/dense-info.strings.d.ts +4 -1
  191. package/dist/components/blocks/data-display/empty-state/partials/illustrations/document-stack.d.ts +1 -4
  192. package/dist/components/blocks/data-display/empty-state/partials/illustrations/inbox-clean.d.ts +1 -4
  193. package/dist/components/blocks/data-display/empty-state/partials/illustrations/index.d.ts +3 -3
  194. package/dist/components/blocks/data-display/empty-state/partials/illustrations/stacked-cards.d.ts +1 -6
  195. package/dist/components/blocks/data-display/inline-stat/inline-stat.d.ts +4 -1
  196. package/dist/components/features/combobox/components/error-message.d.ts +1 -1
  197. package/dist/components/features/comments/hooks/use-attachment-upload.d.ts +5 -0
  198. package/dist/components/features/filters/facets/search-facet.d.ts +0 -12
  199. package/dist/components/features/filters/facets/tags-facet.d.ts +1 -1
  200. package/dist/components/features/global-search/partials/global-search-idle-state.d.ts +1 -1
  201. package/dist/components/features/media-library/media-library.d.ts +1 -1
  202. package/dist/components/features/media-library/media-library.types.d.ts +9 -1
  203. package/dist/components/features/media-library/partials/media-library-partials.d.ts +1 -1
  204. package/dist/components/features/overlays/alert-dialog.d.ts +1 -1
  205. package/dist/components/features/overlays/drawer.d.ts +1 -1
  206. package/dist/components/features/overlays/hooks/use-overlay-actions.d.ts +2 -2
  207. package/dist/components/features/overlays/hooks/use-overlay-visibility.d.ts +11 -4
  208. package/dist/components/features/overlays/hooks/use-pending-overlay-focus.d.ts +2 -0
  209. package/dist/components/features/overlays/overlay-tone-icon.d.ts +37 -0
  210. package/dist/components/features/overlays/overlays.types.d.ts +46 -22
  211. package/dist/components/features/products/components/product-variants-manager.d.ts +1 -1
  212. package/dist/components/features/products/partials/index.d.ts +1 -1
  213. package/dist/components/features/products/partials/product-metric-tile.d.ts +6 -0
  214. package/dist/components/features/products/partials/product-tone.d.ts +11 -1
  215. package/dist/components/features/products/products.types.d.ts +2 -1
  216. package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +2 -1
  217. package/dist/components/features/table/data-table.d.ts +1 -1
  218. package/dist/components/features/table/partials/cell-renderers.d.ts +1 -1
  219. package/dist/components/features/table/table.types.d.ts +1 -1
  220. package/dist/components/features/theme-tweaker/theme-provider-settings.d.ts +3 -1
  221. package/dist/components/layout/auth/auth.types.d.ts +1 -0
  222. package/dist/components/layout/page/index.d.ts +1 -1
  223. package/dist/components/layout/page/page.d.ts +0 -1
  224. package/dist/components/layout/page/page.types.d.ts +62 -6
  225. package/dist/components/layout/page/partials/page-header-commands.d.ts +13 -0
  226. package/dist/components/layout/page/partials/page-header.d.ts +1 -1
  227. package/dist/components/layout/sidebar/sidebar.context.d.ts +1 -1
  228. package/dist/components/layout/sidebar/sidebar.types.d.ts +4 -0
  229. package/dist/components/layout/workspace/workspace.types.d.ts +3 -0
  230. package/dist/components/primitives/date.d.ts +16 -3
  231. package/dist/components/primitives/dimensions.d.ts +6 -0
  232. package/dist/components/primitives/duration.d.ts +6 -0
  233. package/dist/components/primitives/file-size.d.ts +6 -0
  234. package/dist/components/primitives/index.d.ts +1 -1
  235. package/dist/components/primitives/initials.d.ts +11 -2
  236. package/dist/components/primitives/link.d.ts +7 -0
  237. package/dist/components/primitives/money.d.ts +29 -7
  238. package/dist/components/primitives/number.d.ts +17 -0
  239. package/dist/components/primitives/value-typography.d.ts +54 -0
  240. package/dist/components/primitives/value.d.ts +31 -6
  241. package/dist/components/typography/heading.d.ts +13 -2
  242. package/dist/components/typography/index.d.ts +1 -1
  243. package/dist/components/typography/label.d.ts +3 -0
  244. package/dist/components/typography/running-text.d.ts +12 -0
  245. package/dist/components/typography/text-link.d.ts +23 -1
  246. package/dist/components/typography/text.d.ts +12 -0
  247. package/dist/components/typography/text.styles.d.ts +37 -5
  248. package/dist/components/ui/button.d.ts +1 -1
  249. package/dist/components/ui/checkbox.d.ts +5 -0
  250. package/dist/components/ui/overlay.recipes.d.ts +15 -2
  251. package/dist/components/ui/popover.d.ts +1 -1
  252. package/dist/components/ui/select.d.ts +3 -1
  253. package/dist/components/ui/sidebar.d.ts +1 -1
  254. package/dist/components/ui/switch.d.ts +5 -0
  255. package/dist/components/ui/table.d.ts +2 -1
  256. package/dist/container.recipes-D9t8MHR3.js +27 -0
  257. package/dist/container.recipes-D9t8MHR3.js.map +1 -0
  258. package/dist/{containers-6s-ucRQQ.js → containers-D_L4mTVb.js} +34 -57
  259. package/dist/containers-D_L4mTVb.js.map +1 -0
  260. package/dist/control-group-recipes-DBXmfh2E.js +21 -0
  261. package/dist/control-group-recipes-DBXmfh2E.js.map +1 -0
  262. package/dist/{copyable-B7SBXJMr.js → copyable-DDjTeW_j.js} +6 -6
  263. package/dist/{copyable-B7SBXJMr.js.map → copyable-DDjTeW_j.js.map} +1 -1
  264. package/dist/data-display-3xWQUnMA.js +1335 -0
  265. package/dist/data-display-3xWQUnMA.js.map +1 -0
  266. package/dist/date-picker-DrDFj8Lo.js +1527 -0
  267. package/dist/date-picker-DrDFj8Lo.js.map +1 -0
  268. package/dist/date-pickers-CnFCb0n2.js +174 -0
  269. package/dist/date-pickers-CnFCb0n2.js.map +1 -0
  270. package/dist/date-uf3z37Nm.js +144 -0
  271. package/dist/date-uf3z37Nm.js.map +1 -0
  272. package/dist/{display-CFM5myut.js → display-DrdvPwF0.js} +25 -25
  273. package/dist/display-DrdvPwF0.js.map +1 -0
  274. package/dist/{dropdown-menu-BlnyHr-9.js → dropdown-menu-CURh59jb.js} +22 -15
  275. package/dist/dropdown-menu-CURh59jb.js.map +1 -0
  276. package/dist/features/activities.js +177 -163
  277. package/dist/features/activities.js.map +1 -1
  278. package/dist/features/ai-chat.js +187 -183
  279. package/dist/features/ai-chat.js.map +1 -1
  280. package/dist/features/async-preview.js +9 -9
  281. package/dist/features/async-preview.js.map +1 -1
  282. package/dist/features/combobox.js +1 -1
  283. package/dist/features/comments.js +1 -1
  284. package/dist/features/data-view.js +25 -23
  285. package/dist/features/data-view.js.map +1 -1
  286. package/dist/features/email-composer/engine.js +1 -1
  287. package/dist/features/email-composer.js +353 -355
  288. package/dist/features/email-composer.js.map +1 -1
  289. package/dist/features/event-calendar.js +346 -354
  290. package/dist/features/event-calendar.js.map +1 -1
  291. package/dist/features/filters.js +1 -1
  292. package/dist/features/global-search.js +225 -227
  293. package/dist/features/global-search.js.map +1 -1
  294. package/dist/features/kanban.js +29 -29
  295. package/dist/features/kanban.js.map +1 -1
  296. package/dist/features/map.js +59 -58
  297. package/dist/features/map.js.map +1 -1
  298. package/dist/features/media-library.js +898 -900
  299. package/dist/features/media-library.js.map +1 -1
  300. package/dist/features/mentions.js +1 -1
  301. package/dist/features/overlays.js +1 -1
  302. package/dist/features/products.js +1412 -1444
  303. package/dist/features/products.js.map +1 -1
  304. package/dist/features/questionnaire.js +51 -49
  305. package/dist/features/questionnaire.js.map +1 -1
  306. package/dist/features/resource-assignment.js +103 -97
  307. package/dist/features/resource-assignment.js.map +1 -1
  308. package/dist/features/resource.js +13 -13
  309. package/dist/features/resource.js.map +1 -1
  310. package/dist/features/rich-text-editor.js +2 -2
  311. package/dist/features/schema-form.js +187 -183
  312. package/dist/features/schema-form.js.map +1 -1
  313. package/dist/features/suggestions.js +3 -3
  314. package/dist/features/sync.js +7 -7
  315. package/dist/features/sync.js.map +1 -1
  316. package/dist/features/table.js +1 -1
  317. package/dist/features/theme-tweaker.js +508 -503
  318. package/dist/features/theme-tweaker.js.map +1 -1
  319. package/dist/{feedback-DWUkgEjR.js → feedback-C7nR0UtT.js} +30 -31
  320. package/dist/feedback-C7nR0UtT.js.map +1 -0
  321. package/dist/field-affordance-recipes-CkOCdE2y.js +46 -0
  322. package/dist/field-affordance-recipes-CkOCdE2y.js.map +1 -0
  323. package/dist/{field-state-recipes-CBTRt9Bt.js → field-state-recipes-C-MFBX_8.js} +5 -5
  324. package/dist/field-state-recipes-C-MFBX_8.js.map +1 -0
  325. package/dist/{filters-BhsUtsxW.js → filters-Da-gNPsE.js} +760 -765
  326. package/dist/filters-Da-gNPsE.js.map +1 -0
  327. package/dist/{form-field-Bn7ZH1rA.js → form-field-VZRULhUK.js} +20 -12
  328. package/dist/form-field-VZRULhUK.js.map +1 -0
  329. package/dist/form-sizing-uWP4lzVh.js +126 -0
  330. package/dist/form-sizing-uWP4lzVh.js.map +1 -0
  331. package/dist/{forms-B7pzS25o.js → forms-DDeEnXSY.js} +38 -38
  332. package/dist/forms-DDeEnXSY.js.map +1 -0
  333. package/dist/forms-numeric-D3CO60IF.js +905 -0
  334. package/dist/forms-numeric-D3CO60IF.js.map +1 -0
  335. package/dist/{header-C59QZyxV.js → header-2ycNqGOR.js} +42 -37
  336. package/dist/header-2ycNqGOR.js.map +1 -0
  337. package/dist/{hooks-CM1Vp9Pe.js → hooks-DQ5SPwZw.js} +2 -2
  338. package/dist/{hooks-CM1Vp9Pe.js.map → hooks-DQ5SPwZw.js.map} +1 -1
  339. package/dist/{http-CLTVJc5I.js → http-CdEIHyQf.js} +2 -2
  340. package/dist/http-CdEIHyQf.js.map +1 -0
  341. package/dist/{icon-badge-Dv0RYQwj.js → icon-badge-DKlaKXoo.js} +4 -4
  342. package/dist/{icon-badge-Dv0RYQwj.js.map → icon-badge-DKlaKXoo.js.map} +1 -1
  343. package/dist/index.js +2 -2
  344. package/dist/input-BoLm9Hks.js +20 -0
  345. package/dist/input-BoLm9Hks.js.map +1 -0
  346. package/dist/input-DhQdBnV3.js +255 -0
  347. package/dist/input-DhQdBnV3.js.map +1 -0
  348. package/dist/item-xzh8Df65.js +264 -0
  349. package/dist/item-xzh8Df65.js.map +1 -0
  350. package/dist/layout/app-shell.js +1 -1
  351. package/dist/layout/auth.js +1 -1
  352. package/dist/layout/containers.js +1 -1
  353. package/dist/layout/header.js +1 -1
  354. package/dist/layout/hooks.js +1 -1
  355. package/dist/layout/navigation.js +1 -1
  356. package/dist/layout/page.js +1 -1
  357. package/dist/layout/settings.js +1 -1
  358. package/dist/layout/sidebar.js +2 -2
  359. package/dist/layout/workspace.js +1 -1
  360. package/dist/layout.js +10 -10
  361. package/dist/lib/affordance-geometry.generated.d.ts +46 -10
  362. package/dist/lib/control-group-recipes.d.ts +22 -0
  363. package/dist/lib/field-affordance-recipes.d.ts +70 -2
  364. package/dist/lib/field-state-recipes.d.ts +6 -4
  365. package/dist/lib/format.d.ts +9 -0
  366. package/dist/lib/money-format.d.ts +30 -0
  367. package/dist/lib/navigation-row-recipes.d.ts +3 -2
  368. package/dist/lib/overlay-anatomy-recipes.d.ts +2 -2
  369. package/dist/lib/surface-recipes.d.ts +13 -8
  370. package/dist/lib/token-merge.generated.d.ts +144 -2
  371. package/dist/lib/track-recipes.d.ts +1 -1
  372. package/dist/lib/ui-provider/provider.d.ts +7 -2
  373. package/dist/lib/ui-provider/store.d.ts +6 -2
  374. package/dist/lib/ui-provider/types.d.ts +9 -4
  375. package/dist/lib/use-prefers-reduced-motion.d.ts +2 -0
  376. package/dist/lib/utils.js +1 -1
  377. package/dist/media-gallery-DQUQ0m3O.js +201 -0
  378. package/dist/media-gallery-DQUQ0m3O.js.map +1 -0
  379. package/dist/{mentions-B8Ko-fhS.js → mentions-DwnO1hh4.js} +40 -39
  380. package/dist/{mentions-B8Ko-fhS.js.map → mentions-DwnO1hh4.js.map} +1 -1
  381. package/dist/message-YfFmbXNP.js +127 -0
  382. package/dist/message-YfFmbXNP.js.map +1 -0
  383. package/dist/{navigation-BUIn2Qxx.js → navigation-Cbp5V8gG.js} +27 -28
  384. package/dist/navigation-Cbp5V8gG.js.map +1 -0
  385. package/dist/navigation-Cs1npsPm.js +300 -0
  386. package/dist/navigation-Cs1npsPm.js.map +1 -0
  387. package/dist/{navigation-row-recipes-GVh11KiT.js → navigation-row-recipes-DlU-4QYO.js} +3 -3
  388. package/dist/navigation-row-recipes-DlU-4QYO.js.map +1 -0
  389. package/dist/number-CKRBYmZK.js +352 -0
  390. package/dist/number-CKRBYmZK.js.map +1 -0
  391. package/dist/overlay.recipes-CNO2S9V6.js +34 -0
  392. package/dist/overlay.recipes-CNO2S9V6.js.map +1 -0
  393. package/dist/overlays-DhZO7N-I.js +994 -0
  394. package/dist/overlays-DhZO7N-I.js.map +1 -0
  395. package/dist/page-C6R_8jFt.js +325 -0
  396. package/dist/page-C6R_8jFt.js.map +1 -0
  397. package/dist/{page-header-DQRa0jug.js → page-header-hUTzcRZX.js} +12 -12
  398. package/dist/page-header-hUTzcRZX.js.map +1 -0
  399. package/dist/{pagination-C29vvt3I.js → pagination-Cm0jqa3I.js} +21 -21
  400. package/dist/pagination-Cm0jqa3I.js.map +1 -0
  401. package/dist/{popover-CoLDEg19.js → popover-Dcv_9jxr.js} +23 -22
  402. package/dist/popover-Dcv_9jxr.js.map +1 -0
  403. package/dist/{popover-menu-GLIQTJTx.js → popover-menu-DnRFKnHP.js} +6 -6
  404. package/dist/{popover-menu-GLIQTJTx.js.map → popover-menu-DnRFKnHP.js.map} +1 -1
  405. package/dist/{popover.recipes-zgBhMlUu.js → popover.recipes-wmbvL8Ah.js} +5 -5
  406. package/dist/popover.recipes-wmbvL8Ah.js.map +1 -0
  407. package/dist/primitives-BHrwQXFC.js +379 -0
  408. package/dist/primitives-BHrwQXFC.js.map +1 -0
  409. package/dist/primitives.js +5 -5
  410. package/dist/{progress-BOe8l_FZ.js → progress-Br9WTFya.js} +12 -11
  411. package/dist/progress-Br9WTFya.js.map +1 -0
  412. package/dist/{receipt-BM8xsGFy.js → receipt-CV89q1fs.js} +8 -8
  413. package/dist/{receipt-BM8xsGFy.js.map → receipt-CV89q1fs.js.map} +1 -1
  414. package/dist/rich-text-editor-CF8QYt5p.js +574 -0
  415. package/dist/rich-text-editor-CF8QYt5p.js.map +1 -0
  416. package/dist/{rich-text-editor.recipes-DxvOE0Lp.js → rich-text-editor.recipes-CnrbmTS1.js} +35 -26
  417. package/dist/rich-text-editor.recipes-CnrbmTS1.js.map +1 -0
  418. package/dist/{rich-text-B7sBAdDG.js → rich-text-j-FGAeZW.js} +4 -4
  419. package/dist/{rich-text-B7sBAdDG.js.map → rich-text-j-FGAeZW.js.map} +1 -1
  420. package/dist/{scroll-area-BheMQ270.js → scroll-area-DRdr16Pt.js} +3 -3
  421. package/dist/scroll-area-DRdr16Pt.js.map +1 -0
  422. package/dist/{separator-DO0EbCEm.js → separator-BMEvwnSX.js} +2 -2
  423. package/dist/{separator-DO0EbCEm.js.map → separator-BMEvwnSX.js.map} +1 -1
  424. package/dist/{separator-Gk_WXH-l.js → separator-Do5GWDYi.js} +4 -4
  425. package/dist/separator-Do5GWDYi.js.map +1 -0
  426. package/dist/services/actions/action-adapters.d.ts +4 -0
  427. package/dist/services/actions.js +8 -3
  428. package/dist/services/actions.js.map +1 -1
  429. package/dist/{settings-BnCyyPOJ.js → settings-DHk0L2MF.js} +20 -19
  430. package/dist/settings-DHk0L2MF.js.map +1 -0
  431. package/dist/sheet-DRFNY1_D.js +207 -0
  432. package/dist/sheet-DRFNY1_D.js.map +1 -0
  433. package/dist/sidebar-Cb8WzOvE.js +511 -0
  434. package/dist/sidebar-Cb8WzOvE.js.map +1 -0
  435. package/dist/{sidebar-DPR7fmqN.js → sidebar-Crc9M9JV.js} +220 -201
  436. package/dist/sidebar-Crc9M9JV.js.map +1 -0
  437. package/dist/{skeleton-CmT1ppqb.js → skeleton-DVMXr15h.js} +5 -5
  438. package/dist/{skeleton-CmT1ppqb.js.map → skeleton-DVMXr15h.js.map} +1 -1
  439. package/dist/smart-card-Bek-TwUp.js +599 -0
  440. package/dist/smart-card-Bek-TwUp.js.map +1 -0
  441. package/dist/{spinner-BY9HbUEh.js → spinner-CmTAbEp0.js} +8 -6
  442. package/dist/spinner-CmTAbEp0.js.map +1 -0
  443. package/dist/{structure-MvKVq-oL.js → structure-hzCW-XsV.js} +3 -3
  444. package/dist/{structure-MvKVq-oL.js.map → structure-hzCW-XsV.js.map} +1 -1
  445. package/dist/{structure.recipes-Bqhf9oIh.js → structure.recipes-EPz60cU8.js} +37 -19
  446. package/dist/structure.recipes-EPz60cU8.js.map +1 -0
  447. package/dist/style.css +1 -1
  448. package/dist/surface-recipes-DOdoBXGm.js +28 -0
  449. package/dist/surface-recipes-DOdoBXGm.js.map +1 -0
  450. package/dist/table-D6zKeYQX.js +162 -0
  451. package/dist/table-D6zKeYQX.js.map +1 -0
  452. package/dist/table-Dn4XSrSB.js +1444 -0
  453. package/dist/table-Dn4XSrSB.js.map +1 -0
  454. package/dist/tabs-Dk8E_knt.js +189 -0
  455. package/dist/tabs-Dk8E_knt.js.map +1 -0
  456. package/dist/text-inputs-BFpku0Qd.js +331 -0
  457. package/dist/text-inputs-BFpku0Qd.js.map +1 -0
  458. package/dist/{text.styles-BwB7vAF2.js → text.styles-g4He6UIW.js} +26 -15
  459. package/dist/text.styles-g4He6UIW.js.map +1 -0
  460. package/dist/theme.css +90 -124
  461. package/dist/themes/green.css +24 -0
  462. package/dist/{timelines-B9ICkQcV.js → timelines-CxuAFIc2.js} +97 -104
  463. package/dist/timelines-CxuAFIc2.js.map +1 -0
  464. package/dist/track-recipes-CDcKmndW.js +10 -0
  465. package/dist/track-recipes-CDcKmndW.js.map +1 -0
  466. package/dist/{tree-BdWSaoFT.js → tree-BotPlyiD.js} +13 -13
  467. package/dist/{tree-BdWSaoFT.js.map → tree-BotPlyiD.js.map} +1 -1
  468. package/dist/typography/rich-text.js +1 -1
  469. package/dist/typography-CAr3dQhX.js +116 -0
  470. package/dist/typography-CAr3dQhX.js.map +1 -0
  471. package/dist/typography.js +2 -2
  472. package/dist/{ui-provider-CftIB6TY.js → ui-provider-D2_TeLqw.js} +22 -22
  473. package/dist/ui-provider-D2_TeLqw.js.map +1 -0
  474. package/dist/ui-provider.js +1 -1
  475. package/dist/{upload-D8Za5x_c.js → upload-B0WHW7ak.js} +278 -274
  476. package/dist/upload-B0WHW7ak.js.map +1 -0
  477. package/dist/{upload-queue-hIIYBLS7.js → upload-queue-BHZ_wBfd.js} +72 -75
  478. package/dist/upload-queue-BHZ_wBfd.js.map +1 -0
  479. package/dist/{usage-card-DnmnJ58D.js → usage-card-U0YBLTNT.js} +31 -33
  480. package/dist/usage-card-U0YBLTNT.js.map +1 -0
  481. package/dist/utils-Cospvlj1.js +4445 -0
  482. package/dist/utils-Cospvlj1.js.map +1 -0
  483. package/dist/value-inputs-CjfzGMsN.js +854 -0
  484. package/dist/value-inputs-CjfzGMsN.js.map +1 -0
  485. package/dist/value-typography-Deb3yQZg.js +116 -0
  486. package/dist/value-typography-Deb3yQZg.js.map +1 -0
  487. package/dist/{workspace-C1PZmk8L.js → workspace-YoFjXi6i.js} +97 -105
  488. package/dist/workspace-YoFjXi6i.js.map +1 -0
  489. package/docs/consumer-skill/SKILL.md +123 -119
  490. package/docs/consumer-skill/examples/analytics.tsx +34 -0
  491. package/docs/consumer-skill/examples/app-layout.tsx +42 -14
  492. package/docs/consumer-skill/examples/detail.tsx +20 -5
  493. package/docs/consumer-skill/examples/edit.tsx +1 -1
  494. package/docs/consumer-skill/examples/layout-blocks.tsx +20 -0
  495. package/docs/consumer-skill/examples/manifest.json +37 -3
  496. package/docs/consumer-skill/examples/scoped-directory.tsx +2 -2
  497. package/docs/consumer-skill/examples/website.tsx +56 -0
  498. package/docs/consumer-skill/references/analytics.md +70 -0
  499. package/docs/consumer-skill/references/composition.md +195 -9
  500. package/docs/consumer-skill/references/design-contract.md +33 -7
  501. package/docs/consumer-skill/references/discovery.md +80 -5
  502. package/docs/consumer-skill/references/installation.md +22 -0
  503. package/docs/consumer-skill/references/integration.md +46 -1
  504. package/docs/consumer-skill/references/public-api.json +2083 -237
  505. package/docs/consumer-skill/references/review.md +74 -6
  506. package/docs/consumer-skill/references/theming.md +59 -8
  507. package/docs/consumer-skill/references/tokens.json +180 -9
  508. package/docs/consumer-skill/references/workflows.md +34 -0
  509. package/docs/consumer-skill/scripts/check-composition.mjs +1 -1
  510. package/docs/consumer-skill/scripts/composition-policy.mjs +271 -18
  511. package/docs/consumer-skill/scripts/discovery.mjs +69 -9
  512. package/docs/consumer-skill/scripts/pin-button-defaults.mjs +95 -0
  513. package/docs/consumer-skill/scripts/surface-policy.mjs +44 -0
  514. package/package.json +11 -6
  515. package/dist/accordion-B-5Focs8.js.map +0 -1
  516. package/dist/action-menu-Cx3SdfbN.js +0 -265
  517. package/dist/action-menu-Cx3SdfbN.js.map +0 -1
  518. package/dist/affordance-geometry.generated-D8Jcfb0G.js +0 -32
  519. package/dist/affordance-geometry.generated-D8Jcfb0G.js.map +0 -1
  520. package/dist/ai-artifact-B5tPpXnS.js.map +0 -1
  521. package/dist/app-shell-at8Kt4l_.js.map +0 -1
  522. package/dist/attachment-BO2R47wn.js.map +0 -1
  523. package/dist/auth-OFwWSAap.js +0 -704
  524. package/dist/auth-OFwWSAap.js.map +0 -1
  525. package/dist/avatar-Bpzty83c.js.map +0 -1
  526. package/dist/badge-BZXZT9wd.js.map +0 -1
  527. package/dist/breadcrumbs-DdQ_I5ra.js.map +0 -1
  528. package/dist/button-BS6l5JUw.js.map +0 -1
  529. package/dist/buttons-Co6GavvM.js +0 -674
  530. package/dist/buttons-Co6GavvM.js.map +0 -1
  531. package/dist/chart-DVfcwQu6.js +0 -149
  532. package/dist/chart-DVfcwQu6.js.map +0 -1
  533. package/dist/checkbox-BavDRjF7.js +0 -34
  534. package/dist/checkbox-BavDRjF7.js.map +0 -1
  535. package/dist/choice-inputs-CC7XqPQO.js +0 -619
  536. package/dist/choice-inputs-CC7XqPQO.js.map +0 -1
  537. package/dist/code-block-xHKbAJDj.js.map +0 -1
  538. package/dist/combobox-DEbdr-3u.js +0 -273
  539. package/dist/combobox-DEbdr-3u.js.map +0 -1
  540. package/dist/combobox-xv3yJbzl.js +0 -850
  541. package/dist/combobox-xv3yJbzl.js.map +0 -1
  542. package/dist/command-C0xe7u9B.js.map +0 -1
  543. package/dist/comments-DviPLnwy.js.map +0 -1
  544. package/dist/containers-6s-ucRQQ.js.map +0 -1
  545. package/dist/data-display-cWIRdeaf.js +0 -1129
  546. package/dist/data-display-cWIRdeaf.js.map +0 -1
  547. package/dist/date-BFNMnrS5.js +0 -140
  548. package/dist/date-BFNMnrS5.js.map +0 -1
  549. package/dist/date-picker-CA6ogMQB.js +0 -1521
  550. package/dist/date-picker-CA6ogMQB.js.map +0 -1
  551. package/dist/date-pickers-BPIKLdsD.js +0 -224
  552. package/dist/date-pickers-BPIKLdsD.js.map +0 -1
  553. package/dist/display-CFM5myut.js.map +0 -1
  554. package/dist/dropdown-menu-BlnyHr-9.js.map +0 -1
  555. package/dist/feedback-DWUkgEjR.js.map +0 -1
  556. package/dist/field-affordance-recipes-IjzPrCTw.js +0 -17
  557. package/dist/field-affordance-recipes-IjzPrCTw.js.map +0 -1
  558. package/dist/field-state-recipes-CBTRt9Bt.js.map +0 -1
  559. package/dist/filters-BhsUtsxW.js.map +0 -1
  560. package/dist/form-field-Bn7ZH1rA.js.map +0 -1
  561. package/dist/form-sizing-BWs70_a2.js +0 -100
  562. package/dist/form-sizing-BWs70_a2.js.map +0 -1
  563. package/dist/format-iamDSqs2.js +0 -110
  564. package/dist/format-iamDSqs2.js.map +0 -1
  565. package/dist/forms-B7pzS25o.js.map +0 -1
  566. package/dist/forms-numeric-BUBxELBv.js +0 -867
  567. package/dist/forms-numeric-BUBxELBv.js.map +0 -1
  568. package/dist/header-C59QZyxV.js.map +0 -1
  569. package/dist/http-CLTVJc5I.js.map +0 -1
  570. package/dist/input-WwYQZJzG.js +0 -202
  571. package/dist/input-WwYQZJzG.js.map +0 -1
  572. package/dist/input-ci9fIgFH.js +0 -20
  573. package/dist/input-ci9fIgFH.js.map +0 -1
  574. package/dist/item-pJ0GsOiJ.js +0 -257
  575. package/dist/item-pJ0GsOiJ.js.map +0 -1
  576. package/dist/media-gallery-DhDRgnVZ.js +0 -200
  577. package/dist/media-gallery-DhDRgnVZ.js.map +0 -1
  578. package/dist/message-COsdEvXT.js +0 -108
  579. package/dist/message-COsdEvXT.js.map +0 -1
  580. package/dist/navigation-BUIn2Qxx.js.map +0 -1
  581. package/dist/navigation-DBEu4POU.js +0 -267
  582. package/dist/navigation-DBEu4POU.js.map +0 -1
  583. package/dist/navigation-row-recipes-GVh11KiT.js.map +0 -1
  584. package/dist/number-BNT_BIzJ.js +0 -269
  585. package/dist/number-BNT_BIzJ.js.map +0 -1
  586. package/dist/overlay.recipes-BxW5FIfK.js +0 -6
  587. package/dist/overlay.recipes-BxW5FIfK.js.map +0 -1
  588. package/dist/overlays-B11wZka6.js +0 -982
  589. package/dist/overlays-B11wZka6.js.map +0 -1
  590. package/dist/page-BV6ioQg3.js +0 -202
  591. package/dist/page-BV6ioQg3.js.map +0 -1
  592. package/dist/page-header-DQRa0jug.js.map +0 -1
  593. package/dist/pagination-C29vvt3I.js.map +0 -1
  594. package/dist/popover-CoLDEg19.js.map +0 -1
  595. package/dist/popover.recipes-zgBhMlUu.js.map +0 -1
  596. package/dist/primitives-DKPOGVpj.js +0 -330
  597. package/dist/primitives-DKPOGVpj.js.map +0 -1
  598. package/dist/progress-BOe8l_FZ.js.map +0 -1
  599. package/dist/rich-text-editor-CoVrTiSv.js +0 -575
  600. package/dist/rich-text-editor-CoVrTiSv.js.map +0 -1
  601. package/dist/rich-text-editor.recipes-DxvOE0Lp.js.map +0 -1
  602. package/dist/scroll-area-BheMQ270.js.map +0 -1
  603. package/dist/select-B2mb-qN2.js +0 -108
  604. package/dist/select-B2mb-qN2.js.map +0 -1
  605. package/dist/separator-Gk_WXH-l.js.map +0 -1
  606. package/dist/settings-BnCyyPOJ.js.map +0 -1
  607. package/dist/sheet-B-q914Ad.js +0 -205
  608. package/dist/sheet-B-q914Ad.js.map +0 -1
  609. package/dist/sidebar-C_2p3Tfj.js +0 -501
  610. package/dist/sidebar-C_2p3Tfj.js.map +0 -1
  611. package/dist/sidebar-DPR7fmqN.js.map +0 -1
  612. package/dist/smart-card-CYLn46e6.js +0 -578
  613. package/dist/smart-card-CYLn46e6.js.map +0 -1
  614. package/dist/spinner-BY9HbUEh.js.map +0 -1
  615. package/dist/structure.recipes-Bqhf9oIh.js.map +0 -1
  616. package/dist/surface-recipes-CQfRr-VL.js +0 -27
  617. package/dist/surface-recipes-CQfRr-VL.js.map +0 -1
  618. package/dist/table-BS39xnlq.js +0 -1424
  619. package/dist/table-BS39xnlq.js.map +0 -1
  620. package/dist/table-DnlAJ-xR.js +0 -146
  621. package/dist/table-DnlAJ-xR.js.map +0 -1
  622. package/dist/tabs-B5cNMWiP.js +0 -187
  623. package/dist/tabs-B5cNMWiP.js.map +0 -1
  624. package/dist/text-inputs-Dh9XGyiS.js +0 -331
  625. package/dist/text-inputs-Dh9XGyiS.js.map +0 -1
  626. package/dist/text.styles-BwB7vAF2.js.map +0 -1
  627. package/dist/timelines-B9ICkQcV.js.map +0 -1
  628. package/dist/track-recipes-LLPNVwFg.js +0 -10
  629. package/dist/track-recipes-LLPNVwFg.js.map +0 -1
  630. package/dist/typography-Cv8MT-82.js +0 -96
  631. package/dist/typography-Cv8MT-82.js.map +0 -1
  632. package/dist/ui-provider-CftIB6TY.js.map +0 -1
  633. package/dist/upload-D8Za5x_c.js.map +0 -1
  634. package/dist/upload-queue-hIIYBLS7.js.map +0 -1
  635. package/dist/usage-card-DnmnJ58D.js.map +0 -1
  636. package/dist/utils-C2EKeIw3.js +0 -72
  637. package/dist/utils-C2EKeIw3.js.map +0 -1
  638. package/dist/value-inputs-DX2dbxjj.js +0 -824
  639. package/dist/value-inputs-DX2dbxjj.js.map +0 -1
  640. package/dist/workspace-C1PZmk8L.js.map +0 -1
@@ -1,850 +0,0 @@
1
- "use client";
2
- import { _ as e, s as t } from "./ui-provider-CftIB6TY.js";
3
- import { useStrings as n } from "./lib/strings.js";
4
- import { t as r } from "./utils-C2EKeIw3.js";
5
- import { n as i } from "./buttons-Co6GavvM.js";
6
- import { a, r as o } from "./typography-Cv8MT-82.js";
7
- import { t as s } from "./structure-MvKVq-oL.js";
8
- import { t as c } from "./feedback-DWUkgEjR.js";
9
- import { t as l } from "./field-affordance-recipes-IjzPrCTw.js";
10
- import { S as u, b as d, d as f, g as p, h as m, l as h, m as g, n as _, o as v, p as y, r as b, u as x, x as S, y as C } from "./combobox-DEbdr-3u.js";
11
- import { c as w, l as T } from "./form-sizing-BWs70_a2.js";
12
- import { t as E } from "./input-WwYQZJzG.js";
13
- import { t as D } from "./scroll-area-BheMQ270.js";
14
- import { t as O } from "./use-debounced-callback-Cx1h-hdv.js";
15
- import * as k from "react";
16
- import { useCallback as A, useEffect as j, useMemo as M, useRef as N, useState as P } from "react";
17
- import { Fragment as F, jsx as I, jsxs as L } from "react/jsx-runtime";
18
- import { ChevronDownIcon as R, Loader2 as z, PlusIcon as B, XIcon as ee } from "lucide-react";
19
- import { Combobox as V } from "@base-ui/react/combobox";
20
- //#region src/components/features/combobox/combobox.strings.ts
21
- var H = {
22
- placeholder: "Search...",
23
- clear: "Clear selection",
24
- toggle: "Open options",
25
- searching: "Loading...",
26
- noResults: "No results found.",
27
- typeToSearch: "Type at least {min} characters to search...",
28
- typeMore: "Type {remaining} more character{s} to search...",
29
- createNew: "Create {value}",
30
- loadingMore: "Loading...",
31
- apply: "Apply",
32
- cancel: "Cancel"
33
- }, U = Symbol("combobox-create-option");
34
- function W(e) {
35
- return typeof e == "object" && !!e && U in e;
36
- }
37
- function G(e) {
38
- if (!W(e)) throw Error("Item is not a create option");
39
- return e[U];
40
- }
41
- function te(e) {
42
- return { [U]: e };
43
- }
44
- //#endregion
45
- //#region src/components/features/combobox/components/loading-more.tsx
46
- function K({ loading: e, text: t, className: n }) {
47
- return e ? /* @__PURE__ */ L(s, {
48
- direction: "horizontal",
49
- gap: "sm",
50
- justify: "center",
51
- wrap: !1,
52
- className: r("loading-more--component", "px-control py-space-xs text-xs text-muted-foreground", n),
53
- role: "status",
54
- "aria-live": "polite",
55
- children: [/* @__PURE__ */ I(z, {
56
- className: "size-icon-sm animate-spin",
57
- "aria-hidden": "true"
58
- }), /* @__PURE__ */ I(a, {
59
- tag: "span",
60
- size: "xs",
61
- type: "secondary",
62
- className: "text-inherit",
63
- children: t
64
- })]
65
- }) : null;
66
- }
67
- K.displayName = "LoadingMore";
68
- //#endregion
69
- //#region src/components/features/combobox/components/status-content.tsx
70
- function q({ children: e }) {
71
- return /* @__PURE__ */ I(a, {
72
- tag: "span",
73
- size: "inherit",
74
- type: "secondary",
75
- className: "text-inherit",
76
- children: e
77
- });
78
- }
79
- function J({ loading: e, searchValue: t, minSearchLength: n, itemCount: r, strings: i }) {
80
- let a = t.trim();
81
- if (e) return /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I(z, { className: "size-icon-sm animate-spin" }), /* @__PURE__ */ I(q, { children: i.searching })] });
82
- if (a === "") return i.typeToSearch.includes("{min}") ? /* @__PURE__ */ I(q, { children: i.typeToSearch.replace("{min}", String(n)) }) : /* @__PURE__ */ I(q, { children: i.typeToSearch });
83
- if (a.length < n) {
84
- let e = n - a.length;
85
- return i.typeMore.includes("{remaining}") || i.typeMore.includes("{s}") ? /* @__PURE__ */ I(q, { children: i.typeMore.replace("{remaining}", String(e)).replace("{s}", e === 1 ? "" : "s") }) : /* @__PURE__ */ I(q, { children: i.typeMore });
86
- }
87
- return null;
88
- }
89
- J.displayName = "StatusContent";
90
- //#endregion
91
- //#region src/components/features/combobox/components/combobox-dropdown.tsx
92
- var ne = {
93
- sm: "sm",
94
- md: "md",
95
- lg: "lg"
96
- }, Y = {
97
- sm: "flex min-h-control-sm items-center justify-center px-row-x py-row-y text-center text-pxs leading-tight text-muted-foreground",
98
- md: "flex min-h-control items-center justify-center px-row-x py-row-y text-center text-sm leading-tight text-muted-foreground",
99
- lg: "flex min-h-control-lg items-center justify-center px-row-x py-row-y-lg text-center text-sm leading-tight text-muted-foreground"
100
- };
101
- function re({ loading: e, showStatus: t, showEmpty: n, searchValue: c, minSearchLength: l, items: f, groupedItems: h, createOptionItem: v, renderItemContent: x, getItemReactKey: w, getItemDisabled: T, renderGroupLabel: E, loadingMore: O, strings: k, size: A = "md", portalContainer: j, listRef: M, anchor: N, applyFooter: P }) {
102
- let R = j == null ? void 0 : "z-[100]", z = ne[A];
103
- if (!(t || n || f.length > 0 || O || P)) return null;
104
- let B = /* @__PURE__ */ I(S, {
105
- anchor: N,
106
- className: R,
107
- children: /* @__PURE__ */ L(b, {
108
- "aria-busy": e || void 0,
109
- className: r("combobox-dropdown--popup"),
110
- children: [
111
- !!t && /* @__PURE__ */ I(u, {
112
- className: "gap-space-sm px-control py-space-xs text-xs text-muted-foreground",
113
- children: /* @__PURE__ */ I(J, {
114
- loading: e,
115
- searchValue: c,
116
- minSearchLength: l,
117
- itemCount: f.length,
118
- strings: k
119
- })
120
- }),
121
- !!n && /* @__PURE__ */ I(g, {
122
- className: Y[A],
123
- children: /* @__PURE__ */ I(a, {
124
- tag: "span",
125
- size: "inherit",
126
- type: "secondary",
127
- className: "text-inherit",
128
- children: k.noResults
129
- })
130
- }),
131
- /* @__PURE__ */ I(D, {
132
- viewportRef: M,
133
- className: "max-h-[min(20rem,var(--available-height))]",
134
- children: /* @__PURE__ */ I(C, {
135
- className: "combobox-dropdown--list max-h-none overflow-visible",
136
- children: h ? /* @__PURE__ */ L(F, { children: [Array.from(h.entries()).map(([e, t]) => {
137
- let n = typeof E == "function" ? E(e) : e;
138
- return /* @__PURE__ */ L(m, {
139
- className: "combobox-dropdown--group p-0",
140
- items: t,
141
- children: [/* @__PURE__ */ I(p, { children: typeof n == "string" || typeof n == "number" || typeof n == "bigint" ? /* @__PURE__ */ I(o, { children: n }) : n }), /* @__PURE__ */ I(y, { children: (e) => /* @__PURE__ */ I(_, {
142
- value: e,
143
- size: z,
144
- disabled: T?.(e),
145
- children: x(e)
146
- }, w(e)) })]
147
- }, e);
148
- }), v != null && /* @__PURE__ */ I(_, {
149
- value: v,
150
- size: z,
151
- children: x(v)
152
- }, w(v))] }) : /* @__PURE__ */ I(y, { children: (e) => /* @__PURE__ */ I(_, {
153
- value: e,
154
- size: z,
155
- disabled: T?.(e),
156
- children: x(e)
157
- }, w(e)) })
158
- })
159
- }),
160
- /* @__PURE__ */ I(K, {
161
- loading: !!O,
162
- text: k.loadingMore
163
- }),
164
- !!P && /* @__PURE__ */ L(s, {
165
- direction: "horizontal",
166
- gap: "md",
167
- justify: "end",
168
- wrap: !1,
169
- className: "border-t border-border/60 px-control py-space-xs",
170
- children: [/* @__PURE__ */ I(i, {
171
- type: "button",
172
- tone: "secondary",
173
- buttonStyle: "ghost",
174
- onClick: (e) => {
175
- e.preventDefault(), e.stopPropagation(), P.onCancel();
176
- },
177
- children: P.cancelLabel
178
- }), /* @__PURE__ */ I(i, {
179
- type: "button",
180
- tone: "primary",
181
- onClick: (e) => {
182
- e.preventDefault(), e.stopPropagation(), P.onApply();
183
- },
184
- children: P.applyLabel
185
- })]
186
- })
187
- ]
188
- })
189
- });
190
- return j ? /* @__PURE__ */ I(d, {
191
- container: j,
192
- children: B
193
- }) : /* @__PURE__ */ I(d, { children: B });
194
- }
195
- re.displayName = "ComboboxDropdown";
196
- //#endregion
197
- //#region src/components/features/combobox/components/error-message.tsx
198
- var ie = {
199
- sm: "mt-space-sm",
200
- md: "mt-space-md",
201
- lg: "mt-space-lg"
202
- };
203
- function ae({ error: e, size: t, className: n }) {
204
- return e ? /* @__PURE__ */ I(a, {
205
- tag: "p",
206
- size: "xs",
207
- type: "error",
208
- className: r("error-message--component", ie[t], n),
209
- role: "alert",
210
- "aria-live": "polite",
211
- children: e
212
- }) : null;
213
- }
214
- ae.displayName = "ErrorMessage";
215
- //#endregion
216
- //#region src/components/features/combobox/components/highlighted-text.tsx
217
- function oe(e) {
218
- return e.replace(/[$()*+.?[\\\]^{|}]/g, "\\$&");
219
- }
220
- function se({ text: e, highlight: t, highlightClassName: n = "rounded-radius-sm bg-warning/20 px-0.5 text-warning-accent dark:bg-warning/25" }) {
221
- if (!t.trim()) return /* @__PURE__ */ I(a, {
222
- tag: "span",
223
- size: "inherit",
224
- lineHeight: "tight",
225
- className: "text-inherit",
226
- children: e
227
- });
228
- let r = RegExp(`(${oe(t)})`, "gi"), i = e.split(r), o = 0;
229
- return /* @__PURE__ */ I(a, {
230
- tag: "span",
231
- size: "inherit",
232
- lineHeight: "tight",
233
- className: "text-inherit",
234
- children: i.map((e, t) => {
235
- let r = t % 2 == 1, i = String(o);
236
- return o += e.length, r ? /* @__PURE__ */ I("mark", {
237
- className: n,
238
- children: e
239
- }, i) : /* @__PURE__ */ I(k.Fragment, { children: e }, i);
240
- })
241
- });
242
- }
243
- se.displayName = "HighlightedText";
244
- //#endregion
245
- //#region src/components/features/combobox/hooks/use-debounced-search.ts
246
- function X({ searchValue: e, onSearch: t, debounceMs: n = 300, minSearchLength: r = 3 }) {
247
- let i = O((e) => {
248
- t?.(e);
249
- }, n);
250
- j(() => {
251
- let t = e.trim();
252
- if (!(t.length < r)) return i(t), i.cancel;
253
- }, [
254
- e,
255
- r,
256
- i
257
- ]);
258
- }
259
- //#endregion
260
- //#region src/components/features/combobox/hooks/use-grouped-items.ts
261
- function ce({ items: e, getItemGroup: t }) {
262
- return M(() => {
263
- if (!t) return null;
264
- let n = /* @__PURE__ */ new Map();
265
- for (let r of e) {
266
- let e = t(r), i = n.get(e);
267
- i ? i.push(r) : n.set(e, [r]);
268
- }
269
- return n;
270
- }, [e, t]);
271
- }
272
- //#endregion
273
- //#region src/components/features/combobox/hooks/use-load-more.ts
274
- function le({ hasMore: e, onLoadMore: t, loadingMore: n }) {
275
- let r = N(!1), i = N(null), a = O(() => {
276
- r.current = !0, t?.(), i.current && clearTimeout(i.current), i.current = setTimeout(() => {
277
- r.current = !1, i.current = null;
278
- }, 500);
279
- }, 100);
280
- return j(() => () => {
281
- i.current && clearTimeout(i.current);
282
- }, []), { handleScroll: A((i) => {
283
- if (!e || !t || n || r.current) return;
284
- let { scrollHeight: o, scrollTop: s, clientHeight: c } = i.target;
285
- (s + c) / o >= .8 && a();
286
- }, [
287
- e,
288
- t,
289
- n,
290
- a
291
- ]) };
292
- }
293
- //#endregion
294
- //#region src/components/features/combobox/hooks/use-combobox-core.tsx
295
- function ue(e) {
296
- return n(H, e);
297
- }
298
- function de(e, t, n) {
299
- let r = t.toLowerCase();
300
- return e.some((e) => n(e).toLowerCase() === r);
301
- }
302
- function fe({ items: e, searchValue: t, getItemLabel: n, getItemKey: i, loading: o = !1, showListContent: s = !0, minSearchLength: c = 3, strings: l, renderItem: u, onSearch: d, debounceMs: f = 300, creatable: p, onCreate: m, getItemGroup: h, hasMore: g, onLoadMore: _, loadingMore: v, highlightMatch: y, ensuredItems: b = [] }) {
303
- let x = ue(l), S = i ?? n, C = N(null), w = t.trim(), T = s && (o || w.length < c);
304
- X({
305
- searchValue: t,
306
- onSearch: d,
307
- debounceMs: f,
308
- minSearchLength: c
309
- });
310
- let { handleScroll: E } = le({
311
- hasMore: s && !T ? g : !1,
312
- onLoadMore: _,
313
- loadingMore: v
314
- });
315
- j(() => {
316
- let e = C.current;
317
- if (s && !T && e && g && _) return e.addEventListener("scroll", E), () => e.removeEventListener("scroll", E);
318
- }, [
319
- E,
320
- g,
321
- _,
322
- s,
323
- T
324
- ]);
325
- let D = M(() => {
326
- if (!s || T) return [];
327
- if (b.length === 0) return e;
328
- let t = [...b];
329
- return e.forEach((e) => {
330
- let n = S(e);
331
- b.some((e) => S(e) === n) || t.push(e);
332
- }), t;
333
- }, [
334
- e,
335
- b,
336
- S,
337
- s,
338
- T
339
- ]), O = ce({
340
- items: D,
341
- getItemGroup: h
342
- }), k = M(() => !s || T || !p || !m || w.length < c ? !1 : !de(D, w, n), [
343
- p,
344
- m,
345
- w,
346
- c,
347
- D,
348
- n,
349
- s,
350
- T
351
- ]), P = M(() => k ? te(w) : null, [k, w]);
352
- return {
353
- strings: x,
354
- getKey: S,
355
- trimmedSearch: w,
356
- listRef: C,
357
- baseItems: D,
358
- allItems: M(() => P ? [...D, P] : D, [D, P]),
359
- groupedItems: O,
360
- createOptionItem: P,
361
- showStatus: T,
362
- showEmpty: s && !o && w.length >= c && e.length === 0 && !k,
363
- showCreateOption: k,
364
- renderItemContent: A((e) => {
365
- if (W(e)) {
366
- let t = G(e);
367
- return /* @__PURE__ */ L("span", {
368
- className: r("combobox-core--component", "flex items-center gap-space-sm"),
369
- children: [/* @__PURE__ */ I(B, { className: "size-icon-sm" }), x.createNew.includes("{value}") ? /* @__PURE__ */ I(a, {
370
- tag: "span",
371
- size: "inherit",
372
- weight: "medium",
373
- lineHeight: "tight",
374
- className: "text-inherit",
375
- children: x.createNew.replace("{value}", t)
376
- }) : /* @__PURE__ */ L("span", {
377
- className: "inline-flex items-center gap-space-sm",
378
- children: [/* @__PURE__ */ I(a, {
379
- tag: "span",
380
- size: "inherit",
381
- weight: "medium",
382
- lineHeight: "tight",
383
- className: "text-inherit",
384
- children: x.createNew
385
- }), /* @__PURE__ */ I(a, {
386
- tag: "span",
387
- size: "inherit",
388
- weight: "medium",
389
- lineHeight: "tight",
390
- className: "text-inherit",
391
- children: t
392
- })]
393
- })]
394
- });
395
- }
396
- if (u) return u(e);
397
- let t = n(e);
398
- return y && w ? /* @__PURE__ */ I(se, {
399
- text: t,
400
- highlight: w
401
- }) : /* @__PURE__ */ I(a, {
402
- tag: "span",
403
- size: "inherit",
404
- weight: "medium",
405
- lineHeight: "tight",
406
- className: "text-inherit",
407
- children: t
408
- });
409
- }, [
410
- x.createNew,
411
- u,
412
- n,
413
- y,
414
- w
415
- ]),
416
- itemToStringLabel: A((e) => W(e) ? G(e) : n(e), [n]),
417
- getItemReactKey: A((e) => W(e) ? `__create__:${G(e)}` : String(S(e)), [S]),
418
- handleScroll: E
419
- };
420
- }
421
- //#endregion
422
- //#region src/components/features/combobox/combobox.tsx
423
- function pe(t, n) {
424
- return e(t, n, "md");
425
- }
426
- var me = {
427
- sm: "pe-control-actions-sm",
428
- md: "pe-control-actions",
429
- lg: "pe-control-actions"
430
- }, he = {
431
- sm: "sm",
432
- md: "md",
433
- lg: "lg"
434
- };
435
- function ge(e) {
436
- return e;
437
- }
438
- function _e({ placeholder: e, clearLabel: t, toggleLabel: n, size: a, error: o, required: s, disabled: c, clearable: u = !0, className: d, onBlur: f }) {
439
- return /* @__PURE__ */ L("div", {
440
- className: "relative",
441
- children: [/* @__PURE__ */ I(V.Input, {
442
- render: /* @__PURE__ */ I(E, {
443
- size: a,
444
- invalid: o,
445
- className: r(u ? me[a] : l.togglePadding, d)
446
- }),
447
- placeholder: e,
448
- "aria-invalid": o || void 0,
449
- "aria-required": s,
450
- disabled: c,
451
- onBlur: f
452
- }), /* @__PURE__ */ L("div", {
453
- className: "absolute inset-y-0 end-space-xs flex items-center gap-space-xs text-muted-foreground",
454
- children: [u ? /* @__PURE__ */ I(V.Clear, { render: /* @__PURE__ */ I(i, {
455
- type: "button",
456
- tone: "secondary",
457
- buttonStyle: "ghost",
458
- size: "sm",
459
- iconOnly: !0,
460
- className: r(l.target, l.focus, l.clear),
461
- "aria-label": t,
462
- children: /* @__PURE__ */ I(ee, {
463
- className: l.icon,
464
- "aria-hidden": "true"
465
- })
466
- }) }) : null, /* @__PURE__ */ I(V.Trigger, { render: /* @__PURE__ */ I(i, {
467
- type: "button",
468
- tone: "secondary",
469
- buttonStyle: "ghost",
470
- size: "sm",
471
- iconOnly: !0,
472
- className: r(l.target, l.focus, l.toggle),
473
- "aria-label": n,
474
- children: /* @__PURE__ */ I(R, {
475
- className: l.icon,
476
- "aria-hidden": "true"
477
- })
478
- }) })]
479
- })]
480
- });
481
- }
482
- function Z({ items: e, selectedValue: n, onSelectedValueChange: r, clearSearchOnClose: i = !0, searchValue: a, onSearchValueChange: o, getItemLabel: s, getItemKey: c, loading: l = !1, showListContent: u = !0, minSearchLength: d = 3, strings: f, disabled: p = !1, className: m, clearable: h = !0, renderItem: g, portalContainer: _, name: y, invalid: b, error: x, required: S, onBlur: C, onSearch: w, debounceMs: T, creatable: E, onCreate: D, getItemGroup: O, renderGroupLabel: k, hasMore: j, onLoadMore: M, loadingMore: N, getItemDisabled: F, highlightMatch: R, size: z, open: B, onOpenChange: ee }) {
483
- let { defaultScale: V } = t(), H = pe(z, V), U = ge(H), te = b || !!x, K = fe({
484
- items: e,
485
- searchValue: a,
486
- onSearchValueChange: o,
487
- getItemLabel: s,
488
- getItemKey: c,
489
- loading: l,
490
- showListContent: u,
491
- minSearchLength: d,
492
- strings: f,
493
- renderItem: g,
494
- onSearch: w,
495
- debounceMs: T,
496
- creatable: E,
497
- onCreate: D,
498
- getItemGroup: O,
499
- hasMore: j,
500
- onLoadMore: M,
501
- loadingMore: N,
502
- highlightMatch: R,
503
- size: H,
504
- ensuredItems: n ? [n] : []
505
- }), [q, J] = P(!1), ne = A((e) => {
506
- J(e), !e && i && o(""), ee?.(e);
507
- }, [
508
- i,
509
- ee,
510
- o
511
- ]), Y = q ? a : n ? K.itemToStringLabel(n) : "", ie = A((e) => {
512
- if (e && W(e)) {
513
- let t = G(e);
514
- D?.(t);
515
- return;
516
- }
517
- r(e);
518
- }, [r, D]);
519
- return /* @__PURE__ */ L("div", {
520
- className: "combobox--component",
521
- children: [/* @__PURE__ */ L(v, {
522
- items: K.allItems,
523
- value: n,
524
- onValueChange: ie,
525
- inputValue: Y,
526
- onInputValueChange: (e, { reason: t }) => {
527
- if (t === "item-press") {
528
- o("");
529
- return;
530
- }
531
- o(e);
532
- },
533
- itemToStringLabel: K.itemToStringLabel,
534
- disabled: p,
535
- filter: null,
536
- name: y,
537
- required: S,
538
- open: B,
539
- onOpenChange: ne,
540
- children: [/* @__PURE__ */ I(_e, {
541
- placeholder: K.strings.placeholder,
542
- clearLabel: K.strings.clear,
543
- toggleLabel: K.strings.toggle,
544
- className: m,
545
- size: U,
546
- error: te,
547
- required: S,
548
- disabled: p,
549
- clearable: h,
550
- onBlur: C
551
- }), /* @__PURE__ */ I(re, {
552
- loading: l,
553
- showStatus: K.showStatus,
554
- showEmpty: K.showEmpty,
555
- searchValue: a,
556
- minSearchLength: d,
557
- items: K.allItems,
558
- groupedItems: K.groupedItems,
559
- createOptionItem: K.createOptionItem,
560
- renderItemContent: K.renderItemContent,
561
- getItemReactKey: K.getItemReactKey,
562
- getItemDisabled: F,
563
- renderGroupLabel: k,
564
- loadingMore: u && !K.showStatus ? N : !1,
565
- strings: K.strings,
566
- size: H,
567
- portalContainer: _,
568
- listRef: K.listRef
569
- })]
570
- }), /* @__PURE__ */ I(ae, {
571
- error: x,
572
- size: H
573
- })]
574
- });
575
- }
576
- function ve({ items: e, selectedValues: n, onSelectedValuesChange: i, searchValue: o, onSearchValueChange: s, getItemLabel: c, getItemKey: l, loading: u = !1, showListContent: d = !0, minSearchLength: p = 3, strings: m, disabled: g = !1, className: _, renderItem: y, portalContainer: b, name: S, invalid: C, error: E, required: D, onBlur: O, onSearch: k, debounceMs: M, creatable: F, onCreate: R, getItemGroup: z, renderGroupLabel: B, hasMore: ee, onLoadMore: V, loadingMore: H, getItemDisabled: U, highlightMatch: te, size: K, open: q, onOpenChange: J, closeOnSelect: ne = !1, applyButton: Y = !1, onApply: ie, onCancel: oe }) {
577
- let { defaultScale: se } = t(), X = pe(K, se), ce = ge(X), le = he[X], ue = C || !!E, de = N(null), me = l ?? c, [_e, Z] = P(n), [ve, ye] = P(!1), be = q !== void 0, xe = be ? q : ve;
578
- j(() => {
579
- Y && Z(n);
580
- }, [Y, n]);
581
- let Q = A((e) => {
582
- be || ye(e), J?.(e);
583
- }, [be, J]), $ = fe({
584
- items: e,
585
- searchValue: o,
586
- onSearchValueChange: s,
587
- getItemLabel: c,
588
- getItemKey: l,
589
- loading: u,
590
- showListContent: d,
591
- minSearchLength: p,
592
- strings: m,
593
- renderItem: y,
594
- onSearch: k,
595
- debounceMs: M,
596
- creatable: F,
597
- onCreate: R,
598
- getItemGroup: z,
599
- hasMore: ee,
600
- onLoadMore: V,
601
- loadingMore: H,
602
- highlightMatch: te,
603
- size: X,
604
- ensuredItems: n
605
- }), Se = A((e) => {
606
- let t = [], n = null;
607
- for (let r of e) W(r) ? n = G(r) : t.push(r);
608
- n && R?.(n);
609
- let r = t.length !== e.length || !n ? t : null;
610
- r && (Y ? Z(r) : i(r)), ne && Q(!1);
611
- }, [
612
- i,
613
- R,
614
- Y,
615
- ne,
616
- Q
617
- ]), Ce = A(() => {
618
- Y && i(_e), ie?.(), Q(!1);
619
- }, [
620
- Y,
621
- _e,
622
- ie,
623
- i,
624
- Q
625
- ]), we = A(() => {
626
- Y && Z(n), oe?.(), Q(!1);
627
- }, [
628
- Y,
629
- n,
630
- oe,
631
- Q
632
- ]), Te = Y ? _e : n, Ee = Te.length > 0 ? void 0 : $.strings.placeholder;
633
- return /* @__PURE__ */ L("div", {
634
- className: "combobox--component",
635
- children: [/* @__PURE__ */ L(v, {
636
- items: $.allItems,
637
- multiple: !0,
638
- value: Te,
639
- onValueChange: Se,
640
- inputValue: o,
641
- onInputValueChange: (e, { reason: t }) => {
642
- if (t === "item-press") {
643
- s("");
644
- return;
645
- }
646
- s(e);
647
- },
648
- itemToStringLabel: $.itemToStringLabel,
649
- disabled: g,
650
- filter: null,
651
- name: S,
652
- required: D,
653
- open: xe,
654
- onOpenChange: (e) => {
655
- !e && Y && Z(n), Q(e);
656
- },
657
- children: [/* @__PURE__ */ L(x, {
658
- ref: de,
659
- className: r(w[ce], T[ce], ce === "sm" ? "text-pxs" : "text-sm", "bg-transparent !shadow-none", _),
660
- size: le,
661
- error: ue,
662
- children: [Te.map((e) => /* @__PURE__ */ I(h, { children: /* @__PURE__ */ I(a, {
663
- tag: "span",
664
- size: "inherit",
665
- weight: "medium",
666
- lineHeight: "tight",
667
- className: "combobox--chip-label text-inherit",
668
- children: c(e)
669
- }) }, me(e))), /* @__PURE__ */ I(f, {
670
- placeholder: Ee,
671
- "aria-invalid": ue || void 0,
672
- "aria-required": D,
673
- onBlur: O
674
- })]
675
- }), /* @__PURE__ */ I(re, {
676
- loading: u,
677
- showStatus: $.showStatus,
678
- showEmpty: $.showEmpty,
679
- searchValue: o,
680
- minSearchLength: p,
681
- items: $.allItems,
682
- groupedItems: $.groupedItems,
683
- createOptionItem: $.createOptionItem,
684
- renderItemContent: $.renderItemContent,
685
- getItemReactKey: $.getItemReactKey,
686
- getItemDisabled: U,
687
- renderGroupLabel: B,
688
- loadingMore: d && !$.showStatus ? H : !1,
689
- strings: $.strings,
690
- size: X,
691
- portalContainer: b,
692
- listRef: $.listRef,
693
- anchor: de,
694
- applyFooter: d && Y ? {
695
- applyLabel: $.strings.apply,
696
- cancelLabel: $.strings.cancel,
697
- onApply: Ce,
698
- onCancel: we
699
- } : void 0
700
- })]
701
- }), /* @__PURE__ */ I(ae, {
702
- error: E,
703
- size: X
704
- })]
705
- });
706
- }
707
- Z.displayName = "Combobox", ve.displayName = "MultiCombobox";
708
- //#endregion
709
- //#region src/components/features/combobox/async-resource-combobox.tsx
710
- var ye = {
711
- ...H,
712
- error: "Unable to load options.",
713
- retry: "Retry"
714
- };
715
- function be(e) {
716
- return typeof e == "string" || typeof e == "number" || typeof e == "bigint";
717
- }
718
- function xe({ fetcher: e, value: t, defaultValue: i = null, onValueChange: o, onAfterFetch: l, onError: u, getKey: d, getLabel: f, getDescription: p, getMeta: m, renderOption: h, limit: g = 10, debounceMs: _ = 300, preload: v = !0, minSearchLength: y = 0, errorMessage: b, renderError: x, strings: S, disabled: C, size: w = "md", ...T }) {
719
- let E = n(ye, S), D = t !== void 0, [k, F] = P(i), R = D ? t : k, [z, B] = P(""), [ee, V] = P([]), [H, U] = P(!1), [W, G] = P(null), [te, K] = P(0), q = N(0), J = z.trim(), ne = A((e) => {
720
- D || F(e), o?.(e);
721
- }, [D, o]), Y = O((t, n) => {
722
- U(!0), G(null), e(n).then((e) => {
723
- n.signal?.aborted || q.current !== t || (V(e), l?.(e, n));
724
- }).catch((e) => {
725
- n.signal?.aborted || q.current !== t || (V([]), G({
726
- error: e,
727
- query: n.query
728
- }), u?.(e, n));
729
- }).finally(() => {
730
- !n.signal?.aborted && q.current === t && U(!1);
731
- });
732
- }, _);
733
- j(() => {
734
- if (C) return;
735
- if (!(J.length > 0 ? J.length >= y : v)) {
736
- V([]), U(!1), G(null);
737
- return;
738
- }
739
- let e = q.current + 1;
740
- q.current = e;
741
- let t = new AbortController();
742
- return Y(e, {
743
- query: J,
744
- limit: g,
745
- signal: t.signal
746
- }), () => {
747
- Y.cancel(), t.abort();
748
- };
749
- }, [
750
- C,
751
- g,
752
- y,
753
- v,
754
- te,
755
- Y,
756
- J
757
- ]);
758
- let re = A(() => {
759
- W && (B(W.query), K((e) => e + 1));
760
- }, [W]), ie = A((e) => {
761
- if (h) return h(e, {
762
- query: J,
763
- isSelected: R ? d(R) === d(e) : !1
764
- });
765
- let t = p?.(e), n = m?.(e);
766
- return /* @__PURE__ */ L(s, {
767
- render: /* @__PURE__ */ I("span", {}),
768
- direction: "horizontal",
769
- gap: "md",
770
- wrap: !1,
771
- className: "async-resource-combobox--option leading-tight",
772
- children: [/* @__PURE__ */ I(a, {
773
- tag: "span",
774
- size: w === "sm" ? "pxs" : void 0,
775
- weight: "medium",
776
- className: "min-w-0 shrink truncate",
777
- children: f(e)
778
- }), (!!t || !!n) && /* @__PURE__ */ L("span", {
779
- className: "inline-flex min-w-0 flex-1 items-center gap-space-sm overflow-hidden text-muted-foreground",
780
- children: [!!t && (be(t) ? /* @__PURE__ */ I(a, {
781
- tag: "span",
782
- size: "xs",
783
- type: "secondary",
784
- className: "min-w-0 truncate",
785
- children: t
786
- }) : t), !!n && (be(n) ? /* @__PURE__ */ I(a, {
787
- tag: "span",
788
- size: "xs",
789
- type: "secondary",
790
- className: "min-w-0 truncate opacity-75",
791
- children: n
792
- }) : n)]
793
- })]
794
- });
795
- }, [
796
- p,
797
- d,
798
- f,
799
- m,
800
- h,
801
- R,
802
- w,
803
- J
804
- ]), ae = M(() => {
805
- if (W) return b ?? E.error;
806
- }, [
807
- b,
808
- W,
809
- E.error
810
- ]), oe = W !== null, se = W ? x?.({
811
- error: W.error,
812
- query: W.query,
813
- retry: re
814
- }) ?? /* @__PURE__ */ I(c, {
815
- variant: "inline",
816
- title: ae,
817
- onRetry: re,
818
- retryLabel: E.retry,
819
- className: "async-resource-combobox--error mt-space-sm"
820
- }) : null;
821
- return /* @__PURE__ */ L("div", {
822
- "data-component": "async-resource-combobox",
823
- "data-slot": "async-resource-combobox",
824
- className: r("async-resource-combobox--component", T.className),
825
- children: [/* @__PURE__ */ I(Z, {
826
- ...T,
827
- className: void 0,
828
- disabled: C,
829
- size: w,
830
- items: ee,
831
- selectedValue: R ?? null,
832
- onSelectedValueChange: ne,
833
- clearSearchOnClose: !1,
834
- searchValue: z,
835
- onSearchValueChange: B,
836
- getItemLabel: f,
837
- getItemKey: d,
838
- loading: !oe && H,
839
- showListContent: !oe,
840
- minSearchLength: y,
841
- strings: E,
842
- renderItem: ie
843
- }), se]
844
- });
845
- }
846
- xe.displayName = "AsyncResourceCombobox";
847
- //#endregion
848
- export { fe as a, ve as i, ye as n, H as o, Z as r, xe as t };
849
-
850
- //# sourceMappingURL=combobox-xv3yJbzl.js.map