themelia-react-ui 2.0.1 → 2.0.3

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 (490) hide show
  1. package/CHANGELOG.md +317 -131
  2. package/README.md +25 -9
  3. package/THIRD_PARTY_NOTICES.md +7 -0
  4. package/dist/{accordion-B6a3vVgA.js → accordion-Cjb6sx0G.js} +14 -13
  5. package/dist/accordion-Cjb6sx0G.js.map +1 -0
  6. package/dist/action-menu-CllU52Mm.js +280 -0
  7. package/dist/action-menu-CllU52Mm.js.map +1 -0
  8. package/dist/affordance-geometry.generated-tF36bREk.js +140 -0
  9. package/dist/affordance-geometry.generated-tF36bREk.js.map +1 -0
  10. package/dist/ai-artifact-DvTwDVyL.js +1148 -0
  11. package/dist/ai-artifact-DvTwDVyL.js.map +1 -0
  12. package/dist/{app-shell-ZK5RWdo6.js → app-shell-C4FhvCqF.js} +5 -5
  13. package/dist/{app-shell-ZK5RWdo6.js.map → app-shell-C4FhvCqF.js.map} +1 -1
  14. package/dist/attachment-BxDfL2mw.js +246 -0
  15. package/dist/attachment-BxDfL2mw.js.map +1 -0
  16. package/dist/{auth-CYxKfo69.js → auth-BGua8ouh.js} +58 -54
  17. package/dist/auth-BGua8ouh.js.map +1 -0
  18. package/dist/{avatar-BBnEJIx8.js → avatar-DAPlDvhJ.js} +7 -7
  19. package/dist/avatar-DAPlDvhJ.js.map +1 -0
  20. package/dist/{badge-MrKVNzW9.js → badge-HpFqoqSY.js} +40 -40
  21. package/dist/badge-HpFqoqSY.js.map +1 -0
  22. package/dist/base/accordion.js +1 -1
  23. package/dist/base/action-menu.js +1 -1
  24. package/dist/base/attachment.js +1 -1
  25. package/dist/base/avatar.js +1 -1
  26. package/dist/base/badge.js +1 -1
  27. package/dist/base/batch-action-bar.js +1 -1
  28. package/dist/base/buttons.js +1 -1
  29. package/dist/base/cards.js +2 -2
  30. package/dist/base/carousel.js +40 -36
  31. package/dist/base/carousel.js.map +1 -1
  32. package/dist/base/cascader.js +92 -92
  33. package/dist/base/cascader.js.map +1 -1
  34. package/dist/base/chart.js +1 -1
  35. package/dist/base/choice-inputs.js +2 -2
  36. package/dist/base/code-block.js +1 -1
  37. package/dist/base/combobox.js +2 -2
  38. package/dist/base/command.js +1 -1
  39. package/dist/base/copyable.js +1 -1
  40. package/dist/base/date-pickers.js +2 -2
  41. package/dist/base/display.js +6 -6
  42. package/dist/base/feedback.js +3 -3
  43. package/dist/base/forms-numeric.js +1 -1
  44. package/dist/base/forms.js +2 -2
  45. package/dist/base/inline-edit.js +14 -14
  46. package/dist/base/inline-edit.js.map +1 -1
  47. package/dist/base/item.js +1 -1
  48. package/dist/base/media-gallery.js +1 -1
  49. package/dist/base/metadata-list.js +1 -1
  50. package/dist/base/navigation.js +6 -6
  51. package/dist/base/popover-menu.js +1 -1
  52. package/dist/base/popover.js +1 -1
  53. package/dist/base/qr-code.js +1 -1
  54. package/dist/base/repeaters.js +171 -176
  55. package/dist/base/repeaters.js.map +1 -1
  56. package/dist/base/sheet.js +1 -1
  57. package/dist/base/sidebar.js +1 -1
  58. package/dist/base/signature-pad.js +6 -6
  59. package/dist/base/skeleton.js +1 -1
  60. package/dist/base/spinner.js +79 -2
  61. package/dist/base/spinner.js.map +1 -0
  62. package/dist/base/structure.js +1 -1
  63. package/dist/base/table.js +1 -1
  64. package/dist/base/text-inputs.js +2 -2
  65. package/dist/base/toaster.js +46 -45
  66. package/dist/base/toaster.js.map +1 -1
  67. package/dist/base/tree.js +1 -1
  68. package/dist/base/upload-queue.js +1 -1
  69. package/dist/base/upload.js +3 -3
  70. package/dist/base/value-inputs.js +1 -1
  71. package/dist/{batch-action-bar-BZGDG-Si.js → batch-action-bar-DnUJ21NQ.js} +6 -5
  72. package/dist/batch-action-bar-DnUJ21NQ.js.map +1 -0
  73. package/dist/blocks/admin.js +42 -42
  74. package/dist/blocks/admin.js.map +1 -1
  75. package/dist/blocks/ai.js +260 -240
  76. package/dist/blocks/ai.js.map +1 -1
  77. package/dist/blocks/analytics/usage-card.js +1 -1
  78. package/dist/blocks/analytics.js +620 -585
  79. package/dist/blocks/analytics.js.map +1 -1
  80. package/dist/blocks/collaboration.js +1 -1
  81. package/dist/blocks/commerce/receipt.js +1 -1
  82. package/dist/blocks/commerce.js +1152 -1109
  83. package/dist/blocks/commerce.js.map +1 -1
  84. package/dist/blocks/data-display.js +2 -2
  85. package/dist/blocks/onboarding.js +48 -39
  86. package/dist/blocks/onboarding.js.map +1 -1
  87. package/dist/blocks/planning.js +13 -12
  88. package/dist/blocks/planning.js.map +1 -1
  89. package/dist/blocks/timelines.js +1 -1
  90. package/dist/{breadcrumbs-D5t7I023.js → breadcrumbs-C-oqs1sQ.js} +5 -5
  91. package/dist/breadcrumbs-C-oqs1sQ.js.map +1 -0
  92. package/dist/{button-QYwiyhD2.js → button-DVzspB_G.js} +2 -2
  93. package/dist/{button-QYwiyhD2.js.map → button-DVzspB_G.js.map} +1 -1
  94. package/dist/{buttons-SbIcm1HJ.js → buttons-DPZekJFu.js} +20 -15
  95. package/dist/buttons-DPZekJFu.js.map +1 -0
  96. package/dist/cards-BaBZR-AU.js +68 -0
  97. package/dist/cards-BaBZR-AU.js.map +1 -0
  98. package/dist/{chart-QfrARkXl.js → chart-ZOYyK2xG.js} +58 -55
  99. package/dist/chart-ZOYyK2xG.js.map +1 -0
  100. package/dist/{checkbox-DhB6K0bK.js → checkbox-AWIhNhmo.js} +2 -2
  101. package/dist/{checkbox-DhB6K0bK.js.map → checkbox-AWIhNhmo.js.map} +1 -1
  102. package/dist/{choice-inputs-t6w3ATNz.js → choice-inputs-CNHvARCJ.js} +49 -45
  103. package/dist/choice-inputs-CNHvARCJ.js.map +1 -0
  104. package/dist/{code-block-Dgbu-CU3.js → code-block-DeneBJR_.js} +8 -8
  105. package/dist/code-block-DeneBJR_.js.map +1 -0
  106. package/dist/{collapsible-D8AEGU1-.js → collapsible-C-_l4hpy.js} +3 -3
  107. package/dist/{collapsible-D8AEGU1-.js.map → collapsible-C-_l4hpy.js.map} +1 -1
  108. package/dist/{collection-content-uK16Grv0.js → collection-content-By56pLog.js} +3 -3
  109. package/dist/{collection-content-uK16Grv0.js.map → collection-content-By56pLog.js.map} +1 -1
  110. package/dist/combobox-DaHESuiL.js +355 -0
  111. package/dist/combobox-DaHESuiL.js.map +1 -0
  112. package/dist/{combobox-DLl0bfiq.js → combobox-Dxo2fAYQ.js} +289 -279
  113. package/dist/combobox-Dxo2fAYQ.js.map +1 -0
  114. package/dist/{command-kNR20o7x.js → command-C25VMRII.js} +7 -7
  115. package/dist/{command-kNR20o7x.js.map → command-C25VMRII.js.map} +1 -1
  116. package/dist/{comments-BpDuCUUu.js → comments-DD0DUPwJ.js} +114 -105
  117. package/dist/comments-DD0DUPwJ.js.map +1 -0
  118. package/dist/components/base/badge/badge.recipes.d.ts +1 -1
  119. package/dist/components/base/buttons/loader-button.d.ts +2 -1
  120. package/dist/components/base/cards/card.recipes.d.ts +2 -3
  121. package/dist/components/base/cards/partials/smart-card-skeleton.d.ts +3 -13
  122. package/dist/components/base/cards/smart-card.types.d.ts +11 -4
  123. package/dist/components/base/chart/chart.d.ts +2 -5
  124. package/dist/components/base/combobox/combobox-field.d.ts +16 -0
  125. package/dist/components/base/combobox/combobox.strings.d.ts +7 -0
  126. package/dist/components/base/combobox/index.d.ts +30 -4
  127. package/dist/components/base/forms/form-sizing.d.ts +11 -3
  128. package/dist/components/base/navigation/pagination.d.ts +5 -2
  129. package/dist/components/base/popover/popover.recipes.d.ts +15 -1
  130. package/dist/components/base/table/index.d.ts +9 -2
  131. package/dist/components/base/text-inputs/input-group.d.ts +2 -2
  132. package/dist/components/blocks/ai/ai-shimmer/ai-shimmer.d.ts +1 -1
  133. package/dist/components/blocks/ai/ai-shimmer/types.d.ts +3 -0
  134. package/dist/components/blocks/commerce/fulfillment-group/types.d.ts +3 -1
  135. package/dist/components/blocks/data-display/inline-stat/inline-stat.d.ts +16 -8
  136. package/dist/components/features/activities/partials/activity-marker.d.ts +6 -3
  137. package/dist/components/features/appointment-calendar/appointment-calendar.d.ts +5 -0
  138. package/dist/components/features/appointment-calendar/appointment-calendar.types.d.ts +220 -0
  139. package/dist/components/features/appointment-calendar/appointment-calendar.utils.d.ts +41 -0
  140. package/dist/components/features/appointment-calendar/index.d.ts +3 -0
  141. package/dist/components/features/appointment-calendar/partials/appointment-agenda.d.ts +32 -0
  142. package/dist/components/features/appointment-calendar/partials/appointment-month.d.ts +13 -0
  143. package/dist/components/features/combobox/combobox.strings.d.ts +15 -1
  144. package/dist/components/features/combobox/types.d.ts +4 -0
  145. package/dist/components/features/media-library/media-library.strings.d.ts +2 -0
  146. package/dist/components/features/rich-text-editor/index.d.ts +1 -1
  147. package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +6 -0
  148. package/dist/components/features/rich-text-editor/rich-text-editor.types.d.ts +9 -1
  149. package/dist/components/features/table/table-header.d.ts +1 -1
  150. package/dist/components/features/table/table.strings.d.ts +55 -1
  151. package/dist/components/features/table/table.types.d.ts +17 -4
  152. package/dist/components/features/theme-tweaker/theme-tweaker.types.d.ts +5 -0
  153. package/dist/components/primitives/number.d.ts +4 -2
  154. package/dist/components/primitives/value.d.ts +3 -1
  155. package/dist/components/typography/text-link.d.ts +4 -0
  156. package/dist/components/ui/combobox-dismiss.d.ts +16 -0
  157. package/dist/components/ui/combobox.d.ts +16 -7
  158. package/dist/components/ui/dialog.d.ts +1 -1
  159. package/dist/components/ui/item.d.ts +8 -8
  160. package/dist/components/ui/popover.d.ts +1 -1
  161. package/dist/components/ui/sheet.d.ts +1 -1
  162. package/dist/components/ui/tabs.d.ts +1 -1
  163. package/dist/{containers-DmWiJa2I.js → containers-Mu1LMGV1.js} +2 -2
  164. package/dist/{containers-DmWiJa2I.js.map → containers-Mu1LMGV1.js.map} +1 -1
  165. package/dist/{copyable-B3Gwgdqc.js → copyable-ClBuk_UK.js} +4 -4
  166. package/dist/{copyable-B3Gwgdqc.js.map → copyable-ClBuk_UK.js.map} +1 -1
  167. package/dist/{data-display-DafIvCl5.js → data-display-DT_khPl_.js} +98 -87
  168. package/dist/data-display-DT_khPl_.js.map +1 -0
  169. package/dist/{date-BgK3bTdo.js → date-DCrsDTZc.js} +5 -5
  170. package/dist/{date-BgK3bTdo.js.map → date-DCrsDTZc.js.map} +1 -1
  171. package/dist/{date-picker-CF-DtUpF.js → date-picker-B2K3ucWn.js} +594 -593
  172. package/dist/date-picker-B2K3ucWn.js.map +1 -0
  173. package/dist/date-pickers-Ds8gLaoP.js +175 -0
  174. package/dist/date-pickers-Ds8gLaoP.js.map +1 -0
  175. package/dist/{display-DsQTVzMz.js → display-hAc1HjpI.js} +49 -49
  176. package/dist/display-hAc1HjpI.js.map +1 -0
  177. package/dist/dropdown-menu-Cl4X7L5S.js +193 -0
  178. package/dist/dropdown-menu-Cl4X7L5S.js.map +1 -0
  179. package/dist/editable-text-recipe-Cn61kEcv.js +10 -0
  180. package/dist/editable-text-recipe-Cn61kEcv.js.map +1 -0
  181. package/dist/features/activities.js +398 -375
  182. package/dist/features/activities.js.map +1 -1
  183. package/dist/features/ai-chat.js +188 -179
  184. package/dist/features/ai-chat.js.map +1 -1
  185. package/dist/features/appointment-calendar.js +683 -0
  186. package/dist/features/appointment-calendar.js.map +1 -0
  187. package/dist/features/async-preview.js +109 -107
  188. package/dist/features/async-preview.js.map +1 -1
  189. package/dist/features/combobox.js +1 -1
  190. package/dist/features/comments.js +1 -1
  191. package/dist/features/data-view.js +137 -137
  192. package/dist/features/data-view.js.map +1 -1
  193. package/dist/features/email-composer.js +255 -255
  194. package/dist/features/email-composer.js.map +1 -1
  195. package/dist/features/event-calendar.js +254 -248
  196. package/dist/features/event-calendar.js.map +1 -1
  197. package/dist/features/filters.js +1 -1
  198. package/dist/features/global-search.js +35 -32
  199. package/dist/features/global-search.js.map +1 -1
  200. package/dist/features/kanban.js +118 -117
  201. package/dist/features/kanban.js.map +1 -1
  202. package/dist/features/map.js +233 -231
  203. package/dist/features/map.js.map +1 -1
  204. package/dist/features/media-library.js +789 -775
  205. package/dist/features/media-library.js.map +1 -1
  206. package/dist/features/mentions.js +1 -1
  207. package/dist/features/overlays.js +1 -1
  208. package/dist/features/products.js +922 -902
  209. package/dist/features/products.js.map +1 -1
  210. package/dist/features/questionnaire.js +28 -24
  211. package/dist/features/questionnaire.js.map +1 -1
  212. package/dist/features/resource-assignment.js +18 -15
  213. package/dist/features/resource-assignment.js.map +1 -1
  214. package/dist/features/resource.js +12 -12
  215. package/dist/features/resource.js.map +1 -1
  216. package/dist/features/rich-text-editor.js +2 -2
  217. package/dist/features/schema-form.js +15 -13
  218. package/dist/features/schema-form.js.map +1 -1
  219. package/dist/features/suggestions.js +3 -3
  220. package/dist/features/sync.js +11 -5
  221. package/dist/features/sync.js.map +1 -1
  222. package/dist/features/table.js +1 -1
  223. package/dist/features/theme-tweaker.js +493 -489
  224. package/dist/features/theme-tweaker.js.map +1 -1
  225. package/dist/feedback-BYIhtitP.js +239 -0
  226. package/dist/feedback-BYIhtitP.js.map +1 -0
  227. package/dist/{field-affordance-recipes-qQeIf4lG.js → field-affordance-recipes-DZhnIL_Y.js} +11 -18
  228. package/dist/field-affordance-recipes-DZhnIL_Y.js.map +1 -0
  229. package/dist/{filters-BkHH53uv.js → filters-DJVAveHA.js} +589 -580
  230. package/dist/filters-DJVAveHA.js.map +1 -0
  231. package/dist/{form-field-DUt4UxSV.js → form-field-CwH9y77i.js} +6 -5
  232. package/dist/form-field-CwH9y77i.js.map +1 -0
  233. package/dist/{form-sizing-By94KzXE.js → form-sizing-BdP_Mf5p.js} +39 -44
  234. package/dist/form-sizing-BdP_Mf5p.js.map +1 -0
  235. package/dist/{forms-Bzha-Y3B.js → forms-B9G_xwzi.js} +8 -8
  236. package/dist/{forms-Bzha-Y3B.js.map → forms-B9G_xwzi.js.map} +1 -1
  237. package/dist/{forms-numeric-C0bvjRPZ.js → forms-numeric-B_jraJaQ.js} +309 -309
  238. package/dist/forms-numeric-B_jraJaQ.js.map +1 -0
  239. package/dist/{header-BOefOKd1.js → header-BSfIEWbI.js} +160 -153
  240. package/dist/header-BSfIEWbI.js.map +1 -0
  241. package/dist/{hooks-9k_TtmKh.js → hooks-ClH9thn4.js} +2 -2
  242. package/dist/{hooks-9k_TtmKh.js.map → hooks-ClH9thn4.js.map} +1 -1
  243. package/dist/{icon-badge-CAuKupo9.js → icon-badge-DYKIwvOV.js} +4 -4
  244. package/dist/{icon-badge-CAuKupo9.js.map → icon-badge-DYKIwvOV.js.map} +1 -1
  245. package/dist/index.js +3 -3
  246. package/dist/input-CZw8iU99.js +21 -0
  247. package/dist/input-CZw8iU99.js.map +1 -0
  248. package/dist/input-DQdEd0YD.js +263 -0
  249. package/dist/input-DQdEd0YD.js.map +1 -0
  250. package/dist/{interaction-recipes-CHr0dJUs.js → interaction-recipes-XR9ZpVYL.js} +2 -1
  251. package/dist/interaction-recipes-XR9ZpVYL.js.map +1 -0
  252. package/dist/item-K5_ghvze.js +275 -0
  253. package/dist/item-K5_ghvze.js.map +1 -0
  254. package/dist/layout/app-shell.js +1 -1
  255. package/dist/layout/auth.js +1 -1
  256. package/dist/layout/containers.js +1 -1
  257. package/dist/layout/header.js +1 -1
  258. package/dist/layout/hooks.js +1 -1
  259. package/dist/layout/navigation.js +1 -1
  260. package/dist/layout/page.js +1 -1
  261. package/dist/layout/settings.js +1 -1
  262. package/dist/layout/sidebar.js +2 -2
  263. package/dist/layout/workspace.js +1 -1
  264. package/dist/layout.js +10 -10
  265. package/dist/lib/affordance-geometry.generated.d.ts +71 -0
  266. package/dist/lib/editable-text-recipe.d.ts +4 -4
  267. package/dist/lib/field-affordance-recipes.d.ts +2 -2
  268. package/dist/lib/interaction-recipes.d.ts +5 -0
  269. package/dist/lib/theme-mode-css.d.ts +7 -0
  270. package/dist/lib/tone-recipes.d.ts +8 -0
  271. package/dist/lib/ui-provider/types.d.ts +2 -2
  272. package/dist/lib/use-popup-focus-recovery.d.ts +8 -0
  273. package/dist/lib/utils.js +1 -1
  274. package/dist/{media-gallery-DcTtAaeC.js → media-gallery-3zIVLMWH.js} +8 -8
  275. package/dist/media-gallery-3zIVLMWH.js.map +1 -0
  276. package/dist/{mentions-D-uyCh01.js → mentions-CGlEJ15c.js} +144 -142
  277. package/dist/mentions-CGlEJ15c.js.map +1 -0
  278. package/dist/{message-CdHgIWKf.js → message-DZ_ruyUV.js} +6 -5
  279. package/dist/message-DZ_ruyUV.js.map +1 -0
  280. package/dist/{metadata-list-X5rYAKSB.js → metadata-list-8N16ZMW_.js} +130 -119
  281. package/dist/metadata-list-8N16ZMW_.js.map +1 -0
  282. package/dist/{navigation-D3KwXmaq.js → navigation-Bnotn4AQ.js} +19 -19
  283. package/dist/navigation-Bnotn4AQ.js.map +1 -0
  284. package/dist/{navigation-HJf5zxlH.js → navigation-BzhHI3lo.js} +36 -35
  285. package/dist/navigation-BzhHI3lo.js.map +1 -0
  286. package/dist/{navigation-row-recipes-BVowojQw.js → navigation-row-recipes-BFLCk_Aq.js} +2 -2
  287. package/dist/{navigation-row-recipes-BVowojQw.js.map → navigation-row-recipes-BFLCk_Aq.js.map} +1 -1
  288. package/dist/{number-DMhe-Vsk.js → number-DbV1Dija.js} +36 -34
  289. package/dist/{number-DMhe-Vsk.js.map → number-DbV1Dija.js.map} +1 -1
  290. package/dist/{overflow-tab-bar-sQHXLlwQ.js → overflow-tab-bar-CWY7Nogn.js} +105 -103
  291. package/dist/overflow-tab-bar-CWY7Nogn.js.map +1 -0
  292. package/dist/{overlays-I0axtYA6.js → overlays-tMkF-VAN.js} +282 -278
  293. package/dist/overlays-tMkF-VAN.js.map +1 -0
  294. package/dist/{page-B5dTH9gE.js → page-CL9YeH_V.js} +8 -8
  295. package/dist/{page-B5dTH9gE.js.map → page-CL9YeH_V.js.map} +1 -1
  296. package/dist/{page-header-commands-DjzFEq3E.js → page-header-commands-DOb6WsfD.js} +5 -5
  297. package/dist/{page-header-commands-DjzFEq3E.js.map → page-header-commands-DOb6WsfD.js.map} +1 -1
  298. package/dist/pagination-BL25hu2s.js +158 -0
  299. package/dist/pagination-BL25hu2s.js.map +1 -0
  300. package/dist/{popover-Di55PyAI.js → popover-gnTOhbFM.js} +69 -66
  301. package/dist/popover-gnTOhbFM.js.map +1 -0
  302. package/dist/popover-menu-Cn9rUkdc.js +100 -0
  303. package/dist/popover-menu-Cn9rUkdc.js.map +1 -0
  304. package/dist/{popover.recipes-Bdyhj2db.js → popover.recipes-D3j8R8Yp.js} +17 -10
  305. package/dist/popover.recipes-D3j8R8Yp.js.map +1 -0
  306. package/dist/{primitives-B-CkiEMU.js → primitives-BFK08r9M.js} +45 -44
  307. package/dist/primitives-BFK08r9M.js.map +1 -0
  308. package/dist/primitives.js +4 -4
  309. package/dist/{progress-rnS8-uAW.js → progress-B1VnCT0K.js} +5 -5
  310. package/dist/{progress-rnS8-uAW.js.map → progress-B1VnCT0K.js.map} +1 -1
  311. package/dist/{receipt-D0oswZ0p.js → receipt-BVSOH3Xo.js} +9 -6
  312. package/dist/{receipt-D0oswZ0p.js.map → receipt-BVSOH3Xo.js.map} +1 -1
  313. package/dist/{rich-text-DvGulsNJ.js → rich-text-GOUyKQ-s.js} +3 -3
  314. package/dist/{rich-text-DvGulsNJ.js.map → rich-text-GOUyKQ-s.js.map} +1 -1
  315. package/dist/{rich-text-editor-sMU_Scqm.js → rich-text-editor-cRLC-eBK.js} +418 -426
  316. package/dist/rich-text-editor-cRLC-eBK.js.map +1 -0
  317. package/dist/rich-text-editor-toolbar-DfXg0-VC.js +94 -0
  318. package/dist/rich-text-editor-toolbar-DfXg0-VC.js.map +1 -0
  319. package/dist/{scroll-area-Bt_vXY2b.js → scroll-area-DcI-M1UT.js} +2 -2
  320. package/dist/{scroll-area-Bt_vXY2b.js.map → scroll-area-DcI-M1UT.js.map} +1 -1
  321. package/dist/{separator-C8DlRGwF.js → separator-BDV-Y648.js} +3 -3
  322. package/dist/{separator-C8DlRGwF.js.map → separator-BDV-Y648.js.map} +1 -1
  323. package/dist/{separator-CYHnjsAb.js → separator-Bom7NsGO.js} +2 -2
  324. package/dist/{separator-CYHnjsAb.js.map → separator-Bom7NsGO.js.map} +1 -1
  325. package/dist/services/actions.js +1 -1
  326. package/dist/{settings-CQW3b-Cu.js → settings-ybnjVwbd.js} +20 -19
  327. package/dist/settings-ybnjVwbd.js.map +1 -0
  328. package/dist/{sheet-4SEvVYzA.js → sheet-ijlsjq-n.js} +76 -73
  329. package/dist/sheet-ijlsjq-n.js.map +1 -0
  330. package/dist/{sidebar-C7WWR29L.js → sidebar-Db6gkh3U.js} +183 -182
  331. package/dist/sidebar-Db6gkh3U.js.map +1 -0
  332. package/dist/{sidebar-d7Dg80ln.js → sidebar-DkTO4VTO.js} +14 -13
  333. package/dist/{sidebar-d7Dg80ln.js.map → sidebar-DkTO4VTO.js.map} +1 -1
  334. package/dist/{skeleton-Cz890JZF.js → skeleton-Byjnt7qr.js} +3 -3
  335. package/dist/{skeleton-Cz890JZF.js.map → skeleton-Byjnt7qr.js.map} +1 -1
  336. package/dist/smart-card-DiC5aac3.js +604 -0
  337. package/dist/smart-card-DiC5aac3.js.map +1 -0
  338. package/dist/{structure-DC2dygdA.js → structure-BmisBK-3.js} +2 -2
  339. package/dist/{structure-DC2dygdA.js.map → structure-BmisBK-3.js.map} +1 -1
  340. package/dist/style.css +1 -1
  341. package/dist/table-BweFy_P9.js +1530 -0
  342. package/dist/table-BweFy_P9.js.map +1 -0
  343. package/dist/{table-CIKyLUsy.js → table-DsfzoUia.js} +75 -63
  344. package/dist/table-DsfzoUia.js.map +1 -0
  345. package/dist/{tabs-DwBJfjxX.js → tabs-CDocW5D1.js} +14 -13
  346. package/dist/tabs-CDocW5D1.js.map +1 -0
  347. package/dist/text-inputs-f9Ia-aCi.js +353 -0
  348. package/dist/text-inputs-f9Ia-aCi.js.map +1 -0
  349. package/dist/theme-mode-css-BB-_RYab.js +14 -0
  350. package/dist/theme-mode-css-BB-_RYab.js.map +1 -0
  351. package/dist/theme-scope-BJ6eE2xt.js +50 -0
  352. package/dist/theme-scope-BJ6eE2xt.js.map +1 -0
  353. package/dist/theme.css +285 -228
  354. package/dist/themes/green.css +16 -12
  355. package/dist/timelines-CwM_9IhD.js +457 -0
  356. package/dist/timelines-CwM_9IhD.js.map +1 -0
  357. package/dist/{tone-recipes-CPoExcTE.js → tone-recipes-BPsRAvhu.js} +5 -2
  358. package/dist/tone-recipes-BPsRAvhu.js.map +1 -0
  359. package/dist/{tooltip-CsfgrfS7.js → tooltip-yiRJUFjp.js} +4 -4
  360. package/dist/{tooltip-CsfgrfS7.js.map → tooltip-yiRJUFjp.js.map} +1 -1
  361. package/dist/{tree-BiKhg8AY.js → tree-WnKQzwbq.js} +9 -9
  362. package/dist/{tree-BiKhg8AY.js.map → tree-WnKQzwbq.js.map} +1 -1
  363. package/dist/typography/rich-text.js +1 -1
  364. package/dist/{typography-DTRkE9zL.js → typography-UTnveOEy.js} +6 -6
  365. package/dist/typography-UTnveOEy.js.map +1 -0
  366. package/dist/typography.js +2 -2
  367. package/dist/{ui-provider-1D_NSYzO.js → ui-provider-C_U0Xma4.js} +3 -3
  368. package/dist/ui-provider-C_U0Xma4.js.map +1 -0
  369. package/dist/ui-provider.js +2 -2
  370. package/dist/{upload-BO8-CLN6.js → upload-CXyxmQBP.js} +13 -12
  371. package/dist/upload-CXyxmQBP.js.map +1 -0
  372. package/dist/{upload-queue-EOC8g1gf.js → upload-queue-Boscubn9.js} +11 -9
  373. package/dist/upload-queue-Boscubn9.js.map +1 -0
  374. package/dist/{usage-card-obRaBskq.js → usage-card-BhO5eqkX.js} +53 -37
  375. package/dist/usage-card-BhO5eqkX.js.map +1 -0
  376. package/dist/use-popup-focus-recovery-C0QPvgOR.js +36 -0
  377. package/dist/use-popup-focus-recovery-C0QPvgOR.js.map +1 -0
  378. package/dist/{utils-l5LpDw2z.js → utils-BRhFDwuU.js} +59 -44
  379. package/dist/utils-BRhFDwuU.js.map +1 -0
  380. package/dist/{value-inputs-TAYMX111.js → value-inputs-TaX4OjNk.js} +268 -252
  381. package/dist/value-inputs-TaX4OjNk.js.map +1 -0
  382. package/dist/{value-typography-b8wpz1eX.js → value-typography-BP8OG6h5.js} +2 -2
  383. package/dist/{value-typography-b8wpz1eX.js.map → value-typography-BP8OG6h5.js.map} +1 -1
  384. package/dist/{workspace-DH0v0KcB.js → workspace-B-OEm3Kf.js} +34 -33
  385. package/dist/workspace-B-OEm3Kf.js.map +1 -0
  386. package/docs/consumer-skill/SKILL.md +3 -3
  387. package/docs/consumer-skill/references/agents-md.md +1 -1
  388. package/docs/consumer-skill/references/composition.md +8 -6
  389. package/docs/consumer-skill/references/installation.md +6 -0
  390. package/docs/consumer-skill/references/integration.md +4 -3
  391. package/docs/consumer-skill/references/public-api.json +105 -2
  392. package/docs/consumer-skill/references/review.md +7 -0
  393. package/docs/consumer-skill/references/theming.md +71 -6
  394. package/docs/consumer-skill/references/tokens.json +1 -1
  395. package/docs/consumer-skill/references/workflows.md +26 -0
  396. package/docs/consumer-skill/scripts/composition-policy.mjs +3 -2
  397. package/docs/consumer-skill/scripts/surface-policy.mjs +11 -0
  398. package/package.json +8 -4
  399. package/dist/accordion-B6a3vVgA.js.map +0 -1
  400. package/dist/action-menu-TzCoSlwL.js +0 -280
  401. package/dist/action-menu-TzCoSlwL.js.map +0 -1
  402. package/dist/affordance-geometry.generated-B5iu-Mkr.js +0 -69
  403. package/dist/affordance-geometry.generated-B5iu-Mkr.js.map +0 -1
  404. package/dist/ai-artifact-BMJdv-6q.js +0 -1115
  405. package/dist/ai-artifact-BMJdv-6q.js.map +0 -1
  406. package/dist/attachment-BtfhGm8i.js +0 -245
  407. package/dist/attachment-BtfhGm8i.js.map +0 -1
  408. package/dist/auth-CYxKfo69.js.map +0 -1
  409. package/dist/avatar-BBnEJIx8.js.map +0 -1
  410. package/dist/badge-MrKVNzW9.js.map +0 -1
  411. package/dist/batch-action-bar-BZGDG-Si.js.map +0 -1
  412. package/dist/breadcrumbs-D5t7I023.js.map +0 -1
  413. package/dist/buttons-SbIcm1HJ.js.map +0 -1
  414. package/dist/cards-CiiHpKYd.js +0 -66
  415. package/dist/cards-CiiHpKYd.js.map +0 -1
  416. package/dist/chart-QfrARkXl.js.map +0 -1
  417. package/dist/choice-inputs-t6w3ATNz.js.map +0 -1
  418. package/dist/code-block-Dgbu-CU3.js.map +0 -1
  419. package/dist/combobox-2Ic8N9bL.js +0 -278
  420. package/dist/combobox-2Ic8N9bL.js.map +0 -1
  421. package/dist/combobox-DLl0bfiq.js.map +0 -1
  422. package/dist/comments-BpDuCUUu.js.map +0 -1
  423. package/dist/data-display-DafIvCl5.js.map +0 -1
  424. package/dist/date-picker-CF-DtUpF.js.map +0 -1
  425. package/dist/date-pickers-BmzxJl5l.js +0 -174
  426. package/dist/date-pickers-BmzxJl5l.js.map +0 -1
  427. package/dist/display-DsQTVzMz.js.map +0 -1
  428. package/dist/dropdown-menu-E2qmdC7o.js +0 -193
  429. package/dist/dropdown-menu-E2qmdC7o.js.map +0 -1
  430. package/dist/editable-text-recipe-Bkm6wKHp.js +0 -10
  431. package/dist/editable-text-recipe-Bkm6wKHp.js.map +0 -1
  432. package/dist/feedback-qNuMBtRH.js +0 -233
  433. package/dist/feedback-qNuMBtRH.js.map +0 -1
  434. package/dist/field-affordance-recipes-qQeIf4lG.js.map +0 -1
  435. package/dist/filters-BkHH53uv.js.map +0 -1
  436. package/dist/form-field-DUt4UxSV.js.map +0 -1
  437. package/dist/form-sizing-By94KzXE.js.map +0 -1
  438. package/dist/forms-numeric-C0bvjRPZ.js.map +0 -1
  439. package/dist/header-BOefOKd1.js.map +0 -1
  440. package/dist/input-DWhBBBww.js +0 -262
  441. package/dist/input-DWhBBBww.js.map +0 -1
  442. package/dist/input-Ddi_LSYv.js +0 -20
  443. package/dist/input-Ddi_LSYv.js.map +0 -1
  444. package/dist/interaction-recipes-CHr0dJUs.js.map +0 -1
  445. package/dist/item-DEmDiTlD.js +0 -265
  446. package/dist/item-DEmDiTlD.js.map +0 -1
  447. package/dist/media-gallery-DcTtAaeC.js.map +0 -1
  448. package/dist/mentions-D-uyCh01.js.map +0 -1
  449. package/dist/message-CdHgIWKf.js.map +0 -1
  450. package/dist/metadata-list-X5rYAKSB.js.map +0 -1
  451. package/dist/navigation-D3KwXmaq.js.map +0 -1
  452. package/dist/navigation-HJf5zxlH.js.map +0 -1
  453. package/dist/overflow-tab-bar-sQHXLlwQ.js.map +0 -1
  454. package/dist/overlays-I0axtYA6.js.map +0 -1
  455. package/dist/pagination-3bPA_a6K.js +0 -149
  456. package/dist/pagination-3bPA_a6K.js.map +0 -1
  457. package/dist/popover-Di55PyAI.js.map +0 -1
  458. package/dist/popover-menu-B71Tn2Qz.js +0 -99
  459. package/dist/popover-menu-B71Tn2Qz.js.map +0 -1
  460. package/dist/popover.recipes-Bdyhj2db.js.map +0 -1
  461. package/dist/primitives-B-CkiEMU.js.map +0 -1
  462. package/dist/rich-text-editor-sMU_Scqm.js.map +0 -1
  463. package/dist/rich-text-editor.recipes-CadiF_Uu.js +0 -88
  464. package/dist/rich-text-editor.recipes-CadiF_Uu.js.map +0 -1
  465. package/dist/settings-CQW3b-Cu.js.map +0 -1
  466. package/dist/sheet-4SEvVYzA.js.map +0 -1
  467. package/dist/sidebar-C7WWR29L.js.map +0 -1
  468. package/dist/smart-card-lFKxn5Hu.js +0 -595
  469. package/dist/smart-card-lFKxn5Hu.js.map +0 -1
  470. package/dist/spinner-fa3h1Aif.js +0 -80
  471. package/dist/spinner-fa3h1Aif.js.map +0 -1
  472. package/dist/table-CIKyLUsy.js.map +0 -1
  473. package/dist/table-CrcLN9Io.js +0 -1458
  474. package/dist/table-CrcLN9Io.js.map +0 -1
  475. package/dist/tabs-DwBJfjxX.js.map +0 -1
  476. package/dist/text-inputs-aaK9wcDT.js +0 -326
  477. package/dist/text-inputs-aaK9wcDT.js.map +0 -1
  478. package/dist/theme-scope-kStaAer0.js +0 -39
  479. package/dist/theme-scope-kStaAer0.js.map +0 -1
  480. package/dist/timelines-C_SBwHNP.js +0 -442
  481. package/dist/timelines-C_SBwHNP.js.map +0 -1
  482. package/dist/tone-recipes-CPoExcTE.js.map +0 -1
  483. package/dist/typography-DTRkE9zL.js.map +0 -1
  484. package/dist/ui-provider-1D_NSYzO.js.map +0 -1
  485. package/dist/upload-BO8-CLN6.js.map +0 -1
  486. package/dist/upload-queue-EOC8g1gf.js.map +0 -1
  487. package/dist/usage-card-obRaBskq.js.map +0 -1
  488. package/dist/utils-l5LpDw2z.js.map +0 -1
  489. package/dist/value-inputs-TAYMX111.js.map +0 -1
  490. package/dist/workspace-DH0v0KcB.js.map +0 -1
@@ -1,1458 +0,0 @@
1
- "use client";
2
- import { s as e, v as t } from "./ui-provider-1D_NSYzO.js";
3
- import { t as n } from "./utils-l5LpDw2z.js";
4
- import { n as r } from "./buttons-SbIcm1HJ.js";
5
- import { a as i, s as a, t as o } from "./typography-DTRkE9zL.js";
6
- import { t as s } from "./focus-recipes-B653VaLq.js";
7
- import { t as c } from "./structure-DC2dygdA.js";
8
- import { n as l, t as u } from "./action-menu-TzCoSlwL.js";
9
- import { t as d } from "./interaction-recipes-CHr0dJUs.js";
10
- import { _ as f, c as p, d as m, g as h, h as g, i as _, l as v, m as y, o as b, p as x, s as S } from "./primitives-B-CkiEMU.js";
11
- import { t as C } from "./initials-format-CDoQEOd_.js";
12
- import { n as w, r as T, t as ee } from "./number-DMhe-Vsk.js";
13
- import { a as te, i as E, r as ne, s as re, t as D } from "./date-BgK3bTdo.js";
14
- import { t as O } from "./badge-MrKVNzW9.js";
15
- import { t as ie } from "./batch-action-bar-BZGDG-Si.js";
16
- import { t as ae } from "./separator-C8DlRGwF.js";
17
- import { t as oe } from "./input-DWhBBBww.js";
18
- import { t as se } from "./checkbox-DhB6K0bK.js";
19
- import { r as k, t as ce } from "./control-group-recipes-DBXmfh2E.js";
20
- import { a as le, c as ue, i as de, n as fe, o as pe, r as me, s as he, t as ge } from "./pagination-3bPA_a6K.js";
21
- import { c as A, i as _e, n as ve, o as ye, s as be, t as xe } from "./table-CIKyLUsy.js";
22
- import { s as Se } from "./data-display-DafIvCl5.js";
23
- import { createContext as Ce, isValidElement as j, useCallback as M, useContext as we, useEffect as N, useMemo as P, useRef as F, useState as I } from "react";
24
- import { Fragment as Te, jsx as L, jsxs as R } from "react/jsx-runtime";
25
- import { ArrowDown as Ee, ArrowUp as z, Calendar as De, ChevronLeft as Oe, ChevronRight as ke, ChevronsUpDown as Ae, Mail as je, Maximize2 as Me, Minimize2 as Ne, PackageOpen as B, Settings2 as Pe } from "lucide-react";
26
- import { flexRender as Fe, getCoreRowModel as Ie, getFilteredRowModel as Le, getSortedRowModel as Re, useReactTable as ze } from "@tanstack/react-table";
27
- //#region src/components/features/table/hooks.ts
28
- var Be = 300;
29
- function Ve(e) {
30
- return e ? e.querySelector("[data-slot=\"table-container\"]") : null;
31
- }
32
- function He(e, t = {}) {
33
- let { stepPx: n = Be, deps: r = [] } = t, [i, a] = I(!1), [o, s] = I(!1), c = F(0), l = M(() => {
34
- let t = Ve(e.current);
35
- if (!t) {
36
- a(!1), s(!1);
37
- return;
38
- }
39
- let { scrollLeft: n, scrollWidth: r, clientWidth: i } = t;
40
- a(n > 1), s(n + i < r - 1);
41
- }, [e]);
42
- N(() => {
43
- let t, n = window.setTimeout(() => {
44
- l();
45
- let n = Ve(e.current);
46
- if (!n) return;
47
- let r = () => {
48
- cancelAnimationFrame(c.current), c.current = requestAnimationFrame(l);
49
- };
50
- n.addEventListener("scroll", r, { passive: !0 });
51
- let i = new ResizeObserver(l);
52
- i.observe(n), n.firstElementChild && i.observe(n.firstElementChild), t = () => {
53
- n.removeEventListener("scroll", r), cancelAnimationFrame(c.current), i.disconnect();
54
- };
55
- }, 0);
56
- return () => {
57
- window.clearTimeout(n), t?.();
58
- };
59
- }, [
60
- e,
61
- l,
62
- ...r
63
- ]);
64
- let u = M((t) => {
65
- Ve(e.current)?.scrollBy({
66
- left: t,
67
- behavior: "smooth"
68
- });
69
- }, [e]);
70
- return {
71
- canScrollLeft: i,
72
- canScrollRight: o,
73
- scrollBy: u,
74
- scrollLeft: M(() => u(-n), [u, n]),
75
- scrollRight: M(() => u(n), [u, n])
76
- };
77
- }
78
- var Ue = [
79
- "a[href]",
80
- "button:not([disabled])",
81
- "input:not([disabled])",
82
- "select:not([disabled])",
83
- "textarea:not([disabled])",
84
- "[tabindex]:not([tabindex=\"-1\"])"
85
- ].join(",");
86
- function We(e, t, n) {
87
- let r = F(n);
88
- r.current = n, N(() => {
89
- if (!e || typeof document > "u") return;
90
- let n = document.activeElement, i = document.body.style.overflow;
91
- document.body.style.overflow = "hidden";
92
- let a = (e) => {
93
- let n = t.current;
94
- if (!n) return;
95
- if (e.key === "Escape") {
96
- e.preventDefault(), e.stopPropagation(), r.current();
97
- return;
98
- }
99
- if (e.key !== "Tab") return;
100
- let i = Array.from(n.querySelectorAll(Ue)).filter((e) => e.offsetParent !== null || e === document.activeElement);
101
- if (i.length === 0) return;
102
- let a = i[0], o = i[i.length - 1], s = document.activeElement, c = s instanceof Node && n.contains(s);
103
- e.shiftKey && (!c || s === a) ? (e.preventDefault(), o.focus()) : !e.shiftKey && (!c || s === o) && (e.preventDefault(), a.focus());
104
- }, o = t.current;
105
- return document.addEventListener("keydown", a, !0), () => {
106
- document.removeEventListener("keydown", a, !0), document.body.style.overflow = i;
107
- let e = document.activeElement;
108
- (o && e instanceof Node && o.contains(e) || e === document.body) && n?.isConnected && n.focus();
109
- };
110
- }, [e, t]);
111
- }
112
- //#endregion
113
- //#region src/components/features/table/table.strings.ts
114
- var Ge = (e) => {
115
- let t = e.replace(/[_-]+/g, " ").replace(/\s+/g, " ").trim();
116
- return t ? t.replace(/\b\w/g, (e) => e.toUpperCase()) : "Column";
117
- }, V = {
118
- emptyState: { message: "No results found." },
119
- actions: {
120
- triggerLabel: "Actions",
121
- srLabel: "Row actions menu",
122
- menuLabel: "More actions"
123
- },
124
- filter: {
125
- searchPlaceholder: "Filter...",
126
- columnsButton: "Columns"
127
- },
128
- columnVisibility: {
129
- title: "Toggle columns",
130
- triggerLabel: "Columns",
131
- formatLabel: (e, t) => t && t.trim().length > 0 ? t : Ge(e)
132
- },
133
- toolbar: {
134
- scrollLeft: "Scroll left",
135
- scrollRight: "Scroll right",
136
- columns: "Toggle columns",
137
- enterFullscreen: "Enter full screen",
138
- exitFullscreen: "Exit full screen"
139
- },
140
- pagination: {
141
- showing: "Showing",
142
- to: "to",
143
- of: "of",
144
- entries: "results",
145
- previous: "Previous",
146
- next: "Next",
147
- previousLabel: "Go to previous page",
148
- nextLabel: "Go to next page",
149
- morePages: "More pages",
150
- page: "Page",
151
- rowsPerPage: "Rows per page",
152
- ariaLabel: "Pagination navigation"
153
- },
154
- selection: {
155
- summary: (e, t) => `${e} of ${t} row${t === 1 ? "" : "s"} selected.`,
156
- row: (e) => `Select row ${e + 1}`,
157
- selectAll: "Select all rows",
158
- clear: "Clear selection"
159
- },
160
- accessibility: {
161
- scrollRegion: "Table scroll area",
162
- fullscreenRegion: "Table, full screen"
163
- }
164
- }, H = (e, t) => ({
165
- ...e,
166
- ...t
167
- }), Ke = (e) => e ? {
168
- emptyState: H(V.emptyState, e.emptyState),
169
- actions: {
170
- ...H(V.actions, e.actions),
171
- ...e.actions?.triggerLabel !== void 0 && e.actions.menuLabel === void 0 ? { menuLabel: e.actions.triggerLabel } : {}
172
- },
173
- filter: H(V.filter, e.filter),
174
- columnVisibility: H(V.columnVisibility, e.columnVisibility),
175
- toolbar: H(V.toolbar, e.toolbar),
176
- pagination: H(V.pagination, e.pagination),
177
- selection: H(V.selection, e.selection),
178
- accessibility: H(V.accessibility, e.accessibility)
179
- } : V;
180
- //#endregion
181
- //#region src/components/features/table/pagination.tsx
182
- function qe(e, t) {
183
- if (t <= 7) return Array.from({ length: t }, (e, t) => t + 1);
184
- let n = [1];
185
- e > 3 && n.push("ellipsis");
186
- let r = Math.max(2, e - 1), i = Math.min(t - 1, e + 1);
187
- for (let e = r; e <= i; e++) n.push(e);
188
- return e < t - 2 && n.push("ellipsis"), n.push(t), n;
189
- }
190
- function Je(e, t, n) {
191
- let r = new URLSearchParams();
192
- return r.set(n, String(t)), `${e}?${r.toString()}`;
193
- }
194
- function Ye({ pagination: e, onPageChange: t, labels: r = {}, pageQueryKey: i }) {
195
- let a = {
196
- ...V.pagination,
197
- ...r
198
- }, o = {
199
- navigationLabel: a.ariaLabel,
200
- previous: a.previous,
201
- next: a.next,
202
- previousLabel: a.previousLabel ?? ue.previousLabel,
203
- nextLabel: a.nextLabel ?? ue.nextLabel,
204
- morePages: a.morePages ?? ue.morePages
205
- }, s = i ?? "page", c = (e.current_page - 1) * e.per_page + 1, l = Math.min(e.current_page * e.per_page, e.total), u = M((n, r) => {
206
- r && t?.(n, r, e.path || "");
207
- }, [t, e.path]), d = e.prev_page_url !== null, f = e.next_page_url !== null, p = qe(e.current_page, e.last_page);
208
- return /* @__PURE__ */ R("div", {
209
- 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"),
210
- children: [/* @__PURE__ */ R(h, {
211
- size: "xs",
212
- className: "tabular-nums tracking-tight",
213
- children: [
214
- /* @__PURE__ */ L(ee, {
215
- value: c,
216
- size: "xs",
217
- weight: "medium",
218
- align: "left"
219
- }),
220
- "–",
221
- /* @__PURE__ */ L(ee, {
222
- value: l,
223
- size: "xs",
224
- weight: "medium",
225
- align: "left"
226
- }),
227
- " ",
228
- a.of,
229
- " ",
230
- /* @__PURE__ */ L(ee, {
231
- value: e.total,
232
- size: "xs",
233
- weight: "medium",
234
- align: "left"
235
- }),
236
- " ",
237
- a.entries
238
- ]
239
- }), /* @__PURE__ */ L(he, {
240
- strings: o,
241
- className: "mx-0 w-full justify-start sm:w-auto sm:justify-center",
242
- children: /* @__PURE__ */ R(ge, {
243
- className: "gap-0 sm:gap-space-2xs",
244
- children: [
245
- /* @__PURE__ */ L(me, { children: /* @__PURE__ */ L(pe, {
246
- text: a.previous,
247
- href: "#",
248
- onClick: (t) => {
249
- t.preventDefault(), u(e.current_page - 1, e.prev_page_url);
250
- },
251
- "aria-disabled": !d,
252
- className: `h-action-sm text-pxs ${d ? "" : "pointer-events-none opacity-40"}`
253
- }) }),
254
- p.map((t, n) => {
255
- let r = t === "ellipsis", i = r ? `ellipsis-${e.current_page}-${n}` : `page-${t}`;
256
- return /* @__PURE__ */ L(me, { children: r ? /* @__PURE__ */ L(fe, { className: "size-action-sm" }) : /* @__PURE__ */ L(de, {
257
- href: "#",
258
- active: t === e.current_page,
259
- onClick: (n) => {
260
- n.preventDefault(), u(t, Je(e.path, t, s));
261
- },
262
- className: "size-action-sm text-pxs",
263
- children: t
264
- }) }, i);
265
- }),
266
- /* @__PURE__ */ L(me, { children: /* @__PURE__ */ L(le, {
267
- text: a.next,
268
- href: "#",
269
- onClick: (t) => {
270
- t.preventDefault(), u(e.current_page + 1, e.next_page_url);
271
- },
272
- "aria-disabled": !f,
273
- className: `h-action-sm text-pxs ${f ? "" : "pointer-events-none opacity-40"}`
274
- }) })
275
- ]
276
- })
277
- })]
278
- });
279
- }
280
- Ye.displayName = "Pagination";
281
- //#endregion
282
- //#region src/components/features/table/table-actions.tsx
283
- function Xe(e) {
284
- let { row: t, actions: r, menuLabel: i, displayMode: a = "menu", responsiveBreakpoint: o = 1040, strings: s } = e, c = s ?? V, d = i ?? c.actions.menuLabel ?? c.actions.triggerLabel, f = P(() => {
285
- let e = typeof r == "function" ? r(t) : r;
286
- return Array.isArray(e) ? e : [];
287
- }, [r, t]), p = P(() => {
288
- let e = (e) => typeof e == "function" ? e(t) : e;
289
- return f.flatMap((t) => {
290
- let n = e(t.visible) ?? !0;
291
- return n ? [{
292
- ...t,
293
- visible: n,
294
- disabled: e(t.disabled) ?? !1
295
- }] : [];
296
- });
297
- }, [f, t]), m = p.length > 0, [h, g] = I(!1), _ = p.filter((e) => e.tone !== "destructive"), v = p.filter((e) => e.tone === "destructive"), y = [..._, ...v];
298
- if (N(() => {
299
- if (a !== "auto" || !m) {
300
- g(!1);
301
- return;
302
- }
303
- let e = () => {
304
- try {
305
- g(window.innerWidth <= o);
306
- } catch {
307
- g(!1);
308
- }
309
- };
310
- return e(), window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
311
- }, [
312
- a,
313
- m,
314
- o
315
- ]), !m) return null;
316
- let b = a === "auto" ? h ? "menu" : "inline" : a, x = y.map((e, n) => ({
317
- id: e.id || `${e.label}-${n}`,
318
- label: e.label,
319
- icon: e.icon,
320
- disabled: !!e.disabled,
321
- tone: e.tone,
322
- buttonStyle: e.buttonStyle,
323
- onClick: () => e.onClick?.(t)
324
- }));
325
- return b === "inline" ? /* @__PURE__ */ L(u, {
326
- actions: x,
327
- className: n("table-actions--component")
328
- }) : /* @__PURE__ */ L(l, {
329
- actions: x,
330
- srText: d || c.actions.srLabel,
331
- closeOnSelect: !0,
332
- align: "end",
333
- density: "table"
334
- });
335
- }
336
- Xe.displayName = "DataTableActions";
337
- //#endregion
338
- //#region src/components/features/table/table-helpers.tsx
339
- var U = (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
- }, Ze = (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
- }, W = (e, t, n) => {
350
- typeof e == "function" ? t((t) => {
351
- let r = e(t);
352
- return n && n(r), r;
353
- }) : (t(e), n && n(e));
354
- }, Qe = (e, t, n, r) => {
355
- let i = "";
356
- return r && (i += "bg-muted "), typeof n == "function" ? i += n(e, t) + " " : n && (i += n + " "), i.trim();
357
- }, $e = (e, t, n, r, i) => {
358
- let a = "";
359
- 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;
360
- }, et = (e) => e.getSelectedRowModel().rows.map((e) => e.original), tt = (e, t = V) => /* @__PURE__ */ L("div", {
361
- className: "px-space-sm",
362
- children: /* @__PURE__ */ L(se, {
363
- className: "size-icon cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",
364
- checked: e.getIsSelected(),
365
- disabled: !e.getCanSelect(),
366
- onCheckedChange: (t) => e.toggleSelected(t === !0),
367
- onClick: (e) => e.stopPropagation(),
368
- "aria-label": t.selection.row(e.index)
369
- })
370
- }), nt = (e, t = V) => /* @__PURE__ */ L("div", {
371
- className: "px-space-sm",
372
- children: /* @__PURE__ */ L(se, {
373
- className: "size-icon cursor-pointer",
374
- checked: e.getIsAllPageRowsSelected(),
375
- indeterminate: e.getIsSomePageRowsSelected() && !e.getIsAllPageRowsSelected(),
376
- onCheckedChange: (t) => e.toggleAllPageRowsSelected(t === !0),
377
- "aria-label": t.selection.selectAll
378
- })
379
- }), rt = (e, t = V) => [{
380
- id: "selection",
381
- header: ({ table: e }) => nt(e, t),
382
- cell: ({ row: e }) => tt(e, t),
383
- enableSorting: !1,
384
- enableResizing: !1,
385
- size: 40
386
- }, ...e];
387
- //#endregion
388
- //#region src/components/features/table/table-body.tsx
389
- function it({ table: e, onRowClick: t, emptyStateMessage: r, emptyStateAction: i, cellClassName: a = "", rowClassName: o = "", stickyFirstColumn: s = !1, striped: c = !1, strings: l }) {
390
- let u = e.getRowModel().rows, f = r ?? l?.emptyState.message ?? V.emptyState.message, p = (e) => {
391
- t && t(e);
392
- };
393
- return u.length ? /* @__PURE__ */ L(ve, { children: u.map((e, r) => {
394
- let i = e.getIsSelected(), l = e.getVisibleCells(), u = Qe(e, r, o, i), f = () => {
395
- t && p(e.original);
396
- }, m = c && r % 2 != 0 ? d.tableStripe : "", h = t ? "cursor-pointer" : "", g = n(u, m, "transition-colors duration-150", `${d.tableRowHover} ${d.tableRowSelected}`, h, "border-b border-border/60 last:border-b-0");
397
- return /* @__PURE__ */ L(A, {
398
- "data-state": i ? "selected" : null,
399
- className: g,
400
- onClick: f,
401
- children: l.map((t, r) => /* @__PURE__ */ L(_e, {
402
- className: n($e(t.column.id, e, a, s, r === 0), t.column.columnDef.meta?.align === "end" && "text-right", t.column.columnDef.meta?.align === "center" && "text-center"),
403
- children: Fe(t.column.columnDef.cell, t.getContext())
404
- }, t.id))
405
- }, e.id);
406
- }) }) : /* @__PURE__ */ L(ve, {
407
- className: "table-body--component",
408
- children: /* @__PURE__ */ L(A, {
409
- className: "hover:bg-transparent",
410
- children: /* @__PURE__ */ L(_e, {
411
- className: "p-0! text-center whitespace-normal",
412
- colSpan: e.getAllColumns().length,
413
- children: /* @__PURE__ */ L(Se, {
414
- title: f,
415
- description: !1,
416
- media: /* @__PURE__ */ L(B, { className: "size-icon" }),
417
- mediaVariant: "icon-soft",
418
- actions: i,
419
- className: "data-table--empty-state w-[100cqw] max-w-full"
420
- })
421
- })
422
- })
423
- });
424
- }
425
- it.displayName = "DataTableBody";
426
- //#endregion
427
- //#region src/components/features/table/table-header.tsx
428
- function at({ table: e, enableResizing: t = !1, stickyHeader: a = !1, headerClassName: o = "", cellClassName: c = "", stickyFirstColumn: l = !1, columnGroups: u, headerTransparent: f = !1 }) {
429
- let p = e.getHeaderGroups(), m = a ? n("shadow-[0_1px_0_0_var(--border)]", f ? "bg-background" : "bg-muted") : "", h = (e) => u ? u.find((t) => t.columns.includes(e)) : null;
430
- return /* @__PURE__ */ R(be, {
431
- className: n(a && "sticky top-0 z-20", o),
432
- children: [(() => {
433
- if (!u || u.length === 0 || p.length === 0) return null;
434
- let e = p[0].headers, t = null, r = 0, a = [];
435
- return e.forEach((o, s) => {
436
- let c = h(o.id)?.header || "";
437
- c === t ? r++ : (t !== null && r > 0 && a.push(/* @__PURE__ */ L(ye, {
438
- colSpan: r,
439
- className: n("h-12 border-r border-border/60 bg-muted/50 px-surface py-row-y-sm text-center text-muted-foreground last:border-r-0", m),
440
- children: /* @__PURE__ */ L(i, { children: t || "" })
441
- }, `group-${t}-${a.length}`)), t = c, r = 1), s === e.length - 1 && r > 0 && a.push(/* @__PURE__ */ L(ye, {
442
- colSpan: r,
443
- className: n("h-12 whitespace-nowrap border-r border-border/60 bg-muted/50 px-surface py-row-y-sm text-center text-muted-foreground last:border-r-0", m),
444
- children: /* @__PURE__ */ L(i, { children: t || "" })
445
- }, `group-${t}-${a.length}`));
446
- }), /* @__PURE__ */ L(A, {
447
- className: n("table-header--component", "border-b border-border"),
448
- children: a
449
- });
450
- })(), p.map((i) => /* @__PURE__ */ L(A, {
451
- className: n("border-b border-border/60", f ? "bg-transparent hover:bg-transparent" : `${d.tableHead} ${d.tableRowHover}`),
452
- children: i.headers.map((i, o) => {
453
- let u = n($e(i.id, null, c, l, o === 0), "h-12", "text-muted-foreground font-medium whitespace-nowrap", i.column.columnDef.meta?.align === "end" && "text-right", i.column.columnDef.meta?.align === "center" && "text-center", m, a && l && o === 0 && "z-30", !a && "bg-transparent", t && !(l && o === 0) && "relative"), d = t ? { width: i.getSize() } : void 0, f = i.getResizeHandler(), p = i.getLeafHeaders().filter((e) => e.subHeaders.length === 0), h = p.reduce((e, t) => e + (t.column.columnDef.minSize ?? 20), 0), g = Math.min(2 ** 53 - 1, p.reduce((e, t) => e + (t.column.columnDef.maxSize ?? 2 ** 53 - 1), 0)), _ = (t) => {
454
- e.setOptions((e) => ({
455
- ...e,
456
- columnResizeDirection: getComputedStyle(t.currentTarget).direction === "rtl" ? "rtl" : "ltr"
457
- })), f(t);
458
- }, v = i.column.getIsResizing(), y = (() => {
459
- let e = i.column.columnDef.header;
460
- return typeof e == "string" ? e : typeof i.id == "string" ? i.id : "column";
461
- })();
462
- return /* @__PURE__ */ L(ye, {
463
- colSpan: i.colSpan,
464
- className: u,
465
- style: d,
466
- children: i.isPlaceholder ? null : /* @__PURE__ */ R("div", {
467
- className: n(t && i.column.getCanResize() && "pe-action-sm"),
468
- children: [(() => {
469
- let e = i.column.getCanSort(), t = i.column.getIsSorted(), a = Fe(i.column.columnDef.header, i.getContext()), o = t === "asc" ? z : t === "desc" ? Ee : Ae;
470
- return e ? /* @__PURE__ */ R(r, {
471
- type: "button",
472
- tone: "secondary",
473
- buttonStyle: "ghost",
474
- size: "sm",
475
- onClick: i.column.getToggleSortingHandler(),
476
- 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 ${s.edge}`, t && "text-foreground"),
477
- "aria-label": `Sort ${y}`,
478
- children: [a, /* @__PURE__ */ L(o, {
479
- className: n("size-icon-sm shrink-0 transition-opacity", t ? "opacity-100" : "opacity-30 group-hover:opacity-70"),
480
- "aria-hidden": "true"
481
- })]
482
- }) : /* @__PURE__ */ L("div", {
483
- className: n("flex items-center", i.column.columnDef.meta?.align === "end" && "justify-end", i.column.columnDef.meta?.align === "center" && "justify-center"),
484
- children: a
485
- });
486
- })(), !!t && i.column.getCanResize() && /* @__PURE__ */ L("div", {
487
- role: "separator",
488
- tabIndex: 0,
489
- 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-muted-foreground opacity-0 hover:opacity-100 focus-visible:opacity-100 focus-visible:outline-none focus-visible:after:w-1 focus-visible:after:bg-ring", v && "after:bg-primary-accent!"),
490
- "aria-label": `Resize ${y}`,
491
- "aria-orientation": "vertical",
492
- "aria-valuenow": i.getSize(),
493
- "aria-valuemin": h,
494
- "aria-valuemax": g,
495
- onKeyDown: (t) => {
496
- let n = getComputedStyle(t.currentTarget).direction === "rtl", r = (t.key === "ArrowRight" ? 10 : t.key === "ArrowLeft" ? -10 : 0) * (n ? -1 : 1);
497
- if (!r && t.key !== "Home" && t.key !== "End" || t.key === "End" && g === 2 ** 53 - 1) return;
498
- t.preventDefault(), t.stopPropagation();
499
- let a = i.getSize(), o = Math.max(h, Math.min(g, a + r)) / Math.max(1, a);
500
- e.setColumnSizing((e) => ({
501
- ...e,
502
- ...Object.fromEntries(p.map((e) => {
503
- 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));
504
- return [e.column.id, Math.round(i * 100) / 100];
505
- }))
506
- }));
507
- },
508
- onMouseDown: _,
509
- onTouchStart: _
510
- })]
511
- })
512
- }, i.id);
513
- })
514
- }, i.id))]
515
- });
516
- }
517
- at.displayName = "DataTableHeader";
518
- //#endregion
519
- //#region src/components/features/table/column-visibility-toggle.tsx
520
- function ot({ table: e, className: t, align: r = "end", labelVisibility: i = "hidden", strings: a = V }) {
521
- let o = e.getAllColumns().filter((e) => e.getCanHide());
522
- if (o.length === 0) return null;
523
- let s = i !== "hidden", c = o.map((e) => {
524
- let t = e.columnDef.header, n = a.columnVisibility.formatLabel(e.id, typeof t == "string" ? t : void 0);
525
- return {
526
- id: e.id,
527
- type: "checkbox",
528
- label: n,
529
- group: a.columnVisibility.title,
530
- checked: e.getIsVisible(),
531
- onCheckedChange: (t) => e.toggleVisibility(!!t),
532
- className: "capitalize"
533
- };
534
- });
535
- return /* @__PURE__ */ L(l, {
536
- actions: c,
537
- icon: Pe,
538
- label: a.columnVisibility.triggerLabel,
539
- srText: a.columnVisibility.triggerLabel,
540
- align: r,
541
- width: "w-48",
542
- density: "table",
543
- labelVisibility: s ? "responsive" : "hidden",
544
- buttonProps: {
545
- "aria-label": a.columnVisibility.triggerLabel,
546
- tone: "secondary",
547
- buttonStyle: "outline",
548
- size: "sm",
549
- iconOnly: !s,
550
- className: n("column-visibility-toggle--component", s ? "h-action-sm gap-space-sm px-control-sm" : "size-action-sm gap-0 px-0", t)
551
- },
552
- preserveOrder: !0
553
- });
554
- }
555
- ot.displayName = "ColumnVisibilityToggle";
556
- //#endregion
557
- //#region src/components/features/table/partials/fullscreen-toggle.tsx
558
- var st = "text-muted-foreground hover:text-foreground disabled:pointer-events-none disabled:opacity-50";
559
- function ct({ fullscreen: e, onFullscreenChange: t, enterLabel: i = "Enter full screen", exitLabel: a = "Exit full screen", className: o }) {
560
- let s = e ? a : i, c = e ? Ne : Me;
561
- return /* @__PURE__ */ L(r, {
562
- type: "button",
563
- tone: "secondary",
564
- buttonStyle: "ghost",
565
- size: "sm",
566
- iconOnly: !0,
567
- "aria-label": s,
568
- "aria-pressed": e,
569
- onClick: () => t(!e),
570
- className: n("fullscreen-toggle--component", st, o),
571
- children: /* @__PURE__ */ L(c, { className: "size-icon-sm" })
572
- });
573
- }
574
- ct.displayName = "FullscreenToggle";
575
- //#endregion
576
- //#region src/components/features/table/table-toolbar.tsx
577
- var lt = 300, ut = "text-muted-foreground transition-colors duration-150 hover:text-foreground disabled:pointer-events-none disabled:opacity-50";
578
- function dt({ label: e, onClick: t, disabled: i, className: a, children: o }) {
579
- return /* @__PURE__ */ L(r, {
580
- type: "button",
581
- tone: "secondary",
582
- buttonStyle: "ghost",
583
- size: "sm",
584
- iconOnly: !0,
585
- "aria-label": e,
586
- className: n("table-toolbar--component", ut, k.joinedItem, a),
587
- onClick: t,
588
- disabled: i,
589
- children: o
590
- });
591
- }
592
- function G(e) {
593
- return e ? e.querySelector("[data-slot=\"table-container\"]") : null;
594
- }
595
- function ft({ table: r, tableAreaRef: i, fullscreen: a, onFullscreenChange: o, showFullscreenToggle: s = !1, enableColumnVisibility: c = !1, labelVisibility: l = "hidden", strings: u = V }) {
596
- let { defaultScale: d } = e(), f = t(void 0, d), [p, m] = I(!1), [h, g] = I(!1), _ = F(0), v = F(null), y = M(() => {
597
- let e = G(i.current);
598
- if (!e) {
599
- m(!1), g(!1);
600
- return;
601
- }
602
- let { scrollLeft: t, scrollWidth: n, clientWidth: r } = e;
603
- m(t > 1), g(t + r < n - 1);
604
- }, [i]);
605
- N(() => {
606
- let e = window.setTimeout(() => {
607
- let e = G(i.current);
608
- if (!e || (y(), typeof ResizeObserver > "u")) return;
609
- let t = () => {
610
- cancelAnimationFrame(_.current), _.current = requestAnimationFrame(y);
611
- };
612
- e.addEventListener("scroll", t, { passive: !0 });
613
- let n = new ResizeObserver(y);
614
- n.observe(e), e.firstElementChild && n.observe(e.firstElementChild), v.current = () => {
615
- e.removeEventListener("scroll", t), cancelAnimationFrame(_.current), n.disconnect();
616
- };
617
- }, 0);
618
- return () => {
619
- window.clearTimeout(e), v.current?.();
620
- };
621
- }, [
622
- i,
623
- y,
624
- a
625
- ]);
626
- let b = M(() => {
627
- G(i.current)?.scrollBy({
628
- left: -300,
629
- behavior: "smooth"
630
- });
631
- }, [i]), x = M(() => {
632
- G(i.current)?.scrollBy({
633
- left: lt,
634
- behavior: "smooth"
635
- });
636
- }, [i]), S = c ? r.getAllColumns().filter((e) => e.getCanHide()) : [], C = p || h, w = S.length > 0, T = s;
637
- return !C && !w && !T ? null : /* @__PURE__ */ R("div", {
638
- className: n(k.joinedFrame, ce[f], "bg-card"),
639
- children: [
640
- !!C && /* @__PURE__ */ R(Te, { children: [
641
- /* @__PURE__ */ L(dt, {
642
- label: u.toolbar.scrollLeft,
643
- onClick: b,
644
- disabled: !p,
645
- className: k.firstItem,
646
- children: /* @__PURE__ */ L(Oe, { className: "size-icon-sm" })
647
- }),
648
- /* @__PURE__ */ L(dt, {
649
- label: u.toolbar.scrollRight,
650
- onClick: x,
651
- disabled: !h,
652
- children: /* @__PURE__ */ L(ke, { className: "size-icon-sm" })
653
- }),
654
- (w || T) && /* @__PURE__ */ L("div", { className: "h-4 w-px self-center bg-border" })
655
- ] }),
656
- !!w && /* @__PURE__ */ R(Te, { children: [/* @__PURE__ */ L(ot, {
657
- table: r,
658
- strings: u,
659
- labelVisibility: l,
660
- className: n(k.joinedItem, "border-0 shadow-none", !C && k.firstItem, !T && k.lastItem)
661
- }), T && /* @__PURE__ */ L("div", { className: "h-4 w-px self-center bg-border" })] }),
662
- T && /* @__PURE__ */ L(ct, {
663
- fullscreen: a,
664
- onFullscreenChange: o,
665
- enterLabel: u.toolbar.enterFullscreen,
666
- exitLabel: u.toolbar.exitFullscreen,
667
- className: n(k.joinedItem, k.lastItem, !C && !w && k.firstItem)
668
- })
669
- ]
670
- });
671
- }
672
- ft.displayName = "DataTableToolbar";
673
- //#endregion
674
- //#region src/components/features/table/data-table.tsx
675
- var pt = Ce("sm");
676
- function mt() {
677
- return we(pt);
678
- }
679
- var ht = {
680
- 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",
681
- 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",
682
- 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"
683
- }, gt = {
684
- sm: "sm",
685
- md: "sm",
686
- lg: "sm"
687
- }, _t = (e) => {
688
- if (e !== void 0) return typeof e == "number" ? `${e}px` : e;
689
- };
690
- function vt(e, t) {
691
- return e.map((e) => "columns" in e && e.columns ? {
692
- ...e,
693
- columns: vt(e.columns, t)
694
- } : (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 ? {
695
- ...e,
696
- filterFn: "includesString"
697
- } : e);
698
- }
699
- function K({ size: r, surface: i = "card", headerTransparent: a = !0, columns: o, data: c, columnGroups: l, rowActions: u, rowActionsMenuLabel: d, rowActionsDisplayMode: f, rowActionsBreakpoint: p, enableSorting: m = !1, enableResizing: h = !1, enableFiltering: g = !1, filterColumn: _, filterPlaceholder: v, manualSorting: y = !1, enableColumnVisibility: b = !1, fullscreen: x, defaultFullscreen: S = !1, onFullscreenChange: C, showFullscreenToggle: w = !1, enableRowSelection: T = !1, enableMultiRowSelection: ee = !0, enableSubRowSelection: te = !1, pagination: E, pageQueryKey: ne, onPageChange: re, onSortingChange: D, onColumnFiltersChange: O, onRowClick: se, onRowSelectionChange: k, stickyHeader: ce = !1, stickyToolbar: le = !1, stickyFirstColumn: ue = !1, maxBodyHeight: de, fillAvailableHeight: fe = !1, emptyStateMessage: pe, emptyStateAction: me, className: he = "", rowClassName: ge = "", cellClassName: A = "", headerClassName: _e = "", wrapperClassName: ve = "", innerClassName: ye = "", tableContainerClassName: be = "", getRowId: Se, rowSelection: Ce, sorting: j, defaultSorting: we, columnVisibility: N, defaultColumnVisibility: Ee, initialState: z, onColumnVisibilityChange: De, strings: Oe, topbarContent: ke, topbarEnd: Ae, topbarClassName: je, toolbarLabelVisibility: Me = "hidden", footerContent: Ne, selectionToolbar: B, bulkActions: Pe, selectionToolbarClassName: Fe, selectionToolbarPlacement: Be = "floating", totalRowCount: Ve, storageKey: He }) {
700
- let { defaultScale: Ue } = e(), Ge = t(r, Ue), V = P(() => Ke(Oe), [Oe]), H = n("bg-card", ge), qe = pe ?? V.emptyState.message, Je = ne ?? "page", U = _t(de), Ze = Array.isArray(o) && o.length === 2 && Array.isArray(o[1]) ? o[0] : o, W = P(() => He ? `dt.${He}.columns` : null, [He]), Qe = P(() => {
701
- let e = Ee ?? z?.columnVisibility ?? {};
702
- if (!W || typeof window > "u") return e;
703
- try {
704
- let t = window.localStorage.getItem(W);
705
- return {
706
- ...t ? JSON.parse(t) : {},
707
- ...e
708
- };
709
- } catch {
710
- return e;
711
- }
712
- }, [
713
- Ee,
714
- W,
715
- z?.columnVisibility
716
- ]), [$e, et] = I(we ?? z?.sorting ?? []), [tt, nt] = I(z?.columnFilters ?? []), [ot, st] = I(Qe), [ct, lt] = I(z?.rowSelection || {}), [ut, dt] = I(S), G = j ?? $e, mt = N ?? ot, K = Ce ?? ct, q = x ?? ut, J = F(null), yt = F(null), bt = P(() => ({ get current() {
717
- let e = yt.current;
718
- return e?.isConnected ? e : J.current?.querySelector("thead [role=\"checkbox\"]") ?? null;
719
- } }), []), xt = M((e) => {
720
- e.target instanceof HTMLElement && (yt.current = e.target);
721
- }, []), St = M((e) => {
722
- let t = typeof e == "function" ? e(tt) : e;
723
- nt(t), O?.(t);
724
- }, [tt, O]), Ct = M((e) => {
725
- let t = typeof e == "function" ? e(G) : e;
726
- j === void 0 && et(t), D?.(t);
727
- }, [
728
- j,
729
- D,
730
- G
731
- ]), wt = M((e) => {
732
- let t = typeof e == "function" ? e(mt) : e;
733
- if (N === void 0 && st(t), W && typeof window < "u") try {
734
- window.localStorage.setItem(W, JSON.stringify(t));
735
- } catch {}
736
- De?.(t);
737
- }, [
738
- mt,
739
- N,
740
- W,
741
- De
742
- ]), Tt = M((e) => {
743
- let t = typeof e == "function" ? e(K) : e;
744
- Ce === void 0 && lt(t), k?.(t);
745
- }, [
746
- Ce,
747
- k,
748
- K
749
- ]), Et = F(null), Y = M((e) => {
750
- x === void 0 && dt(e), C?.(e);
751
- }, [x, C]);
752
- We(q, Et, M(() => Y(!1), [Y]));
753
- let Dt = M((e) => typeof d == "function" ? d(e) : d ?? V.actions.menuLabel, [d, V.actions.menuLabel]), Ot = P(() => {
754
- let e = g && _ ? vt(Ze, _) : Ze, t = T ? rt(e, V) : e;
755
- if (!u) return t;
756
- let n = {
757
- id: "actions",
758
- header: V.actions.triggerLabel,
759
- cell: ({ row: e }) => /* @__PURE__ */ L(Xe, {
760
- row: e.original,
761
- actions: u,
762
- menuLabel: Dt(e.original),
763
- displayMode: f,
764
- responsiveBreakpoint: p,
765
- strings: V
766
- }),
767
- enableSorting: !1,
768
- enableHiding: !1,
769
- size: 40
770
- };
771
- return [...t, n];
772
- }, [
773
- Ze,
774
- g,
775
- _,
776
- T,
777
- u,
778
- Dt,
779
- p,
780
- f,
781
- V
782
- ]), X = ze({
783
- data: c,
784
- columns: Ot,
785
- state: {
786
- sorting: G,
787
- columnVisibility: mt,
788
- rowSelection: K,
789
- columnFilters: tt
790
- },
791
- enableSorting: m,
792
- enableColumnResizing: h,
793
- columnResizeMode: "onChange",
794
- enableColumnFilters: g,
795
- manualFiltering: !g,
796
- manualSorting: y,
797
- autoResetPageIndex: !1,
798
- enableRowSelection: T,
799
- enableMultiRowSelection: ee,
800
- enableSubRowSelection: te,
801
- onSortingChange: m ? Ct : void 0,
802
- onRowSelectionChange: T ? Tt : void 0,
803
- onColumnVisibilityChange: wt,
804
- onColumnFiltersChange: St,
805
- getCoreRowModel: Ie(),
806
- getFilteredRowModel: Le(),
807
- getSortedRowModel: Re(),
808
- getRowId: Se
809
- }), Z = g && _ ? X.getAllLeafColumns().find((e) => e.id === _ && e.getCanFilter()) : void 0, kt = v ?? V.filter.searchPlaceholder, At = E && E.last_page > 1, jt = X.getSelectedRowModel().rows.map((e) => e.original), Q = jt.length, Mt = M(() => {
810
- X.resetRowSelection();
811
- }, [X]), $ = Ve ?? E?.total ?? c.length, Nt = {
812
- table: X,
813
- selectedRows: jt,
814
- selectedRowCount: Q,
815
- totalRowCount: $,
816
- rowSelection: K,
817
- clearSelection: Mt
818
- }, Pt = (() => {
819
- if (!T || B === null || B === !1) return null;
820
- if (B !== void 0) return Q === 0 ? null : typeof B == "function" ? B(Nt) : B;
821
- let e = Q === 0 ? null : typeof Pe == "function" ? Pe(Nt) : Pe, t = /* @__PURE__ */ L(ie, {
822
- selectedCount: Q,
823
- totalCount: $,
824
- onClear: Mt,
825
- placement: Be,
826
- returnFocusRef: bt,
827
- className: n("data-table-selection-toolbar--component", Fe),
828
- strings: {
829
- summary: (e, t) => V.selection.summary(e, t ?? $),
830
- clear: V.selection.clear
831
- },
832
- children: e
833
- });
834
- return Be === "inline" ? /* @__PURE__ */ L("div", {
835
- "data-slot": "data-table-selection-toolbar",
836
- className: "data-table--selection-toolbar px-surface py-row-y empty:hidden",
837
- children: t
838
- }) : t;
839
- })(), Ft = P(() => {
840
- if (U) return { "--data-table-body-max-height": U };
841
- }, [U]), It = q || fe || U !== void 0, Lt = pt.Provider, Rt = gt[Ge];
842
- return /* @__PURE__ */ L(Lt, {
843
- value: Rt,
844
- children: /* @__PURE__ */ R("div", {
845
- ref: Et,
846
- role: q ? "dialog" : void 0,
847
- "aria-modal": q ? !0 : void 0,
848
- "aria-label": q ? V.accessibility.fullscreenRegion : void 0,
849
- className: n("data-table--component @container/data-table box-border", q ? "fixed inset-0 z-50 bg-background flex flex-col overflow-hidden p-surface" : n("w-full min-w-0 max-w-full", fe && "flex h-full min-h-0 flex-col", i === "card" && "overflow-hidden rounded-radius border border-border bg-card shadow-xs", i === "glass" && "rounded-radius overflow-hidden border border-border/60", ve)),
850
- children: [
851
- !!(Z || ke || Ae || b || w) && /* @__PURE__ */ R("div", {
852
- className: n("relative", le && "sticky top-0 z-20 bg-card"),
853
- children: [/* @__PURE__ */ R("div", {
854
- 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", q ? "mb-space-lg shrink-0" : "mb-0", je),
855
- children: [/* @__PURE__ */ R("div", {
856
- className: "data-table-topbar-left flex min-w-0 flex-col gap-space-md",
857
- children: [ke, Z && /* @__PURE__ */ L("div", {
858
- className: "min-w-0 max-w-sm",
859
- children: /* @__PURE__ */ L(oe, {
860
- "aria-label": kt,
861
- placeholder: kt,
862
- value: Z.getFilterValue() ?? "",
863
- onChange: (e) => Z.setFilterValue(e.target.value)
864
- })
865
- })]
866
- }), /* @__PURE__ */ R("div", {
867
- className: "data-table-topbar-right flex flex-wrap items-center justify-end gap-space-md",
868
- children: [Ae, /* @__PURE__ */ L(ft, {
869
- table: X,
870
- tableAreaRef: J,
871
- fullscreen: q,
872
- onFullscreenChange: Y,
873
- showFullscreenToggle: w,
874
- enableColumnVisibility: b,
875
- labelVisibility: Me,
876
- strings: V
877
- })]
878
- })]
879
- }), /* @__PURE__ */ L(ae, {})]
880
- }),
881
- Pt,
882
- /* @__PURE__ */ L("div", {
883
- ref: J,
884
- style: Ft,
885
- onFocus: T ? xt : void 0,
886
- className: n("min-h-0", It ? "overflow-hidden" : ye, (q || fe) && "flex-1"),
887
- children: /* @__PURE__ */ R(xe, {
888
- containerProps: {
889
- role: "region",
890
- "aria-label": V.accessibility.scrollRegion
891
- },
892
- style: h ? { width: X.getTotalSize() } : void 0,
893
- className: n("relative", h && "min-w-full table-fixed", ht[Ge], he),
894
- containerClassName: n(`focus-visible:outline-none ${s.edge}`, It && "overflow-auto", U !== void 0 && "max-h-(--data-table-body-max-height)", (q || fe) && "h-full min-h-0", be),
895
- children: [/* @__PURE__ */ L(at, {
896
- enableResizing: h,
897
- table: X,
898
- stickyHeader: ce,
899
- headerClassName: _e,
900
- cellClassName: A,
901
- stickyFirstColumn: ue,
902
- columnGroups: l,
903
- headerTransparent: a
904
- }), /* @__PURE__ */ L(it, {
905
- table: X,
906
- onRowClick: se,
907
- emptyStateMessage: qe,
908
- emptyStateAction: me,
909
- cellClassName: A,
910
- rowClassName: H,
911
- stickyFirstColumn: ue,
912
- strings: V
913
- })]
914
- })
915
- }),
916
- !!At && /* @__PURE__ */ R(Te, { children: [/* @__PURE__ */ L(ae, {}), /* @__PURE__ */ L(Ye, {
917
- pagination: E,
918
- onPageChange: re,
919
- pageQueryKey: Je,
920
- labels: V.pagination
921
- })] }),
922
- !!Ne && /* @__PURE__ */ L("div", {
923
- "data-slot": "data-table-footer",
924
- className: "data-table--footer border-t border-border/60 px-surface py-row-y",
925
- children: Ne
926
- })
927
- ]
928
- })
929
- });
930
- }
931
- K.displayName = "DataTable";
932
- //#endregion
933
- //#region src/components/features/table/filter-bar.tsx
934
- function q({ table: e, filterColumn: t, filterPlaceholder: r, enableColumnVisibility: i = !1, customContent: a, strings: o = V }) {
935
- if (!t && !i && !a) return null;
936
- let s = r ?? o.filter.searchPlaceholder;
937
- return /* @__PURE__ */ R("div", {
938
- className: n("filter-bar--component", "flex items-center justify-between p-surface"),
939
- children: [/* @__PURE__ */ R("div", {
940
- className: "flex flex-1 items-center space-x-space-md",
941
- children: [!!t && /* @__PURE__ */ L(oe, {
942
- placeholder: s,
943
- value: e.getColumn(t)?.getFilterValue() ?? "",
944
- onChange: (n) => {
945
- let r = n.target.value;
946
- e.getColumn(t)?.setFilterValue(r);
947
- },
948
- className: "max-w-sm"
949
- }), a]
950
- }), !!i && /* @__PURE__ */ L(ot, {
951
- table: e,
952
- strings: o,
953
- labelVisibility: "responsive",
954
- className: "ml-auto"
955
- })]
956
- });
957
- }
958
- q.displayName = "DataTableFilterBar";
959
- //#endregion
960
- //#region src/components/features/table/partials/cell-value.tsx
961
- function J(e) {
962
- return e === !1 || e == null || typeof e == "string" && e.trim() === "";
963
- }
964
- function yt(e) {
965
- return e == null;
966
- }
967
- function bt(e) {
968
- return typeof e == "object" && !!e && !Array.isArray(e) && !j(e) && !(e instanceof Date);
969
- }
970
- function xt(e) {
971
- return Array.isArray(e);
972
- }
973
- function St(e) {
974
- let [t, n, r] = e;
975
- return {
976
- ...r,
977
- value: t,
978
- kind: n
979
- };
980
- }
981
- function Ct(e) {
982
- if (e === !1) return null;
983
- if (j(e)) return e;
984
- if (xt(e)) {
985
- let t = St(e);
986
- return J(t.value) && yt(t.display) ? null : t;
987
- }
988
- return bt(e) ? J(e.value) && yt(e.display) ? null : e : J(e) ? null : { value: e };
989
- }
990
- function wt(e) {
991
- return e instanceof Date ? e.toISOString() : String(e ?? "");
992
- }
993
- function Tt({ descriptor: e, index: t = 0, emptyLabel: r, className: i, primaryWeight: a = "medium" }) {
994
- let o = t === 0, s = e.kind ?? (o ? "value" : "secondary"), c = e.value, l = e.display ?? (c instanceof Date ? wt(c) : c), u = e.emptyLabel ?? r, d = n(i, e.className), x = o ? a : "regular";
995
- switch (s) {
996
- case "secondary": return /* @__PURE__ */ L(h, {
997
- size: "inherit",
998
- className: d,
999
- children: l
1000
- });
1001
- case "muted": return /* @__PURE__ */ L(g, {
1002
- size: "inherit",
1003
- className: d,
1004
- children: l
1005
- });
1006
- case "name": return /* @__PURE__ */ L(m, {
1007
- value: e.display === void 0 && typeof c == "string" ? c : void 0,
1008
- force: e.force,
1009
- emptyLabel: u,
1010
- size: "inherit",
1011
- weight: x,
1012
- className: d,
1013
- children: e.display
1014
- });
1015
- case "mono": return /* @__PURE__ */ L(y, {
1016
- size: "inherit",
1017
- weight: x,
1018
- className: d,
1019
- children: l
1020
- });
1021
- case "link": {
1022
- let t = e.href ?? wt(c);
1023
- return /* @__PURE__ */ L(S, {
1024
- href: t,
1025
- emptyLabel: u,
1026
- className: d,
1027
- children: l
1028
- });
1029
- }
1030
- case "email": return /* @__PURE__ */ L(b, {
1031
- value: typeof c == "string" ? c : void 0,
1032
- display: e.display,
1033
- emptyLabel: u,
1034
- className: d
1035
- });
1036
- case "phone": return /* @__PURE__ */ L(p, {
1037
- value: typeof c == "string" ? c : void 0,
1038
- display: e.display,
1039
- emptyLabel: u,
1040
- className: d
1041
- });
1042
- case "url": return /* @__PURE__ */ L(v, {
1043
- value: typeof c == "string" ? c : void 0,
1044
- display: e.display,
1045
- emptyLabel: u,
1046
- className: d
1047
- });
1048
- case "money": return /* @__PURE__ */ L(T, {
1049
- amount: typeof c == "number" || typeof c == "string" ? c : null,
1050
- currency: e.currency,
1051
- locale: e.locale,
1052
- currencyDisplay: e.currencyDisplay,
1053
- minimumFractionDigits: e.minimumFractionDigits,
1054
- maximumFractionDigits: e.maximumFractionDigits,
1055
- formatMode: e.formatMode,
1056
- emptyLabel: u,
1057
- size: "inherit",
1058
- weight: x,
1059
- className: d
1060
- });
1061
- case "number": return /* @__PURE__ */ L(ee, {
1062
- value: typeof c == "number" || typeof c == "string" ? c : null,
1063
- locale: e.locale,
1064
- options: e.options,
1065
- emptyLabel: u,
1066
- size: "inherit",
1067
- weight: x,
1068
- className: d
1069
- });
1070
- case "percent": return /* @__PURE__ */ L(w, {
1071
- value: typeof c == "number" || typeof c == "string" ? c : null,
1072
- locale: e.locale,
1073
- scaled: e.scaled,
1074
- options: e.options,
1075
- emptyLabel: u,
1076
- size: "inherit",
1077
- weight: x,
1078
- className: d
1079
- });
1080
- case "fileSize": return /* @__PURE__ */ L(_, {
1081
- value: typeof c == "number" ? c : null,
1082
- from: e.from,
1083
- locale: e.locale,
1084
- emptyLabel: u,
1085
- size: "inherit",
1086
- weight: x,
1087
- className: d
1088
- });
1089
- case "date": return /* @__PURE__ */ L(D, {
1090
- value: c,
1091
- format: e.dateFormat,
1092
- preset: e.datePreset,
1093
- locale: e.dateLocale,
1094
- emptyLabel: u,
1095
- size: "inherit",
1096
- weight: x,
1097
- className: d
1098
- });
1099
- case "time": return /* @__PURE__ */ L(te, {
1100
- value: c,
1101
- format: e.timeFormat,
1102
- locale: e.dateLocale,
1103
- emptyLabel: u,
1104
- size: "inherit",
1105
- weight: x,
1106
- className: d
1107
- });
1108
- case "dateTime": return /* @__PURE__ */ L(ne, {
1109
- value: c,
1110
- format: e.dateFormat,
1111
- timeFormat: e.timeFormat,
1112
- preset: e.datePreset,
1113
- locale: e.dateLocale,
1114
- emptyLabel: u,
1115
- size: "inherit",
1116
- weight: x,
1117
- className: d
1118
- });
1119
- case "relativeTime": return /* @__PURE__ */ L(E, {
1120
- value: c,
1121
- locale: e.dateLocale,
1122
- emptyLabel: u,
1123
- size: "inherit",
1124
- weight: x,
1125
- className: d
1126
- });
1127
- default: return /* @__PURE__ */ L(f, {
1128
- size: "inherit",
1129
- weight: x,
1130
- className: d,
1131
- children: l
1132
- });
1133
- }
1134
- }
1135
- function Et({ value: e, kind: t, href: r, currency: i, currencyDisplay: a, minimumFractionDigits: o, maximumFractionDigits: s, formatMode: c, locale: l, dateLocale: u, from: d, force: p, options: m, scaled: h, dateFormat: g, datePreset: _, timeFormat: v, emptyLabel: y, fallback: b = "--", missing: S, className: C, children: w }) {
1136
- let T = S ?? J(e);
1137
- return w === void 0 ? T ? /* @__PURE__ */ L(x, {
1138
- size: "inherit",
1139
- className: n("cell-value--component", C),
1140
- children: y ?? b
1141
- }) : Tt({
1142
- descriptor: {
1143
- value: e,
1144
- kind: t,
1145
- href: r,
1146
- currency: i,
1147
- currencyDisplay: a,
1148
- minimumFractionDigits: o,
1149
- maximumFractionDigits: s,
1150
- formatMode: c,
1151
- locale: l,
1152
- dateLocale: u,
1153
- from: d,
1154
- force: p,
1155
- options: m,
1156
- scaled: h,
1157
- dateFormat: g,
1158
- datePreset: _,
1159
- timeFormat: v,
1160
- emptyLabel: y,
1161
- className: "cell-value--component"
1162
- },
1163
- emptyLabel: y ?? b,
1164
- className: C
1165
- }) : /* @__PURE__ */ L(T ? x : f, {
1166
- size: "inherit",
1167
- className: n("cell-value--component", C),
1168
- children: w
1169
- });
1170
- }
1171
- function Y({ values: e = [], emptyLabel: t = "--", className: r, itemClassName: i, primaryClassName: a, secondaryClassName: o, primaryWeight: s = "medium" }) {
1172
- let c = e.map(Ct).filter((e) => e !== null).slice(0, 4);
1173
- return c.length === 0 ? /* @__PURE__ */ L(x, {
1174
- size: "inherit",
1175
- className: n("cell-stack--component", r),
1176
- children: t
1177
- }) : /* @__PURE__ */ L("div", {
1178
- className: n("cell-stack--component flex min-w-0 flex-col items-start gap-space-2xs", r),
1179
- children: c.map((e, r) => {
1180
- let c = r === 0, l = n("cell-stack--item min-w-0 max-w-full truncate", !c && "text-xs", i, c ? a : o);
1181
- return j(e) ? /* @__PURE__ */ L("div", {
1182
- className: l,
1183
- children: e
1184
- }, r) : /* @__PURE__ */ L("div", {
1185
- className: l,
1186
- children: Tt({
1187
- descriptor: e,
1188
- index: r,
1189
- emptyLabel: t,
1190
- className: n("leading-tight", !c && "text-xs"),
1191
- primaryWeight: s
1192
- })
1193
- }, r);
1194
- })
1195
- });
1196
- }
1197
- Et.displayName = "CellValue", Y.displayName = "CellStack";
1198
- //#endregion
1199
- //#region src/components/features/table/partials/table-link.tsx
1200
- var Dt = ({ className: e, ...t }) => /* @__PURE__ */ L(S, {
1201
- className: n("table-link--component", "underline decoration-link-color/35 decoration-dotted underline-offset-2 hover:decoration-link-color", e),
1202
- ...t,
1203
- children: t.children
1204
- });
1205
- //#endregion
1206
- //#region src/components/features/table/partials/resource-cell.tsx
1207
- function Ot(e, t) {
1208
- if (e && typeof e == "object" && !("type" in e) && "label" in e) {
1209
- let n = e.icon;
1210
- return /* @__PURE__ */ R(O, {
1211
- tone: e.tone ?? "secondary",
1212
- dot: e.dot,
1213
- children: [!!n && /* @__PURE__ */ L(n, { className: "size-icon-sm" }), e.label]
1214
- }, e.id ?? t);
1215
- }
1216
- return /* @__PURE__ */ L("span", { children: e }, t);
1217
- }
1218
- function X(e) {
1219
- return e ? Array.isArray(e) ? /* @__PURE__ */ L("span", {
1220
- className: "inline-flex min-w-0 flex-wrap items-center gap-x-space-md gap-y-space-2xs",
1221
- children: e.map((e, t) => /* @__PURE__ */ R("span", {
1222
- className: "inline-flex min-w-0 items-center gap-space-sm",
1223
- children: [!!e.label && /* @__PURE__ */ L(a, {
1224
- tag: "span",
1225
- size: "inherit",
1226
- type: "secondary",
1227
- className: "shrink-0",
1228
- children: e.label
1229
- }), /* @__PURE__ */ L(a, {
1230
- tag: "span",
1231
- size: "inherit",
1232
- type: "secondary",
1233
- className: "truncate",
1234
- children: e.value
1235
- })]
1236
- }, e.id ?? t))
1237
- }) : e : null;
1238
- }
1239
- function Z({ title: e, subtitle: t, metadata: r, badges: i = [], imageUrl: l, icon: u = je, fallback: d, href: f, renderLink: p, emptyLabel: m = "—", className: h, mediaClassName: g, contentClassName: _, titleClassName: v, subtitleClassName: y }) {
1240
- if (!e) return /* @__PURE__ */ L(a, {
1241
- size: "inherit",
1242
- type: "secondary",
1243
- className: h,
1244
- children: m
1245
- });
1246
- let b = typeof e == "string" ? e : void 0, x = b ? C(b, { strategy: "first-words" }) : "", S = /* @__PURE__ */ R(c, {
1247
- render: /* @__PURE__ */ L("span", {}),
1248
- gap: "dense",
1249
- className: n("resource-cell--content", _),
1250
- children: [
1251
- /* @__PURE__ */ R(c, {
1252
- render: /* @__PURE__ */ L("span", {}),
1253
- direction: "horizontal",
1254
- gap: "sm",
1255
- wrap: !1,
1256
- className: "resource-cell--title-row",
1257
- children: [/* @__PURE__ */ L(a, {
1258
- tag: "span",
1259
- size: "inherit",
1260
- weight: "medium",
1261
- className: n("resource-cell--title truncate", v),
1262
- children: e
1263
- }), i.length > 0 && /* @__PURE__ */ L("span", {
1264
- className: "resource-cell--badges inline-flex shrink-0 items-center gap-space-sm",
1265
- children: i.map(Ot)
1266
- })]
1267
- }),
1268
- !!t && /* @__PURE__ */ L(a, {
1269
- tag: "span",
1270
- size: "inherit",
1271
- type: "secondary",
1272
- className: n("resource-cell--subtitle truncate", y),
1273
- children: t
1274
- }),
1275
- !!r && /* @__PURE__ */ L("span", {
1276
- className: "resource-cell--metadata min-w-0",
1277
- children: X(r)
1278
- })
1279
- ]
1280
- }), w = /* @__PURE__ */ R("span", {
1281
- className: n("resource-cell--component inline-flex min-w-0 items-center gap-space-md", h),
1282
- children: [/* @__PURE__ */ L("span", {
1283
- 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", g),
1284
- children: l ? /* @__PURE__ */ L("img", {
1285
- src: l,
1286
- alt: b ?? "",
1287
- className: "absolute inset-0 size-full object-cover"
1288
- }) : d || (x ? /* @__PURE__ */ L(a, {
1289
- size: "inherit",
1290
- weight: "semibold",
1291
- className: "text-sm leading-none",
1292
- children: x
1293
- }) : /* @__PURE__ */ L(u, { className: "size-icon" }))
1294
- }), S]
1295
- });
1296
- if (!f) return w;
1297
- let T = `resource-cell--link inline-flex min-w-0 rounded-inner outline-none ${s.text}`;
1298
- return p ? p({
1299
- href: f,
1300
- children: w,
1301
- className: T,
1302
- "aria-label": b
1303
- }) : /* @__PURE__ */ L(o, {
1304
- href: f,
1305
- size: "inherit",
1306
- underline: !1,
1307
- className: T,
1308
- "aria-label": b,
1309
- children: w
1310
- });
1311
- }
1312
- Z.displayName = "ResourceCell";
1313
- //#endregion
1314
- //#region src/components/features/table/partials/cell-renderers.tsx
1315
- function kt({ value: e, map: t, emptyLabel: r = "—", className: i }) {
1316
- if (!e || !(e in t)) return /* @__PURE__ */ L(a, {
1317
- size: "inherit",
1318
- type: "secondary",
1319
- className: n("status-cell--component", i),
1320
- children: r
1321
- });
1322
- let o = t[e], s = o.icon;
1323
- return /* @__PURE__ */ R(O, {
1324
- tone: o.tone ?? "secondary",
1325
- className: n("status-cell--component gap-space-sm", i),
1326
- children: [!!s && /* @__PURE__ */ L(s, { className: "size-icon-sm" }), o.label]
1327
- });
1328
- }
1329
- kt.displayName = "StatusCell";
1330
- function At({ items: e = [], emptyLabel: t = "—", className: r, badgeClassName: i }) {
1331
- let o = e.filter((e) => !e.hidden);
1332
- return o.length === 0 ? /* @__PURE__ */ L(a, {
1333
- size: "inherit",
1334
- type: "secondary",
1335
- className: n("status-cluster-cell--component", r),
1336
- children: t
1337
- }) : /* @__PURE__ */ L("span", {
1338
- className: n("status-cluster-cell--component inline-flex min-w-0 flex-wrap items-center gap-space-sm", r),
1339
- children: o.map((e, t) => {
1340
- let r = e.icon;
1341
- return /* @__PURE__ */ R(O, {
1342
- tone: e.tone ?? "secondary",
1343
- dot: e.dot,
1344
- className: n("shrink-0", i),
1345
- children: [!!r && /* @__PURE__ */ L(r, { className: "size-icon-sm" }), e.label]
1346
- }, e.id ?? t);
1347
- })
1348
- });
1349
- }
1350
- At.displayName = "StatusClusterCell";
1351
- function jt({ value: e, format: t, preset: r, locale: i, showIcon: o = !1, icon: s = De, emptyLabel: c = "—", className: l }) {
1352
- let u = re(e);
1353
- return u ? /* @__PURE__ */ R("span", {
1354
- className: n("date-cell--component inline-flex items-center gap-space-sm", l),
1355
- children: [!!o && /* @__PURE__ */ L(s, { className: "size-icon text-muted-foreground" }), /* @__PURE__ */ L(D, {
1356
- value: u,
1357
- format: t,
1358
- preset: r,
1359
- locale: i,
1360
- emptyLabel: c,
1361
- size: "inherit",
1362
- type: "secondary"
1363
- })]
1364
- }) : /* @__PURE__ */ L(a, {
1365
- size: "inherit",
1366
- type: "secondary",
1367
- className: n("date-cell--component", l),
1368
- children: c
1369
- });
1370
- }
1371
- jt.displayName = "DateCell";
1372
- function Q({ value: e, format: t, preset: r, locale: i, showIcon: o = !1, icon: s = De, emptyLabel: c = "—", className: l, primaryClassName: u, secondary: d, secondaryClassName: f }) {
1373
- let p = re(e);
1374
- if (!p) return /* @__PURE__ */ L(a, {
1375
- size: "inherit",
1376
- type: "secondary",
1377
- className: n("date-meta-cell--component", l),
1378
- children: c
1379
- });
1380
- let m = typeof d == "function" ? d(p) : d;
1381
- return /* @__PURE__ */ R("span", {
1382
- className: n("date-meta-cell--component inline-flex min-w-0 items-start gap-space-sm", l),
1383
- children: [!!o && /* @__PURE__ */ L(s, { className: "mt-space-2xs size-icon shrink-0 text-muted-foreground" }), /* @__PURE__ */ R("span", {
1384
- className: "grid min-w-0 gap-space-2xs",
1385
- children: [/* @__PURE__ */ L(D, {
1386
- value: p,
1387
- format: t,
1388
- preset: r,
1389
- locale: i,
1390
- emptyLabel: c,
1391
- size: "inherit",
1392
- type: "secondary",
1393
- className: n("truncate tabular-nums", u)
1394
- }), !!m && /* @__PURE__ */ L(a, {
1395
- tag: "span",
1396
- size: "inherit",
1397
- type: "secondary",
1398
- className: n("truncate", f),
1399
- children: m
1400
- })]
1401
- })]
1402
- });
1403
- }
1404
- Q.displayName = "DateMetaCell";
1405
- function Mt({ value: e, currency: t, locale: r, emptyLabel: i = "—", className: a, weight: o = "semibold" }) {
1406
- return /* @__PURE__ */ L(T, {
1407
- amount: e,
1408
- currency: t,
1409
- locale: r,
1410
- formatMode: t ? "with_symbol" : "decimal",
1411
- emptyLabel: i,
1412
- size: "inherit",
1413
- weight: o,
1414
- className: n("currency-cell--component tabular-nums", a)
1415
- });
1416
- }
1417
- Mt.displayName = "CurrencyCell";
1418
- function $({ name: e, imageUrl: t, icon: r = je, subtitle: i, emptyLabel: o = "—", className: s }) {
1419
- return !e || e.trim().length === 0 ? /* @__PURE__ */ L(a, {
1420
- size: "inherit",
1421
- type: "secondary",
1422
- className: n("avatar-cell--component", s),
1423
- children: o
1424
- }) : /* @__PURE__ */ R("span", {
1425
- className: n("avatar-cell--component inline-flex items-center gap-space-md", s),
1426
- children: [/* @__PURE__ */ L("span", {
1427
- className: "relative inline-flex size-avatar-sm shrink-0 items-center justify-center overflow-hidden rounded-full bg-muted text-muted-foreground",
1428
- children: t ? /* @__PURE__ */ L("img", {
1429
- src: t,
1430
- alt: e,
1431
- className: "absolute inset-0 size-full object-cover"
1432
- }) : e.length > 0 ? /* @__PURE__ */ L(a, {
1433
- size: "inherit",
1434
- weight: "semibold",
1435
- className: "text-sm leading-none",
1436
- children: C(e, { strategy: "first-words" })
1437
- }) : /* @__PURE__ */ L(r, { className: "size-icon" })
1438
- }), /* @__PURE__ */ R("span", {
1439
- className: "min-w-0 inline-flex flex-col",
1440
- children: [/* @__PURE__ */ L(a, {
1441
- size: "inherit",
1442
- weight: "medium",
1443
- className: "truncate",
1444
- children: e
1445
- }), !!i && /* @__PURE__ */ L(a, {
1446
- size: "inherit",
1447
- type: "secondary",
1448
- className: "truncate",
1449
- children: i
1450
- })]
1451
- })]
1452
- });
1453
- }
1454
- $.displayName = "AvatarCell";
1455
- //#endregion
1456
- export { V as A, Qe as C, Ze as D, U as E, Ve as M, He as N, Xe as O, $e as S, W as T, at as _, kt as a, nt as b, Dt as c, q as d, K as f, ot as g, ct as h, Q as i, Ke as j, Ye as k, Y as l, ft as m, Mt as n, At as o, mt as p, jt as r, Z as s, $ as t, Et as u, it as v, et as w, tt as x, rt as y };
1457
-
1458
- //# sourceMappingURL=table-CrcLN9Io.js.map