themelia-react-ui 1.0.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (640) hide show
  1. package/CHANGELOG.md +417 -0
  2. package/README.md +67 -16
  3. package/dist/{accordion-B-5Focs8.js → accordion-CQXVcd7Q.js} +15 -15
  4. package/dist/accordion-CQXVcd7Q.js.map +1 -0
  5. package/dist/action-menu-BTpyPWJ2.js +264 -0
  6. package/dist/action-menu-BTpyPWJ2.js.map +1 -0
  7. package/dist/affordance-geometry.generated-CCIXb2A1.js +68 -0
  8. package/dist/affordance-geometry.generated-CCIXb2A1.js.map +1 -0
  9. package/dist/{ai-artifact-B5tPpXnS.js → ai-artifact-2PQ2fItc.js} +206 -215
  10. package/dist/ai-artifact-2PQ2fItc.js.map +1 -0
  11. package/dist/{app-shell-at8Kt4l_.js → app-shell-BE_j8-AT.js} +11 -10
  12. package/dist/app-shell-BE_j8-AT.js.map +1 -0
  13. package/dist/{attachment-BO2R47wn.js → attachment-q69dlt5Y.js} +14 -14
  14. package/dist/attachment-q69dlt5Y.js.map +1 -0
  15. package/dist/auth-M3vGMgDR.js +723 -0
  16. package/dist/auth-M3vGMgDR.js.map +1 -0
  17. package/dist/{avatar-Bpzty83c.js → avatar-djdaaQ_s.js} +15 -13
  18. package/dist/avatar-djdaaQ_s.js.map +1 -0
  19. package/dist/{badge-BZXZT9wd.js → badge-0tATj-tW.js} +9 -9
  20. package/dist/badge-0tATj-tW.js.map +1 -0
  21. package/dist/base/accordion.js +1 -1
  22. package/dist/base/action-menu.js +1 -1
  23. package/dist/base/attachment.js +1 -1
  24. package/dist/base/avatar.js +1 -1
  25. package/dist/base/badge.js +1 -1
  26. package/dist/base/buttons.js +3 -2
  27. package/dist/base/cards.js +3 -3
  28. package/dist/base/carousel.js +33 -35
  29. package/dist/base/carousel.js.map +1 -1
  30. package/dist/base/cascader.js +246 -222
  31. package/dist/base/cascader.js.map +1 -1
  32. package/dist/base/chart.js +1 -1
  33. package/dist/base/choice-inputs.js +2 -2
  34. package/dist/base/code-block.js +1 -1
  35. package/dist/base/combobox.js +1 -1
  36. package/dist/base/command.js +1 -1
  37. package/dist/base/copyable.js +1 -1
  38. package/dist/base/date-pickers.js +3 -3
  39. package/dist/base/display.js +7 -7
  40. package/dist/base/feedback.js +4 -4
  41. package/dist/base/forms-numeric.js +1 -1
  42. package/dist/base/forms.js +2 -2
  43. package/dist/base/inline-edit.js +94 -92
  44. package/dist/base/inline-edit.js.map +1 -1
  45. package/dist/base/item.js +1 -1
  46. package/dist/base/media-gallery.js +1 -1
  47. package/dist/base/navigation.js +6 -6
  48. package/dist/base/popover-menu.js +1 -1
  49. package/dist/base/popover.js +1 -1
  50. package/dist/base/qr-code.js +7 -4
  51. package/dist/base/qr-code.js.map +1 -1
  52. package/dist/base/repeaters.js +53 -53
  53. package/dist/base/repeaters.js.map +1 -1
  54. package/dist/base/sheet.js +1 -1
  55. package/dist/base/sidebar.js +1 -1
  56. package/dist/base/signature-pad.js +84 -82
  57. package/dist/base/signature-pad.js.map +1 -1
  58. package/dist/base/skeleton.js +1 -1
  59. package/dist/base/spinner.js +1 -1
  60. package/dist/base/structure.js +1 -1
  61. package/dist/base/table.js +1 -1
  62. package/dist/base/text-inputs.js +2 -2
  63. package/dist/base/toaster.js +7 -7
  64. package/dist/base/toaster.js.map +1 -1
  65. package/dist/base/tree.js +1 -1
  66. package/dist/base/upload-queue.js +1 -1
  67. package/dist/base/upload.js +3 -3
  68. package/dist/base/value-inputs.js +1 -1
  69. package/dist/blocks/admin.js +228 -219
  70. package/dist/blocks/admin.js.map +1 -1
  71. package/dist/blocks/ai.js +182 -212
  72. package/dist/blocks/ai.js.map +1 -1
  73. package/dist/blocks/analytics/usage-card.js +1 -1
  74. package/dist/blocks/analytics.js +665 -620
  75. package/dist/blocks/analytics.js.map +1 -1
  76. package/dist/blocks/collaboration.js +2 -2
  77. package/dist/blocks/commerce/receipt.js +1 -1
  78. package/dist/blocks/commerce.js +1439 -1553
  79. package/dist/blocks/commerce.js.map +1 -1
  80. package/dist/blocks/data-display.js +1 -1
  81. package/dist/blocks/onboarding.js +6 -6
  82. package/dist/blocks/onboarding.js.map +1 -1
  83. package/dist/blocks/planning.js +88 -97
  84. package/dist/blocks/planning.js.map +1 -1
  85. package/dist/blocks/timelines.js +1 -1
  86. package/dist/{breadcrumbs-DdQ_I5ra.js → breadcrumbs-BG_FfMK4.js} +10 -9
  87. package/dist/breadcrumbs-BG_FfMK4.js.map +1 -0
  88. package/dist/button-BS3KDg00.js +674 -0
  89. package/dist/button-BS3KDg00.js.map +1 -0
  90. package/dist/{button-BS6l5JUw.js → button-R9CCoH7A.js} +3 -3
  91. package/dist/button-R9CCoH7A.js.map +1 -0
  92. package/dist/buttons-DS0ZIwJ_.js +99 -0
  93. package/dist/buttons-DS0ZIwJ_.js.map +1 -0
  94. package/dist/{cards-Cum56XOF.js → cards-QoJ4syG9.js} +12 -12
  95. package/dist/{cards-Cum56XOF.js.map → cards-QoJ4syG9.js.map} +1 -1
  96. package/dist/chart-DwYRKKc-.js +152 -0
  97. package/dist/chart-DwYRKKc-.js.map +1 -0
  98. package/dist/checkbox-B7ygNTYp.js +35 -0
  99. package/dist/checkbox-B7ygNTYp.js.map +1 -0
  100. package/dist/choice-inputs-DrJ17tpL.js +752 -0
  101. package/dist/choice-inputs-DrJ17tpL.js.map +1 -0
  102. package/dist/{code-block-xHKbAJDj.js → code-block-CD0B7M93.js} +27 -27
  103. package/dist/code-block-CD0B7M93.js.map +1 -0
  104. package/dist/{collapsible-DsnktFNv.js → collapsible-oMUGM4tr.js} +3 -3
  105. package/dist/{collapsible-DsnktFNv.js.map → collapsible-oMUGM4tr.js.map} +1 -1
  106. package/dist/{collection-content-C4fthJV_.js → collection-content-Ys-OZOkY.js} +3 -3
  107. package/dist/{collection-content-C4fthJV_.js.map → collection-content-Ys-OZOkY.js.map} +1 -1
  108. package/dist/combobox-6dvVny2q.js +272 -0
  109. package/dist/combobox-6dvVny2q.js.map +1 -0
  110. package/dist/combobox-CB7039j7.js +865 -0
  111. package/dist/combobox-CB7039j7.js.map +1 -0
  112. package/dist/{command-C0xe7u9B.js → command-kPMPjIxJ.js} +35 -31
  113. package/dist/command-kPMPjIxJ.js.map +1 -0
  114. package/dist/{comments-DviPLnwy.js → comments-You0Bzbr.js} +434 -409
  115. package/dist/comments-You0Bzbr.js.map +1 -0
  116. package/dist/components/base/accordion/accordion-variants.d.ts +3 -3
  117. package/dist/components/base/action-menu/action-menu.d.ts +7 -2
  118. package/dist/components/base/avatar/stacked-avatars.d.ts +5 -4
  119. package/dist/components/base/badge/badge.d.ts +1 -1
  120. package/dist/components/base/badge/badge.recipes.d.ts +4 -4
  121. package/dist/components/base/buttons/base-button.d.ts +7 -0
  122. package/dist/components/base/buttons/button-group.recipes.d.ts +2 -2
  123. package/dist/components/base/buttons/button.recipes.d.ts +10 -19
  124. package/dist/components/base/buttons/button.variants.d.ts +1 -0
  125. package/dist/components/base/buttons/loader-button.d.ts +3 -1
  126. package/dist/components/base/buttons/text-button.d.ts +2 -2
  127. package/dist/components/base/buttons/use-pending-button-focus.d.ts +3 -0
  128. package/dist/components/base/cards/card.recipes.d.ts +13 -5
  129. package/dist/components/base/cards/partials/card-primitives.d.ts +9 -4
  130. package/dist/components/base/cards/smart-card.types.d.ts +1 -1
  131. package/dist/components/base/carousel/carousel.d.ts +3 -1
  132. package/dist/components/base/chart/chart.d.ts +7 -7
  133. package/dist/components/base/choice-inputs/checkbox.d.ts +6 -7
  134. package/dist/components/base/choice-inputs/choice-types.d.ts +10 -1
  135. package/dist/components/base/choice-inputs/pill-radio-group.d.ts +9 -0
  136. package/dist/components/base/choice-inputs/select-popup.d.ts +9 -1
  137. package/dist/components/base/choice-inputs/switch-card.d.ts +1 -1
  138. package/dist/components/base/date-pickers/date-picker-field.d.ts +23 -0
  139. package/dist/components/base/date-pickers/date-picker.recipes.d.ts +5 -18
  140. package/dist/components/base/date-pickers/datepicker.types.d.ts +16 -3
  141. package/dist/components/base/display/alert-dialog.d.ts +8 -2
  142. package/dist/components/base/display/content-block.d.ts +4 -2
  143. package/dist/components/base/display/date-block.d.ts +1 -1
  144. package/dist/components/base/display/dialog.d.ts +12 -5
  145. package/dist/components/base/display/surface-title.d.ts +6 -1
  146. package/dist/components/base/feedback/alert.d.ts +1 -1
  147. package/dist/components/base/feedback/state-display.d.ts +5 -4
  148. package/dist/components/base/forms/form-field.d.ts +1 -0
  149. package/dist/components/base/forms/form-sizing.d.ts +35 -3
  150. package/dist/components/base/forms/workflow.d.ts +2 -0
  151. package/dist/components/base/forms-numeric/coordinates-input.d.ts +3 -0
  152. package/dist/components/base/forms-numeric/rounding-mode-select.d.ts +4 -1
  153. package/dist/components/base/navigation/dropdown-menu.d.ts +2 -2
  154. package/dist/components/base/navigation/language-switcher.d.ts +4 -1
  155. package/dist/components/base/navigation/overflow-tab-bar.d.ts +7 -0
  156. package/dist/components/base/navigation/page-header/page-header.d.ts +4 -1
  157. package/dist/components/base/navigation/tabs.d.ts +3 -5
  158. package/dist/components/base/popover/popover.recipes.d.ts +3 -3
  159. package/dist/components/base/qr-code/qr-code.d.ts +2 -0
  160. package/dist/components/base/sheet/index.d.ts +29 -1
  161. package/dist/components/base/sheet/sheet.d.ts +14 -5
  162. package/dist/components/base/spinner/spinner.d.ts +3 -2
  163. package/dist/components/base/structure/structure.types.d.ts +1 -1
  164. package/dist/components/base/table/index.d.ts +1 -1
  165. package/dist/components/base/text-inputs/clear-native-field.d.ts +2 -0
  166. package/dist/components/base/text-inputs/input-group.d.ts +2 -2
  167. package/dist/components/base/text-inputs/input-trailing-action.d.ts +3 -0
  168. package/dist/components/base/upload/upload.recipes.d.ts +11 -0
  169. package/dist/components/base/value-inputs/date-time-input.d.ts +4 -2
  170. package/dist/components/base/value-inputs/tags-input.d.ts +2 -0
  171. package/dist/components/blocks/admin/api-key-list/api-key-list.types.d.ts +1 -1
  172. package/dist/components/blocks/analytics/format-metric-value.d.ts +11 -1
  173. package/dist/components/blocks/analytics/index.d.ts +1 -1
  174. package/dist/components/blocks/analytics/types.d.ts +1 -1
  175. package/dist/components/blocks/analytics/use-metric-format-options.d.ts +3 -0
  176. package/dist/components/blocks/collaboration/message/message.recipes.d.ts +12 -0
  177. package/dist/components/blocks/commerce/address-card/address-card.d.ts +1 -1
  178. package/dist/components/blocks/commerce/address-card/types.d.ts +3 -1
  179. package/dist/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.d.ts +4 -0
  180. package/dist/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.types.d.ts +2 -2
  181. package/dist/components/blocks/commerce/discount-stack/types.d.ts +1 -1
  182. package/dist/components/blocks/commerce/inventory-section/types.d.ts +4 -1
  183. package/dist/components/blocks/commerce/loyalty-points/types.d.ts +1 -1
  184. package/dist/components/blocks/commerce/order-status/types.d.ts +4 -0
  185. package/dist/components/blocks/commerce/payment-method/payment-method.d.ts +1 -1
  186. package/dist/components/blocks/commerce/payment-method/types.d.ts +3 -1
  187. package/dist/components/blocks/commerce/seo-listing/seo-listing-card.d.ts +1 -1
  188. package/dist/components/blocks/commerce/seo-listing/types.d.ts +3 -1
  189. package/dist/components/blocks/commerce/vendor-profile/types.d.ts +4 -1
  190. package/dist/components/blocks/data-display/dense-info-card/dense-info.strings.d.ts +4 -1
  191. package/dist/components/blocks/data-display/empty-state/partials/illustrations/document-stack.d.ts +1 -4
  192. package/dist/components/blocks/data-display/empty-state/partials/illustrations/inbox-clean.d.ts +1 -4
  193. package/dist/components/blocks/data-display/empty-state/partials/illustrations/index.d.ts +3 -3
  194. package/dist/components/blocks/data-display/empty-state/partials/illustrations/stacked-cards.d.ts +1 -6
  195. package/dist/components/blocks/data-display/inline-stat/inline-stat.d.ts +4 -1
  196. package/dist/components/features/combobox/components/error-message.d.ts +1 -1
  197. package/dist/components/features/comments/hooks/use-attachment-upload.d.ts +5 -0
  198. package/dist/components/features/filters/facets/search-facet.d.ts +0 -12
  199. package/dist/components/features/filters/facets/tags-facet.d.ts +1 -1
  200. package/dist/components/features/global-search/partials/global-search-idle-state.d.ts +1 -1
  201. package/dist/components/features/media-library/media-library.d.ts +1 -1
  202. package/dist/components/features/media-library/media-library.types.d.ts +9 -1
  203. package/dist/components/features/media-library/partials/media-library-partials.d.ts +1 -1
  204. package/dist/components/features/overlays/alert-dialog.d.ts +1 -1
  205. package/dist/components/features/overlays/drawer.d.ts +1 -1
  206. package/dist/components/features/overlays/hooks/use-overlay-actions.d.ts +2 -2
  207. package/dist/components/features/overlays/hooks/use-overlay-visibility.d.ts +11 -4
  208. package/dist/components/features/overlays/hooks/use-pending-overlay-focus.d.ts +2 -0
  209. package/dist/components/features/overlays/overlay-tone-icon.d.ts +37 -0
  210. package/dist/components/features/overlays/overlays.types.d.ts +46 -22
  211. package/dist/components/features/products/components/product-variants-manager.d.ts +1 -1
  212. package/dist/components/features/products/partials/index.d.ts +1 -1
  213. package/dist/components/features/products/partials/product-metric-tile.d.ts +6 -0
  214. package/dist/components/features/products/partials/product-tone.d.ts +11 -1
  215. package/dist/components/features/products/products.types.d.ts +2 -1
  216. package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +2 -1
  217. package/dist/components/features/table/data-table.d.ts +1 -1
  218. package/dist/components/features/table/partials/cell-renderers.d.ts +1 -1
  219. package/dist/components/features/table/table.types.d.ts +1 -1
  220. package/dist/components/features/theme-tweaker/theme-provider-settings.d.ts +3 -1
  221. package/dist/components/layout/auth/auth.types.d.ts +1 -0
  222. package/dist/components/layout/page/index.d.ts +1 -1
  223. package/dist/components/layout/page/page.d.ts +0 -1
  224. package/dist/components/layout/page/page.types.d.ts +62 -6
  225. package/dist/components/layout/page/partials/page-header-commands.d.ts +13 -0
  226. package/dist/components/layout/page/partials/page-header.d.ts +1 -1
  227. package/dist/components/layout/sidebar/sidebar.context.d.ts +1 -1
  228. package/dist/components/layout/sidebar/sidebar.types.d.ts +4 -0
  229. package/dist/components/layout/workspace/workspace.types.d.ts +3 -0
  230. package/dist/components/primitives/date.d.ts +16 -3
  231. package/dist/components/primitives/dimensions.d.ts +6 -0
  232. package/dist/components/primitives/duration.d.ts +6 -0
  233. package/dist/components/primitives/file-size.d.ts +6 -0
  234. package/dist/components/primitives/index.d.ts +1 -1
  235. package/dist/components/primitives/initials.d.ts +11 -2
  236. package/dist/components/primitives/link.d.ts +7 -0
  237. package/dist/components/primitives/money.d.ts +29 -7
  238. package/dist/components/primitives/number.d.ts +17 -0
  239. package/dist/components/primitives/value-typography.d.ts +54 -0
  240. package/dist/components/primitives/value.d.ts +31 -6
  241. package/dist/components/typography/heading.d.ts +13 -2
  242. package/dist/components/typography/index.d.ts +1 -1
  243. package/dist/components/typography/label.d.ts +3 -0
  244. package/dist/components/typography/running-text.d.ts +12 -0
  245. package/dist/components/typography/text-link.d.ts +23 -1
  246. package/dist/components/typography/text.d.ts +12 -0
  247. package/dist/components/typography/text.styles.d.ts +37 -5
  248. package/dist/components/ui/button.d.ts +1 -1
  249. package/dist/components/ui/checkbox.d.ts +5 -0
  250. package/dist/components/ui/overlay.recipes.d.ts +15 -2
  251. package/dist/components/ui/popover.d.ts +1 -1
  252. package/dist/components/ui/select.d.ts +3 -1
  253. package/dist/components/ui/sidebar.d.ts +1 -1
  254. package/dist/components/ui/switch.d.ts +5 -0
  255. package/dist/components/ui/table.d.ts +2 -1
  256. package/dist/container.recipes-D9t8MHR3.js +27 -0
  257. package/dist/container.recipes-D9t8MHR3.js.map +1 -0
  258. package/dist/{containers-6s-ucRQQ.js → containers-D_L4mTVb.js} +34 -57
  259. package/dist/containers-D_L4mTVb.js.map +1 -0
  260. package/dist/control-group-recipes-DBXmfh2E.js +21 -0
  261. package/dist/control-group-recipes-DBXmfh2E.js.map +1 -0
  262. package/dist/{copyable-B7SBXJMr.js → copyable-DDjTeW_j.js} +6 -6
  263. package/dist/{copyable-B7SBXJMr.js.map → copyable-DDjTeW_j.js.map} +1 -1
  264. package/dist/data-display-3xWQUnMA.js +1335 -0
  265. package/dist/data-display-3xWQUnMA.js.map +1 -0
  266. package/dist/date-picker-DrDFj8Lo.js +1527 -0
  267. package/dist/date-picker-DrDFj8Lo.js.map +1 -0
  268. package/dist/date-pickers-CnFCb0n2.js +174 -0
  269. package/dist/date-pickers-CnFCb0n2.js.map +1 -0
  270. package/dist/date-uf3z37Nm.js +144 -0
  271. package/dist/date-uf3z37Nm.js.map +1 -0
  272. package/dist/{display-CFM5myut.js → display-DrdvPwF0.js} +25 -25
  273. package/dist/display-DrdvPwF0.js.map +1 -0
  274. package/dist/{dropdown-menu-BlnyHr-9.js → dropdown-menu-CURh59jb.js} +22 -15
  275. package/dist/dropdown-menu-CURh59jb.js.map +1 -0
  276. package/dist/features/activities.js +177 -163
  277. package/dist/features/activities.js.map +1 -1
  278. package/dist/features/ai-chat.js +187 -183
  279. package/dist/features/ai-chat.js.map +1 -1
  280. package/dist/features/async-preview.js +9 -9
  281. package/dist/features/async-preview.js.map +1 -1
  282. package/dist/features/combobox.js +1 -1
  283. package/dist/features/comments.js +1 -1
  284. package/dist/features/data-view.js +25 -23
  285. package/dist/features/data-view.js.map +1 -1
  286. package/dist/features/email-composer/engine.js +1 -1
  287. package/dist/features/email-composer.js +353 -355
  288. package/dist/features/email-composer.js.map +1 -1
  289. package/dist/features/event-calendar.js +346 -354
  290. package/dist/features/event-calendar.js.map +1 -1
  291. package/dist/features/filters.js +1 -1
  292. package/dist/features/global-search.js +225 -227
  293. package/dist/features/global-search.js.map +1 -1
  294. package/dist/features/kanban.js +29 -29
  295. package/dist/features/kanban.js.map +1 -1
  296. package/dist/features/map.js +59 -58
  297. package/dist/features/map.js.map +1 -1
  298. package/dist/features/media-library.js +898 -900
  299. package/dist/features/media-library.js.map +1 -1
  300. package/dist/features/mentions.js +1 -1
  301. package/dist/features/overlays.js +1 -1
  302. package/dist/features/products.js +1412 -1444
  303. package/dist/features/products.js.map +1 -1
  304. package/dist/features/questionnaire.js +51 -49
  305. package/dist/features/questionnaire.js.map +1 -1
  306. package/dist/features/resource-assignment.js +103 -97
  307. package/dist/features/resource-assignment.js.map +1 -1
  308. package/dist/features/resource.js +13 -13
  309. package/dist/features/resource.js.map +1 -1
  310. package/dist/features/rich-text-editor.js +2 -2
  311. package/dist/features/schema-form.js +187 -183
  312. package/dist/features/schema-form.js.map +1 -1
  313. package/dist/features/suggestions.js +3 -3
  314. package/dist/features/sync.js +7 -7
  315. package/dist/features/sync.js.map +1 -1
  316. package/dist/features/table.js +1 -1
  317. package/dist/features/theme-tweaker.js +508 -503
  318. package/dist/features/theme-tweaker.js.map +1 -1
  319. package/dist/{feedback-DWUkgEjR.js → feedback-C7nR0UtT.js} +30 -31
  320. package/dist/feedback-C7nR0UtT.js.map +1 -0
  321. package/dist/field-affordance-recipes-CkOCdE2y.js +46 -0
  322. package/dist/field-affordance-recipes-CkOCdE2y.js.map +1 -0
  323. package/dist/{field-state-recipes-CBTRt9Bt.js → field-state-recipes-C-MFBX_8.js} +5 -5
  324. package/dist/field-state-recipes-C-MFBX_8.js.map +1 -0
  325. package/dist/{filters-BhsUtsxW.js → filters-Da-gNPsE.js} +760 -765
  326. package/dist/filters-Da-gNPsE.js.map +1 -0
  327. package/dist/{form-field-Bn7ZH1rA.js → form-field-VZRULhUK.js} +20 -12
  328. package/dist/form-field-VZRULhUK.js.map +1 -0
  329. package/dist/form-sizing-uWP4lzVh.js +126 -0
  330. package/dist/form-sizing-uWP4lzVh.js.map +1 -0
  331. package/dist/{forms-B7pzS25o.js → forms-DDeEnXSY.js} +38 -38
  332. package/dist/forms-DDeEnXSY.js.map +1 -0
  333. package/dist/forms-numeric-D3CO60IF.js +905 -0
  334. package/dist/forms-numeric-D3CO60IF.js.map +1 -0
  335. package/dist/{header-C59QZyxV.js → header-2ycNqGOR.js} +42 -37
  336. package/dist/header-2ycNqGOR.js.map +1 -0
  337. package/dist/{hooks-CM1Vp9Pe.js → hooks-DQ5SPwZw.js} +2 -2
  338. package/dist/{hooks-CM1Vp9Pe.js.map → hooks-DQ5SPwZw.js.map} +1 -1
  339. package/dist/{http-CLTVJc5I.js → http-CdEIHyQf.js} +2 -2
  340. package/dist/http-CdEIHyQf.js.map +1 -0
  341. package/dist/{icon-badge-Dv0RYQwj.js → icon-badge-DKlaKXoo.js} +4 -4
  342. package/dist/{icon-badge-Dv0RYQwj.js.map → icon-badge-DKlaKXoo.js.map} +1 -1
  343. package/dist/index.js +2 -2
  344. package/dist/input-BoLm9Hks.js +20 -0
  345. package/dist/input-BoLm9Hks.js.map +1 -0
  346. package/dist/input-DhQdBnV3.js +255 -0
  347. package/dist/input-DhQdBnV3.js.map +1 -0
  348. package/dist/item-xzh8Df65.js +264 -0
  349. package/dist/item-xzh8Df65.js.map +1 -0
  350. package/dist/layout/app-shell.js +1 -1
  351. package/dist/layout/auth.js +1 -1
  352. package/dist/layout/containers.js +1 -1
  353. package/dist/layout/header.js +1 -1
  354. package/dist/layout/hooks.js +1 -1
  355. package/dist/layout/navigation.js +1 -1
  356. package/dist/layout/page.js +1 -1
  357. package/dist/layout/settings.js +1 -1
  358. package/dist/layout/sidebar.js +2 -2
  359. package/dist/layout/workspace.js +1 -1
  360. package/dist/layout.js +10 -10
  361. package/dist/lib/affordance-geometry.generated.d.ts +46 -10
  362. package/dist/lib/control-group-recipes.d.ts +22 -0
  363. package/dist/lib/field-affordance-recipes.d.ts +70 -2
  364. package/dist/lib/field-state-recipes.d.ts +6 -4
  365. package/dist/lib/format.d.ts +9 -0
  366. package/dist/lib/money-format.d.ts +30 -0
  367. package/dist/lib/navigation-row-recipes.d.ts +3 -2
  368. package/dist/lib/overlay-anatomy-recipes.d.ts +2 -2
  369. package/dist/lib/surface-recipes.d.ts +13 -8
  370. package/dist/lib/token-merge.generated.d.ts +144 -2
  371. package/dist/lib/track-recipes.d.ts +1 -1
  372. package/dist/lib/ui-provider/provider.d.ts +7 -2
  373. package/dist/lib/ui-provider/store.d.ts +6 -2
  374. package/dist/lib/ui-provider/types.d.ts +9 -4
  375. package/dist/lib/use-prefers-reduced-motion.d.ts +2 -0
  376. package/dist/lib/utils.js +1 -1
  377. package/dist/media-gallery-DQUQ0m3O.js +201 -0
  378. package/dist/media-gallery-DQUQ0m3O.js.map +1 -0
  379. package/dist/{mentions-B8Ko-fhS.js → mentions-DwnO1hh4.js} +40 -39
  380. package/dist/{mentions-B8Ko-fhS.js.map → mentions-DwnO1hh4.js.map} +1 -1
  381. package/dist/message-YfFmbXNP.js +127 -0
  382. package/dist/message-YfFmbXNP.js.map +1 -0
  383. package/dist/{navigation-BUIn2Qxx.js → navigation-Cbp5V8gG.js} +27 -28
  384. package/dist/navigation-Cbp5V8gG.js.map +1 -0
  385. package/dist/navigation-Cs1npsPm.js +300 -0
  386. package/dist/navigation-Cs1npsPm.js.map +1 -0
  387. package/dist/{navigation-row-recipes-GVh11KiT.js → navigation-row-recipes-DlU-4QYO.js} +3 -3
  388. package/dist/navigation-row-recipes-DlU-4QYO.js.map +1 -0
  389. package/dist/number-CKRBYmZK.js +352 -0
  390. package/dist/number-CKRBYmZK.js.map +1 -0
  391. package/dist/overlay.recipes-CNO2S9V6.js +34 -0
  392. package/dist/overlay.recipes-CNO2S9V6.js.map +1 -0
  393. package/dist/overlays-DhZO7N-I.js +994 -0
  394. package/dist/overlays-DhZO7N-I.js.map +1 -0
  395. package/dist/page-C6R_8jFt.js +325 -0
  396. package/dist/page-C6R_8jFt.js.map +1 -0
  397. package/dist/{page-header-DQRa0jug.js → page-header-hUTzcRZX.js} +12 -12
  398. package/dist/page-header-hUTzcRZX.js.map +1 -0
  399. package/dist/{pagination-C29vvt3I.js → pagination-Cm0jqa3I.js} +21 -21
  400. package/dist/pagination-Cm0jqa3I.js.map +1 -0
  401. package/dist/{popover-CoLDEg19.js → popover-Dcv_9jxr.js} +23 -22
  402. package/dist/popover-Dcv_9jxr.js.map +1 -0
  403. package/dist/{popover-menu-GLIQTJTx.js → popover-menu-DnRFKnHP.js} +6 -6
  404. package/dist/{popover-menu-GLIQTJTx.js.map → popover-menu-DnRFKnHP.js.map} +1 -1
  405. package/dist/{popover.recipes-zgBhMlUu.js → popover.recipes-wmbvL8Ah.js} +5 -5
  406. package/dist/popover.recipes-wmbvL8Ah.js.map +1 -0
  407. package/dist/primitives-BHrwQXFC.js +379 -0
  408. package/dist/primitives-BHrwQXFC.js.map +1 -0
  409. package/dist/primitives.js +5 -5
  410. package/dist/{progress-BOe8l_FZ.js → progress-Br9WTFya.js} +12 -11
  411. package/dist/progress-Br9WTFya.js.map +1 -0
  412. package/dist/{receipt-BM8xsGFy.js → receipt-CV89q1fs.js} +8 -8
  413. package/dist/{receipt-BM8xsGFy.js.map → receipt-CV89q1fs.js.map} +1 -1
  414. package/dist/rich-text-editor-CF8QYt5p.js +574 -0
  415. package/dist/rich-text-editor-CF8QYt5p.js.map +1 -0
  416. package/dist/{rich-text-editor.recipes-DxvOE0Lp.js → rich-text-editor.recipes-CnrbmTS1.js} +35 -26
  417. package/dist/rich-text-editor.recipes-CnrbmTS1.js.map +1 -0
  418. package/dist/{rich-text-B7sBAdDG.js → rich-text-j-FGAeZW.js} +4 -4
  419. package/dist/{rich-text-B7sBAdDG.js.map → rich-text-j-FGAeZW.js.map} +1 -1
  420. package/dist/{scroll-area-BheMQ270.js → scroll-area-DRdr16Pt.js} +3 -3
  421. package/dist/scroll-area-DRdr16Pt.js.map +1 -0
  422. package/dist/{separator-DO0EbCEm.js → separator-BMEvwnSX.js} +2 -2
  423. package/dist/{separator-DO0EbCEm.js.map → separator-BMEvwnSX.js.map} +1 -1
  424. package/dist/{separator-Gk_WXH-l.js → separator-Do5GWDYi.js} +4 -4
  425. package/dist/separator-Do5GWDYi.js.map +1 -0
  426. package/dist/services/actions/action-adapters.d.ts +4 -0
  427. package/dist/services/actions.js +8 -3
  428. package/dist/services/actions.js.map +1 -1
  429. package/dist/{settings-BnCyyPOJ.js → settings-DHk0L2MF.js} +20 -19
  430. package/dist/settings-DHk0L2MF.js.map +1 -0
  431. package/dist/sheet-DRFNY1_D.js +207 -0
  432. package/dist/sheet-DRFNY1_D.js.map +1 -0
  433. package/dist/sidebar-Cb8WzOvE.js +511 -0
  434. package/dist/sidebar-Cb8WzOvE.js.map +1 -0
  435. package/dist/{sidebar-DPR7fmqN.js → sidebar-Crc9M9JV.js} +220 -201
  436. package/dist/sidebar-Crc9M9JV.js.map +1 -0
  437. package/dist/{skeleton-CmT1ppqb.js → skeleton-DVMXr15h.js} +5 -5
  438. package/dist/{skeleton-CmT1ppqb.js.map → skeleton-DVMXr15h.js.map} +1 -1
  439. package/dist/smart-card-Bek-TwUp.js +599 -0
  440. package/dist/smart-card-Bek-TwUp.js.map +1 -0
  441. package/dist/{spinner-BY9HbUEh.js → spinner-CmTAbEp0.js} +8 -6
  442. package/dist/spinner-CmTAbEp0.js.map +1 -0
  443. package/dist/{structure-MvKVq-oL.js → structure-hzCW-XsV.js} +3 -3
  444. package/dist/{structure-MvKVq-oL.js.map → structure-hzCW-XsV.js.map} +1 -1
  445. package/dist/{structure.recipes-Bqhf9oIh.js → structure.recipes-EPz60cU8.js} +37 -19
  446. package/dist/structure.recipes-EPz60cU8.js.map +1 -0
  447. package/dist/style.css +1 -1
  448. package/dist/surface-recipes-DOdoBXGm.js +28 -0
  449. package/dist/surface-recipes-DOdoBXGm.js.map +1 -0
  450. package/dist/table-D6zKeYQX.js +162 -0
  451. package/dist/table-D6zKeYQX.js.map +1 -0
  452. package/dist/table-Dn4XSrSB.js +1444 -0
  453. package/dist/table-Dn4XSrSB.js.map +1 -0
  454. package/dist/tabs-Dk8E_knt.js +189 -0
  455. package/dist/tabs-Dk8E_knt.js.map +1 -0
  456. package/dist/text-inputs-BFpku0Qd.js +331 -0
  457. package/dist/text-inputs-BFpku0Qd.js.map +1 -0
  458. package/dist/{text.styles-BwB7vAF2.js → text.styles-g4He6UIW.js} +26 -15
  459. package/dist/text.styles-g4He6UIW.js.map +1 -0
  460. package/dist/theme.css +90 -124
  461. package/dist/themes/green.css +24 -0
  462. package/dist/{timelines-B9ICkQcV.js → timelines-CxuAFIc2.js} +97 -104
  463. package/dist/timelines-CxuAFIc2.js.map +1 -0
  464. package/dist/track-recipes-CDcKmndW.js +10 -0
  465. package/dist/track-recipes-CDcKmndW.js.map +1 -0
  466. package/dist/{tree-BdWSaoFT.js → tree-BotPlyiD.js} +13 -13
  467. package/dist/{tree-BdWSaoFT.js.map → tree-BotPlyiD.js.map} +1 -1
  468. package/dist/typography/rich-text.js +1 -1
  469. package/dist/typography-CAr3dQhX.js +116 -0
  470. package/dist/typography-CAr3dQhX.js.map +1 -0
  471. package/dist/typography.js +2 -2
  472. package/dist/{ui-provider-CftIB6TY.js → ui-provider-D2_TeLqw.js} +22 -22
  473. package/dist/ui-provider-D2_TeLqw.js.map +1 -0
  474. package/dist/ui-provider.js +1 -1
  475. package/dist/{upload-D8Za5x_c.js → upload-B0WHW7ak.js} +278 -274
  476. package/dist/upload-B0WHW7ak.js.map +1 -0
  477. package/dist/{upload-queue-hIIYBLS7.js → upload-queue-BHZ_wBfd.js} +72 -75
  478. package/dist/upload-queue-BHZ_wBfd.js.map +1 -0
  479. package/dist/{usage-card-DnmnJ58D.js → usage-card-U0YBLTNT.js} +31 -33
  480. package/dist/usage-card-U0YBLTNT.js.map +1 -0
  481. package/dist/utils-Cospvlj1.js +4445 -0
  482. package/dist/utils-Cospvlj1.js.map +1 -0
  483. package/dist/value-inputs-CjfzGMsN.js +854 -0
  484. package/dist/value-inputs-CjfzGMsN.js.map +1 -0
  485. package/dist/value-typography-Deb3yQZg.js +116 -0
  486. package/dist/value-typography-Deb3yQZg.js.map +1 -0
  487. package/dist/{workspace-C1PZmk8L.js → workspace-YoFjXi6i.js} +97 -105
  488. package/dist/workspace-YoFjXi6i.js.map +1 -0
  489. package/docs/consumer-skill/SKILL.md +123 -119
  490. package/docs/consumer-skill/examples/analytics.tsx +34 -0
  491. package/docs/consumer-skill/examples/app-layout.tsx +42 -14
  492. package/docs/consumer-skill/examples/detail.tsx +20 -5
  493. package/docs/consumer-skill/examples/edit.tsx +1 -1
  494. package/docs/consumer-skill/examples/layout-blocks.tsx +20 -0
  495. package/docs/consumer-skill/examples/manifest.json +37 -3
  496. package/docs/consumer-skill/examples/scoped-directory.tsx +2 -2
  497. package/docs/consumer-skill/examples/website.tsx +56 -0
  498. package/docs/consumer-skill/references/analytics.md +70 -0
  499. package/docs/consumer-skill/references/composition.md +195 -9
  500. package/docs/consumer-skill/references/design-contract.md +33 -7
  501. package/docs/consumer-skill/references/discovery.md +80 -5
  502. package/docs/consumer-skill/references/installation.md +22 -0
  503. package/docs/consumer-skill/references/integration.md +46 -1
  504. package/docs/consumer-skill/references/public-api.json +2083 -237
  505. package/docs/consumer-skill/references/review.md +74 -6
  506. package/docs/consumer-skill/references/theming.md +59 -8
  507. package/docs/consumer-skill/references/tokens.json +180 -9
  508. package/docs/consumer-skill/references/workflows.md +34 -0
  509. package/docs/consumer-skill/scripts/check-composition.mjs +1 -1
  510. package/docs/consumer-skill/scripts/composition-policy.mjs +271 -18
  511. package/docs/consumer-skill/scripts/discovery.mjs +69 -9
  512. package/docs/consumer-skill/scripts/pin-button-defaults.mjs +95 -0
  513. package/docs/consumer-skill/scripts/surface-policy.mjs +44 -0
  514. package/package.json +11 -6
  515. package/dist/accordion-B-5Focs8.js.map +0 -1
  516. package/dist/action-menu-Cx3SdfbN.js +0 -265
  517. package/dist/action-menu-Cx3SdfbN.js.map +0 -1
  518. package/dist/affordance-geometry.generated-D8Jcfb0G.js +0 -32
  519. package/dist/affordance-geometry.generated-D8Jcfb0G.js.map +0 -1
  520. package/dist/ai-artifact-B5tPpXnS.js.map +0 -1
  521. package/dist/app-shell-at8Kt4l_.js.map +0 -1
  522. package/dist/attachment-BO2R47wn.js.map +0 -1
  523. package/dist/auth-OFwWSAap.js +0 -704
  524. package/dist/auth-OFwWSAap.js.map +0 -1
  525. package/dist/avatar-Bpzty83c.js.map +0 -1
  526. package/dist/badge-BZXZT9wd.js.map +0 -1
  527. package/dist/breadcrumbs-DdQ_I5ra.js.map +0 -1
  528. package/dist/button-BS6l5JUw.js.map +0 -1
  529. package/dist/buttons-Co6GavvM.js +0 -674
  530. package/dist/buttons-Co6GavvM.js.map +0 -1
  531. package/dist/chart-DVfcwQu6.js +0 -149
  532. package/dist/chart-DVfcwQu6.js.map +0 -1
  533. package/dist/checkbox-BavDRjF7.js +0 -34
  534. package/dist/checkbox-BavDRjF7.js.map +0 -1
  535. package/dist/choice-inputs-CC7XqPQO.js +0 -619
  536. package/dist/choice-inputs-CC7XqPQO.js.map +0 -1
  537. package/dist/code-block-xHKbAJDj.js.map +0 -1
  538. package/dist/combobox-DEbdr-3u.js +0 -273
  539. package/dist/combobox-DEbdr-3u.js.map +0 -1
  540. package/dist/combobox-xv3yJbzl.js +0 -850
  541. package/dist/combobox-xv3yJbzl.js.map +0 -1
  542. package/dist/command-C0xe7u9B.js.map +0 -1
  543. package/dist/comments-DviPLnwy.js.map +0 -1
  544. package/dist/containers-6s-ucRQQ.js.map +0 -1
  545. package/dist/data-display-cWIRdeaf.js +0 -1129
  546. package/dist/data-display-cWIRdeaf.js.map +0 -1
  547. package/dist/date-BFNMnrS5.js +0 -140
  548. package/dist/date-BFNMnrS5.js.map +0 -1
  549. package/dist/date-picker-CA6ogMQB.js +0 -1521
  550. package/dist/date-picker-CA6ogMQB.js.map +0 -1
  551. package/dist/date-pickers-BPIKLdsD.js +0 -224
  552. package/dist/date-pickers-BPIKLdsD.js.map +0 -1
  553. package/dist/display-CFM5myut.js.map +0 -1
  554. package/dist/dropdown-menu-BlnyHr-9.js.map +0 -1
  555. package/dist/feedback-DWUkgEjR.js.map +0 -1
  556. package/dist/field-affordance-recipes-IjzPrCTw.js +0 -17
  557. package/dist/field-affordance-recipes-IjzPrCTw.js.map +0 -1
  558. package/dist/field-state-recipes-CBTRt9Bt.js.map +0 -1
  559. package/dist/filters-BhsUtsxW.js.map +0 -1
  560. package/dist/form-field-Bn7ZH1rA.js.map +0 -1
  561. package/dist/form-sizing-BWs70_a2.js +0 -100
  562. package/dist/form-sizing-BWs70_a2.js.map +0 -1
  563. package/dist/format-iamDSqs2.js +0 -110
  564. package/dist/format-iamDSqs2.js.map +0 -1
  565. package/dist/forms-B7pzS25o.js.map +0 -1
  566. package/dist/forms-numeric-BUBxELBv.js +0 -867
  567. package/dist/forms-numeric-BUBxELBv.js.map +0 -1
  568. package/dist/header-C59QZyxV.js.map +0 -1
  569. package/dist/http-CLTVJc5I.js.map +0 -1
  570. package/dist/input-WwYQZJzG.js +0 -202
  571. package/dist/input-WwYQZJzG.js.map +0 -1
  572. package/dist/input-ci9fIgFH.js +0 -20
  573. package/dist/input-ci9fIgFH.js.map +0 -1
  574. package/dist/item-pJ0GsOiJ.js +0 -257
  575. package/dist/item-pJ0GsOiJ.js.map +0 -1
  576. package/dist/media-gallery-DhDRgnVZ.js +0 -200
  577. package/dist/media-gallery-DhDRgnVZ.js.map +0 -1
  578. package/dist/message-COsdEvXT.js +0 -108
  579. package/dist/message-COsdEvXT.js.map +0 -1
  580. package/dist/navigation-BUIn2Qxx.js.map +0 -1
  581. package/dist/navigation-DBEu4POU.js +0 -267
  582. package/dist/navigation-DBEu4POU.js.map +0 -1
  583. package/dist/navigation-row-recipes-GVh11KiT.js.map +0 -1
  584. package/dist/number-BNT_BIzJ.js +0 -269
  585. package/dist/number-BNT_BIzJ.js.map +0 -1
  586. package/dist/overlay.recipes-BxW5FIfK.js +0 -6
  587. package/dist/overlay.recipes-BxW5FIfK.js.map +0 -1
  588. package/dist/overlays-B11wZka6.js +0 -982
  589. package/dist/overlays-B11wZka6.js.map +0 -1
  590. package/dist/page-BV6ioQg3.js +0 -202
  591. package/dist/page-BV6ioQg3.js.map +0 -1
  592. package/dist/page-header-DQRa0jug.js.map +0 -1
  593. package/dist/pagination-C29vvt3I.js.map +0 -1
  594. package/dist/popover-CoLDEg19.js.map +0 -1
  595. package/dist/popover.recipes-zgBhMlUu.js.map +0 -1
  596. package/dist/primitives-DKPOGVpj.js +0 -330
  597. package/dist/primitives-DKPOGVpj.js.map +0 -1
  598. package/dist/progress-BOe8l_FZ.js.map +0 -1
  599. package/dist/rich-text-editor-CoVrTiSv.js +0 -575
  600. package/dist/rich-text-editor-CoVrTiSv.js.map +0 -1
  601. package/dist/rich-text-editor.recipes-DxvOE0Lp.js.map +0 -1
  602. package/dist/scroll-area-BheMQ270.js.map +0 -1
  603. package/dist/select-B2mb-qN2.js +0 -108
  604. package/dist/select-B2mb-qN2.js.map +0 -1
  605. package/dist/separator-Gk_WXH-l.js.map +0 -1
  606. package/dist/settings-BnCyyPOJ.js.map +0 -1
  607. package/dist/sheet-B-q914Ad.js +0 -205
  608. package/dist/sheet-B-q914Ad.js.map +0 -1
  609. package/dist/sidebar-C_2p3Tfj.js +0 -501
  610. package/dist/sidebar-C_2p3Tfj.js.map +0 -1
  611. package/dist/sidebar-DPR7fmqN.js.map +0 -1
  612. package/dist/smart-card-CYLn46e6.js +0 -578
  613. package/dist/smart-card-CYLn46e6.js.map +0 -1
  614. package/dist/spinner-BY9HbUEh.js.map +0 -1
  615. package/dist/structure.recipes-Bqhf9oIh.js.map +0 -1
  616. package/dist/surface-recipes-CQfRr-VL.js +0 -27
  617. package/dist/surface-recipes-CQfRr-VL.js.map +0 -1
  618. package/dist/table-BS39xnlq.js +0 -1424
  619. package/dist/table-BS39xnlq.js.map +0 -1
  620. package/dist/table-DnlAJ-xR.js +0 -146
  621. package/dist/table-DnlAJ-xR.js.map +0 -1
  622. package/dist/tabs-B5cNMWiP.js +0 -187
  623. package/dist/tabs-B5cNMWiP.js.map +0 -1
  624. package/dist/text-inputs-Dh9XGyiS.js +0 -331
  625. package/dist/text-inputs-Dh9XGyiS.js.map +0 -1
  626. package/dist/text.styles-BwB7vAF2.js.map +0 -1
  627. package/dist/timelines-B9ICkQcV.js.map +0 -1
  628. package/dist/track-recipes-LLPNVwFg.js +0 -10
  629. package/dist/track-recipes-LLPNVwFg.js.map +0 -1
  630. package/dist/typography-Cv8MT-82.js +0 -96
  631. package/dist/typography-Cv8MT-82.js.map +0 -1
  632. package/dist/ui-provider-CftIB6TY.js.map +0 -1
  633. package/dist/upload-D8Za5x_c.js.map +0 -1
  634. package/dist/upload-queue-hIIYBLS7.js.map +0 -1
  635. package/dist/usage-card-DnmnJ58D.js.map +0 -1
  636. package/dist/utils-C2EKeIw3.js +0 -72
  637. package/dist/utils-C2EKeIw3.js.map +0 -1
  638. package/dist/value-inputs-DX2dbxjj.js +0 -824
  639. package/dist/value-inputs-DX2dbxjj.js.map +0 -1
  640. package/dist/workspace-C1PZmk8L.js.map +0 -1
@@ -0,0 +1,1444 @@
1
+ "use client";
2
+ import { _ as e, s as t } from "./ui-provider-D2_TeLqw.js";
3
+ import { t as n } from "./utils-Cospvlj1.js";
4
+ import { a as r, s as i, t as a } from "./typography-CAr3dQhX.js";
5
+ import { t as o } from "./button-BS3KDg00.js";
6
+ import { t as s } from "./structure-hzCW-XsV.js";
7
+ import { n as c, t as l } from "./action-menu-BTpyPWJ2.js";
8
+ import { _ as u, c as d, d as f, g as p, h as m, i as h, l as g, m as _, o as v, p as y, s as b } from "./primitives-BHrwQXFC.js";
9
+ import { t as x } from "./initials-format-CDoQEOd_.js";
10
+ import { n as S, r as C, t as w } from "./number-CKRBYmZK.js";
11
+ import { a as T, i as E, r as ee, s as D, t as O } from "./date-uf3z37Nm.js";
12
+ import { t as te } from "./badge-0tATj-tW.js";
13
+ import { t as ne } from "./separator-Do5GWDYi.js";
14
+ import { t as re } from "./input-DhQdBnV3.js";
15
+ import { t as ie } from "./checkbox-B7ygNTYp.js";
16
+ import { r as k, t as ae } from "./control-group-recipes-DBXmfh2E.js";
17
+ import { a as oe, c as se, i as ce, n as le, o as ue, r as de, s as A, t as fe } from "./pagination-Cm0jqa3I.js";
18
+ import { c as j, i as pe, n as me, o as M, s as he, t as ge } from "./table-D6zKeYQX.js";
19
+ import { l as _e } from "./data-display-3xWQUnMA.js";
20
+ import { createContext as ve, isValidElement as ye, useCallback as N, useContext as be, useEffect as P, useMemo as F, useRef as I, useState as L } from "react";
21
+ import { Fragment as xe, jsx as R, jsxs as z } from "react/jsx-runtime";
22
+ import { ArrowDown as Se, ArrowUp as Ce, Calendar as B, ChevronLeft as we, ChevronRight as V, ChevronsUpDown as Te, Mail as Ee, Maximize2 as De, Minimize2 as Oe, MoreHorizontal as ke, PackageOpen as Ae, Settings2 as je } from "lucide-react";
23
+ import { flexRender as H, getCoreRowModel as Me, getFilteredRowModel as Ne, getSortedRowModel as Pe, useReactTable as Fe } from "@tanstack/react-table";
24
+ //#region src/components/features/table/hooks.ts
25
+ var Ie = 300;
26
+ function U(e) {
27
+ return e ? e.querySelector("[data-slot=\"table-container\"]") : null;
28
+ }
29
+ function Le(e, t = {}) {
30
+ let { stepPx: n = Ie, deps: r = [] } = t, [i, a] = L(!1), [o, s] = L(!1), c = I(0), l = N(() => {
31
+ let t = U(e.current);
32
+ if (!t) {
33
+ a(!1), s(!1);
34
+ return;
35
+ }
36
+ let { scrollLeft: n, scrollWidth: r, clientWidth: i } = t;
37
+ a(n > 1), s(n + i < r - 1);
38
+ }, [e]);
39
+ P(() => {
40
+ let t, n = window.setTimeout(() => {
41
+ l();
42
+ let n = U(e.current);
43
+ if (!n) return;
44
+ let r = () => {
45
+ cancelAnimationFrame(c.current), c.current = requestAnimationFrame(l);
46
+ };
47
+ n.addEventListener("scroll", r, { passive: !0 });
48
+ let i = new ResizeObserver(l);
49
+ i.observe(n), n.firstElementChild && i.observe(n.firstElementChild), t = () => {
50
+ n.removeEventListener("scroll", r), cancelAnimationFrame(c.current), i.disconnect();
51
+ };
52
+ }, 0);
53
+ return () => {
54
+ window.clearTimeout(n), t?.();
55
+ };
56
+ }, [
57
+ e,
58
+ l,
59
+ ...r
60
+ ]);
61
+ let u = N((t) => {
62
+ U(e.current)?.scrollBy({
63
+ left: t,
64
+ behavior: "smooth"
65
+ });
66
+ }, [e]);
67
+ return {
68
+ canScrollLeft: i,
69
+ canScrollRight: o,
70
+ scrollBy: u,
71
+ scrollLeft: N(() => u(-n), [u, n]),
72
+ scrollRight: N(() => u(n), [u, n])
73
+ };
74
+ }
75
+ var Re = [
76
+ "a[href]",
77
+ "button:not([disabled])",
78
+ "input:not([disabled])",
79
+ "select:not([disabled])",
80
+ "textarea:not([disabled])",
81
+ "[tabindex]:not([tabindex=\"-1\"])"
82
+ ].join(",");
83
+ function ze(e, t, n) {
84
+ let r = I(n);
85
+ r.current = n, P(() => {
86
+ if (!e || typeof document > "u") return;
87
+ let n = document.activeElement, i = document.body.style.overflow;
88
+ document.body.style.overflow = "hidden";
89
+ let a = (e) => {
90
+ let n = t.current;
91
+ if (!n) return;
92
+ if (e.key === "Escape") {
93
+ e.preventDefault(), e.stopPropagation(), r.current();
94
+ return;
95
+ }
96
+ if (e.key !== "Tab") return;
97
+ let i = Array.from(n.querySelectorAll(Re)).filter((e) => e.offsetParent !== null || e === document.activeElement);
98
+ if (i.length === 0) return;
99
+ let a = i[0], o = i[i.length - 1], s = document.activeElement, c = s instanceof Node && n.contains(s);
100
+ e.shiftKey && (!c || s === a) ? (e.preventDefault(), o.focus()) : !e.shiftKey && (!c || s === o) && (e.preventDefault(), a.focus());
101
+ }, o = t.current;
102
+ return document.addEventListener("keydown", a, !0), () => {
103
+ document.removeEventListener("keydown", a, !0), document.body.style.overflow = i;
104
+ let e = document.activeElement;
105
+ (o && e instanceof Node && o.contains(e) || e === document.body) && n?.isConnected && n.focus();
106
+ };
107
+ }, [e, t]);
108
+ }
109
+ //#endregion
110
+ //#region src/components/features/table/table.strings.ts
111
+ var Be = (e) => {
112
+ let t = e.replace(/[_-]+/g, " ").replace(/\s+/g, " ").trim();
113
+ return t ? t.replace(/\b\w/g, (e) => e.toUpperCase()) : "Column";
114
+ }, W = {
115
+ emptyState: { message: "No results found." },
116
+ actions: {
117
+ triggerLabel: "Actions",
118
+ srLabel: "Row actions menu"
119
+ },
120
+ filter: {
121
+ searchPlaceholder: "Filter...",
122
+ columnsButton: "Columns"
123
+ },
124
+ columnVisibility: {
125
+ title: "Toggle columns",
126
+ triggerLabel: "Columns",
127
+ formatLabel: (e, t) => t && t.trim().length > 0 ? t : Be(e)
128
+ },
129
+ toolbar: {
130
+ scrollLeft: "Scroll left",
131
+ scrollRight: "Scroll right",
132
+ columns: "Toggle columns",
133
+ enterFullscreen: "Enter full screen",
134
+ exitFullscreen: "Exit full screen"
135
+ },
136
+ pagination: {
137
+ showing: "Showing",
138
+ to: "to",
139
+ of: "of",
140
+ entries: "results",
141
+ previous: "Previous",
142
+ next: "Next",
143
+ previousLabel: "Go to previous page",
144
+ nextLabel: "Go to next page",
145
+ morePages: "More pages",
146
+ page: "Page",
147
+ rowsPerPage: "Rows per page",
148
+ ariaLabel: "Pagination navigation"
149
+ },
150
+ selection: {
151
+ summary: (e, t) => `${e} of ${t} row${t === 1 ? "" : "s"} selected.`,
152
+ row: (e) => `Select row ${e + 1}`,
153
+ selectAll: "Select all rows",
154
+ clear: "Clear selection"
155
+ },
156
+ accessibility: {
157
+ scrollRegion: "Table scroll area",
158
+ fullscreenRegion: "Table, full screen"
159
+ }
160
+ }, G = (e, t) => ({
161
+ ...e,
162
+ ...t
163
+ }), Ve = (e) => e ? {
164
+ emptyState: G(W.emptyState, e.emptyState),
165
+ actions: G(W.actions, e.actions),
166
+ filter: G(W.filter, e.filter),
167
+ columnVisibility: G(W.columnVisibility, e.columnVisibility),
168
+ toolbar: G(W.toolbar, e.toolbar),
169
+ pagination: G(W.pagination, e.pagination),
170
+ selection: G(W.selection, e.selection),
171
+ accessibility: G(W.accessibility, e.accessibility)
172
+ } : W;
173
+ //#endregion
174
+ //#region src/components/features/table/pagination.tsx
175
+ function He(e, t) {
176
+ if (t <= 7) return Array.from({ length: t }, (e, t) => t + 1);
177
+ let n = [1];
178
+ e > 3 && n.push("ellipsis");
179
+ let r = Math.max(2, e - 1), i = Math.min(t - 1, e + 1);
180
+ for (let e = r; e <= i; e++) n.push(e);
181
+ return e < t - 2 && n.push("ellipsis"), n.push(t), n;
182
+ }
183
+ function Ue(e, t, n) {
184
+ let r = new URLSearchParams();
185
+ return r.set(n, String(t)), `${e}?${r.toString()}`;
186
+ }
187
+ function We({ pagination: e, onPageChange: t, labels: r = {}, pageQueryKey: i }) {
188
+ let a = {
189
+ ...W.pagination,
190
+ ...r
191
+ }, o = {
192
+ navigationLabel: a.ariaLabel,
193
+ previous: a.previous,
194
+ next: a.next,
195
+ previousLabel: a.previousLabel ?? se.previousLabel,
196
+ nextLabel: a.nextLabel ?? se.nextLabel,
197
+ morePages: a.morePages ?? se.morePages
198
+ }, s = i ?? "page", c = (e.current_page - 1) * e.per_page + 1, l = Math.min(e.current_page * e.per_page, e.total), u = N((n, r) => {
199
+ r && t?.(n, r, e.path || "");
200
+ }, [t, e.path]), d = e.prev_page_url !== null, f = e.next_page_url !== null, m = He(e.current_page, e.last_page);
201
+ return /* @__PURE__ */ z("div", {
202
+ className: n("pagination--component", "flex flex-col items-start gap-space-md px-surface py-row-y-lg sm:flex-row sm:items-center sm:justify-between sm:gap-0"),
203
+ children: [/* @__PURE__ */ z(p, {
204
+ size: "xs",
205
+ className: "tabular-nums tracking-tight",
206
+ children: [
207
+ /* @__PURE__ */ R(w, {
208
+ value: c,
209
+ size: "xs",
210
+ weight: "medium",
211
+ align: "left"
212
+ }),
213
+ "–",
214
+ /* @__PURE__ */ R(w, {
215
+ value: l,
216
+ size: "xs",
217
+ weight: "medium",
218
+ align: "left"
219
+ }),
220
+ " ",
221
+ a.of,
222
+ " ",
223
+ /* @__PURE__ */ R(w, {
224
+ value: e.total,
225
+ size: "xs",
226
+ weight: "medium",
227
+ align: "left"
228
+ }),
229
+ " ",
230
+ a.entries
231
+ ]
232
+ }), /* @__PURE__ */ R(A, {
233
+ strings: o,
234
+ className: "mx-0 w-full justify-start sm:w-auto sm:justify-center",
235
+ children: /* @__PURE__ */ z(fe, {
236
+ className: "gap-0 sm:gap-space-2xs",
237
+ children: [
238
+ /* @__PURE__ */ R(de, { children: /* @__PURE__ */ R(ue, {
239
+ text: a.previous,
240
+ href: "#",
241
+ onClick: (t) => {
242
+ t.preventDefault(), u(e.current_page - 1, e.prev_page_url);
243
+ },
244
+ "aria-disabled": !d,
245
+ className: `h-action-sm text-pxs ${d ? "" : "pointer-events-none opacity-40"}`
246
+ }) }),
247
+ m.map((t, n) => {
248
+ let r = t === "ellipsis", i = r ? `ellipsis-${e.current_page}-${n}` : `page-${t}`;
249
+ return /* @__PURE__ */ R(de, { children: r ? /* @__PURE__ */ R(le, { className: "size-action-sm" }) : /* @__PURE__ */ R(ce, {
250
+ href: "#",
251
+ active: t === e.current_page,
252
+ onClick: (n) => {
253
+ n.preventDefault(), u(t, Ue(e.path, t, s));
254
+ },
255
+ className: "size-action-sm text-pxs",
256
+ children: t
257
+ }) }, i);
258
+ }),
259
+ /* @__PURE__ */ R(de, { children: /* @__PURE__ */ R(oe, {
260
+ text: a.next,
261
+ href: "#",
262
+ onClick: (t) => {
263
+ t.preventDefault(), u(e.current_page + 1, e.next_page_url);
264
+ },
265
+ "aria-disabled": !f,
266
+ className: `h-action-sm text-pxs ${f ? "" : "pointer-events-none opacity-40"}`
267
+ }) })
268
+ ]
269
+ })
270
+ })]
271
+ });
272
+ }
273
+ We.displayName = "Pagination";
274
+ //#endregion
275
+ //#region src/components/features/table/table-actions.tsx
276
+ function Ge(e) {
277
+ let { row: t, actions: r, menuLabel: i, displayMode: a = "menu", responsiveBreakpoint: o = 1040, strings: s } = e, u = s ?? W, d = i ?? u.actions.triggerLabel, f = F(() => {
278
+ let e = typeof r == "function" ? r(t) : r;
279
+ return Array.isArray(e) ? e : [];
280
+ }, [r, t]), p = F(() => {
281
+ let e = (e) => typeof e == "function" ? e(t) : e;
282
+ return f.flatMap((t) => {
283
+ let n = e(t.visible) ?? !0;
284
+ return n ? [{
285
+ ...t,
286
+ visible: n,
287
+ disabled: e(t.disabled) ?? !1
288
+ }] : [];
289
+ });
290
+ }, [f, t]), m = p.length > 0, [h, g] = L(!1), _ = p.filter((e) => e.tone !== "destructive"), v = p.filter((e) => e.tone === "destructive"), y = [..._, ...v];
291
+ if (P(() => {
292
+ if (a !== "auto" || !m) {
293
+ g(!1);
294
+ return;
295
+ }
296
+ let e = () => {
297
+ try {
298
+ g(window.innerWidth <= o);
299
+ } catch {
300
+ g(!1);
301
+ }
302
+ };
303
+ return e(), window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
304
+ }, [
305
+ a,
306
+ m,
307
+ o
308
+ ]), !m) return null;
309
+ let b = a === "auto" ? h ? "menu" : "inline" : a, x = y.map((e, n) => ({
310
+ id: e.id || `${e.label}-${n}`,
311
+ label: e.label,
312
+ icon: e.icon,
313
+ disabled: !!e.disabled,
314
+ tone: e.tone,
315
+ buttonStyle: e.buttonStyle,
316
+ onClick: () => e.onClick?.(t)
317
+ }));
318
+ return b === "inline" ? /* @__PURE__ */ R(l, {
319
+ actions: x,
320
+ className: n("table-actions--component")
321
+ }) : /* @__PURE__ */ R(c, {
322
+ actions: x,
323
+ label: void 0,
324
+ icon: ke,
325
+ srText: d || u.actions.srLabel,
326
+ closeOnSelect: !0,
327
+ align: "end",
328
+ density: "table"
329
+ });
330
+ }
331
+ Ge.displayName = "DataTableActions";
332
+ //#endregion
333
+ //#region src/components/features/table/table-helpers.tsx
334
+ var K = (e, t, n) => {
335
+ typeof e == "function" ? t((t) => {
336
+ let r = e(t);
337
+ return n && n(r), r;
338
+ }) : (t(e), n && n(e));
339
+ }, Ke = (e, t, n) => {
340
+ typeof e == "function" ? t((t) => {
341
+ let r = e(t);
342
+ return n && n(r), r;
343
+ }) : (t(e), n && n(e));
344
+ }, q = (e, t, n) => {
345
+ typeof e == "function" ? t((t) => {
346
+ let r = e(t);
347
+ return n && n(r), r;
348
+ }) : (t(e), n && n(e));
349
+ }, qe = (e, t, n, r) => {
350
+ let i = "";
351
+ return r && (i += "bg-primary/5 "), typeof n == "function" ? i += n(e, t) + " " : n && (i += n + " "), i.trim();
352
+ }, Je = (e, t, n, r, i) => {
353
+ let a = "";
354
+ return typeof n == "string" ? a = n : n && (a = n(e, t)), r && i ? `${a} sticky start-0 z-10 bg-card shadow-[1px_0_0_0_var(--border)] rtl:shadow-[-1px_0_0_0_var(--border)]` : a;
355
+ }, Ye = (e) => e.getSelectedRowModel().rows.map((e) => e.original), Xe = (e, t = W) => /* @__PURE__ */ R("div", {
356
+ className: "px-space-sm",
357
+ children: /* @__PURE__ */ R(ie, {
358
+ className: "size-icon cursor-pointer disabled:cursor-not-allowed disabled:opacity-40",
359
+ checked: e.getIsSelected(),
360
+ disabled: !e.getCanSelect(),
361
+ onCheckedChange: (t) => e.toggleSelected(t === !0),
362
+ onClick: (e) => e.stopPropagation(),
363
+ "aria-label": t.selection.row(e.index)
364
+ })
365
+ }), Ze = (e, t = W) => /* @__PURE__ */ R("div", {
366
+ className: "px-space-sm",
367
+ children: /* @__PURE__ */ R(ie, {
368
+ className: "size-icon cursor-pointer",
369
+ checked: e.getIsAllPageRowsSelected(),
370
+ indeterminate: e.getIsSomePageRowsSelected() && !e.getIsAllPageRowsSelected(),
371
+ onCheckedChange: (t) => e.toggleAllPageRowsSelected(t === !0),
372
+ "aria-label": t.selection.selectAll
373
+ })
374
+ }), Qe = (e, t = W) => [{
375
+ id: "selection",
376
+ header: ({ table: e }) => Ze(e, t),
377
+ cell: ({ row: e }) => Xe(e, t),
378
+ enableSorting: !1,
379
+ enableResizing: !1,
380
+ size: 40
381
+ }, ...e];
382
+ //#endregion
383
+ //#region src/components/features/table/table-body.tsx
384
+ function $e({ table: e, onRowClick: t, emptyStateMessage: r, emptyStateAction: i, cellClassName: a = "", rowClassName: o = "", stickyFirstColumn: s = !1, striped: c = !1, strings: l }) {
385
+ let u = e.getRowModel().rows, d = r ?? l?.emptyState.message ?? W.emptyState.message, f = (e) => {
386
+ t && t(e);
387
+ };
388
+ return u.length ? /* @__PURE__ */ R(me, { children: u.map((e, r) => {
389
+ let i = e.getIsSelected(), l = e.getVisibleCells(), u = qe(e, r, o, i), d = () => {
390
+ t && f(e.original);
391
+ }, p = c && r % 2 != 0 ? "bg-muted/30" : "", m = n(u, p, "transition-colors duration-150", "hover:bg-muted/35 data-[state=selected]:bg-primary/8", t ? "cursor-pointer" : "", "border-b border-border/50 last:border-b-0");
392
+ return /* @__PURE__ */ R(j, {
393
+ "data-state": i ? "selected" : null,
394
+ className: m,
395
+ onClick: d,
396
+ children: l.map((t, r) => /* @__PURE__ */ R(pe, {
397
+ className: n(Je(t.column.id, e, a, s, r === 0), t.column.columnDef.meta?.align === "end" && "text-right", t.column.columnDef.meta?.align === "center" && "text-center"),
398
+ children: H(t.column.columnDef.cell, t.getContext())
399
+ }, t.id))
400
+ }, e.id);
401
+ }) }) : /* @__PURE__ */ R(me, {
402
+ className: "table-body--component",
403
+ children: /* @__PURE__ */ R(j, {
404
+ className: "hover:bg-transparent",
405
+ children: /* @__PURE__ */ R(pe, {
406
+ className: "p-0! text-center whitespace-normal",
407
+ colSpan: e.getAllColumns().length,
408
+ children: /* @__PURE__ */ R(_e, {
409
+ title: d,
410
+ description: !1,
411
+ media: /* @__PURE__ */ R(Ae, { className: "size-icon" }),
412
+ mediaVariant: "icon-soft",
413
+ actions: i,
414
+ className: "data-table--empty-state w-[100cqw] max-w-full"
415
+ })
416
+ })
417
+ })
418
+ });
419
+ }
420
+ $e.displayName = "DataTableBody";
421
+ //#endregion
422
+ //#region src/components/features/table/table-header.tsx
423
+ function et({ table: e, enableResizing: t = !1, stickyHeader: i = !1, headerClassName: a = "", cellClassName: s = "", stickyFirstColumn: c = !1, columnGroups: l, headerTransparent: u = !1 }) {
424
+ let d = e.getHeaderGroups(), f = i ? n("shadow-[0_1px_0_0_var(--border)]", u ? "bg-background" : "bg-muted") : "", p = (e) => l ? l.find((t) => t.columns.includes(e)) : null;
425
+ return /* @__PURE__ */ z(he, {
426
+ className: n(i && "sticky top-0 z-20", a),
427
+ children: [(() => {
428
+ if (!l || l.length === 0 || d.length === 0) return null;
429
+ let e = d[0].headers, t = null, i = 0, a = [];
430
+ return e.forEach((o, s) => {
431
+ let c = p(o.id)?.header || "";
432
+ c === t ? i++ : (t !== null && i > 0 && a.push(/* @__PURE__ */ R(M, {
433
+ colSpan: i,
434
+ className: n("h-12 border-r border-border/60 bg-muted/35 px-surface py-row-y-sm text-center text-muted-foreground/75 last:border-r-0", f),
435
+ children: /* @__PURE__ */ R(r, { children: t || "" })
436
+ }, `group-${t}-${a.length}`)), t = c, i = 1), s === e.length - 1 && i > 0 && a.push(/* @__PURE__ */ R(M, {
437
+ colSpan: i,
438
+ className: n("h-12 whitespace-nowrap border-r border-border/60 bg-muted/35 px-surface py-row-y-sm text-center text-muted-foreground/75 last:border-r-0", f),
439
+ children: /* @__PURE__ */ R(r, { children: t || "" })
440
+ }, `group-${t}-${a.length}`));
441
+ }), /* @__PURE__ */ R(j, {
442
+ className: n("table-header--component", "border-b border-border"),
443
+ children: a
444
+ });
445
+ })(), d.map((r) => /* @__PURE__ */ R(j, {
446
+ className: n("border-b border-border/70", u ? "bg-transparent hover:bg-transparent" : "bg-muted/45 hover:bg-muted/45"),
447
+ children: r.headers.map((r, a) => {
448
+ let l = n(Je(r.id, null, s, c, a === 0), "h-12", "text-muted-foreground font-medium whitespace-nowrap", r.column.columnDef.meta?.align === "end" && "text-right", r.column.columnDef.meta?.align === "center" && "text-center", f, i && c && a === 0 && "z-30", !i && "bg-transparent", t && !(c && a === 0) && "relative"), u = t ? { width: r.getSize() } : void 0, d = r.getResizeHandler(), p = r.getLeafHeaders().filter((e) => e.subHeaders.length === 0), m = p.reduce((e, t) => e + (t.column.columnDef.minSize ?? 20), 0), h = Math.min(2 ** 53 - 1, p.reduce((e, t) => e + (t.column.columnDef.maxSize ?? 2 ** 53 - 1), 0)), g = (t) => {
449
+ e.setOptions((e) => ({
450
+ ...e,
451
+ columnResizeDirection: getComputedStyle(t.currentTarget).direction === "rtl" ? "rtl" : "ltr"
452
+ })), d(t);
453
+ }, _ = r.column.getIsResizing(), v = (() => {
454
+ let e = r.column.columnDef.header;
455
+ return typeof e == "string" ? e : typeof r.id == "string" ? r.id : "column";
456
+ })();
457
+ return /* @__PURE__ */ R(M, {
458
+ colSpan: r.colSpan,
459
+ className: l,
460
+ style: u,
461
+ children: r.isPlaceholder ? null : /* @__PURE__ */ z("div", {
462
+ className: n(t && r.column.getCanResize() && "pe-action-sm"),
463
+ children: [(() => {
464
+ let e = r.column.getCanSort(), t = r.column.getIsSorted(), i = H(r.column.columnDef.header, r.getContext()), a = t === "asc" ? Ce : t === "desc" ? Se : Te;
465
+ return e ? /* @__PURE__ */ z(o, {
466
+ type: "button",
467
+ tone: "secondary",
468
+ buttonStyle: "ghost",
469
+ size: "sm",
470
+ onClick: r.column.getToggleSortingHandler(),
471
+ className: n("group -ml-space-sm inline-flex select-none items-center gap-space-sm rounded-inner px-space-sm", "hover:text-foreground transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", t && "text-foreground"),
472
+ "aria-label": `Sort ${v}`,
473
+ children: [i, /* @__PURE__ */ R(a, {
474
+ className: n("size-icon-sm shrink-0 transition-opacity", t ? "opacity-100" : "opacity-30 group-hover:opacity-70"),
475
+ "aria-hidden": "true"
476
+ })]
477
+ }) : /* @__PURE__ */ R("div", {
478
+ className: n("flex items-center", r.column.columnDef.meta?.align === "end" && "justify-end", r.column.columnDef.meta?.align === "center" && "justify-center"),
479
+ children: i
480
+ });
481
+ })(), !!t && r.column.getCanResize() && /* @__PURE__ */ R("div", {
482
+ role: "separator",
483
+ tabIndex: 0,
484
+ className: n("absolute inset-y-0 end-0 w-action-sm cursor-col-resize select-none touch-none bg-transparent after:absolute after:inset-y-0 after:end-0 after:w-px after:bg-foreground/50 opacity-0 hover:opacity-100 focus-visible:opacity-100 focus-visible:outline-none focus-visible:after:w-1 focus-visible:after:bg-primary-accent", _ && "after:bg-primary-accent!"),
485
+ "aria-label": `Resize ${v}`,
486
+ "aria-orientation": "vertical",
487
+ "aria-valuenow": r.getSize(),
488
+ "aria-valuemin": m,
489
+ "aria-valuemax": h,
490
+ onKeyDown: (t) => {
491
+ let n = getComputedStyle(t.currentTarget).direction === "rtl", i = (t.key === "ArrowRight" ? 10 : t.key === "ArrowLeft" ? -10 : 0) * (n ? -1 : 1);
492
+ if (!i && t.key !== "Home" && t.key !== "End" || t.key === "End" && h === 2 ** 53 - 1) return;
493
+ t.preventDefault(), t.stopPropagation();
494
+ let a = r.getSize(), o = Math.max(m, Math.min(h, a + i)) / Math.max(1, a);
495
+ e.setColumnSizing((e) => ({
496
+ ...e,
497
+ ...Object.fromEntries(p.map((e) => {
498
+ let n = e.column.columnDef.minSize ?? 20, r = e.column.columnDef.maxSize ?? 2 ** 53 - 1, i = t.key === "Home" ? n : t.key === "End" ? r : Math.max(n, Math.min(r, e.column.getSize() * o));
499
+ return [e.column.id, Math.round(i * 100) / 100];
500
+ }))
501
+ }));
502
+ },
503
+ onMouseDown: g,
504
+ onTouchStart: g
505
+ })]
506
+ })
507
+ }, r.id);
508
+ })
509
+ }, r.id))]
510
+ });
511
+ }
512
+ et.displayName = "DataTableHeader";
513
+ //#endregion
514
+ //#region src/components/features/table/column-visibility-toggle.tsx
515
+ function tt({ table: e, className: t, align: r = "end", labelVisibility: i = "hidden", strings: a = W }) {
516
+ let o = e.getAllColumns().filter((e) => e.getCanHide());
517
+ if (o.length === 0) return null;
518
+ let s = i !== "hidden", l = o.map((e) => {
519
+ let t = e.columnDef.header, n = a.columnVisibility.formatLabel(e.id, typeof t == "string" ? t : void 0);
520
+ return {
521
+ id: e.id,
522
+ type: "checkbox",
523
+ label: n,
524
+ group: a.columnVisibility.title,
525
+ checked: e.getIsVisible(),
526
+ onCheckedChange: (t) => e.toggleVisibility(!!t),
527
+ className: "capitalize"
528
+ };
529
+ });
530
+ return /* @__PURE__ */ R(c, {
531
+ actions: l,
532
+ icon: je,
533
+ label: a.columnVisibility.triggerLabel,
534
+ srText: a.columnVisibility.triggerLabel,
535
+ align: r,
536
+ width: "w-48",
537
+ density: "table",
538
+ labelVisibility: s ? "responsive" : "hidden",
539
+ buttonProps: {
540
+ "aria-label": a.columnVisibility.triggerLabel,
541
+ tone: "secondary",
542
+ buttonStyle: "outline",
543
+ size: "sm",
544
+ iconOnly: !s,
545
+ className: n("column-visibility-toggle--component", s ? "h-action-sm gap-space-sm px-control-sm" : "size-action-sm gap-0 px-0", t)
546
+ },
547
+ preserveOrder: !0
548
+ });
549
+ }
550
+ tt.displayName = "ColumnVisibilityToggle";
551
+ //#endregion
552
+ //#region src/components/features/table/partials/fullscreen-toggle.tsx
553
+ var nt = "text-muted-foreground/70 hover:text-foreground disabled:pointer-events-none disabled:opacity-30";
554
+ function rt({ fullscreen: e, onFullscreenChange: t, enterLabel: r = "Enter full screen", exitLabel: i = "Exit full screen", className: a }) {
555
+ let s = e ? i : r, c = e ? Oe : De;
556
+ return /* @__PURE__ */ R(o, {
557
+ type: "button",
558
+ tone: "secondary",
559
+ buttonStyle: "ghost",
560
+ size: "sm",
561
+ iconOnly: !0,
562
+ "aria-label": s,
563
+ "aria-pressed": e,
564
+ onClick: () => t(!e),
565
+ className: n("fullscreen-toggle--component", nt, a),
566
+ children: /* @__PURE__ */ R(c, { className: "size-icon-sm" })
567
+ });
568
+ }
569
+ rt.displayName = "FullscreenToggle";
570
+ //#endregion
571
+ //#region src/components/features/table/table-toolbar.tsx
572
+ var it = 300, at = "text-muted-foreground/70 transition-colors duration-150 hover:text-foreground disabled:pointer-events-none disabled:opacity-30";
573
+ function ot({ label: e, onClick: t, disabled: r, className: i, children: a }) {
574
+ return /* @__PURE__ */ R(o, {
575
+ type: "button",
576
+ tone: "secondary",
577
+ buttonStyle: "ghost",
578
+ size: "sm",
579
+ iconOnly: !0,
580
+ "aria-label": e,
581
+ className: n("table-toolbar--component", at, k.joinedItem, i),
582
+ onClick: t,
583
+ disabled: r,
584
+ children: a
585
+ });
586
+ }
587
+ function J(e) {
588
+ return e ? e.querySelector("[data-slot=\"table-container\"]") : null;
589
+ }
590
+ function st({ table: r, tableAreaRef: i, fullscreen: a, onFullscreenChange: o, showFullscreenToggle: s = !1, enableColumnVisibility: c = !1, labelVisibility: l = "hidden", strings: u = W }) {
591
+ let { defaultScale: d } = t(), f = e(void 0, d), [p, m] = L(!1), [h, g] = L(!1), _ = I(0), v = I(null), y = N(() => {
592
+ let e = J(i.current);
593
+ if (!e) {
594
+ m(!1), g(!1);
595
+ return;
596
+ }
597
+ let { scrollLeft: t, scrollWidth: n, clientWidth: r } = e;
598
+ m(t > 1), g(t + r < n - 1);
599
+ }, [i]);
600
+ P(() => {
601
+ let e = window.setTimeout(() => {
602
+ let e = J(i.current);
603
+ if (!e || (y(), typeof ResizeObserver > "u")) return;
604
+ let t = () => {
605
+ cancelAnimationFrame(_.current), _.current = requestAnimationFrame(y);
606
+ };
607
+ e.addEventListener("scroll", t, { passive: !0 });
608
+ let n = new ResizeObserver(y);
609
+ n.observe(e), e.firstElementChild && n.observe(e.firstElementChild), v.current = () => {
610
+ e.removeEventListener("scroll", t), cancelAnimationFrame(_.current), n.disconnect();
611
+ };
612
+ }, 0);
613
+ return () => {
614
+ window.clearTimeout(e), v.current?.();
615
+ };
616
+ }, [
617
+ i,
618
+ y,
619
+ a
620
+ ]);
621
+ let b = N(() => {
622
+ J(i.current)?.scrollBy({
623
+ left: -300,
624
+ behavior: "smooth"
625
+ });
626
+ }, [i]), x = N(() => {
627
+ J(i.current)?.scrollBy({
628
+ left: it,
629
+ behavior: "smooth"
630
+ });
631
+ }, [i]), S = c ? r.getAllColumns().filter((e) => e.getCanHide()) : [], C = p || h, w = S.length > 0, T = s;
632
+ return !C && !w && !T ? null : /* @__PURE__ */ z("div", {
633
+ className: n(k.joinedFrame, ae[f], "bg-card"),
634
+ children: [
635
+ !!C && /* @__PURE__ */ z(xe, { children: [
636
+ /* @__PURE__ */ R(ot, {
637
+ label: u.toolbar.scrollLeft,
638
+ onClick: b,
639
+ disabled: !p,
640
+ className: k.firstItem,
641
+ children: /* @__PURE__ */ R(we, { className: "size-icon-sm" })
642
+ }),
643
+ /* @__PURE__ */ R(ot, {
644
+ label: u.toolbar.scrollRight,
645
+ onClick: x,
646
+ disabled: !h,
647
+ children: /* @__PURE__ */ R(V, { className: "size-icon-sm" })
648
+ }),
649
+ (w || T) && /* @__PURE__ */ R("div", { className: "h-4 w-px self-center bg-border" })
650
+ ] }),
651
+ !!w && /* @__PURE__ */ z(xe, { children: [/* @__PURE__ */ R(tt, {
652
+ table: r,
653
+ strings: u,
654
+ labelVisibility: l,
655
+ className: n(k.joinedItem, "border-0 shadow-none", !C && k.firstItem, !T && k.lastItem)
656
+ }), T && /* @__PURE__ */ R("div", { className: "h-4 w-px self-center bg-border" })] }),
657
+ T && /* @__PURE__ */ R(rt, {
658
+ fullscreen: a,
659
+ onFullscreenChange: o,
660
+ enterLabel: u.toolbar.enterFullscreen,
661
+ exitLabel: u.toolbar.exitFullscreen,
662
+ className: n(k.joinedItem, k.lastItem, !C && !w && k.firstItem)
663
+ })
664
+ ]
665
+ });
666
+ }
667
+ st.displayName = "DataTableToolbar";
668
+ //#endregion
669
+ //#region src/components/features/table/data-table.tsx
670
+ var ct = ve("sm");
671
+ function lt() {
672
+ return be(ct);
673
+ }
674
+ var ut = {
675
+ sm: "[&_th]:h-12 [&_th]:px-row-x [&_th]:py-row-y-lg [&_th]:text-sm [&_td]:px-row-x [&_td]:py-row-y-sm [&_td]:text-sm",
676
+ md: "[&_th]:h-12 [&_th]:px-row-x [&_th]:py-row-y-lg [&_th]:text-sm [&_td]:px-row-x [&_td]:py-row-y [&_td]:text-sm",
677
+ lg: "[&_th]:h-12 [&_th]:px-row-x [&_th]:py-row-y-lg [&_th]:text-sm [&_td]:px-row-x [&_td]:py-row-y-lg [&_td]:text-sm"
678
+ }, dt = {
679
+ sm: "sm",
680
+ md: "sm",
681
+ lg: "sm"
682
+ }, ft = (e) => {
683
+ if (e !== void 0) return typeof e == "number" ? `${e}px` : e;
684
+ };
685
+ function pt(e, t) {
686
+ return e.map((e) => "columns" in e && e.columns ? {
687
+ ...e,
688
+ columns: pt(e.columns, t)
689
+ } : (e.id ?? ("accessorKey" in e && typeof e.accessorKey == "string" ? e.accessorKey.replace(/\./g, "_") : void 0) ?? (typeof e.header == "string" ? e.header : void 0)) === t && e.filterFn === void 0 ? {
690
+ ...e,
691
+ filterFn: "includesString"
692
+ } : e);
693
+ }
694
+ function Y({ size: r, surface: a = "card", headerTransparent: s = !0, columns: c, data: l, columnGroups: u, rowActions: d, rowActionsMenuLabel: f, rowActionsDisplayMode: p, rowActionsBreakpoint: m, enableSorting: h = !1, enableResizing: g = !1, enableFiltering: _ = !1, filterColumn: v, filterPlaceholder: y, manualSorting: b = !1, enableColumnVisibility: x = !1, fullscreen: S, defaultFullscreen: C = !1, onFullscreenChange: w, showFullscreenToggle: T = !1, enableRowSelection: E = !1, enableMultiRowSelection: ee = !0, enableSubRowSelection: D = !1, pagination: O, pageQueryKey: te, onPageChange: ie, onSortingChange: k, onColumnFiltersChange: ae, onRowClick: oe, onRowSelectionChange: se, stickyHeader: ce = !1, stickyToolbar: le = !1, stickyFirstColumn: ue = !1, maxBodyHeight: de, fillAvailableHeight: A = !1, emptyStateMessage: fe, emptyStateAction: j, className: pe = "", rowClassName: me = "", cellClassName: M = "", headerClassName: he = "", wrapperClassName: _e = "", innerClassName: ve = "", tableContainerClassName: ye = "", getRowId: be, rowSelection: P, sorting: Se, defaultSorting: Ce, columnVisibility: B, defaultColumnVisibility: we, initialState: V, onColumnVisibilityChange: Te, strings: Ee, topbarContent: De, topbarEnd: Oe, topbarClassName: ke, toolbarLabelVisibility: Ae = "hidden", footerContent: je, selectionToolbar: H, bulkActions: Ie, selectionToolbarClassName: U, storageKey: Le }) {
695
+ let { defaultScale: Re } = t(), Be = e(r, Re), W = F(() => Ve(Ee), [Ee]), G = n("bg-card", me), He = fe ?? W.emptyState.message, Ue = te ?? "page", K = ft(de), Ke = Array.isArray(c) && c.length === 2 && Array.isArray(c[1]) ? c[0] : c, q = F(() => Le ? `dt.${Le}.columns` : null, [Le]), qe = F(() => {
696
+ let e = we ?? V?.columnVisibility ?? {};
697
+ if (!q || typeof window > "u") return e;
698
+ try {
699
+ let t = window.localStorage.getItem(q);
700
+ return {
701
+ ...t ? JSON.parse(t) : {},
702
+ ...e
703
+ };
704
+ } catch {
705
+ return e;
706
+ }
707
+ }, [
708
+ we,
709
+ q,
710
+ V?.columnVisibility
711
+ ]), [Je, Ye] = L(Ce ?? V?.sorting ?? []), [Xe, Ze] = L(V?.columnFilters ?? []), [tt, nt] = L(qe), [rt, it] = L(V?.rowSelection || {}), [at, ot] = L(C), J = Se ?? Je, lt = B ?? tt, Y = P ?? rt, X = S ?? at, Z = I(null), mt = N((e) => {
712
+ let t = typeof e == "function" ? e(Xe) : e;
713
+ Ze(t), ae?.(t);
714
+ }, [Xe, ae]), ht = N((e) => {
715
+ let t = typeof e == "function" ? e(J) : e;
716
+ Se === void 0 && Ye(t), k?.(t);
717
+ }, [
718
+ Se,
719
+ k,
720
+ J
721
+ ]), gt = N((e) => {
722
+ let t = typeof e == "function" ? e(lt) : e;
723
+ if (B === void 0 && nt(t), q && typeof window < "u") try {
724
+ window.localStorage.setItem(q, JSON.stringify(t));
725
+ } catch {}
726
+ Te?.(t);
727
+ }, [
728
+ lt,
729
+ B,
730
+ q,
731
+ Te
732
+ ]), _t = N((e) => {
733
+ let t = typeof e == "function" ? e(Y) : e;
734
+ P === void 0 && it(t), se?.(t);
735
+ }, [
736
+ P,
737
+ se,
738
+ Y
739
+ ]), vt = I(null), yt = N((e) => {
740
+ S === void 0 && ot(e), w?.(e);
741
+ }, [S, w]);
742
+ ze(X, vt, N(() => yt(!1), [yt]));
743
+ let bt = N((e) => typeof f == "function" ? f(e) : f ?? W.actions.triggerLabel, [f, W.actions.triggerLabel]), xt = F(() => {
744
+ let e = _ && v ? pt(Ke, v) : Ke, t = E ? Qe(e, W) : e;
745
+ if (!d) return t;
746
+ let n = {
747
+ id: "actions",
748
+ header: W.actions.triggerLabel,
749
+ cell: ({ row: e }) => /* @__PURE__ */ R(Ge, {
750
+ row: e.original,
751
+ actions: d,
752
+ menuLabel: bt(e.original),
753
+ displayMode: p,
754
+ responsiveBreakpoint: m,
755
+ strings: W
756
+ }),
757
+ enableSorting: !1,
758
+ enableHiding: !1,
759
+ size: 40
760
+ };
761
+ return [...t, n];
762
+ }, [
763
+ Ke,
764
+ _,
765
+ v,
766
+ E,
767
+ d,
768
+ bt,
769
+ m,
770
+ p,
771
+ W
772
+ ]), Q = Fe({
773
+ data: l,
774
+ columns: xt,
775
+ state: {
776
+ sorting: J,
777
+ columnVisibility: lt,
778
+ rowSelection: Y,
779
+ columnFilters: Xe
780
+ },
781
+ enableSorting: h,
782
+ enableColumnResizing: g,
783
+ columnResizeMode: "onChange",
784
+ enableColumnFilters: _,
785
+ manualFiltering: !_,
786
+ manualSorting: b,
787
+ autoResetPageIndex: !1,
788
+ enableRowSelection: E,
789
+ enableMultiRowSelection: ee,
790
+ enableSubRowSelection: D,
791
+ onSortingChange: h ? ht : void 0,
792
+ onRowSelectionChange: E ? _t : void 0,
793
+ onColumnVisibilityChange: gt,
794
+ onColumnFiltersChange: mt,
795
+ getCoreRowModel: Me(),
796
+ getFilteredRowModel: Ne(),
797
+ getSortedRowModel: Pe(),
798
+ getRowId: be
799
+ }), St = _ && v ? Q.getAllLeafColumns().find((e) => e.id === v && e.getCanFilter()) : void 0, Ct = y ?? W.filter.searchPlaceholder, wt = O && O.last_page > 1, Tt = Q.getSelectedRowModel().rows.map((e) => e.original), $ = Tt.length, Et = N(() => {
800
+ Q.resetRowSelection();
801
+ }, [Q]), Dt = {
802
+ table: Q,
803
+ selectedRows: Tt,
804
+ selectedRowCount: $,
805
+ totalRowCount: l.length,
806
+ rowSelection: Y,
807
+ clearSelection: Et
808
+ }, Ot = typeof Ie == "function" ? Ie(Dt) : Ie, kt = $ > 0 ? /* @__PURE__ */ z("div", {
809
+ "data-component": "data-table-selection-toolbar",
810
+ "data-slot": "data-table-selection-toolbar",
811
+ className: n("data-table-selection-toolbar--component flex min-w-0 flex-col gap-space-md border-b border-border/70 bg-muted/35 px-surface py-row-y @2xl/data-table:flex-row @2xl/data-table:items-center @2xl/data-table:justify-between", le && "sticky top-0 z-20 bg-card", U),
812
+ children: [/* @__PURE__ */ R(i, {
813
+ className: "data-table-selection-toolbar--summary min-w-0",
814
+ children: W.selection.summary($, l.length)
815
+ }), /* @__PURE__ */ z("div", {
816
+ "data-slot": "data-table-selection-toolbar-actions",
817
+ className: "data-table-selection-toolbar--actions flex shrink-0 flex-wrap items-center gap-space-md",
818
+ children: [Ot, /* @__PURE__ */ R(o, {
819
+ type: "button",
820
+ tone: "secondary",
821
+ buttonStyle: "ghost",
822
+ onClick: Et,
823
+ children: W.selection.clear
824
+ })]
825
+ })]
826
+ }) : null, At = !E || $ === 0 || H === null || H === !1 ? null : typeof H == "function" ? H(Dt) : H ?? kt, jt = F(() => {
827
+ if (K) return { "--data-table-body-max-height": K };
828
+ }, [K]), Mt = X || A || K !== void 0, Nt = ct.Provider, Pt = dt[Be];
829
+ return /* @__PURE__ */ R(Nt, {
830
+ value: Pt,
831
+ children: /* @__PURE__ */ z("div", {
832
+ ref: vt,
833
+ role: X ? "dialog" : void 0,
834
+ "aria-modal": X ? !0 : void 0,
835
+ "aria-label": X ? W.accessibility.fullscreenRegion : void 0,
836
+ className: n("data-table--component @container/data-table box-border", X ? "fixed inset-0 z-50 bg-background flex flex-col overflow-hidden p-surface" : n("w-full min-w-0 max-w-full", A && "flex h-full min-h-0 flex-col", a === "card" && "overflow-hidden rounded-radius border border-border bg-card shadow-[0_1px_3px_0_color-mix(in_oklch,var(--foreground)_4%,transparent)]", a === "glass" && "rounded-radius overflow-hidden border border-border/60", _e)),
837
+ children: [
838
+ !!(St || De || Oe || x || T) && /* @__PURE__ */ z("div", {
839
+ className: n("relative", le && "sticky top-0 z-20 bg-card"),
840
+ children: [/* @__PURE__ */ z("div", {
841
+ className: n("data-table-topbar grid gap-space-lg px-surface py-row-y @2xl/data-table:grid-cols-[minmax(0,1fr)_auto] @2xl/data-table:items-end", X ? "mb-space-lg shrink-0" : "mb-0", ke),
842
+ children: [/* @__PURE__ */ z("div", {
843
+ className: "data-table-topbar-left flex min-w-0 flex-col gap-space-md",
844
+ children: [De, St && /* @__PURE__ */ R("div", {
845
+ className: "min-w-0 max-w-sm",
846
+ children: /* @__PURE__ */ R(re, {
847
+ "aria-label": Ct,
848
+ placeholder: Ct,
849
+ value: St.getFilterValue() ?? "",
850
+ onChange: (e) => St.setFilterValue(e.target.value)
851
+ })
852
+ })]
853
+ }), /* @__PURE__ */ z("div", {
854
+ className: "data-table-topbar-right flex flex-wrap items-center justify-end gap-space-md",
855
+ children: [Oe, /* @__PURE__ */ R(st, {
856
+ table: Q,
857
+ tableAreaRef: Z,
858
+ fullscreen: X,
859
+ onFullscreenChange: yt,
860
+ showFullscreenToggle: T,
861
+ enableColumnVisibility: x,
862
+ labelVisibility: Ae,
863
+ strings: W
864
+ })]
865
+ })]
866
+ }), /* @__PURE__ */ R(ne, {})]
867
+ }),
868
+ At,
869
+ /* @__PURE__ */ R("div", {
870
+ ref: Z,
871
+ style: jt,
872
+ className: n("min-h-0", Mt ? "overflow-hidden" : ve, (X || A) && "flex-1"),
873
+ children: /* @__PURE__ */ z(ge, {
874
+ containerProps: {
875
+ role: "region",
876
+ "aria-label": W.accessibility.scrollRegion
877
+ },
878
+ style: g ? { width: Q.getTotalSize() } : void 0,
879
+ className: n("relative", g && "min-w-full table-fixed", ut[Be], pe),
880
+ containerClassName: n("focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", Mt && "overflow-auto", K !== void 0 && "max-h-(--data-table-body-max-height)", (X || A) && "h-full min-h-0", ye),
881
+ children: [/* @__PURE__ */ R(et, {
882
+ enableResizing: g,
883
+ table: Q,
884
+ stickyHeader: ce,
885
+ headerClassName: he,
886
+ cellClassName: M,
887
+ stickyFirstColumn: ue,
888
+ columnGroups: u,
889
+ headerTransparent: s
890
+ }), /* @__PURE__ */ R($e, {
891
+ table: Q,
892
+ onRowClick: oe,
893
+ emptyStateMessage: He,
894
+ emptyStateAction: j,
895
+ cellClassName: M,
896
+ rowClassName: G,
897
+ stickyFirstColumn: ue,
898
+ strings: W
899
+ })]
900
+ })
901
+ }),
902
+ !!wt && /* @__PURE__ */ z(xe, { children: [/* @__PURE__ */ R(ne, {}), /* @__PURE__ */ R(We, {
903
+ pagination: O,
904
+ onPageChange: ie,
905
+ pageQueryKey: Ue,
906
+ labels: W.pagination
907
+ })] }),
908
+ !!je && /* @__PURE__ */ R("div", {
909
+ "data-slot": "data-table-footer",
910
+ className: "data-table--footer border-t border-border/70 px-surface py-row-y",
911
+ children: je
912
+ })
913
+ ]
914
+ })
915
+ });
916
+ }
917
+ Y.displayName = "DataTable";
918
+ //#endregion
919
+ //#region src/components/features/table/filter-bar.tsx
920
+ function X({ table: e, filterColumn: t, filterPlaceholder: r, enableColumnVisibility: i = !1, customContent: a, strings: o = W }) {
921
+ if (!t && !i && !a) return null;
922
+ let s = r ?? o.filter.searchPlaceholder;
923
+ return /* @__PURE__ */ z("div", {
924
+ className: n("filter-bar--component", "flex items-center justify-between p-surface"),
925
+ children: [/* @__PURE__ */ z("div", {
926
+ className: "flex flex-1 items-center space-x-space-md",
927
+ children: [!!t && /* @__PURE__ */ R(re, {
928
+ placeholder: s,
929
+ value: e.getColumn(t)?.getFilterValue() ?? "",
930
+ onChange: (n) => {
931
+ let r = n.target.value;
932
+ e.getColumn(t)?.setFilterValue(r);
933
+ },
934
+ className: "max-w-sm"
935
+ }), a]
936
+ }), !!i && /* @__PURE__ */ R(tt, {
937
+ table: e,
938
+ strings: o,
939
+ labelVisibility: "responsive",
940
+ className: "ml-auto"
941
+ })]
942
+ });
943
+ }
944
+ X.displayName = "DataTableFilterBar";
945
+ //#endregion
946
+ //#region src/components/features/table/partials/cell-value.tsx
947
+ function Z(e) {
948
+ return e === !1 || e == null || typeof e == "string" && e.trim() === "";
949
+ }
950
+ function mt(e) {
951
+ return e == null;
952
+ }
953
+ function ht(e) {
954
+ return typeof e == "object" && !!e && !Array.isArray(e) && !ye(e) && !(e instanceof Date);
955
+ }
956
+ function gt(e) {
957
+ return Array.isArray(e);
958
+ }
959
+ function _t(e) {
960
+ let [t, n, r] = e;
961
+ return {
962
+ ...r,
963
+ value: t,
964
+ kind: n
965
+ };
966
+ }
967
+ function vt(e) {
968
+ if (e === !1) return null;
969
+ if (ye(e)) return e;
970
+ if (gt(e)) {
971
+ let t = _t(e);
972
+ return Z(t.value) && mt(t.display) ? null : t;
973
+ }
974
+ return ht(e) ? Z(e.value) && mt(e.display) ? null : e : Z(e) ? null : { value: e };
975
+ }
976
+ function yt(e) {
977
+ return e instanceof Date ? e.toISOString() : String(e ?? "");
978
+ }
979
+ function bt({ descriptor: e, index: t = 0, emptyLabel: r, className: i, primaryWeight: a = "medium" }) {
980
+ let o = t === 0, s = e.kind ?? (o ? "value" : "secondary"), c = e.value, l = e.display ?? (c instanceof Date ? yt(c) : c), y = e.emptyLabel ?? r, x = n(i, e.className), D = o ? a : "regular";
981
+ switch (s) {
982
+ case "secondary": return /* @__PURE__ */ R(p, {
983
+ size: "inherit",
984
+ className: x,
985
+ children: l
986
+ });
987
+ case "muted": return /* @__PURE__ */ R(m, {
988
+ size: "inherit",
989
+ className: x,
990
+ children: l
991
+ });
992
+ case "name": return /* @__PURE__ */ R(f, {
993
+ value: e.display === void 0 && typeof c == "string" ? c : void 0,
994
+ force: e.force,
995
+ emptyLabel: y,
996
+ size: "inherit",
997
+ weight: D,
998
+ className: x,
999
+ children: e.display
1000
+ });
1001
+ case "mono": return /* @__PURE__ */ R(_, {
1002
+ size: "inherit",
1003
+ weight: D,
1004
+ className: x,
1005
+ children: l
1006
+ });
1007
+ case "link": {
1008
+ let t = e.href ?? yt(c);
1009
+ return /* @__PURE__ */ R(b, {
1010
+ href: t,
1011
+ emptyLabel: y,
1012
+ className: x,
1013
+ children: l
1014
+ });
1015
+ }
1016
+ case "email": return /* @__PURE__ */ R(v, {
1017
+ value: typeof c == "string" ? c : void 0,
1018
+ display: e.display,
1019
+ emptyLabel: y,
1020
+ className: x
1021
+ });
1022
+ case "phone": return /* @__PURE__ */ R(d, {
1023
+ value: typeof c == "string" ? c : void 0,
1024
+ display: e.display,
1025
+ emptyLabel: y,
1026
+ className: x
1027
+ });
1028
+ case "url": return /* @__PURE__ */ R(g, {
1029
+ value: typeof c == "string" ? c : void 0,
1030
+ display: e.display,
1031
+ emptyLabel: y,
1032
+ className: x
1033
+ });
1034
+ case "money": return /* @__PURE__ */ R(C, {
1035
+ amount: typeof c == "number" || typeof c == "string" ? c : null,
1036
+ currency: e.currency,
1037
+ locale: e.locale,
1038
+ currencyDisplay: e.currencyDisplay,
1039
+ minimumFractionDigits: e.minimumFractionDigits,
1040
+ maximumFractionDigits: e.maximumFractionDigits,
1041
+ formatMode: e.formatMode,
1042
+ emptyLabel: y,
1043
+ size: "inherit",
1044
+ weight: D,
1045
+ className: x
1046
+ });
1047
+ case "number": return /* @__PURE__ */ R(w, {
1048
+ value: typeof c == "number" || typeof c == "string" ? c : null,
1049
+ locale: e.locale,
1050
+ options: e.options,
1051
+ emptyLabel: y,
1052
+ size: "inherit",
1053
+ weight: D,
1054
+ className: x
1055
+ });
1056
+ case "percent": return /* @__PURE__ */ R(S, {
1057
+ value: typeof c == "number" || typeof c == "string" ? c : null,
1058
+ locale: e.locale,
1059
+ scaled: e.scaled,
1060
+ options: e.options,
1061
+ emptyLabel: y,
1062
+ size: "inherit",
1063
+ weight: D,
1064
+ className: x
1065
+ });
1066
+ case "fileSize": return /* @__PURE__ */ R(h, {
1067
+ value: typeof c == "number" ? c : null,
1068
+ from: e.from,
1069
+ locale: e.locale,
1070
+ emptyLabel: y,
1071
+ size: "inherit",
1072
+ weight: D,
1073
+ className: x
1074
+ });
1075
+ case "date": return /* @__PURE__ */ R(O, {
1076
+ value: c,
1077
+ format: e.dateFormat,
1078
+ preset: e.datePreset,
1079
+ locale: e.dateLocale,
1080
+ emptyLabel: y,
1081
+ size: "inherit",
1082
+ weight: D,
1083
+ className: x
1084
+ });
1085
+ case "time": return /* @__PURE__ */ R(T, {
1086
+ value: c,
1087
+ format: e.timeFormat,
1088
+ locale: e.dateLocale,
1089
+ emptyLabel: y,
1090
+ size: "inherit",
1091
+ weight: D,
1092
+ className: x
1093
+ });
1094
+ case "dateTime": return /* @__PURE__ */ R(ee, {
1095
+ value: c,
1096
+ format: e.dateFormat,
1097
+ timeFormat: e.timeFormat,
1098
+ preset: e.datePreset,
1099
+ locale: e.dateLocale,
1100
+ emptyLabel: y,
1101
+ size: "inherit",
1102
+ weight: D,
1103
+ className: x
1104
+ });
1105
+ case "relativeTime": return /* @__PURE__ */ R(E, {
1106
+ value: c,
1107
+ locale: e.dateLocale,
1108
+ emptyLabel: y,
1109
+ size: "inherit",
1110
+ weight: D,
1111
+ className: x
1112
+ });
1113
+ default: return /* @__PURE__ */ R(u, {
1114
+ size: "inherit",
1115
+ weight: D,
1116
+ className: x,
1117
+ children: l
1118
+ });
1119
+ }
1120
+ }
1121
+ function xt({ value: e, kind: t, href: r, currency: i, currencyDisplay: a, minimumFractionDigits: o, maximumFractionDigits: s, formatMode: c, locale: l, dateLocale: d, from: f, force: p, options: m, scaled: h, dateFormat: g, datePreset: _, timeFormat: v, emptyLabel: b, fallback: x = "--", missing: S, className: C, children: w }) {
1122
+ let T = S ?? Z(e);
1123
+ return w === void 0 ? T ? /* @__PURE__ */ R(y, {
1124
+ size: "inherit",
1125
+ className: n("cell-value--component", C),
1126
+ children: b ?? x
1127
+ }) : bt({
1128
+ descriptor: {
1129
+ value: e,
1130
+ kind: t,
1131
+ href: r,
1132
+ currency: i,
1133
+ currencyDisplay: a,
1134
+ minimumFractionDigits: o,
1135
+ maximumFractionDigits: s,
1136
+ formatMode: c,
1137
+ locale: l,
1138
+ dateLocale: d,
1139
+ from: f,
1140
+ force: p,
1141
+ options: m,
1142
+ scaled: h,
1143
+ dateFormat: g,
1144
+ datePreset: _,
1145
+ timeFormat: v,
1146
+ emptyLabel: b,
1147
+ className: "cell-value--component"
1148
+ },
1149
+ emptyLabel: b ?? x,
1150
+ className: C
1151
+ }) : /* @__PURE__ */ R(T ? y : u, {
1152
+ size: "inherit",
1153
+ className: n("cell-value--component", C),
1154
+ children: w
1155
+ });
1156
+ }
1157
+ function Q({ values: e = [], emptyLabel: t = "--", className: r, itemClassName: i, primaryClassName: a, secondaryClassName: o, primaryWeight: s = "medium" }) {
1158
+ let c = e.map(vt).filter((e) => e !== null).slice(0, 4);
1159
+ return c.length === 0 ? /* @__PURE__ */ R(y, {
1160
+ size: "inherit",
1161
+ className: n("cell-stack--component", r),
1162
+ children: t
1163
+ }) : /* @__PURE__ */ R("div", {
1164
+ className: n("cell-stack--component flex min-w-0 flex-col items-start gap-space-2xs", r),
1165
+ children: c.map((e, r) => {
1166
+ let c = r === 0, l = n("cell-stack--item min-w-0 max-w-full truncate", !c && "text-xs", i, c ? a : o);
1167
+ return ye(e) ? /* @__PURE__ */ R("div", {
1168
+ className: l,
1169
+ children: e
1170
+ }, r) : /* @__PURE__ */ R("div", {
1171
+ className: l,
1172
+ children: bt({
1173
+ descriptor: e,
1174
+ index: r,
1175
+ emptyLabel: t,
1176
+ className: n("leading-tight", !c && "text-xs"),
1177
+ primaryWeight: s
1178
+ })
1179
+ }, r);
1180
+ })
1181
+ });
1182
+ }
1183
+ xt.displayName = "CellValue", Q.displayName = "CellStack";
1184
+ //#endregion
1185
+ //#region src/components/features/table/partials/table-link.tsx
1186
+ var St = ({ className: e, ...t }) => /* @__PURE__ */ R(b, {
1187
+ className: n("table-link--component", "underline decoration-link-color/35 decoration-dotted underline-offset-2 hover:decoration-link-color", e),
1188
+ ...t,
1189
+ children: t.children
1190
+ });
1191
+ //#endregion
1192
+ //#region src/components/features/table/partials/resource-cell.tsx
1193
+ function Ct(e, t) {
1194
+ if (e && typeof e == "object" && !("type" in e) && "label" in e) {
1195
+ let n = e.icon;
1196
+ return /* @__PURE__ */ z(te, {
1197
+ tone: e.tone ?? "secondary",
1198
+ dot: e.dot,
1199
+ children: [!!n && /* @__PURE__ */ R(n, { className: "size-icon-sm" }), e.label]
1200
+ }, e.id ?? t);
1201
+ }
1202
+ return /* @__PURE__ */ R("span", { children: e }, t);
1203
+ }
1204
+ function wt(e) {
1205
+ return e ? Array.isArray(e) ? /* @__PURE__ */ R("span", {
1206
+ className: "inline-flex min-w-0 flex-wrap items-center gap-x-space-md gap-y-space-2xs",
1207
+ children: e.map((e, t) => /* @__PURE__ */ z("span", {
1208
+ className: "inline-flex min-w-0 items-center gap-space-sm",
1209
+ children: [!!e.label && /* @__PURE__ */ R(i, {
1210
+ tag: "span",
1211
+ size: "inherit",
1212
+ type: "secondary",
1213
+ className: "shrink-0",
1214
+ children: e.label
1215
+ }), /* @__PURE__ */ R(i, {
1216
+ tag: "span",
1217
+ size: "inherit",
1218
+ type: "secondary",
1219
+ className: "truncate",
1220
+ children: e.value
1221
+ })]
1222
+ }, e.id ?? t))
1223
+ }) : e : null;
1224
+ }
1225
+ function Tt({ title: e, subtitle: t, metadata: r, badges: o = [], imageUrl: c, icon: l = Ee, fallback: u, href: d, renderLink: f, emptyLabel: p = "—", className: m, mediaClassName: h, contentClassName: g, titleClassName: _, subtitleClassName: v }) {
1226
+ if (!e) return /* @__PURE__ */ R(i, {
1227
+ size: "inherit",
1228
+ type: "secondary",
1229
+ className: m,
1230
+ children: p
1231
+ });
1232
+ let y = typeof e == "string" ? e : void 0, b = y ? x(y, { strategy: "first-words" }) : "", S = /* @__PURE__ */ z(s, {
1233
+ render: /* @__PURE__ */ R("span", {}),
1234
+ gap: "dense",
1235
+ className: n("resource-cell--content", g),
1236
+ children: [
1237
+ /* @__PURE__ */ z(s, {
1238
+ render: /* @__PURE__ */ R("span", {}),
1239
+ direction: "horizontal",
1240
+ gap: "sm",
1241
+ wrap: !1,
1242
+ className: "resource-cell--title-row",
1243
+ children: [/* @__PURE__ */ R(i, {
1244
+ tag: "span",
1245
+ size: "inherit",
1246
+ weight: "medium",
1247
+ className: n("resource-cell--title truncate", _),
1248
+ children: e
1249
+ }), o.length > 0 && /* @__PURE__ */ R("span", {
1250
+ className: "resource-cell--badges inline-flex shrink-0 items-center gap-space-sm",
1251
+ children: o.map(Ct)
1252
+ })]
1253
+ }),
1254
+ !!t && /* @__PURE__ */ R(i, {
1255
+ tag: "span",
1256
+ size: "inherit",
1257
+ type: "secondary",
1258
+ className: n("resource-cell--subtitle truncate", v),
1259
+ children: t
1260
+ }),
1261
+ !!r && /* @__PURE__ */ R("span", {
1262
+ className: "resource-cell--metadata min-w-0",
1263
+ children: wt(r)
1264
+ })
1265
+ ]
1266
+ }), C = /* @__PURE__ */ z("span", {
1267
+ className: n("resource-cell--component inline-flex min-w-0 items-center gap-space-md", m),
1268
+ children: [/* @__PURE__ */ R("span", {
1269
+ className: n("resource-cell--media relative inline-flex size-avatar shrink-0 items-center justify-center overflow-hidden rounded-full bg-muted text-muted-foreground", h),
1270
+ children: c ? /* @__PURE__ */ R("img", {
1271
+ src: c,
1272
+ alt: y ?? "",
1273
+ className: "absolute inset-0 size-full object-cover"
1274
+ }) : u || (b ? /* @__PURE__ */ R(i, {
1275
+ size: "inherit",
1276
+ weight: "semibold",
1277
+ className: "text-sm leading-none",
1278
+ children: b
1279
+ }) : /* @__PURE__ */ R(l, { className: "size-icon" }))
1280
+ }), S]
1281
+ });
1282
+ if (!d) return C;
1283
+ let w = "resource-cell--link inline-flex min-w-0 rounded-inner focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2";
1284
+ return f ? f({
1285
+ href: d,
1286
+ children: C,
1287
+ className: w,
1288
+ "aria-label": y
1289
+ }) : /* @__PURE__ */ R(a, {
1290
+ href: d,
1291
+ size: "inherit",
1292
+ underline: !1,
1293
+ className: w,
1294
+ "aria-label": y,
1295
+ children: C
1296
+ });
1297
+ }
1298
+ Tt.displayName = "ResourceCell";
1299
+ //#endregion
1300
+ //#region src/components/features/table/partials/cell-renderers.tsx
1301
+ function $({ value: e, map: t, emptyLabel: r = "—", className: a }) {
1302
+ if (!e || !(e in t)) return /* @__PURE__ */ R(i, {
1303
+ size: "inherit",
1304
+ type: "secondary",
1305
+ className: n("status-cell--component", a),
1306
+ children: r
1307
+ });
1308
+ let o = t[e], s = o.icon;
1309
+ return /* @__PURE__ */ z(te, {
1310
+ tone: o.tone ?? "secondary",
1311
+ className: n("status-cell--component gap-space-sm", a),
1312
+ children: [!!s && /* @__PURE__ */ R(s, { className: "size-icon-sm" }), o.label]
1313
+ });
1314
+ }
1315
+ $.displayName = "StatusCell";
1316
+ function Et({ items: e = [], emptyLabel: t = "—", className: r, badgeClassName: a }) {
1317
+ let o = e.filter((e) => !e.hidden);
1318
+ return o.length === 0 ? /* @__PURE__ */ R(i, {
1319
+ size: "inherit",
1320
+ type: "secondary",
1321
+ className: n("status-cluster-cell--component", r),
1322
+ children: t
1323
+ }) : /* @__PURE__ */ R("span", {
1324
+ className: n("status-cluster-cell--component inline-flex min-w-0 flex-wrap items-center gap-space-sm", r),
1325
+ children: o.map((e, t) => {
1326
+ let r = e.icon;
1327
+ return /* @__PURE__ */ z(te, {
1328
+ tone: e.tone ?? "secondary",
1329
+ dot: e.dot,
1330
+ className: n("shrink-0", a),
1331
+ children: [!!r && /* @__PURE__ */ R(r, { className: "size-icon-sm" }), e.label]
1332
+ }, e.id ?? t);
1333
+ })
1334
+ });
1335
+ }
1336
+ Et.displayName = "StatusClusterCell";
1337
+ function Dt({ value: e, format: t, preset: r, locale: a, showIcon: o = !1, icon: s = B, emptyLabel: c = "—", className: l }) {
1338
+ let u = D(e);
1339
+ return u ? /* @__PURE__ */ z("span", {
1340
+ className: n("date-cell--component inline-flex items-center gap-space-sm", l),
1341
+ children: [!!o && /* @__PURE__ */ R(s, { className: "size-icon text-muted-foreground" }), /* @__PURE__ */ R(O, {
1342
+ value: u,
1343
+ format: t,
1344
+ preset: r,
1345
+ locale: a,
1346
+ emptyLabel: c,
1347
+ size: "inherit",
1348
+ type: "secondary"
1349
+ })]
1350
+ }) : /* @__PURE__ */ R(i, {
1351
+ size: "inherit",
1352
+ type: "secondary",
1353
+ className: n("date-cell--component", l),
1354
+ children: c
1355
+ });
1356
+ }
1357
+ Dt.displayName = "DateCell";
1358
+ function Ot({ value: e, format: t, preset: r, locale: a, showIcon: o = !1, icon: s = B, emptyLabel: c = "—", className: l, primaryClassName: u, secondary: d, secondaryClassName: f }) {
1359
+ let p = D(e);
1360
+ if (!p) return /* @__PURE__ */ R(i, {
1361
+ size: "inherit",
1362
+ type: "secondary",
1363
+ className: n("date-meta-cell--component", l),
1364
+ children: c
1365
+ });
1366
+ let m = typeof d == "function" ? d(p) : d;
1367
+ return /* @__PURE__ */ z("span", {
1368
+ className: n("date-meta-cell--component inline-flex min-w-0 items-start gap-space-sm", l),
1369
+ children: [!!o && /* @__PURE__ */ R(s, { className: "mt-space-2xs size-icon shrink-0 text-muted-foreground" }), /* @__PURE__ */ z("span", {
1370
+ className: "grid min-w-0 gap-space-2xs",
1371
+ children: [/* @__PURE__ */ R(O, {
1372
+ value: p,
1373
+ format: t,
1374
+ preset: r,
1375
+ locale: a,
1376
+ emptyLabel: c,
1377
+ size: "inherit",
1378
+ type: "secondary",
1379
+ className: n("truncate tabular-nums", u)
1380
+ }), !!m && /* @__PURE__ */ R(i, {
1381
+ tag: "span",
1382
+ size: "inherit",
1383
+ type: "secondary",
1384
+ className: n("truncate", f),
1385
+ children: m
1386
+ })]
1387
+ })]
1388
+ });
1389
+ }
1390
+ Ot.displayName = "DateMetaCell";
1391
+ function kt({ value: e, currency: t, locale: r, emptyLabel: i = "—", className: a, weight: o = "semibold" }) {
1392
+ return /* @__PURE__ */ R(C, {
1393
+ amount: e,
1394
+ currency: t,
1395
+ locale: r,
1396
+ formatMode: t ? "with_symbol" : "decimal",
1397
+ emptyLabel: i,
1398
+ size: "inherit",
1399
+ weight: o,
1400
+ className: n("currency-cell--component tabular-nums", a)
1401
+ });
1402
+ }
1403
+ kt.displayName = "CurrencyCell";
1404
+ function At({ name: e, imageUrl: t, icon: r = Ee, subtitle: a, emptyLabel: o = "—", className: s }) {
1405
+ return !e || e.trim().length === 0 ? /* @__PURE__ */ R(i, {
1406
+ size: "inherit",
1407
+ type: "secondary",
1408
+ className: n("avatar-cell--component", s),
1409
+ children: o
1410
+ }) : /* @__PURE__ */ z("span", {
1411
+ className: n("avatar-cell--component inline-flex items-center gap-space-md", s),
1412
+ children: [/* @__PURE__ */ R("span", {
1413
+ className: "relative inline-flex size-avatar-sm shrink-0 items-center justify-center overflow-hidden rounded-full bg-muted text-muted-foreground",
1414
+ children: t ? /* @__PURE__ */ R("img", {
1415
+ src: t,
1416
+ alt: e,
1417
+ className: "absolute inset-0 size-full object-cover"
1418
+ }) : e.length > 0 ? /* @__PURE__ */ R(i, {
1419
+ size: "inherit",
1420
+ weight: "semibold",
1421
+ className: "text-sm leading-none",
1422
+ children: x(e, { strategy: "first-words" })
1423
+ }) : /* @__PURE__ */ R(r, { className: "size-icon" })
1424
+ }), /* @__PURE__ */ z("span", {
1425
+ className: "min-w-0 inline-flex flex-col",
1426
+ children: [/* @__PURE__ */ R(i, {
1427
+ size: "inherit",
1428
+ weight: "medium",
1429
+ className: "truncate",
1430
+ children: e
1431
+ }), !!a && /* @__PURE__ */ R(i, {
1432
+ size: "inherit",
1433
+ type: "secondary",
1434
+ className: "truncate",
1435
+ children: a
1436
+ })]
1437
+ })]
1438
+ });
1439
+ }
1440
+ At.displayName = "AvatarCell";
1441
+ //#endregion
1442
+ export { W as A, qe as C, Ke as D, K as E, U as M, Le as N, Ge as O, Je as S, q as T, et as _, $ as a, Ze as b, St as c, X as d, Y as f, tt as g, rt as h, Ot as i, Ve as j, We as k, Q as l, st as m, kt as n, Et as o, lt as p, Dt as r, Tt as s, At as t, xt as u, $e as v, Ye as w, Xe as x, Qe as y };
1443
+
1444
+ //# sourceMappingURL=table-Dn4XSrSB.js.map