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