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