themelia-react-ui 1.0.0 → 1.0.2

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