themelia-react-ui 2.0.5 → 3.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 (968) hide show
  1. package/CHANGELOG.md +326 -0
  2. package/MIGRATION.md +858 -0
  3. package/README.md +35 -24
  4. package/dist/{accordion-B9MHG0cT.js → accordion-DNVqwEIC.js} +37 -37
  5. package/dist/accordion-DNVqwEIC.js.map +1 -0
  6. package/dist/action-menu-D5343RwT.js +286 -0
  7. package/dist/action-menu-D5343RwT.js.map +1 -0
  8. package/dist/ai-artifact-otrz9ZwS.js +1214 -0
  9. package/dist/ai-artifact-otrz9ZwS.js.map +1 -0
  10. package/dist/anchored-positioning-1U_eBFNx.js +9 -0
  11. package/dist/anchored-positioning-1U_eBFNx.js.map +1 -0
  12. package/dist/app-shell-CPN30Nb1.js +372 -0
  13. package/dist/app-shell-CPN30Nb1.js.map +1 -0
  14. package/dist/{attachment-Dg_69lPS.js → attachment-D2-fpfmv.js} +15 -15
  15. package/dist/{attachment-Dg_69lPS.js.map → attachment-D2-fpfmv.js.map} +1 -1
  16. package/dist/{auth-DTkkshS8.js → auth-g_oUTDDC.js} +236 -243
  17. package/dist/auth-g_oUTDDC.js.map +1 -0
  18. package/dist/{avatar-CeZaFmNH.js → avatar-Ca3Ihrq4.js} +4 -4
  19. package/dist/{avatar-CeZaFmNH.js.map → avatar-Ca3Ihrq4.js.map} +1 -1
  20. package/dist/{badge-xIiV_E7f.js → badge-oGiXblW7.js} +8 -9
  21. package/dist/badge-oGiXblW7.js.map +1 -0
  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 +2 -2
  29. package/dist/base/cards.js +3 -3
  30. package/dist/base/carousel.js +11 -11
  31. package/dist/base/carousel.js.map +1 -1
  32. package/dist/base/cascader.js +1 -1
  33. package/dist/base/chart.js +1 -1
  34. package/dist/base/choice-inputs.js +2 -2
  35. package/dist/base/code-block.js +1 -1
  36. package/dist/base/combobox.js +1 -1
  37. package/dist/base/command.js +1 -1
  38. package/dist/base/copyable.js +1 -1
  39. package/dist/base/date-pickers.js +2 -2
  40. package/dist/base/display.js +7 -7
  41. package/dist/base/feedback.js +4 -4
  42. package/dist/base/forms-numeric.js +2 -2
  43. package/dist/base/forms.js +2 -2
  44. package/dist/base/inline-edit.js +13 -13
  45. package/dist/base/inline-edit.js.map +1 -1
  46. package/dist/base/item.js +1 -1
  47. package/dist/base/media-gallery.js +203 -2
  48. package/dist/base/media-gallery.js.map +1 -0
  49. package/dist/base/metadata-list.js +1 -1
  50. package/dist/base/navigation.js +7 -7
  51. package/dist/base/popover-menu.js +1 -1
  52. package/dist/base/popover.js +1 -1
  53. package/dist/base/qr-code.js +32 -22
  54. package/dist/base/qr-code.js.map +1 -1
  55. package/dist/base/repeaters.js +208 -198
  56. package/dist/base/repeaters.js.map +1 -1
  57. package/dist/base/sidebar.js +2 -2
  58. package/dist/base/signature-pad.js +14 -14
  59. package/dist/base/signature-pad.js.map +1 -1
  60. package/dist/base/skeleton.js +1 -1
  61. package/dist/base/spinner.js +8 -14
  62. package/dist/base/spinner.js.map +1 -1
  63. package/dist/base/structure.js +1 -1
  64. package/dist/base/table.js +1 -1
  65. package/dist/base/text-inputs.js +3 -3
  66. package/dist/base/toaster.js +2 -2
  67. package/dist/base/tree.js +2 -2
  68. package/dist/base/upload-queue.js +303 -2
  69. package/dist/base/upload-queue.js.map +1 -0
  70. package/dist/base/upload.js +3 -4
  71. package/dist/base/value-inputs.js +1 -1
  72. package/dist/{batch-action-bar-Cb8cuvyy.js → batch-action-bar-D6MZQNnC.js} +10 -10
  73. package/dist/{batch-action-bar-Cb8cuvyy.js.map → batch-action-bar-D6MZQNnC.js.map} +1 -1
  74. package/dist/blocks/admin.js +242 -228
  75. package/dist/blocks/admin.js.map +1 -1
  76. package/dist/blocks/ai.js +398 -354
  77. package/dist/blocks/ai.js.map +1 -1
  78. package/dist/blocks/analytics/charts.js +1022 -0
  79. package/dist/blocks/analytics/charts.js.map +1 -0
  80. package/dist/blocks/analytics/usage-card.js +1 -1
  81. package/dist/blocks/analytics.js +173 -1392
  82. package/dist/blocks/analytics.js.map +1 -1
  83. package/dist/blocks/collaboration.js +1 -1
  84. package/dist/blocks/commerce/receipt.js +1 -1
  85. package/dist/blocks/commerce.js +1533 -1399
  86. package/dist/blocks/commerce.js.map +1 -1
  87. package/dist/blocks/data-display.js +2 -3
  88. package/dist/blocks/onboarding.js +91 -82
  89. package/dist/blocks/onboarding.js.map +1 -1
  90. package/dist/blocks/planning.js +25 -25
  91. package/dist/blocks/planning.js.map +1 -1
  92. package/dist/blocks/timelines.js +2 -2
  93. package/dist/breadcrumbs-CQ9JSlez.js +136 -0
  94. package/dist/breadcrumbs-CQ9JSlez.js.map +1 -0
  95. package/dist/{button-S2Cubiiz.js → button-rd6FiHfQ.js} +12 -8
  96. package/dist/button-rd6FiHfQ.js.map +1 -0
  97. package/dist/{buttons-BedGfygC.js → buttons-pZVgPTZn.js} +230 -246
  98. package/dist/buttons-pZVgPTZn.js.map +1 -0
  99. package/dist/{cards-rNX1M4Xn.js → cards-CgWyqvgZ.js} +25 -22
  100. package/dist/{cards-rNX1M4Xn.js.map → cards-CgWyqvgZ.js.map} +1 -1
  101. package/dist/cascader-Cf05pwaq.js +444 -0
  102. package/dist/cascader-Cf05pwaq.js.map +1 -0
  103. package/dist/{chart-Darg_0Kv.js → chart-CygRCyIZ.js} +5 -5
  104. package/dist/{chart-Darg_0Kv.js.map → chart-CygRCyIZ.js.map} +1 -1
  105. package/dist/{checkbox-fflqmODR.js → checkbox-Dy5_XBMZ.js} +4 -4
  106. package/dist/{checkbox-fflqmODR.js.map → checkbox-Dy5_XBMZ.js.map} +1 -1
  107. package/dist/{choice-inputs-zUgBZfE4.js → choice-inputs-oJEsrb5Y.js} +195 -184
  108. package/dist/choice-inputs-oJEsrb5Y.js.map +1 -0
  109. package/dist/{code-block-BzmM9Eig.js → code-block-BrLD7mCi.js} +44 -60
  110. package/dist/code-block-BrLD7mCi.js.map +1 -0
  111. package/dist/collapsible-CRCCg_bO.js +80 -0
  112. package/dist/collapsible-CRCCg_bO.js.map +1 -0
  113. package/dist/{collection-content-gDh1v6O4.js → collection-content-D7SoDlYd.js} +3 -3
  114. package/dist/{collection-content-gDh1v6O4.js.map → collection-content-D7SoDlYd.js.map} +1 -1
  115. package/dist/combobox-Dl6f6kHz.js +362 -0
  116. package/dist/combobox-Dl6f6kHz.js.map +1 -0
  117. package/dist/combobox-DrDXtSSt.js +929 -0
  118. package/dist/combobox-DrDXtSSt.js.map +1 -0
  119. package/dist/command-CjZ2VzKC.js +432 -0
  120. package/dist/command-CjZ2VzKC.js.map +1 -0
  121. package/dist/comments-C2MZyRmh.js +1214 -0
  122. package/dist/comments-C2MZyRmh.js.map +1 -0
  123. package/dist/components/base/accordion/accordion.d.ts +11 -3
  124. package/dist/components/base/action-menu/action-menu.d.ts +11 -3
  125. package/dist/components/base/buttons/button.d.ts +2 -2
  126. package/dist/components/base/buttons/index.d.ts +1 -1
  127. package/dist/components/base/buttons/loader-button.d.ts +6 -15
  128. package/dist/components/base/cards/index.d.ts +1 -1
  129. package/dist/components/base/cards/partials/card-body-context.d.ts +6 -0
  130. package/dist/components/base/cards/smart-card.d.ts +0 -2
  131. package/dist/components/base/cards/smart-card.types.d.ts +12 -10
  132. package/dist/components/base/cascader/cascader.d.ts +8 -2
  133. package/dist/components/base/cascader/cascader.types.d.ts +24 -2
  134. package/dist/components/base/cascader/index.d.ts +1 -1
  135. package/dist/components/base/choice-inputs/choice-types.d.ts +4 -0
  136. package/dist/components/base/choice-inputs/pill-radio-group.d.ts +7 -6
  137. package/dist/components/base/choice-inputs/switch.d.ts +1 -1
  138. package/dist/components/base/code-block/use-code-copy.d.ts +2 -6
  139. package/dist/components/base/combobox/combobox-field.d.ts +2 -2
  140. package/dist/components/base/command/command.d.ts +1 -1
  141. package/dist/components/base/date-pickers/date-picker-internals.d.ts +3 -1
  142. package/dist/components/base/date-pickers/datepicker.types.d.ts +11 -7
  143. package/dist/components/base/date-pickers/time-picker.d.ts +17 -3
  144. package/dist/components/base/display/dialog.d.ts +3 -9
  145. package/dist/components/base/display/index.d.ts +2 -3
  146. package/dist/components/base/display/separator.d.ts +1 -1
  147. package/dist/components/base/feedback/alert.d.ts +2 -1
  148. package/dist/components/base/feedback/empty.d.ts +10 -2
  149. package/dist/components/base/feedback/state-display.d.ts +5 -1
  150. package/dist/components/base/feedback/state-display.strings.d.ts +9 -0
  151. package/dist/components/base/forms/form-field.d.ts +7 -2
  152. package/dist/components/base/forms/workflow.d.ts +2 -2
  153. package/dist/components/base/forms-numeric/coordinates-input.d.ts +4 -1
  154. package/dist/components/base/forms-numeric/decimal-input.d.ts +2 -2
  155. package/dist/components/base/forms-numeric/dimensions-input.d.ts +13 -18
  156. package/dist/components/base/forms-numeric/index.d.ts +3 -3
  157. package/dist/components/base/forms-numeric/numeric-composite-field.d.ts +12 -0
  158. package/dist/components/base/forms-numeric/weight-input.d.ts +6 -1
  159. package/dist/components/base/item/item.types.d.ts +6 -2
  160. package/dist/components/base/metadata-list/index.d.ts +1 -3
  161. package/dist/components/base/metadata-list/metadata-list.d.ts +4 -1
  162. package/dist/components/base/navigation/index.d.ts +2 -2
  163. package/dist/components/base/navigation/language-switcher.d.ts +17 -8
  164. package/dist/components/base/navigation/navigation-tabs.d.ts +8 -1
  165. package/dist/components/base/navigation/page-header/index.d.ts +1 -1
  166. package/dist/components/base/navigation/page-header/page-header.d.ts +13 -17
  167. package/dist/components/base/navigation/pagination.d.ts +5 -5
  168. package/dist/components/base/popover/popover.recipes.d.ts +0 -1
  169. package/dist/components/base/qr-code/qr-code.d.ts +4 -0
  170. package/dist/components/base/repeaters/index.d.ts +1 -1
  171. package/dist/components/base/repeaters/key-value-editor.d.ts +6 -1
  172. package/dist/components/base/sheet/sheet.d.ts +6 -15
  173. package/dist/components/base/sidebar/index.d.ts +1 -6
  174. package/dist/components/base/sidebar/sidebar.d.ts +40 -10
  175. package/dist/components/base/skeleton/skeleton.d.ts +1 -1
  176. package/dist/components/base/structure/structure.types.d.ts +11 -2
  177. package/dist/components/base/text-inputs/index.d.ts +1 -1
  178. package/dist/components/base/tree/index.d.ts +1 -0
  179. package/dist/components/base/tree/tree.d.ts +2 -2
  180. package/dist/components/base/tree/tree.types.d.ts +7 -1
  181. package/dist/components/base/upload/avatar-upload.d.ts +2 -1
  182. package/dist/components/base/upload/file-upload.validation.d.ts +37 -1
  183. package/dist/components/base/upload/image-upload.d.ts +4 -1
  184. package/dist/components/base/upload/index.d.ts +3 -9
  185. package/dist/components/base/value-inputs/date-time-input.d.ts +4 -0
  186. package/dist/components/base/value-inputs/slider.d.ts +5 -2
  187. package/dist/components/blocks/admin/action-surfaces/index.d.ts +17 -4
  188. package/dist/components/blocks/admin/api-key-list/api-key-list.types.d.ts +9 -3
  189. package/dist/components/blocks/admin/index.d.ts +1 -1
  190. package/dist/components/blocks/ai/ai-artifact/ai-artifact.d.ts +1 -1
  191. package/dist/components/blocks/ai/ai-artifact/types.d.ts +9 -4
  192. package/dist/components/blocks/ai/ai-chain-of-thought/ai-chain-of-thought.d.ts +1 -1
  193. package/dist/components/blocks/ai/ai-chain-of-thought/types.d.ts +11 -1
  194. package/dist/components/blocks/ai/ai-citation/ai-citation.d.ts +1 -1
  195. package/dist/components/blocks/ai/ai-citation/types.d.ts +8 -0
  196. package/dist/components/blocks/ai/ai-confirmation/ai-confirmation.d.ts +1 -1
  197. package/dist/components/blocks/ai/ai-confirmation/types.d.ts +21 -5
  198. package/dist/components/blocks/ai/ai-feedback/types.d.ts +7 -2
  199. package/dist/components/blocks/ai/ai-inline-citation/types.d.ts +9 -3
  200. package/dist/components/blocks/ai/ai-package-info/ai-package-info.d.ts +1 -1
  201. package/dist/components/blocks/ai/ai-package-info/types.d.ts +6 -0
  202. package/dist/components/blocks/ai/ai-reasoning/types.d.ts +2 -0
  203. package/dist/components/blocks/ai/ai-sources/ai-sources.d.ts +1 -1
  204. package/dist/components/blocks/ai/ai-sources/types.d.ts +10 -2
  205. package/dist/components/blocks/ai/ai-task/ai-task.d.ts +1 -1
  206. package/dist/components/blocks/ai/ai-task/types.d.ts +10 -1
  207. package/dist/components/blocks/ai/ai-tool-call/ai-tool-call.d.ts +1 -1
  208. package/dist/components/blocks/ai/ai-tool-call/types.d.ts +8 -0
  209. package/dist/components/blocks/ai/ai.strings.d.ts +2 -0
  210. package/dist/components/blocks/analytics/activity-heatmap/types.d.ts +1 -1
  211. package/dist/components/blocks/analytics/analytics.strings.d.ts +2 -0
  212. package/dist/components/blocks/analytics/atoms/metric-trend-chip.d.ts +11 -1
  213. package/dist/components/blocks/analytics/chart-card/chart-card.d.ts +7 -5
  214. package/dist/components/blocks/analytics/charts/index.d.ts +27 -0
  215. package/dist/components/blocks/analytics/index.d.ts +17 -24
  216. package/dist/components/blocks/analytics/metric/metric.d.ts +7 -3
  217. package/dist/components/blocks/analytics/metric-comparison/metric-comparison.d.ts +2 -0
  218. package/dist/components/blocks/analytics/metric-grid/metric-grid.d.ts +4 -5
  219. package/dist/components/blocks/analytics/types.d.ts +13 -4
  220. package/dist/components/blocks/analytics/usage-card/usage-card.strings.d.ts +2 -0
  221. package/dist/components/blocks/commerce/address-card/address-card.d.ts +1 -1
  222. package/dist/components/blocks/commerce/address-card/types.d.ts +5 -16
  223. package/dist/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.d.ts +2 -2
  224. package/dist/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.types.d.ts +6 -4
  225. package/dist/components/blocks/commerce/cart-summary/cart-summary.d.ts +0 -2
  226. package/dist/components/blocks/commerce/cart-summary/index.d.ts +2 -2
  227. package/dist/components/blocks/commerce/cart-summary/types.d.ts +9 -11
  228. package/dist/components/blocks/commerce/coupon-input/coupon-input.d.ts +1 -1
  229. package/dist/components/blocks/commerce/coupon-input/types.d.ts +7 -3
  230. package/dist/components/blocks/commerce/discount-stack/discount-stack.d.ts +0 -2
  231. package/dist/components/blocks/commerce/discount-stack/index.d.ts +2 -2
  232. package/dist/components/blocks/commerce/discount-stack/types.d.ts +4 -6
  233. package/dist/components/blocks/commerce/fulfillment-group/fulfillment-group.d.ts +1 -1
  234. package/dist/components/blocks/commerce/fulfillment-group/types.d.ts +2 -0
  235. package/dist/components/blocks/commerce/giftcard-card/partials/giftcard-balance.d.ts +18 -0
  236. package/dist/components/blocks/commerce/giftcard-card/partials/giftcard-compact.d.ts +1 -1
  237. package/dist/components/blocks/commerce/giftcard-card/partials/giftcard-copy-button.d.ts +0 -1
  238. package/dist/components/blocks/commerce/giftcard-card/partials/giftcard-dark.d.ts +1 -1
  239. package/dist/components/blocks/commerce/giftcard-card/partials/giftcard-full.d.ts +1 -1
  240. package/dist/components/blocks/commerce/giftcard-card/partials/giftcard-illustrated.d.ts +1 -1
  241. package/dist/components/blocks/commerce/giftcard-card/partials/giftcard-minimal.d.ts +1 -1
  242. package/dist/components/blocks/commerce/giftcard-card/types.d.ts +16 -5
  243. package/dist/components/blocks/commerce/index.d.ts +8 -8
  244. package/dist/components/blocks/commerce/inventory-level/inventory-level.strings.d.ts +2 -0
  245. package/dist/components/blocks/commerce/inventory-level/types.d.ts +1 -1
  246. package/dist/components/blocks/commerce/inventory-section/types.d.ts +0 -5
  247. package/dist/components/blocks/commerce/invoice-line-items/types.d.ts +6 -3
  248. package/dist/components/blocks/commerce/loyalty-points/loyalty-points.d.ts +1 -1
  249. package/dist/components/blocks/commerce/loyalty-points/types.d.ts +11 -5
  250. package/dist/components/blocks/commerce/order-status/order-status.d.ts +1 -1
  251. package/dist/components/blocks/commerce/order-status/types.d.ts +12 -8
  252. package/dist/components/blocks/commerce/order-timeline/order-timeline.d.ts +1 -1
  253. package/dist/components/blocks/commerce/order-timeline/types.d.ts +3 -1
  254. package/dist/components/blocks/commerce/payment-method/index.d.ts +2 -2
  255. package/dist/components/blocks/commerce/payment-method/payment-method.d.ts +0 -8
  256. package/dist/components/blocks/commerce/payment-method/types.d.ts +0 -2
  257. package/dist/components/blocks/commerce/receipt/index.d.ts +1 -1
  258. package/dist/components/blocks/commerce/receipt/receipt-items.d.ts +1 -1
  259. package/dist/components/blocks/commerce/receipt/types.d.ts +10 -0
  260. package/dist/components/blocks/commerce/refund-status/index.d.ts +2 -2
  261. package/dist/components/blocks/commerce/refund-status/refund-status.d.ts +0 -2
  262. package/dist/components/blocks/commerce/refund-status/types.d.ts +0 -2
  263. package/dist/components/blocks/commerce/seo-listing/types.d.ts +7 -0
  264. package/dist/components/blocks/commerce/shared/code-entry.d.ts +39 -0
  265. package/dist/components/blocks/commerce/shared/order-status.d.ts +1 -1
  266. package/dist/components/blocks/commerce/subscription-summary/subscription-summary.d.ts +1 -1
  267. package/dist/components/blocks/commerce/subscription-summary/types.d.ts +10 -1
  268. package/dist/components/blocks/commerce/upcoming-booking/index.d.ts +2 -1
  269. package/dist/components/blocks/commerce/upcoming-booking/types.d.ts +8 -0
  270. package/dist/components/blocks/commerce/upcoming-booking/upcoming-booking.d.ts +2 -2
  271. package/dist/components/blocks/commerce/vendor-profile/types.d.ts +4 -5
  272. package/dist/components/blocks/commerce/voucher-entry/types.d.ts +6 -3
  273. package/dist/components/blocks/commerce/voucher-entry/voucher-entry.d.ts +1 -1
  274. package/dist/components/blocks/content-block-hooks.d.ts +22 -0
  275. package/dist/components/blocks/data-display/dense-info-card/dense-info.strings.d.ts +5 -1
  276. package/dist/components/blocks/data-display/dense-info-card/helpers.d.ts +3 -1
  277. package/dist/components/blocks/data-display/dense-info-card/index.d.ts +1 -1
  278. package/dist/components/blocks/data-display/dense-info-card/partials/dense-info-classification.d.ts +1 -1
  279. package/dist/components/blocks/data-display/dense-info-card/partials/dense-info-dashboard.d.ts +1 -1
  280. package/dist/components/blocks/data-display/dense-info-card/partials/dense-info-financial.d.ts +1 -1
  281. package/dist/components/blocks/data-display/dense-info-card/partials/dense-info-project.d.ts +1 -1
  282. package/dist/components/blocks/data-display/dense-info-card/partials/dense-info-score.d.ts +1 -1
  283. package/dist/components/blocks/data-display/dense-info-card/types.d.ts +12 -5
  284. package/dist/components/blocks/data-display/empty-state/empty-state.types.d.ts +10 -3
  285. package/dist/components/blocks/data-display/index.d.ts +0 -1
  286. package/dist/components/blocks/data-display/relationship-card-frame.d.ts +1 -1
  287. package/dist/components/blocks/onboarding/checklist/checklist.types.d.ts +5 -3
  288. package/dist/components/blocks/planning/task-card.types.d.ts +7 -3
  289. package/dist/components/blocks/timelines/changelog/types.d.ts +2 -2
  290. package/dist/components/blocks/timelines/index.d.ts +2 -2
  291. package/dist/components/blocks/timelines/milestones/types.d.ts +2 -2
  292. package/dist/components/blocks/timelines/shared/timeline.d.ts +6 -0
  293. package/dist/components/blocks/timelines/steps-card/index.d.ts +2 -1
  294. package/dist/components/blocks/timelines/steps-card/steps-card.d.ts +2 -2
  295. package/dist/components/blocks/timelines/steps-card/types.d.ts +13 -1
  296. package/dist/components/features/activities/activities.strings.d.ts +5 -3
  297. package/dist/components/features/activities/activities.types.d.ts +46 -22
  298. package/dist/components/features/activities/hooks/use-activity-feed.d.ts +6 -0
  299. package/dist/components/features/activities/hooks/use-activity-resources.d.ts +2 -1
  300. package/dist/components/features/activities/index.d.ts +1 -1
  301. package/dist/components/features/activities/partials/activity-headline.d.ts +5 -0
  302. package/dist/components/features/activities/partials/activity-row.d.ts +12 -13
  303. package/dist/components/features/activities/partials/row-layers.d.ts +7 -0
  304. package/dist/components/features/activities/relative-time.d.ts +18 -0
  305. package/dist/components/features/ai-chat/ai-chat.d.ts +6 -2
  306. package/dist/components/features/ai-chat/ai-chat.strings.d.ts +41 -2
  307. package/dist/components/features/ai-chat/ai-chat.types.d.ts +6 -0
  308. package/dist/components/features/ai-chat/hooks/use-ai-chat-scroll.d.ts +1 -1
  309. package/dist/components/features/ai-chat/partials/ai-chat-attachments-strip.d.ts +5 -1
  310. package/dist/components/features/ai-chat/partials/ai-chat-prompt-input.d.ts +2 -2
  311. package/dist/components/features/ai-chat/partials/ai-chat-queue.d.ts +3 -1
  312. package/dist/components/features/ai-chat/partials/ai-chat-suggestions-row.d.ts +6 -1
  313. package/dist/components/features/appointment-calendar/appointment-calendar.d.ts +1 -1
  314. package/dist/components/features/appointment-calendar/appointment-calendar.types.d.ts +20 -4
  315. package/dist/components/features/appointment-calendar/index.d.ts +1 -1
  316. package/dist/components/features/appointment-calendar/partials/appointment-agenda.d.ts +18 -10
  317. package/dist/components/features/async-preview/async-preview.d.ts +2 -2
  318. package/dist/components/features/async-preview/async-preview.types.d.ts +30 -1
  319. package/dist/components/features/async-preview/preview-trigger-cell.d.ts +7 -2
  320. package/dist/components/features/combobox/async-resource-combobox.d.ts +2 -2
  321. package/dist/components/features/combobox/combobox.d.ts +12 -3
  322. package/dist/components/features/combobox/components/error-message.d.ts +3 -1
  323. package/dist/components/features/combobox/hooks/use-combobox-core.d.ts +4 -3
  324. package/dist/components/features/combobox/hooks/use-combobox-state.d.ts +1 -0
  325. package/dist/components/features/combobox/hooks/use-load-more.d.ts +1 -0
  326. package/dist/components/features/combobox/index.d.ts +1 -1
  327. package/dist/components/features/combobox/types.d.ts +68 -37
  328. package/dist/components/features/comments/comments.strings.d.ts +6 -5
  329. package/dist/components/features/comments/comments.types.d.ts +40 -26
  330. package/dist/components/features/comments/hooks/use-attachment-upload.d.ts +5 -1
  331. package/dist/components/features/comments/hooks/use-comments.d.ts +8 -1
  332. package/dist/components/features/data-view/data-view.strings.d.ts +9 -2
  333. package/dist/components/features/data-view/data-view.types.d.ts +15 -2
  334. package/dist/components/features/email-composer/email-html.d.ts +5 -0
  335. package/dist/components/features/email-composer/http.d.ts +2 -0
  336. package/dist/components/features/email-composer/strings.d.ts +17 -2
  337. package/dist/components/features/email-composer/types.d.ts +19 -2
  338. package/dist/components/features/email-composer/use-composer.d.ts +2 -78
  339. package/dist/components/features/event-calendar/event-calendar-day-cell.d.ts +1 -1
  340. package/dist/components/features/event-calendar/event-calendar-event-badge.d.ts +1 -1
  341. package/dist/components/features/event-calendar/event-calendar-header.d.ts +1 -1
  342. package/dist/components/features/event-calendar/event-calendar-legend.d.ts +2 -2
  343. package/dist/components/features/event-calendar/event-calendar.d.ts +1 -1
  344. package/dist/components/features/event-calendar/event-calendar.types.d.ts +126 -21
  345. package/dist/components/features/filters/facets/date-facet.d.ts +4 -2
  346. package/dist/components/features/filters/facets/range-facet.d.ts +24 -7
  347. package/dist/components/features/filters/filter-context.d.ts +9 -0
  348. package/dist/components/features/filters/filters.strings.d.ts +36 -3
  349. package/dist/components/features/filters/filters.types.d.ts +75 -8
  350. package/dist/components/features/filters/hooks/use-filter-draft.d.ts +1 -0
  351. package/dist/components/features/filters/index.d.ts +2 -2
  352. package/dist/components/features/filters/operator-options.d.ts +25 -2
  353. package/dist/components/features/filters/partials/active-filter-item.d.ts +0 -13
  354. package/dist/components/features/filters/partials/async-options-status.d.ts +32 -0
  355. package/dist/components/features/filters/partials/date-filter-content.d.ts +3 -2
  356. package/dist/components/features/filters/partials/filter-draft-footer.d.ts +11 -0
  357. package/dist/components/features/filters/partials/filter-operator-select.d.ts +4 -2
  358. package/dist/components/features/filters/partials/filter-pill.d.ts +5 -1
  359. package/dist/components/features/filters/partials/filter-popover-content.d.ts +4 -2
  360. package/dist/components/features/filters/partials/filter-tabs.d.ts +2 -1
  361. package/dist/components/features/filters/partials/range-filter-content.d.ts +12 -0
  362. package/dist/components/features/filters/partials/regular-filter-content.d.ts +1 -1
  363. package/dist/components/features/filters/utils/filter-utils.d.ts +34 -5
  364. package/dist/components/features/global-search/global-search-dialog.d.ts +7 -1
  365. package/dist/components/features/global-search/global-search.d.ts +7 -1
  366. package/dist/components/features/global-search/global-search.strings.d.ts +19 -3
  367. package/dist/components/features/global-search/global-search.types.d.ts +30 -6
  368. package/dist/components/features/global-search/index.d.ts +1 -1
  369. package/dist/components/features/global-search/partials/global-search-idle-state.d.ts +6 -1
  370. package/dist/components/features/global-search/partials/global-search-input.d.ts +2 -0
  371. package/dist/components/features/kanban/index.d.ts +2 -2
  372. package/dist/components/features/kanban/kanban-context.d.ts +4 -0
  373. package/dist/components/features/kanban/kanban-keyboard.d.ts +7 -2
  374. package/dist/components/features/kanban/kanban.d.ts +10 -1
  375. package/dist/components/features/kanban/kanban.strings.d.ts +11 -2
  376. package/dist/components/features/kanban/kanban.types.d.ts +26 -0
  377. package/dist/components/features/map/map.d.ts +4 -0
  378. package/dist/components/features/map/place-autocomplete.d.ts +10 -1
  379. package/dist/components/features/media-library/hooks/use-media-library.d.ts +3 -1
  380. package/dist/components/features/media-library/media-library.d.ts +1 -1
  381. package/dist/components/features/media-library/media-library.strings.d.ts +39 -3
  382. package/dist/components/features/media-library/media-library.types.d.ts +82 -9
  383. package/dist/components/features/media-library/partials/media-library-partials.d.ts +3 -3
  384. package/dist/components/features/mentions/hooks/use-mentions-search.d.ts +7 -0
  385. package/dist/components/features/mentions/hooks/use-mentions.d.ts +16 -1
  386. package/dist/components/features/mentions/index.d.ts +1 -1
  387. package/dist/components/features/mentions/mentions.strings.d.ts +10 -2
  388. package/dist/components/features/mentions/partials/mention-chip.d.ts +1 -0
  389. package/dist/components/features/mentions/partials/mention-inline-suggestions.d.ts +12 -1
  390. package/dist/components/features/mentions/partials/mention-picker.d.ts +8 -1
  391. package/dist/components/features/mentions/partials/mention-search-error.d.ts +6 -0
  392. package/dist/components/features/mentions/utils/index.d.ts +0 -1
  393. package/dist/components/features/overlays/alert-dialog.d.ts +1 -1
  394. package/dist/components/features/overlays/dialog.d.ts +1 -1
  395. package/dist/components/features/overlays/drawer.d.ts +1 -1
  396. package/dist/components/features/overlays/hooks/use-overlay-visibility.d.ts +2 -2
  397. package/dist/components/features/overlays/index.d.ts +2 -2
  398. package/dist/components/features/overlays/overlays.strings.d.ts +2 -1
  399. package/dist/components/features/overlays/overlays.types.d.ts +27 -10
  400. package/dist/components/features/products/components/index.d.ts +0 -10
  401. package/dist/components/features/products/components/product-contract-overview.d.ts +1 -1
  402. package/dist/components/features/products/components/product-details-card.d.ts +1 -1
  403. package/dist/components/features/products/components/product-operations-card.d.ts +1 -1
  404. package/dist/components/features/products/components/product-option-action-menu.d.ts +1 -1
  405. package/dist/components/features/products/components/product-options-summary.d.ts +1 -1
  406. package/dist/components/features/products/components/product-policies-card.d.ts +1 -1
  407. package/dist/components/features/products/components/product-quote-preview-card.d.ts +1 -1
  408. package/dist/components/features/products/components/product-readiness-card.d.ts +1 -1
  409. package/dist/components/features/products/components/product-structure-card.d.ts +1 -1
  410. package/dist/components/features/products/components/product-variant-action-menu.d.ts +1 -1
  411. package/dist/components/features/products/components/product-variants-manager.d.ts +1 -1
  412. package/dist/components/features/products/components/product-variants-table.d.ts +1 -1
  413. package/dist/components/features/products/partials/product-surface.d.ts +15 -0
  414. package/dist/components/features/products/products.strings.d.ts +8 -0
  415. package/dist/components/features/products/products.types.d.ts +26 -8
  416. package/dist/components/features/questionnaire/questionnaire.types.d.ts +7 -2
  417. package/dist/components/features/resource/index.d.ts +2 -3
  418. package/dist/components/features/resource/resource.d.ts +2 -10
  419. package/dist/components/features/resource/resource.types.d.ts +7 -147
  420. package/dist/components/features/resource-assignment/partials/assignment-surface.d.ts +15 -0
  421. package/dist/components/features/resource-assignment/resource-assignment.strings.d.ts +6 -1
  422. package/dist/components/features/resource-assignment/resource-assignment.types.d.ts +6 -0
  423. package/dist/components/features/rich-text-editor/form-rich-text-editor.d.ts +1 -1
  424. package/dist/components/features/rich-text-editor/partials/caret-helpers.d.ts +5 -7
  425. package/dist/components/features/rich-text-editor/partials/editor-field-aria.d.ts +14 -0
  426. package/dist/components/features/rich-text-editor/partials/html-helpers.d.ts +2 -3
  427. package/dist/components/features/rich-text-editor/partials/image-uploads.d.ts +6 -2
  428. package/dist/components/features/rich-text-editor/partials/index.d.ts +2 -3
  429. package/dist/components/features/rich-text-editor/partials/rich-text-editor-tiptap.d.ts +0 -1
  430. package/dist/components/features/rich-text-editor/partials/rich-text-editor-toolbar.d.ts +5 -4
  431. package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +1 -1
  432. package/dist/components/features/rich-text-editor/rich-text-editor.types.d.ts +30 -4
  433. package/dist/components/features/schema-form/hooks/use-schema-form.d.ts +10 -1
  434. package/dist/components/features/schema-form/partials/schema-form-field.d.ts +3 -1
  435. package/dist/components/features/schema-form/schema-form.d.ts +1 -1
  436. package/dist/components/features/schema-form/schema-form.types.d.ts +13 -5
  437. package/dist/components/features/schema-form/schema-form.utils.d.ts +1 -1
  438. package/dist/components/features/suggestions/suggestions.strings.d.ts +14 -0
  439. package/dist/components/features/suggestions/suggestions.types.d.ts +13 -5
  440. package/dist/components/features/table/data-table.d.ts +1 -1
  441. package/dist/components/features/table/filter-bar.d.ts +1 -1
  442. package/dist/components/features/table/index.d.ts +1 -0
  443. package/dist/components/features/table/pagination.d.ts +1 -1
  444. package/dist/components/features/table/partials/cell-value.d.ts +1 -1
  445. package/dist/components/features/table/table-body.d.ts +1 -1
  446. package/dist/components/features/table/table-header.d.ts +1 -1
  447. package/dist/components/features/table/table-helpers.d.ts +37 -12
  448. package/dist/components/features/table/table-region.recipes.d.ts +11 -0
  449. package/dist/components/features/table/table-toolbar.d.ts +1 -1
  450. package/dist/components/features/table/table.strings.d.ts +4 -0
  451. package/dist/components/features/table/table.types.d.ts +91 -49
  452. package/dist/components/features/theme-tweaker/theme-provider-settings.d.ts +4 -0
  453. package/dist/components/features/theme-tweaker/theme-tweaker.strings.d.ts +10 -7
  454. package/dist/components/features/theme-tweaker/theme-tweaker.utils.d.ts +17 -0
  455. package/dist/components/layout/app-shell/app-shell.types.d.ts +46 -49
  456. package/dist/components/layout/app-shell/index.d.ts +2 -2
  457. package/dist/components/layout/app-shell/shell-regions.d.ts +9 -0
  458. package/dist/components/layout/app-shell/shell-skip-link.d.ts +9 -0
  459. package/dist/components/layout/app-shell/sidebar-inset-layout.d.ts +1 -1
  460. package/dist/components/layout/app-shell/stacked-layout.d.ts +1 -1
  461. package/dist/components/layout/app-shell/topbar-sidebar-layout.d.ts +1 -1
  462. package/dist/components/layout/auth/auth-shell.d.ts +1 -1
  463. package/dist/components/layout/auth/auth.types.d.ts +0 -5
  464. package/dist/components/layout/containers/inline-gutter-context.d.ts +7 -0
  465. package/dist/components/layout/containers/main-landmark-context.d.ts +6 -0
  466. package/dist/components/layout/header/header.types.d.ts +19 -8
  467. package/dist/components/layout/header/partials/header-global-search-trigger.d.ts +1 -1
  468. package/dist/components/layout/header/partials/header-notifications.d.ts +1 -1
  469. package/dist/components/layout/header/partials/header-search.d.ts +1 -1
  470. package/dist/components/layout/hooks/use-command-shortcut.d.ts +10 -1
  471. package/dist/components/layout/layout.types.d.ts +6 -4
  472. package/dist/components/layout/navigation/breadcrumb-progress/breadcrumb-progress.d.ts +1 -1
  473. package/dist/components/layout/navigation/breadcrumb-progress/types.d.ts +9 -0
  474. package/dist/components/layout/navigation/section-nav/section-nav.d.ts +8 -1
  475. package/dist/components/layout/navigation/side-nav.d.ts +3 -2
  476. package/dist/components/layout/normalize-layout-path.d.ts +1 -0
  477. package/dist/components/layout/page/index.d.ts +2 -3
  478. package/dist/components/layout/page/page.strings.d.ts +12 -0
  479. package/dist/components/layout/page/page.types.d.ts +7 -110
  480. package/dist/components/layout/page/partials/page-header.d.ts +1 -1
  481. package/dist/components/layout/settings/index.d.ts +1 -1
  482. package/dist/components/layout/settings/settings.d.ts +4 -6
  483. package/dist/components/layout/sidebar/app-sidebar.d.ts +1 -1
  484. package/dist/components/layout/sidebar/components/sidebar-grouped-navigation.d.ts +1 -1
  485. package/dist/components/layout/sidebar/components/sidebar-navigation-footer.d.ts +1 -1
  486. package/dist/components/layout/sidebar/components/sidebar-navigation.d.ts +1 -1
  487. package/dist/components/layout/sidebar/index.d.ts +1 -1
  488. package/dist/components/layout/sidebar/sidebar-navigation-rail.d.ts +17 -7
  489. package/dist/components/layout/sidebar/sidebar.context.d.ts +1 -0
  490. package/dist/components/layout/sidebar/sidebar.types.d.ts +12 -12
  491. package/dist/components/layout/sidebar/sidebar.utils.d.ts +4 -0
  492. package/dist/components/layout/workspace/workspace.strings.d.ts +2 -2
  493. package/dist/components/layout/workspace/workspace.types.d.ts +13 -7
  494. package/dist/components/primitives/date.d.ts +22 -3
  495. package/dist/components/primitives/file-size.d.ts +8 -2
  496. package/dist/components/primitives/index.d.ts +1 -1
  497. package/dist/components/primitives/initials.d.ts +3 -1
  498. package/dist/components/primitives/link.d.ts +11 -3
  499. package/dist/components/primitives/money.d.ts +2 -2
  500. package/dist/components/primitives/number.d.ts +3 -2
  501. package/dist/components/typography/heading.d.ts +9 -3
  502. package/dist/components/typography/index.d.ts +1 -1
  503. package/dist/components/typography/rich-text/rich-text-tree.d.ts +7 -5
  504. package/dist/components/typography/text-link.d.ts +10 -3
  505. package/dist/components/ui/badge.d.ts +2 -4
  506. package/dist/components/ui/breadcrumb.d.ts +2 -3
  507. package/dist/components/ui/button.d.ts +8 -2
  508. package/dist/components/ui/collapsible.d.ts +1 -4
  509. package/dist/components/ui/command.d.ts +20 -18
  510. package/dist/components/ui/dialog.d.ts +3 -9
  511. package/dist/components/ui/empty.d.ts +2 -2
  512. package/dist/components/ui/input-group.d.ts +3 -3
  513. package/dist/components/ui/item.d.ts +3 -3
  514. package/dist/components/ui/popover.d.ts +3 -7
  515. package/dist/components/ui/sheet.d.ts +4 -12
  516. package/dist/components/ui/sidebar-state.d.ts +6 -1
  517. package/dist/components/ui/sidebar.d.ts +7 -4
  518. package/dist/components/ui/tabs.d.ts +2 -2
  519. package/dist/components/ui/toggle-group.d.ts +3 -3
  520. package/dist/components/ui/toggle.d.ts +2 -2
  521. package/dist/components/ui/tooltip.d.ts +1 -3
  522. package/dist/{containers-CIxwbZt5.js → containers-BdfLTP4w.js} +37 -32
  523. package/dist/containers-BdfLTP4w.js.map +1 -0
  524. package/dist/content-block-hooks-Z3iKjqd1.js +17 -0
  525. package/dist/content-block-hooks-Z3iKjqd1.js.map +1 -0
  526. package/dist/{copyable-DIznBqiT.js → copyable-Bmr14W0d.js} +6 -6
  527. package/dist/{copyable-DIznBqiT.js.map → copyable-Bmr14W0d.js.map} +1 -1
  528. package/dist/{data-display-BdgCAw8T.js → data-display-CWe9SOYh.js} +264 -250
  529. package/dist/data-display-CWe9SOYh.js.map +1 -0
  530. package/dist/date-3qsCE1ID.js +209 -0
  531. package/dist/date-3qsCE1ID.js.map +1 -0
  532. package/dist/date-picker-D1keJQIG.js +1617 -0
  533. package/dist/date-picker-D1keJQIG.js.map +1 -0
  534. package/dist/date-pickers-D8aJoeHc.js +185 -0
  535. package/dist/date-pickers-D8aJoeHc.js.map +1 -0
  536. package/dist/disclosure-panel-B0HFNZ9x.js.map +1 -1
  537. package/dist/{display-KsZLw9Ov.js → display-VlmP1I0i.js} +23 -46
  538. package/dist/display-VlmP1I0i.js.map +1 -0
  539. package/dist/{dropdown-menu-CLs8Lihj.js → dropdown-menu-B8hjvbkS.js} +9 -9
  540. package/dist/{dropdown-menu-CLs8Lihj.js.map → dropdown-menu-B8hjvbkS.js.map} +1 -1
  541. package/dist/dropzone-CHBNK3de.js +116 -0
  542. package/dist/dropzone-CHBNK3de.js.map +1 -0
  543. package/dist/features/activities.js +767 -700
  544. package/dist/features/activities.js.map +1 -1
  545. package/dist/features/ai-chat.js +280 -235
  546. package/dist/features/ai-chat.js.map +1 -1
  547. package/dist/features/appointment-calendar.js +430 -334
  548. package/dist/features/appointment-calendar.js.map +1 -1
  549. package/dist/features/async-preview.js +351 -265
  550. package/dist/features/async-preview.js.map +1 -1
  551. package/dist/features/combobox.js +2 -2
  552. package/dist/features/comments.js +1 -1
  553. package/dist/features/data-view.js +212 -151
  554. package/dist/features/data-view.js.map +1 -1
  555. package/dist/features/email-composer/engine.js +1 -1
  556. package/dist/features/email-composer.js +347 -313
  557. package/dist/features/email-composer.js.map +1 -1
  558. package/dist/features/event-calendar.js +501 -348
  559. package/dist/features/event-calendar.js.map +1 -1
  560. package/dist/features/filters.js +2 -2
  561. package/dist/features/global-search.js +250 -210
  562. package/dist/features/global-search.js.map +1 -1
  563. package/dist/features/kanban.js +280 -210
  564. package/dist/features/kanban.js.map +1 -1
  565. package/dist/features/map/style.css +15 -0
  566. package/dist/features/map.js +435 -404
  567. package/dist/features/map.js.map +1 -1
  568. package/dist/features/media-library.js +1745 -1195
  569. package/dist/features/media-library.js.map +1 -1
  570. package/dist/features/mentions.js +2 -2
  571. package/dist/features/overlays.js +2 -2
  572. package/dist/features/products.js +1862 -1759
  573. package/dist/features/products.js.map +1 -1
  574. package/dist/features/questionnaire.js +188 -168
  575. package/dist/features/questionnaire.js.map +1 -1
  576. package/dist/features/resource-assignment.js +223 -191
  577. package/dist/features/resource-assignment.js.map +1 -1
  578. package/dist/features/resource.js +55 -217
  579. package/dist/features/resource.js.map +1 -1
  580. package/dist/features/rich-text-editor.js +28 -19
  581. package/dist/features/rich-text-editor.js.map +1 -1
  582. package/dist/features/schema-form.js +380 -287
  583. package/dist/features/schema-form.js.map +1 -1
  584. package/dist/features/suggestions.js +90 -74
  585. package/dist/features/suggestions.js.map +1 -1
  586. package/dist/features/table.js +2 -2
  587. package/dist/features/theme-tweaker.js +718 -627
  588. package/dist/features/theme-tweaker.js.map +1 -1
  589. package/dist/feedback-DmqmXKLn.js +254 -0
  590. package/dist/feedback-DmqmXKLn.js.map +1 -0
  591. package/dist/{field-affordance-recipes-DWcNcOjh.js → field-affordance-recipes-DfbMadot.js} +13 -9
  592. package/dist/field-affordance-recipes-DfbMadot.js.map +1 -0
  593. package/dist/field-control-attributes-B6i335wr.js +18 -0
  594. package/dist/field-control-attributes-B6i335wr.js.map +1 -0
  595. package/dist/field-state-recipes-EtCxpEy3.js +18 -0
  596. package/dist/field-state-recipes-EtCxpEy3.js.map +1 -0
  597. package/dist/filters-BviMRMLS.js +2692 -0
  598. package/dist/filters-BviMRMLS.js.map +1 -0
  599. package/dist/{focus-recipes-B653VaLq.js → focus-recipes-DSkiUvUp.js} +3 -3
  600. package/dist/focus-recipes-DSkiUvUp.js.map +1 -0
  601. package/dist/form-field-BdfCwSoQ.js +74 -0
  602. package/dist/form-field-BdfCwSoQ.js.map +1 -0
  603. package/dist/{form-sizing-Bs2qFUeE.js → form-sizing-DE_dZw32.js} +3 -3
  604. package/dist/{form-sizing-Bs2qFUeE.js.map → form-sizing-DE_dZw32.js.map} +1 -1
  605. package/dist/{forms-C0RGnJTe.js → forms-B8DzJnBN.js} +35 -35
  606. package/dist/forms-B8DzJnBN.js.map +1 -0
  607. package/dist/forms-numeric-DOBswjKj.js +992 -0
  608. package/dist/forms-numeric-DOBswjKj.js.map +1 -0
  609. package/dist/{header-DMMxG__r.js → header-Cq3G0ZRP.js} +163 -158
  610. package/dist/header-Cq3G0ZRP.js.map +1 -0
  611. package/dist/hooks/use-files.d.ts +2 -0
  612. package/dist/{hooks-DB6CJ4MR.js → hooks-DHfeSMAO.js} +34 -14
  613. package/dist/hooks-DHfeSMAO.js.map +1 -0
  614. package/dist/{http-D_6rOnzU.js → http-Cu-GPpss.js} +61 -35
  615. package/dist/http-Cu-GPpss.js.map +1 -0
  616. package/dist/{icon-badge-DZF-YjQp.js → icon-badge-B0Kq7wom.js} +3 -3
  617. package/dist/{icon-badge-DZF-YjQp.js.map → icon-badge-B0Kq7wom.js.map} +1 -1
  618. package/dist/index.js +6 -6
  619. package/dist/inline-gutter-context-CSqmrMFZ.js +11 -0
  620. package/dist/inline-gutter-context-CSqmrMFZ.js.map +1 -0
  621. package/dist/{input-DMBwAZmr.js → input-2YrgTUrz.js} +3 -3
  622. package/dist/{input-DMBwAZmr.js.map → input-2YrgTUrz.js.map} +1 -1
  623. package/dist/{input-CvyDQlY7.js → input-DfJyrjoR.js} +7 -7
  624. package/dist/{input-CvyDQlY7.js.map → input-DfJyrjoR.js.map} +1 -1
  625. package/dist/{interaction-recipes-XR9ZpVYL.js → interaction-recipes-DmuS1ase.js} +2 -2
  626. package/dist/{interaction-recipes-XR9ZpVYL.js.map → interaction-recipes-DmuS1ase.js.map} +1 -1
  627. package/dist/item-GJ9mvCcg.js +279 -0
  628. package/dist/item-GJ9mvCcg.js.map +1 -0
  629. package/dist/layout/app-shell.js +1 -1
  630. package/dist/layout/auth.js +1 -1
  631. package/dist/layout/containers.js +1 -1
  632. package/dist/layout/header.js +1 -1
  633. package/dist/layout/hooks.js +1 -1
  634. package/dist/layout/navigation.js +1 -1
  635. package/dist/layout/page.js +2 -2
  636. package/dist/layout/settings.js +2 -2
  637. package/dist/layout/sidebar.js +3 -3
  638. package/dist/layout/workspace.js +1 -1
  639. package/dist/layout.js +12 -12
  640. package/dist/layout.types-DbtnyAtd.js +33 -0
  641. package/dist/layout.types-DbtnyAtd.js.map +1 -0
  642. package/dist/lib/anchored-positioning.d.ts +11 -0
  643. package/dist/lib/field-affordance-recipes.d.ts +10 -0
  644. package/dist/lib/field-control-attributes.d.ts +11 -0
  645. package/dist/lib/field-state-recipes.d.ts +8 -0
  646. package/dist/lib/focus-recipes.d.ts +7 -0
  647. package/dist/lib/format.d.ts +26 -0
  648. package/dist/lib/money-format.d.ts +6 -0
  649. package/dist/lib/motion-recipes.d.ts +6 -0
  650. package/dist/lib/surface-recipes.d.ts +33 -3
  651. package/dist/lib/theme-scope.d.ts +17 -1
  652. package/dist/lib/token-merge.generated.d.ts +19 -25
  653. package/dist/lib/ui-provider/index.d.ts +1 -1
  654. package/dist/lib/ui-provider/types.d.ts +5 -0
  655. package/dist/lib/use-controllable-state.d.ts +16 -0
  656. package/dist/lib/use-copy-feedback.d.ts +15 -0
  657. package/dist/lib/utils.js +1 -1
  658. package/dist/lib/variant-props.d.ts +9 -0
  659. package/dist/main-landmark-context-BAsyqp2I.js +11 -0
  660. package/dist/main-landmark-context-BAsyqp2I.js.map +1 -0
  661. package/dist/mentions-zz0ewNIq.js +670 -0
  662. package/dist/mentions-zz0ewNIq.js.map +1 -0
  663. package/dist/message-BiiVrRrm.js +138 -0
  664. package/dist/message-BiiVrRrm.js.map +1 -0
  665. package/dist/{metadata-list-C3MkU-Om.js → metadata-list-G85roWjS.js} +13 -12
  666. package/dist/metadata-list-G85roWjS.js.map +1 -0
  667. package/dist/{motion-recipes-DitYv6P2.js → motion-recipes-CUc_aHuG.js} +7 -4
  668. package/dist/motion-recipes-CUc_aHuG.js.map +1 -0
  669. package/dist/navigation-C0Be5C3i.js +304 -0
  670. package/dist/navigation-C0Be5C3i.js.map +1 -0
  671. package/dist/navigation-CmqaQR_G.js +257 -0
  672. package/dist/navigation-CmqaQR_G.js.map +1 -0
  673. package/dist/normalize-layout-path-BmEgg6fu.js +14 -0
  674. package/dist/normalize-layout-path-BmEgg6fu.js.map +1 -0
  675. package/dist/number-NFWKIoiK.js +340 -0
  676. package/dist/number-NFWKIoiK.js.map +1 -0
  677. package/dist/{overflow-tab-bar-IVFVQFV6.js → overflow-tab-bar-DV7HE_3t.js} +8 -8
  678. package/dist/{overflow-tab-bar-IVFVQFV6.js.map → overflow-tab-bar-DV7HE_3t.js.map} +1 -1
  679. package/dist/{overlays-BSgCtM2v.js → overlays-D-gAIfPF.js} +369 -364
  680. package/dist/overlays-D-gAIfPF.js.map +1 -0
  681. package/dist/page-D4pQhgSq.js +216 -0
  682. package/dist/page-D4pQhgSq.js.map +1 -0
  683. package/dist/{page-header-commands-7P3sfE9u.js → page-header-commands-elelNOfd.js} +29 -29
  684. package/dist/{page-header-commands-7P3sfE9u.js.map → page-header-commands-elelNOfd.js.map} +1 -1
  685. package/dist/{pagination-CgCjElfu.js → pagination-BuSWw1US.js} +22 -23
  686. package/dist/pagination-BuSWw1US.js.map +1 -0
  687. package/dist/popover-BpMxbqEK.js +205 -0
  688. package/dist/popover-BpMxbqEK.js.map +1 -0
  689. package/dist/{popover-menu-DlnQ2zlR.js → popover-menu-CO-_iiuz.js} +7 -7
  690. package/dist/{popover-menu-DlnQ2zlR.js.map → popover-menu-CO-_iiuz.js.map} +1 -1
  691. package/dist/{popover.recipes-DdiEp0rd.js → popover.recipes-BqkdvlZn.js} +3 -4
  692. package/dist/{popover.recipes-DdiEp0rd.js.map → popover.recipes-BqkdvlZn.js.map} +1 -1
  693. package/dist/{portal-recipes-BpsV_iRw.js → portal-recipes-BPeS4rGB.js} +2 -2
  694. package/dist/{portal-recipes-BpsV_iRw.js.map → portal-recipes-BPeS4rGB.js.map} +1 -1
  695. package/dist/primitives-BlC1lXBr.js +447 -0
  696. package/dist/primitives-BlC1lXBr.js.map +1 -0
  697. package/dist/primitives.js +4 -4
  698. package/dist/{progress-BJhQP9WX.js → progress-RARK8AjB.js} +5 -5
  699. package/dist/{progress-BJhQP9WX.js.map → progress-RARK8AjB.js.map} +1 -1
  700. package/dist/receipt-CUf2Vegp.js +114 -0
  701. package/dist/receipt-CUf2Vegp.js.map +1 -0
  702. package/dist/rich-text-Cypm9__d.js +44 -0
  703. package/dist/rich-text-Cypm9__d.js.map +1 -0
  704. package/dist/rich-text-editor-Z6cQepsA.js +919 -0
  705. package/dist/rich-text-editor-Z6cQepsA.js.map +1 -0
  706. package/dist/rich-text-editor-toolbar-DYbRJARB.js +100 -0
  707. package/dist/rich-text-editor-toolbar-DYbRJARB.js.map +1 -0
  708. package/dist/rich-text-tree-DdKHIJx4.js +154 -0
  709. package/dist/rich-text-tree-DdKHIJx4.js.map +1 -0
  710. package/dist/{scroll-area-B0dB2cBi.js → scroll-area-B9HKbji0.js} +3 -3
  711. package/dist/{scroll-area-B0dB2cBi.js.map → scroll-area-B9HKbji0.js.map} +1 -1
  712. package/dist/{separator-Ct_WSWTJ.js → separator-DaDe26sf.js} +3 -3
  713. package/dist/separator-DaDe26sf.js.map +1 -0
  714. package/dist/{separator-Bb17I4pu.js → separator-KGsNXt2J.js} +2 -2
  715. package/dist/{separator-Bb17I4pu.js.map → separator-KGsNXt2J.js.map} +1 -1
  716. package/dist/services/actions/action-adapters.d.ts +5 -2
  717. package/dist/services/actions/index.d.ts +1 -1
  718. package/dist/services/actions.js +2 -2
  719. package/dist/services/actions.js.map +1 -1
  720. package/dist/settings-D5j_RJvT.js +160 -0
  721. package/dist/settings-D5j_RJvT.js.map +1 -0
  722. package/dist/sheet-B6j_BE9O.js +241 -0
  723. package/dist/sheet-B6j_BE9O.js.map +1 -0
  724. package/dist/{sidebar-f9gRWXIR.js → sidebar-C-iQ_TJP.js} +379 -350
  725. package/dist/sidebar-C-iQ_TJP.js.map +1 -0
  726. package/dist/sidebar-D5VO2W8S.js +715 -0
  727. package/dist/sidebar-D5VO2W8S.js.map +1 -0
  728. package/dist/{skeleton-BapcJd9C.js → skeleton-Cab_KgVo.js} +13 -13
  729. package/dist/skeleton-Cab_KgVo.js.map +1 -0
  730. package/dist/{smart-card-CW0hjetE.js → smart-card-C59z6KFO.js} +217 -210
  731. package/dist/smart-card-C59z6KFO.js.map +1 -0
  732. package/dist/{structure-DuxKl954.js → structure-DElaQwwN.js} +2 -2
  733. package/dist/{structure-DuxKl954.js.map → structure-DElaQwwN.js.map} +1 -1
  734. package/dist/style.css +1 -1
  735. package/dist/{surface-recipes-BKRVW8Os.js → surface-recipes-DV6rrOFq.js} +11 -3
  736. package/dist/surface-recipes-DV6rrOFq.js.map +1 -0
  737. package/dist/table-CSRUgpdK.js +180 -0
  738. package/dist/table-CSRUgpdK.js.map +1 -0
  739. package/dist/table-DdXDBsR_.js +1657 -0
  740. package/dist/table-DdXDBsR_.js.map +1 -0
  741. package/dist/tabs-WnHfV2pM.js +192 -0
  742. package/dist/tabs-WnHfV2pM.js.map +1 -0
  743. package/dist/{text-inputs-B1culiSK.js → text-inputs-ljyBYaCd.js} +112 -112
  744. package/dist/text-inputs-ljyBYaCd.js.map +1 -0
  745. package/dist/theme.css +21 -5
  746. package/dist/timelines-mOmS9Eh3.js +479 -0
  747. package/dist/timelines-mOmS9Eh3.js.map +1 -0
  748. package/dist/tooltip-yjX-Uv-p.js +112 -0
  749. package/dist/tooltip-yjX-Uv-p.js.map +1 -0
  750. package/dist/{tree-CzUJHnFs.js → tree-YpkxUG2Z.js} +80 -72
  751. package/dist/tree-YpkxUG2Z.js.map +1 -0
  752. package/dist/typography/rich-text.js +1 -1
  753. package/dist/{typography-BQnine1k.js → typography-C0dELqYV.js} +46 -40
  754. package/dist/typography-C0dELqYV.js.map +1 -0
  755. package/dist/typography.js +1 -1
  756. package/dist/{ui-provider-C-74NVLc.js → ui-provider-Bu1S-o96.js} +4 -3
  757. package/dist/ui-provider-Bu1S-o96.js.map +1 -0
  758. package/dist/ui-provider.js +2 -2
  759. package/dist/upload-DMuMYJFT.js +875 -0
  760. package/dist/upload-DMuMYJFT.js.map +1 -0
  761. package/dist/{usage-card-BeSLY0i0.js → usage-card-DDPki5P1.js} +57 -54
  762. package/dist/usage-card-DDPki5P1.js.map +1 -0
  763. package/dist/use-controllable-state-BlP8SyBI.js +13 -0
  764. package/dist/use-controllable-state-BlP8SyBI.js.map +1 -0
  765. package/dist/use-copy-feedback-CzcaqlLf.js +28 -0
  766. package/dist/use-copy-feedback-CzcaqlLf.js.map +1 -0
  767. package/dist/use-metric-format-options-Dk4rC1NO.js +251 -0
  768. package/dist/use-metric-format-options-Dk4rC1NO.js.map +1 -0
  769. package/dist/{utils-B6kKb8jB.js → utils-BVbAG2J6.js} +128 -112
  770. package/dist/utils-BVbAG2J6.js.map +1 -0
  771. package/dist/value-inputs-h5MwjGCo.js +982 -0
  772. package/dist/value-inputs-h5MwjGCo.js.map +1 -0
  773. package/dist/value-typography-D15uwfj-.js +154 -0
  774. package/dist/value-typography-D15uwfj-.js.map +1 -0
  775. package/dist/workspace-DIryPqBt.js +400 -0
  776. package/dist/workspace-DIryPqBt.js.map +1 -0
  777. package/docs/consumer-skill/SKILL.md +7 -0
  778. package/docs/consumer-skill/agents/themelia-ui-designer.md +11 -2
  779. package/docs/consumer-skill/examples/analytics.tsx +1 -1
  780. package/docs/consumer-skill/examples/app-layout.tsx +3 -3
  781. package/docs/consumer-skill/examples/commerce-lines.tsx +7 -5
  782. package/docs/consumer-skill/examples/detail.tsx +3 -2
  783. package/docs/consumer-skill/examples/edit.tsx +3 -3
  784. package/docs/consumer-skill/examples/email-composer.tsx +1 -1
  785. package/docs/consumer-skill/examples/index-table.tsx +2 -2
  786. package/docs/consumer-skill/examples/scoped-directory.tsx +7 -6
  787. package/docs/consumer-skill/references/agents-md.md +27 -23
  788. package/docs/consumer-skill/references/analytics.md +33 -4
  789. package/docs/consumer-skill/references/building-views.md +213 -0
  790. package/docs/consumer-skill/references/catalogue.md +617 -0
  791. package/docs/consumer-skill/references/component-contracts.json +25852 -32067
  792. package/docs/consumer-skill/references/composition.md +42 -21
  793. package/docs/consumer-skill/references/design-contract.md +1 -0
  794. package/docs/consumer-skill/references/discovery.md +8 -5
  795. package/docs/consumer-skill/references/installation.md +59 -10
  796. package/docs/consumer-skill/references/integration.md +28 -5
  797. package/docs/consumer-skill/references/product-composition.md +2 -2
  798. package/docs/consumer-skill/references/public-api.json +726 -641
  799. package/docs/consumer-skill/references/review.md +57 -15
  800. package/docs/consumer-skill/references/rhf-workflows.md +72 -0
  801. package/docs/consumer-skill/references/screen-archetypes.md +2 -2
  802. package/docs/consumer-skill/references/theming.md +8 -3
  803. package/docs/consumer-skill/references/tokens.json +4 -4
  804. package/docs/consumer-skill/references/workflows.md +7 -7
  805. package/docs/consumer-skill/scripts/composition-policy.mjs +178 -44
  806. package/docs/consumer-skill/scripts/composition.mjs +4 -1
  807. package/docs/consumer-skill/scripts/discovery.mjs +3 -1
  808. package/docs/consumer-skill/scripts/setup-skills.mjs +74 -10
  809. package/docs/consumer-skills/themelia-components/SKILL.md +8 -4
  810. package/docs/consumer-skills/themelia-composition/SKILL.md +7 -3
  811. package/docs/consumer-skills/themelia-design/SKILL.md +7 -1
  812. package/docs/consumer-skills/themelia-tokenization/SKILL.md +1 -1
  813. package/package.json +12 -13
  814. package/templates/README.md +3 -2
  815. package/templates/admin-shell-template.tsx +50 -11
  816. package/templates/analytics-operations-template.tsx +20 -24
  817. package/templates/customers-template.tsx +30 -25
  818. package/templates/index.ts +2 -8
  819. package/templates/orders-template.tsx +28 -24
  820. package/templates/products-template.tsx +14 -4
  821. package/templates/user-permissions-template.tsx +11 -14
  822. package/dist/accordion-B9MHG0cT.js.map +0 -1
  823. package/dist/action-menu-Dr8K-ghE.js +0 -284
  824. package/dist/action-menu-Dr8K-ghE.js.map +0 -1
  825. package/dist/ai-artifact-C58tQcBy.js +0 -1185
  826. package/dist/ai-artifact-C58tQcBy.js.map +0 -1
  827. package/dist/anchored-positioning-DPnKTvNs.js +0 -6
  828. package/dist/anchored-positioning-DPnKTvNs.js.map +0 -1
  829. package/dist/app-shell-B_IuNWOo.js +0 -321
  830. package/dist/app-shell-B_IuNWOo.js.map +0 -1
  831. package/dist/auth-DTkkshS8.js.map +0 -1
  832. package/dist/badge-xIiV_E7f.js.map +0 -1
  833. package/dist/base/sheet.js +0 -3
  834. package/dist/breadcrumbs-J-K2kl4c.js +0 -129
  835. package/dist/breadcrumbs-J-K2kl4c.js.map +0 -1
  836. package/dist/button-S2Cubiiz.js.map +0 -1
  837. package/dist/buttons-BedGfygC.js.map +0 -1
  838. package/dist/cascader-B1MiqkBq.js +0 -439
  839. package/dist/cascader-B1MiqkBq.js.map +0 -1
  840. package/dist/choice-inputs-zUgBZfE4.js.map +0 -1
  841. package/dist/code-block-BzmM9Eig.js.map +0 -1
  842. package/dist/collapsible-BkAI_XD4.js +0 -81
  843. package/dist/collapsible-BkAI_XD4.js.map +0 -1
  844. package/dist/combobox-BEx0vJgF.js +0 -362
  845. package/dist/combobox-BEx0vJgF.js.map +0 -1
  846. package/dist/combobox-BwzoXFSG.js +0 -884
  847. package/dist/combobox-BwzoXFSG.js.map +0 -1
  848. package/dist/command-CrlPIL6m.js +0 -425
  849. package/dist/command-CrlPIL6m.js.map +0 -1
  850. package/dist/comments-Dmpp0YIc.js +0 -1169
  851. package/dist/comments-Dmpp0YIc.js.map +0 -1
  852. package/dist/components/base/buttons/tooltip-button.d.ts +0 -7
  853. package/dist/components/base/display/content-block.d.ts +0 -75
  854. package/dist/components/base/display/content-block.strings.d.ts +0 -5
  855. package/dist/components/base/sheet/index.d.ts +0 -29
  856. package/dist/components/blocks/ai/use-copy-feedback.d.ts +0 -6
  857. package/dist/components/blocks/data-display/metadata/index.d.ts +0 -30
  858. package/dist/components/features/mentions/utils/split-html-by-mentions.d.ts +0 -16
  859. package/dist/components/features/resource/resource.strings.d.ts +0 -12
  860. package/dist/components/features/rich-text-editor/partials/rich-text-editor-fallback.d.ts +0 -8
  861. package/dist/components/features/sync/index.d.ts +0 -26
  862. package/dist/components/features/sync/sync-range-dialog-form.d.ts +0 -5
  863. package/dist/components/features/sync/sync.strings.d.ts +0 -18
  864. package/dist/components/features/sync/sync.types.d.ts +0 -44
  865. package/dist/components/layout/page/partials/page-actions.d.ts +0 -3
  866. package/dist/components/ui/slot.d.ts +0 -6
  867. package/dist/containers-CIxwbZt5.js.map +0 -1
  868. package/dist/data-display-BdgCAw8T.js.map +0 -1
  869. package/dist/date-Cq8ioE4o.js +0 -144
  870. package/dist/date-Cq8ioE4o.js.map +0 -1
  871. package/dist/date-picker-RlIzKom_.js +0 -1551
  872. package/dist/date-picker-RlIzKom_.js.map +0 -1
  873. package/dist/date-pickers-DY-CpXS1.js +0 -179
  874. package/dist/date-pickers-DY-CpXS1.js.map +0 -1
  875. package/dist/display-KsZLw9Ov.js.map +0 -1
  876. package/dist/features/sync.js +0 -142
  877. package/dist/features/sync.js.map +0 -1
  878. package/dist/feedback-Dm4izqFn.js +0 -240
  879. package/dist/feedback-Dm4izqFn.js.map +0 -1
  880. package/dist/field-affordance-recipes-DWcNcOjh.js.map +0 -1
  881. package/dist/field-state-recipes-BVA2CWHo.js +0 -12
  882. package/dist/field-state-recipes-BVA2CWHo.js.map +0 -1
  883. package/dist/filters-DzgSJpMK.js +0 -2257
  884. package/dist/filters-DzgSJpMK.js.map +0 -1
  885. package/dist/focus-recipes-B653VaLq.js.map +0 -1
  886. package/dist/form-field-BriWAXyg.js +0 -63
  887. package/dist/form-field-BriWAXyg.js.map +0 -1
  888. package/dist/forms-C0RGnJTe.js.map +0 -1
  889. package/dist/forms-numeric-DIhghX1Q.js +0 -910
  890. package/dist/forms-numeric-DIhghX1Q.js.map +0 -1
  891. package/dist/header-DMMxG__r.js.map +0 -1
  892. package/dist/hooks-DB6CJ4MR.js.map +0 -1
  893. package/dist/http-D_6rOnzU.js.map +0 -1
  894. package/dist/item-DjCcM18E.js +0 -277
  895. package/dist/item-DjCcM18E.js.map +0 -1
  896. package/dist/layout.types-Cn7aUzJp.js +0 -20
  897. package/dist/layout.types-Cn7aUzJp.js.map +0 -1
  898. package/dist/media-gallery-C-vChPmE.js +0 -203
  899. package/dist/media-gallery-C-vChPmE.js.map +0 -1
  900. package/dist/mentions-0_4nWuI-.js +0 -570
  901. package/dist/mentions-0_4nWuI-.js.map +0 -1
  902. package/dist/message-g8p7eVtN.js +0 -128
  903. package/dist/message-g8p7eVtN.js.map +0 -1
  904. package/dist/metadata-list-C3MkU-Om.js.map +0 -1
  905. package/dist/motion-recipes-DitYv6P2.js.map +0 -1
  906. package/dist/navigation-C90-oQFq.js +0 -255
  907. package/dist/navigation-C90-oQFq.js.map +0 -1
  908. package/dist/navigation-DaRjthVk.js +0 -288
  909. package/dist/navigation-DaRjthVk.js.map +0 -1
  910. package/dist/number-CRU3kGuk.js +0 -354
  911. package/dist/number-CRU3kGuk.js.map +0 -1
  912. package/dist/overlays-BSgCtM2v.js.map +0 -1
  913. package/dist/page-DUUKDAjo.js +0 -331
  914. package/dist/page-DUUKDAjo.js.map +0 -1
  915. package/dist/pagination-CgCjElfu.js.map +0 -1
  916. package/dist/popover-B85RenIl.js +0 -201
  917. package/dist/popover-B85RenIl.js.map +0 -1
  918. package/dist/primitives-ByWgGUgt.js +0 -380
  919. package/dist/primitives-ByWgGUgt.js.map +0 -1
  920. package/dist/receipt-tOc7B3hw.js +0 -116
  921. package/dist/receipt-tOc7B3hw.js.map +0 -1
  922. package/dist/rich-text-Dth5E882.js +0 -78
  923. package/dist/rich-text-Dth5E882.js.map +0 -1
  924. package/dist/rich-text-editor-C1fOjBTd.js +0 -1195
  925. package/dist/rich-text-editor-C1fOjBTd.js.map +0 -1
  926. package/dist/rich-text-editor-toolbar-laT3tpBT.js +0 -98
  927. package/dist/rich-text-editor-toolbar-laT3tpBT.js.map +0 -1
  928. package/dist/sanitize-html-DsQmI48u.js +0 -92
  929. package/dist/sanitize-html-DsQmI48u.js.map +0 -1
  930. package/dist/separator-Ct_WSWTJ.js.map +0 -1
  931. package/dist/settings-Bar5wiSo.js +0 -167
  932. package/dist/settings-Bar5wiSo.js.map +0 -1
  933. package/dist/sheet-BGPERY55.js +0 -250
  934. package/dist/sheet-BGPERY55.js.map +0 -1
  935. package/dist/sidebar-D-JYMMbY.js +0 -686
  936. package/dist/sidebar-D-JYMMbY.js.map +0 -1
  937. package/dist/sidebar-f9gRWXIR.js.map +0 -1
  938. package/dist/skeleton-BapcJd9C.js.map +0 -1
  939. package/dist/slot-CLF9kLrS.js +0 -16
  940. package/dist/slot-CLF9kLrS.js.map +0 -1
  941. package/dist/smart-card-CW0hjetE.js.map +0 -1
  942. package/dist/surface-recipes-BKRVW8Os.js.map +0 -1
  943. package/dist/table-B4TE7iOV.js +0 -175
  944. package/dist/table-B4TE7iOV.js.map +0 -1
  945. package/dist/table-CFOWY9pQ.js +0 -1536
  946. package/dist/table-CFOWY9pQ.js.map +0 -1
  947. package/dist/tabs-e7ko9S2o.js +0 -191
  948. package/dist/tabs-e7ko9S2o.js.map +0 -1
  949. package/dist/text-inputs-B1culiSK.js.map +0 -1
  950. package/dist/timelines-D3Sl9ueq.js +0 -458
  951. package/dist/timelines-D3Sl9ueq.js.map +0 -1
  952. package/dist/tooltip-8wz5S_Zr.js +0 -113
  953. package/dist/tooltip-8wz5S_Zr.js.map +0 -1
  954. package/dist/tree-CzUJHnFs.js.map +0 -1
  955. package/dist/typography-BQnine1k.js.map +0 -1
  956. package/dist/ui-provider-C-74NVLc.js.map +0 -1
  957. package/dist/upload-BOW6U2tI.js +0 -855
  958. package/dist/upload-BOW6U2tI.js.map +0 -1
  959. package/dist/upload-queue-qUXn1ykN.js +0 -409
  960. package/dist/upload-queue-qUXn1ykN.js.map +0 -1
  961. package/dist/usage-card-BeSLY0i0.js.map +0 -1
  962. package/dist/utils-B6kKb8jB.js.map +0 -1
  963. package/dist/value-inputs-skdVB2zh.js +0 -980
  964. package/dist/value-inputs-skdVB2zh.js.map +0 -1
  965. package/dist/value-typography-uAmWUAL1.js +0 -116
  966. package/dist/value-typography-uAmWUAL1.js.map +0 -1
  967. package/dist/workspace-DHeHv0qw.js +0 -411
  968. package/dist/workspace-DHeHv0qw.js.map +0 -1
@@ -1,2257 +0,0 @@
1
- "use client";
2
- import { S as e, d as t } from "./ui-provider-C-74NVLc.js";
3
- import { useStrings as n } from "./lib/strings.js";
4
- import { t as r } from "./utils-B6kKb8jB.js";
5
- import { n as i } from "./buttons-BedGfygC.js";
6
- import { a, c as o, o as s } from "./typography-BQnine1k.js";
7
- import { t as c } from "./focus-recipes-B653VaLq.js";
8
- import { r as l, t as u } from "./structure-DuxKl954.js";
9
- import { i as d } from "./tone-recipes-BPsRAvhu.js";
10
- import { n as f, t as p } from "./feedback-Dm4izqFn.js";
11
- import { i as m, r as h } from "./popover.recipes-DdiEp0rd.js";
12
- import { _ as g, m as _ } from "./primitives-ByWgGUgt.js";
13
- import { t as v } from "./number-CRU3kGuk.js";
14
- import { n as y, t as b } from "./date-Cq8ioE4o.js";
15
- import { t as x } from "./badge-xIiV_E7f.js";
16
- import { t as S } from "./layer-recipes-CCpklYME.js";
17
- import { n as C } from "./field-affordance-recipes-DWcNcOjh.js";
18
- import { a as w, i as T, n as E, o as D, r as O, s as k, t as A } from "./command-CrlPIL6m.js";
19
- import { d as j, p as M, y as N } from "./form-sizing-Bs2qFUeE.js";
20
- import { t as P } from "./input-CvyDQlY7.js";
21
- import { t as F } from "./date-picker-RlIzKom_.js";
22
- import { a as ee, c as I, i as te, n as L, o as ne, r as R, t as re } from "./popover-B85RenIl.js";
23
- import { n as ie, r as ae, t as oe } from "./control-group-recipes-fMuFo0H7.js";
24
- import { i as se, r as ce, t as le } from "./tabs-e7ko9S2o.js";
25
- import { t as ue } from "./popover-menu-DlnQ2zlR.js";
26
- import { t as de } from "./use-debounced-callback-Cx1h-hdv.js";
27
- import { t as fe } from "./use-debounce-DZ_1ZBPa.js";
28
- import { i as pe, n as me, r as he, t as ge } from "./cascader-B1MiqkBq.js";
29
- import z, { Component as _e, createContext as ve, useCallback as B, useContext as ye, useEffect as V, useId as be, useMemo as H, useRef as U, useState as W } from "react";
30
- import { Fragment as G, jsx as K, jsxs as q } from "react/jsx-runtime";
31
- import { CalendarIcon as xe, Check as Se, ChevronDown as Ce, ChevronLeft as we, ChevronsUpDown as Te, Filter as Ee, Loader2 as De, Plus as Oe, X as ke } from "lucide-react";
32
- import { format as Ae, isValid as J, parse as je } from "date-fns";
33
- //#region src/components/features/filters/filters.strings.ts
34
- var Me = {
35
- loading: "Loading",
36
- loadingOptions: "Loading {filterLabel} options...",
37
- addFilter: "Add filter",
38
- clear: "Clear",
39
- confirm: "Confirm",
40
- clearFilters: "Clear filters",
41
- clearAll: "Clear all",
42
- selectDate: "Select date",
43
- selectDateRange: "Select date range",
44
- calendar: {
45
- dateSelected: "Date selected",
46
- notDateSelected: "No date selected",
47
- notDateRangeSelected: "No date range selected",
48
- selectedEndDate: "Select end date",
49
- today: "Today",
50
- yesterday: "Yesterday",
51
- lastSevenDays: "Last 7 days",
52
- lastThirtyDays: "Last 30 days",
53
- thisMonth: "This month",
54
- lastMonth: "Last month",
55
- thisYear: "This year",
56
- lastYear: "Last year",
57
- customRange: "Custom range"
58
- },
59
- selectValues: "Select values",
60
- searchPlaceholder: "Search {filterLabel}...",
61
- noOptionsFound: "No options found",
62
- selected: "{count} {filterLabel} selected",
63
- nothingSelected: "Nothing selected",
64
- enterTag: "Enter tag",
65
- addTag: "Add tag",
66
- removeTag: "Remove",
67
- tag: "tag",
68
- tags: "tags",
69
- enterTags: "Enter tags",
70
- searchFilters: "Search filters...",
71
- noFiltersAvailable: "No filters available",
72
- availableFilters: "Available filters",
73
- activeFilters: "Active filters",
74
- clearSearch: "Clear search",
75
- backToFilters: "Back to filters",
76
- previousLevel: "Back",
77
- selectCurrentLevel: "Select this level",
78
- select: "Select",
79
- options: "options",
80
- operator: "Operator",
81
- operators: {
82
- contains: "contains",
83
- equals: "is",
84
- notContains: "does not contain",
85
- is: "is",
86
- isNot: "is not",
87
- greaterThan: "greater than",
88
- lessThan: "less than",
89
- before: "before",
90
- after: "after",
91
- between: "between",
92
- has: "has",
93
- hasAny: "has any",
94
- hasAll: "has all"
95
- },
96
- min: "Min",
97
- max: "Max",
98
- fetchError: "Failed to load options",
99
- retryFetch: "Retry",
100
- minQueryHint: "Type at least {min} characters...",
101
- searching: "Searching...",
102
- error: {
103
- title: "Filter error",
104
- descriptionWithKey: "There was a problem with \"{filterKey}\" filter.",
105
- generic: "There was a problem loading this filter.",
106
- unknown: "Unknown error"
107
- },
108
- validation: {
109
- required: "This filter is required",
110
- minValue: "Value must be at least {min}",
111
- maxValue: "Value must be at most {max}",
112
- invalidFormat: "Invalid format"
113
- }
114
- };
115
- function Y(e, t) {
116
- return e.replace(/{(\w+)}/g, (e, n) => String(t[n] ?? e)).replace(/:(\w+)/g, (e, n) => t[n] === void 0 ? e : String(t[n]));
117
- }
118
- function Ne(e, t, n) {
119
- let r = t.split("."), i = e;
120
- for (let e of r) {
121
- if (typeof i != "object" || !i) return t;
122
- i = i[e];
123
- }
124
- return typeof i == "string" ? n ? Y(i, n) : i : t;
125
- }
126
- //#endregion
127
- //#region src/components/features/filters/filters.types.ts
128
- var X = {
129
- SELECT: "select",
130
- MULTI_SELECT: "multi_select",
131
- ASYNC_SELECT: "async_select",
132
- SEARCH: "search",
133
- RANGE: "range",
134
- DATE: "date",
135
- TAGS: "tags"
136
- }, Z = {
137
- EQUALS: "equals",
138
- CONTAINS: "contains",
139
- IN: "in",
140
- NOT_IN: "not_in",
141
- NOT: "not",
142
- BEFORE: "before",
143
- AFTER: "after",
144
- BETWEEN: "between",
145
- GT: "gt",
146
- LT: "lt",
147
- GTE: "gte",
148
- LTE: "lte",
149
- HAS: "has",
150
- HAS_ANY: "has_any",
151
- HAS_ALL: "has_all"
152
- };
153
- function Pe(e) {
154
- return e;
155
- }
156
- //#endregion
157
- //#region src/components/features/filters/operator-options.ts
158
- function Fe(e) {
159
- return [
160
- {
161
- label: e.contains,
162
- value: Z.CONTAINS
163
- },
164
- {
165
- label: e.equals,
166
- value: Z.EQUALS
167
- },
168
- {
169
- label: e.notContains,
170
- value: Z.NOT
171
- }
172
- ];
173
- }
174
- function Ie(e) {
175
- return [{
176
- label: e.is,
177
- value: Z.EQUALS
178
- }, {
179
- label: e.isNot,
180
- value: Z.NOT
181
- }];
182
- }
183
- function Le(e) {
184
- return [
185
- {
186
- label: e.equals,
187
- value: Z.EQUALS
188
- },
189
- {
190
- label: e.greaterThan,
191
- value: Z.GT
192
- },
193
- {
194
- label: e.lessThan,
195
- value: Z.LT
196
- }
197
- ];
198
- }
199
- function Re(e) {
200
- return [
201
- {
202
- label: e.before,
203
- value: Z.BEFORE
204
- },
205
- {
206
- label: e.after,
207
- value: Z.AFTER
208
- },
209
- {
210
- label: e.between,
211
- value: Z.BETWEEN
212
- }
213
- ];
214
- }
215
- function ze(e) {
216
- return [{
217
- label: e.equals,
218
- value: Z.EQUALS
219
- }];
220
- }
221
- function Be(e, t) {
222
- switch (e) {
223
- case X.SEARCH: return Fe(t);
224
- case X.TAGS: return [
225
- {
226
- label: t.has,
227
- value: Z.HAS
228
- },
229
- {
230
- label: t.hasAny,
231
- value: Z.HAS_ANY
232
- },
233
- {
234
- label: t.hasAll,
235
- value: Z.HAS_ALL
236
- }
237
- ];
238
- case X.SELECT:
239
- case X.ASYNC_SELECT: return Ie(t);
240
- case X.RANGE: return Le(t);
241
- case X.DATE: return Re(t);
242
- default: return Fe(t);
243
- }
244
- }
245
- function Ve(e) {
246
- switch (e) {
247
- case X.SEARCH: return Z.CONTAINS;
248
- case X.TAGS: return Z.HAS;
249
- case X.SELECT:
250
- case X.ASYNC_SELECT: return Z.EQUALS;
251
- case X.RANGE: return Z.EQUALS;
252
- case X.DATE: return Z.BEFORE;
253
- default: return Z.EQUALS;
254
- }
255
- }
256
- //#endregion
257
- //#region src/components/features/filters/utils/filter-utils.ts
258
- function He(e, t) {
259
- for (let n of e ?? []) {
260
- if (n.value === t) return [n];
261
- let e = He(n.children, t);
262
- if (e.length) return [n, ...e];
263
- }
264
- return [];
265
- }
266
- function Q(e) {
267
- return e.replace(/\S+/g, (e) => /^\p{Lu}{2,}/u.test(e) ? e : e.toLowerCase());
268
- }
269
- function Ue(e) {
270
- return !!e?.some((e) => !!e.children?.length);
271
- }
272
- function We(e) {
273
- return e.map((e) => ({
274
- value: e.value,
275
- label: e.label,
276
- description: e.description,
277
- icon: e.icon ?? void 0,
278
- disabled: e.disabled,
279
- ...e.children?.length ? { children: We(e.children) } : {}
280
- }));
281
- }
282
- function Ge(e, t, n = " / ") {
283
- let r = He(e.options, t);
284
- return r.length ? r.map((e) => e.label).join(n) : void 0;
285
- }
286
- function Ke(e, t, n) {
287
- if (e.type === "date" && Array.isArray(t) && t.every((e) => typeof e == "string")) return !0;
288
- if (e.validation?.required && (!t || Array.isArray(t) && t.length === 0)) return n("validation.required");
289
- if (typeof t == "number") {
290
- if (e.validation?.min !== void 0 && t < e.validation.min) return n("validation.minValue").replace("{min}", String(e.validation.min));
291
- if (e.validation?.max !== void 0 && t > e.validation.max) return n("validation.maxValue").replace("{max}", String(e.validation.max));
292
- }
293
- if (e.validation?.pattern && typeof t == "string" && !new RegExp(e.validation.pattern).test(t)) return n("validation.invalidFormat");
294
- if (e.validation?.custom) {
295
- let n = e.validation.custom(t);
296
- if (typeof n == "string" || !n) return n;
297
- }
298
- return !0;
299
- }
300
- //#endregion
301
- //#region src/components/features/filters/filter-context.tsx
302
- var qe = ve(void 0);
303
- function Je({ children: e, filters: t, activeFilters: r, onFilterChange: i, navigating: a = !1, strings: o, onError: s }) {
304
- let c = U(t), l = U(i), u = U(s);
305
- u.current = s;
306
- let [d, f] = W(0), p = U(/* @__PURE__ */ new Map()), m = H(() => {
307
- let e = /* @__PURE__ */ new Map();
308
- for (let n of t) {
309
- if (n.type !== X.ASYNC_SELECT) continue;
310
- let t = n.asyncConfig?.fetcher, r = n.asyncConfig?.mapToOption, i = n.asyncConfig?.limit ?? 10, a = p.current.get(n.key), o = a && a.fetcher === t && a.mapToOption === r;
311
- e.set(n.key, o && a.limit === i ? a : {
312
- fetcher: t,
313
- mapToOption: r,
314
- limit: i,
315
- options: o ? a.options : /* @__PURE__ */ new Map()
316
- });
317
- }
318
- return e.size === p.current.size && [...e].every(([e, t]) => p.current.get(e) === t) ? p.current : (p.current = e, e);
319
- }, [t]), h = JSON.stringify(r.filter((e) => m.has(e.key)).map(({ key: e, value: t }) => [e, t])), g = n(Me, o);
320
- V(() => {
321
- c.current = t;
322
- }, [t]), V(() => {
323
- l.current = i;
324
- }, [i]);
325
- let _ = B((e) => {
326
- let t = [...r, e];
327
- l.current(t);
328
- }, [r]), v = B((e) => {
329
- let t = r.filter((t) => t.id !== e && t.key !== e);
330
- l.current(t);
331
- }, [r]), y = B((e, t) => {
332
- let n = r.map((n) => n.id === e || n.key === e ? {
333
- ...n,
334
- ...t
335
- } : n);
336
- l.current(n);
337
- }, [r]), b = B(() => {
338
- l.current([]);
339
- }, []), x = B((e) => {
340
- l.current(e);
341
- }, []), S = B((e) => c.current.find((t) => t.key === e), []), C = B((e) => r.find((t) => t.key === e)?.value || [], [r]), w = B((e, t) => {
342
- let n = r.find((t) => t.key === e);
343
- if (t.length === 0) n && v(e);
344
- else if (n) y(e, { value: t });
345
- else {
346
- let n = c.current.find((t) => t.key === e), r = n?.operator ?? n?.operators?.[0]?.value ?? (n ? Ve(n.type) : "equals");
347
- _({
348
- id: e,
349
- key: e,
350
- value: t,
351
- operator: r
352
- });
353
- }
354
- }, [
355
- r,
356
- _,
357
- v,
358
- y
359
- ]), T = B((e) => r.some((t) => t.key === e && t.value.length > 0), [r]), E = B((e) => r.find((t) => t.key === e)?.operator || "equals", [r]), D = B((e, t) => {
360
- r.find((t) => t.key === e) && y(e, { operator: t });
361
- }, [r, y]), O = B((e, t) => {
362
- let n = c.current.find((t) => t.key === e);
363
- return n ? Ke(n, t, (e) => Ne(g, e)) : !1;
364
- }, [g]), k = B((e) => c.current.filter((t) => t.dependencies?.some((t) => t.key === e)), []), A = B((e, t) => {
365
- let n = m.get(e)?.options;
366
- if (!n) return;
367
- let r = !1;
368
- for (let e of t) n.get(e.value)?.label !== e.label && (r = !0), n.set(e.value, e);
369
- r && f((e) => e + 1);
370
- }, [m]), j = B((e, t) => m.get(e)?.options.get(t)?.label, [m, d]), M = B((e, t) => {
371
- u.current?.(e, t);
372
- }, []);
373
- V(() => {
374
- let e = new AbortController(), t = (t, n) => {
375
- e.signal.aborted || t && t.name === "AbortError" || u.current?.(t, {
376
- phase: "fetch-options",
377
- filterKey: n
378
- });
379
- }, n = new Map(JSON.parse(h));
380
- for (let [r, i] of m) {
381
- let a = n.get(r);
382
- if (!a || a.length === 0 || a.every((e) => i.options.has(e))) continue;
383
- let { fetcher: o, mapToOption: s, limit: c } = i;
384
- o && s && o({
385
- query: "",
386
- limit: c,
387
- signal: e.signal
388
- }).then((t) => {
389
- e.signal.aborted || A(r, t.map(s));
390
- }).catch((e) => t(e, r));
391
- }
392
- return () => e.abort();
393
- }, [
394
- h,
395
- m,
396
- A
397
- ]);
398
- let N = H(() => ({
399
- activeFilters: r,
400
- filters: t,
401
- addFilter: _,
402
- removeFilter: v,
403
- updateFilter: y,
404
- clearFilters: b,
405
- replaceFilters: x,
406
- getFilterByKey: S,
407
- getFilterValue: C,
408
- setFilterValue: w,
409
- isFilterActive: T,
410
- getFilterOperator: E,
411
- setFilterOperator: D,
412
- validateFilter: O,
413
- getDependentFilters: k,
414
- isNavigating: a,
415
- strings: g,
416
- cacheAsyncOptions: A,
417
- getAsyncOptionLabel: j,
418
- reportError: M
419
- }), [
420
- r,
421
- t,
422
- _,
423
- v,
424
- y,
425
- b,
426
- x,
427
- S,
428
- C,
429
- w,
430
- T,
431
- E,
432
- D,
433
- O,
434
- k,
435
- a,
436
- g,
437
- A,
438
- j,
439
- M
440
- ]);
441
- return /* @__PURE__ */ K(qe.Provider, {
442
- value: N,
443
- children: e
444
- });
445
- }
446
- function $() {
447
- let e = ye(qe);
448
- if (!e) throw Error("useFilters must be used within a FilterProvider");
449
- return e;
450
- }
451
- //#endregion
452
- //#region src/components/features/filters/hooks/use-filter-groups.ts
453
- function Ye(e = {}) {
454
- let { dynamicFilterOptions: t } = e, { filters: n, isFilterActive: r } = $(), i = H(() => t ? n.map((e) => {
455
- let n = t[e.key];
456
- return Array.isArray(n) ? {
457
- ...e,
458
- options: n
459
- } : e;
460
- }) : n, [n, t]);
461
- return H(() => {
462
- let e = i.filter((e) => e.type === X.SEARCH), t = i.filter((e) => !e.displayConfig?.hidden && e.displayConfig?.display !== "hidden"), n = i.filter((e) => e.type !== X.SEARCH && !e.displayConfig?.hidden && e.displayConfig?.display !== "hidden" && r(e.key)), a = t.filter((e) => e.type !== X.SEARCH && !r(e.key) && e.displayConfig?.display === "always"), o = t.filter((e) => e.type !== X.SEARCH && !r(e.key) && e.displayConfig?.display !== "always"), s = n.map((e) => e.key);
463
- return {
464
- processedFilters: i,
465
- searchFilters: e,
466
- alwaysVisibleFilters: a,
467
- activeRegularFilters: n,
468
- popoverFilters: o,
469
- activeFilterKeys: s,
470
- hasActive: s.length > 0
471
- };
472
- }, [i, r]);
473
- }
474
- //#endregion
475
- //#region src/components/features/filters/partials/filter-operator-select.tsx
476
- function Xe({ operator: e, operators: t, onOperatorChange: n, segmentResetClass: a }) {
477
- let [c, l] = W(!1), { strings: u } = $(), d = t.find((t) => t.value === e)?.label || e;
478
- return /* @__PURE__ */ K(ue, {
479
- open: c,
480
- onOpenChange: l,
481
- search: !1,
482
- contentLabel: u.operator,
483
- trigger: /* @__PURE__ */ K(i, {
484
- tone: "secondary",
485
- buttonStyle: "ghost",
486
- className: r("filter-operator-select--component", a, "h-full min-h-0 px-control text-muted-foreground hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground"),
487
- onClick: (e) => {
488
- e.stopPropagation();
489
- },
490
- type: "button",
491
- children: /* @__PURE__ */ K(o, {
492
- tag: "span",
493
- type: "inherit",
494
- children: d
495
- })
496
- }),
497
- header: /* @__PURE__ */ K(s, {
498
- tag: "span",
499
- children: u.operator
500
- }),
501
- contentClassName: m.xs,
502
- items: t.map((t) => ({
503
- value: t.value,
504
- label: t.label,
505
- selected: t.value === e
506
- })),
507
- onSelect: (e) => {
508
- n(e.value), l(!1);
509
- }
510
- });
511
- }
512
- //#endregion
513
- //#region src/components/features/filters/partials/filter-value-display.tsx
514
- function Ze({ filter: e, value: t }) {
515
- let { strings: n } = $();
516
- return t.length === 0 && e.type !== X.DATE ? /* @__PURE__ */ K(o, {
517
- tag: "span",
518
- type: "secondary",
519
- lineHeight: "none",
520
- className: "filter-value-display--component",
521
- children: n.nothingSelected
522
- }) : e.type === X.ASYNC_SELECT && !e.options?.length ? /* @__PURE__ */ K(o, {
523
- tag: "span",
524
- type: "inherit",
525
- weight: "semibold",
526
- lineHeight: "none",
527
- className: "filter-value-display--component",
528
- children: $e(e, t, n)
529
- }) : e.options && e.type !== X.DATE ? /* @__PURE__ */ q(u, {
530
- direction: "horizontal",
531
- gap: "xs",
532
- wrap: !1,
533
- className: "filter-value-display--component",
534
- children: [/* @__PURE__ */ q("div", {
535
- className: "relative isolate flex",
536
- children: [t.slice(0, 2).map((t, n) => {
537
- let i = He(e.options, t).at(-1);
538
- return i?.icon ? /* @__PURE__ */ K("div", {
539
- className: r("border-background bg-background relative rounded-full border", n > 0 ? "-ml-space-sm z-[1]" : S.raised),
540
- children: i.icon
541
- }, t) : null;
542
- }), t.length > 2 && /* @__PURE__ */ K("div", {
543
- className: "bg-muted border-background relative z-0 -ml-space-sm flex size-icon items-center justify-center rounded-full border",
544
- children: /* @__PURE__ */ q(o, {
545
- tag: "span",
546
- size: "xs",
547
- weight: "medium",
548
- children: ["+", /* @__PURE__ */ K(v, {
549
- value: t.length - 2,
550
- size: "inherit",
551
- align: "center"
552
- })]
553
- })
554
- })]
555
- }), /* @__PURE__ */ K(o, {
556
- tag: "span",
557
- type: "inherit",
558
- weight: "semibold",
559
- lineHeight: "none",
560
- className: "truncate",
561
- children: et(e, t, n)
562
- })]
563
- }) : e.type === X.DATE ? /* @__PURE__ */ q(u, {
564
- direction: "horizontal",
565
- gap: "xs",
566
- wrap: !1,
567
- className: "filter-value-display--component",
568
- children: [/* @__PURE__ */ K(xe, { className: "text-muted-foreground size-icon-sm" }), /* @__PURE__ */ K(o, {
569
- tag: "span",
570
- type: "inherit",
571
- weight: "semibold",
572
- lineHeight: "none",
573
- className: "min-w-0 truncate",
574
- children: Qe(e, t, n)
575
- })]
576
- }) : /* @__PURE__ */ K(o, {
577
- tag: "span",
578
- type: "inherit",
579
- weight: "semibold",
580
- lineHeight: "none",
581
- className: "filter-value-display--component truncate",
582
- children: et(e, t, n)
583
- });
584
- }
585
- function Qe(e, t, n) {
586
- return e.operator === "between" && t.length === 2 ? rt(t[0], t[1], e.dateFormat?.display) : t.length === 1 ? nt(t[0], e.dateFormat?.display) : t.length === 2 ? rt(t[0], t[1], e.dateFormat?.display) : /* @__PURE__ */ K(g, { children: e.datePickerConfig?.noDatePlaceholder || n.calendar.notDateSelected });
587
- }
588
- function $e(e, t, n) {
589
- return t.length === 0 ? "" : Y(n.selected, {
590
- count: t.length,
591
- filterLabel: Q((t.length > 1 ? e.pluralLabel : e.label) ?? e.label)
592
- });
593
- }
594
- function et(e, t, n) {
595
- return t.length > 1 ? Y(n.selected, {
596
- count: t.length,
597
- filterLabel: Q(e.pluralLabel ?? e.label)
598
- }) : t.map((t) => Ge(e, t) || t).join(", ");
599
- }
600
- function tt(e) {
601
- let t = new Date(e);
602
- return !Number.isNaN(t.getTime());
603
- }
604
- function nt(e, t) {
605
- return tt(e) ? /* @__PURE__ */ K(b, {
606
- value: e,
607
- format: t
608
- }) : /* @__PURE__ */ K(g, { children: e });
609
- }
610
- function rt(e, t, n) {
611
- return tt(e) && tt(t) ? /* @__PURE__ */ K(y, {
612
- from: e,
613
- to: t,
614
- format: n
615
- }) : /* @__PURE__ */ q("span", {
616
- className: "inline-flex min-w-0 items-center gap-space-xs",
617
- children: [
618
- nt(e, n),
619
- /* @__PURE__ */ K(g, { children: "–" }),
620
- nt(t, n)
621
- ]
622
- });
623
- }
624
- //#endregion
625
- //#region src/components/features/filters/partials/active-filter-item.tsx
626
- function it({ filter: n, value: a, active: s, popoverOpen: l, triggerRef: u, operators: d, operator: f, onOperatorChange: p, onFilterClear: m, onFilterClick: h }) {
627
- let { defaultScale: g } = t(), _ = e(void 0, g), { strings: v } = $(), y = z.useId(), b = z.useId(), x = `${ae.joinedItem} !border-0 !rounded-none !shadow-none ${c.inset}`, S = () => /* @__PURE__ */ K("div", {
628
- "aria-hidden": !0,
629
- className: "w-px self-stretch bg-border"
630
- });
631
- return /* @__PURE__ */ q("div", {
632
- role: "group",
633
- "aria-label": n.label,
634
- "data-active": s || void 0,
635
- className: r("active-filter-item--component", ae.joinedFrame, oe[_], "bg-background", n.displayConfig?.className),
636
- children: [
637
- /* @__PURE__ */ q(i, {
638
- type: "button",
639
- tone: "secondary",
640
- buttonStyle: "ghost",
641
- className: r(x, "flex h-full min-h-0 items-center gap-space-sm px-control hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground"),
642
- ref: u,
643
- "aria-haspopup": "dialog",
644
- "aria-expanded": l,
645
- onClick: h,
646
- children: [
647
- !!n.icon && /* @__PURE__ */ K("span", {
648
- className: "flex items-center text-muted-foreground",
649
- children: n.icon
650
- }),
651
- /* @__PURE__ */ K(o, {
652
- id: y,
653
- tag: "span",
654
- type: "inherit",
655
- weight: "semibold",
656
- children: n.label
657
- }),
658
- /* @__PURE__ */ K(Ce, { className: "size-icon-sm" })
659
- ]
660
- }),
661
- /* @__PURE__ */ K(S, {}),
662
- /* @__PURE__ */ K(Xe, {
663
- operator: f,
664
- operators: d,
665
- onOperatorChange: p,
666
- segmentResetClass: x
667
- }),
668
- /* @__PURE__ */ K(S, {}),
669
- /* @__PURE__ */ K(i, {
670
- type: "button",
671
- tone: "secondary",
672
- buttonStyle: "ghost",
673
- "aria-labelledby": `${y} ${b}`,
674
- "aria-haspopup": "dialog",
675
- "aria-expanded": l,
676
- onClick: h,
677
- className: r(x, "flex h-full min-h-0 min-w-0 flex-1 items-center justify-start px-control hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground"),
678
- children: /* @__PURE__ */ K("span", {
679
- id: b,
680
- className: "min-w-0",
681
- children: /* @__PURE__ */ K(Ze, {
682
- filter: n,
683
- value: a
684
- })
685
- })
686
- }),
687
- !!s && /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(S, {}), /* @__PURE__ */ q(i, {
688
- type: "button",
689
- tone: "secondary",
690
- buttonStyle: "ghost",
691
- className: r(x, "flex h-full min-h-0 shrink-0 items-center justify-center px-space-sm text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:bg-accent focus-visible:text-accent-foreground"),
692
- onClick: (e) => {
693
- e.stopPropagation(), e.preventDefault(), m();
694
- },
695
- children: [/* @__PURE__ */ K(ke, {
696
- "aria-hidden": "true",
697
- className: "size-icon"
698
- }), /* @__PURE__ */ K(o, {
699
- tag: "span",
700
- className: "sr-only",
701
- children: v.clear
702
- })]
703
- })] })
704
- ]
705
- });
706
- }
707
- //#endregion
708
- //#region src/components/features/filters/hooks/use-async-options.ts
709
- function at(e, t, n) {
710
- for (let [t, r] of e) Date.now() - r.timestamp > n && e.delete(t);
711
- return e.get(t);
712
- }
713
- function ot(e, t, n, r = {}) {
714
- let { asyncConfig: i } = e, a = i?.fetcher, o = i?.mapToOption, s = H(() => /* @__PURE__ */ new Map(), [
715
- e.key,
716
- a,
717
- o
718
- ]), c = U(r.onError);
719
- c.current = r.onError;
720
- let l = i?.debounceMs ?? e.delay ?? 300, u = (fe(t, l) ?? "").trim(), d = i?.limit ?? 10, f = i?.minQueryLength ?? 0, p = i?.preload ?? !0, m = i?.staleTime ?? 6e4, h = i?.gcTime ?? 3e5, g = u.length === 0 && p, _ = u.length >= f, v = !!i?.fetcher && n && (g || u.length > 0 && _), y = n && !g && u.length > 0 && u.length < f, b = H(() => i?.queryKey ? JSON.stringify(i.queryKey({
721
- query: u,
722
- limit: d
723
- })) : JSON.stringify([
724
- "filter",
725
- e.key,
726
- u,
727
- d
728
- ]), [
729
- i,
730
- e.key,
731
- u,
732
- d
733
- ]), x = B(async (e) => a && o ? (await a({
734
- query: u,
735
- limit: d,
736
- signal: e
737
- })).map(o) : [], [
738
- a,
739
- o,
740
- u,
741
- d
742
- ]), [S, C] = W(() => {
743
- let e = at(s, b, h);
744
- return {
745
- cache: s,
746
- data: e?.data ?? [],
747
- loading: !1,
748
- fetching: !1,
749
- error: !1
750
- };
751
- }), [w, T] = W(0), E = B(() => T((e) => e + 1), []), D = U(0);
752
- return V(() => {
753
- let t = D.current !== w;
754
- if (D.current = w, !v) return;
755
- let n = at(s, b, h), r = n !== void 0 && Date.now() - n.timestamp < m, i = new AbortController();
756
- if (r && !t) return C({
757
- cache: s,
758
- data: n.data,
759
- loading: !1,
760
- fetching: !1,
761
- error: !1
762
- }), () => i.abort();
763
- C((e) => ({
764
- cache: s,
765
- data: n?.data ?? (e.cache === s ? e.data : []),
766
- loading: n === void 0,
767
- fetching: !0,
768
- error: !1
769
- }));
770
- let a = !1;
771
- return x(i.signal).then((e) => {
772
- a || (s.set(b, {
773
- timestamp: Date.now(),
774
- data: e
775
- }), C({
776
- cache: s,
777
- data: e,
778
- loading: !1,
779
- fetching: !1,
780
- error: !1
781
- }));
782
- }).catch((t) => {
783
- a || i.signal.aborted || t && t.name === "AbortError" || (C((e) => ({
784
- cache: s,
785
- data: e.cache === s ? e.data : [],
786
- loading: !1,
787
- fetching: !1,
788
- error: !0
789
- })), c.current?.(t, {
790
- phase: "fetch-options",
791
- filterKey: e.key
792
- }));
793
- }), () => {
794
- a = !0, i.abort();
795
- };
796
- }, [
797
- s,
798
- b,
799
- x,
800
- v,
801
- m,
802
- h,
803
- w,
804
- e.key
805
- ]), {
806
- options: v && S.cache === s ? S.data : [],
807
- isLoading: v && S.cache === s && S.loading,
808
- isFetching: v && S.cache === s && S.fetching,
809
- isError: v && S.cache === s && S.error,
810
- refetch: E,
811
- isBelowMinQuery: y,
812
- minQueryLength: f
813
- };
814
- }
815
- //#endregion
816
- //#region src/components/features/filters/partials/filter-editor-header.tsx
817
- function st({ title: e, description: t, onBack: n }) {
818
- let { strings: r } = $();
819
- return /* @__PURE__ */ q(te, {
820
- start: n ? /* @__PURE__ */ K(i, {
821
- type: "button",
822
- tone: "secondary",
823
- buttonStyle: "ghost",
824
- size: "sm",
825
- iconOnly: !0,
826
- onClick: n,
827
- className: "shrink-0",
828
- "aria-label": r.backToFilters,
829
- children: /* @__PURE__ */ K(we, {
830
- "aria-hidden": "true",
831
- className: "size-icon-sm rtl:rotate-180"
832
- })
833
- }) : void 0,
834
- children: [/* @__PURE__ */ K(ee, { children: e }), t != null && /* @__PURE__ */ K(L, { children: t })]
835
- });
836
- }
837
- //#endregion
838
- //#region src/components/features/filters/partials/async-filter-content.tsx
839
- function ct({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onClose: a, triggerSource: s = "chip" }) {
840
- let { strings: c, cacheAsyncOptions: l, getAsyncOptionLabel: d, reportError: m } = $(), [h, g] = W(""), [_, v] = W(t ?? []), y = U(t);
841
- if (t !== y.current) {
842
- let e = y.current ?? [], n = t ?? [];
843
- y.current = t, (n.length !== e.length || n.some((t, n) => t !== e[n])) && v(n);
844
- }
845
- let { options: b, isLoading: x, isFetching: S, isError: C, refetch: k, isBelowMinQuery: j, minQueryLength: M } = ot(e, h, !0, { onError: m });
846
- V(() => {
847
- b.length > 0 && l(e.key, b);
848
- }, [
849
- l,
850
- e.key,
851
- b
852
- ]);
853
- let N = e.multiple !== !1, P = e.maxSelected, F = s === "toolbar", ee = _.length !== t.length || _.some((e) => !t.includes(e)), I = H(() => {
854
- let t = new Set(_), n = new Set(b.map((e) => e.value)), r = [];
855
- for (let t of _) if (!n.has(t)) {
856
- let n = d(e.key, t);
857
- n && r.push({
858
- value: t,
859
- label: n,
860
- icon: e.icon
861
- });
862
- }
863
- return [...r, ...b].sort((e, n) => +!t.has(e.value) - !t.has(n.value));
864
- }, [
865
- b,
866
- _,
867
- e.key,
868
- e.icon,
869
- d
870
- ]), te = (t) => {
871
- if (N) {
872
- if (_.includes(t)) v(_.filter((e) => e !== t));
873
- else {
874
- if (P && _.length >= P) return;
875
- v([..._, t]);
876
- }
877
- } else v([t]), e.closeOnSelect === !0 && (n([t]), a());
878
- }, L = () => {
879
- n(_), a();
880
- }, ne = H(() => x || S ? /* @__PURE__ */ K(f, { label: c.searching }) : C ? /* @__PURE__ */ K(p, {
881
- variant: "inline",
882
- title: c.fetchError,
883
- action: /* @__PURE__ */ K(i, {
884
- tone: "secondary",
885
- buttonStyle: "outline",
886
- size: "sm",
887
- onClick: (e) => {
888
- e.stopPropagation(), k();
889
- },
890
- children: c.retryFetch
891
- })
892
- }) : j ? /* @__PURE__ */ K("div", {
893
- className: "text-muted-foreground flex items-center justify-center py-space-xl",
894
- children: /* @__PURE__ */ K(o, {
895
- tag: "span",
896
- size: "xs",
897
- type: "secondary",
898
- children: Y(c.minQueryHint, { min: M })
899
- })
900
- }) : c.noOptionsFound, [
901
- x,
902
- S,
903
- C,
904
- j,
905
- M,
906
- c,
907
- k
908
- ]);
909
- return /* @__PURE__ */ q(G, { children: [
910
- /* @__PURE__ */ K(st, {
911
- title: e.label,
912
- description: c.selectValues,
913
- onBack: F ? r : void 0
914
- }),
915
- /* @__PURE__ */ q(A, {
916
- shouldFilter: !1,
917
- inset: "flush",
918
- className: "rounded-none",
919
- children: [/* @__PURE__ */ K(T, {
920
- placeholder: Y(c.searchPlaceholder, { filterLabel: Q(e.label) }),
921
- value: h,
922
- onValueChange: g
923
- }), /* @__PURE__ */ K(D, { children: I.length === 0 ? /* @__PURE__ */ K(E, { children: ne }) : /* @__PURE__ */ q(O, { children: [!(!S || x) && /* @__PURE__ */ q(u, {
924
- direction: "horizontal",
925
- gap: "sm",
926
- wrap: !1,
927
- className: "px-control-sm py-space-xs",
928
- children: [/* @__PURE__ */ K(De, { className: "text-muted-foreground size-icon-sm animate-spin" }), /* @__PURE__ */ K(o, {
929
- tag: "span",
930
- size: "xs",
931
- type: "secondary",
932
- children: c.searching
933
- })]
934
- }), I.map((e) => /* @__PURE__ */ q(w, {
935
- onSelect: () => te(e.value),
936
- "data-checked": _.includes(e.value) || void 0,
937
- disabled: e.disabled || !!P && _.length >= P && !_.includes(e.value),
938
- className: "flex items-center gap-space-sm",
939
- children: [e.icon, /* @__PURE__ */ K(o, {
940
- tag: "span",
941
- type: "inherit",
942
- lineHeight: "tight",
943
- children: e.label
944
- })]
945
- }, e.value))] }) })]
946
- }),
947
- ee && /* @__PURE__ */ K(R, {
948
- caption: Y(c.selected, {
949
- count: _.length,
950
- filterLabel: Q((_.length > 1 ? e.pluralLabel : e.label) ?? e.label)
951
- }),
952
- children: /* @__PURE__ */ K(i, {
953
- tone: "primary",
954
- size: "sm",
955
- onClick: L,
956
- children: c.confirm
957
- })
958
- })
959
- ] });
960
- }
961
- //#endregion
962
- //#region src/components/features/filters/facets/date-facet.tsx
963
- var lt = [];
964
- function ut({ filter: e, value: t, onValueChange: n, className: i }) {
965
- let { strings: a } = $(), o = e.operators?.some((e) => e.value === "between") || e.operator === "between" || e.key.toLowerCase().includes("range") || e.key.toLowerCase().includes("between"), s = e.dateFormat?.param ?? "yyyy-MM-dd", c = e.dateFormat?.display ?? "PPP", l = o ? e.datePickerConfig?.noRangePlaceholder ?? e.placeholder ?? a.calendar.notDateRangeSelected : e.datePickerConfig?.noDatePlaceholder ?? e.placeholder ?? a.calendar.notDateSelected, u = !!e.datePickerConfig?.showConfirmButton, d = e.datePickerConfig?.autoApply ?? !u, f = e.datePickerConfig?.showShortcuts ?? !0, p = o && (t.start || t.end) ? {
966
- from: t.start,
967
- to: t.end
968
- } : void 0, m = !o && t.start && J(t.start) ? t.start : void 0, h = {
969
- format: s,
970
- readableFormat: c,
971
- placeholder: l,
972
- disablePortal: !0,
973
- numberOfMonths: 1,
974
- className: r("date-facet--component", "w-full", i)
975
- };
976
- return o ? /* @__PURE__ */ K(F, {
977
- mode: "range",
978
- value: p,
979
- onValueChange: (e) => {
980
- n({
981
- start: e.range?.from ?? void 0,
982
- end: e.range?.to ?? void 0
983
- });
984
- },
985
- withConfirm: u,
986
- closeOnSelect: d,
987
- presets: f ? void 0 : lt,
988
- ...h
989
- }) : /* @__PURE__ */ K(F, {
990
- mode: "single",
991
- value: m,
992
- onValueChange: (e) => {
993
- n({
994
- start: e.date ?? void 0,
995
- end: void 0
996
- });
997
- },
998
- closeOnSelect: d,
999
- ...h
1000
- });
1001
- }
1002
- //#endregion
1003
- //#region src/components/features/filters/partials/date-filter-content.tsx
1004
- function dt({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, triggerSource: i = "chip" }) {
1005
- let a = (t) => {
1006
- if (!t) return;
1007
- if (e.dateFormat?.param) {
1008
- let n = je(t, e.dateFormat.param, /* @__PURE__ */ new Date());
1009
- return J(n) ? n : void 0;
1010
- }
1011
- let n = new Date(t);
1012
- return J(n) ? n : void 0;
1013
- }, o = a(t[0]), s = a(t[1]), c = (t) => {
1014
- if (t && J(t)) return Ae(t, e.dateFormat?.param ?? "yyyy-MM-dd");
1015
- }, l = ({ start: e, end: t }) => {
1016
- let r = [], i = c(e), a = c(t);
1017
- i && r.push(i), a && r.push(a), n(r);
1018
- }, u = i === "toolbar", d = {
1019
- start: o,
1020
- end: s
1021
- };
1022
- return /* @__PURE__ */ q("div", {
1023
- className: "flex flex-col",
1024
- children: [/* @__PURE__ */ K(st, {
1025
- title: e.label,
1026
- onBack: u ? r : void 0
1027
- }), /* @__PURE__ */ K("div", {
1028
- className: h.menuRegion,
1029
- children: /* @__PURE__ */ K(ut, {
1030
- filter: e,
1031
- value: d,
1032
- onValueChange: l
1033
- })
1034
- })]
1035
- });
1036
- }
1037
- //#endregion
1038
- //#region src/components/features/filters/partials/filter-error-boundary.tsx
1039
- var ft = class extends _e {
1040
- state = {
1041
- hasError: !1,
1042
- error: null
1043
- };
1044
- static getDerivedStateFromError(e) {
1045
- return {
1046
- hasError: !0,
1047
- error: e
1048
- };
1049
- }
1050
- componentDidCatch(e, t) {
1051
- this.props.onError(e, {
1052
- phase: "render",
1053
- filterKey: this.props.filterKey
1054
- });
1055
- }
1056
- handleReset = () => {
1057
- this.setState({
1058
- hasError: !1,
1059
- error: null
1060
- });
1061
- };
1062
- render() {
1063
- if (this.state.hasError) {
1064
- let { fallback: e, filterKey: t, labels: n } = this.props;
1065
- return e ? /* @__PURE__ */ K("div", {
1066
- className: "filter-error-boundary--component contents",
1067
- children: e
1068
- }) : /* @__PURE__ */ q("div", {
1069
- className: r("filter-error-boundary--component rounded-radius border p-surface-xs", d.destructive.edge, d.destructive.wash, d.destructive.ink),
1070
- children: [
1071
- /* @__PURE__ */ q("div", {
1072
- className: "mb-space-xs flex items-center justify-between",
1073
- children: [/* @__PURE__ */ K(o, {
1074
- tag: "span",
1075
- weight: "semibold",
1076
- children: n.title
1077
- }), /* @__PURE__ */ K(i, {
1078
- type: "button",
1079
- tone: "destructive",
1080
- buttonStyle: "ghost",
1081
- size: "sm",
1082
- iconOnly: !0,
1083
- onClick: this.handleReset,
1084
- "aria-label": n.reset,
1085
- children: /* @__PURE__ */ K(ke, { className: "size-icon-sm" })
1086
- })]
1087
- }),
1088
- /* @__PURE__ */ K(o, { children: n.getDescription(t) }),
1089
- /* @__PURE__ */ K(_, {
1090
- size: "xs",
1091
- className: "mt-space-xs text-destructive",
1092
- children: this.state.error?.message || n.unknownError
1093
- })
1094
- ]
1095
- });
1096
- }
1097
- return /* @__PURE__ */ K("div", {
1098
- className: "filter-error-boundary--component contents",
1099
- children: this.props.children
1100
- });
1101
- }
1102
- };
1103
- function pt(e) {
1104
- let { strings: t, reportError: n } = $(), r = H(() => ({
1105
- title: t.error.title,
1106
- reset: t.clear,
1107
- getDescription: (e) => e ? Y(t.error.descriptionWithKey, { filterKey: e }) : t.error.generic,
1108
- unknownError: t.error.unknown
1109
- }), [t]);
1110
- return /* @__PURE__ */ K(ft, {
1111
- ...e,
1112
- labels: r,
1113
- onError: n
1114
- });
1115
- }
1116
- //#endregion
1117
- //#region src/components/features/filters/partials/filter-list-item.tsx
1118
- function mt({ filter: e, onSelect: t }) {
1119
- let { strings: n } = $(), r = e.type === X.DATE ? e.operator === "between" ? n?.selectDateRange : n?.selectDate : e.options ? `${e.options.length} ${n?.options ?? ""}`.trim() : null;
1120
- return /* @__PURE__ */ q(w, {
1121
- onSelect: t,
1122
- children: [!!e.icon && /* @__PURE__ */ K("span", {
1123
- className: "shrink-0 text-muted-foreground [&_svg]:size-icon",
1124
- children: e.icon
1125
- }), /* @__PURE__ */ q("div", {
1126
- className: "flex min-w-0 flex-col gap-dense leading-tight",
1127
- children: [/* @__PURE__ */ K(o, {
1128
- tag: "span",
1129
- type: "inherit",
1130
- lineHeight: "tight",
1131
- weight: "medium",
1132
- className: "truncate",
1133
- children: e.label
1134
- }), !!r && /* @__PURE__ */ K(o, {
1135
- tag: "span",
1136
- lineHeight: "tight",
1137
- size: "xs",
1138
- type: "secondary",
1139
- className: "truncate",
1140
- children: r
1141
- })]
1142
- })]
1143
- }, e.key);
1144
- }
1145
- //#endregion
1146
- //#region src/components/features/filters/partials/filter-list-content.tsx
1147
- function ht({ availableFilters: e, activeFilters: t, onFilterSelect: n }) {
1148
- let { strings: r } = $(), i = (e) => {
1149
- n(e);
1150
- };
1151
- return /* @__PURE__ */ q(A, {
1152
- inset: "compact",
1153
- className: "rounded-none",
1154
- children: [/* @__PURE__ */ K(T, { placeholder: r.searchFilters }), /* @__PURE__ */ q(D, { children: [
1155
- /* @__PURE__ */ K(E, { children: r.noFiltersAvailable }),
1156
- e.length > 0 && /* @__PURE__ */ K(O, {
1157
- heading: r.availableFilters,
1158
- children: e.map((e) => /* @__PURE__ */ K(mt, {
1159
- filter: e,
1160
- onSelect: () => i(e)
1161
- }, e.key))
1162
- }),
1163
- t.length > 0 && /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(k, {}), /* @__PURE__ */ K(O, {
1164
- heading: r.activeFilters,
1165
- children: t.map((e) => /* @__PURE__ */ K(mt, {
1166
- filter: e,
1167
- onSelect: () => i(e)
1168
- }, e.key))
1169
- })] })
1170
- ] })]
1171
- });
1172
- }
1173
- //#endregion
1174
- //#region src/components/features/filters/partials/nested-filter-options.tsx
1175
- function gt({ filter: e, value: t, multiple: n, onChange: r, header: i }) {
1176
- let { strings: a } = $(), o = H(() => We(e.options ?? []), [e.options]), s = pe({
1177
- items: o,
1178
- selected: t,
1179
- open: !0,
1180
- multiple: n,
1181
- selectable: e.selectableOptions ?? "leaf",
1182
- strings: {
1183
- ...he,
1184
- root: e.label,
1185
- search: Y(a.searchPlaceholder, { filterLabel: Q(e.label) }),
1186
- empty: a.noOptionsFound,
1187
- back: a.previousLevel,
1188
- selectCurrent: a.selectCurrentLevel
1189
- },
1190
- onChange: (e) => r(e == null ? [] : typeof e == "string" ? [e] : [...e])
1191
- });
1192
- return /* @__PURE__ */ K(me, {
1193
- controller: s,
1194
- header: i,
1195
- rootInPath: !0,
1196
- className: "nested-filter-options--component"
1197
- });
1198
- }
1199
- //#endregion
1200
- //#region src/components/features/filters/partials/regular-filter-content.tsx
1201
- function _t({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onClose: a, triggerSource: s = "chip" }) {
1202
- let { strings: c, reportError: l } = $(), d = e.multiple === !0 || e.type === X.MULTI_SELECT, f = s === "toolbar", [p, m] = W(t || []);
1203
- V(() => {
1204
- m(t || []);
1205
- }, [t]);
1206
- let h = (t) => {
1207
- if (d) {
1208
- let e = p.includes(t) ? p.filter((e) => e !== t) : [...p, t];
1209
- m(e);
1210
- } else m([t]), e.closeOnSelect === !0 && (n([t]), a());
1211
- }, g = (t) => {
1212
- m(t), !d && e.closeOnSelect === !0 && t.length && (n(t), a());
1213
- }, _ = () => {
1214
- try {
1215
- n(p), a();
1216
- } catch (t) {
1217
- l(t, {
1218
- phase: "apply",
1219
- filterKey: e.key
1220
- });
1221
- }
1222
- }, v = /* @__PURE__ */ K(st, {
1223
- title: e.label,
1224
- onBack: f ? r : void 0
1225
- }), y = JSON.stringify(p.slice().sort()) !== JSON.stringify((t ?? []).slice().sort());
1226
- return /* @__PURE__ */ q("div", {
1227
- className: "flex flex-col",
1228
- children: [Ue(e.options) ? /* @__PURE__ */ K(gt, {
1229
- filter: e,
1230
- value: p,
1231
- multiple: d,
1232
- onChange: g,
1233
- header: v
1234
- }) : /* @__PURE__ */ q(G, { children: [v, /* @__PURE__ */ q(A, {
1235
- inset: "flush",
1236
- className: "rounded-none",
1237
- children: [/* @__PURE__ */ K(T, { placeholder: Y(c.searchPlaceholder, { filterLabel: Q(e.label) }) }), /* @__PURE__ */ q(D, {
1238
- className: "max-h-64",
1239
- children: [/* @__PURE__ */ K(E, { children: /* @__PURE__ */ K(o, {
1240
- type: "secondary",
1241
- align: "center",
1242
- className: "py-space-xl",
1243
- children: c.noOptionsFound
1244
- }) }), /* @__PURE__ */ K(O, { children: e.options?.map((e) => {
1245
- let t = p.includes(e.value);
1246
- return /* @__PURE__ */ q(w, {
1247
- onSelect: () => h(e.value),
1248
- "data-checked": t || void 0,
1249
- disabled: e.disabled,
1250
- className: "data-[checked=true]:**:[svg]:text-primary-accent",
1251
- children: [!!e.icon && /* @__PURE__ */ K("span", {
1252
- className: "shrink-0 text-muted-foreground [&_svg]:size-icon",
1253
- children: e.icon
1254
- }), /* @__PURE__ */ q(u, {
1255
- gap: "dense",
1256
- className: "flex min-w-0 flex-1 flex-col leading-tight",
1257
- children: [/* @__PURE__ */ K(o, {
1258
- tag: "span",
1259
- type: "inherit",
1260
- lineHeight: "tight",
1261
- weight: t ? "medium" : "regular",
1262
- className: "truncate",
1263
- children: e.label
1264
- }), !!e.description && /* @__PURE__ */ K(o, {
1265
- tag: "span",
1266
- size: "xs",
1267
- lineHeight: "tight",
1268
- type: "secondary",
1269
- className: "truncate",
1270
- children: e.description
1271
- })]
1272
- })]
1273
- }, e.value);
1274
- }) })]
1275
- })]
1276
- })] }), !!y && /* @__PURE__ */ K(R, {
1277
- caption: Y(c.selected, {
1278
- count: p.length,
1279
- filterLabel: Q((p.length > 1 ? e.pluralLabel : e.label) ?? e.label)
1280
- }),
1281
- children: /* @__PURE__ */ K(i, {
1282
- tone: "primary",
1283
- size: "sm",
1284
- onClick: _,
1285
- children: c.confirm
1286
- })
1287
- })]
1288
- });
1289
- }
1290
- //#endregion
1291
- //#region src/components/features/filters/facets/tags-facet.tsx
1292
- function vt({ filter: e, value: n, onValueChange: a, className: s }) {
1293
- let { defaultScale: c } = t(), l = N(void 0, c), { strings: d } = $(), [f, p] = W(""), m = B(() => {
1294
- let e = f.trim();
1295
- e && !n.includes(e) && (a([...n, e]), p(""));
1296
- }, [
1297
- f,
1298
- n,
1299
- a
1300
- ]), h = B((e) => {
1301
- a(n.filter((t) => t !== e));
1302
- }, [n, a]), g = (e) => {
1303
- e.key === "Enter" && (e.preventDefault(), m());
1304
- }, _ = B(() => {
1305
- a([]), p("");
1306
- }, [a]), v = n.length > 0, y = n.length === 1 ? d.tag : d.tags, b = v ? /* @__PURE__ */ q(u, {
1307
- gap: "md",
1308
- className: "tags-facet--summary",
1309
- children: [/* @__PURE__ */ q(u, {
1310
- direction: "horizontal",
1311
- gap: "sm",
1312
- justify: "between",
1313
- wrap: !1,
1314
- children: [/* @__PURE__ */ q(o, {
1315
- tag: "span",
1316
- size: "xs",
1317
- type: "secondary",
1318
- children: [
1319
- n.length,
1320
- " ",
1321
- y
1322
- ]
1323
- }), /* @__PURE__ */ K(i, {
1324
- onClick: _,
1325
- tone: "secondary",
1326
- buttonStyle: "ghost",
1327
- size: "sm",
1328
- className: "text-muted-foreground hover:text-foreground",
1329
- type: "button",
1330
- "aria-label": d.clearAll,
1331
- children: d.clearAll
1332
- })]
1333
- }), /* @__PURE__ */ K(u, {
1334
- direction: "horizontal",
1335
- gap: "md",
1336
- children: n.map((e) => /* @__PURE__ */ q(x, {
1337
- tone: "secondary",
1338
- className: "flex items-center gap-space-sm py-space-2xs pl-space-md pr-space-sm",
1339
- children: [/* @__PURE__ */ K(o, {
1340
- tag: "span",
1341
- size: "xs",
1342
- children: e
1343
- }), /* @__PURE__ */ K("button", {
1344
- onClick: () => h(e),
1345
- className: r(C.target, C.focus, C.toggle),
1346
- type: "button",
1347
- "aria-label": `${d.removeTag} ${e}`,
1348
- children: /* @__PURE__ */ K(ke, {
1349
- className: C.icon,
1350
- "aria-hidden": "true"
1351
- })
1352
- })]
1353
- }, e))
1354
- })]
1355
- }) : null;
1356
- return /* @__PURE__ */ q(u, {
1357
- gap: "lg",
1358
- className: r("tags-facet--component", s),
1359
- children: [/* @__PURE__ */ q(u, {
1360
- direction: "horizontal",
1361
- gap: "md",
1362
- wrap: !1,
1363
- children: [/* @__PURE__ */ K("div", {
1364
- className: "relative flex-1",
1365
- children: /* @__PURE__ */ K(P, {
1366
- type: "text",
1367
- value: f,
1368
- onChange: (e) => p(e.target.value),
1369
- onKeyDown: g,
1370
- placeholder: e.placeholder ?? d.enterTag
1371
- })
1372
- }), /* @__PURE__ */ q(i, {
1373
- tone: "primary",
1374
- onClick: m,
1375
- disabled: !f.trim(),
1376
- size: l,
1377
- iconOnly: !0,
1378
- className: r(j[l], ie[l]),
1379
- type: "button",
1380
- children: [/* @__PURE__ */ K(Oe, { className: "size-icon" }), /* @__PURE__ */ K(o, {
1381
- tag: "span",
1382
- size: "pxs",
1383
- className: "sr-only",
1384
- children: d.addTag
1385
- })]
1386
- })]
1387
- }), b]
1388
- });
1389
- }
1390
- var yt = z.memo(vt);
1391
- yt.displayName = "TagsFacet";
1392
- //#endregion
1393
- //#region src/components/features/filters/partials/tags-filter-content.tsx
1394
- function bt({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onClose: a, triggerSource: o = "chip" }) {
1395
- let { strings: s, reportError: c } = $(), [l, u] = W(t || []), d = o === "toolbar";
1396
- V(() => {
1397
- u(t || []);
1398
- }, [t]);
1399
- let f = () => {
1400
- try {
1401
- n(l), a();
1402
- } catch (t) {
1403
- c(t, {
1404
- phase: "apply",
1405
- filterKey: e.key
1406
- });
1407
- }
1408
- }, p = JSON.stringify(l.slice().sort()) !== JSON.stringify((t ?? []).slice().sort());
1409
- return /* @__PURE__ */ q("div", {
1410
- className: "flex flex-col",
1411
- children: [
1412
- /* @__PURE__ */ K(st, {
1413
- title: e.label,
1414
- onBack: d ? r : void 0
1415
- }),
1416
- /* @__PURE__ */ K("div", {
1417
- className: h.menuRegion,
1418
- children: /* @__PURE__ */ K(yt, {
1419
- filter: e,
1420
- value: l,
1421
- onValueChange: u
1422
- })
1423
- }),
1424
- !!p && /* @__PURE__ */ K(R, { children: /* @__PURE__ */ K(i, {
1425
- tone: "primary",
1426
- size: "sm",
1427
- onClick: f,
1428
- children: s.confirm
1429
- }) })
1430
- ]
1431
- });
1432
- }
1433
- //#endregion
1434
- //#region src/components/features/filters/partials/filter-popover-content.tsx
1435
- var xt = "input:not([type=hidden]):not(:disabled), textarea:not(:disabled), button:not(:disabled), [tabindex]:not([tabindex=\"-1\"])";
1436
- function St(e) {
1437
- if (!e) return;
1438
- let t = [...e.querySelectorAll(xt)].filter((e) => !e.closest(".popover-header--component"));
1439
- (t.find((e) => e.matches("input, textarea")) ?? t[0])?.focus({ preventScroll: !0 });
1440
- }
1441
- function Ct({ activeFilterInPopover: e, availableFilters: t, activeFilters: n, getFilterValue: i, setFilterValue: a, onFilterSelect: o, onBackToFilterList: s, onClose: c, triggerSource: l = "chip", finalFocus: u }) {
1442
- let { strings: d } = $(), f = U(null), p = e?.key ?? null, h = U(p);
1443
- V(() => {
1444
- if (h.current === p) return;
1445
- h.current = p;
1446
- let e = f.current;
1447
- if (!e?.hasAttribute("data-open")) return;
1448
- St(e);
1449
- let t = e.ownerDocument.defaultView, n = t?.requestAnimationFrame(() => {
1450
- e.ownerDocument.activeElement === e && St(e);
1451
- });
1452
- return () => {
1453
- n != null && t?.cancelAnimationFrame(n);
1454
- };
1455
- }, [p]);
1456
- let g = e?.type === X.DATE || e?.type === X.TAGS ? "w-auto min-w-80 gap-0 overflow-hidden" : (e?.type, X.ASYNC_SELECT, r(m.md, "gap-0 overflow-hidden")), _ = (e, t) => {
1457
- a(e, t);
1458
- };
1459
- return /* @__PURE__ */ K(re, {
1460
- ref: f,
1461
- finalFocus: u,
1462
- type: "menu",
1463
- "aria-label": e?.label ?? d.addFilter,
1464
- inset: "flush",
1465
- className: r("filter-popover-content--component", g),
1466
- align: "start",
1467
- children: e ? e.type === X.DATE ? /* @__PURE__ */ K(dt, {
1468
- filter: e,
1469
- value: i(e.key),
1470
- onFilterChange: (t) => _(e.key, t),
1471
- onBackToFilterList: s,
1472
- triggerSource: l
1473
- }) : e.type === X.TAGS ? /* @__PURE__ */ K(bt, {
1474
- filter: e,
1475
- value: i(e.key),
1476
- onFilterChange: (t) => _(e.key, t),
1477
- onBackToFilterList: s,
1478
- onClose: c,
1479
- triggerSource: l
1480
- }) : e.type === X.ASYNC_SELECT ? /* @__PURE__ */ K(ct, {
1481
- filter: e,
1482
- value: i(e.key),
1483
- onFilterChange: (t) => _(e.key, t),
1484
- onBackToFilterList: s,
1485
- onClose: c,
1486
- triggerSource: l
1487
- }) : /* @__PURE__ */ K(_t, {
1488
- filter: e,
1489
- value: i(e.key),
1490
- onFilterChange: (t) => _(e.key, t),
1491
- onBackToFilterList: s,
1492
- onClose: c,
1493
- triggerSource: l
1494
- }) : /* @__PURE__ */ K(ht, {
1495
- availableFilters: t,
1496
- activeFilters: n,
1497
- onFilterSelect: o
1498
- })
1499
- });
1500
- }
1501
- //#endregion
1502
- //#region src/components/features/filters/partials/filter-pill.tsx
1503
- function wt({ filter: e, value: t, active: n, operator: r, operators: i, onOperatorChange: a, onValueChange: o, onClear: s, availableFilters: c, activeFilters: l, operatorChangeRef: u }) {
1504
- let d = U(!1), f = u ?? d, [p, m] = W(!1), h = U(null), g = U(null);
1505
- return /* @__PURE__ */ K(pt, {
1506
- filterKey: e.key,
1507
- children: /* @__PURE__ */ q(ne, {
1508
- open: p,
1509
- onOpenChange: (e) => {
1510
- e && f.current || m(e);
1511
- },
1512
- children: [/* @__PURE__ */ q("div", {
1513
- className: "filter-pill--component filter-pill--anchor relative",
1514
- children: [/* @__PURE__ */ K(I, {
1515
- render: /* @__PURE__ */ K("span", {}),
1516
- nativeButton: !1,
1517
- tabIndex: -1,
1518
- "aria-hidden": "true",
1519
- className: "pointer-events-none absolute inset-0"
1520
- }), /* @__PURE__ */ K(it, {
1521
- filter: e,
1522
- popoverOpen: p,
1523
- triggerRef: h,
1524
- value: t,
1525
- active: n,
1526
- operators: i,
1527
- operator: r,
1528
- onOperatorChange: (e) => {
1529
- f.current = !0, a(e), m(!1), setTimeout(() => {
1530
- f.current = !1;
1531
- }, 100);
1532
- },
1533
- onFilterClear: () => {
1534
- m(!1), s(), h.current?.focus();
1535
- },
1536
- onFilterClick: (e) => {
1537
- f.current || (g.current = e?.currentTarget ?? h.current, m(!0));
1538
- }
1539
- })]
1540
- }), /* @__PURE__ */ K(Ct, {
1541
- finalFocus: g,
1542
- activeFilterInPopover: e,
1543
- availableFilters: c,
1544
- activeFilters: l,
1545
- getFilterValue: () => t,
1546
- setFilterValue: (e, t) => o(t),
1547
- onFilterSelect: () => {},
1548
- onBackToFilterList: () => {},
1549
- onClose: () => m(!1),
1550
- triggerSource: "chip"
1551
- })]
1552
- })
1553
- });
1554
- }
1555
- wt.displayName = "FilterPill";
1556
- //#endregion
1557
- //#region src/components/features/filters/partials/filters-button.tsx
1558
- function Tt({ triggerRef: e, availableFilters: n, activeFilters: a, activeFilterInPopover: o, getFilterValue: s, setFilterValue: c, setActiveFilterInPopover: l }) {
1559
- let { defaultScale: u } = t(), d = N(void 0, u), [f, p] = W(!1), { strings: m } = $();
1560
- return V(() => {
1561
- f || l(null);
1562
- }, [f, l]), /* @__PURE__ */ q(ne, {
1563
- open: f,
1564
- onOpenChange: p,
1565
- children: [/* @__PURE__ */ K(I, {
1566
- asChild: !0,
1567
- children: /* @__PURE__ */ K(i, {
1568
- ref: e,
1569
- tone: "secondary",
1570
- buttonStyle: "outline",
1571
- size: d,
1572
- iconOnly: !0,
1573
- "aria-label": m.addFilter,
1574
- className: r("filters-button--component shrink-0", j[d], ie[d]),
1575
- children: /* @__PURE__ */ K(Ee, { className: "size-icon-sm" })
1576
- })
1577
- }), /* @__PURE__ */ K(Ct, {
1578
- activeFilterInPopover: o,
1579
- availableFilters: n,
1580
- activeFilters: a,
1581
- getFilterValue: s,
1582
- setFilterValue: c,
1583
- onFilterSelect: (e) => {
1584
- l(e);
1585
- },
1586
- onBackToFilterList: () => {
1587
- l(null);
1588
- },
1589
- onClose: () => {
1590
- l(null), p(!1);
1591
- },
1592
- triggerSource: "toolbar"
1593
- })]
1594
- });
1595
- }
1596
- //#endregion
1597
- //#region src/components/features/filters/partials/filter-tabs.tsx
1598
- function Et({ tabs: e }) {
1599
- let { activeFilters: t, filters: n, replaceFilters: r } = $(), i = H(() => t.filter((e) => n.find((t) => t.key === e.key)?.type !== X.SEARCH), [t, n]), a = H(() => t.filter((e) => n.find((t) => t.key === e.key)?.type === X.SEARCH), [t, n]), s = H(() => {
1600
- for (let t of e) {
1601
- if (t.presets.length === 0) {
1602
- if (i.length === 0) return t.id;
1603
- continue;
1604
- }
1605
- if (t.presets.length === i.length && t.presets.every((e) => {
1606
- let t = i.find((t) => t.key === e.key);
1607
- if (!t) return !1;
1608
- let n = [...e.value].sort(), r = [...t.value].sort();
1609
- return !(n.length !== r.length || n.some((e, t) => e !== r[t]) || e.operator && t.operator !== e.operator);
1610
- })) return t.id;
1611
- }
1612
- return null;
1613
- }, [e, i]), c = B((e) => {
1614
- if (e.presets.length === 0) {
1615
- r([...a]);
1616
- return;
1617
- }
1618
- let t = e.presets.map((e) => {
1619
- let t = n.find((t) => t.key === e.key), r = e.operator ?? t?.operator ?? (t ? Ve(t.type) : "equals");
1620
- return {
1621
- id: e.key,
1622
- key: e.key,
1623
- value: e.value,
1624
- operator: r
1625
- };
1626
- });
1627
- r([...a, ...t]);
1628
- }, [
1629
- n,
1630
- a,
1631
- r
1632
- ]);
1633
- return e.length === 0 ? null : /* @__PURE__ */ K(le, {
1634
- value: s,
1635
- onValueChange: (t) => {
1636
- let n = e.find((e) => e.id === t);
1637
- n && c(n);
1638
- },
1639
- className: "filter-tabs--component",
1640
- children: /* @__PURE__ */ K(ce, {
1641
- variant: "chips",
1642
- role: "group",
1643
- "aria-orientation": void 0,
1644
- activateOnFocus: !0,
1645
- className: "gap-space-md",
1646
- children: e.map((e) => {
1647
- let t = s === e.id;
1648
- return /* @__PURE__ */ q(se, {
1649
- value: e.id,
1650
- role: "button",
1651
- "aria-selected": void 0,
1652
- "aria-controls": void 0,
1653
- "aria-pressed": t,
1654
- className: "filter-tabs--tab",
1655
- children: [/* @__PURE__ */ K(o, {
1656
- tag: "span",
1657
- weight: "medium",
1658
- className: "text-inherit",
1659
- children: e.label
1660
- }), e.count !== void 0 && /* @__PURE__ */ K(o, {
1661
- tag: "span",
1662
- size: "xs",
1663
- type: "secondary",
1664
- className: "tabular-nums",
1665
- children: e.count
1666
- })]
1667
- }, e.id);
1668
- })
1669
- })
1670
- });
1671
- }
1672
- //#endregion
1673
- //#region src/components/features/filters/facets/search-facet.tsx
1674
- var Dt = z.forwardRef(function(e, t) {
1675
- return /* @__PURE__ */ K(De, {
1676
- ...e,
1677
- ref: t,
1678
- className: r("animate-spin", e.className)
1679
- });
1680
- });
1681
- function Ot({ filter: e, value: t, onValueChange: n, className: i }) {
1682
- let { strings: a, isNavigating: o } = $(), [s, c] = W(t[0] || ""), l = U(s);
1683
- V(() => {
1684
- l.current = s;
1685
- }, [s]);
1686
- let u = U(t[0] || null), d = U(!1);
1687
- V(() => {
1688
- if (d.current || o) return;
1689
- let e = l.current;
1690
- if (!t.length || t[0] === "") {
1691
- e !== "" && (c(""), u.current = "");
1692
- return;
1693
- }
1694
- t[0] !== void 0 && t[0] !== e && t[0] !== u.current && (c(t[0]), u.current = t[0]);
1695
- }, [t, o]);
1696
- let f = de((e) => {
1697
- u.current = e, d.current = !1, n([e]);
1698
- }, e.delay ?? 300), p = (e) => {
1699
- u.current !== e && f(e);
1700
- };
1701
- return /* @__PURE__ */ K("div", {
1702
- className: r("search-facet--component", "search-facet relative w-full min-w-0 rounded-radius bg-background", i),
1703
- children: /* @__PURE__ */ K(P, {
1704
- type: "text",
1705
- "aria-label": e.label,
1706
- value: s,
1707
- onChange: (e) => {
1708
- d.current = !0;
1709
- let t = e.target.value;
1710
- c(t), p(t);
1711
- },
1712
- onFocus: () => {
1713
- d.current = !0;
1714
- },
1715
- onBlur: () => {
1716
- setTimeout(() => {
1717
- d.current = !1;
1718
- }, 100);
1719
- },
1720
- placeholder: e.placeholder ?? (() => {
1721
- let t = e.label.trim().toLowerCase();
1722
- return !t || t === "search" ? Y(a.searchPlaceholder, { filterLabel: "" }).replace(/\s+([….?!])/g, "$1").replace(/\s{2,}/g, " ").trim() : Y(a.searchPlaceholder, { filterLabel: t });
1723
- })(),
1724
- clearable: s.trim() !== "" && !o,
1725
- endIcon: o ? Dt : void 0,
1726
- strings: { clear: a.clearSearch }
1727
- })
1728
- });
1729
- }
1730
- var kt = z.memo(Ot);
1731
- kt.displayName = "SearchFacet";
1732
- //#endregion
1733
- //#region src/components/features/filters/partials/search-filters-list.tsx
1734
- function At({ filters: e, getFilterValue: t, setFilterValue: n, className: i }) {
1735
- return /* @__PURE__ */ K(G, { children: e.map((e) => /* @__PURE__ */ q(u, {
1736
- gap: "lg",
1737
- className: r("search-filters-list--component", "w-full min-w-0 sm:w-64 sm:flex-none", e.displayConfig.className, i),
1738
- children: [/* @__PURE__ */ K(kt, {
1739
- filter: e,
1740
- value: t(e.key),
1741
- onValueChange: (t) => n(e.key, t)
1742
- }), !!e.description && /* @__PURE__ */ K(o, {
1743
- size: "xs",
1744
- type: "secondary",
1745
- children: e.description
1746
- })]
1747
- }, e.key)) });
1748
- }
1749
- //#endregion
1750
- //#region src/components/features/filters/filter-layout.tsx
1751
- var jt = {
1752
- compact: "lg",
1753
- default: "xl"
1754
- }, Mt = {
1755
- compact: "sm",
1756
- default: "md"
1757
- };
1758
- function Nt({ className: e, dynamicFilterOptions: t = {}, loadingFilters: n = {}, variant: a = "default", showClearFilters: s = !1, tabs: c }) {
1759
- let { getFilterValue: l, setFilterValue: d, isFilterActive: f, clearFilters: p, getFilterOperator: m, setFilterOperator: h, isNavigating: g, strings: _ } = $(), { processedFilters: v, searchFilters: y, alwaysVisibleFilters: b, activeRegularFilters: x, popoverFilters: S, hasActive: C } = Ye({ dynamicFilterOptions: t }), [w, T] = W(null), E = v.find((e) => e.key === w) ?? null, D = B((e) => {
1760
- T(e?.key ?? null);
1761
- }, []);
1762
- V(() => {
1763
- w !== null && E === null && T(null);
1764
- }, [w, E]);
1765
- let O = U(null), k = U(null);
1766
- function A(e, t) {
1767
- t.length === 0 && e.displayConfig?.display !== "always" && (k.current = e.key), d(e.key, t);
1768
- }
1769
- V(() => {
1770
- let e = k.current;
1771
- e !== null && !f(e) && (O.current?.focus(), k.current = null);
1772
- }, [f]);
1773
- function j(e) {
1774
- return e.operators && e.operators.length > 0 ? e.operators : Be(e.type, _.operators);
1775
- }
1776
- function M(e, t) {
1777
- h(e, t);
1778
- }
1779
- return /* @__PURE__ */ q(u, {
1780
- gap: jt[a],
1781
- className: r("filter-layout--component", e),
1782
- children: [!!c && c.length > 0 && /* @__PURE__ */ K(Et, { tabs: c }), /* @__PURE__ */ q(u, {
1783
- direction: "horizontal",
1784
- align: "center",
1785
- gap: Mt[a],
1786
- children: [/* @__PURE__ */ K(pt, {
1787
- filterKey: "search-filters",
1788
- children: /* @__PURE__ */ K(At, {
1789
- filters: y,
1790
- getFilterValue: l,
1791
- setFilterValue: d
1792
- })
1793
- }), /* @__PURE__ */ q("div", {
1794
- className: r("contents", g && "pointer-events-none opacity-60"),
1795
- children: [
1796
- Object.entries(n).filter(([, e]) => e).map(([e]) => {
1797
- let t = v.find((t) => t.key === e)?.label || e;
1798
- return /* @__PURE__ */ q(u, {
1799
- direction: "horizontal",
1800
- gap: "sm",
1801
- wrap: !1,
1802
- className: "rounded-radius bg-muted/50 px-control-sm py-space-xs",
1803
- children: [/* @__PURE__ */ K("div", { className: "border-muted-foreground/30 border-t-primary size-icon-sm animate-spin rounded-full border-2" }), /* @__PURE__ */ K(o, {
1804
- tag: "span",
1805
- type: "secondary",
1806
- children: Y(_.loadingOptions, { filterLabel: t })
1807
- })]
1808
- }, `loading-${e}`);
1809
- }),
1810
- [...b, ...x].map((e) => /* @__PURE__ */ K(wt, {
1811
- filter: e,
1812
- value: l(e.key) ?? [],
1813
- active: f(e.key),
1814
- operator: m(e.key) || "equals",
1815
- operators: j(e),
1816
- onOperatorChange: (t) => M(e.key, t),
1817
- onValueChange: (t) => A(e, t),
1818
- onClear: () => A(e, []),
1819
- availableFilters: S,
1820
- activeFilters: [...x, ...b]
1821
- }, e.key)),
1822
- S.length > 0 && /* @__PURE__ */ K(pt, {
1823
- filterKey: "filters-button",
1824
- children: /* @__PURE__ */ K(Tt, {
1825
- triggerRef: O,
1826
- availableFilters: S,
1827
- activeFilters: x,
1828
- activeFilterInPopover: E,
1829
- getFilterValue: l,
1830
- setFilterValue: d,
1831
- setActiveFilterInPopover: D
1832
- })
1833
- }),
1834
- !!s && C && /* @__PURE__ */ K(i, {
1835
- tone: "secondary",
1836
- buttonStyle: "ghost",
1837
- onClick: p,
1838
- className: "text-muted-foreground ml-auto",
1839
- children: _.clearFilters
1840
- })
1841
- ]
1842
- })]
1843
- })]
1844
- });
1845
- }
1846
- //#endregion
1847
- //#region src/components/features/filters/filter-query.ts
1848
- var Pt = "__op", Ft = ["page"], It = new Set(Object.values(Z));
1849
- function Lt(e) {
1850
- let t = {};
1851
- if (!e) return t;
1852
- if (e instanceof URLSearchParams) return e.forEach((e, n) => {
1853
- t[n] = [...t[n] ?? [], e];
1854
- }), t;
1855
- for (let [n, r] of Object.entries(e)) {
1856
- let e = (Array.isArray(r) ? r : [r]).filter((e) => e != null && String(e).length > 0).map((e) => String(e));
1857
- e.length > 0 && (t[n] = e);
1858
- }
1859
- return t;
1860
- }
1861
- function Rt(e) {
1862
- let t = {};
1863
- for (let [n, r] of Object.entries(e)) r.length !== 0 && (t[n] = r.length === 1 ? r[0] : r);
1864
- return t;
1865
- }
1866
- function zt(e, t, n) {
1867
- let r = e[t] ?? [];
1868
- return n === "comma" ? r.flatMap((e) => e.split(",")) : r;
1869
- }
1870
- function Bt(e, t) {
1871
- return t.map((e) => e.trim()).filter((e) => e.length > 0).map((t) => {
1872
- if (!e.parse) return t;
1873
- let n = e.parse(t);
1874
- return n == null ? "" : String(n);
1875
- }).filter((e) => e.length > 0);
1876
- }
1877
- function Vt(e, t) {
1878
- return t.map((t) => {
1879
- let n = e.transform ? e.transform(t) : t, r = e.format ? e.format(n) : n;
1880
- return r == null ? "" : String(r);
1881
- }).filter((e) => e.length > 0);
1882
- }
1883
- function Ht(e) {
1884
- return e.operator ?? e.operators?.[0]?.value ?? Ve(e.type);
1885
- }
1886
- function Ut(e, t, n) {
1887
- let [r] = t[`${e.key}${n}`] ?? [];
1888
- return r && It.has(r) ? r : Ht(e);
1889
- }
1890
- function Wt(e, t, n) {
1891
- return e === "always" || e !== "never" && t !== n;
1892
- }
1893
- function Gt(e) {
1894
- return e.type === X.MULTI_SELECT || e.type === X.TAGS || e.multiple === !0;
1895
- }
1896
- function Kt(e, t, n = {}) {
1897
- let r = n.operatorSuffix ?? Pt, i = n.arrayFormat ?? "repeat", a = Lt(t);
1898
- return e.flatMap((e) => {
1899
- let t = Bt(e, zt(a, e.key, i));
1900
- return t.length === 0 ? [] : [{
1901
- id: e.key,
1902
- key: e.key,
1903
- operator: Ut(e, a, r),
1904
- value: Gt(e) ? t : [t[0]]
1905
- }];
1906
- });
1907
- }
1908
- function qt(e, t, n, r = {}) {
1909
- let i = r.operatorSuffix ?? Pt, a = r.arrayFormat ?? "repeat", o = r.preserveUnrelated ?? !0, s = r.includeOperators ?? "changed", c = r.resetPageKeys ?? Ft, l = o ? Lt(n) : {}, u = new Map(e.map((e) => [e.key, e]));
1910
- for (let t of e) delete l[t.key], delete l[`${t.key}${i}`];
1911
- for (let e of c) delete l[e];
1912
- for (let e of t) {
1913
- let t = u.get(e.key);
1914
- if (!t) continue;
1915
- let n = Vt(t, e.value);
1916
- if (n.length === 0) continue;
1917
- l[e.key] = a === "comma" ? [n.join(",")] : n;
1918
- let r = Ht(t);
1919
- Wt(s, e.operator, r) && (l[`${e.key}${i}`] = [e.operator]);
1920
- }
1921
- return Rt(l);
1922
- }
1923
- function Jt(e, t, n = {}) {
1924
- let r = n.preserveUnrelated ?? !0, i = n.resetPageKeys ?? Ft, a = r ? Lt(e) : {}, o = Lt(t);
1925
- for (let e of i) delete a[e];
1926
- for (let [e, t] of Object.entries(o)) t.length === 0 ? delete a[e] : a[e] = t;
1927
- return Rt(a);
1928
- }
1929
- //#endregion
1930
- //#region src/components/features/filters/facets/select-facet.tsx
1931
- function Yt({ filter: e, value: n, onValueChange: a, className: s }) {
1932
- let { defaultScale: c } = t(), l = N(void 0, c), { strings: u } = $(), [d, f] = W(!1), [p, m] = W(""), h = n.length > 0, g = e.options, _ = (t) => {
1933
- e.multiple ? n.includes(t) ? a(n.filter((e) => e !== t)) : a([...n, t]) : (a([t]), e.closeOnSelect !== !1 && f(!1));
1934
- }, v = (t) => Ge(e, t) ?? t, y = H(() => Ue(g) ? We(g ?? []) : null, [g]), b = H(() => (g ?? []).map((e) => ({
1935
- value: e.value,
1936
- label: e.label,
1937
- description: e.description,
1938
- icon: e.icon,
1939
- selected: n.includes(e.value),
1940
- disabled: e.disabled
1941
- })), [g, n]), x = Y(u.searchPlaceholder, { filterLabel: e.label.toLowerCase() }), S = Y(u.selected, {
1942
- count: n.length,
1943
- filterLabel: Q((n.length > 1 ? e.pluralLabel : e.label) ?? e.label)
1944
- });
1945
- return y ? /* @__PURE__ */ K("div", {
1946
- className: r("select-facet--component", "relative", s),
1947
- children: /* @__PURE__ */ K(ge, {
1948
- items: y,
1949
- value: e.multiple ? n : n[0] ?? null,
1950
- multiple: !!e.multiple,
1951
- selectable: e.selectableOptions ?? "leaf",
1952
- size: l,
1953
- "aria-label": e.label,
1954
- strings: {
1955
- placeholder: e.placeholder ?? u.select,
1956
- search: x,
1957
- empty: u.noOptionsFound,
1958
- root: e.label,
1959
- back: u.previousLevel,
1960
- selectCurrent: u.selectCurrentLevel
1961
- },
1962
- renderValue: n.length > 1 ? () => S : void 0,
1963
- onValueChange: (e) => a(e == null ? [] : typeof e == "string" ? [e] : [...e])
1964
- })
1965
- }) : /* @__PURE__ */ K("div", {
1966
- className: r("select-facet--component", "relative", s),
1967
- children: /* @__PURE__ */ K(ue, {
1968
- open: d,
1969
- onOpenChange: f,
1970
- search: !0,
1971
- searchValue: p,
1972
- onSearchChange: m,
1973
- strings: {
1974
- searchPlaceholder: x,
1975
- empty: u.noOptionsFound
1976
- },
1977
- contentClassName: "w-(--anchor-width) min-w-56",
1978
- trigger: /* @__PURE__ */ q(i, {
1979
- tone: "secondary",
1980
- buttonStyle: "outline",
1981
- size: l,
1982
- role: "combobox",
1983
- "aria-expanded": d,
1984
- className: M(l),
1985
- children: [h ? n.length === 1 ? /* @__PURE__ */ K(o, {
1986
- tag: "span",
1987
- weight: "semibold",
1988
- className: "truncate",
1989
- children: v(n[0])
1990
- }) : /* @__PURE__ */ K(o, {
1991
- tag: "span",
1992
- weight: "semibold",
1993
- children: S
1994
- }) : /* @__PURE__ */ K(o, {
1995
- tag: "span",
1996
- type: "secondary",
1997
- children: e.placeholder ?? u.select
1998
- }), /* @__PURE__ */ K(Te, { className: "ml-control-gap-small size-icon-sm shrink-0 opacity-50" })]
1999
- }),
2000
- items: b,
2001
- onSelect: (e) => _(e.value)
2002
- })
2003
- });
2004
- }
2005
- //#endregion
2006
- //#region src/components/features/filters/facets/async-select-facet.tsx
2007
- function Xt({ filter: e, value: n, onValueChange: a, className: s }) {
2008
- let { defaultScale: c } = t(), l = N(void 0, c), { strings: d, cacheAsyncOptions: m, getAsyncOptionLabel: h, reportError: g } = $(), [_, v] = W(!1), [y, b] = W(""), x = H(() => /* @__PURE__ */ new Map(), [
2009
- e.key,
2010
- e.asyncConfig?.fetcher,
2011
- e.asyncConfig?.mapToOption
2012
- ]), { options: S, isLoading: C, isFetching: k, isError: j, refetch: P, isBelowMinQuery: F, minQueryLength: ee } = ot(e, y, _, { onError: g });
2013
- V(() => {
2014
- if (S.length !== 0) {
2015
- for (let e of S) x.set(e.value, e);
2016
- m(e.key, S);
2017
- }
2018
- }, [
2019
- m,
2020
- e.key,
2021
- x,
2022
- S
2023
- ]);
2024
- let te = e.multiple !== !1, L = e.maxSelected, R = H(() => e.options ?? [], [e.options]), ie = H(() => {
2025
- let t = new Set(n), r = new Set([...R, ...S].map((e) => e.value)), i = [];
2026
- for (let t of n) if (!r.has(t)) {
2027
- let n = x.get(t);
2028
- if (n) i.push(n);
2029
- else {
2030
- let n = R.find((e) => e.value === t);
2031
- if (n) {
2032
- i.push(n);
2033
- continue;
2034
- }
2035
- let r = h(e.key, t);
2036
- r && i.push({
2037
- value: t,
2038
- label: r,
2039
- icon: e.icon
2040
- });
2041
- }
2042
- }
2043
- return [
2044
- ...i,
2045
- ...R,
2046
- ...S
2047
- ].sort((e, n) => +!t.has(e.value) - !t.has(n.value));
2048
- }, [
2049
- R,
2050
- S,
2051
- n,
2052
- e.key,
2053
- e.icon,
2054
- x,
2055
- h
2056
- ]), ae = (t) => {
2057
- if (te) {
2058
- if (n.includes(t)) a(n.filter((e) => e !== t));
2059
- else {
2060
- if (L && n.length >= L) return;
2061
- a([...n, t]);
2062
- }
2063
- } else a([t]), e.closeOnSelect !== !1 && v(!1);
2064
- }, oe = (t) => {
2065
- let n = S.find((e) => e.value === t);
2066
- if (n) return n.label;
2067
- let r = R.find((e) => e.value === t);
2068
- if (r) return r.label;
2069
- let i = x.get(t);
2070
- return i ? i.label : h(e.key, t) ?? t;
2071
- }, se = n.length > 0, ce = H(() => C || k ? /* @__PURE__ */ K(f, {
2072
- className: "async-select-facet--component",
2073
- label: d.searching
2074
- }) : j ? /* @__PURE__ */ K(p, {
2075
- variant: "inline",
2076
- title: d.fetchError,
2077
- action: /* @__PURE__ */ K(i, {
2078
- tone: "secondary",
2079
- buttonStyle: "outline",
2080
- size: "sm",
2081
- onClick: (e) => {
2082
- e.stopPropagation(), P();
2083
- },
2084
- children: d.retryFetch
2085
- })
2086
- }) : F ? /* @__PURE__ */ K("div", {
2087
- className: "text-muted-foreground flex items-center justify-center py-space-xl",
2088
- children: /* @__PURE__ */ K(o, {
2089
- tag: "span",
2090
- size: "xs",
2091
- type: "secondary",
2092
- children: Y(d.minQueryHint, { min: ee })
2093
- })
2094
- }) : /* @__PURE__ */ K(o, {
2095
- tag: "span",
2096
- type: "secondary",
2097
- children: d.noOptionsFound
2098
- }), [
2099
- C,
2100
- k,
2101
- j,
2102
- F,
2103
- ee,
2104
- d,
2105
- P
2106
- ]);
2107
- return /* @__PURE__ */ K("div", {
2108
- className: r("async-select-facet--component relative", s),
2109
- children: /* @__PURE__ */ q(ne, {
2110
- open: _,
2111
- onOpenChange: (e) => {
2112
- v(e), e || b("");
2113
- },
2114
- children: [/* @__PURE__ */ K(I, { render: /* @__PURE__ */ q(i, {
2115
- tone: "secondary",
2116
- buttonStyle: "outline",
2117
- size: l,
2118
- role: "combobox",
2119
- "aria-expanded": _,
2120
- className: M(l),
2121
- children: [se ? n.length === 1 ? /* @__PURE__ */ K(o, {
2122
- tag: "span",
2123
- weight: "semibold",
2124
- className: "truncate",
2125
- children: oe(n[0])
2126
- }) : /* @__PURE__ */ K(o, {
2127
- tag: "span",
2128
- weight: "semibold",
2129
- children: Y(d.selected, {
2130
- count: n.length,
2131
- filterLabel: Q((n.length > 1 ? e.pluralLabel : e.label) ?? e.label)
2132
- })
2133
- }) : /* @__PURE__ */ K(o, {
2134
- tag: "span",
2135
- type: "secondary",
2136
- children: e.placeholder ?? d.select
2137
- }), /* @__PURE__ */ K(Te, { className: "ml-control-gap-small size-icon-sm shrink-0 opacity-50" })]
2138
- }) }), /* @__PURE__ */ K(re, {
2139
- type: "menu",
2140
- inset: "flush",
2141
- className: "w-full min-w-70 gap-0",
2142
- children: /* @__PURE__ */ q(A, {
2143
- shouldFilter: !1,
2144
- inset: "flush",
2145
- className: "rounded-none",
2146
- children: [/* @__PURE__ */ K(T, {
2147
- placeholder: Y(d.searchPlaceholder, { filterLabel: e.label }),
2148
- value: y,
2149
- onValueChange: b
2150
- }), /* @__PURE__ */ K(D, { children: ie.length === 0 ? /* @__PURE__ */ K(E, { children: ce }) : /* @__PURE__ */ q(O, { children: [!(!k || C) && /* @__PURE__ */ q(u, {
2151
- direction: "horizontal",
2152
- gap: "sm",
2153
- wrap: !1,
2154
- className: "px-control-sm py-space-xs",
2155
- children: [/* @__PURE__ */ K(De, { className: "text-muted-foreground size-icon-sm animate-spin" }), /* @__PURE__ */ K(o, {
2156
- tag: "span",
2157
- size: "xs",
2158
- type: "secondary",
2159
- children: d.searching
2160
- })]
2161
- }), ie.map((e) => /* @__PURE__ */ q(w, {
2162
- value: e.value,
2163
- onSelect: () => ae(e.value),
2164
- disabled: e.disabled || !!L && n.length >= L && !n.includes(e.value),
2165
- children: [
2166
- /* @__PURE__ */ K(Se, { className: r("mr-control-gap size-icon-sm", n.includes(e.value) ? "opacity-100" : "opacity-0") }),
2167
- !!e.icon && /* @__PURE__ */ K("span", {
2168
- className: "mr-1.5",
2169
- children: e.icon
2170
- }),
2171
- /* @__PURE__ */ K(o, {
2172
- tag: "span",
2173
- children: e.label
2174
- })
2175
- ]
2176
- }, e.value))] }) })]
2177
- })
2178
- })]
2179
- })
2180
- });
2181
- }
2182
- //#endregion
2183
- //#region src/components/features/filters/facets/range-facet.tsx
2184
- function Zt({ filter: e, value: t, onValueChange: n, className: i }) {
2185
- let { strings: o } = $(), [s, c] = W(t.min?.toString() ?? ""), [d, f] = W(t.max?.toString() ?? ""), p = be(), m = de((e) => {
2186
- (e.min !== t.min || e.max !== t.max) && n(e);
2187
- }, e.delay ?? 300);
2188
- return V(() => (m({
2189
- min: s ? Number(s) : void 0,
2190
- max: d ? Number(d) : void 0
2191
- }), m.cancel), [
2192
- s,
2193
- d,
2194
- m
2195
- ]), /* @__PURE__ */ K(u, {
2196
- gap: "md",
2197
- className: r("range-facet--component", i),
2198
- children: /* @__PURE__ */ q(l, {
2199
- columns: {
2200
- base: 1,
2201
- sm: 2
2202
- },
2203
- gap: "md",
2204
- children: [/* @__PURE__ */ q(u, {
2205
- gap: "xs",
2206
- children: [/* @__PURE__ */ K(a, {
2207
- htmlFor: `${p}-min`,
2208
- className: "text-inherit",
2209
- children: o.min
2210
- }), /* @__PURE__ */ K(P, {
2211
- id: `${p}-min`,
2212
- type: "text",
2213
- value: s,
2214
- onChange: (e) => {
2215
- let t = e.target.value;
2216
- (t === "" || /^\d*\.?\d*$/.test(t)) && c(t);
2217
- },
2218
- placeholder: o.min,
2219
- className: "w-full"
2220
- })]
2221
- }), /* @__PURE__ */ q(u, {
2222
- gap: "xs",
2223
- children: [/* @__PURE__ */ K(a, {
2224
- htmlFor: `${p}-max`,
2225
- className: "text-inherit",
2226
- children: o.max
2227
- }), /* @__PURE__ */ K(P, {
2228
- id: `${p}-max`,
2229
- type: "text",
2230
- value: d,
2231
- onChange: (e) => {
2232
- let t = e.target.value;
2233
- (t === "" || /^\d*\.?\d*$/.test(t)) && f(t);
2234
- },
2235
- placeholder: o.max,
2236
- className: "w-full"
2237
- })]
2238
- })]
2239
- })
2240
- });
2241
- }
2242
- //#endregion
2243
- //#region src/components/features/filters/validators.ts
2244
- function Qt(e) {
2245
- return (t) => {
2246
- if (t == null || typeof t == "string" && t.length === 0) return !0;
2247
- let n = e.safeParse(t);
2248
- return n.success ? !0 : n.error?.issues?.[0]?.message ?? n.error?.message ?? !1;
2249
- };
2250
- }
2251
- function $t(e, t) {
2252
- return (n) => e(n) ? !0 : t;
2253
- }
2254
- //#endregion
2255
- export { Be as A, Ye as C, Re as D, ze as E, Pe as F, Me as I, Ne as L, Fe as M, Z as N, Ve as O, X as P, Y as R, Xe as S, $ as T, pt as _, Yt as a, it as b, qt as c, kt as d, Et as f, yt as g, Ct as h, Xt as i, Ie as j, Le as k, Nt as l, wt as m, Qt as n, Jt as o, Tt as p, Zt as r, Kt as s, $t as t, At as u, ut as v, Je as w, Ze as x, ot as y };
2256
-
2257
- //# sourceMappingURL=filters-DzgSJpMK.js.map