themelia-react-ui 2.0.0 → 2.0.1

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 (625) hide show
  1. package/CHANGELOG.md +351 -0
  2. package/README.md +26 -13
  3. package/dist/{accordion-CQXVcd7Q.js → accordion-B6a3vVgA.js} +84 -82
  4. package/dist/accordion-B6a3vVgA.js.map +1 -0
  5. package/dist/action-menu-TzCoSlwL.js +280 -0
  6. package/dist/action-menu-TzCoSlwL.js.map +1 -0
  7. package/dist/{affordance-geometry.generated-CCIXb2A1.js → affordance-geometry.generated-B5iu-Mkr.js} +3 -2
  8. package/dist/affordance-geometry.generated-B5iu-Mkr.js.map +1 -0
  9. package/dist/{ai-artifact-2PQ2fItc.js → ai-artifact-BMJdv-6q.js} +379 -376
  10. package/dist/ai-artifact-BMJdv-6q.js.map +1 -0
  11. package/dist/{app-shell-BE_j8-AT.js → app-shell-ZK5RWdo6.js} +4 -4
  12. package/dist/{app-shell-BE_j8-AT.js.map → app-shell-ZK5RWdo6.js.map} +1 -1
  13. package/dist/attachment-BtfhGm8i.js +245 -0
  14. package/dist/attachment-BtfhGm8i.js.map +1 -0
  15. package/dist/{auth-M3vGMgDR.js → auth-CYxKfo69.js} +237 -235
  16. package/dist/auth-CYxKfo69.js.map +1 -0
  17. package/dist/{avatar-djdaaQ_s.js → avatar-BBnEJIx8.js} +66 -65
  18. package/dist/avatar-BBnEJIx8.js.map +1 -0
  19. package/dist/badge-MrKVNzW9.js +93 -0
  20. package/dist/badge-MrKVNzW9.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/batch-action-bar.js +3 -0
  27. package/dist/base/buttons.js +2 -3
  28. package/dist/base/cards.js +2 -2
  29. package/dist/base/carousel.js +13 -13
  30. package/dist/base/carousel.js.map +1 -1
  31. package/dist/base/cascader.js +103 -115
  32. package/dist/base/cascader.js.map +1 -1
  33. package/dist/base/chart.js +1 -1
  34. package/dist/base/choice-inputs.js +3 -3
  35. package/dist/base/code-block.js +1 -1
  36. package/dist/base/combobox.js +1 -1
  37. package/dist/base/command.js +1 -1
  38. package/dist/base/copyable.js +1 -1
  39. package/dist/base/date-pickers.js +2 -2
  40. package/dist/base/display.js +7 -7
  41. package/dist/base/feedback.js +3 -3
  42. package/dist/base/forms-numeric.js +1 -1
  43. package/dist/base/forms.js +2 -2
  44. package/dist/base/inline-edit.js +17 -17
  45. package/dist/base/inline-edit.js.map +1 -1
  46. package/dist/base/item.js +1 -1
  47. package/dist/base/media-gallery.js +1 -1
  48. package/dist/base/metadata-list.js +3 -0
  49. package/dist/base/navigation.js +7 -7
  50. package/dist/base/popover-menu.js +1 -1
  51. package/dist/base/popover.js +1 -1
  52. package/dist/base/qr-code.js +1 -1
  53. package/dist/base/repeaters.js +171 -170
  54. package/dist/base/repeaters.js.map +1 -1
  55. package/dist/base/sheet.js +1 -1
  56. package/dist/base/sidebar.js +1 -1
  57. package/dist/base/signature-pad.js +147 -137
  58. package/dist/base/signature-pad.js.map +1 -1
  59. package/dist/base/skeleton.js +1 -1
  60. package/dist/base/spinner.js +1 -1
  61. package/dist/base/structure.js +1 -1
  62. package/dist/base/table.js +1 -1
  63. package/dist/base/text-inputs.js +2 -2
  64. package/dist/base/toaster.js +2 -2
  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 +2 -2
  69. package/dist/batch-action-bar-BZGDG-Si.js +104 -0
  70. package/dist/batch-action-bar-BZGDG-Si.js.map +1 -0
  71. package/dist/blocks/admin.js +173 -171
  72. package/dist/blocks/admin.js.map +1 -1
  73. package/dist/blocks/ai.js +266 -263
  74. package/dist/blocks/ai.js.map +1 -1
  75. package/dist/blocks/analytics/usage-card.js +1 -1
  76. package/dist/blocks/analytics.js +440 -438
  77. package/dist/blocks/analytics.js.map +1 -1
  78. package/dist/blocks/collaboration.js +1 -1
  79. package/dist/blocks/commerce/receipt.js +1 -1
  80. package/dist/blocks/commerce.js +1945 -1266
  81. package/dist/blocks/commerce.js.map +1 -1
  82. package/dist/blocks/data-display.js +3 -2
  83. package/dist/blocks/onboarding.js +50 -49
  84. package/dist/blocks/onboarding.js.map +1 -1
  85. package/dist/blocks/planning.js +25 -25
  86. package/dist/blocks/planning.js.map +1 -1
  87. package/dist/blocks/timelines.js +1 -1
  88. package/dist/breadcrumbs-D5t7I023.js +129 -0
  89. package/dist/breadcrumbs-D5t7I023.js.map +1 -0
  90. package/dist/{button-R9CCoH7A.js → button-QYwiyhD2.js} +15 -14
  91. package/dist/button-QYwiyhD2.js.map +1 -0
  92. package/dist/{button-BS3KDg00.js → buttons-SbIcm1HJ.js} +200 -213
  93. package/dist/buttons-SbIcm1HJ.js.map +1 -0
  94. package/dist/{cards-QoJ4syG9.js → cards-CiiHpKYd.js} +8 -8
  95. package/dist/cards-CiiHpKYd.js.map +1 -0
  96. package/dist/{chart-DwYRKKc-.js → chart-QfrARkXl.js} +5 -5
  97. package/dist/{chart-DwYRKKc-.js.map → chart-QfrARkXl.js.map} +1 -1
  98. package/dist/checkbox-DhB6K0bK.js +36 -0
  99. package/dist/checkbox-DhB6K0bK.js.map +1 -0
  100. package/dist/choice-inputs-t6w3ATNz.js +766 -0
  101. package/dist/choice-inputs-t6w3ATNz.js.map +1 -0
  102. package/dist/code-block-Dgbu-CU3.js +185 -0
  103. package/dist/code-block-Dgbu-CU3.js.map +1 -0
  104. package/dist/{collapsible-oMUGM4tr.js → collapsible-D8AEGU1-.js} +4 -4
  105. package/dist/{collapsible-oMUGM4tr.js.map → collapsible-D8AEGU1-.js.map} +1 -1
  106. package/dist/{collection-content-Ys-OZOkY.js → collection-content-uK16Grv0.js} +3 -3
  107. package/dist/{collection-content-Ys-OZOkY.js.map → collection-content-uK16Grv0.js.map} +1 -1
  108. package/dist/{combobox-6dvVny2q.js → combobox-2Ic8N9bL.js} +74 -68
  109. package/dist/combobox-2Ic8N9bL.js.map +1 -0
  110. package/dist/{combobox-CB7039j7.js → combobox-DLl0bfiq.js} +307 -305
  111. package/dist/combobox-DLl0bfiq.js.map +1 -0
  112. package/dist/{command-kPMPjIxJ.js → command-kNR20o7x.js} +7 -7
  113. package/dist/{command-kPMPjIxJ.js.map → command-kNR20o7x.js.map} +1 -1
  114. package/dist/{comments-You0Bzbr.js → comments-BpDuCUUu.js} +341 -339
  115. package/dist/comments-BpDuCUUu.js.map +1 -0
  116. package/dist/components/base/action-menu/action-menu.d.ts +21 -4
  117. package/dist/components/base/action-menu/action-menu.recipes.d.ts +21 -0
  118. package/dist/components/base/action-menu/index.d.ts +1 -0
  119. package/dist/components/base/badge/badge.recipes.d.ts +4 -4
  120. package/dist/components/base/batch-action-bar/batch-action-bar.d.ts +50 -0
  121. package/dist/components/base/batch-action-bar/batch-action-bar.strings.d.ts +20 -0
  122. package/dist/components/base/batch-action-bar/index.d.ts +8 -0
  123. package/dist/components/base/buttons/button-group.recipes.d.ts +1 -1
  124. package/dist/components/base/buttons/button.recipes.d.ts +2 -2
  125. package/dist/components/base/choice-inputs/checkbox.d.ts +2 -2
  126. package/dist/components/base/choice-inputs/choice-types.d.ts +18 -6
  127. package/dist/components/base/display/alert-dialog.d.ts +6 -5
  128. package/dist/components/base/display/dialog.d.ts +4 -8
  129. package/dist/components/base/display/icon-badge/icon-badge.d.ts +1 -1
  130. package/dist/components/base/forms/form-sizing.d.ts +15 -12
  131. package/dist/components/base/metadata-list/index.d.ts +12 -0
  132. package/dist/components/{blocks/data-display/metadata → base/metadata-list}/metadata-list.d.ts +28 -25
  133. package/dist/components/{blocks/data-display/metadata → base/metadata-list}/metadata-value.d.ts +2 -2
  134. package/dist/components/base/navigation/index.d.ts +1 -1
  135. package/dist/components/base/navigation/page-header/index.d.ts +1 -0
  136. package/dist/components/base/navigation/page-header/page-header-commands.d.ts +73 -0
  137. package/dist/components/base/navigation/page-header/page-header.d.ts +26 -3
  138. package/dist/components/base/sheet/sheet.d.ts +4 -8
  139. package/dist/components/base/signature-pad/signature-pad.types.d.ts +5 -1
  140. package/dist/components/base/signature-pad/signature-pad.utils.d.ts +11 -3
  141. package/dist/components/base/text-inputs/field-clear-button.d.ts +6 -0
  142. package/dist/components/base/upload/upload.recipes.d.ts +25 -3
  143. package/dist/components/base/value-inputs/index.d.ts +5 -5
  144. package/dist/components/base/value-inputs/tags-input.d.ts +36 -12
  145. package/dist/components/blocks/commerce/address-card/address-card.d.ts +1 -1
  146. package/dist/components/blocks/commerce/address-card/types.d.ts +2 -1
  147. package/dist/components/blocks/commerce/cart-summary/cart-summary.d.ts +3 -1
  148. package/dist/components/blocks/commerce/cart-summary/index.d.ts +2 -2
  149. package/dist/components/blocks/commerce/cart-summary/types.d.ts +6 -1
  150. package/dist/components/blocks/commerce/discount-stack/discount-stack.d.ts +3 -1
  151. package/dist/components/blocks/commerce/discount-stack/index.d.ts +2 -2
  152. package/dist/components/blocks/commerce/discount-stack/types.d.ts +16 -4
  153. package/dist/components/blocks/commerce/fulfillment-group/fulfillment-group.d.ts +5 -0
  154. package/dist/components/blocks/commerce/fulfillment-group/index.d.ts +2 -0
  155. package/dist/components/blocks/commerce/fulfillment-group/types.d.ts +43 -0
  156. package/dist/components/blocks/commerce/index.d.ts +13 -5
  157. package/dist/components/blocks/commerce/invoice-header/invoice-header.d.ts +1 -1
  158. package/dist/components/blocks/commerce/invoice-header/types.d.ts +4 -2
  159. package/dist/components/blocks/commerce/invoice-mini/invoice-mini.d.ts +1 -1
  160. package/dist/components/blocks/commerce/invoice-mini/types.d.ts +2 -1
  161. package/dist/components/blocks/commerce/order-customer/index.d.ts +2 -0
  162. package/dist/components/blocks/commerce/order-customer/order-customer.d.ts +5 -0
  163. package/dist/components/blocks/commerce/order-customer/types.d.ts +48 -0
  164. package/dist/components/blocks/commerce/order-header/index.d.ts +2 -0
  165. package/dist/components/blocks/commerce/order-header/order-header.d.ts +5 -0
  166. package/dist/components/blocks/commerce/order-header/types.d.ts +37 -0
  167. package/dist/components/blocks/commerce/order-line-item/index.d.ts +2 -0
  168. package/dist/components/blocks/commerce/order-line-item/order-line-item.d.ts +5 -0
  169. package/dist/components/blocks/commerce/order-line-item/types.d.ts +46 -0
  170. package/dist/components/blocks/commerce/order-summary/index.d.ts +2 -0
  171. package/dist/components/blocks/commerce/order-summary/order-summary.d.ts +5 -0
  172. package/dist/components/blocks/commerce/order-summary/types.d.ts +42 -0
  173. package/dist/components/blocks/commerce/order-transactions/index.d.ts +2 -0
  174. package/dist/components/blocks/commerce/order-transactions/order-transactions.d.ts +5 -0
  175. package/dist/components/blocks/commerce/order-transactions/types.d.ts +46 -0
  176. package/dist/components/blocks/commerce/payment-method/index.d.ts +2 -2
  177. package/dist/components/blocks/commerce/payment-method/payment-method.d.ts +9 -1
  178. package/dist/components/blocks/commerce/payment-method/types.d.ts +12 -1
  179. package/dist/components/blocks/commerce/refund-status/index.d.ts +2 -2
  180. package/dist/components/blocks/commerce/refund-status/refund-status.d.ts +3 -1
  181. package/dist/components/blocks/commerce/refund-status/types.d.ts +6 -3
  182. package/dist/components/blocks/commerce/shared/address-lines.d.ts +21 -0
  183. package/dist/components/blocks/commerce/shared/line-thumbnail.d.ts +9 -0
  184. package/dist/components/blocks/commerce/shared/order-status.d.ts +51 -0
  185. package/dist/components/blocks/commerce/shipment-tracking/shipment-tracking.d.ts +1 -1
  186. package/dist/components/blocks/commerce/shipment-tracking/types.d.ts +27 -6
  187. package/dist/components/blocks/commerce/summary-panel/amount-row.d.ts +2 -0
  188. package/dist/components/blocks/commerce/summary-panel/index.d.ts +3 -0
  189. package/dist/components/blocks/commerce/summary-panel/summary-panel.d.ts +2 -0
  190. package/dist/components/blocks/commerce/summary-panel/types.d.ts +26 -0
  191. package/dist/components/blocks/commerce/tax-breakdown/tax-breakdown.d.ts +1 -1
  192. package/dist/components/blocks/commerce/tax-breakdown/types.d.ts +2 -1
  193. package/dist/components/blocks/data-display/metadata/index.d.ts +30 -4
  194. package/dist/components/features/activities/partials/activity-row.d.ts +6 -2
  195. package/dist/components/features/activities/partials/tone-tokens.d.ts +0 -6
  196. package/dist/components/features/global-search/partials/global-search-group-heading.d.ts +15 -0
  197. package/dist/components/features/global-search/partials/tone-palettes.d.ts +0 -5
  198. package/dist/components/features/kanban/kanban.d.ts +1 -1
  199. package/dist/components/features/kanban/kanban.strings.d.ts +1 -1
  200. package/dist/components/features/kanban/kanban.types.d.ts +2 -2
  201. package/dist/components/features/media-library/hooks/use-media-library.d.ts +1 -1
  202. package/dist/components/features/media-library/index.d.ts +1 -1
  203. package/dist/components/features/media-library/media-library.d.ts +1 -1
  204. package/dist/components/features/media-library/media-library.strings.d.ts +4 -0
  205. package/dist/components/features/media-library/media-library.types.d.ts +74 -1
  206. package/dist/components/features/media-library/partials/media-library-partials.d.ts +3 -3
  207. package/dist/components/features/mentions/partials/mention-kind-toggles.d.ts +16 -0
  208. package/dist/components/features/overlays/alert-dialog.d.ts +1 -1
  209. package/dist/components/features/overlays/dialog.d.ts +1 -1
  210. package/dist/components/features/overlays/index.d.ts +1 -1
  211. package/dist/components/features/overlays/overlay-tone-icon.d.ts +3 -3
  212. package/dist/components/features/overlays/overlays.types.d.ts +20 -0
  213. package/dist/components/features/products/components/product-contract-overview.d.ts +5 -0
  214. package/dist/components/features/products/components/product-details-card.d.ts +5 -0
  215. package/dist/components/features/products/components/product-operations-card.d.ts +5 -0
  216. package/dist/components/features/products/components/product-option-action-menu.d.ts +5 -0
  217. package/dist/components/features/products/components/product-options-summary.d.ts +5 -0
  218. package/dist/components/features/products/components/product-policies-card.d.ts +5 -0
  219. package/dist/components/features/products/components/product-quote-preview-card.d.ts +5 -0
  220. package/dist/components/features/products/components/product-readiness-card.d.ts +5 -0
  221. package/dist/components/features/products/components/product-structure-card.d.ts +5 -0
  222. package/dist/components/features/products/components/product-variant-action-menu.d.ts +23 -1
  223. package/dist/components/features/products/products.types.d.ts +9 -2
  224. package/dist/components/features/resource/index.d.ts +1 -1
  225. package/dist/components/features/resource/resource.d.ts +1 -1
  226. package/dist/components/features/resource/resource.types.d.ts +34 -6
  227. package/dist/components/features/rich-text-editor/index.d.ts +2 -1
  228. package/dist/components/features/rich-text-editor/partials/image-nodes.d.ts +13 -0
  229. package/dist/components/features/rich-text-editor/partials/image-uploads.d.ts +66 -0
  230. package/dist/components/features/rich-text-editor/partials/inline-reference-node.d.ts +19 -0
  231. package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +1 -1
  232. package/dist/components/features/rich-text-editor/rich-text-editor.strings.d.ts +14 -0
  233. package/dist/components/features/rich-text-editor/rich-text-editor.types.d.ts +45 -0
  234. package/dist/components/features/rich-text-editor/use-rich-text-images.d.ts +18 -0
  235. package/dist/components/features/sync/index.d.ts +26 -3
  236. package/dist/components/features/table/data-table.d.ts +1 -1
  237. package/dist/components/features/table/table.types.d.ts +32 -7
  238. package/dist/components/layout/page/index.d.ts +1 -1
  239. package/dist/components/layout/page/page.types.d.ts +33 -36
  240. package/dist/components/layout/page/partials/page-actions.d.ts +1 -0
  241. package/dist/components/layout/page/partials/page-header.d.ts +1 -1
  242. package/dist/components/layout/settings/settings.d.ts +16 -2
  243. package/dist/components/layout/workspace/workspace.types.d.ts +21 -4
  244. package/dist/components/typography/rich-text/index.d.ts +1 -1
  245. package/dist/components/typography/rich-text/rich-text-tree.d.ts +19 -0
  246. package/dist/components/typography/rich-text/rich-text.d.ts +16 -0
  247. package/dist/components/typography/text-link.d.ts +4 -3
  248. package/dist/components/ui/checkbox.d.ts +4 -3
  249. package/dist/components/ui/overlay.recipes.d.ts +0 -9
  250. package/dist/components/ui/switch.d.ts +2 -2
  251. package/dist/{containers-D_L4mTVb.js → containers-DmWiJa2I.js} +36 -35
  252. package/dist/containers-DmWiJa2I.js.map +1 -0
  253. package/dist/{copyable-DDjTeW_j.js → copyable-B3Gwgdqc.js} +6 -6
  254. package/dist/{copyable-DDjTeW_j.js.map → copyable-B3Gwgdqc.js.map} +1 -1
  255. package/dist/data-display-DafIvCl5.js +960 -0
  256. package/dist/data-display-DafIvCl5.js.map +1 -0
  257. package/dist/{date-uf3z37Nm.js → date-BgK3bTdo.js} +5 -5
  258. package/dist/{date-uf3z37Nm.js.map → date-BgK3bTdo.js.map} +1 -1
  259. package/dist/date-picker-CF-DtUpF.js +1529 -0
  260. package/dist/date-picker-CF-DtUpF.js.map +1 -0
  261. package/dist/{date-pickers-CnFCb0n2.js → date-pickers-BmzxJl5l.js} +19 -19
  262. package/dist/{date-pickers-CnFCb0n2.js.map → date-pickers-BmzxJl5l.js.map} +1 -1
  263. package/dist/{display-DrdvPwF0.js → display-DsQTVzMz.js} +88 -87
  264. package/dist/display-DsQTVzMz.js.map +1 -0
  265. package/dist/{dropdown-menu-CURh59jb.js → dropdown-menu-E2qmdC7o.js} +7 -7
  266. package/dist/{dropdown-menu-CURh59jb.js.map → dropdown-menu-E2qmdC7o.js.map} +1 -1
  267. package/dist/features/activities.js +414 -501
  268. package/dist/features/activities.js.map +1 -1
  269. package/dist/features/ai-chat.js +170 -169
  270. package/dist/features/ai-chat.js.map +1 -1
  271. package/dist/features/async-preview.js +8 -8
  272. package/dist/features/async-preview.js.map +1 -1
  273. package/dist/features/combobox.js +1 -1
  274. package/dist/features/comments.js +1 -1
  275. package/dist/features/data-view.js +139 -138
  276. package/dist/features/data-view.js.map +1 -1
  277. package/dist/features/email-composer/engine.js +1 -1
  278. package/dist/features/email-composer.js +73 -71
  279. package/dist/features/email-composer.js.map +1 -1
  280. package/dist/features/event-calendar.js +278 -275
  281. package/dist/features/event-calendar.js.map +1 -1
  282. package/dist/features/filters.js +1 -1
  283. package/dist/features/global-search.js +307 -310
  284. package/dist/features/global-search.js.map +1 -1
  285. package/dist/features/kanban.js +95 -97
  286. package/dist/features/kanban.js.map +1 -1
  287. package/dist/features/map.js +56 -57
  288. package/dist/features/map.js.map +1 -1
  289. package/dist/features/media-library.js +918 -825
  290. package/dist/features/media-library.js.map +1 -1
  291. package/dist/features/mentions.js +1 -1
  292. package/dist/features/overlays.js +1 -1
  293. package/dist/features/products.js +1115 -1122
  294. package/dist/features/products.js.map +1 -1
  295. package/dist/features/questionnaire.js +202 -194
  296. package/dist/features/questionnaire.js.map +1 -1
  297. package/dist/features/resource-assignment.js +25 -25
  298. package/dist/features/resource-assignment.js.map +1 -1
  299. package/dist/features/resource.js +77 -69
  300. package/dist/features/resource.js.map +1 -1
  301. package/dist/features/rich-text-editor.js +30 -11
  302. package/dist/features/rich-text-editor.js.map +1 -1
  303. package/dist/features/schema-form.js +33 -33
  304. package/dist/features/schema-form.js.map +1 -1
  305. package/dist/features/suggestions.js +3 -3
  306. package/dist/features/sync.js +3 -3
  307. package/dist/features/table.js +1 -1
  308. package/dist/features/theme-tweaker.js +397 -396
  309. package/dist/features/theme-tweaker.js.map +1 -1
  310. package/dist/{feedback-C7nR0UtT.js → feedback-qNuMBtRH.js} +84 -83
  311. package/dist/feedback-qNuMBtRH.js.map +1 -0
  312. package/dist/{field-affordance-recipes-CkOCdE2y.js → field-affordance-recipes-qQeIf4lG.js} +8 -6
  313. package/dist/field-affordance-recipes-qQeIf4lG.js.map +1 -0
  314. package/dist/field-state-recipes-BVA2CWHo.js +12 -0
  315. package/dist/field-state-recipes-BVA2CWHo.js.map +1 -0
  316. package/dist/{filters-Da-gNPsE.js → filters-BkHH53uv.js} +565 -563
  317. package/dist/filters-BkHH53uv.js.map +1 -0
  318. package/dist/focus-recipes-B653VaLq.js +12 -0
  319. package/dist/focus-recipes-B653VaLq.js.map +1 -0
  320. package/dist/{form-field-VZRULhUK.js → form-field-DUt4UxSV.js} +4 -4
  321. package/dist/{form-field-VZRULhUK.js.map → form-field-DUt4UxSV.js.map} +1 -1
  322. package/dist/{form-sizing-uWP4lzVh.js → form-sizing-By94KzXE.js} +19 -15
  323. package/dist/form-sizing-By94KzXE.js.map +1 -0
  324. package/dist/{forms-DDeEnXSY.js → forms-Bzha-Y3B.js} +22 -22
  325. package/dist/{forms-DDeEnXSY.js.map → forms-Bzha-Y3B.js.map} +1 -1
  326. package/dist/{forms-numeric-D3CO60IF.js → forms-numeric-C0bvjRPZ.js} +265 -264
  327. package/dist/forms-numeric-C0bvjRPZ.js.map +1 -0
  328. package/dist/{header-2ycNqGOR.js → header-BOefOKd1.js} +47 -51
  329. package/dist/header-BOefOKd1.js.map +1 -0
  330. package/dist/{hooks-DQ5SPwZw.js → hooks-9k_TtmKh.js} +2 -2
  331. package/dist/{hooks-DQ5SPwZw.js.map → hooks-9k_TtmKh.js.map} +1 -1
  332. package/dist/{http-CdEIHyQf.js → http-D_6rOnzU.js} +2 -2
  333. package/dist/{http-CdEIHyQf.js.map → http-D_6rOnzU.js.map} +1 -1
  334. package/dist/icon-badge-CAuKupo9.js +55 -0
  335. package/dist/icon-badge-CAuKupo9.js.map +1 -0
  336. package/dist/index.js +7 -7
  337. package/dist/input-DWhBBBww.js +262 -0
  338. package/dist/input-DWhBBBww.js.map +1 -0
  339. package/dist/{input-BoLm9Hks.js → input-Ddi_LSYv.js} +3 -3
  340. package/dist/{input-BoLm9Hks.js.map → input-Ddi_LSYv.js.map} +1 -1
  341. package/dist/interaction-recipes-CHr0dJUs.js +24 -0
  342. package/dist/interaction-recipes-CHr0dJUs.js.map +1 -0
  343. package/dist/{item-xzh8Df65.js → item-DEmDiTlD.js} +98 -97
  344. package/dist/item-DEmDiTlD.js.map +1 -0
  345. package/dist/layer-recipes-CCpklYME.js +13 -0
  346. package/dist/layer-recipes-CCpklYME.js.map +1 -0
  347. package/dist/layout/app-shell.js +1 -1
  348. package/dist/layout/auth.js +1 -1
  349. package/dist/layout/containers.js +1 -1
  350. package/dist/layout/header.js +1 -1
  351. package/dist/layout/hooks.js +1 -1
  352. package/dist/layout/navigation.js +1 -1
  353. package/dist/layout/page.js +1 -1
  354. package/dist/layout/settings.js +1 -1
  355. package/dist/layout/sidebar.js +2 -2
  356. package/dist/layout/workspace.js +1 -1
  357. package/dist/layout.js +10 -10
  358. package/dist/lib/affordance-geometry.generated.d.ts +1 -0
  359. package/dist/lib/field-affordance-recipes.d.ts +6 -1
  360. package/dist/lib/field-state-recipes.d.ts +9 -8
  361. package/dist/lib/focus-recipes.d.ts +24 -0
  362. package/dist/lib/interaction-recipes.d.ts +35 -0
  363. package/dist/lib/layer-recipes.d.ts +19 -0
  364. package/dist/lib/motion-recipes.d.ts +1 -0
  365. package/dist/lib/overlay-anatomy-recipes.d.ts +1 -0
  366. package/dist/lib/safe-image-src.d.ts +10 -0
  367. package/dist/lib/sanitize-html.d.ts +15 -3
  368. package/dist/lib/surface-recipes.d.ts +47 -7
  369. package/dist/lib/token-merge.generated.d.ts +9 -6
  370. package/dist/lib/tone-recipes.d.ts +79 -0
  371. package/dist/lib/ui-provider/hooks.d.ts +2 -1
  372. package/dist/lib/ui-provider/index.d.ts +2 -2
  373. package/dist/lib/ui-provider/types.d.ts +9 -0
  374. package/dist/lib/utils.js +1 -1
  375. package/dist/media-gallery-DcTtAaeC.js +203 -0
  376. package/dist/media-gallery-DcTtAaeC.js.map +1 -0
  377. package/dist/mentions-D-uyCh01.js +568 -0
  378. package/dist/mentions-D-uyCh01.js.map +1 -0
  379. package/dist/{message-YfFmbXNP.js → message-CdHgIWKf.js} +5 -5
  380. package/dist/{message-YfFmbXNP.js.map → message-CdHgIWKf.js.map} +1 -1
  381. package/dist/metadata-list-X5rYAKSB.js +394 -0
  382. package/dist/metadata-list-X5rYAKSB.js.map +1 -0
  383. package/dist/{motion-recipes-B6jKXEcN.js → motion-recipes-ChBg4HBq.js} +3 -2
  384. package/dist/{motion-recipes-B6jKXEcN.js.map → motion-recipes-ChBg4HBq.js.map} +1 -1
  385. package/dist/navigation-D3KwXmaq.js +145 -0
  386. package/dist/navigation-D3KwXmaq.js.map +1 -0
  387. package/dist/navigation-HJf5zxlH.js +268 -0
  388. package/dist/navigation-HJf5zxlH.js.map +1 -0
  389. package/dist/{navigation-row-recipes-DlU-4QYO.js → navigation-row-recipes-BVowojQw.js} +2 -2
  390. package/dist/{navigation-row-recipes-DlU-4QYO.js.map → navigation-row-recipes-BVowojQw.js.map} +1 -1
  391. package/dist/{number-CKRBYmZK.js → number-DMhe-Vsk.js} +5 -5
  392. package/dist/{number-CKRBYmZK.js.map → number-DMhe-Vsk.js.map} +1 -1
  393. package/dist/overflow-tab-bar-sQHXLlwQ.js +280 -0
  394. package/dist/overflow-tab-bar-sQHXLlwQ.js.map +1 -0
  395. package/dist/overlay.recipes-8GHqmlb4.js +6 -0
  396. package/dist/overlay.recipes-8GHqmlb4.js.map +1 -0
  397. package/dist/overlays-I0axtYA6.js +999 -0
  398. package/dist/overlays-I0axtYA6.js.map +1 -0
  399. package/dist/page-B5dTH9gE.js +224 -0
  400. package/dist/page-B5dTH9gE.js.map +1 -0
  401. package/dist/page-header-commands-DjzFEq3E.js +126 -0
  402. package/dist/page-header-commands-DjzFEq3E.js.map +1 -0
  403. package/dist/{pagination-Cm0jqa3I.js → pagination-3bPA_a6K.js} +15 -15
  404. package/dist/{pagination-Cm0jqa3I.js.map → pagination-3bPA_a6K.js.map} +1 -1
  405. package/dist/{popover-Dcv_9jxr.js → popover-Di55PyAI.js} +8 -8
  406. package/dist/popover-Di55PyAI.js.map +1 -0
  407. package/dist/{popover-menu-DnRFKnHP.js → popover-menu-B71Tn2Qz.js} +6 -6
  408. package/dist/{popover-menu-DnRFKnHP.js.map → popover-menu-B71Tn2Qz.js.map} +1 -1
  409. package/dist/{popover.recipes-wmbvL8Ah.js → popover.recipes-Bdyhj2db.js} +2 -2
  410. package/dist/{popover.recipes-wmbvL8Ah.js.map → popover.recipes-Bdyhj2db.js.map} +1 -1
  411. package/dist/{primitives-BHrwQXFC.js → primitives-B-CkiEMU.js} +5 -5
  412. package/dist/{primitives-BHrwQXFC.js.map → primitives-B-CkiEMU.js.map} +1 -1
  413. package/dist/primitives.js +4 -4
  414. package/dist/{progress-Br9WTFya.js → progress-rnS8-uAW.js} +9 -9
  415. package/dist/{progress-Br9WTFya.js.map → progress-rnS8-uAW.js.map} +1 -1
  416. package/dist/{receipt-CV89q1fs.js → receipt-D0oswZ0p.js} +6 -6
  417. package/dist/{receipt-CV89q1fs.js.map → receipt-D0oswZ0p.js.map} +1 -1
  418. package/dist/rich-text-DvGulsNJ.js +78 -0
  419. package/dist/rich-text-DvGulsNJ.js.map +1 -0
  420. package/dist/rich-text-editor-sMU_Scqm.js +1204 -0
  421. package/dist/rich-text-editor-sMU_Scqm.js.map +1 -0
  422. package/dist/rich-text-editor.recipes-CadiF_Uu.js +88 -0
  423. package/dist/rich-text-editor.recipes-CadiF_Uu.js.map +1 -0
  424. package/dist/rich-text-editor.strings-CB59ekH2.js +38 -0
  425. package/dist/rich-text-editor.strings-CB59ekH2.js.map +1 -0
  426. package/dist/safe-image-src-C6kQSMBZ.js +17 -0
  427. package/dist/safe-image-src-C6kQSMBZ.js.map +1 -0
  428. package/dist/sanitize-html-DsQmI48u.js +92 -0
  429. package/dist/sanitize-html-DsQmI48u.js.map +1 -0
  430. package/dist/scroll-area-Bt_vXY2b.js +48 -0
  431. package/dist/scroll-area-Bt_vXY2b.js.map +1 -0
  432. package/dist/{separator-Do5GWDYi.js → separator-C8DlRGwF.js} +3 -3
  433. package/dist/{separator-Do5GWDYi.js.map → separator-C8DlRGwF.js.map} +1 -1
  434. package/dist/{separator-BMEvwnSX.js → separator-CYHnjsAb.js} +2 -2
  435. package/dist/{separator-BMEvwnSX.js.map → separator-CYHnjsAb.js.map} +1 -1
  436. package/dist/services/actions/action-adapters.d.ts +18 -0
  437. package/dist/services/actions/index.d.ts +1 -1
  438. package/dist/services/actions.js +16 -4
  439. package/dist/services/actions.js.map +1 -1
  440. package/dist/settings-CQW3b-Cu.js +170 -0
  441. package/dist/settings-CQW3b-Cu.js.map +1 -0
  442. package/dist/sheet-4SEvVYzA.js +210 -0
  443. package/dist/sheet-4SEvVYzA.js.map +1 -0
  444. package/dist/{sidebar-Crc9M9JV.js → sidebar-C7WWR29L.js} +180 -179
  445. package/dist/sidebar-C7WWR29L.js.map +1 -0
  446. package/dist/{sidebar-Cb8WzOvE.js → sidebar-d7Dg80ln.js} +16 -16
  447. package/dist/sidebar-d7Dg80ln.js.map +1 -0
  448. package/dist/{skeleton-DVMXr15h.js → skeleton-Cz890JZF.js} +9 -9
  449. package/dist/{skeleton-DVMXr15h.js.map → skeleton-Cz890JZF.js.map} +1 -1
  450. package/dist/smart-card-lFKxn5Hu.js +595 -0
  451. package/dist/smart-card-lFKxn5Hu.js.map +1 -0
  452. package/dist/{spinner-CmTAbEp0.js → spinner-fa3h1Aif.js} +7 -7
  453. package/dist/{spinner-CmTAbEp0.js.map → spinner-fa3h1Aif.js.map} +1 -1
  454. package/dist/{structure-hzCW-XsV.js → structure-DC2dygdA.js} +2 -2
  455. package/dist/{structure-hzCW-XsV.js.map → structure-DC2dygdA.js.map} +1 -1
  456. package/dist/style.css +1 -1
  457. package/dist/surface-recipes-BKRVW8Os.js +43 -0
  458. package/dist/surface-recipes-BKRVW8Os.js.map +1 -0
  459. package/dist/{table-D6zKeYQX.js → table-CIKyLUsy.js} +59 -58
  460. package/dist/table-CIKyLUsy.js.map +1 -0
  461. package/dist/table-CrcLN9Io.js +1458 -0
  462. package/dist/table-CrcLN9Io.js.map +1 -0
  463. package/dist/{tabs-Dk8E_knt.js → tabs-DwBJfjxX.js} +58 -57
  464. package/dist/tabs-DwBJfjxX.js.map +1 -0
  465. package/dist/{text-inputs-BFpku0Qd.js → text-inputs-aaK9wcDT.js} +74 -79
  466. package/dist/text-inputs-aaK9wcDT.js.map +1 -0
  467. package/dist/theme.css +3 -3
  468. package/dist/{timelines-CxuAFIc2.js → timelines-C_SBwHNP.js} +153 -150
  469. package/dist/timelines-C_SBwHNP.js.map +1 -0
  470. package/dist/tone-recipes-CPoExcTE.js +70 -0
  471. package/dist/tone-recipes-CPoExcTE.js.map +1 -0
  472. package/dist/tooltip-CsfgrfS7.js +111 -0
  473. package/dist/tooltip-CsfgrfS7.js.map +1 -0
  474. package/dist/{tree-BotPlyiD.js → tree-BiKhg8AY.js} +68 -66
  475. package/dist/tree-BiKhg8AY.js.map +1 -0
  476. package/dist/typography/rich-text.js +1 -1
  477. package/dist/typography-DTRkE9zL.js +117 -0
  478. package/dist/typography-DTRkE9zL.js.map +1 -0
  479. package/dist/typography.js +1 -1
  480. package/dist/{ui-provider-D2_TeLqw.js → ui-provider-1D_NSYzO.js} +11 -3
  481. package/dist/ui-provider-1D_NSYzO.js.map +1 -0
  482. package/dist/ui-provider.js +3 -3
  483. package/dist/{upload-B0WHW7ak.js → upload-BO8-CLN6.js} +209 -209
  484. package/dist/upload-BO8-CLN6.js.map +1 -0
  485. package/dist/{upload-queue-BHZ_wBfd.js → upload-queue-EOC8g1gf.js} +109 -111
  486. package/dist/upload-queue-EOC8g1gf.js.map +1 -0
  487. package/dist/upload.recipes-BbxTqrCT.js +61 -0
  488. package/dist/upload.recipes-BbxTqrCT.js.map +1 -0
  489. package/dist/{usage-card-U0YBLTNT.js → usage-card-obRaBskq.js} +46 -46
  490. package/dist/{usage-card-U0YBLTNT.js.map → usage-card-obRaBskq.js.map} +1 -1
  491. package/dist/{utils-Cospvlj1.js → utils-l5LpDw2z.js} +56 -24
  492. package/dist/utils-l5LpDw2z.js.map +1 -0
  493. package/dist/value-inputs-TAYMX111.js +947 -0
  494. package/dist/value-inputs-TAYMX111.js.map +1 -0
  495. package/dist/{value-typography-Deb3yQZg.js → value-typography-b8wpz1eX.js} +2 -2
  496. package/dist/{value-typography-Deb3yQZg.js.map → value-typography-b8wpz1eX.js.map} +1 -1
  497. package/dist/workspace-DH0v0KcB.js +407 -0
  498. package/dist/workspace-DH0v0KcB.js.map +1 -0
  499. package/docs/consumer-skill/SKILL.md +19 -20
  500. package/docs/consumer-skill/examples/app-layout.tsx +1 -1
  501. package/docs/consumer-skill/examples/composition.tsx +3 -3
  502. package/docs/consumer-skill/examples/detail.tsx +59 -12
  503. package/docs/consumer-skill/examples/edit.tsx +1 -1
  504. package/docs/consumer-skill/examples/receipt.tsx +2 -2
  505. package/docs/consumer-skill/examples/scoped-directory.tsx +1 -1
  506. package/docs/consumer-skill/examples/website.tsx +1 -1
  507. package/docs/consumer-skill/references/agents-md.md +33 -0
  508. package/docs/consumer-skill/references/analytics.md +1 -1
  509. package/docs/consumer-skill/references/composition.md +51 -8
  510. package/docs/consumer-skill/references/design-contract.md +12 -3
  511. package/docs/consumer-skill/references/installation.md +11 -1
  512. package/docs/consumer-skill/references/public-api.json +847 -447
  513. package/docs/consumer-skill/references/review.md +25 -5
  514. package/docs/consumer-skill/references/theming.md +8 -4
  515. package/docs/consumer-skill/references/tokens.json +1 -1
  516. package/docs/consumer-skill/references/workflows.md +29 -10
  517. package/docs/consumer-skill/scripts/composition-policy.mjs +41 -11
  518. package/docs/consumer-skill/scripts/surface-policy.mjs +139 -5
  519. package/package.json +10 -2
  520. package/dist/accordion-CQXVcd7Q.js.map +0 -1
  521. package/dist/action-menu-BTpyPWJ2.js +0 -264
  522. package/dist/action-menu-BTpyPWJ2.js.map +0 -1
  523. package/dist/affordance-geometry.generated-CCIXb2A1.js.map +0 -1
  524. package/dist/ai-artifact-2PQ2fItc.js.map +0 -1
  525. package/dist/attachment-q69dlt5Y.js +0 -244
  526. package/dist/attachment-q69dlt5Y.js.map +0 -1
  527. package/dist/auth-M3vGMgDR.js.map +0 -1
  528. package/dist/avatar-djdaaQ_s.js.map +0 -1
  529. package/dist/badge-0tATj-tW.js +0 -92
  530. package/dist/badge-0tATj-tW.js.map +0 -1
  531. package/dist/breadcrumbs-BG_FfMK4.js +0 -128
  532. package/dist/breadcrumbs-BG_FfMK4.js.map +0 -1
  533. package/dist/button-BS3KDg00.js.map +0 -1
  534. package/dist/button-R9CCoH7A.js.map +0 -1
  535. package/dist/buttons-DS0ZIwJ_.js +0 -99
  536. package/dist/buttons-DS0ZIwJ_.js.map +0 -1
  537. package/dist/cards-QoJ4syG9.js.map +0 -1
  538. package/dist/checkbox-B7ygNTYp.js +0 -35
  539. package/dist/checkbox-B7ygNTYp.js.map +0 -1
  540. package/dist/choice-inputs-DrJ17tpL.js +0 -752
  541. package/dist/choice-inputs-DrJ17tpL.js.map +0 -1
  542. package/dist/code-block-CD0B7M93.js +0 -183
  543. package/dist/code-block-CD0B7M93.js.map +0 -1
  544. package/dist/combobox-6dvVny2q.js.map +0 -1
  545. package/dist/combobox-CB7039j7.js.map +0 -1
  546. package/dist/comments-You0Bzbr.js.map +0 -1
  547. package/dist/components/layout/page/partials/page-header-commands.d.ts +0 -13
  548. package/dist/containers-D_L4mTVb.js.map +0 -1
  549. package/dist/data-display-3xWQUnMA.js +0 -1335
  550. package/dist/data-display-3xWQUnMA.js.map +0 -1
  551. package/dist/date-picker-DrDFj8Lo.js +0 -1527
  552. package/dist/date-picker-DrDFj8Lo.js.map +0 -1
  553. package/dist/display-DrdvPwF0.js.map +0 -1
  554. package/dist/feedback-C7nR0UtT.js.map +0 -1
  555. package/dist/field-affordance-recipes-CkOCdE2y.js.map +0 -1
  556. package/dist/field-state-recipes-C-MFBX_8.js +0 -11
  557. package/dist/field-state-recipes-C-MFBX_8.js.map +0 -1
  558. package/dist/filters-Da-gNPsE.js.map +0 -1
  559. package/dist/form-sizing-uWP4lzVh.js.map +0 -1
  560. package/dist/forms-numeric-D3CO60IF.js.map +0 -1
  561. package/dist/header-2ycNqGOR.js.map +0 -1
  562. package/dist/icon-badge-DKlaKXoo.js +0 -53
  563. package/dist/icon-badge-DKlaKXoo.js.map +0 -1
  564. package/dist/input-DhQdBnV3.js +0 -255
  565. package/dist/input-DhQdBnV3.js.map +0 -1
  566. package/dist/item-xzh8Df65.js.map +0 -1
  567. package/dist/media-gallery-DQUQ0m3O.js +0 -201
  568. package/dist/media-gallery-DQUQ0m3O.js.map +0 -1
  569. package/dist/mentions-DwnO1hh4.js +0 -564
  570. package/dist/mentions-DwnO1hh4.js.map +0 -1
  571. package/dist/navigation-Cbp5V8gG.js +0 -264
  572. package/dist/navigation-Cbp5V8gG.js.map +0 -1
  573. package/dist/navigation-Cs1npsPm.js +0 -300
  574. package/dist/navigation-Cs1npsPm.js.map +0 -1
  575. package/dist/overlay.recipes-CNO2S9V6.js +0 -34
  576. package/dist/overlay.recipes-CNO2S9V6.js.map +0 -1
  577. package/dist/overlays-DhZO7N-I.js +0 -994
  578. package/dist/overlays-DhZO7N-I.js.map +0 -1
  579. package/dist/page-C6R_8jFt.js +0 -325
  580. package/dist/page-C6R_8jFt.js.map +0 -1
  581. package/dist/page-header-hUTzcRZX.js +0 -112
  582. package/dist/page-header-hUTzcRZX.js.map +0 -1
  583. package/dist/popover-Dcv_9jxr.js.map +0 -1
  584. package/dist/rich-text-editor-CF8QYt5p.js +0 -574
  585. package/dist/rich-text-editor-CF8QYt5p.js.map +0 -1
  586. package/dist/rich-text-editor.recipes-CnrbmTS1.js +0 -81
  587. package/dist/rich-text-editor.recipes-CnrbmTS1.js.map +0 -1
  588. package/dist/rich-text-editor.strings-BpnIQgMl.js +0 -25
  589. package/dist/rich-text-editor.strings-BpnIQgMl.js.map +0 -1
  590. package/dist/rich-text-j-FGAeZW.js +0 -32
  591. package/dist/rich-text-j-FGAeZW.js.map +0 -1
  592. package/dist/sanitize-html-BG9FGe-j.js +0 -64
  593. package/dist/sanitize-html-BG9FGe-j.js.map +0 -1
  594. package/dist/scroll-area-DRdr16Pt.js +0 -47
  595. package/dist/scroll-area-DRdr16Pt.js.map +0 -1
  596. package/dist/settings-DHk0L2MF.js +0 -161
  597. package/dist/settings-DHk0L2MF.js.map +0 -1
  598. package/dist/sheet-DRFNY1_D.js +0 -207
  599. package/dist/sheet-DRFNY1_D.js.map +0 -1
  600. package/dist/sidebar-Cb8WzOvE.js.map +0 -1
  601. package/dist/sidebar-Crc9M9JV.js.map +0 -1
  602. package/dist/smart-card-Bek-TwUp.js +0 -599
  603. package/dist/smart-card-Bek-TwUp.js.map +0 -1
  604. package/dist/surface-recipes-DOdoBXGm.js +0 -28
  605. package/dist/surface-recipes-DOdoBXGm.js.map +0 -1
  606. package/dist/table-D6zKeYQX.js.map +0 -1
  607. package/dist/table-Dn4XSrSB.js +0 -1444
  608. package/dist/table-Dn4XSrSB.js.map +0 -1
  609. package/dist/tabs-Dk8E_knt.js.map +0 -1
  610. package/dist/text-inputs-BFpku0Qd.js.map +0 -1
  611. package/dist/timelines-CxuAFIc2.js.map +0 -1
  612. package/dist/tree-BotPlyiD.js.map +0 -1
  613. package/dist/typography-CAr3dQhX.js +0 -116
  614. package/dist/typography-CAr3dQhX.js.map +0 -1
  615. package/dist/ui-provider-D2_TeLqw.js.map +0 -1
  616. package/dist/upload-B0WHW7ak.js.map +0 -1
  617. package/dist/upload-queue-BHZ_wBfd.js.map +0 -1
  618. package/dist/use-file-drop-target-BX7GnhoQ.js +0 -39
  619. package/dist/use-file-drop-target-BX7GnhoQ.js.map +0 -1
  620. package/dist/utils-Cospvlj1.js.map +0 -1
  621. package/dist/value-inputs-CjfzGMsN.js +0 -854
  622. package/dist/value-inputs-CjfzGMsN.js.map +0 -1
  623. package/dist/workspace-YoFjXi6i.js +0 -394
  624. package/dist/workspace-YoFjXi6i.js.map +0 -1
  625. /package/dist/components/{blocks/data-display/metadata → base/metadata-list}/metadata-list.strings.d.ts +0 -0
@@ -1,1444 +0,0 @@
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