themelia-react-ui 2.0.4 → 2.0.6
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 +211 -0
- package/MIGRATION.md +119 -0
- package/README.md +122 -20
- package/dist/{accordion-96o0pN62.js → accordion-0tQUZ20r.js} +13 -13
- package/dist/accordion-0tQUZ20r.js.map +1 -0
- package/dist/{action-menu-CHgs8vmj.js → action-menu-C0gjzLyE.js} +48 -45
- package/dist/action-menu-C0gjzLyE.js.map +1 -0
- package/dist/{affordance-geometry.generated-B8yGOr8-.js → affordance-geometry.generated-P-aVJisu.js} +36 -36
- package/dist/affordance-geometry.generated-P-aVJisu.js.map +1 -0
- package/dist/{ai-artifact-BZUGwBq6.js → ai-artifact-CGGpQryR.js} +281 -230
- package/dist/ai-artifact-CGGpQryR.js.map +1 -0
- package/dist/app-shell-EHuuRDGy.js +321 -0
- package/dist/app-shell-EHuuRDGy.js.map +1 -0
- package/dist/{attachment-DkoqHPPl.js → attachment-BCpA4e7i.js} +10 -10
- package/dist/{attachment-DkoqHPPl.js.map → attachment-BCpA4e7i.js.map} +1 -1
- package/dist/{auth-D2FVZ1MH.js → auth-B0girIk_.js} +49 -52
- package/dist/auth-B0girIk_.js.map +1 -0
- package/dist/{avatar-DWO_HHhB.js → avatar-B9Jnp-T-.js} +8 -8
- package/dist/avatar-B9Jnp-T-.js.map +1 -0
- package/dist/{badge-DErMA7ul.js → badge-wWauMgAt.js} +5 -5
- package/dist/{badge-DErMA7ul.js.map → badge-wWauMgAt.js.map} +1 -1
- package/dist/base/accordion.js +1 -1
- package/dist/base/action-menu.js +1 -1
- package/dist/base/attachment.js +1 -1
- package/dist/base/avatar.js +1 -1
- package/dist/base/badge.js +1 -1
- package/dist/base/batch-action-bar.js +1 -1
- package/dist/base/buttons.js +1 -1
- package/dist/base/cards.js +2 -2
- package/dist/base/carousel.js +3 -3
- package/dist/base/cascader.js +2 -372
- package/dist/base/chart.js +1 -1
- package/dist/base/choice-inputs.js +2 -2
- package/dist/base/code-block.js +1 -1
- package/dist/base/combobox.js +2 -2
- package/dist/base/command.js +1 -1
- package/dist/base/copyable.js +1 -1
- package/dist/base/date-pickers.js +2 -2
- package/dist/base/display.js +6 -6
- package/dist/base/feedback.js +4 -4
- package/dist/base/forms-numeric.js +1 -1
- package/dist/base/forms.js +2 -2
- package/dist/base/inline-edit.js +10 -10
- package/dist/base/item.js +1 -1
- package/dist/base/media-gallery.js +1 -1
- package/dist/base/metadata-list.js +1 -1
- package/dist/base/navigation.js +7 -7
- package/dist/base/popover-menu.js +1 -1
- package/dist/base/popover.js +1 -1
- package/dist/base/qr-code.js +1 -1
- package/dist/base/repeaters.js +200 -193
- package/dist/base/repeaters.js.map +1 -1
- package/dist/base/sheet.js +1 -1
- package/dist/base/sidebar.js +2 -2
- package/dist/base/signature-pad.js +8 -8
- package/dist/base/signature-pad.js.map +1 -1
- package/dist/base/skeleton.js +1 -1
- package/dist/base/spinner.js +6 -6
- package/dist/base/spinner.js.map +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 +36 -36
- package/dist/base/toaster.js.map +1 -1
- package/dist/base/tree.js +1 -1
- package/dist/base/upload-queue.js +1 -1
- package/dist/base/upload.js +3 -3
- package/dist/base/value-inputs.js +1 -1
- package/dist/{batch-action-bar-CdfIkCsV.js → batch-action-bar-BoqWIIpV.js} +7 -7
- package/dist/batch-action-bar-BoqWIIpV.js.map +1 -0
- package/dist/blocks/admin.js +21 -21
- package/dist/blocks/admin.js.map +1 -1
- package/dist/blocks/ai.js +267 -247
- package/dist/blocks/ai.js.map +1 -1
- package/dist/blocks/analytics/usage-card.js +1 -1
- package/dist/blocks/analytics.js +537 -543
- 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 +1330 -1250
- package/dist/blocks/commerce.js.map +1 -1
- package/dist/blocks/data-display.js +2 -2
- package/dist/blocks/onboarding.js +6 -6
- package/dist/blocks/onboarding.js.map +1 -1
- package/dist/blocks/planning.js +11 -11
- package/dist/blocks/timelines.js +1 -1
- package/dist/{breadcrumbs-B-WFKecD.js → breadcrumbs-Bp9Ke7kd.js} +7 -7
- package/dist/breadcrumbs-Bp9Ke7kd.js.map +1 -0
- package/dist/{button-DkmK-z8E.js → button-ChBovTx0.js} +3 -3
- package/dist/button-ChBovTx0.js.map +1 -0
- package/dist/{buttons-BbfzgczK.js → buttons-DeW0bQeK.js} +16 -16
- package/dist/buttons-DeW0bQeK.js.map +1 -0
- package/dist/cards-CNXnmvV5.js +69 -0
- package/dist/cards-CNXnmvV5.js.map +1 -0
- package/dist/cascader-CrAl9zD5.js +439 -0
- package/dist/cascader-CrAl9zD5.js.map +1 -0
- package/dist/chart-I7ROnsl8.js +162 -0
- package/dist/chart-I7ROnsl8.js.map +1 -0
- package/dist/{checkbox-CzYUTPeJ.js → checkbox-MoyHIAPs.js} +3 -3
- package/dist/{checkbox-CzYUTPeJ.js.map → checkbox-MoyHIAPs.js.map} +1 -1
- package/dist/choice-inputs-DHGtx0QV.js +789 -0
- package/dist/choice-inputs-DHGtx0QV.js.map +1 -0
- package/dist/{code-block-CGNaUtAE.js → code-block-BSJyq9e-.js} +9 -9
- package/dist/code-block-BSJyq9e-.js.map +1 -0
- package/dist/{collapsible-Do4G0zcC.js → collapsible-BzJ91LUG.js} +5 -5
- package/dist/{collapsible-Do4G0zcC.js.map → collapsible-BzJ91LUG.js.map} +1 -1
- package/dist/{collection-content-C0e8SsTm.js → collection-content-CSnwtOTH.js} +3 -3
- package/dist/{collection-content-C0e8SsTm.js.map → collection-content-CSnwtOTH.js.map} +1 -1
- package/dist/combobox-Bcvu5J8O.js +363 -0
- package/dist/combobox-Bcvu5J8O.js.map +1 -0
- package/dist/combobox-C2JiSQPc.js +915 -0
- package/dist/combobox-C2JiSQPc.js.map +1 -0
- package/dist/{command-D8NrBj-b.js → command-9e52NPgK.js} +11 -11
- package/dist/command-9e52NPgK.js.map +1 -0
- package/dist/{comments-Di4w0H_S.js → comments-BsgErEqd.js} +44 -39
- package/dist/comments-BsgErEqd.js.map +1 -0
- package/dist/components/base/action-menu/action-menu.d.ts +7 -1
- package/dist/components/base/buttons/button-group.recipes.d.ts +2 -2
- package/dist/components/base/cards/card.recipes.d.ts +6 -4
- package/dist/components/base/cards/partials/card-primitives.d.ts +9 -2
- package/dist/components/base/cards/partials/smart-card-header-row.d.ts +3 -1
- package/dist/components/base/cards/smart-card.types.d.ts +3 -4
- package/dist/components/base/cascader/cascader-panel.d.ts +76 -0
- package/dist/components/base/chart/chart.d.ts +6 -1
- package/dist/components/base/choice-inputs/choice-types.d.ts +5 -1
- package/dist/components/base/choice-inputs/pill-radio-group.d.ts +7 -6
- package/dist/components/base/combobox/combobox-field.d.ts +2 -2
- package/dist/components/base/combobox/index.d.ts +4 -2
- package/dist/components/base/date-pickers/date-picker-internals.d.ts +3 -1
- package/dist/components/base/date-pickers/datepicker.types.d.ts +10 -4
- package/dist/components/base/date-pickers/time-picker.d.ts +17 -3
- package/dist/components/base/feedback/alert.d.ts +1 -1
- package/dist/components/base/feedback/state-display.d.ts +5 -1
- package/dist/components/base/feedback/state-display.strings.d.ts +9 -0
- package/dist/components/base/forms/form-field.d.ts +7 -2
- package/dist/components/base/forms/form-sizing.d.ts +7 -7
- package/dist/components/base/forms/workflow.d.ts +7 -1
- package/dist/components/base/forms-numeric/coordinates-input.d.ts +8 -1
- package/dist/components/base/forms-numeric/decimal-input.d.ts +2 -2
- package/dist/components/base/forms-numeric/dimensions-input.d.ts +4 -1
- package/dist/components/base/forms-numeric/numeric-composite-field.d.ts +12 -0
- package/dist/components/base/forms-numeric/weight-input.d.ts +6 -1
- package/dist/components/base/metadata-list/metadata-list.d.ts +1 -1
- package/dist/components/base/navigation/dropdown-menu.d.ts +1 -1
- package/dist/components/base/navigation/language-switcher.d.ts +12 -4
- package/dist/components/base/navigation/page-header/page-header-commands.d.ts +14 -7
- package/dist/components/base/navigation/page-header/page-header.d.ts +10 -3
- package/dist/components/base/popover/popover.d.ts +3 -3
- package/dist/components/base/popover/popover.recipes.d.ts +10 -6
- package/dist/components/base/repeaters/key-value-editor.d.ts +2 -1
- package/dist/components/base/sheet/sheet.d.ts +2 -0
- package/dist/components/base/sidebar/index.d.ts +1 -1
- package/dist/components/base/sidebar/sidebar.d.ts +29 -5
- package/dist/components/base/toaster/index.d.ts +1 -0
- package/dist/components/base/upload/avatar-upload.d.ts +2 -1
- package/dist/components/base/upload/image-upload.d.ts +2 -1
- package/dist/components/blocks/ai/ai-citation/types.d.ts +2 -0
- package/dist/components/blocks/ai/ai-file-tree/types.d.ts +1 -1
- package/dist/components/blocks/ai/ai-reasoning/types.d.ts +2 -0
- package/dist/components/blocks/ai/ai-sources/types.d.ts +2 -0
- package/dist/components/blocks/ai/ai-tool-call/types.d.ts +5 -1
- package/dist/components/blocks/ai/ai.strings.d.ts +2 -0
- package/dist/components/blocks/analytics/metric/metric.d.ts +4 -0
- package/dist/components/blocks/analytics/metric-comparison/metric-comparison.d.ts +4 -0
- package/dist/components/blocks/analytics/metric-grid/metric-grid.d.ts +4 -5
- package/dist/components/blocks/analytics/types.d.ts +2 -2
- package/dist/components/blocks/analytics/usage-card/usage-card.strings.d.ts +2 -0
- package/dist/components/blocks/commerce/cart-summary/cart-summary.d.ts +1 -1
- package/dist/components/blocks/commerce/cart-summary/types.d.ts +3 -1
- package/dist/components/blocks/commerce/discount-stack/discount-stack.d.ts +1 -1
- package/dist/components/blocks/commerce/discount-stack/types.d.ts +3 -1
- package/dist/components/blocks/commerce/fulfillment-group/fulfillment-group.d.ts +1 -1
- package/dist/components/blocks/commerce/fulfillment-group/types.d.ts +11 -2
- package/dist/components/blocks/commerce/index.d.ts +7 -6
- package/dist/components/blocks/commerce/inventory-section/inventory-section.d.ts +1 -1
- package/dist/components/blocks/commerce/inventory-section/types.d.ts +7 -2
- package/dist/components/blocks/commerce/invoice-header/index.d.ts +2 -1
- package/dist/components/blocks/commerce/invoice-header/invoice-header.d.ts +1 -1
- package/dist/components/blocks/commerce/invoice-header/types.d.ts +20 -6
- package/dist/components/blocks/commerce/invoice-line-items/invoice-line-items.d.ts +1 -1
- package/dist/components/blocks/commerce/invoice-line-items/types.d.ts +24 -7
- package/dist/components/blocks/commerce/invoice-mini/index.d.ts +2 -1
- package/dist/components/blocks/commerce/invoice-mini/types.d.ts +7 -1
- package/dist/components/blocks/commerce/order-customer/order-customer.d.ts +1 -1
- package/dist/components/blocks/commerce/order-customer/types.d.ts +9 -1
- package/dist/components/blocks/commerce/order-status/types.d.ts +4 -0
- package/dist/components/blocks/commerce/refund-status/refund-status.d.ts +1 -1
- package/dist/components/blocks/commerce/refund-status/types.d.ts +3 -1
- package/dist/components/blocks/commerce/shipment-tracking/shipment-tracking.d.ts +1 -1
- package/dist/components/blocks/commerce/shipment-tracking/types.d.ts +3 -1
- package/dist/components/blocks/commerce/tax-breakdown/tax-breakdown.d.ts +1 -1
- package/dist/components/blocks/commerce/tax-breakdown/types.d.ts +3 -1
- package/dist/components/blocks/data-display/empty-state/empty-state.types.d.ts +4 -3
- package/dist/components/features/activities/activities.types.d.ts +26 -13
- package/dist/components/features/activities/hooks/use-activity-resources.d.ts +2 -1
- package/dist/components/features/activities/partials/activity-marker.d.ts +7 -3
- package/dist/components/features/activities/partials/activity-row.d.ts +24 -0
- package/dist/components/features/ai-chat/hooks/use-ai-chat-scroll.d.ts +1 -1
- package/dist/components/features/appointment-calendar/appointment-calendar.d.ts +1 -1
- package/dist/components/features/appointment-calendar/appointment-calendar.types.d.ts +4 -2
- package/dist/components/features/combobox/async-resource-combobox.d.ts +2 -2
- package/dist/components/features/combobox/combobox.d.ts +2 -2
- package/dist/components/features/combobox/hooks/use-combobox-core.d.ts +2 -1
- package/dist/components/features/combobox/hooks/use-combobox-state.d.ts +1 -0
- package/dist/components/features/combobox/hooks/use-load-more.d.ts +1 -0
- package/dist/components/features/combobox/types.d.ts +37 -8
- package/dist/components/features/email-composer/types.d.ts +3 -1
- package/dist/components/features/event-calendar/colors.d.ts +2 -2
- package/dist/components/features/event-calendar/event-calendar.types.d.ts +4 -0
- package/dist/components/features/filters/facets/date-facet.d.ts +4 -2
- package/dist/components/features/filters/facets/range-facet.d.ts +12 -0
- package/dist/components/features/filters/facets/select-facet.d.ts +2 -1
- package/dist/components/features/filters/filters.strings.d.ts +4 -0
- package/dist/components/features/filters/filters.types.d.ts +6 -3
- package/dist/components/features/filters/partials/date-filter-content.d.ts +3 -2
- package/dist/components/features/filters/partials/filter-editor-header.d.ts +16 -0
- package/dist/components/features/filters/partials/filter-popover-content.d.ts +5 -3
- package/dist/components/features/filters/partials/nested-filter-options.d.ts +21 -0
- package/dist/components/features/filters/partials/range-filter-content.d.ts +12 -0
- package/dist/components/features/filters/partials/regular-filter-content.d.ts +2 -1
- package/dist/components/features/filters/utils/filter-utils.d.ts +25 -3
- package/dist/components/features/global-search/global-search.types.d.ts +2 -0
- package/dist/components/features/global-search/partials/global-search-input.d.ts +10 -0
- package/dist/components/features/global-search/partials/global-search-result-row.d.ts +7 -1
- package/dist/components/features/media-library/hooks/use-media-library.d.ts +1 -1
- package/dist/components/features/media-library/media-library.d.ts +1 -1
- package/dist/components/features/media-library/media-library.strings.d.ts +8 -0
- package/dist/components/features/media-library/media-library.types.d.ts +50 -12
- package/dist/components/features/media-library/partials/media-library-partials.d.ts +4 -4
- package/dist/components/features/mentions/hooks/use-mentions.d.ts +16 -1
- package/dist/components/features/mentions/partials/mention-inline-suggestions.d.ts +5 -1
- package/dist/components/features/mentions/utils/split-html-by-mentions.d.ts +1 -7
- package/dist/components/features/overlays/hooks/use-overlay-visibility.d.ts +2 -2
- package/dist/components/features/products/components/product-options-matrix.d.ts +1 -1
- package/dist/components/features/products/components/product-variant-editor.d.ts +1 -1
- package/dist/components/features/products/components/product-variants-manager.d.ts +1 -1
- package/dist/components/features/products/products.strings.d.ts +9 -1
- package/dist/components/features/products/products.types.d.ts +45 -8
- package/dist/components/features/questionnaire/questionnaire.types.d.ts +3 -0
- package/dist/components/features/resource/resource.d.ts +6 -2
- package/dist/components/features/resource/resource.types.d.ts +14 -1
- package/dist/components/features/rich-text-editor/form-rich-text-editor.d.ts +1 -1
- package/dist/components/features/rich-text-editor/partials/caret-helpers.d.ts +1 -1
- package/dist/components/features/rich-text-editor/partials/editor-field-aria.d.ts +14 -0
- package/dist/components/features/rich-text-editor/partials/image-uploads.d.ts +1 -1
- package/dist/components/features/rich-text-editor/partials/rich-text-editor-toolbar.d.ts +3 -1
- package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +12 -2
- package/dist/components/features/rich-text-editor/rich-text-editor.types.d.ts +17 -3
- package/dist/components/features/schema-form/hooks/use-schema-form.d.ts +5 -1
- package/dist/components/features/schema-form/partials/schema-form-field.d.ts +3 -1
- package/dist/components/features/schema-form/schema-form.utils.d.ts +1 -1
- package/dist/components/features/suggestions/suggestions.types.d.ts +1 -1
- package/dist/components/features/table/data-table.d.ts +1 -1
- package/dist/components/features/table/index.d.ts +1 -0
- package/dist/components/features/table/partials/resource-cell.d.ts +22 -5
- package/dist/components/features/table/table-body.d.ts +1 -1
- package/dist/components/features/table/table-helpers.d.ts +6 -3
- package/dist/components/features/table/table.strings.d.ts +3 -0
- package/dist/components/features/table/table.types.d.ts +18 -2
- package/dist/components/layout/app-shell/app-shell.types.d.ts +35 -6
- package/dist/components/layout/app-shell/index.d.ts +1 -1
- package/dist/components/layout/app-shell/shell-regions.d.ts +27 -0
- package/dist/components/layout/app-shell/sidebar-inset-layout.d.ts +1 -1
- package/dist/components/layout/app-shell/stacked-layout.d.ts +1 -1
- package/dist/components/layout/app-shell/topbar-sidebar-layout.d.ts +1 -1
- package/dist/components/layout/containers/two-column-layout.d.ts +2 -0
- package/dist/components/layout/header/header.recipes.d.ts +6 -0
- package/dist/components/layout/header/header.types.d.ts +9 -8
- package/dist/components/layout/layout.types.d.ts +5 -3
- package/dist/components/layout/navigation/section-nav/section-nav.d.ts +5 -0
- package/dist/components/layout/navigation/side-nav.d.ts +3 -2
- package/dist/components/layout/normalize-layout-path.d.ts +1 -0
- package/dist/components/layout/page/index.d.ts +2 -1
- package/dist/components/layout/page/page.d.ts +1 -0
- package/dist/components/layout/page/page.strings.d.ts +11 -0
- package/dist/components/layout/page/page.types.d.ts +69 -17
- package/dist/components/layout/page/partials/page-header.d.ts +1 -1
- package/dist/components/layout/settings/settings.d.ts +10 -3
- package/dist/components/layout/sidebar/app-sidebar.d.ts +1 -1
- package/dist/components/layout/sidebar/components/sidebar-grouped-navigation.d.ts +1 -1
- package/dist/components/layout/sidebar/components/sidebar-navigation.d.ts +1 -1
- package/dist/components/layout/sidebar/index.d.ts +2 -1
- package/dist/components/layout/sidebar/sidebar-navigation-rail.d.ts +38 -0
- package/dist/components/layout/sidebar/sidebar.context.d.ts +6 -7
- package/dist/components/layout/sidebar/sidebar.types.d.ts +50 -10
- package/dist/components/layout/sidebar/sidebar.utils.d.ts +9 -1
- package/dist/components/layout/workspace/workspace.types.d.ts +8 -1
- package/dist/components/primitives/link.d.ts +3 -2
- package/dist/components/primitives/money.d.ts +1 -1
- package/dist/components/primitives/number.d.ts +1 -1
- package/dist/components/typography/rich-text/rich-text-tree.d.ts +7 -5
- package/dist/components/ui/alert-dialog.d.ts +2 -2
- package/dist/components/ui/combobox.d.ts +1 -1
- package/dist/components/ui/dialog.d.ts +2 -2
- package/dist/components/ui/overlay-layer.d.ts +18 -0
- package/dist/components/ui/sheet.d.ts +5 -1
- package/dist/components/ui/sidebar-state.d.ts +82 -0
- package/dist/components/ui/sidebar.d.ts +5 -17
- package/dist/{containers-CRmHf7GP.js → containers-CSdc32h9.js} +26 -18
- package/dist/containers-CSdc32h9.js.map +1 -0
- package/dist/{control-group-recipes-DBXmfh2E.js → control-group-recipes-fMuFo0H7.js} +6 -6
- package/dist/control-group-recipes-fMuFo0H7.js.map +1 -0
- package/dist/{copyable-CnGCZdX4.js → copyable-3fdHfMR3.js} +7 -7
- package/dist/{copyable-CnGCZdX4.js.map → copyable-3fdHfMR3.js.map} +1 -1
- package/dist/{data-display-D4oujtx0.js → data-display-Cmj-xZYl.js} +271 -279
- package/dist/data-display-Cmj-xZYl.js.map +1 -0
- package/dist/{date-Q7jnXxpk.js → date-Br0FicVv.js} +5 -5
- package/dist/{date-Q7jnXxpk.js.map → date-Br0FicVv.js.map} +1 -1
- package/dist/date-picker-CyQlFYsP.js +1617 -0
- package/dist/date-picker-CyQlFYsP.js.map +1 -0
- package/dist/date-pickers-tj2MXmXd.js +185 -0
- package/dist/date-pickers-tj2MXmXd.js.map +1 -0
- package/dist/{display-BB4BL_-K.js → display-CT_N2a3w.js} +9 -9
- package/dist/{display-BB4BL_-K.js.map → display-CT_N2a3w.js.map} +1 -1
- package/dist/dropdown-menu-C08iIugv.js +194 -0
- package/dist/dropdown-menu-C08iIugv.js.map +1 -0
- package/dist/features/activities.js +388 -326
- package/dist/features/activities.js.map +1 -1
- package/dist/features/ai-chat.js +46 -32
- package/dist/features/ai-chat.js.map +1 -1
- package/dist/features/appointment-calendar.js +130 -130
- package/dist/features/appointment-calendar.js.map +1 -1
- package/dist/features/async-preview.js +11 -10
- package/dist/features/async-preview.js.map +1 -1
- package/dist/features/combobox.js +1 -1
- package/dist/features/comments.js +1 -1
- package/dist/features/data-view.js +13 -13
- package/dist/features/data-view.js.map +1 -1
- package/dist/features/email-composer.js +243 -239
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +197 -199
- package/dist/features/event-calendar.js.map +1 -1
- package/dist/features/filters.js +2 -2
- package/dist/features/global-search.js +168 -143
- package/dist/features/global-search.js.map +1 -1
- package/dist/features/kanban.js +19 -30
- package/dist/features/kanban.js.map +1 -1
- package/dist/features/map/style.css +15 -0
- package/dist/features/map.js +369 -343
- package/dist/features/map.js.map +1 -1
- package/dist/features/media-library.js +1202 -975
- package/dist/features/media-library.js.map +1 -1
- package/dist/features/mentions.js +2 -2
- package/dist/features/overlays.js +1 -1
- package/dist/features/products.js +1270 -1183
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +160 -153
- package/dist/features/questionnaire.js.map +1 -1
- package/dist/features/resource-assignment.js +8 -8
- package/dist/features/resource.js +119 -113
- package/dist/features/resource.js.map +1 -1
- package/dist/features/rich-text-editor.js +28 -19
- package/dist/features/rich-text-editor.js.map +1 -1
- package/dist/features/schema-form.js +297 -256
- package/dist/features/schema-form.js.map +1 -1
- package/dist/features/suggestions.js +57 -50
- package/dist/features/suggestions.js.map +1 -1
- package/dist/features/sync.js +3 -3
- package/dist/features/table.js +1 -1
- package/dist/features/theme-tweaker.js +470 -470
- package/dist/features/theme-tweaker.js.map +1 -1
- package/dist/feedback-Dzo1xtAU.js +246 -0
- package/dist/feedback-Dzo1xtAU.js.map +1 -0
- package/dist/{field-affordance-recipes-DjwGx8eM.js → field-affordance-recipes-D6H7tVJi.js} +5 -5
- package/dist/field-affordance-recipes-D6H7tVJi.js.map +1 -0
- package/dist/field-control-attributes-B6i335wr.js +18 -0
- package/dist/field-control-attributes-B6i335wr.js.map +1 -0
- package/dist/{field-state-recipes-BVA2CWHo.js → field-state-recipes-7sza8QbC.js} +4 -2
- package/dist/{field-state-recipes-BVA2CWHo.js.map → field-state-recipes-7sza8QbC.js.map} +1 -1
- package/dist/filters-Dl80yYtN.js +2415 -0
- package/dist/filters-Dl80yYtN.js.map +1 -0
- package/dist/form-field-CAPdwdnZ.js +74 -0
- package/dist/form-field-CAPdwdnZ.js.map +1 -0
- package/dist/{form-sizing-NXgjkmBG.js → form-sizing-CgcrUbLU.js} +5 -5
- package/dist/form-sizing-CgcrUbLU.js.map +1 -0
- package/dist/{forms-BV5m5aQF.js → forms-B3W8CH7-.js} +17 -13
- package/dist/forms-B3W8CH7-.js.map +1 -0
- package/dist/forms-numeric-CwjQJe-O.js +991 -0
- package/dist/forms-numeric-CwjQJe-O.js.map +1 -0
- package/dist/{header-BA697l4a.js → header-ZIIsRKxP.js} +145 -141
- package/dist/header-ZIIsRKxP.js.map +1 -0
- package/dist/header.recipes-BigdJjw1.js +6 -0
- package/dist/header.recipes-BigdJjw1.js.map +1 -0
- package/dist/hooks/use-files.d.ts +2 -0
- package/dist/{hooks-BQ-L7Uu2.js → hooks-BitHSh-Y.js} +27 -15
- package/dist/hooks-BitHSh-Y.js.map +1 -0
- package/dist/{icon-badge-COWbCCWu.js → icon-badge-npxF1SLX.js} +4 -4
- package/dist/{icon-badge-COWbCCWu.js.map → icon-badge-npxF1SLX.js.map} +1 -1
- package/dist/index.js +4 -5
- package/dist/{input-Cdw4k0fb.js → input-7KAc7XQL.js} +9 -9
- package/dist/{input-Cdw4k0fb.js.map → input-7KAc7XQL.js.map} +1 -1
- package/dist/input-DIREVYHs.js +21 -0
- package/dist/input-DIREVYHs.js.map +1 -0
- package/dist/{interaction-recipes-XR9ZpVYL.js → interaction-recipes-4wZ2tvfb.js} +2 -2
- package/dist/{interaction-recipes-XR9ZpVYL.js.map → interaction-recipes-4wZ2tvfb.js.map} +1 -1
- package/dist/item-FfWnaYST.js +278 -0
- package/dist/item-FfWnaYST.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 +2 -2
- package/dist/layout/settings.js +1 -1
- package/dist/layout/sidebar.js +3 -3
- package/dist/layout/workspace.js +1 -1
- package/dist/layout.js +12 -12
- package/dist/layout.types-E_GAApzO.js +30 -0
- package/dist/layout.types-E_GAApzO.js.map +1 -0
- package/dist/lib/affordance-geometry.generated.d.ts +35 -35
- package/dist/lib/control-group-recipes.d.ts +5 -5
- package/dist/lib/field-affordance-recipes.d.ts +2 -2
- package/dist/lib/field-control-attributes.d.ts +11 -0
- package/dist/lib/field-state-recipes.d.ts +2 -0
- package/dist/lib/format.d.ts +1 -0
- package/dist/lib/motion-recipes.d.ts +3 -0
- package/dist/lib/navigation-row-recipes.d.ts +7 -7
- package/dist/lib/overlay-anatomy-recipes.d.ts +3 -3
- package/dist/lib/portal-recipes.d.ts +3 -0
- package/dist/lib/surface-recipes.d.ts +1 -1
- package/dist/lib/token-merge.generated.d.ts +18 -15
- package/dist/lib/utils.js +1 -1
- package/dist/map-demo-tile.svg +1 -1
- package/dist/{media-gallery-CSl5W1Fy.js → media-gallery-C81DAnKI.js} +6 -6
- package/dist/{media-gallery-CSl5W1Fy.js.map → media-gallery-C81DAnKI.js.map} +1 -1
- package/dist/{mentions-RKOQaaIB.js → mentions-qOnedSt4.js} +237 -168
- package/dist/mentions-qOnedSt4.js.map +1 -0
- package/dist/message-BJHnn43M.js +135 -0
- package/dist/message-BJHnn43M.js.map +1 -0
- package/dist/{metadata-list-qVV7AVxa.js → metadata-list-XkqZ_UXH.js} +64 -64
- package/dist/metadata-list-XkqZ_UXH.js.map +1 -0
- package/dist/{motion-recipes-ChBg4HBq.js → motion-recipes-DitYv6P2.js} +10 -2
- package/dist/motion-recipes-DitYv6P2.js.map +1 -0
- package/dist/navigation-BgtPJAhi.js +288 -0
- package/dist/navigation-BgtPJAhi.js.map +1 -0
- package/dist/navigation-Bt-v7rWP.js +261 -0
- package/dist/navigation-Bt-v7rWP.js.map +1 -0
- package/dist/{navigation-row-recipes-WZEs-hYo.js → navigation-row-recipes-BGVLvU_O.js} +9 -9
- package/dist/navigation-row-recipes-BGVLvU_O.js.map +1 -0
- package/dist/normalize-layout-path-BmEgg6fu.js +14 -0
- package/dist/normalize-layout-path-BmEgg6fu.js.map +1 -0
- package/dist/{number-E_OiIfJz.js → number-CYqBcrSj.js} +79 -87
- package/dist/number-CYqBcrSj.js.map +1 -0
- package/dist/overflow-tab-bar-BQCA2Zn2.js +172 -0
- package/dist/overflow-tab-bar-BQCA2Zn2.js.map +1 -0
- package/dist/overlays-CC8zI3Du.js +1017 -0
- package/dist/overlays-CC8zI3Du.js.map +1 -0
- package/dist/page-BoQ1VaFJ.js +331 -0
- package/dist/page-BoQ1VaFJ.js.map +1 -0
- package/dist/page-header-commands-DIKspJfx.js +193 -0
- package/dist/page-header-commands-DIKspJfx.js.map +1 -0
- package/dist/{pagination-Ch8X_47u.js → pagination-Br8TdV9A.js} +7 -7
- package/dist/{pagination-Ch8X_47u.js.map → pagination-Br8TdV9A.js.map} +1 -1
- package/dist/popover-k8TdUcAt.js +201 -0
- package/dist/popover-k8TdUcAt.js.map +1 -0
- package/dist/{popover-menu-BYaCdFhf.js → popover-menu-yn-o0kyA.js} +7 -7
- package/dist/{popover-menu-BYaCdFhf.js.map → popover-menu-yn-o0kyA.js.map} +1 -1
- package/dist/{popover.recipes-D3j8R8Yp.js → popover.recipes-DJ0AkUan.js} +19 -12
- package/dist/popover.recipes-DJ0AkUan.js.map +1 -0
- package/dist/portal-recipes-DyUXqUtD.js +9 -0
- package/dist/portal-recipes-DyUXqUtD.js.map +1 -0
- package/dist/{primitives-Du64iDbb.js → primitives-BkkQjYl7.js} +23 -18
- package/dist/primitives-BkkQjYl7.js.map +1 -0
- package/dist/primitives.js +4 -4
- package/dist/{progress-BvF2oCdV.js → progress-DZFXXzPs.js} +9 -9
- package/dist/{progress-BvF2oCdV.js.map → progress-DZFXXzPs.js.map} +1 -1
- package/dist/{receipt-D789Jwyy.js → receipt-C7LhOg7Q.js} +7 -7
- package/dist/receipt-C7LhOg7Q.js.map +1 -0
- package/dist/rich-text-BnTzZjIo.js +45 -0
- package/dist/rich-text-BnTzZjIo.js.map +1 -0
- package/dist/{rich-text-editor-Cm1dpUpQ.js → rich-text-editor-CAurDwT5.js} +501 -424
- package/dist/rich-text-editor-CAurDwT5.js.map +1 -0
- package/dist/rich-text-editor-toolbar-DbXig7Jk.js +99 -0
- package/dist/rich-text-editor-toolbar-DbXig7Jk.js.map +1 -0
- package/dist/rich-text-tree-BqyQ_7-R.js +66 -0
- package/dist/rich-text-tree-BqyQ_7-R.js.map +1 -0
- package/dist/{sanitize-html-DsQmI48u.js → sanitize-html-BWkH4dLM.js} +29 -16
- package/dist/sanitize-html-BWkH4dLM.js.map +1 -0
- package/dist/{scroll-area-La5RXsEk.js → scroll-area-Bj6CRUif.js} +2 -2
- package/dist/{scroll-area-La5RXsEk.js.map → scroll-area-Bj6CRUif.js.map} +1 -1
- package/dist/{separator-DAEV0w65.js → separator-B9ewiCGO.js} +2 -2
- package/dist/{separator-DAEV0w65.js.map → separator-B9ewiCGO.js.map} +1 -1
- package/dist/{separator-GNfPG-90.js → separator-DM6gs2vu.js} +3 -3
- package/dist/{separator-GNfPG-90.js.map → separator-DM6gs2vu.js.map} +1 -1
- package/dist/services/actions.js +1 -1
- package/dist/settings-DZPHgpx4.js +155 -0
- package/dist/settings-DZPHgpx4.js.map +1 -0
- package/dist/sheet-C4DHsgLk.js +250 -0
- package/dist/sheet-C4DHsgLk.js.map +1 -0
- package/dist/sidebar-C8BnDwTH.js +709 -0
- package/dist/sidebar-C8BnDwTH.js.map +1 -0
- package/dist/sidebar-CmD6a-HK.js +1004 -0
- package/dist/sidebar-CmD6a-HK.js.map +1 -0
- package/dist/skeleton-DDgdhmu9.js +265 -0
- package/dist/skeleton-DDgdhmu9.js.map +1 -0
- package/dist/smart-card-B6vLxqa_.js +617 -0
- package/dist/smart-card-B6vLxqa_.js.map +1 -0
- package/dist/{structure-C0V0_Fyf.js → structure-DZJ2wbAU.js} +2 -2
- package/dist/{structure-C0V0_Fyf.js.map → structure-DZJ2wbAU.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/{surface-recipes-BKRVW8Os.js → surface-recipes-C8mNycaY.js} +2 -2
- package/dist/{surface-recipes-BKRVW8Os.js.map → surface-recipes-C8mNycaY.js.map} +1 -1
- package/dist/{table-DH7rozUv.js → table-CBonSdTp.js} +573 -519
- package/dist/table-CBonSdTp.js.map +1 -0
- package/dist/{table-CpvnzJn9.js → table-CXSPHH25.js} +75 -71
- package/dist/table-CXSPHH25.js.map +1 -0
- package/dist/tabs-C4Kr_hCr.js +192 -0
- package/dist/tabs-C4Kr_hCr.js.map +1 -0
- package/dist/{text-inputs-DXItiR0O.js → text-inputs-jdkS3ReG.js} +18 -18
- package/dist/text-inputs-jdkS3ReG.js.map +1 -0
- package/dist/theme.css +40 -37
- package/dist/{timelines-DmtztAY_.js → timelines-CoPwdJP0.js} +13 -12
- package/dist/timelines-CoPwdJP0.js.map +1 -0
- package/dist/tooltip-31NwIpTo.js +113 -0
- package/dist/tooltip-31NwIpTo.js.map +1 -0
- package/dist/{tree-CV11PURP.js → tree-CeYVzdFE.js} +9 -9
- package/dist/{tree-CV11PURP.js.map → tree-CeYVzdFE.js.map} +1 -1
- package/dist/typography/rich-text.js +1 -1
- package/dist/{typography-CSyJrh28.js → typography-C7-YMW1S.js} +12 -12
- package/dist/{typography-CSyJrh28.js.map → typography-C7-YMW1S.js.map} +1 -1
- package/dist/typography.js +1 -1
- package/dist/ui-provider-C-74NVLc.js +178 -0
- package/dist/ui-provider-C-74NVLc.js.map +1 -0
- package/dist/ui-provider.js +2 -3
- package/dist/{upload-C9SA0X-8.js → upload-Hdm5gObf.js} +309 -296
- package/dist/upload-Hdm5gObf.js.map +1 -0
- package/dist/{upload-queue-DhQJiSRc.js → upload-queue-D0sYPuqo.js} +16 -14
- package/dist/upload-queue-D0sYPuqo.js.map +1 -0
- package/dist/{usage-card-DVTRDmGz.js → usage-card-9s8hLDfn.js} +24 -17
- package/dist/usage-card-9s8hLDfn.js.map +1 -0
- package/dist/{utils-CF3c95Io.js → utils-DhuoqFy4.js} +255 -165
- package/dist/utils-DhuoqFy4.js.map +1 -0
- package/dist/value-inputs-D3aPgq9H.js +980 -0
- package/dist/value-inputs-D3aPgq9H.js.map +1 -0
- package/dist/{value-typography-ClupF0Gz.js → value-typography-uSzzG9Gf.js} +32 -26
- package/dist/value-typography-uSzzG9Gf.js.map +1 -0
- package/dist/{workspace-9EFVXUyk.js → workspace-CC8Vchiu.js} +51 -50
- package/dist/workspace-CC8Vchiu.js.map +1 -0
- package/docs/consumer-skill/SKILL.md +4 -3
- package/docs/consumer-skill/agents/themelia-ui-designer.md +96 -0
- package/docs/consumer-skill/examples/app-layout.tsx +52 -1
- package/docs/consumer-skill/examples/commerce-lines.tsx +271 -0
- package/docs/consumer-skill/examples/custom-composition.tsx +21 -0
- package/docs/consumer-skill/examples/detail.tsx +5 -4
- package/docs/consumer-skill/examples/edit.tsx +3 -3
- package/docs/consumer-skill/examples/editable-sections.tsx +38 -0
- package/docs/consumer-skill/examples/index-table.tsx +4 -4
- package/docs/consumer-skill/examples/manifest.json +38 -1
- package/docs/consumer-skill/examples/product-media.tsx +41 -0
- package/docs/consumer-skill/examples/product-parts.tsx +81 -0
- package/docs/consumer-skill/examples/rhf-edit-page.tsx +1 -1
- package/docs/consumer-skill/examples/rhf-overlay-form.tsx +24 -11
- package/docs/consumer-skill/examples/token-domain-structure.tsx +68 -0
- package/docs/consumer-skill/references/agents-md.md +21 -19
- package/docs/consumer-skill/references/analytics.md +33 -1
- package/docs/consumer-skill/references/commerce-composition.md +97 -0
- package/docs/consumer-skill/references/component-contracts.json +21249 -14205
- package/docs/consumer-skill/references/composition-mapping.md +17 -3
- package/docs/consumer-skill/references/composition.md +177 -32
- package/docs/consumer-skill/references/critique-rubric.md +98 -0
- package/docs/consumer-skill/references/custom-composition.md +261 -0
- package/docs/consumer-skill/references/data-reading.md +79 -0
- package/docs/consumer-skill/references/design-contract.md +12 -9
- package/docs/consumer-skill/references/discovery.md +27 -3
- package/docs/consumer-skill/references/domain-structures.md +124 -0
- package/docs/consumer-skill/references/installation.md +62 -8
- package/docs/consumer-skill/references/integration.md +59 -1
- package/docs/consumer-skill/references/product-composition.md +94 -0
- package/docs/consumer-skill/references/public-api.json +3044 -445
- package/docs/consumer-skill/references/review.md +87 -10
- package/docs/consumer-skill/references/rhf-workflows.md +79 -0
- package/docs/consumer-skill/references/screen-archetypes.md +19 -7
- package/docs/consumer-skill/references/screen-decisions.md +126 -0
- package/docs/consumer-skill/references/theming.md +24 -20
- package/docs/consumer-skill/references/tokens.json +9 -9
- package/docs/consumer-skill/references/view-craft.md +153 -0
- package/docs/consumer-skill/references/view-spec.md +73 -0
- package/docs/consumer-skill/references/workflows.md +7 -1
- package/docs/consumer-skill/scripts/composition-policy.mjs +176 -26
- package/docs/consumer-skill/scripts/composition-schema.mjs +1 -1
- package/docs/consumer-skill/scripts/composition.mjs +61 -5
- package/docs/consumer-skill/scripts/discovery.mjs +54 -0
- package/docs/consumer-skill/scripts/inspect-component.mjs +1 -1
- package/docs/consumer-skill/scripts/inspection.mjs +73 -18
- package/docs/consumer-skill/scripts/setup-skills.mjs +79 -7
- package/docs/consumer-skill/scripts/surface-policy.mjs +5 -5
- package/docs/consumer-skills/themelia-components/SKILL.md +14 -13
- package/docs/consumer-skills/themelia-composition/SKILL.md +16 -17
- package/docs/consumer-skills/themelia-design/SKILL.md +55 -0
- package/docs/consumer-skills/themelia-foundation/SKILL.md +2 -1
- package/docs/consumer-skills/themelia-tokenization/SKILL.md +24 -17
- package/package.json +4 -2
- package/templates/admin-shell-template.tsx +1 -2
- package/templates/customers-template.tsx +18 -16
- package/dist/accordion-96o0pN62.js.map +0 -1
- package/dist/action-menu-CHgs8vmj.js.map +0 -1
- package/dist/affordance-geometry.generated-B8yGOr8-.js.map +0 -1
- package/dist/ai-artifact-BZUGwBq6.js.map +0 -1
- package/dist/app-shell-D63ATkIK.js +0 -237
- package/dist/app-shell-D63ATkIK.js.map +0 -1
- package/dist/auth-D2FVZ1MH.js.map +0 -1
- package/dist/avatar-DWO_HHhB.js.map +0 -1
- package/dist/base/cascader.js.map +0 -1
- package/dist/batch-action-bar-CdfIkCsV.js.map +0 -1
- package/dist/breadcrumbs-B-WFKecD.js.map +0 -1
- package/dist/button-DkmK-z8E.js.map +0 -1
- package/dist/buttons-BbfzgczK.js.map +0 -1
- package/dist/cards-4JTWqvVe.js +0 -68
- package/dist/cards-4JTWqvVe.js.map +0 -1
- package/dist/chart-C19flDQb.js +0 -155
- package/dist/chart-C19flDQb.js.map +0 -1
- package/dist/choice-inputs-JLtij2y4.js +0 -776
- package/dist/choice-inputs-JLtij2y4.js.map +0 -1
- package/dist/code-block-CGNaUtAE.js.map +0 -1
- package/dist/combobox-CBJDs6w_.js +0 -877
- package/dist/combobox-CBJDs6w_.js.map +0 -1
- package/dist/combobox-hbhSS18O.js +0 -355
- package/dist/combobox-hbhSS18O.js.map +0 -1
- package/dist/command-D8NrBj-b.js.map +0 -1
- package/dist/comments-Di4w0H_S.js.map +0 -1
- package/dist/containers-CRmHf7GP.js.map +0 -1
- package/dist/control-group-recipes-DBXmfh2E.js.map +0 -1
- package/dist/data-display-D4oujtx0.js.map +0 -1
- package/dist/date-picker-zOt1oNss.js +0 -1542
- package/dist/date-picker-zOt1oNss.js.map +0 -1
- package/dist/date-pickers-cj8IXbDC.js +0 -179
- package/dist/date-pickers-cj8IXbDC.js.map +0 -1
- package/dist/dropdown-menu-CjY8Vt7W.js +0 -193
- package/dist/dropdown-menu-CjY8Vt7W.js.map +0 -1
- package/dist/feedback-DZNL5Lg1.js +0 -239
- package/dist/feedback-DZNL5Lg1.js.map +0 -1
- package/dist/field-affordance-recipes-DjwGx8eM.js.map +0 -1
- package/dist/filters-BcT-uoFy.js +0 -2209
- package/dist/filters-BcT-uoFy.js.map +0 -1
- package/dist/form-field-CsgRmdit.js +0 -63
- package/dist/form-field-CsgRmdit.js.map +0 -1
- package/dist/form-sizing-NXgjkmBG.js.map +0 -1
- package/dist/forms-BV5m5aQF.js.map +0 -1
- package/dist/forms-numeric-Cd33AKbD.js +0 -906
- package/dist/forms-numeric-Cd33AKbD.js.map +0 -1
- package/dist/header-BA697l4a.js.map +0 -1
- package/dist/hooks-BQ-L7Uu2.js.map +0 -1
- package/dist/input-DOPL5_QE.js +0 -21
- package/dist/input-DOPL5_QE.js.map +0 -1
- package/dist/item-BvZ2DR_x.js +0 -277
- package/dist/item-BvZ2DR_x.js.map +0 -1
- package/dist/layout.types-Cn7aUzJp.js +0 -20
- package/dist/layout.types-Cn7aUzJp.js.map +0 -1
- package/dist/mentions-RKOQaaIB.js.map +0 -1
- package/dist/message-INU2xsxu.js +0 -128
- package/dist/message-INU2xsxu.js.map +0 -1
- package/dist/metadata-list-qVV7AVxa.js.map +0 -1
- package/dist/motion-recipes-ChBg4HBq.js.map +0 -1
- package/dist/navigation-BQNcg1jT.js +0 -269
- package/dist/navigation-BQNcg1jT.js.map +0 -1
- package/dist/navigation-DLF3E1IC.js +0 -145
- package/dist/navigation-DLF3E1IC.js.map +0 -1
- package/dist/navigation-row-recipes-WZEs-hYo.js.map +0 -1
- package/dist/number-E_OiIfJz.js.map +0 -1
- package/dist/overflow-tab-bar-CrbqMteP.js +0 -284
- package/dist/overflow-tab-bar-CrbqMteP.js.map +0 -1
- package/dist/overlays-BlKynmde.js +0 -1004
- package/dist/overlays-BlKynmde.js.map +0 -1
- package/dist/page-CIwNUtGr.js +0 -227
- package/dist/page-CIwNUtGr.js.map +0 -1
- package/dist/page-header-commands-DFMlNYzN.js +0 -128
- package/dist/page-header-commands-DFMlNYzN.js.map +0 -1
- package/dist/popover-uwzX2vo7.js +0 -198
- package/dist/popover-uwzX2vo7.js.map +0 -1
- package/dist/popover.recipes-D3j8R8Yp.js.map +0 -1
- package/dist/primitives-Du64iDbb.js.map +0 -1
- package/dist/receipt-D789Jwyy.js.map +0 -1
- package/dist/rich-text-CLJEf76s.js +0 -78
- package/dist/rich-text-CLJEf76s.js.map +0 -1
- package/dist/rich-text-editor-Cm1dpUpQ.js.map +0 -1
- package/dist/rich-text-editor-toolbar-L__e4x47.js +0 -94
- package/dist/rich-text-editor-toolbar-L__e4x47.js.map +0 -1
- package/dist/safe-image-src-C6kQSMBZ.js +0 -17
- package/dist/safe-image-src-C6kQSMBZ.js.map +0 -1
- package/dist/sanitize-html-DsQmI48u.js.map +0 -1
- package/dist/settings-BA2iboic.js +0 -174
- package/dist/settings-BA2iboic.js.map +0 -1
- package/dist/sheet-DoAxTb2J.js +0 -213
- package/dist/sheet-DoAxTb2J.js.map +0 -1
- package/dist/sidebar-ByqKR_W5.js +0 -512
- package/dist/sidebar-ByqKR_W5.js.map +0 -1
- package/dist/sidebar-D2iSnGJ7.js +0 -619
- package/dist/sidebar-D2iSnGJ7.js.map +0 -1
- package/dist/skeleton-CUj8O5Bd.js +0 -264
- package/dist/skeleton-CUj8O5Bd.js.map +0 -1
- package/dist/smart-card-CqkzQsK-.js +0 -614
- package/dist/smart-card-CqkzQsK-.js.map +0 -1
- package/dist/table-CpvnzJn9.js.map +0 -1
- package/dist/table-DH7rozUv.js.map +0 -1
- package/dist/tabs-eqVsJZWO.js +0 -191
- package/dist/tabs-eqVsJZWO.js.map +0 -1
- package/dist/text-inputs-DXItiR0O.js.map +0 -1
- package/dist/theme-scope-BJ6eE2xt.js +0 -50
- package/dist/theme-scope-BJ6eE2xt.js.map +0 -1
- package/dist/timelines-DmtztAY_.js.map +0 -1
- package/dist/tooltip-B4hjKtoV.js +0 -111
- package/dist/tooltip-B4hjKtoV.js.map +0 -1
- package/dist/ui-provider-CQCuCBcy.js +0 -136
- package/dist/ui-provider-CQCuCBcy.js.map +0 -1
- package/dist/upload-C9SA0X-8.js.map +0 -1
- package/dist/upload-queue-DhQJiSRc.js.map +0 -1
- package/dist/usage-card-DVTRDmGz.js.map +0 -1
- package/dist/use-mobile-vaLKwgyf.js +0 -15
- package/dist/use-mobile-vaLKwgyf.js.map +0 -1
- package/dist/utils-CF3c95Io.js.map +0 -1
- package/dist/value-inputs-C0o70p-U.js +0 -980
- package/dist/value-inputs-C0o70p-U.js.map +0 -1
- package/dist/value-typography-ClupF0Gz.js.map +0 -1
- package/dist/workspace-9EFVXUyk.js.map +0 -1
|
@@ -1,39 +1,40 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { t as n } from "./utils-
|
|
4
|
-
import { n as r } from "./buttons-
|
|
5
|
-
import { c as i, o as a, t as o } from "./typography-
|
|
2
|
+
import { S as e, d as t } from "./ui-provider-C-74NVLc.js";
|
|
3
|
+
import { t as n } from "./utils-DhuoqFy4.js";
|
|
4
|
+
import { n as r } from "./buttons-DeW0bQeK.js";
|
|
5
|
+
import { c as i, o as a, t as o } from "./typography-C7-YMW1S.js";
|
|
6
6
|
import { t as s } from "./focus-recipes-B653VaLq.js";
|
|
7
|
-
import { t as c } from "./structure-
|
|
8
|
-
import { i as l } from "./popover.recipes-
|
|
9
|
-
import { n as u, t as d } from "./action-menu-
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { i as
|
|
16
|
-
import {
|
|
17
|
-
import { t as
|
|
18
|
-
import { t as
|
|
19
|
-
import { t as
|
|
20
|
-
import { t as
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import { c as
|
|
24
|
-
import { s as
|
|
25
|
-
import
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
7
|
+
import { t as c } from "./structure-DZJ2wbAU.js";
|
|
8
|
+
import { i as l } from "./popover.recipes-DJ0AkUan.js";
|
|
9
|
+
import { n as u, t as d } from "./action-menu-C0gjzLyE.js";
|
|
10
|
+
import { r as f } from "./skeleton-DDgdhmu9.js";
|
|
11
|
+
import { t as p } from "./interaction-recipes-4wZ2tvfb.js";
|
|
12
|
+
import { _ as m, c as h, d as g, g as _, h as v, i as y, l as b, m as x, o as S, p as C, s as w, u as T } from "./primitives-BkkQjYl7.js";
|
|
13
|
+
import { t as ee } from "./initials-format-CDoQEOd_.js";
|
|
14
|
+
import { n as E, r as D, t as O } from "./number-CYqBcrSj.js";
|
|
15
|
+
import { a as k, i as te, r as ne, s as re, t as ie } from "./date-Br0FicVv.js";
|
|
16
|
+
import { i as ae, n as oe, s as se } from "./avatar-B9Jnp-T-.js";
|
|
17
|
+
import { t as ce } from "./badge-wWauMgAt.js";
|
|
18
|
+
import { t as le } from "./batch-action-bar-BoqWIIpV.js";
|
|
19
|
+
import { t as ue } from "./separator-DM6gs2vu.js";
|
|
20
|
+
import { t as de } from "./input-7KAc7XQL.js";
|
|
21
|
+
import { t as fe } from "./checkbox-MoyHIAPs.js";
|
|
22
|
+
import { r as A, t as pe } from "./control-group-recipes-fMuFo0H7.js";
|
|
23
|
+
import { a as me, c as he, i as ge, n as _e, o as ve, r as ye, s as be, t as xe } from "./pagination-Br8TdV9A.js";
|
|
24
|
+
import { c as j, i as Se, n as M, o as N, s as Ce, t as we } from "./table-CXSPHH25.js";
|
|
25
|
+
import { s as Te } from "./data-display-Cmj-xZYl.js";
|
|
26
|
+
import Ee, { createContext as P, isValidElement as De, useCallback as F, useContext as Oe, useEffect as I, useMemo as L, useRef as R, useState as z } from "react";
|
|
27
|
+
import { Fragment as ke, jsx as B, jsxs as V } from "react/jsx-runtime";
|
|
28
|
+
import { ArrowDown as Ae, ArrowUp as je, Calendar as Me, ChevronLeft as Ne, ChevronRight as H, ChevronsUpDown as Pe, Mail as Fe, Maximize2 as Ie, Minimize2 as Le, PackageOpen as Re, Settings2 as ze } from "lucide-react";
|
|
29
|
+
import { flexRender as Be, getCoreRowModel as Ve, getFilteredRowModel as He, getSortedRowModel as Ue, useReactTable as We } from "@tanstack/react-table";
|
|
29
30
|
//#region src/components/features/table/hooks.ts
|
|
30
|
-
var
|
|
31
|
-
function
|
|
31
|
+
var U = 300;
|
|
32
|
+
function Ge(e) {
|
|
32
33
|
return e ? e.querySelector("[data-slot=\"table-container\"]") : null;
|
|
33
34
|
}
|
|
34
|
-
function
|
|
35
|
-
let { stepPx: n =
|
|
36
|
-
let t =
|
|
35
|
+
function Ke(e, t = {}) {
|
|
36
|
+
let { stepPx: n = U, deps: r = [] } = t, [i, a] = z(!1), [o, s] = z(!1), c = R(0), l = F(() => {
|
|
37
|
+
let t = Ge(e.current);
|
|
37
38
|
if (!t) {
|
|
38
39
|
a(!1), s(!1);
|
|
39
40
|
return;
|
|
@@ -41,10 +42,10 @@ function Je(e, t = {}) {
|
|
|
41
42
|
let { scrollLeft: n, scrollWidth: r, clientWidth: i } = t;
|
|
42
43
|
a(n > 1), s(n + i < r - 1);
|
|
43
44
|
}, [e]);
|
|
44
|
-
|
|
45
|
+
I(() => {
|
|
45
46
|
let t, n = window.setTimeout(() => {
|
|
46
47
|
l();
|
|
47
|
-
let n =
|
|
48
|
+
let n = Ge(e.current);
|
|
48
49
|
if (!n) return;
|
|
49
50
|
let r = () => {
|
|
50
51
|
cancelAnimationFrame(c.current), c.current = requestAnimationFrame(l);
|
|
@@ -63,8 +64,8 @@ function Je(e, t = {}) {
|
|
|
63
64
|
l,
|
|
64
65
|
...r
|
|
65
66
|
]);
|
|
66
|
-
let u =
|
|
67
|
-
|
|
67
|
+
let u = F((t) => {
|
|
68
|
+
Ge(e.current)?.scrollBy({
|
|
68
69
|
left: t,
|
|
69
70
|
behavior: "smooth"
|
|
70
71
|
});
|
|
@@ -73,15 +74,15 @@ function Je(e, t = {}) {
|
|
|
73
74
|
canScrollLeft: i,
|
|
74
75
|
canScrollRight: o,
|
|
75
76
|
scrollBy: u,
|
|
76
|
-
scrollLeft:
|
|
77
|
-
scrollRight:
|
|
77
|
+
scrollLeft: F(() => u(-n), [u, n]),
|
|
78
|
+
scrollRight: F(() => u(n), [u, n])
|
|
78
79
|
};
|
|
79
80
|
}
|
|
80
|
-
var
|
|
81
|
+
var qe = /* @__PURE__ */ new Set([
|
|
81
82
|
"",
|
|
82
83
|
"true",
|
|
83
84
|
"plaintext-only"
|
|
84
|
-
]),
|
|
85
|
+
]), W = [
|
|
85
86
|
"a[href]",
|
|
86
87
|
"button:not([disabled])",
|
|
87
88
|
"input:not([disabled])",
|
|
@@ -91,7 +92,7 @@ var V = /* @__PURE__ */ new Set([
|
|
|
91
92
|
"[contenteditable]",
|
|
92
93
|
"[tabindex]:not([tabindex=\"-1\"])"
|
|
93
94
|
].join(",");
|
|
94
|
-
function
|
|
95
|
+
function Je(e) {
|
|
95
96
|
let t = [e];
|
|
96
97
|
for (let n = 0; n < t.length; n++) for (let r of t[n].querySelectorAll("[aria-controls]:not([aria-expanded=\"false\"])")) for (let n of (r.getAttribute("aria-controls") ?? "").split(/\s+/)) {
|
|
97
98
|
let r = e.ownerDocument.getElementById(n);
|
|
@@ -99,13 +100,13 @@ function H(e) {
|
|
|
99
100
|
}
|
|
100
101
|
return t;
|
|
101
102
|
}
|
|
102
|
-
function
|
|
103
|
-
let r =
|
|
104
|
-
r.current = n,
|
|
103
|
+
function Ye(e, t, n) {
|
|
104
|
+
let r = R(n);
|
|
105
|
+
r.current = n, I(() => {
|
|
105
106
|
if (!e || typeof document > "u") return;
|
|
106
107
|
let n = document.activeElement, i = document.body.style.overflow;
|
|
107
108
|
document.body.style.overflow = "hidden";
|
|
108
|
-
let a, o = !0, s = (e, t) => t instanceof Node &&
|
|
109
|
+
let a, o = !0, s = (e, t) => t instanceof Node && Je(e).some((e) => e.contains(t)), c = (e) => Array.from(e.querySelectorAll(W)).filter((e) => (e.tabIndex >= 0 || qe.has(e.getAttribute("contenteditable")?.toLowerCase() ?? "false") && !e.hasAttribute("tabindex") && !e.parentElement?.isContentEditable) && !e.matches(":disabled") && !e.closest("[inert], [hidden]") && !["hidden", "collapse"].includes(getComputedStyle(e).visibility) && (e.offsetParent !== null || e === document.activeElement)), l = (e, t) => {
|
|
109
110
|
let n = e?.closest("[role=\"dialog\"], [role=\"alertdialog\"], [aria-modal=\"true\"]");
|
|
110
111
|
return !!n && n !== t;
|
|
111
112
|
}, u = (e) => {
|
|
@@ -141,10 +142,11 @@ function Xe(e, t, n) {
|
|
|
141
142
|
}
|
|
142
143
|
//#endregion
|
|
143
144
|
//#region src/components/features/table/table.strings.ts
|
|
144
|
-
var
|
|
145
|
+
var G = (e) => {
|
|
145
146
|
let t = e.replace(/[_-]+/g, " ").replace(/\s+/g, " ").trim();
|
|
146
147
|
return t ? t.replace(/\b\w/g, (e) => e.toUpperCase()) : "Column";
|
|
147
|
-
},
|
|
148
|
+
}, K = {
|
|
149
|
+
loading: { label: "Loading records" },
|
|
148
150
|
emptyState: {
|
|
149
151
|
message: "No results found.",
|
|
150
152
|
ariaLabel: "Empty state"
|
|
@@ -161,7 +163,7 @@ var Ze = (e) => {
|
|
|
161
163
|
columnVisibility: {
|
|
162
164
|
title: "Toggle columns",
|
|
163
165
|
triggerLabel: "Columns",
|
|
164
|
-
formatLabel: (e, t) => t && t.trim().length > 0 ? t :
|
|
166
|
+
formatLabel: (e, t) => t && t.trim().length > 0 ? t : G(e)
|
|
165
167
|
},
|
|
166
168
|
toolbar: {
|
|
167
169
|
scrollLeft: "Scroll left",
|
|
@@ -198,25 +200,26 @@ var Ze = (e) => {
|
|
|
198
200
|
sortPriority: (e, t, n) => `${e === "asc" ? "Ascending" : "Descending"}, sort priority ${t} of ${n}.`,
|
|
199
201
|
resizeColumn: (e) => `Resize ${e}`
|
|
200
202
|
}
|
|
201
|
-
},
|
|
203
|
+
}, q = (e, t) => ({
|
|
202
204
|
...e,
|
|
203
205
|
...t
|
|
204
|
-
}),
|
|
205
|
-
|
|
206
|
+
}), Xe = (e) => e ? {
|
|
207
|
+
loading: q(K.loading, e.loading),
|
|
208
|
+
emptyState: q(K.emptyState, e.emptyState),
|
|
206
209
|
actions: {
|
|
207
|
-
...
|
|
210
|
+
...q(K.actions, e.actions),
|
|
208
211
|
...e.actions?.triggerLabel !== void 0 && e.actions.menuLabel === void 0 ? { menuLabel: e.actions.triggerLabel } : {}
|
|
209
212
|
},
|
|
210
|
-
filter:
|
|
211
|
-
columnVisibility:
|
|
212
|
-
toolbar:
|
|
213
|
-
pagination:
|
|
214
|
-
selection:
|
|
215
|
-
accessibility:
|
|
216
|
-
} :
|
|
213
|
+
filter: q(K.filter, e.filter),
|
|
214
|
+
columnVisibility: q(K.columnVisibility, e.columnVisibility),
|
|
215
|
+
toolbar: q(K.toolbar, e.toolbar),
|
|
216
|
+
pagination: q(K.pagination, e.pagination),
|
|
217
|
+
selection: q(K.selection, e.selection),
|
|
218
|
+
accessibility: q(K.accessibility, e.accessibility)
|
|
219
|
+
} : K;
|
|
217
220
|
//#endregion
|
|
218
221
|
//#region src/components/features/table/pagination.tsx
|
|
219
|
-
function
|
|
222
|
+
function Ze(e, t) {
|
|
220
223
|
if (t <= 7) return Array.from({ length: t }, (e, t) => t + 1);
|
|
221
224
|
let n = [1];
|
|
222
225
|
e > 3 && n.push("ellipsis");
|
|
@@ -224,38 +227,38 @@ function $e(e, t) {
|
|
|
224
227
|
for (let e = r; e <= i; e++) n.push(e);
|
|
225
228
|
return e < t - 2 && n.push("ellipsis"), n.push(t), n;
|
|
226
229
|
}
|
|
227
|
-
function
|
|
230
|
+
function Qe(e, t, n) {
|
|
228
231
|
let r = new URLSearchParams();
|
|
229
232
|
return r.set(n, String(t)), `${e}?${r.toString()}`;
|
|
230
233
|
}
|
|
231
|
-
function
|
|
234
|
+
function $e({ pagination: e, onPageChange: t, labels: r = {}, pageQueryKey: i }) {
|
|
232
235
|
let a = {
|
|
233
|
-
...
|
|
236
|
+
...K.pagination,
|
|
234
237
|
...r
|
|
235
238
|
}, o = {
|
|
236
239
|
navigationLabel: a.ariaLabel,
|
|
237
240
|
previous: a.previous,
|
|
238
241
|
next: a.next,
|
|
239
|
-
previousLabel: a.previousLabel ??
|
|
240
|
-
nextLabel: a.nextLabel ??
|
|
241
|
-
morePages: a.morePages ??
|
|
242
|
-
}, s = i ?? "page", c = (e.current_page - 1) * e.per_page + 1, l = Math.min(e.current_page * e.per_page, e.total), u =
|
|
242
|
+
previousLabel: a.previousLabel ?? he.previousLabel,
|
|
243
|
+
nextLabel: a.nextLabel ?? he.nextLabel,
|
|
244
|
+
morePages: a.morePages ?? he.morePages
|
|
245
|
+
}, s = i ?? "page", c = (e.current_page - 1) * e.per_page + 1, l = Math.min(e.current_page * e.per_page, e.total), u = F((n, r) => {
|
|
243
246
|
r && t?.(n, r, e.path || "");
|
|
244
|
-
}, [t, e.path]), d = e.prev_page_url !== null, f = e.next_page_url !== null, p =
|
|
245
|
-
return /* @__PURE__ */
|
|
247
|
+
}, [t, e.path]), d = e.prev_page_url !== null, f = e.next_page_url !== null, p = Ze(e.current_page, e.last_page);
|
|
248
|
+
return /* @__PURE__ */ V("div", {
|
|
246
249
|
className: n("pagination--component", "flex flex-col items-start gap-space-md px-surface py-row-y-lg sm:flex-row sm:items-center sm:justify-between sm:gap-0"),
|
|
247
|
-
children: [/* @__PURE__ */
|
|
250
|
+
children: [/* @__PURE__ */ V(_, {
|
|
248
251
|
size: "xs",
|
|
249
252
|
className: "tabular-nums tracking-tight",
|
|
250
253
|
children: [
|
|
251
|
-
/* @__PURE__ */
|
|
254
|
+
/* @__PURE__ */ B(O, {
|
|
252
255
|
value: c,
|
|
253
256
|
size: "xs",
|
|
254
257
|
weight: "medium",
|
|
255
258
|
align: "left"
|
|
256
259
|
}),
|
|
257
260
|
"–",
|
|
258
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ B(O, {
|
|
259
262
|
value: l,
|
|
260
263
|
size: "xs",
|
|
261
264
|
weight: "medium",
|
|
@@ -264,7 +267,7 @@ function tt({ pagination: e, onPageChange: t, labels: r = {}, pageQueryKey: i })
|
|
|
264
267
|
" ",
|
|
265
268
|
a.of,
|
|
266
269
|
" ",
|
|
267
|
-
/* @__PURE__ */
|
|
270
|
+
/* @__PURE__ */ B(O, {
|
|
268
271
|
value: e.total,
|
|
269
272
|
size: "xs",
|
|
270
273
|
weight: "medium",
|
|
@@ -273,13 +276,13 @@ function tt({ pagination: e, onPageChange: t, labels: r = {}, pageQueryKey: i })
|
|
|
273
276
|
" ",
|
|
274
277
|
a.entries
|
|
275
278
|
]
|
|
276
|
-
}), /* @__PURE__ */
|
|
279
|
+
}), /* @__PURE__ */ B(be, {
|
|
277
280
|
strings: o,
|
|
278
281
|
className: "mx-0 w-full justify-start sm:w-auto sm:justify-center",
|
|
279
|
-
children: /* @__PURE__ */
|
|
282
|
+
children: /* @__PURE__ */ V(xe, {
|
|
280
283
|
className: "gap-0 sm:gap-space-2xs",
|
|
281
284
|
children: [
|
|
282
|
-
/* @__PURE__ */
|
|
285
|
+
/* @__PURE__ */ B(ye, { children: /* @__PURE__ */ B(ve, {
|
|
283
286
|
size: "sm",
|
|
284
287
|
text: a.previous,
|
|
285
288
|
href: "#",
|
|
@@ -291,18 +294,18 @@ function tt({ pagination: e, onPageChange: t, labels: r = {}, pageQueryKey: i })
|
|
|
291
294
|
}) }),
|
|
292
295
|
p.map((t, n) => {
|
|
293
296
|
let r = t === "ellipsis", i = r ? `ellipsis-${e.current_page}-${n}` : `page-${t}`;
|
|
294
|
-
return /* @__PURE__ */
|
|
297
|
+
return /* @__PURE__ */ B(ye, { children: r ? /* @__PURE__ */ B(_e, { size: "sm" }) : /* @__PURE__ */ B(ge, {
|
|
295
298
|
size: "sm",
|
|
296
299
|
href: "#",
|
|
297
300
|
active: t === e.current_page,
|
|
298
301
|
onClick: (n) => {
|
|
299
|
-
n.preventDefault(), u(t,
|
|
302
|
+
n.preventDefault(), u(t, Qe(e.path, t, s));
|
|
300
303
|
},
|
|
301
304
|
className: "size-action-sm text-pxs",
|
|
302
305
|
children: t
|
|
303
306
|
}) }, i);
|
|
304
307
|
}),
|
|
305
|
-
/* @__PURE__ */
|
|
308
|
+
/* @__PURE__ */ B(ye, { children: /* @__PURE__ */ B(me, {
|
|
306
309
|
size: "sm",
|
|
307
310
|
text: a.next,
|
|
308
311
|
href: "#",
|
|
@@ -317,14 +320,14 @@ function tt({ pagination: e, onPageChange: t, labels: r = {}, pageQueryKey: i })
|
|
|
317
320
|
})]
|
|
318
321
|
});
|
|
319
322
|
}
|
|
320
|
-
|
|
323
|
+
$e.displayName = "Pagination";
|
|
321
324
|
//#endregion
|
|
322
325
|
//#region src/components/features/table/table-actions.tsx
|
|
323
|
-
function
|
|
324
|
-
let { row: t, actions: r, menuLabel: i, displayMode: a = "menu", responsiveBreakpoint: o = 1040, strings: s } = e, c = s ??
|
|
326
|
+
function et(e) {
|
|
327
|
+
let { row: t, actions: r, menuLabel: i, displayMode: a = "menu", responsiveBreakpoint: o = 1040, strings: s } = e, c = s ?? K, l = i ?? c.actions.menuLabel ?? c.actions.triggerLabel, f = L(() => {
|
|
325
328
|
let e = typeof r == "function" ? r(t) : r;
|
|
326
329
|
return Array.isArray(e) ? e : [];
|
|
327
|
-
}, [r, t]), p =
|
|
330
|
+
}, [r, t]), p = L(() => {
|
|
328
331
|
let e = (e) => typeof e == "function" ? e(t) : e;
|
|
329
332
|
return f.flatMap((t) => {
|
|
330
333
|
let n = e(t.visible) ?? !0;
|
|
@@ -334,8 +337,8 @@ function nt(e) {
|
|
|
334
337
|
disabled: e(t.disabled) ?? !1
|
|
335
338
|
}] : [];
|
|
336
339
|
});
|
|
337
|
-
}, [f, t]), m = p.length > 0, [h, g] =
|
|
338
|
-
if (
|
|
340
|
+
}, [f, t]), m = p.length > 0, [h, g] = z(!1), _ = p.filter((e) => e.tone !== "destructive"), v = p.filter((e) => e.tone === "destructive"), y = [..._, ...v];
|
|
341
|
+
if (I(() => {
|
|
339
342
|
if (a !== "auto" || !m) {
|
|
340
343
|
g(!1);
|
|
341
344
|
return;
|
|
@@ -362,44 +365,46 @@ function nt(e) {
|
|
|
362
365
|
buttonStyle: e.buttonStyle,
|
|
363
366
|
onClick: () => e.onClick?.(t)
|
|
364
367
|
}));
|
|
365
|
-
return b === "inline" ? /* @__PURE__ */
|
|
368
|
+
return b === "inline" ? /* @__PURE__ */ B(d, {
|
|
366
369
|
actions: x,
|
|
367
370
|
className: n("table-actions--component")
|
|
368
|
-
}) : /* @__PURE__ */
|
|
371
|
+
}) : /* @__PURE__ */ B(u, {
|
|
369
372
|
actions: x,
|
|
370
373
|
srText: l || c.actions.srLabel,
|
|
371
374
|
closeOnSelect: !0,
|
|
372
|
-
align: "end"
|
|
373
|
-
density: "table"
|
|
375
|
+
align: "end"
|
|
374
376
|
});
|
|
375
377
|
}
|
|
376
|
-
|
|
378
|
+
et.displayName = "DataTableActions";
|
|
377
379
|
//#endregion
|
|
378
380
|
//#region src/components/features/table/table-helpers.tsx
|
|
379
|
-
|
|
381
|
+
function J(e) {
|
|
382
|
+
return e.options.meta?.themeliaDataTable;
|
|
383
|
+
}
|
|
384
|
+
var tt = (e, t, n) => {
|
|
380
385
|
typeof e == "function" ? t((t) => {
|
|
381
386
|
let r = e(t);
|
|
382
387
|
return n && n(r), r;
|
|
383
388
|
}) : (t(e), n && n(e));
|
|
384
|
-
},
|
|
389
|
+
}, nt = (e, t, n) => {
|
|
385
390
|
typeof e == "function" ? t((t) => {
|
|
386
391
|
let r = e(t);
|
|
387
392
|
return n && n(r), r;
|
|
388
393
|
}) : (t(e), n && n(e));
|
|
389
|
-
},
|
|
394
|
+
}, rt = (e, t, n) => {
|
|
390
395
|
typeof e == "function" ? t((t) => {
|
|
391
396
|
let r = e(t);
|
|
392
397
|
return n && n(r), r;
|
|
393
398
|
}) : (t(e), n && n(e));
|
|
394
|
-
},
|
|
399
|
+
}, it = (e, t, n, r) => {
|
|
395
400
|
let i = "";
|
|
396
401
|
return r && (i += "bg-muted "), typeof n == "function" ? i += n(e, t) + " " : n && (i += n + " "), i.trim();
|
|
397
|
-
},
|
|
402
|
+
}, at = (e, t, n, r, i) => {
|
|
398
403
|
let a = "";
|
|
399
404
|
return typeof n == "string" ? a = n : n && (a = n(e, t)), r && i ? `${a} sticky start-0 z-10 bg-card shadow-[1px_0_0_0_var(--border)] rtl:shadow-[-1px_0_0_0_var(--border)]` : a;
|
|
400
|
-
},
|
|
401
|
-
className: "px-space-sm",
|
|
402
|
-
children: /* @__PURE__ */
|
|
405
|
+
}, ot = (e) => e.getSelectedRowModel().rows.map((e) => e.original), st = (e, t = K) => /* @__PURE__ */ B("div", {
|
|
406
|
+
className: "flex items-center px-space-sm",
|
|
407
|
+
children: /* @__PURE__ */ B(fe, {
|
|
403
408
|
className: "size-icon cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",
|
|
404
409
|
checked: e.getIsSelected(),
|
|
405
410
|
disabled: !e.getCanSelect(),
|
|
@@ -407,64 +412,87 @@ var rt = (e, t, n) => {
|
|
|
407
412
|
onClick: (e) => e.stopPropagation(),
|
|
408
413
|
"aria-label": t.selection.row(e.index)
|
|
409
414
|
})
|
|
410
|
-
}),
|
|
411
|
-
className: "px-space-sm",
|
|
412
|
-
children: /* @__PURE__ */
|
|
415
|
+
}), Y = (e, t = K) => /* @__PURE__ */ B("div", {
|
|
416
|
+
className: "flex items-center px-space-sm",
|
|
417
|
+
children: /* @__PURE__ */ B(fe, {
|
|
413
418
|
className: "size-icon cursor-pointer",
|
|
414
419
|
checked: e.getIsAllPageRowsSelected(),
|
|
415
420
|
indeterminate: e.getIsSomePageRowsSelected() && !e.getIsAllPageRowsSelected(),
|
|
416
421
|
onCheckedChange: (t) => e.toggleAllPageRowsSelected(t === !0),
|
|
417
422
|
"aria-label": t.selection.selectAll
|
|
418
423
|
})
|
|
419
|
-
})
|
|
424
|
+
});
|
|
425
|
+
function ct({ table: e }) {
|
|
426
|
+
return Y(e, J(e)?.strings);
|
|
427
|
+
}
|
|
428
|
+
function X({ table: e, row: t }) {
|
|
429
|
+
return st(t, J(e)?.strings);
|
|
430
|
+
}
|
|
431
|
+
var lt = (e, t) => [{
|
|
420
432
|
id: "selection",
|
|
421
|
-
header: ({ table: e }) =>
|
|
422
|
-
cell: ({ row: e }) =>
|
|
433
|
+
header: t ? ({ table: e }) => Y(e, t) : ct,
|
|
434
|
+
cell: t ? ({ row: e }) => st(e, t) : X,
|
|
423
435
|
enableSorting: !1,
|
|
424
436
|
enableResizing: !1,
|
|
437
|
+
enableHiding: !1,
|
|
425
438
|
size: 40
|
|
426
|
-
}, ...e],
|
|
439
|
+
}, ...e], Z = [
|
|
427
440
|
"button, a[href], input, select, textarea, summary, label, [tabindex]",
|
|
428
441
|
"[role=\"button\"], [role=\"link\"], [role=\"checkbox\"], [role=\"switch\"], [role=\"radio\"]",
|
|
429
442
|
"[role=\"menuitem\"], [role=\"menuitemcheckbox\"], [role=\"menuitemradio\"], [role=\"tab\"]",
|
|
430
443
|
"[role=\"combobox\"], [role=\"textbox\"], [role=\"slider\"], [role=\"spinbutton\"]",
|
|
431
444
|
"[contenteditable]:not([contenteditable=\"false\"])"
|
|
432
445
|
].join(",");
|
|
433
|
-
function ut({
|
|
434
|
-
let
|
|
435
|
-
|
|
436
|
-
let
|
|
437
|
-
return /* @__PURE__ */
|
|
438
|
-
|
|
446
|
+
function ut({ loading: e = !1, loadingRows: t = 6, table: r, onRowClick: i, emptyStateMessage: a, emptyStateAction: o, cellClassName: c = "", rowClassName: l = "", stickyFirstColumn: u = !1, striped: d = !1, strings: m }) {
|
|
447
|
+
let h = r.getRowModel().rows, g = a ?? m?.emptyState.message ?? K.emptyState.message;
|
|
448
|
+
if (e) {
|
|
449
|
+
let e = Number.isFinite(t) ? Math.max(1, Math.min(20, Math.floor(t))) : 6, n = r.getVisibleLeafColumns();
|
|
450
|
+
return /* @__PURE__ */ B(M, {
|
|
451
|
+
className: "table-body--component",
|
|
452
|
+
"data-loading": "true",
|
|
453
|
+
children: Array.from({ length: e }, (e, t) => /* @__PURE__ */ B(j, {
|
|
454
|
+
"aria-hidden": "true",
|
|
455
|
+
className: "hover:bg-transparent",
|
|
456
|
+
children: n.map((e, t) => /* @__PURE__ */ B(Se, {
|
|
457
|
+
className: at(e.id, null, c, u, t === 0),
|
|
458
|
+
children: /* @__PURE__ */ B(f, { className: "h-4 w-full" })
|
|
459
|
+
}, e.id))
|
|
460
|
+
}, t))
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
return h.length ? /* @__PURE__ */ B(M, { children: h.map((e, t) => {
|
|
464
|
+
let r = e.getIsSelected(), a = e.getVisibleCells(), o = it(e, t, l, r), f = d && t % 2 != 0 ? p.tableStripe : "", m = i ? "cursor-pointer" : "", h = n(o, f, "transition-colors duration-150", `${p.tableRowHover} ${p.tableRowSelected}`, m, i && `focus-visible:outline-none ${s.inset}`, "border-b border-border/60 last:border-b-0");
|
|
465
|
+
return /* @__PURE__ */ B(j, {
|
|
466
|
+
"data-state": r ? "selected" : null,
|
|
439
467
|
className: h,
|
|
440
|
-
tabIndex:
|
|
441
|
-
onClick:
|
|
442
|
-
if (
|
|
443
|
-
let
|
|
444
|
-
|
|
468
|
+
tabIndex: i ? 0 : void 0,
|
|
469
|
+
onClick: i ? (t) => {
|
|
470
|
+
if (t.defaultPrevented) return;
|
|
471
|
+
let n = t.target, r = n instanceof Element ? n.closest(Z) : null;
|
|
472
|
+
r && r !== t.currentTarget || n instanceof Node && t.currentTarget.contains(n) && i(e.original);
|
|
445
473
|
} : void 0,
|
|
446
|
-
onKeyDown:
|
|
447
|
-
|
|
474
|
+
onKeyDown: i ? (t) => {
|
|
475
|
+
t.defaultPrevented || t.target !== t.currentTarget || t.key !== "Enter" && t.key !== " " || (t.preventDefault(), t.repeat || i(e.original));
|
|
448
476
|
} : void 0,
|
|
449
|
-
children:
|
|
450
|
-
className: n(
|
|
451
|
-
children:
|
|
477
|
+
children: a.map((t, r) => /* @__PURE__ */ B(Se, {
|
|
478
|
+
className: n(at(t.column.id, e, c, u, r === 0), t.column.columnDef.meta?.align === "end" && "text-right tabular-nums", t.column.columnDef.meta?.align === "center" && "text-center"),
|
|
479
|
+
children: Be(t.column.columnDef.cell, t.getContext())
|
|
452
480
|
}, t.id))
|
|
453
481
|
}, e.id);
|
|
454
|
-
}) }) : /* @__PURE__ */
|
|
482
|
+
}) }) : /* @__PURE__ */ B(M, {
|
|
455
483
|
className: "table-body--component",
|
|
456
|
-
children: /* @__PURE__ */
|
|
484
|
+
children: /* @__PURE__ */ B(j, {
|
|
457
485
|
className: "hover:bg-transparent",
|
|
458
|
-
children: /* @__PURE__ */
|
|
459
|
-
className: "p-0
|
|
460
|
-
colSpan:
|
|
461
|
-
children: /* @__PURE__ */
|
|
462
|
-
strings: { ariaLabel:
|
|
463
|
-
title:
|
|
486
|
+
children: /* @__PURE__ */ B(Se, {
|
|
487
|
+
className: "p-0 text-center whitespace-normal",
|
|
488
|
+
colSpan: r.getAllColumns().length,
|
|
489
|
+
children: /* @__PURE__ */ B(Te, {
|
|
490
|
+
strings: { ariaLabel: m?.emptyState.ariaLabel ?? K.emptyState.ariaLabel },
|
|
491
|
+
title: g,
|
|
464
492
|
description: !1,
|
|
465
|
-
media: /* @__PURE__ */
|
|
493
|
+
media: /* @__PURE__ */ B(Re, { className: "size-icon" }),
|
|
466
494
|
mediaVariant: "icon-soft",
|
|
467
|
-
actions:
|
|
495
|
+
actions: o,
|
|
468
496
|
className: "data-table--empty-state w-[100cqw] max-w-full"
|
|
469
497
|
})
|
|
470
498
|
})
|
|
@@ -474,32 +502,32 @@ function ut({ table: e, onRowClick: t, emptyStateMessage: r, emptyStateAction: i
|
|
|
474
502
|
ut.displayName = "DataTableBody";
|
|
475
503
|
//#endregion
|
|
476
504
|
//#region src/components/features/table/table-header.tsx
|
|
477
|
-
function dt({ table: e, enableResizing: t = !1, stickyHeader: i = !1, headerClassName: o = "", cellClassName: c = "", stickyFirstColumn: l = !1, columnGroups: u, headerTransparent: d = !1, strings:
|
|
478
|
-
let m = e.getHeaderGroups(), h =
|
|
479
|
-
return /* @__PURE__ */
|
|
505
|
+
function dt({ table: e, enableResizing: t = !1, stickyHeader: i = !1, headerClassName: o = "", cellClassName: c = "", stickyFirstColumn: l = !1, columnGroups: u, headerTransparent: d = !1, strings: f }) {
|
|
506
|
+
let m = e.getHeaderGroups(), h = Ee.useId(), g = e.getState().sorting, _ = i ? n("shadow-[0_1px_0_0_var(--border)]", d ? "bg-background" : "bg-muted") : "", v = (e) => u ? u.find((t) => t.columns.includes(e)) : null;
|
|
507
|
+
return /* @__PURE__ */ V(Ce, {
|
|
480
508
|
className: n(i && "sticky top-0 z-20", o),
|
|
481
509
|
children: [(() => {
|
|
482
510
|
if (!u || u.length === 0 || m.length === 0) return null;
|
|
483
511
|
let e = m[0].headers, t = null, r = 0, i = [];
|
|
484
512
|
return e.forEach((o, s) => {
|
|
485
513
|
let c = v(o.id)?.header || "";
|
|
486
|
-
c === t ? r++ : (t !== null && r > 0 && i.push(/* @__PURE__ */
|
|
514
|
+
c === t ? r++ : (t !== null && r > 0 && i.push(/* @__PURE__ */ B(N, {
|
|
487
515
|
colSpan: r,
|
|
488
516
|
className: n("border-r border-border/60 bg-muted/50 text-center text-muted-foreground last:border-r-0", _),
|
|
489
|
-
children: /* @__PURE__ */
|
|
490
|
-
}, `group-${t}-${i.length}`)), t = c, r = 1), s === e.length - 1 && r > 0 && i.push(/* @__PURE__ */
|
|
517
|
+
children: /* @__PURE__ */ B(a, { children: t || "" })
|
|
518
|
+
}, `group-${t}-${i.length}`)), t = c, r = 1), s === e.length - 1 && r > 0 && i.push(/* @__PURE__ */ B(N, {
|
|
491
519
|
colSpan: r,
|
|
492
520
|
className: n("whitespace-nowrap border-r border-border/60 bg-muted/50 text-center text-muted-foreground last:border-r-0", _),
|
|
493
|
-
children: /* @__PURE__ */
|
|
521
|
+
children: /* @__PURE__ */ B(a, { children: t || "" })
|
|
494
522
|
}, `group-${t}-${i.length}`));
|
|
495
|
-
}), /* @__PURE__ */
|
|
523
|
+
}), /* @__PURE__ */ B(j, {
|
|
496
524
|
className: n("table-header--component", "border-b border-border"),
|
|
497
525
|
children: i
|
|
498
526
|
});
|
|
499
|
-
})(), m.map((a) => /* @__PURE__ */
|
|
500
|
-
className: n("border-b border-border/60", d ? "bg-transparent hover:bg-transparent" : `${
|
|
527
|
+
})(), m.map((a) => /* @__PURE__ */ B(j, {
|
|
528
|
+
className: n("border-b border-border/60", d ? "bg-transparent hover:bg-transparent" : `${p.tableHead} ${p.tableRowHover}`),
|
|
501
529
|
children: a.headers.map((a, o) => {
|
|
502
|
-
let u = n(
|
|
530
|
+
let u = n(at(a.id, null, c, l, o === 0), "text-muted-foreground font-medium whitespace-nowrap", a.column.columnDef.meta?.align === "end" && "text-right", a.column.columnDef.meta?.align === "center" && "text-center", _, i && l && o === 0 && "z-30", !i && "bg-transparent", t && !(l && o === 0) && "relative"), d = t || a.column.columnDef.size !== void 0 ? { width: a.getSize() } : void 0, p = `${h}-${encodeURIComponent(a.id)}`, m = a.getResizeHandler(), v = a.getLeafHeaders().filter((e) => e.subHeaders.length === 0), y = v.reduce((e, t) => e + (t.column.columnDef.minSize ?? 20), 0), b = Math.min(2 ** 53 - 1, v.reduce((e, t) => e + (t.column.columnDef.maxSize ?? 2 ** 53 - 1), 0)), x = (t) => {
|
|
503
531
|
e.setOptions((e) => ({
|
|
504
532
|
...e,
|
|
505
533
|
columnResizeDirection: getComputedStyle(t.currentTarget).direction === "rtl" ? "rtl" : "ltr"
|
|
@@ -508,45 +536,45 @@ function dt({ table: e, enableResizing: t = !1, stickyHeader: i = !1, headerClas
|
|
|
508
536
|
let e = a.column.columnDef.header;
|
|
509
537
|
return typeof e == "string" ? e : typeof a.id == "string" ? a.id : "column";
|
|
510
538
|
})();
|
|
511
|
-
return /* @__PURE__ */
|
|
539
|
+
return /* @__PURE__ */ B(N, {
|
|
512
540
|
colSpan: a.colSpan,
|
|
513
541
|
className: u,
|
|
514
542
|
style: d,
|
|
515
543
|
"aria-sort": !a.isPlaceholder && a.subHeaders.length === 0 && a.column.getIsSorted() && a.column.getSortIndex() === 0 ? a.column.getIsSorted() === "asc" ? "ascending" : "descending" : void 0,
|
|
516
|
-
children: a.isPlaceholder ? null : /* @__PURE__ */
|
|
544
|
+
children: a.isPlaceholder ? null : /* @__PURE__ */ V("div", {
|
|
517
545
|
className: n(t && a.column.getCanResize() && "pe-action-sm"),
|
|
518
546
|
children: [(() => {
|
|
519
|
-
let e = a.column.getCanSort(), t = a.column.getIsSorted(), i =
|
|
520
|
-
return e ? /* @__PURE__ */
|
|
547
|
+
let e = a.column.getCanSort(), t = a.column.getIsSorted(), i = Be(a.column.columnDef.header, a.getContext()), o = t === "asc" ? je : t === "desc" ? Ae : Pe;
|
|
548
|
+
return e ? /* @__PURE__ */ V(r, {
|
|
521
549
|
type: "button",
|
|
522
550
|
tone: "secondary",
|
|
523
551
|
buttonStyle: "ghost",
|
|
524
552
|
size: "sm",
|
|
525
553
|
onClick: a.column.getToggleSortingHandler(),
|
|
526
|
-
className: n("group -ml-space-sm inline-flex select-none items-center gap-space-sm rounded-
|
|
527
|
-
"aria-label": (
|
|
528
|
-
"aria-describedby": t && g.length > 1 ?
|
|
554
|
+
className: n("group -ml-space-sm inline-flex select-none items-center gap-space-sm rounded-radius px-space-sm", "text-muted-foreground hover:text-foreground transition-colors", `focus-visible:outline-none ${s.edge}`),
|
|
555
|
+
"aria-label": (f?.accessibility.sortColumn ?? K.accessibility.sortColumn)(C),
|
|
556
|
+
"aria-describedby": t && g.length > 1 ? p : void 0,
|
|
529
557
|
children: [
|
|
530
558
|
i,
|
|
531
|
-
t && g.length > 1 && /* @__PURE__ */
|
|
532
|
-
id:
|
|
559
|
+
t && g.length > 1 && /* @__PURE__ */ B("span", {
|
|
560
|
+
id: p,
|
|
533
561
|
className: "sr-only",
|
|
534
|
-
children: (
|
|
562
|
+
children: (f?.accessibility.sortPriority ?? K.accessibility.sortPriority)(t, a.column.getSortIndex() + 1, g.length)
|
|
535
563
|
}),
|
|
536
|
-
/* @__PURE__ */
|
|
537
|
-
className: n("size-icon-sm shrink-0 transition-opacity", t ? "opacity-100" : "opacity-30 group-hover:opacity-70"),
|
|
564
|
+
/* @__PURE__ */ B(o, {
|
|
565
|
+
className: n("size-icon-sm shrink-0 transition-opacity", t ? "text-foreground opacity-100" : "opacity-30 group-hover:opacity-70"),
|
|
538
566
|
"aria-hidden": "true"
|
|
539
567
|
})
|
|
540
568
|
]
|
|
541
|
-
}) : /* @__PURE__ */
|
|
569
|
+
}) : /* @__PURE__ */ B("div", {
|
|
542
570
|
className: n("flex items-center", a.column.columnDef.meta?.align === "end" && "justify-end", a.column.columnDef.meta?.align === "center" && "justify-center"),
|
|
543
571
|
children: i
|
|
544
572
|
});
|
|
545
|
-
})(), !!t && a.column.getCanResize() && /* @__PURE__ */
|
|
573
|
+
})(), !!t && a.column.getCanResize() && /* @__PURE__ */ B("div", {
|
|
546
574
|
role: "separator",
|
|
547
575
|
tabIndex: 0,
|
|
548
576
|
className: n("absolute inset-y-0 end-0 w-action-sm cursor-col-resize select-none touch-none bg-transparent after:absolute after:inset-y-0 after:end-0 after:w-px after:bg-muted-foreground opacity-0 hover:opacity-100 focus-visible:opacity-100 focus-visible:outline-none focus-visible:after:w-1 focus-visible:after:bg-ring", S && "after:bg-primary-accent!"),
|
|
549
|
-
"aria-label": (
|
|
577
|
+
"aria-label": (f?.accessibility.resizeColumn ?? K.accessibility.resizeColumn)(C),
|
|
550
578
|
"aria-orientation": "vertical",
|
|
551
579
|
"aria-valuenow": a.getSize(),
|
|
552
580
|
"aria-valuemin": y,
|
|
@@ -576,7 +604,7 @@ function dt({ table: e, enableResizing: t = !1, stickyHeader: i = !1, headerClas
|
|
|
576
604
|
dt.displayName = "DataTableHeader";
|
|
577
605
|
//#endregion
|
|
578
606
|
//#region src/components/features/table/column-visibility-toggle.tsx
|
|
579
|
-
function
|
|
607
|
+
function Q({ table: e, className: t, align: r = "end", labelVisibility: i = "hidden", strings: a = K }) {
|
|
580
608
|
let o = e.getAllColumns().filter((e) => e.getCanHide());
|
|
581
609
|
if (o.length === 0) return null;
|
|
582
610
|
let s = i !== "hidden", c = o.map((e) => {
|
|
@@ -591,14 +619,13 @@ function J({ table: e, className: t, align: r = "end", labelVisibility: i = "hid
|
|
|
591
619
|
className: "capitalize"
|
|
592
620
|
};
|
|
593
621
|
});
|
|
594
|
-
return /* @__PURE__ */
|
|
622
|
+
return /* @__PURE__ */ B(u, {
|
|
595
623
|
actions: c,
|
|
596
|
-
icon:
|
|
624
|
+
icon: ze,
|
|
597
625
|
label: a.columnVisibility.triggerLabel,
|
|
598
626
|
srText: a.columnVisibility.triggerLabel,
|
|
599
627
|
align: r,
|
|
600
628
|
width: l.xs,
|
|
601
|
-
density: "table",
|
|
602
629
|
labelVisibility: s ? "responsive" : "hidden",
|
|
603
630
|
buttonProps: {
|
|
604
631
|
"aria-label": a.columnVisibility.triggerLabel,
|
|
@@ -611,13 +638,13 @@ function J({ table: e, className: t, align: r = "end", labelVisibility: i = "hid
|
|
|
611
638
|
preserveOrder: !0
|
|
612
639
|
});
|
|
613
640
|
}
|
|
614
|
-
|
|
641
|
+
Q.displayName = "ColumnVisibilityToggle";
|
|
615
642
|
//#endregion
|
|
616
643
|
//#region src/components/features/table/partials/fullscreen-toggle.tsx
|
|
617
644
|
var ft = "text-muted-foreground hover:text-foreground disabled:pointer-events-none disabled:opacity-50";
|
|
618
|
-
function
|
|
619
|
-
let s = e ? a : i, c = e ?
|
|
620
|
-
return /* @__PURE__ */
|
|
645
|
+
function pt({ fullscreen: e, onFullscreenChange: t, enterLabel: i = "Enter full screen", exitLabel: a = "Exit full screen", className: o }) {
|
|
646
|
+
let s = e ? a : i, c = e ? Le : Ie;
|
|
647
|
+
return /* @__PURE__ */ B(r, {
|
|
621
648
|
type: "button",
|
|
622
649
|
tone: "secondary",
|
|
623
650
|
buttonStyle: "ghost",
|
|
@@ -627,33 +654,33 @@ function Y({ fullscreen: e, onFullscreenChange: t, enterLabel: i = "Enter full s
|
|
|
627
654
|
"aria-pressed": e,
|
|
628
655
|
onClick: () => t(!e),
|
|
629
656
|
className: n("fullscreen-toggle--component", ft, o),
|
|
630
|
-
children: /* @__PURE__ */
|
|
657
|
+
children: /* @__PURE__ */ B(c, { className: "size-icon-sm" })
|
|
631
658
|
});
|
|
632
659
|
}
|
|
633
|
-
|
|
660
|
+
pt.displayName = "FullscreenToggle";
|
|
634
661
|
//#endregion
|
|
635
662
|
//#region src/components/features/table/table-toolbar.tsx
|
|
636
|
-
var
|
|
637
|
-
function
|
|
638
|
-
return /* @__PURE__ */
|
|
663
|
+
var mt = 300, ht = "text-muted-foreground transition-colors duration-150 hover:text-foreground disabled:pointer-events-none disabled:opacity-50";
|
|
664
|
+
function gt({ label: e, onClick: t, disabled: i, className: a, children: o }) {
|
|
665
|
+
return /* @__PURE__ */ B(r, {
|
|
639
666
|
type: "button",
|
|
640
667
|
tone: "secondary",
|
|
641
668
|
buttonStyle: "ghost",
|
|
642
669
|
size: "sm",
|
|
643
670
|
iconOnly: !0,
|
|
644
671
|
"aria-label": e,
|
|
645
|
-
className: n("table-toolbar--component",
|
|
672
|
+
className: n("table-toolbar--component", ht, A.joinedItem, a),
|
|
646
673
|
onClick: t,
|
|
647
674
|
disabled: i,
|
|
648
675
|
children: o
|
|
649
676
|
});
|
|
650
677
|
}
|
|
651
|
-
function
|
|
678
|
+
function _t(e) {
|
|
652
679
|
return e ? e.querySelector("[data-slot=\"table-container\"]") : null;
|
|
653
680
|
}
|
|
654
|
-
function
|
|
655
|
-
let { defaultScale: d } =
|
|
656
|
-
let e =
|
|
681
|
+
function vt({ table: r, tableAreaRef: i, fullscreen: a, onFullscreenChange: o, showFullscreenToggle: s = !1, enableColumnVisibility: c = !1, labelVisibility: l = "hidden", strings: u = K }) {
|
|
682
|
+
let { defaultScale: d } = t(), f = e(void 0, d), [p, m] = z(!1), [h, g] = z(!1), _ = R(0), v = R(null), y = F(() => {
|
|
683
|
+
let e = _t(i.current);
|
|
657
684
|
if (!e) {
|
|
658
685
|
m(!1), g(!1);
|
|
659
686
|
return;
|
|
@@ -661,9 +688,9 @@ function gt({ table: r, tableAreaRef: i, fullscreen: a, onFullscreenChange: o, s
|
|
|
661
688
|
let { scrollLeft: t, scrollWidth: n, clientWidth: r } = e;
|
|
662
689
|
m(t > 1), g(t + r < n - 1);
|
|
663
690
|
}, [i]);
|
|
664
|
-
|
|
691
|
+
I(() => {
|
|
665
692
|
let e = window.setTimeout(() => {
|
|
666
|
-
let e =
|
|
693
|
+
let e = _t(i.current);
|
|
667
694
|
if (!e || (y(), typeof ResizeObserver > "u")) return;
|
|
668
695
|
let t = () => {
|
|
669
696
|
cancelAnimationFrame(_.current), _.current = requestAnimationFrame(y);
|
|
@@ -682,85 +709,97 @@ function gt({ table: r, tableAreaRef: i, fullscreen: a, onFullscreenChange: o, s
|
|
|
682
709
|
y,
|
|
683
710
|
a
|
|
684
711
|
]);
|
|
685
|
-
let b =
|
|
686
|
-
|
|
712
|
+
let b = F(() => {
|
|
713
|
+
_t(i.current)?.scrollBy({
|
|
687
714
|
left: -300,
|
|
688
715
|
behavior: "smooth"
|
|
689
716
|
});
|
|
690
|
-
}, [i]), x =
|
|
691
|
-
|
|
692
|
-
left:
|
|
717
|
+
}, [i]), x = F(() => {
|
|
718
|
+
_t(i.current)?.scrollBy({
|
|
719
|
+
left: mt,
|
|
693
720
|
behavior: "smooth"
|
|
694
721
|
});
|
|
695
722
|
}, [i]), S = c ? r.getAllColumns().filter((e) => e.getCanHide()) : [], C = p || h, w = S.length > 0, T = s;
|
|
696
|
-
return !C && !w && !T ? null : /* @__PURE__ */
|
|
697
|
-
className: n(
|
|
723
|
+
return !C && !w && !T ? null : /* @__PURE__ */ V("div", {
|
|
724
|
+
className: n(A.joinedFrame, pe[f], "bg-card text-card-foreground"),
|
|
698
725
|
children: [
|
|
699
|
-
!!C && /* @__PURE__ */
|
|
700
|
-
/* @__PURE__ */
|
|
726
|
+
!!C && /* @__PURE__ */ V(ke, { children: [
|
|
727
|
+
/* @__PURE__ */ B(gt, {
|
|
701
728
|
label: u.toolbar.scrollLeft,
|
|
702
729
|
onClick: b,
|
|
703
730
|
disabled: !p,
|
|
704
|
-
className:
|
|
705
|
-
children: /* @__PURE__ */
|
|
731
|
+
className: A.firstItem,
|
|
732
|
+
children: /* @__PURE__ */ B(Ne, { className: "size-icon-sm" })
|
|
706
733
|
}),
|
|
707
|
-
/* @__PURE__ */
|
|
734
|
+
/* @__PURE__ */ B(gt, {
|
|
708
735
|
label: u.toolbar.scrollRight,
|
|
709
736
|
onClick: x,
|
|
710
737
|
disabled: !h,
|
|
711
|
-
children: /* @__PURE__ */
|
|
738
|
+
children: /* @__PURE__ */ B(H, { className: "size-icon-sm" })
|
|
712
739
|
}),
|
|
713
|
-
(w || T) && /* @__PURE__ */
|
|
740
|
+
(w || T) && /* @__PURE__ */ B("div", { className: "h-4 w-px self-center bg-border" })
|
|
714
741
|
] }),
|
|
715
|
-
!!w && /* @__PURE__ */
|
|
742
|
+
!!w && /* @__PURE__ */ V(ke, { children: [/* @__PURE__ */ B(Q, {
|
|
716
743
|
table: r,
|
|
717
744
|
strings: u,
|
|
718
745
|
labelVisibility: l,
|
|
719
|
-
className: n(
|
|
720
|
-
}), T && /* @__PURE__ */
|
|
721
|
-
T && /* @__PURE__ */
|
|
746
|
+
className: n(A.joinedItem, "border-0 shadow-none", !C && A.firstItem, !T && A.lastItem)
|
|
747
|
+
}), T && /* @__PURE__ */ B("div", { className: "h-4 w-px self-center bg-border" })] }),
|
|
748
|
+
T && /* @__PURE__ */ B(pt, {
|
|
722
749
|
fullscreen: a,
|
|
723
750
|
onFullscreenChange: o,
|
|
724
751
|
enterLabel: u.toolbar.enterFullscreen,
|
|
725
752
|
exitLabel: u.toolbar.exitFullscreen,
|
|
726
|
-
className: n(
|
|
753
|
+
className: n(A.joinedItem, A.lastItem, !C && !w && A.firstItem)
|
|
727
754
|
})
|
|
728
755
|
]
|
|
729
756
|
});
|
|
730
757
|
}
|
|
731
|
-
|
|
758
|
+
vt.displayName = "DataTableToolbar";
|
|
732
759
|
//#endregion
|
|
733
760
|
//#region src/components/features/table/data-table.tsx
|
|
734
|
-
var
|
|
735
|
-
function
|
|
736
|
-
return
|
|
761
|
+
var yt = P("sm");
|
|
762
|
+
function bt() {
|
|
763
|
+
return Oe(yt);
|
|
737
764
|
}
|
|
738
|
-
var
|
|
765
|
+
var xt = {
|
|
739
766
|
sm: "compact",
|
|
740
767
|
md: "default",
|
|
741
768
|
lg: "comfortable"
|
|
742
|
-
},
|
|
769
|
+
}, St = {
|
|
743
770
|
sm: "sm",
|
|
744
771
|
md: "sm",
|
|
745
772
|
lg: "sm"
|
|
746
|
-
},
|
|
773
|
+
}, Ct = (e) => {
|
|
747
774
|
if (e !== void 0) return typeof e == "number" ? `${e}px` : e;
|
|
748
775
|
};
|
|
749
|
-
function
|
|
776
|
+
function wt(e, t) {
|
|
750
777
|
return e.map((e) => "columns" in e && e.columns ? {
|
|
751
778
|
...e,
|
|
752
|
-
columns:
|
|
779
|
+
columns: wt(e.columns, t)
|
|
753
780
|
} : (e.id ?? ("accessorKey" in e && typeof e.accessorKey == "string" ? e.accessorKey.replace(/\./g, "_") : void 0) ?? (typeof e.header == "string" ? e.header : void 0)) === t && e.filterFn === void 0 ? {
|
|
754
781
|
...e,
|
|
755
782
|
filterFn: "includesString"
|
|
756
783
|
} : e);
|
|
757
784
|
}
|
|
758
|
-
function
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
785
|
+
function Tt({ table: e }) {
|
|
786
|
+
return J(e)?.strings.actions.triggerLabel ?? K.actions.triggerLabel;
|
|
787
|
+
}
|
|
788
|
+
function Et({ table: e, row: t }) {
|
|
789
|
+
return J(e)?.renderActions?.(t.original) ?? null;
|
|
790
|
+
}
|
|
791
|
+
function Dt(e) {
|
|
792
|
+
let t = e.length === 2 && Array.isArray(e[0]) && Array.isArray(e[1]) ? e : void 0, [n, r] = z(t);
|
|
793
|
+
if (!t) return n && r(void 0), e;
|
|
794
|
+
let i = t[1];
|
|
795
|
+
return n && i.length === n[1].length && i.every((e, t) => Object.is(e, n[1][t])) ? n[0] : (r(t), t[0]);
|
|
796
|
+
}
|
|
797
|
+
function Ot({ size: r, surface: i = "card", headerTransparent: a = !0, columns: o, data: c, loading: l = !1, loadingRows: u, columnGroups: d, rowActions: f, rowActionsMenuLabel: p, rowActionsDisplayMode: m, rowActionsBreakpoint: h, enableSorting: g = !1, enableResizing: _ = !1, enableFiltering: v = !1, filterColumn: y, filterPlaceholder: b, manualSorting: x = !1, enableColumnVisibility: S = !1, fullscreen: C, defaultFullscreen: w = !1, onFullscreenChange: T, showFullscreenToggle: ee = !1, enableRowSelection: E = !1, enableMultiRowSelection: D = !0, enableSubRowSelection: O = !1, pagination: k, pageQueryKey: te, onPageChange: ne, onSortingChange: re, onColumnFiltersChange: ie, onRowClick: ae, onRowSelectionChange: oe, stickyHeader: se = !1, stickyToolbar: ce = !1, stickyFirstColumn: fe = !1, maxBodyHeight: A, fillAvailableHeight: pe = !1, emptyStateMessage: me, emptyStateAction: he, className: ge = "", rowClassName: _e = "", cellClassName: ve = "", headerClassName: ye = "", wrapperClassName: be = "", innerClassName: xe = "", tableContainerClassName: j = "", getRowId: Se, rowSelection: M, sorting: N, defaultSorting: Ce, columnVisibility: Te, defaultColumnVisibility: Ee, initialState: P, onColumnVisibilityChange: De, strings: Oe, topbarContent: I, topbarEnd: Ae, topbarClassName: je, toolbarLabelVisibility: Me = "hidden", footerContent: Ne, selectionToolbar: H, bulkActions: Pe, selectionToolbarClassName: Fe, selectionToolbarPlacement: Ie = "floating", totalRowCount: Le, storageKey: Re }) {
|
|
798
|
+
let { defaultScale: ze } = t(), Be = e(r, ze), U = L(() => Xe(Oe), [Oe]), Ge = n("bg-card text-card-foreground", _e), Ke = me ?? U.emptyState.message, qe = te ?? "page", W = Ct(A), Je = Dt(o), G = L(() => Re ? `dt.${Re}.columns` : null, [Re]), q = L(() => {
|
|
799
|
+
let e = Ee ?? P?.columnVisibility ?? {};
|
|
800
|
+
if (!G || typeof window > "u") return e;
|
|
762
801
|
try {
|
|
763
|
-
let t = window.localStorage.getItem(
|
|
802
|
+
let t = window.localStorage.getItem(G);
|
|
764
803
|
return {
|
|
765
804
|
...t ? JSON.parse(t) : {},
|
|
766
805
|
...e
|
|
@@ -769,238 +808,246 @@ function Ct({ size: r, surface: i = "card", headerTransparent: a = !0, columns:
|
|
|
769
808
|
return e;
|
|
770
809
|
}
|
|
771
810
|
}, [
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
]), [
|
|
776
|
-
let e =
|
|
777
|
-
return e?.isConnected ? e :
|
|
778
|
-
} }), []), mt =
|
|
779
|
-
e.target instanceof HTMLElement && (
|
|
780
|
-
}, []), ht =
|
|
781
|
-
let t = typeof e == "function" ? e(
|
|
782
|
-
|
|
783
|
-
}, [
|
|
784
|
-
let t = typeof e == "function" ? e(
|
|
785
|
-
|
|
811
|
+
Ee,
|
|
812
|
+
G,
|
|
813
|
+
P?.columnVisibility
|
|
814
|
+
]), [Ze, Qe] = z(Ce ?? P?.sorting ?? []), [J, tt] = z(P?.columnFilters ?? []), [nt, rt] = z(q), [it, at] = z(P?.rowSelection || {}), [ot, st] = z(w), Y = N ?? Ze, ct = Te ?? nt, X = M ?? it, Z = C ?? ot, Q = R(null), ft = R(null), pt = L(() => ({ get current() {
|
|
815
|
+
let e = ft.current;
|
|
816
|
+
return e?.isConnected ? e : Q.current?.querySelector("thead [role=\"checkbox\"]") ?? null;
|
|
817
|
+
} }), []), mt = F((e) => {
|
|
818
|
+
e.target instanceof HTMLElement && (ft.current = e.target);
|
|
819
|
+
}, []), ht = F((e) => {
|
|
820
|
+
let t = typeof e == "function" ? e(J) : e;
|
|
821
|
+
tt(t), ie?.(t);
|
|
822
|
+
}, [J, ie]), gt = F((e) => {
|
|
823
|
+
let t = typeof e == "function" ? e(Y) : e;
|
|
824
|
+
N === void 0 && Qe(t), re?.(t);
|
|
786
825
|
}, [
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
]),
|
|
791
|
-
let t = typeof e == "function" ? e(
|
|
792
|
-
if (
|
|
793
|
-
window.localStorage.setItem(
|
|
826
|
+
N,
|
|
827
|
+
re,
|
|
828
|
+
Y
|
|
829
|
+
]), _t = F((e) => {
|
|
830
|
+
let t = typeof e == "function" ? e(ct) : e;
|
|
831
|
+
if (Te === void 0 && rt(t), G && typeof window < "u") try {
|
|
832
|
+
window.localStorage.setItem(G, JSON.stringify(t));
|
|
794
833
|
} catch {}
|
|
795
|
-
|
|
834
|
+
De?.(t);
|
|
796
835
|
}, [
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
]),
|
|
802
|
-
let t = typeof e == "function" ? e(
|
|
803
|
-
|
|
836
|
+
ct,
|
|
837
|
+
Te,
|
|
838
|
+
G,
|
|
839
|
+
De
|
|
840
|
+
]), bt = F((e) => {
|
|
841
|
+
let t = typeof e == "function" ? e(X) : e;
|
|
842
|
+
M === void 0 && at(t), oe?.(t);
|
|
804
843
|
}, [
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
]),
|
|
809
|
-
|
|
810
|
-
}, [
|
|
811
|
-
|
|
812
|
-
let
|
|
813
|
-
let e =
|
|
814
|
-
if (!
|
|
844
|
+
M,
|
|
845
|
+
oe,
|
|
846
|
+
X
|
|
847
|
+
]), Ot = R(null), kt = F((e) => {
|
|
848
|
+
C === void 0 && st(e), T?.(e);
|
|
849
|
+
}, [C, T]);
|
|
850
|
+
Ye(Z, Ot, F(() => kt(!1), [kt]));
|
|
851
|
+
let At = F((e) => typeof p == "function" ? p(e) : p ?? U.actions.menuLabel, [p, U.actions.menuLabel]), jt = !!f, Mt = L(() => {
|
|
852
|
+
let e = v && y ? wt(Je, y) : Je, t = E ? lt(e) : e;
|
|
853
|
+
if (!jt) return t;
|
|
815
854
|
let n = {
|
|
816
855
|
id: "actions",
|
|
817
|
-
header:
|
|
818
|
-
cell:
|
|
819
|
-
row: e.original,
|
|
820
|
-
actions: u,
|
|
821
|
-
menuLabel: Tt(e.original),
|
|
822
|
-
displayMode: f,
|
|
823
|
-
responsiveBreakpoint: p,
|
|
824
|
-
strings: z
|
|
825
|
-
}),
|
|
856
|
+
header: Tt,
|
|
857
|
+
cell: Et,
|
|
826
858
|
enableSorting: !1,
|
|
827
859
|
enableHiding: !1,
|
|
828
860
|
size: 40
|
|
829
861
|
};
|
|
830
862
|
return [...t, n];
|
|
831
863
|
}, [
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
p,
|
|
839
|
-
f,
|
|
840
|
-
z
|
|
841
|
-
]), Q = Ke({
|
|
864
|
+
Je,
|
|
865
|
+
v,
|
|
866
|
+
y,
|
|
867
|
+
E,
|
|
868
|
+
jt
|
|
869
|
+
]), $ = We({
|
|
842
870
|
data: c,
|
|
843
|
-
columns:
|
|
871
|
+
columns: Mt,
|
|
872
|
+
meta: { themeliaDataTable: {
|
|
873
|
+
strings: U,
|
|
874
|
+
renderActions: f ? (e) => /* @__PURE__ */ B(et, {
|
|
875
|
+
row: e,
|
|
876
|
+
actions: f,
|
|
877
|
+
menuLabel: At(e),
|
|
878
|
+
displayMode: m,
|
|
879
|
+
responsiveBreakpoint: h,
|
|
880
|
+
strings: U
|
|
881
|
+
}) : void 0
|
|
882
|
+
} },
|
|
844
883
|
state: {
|
|
845
|
-
sorting:
|
|
846
|
-
columnVisibility:
|
|
847
|
-
rowSelection:
|
|
848
|
-
columnFilters:
|
|
884
|
+
sorting: Y,
|
|
885
|
+
columnVisibility: ct,
|
|
886
|
+
rowSelection: X,
|
|
887
|
+
columnFilters: J
|
|
849
888
|
},
|
|
850
|
-
enableSorting:
|
|
851
|
-
enableColumnResizing:
|
|
889
|
+
enableSorting: g,
|
|
890
|
+
enableColumnResizing: _,
|
|
852
891
|
columnResizeMode: "onChange",
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
892
|
+
defaultColumn: { size: void 0 },
|
|
893
|
+
enableColumnFilters: v,
|
|
894
|
+
manualFiltering: !v,
|
|
895
|
+
manualSorting: x,
|
|
856
896
|
autoResetPageIndex: !1,
|
|
857
|
-
enableRowSelection:
|
|
858
|
-
enableMultiRowSelection:
|
|
859
|
-
enableSubRowSelection:
|
|
860
|
-
onSortingChange:
|
|
861
|
-
onRowSelectionChange:
|
|
862
|
-
onColumnVisibilityChange:
|
|
897
|
+
enableRowSelection: E,
|
|
898
|
+
enableMultiRowSelection: D,
|
|
899
|
+
enableSubRowSelection: O,
|
|
900
|
+
onSortingChange: g ? gt : void 0,
|
|
901
|
+
onRowSelectionChange: E ? bt : void 0,
|
|
902
|
+
onColumnVisibilityChange: _t,
|
|
863
903
|
onColumnFiltersChange: ht,
|
|
864
|
-
getCoreRowModel:
|
|
865
|
-
getFilteredRowModel:
|
|
866
|
-
getSortedRowModel:
|
|
867
|
-
getRowId:
|
|
868
|
-
}),
|
|
869
|
-
|
|
870
|
-
}, [
|
|
871
|
-
table:
|
|
872
|
-
selectedRows:
|
|
873
|
-
selectedRowCount:
|
|
874
|
-
totalRowCount:
|
|
875
|
-
rowSelection:
|
|
876
|
-
clearSelection:
|
|
877
|
-
},
|
|
878
|
-
if (!
|
|
879
|
-
if (
|
|
880
|
-
let e =
|
|
881
|
-
selectedCount:
|
|
882
|
-
totalCount:
|
|
883
|
-
onClear:
|
|
884
|
-
placement:
|
|
904
|
+
getCoreRowModel: Ve(),
|
|
905
|
+
getFilteredRowModel: He(),
|
|
906
|
+
getSortedRowModel: Ue(),
|
|
907
|
+
getRowId: Se
|
|
908
|
+
}), Nt = v && y ? $.getAllLeafColumns().find((e) => e.id === y && e.getCanFilter()) : void 0, Pt = b ?? U.filter.searchPlaceholder, Ft = k && k.last_page > 1, It = $.getSelectedRowModel().rows.map((e) => e.original), Lt = Object.values(X).filter(Boolean).length, Rt = F(() => {
|
|
909
|
+
$.resetRowSelection();
|
|
910
|
+
}, [$]), zt = Le ?? k?.total ?? c.length, Bt = {
|
|
911
|
+
table: $,
|
|
912
|
+
selectedRows: It,
|
|
913
|
+
selectedRowCount: Lt,
|
|
914
|
+
totalRowCount: zt,
|
|
915
|
+
rowSelection: X,
|
|
916
|
+
clearSelection: Rt
|
|
917
|
+
}, Vt = (() => {
|
|
918
|
+
if (!E || H === null || H === !1) return null;
|
|
919
|
+
if (H !== void 0) return Lt === 0 ? null : typeof H == "function" ? H(Bt) : H;
|
|
920
|
+
let e = Lt === 0 ? null : typeof Pe == "function" ? Pe(Bt) : Pe, t = /* @__PURE__ */ B(le, {
|
|
921
|
+
selectedCount: Lt,
|
|
922
|
+
totalCount: zt,
|
|
923
|
+
onClear: Rt,
|
|
924
|
+
placement: Ie,
|
|
885
925
|
returnFocusRef: pt,
|
|
886
|
-
className: n("data-table-selection-toolbar--component",
|
|
926
|
+
className: n("data-table-selection-toolbar--component", Fe),
|
|
887
927
|
strings: {
|
|
888
|
-
summary: (e, t) =>
|
|
889
|
-
clear:
|
|
890
|
-
label:
|
|
928
|
+
summary: (e, t) => U.selection.summary(e, t ?? zt),
|
|
929
|
+
clear: U.selection.clear,
|
|
930
|
+
label: U.selection.label
|
|
891
931
|
},
|
|
892
932
|
children: e
|
|
893
933
|
});
|
|
894
|
-
return
|
|
934
|
+
return Ie === "inline" ? /* @__PURE__ */ B("div", {
|
|
895
935
|
"data-slot": "data-table-selection-toolbar",
|
|
896
936
|
className: "data-table--selection-toolbar px-surface py-row-y empty:hidden",
|
|
897
937
|
children: t
|
|
898
938
|
}) : t;
|
|
899
|
-
})(),
|
|
900
|
-
if (
|
|
901
|
-
}, [
|
|
902
|
-
return /* @__PURE__ */
|
|
903
|
-
value:
|
|
904
|
-
children: /* @__PURE__ */
|
|
905
|
-
ref:
|
|
906
|
-
role:
|
|
907
|
-
"aria-modal":
|
|
908
|
-
"aria-label":
|
|
909
|
-
className: n("data-table--component @container/data-table box-border",
|
|
939
|
+
})(), Ht = L(() => {
|
|
940
|
+
if (W) return { "--data-table-body-max-height": W };
|
|
941
|
+
}, [W]), Ut = Z || pe || W !== void 0, Wt = yt.Provider, Gt = St[Be];
|
|
942
|
+
return /* @__PURE__ */ B(Wt, {
|
|
943
|
+
value: Gt,
|
|
944
|
+
children: /* @__PURE__ */ V("div", {
|
|
945
|
+
ref: Ot,
|
|
946
|
+
role: Z ? "dialog" : void 0,
|
|
947
|
+
"aria-modal": Z ? !0 : void 0,
|
|
948
|
+
"aria-label": Z ? U.accessibility.fullscreenRegion : void 0,
|
|
949
|
+
className: n("data-table--component @container/data-table box-border", Z ? "fixed inset-0 z-50 bg-background text-foreground flex flex-col overflow-hidden p-surface" : n("w-full min-w-0 max-w-full", pe && "flex h-full min-h-0 flex-col", i === "card" && "overflow-hidden rounded-surface border border-border bg-card text-card-foreground shadow-xs", i === "glass" && "rounded-surface overflow-hidden border border-border/60", be)),
|
|
910
950
|
children: [
|
|
911
|
-
!!(
|
|
912
|
-
className: n("relative",
|
|
913
|
-
children: [/* @__PURE__ */
|
|
914
|
-
className: n("data-table-topbar grid gap-space-lg px-surface py-
|
|
915
|
-
children: [/* @__PURE__ */
|
|
951
|
+
!!(Nt || I || Ae || S || ee) && /* @__PURE__ */ V("div", {
|
|
952
|
+
className: n("relative", ce && "sticky top-0 z-20 bg-card text-card-foreground"),
|
|
953
|
+
children: [/* @__PURE__ */ V("div", {
|
|
954
|
+
className: n("data-table-topbar grid gap-space-lg px-surface py-surface-sm @2xl/data-table:grid-cols-[minmax(0,1fr)_auto] @2xl/data-table:items-start", Z ? "mb-space-lg shrink-0" : "mb-0", je),
|
|
955
|
+
children: [/* @__PURE__ */ V("div", {
|
|
916
956
|
className: "data-table-topbar-left flex min-w-0 flex-col gap-space-md",
|
|
917
|
-
children: [
|
|
957
|
+
children: [I, Nt && /* @__PURE__ */ B("div", {
|
|
918
958
|
className: "min-w-0 max-w-sm",
|
|
919
|
-
children: /* @__PURE__ */
|
|
920
|
-
"aria-label":
|
|
921
|
-
placeholder:
|
|
922
|
-
value:
|
|
923
|
-
onChange: (e) =>
|
|
959
|
+
children: /* @__PURE__ */ B(de, {
|
|
960
|
+
"aria-label": Pt,
|
|
961
|
+
placeholder: Pt,
|
|
962
|
+
value: Nt.getFilterValue() ?? "",
|
|
963
|
+
onChange: (e) => Nt.setFilterValue(e.target.value)
|
|
924
964
|
})
|
|
925
965
|
})]
|
|
926
|
-
}), /* @__PURE__ */
|
|
966
|
+
}), /* @__PURE__ */ V("div", {
|
|
927
967
|
className: "data-table-topbar-right flex flex-wrap items-center justify-end gap-space-md",
|
|
928
|
-
children: [
|
|
929
|
-
table:
|
|
930
|
-
tableAreaRef:
|
|
931
|
-
fullscreen:
|
|
932
|
-
onFullscreenChange:
|
|
933
|
-
showFullscreenToggle:
|
|
934
|
-
enableColumnVisibility:
|
|
935
|
-
labelVisibility:
|
|
936
|
-
strings:
|
|
968
|
+
children: [Ae, /* @__PURE__ */ B(vt, {
|
|
969
|
+
table: $,
|
|
970
|
+
tableAreaRef: Q,
|
|
971
|
+
fullscreen: Z,
|
|
972
|
+
onFullscreenChange: kt,
|
|
973
|
+
showFullscreenToggle: ee,
|
|
974
|
+
enableColumnVisibility: S,
|
|
975
|
+
labelVisibility: Me,
|
|
976
|
+
strings: U
|
|
937
977
|
})]
|
|
938
978
|
})]
|
|
939
|
-
}), /* @__PURE__ */
|
|
979
|
+
}), /* @__PURE__ */ B(ue, {})]
|
|
940
980
|
}),
|
|
941
|
-
|
|
942
|
-
/* @__PURE__ */
|
|
943
|
-
ref:
|
|
944
|
-
style:
|
|
945
|
-
onFocus:
|
|
946
|
-
className: n("min-h-0",
|
|
947
|
-
children: /* @__PURE__ */
|
|
948
|
-
|
|
981
|
+
Vt,
|
|
982
|
+
/* @__PURE__ */ V("div", {
|
|
983
|
+
ref: Q,
|
|
984
|
+
style: Ht,
|
|
985
|
+
onFocus: E ? mt : void 0,
|
|
986
|
+
className: n("min-h-0", Ut ? "overflow-hidden" : xe, (Z || pe) && "flex-1"),
|
|
987
|
+
children: [!!l && /* @__PURE__ */ B("span", {
|
|
988
|
+
role: "status",
|
|
989
|
+
className: "sr-only",
|
|
990
|
+
children: U.loading?.label ?? K.loading.label
|
|
991
|
+
}), /* @__PURE__ */ V(we, {
|
|
992
|
+
"aria-busy": l || void 0,
|
|
993
|
+
density: xt[Be],
|
|
949
994
|
containerProps: {
|
|
950
995
|
role: "region",
|
|
951
|
-
"aria-label":
|
|
996
|
+
"aria-label": U.accessibility.scrollRegion
|
|
952
997
|
},
|
|
953
|
-
style:
|
|
954
|
-
className: n("relative",
|
|
955
|
-
containerClassName: n(`focus-visible:outline-none ${s.edge}`,
|
|
956
|
-
children: [/* @__PURE__ */
|
|
957
|
-
enableResizing:
|
|
958
|
-
table:
|
|
959
|
-
stickyHeader:
|
|
998
|
+
style: _ ? { width: $.getTotalSize() } : void 0,
|
|
999
|
+
className: n("relative", _ && "min-w-full table-fixed", ge),
|
|
1000
|
+
containerClassName: n(`focus-visible:outline-none ${s.edge}`, Ut && "overflow-auto", W !== void 0 && "max-h-(--data-table-body-max-height)", (Z || pe) && "h-full min-h-0", j),
|
|
1001
|
+
children: [/* @__PURE__ */ B(dt, {
|
|
1002
|
+
enableResizing: _,
|
|
1003
|
+
table: $,
|
|
1004
|
+
stickyHeader: se,
|
|
960
1005
|
headerClassName: ye,
|
|
961
1006
|
cellClassName: ve,
|
|
962
|
-
stickyFirstColumn:
|
|
963
|
-
columnGroups:
|
|
1007
|
+
stickyFirstColumn: fe,
|
|
1008
|
+
columnGroups: d,
|
|
964
1009
|
headerTransparent: a,
|
|
965
|
-
strings:
|
|
966
|
-
}), /* @__PURE__ */
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
1010
|
+
strings: U
|
|
1011
|
+
}), /* @__PURE__ */ B(ut, {
|
|
1012
|
+
loading: l,
|
|
1013
|
+
loadingRows: u,
|
|
1014
|
+
table: $,
|
|
1015
|
+
onRowClick: ae,
|
|
1016
|
+
emptyStateMessage: Ke,
|
|
970
1017
|
emptyStateAction: he,
|
|
971
1018
|
cellClassName: ve,
|
|
972
|
-
rowClassName:
|
|
973
|
-
stickyFirstColumn:
|
|
974
|
-
strings:
|
|
1019
|
+
rowClassName: Ge,
|
|
1020
|
+
stickyFirstColumn: fe,
|
|
1021
|
+
strings: U
|
|
975
1022
|
})]
|
|
976
|
-
})
|
|
1023
|
+
})]
|
|
977
1024
|
}),
|
|
978
|
-
!!
|
|
979
|
-
pagination:
|
|
980
|
-
onPageChange:
|
|
981
|
-
pageQueryKey:
|
|
982
|
-
labels:
|
|
1025
|
+
!!Ft && /* @__PURE__ */ V(ke, { children: [/* @__PURE__ */ B(ue, {}), /* @__PURE__ */ B($e, {
|
|
1026
|
+
pagination: k,
|
|
1027
|
+
onPageChange: ne,
|
|
1028
|
+
pageQueryKey: qe,
|
|
1029
|
+
labels: U.pagination
|
|
983
1030
|
})] }),
|
|
984
|
-
!!
|
|
1031
|
+
!!Ne && /* @__PURE__ */ B("div", {
|
|
985
1032
|
"data-slot": "data-table-footer",
|
|
986
1033
|
className: "data-table--footer border-t border-border/60 px-surface py-row-y",
|
|
987
|
-
children:
|
|
1034
|
+
children: Ne
|
|
988
1035
|
})
|
|
989
1036
|
]
|
|
990
1037
|
})
|
|
991
1038
|
});
|
|
992
1039
|
}
|
|
993
|
-
|
|
1040
|
+
Ot.displayName = "DataTable";
|
|
994
1041
|
//#endregion
|
|
995
1042
|
//#region src/components/features/table/filter-bar.tsx
|
|
996
|
-
function
|
|
1043
|
+
function kt({ table: e, filterColumn: t, filterPlaceholder: r, enableColumnVisibility: i = !1, customContent: a, strings: o = K }) {
|
|
997
1044
|
if (!t && !i && !a) return null;
|
|
998
1045
|
let s = r ?? o.filter.searchPlaceholder;
|
|
999
|
-
return /* @__PURE__ */
|
|
1046
|
+
return /* @__PURE__ */ V("div", {
|
|
1000
1047
|
className: n("filter-bar--component", "flex items-center justify-between p-surface"),
|
|
1001
|
-
children: [/* @__PURE__ */
|
|
1048
|
+
children: [/* @__PURE__ */ V("div", {
|
|
1002
1049
|
className: "flex flex-1 items-center space-x-space-md",
|
|
1003
|
-
children: [!!t && /* @__PURE__ */
|
|
1050
|
+
children: [!!t && /* @__PURE__ */ B(de, {
|
|
1004
1051
|
placeholder: s,
|
|
1005
1052
|
value: e.getColumn(t)?.getFilterValue() ?? "",
|
|
1006
1053
|
onChange: (n) => {
|
|
@@ -1009,7 +1056,7 @@ function wt({ table: e, filterColumn: t, filterPlaceholder: r, enableColumnVisib
|
|
|
1009
1056
|
},
|
|
1010
1057
|
className: "max-w-sm"
|
|
1011
1058
|
}), a]
|
|
1012
|
-
}), !!i && /* @__PURE__ */
|
|
1059
|
+
}), !!i && /* @__PURE__ */ B(Q, {
|
|
1013
1060
|
table: e,
|
|
1014
1061
|
strings: o,
|
|
1015
1062
|
labelVisibility: "responsive",
|
|
@@ -1017,22 +1064,22 @@ function wt({ table: e, filterColumn: t, filterPlaceholder: r, enableColumnVisib
|
|
|
1017
1064
|
})]
|
|
1018
1065
|
});
|
|
1019
1066
|
}
|
|
1020
|
-
|
|
1067
|
+
kt.displayName = "DataTableFilterBar";
|
|
1021
1068
|
//#endregion
|
|
1022
1069
|
//#region src/components/features/table/partials/cell-value.tsx
|
|
1023
|
-
function
|
|
1070
|
+
function At(e) {
|
|
1024
1071
|
return e === !1 || e == null || typeof e == "string" && e.trim() === "";
|
|
1025
1072
|
}
|
|
1026
|
-
function
|
|
1073
|
+
function jt(e) {
|
|
1027
1074
|
return e == null;
|
|
1028
1075
|
}
|
|
1029
|
-
function
|
|
1030
|
-
return typeof e == "object" && !!e && !Array.isArray(e) && !
|
|
1076
|
+
function Mt(e) {
|
|
1077
|
+
return typeof e == "object" && !!e && !Array.isArray(e) && !De(e) && !(e instanceof Date);
|
|
1031
1078
|
}
|
|
1032
|
-
function
|
|
1079
|
+
function $(e) {
|
|
1033
1080
|
return Array.isArray(e);
|
|
1034
1081
|
}
|
|
1035
|
-
function
|
|
1082
|
+
function Nt(e) {
|
|
1036
1083
|
let [t, n, r] = e;
|
|
1037
1084
|
return {
|
|
1038
1085
|
...r,
|
|
@@ -1040,32 +1087,32 @@ function Dt(e) {
|
|
|
1040
1087
|
kind: n
|
|
1041
1088
|
};
|
|
1042
1089
|
}
|
|
1043
|
-
function
|
|
1090
|
+
function Pt(e) {
|
|
1044
1091
|
if (e === !1) return null;
|
|
1045
|
-
if (
|
|
1046
|
-
if (
|
|
1047
|
-
let t =
|
|
1048
|
-
return
|
|
1092
|
+
if (De(e)) return e;
|
|
1093
|
+
if ($(e)) {
|
|
1094
|
+
let t = Nt(e);
|
|
1095
|
+
return At(t.value) && jt(t.display) ? null : t;
|
|
1049
1096
|
}
|
|
1050
|
-
return
|
|
1097
|
+
return Mt(e) ? At(e.value) && jt(e.display) ? null : e : At(e) ? null : { value: e };
|
|
1051
1098
|
}
|
|
1052
|
-
function
|
|
1099
|
+
function Ft(e) {
|
|
1053
1100
|
return e instanceof Date ? e.toISOString() : String(e ?? "");
|
|
1054
1101
|
}
|
|
1055
|
-
function
|
|
1056
|
-
let o = t === 0, s = e.kind ?? (o ? "value" : "secondary"), c = e.value, l = e.display ?? (c instanceof Date ?
|
|
1102
|
+
function It({ descriptor: e, index: t = 0, emptyLabel: r, className: i, primaryWeight: a = "medium" }) {
|
|
1103
|
+
let o = t === 0, s = e.kind ?? (o ? "value" : "secondary"), c = e.value, l = e.display ?? (c instanceof Date ? Ft(c) : c), u = e.emptyLabel ?? r, d = n(i, e.className), f = o ? a : "regular";
|
|
1057
1104
|
switch (s) {
|
|
1058
|
-
case "secondary": return /* @__PURE__ */
|
|
1105
|
+
case "secondary": return /* @__PURE__ */ B(_, {
|
|
1059
1106
|
size: "inherit",
|
|
1060
1107
|
className: d,
|
|
1061
1108
|
children: l
|
|
1062
1109
|
});
|
|
1063
|
-
case "muted": return /* @__PURE__ */
|
|
1110
|
+
case "muted": return /* @__PURE__ */ B(v, {
|
|
1064
1111
|
size: "inherit",
|
|
1065
1112
|
className: d,
|
|
1066
1113
|
children: l
|
|
1067
1114
|
});
|
|
1068
|
-
case "name": return /* @__PURE__ */
|
|
1115
|
+
case "name": return /* @__PURE__ */ B(g, {
|
|
1069
1116
|
type: "inherit",
|
|
1070
1117
|
value: e.display === void 0 && typeof c == "string" ? c : void 0,
|
|
1071
1118
|
force: e.force,
|
|
@@ -1075,7 +1122,7 @@ function At({ descriptor: e, index: t = 0, emptyLabel: r, className: i, primaryW
|
|
|
1075
1122
|
className: d,
|
|
1076
1123
|
children: e.display
|
|
1077
1124
|
});
|
|
1078
|
-
case "mono": return /* @__PURE__ */
|
|
1125
|
+
case "mono": return /* @__PURE__ */ B(x, {
|
|
1079
1126
|
type: "inherit",
|
|
1080
1127
|
size: "inherit",
|
|
1081
1128
|
weight: f,
|
|
@@ -1083,33 +1130,33 @@ function At({ descriptor: e, index: t = 0, emptyLabel: r, className: i, primaryW
|
|
|
1083
1130
|
children: l
|
|
1084
1131
|
});
|
|
1085
1132
|
case "link": {
|
|
1086
|
-
let t = e.href ??
|
|
1087
|
-
return /* @__PURE__ */
|
|
1133
|
+
let t = e.href ?? Ft(c);
|
|
1134
|
+
return /* @__PURE__ */ B(w, {
|
|
1088
1135
|
href: t,
|
|
1089
1136
|
emptyLabel: u,
|
|
1090
1137
|
className: d,
|
|
1091
1138
|
children: l
|
|
1092
1139
|
});
|
|
1093
1140
|
}
|
|
1094
|
-
case "email": return /* @__PURE__ */
|
|
1141
|
+
case "email": return /* @__PURE__ */ B(S, {
|
|
1095
1142
|
value: typeof c == "string" ? c : void 0,
|
|
1096
1143
|
display: e.display,
|
|
1097
1144
|
emptyLabel: u,
|
|
1098
1145
|
className: d
|
|
1099
1146
|
});
|
|
1100
|
-
case "phone": return /* @__PURE__ */
|
|
1147
|
+
case "phone": return /* @__PURE__ */ B(h, {
|
|
1101
1148
|
value: typeof c == "string" ? c : void 0,
|
|
1102
1149
|
display: e.display,
|
|
1103
1150
|
emptyLabel: u,
|
|
1104
1151
|
className: d
|
|
1105
1152
|
});
|
|
1106
|
-
case "url": return /* @__PURE__ */
|
|
1153
|
+
case "url": return /* @__PURE__ */ B(b, {
|
|
1107
1154
|
value: typeof c == "string" ? c : void 0,
|
|
1108
1155
|
display: e.display,
|
|
1109
1156
|
emptyLabel: u,
|
|
1110
1157
|
className: d
|
|
1111
1158
|
});
|
|
1112
|
-
case "money": return /* @__PURE__ */
|
|
1159
|
+
case "money": return /* @__PURE__ */ B(D, {
|
|
1113
1160
|
type: "inherit",
|
|
1114
1161
|
amount: typeof c == "number" || typeof c == "string" ? c : null,
|
|
1115
1162
|
currency: e.currency,
|
|
@@ -1123,7 +1170,7 @@ function At({ descriptor: e, index: t = 0, emptyLabel: r, className: i, primaryW
|
|
|
1123
1170
|
weight: f,
|
|
1124
1171
|
className: d
|
|
1125
1172
|
});
|
|
1126
|
-
case "number": return /* @__PURE__ */
|
|
1173
|
+
case "number": return /* @__PURE__ */ B(O, {
|
|
1127
1174
|
type: "inherit",
|
|
1128
1175
|
value: typeof c == "number" || typeof c == "string" ? c : null,
|
|
1129
1176
|
locale: e.locale,
|
|
@@ -1133,7 +1180,7 @@ function At({ descriptor: e, index: t = 0, emptyLabel: r, className: i, primaryW
|
|
|
1133
1180
|
weight: f,
|
|
1134
1181
|
className: d
|
|
1135
1182
|
});
|
|
1136
|
-
case "percent": return /* @__PURE__ */
|
|
1183
|
+
case "percent": return /* @__PURE__ */ B(E, {
|
|
1137
1184
|
type: "inherit",
|
|
1138
1185
|
value: typeof c == "number" || typeof c == "string" ? c : null,
|
|
1139
1186
|
locale: e.locale,
|
|
@@ -1144,7 +1191,7 @@ function At({ descriptor: e, index: t = 0, emptyLabel: r, className: i, primaryW
|
|
|
1144
1191
|
weight: f,
|
|
1145
1192
|
className: d
|
|
1146
1193
|
});
|
|
1147
|
-
case "fileSize": return /* @__PURE__ */
|
|
1194
|
+
case "fileSize": return /* @__PURE__ */ B(y, {
|
|
1148
1195
|
type: "inherit",
|
|
1149
1196
|
value: typeof c == "number" ? c : null,
|
|
1150
1197
|
from: e.from,
|
|
@@ -1154,7 +1201,7 @@ function At({ descriptor: e, index: t = 0, emptyLabel: r, className: i, primaryW
|
|
|
1154
1201
|
weight: f,
|
|
1155
1202
|
className: d
|
|
1156
1203
|
});
|
|
1157
|
-
case "date": return /* @__PURE__ */
|
|
1204
|
+
case "date": return /* @__PURE__ */ B(ie, {
|
|
1158
1205
|
type: "inherit",
|
|
1159
1206
|
value: c,
|
|
1160
1207
|
format: e.dateFormat,
|
|
@@ -1165,7 +1212,7 @@ function At({ descriptor: e, index: t = 0, emptyLabel: r, className: i, primaryW
|
|
|
1165
1212
|
weight: f,
|
|
1166
1213
|
className: d
|
|
1167
1214
|
});
|
|
1168
|
-
case "time": return /* @__PURE__ */
|
|
1215
|
+
case "time": return /* @__PURE__ */ B(k, {
|
|
1169
1216
|
type: "inherit",
|
|
1170
1217
|
value: c,
|
|
1171
1218
|
format: e.timeFormat,
|
|
@@ -1175,7 +1222,7 @@ function At({ descriptor: e, index: t = 0, emptyLabel: r, className: i, primaryW
|
|
|
1175
1222
|
weight: f,
|
|
1176
1223
|
className: d
|
|
1177
1224
|
});
|
|
1178
|
-
case "dateTime": return /* @__PURE__ */
|
|
1225
|
+
case "dateTime": return /* @__PURE__ */ B(ne, {
|
|
1179
1226
|
type: "inherit",
|
|
1180
1227
|
value: c,
|
|
1181
1228
|
format: e.dateFormat,
|
|
@@ -1187,7 +1234,7 @@ function At({ descriptor: e, index: t = 0, emptyLabel: r, className: i, primaryW
|
|
|
1187
1234
|
weight: f,
|
|
1188
1235
|
className: d
|
|
1189
1236
|
});
|
|
1190
|
-
case "relativeTime": return /* @__PURE__ */
|
|
1237
|
+
case "relativeTime": return /* @__PURE__ */ B(te, {
|
|
1191
1238
|
value: c,
|
|
1192
1239
|
locale: e.dateLocale,
|
|
1193
1240
|
emptyLabel: u,
|
|
@@ -1195,7 +1242,7 @@ function At({ descriptor: e, index: t = 0, emptyLabel: r, className: i, primaryW
|
|
|
1195
1242
|
weight: f,
|
|
1196
1243
|
className: d
|
|
1197
1244
|
});
|
|
1198
|
-
default: return /* @__PURE__ */
|
|
1245
|
+
default: return /* @__PURE__ */ B(m, {
|
|
1199
1246
|
type: "inherit",
|
|
1200
1247
|
size: "inherit",
|
|
1201
1248
|
weight: f,
|
|
@@ -1204,13 +1251,13 @@ function At({ descriptor: e, index: t = 0, emptyLabel: r, className: i, primaryW
|
|
|
1204
1251
|
});
|
|
1205
1252
|
}
|
|
1206
1253
|
}
|
|
1207
|
-
function
|
|
1208
|
-
let T = x ??
|
|
1209
|
-
return w === void 0 ? T ? /* @__PURE__ */
|
|
1254
|
+
function Lt({ value: e, kind: t, href: r, currency: i, currencyDisplay: a, minimumFractionDigits: o, maximumFractionDigits: s, formatMode: c, locale: l, dateLocale: u, from: d, force: f, options: p, scaled: h, dateFormat: g, datePreset: _, timeFormat: v, emptyLabel: y, fallback: b = "--", missing: x, className: S, children: w }) {
|
|
1255
|
+
let T = x ?? At(e);
|
|
1256
|
+
return w === void 0 ? T ? /* @__PURE__ */ B(C, {
|
|
1210
1257
|
size: "inherit",
|
|
1211
|
-
className: n("cell-value--component",
|
|
1258
|
+
className: n("cell-value--component", S),
|
|
1212
1259
|
children: y ?? b
|
|
1213
|
-
}) :
|
|
1260
|
+
}) : It({
|
|
1214
1261
|
descriptor: {
|
|
1215
1262
|
value: e,
|
|
1216
1263
|
kind: t,
|
|
@@ -1224,7 +1271,7 @@ function $({ value: e, kind: t, href: r, currency: i, currencyDisplay: a, minimu
|
|
|
1224
1271
|
dateLocale: u,
|
|
1225
1272
|
from: d,
|
|
1226
1273
|
force: f,
|
|
1227
|
-
options:
|
|
1274
|
+
options: p,
|
|
1228
1275
|
scaled: h,
|
|
1229
1276
|
dateFormat: g,
|
|
1230
1277
|
datePreset: _,
|
|
@@ -1233,30 +1280,30 @@ function $({ value: e, kind: t, href: r, currency: i, currencyDisplay: a, minimu
|
|
|
1233
1280
|
className: "cell-value--component"
|
|
1234
1281
|
},
|
|
1235
1282
|
emptyLabel: y ?? b,
|
|
1236
|
-
className:
|
|
1237
|
-
}) : /* @__PURE__ */
|
|
1283
|
+
className: S
|
|
1284
|
+
}) : /* @__PURE__ */ B(T ? C : m, {
|
|
1238
1285
|
type: T ? "secondary" : "inherit",
|
|
1239
1286
|
size: "inherit",
|
|
1240
|
-
className: n("cell-value--component",
|
|
1287
|
+
className: n("cell-value--component", S),
|
|
1241
1288
|
children: w
|
|
1242
1289
|
});
|
|
1243
1290
|
}
|
|
1244
|
-
function
|
|
1245
|
-
let c = e.map(
|
|
1246
|
-
return c.length === 0 ? /* @__PURE__ */
|
|
1291
|
+
function Rt({ values: e = [], emptyLabel: t = "--", className: r, itemClassName: i, primaryClassName: a, secondaryClassName: o, primaryWeight: s = "medium" }) {
|
|
1292
|
+
let c = e.map(Pt).filter((e) => e !== null).slice(0, 4);
|
|
1293
|
+
return c.length === 0 ? /* @__PURE__ */ B(C, {
|
|
1247
1294
|
size: "inherit",
|
|
1248
1295
|
className: n("cell-stack--component", r),
|
|
1249
1296
|
children: t
|
|
1250
|
-
}) : /* @__PURE__ */
|
|
1297
|
+
}) : /* @__PURE__ */ B("div", {
|
|
1251
1298
|
className: n("cell-stack--component flex min-w-0 flex-col items-start gap-space-2xs", r),
|
|
1252
1299
|
children: c.map((e, r) => {
|
|
1253
1300
|
let c = r === 0, l = n("cell-stack--item min-w-0 max-w-full truncate", !c && "text-xs", i, c ? a : o);
|
|
1254
|
-
return
|
|
1301
|
+
return De(e) ? /* @__PURE__ */ B("div", {
|
|
1255
1302
|
className: l,
|
|
1256
1303
|
children: e
|
|
1257
|
-
}, r) : /* @__PURE__ */
|
|
1304
|
+
}, r) : /* @__PURE__ */ B("div", {
|
|
1258
1305
|
className: l,
|
|
1259
|
-
children:
|
|
1306
|
+
children: It({
|
|
1260
1307
|
descriptor: e,
|
|
1261
1308
|
index: r,
|
|
1262
1309
|
emptyLabel: t,
|
|
@@ -1267,39 +1314,39 @@ function jt({ values: e = [], emptyLabel: t = "--", className: r, itemClassName:
|
|
|
1267
1314
|
})
|
|
1268
1315
|
});
|
|
1269
1316
|
}
|
|
1270
|
-
|
|
1317
|
+
Lt.displayName = "CellValue", Rt.displayName = "CellStack";
|
|
1271
1318
|
//#endregion
|
|
1272
1319
|
//#region src/components/features/table/partials/table-link.tsx
|
|
1273
|
-
var
|
|
1320
|
+
var zt = ({ className: e, ...t }) => /* @__PURE__ */ B(w, {
|
|
1274
1321
|
className: n("table-link--component", "underline decoration-link-color/35 decoration-dotted underline-offset-2 hover:decoration-link-color", e),
|
|
1275
1322
|
...t,
|
|
1276
1323
|
children: t.children
|
|
1277
1324
|
});
|
|
1278
1325
|
//#endregion
|
|
1279
1326
|
//#region src/components/features/table/partials/resource-cell.tsx
|
|
1280
|
-
function
|
|
1327
|
+
function Bt(e, t) {
|
|
1281
1328
|
if (e && typeof e == "object" && !("type" in e) && "label" in e) {
|
|
1282
1329
|
let n = e.icon;
|
|
1283
|
-
return /* @__PURE__ */
|
|
1330
|
+
return /* @__PURE__ */ V(ce, {
|
|
1284
1331
|
tone: e.tone ?? "secondary",
|
|
1285
1332
|
dot: e.dot,
|
|
1286
|
-
children: [!!n && /* @__PURE__ */
|
|
1333
|
+
children: [!!n && /* @__PURE__ */ B(n, { className: "size-icon-sm" }), e.label]
|
|
1287
1334
|
}, e.id ?? t);
|
|
1288
1335
|
}
|
|
1289
|
-
return /* @__PURE__ */
|
|
1336
|
+
return /* @__PURE__ */ B("span", { children: e }, t);
|
|
1290
1337
|
}
|
|
1291
|
-
function
|
|
1292
|
-
return e ? Array.isArray(e) ? /* @__PURE__ */
|
|
1338
|
+
function Vt(e) {
|
|
1339
|
+
return e ? Array.isArray(e) ? /* @__PURE__ */ B("span", {
|
|
1293
1340
|
className: "inline-flex min-w-0 flex-wrap items-center gap-x-space-md gap-y-space-2xs",
|
|
1294
|
-
children: e.map((e, t) => /* @__PURE__ */
|
|
1341
|
+
children: e.map((e, t) => /* @__PURE__ */ V("span", {
|
|
1295
1342
|
className: "inline-flex min-w-0 items-center gap-space-sm",
|
|
1296
|
-
children: [!!e.label && /* @__PURE__ */
|
|
1343
|
+
children: [!!e.label && /* @__PURE__ */ B(i, {
|
|
1297
1344
|
tag: "span",
|
|
1298
1345
|
size: "inherit",
|
|
1299
1346
|
type: "secondary",
|
|
1300
1347
|
className: "shrink-0",
|
|
1301
1348
|
children: e.label
|
|
1302
|
-
}), /* @__PURE__ */
|
|
1349
|
+
}), /* @__PURE__ */ B(i, {
|
|
1303
1350
|
tag: "span",
|
|
1304
1351
|
size: "inherit",
|
|
1305
1352
|
type: "secondary",
|
|
@@ -1309,122 +1356,129 @@ function Pt(e) {
|
|
|
1309
1356
|
}, e.id ?? t))
|
|
1310
1357
|
}) : e : null;
|
|
1311
1358
|
}
|
|
1312
|
-
function
|
|
1313
|
-
if (!e) return /* @__PURE__ */
|
|
1359
|
+
function Ht({ title: e, subtitle: t, metadata: r, badges: a = [], imageUrl: l, icon: u, fallback: d, href: f, renderLink: p, emptyLabel: m = "—", className: h, mediaShape: g = "circle", mediaClassName: _, contentClassName: v, titleClassName: y, subtitleClassName: b }) {
|
|
1360
|
+
if (!e) return /* @__PURE__ */ B(i, {
|
|
1314
1361
|
size: "inherit",
|
|
1315
1362
|
type: "secondary",
|
|
1316
1363
|
className: h,
|
|
1317
1364
|
children: m
|
|
1318
1365
|
});
|
|
1319
|
-
let
|
|
1320
|
-
render: /* @__PURE__ */
|
|
1366
|
+
let x = typeof e == "string" ? e : void 0, S = x ? ee(x, { strategy: "first-words" }) : "", C = /* @__PURE__ */ V(c, {
|
|
1367
|
+
render: /* @__PURE__ */ B("span", {}),
|
|
1321
1368
|
gap: "dense",
|
|
1322
|
-
className: n("resource-cell--content",
|
|
1369
|
+
className: n("resource-cell--content", v),
|
|
1323
1370
|
children: [
|
|
1324
|
-
/* @__PURE__ */
|
|
1325
|
-
render: /* @__PURE__ */
|
|
1371
|
+
/* @__PURE__ */ V(c, {
|
|
1372
|
+
render: /* @__PURE__ */ B("span", {}),
|
|
1326
1373
|
direction: "horizontal",
|
|
1327
1374
|
gap: "sm",
|
|
1328
1375
|
wrap: !1,
|
|
1329
1376
|
className: "resource-cell--title-row",
|
|
1330
|
-
children: [/* @__PURE__ */
|
|
1377
|
+
children: [/* @__PURE__ */ B(i, {
|
|
1331
1378
|
type: "inherit",
|
|
1332
1379
|
tag: "span",
|
|
1333
1380
|
size: "inherit",
|
|
1334
1381
|
weight: "medium",
|
|
1335
|
-
|
|
1382
|
+
title: x,
|
|
1383
|
+
className: n("resource-cell--title truncate", y),
|
|
1336
1384
|
children: e
|
|
1337
|
-
}), a.length > 0 && /* @__PURE__ */
|
|
1385
|
+
}), a.length > 0 && /* @__PURE__ */ B("span", {
|
|
1338
1386
|
className: "resource-cell--badges inline-flex shrink-0 items-center gap-space-sm",
|
|
1339
|
-
children: a.map(
|
|
1387
|
+
children: a.map(Bt)
|
|
1340
1388
|
})]
|
|
1341
1389
|
}),
|
|
1342
|
-
!!t && /* @__PURE__ */
|
|
1390
|
+
!!t && /* @__PURE__ */ B(i, {
|
|
1343
1391
|
tag: "span",
|
|
1344
1392
|
size: "inherit",
|
|
1345
1393
|
type: "secondary",
|
|
1346
|
-
className: n("resource-cell--subtitle truncate",
|
|
1394
|
+
className: n("resource-cell--subtitle truncate", b),
|
|
1347
1395
|
children: t
|
|
1348
1396
|
}),
|
|
1349
|
-
!!r && /* @__PURE__ */
|
|
1397
|
+
!!r && /* @__PURE__ */ B("span", {
|
|
1350
1398
|
className: "resource-cell--metadata min-w-0",
|
|
1351
|
-
children:
|
|
1399
|
+
children: Vt(r)
|
|
1352
1400
|
})
|
|
1353
1401
|
]
|
|
1354
|
-
}),
|
|
1402
|
+
}), w = d != null && d !== !1 && d !== "", E = !!l || !!u || w, D = g === "square", O = /* @__PURE__ */ V("span", {
|
|
1355
1403
|
className: n("resource-cell--component inline-flex min-w-0 items-center gap-space-md", h),
|
|
1356
|
-
children: [/* @__PURE__ */
|
|
1404
|
+
children: [E && /* @__PURE__ */ V(oe, {
|
|
1357
1405
|
size: "md",
|
|
1358
|
-
|
|
1359
|
-
|
|
1406
|
+
"data-shape": g,
|
|
1407
|
+
className: n("resource-cell--media", D && "rounded-radius after:rounded-radius", _),
|
|
1408
|
+
children: [!!l && /* @__PURE__ */ B(se, {
|
|
1360
1409
|
src: l,
|
|
1361
|
-
alt:
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1410
|
+
alt: x ?? "",
|
|
1411
|
+
className: n(D && "rounded-radius")
|
|
1412
|
+
}), /* @__PURE__ */ B(ae, {
|
|
1413
|
+
className: n(D && "rounded-radius"),
|
|
1414
|
+
children: w ? d : u ? /* @__PURE__ */ B(u, { className: "size-icon" }) : S ? /* @__PURE__ */ B(T, {
|
|
1415
|
+
value: x,
|
|
1416
|
+
strategy: "first-words"
|
|
1417
|
+
}) : null
|
|
1418
|
+
})]
|
|
1419
|
+
}), C]
|
|
1367
1420
|
});
|
|
1368
|
-
if (!f) return
|
|
1369
|
-
let
|
|
1421
|
+
if (!f) return O;
|
|
1422
|
+
let k = `resource-cell--link inline-flex min-w-0 rounded-radius outline-none ${s.text}`;
|
|
1370
1423
|
return p ? p({
|
|
1371
1424
|
href: f,
|
|
1372
|
-
children:
|
|
1373
|
-
className:
|
|
1374
|
-
"aria-label":
|
|
1375
|
-
}) : /* @__PURE__ */
|
|
1425
|
+
children: O,
|
|
1426
|
+
className: k,
|
|
1427
|
+
"aria-label": x
|
|
1428
|
+
}) : /* @__PURE__ */ B(o, {
|
|
1376
1429
|
href: f,
|
|
1377
1430
|
size: "inherit",
|
|
1378
1431
|
underline: !1,
|
|
1379
|
-
className:
|
|
1380
|
-
"aria-label":
|
|
1381
|
-
children:
|
|
1432
|
+
className: k,
|
|
1433
|
+
"aria-label": x,
|
|
1434
|
+
children: O
|
|
1382
1435
|
});
|
|
1383
1436
|
}
|
|
1384
|
-
|
|
1437
|
+
Ht.displayName = "ResourceCell";
|
|
1385
1438
|
//#endregion
|
|
1386
1439
|
//#region src/components/features/table/partials/cell-renderers.tsx
|
|
1387
|
-
function
|
|
1388
|
-
if (!e || !(e in t)) return /* @__PURE__ */
|
|
1440
|
+
function Ut({ value: e, map: t, emptyLabel: r = "—", className: a }) {
|
|
1441
|
+
if (!e || !(e in t)) return /* @__PURE__ */ B(i, {
|
|
1389
1442
|
size: "inherit",
|
|
1390
1443
|
type: "secondary",
|
|
1391
1444
|
className: n("status-cell--component", a),
|
|
1392
1445
|
children: r
|
|
1393
1446
|
});
|
|
1394
1447
|
let o = t[e], s = o.icon;
|
|
1395
|
-
return /* @__PURE__ */
|
|
1448
|
+
return /* @__PURE__ */ V(ce, {
|
|
1396
1449
|
tone: o.tone ?? "secondary",
|
|
1450
|
+
dot: o.dot,
|
|
1397
1451
|
className: n("status-cell--component gap-space-sm", a),
|
|
1398
|
-
children: [!!s && /* @__PURE__ */
|
|
1452
|
+
children: [!!s && /* @__PURE__ */ B(s, { className: "size-icon-sm" }), o.label]
|
|
1399
1453
|
});
|
|
1400
1454
|
}
|
|
1401
|
-
|
|
1402
|
-
function
|
|
1455
|
+
Ut.displayName = "StatusCell";
|
|
1456
|
+
function Wt({ items: e = [], emptyLabel: t = "—", className: r, badgeClassName: a }) {
|
|
1403
1457
|
let o = e.filter((e) => !e.hidden);
|
|
1404
|
-
return o.length === 0 ? /* @__PURE__ */
|
|
1458
|
+
return o.length === 0 ? /* @__PURE__ */ B(i, {
|
|
1405
1459
|
size: "inherit",
|
|
1406
1460
|
type: "secondary",
|
|
1407
1461
|
className: n("status-cluster-cell--component", r),
|
|
1408
1462
|
children: t
|
|
1409
|
-
}) : /* @__PURE__ */
|
|
1463
|
+
}) : /* @__PURE__ */ B("span", {
|
|
1410
1464
|
className: n("status-cluster-cell--component inline-flex min-w-0 flex-wrap items-center gap-space-sm", r),
|
|
1411
1465
|
children: o.map((e, t) => {
|
|
1412
1466
|
let r = e.icon;
|
|
1413
|
-
return /* @__PURE__ */
|
|
1467
|
+
return /* @__PURE__ */ V(ce, {
|
|
1414
1468
|
tone: e.tone ?? "secondary",
|
|
1415
1469
|
dot: e.dot,
|
|
1416
1470
|
className: n("shrink-0", a),
|
|
1417
|
-
children: [!!r && /* @__PURE__ */
|
|
1471
|
+
children: [!!r && /* @__PURE__ */ B(r, { className: "size-icon-sm" }), e.label]
|
|
1418
1472
|
}, e.id ?? t);
|
|
1419
1473
|
})
|
|
1420
1474
|
});
|
|
1421
1475
|
}
|
|
1422
|
-
|
|
1423
|
-
function
|
|
1424
|
-
let u =
|
|
1425
|
-
return u ? /* @__PURE__ */
|
|
1476
|
+
Wt.displayName = "StatusClusterCell";
|
|
1477
|
+
function Gt({ value: e, format: t, preset: r, locale: a, showIcon: o = !1, icon: s = Me, emptyLabel: c = "—", className: l }) {
|
|
1478
|
+
let u = re(e);
|
|
1479
|
+
return u ? /* @__PURE__ */ V("span", {
|
|
1426
1480
|
className: n("date-cell--component inline-flex items-center gap-space-sm", l),
|
|
1427
|
-
children: [!!o && /* @__PURE__ */
|
|
1481
|
+
children: [!!o && /* @__PURE__ */ B(s, { className: "size-icon text-muted-foreground" }), /* @__PURE__ */ B(ie, {
|
|
1428
1482
|
value: u,
|
|
1429
1483
|
format: t,
|
|
1430
1484
|
preset: r,
|
|
@@ -1433,28 +1487,28 @@ function Rt({ value: e, format: t, preset: r, locale: a, showIcon: o = !1, icon:
|
|
|
1433
1487
|
size: "inherit",
|
|
1434
1488
|
type: "secondary"
|
|
1435
1489
|
})]
|
|
1436
|
-
}) : /* @__PURE__ */
|
|
1490
|
+
}) : /* @__PURE__ */ B(i, {
|
|
1437
1491
|
size: "inherit",
|
|
1438
1492
|
type: "secondary",
|
|
1439
1493
|
className: n("date-cell--component", l),
|
|
1440
1494
|
children: c
|
|
1441
1495
|
});
|
|
1442
1496
|
}
|
|
1443
|
-
|
|
1444
|
-
function
|
|
1445
|
-
let p =
|
|
1446
|
-
if (!p) return /* @__PURE__ */
|
|
1497
|
+
Gt.displayName = "DateCell";
|
|
1498
|
+
function Kt({ value: e, format: t, preset: r, locale: a, showIcon: o = !1, icon: s = Me, emptyLabel: c = "—", className: l, primaryClassName: u, secondary: d, secondaryClassName: f }) {
|
|
1499
|
+
let p = re(e);
|
|
1500
|
+
if (!p) return /* @__PURE__ */ B(i, {
|
|
1447
1501
|
size: "inherit",
|
|
1448
1502
|
type: "secondary",
|
|
1449
1503
|
className: n("date-meta-cell--component", l),
|
|
1450
1504
|
children: c
|
|
1451
1505
|
});
|
|
1452
1506
|
let m = typeof d == "function" ? d(p) : d;
|
|
1453
|
-
return /* @__PURE__ */
|
|
1507
|
+
return /* @__PURE__ */ V("span", {
|
|
1454
1508
|
className: n("date-meta-cell--component inline-flex min-w-0 items-start gap-space-sm", l),
|
|
1455
|
-
children: [!!o && /* @__PURE__ */
|
|
1509
|
+
children: [!!o && /* @__PURE__ */ B(s, { className: "mt-space-2xs size-icon shrink-0 text-muted-foreground" }), /* @__PURE__ */ V("span", {
|
|
1456
1510
|
className: "grid min-w-0 gap-space-2xs",
|
|
1457
|
-
children: [/* @__PURE__ */
|
|
1511
|
+
children: [/* @__PURE__ */ B(ie, {
|
|
1458
1512
|
value: p,
|
|
1459
1513
|
format: t,
|
|
1460
1514
|
preset: r,
|
|
@@ -1463,7 +1517,7 @@ function zt({ value: e, format: t, preset: r, locale: a, showIcon: o = !1, icon:
|
|
|
1463
1517
|
size: "inherit",
|
|
1464
1518
|
type: "secondary",
|
|
1465
1519
|
className: n("truncate tabular-nums", u)
|
|
1466
|
-
}), !!m && /* @__PURE__ */
|
|
1520
|
+
}), !!m && /* @__PURE__ */ B(i, {
|
|
1467
1521
|
tag: "span",
|
|
1468
1522
|
size: "inherit",
|
|
1469
1523
|
type: "secondary",
|
|
@@ -1473,9 +1527,9 @@ function zt({ value: e, format: t, preset: r, locale: a, showIcon: o = !1, icon:
|
|
|
1473
1527
|
})]
|
|
1474
1528
|
});
|
|
1475
1529
|
}
|
|
1476
|
-
|
|
1477
|
-
function
|
|
1478
|
-
return /* @__PURE__ */
|
|
1530
|
+
Kt.displayName = "DateMetaCell";
|
|
1531
|
+
function qt({ value: e, currency: t, locale: r, emptyLabel: i = "—", className: a, weight: o = "semibold" }) {
|
|
1532
|
+
return /* @__PURE__ */ B(D, {
|
|
1479
1533
|
type: "inherit",
|
|
1480
1534
|
amount: e,
|
|
1481
1535
|
currency: t,
|
|
@@ -1487,34 +1541,34 @@ function Bt({ value: e, currency: t, locale: r, emptyLabel: i = "—", className
|
|
|
1487
1541
|
className: n("currency-cell--component tabular-nums", a)
|
|
1488
1542
|
});
|
|
1489
1543
|
}
|
|
1490
|
-
|
|
1491
|
-
function
|
|
1492
|
-
return !e || e.trim().length === 0 ? /* @__PURE__ */
|
|
1544
|
+
qt.displayName = "CurrencyCell";
|
|
1545
|
+
function Jt({ name: e, imageUrl: t, icon: r = Fe, subtitle: a, emptyLabel: o = "—", className: s }) {
|
|
1546
|
+
return !e || e.trim().length === 0 ? /* @__PURE__ */ B(i, {
|
|
1493
1547
|
size: "inherit",
|
|
1494
1548
|
type: "secondary",
|
|
1495
1549
|
className: n("avatar-cell--component", s),
|
|
1496
1550
|
children: o
|
|
1497
|
-
}) : /* @__PURE__ */
|
|
1551
|
+
}) : /* @__PURE__ */ V("span", {
|
|
1498
1552
|
className: n("avatar-cell--component inline-flex items-center gap-space-md", s),
|
|
1499
|
-
children: [/* @__PURE__ */
|
|
1553
|
+
children: [/* @__PURE__ */ V(oe, {
|
|
1500
1554
|
size: "sm",
|
|
1501
1555
|
className: "avatar-cell--avatar",
|
|
1502
|
-
children: [!!t && /* @__PURE__ */
|
|
1556
|
+
children: [!!t && /* @__PURE__ */ B(se, {
|
|
1503
1557
|
src: t,
|
|
1504
1558
|
alt: e
|
|
1505
|
-
}), /* @__PURE__ */
|
|
1559
|
+
}), /* @__PURE__ */ B(ae, { children: ee(e, { strategy: "first-words" }) ? /* @__PURE__ */ B(T, {
|
|
1506
1560
|
value: e,
|
|
1507
1561
|
strategy: "first-words"
|
|
1508
|
-
}) : /* @__PURE__ */
|
|
1509
|
-
}), /* @__PURE__ */
|
|
1562
|
+
}) : /* @__PURE__ */ B(r, { className: "size-icon" }) })]
|
|
1563
|
+
}), /* @__PURE__ */ V("span", {
|
|
1510
1564
|
className: "min-w-0 inline-flex flex-col",
|
|
1511
|
-
children: [/* @__PURE__ */
|
|
1565
|
+
children: [/* @__PURE__ */ B(i, {
|
|
1512
1566
|
type: "inherit",
|
|
1513
1567
|
size: "inherit",
|
|
1514
1568
|
weight: "medium",
|
|
1515
1569
|
className: "truncate",
|
|
1516
1570
|
children: e
|
|
1517
|
-
}), !!a && /* @__PURE__ */
|
|
1571
|
+
}), !!a && /* @__PURE__ */ B(i, {
|
|
1518
1572
|
size: "inherit",
|
|
1519
1573
|
type: "secondary",
|
|
1520
1574
|
className: "truncate",
|
|
@@ -1523,8 +1577,8 @@ function Vt({ name: e, imageUrl: t, icon: r = Re, subtitle: a, emptyLabel: o = "
|
|
|
1523
1577
|
})]
|
|
1524
1578
|
});
|
|
1525
1579
|
}
|
|
1526
|
-
|
|
1580
|
+
Jt.displayName = "AvatarCell";
|
|
1527
1581
|
//#endregion
|
|
1528
|
-
export {
|
|
1582
|
+
export { K as A, it as C, nt as D, tt as E, Ge as M, Ke as N, et as O, at as S, rt as T, dt as _, Ut as a, Y as b, zt as c, kt as d, Ot as f, Q as g, pt as h, Kt as i, Xe as j, $e as k, Rt as l, vt as m, qt as n, Wt as o, bt as p, Gt as r, Ht as s, Jt as t, Lt as u, ut as v, ot as w, st as x, lt as y };
|
|
1529
1583
|
|
|
1530
|
-
//# sourceMappingURL=table-
|
|
1584
|
+
//# sourceMappingURL=table-CBonSdTp.js.map
|