themelia-react-ui 2.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +527 -0
- package/README.md +47 -14
- package/THIRD_PARTY_NOTICES.md +13 -0
- package/dist/accordion-Cjb6sx0G.js +208 -0
- package/dist/accordion-Cjb6sx0G.js.map +1 -0
- package/dist/action-menu-CllU52Mm.js +280 -0
- package/dist/action-menu-CllU52Mm.js.map +1 -0
- package/dist/affordance-geometry.generated-tF36bREk.js +140 -0
- package/dist/affordance-geometry.generated-tF36bREk.js.map +1 -0
- package/dist/ai-artifact-DvTwDVyL.js +1148 -0
- package/dist/ai-artifact-DvTwDVyL.js.map +1 -0
- package/dist/{app-shell-BE_j8-AT.js → app-shell-C4FhvCqF.js} +5 -5
- package/dist/{app-shell-BE_j8-AT.js.map → app-shell-C4FhvCqF.js.map} +1 -1
- package/dist/attachment-BxDfL2mw.js +246 -0
- package/dist/attachment-BxDfL2mw.js.map +1 -0
- package/dist/{auth-M3vGMgDR.js → auth-ax2BqjrI.js} +241 -235
- package/dist/auth-ax2BqjrI.js.map +1 -0
- package/dist/{avatar-djdaaQ_s.js → avatar-DAPlDvhJ.js} +67 -66
- package/dist/avatar-DAPlDvhJ.js.map +1 -0
- package/dist/badge-HpFqoqSY.js +93 -0
- package/dist/badge-HpFqoqSY.js.map +1 -0
- package/dist/base/accordion.js +1 -1
- package/dist/base/action-menu.js +1 -1
- package/dist/base/attachment.js +1 -1
- package/dist/base/avatar.js +1 -1
- package/dist/base/badge.js +1 -1
- package/dist/base/batch-action-bar.js +3 -0
- package/dist/base/buttons.js +2 -3
- package/dist/base/cards.js +2 -2
- package/dist/base/carousel.js +50 -46
- package/dist/base/carousel.js.map +1 -1
- package/dist/base/cascader.js +69 -81
- package/dist/base/cascader.js.map +1 -1
- package/dist/base/chart.js +1 -1
- package/dist/base/choice-inputs.js +3 -3
- 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 +7 -7
- package/dist/base/feedback.js +3 -3
- package/dist/base/forms-numeric.js +1 -1
- package/dist/base/forms.js +2 -2
- package/dist/base/inline-edit.js +20 -20
- package/dist/base/inline-edit.js.map +1 -1
- package/dist/base/item.js +1 -1
- package/dist/base/media-gallery.js +1 -1
- package/dist/base/metadata-list.js +3 -0
- 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 +216 -220
- package/dist/base/repeaters.js.map +1 -1
- package/dist/base/sheet.js +1 -1
- package/dist/base/sidebar.js +1 -1
- package/dist/base/signature-pad.js +147 -137
- package/dist/base/signature-pad.js.map +1 -1
- package/dist/base/skeleton.js +1 -1
- package/dist/base/spinner.js +79 -2
- package/dist/base/spinner.js.map +1 -0
- package/dist/base/structure.js +1 -1
- package/dist/base/table.js +1 -1
- package/dist/base/text-inputs.js +2 -2
- package/dist/base/toaster.js +46 -45
- package/dist/base/toaster.js.map +1 -1
- package/dist/base/tree.js +1 -1
- package/dist/base/upload-queue.js +1 -1
- package/dist/base/upload.js +3 -3
- package/dist/base/value-inputs.js +2 -2
- package/dist/batch-action-bar-DnUJ21NQ.js +105 -0
- package/dist/batch-action-bar-DnUJ21NQ.js.map +1 -0
- package/dist/blocks/admin.js +171 -169
- package/dist/blocks/admin.js.map +1 -1
- package/dist/blocks/ai.js +308 -285
- package/dist/blocks/ai.js.map +1 -1
- package/dist/blocks/analytics/usage-card.js +1 -1
- package/dist/blocks/analytics.js +626 -589
- 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 +2051 -1329
- package/dist/blocks/commerce.js.map +1 -1
- package/dist/blocks/data-display.js +3 -2
- package/dist/blocks/onboarding.js +68 -58
- package/dist/blocks/onboarding.js.map +1 -1
- package/dist/blocks/planning.js +27 -26
- package/dist/blocks/planning.js.map +1 -1
- package/dist/blocks/timelines.js +1 -1
- package/dist/breadcrumbs-C-oqs1sQ.js +129 -0
- package/dist/breadcrumbs-C-oqs1sQ.js.map +1 -0
- package/dist/{button-R9CCoH7A.js → button-DVzspB_G.js} +15 -14
- package/dist/button-DVzspB_G.js.map +1 -0
- package/dist/{button-BS3KDg00.js → buttons-DPZekJFu.js} +208 -216
- package/dist/buttons-DPZekJFu.js.map +1 -0
- package/dist/cards-BaBZR-AU.js +68 -0
- package/dist/cards-BaBZR-AU.js.map +1 -0
- package/dist/{chart-DwYRKKc-.js → chart-ZOYyK2xG.js} +58 -55
- package/dist/chart-ZOYyK2xG.js.map +1 -0
- package/dist/checkbox-AWIhNhmo.js +36 -0
- package/dist/checkbox-AWIhNhmo.js.map +1 -0
- package/dist/choice-inputs-CNHvARCJ.js +770 -0
- package/dist/choice-inputs-CNHvARCJ.js.map +1 -0
- package/dist/code-block-DeneBJR_.js +185 -0
- package/dist/code-block-DeneBJR_.js.map +1 -0
- package/dist/{collapsible-oMUGM4tr.js → collapsible-C-_l4hpy.js} +4 -4
- package/dist/{collapsible-oMUGM4tr.js.map → collapsible-C-_l4hpy.js.map} +1 -1
- package/dist/{collection-content-Ys-OZOkY.js → collection-content-By56pLog.js} +3 -3
- package/dist/{collection-content-Ys-OZOkY.js.map → collection-content-By56pLog.js.map} +1 -1
- package/dist/combobox-C0EQW6dr.js +875 -0
- package/dist/combobox-C0EQW6dr.js.map +1 -0
- package/dist/combobox-xCQ2RMNE.js +309 -0
- package/dist/combobox-xCQ2RMNE.js.map +1 -0
- package/dist/{command-kPMPjIxJ.js → command-C25VMRII.js} +7 -7
- package/dist/{command-kPMPjIxJ.js.map → command-C25VMRII.js.map} +1 -1
- package/dist/{comments-You0Bzbr.js → comments-BYYlTA8E.js} +390 -379
- package/dist/comments-BYYlTA8E.js.map +1 -0
- package/dist/components/base/action-menu/action-menu.d.ts +21 -4
- package/dist/components/base/action-menu/action-menu.recipes.d.ts +21 -0
- package/dist/components/base/action-menu/index.d.ts +1 -0
- package/dist/components/base/badge/badge.recipes.d.ts +5 -5
- package/dist/components/base/batch-action-bar/batch-action-bar.d.ts +50 -0
- package/dist/components/base/batch-action-bar/batch-action-bar.strings.d.ts +20 -0
- package/dist/components/base/batch-action-bar/index.d.ts +8 -0
- package/dist/components/base/buttons/button-group.recipes.d.ts +1 -1
- package/dist/components/base/buttons/button.recipes.d.ts +2 -2
- package/dist/components/base/buttons/loader-button.d.ts +2 -1
- package/dist/components/base/cards/card.recipes.d.ts +2 -3
- package/dist/components/base/cards/partials/smart-card-skeleton.d.ts +3 -13
- package/dist/components/base/cards/smart-card.types.d.ts +11 -4
- package/dist/components/base/chart/chart.d.ts +2 -5
- package/dist/components/base/choice-inputs/checkbox.d.ts +2 -2
- package/dist/components/base/choice-inputs/choice-types.d.ts +18 -6
- package/dist/components/base/combobox/combobox.strings.d.ts +7 -0
- package/dist/components/base/combobox/index.d.ts +30 -4
- package/dist/components/base/display/alert-dialog.d.ts +6 -5
- package/dist/components/base/display/dialog.d.ts +4 -8
- package/dist/components/base/display/icon-badge/icon-badge.d.ts +1 -1
- package/dist/components/base/forms/form-sizing.d.ts +26 -15
- package/dist/components/base/metadata-list/index.d.ts +12 -0
- package/dist/components/{blocks/data-display/metadata → base/metadata-list}/metadata-list.d.ts +28 -25
- package/dist/components/{blocks/data-display/metadata → base/metadata-list}/metadata-value.d.ts +2 -2
- package/dist/components/base/navigation/index.d.ts +1 -1
- package/dist/components/base/navigation/page-header/index.d.ts +1 -0
- package/dist/components/base/navigation/page-header/page-header-commands.d.ts +73 -0
- package/dist/components/base/navigation/page-header/page-header.d.ts +26 -3
- package/dist/components/base/navigation/pagination.d.ts +5 -2
- package/dist/components/base/popover/popover.recipes.d.ts +15 -1
- package/dist/components/base/sheet/sheet.d.ts +4 -8
- package/dist/components/base/signature-pad/signature-pad.types.d.ts +5 -1
- package/dist/components/base/signature-pad/signature-pad.utils.d.ts +11 -3
- package/dist/components/base/table/index.d.ts +9 -2
- package/dist/components/base/text-inputs/field-clear-button.d.ts +6 -0
- package/dist/components/base/text-inputs/input-group.d.ts +2 -2
- package/dist/components/base/upload/upload.recipes.d.ts +25 -3
- package/dist/components/base/value-inputs/index.d.ts +5 -5
- package/dist/components/base/value-inputs/tags-input.d.ts +36 -12
- package/dist/components/blocks/ai/ai-shimmer/ai-shimmer.d.ts +1 -1
- package/dist/components/blocks/ai/ai-shimmer/types.d.ts +3 -0
- package/dist/components/blocks/commerce/address-card/address-card.d.ts +1 -1
- package/dist/components/blocks/commerce/address-card/types.d.ts +2 -1
- package/dist/components/blocks/commerce/cart-summary/cart-summary.d.ts +3 -1
- package/dist/components/blocks/commerce/cart-summary/index.d.ts +2 -2
- package/dist/components/blocks/commerce/cart-summary/types.d.ts +6 -1
- package/dist/components/blocks/commerce/discount-stack/discount-stack.d.ts +3 -1
- package/dist/components/blocks/commerce/discount-stack/index.d.ts +2 -2
- package/dist/components/blocks/commerce/discount-stack/types.d.ts +16 -4
- package/dist/components/blocks/commerce/fulfillment-group/fulfillment-group.d.ts +5 -0
- package/dist/components/blocks/commerce/fulfillment-group/index.d.ts +2 -0
- package/dist/components/blocks/commerce/fulfillment-group/types.d.ts +45 -0
- package/dist/components/blocks/commerce/index.d.ts +13 -5
- package/dist/components/blocks/commerce/invoice-header/invoice-header.d.ts +1 -1
- package/dist/components/blocks/commerce/invoice-header/types.d.ts +4 -2
- package/dist/components/blocks/commerce/invoice-mini/invoice-mini.d.ts +1 -1
- package/dist/components/blocks/commerce/invoice-mini/types.d.ts +2 -1
- package/dist/components/blocks/commerce/order-customer/index.d.ts +2 -0
- package/dist/components/blocks/commerce/order-customer/order-customer.d.ts +5 -0
- package/dist/components/blocks/commerce/order-customer/types.d.ts +48 -0
- package/dist/components/blocks/commerce/order-header/index.d.ts +2 -0
- package/dist/components/blocks/commerce/order-header/order-header.d.ts +5 -0
- package/dist/components/blocks/commerce/order-header/types.d.ts +37 -0
- package/dist/components/blocks/commerce/order-line-item/index.d.ts +2 -0
- package/dist/components/blocks/commerce/order-line-item/order-line-item.d.ts +5 -0
- package/dist/components/blocks/commerce/order-line-item/types.d.ts +46 -0
- package/dist/components/blocks/commerce/order-summary/index.d.ts +2 -0
- package/dist/components/blocks/commerce/order-summary/order-summary.d.ts +5 -0
- package/dist/components/blocks/commerce/order-summary/types.d.ts +42 -0
- package/dist/components/blocks/commerce/order-transactions/index.d.ts +2 -0
- package/dist/components/blocks/commerce/order-transactions/order-transactions.d.ts +5 -0
- package/dist/components/blocks/commerce/order-transactions/types.d.ts +46 -0
- package/dist/components/blocks/commerce/payment-method/index.d.ts +2 -2
- package/dist/components/blocks/commerce/payment-method/payment-method.d.ts +9 -1
- package/dist/components/blocks/commerce/payment-method/types.d.ts +12 -1
- package/dist/components/blocks/commerce/refund-status/index.d.ts +2 -2
- package/dist/components/blocks/commerce/refund-status/refund-status.d.ts +3 -1
- package/dist/components/blocks/commerce/refund-status/types.d.ts +6 -3
- package/dist/components/blocks/commerce/shared/address-lines.d.ts +21 -0
- package/dist/components/blocks/commerce/shared/line-thumbnail.d.ts +9 -0
- package/dist/components/blocks/commerce/shared/order-status.d.ts +51 -0
- package/dist/components/blocks/commerce/shipment-tracking/shipment-tracking.d.ts +1 -1
- package/dist/components/blocks/commerce/shipment-tracking/types.d.ts +27 -6
- package/dist/components/blocks/commerce/summary-panel/amount-row.d.ts +2 -0
- package/dist/components/blocks/commerce/summary-panel/index.d.ts +3 -0
- package/dist/components/blocks/commerce/summary-panel/summary-panel.d.ts +2 -0
- package/dist/components/blocks/commerce/summary-panel/types.d.ts +26 -0
- package/dist/components/blocks/commerce/tax-breakdown/tax-breakdown.d.ts +1 -1
- package/dist/components/blocks/commerce/tax-breakdown/types.d.ts +2 -1
- package/dist/components/blocks/data-display/inline-stat/inline-stat.d.ts +16 -8
- package/dist/components/blocks/data-display/metadata/index.d.ts +30 -4
- package/dist/components/features/activities/partials/activity-marker.d.ts +6 -3
- package/dist/components/features/activities/partials/activity-row.d.ts +6 -2
- package/dist/components/features/activities/partials/tone-tokens.d.ts +0 -6
- package/dist/components/features/appointment-calendar/appointment-calendar.d.ts +5 -0
- package/dist/components/features/appointment-calendar/appointment-calendar.types.d.ts +220 -0
- package/dist/components/features/appointment-calendar/appointment-calendar.utils.d.ts +41 -0
- package/dist/components/features/appointment-calendar/index.d.ts +3 -0
- package/dist/components/features/appointment-calendar/partials/appointment-agenda.d.ts +32 -0
- package/dist/components/features/appointment-calendar/partials/appointment-month.d.ts +13 -0
- package/dist/components/features/combobox/combobox.strings.d.ts +15 -1
- package/dist/components/features/combobox/types.d.ts +4 -0
- package/dist/components/features/global-search/partials/global-search-group-heading.d.ts +15 -0
- package/dist/components/features/global-search/partials/tone-palettes.d.ts +0 -5
- package/dist/components/features/kanban/kanban.d.ts +1 -1
- package/dist/components/features/kanban/kanban.strings.d.ts +1 -1
- package/dist/components/features/kanban/kanban.types.d.ts +2 -2
- package/dist/components/features/media-library/hooks/use-media-library.d.ts +1 -1
- package/dist/components/features/media-library/index.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 +6 -0
- package/dist/components/features/media-library/media-library.types.d.ts +74 -1
- package/dist/components/features/media-library/partials/media-library-partials.d.ts +3 -3
- package/dist/components/features/mentions/partials/mention-kind-toggles.d.ts +16 -0
- package/dist/components/features/overlays/alert-dialog.d.ts +1 -1
- package/dist/components/features/overlays/dialog.d.ts +1 -1
- package/dist/components/features/overlays/index.d.ts +1 -1
- package/dist/components/features/overlays/overlay-tone-icon.d.ts +3 -3
- package/dist/components/features/overlays/overlays.types.d.ts +20 -0
- package/dist/components/features/products/components/product-contract-overview.d.ts +5 -0
- package/dist/components/features/products/components/product-details-card.d.ts +5 -0
- package/dist/components/features/products/components/product-operations-card.d.ts +5 -0
- package/dist/components/features/products/components/product-option-action-menu.d.ts +5 -0
- package/dist/components/features/products/components/product-options-summary.d.ts +5 -0
- package/dist/components/features/products/components/product-policies-card.d.ts +5 -0
- package/dist/components/features/products/components/product-quote-preview-card.d.ts +5 -0
- package/dist/components/features/products/components/product-readiness-card.d.ts +5 -0
- package/dist/components/features/products/components/product-structure-card.d.ts +5 -0
- package/dist/components/features/products/components/product-variant-action-menu.d.ts +23 -1
- package/dist/components/features/products/products.types.d.ts +9 -2
- package/dist/components/features/resource/index.d.ts +1 -1
- package/dist/components/features/resource/resource.d.ts +1 -1
- package/dist/components/features/resource/resource.types.d.ts +34 -6
- package/dist/components/features/rich-text-editor/index.d.ts +2 -1
- package/dist/components/features/rich-text-editor/partials/image-nodes.d.ts +13 -0
- package/dist/components/features/rich-text-editor/partials/image-uploads.d.ts +66 -0
- package/dist/components/features/rich-text-editor/partials/inline-reference-node.d.ts +19 -0
- package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +7 -1
- package/dist/components/features/rich-text-editor/rich-text-editor.strings.d.ts +14 -0
- package/dist/components/features/rich-text-editor/rich-text-editor.types.d.ts +54 -1
- package/dist/components/features/rich-text-editor/use-rich-text-images.d.ts +18 -0
- package/dist/components/features/sync/index.d.ts +26 -3
- package/dist/components/features/table/data-table.d.ts +1 -1
- package/dist/components/features/table/table-header.d.ts +1 -1
- package/dist/components/features/table/table.strings.d.ts +55 -1
- package/dist/components/features/table/table.types.d.ts +49 -11
- package/dist/components/features/theme-tweaker/theme-tweaker.types.d.ts +5 -0
- package/dist/components/layout/page/index.d.ts +1 -1
- package/dist/components/layout/page/page.types.d.ts +33 -36
- package/dist/components/layout/page/partials/page-actions.d.ts +1 -0
- package/dist/components/layout/page/partials/page-header.d.ts +1 -1
- package/dist/components/layout/settings/settings.d.ts +16 -2
- package/dist/components/layout/workspace/workspace.types.d.ts +21 -4
- package/dist/components/primitives/number.d.ts +4 -2
- package/dist/components/primitives/value.d.ts +3 -1
- package/dist/components/typography/rich-text/index.d.ts +1 -1
- package/dist/components/typography/rich-text/rich-text-tree.d.ts +19 -0
- package/dist/components/typography/rich-text/rich-text.d.ts +16 -0
- package/dist/components/typography/text-link.d.ts +8 -3
- package/dist/components/ui/checkbox.d.ts +4 -3
- package/dist/components/ui/combobox.d.ts +6 -2
- package/dist/components/ui/item.d.ts +8 -8
- package/dist/components/ui/overlay.recipes.d.ts +0 -9
- package/dist/components/ui/switch.d.ts +2 -2
- package/dist/components/ui/tabs.d.ts +1 -1
- package/dist/{containers-D_L4mTVb.js → containers-Mu1LMGV1.js} +36 -35
- package/dist/containers-Mu1LMGV1.js.map +1 -0
- package/dist/{copyable-DDjTeW_j.js → copyable-ClBuk_UK.js} +6 -6
- package/dist/{copyable-DDjTeW_j.js.map → copyable-ClBuk_UK.js.map} +1 -1
- package/dist/data-display-DT_khPl_.js +971 -0
- package/dist/data-display-DT_khPl_.js.map +1 -0
- package/dist/{date-uf3z37Nm.js → date-DCrsDTZc.js} +5 -5
- package/dist/{date-uf3z37Nm.js.map → date-DCrsDTZc.js.map} +1 -1
- package/dist/date-picker-ay0Pha_a.js +1530 -0
- package/dist/date-picker-ay0Pha_a.js.map +1 -0
- package/dist/date-pickers-Ccw8DL2b.js +175 -0
- package/dist/date-pickers-Ccw8DL2b.js.map +1 -0
- package/dist/display-hAc1HjpI.js +344 -0
- package/dist/display-hAc1HjpI.js.map +1 -0
- package/dist/dropdown-menu-Cl4X7L5S.js +193 -0
- package/dist/dropdown-menu-Cl4X7L5S.js.map +1 -0
- package/dist/editable-text-recipe-Cn61kEcv.js +10 -0
- package/dist/editable-text-recipe-Cn61kEcv.js.map +1 -0
- package/dist/features/activities.js +478 -542
- package/dist/features/activities.js.map +1 -1
- package/dist/features/ai-chat.js +209 -199
- package/dist/features/ai-chat.js.map +1 -1
- package/dist/features/appointment-calendar.js +683 -0
- package/dist/features/appointment-calendar.js.map +1 -0
- package/dist/features/async-preview.js +109 -107
- package/dist/features/async-preview.js.map +1 -1
- package/dist/features/combobox.js +1 -1
- package/dist/features/comments.js +1 -1
- package/dist/features/data-view.js +30 -29
- package/dist/features/data-view.js.map +1 -1
- package/dist/features/email-composer/engine.js +1 -1
- package/dist/features/email-composer.js +285 -283
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +282 -273
- package/dist/features/event-calendar.js.map +1 -1
- package/dist/features/filters.js +1 -1
- package/dist/features/global-search.js +318 -318
- package/dist/features/global-search.js.map +1 -1
- package/dist/features/kanban.js +146 -147
- package/dist/features/kanban.js.map +1 -1
- package/dist/features/map.js +269 -268
- package/dist/features/map.js.map +1 -1
- package/dist/features/media-library.js +970 -863
- package/dist/features/media-library.js.map +1 -1
- package/dist/features/mentions.js +1 -1
- package/dist/features/overlays.js +1 -1
- package/dist/features/products.js +1137 -1124
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +206 -194
- package/dist/features/questionnaire.js.map +1 -1
- package/dist/features/resource-assignment.js +24 -21
- package/dist/features/resource-assignment.js.map +1 -1
- package/dist/features/resource.js +77 -69
- package/dist/features/resource.js.map +1 -1
- package/dist/features/rich-text-editor.js +30 -11
- package/dist/features/rich-text-editor.js.map +1 -1
- package/dist/features/schema-form.js +35 -33
- package/dist/features/schema-form.js.map +1 -1
- package/dist/features/suggestions.js +3 -3
- package/dist/features/sync.js +11 -5
- package/dist/features/sync.js.map +1 -1
- package/dist/features/table.js +1 -1
- package/dist/features/theme-tweaker.js +501 -496
- package/dist/features/theme-tweaker.js.map +1 -1
- package/dist/feedback-BYIhtitP.js +239 -0
- package/dist/feedback-BYIhtitP.js.map +1 -0
- package/dist/field-affordance-recipes-DZhnIL_Y.js +41 -0
- package/dist/field-affordance-recipes-DZhnIL_Y.js.map +1 -0
- package/dist/field-state-recipes-BVA2CWHo.js +12 -0
- package/dist/field-state-recipes-BVA2CWHo.js.map +1 -0
- package/dist/{filters-Da-gNPsE.js → filters-BGfvjP4d.js} +483 -472
- package/dist/filters-BGfvjP4d.js.map +1 -0
- package/dist/focus-recipes-B653VaLq.js +12 -0
- package/dist/focus-recipes-B653VaLq.js.map +1 -0
- package/dist/{form-field-VZRULhUK.js → form-field-CwH9y77i.js} +6 -5
- package/dist/form-field-CwH9y77i.js.map +1 -0
- package/dist/{form-sizing-uWP4lzVh.js → form-sizing-BdP_Mf5p.js} +45 -46
- package/dist/form-sizing-BdP_Mf5p.js.map +1 -0
- package/dist/{forms-DDeEnXSY.js → forms-B9G_xwzi.js} +22 -22
- package/dist/{forms-DDeEnXSY.js.map → forms-B9G_xwzi.js.map} +1 -1
- package/dist/forms-numeric-B_jraJaQ.js +906 -0
- package/dist/forms-numeric-B_jraJaQ.js.map +1 -0
- package/dist/{header-2ycNqGOR.js → header-CGXuhcRm.js} +164 -161
- package/dist/header-CGXuhcRm.js.map +1 -0
- package/dist/{hooks-DQ5SPwZw.js → hooks-Dkz0K2WT.js} +2 -2
- package/dist/{hooks-DQ5SPwZw.js.map → hooks-Dkz0K2WT.js.map} +1 -1
- package/dist/{http-CdEIHyQf.js → http-D_6rOnzU.js} +2 -2
- package/dist/{http-CdEIHyQf.js.map → http-D_6rOnzU.js.map} +1 -1
- package/dist/icon-badge-DYKIwvOV.js +55 -0
- package/dist/icon-badge-DYKIwvOV.js.map +1 -0
- package/dist/index.js +7 -7
- package/dist/input-CZw8iU99.js +21 -0
- package/dist/input-CZw8iU99.js.map +1 -0
- package/dist/input-DQdEd0YD.js +263 -0
- package/dist/input-DQdEd0YD.js.map +1 -0
- package/dist/interaction-recipes-XR9ZpVYL.js +25 -0
- package/dist/interaction-recipes-XR9ZpVYL.js.map +1 -0
- package/dist/item-K5_ghvze.js +275 -0
- package/dist/item-K5_ghvze.js.map +1 -0
- package/dist/layer-recipes-CCpklYME.js +13 -0
- package/dist/layer-recipes-CCpklYME.js.map +1 -0
- package/dist/layout/app-shell.js +1 -1
- package/dist/layout/auth.js +1 -1
- package/dist/layout/containers.js +1 -1
- package/dist/layout/header.js +1 -1
- package/dist/layout/hooks.js +1 -1
- package/dist/layout/navigation.js +1 -1
- package/dist/layout/page.js +1 -1
- package/dist/layout/settings.js +1 -1
- package/dist/layout/sidebar.js +2 -2
- package/dist/layout/workspace.js +1 -1
- package/dist/layout.js +10 -10
- package/dist/lib/affordance-geometry.generated.d.ts +72 -0
- package/dist/lib/editable-text-recipe.d.ts +4 -4
- package/dist/lib/field-affordance-recipes.d.ts +8 -3
- package/dist/lib/field-state-recipes.d.ts +9 -8
- package/dist/lib/focus-recipes.d.ts +24 -0
- package/dist/lib/interaction-recipes.d.ts +40 -0
- package/dist/lib/layer-recipes.d.ts +19 -0
- package/dist/lib/motion-recipes.d.ts +1 -0
- package/dist/lib/overlay-anatomy-recipes.d.ts +1 -0
- package/dist/lib/safe-image-src.d.ts +10 -0
- package/dist/lib/sanitize-html.d.ts +15 -3
- package/dist/lib/surface-recipes.d.ts +47 -7
- package/dist/lib/theme-mode-css.d.ts +7 -0
- package/dist/lib/token-merge.generated.d.ts +9 -6
- package/dist/lib/tone-recipes.d.ts +87 -0
- package/dist/lib/ui-provider/hooks.d.ts +2 -1
- package/dist/lib/ui-provider/index.d.ts +2 -2
- package/dist/lib/ui-provider/types.d.ts +11 -2
- package/dist/lib/utils.js +1 -1
- package/dist/media-gallery-3zIVLMWH.js +203 -0
- package/dist/media-gallery-3zIVLMWH.js.map +1 -0
- package/dist/mentions-utuUvH1K.js +570 -0
- package/dist/mentions-utuUvH1K.js.map +1 -0
- package/dist/{message-YfFmbXNP.js → message-DZ_ruyUV.js} +7 -6
- package/dist/message-DZ_ruyUV.js.map +1 -0
- package/dist/metadata-list-8N16ZMW_.js +405 -0
- package/dist/metadata-list-8N16ZMW_.js.map +1 -0
- package/dist/{motion-recipes-B6jKXEcN.js → motion-recipes-ChBg4HBq.js} +3 -2
- package/dist/{motion-recipes-B6jKXEcN.js.map → motion-recipes-ChBg4HBq.js.map} +1 -1
- package/dist/navigation-Bnotn4AQ.js +145 -0
- package/dist/navigation-Bnotn4AQ.js.map +1 -0
- package/dist/navigation-BzhHI3lo.js +269 -0
- package/dist/navigation-BzhHI3lo.js.map +1 -0
- package/dist/{navigation-row-recipes-DlU-4QYO.js → navigation-row-recipes-BFLCk_Aq.js} +2 -2
- package/dist/{navigation-row-recipes-DlU-4QYO.js.map → navigation-row-recipes-BFLCk_Aq.js.map} +1 -1
- package/dist/{number-CKRBYmZK.js → number-DbV1Dija.js} +36 -34
- package/dist/{number-CKRBYmZK.js.map → number-DbV1Dija.js.map} +1 -1
- package/dist/overflow-tab-bar-CWY7Nogn.js +282 -0
- package/dist/overflow-tab-bar-CWY7Nogn.js.map +1 -0
- package/dist/overlay.recipes-8GHqmlb4.js +6 -0
- package/dist/overlay.recipes-8GHqmlb4.js.map +1 -0
- package/dist/overlays-DNWmZrJ4.js +1001 -0
- package/dist/overlays-DNWmZrJ4.js.map +1 -0
- package/dist/page-Bgl1F560.js +224 -0
- package/dist/page-Bgl1F560.js.map +1 -0
- package/dist/page-header-commands-DOb6WsfD.js +126 -0
- package/dist/page-header-commands-DOb6WsfD.js.map +1 -0
- package/dist/pagination-BL25hu2s.js +158 -0
- package/dist/pagination-BL25hu2s.js.map +1 -0
- package/dist/{popover-Dcv_9jxr.js → popover-7_m66eYW.js} +11 -10
- package/dist/popover-7_m66eYW.js.map +1 -0
- package/dist/popover-menu-B9WWygpa.js +100 -0
- package/dist/popover-menu-B9WWygpa.js.map +1 -0
- package/dist/{popover.recipes-wmbvL8Ah.js → popover.recipes-D3j8R8Yp.js} +18 -11
- package/dist/popover.recipes-D3j8R8Yp.js.map +1 -0
- package/dist/{primitives-BHrwQXFC.js → primitives-BFK08r9M.js} +45 -44
- package/dist/primitives-BFK08r9M.js.map +1 -0
- package/dist/primitives.js +4 -4
- package/dist/{progress-Br9WTFya.js → progress-B1VnCT0K.js} +9 -9
- package/dist/{progress-Br9WTFya.js.map → progress-B1VnCT0K.js.map} +1 -1
- package/dist/{receipt-CV89q1fs.js → receipt-BVSOH3Xo.js} +9 -6
- package/dist/{receipt-CV89q1fs.js.map → receipt-BVSOH3Xo.js.map} +1 -1
- package/dist/rich-text-GOUyKQ-s.js +78 -0
- package/dist/rich-text-GOUyKQ-s.js.map +1 -0
- package/dist/rich-text-editor-cRLC-eBK.js +1196 -0
- package/dist/rich-text-editor-cRLC-eBK.js.map +1 -0
- package/dist/rich-text-editor-toolbar-DfXg0-VC.js +94 -0
- package/dist/rich-text-editor-toolbar-DfXg0-VC.js.map +1 -0
- package/dist/rich-text-editor.strings-CB59ekH2.js +38 -0
- package/dist/rich-text-editor.strings-CB59ekH2.js.map +1 -0
- package/dist/safe-image-src-C6kQSMBZ.js +17 -0
- package/dist/safe-image-src-C6kQSMBZ.js.map +1 -0
- package/dist/sanitize-html-DsQmI48u.js +92 -0
- package/dist/sanitize-html-DsQmI48u.js.map +1 -0
- package/dist/scroll-area-DcI-M1UT.js +48 -0
- package/dist/scroll-area-DcI-M1UT.js.map +1 -0
- package/dist/{separator-Do5GWDYi.js → separator-BDV-Y648.js} +3 -3
- package/dist/{separator-Do5GWDYi.js.map → separator-BDV-Y648.js.map} +1 -1
- package/dist/{separator-BMEvwnSX.js → separator-Bom7NsGO.js} +2 -2
- package/dist/{separator-BMEvwnSX.js.map → separator-Bom7NsGO.js.map} +1 -1
- package/dist/services/actions/action-adapters.d.ts +18 -0
- package/dist/services/actions/index.d.ts +1 -1
- package/dist/services/actions.js +16 -4
- package/dist/services/actions.js.map +1 -1
- package/dist/settings-ybnjVwbd.js +171 -0
- package/dist/settings-ybnjVwbd.js.map +1 -0
- package/dist/sheet-CGpB3omz.js +211 -0
- package/dist/sheet-CGpB3omz.js.map +1 -0
- package/dist/{sidebar-Cb8WzOvE.js → sidebar-A0ElHINE.js} +17 -16
- package/dist/sidebar-A0ElHINE.js.map +1 -0
- package/dist/{sidebar-Crc9M9JV.js → sidebar-CPx_7YBa.js} +205 -203
- package/dist/sidebar-CPx_7YBa.js.map +1 -0
- package/dist/{skeleton-DVMXr15h.js → skeleton-Byjnt7qr.js} +9 -9
- package/dist/{skeleton-DVMXr15h.js.map → skeleton-Byjnt7qr.js.map} +1 -1
- package/dist/smart-card-DiC5aac3.js +604 -0
- package/dist/smart-card-DiC5aac3.js.map +1 -0
- package/dist/{structure-hzCW-XsV.js → structure-BmisBK-3.js} +2 -2
- package/dist/{structure-hzCW-XsV.js.map → structure-BmisBK-3.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/surface-recipes-BKRVW8Os.js +43 -0
- package/dist/surface-recipes-BKRVW8Os.js.map +1 -0
- package/dist/table-BweFy_P9.js +1530 -0
- package/dist/table-BweFy_P9.js.map +1 -0
- package/dist/table-DsfzoUia.js +175 -0
- package/dist/table-DsfzoUia.js.map +1 -0
- package/dist/tabs-CDocW5D1.js +191 -0
- package/dist/tabs-CDocW5D1.js.map +1 -0
- package/dist/text-inputs-f9Ia-aCi.js +353 -0
- package/dist/text-inputs-f9Ia-aCi.js.map +1 -0
- package/dist/theme-mode-css-BB-_RYab.js +14 -0
- package/dist/theme-mode-css-BB-_RYab.js.map +1 -0
- package/dist/theme-scope-BJ6eE2xt.js +50 -0
- package/dist/theme-scope-BJ6eE2xt.js.map +1 -0
- package/dist/theme.css +285 -228
- package/dist/themes/green.css +16 -12
- package/dist/timelines-CwM_9IhD.js +457 -0
- package/dist/timelines-CwM_9IhD.js.map +1 -0
- package/dist/tone-recipes-BPsRAvhu.js +73 -0
- package/dist/tone-recipes-BPsRAvhu.js.map +1 -0
- package/dist/tooltip-yiRJUFjp.js +111 -0
- package/dist/tooltip-yiRJUFjp.js.map +1 -0
- package/dist/{tree-BotPlyiD.js → tree-WnKQzwbq.js} +69 -67
- package/dist/tree-WnKQzwbq.js.map +1 -0
- package/dist/typography/rich-text.js +1 -1
- package/dist/typography-UTnveOEy.js +117 -0
- package/dist/typography-UTnveOEy.js.map +1 -0
- package/dist/typography.js +2 -2
- package/dist/{ui-provider-D2_TeLqw.js → ui-provider-C_U0Xma4.js} +13 -5
- package/dist/ui-provider-C_U0Xma4.js.map +1 -0
- package/dist/ui-provider.js +3 -3
- package/dist/{upload-B0WHW7ak.js → upload-CXyxmQBP.js} +210 -209
- package/dist/upload-CXyxmQBP.js.map +1 -0
- package/dist/{upload-queue-BHZ_wBfd.js → upload-queue-Boscubn9.js} +111 -111
- package/dist/upload-queue-Boscubn9.js.map +1 -0
- package/dist/upload.recipes-BbxTqrCT.js +61 -0
- package/dist/upload.recipes-BbxTqrCT.js.map +1 -0
- package/dist/{usage-card-U0YBLTNT.js → usage-card-BhO5eqkX.js} +45 -29
- package/dist/usage-card-BhO5eqkX.js.map +1 -0
- package/dist/{utils-Cospvlj1.js → utils-BRhFDwuU.js} +114 -67
- package/dist/utils-BRhFDwuU.js.map +1 -0
- package/dist/value-inputs-DXPDjvBU.js +963 -0
- package/dist/value-inputs-DXPDjvBU.js.map +1 -0
- package/dist/{value-typography-Deb3yQZg.js → value-typography-BP8OG6h5.js} +2 -2
- package/dist/{value-typography-Deb3yQZg.js.map → value-typography-BP8OG6h5.js.map} +1 -1
- package/dist/workspace-Cdrg7k9f.js +408 -0
- package/dist/workspace-Cdrg7k9f.js.map +1 -0
- package/docs/consumer-skill/SKILL.md +21 -22
- package/docs/consumer-skill/examples/app-layout.tsx +1 -1
- package/docs/consumer-skill/examples/composition.tsx +3 -3
- package/docs/consumer-skill/examples/detail.tsx +59 -12
- package/docs/consumer-skill/examples/edit.tsx +1 -1
- package/docs/consumer-skill/examples/receipt.tsx +2 -2
- package/docs/consumer-skill/examples/scoped-directory.tsx +1 -1
- package/docs/consumer-skill/examples/website.tsx +1 -1
- package/docs/consumer-skill/references/agents-md.md +33 -0
- package/docs/consumer-skill/references/analytics.md +1 -1
- package/docs/consumer-skill/references/composition.md +58 -13
- package/docs/consumer-skill/references/design-contract.md +12 -3
- package/docs/consumer-skill/references/installation.md +11 -1
- package/docs/consumer-skill/references/integration.md +4 -3
- package/docs/consumer-skill/references/public-api.json +956 -453
- package/docs/consumer-skill/references/review.md +32 -5
- package/docs/consumer-skill/references/theming.md +78 -9
- package/docs/consumer-skill/references/tokens.json +1 -1
- package/docs/consumer-skill/references/workflows.md +54 -10
- package/docs/consumer-skill/scripts/composition-policy.mjs +42 -11
- package/docs/consumer-skill/scripts/surface-policy.mjs +150 -5
- package/package.json +17 -5
- package/dist/accordion-CQXVcd7Q.js +0 -205
- package/dist/accordion-CQXVcd7Q.js.map +0 -1
- package/dist/action-menu-BTpyPWJ2.js +0 -264
- package/dist/action-menu-BTpyPWJ2.js.map +0 -1
- package/dist/affordance-geometry.generated-CCIXb2A1.js +0 -68
- package/dist/affordance-geometry.generated-CCIXb2A1.js.map +0 -1
- package/dist/ai-artifact-2PQ2fItc.js +0 -1112
- package/dist/ai-artifact-2PQ2fItc.js.map +0 -1
- package/dist/attachment-q69dlt5Y.js +0 -244
- package/dist/attachment-q69dlt5Y.js.map +0 -1
- package/dist/auth-M3vGMgDR.js.map +0 -1
- package/dist/avatar-djdaaQ_s.js.map +0 -1
- package/dist/badge-0tATj-tW.js +0 -92
- package/dist/badge-0tATj-tW.js.map +0 -1
- package/dist/breadcrumbs-BG_FfMK4.js +0 -128
- package/dist/breadcrumbs-BG_FfMK4.js.map +0 -1
- package/dist/button-BS3KDg00.js.map +0 -1
- package/dist/button-R9CCoH7A.js.map +0 -1
- package/dist/buttons-DS0ZIwJ_.js +0 -99
- package/dist/buttons-DS0ZIwJ_.js.map +0 -1
- package/dist/cards-QoJ4syG9.js +0 -66
- package/dist/cards-QoJ4syG9.js.map +0 -1
- package/dist/chart-DwYRKKc-.js.map +0 -1
- package/dist/checkbox-B7ygNTYp.js +0 -35
- package/dist/checkbox-B7ygNTYp.js.map +0 -1
- package/dist/choice-inputs-DrJ17tpL.js +0 -752
- package/dist/choice-inputs-DrJ17tpL.js.map +0 -1
- package/dist/code-block-CD0B7M93.js +0 -183
- package/dist/code-block-CD0B7M93.js.map +0 -1
- package/dist/combobox-6dvVny2q.js +0 -272
- package/dist/combobox-6dvVny2q.js.map +0 -1
- package/dist/combobox-CB7039j7.js +0 -865
- package/dist/combobox-CB7039j7.js.map +0 -1
- package/dist/comments-You0Bzbr.js.map +0 -1
- package/dist/components/layout/page/partials/page-header-commands.d.ts +0 -13
- package/dist/containers-D_L4mTVb.js.map +0 -1
- package/dist/data-display-3xWQUnMA.js +0 -1335
- package/dist/data-display-3xWQUnMA.js.map +0 -1
- package/dist/date-picker-DrDFj8Lo.js +0 -1527
- package/dist/date-picker-DrDFj8Lo.js.map +0 -1
- package/dist/date-pickers-CnFCb0n2.js +0 -174
- package/dist/date-pickers-CnFCb0n2.js.map +0 -1
- package/dist/display-DrdvPwF0.js +0 -343
- package/dist/display-DrdvPwF0.js.map +0 -1
- package/dist/dropdown-menu-CURh59jb.js +0 -193
- package/dist/dropdown-menu-CURh59jb.js.map +0 -1
- package/dist/editable-text-recipe-Bkm6wKHp.js +0 -10
- package/dist/editable-text-recipe-Bkm6wKHp.js.map +0 -1
- package/dist/feedback-C7nR0UtT.js +0 -232
- package/dist/feedback-C7nR0UtT.js.map +0 -1
- package/dist/field-affordance-recipes-CkOCdE2y.js +0 -46
- package/dist/field-affordance-recipes-CkOCdE2y.js.map +0 -1
- package/dist/field-state-recipes-C-MFBX_8.js +0 -11
- package/dist/field-state-recipes-C-MFBX_8.js.map +0 -1
- package/dist/filters-Da-gNPsE.js.map +0 -1
- package/dist/form-field-VZRULhUK.js.map +0 -1
- package/dist/form-sizing-uWP4lzVh.js.map +0 -1
- package/dist/forms-numeric-D3CO60IF.js +0 -905
- package/dist/forms-numeric-D3CO60IF.js.map +0 -1
- package/dist/header-2ycNqGOR.js.map +0 -1
- package/dist/icon-badge-DKlaKXoo.js +0 -53
- package/dist/icon-badge-DKlaKXoo.js.map +0 -1
- package/dist/input-BoLm9Hks.js +0 -20
- package/dist/input-BoLm9Hks.js.map +0 -1
- package/dist/input-DhQdBnV3.js +0 -255
- package/dist/input-DhQdBnV3.js.map +0 -1
- package/dist/item-xzh8Df65.js +0 -264
- package/dist/item-xzh8Df65.js.map +0 -1
- package/dist/media-gallery-DQUQ0m3O.js +0 -201
- package/dist/media-gallery-DQUQ0m3O.js.map +0 -1
- package/dist/mentions-DwnO1hh4.js +0 -564
- package/dist/mentions-DwnO1hh4.js.map +0 -1
- package/dist/message-YfFmbXNP.js.map +0 -1
- package/dist/navigation-Cbp5V8gG.js +0 -264
- package/dist/navigation-Cbp5V8gG.js.map +0 -1
- package/dist/navigation-Cs1npsPm.js +0 -300
- package/dist/navigation-Cs1npsPm.js.map +0 -1
- package/dist/overlay.recipes-CNO2S9V6.js +0 -34
- package/dist/overlay.recipes-CNO2S9V6.js.map +0 -1
- package/dist/overlays-DhZO7N-I.js +0 -994
- package/dist/overlays-DhZO7N-I.js.map +0 -1
- package/dist/page-C6R_8jFt.js +0 -325
- package/dist/page-C6R_8jFt.js.map +0 -1
- package/dist/page-header-hUTzcRZX.js +0 -112
- package/dist/page-header-hUTzcRZX.js.map +0 -1
- package/dist/pagination-Cm0jqa3I.js +0 -149
- package/dist/pagination-Cm0jqa3I.js.map +0 -1
- package/dist/popover-Dcv_9jxr.js.map +0 -1
- package/dist/popover-menu-DnRFKnHP.js +0 -99
- package/dist/popover-menu-DnRFKnHP.js.map +0 -1
- package/dist/popover.recipes-wmbvL8Ah.js.map +0 -1
- package/dist/primitives-BHrwQXFC.js.map +0 -1
- package/dist/rich-text-editor-CF8QYt5p.js +0 -574
- package/dist/rich-text-editor-CF8QYt5p.js.map +0 -1
- package/dist/rich-text-editor.recipes-CnrbmTS1.js +0 -81
- package/dist/rich-text-editor.recipes-CnrbmTS1.js.map +0 -1
- package/dist/rich-text-editor.strings-BpnIQgMl.js +0 -25
- package/dist/rich-text-editor.strings-BpnIQgMl.js.map +0 -1
- package/dist/rich-text-j-FGAeZW.js +0 -32
- package/dist/rich-text-j-FGAeZW.js.map +0 -1
- package/dist/sanitize-html-BG9FGe-j.js +0 -64
- package/dist/sanitize-html-BG9FGe-j.js.map +0 -1
- package/dist/scroll-area-DRdr16Pt.js +0 -47
- package/dist/scroll-area-DRdr16Pt.js.map +0 -1
- package/dist/settings-DHk0L2MF.js +0 -161
- package/dist/settings-DHk0L2MF.js.map +0 -1
- package/dist/sheet-DRFNY1_D.js +0 -207
- package/dist/sheet-DRFNY1_D.js.map +0 -1
- package/dist/sidebar-Cb8WzOvE.js.map +0 -1
- package/dist/sidebar-Crc9M9JV.js.map +0 -1
- package/dist/smart-card-Bek-TwUp.js +0 -599
- package/dist/smart-card-Bek-TwUp.js.map +0 -1
- package/dist/spinner-CmTAbEp0.js +0 -80
- package/dist/spinner-CmTAbEp0.js.map +0 -1
- package/dist/surface-recipes-DOdoBXGm.js +0 -28
- package/dist/surface-recipes-DOdoBXGm.js.map +0 -1
- package/dist/table-D6zKeYQX.js +0 -162
- package/dist/table-D6zKeYQX.js.map +0 -1
- package/dist/table-Dn4XSrSB.js +0 -1444
- package/dist/table-Dn4XSrSB.js.map +0 -1
- package/dist/tabs-Dk8E_knt.js +0 -189
- package/dist/tabs-Dk8E_knt.js.map +0 -1
- package/dist/text-inputs-BFpku0Qd.js +0 -331
- package/dist/text-inputs-BFpku0Qd.js.map +0 -1
- package/dist/theme-scope-kStaAer0.js +0 -39
- package/dist/theme-scope-kStaAer0.js.map +0 -1
- package/dist/timelines-CxuAFIc2.js +0 -439
- package/dist/timelines-CxuAFIc2.js.map +0 -1
- package/dist/tree-BotPlyiD.js.map +0 -1
- package/dist/typography-CAr3dQhX.js +0 -116
- package/dist/typography-CAr3dQhX.js.map +0 -1
- package/dist/ui-provider-D2_TeLqw.js.map +0 -1
- package/dist/upload-B0WHW7ak.js.map +0 -1
- package/dist/upload-queue-BHZ_wBfd.js.map +0 -1
- package/dist/usage-card-U0YBLTNT.js.map +0 -1
- package/dist/use-file-drop-target-BX7GnhoQ.js +0 -39
- package/dist/use-file-drop-target-BX7GnhoQ.js.map +0 -1
- package/dist/utils-Cospvlj1.js.map +0 -1
- package/dist/value-inputs-CjfzGMsN.js +0 -854
- package/dist/value-inputs-CjfzGMsN.js.map +0 -1
- package/dist/workspace-YoFjXi6i.js +0 -394
- package/dist/workspace-YoFjXi6i.js.map +0 -1
- /package/dist/components/{blocks/data-display/metadata → base/metadata-list}/metadata-list.strings.d.ts +0 -0
|
@@ -1,32 +1,36 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { s as e, v as t } from "./ui-provider-C_U0Xma4.js";
|
|
3
3
|
import { useStrings as n } from "./lib/strings.js";
|
|
4
|
-
import { t as r } from "./utils-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { t as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { t as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { t as
|
|
17
|
-
import {
|
|
18
|
-
import { a as
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import { t as
|
|
22
|
-
import { t as
|
|
23
|
-
import { t as
|
|
24
|
-
import
|
|
4
|
+
import { t as r } from "./utils-BRhFDwuU.js";
|
|
5
|
+
import { n as i } from "./buttons-DPZekJFu.js";
|
|
6
|
+
import { a, c as o, o as s } from "./typography-UTnveOEy.js";
|
|
7
|
+
import { t as c } from "./focus-recipes-B653VaLq.js";
|
|
8
|
+
import { r as l, t as u } from "./structure-BmisBK-3.js";
|
|
9
|
+
import { i as d } from "./tone-recipes-BPsRAvhu.js";
|
|
10
|
+
import { n as f, t as p } from "./feedback-BYIhtitP.js";
|
|
11
|
+
import { i as m } from "./popover.recipes-D3j8R8Yp.js";
|
|
12
|
+
import { _ as h, g, m as _ } from "./primitives-BFK08r9M.js";
|
|
13
|
+
import { t as v } from "./number-DbV1Dija.js";
|
|
14
|
+
import { n as y, t as b } from "./date-DCrsDTZc.js";
|
|
15
|
+
import { t as x } from "./badge-HpFqoqSY.js";
|
|
16
|
+
import { t as S } from "./layer-recipes-CCpklYME.js";
|
|
17
|
+
import { n as C } from "./field-affordance-recipes-DZhnIL_Y.js";
|
|
18
|
+
import { a as w, i as T, n as E, o as D, r as O, s as k, t as A } from "./command-C25VMRII.js";
|
|
19
|
+
import { d as j, p as M, y as N } from "./form-sizing-BdP_Mf5p.js";
|
|
20
|
+
import { t as P } from "./input-DQdEd0YD.js";
|
|
21
|
+
import { t as F } from "./date-picker-ay0Pha_a.js";
|
|
22
|
+
import { a as I, c as L, i as R, o as ee, r as z, t as te } from "./popover-7_m66eYW.js";
|
|
23
|
+
import { n as B, r as ne, t as re } from "./control-group-recipes-DBXmfh2E.js";
|
|
24
|
+
import { i as ie, r as ae, t as oe } from "./tabs-CDocW5D1.js";
|
|
25
|
+
import { t as se } from "./popover-menu-B9WWygpa.js";
|
|
26
|
+
import { t as ce } from "./use-debounced-callback-Cx1h-hdv.js";
|
|
27
|
+
import { t as le } from "./use-debounce-DZ_1ZBPa.js";
|
|
28
|
+
import V, { Component as ue, createContext as de, useCallback as H, useContext as fe, useEffect as U, useId as pe, useMemo as W, useRef as G, useState as K } from "react";
|
|
25
29
|
import { Fragment as q, jsx as J, jsxs as Y } from "react/jsx-runtime";
|
|
26
|
-
import { CalendarIcon as
|
|
27
|
-
import { format as
|
|
30
|
+
import { CalendarIcon as me, Check as he, ChevronDown as ge, ChevronLeft as _e, ChevronsUpDown as ve, Filter as ye, Loader2 as be, Plus as xe, X as Se } from "lucide-react";
|
|
31
|
+
import { format as Ce, isValid as we, parse as Te } from "date-fns";
|
|
28
32
|
//#region src/components/features/filters/filters.strings.ts
|
|
29
|
-
var
|
|
33
|
+
var Ee = {
|
|
30
34
|
loading: "Loading",
|
|
31
35
|
loadingOptions: "Loading {filterLabel} options...",
|
|
32
36
|
addFilter: "Add filter",
|
|
@@ -108,7 +112,7 @@ var Se = {
|
|
|
108
112
|
function X(e, t) {
|
|
109
113
|
return e.replace(/{(\w+)}/g, (e, n) => String(t[n] ?? e)).replace(/:(\w+)/g, (e, n) => t[n] === void 0 ? e : String(t[n]));
|
|
110
114
|
}
|
|
111
|
-
function
|
|
115
|
+
function De(e, t, n) {
|
|
112
116
|
let r = t.split("."), i = e;
|
|
113
117
|
for (let e of r) {
|
|
114
118
|
if (typeof i != "object" || !i) return t;
|
|
@@ -143,12 +147,12 @@ var Z = {
|
|
|
143
147
|
HAS_ANY: "has_any",
|
|
144
148
|
HAS_ALL: "has_all"
|
|
145
149
|
};
|
|
146
|
-
function
|
|
150
|
+
function Oe(e) {
|
|
147
151
|
return e;
|
|
148
152
|
}
|
|
149
153
|
//#endregion
|
|
150
154
|
//#region src/components/features/filters/operator-options.ts
|
|
151
|
-
function
|
|
155
|
+
function ke(e) {
|
|
152
156
|
return [
|
|
153
157
|
{
|
|
154
158
|
label: e.contains,
|
|
@@ -164,7 +168,7 @@ function Te(e) {
|
|
|
164
168
|
}
|
|
165
169
|
];
|
|
166
170
|
}
|
|
167
|
-
function
|
|
171
|
+
function Ae(e) {
|
|
168
172
|
return [{
|
|
169
173
|
label: e.is,
|
|
170
174
|
value: Q.EQUALS
|
|
@@ -173,7 +177,7 @@ function Ee(e) {
|
|
|
173
177
|
value: Q.NOT
|
|
174
178
|
}];
|
|
175
179
|
}
|
|
176
|
-
function
|
|
180
|
+
function je(e) {
|
|
177
181
|
return [
|
|
178
182
|
{
|
|
179
183
|
label: e.equals,
|
|
@@ -189,7 +193,7 @@ function De(e) {
|
|
|
189
193
|
}
|
|
190
194
|
];
|
|
191
195
|
}
|
|
192
|
-
function
|
|
196
|
+
function Me(e) {
|
|
193
197
|
return [
|
|
194
198
|
{
|
|
195
199
|
label: e.before,
|
|
@@ -205,15 +209,15 @@ function Oe(e) {
|
|
|
205
209
|
}
|
|
206
210
|
];
|
|
207
211
|
}
|
|
208
|
-
function
|
|
212
|
+
function Ne(e) {
|
|
209
213
|
return [{
|
|
210
214
|
label: e.equals,
|
|
211
215
|
value: Q.EQUALS
|
|
212
216
|
}];
|
|
213
217
|
}
|
|
214
|
-
function
|
|
218
|
+
function Pe(e, t) {
|
|
215
219
|
switch (e) {
|
|
216
|
-
case Z.SEARCH: return
|
|
220
|
+
case Z.SEARCH: return ke(t);
|
|
217
221
|
case Z.TAGS: return [
|
|
218
222
|
{
|
|
219
223
|
label: t.has,
|
|
@@ -229,13 +233,13 @@ function Ae(e, t) {
|
|
|
229
233
|
}
|
|
230
234
|
];
|
|
231
235
|
case Z.SELECT:
|
|
232
|
-
case Z.ASYNC_SELECT: return
|
|
233
|
-
case Z.RANGE: return
|
|
234
|
-
case Z.DATE: return
|
|
235
|
-
default: return
|
|
236
|
+
case Z.ASYNC_SELECT: return Ae(t);
|
|
237
|
+
case Z.RANGE: return je(t);
|
|
238
|
+
case Z.DATE: return Me(t);
|
|
239
|
+
default: return ke(t);
|
|
236
240
|
}
|
|
237
241
|
}
|
|
238
|
-
function
|
|
242
|
+
function Fe(e) {
|
|
239
243
|
switch (e) {
|
|
240
244
|
case Z.SEARCH: return Q.CONTAINS;
|
|
241
245
|
case Z.TAGS: return Q.HAS;
|
|
@@ -248,7 +252,7 @@ function je(e) {
|
|
|
248
252
|
}
|
|
249
253
|
//#endregion
|
|
250
254
|
//#region src/components/features/filters/utils/filter-utils.ts
|
|
251
|
-
function
|
|
255
|
+
function Ie(e, t, n) {
|
|
252
256
|
if (e.type === "date" && Array.isArray(t) && t.every((e) => typeof e == "string")) return !0;
|
|
253
257
|
if (e.validation?.required && (!t || Array.isArray(t) && t.length === 0)) return n("validation.required");
|
|
254
258
|
if (typeof t == "number") {
|
|
@@ -264,8 +268,8 @@ function Me(e, t, n) {
|
|
|
264
268
|
}
|
|
265
269
|
//#endregion
|
|
266
270
|
//#region src/components/features/filters/filter-context.tsx
|
|
267
|
-
var
|
|
268
|
-
function
|
|
271
|
+
var Le = de(void 0);
|
|
272
|
+
function Re({ children: e, filters: t, activeFilters: r, onFilterChange: i, navigating: a = !1, strings: o, onError: s }) {
|
|
269
273
|
let c = G(t), l = G(i), u = G(s);
|
|
270
274
|
u.current = s;
|
|
271
275
|
let [d, f] = K(0), p = G(/* @__PURE__ */ new Map()), m = W(() => {
|
|
@@ -281,7 +285,7 @@ function Pe({ children: e, filters: t, activeFilters: r, onFilterChange: i, navi
|
|
|
281
285
|
});
|
|
282
286
|
}
|
|
283
287
|
return e.size === p.current.size && [...e].every(([e, t]) => p.current.get(e) === t) ? p.current : (p.current = e, e);
|
|
284
|
-
}, [t]), h = JSON.stringify(r.filter((e) => m.has(e.key)).map(({ key: e, value: t }) => [e, t])), g = n(
|
|
288
|
+
}, [t]), h = JSON.stringify(r.filter((e) => m.has(e.key)).map(({ key: e, value: t }) => [e, t])), g = n(Ee, o);
|
|
285
289
|
U(() => {
|
|
286
290
|
c.current = t;
|
|
287
291
|
}, [t]), U(() => {
|
|
@@ -308,7 +312,7 @@ function Pe({ children: e, filters: t, activeFilters: r, onFilterChange: i, navi
|
|
|
308
312
|
if (t.length === 0) n && v(e);
|
|
309
313
|
else if (n) y(e, { value: t });
|
|
310
314
|
else {
|
|
311
|
-
let n = c.current.find((t) => t.key === e), r = n?.operator ?? n?.operators?.[0]?.value ?? (n ?
|
|
315
|
+
let n = c.current.find((t) => t.key === e), r = n?.operator ?? n?.operators?.[0]?.value ?? (n ? Fe(n.type) : "equals");
|
|
312
316
|
_({
|
|
313
317
|
id: e,
|
|
314
318
|
key: e,
|
|
@@ -325,7 +329,7 @@ function Pe({ children: e, filters: t, activeFilters: r, onFilterChange: i, navi
|
|
|
325
329
|
r.find((t) => t.key === e) && y(e, { operator: t });
|
|
326
330
|
}, [r, y]), O = H((e, t) => {
|
|
327
331
|
let n = c.current.find((t) => t.key === e);
|
|
328
|
-
return n ?
|
|
332
|
+
return n ? Ie(n, t, (e) => De(g, e)) : !1;
|
|
329
333
|
}, [g]), k = H((e) => c.current.filter((t) => t.dependencies?.some((t) => t.key === e)), []), A = H((e, t) => {
|
|
330
334
|
let n = m.get(e)?.options;
|
|
331
335
|
if (!n) return;
|
|
@@ -403,19 +407,19 @@ function Pe({ children: e, filters: t, activeFilters: r, onFilterChange: i, navi
|
|
|
403
407
|
j,
|
|
404
408
|
M
|
|
405
409
|
]);
|
|
406
|
-
return /* @__PURE__ */ J(
|
|
410
|
+
return /* @__PURE__ */ J(Le.Provider, {
|
|
407
411
|
value: N,
|
|
408
412
|
children: e
|
|
409
413
|
});
|
|
410
414
|
}
|
|
411
415
|
function $() {
|
|
412
|
-
let e =
|
|
416
|
+
let e = fe(Le);
|
|
413
417
|
if (!e) throw Error("useFilters must be used within a FilterProvider");
|
|
414
418
|
return e;
|
|
415
419
|
}
|
|
416
420
|
//#endregion
|
|
417
421
|
//#region src/components/features/filters/hooks/use-filter-groups.ts
|
|
418
|
-
function
|
|
422
|
+
function ze(e = {}) {
|
|
419
423
|
let { dynamicFilterOptions: t } = e, { filters: n, isFilterActive: r } = $(), i = W(() => t ? n.map((e) => {
|
|
420
424
|
let n = t[e.key];
|
|
421
425
|
return Array.isArray(n) ? {
|
|
@@ -438,14 +442,14 @@ function Fe(e = {}) {
|
|
|
438
442
|
}
|
|
439
443
|
//#endregion
|
|
440
444
|
//#region src/components/features/filters/partials/filter-operator-select.tsx
|
|
441
|
-
function
|
|
445
|
+
function Be({ operator: e, operators: t, onOperatorChange: n, segmentResetClass: a }) {
|
|
442
446
|
let [c, l] = K(!1), { strings: u } = $(), d = t.find((t) => t.value === e)?.label || e;
|
|
443
|
-
return /* @__PURE__ */ J(
|
|
447
|
+
return /* @__PURE__ */ J(se, {
|
|
444
448
|
open: c,
|
|
445
449
|
onOpenChange: l,
|
|
446
450
|
search: !1,
|
|
447
451
|
contentLabel: u.operator,
|
|
448
|
-
trigger: /* @__PURE__ */ J(
|
|
452
|
+
trigger: /* @__PURE__ */ J(i, {
|
|
449
453
|
tone: "secondary",
|
|
450
454
|
buttonStyle: "ghost",
|
|
451
455
|
className: r("filter-operator-select--component", a, "h-full min-h-0 px-control text-muted-foreground hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground"),
|
|
@@ -455,15 +459,15 @@ function Ie({ operator: e, operators: t, onOperatorChange: n, segmentResetClass:
|
|
|
455
459
|
type: "button",
|
|
456
460
|
children: /* @__PURE__ */ J(o, {
|
|
457
461
|
tag: "span",
|
|
458
|
-
type: "
|
|
462
|
+
type: "inherit",
|
|
459
463
|
children: d
|
|
460
464
|
})
|
|
461
465
|
}),
|
|
462
|
-
header: /* @__PURE__ */ J(
|
|
466
|
+
header: /* @__PURE__ */ J(s, {
|
|
463
467
|
tag: "span",
|
|
464
468
|
children: u.operator
|
|
465
469
|
}),
|
|
466
|
-
contentClassName:
|
|
470
|
+
contentClassName: m.xs,
|
|
467
471
|
items: t.map((t) => ({
|
|
468
472
|
value: t.value,
|
|
469
473
|
label: t.label,
|
|
@@ -476,39 +480,41 @@ function Ie({ operator: e, operators: t, onOperatorChange: n, segmentResetClass:
|
|
|
476
480
|
}
|
|
477
481
|
//#endregion
|
|
478
482
|
//#region src/components/features/filters/partials/filter-value-display.tsx
|
|
479
|
-
function
|
|
483
|
+
function Ve({ filter: e, value: t }) {
|
|
480
484
|
let { strings: n } = $();
|
|
481
485
|
return t.length === 0 && e.type !== Z.DATE ? /* @__PURE__ */ J(o, {
|
|
482
486
|
tag: "span",
|
|
483
487
|
type: "secondary",
|
|
484
|
-
|
|
488
|
+
lineHeight: "none",
|
|
489
|
+
className: "filter-value-display--component",
|
|
485
490
|
children: n.nothingSelected
|
|
486
491
|
}) : e.type === Z.ASYNC_SELECT && !e.options?.length ? /* @__PURE__ */ J(o, {
|
|
487
492
|
tag: "span",
|
|
493
|
+
type: "inherit",
|
|
488
494
|
weight: "semibold",
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
495
|
+
lineHeight: "none",
|
|
496
|
+
className: "filter-value-display--component",
|
|
497
|
+
children: Ue(e, t, n)
|
|
498
|
+
}) : e.options && e.type !== Z.DATE ? /* @__PURE__ */ Y(u, {
|
|
492
499
|
direction: "horizontal",
|
|
493
500
|
gap: "xs",
|
|
494
501
|
wrap: !1,
|
|
495
502
|
className: "filter-value-display--component",
|
|
496
503
|
children: [/* @__PURE__ */ Y("div", {
|
|
497
|
-
className: "relative flex",
|
|
504
|
+
className: "relative isolate flex",
|
|
498
505
|
children: [t.slice(0, 2).map((t, n) => {
|
|
499
|
-
let
|
|
500
|
-
return
|
|
501
|
-
className:
|
|
502
|
-
|
|
503
|
-
children: r.icon
|
|
506
|
+
let i = e.options?.find((e) => e.value === t);
|
|
507
|
+
return i?.icon ? /* @__PURE__ */ J("div", {
|
|
508
|
+
className: r("border-background bg-background relative rounded-full border", n > 0 ? "-ml-space-sm z-[1]" : S.raised),
|
|
509
|
+
children: i.icon
|
|
504
510
|
}, t) : null;
|
|
505
511
|
}), t.length > 2 && /* @__PURE__ */ J("div", {
|
|
506
|
-
className: "bg-muted border-background relative -ml-space-sm flex size-icon items-center justify-center rounded-full border",
|
|
512
|
+
className: "bg-muted border-background relative z-0 -ml-space-sm flex size-icon items-center justify-center rounded-full border",
|
|
507
513
|
children: /* @__PURE__ */ Y(o, {
|
|
508
514
|
tag: "span",
|
|
509
515
|
size: "xs",
|
|
510
516
|
weight: "medium",
|
|
511
|
-
children: ["+", /* @__PURE__ */ J(
|
|
517
|
+
children: ["+", /* @__PURE__ */ J(v, {
|
|
512
518
|
value: t.length - 2,
|
|
513
519
|
size: "inherit",
|
|
514
520
|
align: "center"
|
|
@@ -517,154 +523,151 @@ function Le({ filter: e, value: t }) {
|
|
|
517
523
|
})]
|
|
518
524
|
}), /* @__PURE__ */ J(o, {
|
|
519
525
|
tag: "span",
|
|
526
|
+
type: "inherit",
|
|
520
527
|
weight: "semibold",
|
|
521
|
-
|
|
522
|
-
|
|
528
|
+
lineHeight: "none",
|
|
529
|
+
className: "truncate",
|
|
530
|
+
children: We(e, t, n)
|
|
523
531
|
})]
|
|
524
|
-
}) : e.type === Z.DATE ? /* @__PURE__ */ Y(
|
|
532
|
+
}) : e.type === Z.DATE ? /* @__PURE__ */ Y(u, {
|
|
525
533
|
direction: "horizontal",
|
|
526
534
|
gap: "xs",
|
|
527
535
|
wrap: !1,
|
|
528
536
|
className: "filter-value-display--component",
|
|
529
|
-
children: [/* @__PURE__ */ J(
|
|
537
|
+
children: [/* @__PURE__ */ J(me, { className: "text-muted-foreground size-icon-sm" }), /* @__PURE__ */ J(o, {
|
|
538
|
+
tag: "span",
|
|
539
|
+
type: "inherit",
|
|
540
|
+
weight: "semibold",
|
|
541
|
+
lineHeight: "none",
|
|
542
|
+
className: "min-w-0 truncate",
|
|
543
|
+
children: He(e, t, n)
|
|
544
|
+
})]
|
|
530
545
|
}) : /* @__PURE__ */ J(o, {
|
|
531
546
|
tag: "span",
|
|
547
|
+
type: "inherit",
|
|
532
548
|
weight: "semibold",
|
|
533
|
-
|
|
534
|
-
|
|
549
|
+
lineHeight: "none",
|
|
550
|
+
className: "filter-value-display--component truncate",
|
|
551
|
+
children: We(e, t, n)
|
|
535
552
|
});
|
|
536
553
|
}
|
|
537
|
-
function
|
|
538
|
-
return e.operator === "between" && t.length === 2 ?
|
|
539
|
-
weight: "semibold",
|
|
540
|
-
className: "truncate leading-none",
|
|
541
|
-
children: e.datePickerConfig?.noDatePlaceholder || n.calendar.notDateSelected
|
|
542
|
-
});
|
|
554
|
+
function He(e, t, n) {
|
|
555
|
+
return e.operator === "between" && t.length === 2 ? qe(t[0], t[1], e.dateFormat?.display) : t.length === 1 ? Ke(t[0], e.dateFormat?.display) : t.length === 2 ? qe(t[0], t[1], e.dateFormat?.display) : /* @__PURE__ */ J(h, { children: e.datePickerConfig?.noDatePlaceholder || n.calendar.notDateSelected });
|
|
543
556
|
}
|
|
544
|
-
function
|
|
557
|
+
function Ue(e, t, n) {
|
|
545
558
|
return t.length === 0 ? "" : X(n.selected, {
|
|
546
559
|
count: t.length,
|
|
547
560
|
filterLabel: (t.length > 1 ? e.pluralLabel : e.label) ?? e.label
|
|
548
561
|
});
|
|
549
562
|
}
|
|
550
|
-
function
|
|
563
|
+
function We(e, t, n) {
|
|
551
564
|
return t.length > 1 ? X(n.selected, {
|
|
552
565
|
count: t.length,
|
|
553
566
|
filterLabel: e.pluralLabel ?? e.label
|
|
554
567
|
}) : t.map((t) => e.options?.find((e) => e.value === t)?.label || t).join(", ");
|
|
555
568
|
}
|
|
556
|
-
function
|
|
569
|
+
function Ge(e) {
|
|
557
570
|
let t = new Date(e);
|
|
558
571
|
return !Number.isNaN(t.getTime());
|
|
559
572
|
}
|
|
560
|
-
function
|
|
561
|
-
return
|
|
573
|
+
function Ke(e, t) {
|
|
574
|
+
return Ge(e) ? /* @__PURE__ */ J(b, {
|
|
562
575
|
value: e,
|
|
563
|
-
format: t
|
|
564
|
-
|
|
565
|
-
className: "truncate leading-none"
|
|
566
|
-
}) : /* @__PURE__ */ J(f, {
|
|
567
|
-
weight: "semibold",
|
|
568
|
-
className: "truncate leading-none",
|
|
569
|
-
children: e
|
|
570
|
-
});
|
|
576
|
+
format: t
|
|
577
|
+
}) : /* @__PURE__ */ J(h, { children: e });
|
|
571
578
|
}
|
|
572
|
-
function
|
|
573
|
-
return
|
|
579
|
+
function qe(e, t, n) {
|
|
580
|
+
return Ge(e) && Ge(t) ? /* @__PURE__ */ J(y, {
|
|
574
581
|
from: e,
|
|
575
582
|
to: t,
|
|
576
|
-
format: n
|
|
577
|
-
weight: "semibold",
|
|
578
|
-
className: "truncate leading-none"
|
|
583
|
+
format: n
|
|
579
584
|
}) : /* @__PURE__ */ Y("span", {
|
|
580
|
-
className: "inline-flex min-w-0 items-center gap-space-xs
|
|
585
|
+
className: "inline-flex min-w-0 items-center gap-space-xs",
|
|
581
586
|
children: [
|
|
582
|
-
|
|
583
|
-
/* @__PURE__ */ J(
|
|
584
|
-
|
|
585
|
-
children: "–"
|
|
586
|
-
}),
|
|
587
|
-
He(t, n)
|
|
587
|
+
Ke(e, n),
|
|
588
|
+
/* @__PURE__ */ J(h, { children: "–" }),
|
|
589
|
+
Ke(t, n)
|
|
588
590
|
]
|
|
589
591
|
});
|
|
590
592
|
}
|
|
591
593
|
//#endregion
|
|
592
594
|
//#region src/components/features/filters/partials/active-filter-item.tsx
|
|
593
|
-
function
|
|
594
|
-
let { defaultScale:
|
|
595
|
+
function Je({ filter: n, value: a, active: s, popoverOpen: l, triggerRef: u, operators: d, operator: f, onOperatorChange: p, onFilterClear: m, onFilterClick: h }) {
|
|
596
|
+
let { defaultScale: g } = e(), _ = t(void 0, g), { strings: v } = $(), y = V.useId(), b = V.useId(), x = `${ne.joinedItem} !border-0 !rounded-none !shadow-none ${c.inset}`, S = () => /* @__PURE__ */ J("div", {
|
|
595
597
|
"aria-hidden": !0,
|
|
596
598
|
className: "w-px self-stretch bg-border"
|
|
597
599
|
});
|
|
598
600
|
return /* @__PURE__ */ Y("div", {
|
|
599
601
|
role: "group",
|
|
600
602
|
"aria-label": n.label,
|
|
601
|
-
"data-active":
|
|
602
|
-
className: r("active-filter-item--component",
|
|
603
|
+
"data-active": s || void 0,
|
|
604
|
+
className: r("active-filter-item--component", ne.joinedFrame, re[_], "bg-background", n.displayConfig?.className),
|
|
603
605
|
children: [
|
|
604
|
-
/* @__PURE__ */ Y(
|
|
606
|
+
/* @__PURE__ */ Y(i, {
|
|
605
607
|
type: "button",
|
|
606
608
|
tone: "secondary",
|
|
607
609
|
buttonStyle: "ghost",
|
|
608
|
-
className: r(
|
|
609
|
-
ref:
|
|
610
|
+
className: r(x, "flex h-full min-h-0 items-center gap-space-sm px-control hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground"),
|
|
611
|
+
ref: u,
|
|
610
612
|
"aria-haspopup": "dialog",
|
|
611
|
-
"aria-expanded":
|
|
612
|
-
onClick:
|
|
613
|
+
"aria-expanded": l,
|
|
614
|
+
onClick: h,
|
|
613
615
|
children: [
|
|
614
616
|
!!n.icon && /* @__PURE__ */ J("span", {
|
|
615
617
|
className: "flex items-center text-muted-foreground",
|
|
616
618
|
children: n.icon
|
|
617
619
|
}),
|
|
618
620
|
/* @__PURE__ */ J(o, {
|
|
619
|
-
id:
|
|
621
|
+
id: y,
|
|
620
622
|
tag: "span",
|
|
623
|
+
type: "inherit",
|
|
621
624
|
weight: "semibold",
|
|
622
625
|
children: n.label
|
|
623
626
|
}),
|
|
624
|
-
/* @__PURE__ */ J(
|
|
627
|
+
/* @__PURE__ */ J(ge, { className: "size-icon-sm" })
|
|
625
628
|
]
|
|
626
629
|
}),
|
|
627
|
-
/* @__PURE__ */ J(
|
|
628
|
-
/* @__PURE__ */ J(
|
|
629
|
-
operator:
|
|
630
|
-
operators:
|
|
631
|
-
onOperatorChange:
|
|
632
|
-
segmentResetClass:
|
|
630
|
+
/* @__PURE__ */ J(S, {}),
|
|
631
|
+
/* @__PURE__ */ J(Be, {
|
|
632
|
+
operator: f,
|
|
633
|
+
operators: d,
|
|
634
|
+
onOperatorChange: p,
|
|
635
|
+
segmentResetClass: x
|
|
633
636
|
}),
|
|
634
|
-
/* @__PURE__ */ J(
|
|
635
|
-
/* @__PURE__ */ J(
|
|
637
|
+
/* @__PURE__ */ J(S, {}),
|
|
638
|
+
/* @__PURE__ */ J(i, {
|
|
636
639
|
type: "button",
|
|
637
640
|
tone: "secondary",
|
|
638
641
|
buttonStyle: "ghost",
|
|
639
|
-
"aria-labelledby": `${
|
|
642
|
+
"aria-labelledby": `${y} ${b}`,
|
|
640
643
|
"aria-haspopup": "dialog",
|
|
641
|
-
"aria-expanded":
|
|
642
|
-
onClick:
|
|
643
|
-
className: r(
|
|
644
|
+
"aria-expanded": l,
|
|
645
|
+
onClick: h,
|
|
646
|
+
className: r(x, "flex h-full min-h-0 min-w-0 flex-1 items-center justify-start px-control hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground"),
|
|
644
647
|
children: /* @__PURE__ */ J("span", {
|
|
645
|
-
id:
|
|
648
|
+
id: b,
|
|
646
649
|
className: "min-w-0",
|
|
647
|
-
children: /* @__PURE__ */ J(
|
|
650
|
+
children: /* @__PURE__ */ J(Ve, {
|
|
648
651
|
filter: n,
|
|
649
|
-
value:
|
|
652
|
+
value: a
|
|
650
653
|
})
|
|
651
654
|
})
|
|
652
655
|
}),
|
|
653
|
-
!!
|
|
656
|
+
!!s && /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(S, {}), /* @__PURE__ */ Y(i, {
|
|
654
657
|
type: "button",
|
|
655
658
|
tone: "secondary",
|
|
656
659
|
buttonStyle: "ghost",
|
|
657
|
-
className: r(
|
|
660
|
+
className: r(x, "flex h-full min-h-0 shrink-0 items-center justify-center px-space-sm text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:bg-accent focus-visible:text-accent-foreground"),
|
|
658
661
|
onClick: (e) => {
|
|
659
|
-
e.stopPropagation(), e.preventDefault(),
|
|
662
|
+
e.stopPropagation(), e.preventDefault(), m();
|
|
660
663
|
},
|
|
661
|
-
children: [/* @__PURE__ */ J(
|
|
664
|
+
children: [/* @__PURE__ */ J(Se, {
|
|
662
665
|
"aria-hidden": "true",
|
|
663
666
|
className: "size-icon"
|
|
664
667
|
}), /* @__PURE__ */ J(o, {
|
|
665
668
|
tag: "span",
|
|
666
669
|
className: "sr-only",
|
|
667
|
-
children:
|
|
670
|
+
children: v.clear
|
|
668
671
|
})]
|
|
669
672
|
})] })
|
|
670
673
|
]
|
|
@@ -672,18 +675,18 @@ function We({ filter: n, value: i, active: a, popoverOpen: c, triggerRef: l, ope
|
|
|
672
675
|
}
|
|
673
676
|
//#endregion
|
|
674
677
|
//#region src/components/features/filters/hooks/use-async-options.ts
|
|
675
|
-
function
|
|
678
|
+
function Ye(e, t, n) {
|
|
676
679
|
for (let [t, r] of e) Date.now() - r.timestamp > n && e.delete(t);
|
|
677
680
|
return e.get(t);
|
|
678
681
|
}
|
|
679
|
-
function
|
|
682
|
+
function Xe(e, t, n, r = {}) {
|
|
680
683
|
let { asyncConfig: i } = e, a = i?.fetcher, o = i?.mapToOption, s = W(() => /* @__PURE__ */ new Map(), [
|
|
681
684
|
e.key,
|
|
682
685
|
a,
|
|
683
686
|
o
|
|
684
687
|
]), c = G(r.onError);
|
|
685
688
|
c.current = r.onError;
|
|
686
|
-
let l = i?.debounceMs ?? e.delay ?? 300, u = (
|
|
689
|
+
let l = i?.debounceMs ?? e.delay ?? 300, u = (le(t, l) ?? "").trim(), d = i?.limit ?? 10, f = i?.minQueryLength ?? 0, p = i?.preload ?? !0, m = i?.staleTime ?? 6e4, h = i?.gcTime ?? 3e5, g = u.length === 0 && p, _ = u.length >= f, v = !!i?.fetcher && n && (g || u.length > 0 && _), y = n && !g && u.length > 0 && u.length < f, b = W(() => i?.queryKey ? JSON.stringify(i.queryKey({
|
|
687
690
|
query: u,
|
|
688
691
|
limit: d
|
|
689
692
|
})) : JSON.stringify([
|
|
@@ -706,7 +709,7 @@ function Ke(e, t, n, r = {}) {
|
|
|
706
709
|
u,
|
|
707
710
|
d
|
|
708
711
|
]), [S, C] = K(() => {
|
|
709
|
-
let e =
|
|
712
|
+
let e = Ye(s, b, h);
|
|
710
713
|
return {
|
|
711
714
|
cache: s,
|
|
712
715
|
data: e?.data ?? [],
|
|
@@ -718,7 +721,7 @@ function Ke(e, t, n, r = {}) {
|
|
|
718
721
|
return U(() => {
|
|
719
722
|
let t = D.current !== w;
|
|
720
723
|
if (D.current = w, !v) return;
|
|
721
|
-
let n =
|
|
724
|
+
let n = Ye(s, b, h), r = n !== void 0 && Date.now() - n.timestamp < m, i = new AbortController();
|
|
722
725
|
if (r && !t) return C({
|
|
723
726
|
cache: s,
|
|
724
727
|
data: n.data,
|
|
@@ -780,56 +783,56 @@ function Ke(e, t, n, r = {}) {
|
|
|
780
783
|
}
|
|
781
784
|
//#endregion
|
|
782
785
|
//#region src/components/features/filters/partials/async-filter-content.tsx
|
|
783
|
-
function
|
|
784
|
-
let { strings: c, cacheAsyncOptions:
|
|
786
|
+
function Ze({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onClose: a, triggerSource: s = "chip" }) {
|
|
787
|
+
let { strings: c, cacheAsyncOptions: l, getAsyncOptionLabel: d, reportError: m } = $(), [h, g] = K(""), [_, v] = K(t ?? []), y = G(t);
|
|
785
788
|
if (t !== y.current) {
|
|
786
789
|
let e = y.current ?? [], n = t ?? [];
|
|
787
790
|
y.current = t, (n.length !== e.length || n.some((t, n) => t !== e[n])) && v(n);
|
|
788
791
|
}
|
|
789
|
-
let { options:
|
|
792
|
+
let { options: b, isLoading: x, isFetching: S, isError: C, refetch: k, isBelowMinQuery: j, minQueryLength: M } = Xe(e, h, !0, { onError: m });
|
|
790
793
|
U(() => {
|
|
791
|
-
|
|
794
|
+
b.length > 0 && l(e.key, b);
|
|
792
795
|
}, [
|
|
793
|
-
|
|
796
|
+
l,
|
|
794
797
|
e.key,
|
|
795
|
-
|
|
798
|
+
b
|
|
796
799
|
]);
|
|
797
|
-
let N = e.multiple !== !1,
|
|
798
|
-
let t = new Set(_), n = new Set(
|
|
800
|
+
let N = e.multiple !== !1, P = e.maxSelected, F = s === "toolbar", I = _.length !== t.length || _.some((e) => !t.includes(e)), L = W(() => {
|
|
801
|
+
let t = new Set(_), n = new Set(b.map((e) => e.value)), r = [];
|
|
799
802
|
for (let t of _) if (!n.has(t)) {
|
|
800
|
-
let n =
|
|
803
|
+
let n = d(e.key, t);
|
|
801
804
|
n && r.push({
|
|
802
805
|
value: t,
|
|
803
806
|
label: n,
|
|
804
807
|
icon: e.icon
|
|
805
808
|
});
|
|
806
809
|
}
|
|
807
|
-
return [...r, ...
|
|
810
|
+
return [...r, ...b].sort((e, n) => +!t.has(e.value) - !t.has(n.value));
|
|
808
811
|
}, [
|
|
809
|
-
|
|
812
|
+
b,
|
|
810
813
|
_,
|
|
811
814
|
e.key,
|
|
812
815
|
e.icon,
|
|
813
|
-
|
|
814
|
-
]),
|
|
816
|
+
d
|
|
817
|
+
]), ee = (t) => {
|
|
815
818
|
if (N) {
|
|
816
819
|
if (_.includes(t)) v(_.filter((e) => e !== t));
|
|
817
820
|
else {
|
|
818
|
-
if (
|
|
821
|
+
if (P && _.length >= P) return;
|
|
819
822
|
v([..._, t]);
|
|
820
823
|
}
|
|
821
|
-
} else v([t]), e.closeOnSelect === !0 && (n([t]),
|
|
822
|
-
},
|
|
823
|
-
n(_),
|
|
824
|
-
}, B = W(() =>
|
|
824
|
+
} else v([t]), e.closeOnSelect === !0 && (n([t]), a());
|
|
825
|
+
}, te = () => {
|
|
826
|
+
n(_), a();
|
|
827
|
+
}, B = W(() => x || S ? /* @__PURE__ */ J(f, { label: c.searching }) : C ? /* @__PURE__ */ J(p, {
|
|
825
828
|
variant: "inline",
|
|
826
829
|
title: c.fetchError,
|
|
827
|
-
action: /* @__PURE__ */ J(
|
|
830
|
+
action: /* @__PURE__ */ J(i, {
|
|
828
831
|
tone: "secondary",
|
|
829
832
|
buttonStyle: "outline",
|
|
830
833
|
size: "sm",
|
|
831
834
|
onClick: (e) => {
|
|
832
|
-
e.stopPropagation(),
|
|
835
|
+
e.stopPropagation(), k();
|
|
833
836
|
},
|
|
834
837
|
children: c.retryFetch
|
|
835
838
|
})
|
|
@@ -842,17 +845,17 @@ function qe({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
842
845
|
children: X(c.minQueryHint, { min: M })
|
|
843
846
|
})
|
|
844
847
|
}) : c.noOptionsFound, [
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
+
x,
|
|
849
|
+
S,
|
|
850
|
+
C,
|
|
848
851
|
j,
|
|
849
852
|
M,
|
|
850
853
|
c,
|
|
851
|
-
|
|
854
|
+
k
|
|
852
855
|
]);
|
|
853
856
|
return /* @__PURE__ */ Y(q, { children: [
|
|
854
|
-
/* @__PURE__ */ Y(
|
|
855
|
-
start:
|
|
857
|
+
/* @__PURE__ */ Y(R, {
|
|
858
|
+
start: F ? /* @__PURE__ */ J(i, {
|
|
856
859
|
tone: "secondary",
|
|
857
860
|
buttonStyle: "ghost",
|
|
858
861
|
size: "sm",
|
|
@@ -860,13 +863,14 @@ function qe({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
860
863
|
className: "shrink-0",
|
|
861
864
|
onClick: r,
|
|
862
865
|
"aria-label": c.backToFilters,
|
|
863
|
-
children: /* @__PURE__ */ J(
|
|
866
|
+
children: /* @__PURE__ */ J(_e, {
|
|
864
867
|
"aria-hidden": "true",
|
|
865
868
|
className: "size-icon-sm rtl:rotate-180"
|
|
866
869
|
})
|
|
867
870
|
}) : void 0,
|
|
868
871
|
children: [/* @__PURE__ */ J(o, {
|
|
869
872
|
tag: "span",
|
|
873
|
+
type: "inherit",
|
|
870
874
|
weight: "semibold",
|
|
871
875
|
children: e.label
|
|
872
876
|
}), /* @__PURE__ */ J(o, {
|
|
@@ -876,46 +880,47 @@ function qe({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
876
880
|
children: c.selectValues
|
|
877
881
|
})]
|
|
878
882
|
}),
|
|
879
|
-
/* @__PURE__ */ Y(
|
|
883
|
+
/* @__PURE__ */ Y(A, {
|
|
880
884
|
shouldFilter: !1,
|
|
881
885
|
inset: "flush",
|
|
882
886
|
className: "rounded-none",
|
|
883
|
-
children: [/* @__PURE__ */ J(
|
|
887
|
+
children: [/* @__PURE__ */ J(T, {
|
|
884
888
|
placeholder: X(c.searchPlaceholder, { filterLabel: e.label.toLowerCase() }),
|
|
885
889
|
value: h,
|
|
886
890
|
onValueChange: g
|
|
887
|
-
}), /* @__PURE__ */ J(
|
|
891
|
+
}), /* @__PURE__ */ J(D, { children: L.length === 0 ? /* @__PURE__ */ J(E, { children: B }) : /* @__PURE__ */ Y(O, { children: [!(!S || x) && /* @__PURE__ */ Y(u, {
|
|
888
892
|
direction: "horizontal",
|
|
889
893
|
gap: "sm",
|
|
890
894
|
wrap: !1,
|
|
891
895
|
className: "px-control-sm py-space-xs",
|
|
892
|
-
children: [/* @__PURE__ */ J(
|
|
896
|
+
children: [/* @__PURE__ */ J(be, { className: "text-muted-foreground size-icon-sm animate-spin" }), /* @__PURE__ */ J(o, {
|
|
893
897
|
tag: "span",
|
|
894
898
|
size: "xs",
|
|
895
899
|
type: "secondary",
|
|
896
900
|
children: c.searching
|
|
897
901
|
})]
|
|
898
|
-
}),
|
|
899
|
-
onSelect: () =>
|
|
902
|
+
}), L.map((e) => /* @__PURE__ */ Y(w, {
|
|
903
|
+
onSelect: () => ee(e.value),
|
|
900
904
|
"data-checked": _.includes(e.value) || void 0,
|
|
901
|
-
disabled: e.disabled || !!
|
|
905
|
+
disabled: e.disabled || !!P && _.length >= P && !_.includes(e.value),
|
|
902
906
|
className: "flex items-center gap-space-sm",
|
|
903
907
|
children: [e.icon, /* @__PURE__ */ J(o, {
|
|
904
908
|
tag: "span",
|
|
909
|
+
type: "inherit",
|
|
905
910
|
lineHeight: "tight",
|
|
906
911
|
children: e.label
|
|
907
912
|
})]
|
|
908
913
|
}, e.value))] }) })]
|
|
909
914
|
}),
|
|
910
|
-
|
|
915
|
+
I && /* @__PURE__ */ J(z, {
|
|
911
916
|
caption: X(c.selected, {
|
|
912
917
|
count: _.length,
|
|
913
918
|
filterLabel: (_.length > 1 ? e.pluralLabel : e.label) ?? e.label
|
|
914
919
|
}),
|
|
915
|
-
children: /* @__PURE__ */ J(
|
|
920
|
+
children: /* @__PURE__ */ J(i, {
|
|
916
921
|
tone: "primary",
|
|
917
922
|
size: "sm",
|
|
918
|
-
onClick:
|
|
923
|
+
onClick: te,
|
|
919
924
|
children: c.confirm
|
|
920
925
|
})
|
|
921
926
|
})
|
|
@@ -923,12 +928,12 @@ function qe({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
923
928
|
}
|
|
924
929
|
//#endregion
|
|
925
930
|
//#region src/components/features/filters/facets/date-facet.tsx
|
|
926
|
-
var
|
|
927
|
-
function
|
|
931
|
+
var Qe = [];
|
|
932
|
+
function $e({ filter: e, value: t, onValueChange: n, className: i }) {
|
|
928
933
|
let { strings: a } = $(), o = e.operators?.some((e) => e.value === "between") || e.operator === "between" || e.key.toLowerCase().includes("range") || e.key.toLowerCase().includes("between"), s = e.dateFormat?.param ?? "yyyy-MM-dd", c = e.dateFormat?.display ?? "PPP", l = o ? e.datePickerConfig?.noRangePlaceholder ?? e.placeholder ?? a.calendar.notDateRangeSelected : e.datePickerConfig?.noDatePlaceholder ?? e.placeholder ?? a.calendar.notDateSelected, u = !!e.datePickerConfig?.showConfirmButton, d = e.datePickerConfig?.autoApply ?? !u, f = e.datePickerConfig?.showShortcuts ?? !0, p = o && (t.start || t.end) ? {
|
|
929
934
|
from: t.start,
|
|
930
935
|
to: t.end
|
|
931
|
-
} : void 0, m = !o && t.start &&
|
|
936
|
+
} : void 0, m = !o && t.start && we(t.start) ? t.start : void 0, h = {
|
|
932
937
|
format: s,
|
|
933
938
|
readableFormat: c,
|
|
934
939
|
placeholder: l,
|
|
@@ -936,7 +941,7 @@ function Ye({ filter: e, value: t, onValueChange: n, className: i }) {
|
|
|
936
941
|
numberOfMonths: 1,
|
|
937
942
|
className: r("date-facet--component", "w-full", i)
|
|
938
943
|
};
|
|
939
|
-
return o ? /* @__PURE__ */ J(
|
|
944
|
+
return o ? /* @__PURE__ */ J(F, {
|
|
940
945
|
mode: "range",
|
|
941
946
|
value: p,
|
|
942
947
|
onValueChange: (e) => {
|
|
@@ -947,9 +952,9 @@ function Ye({ filter: e, value: t, onValueChange: n, className: i }) {
|
|
|
947
952
|
},
|
|
948
953
|
withConfirm: u,
|
|
949
954
|
closeOnSelect: d,
|
|
950
|
-
presets: f ? void 0 :
|
|
955
|
+
presets: f ? void 0 : Qe,
|
|
951
956
|
...h
|
|
952
|
-
}) : /* @__PURE__ */ J(
|
|
957
|
+
}) : /* @__PURE__ */ J(F, {
|
|
953
958
|
mode: "single",
|
|
954
959
|
value: m,
|
|
955
960
|
onValueChange: (e) => {
|
|
@@ -964,28 +969,28 @@ function Ye({ filter: e, value: t, onValueChange: n, className: i }) {
|
|
|
964
969
|
}
|
|
965
970
|
//#endregion
|
|
966
971
|
//#region src/components/features/filters/partials/date-filter-content.tsx
|
|
967
|
-
function
|
|
968
|
-
let { strings:
|
|
972
|
+
function et({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, triggerSource: a = "chip" }) {
|
|
973
|
+
let { strings: o } = $(), s = (t) => {
|
|
969
974
|
if (!t) return;
|
|
970
975
|
if (e.dateFormat?.param) {
|
|
971
|
-
let n =
|
|
972
|
-
return
|
|
976
|
+
let n = Te(t, e.dateFormat.param, /* @__PURE__ */ new Date());
|
|
977
|
+
return we(n) ? n : void 0;
|
|
973
978
|
}
|
|
974
979
|
let n = new Date(t);
|
|
975
|
-
return
|
|
976
|
-
}, c =
|
|
977
|
-
if (t &&
|
|
980
|
+
return we(n) ? n : void 0;
|
|
981
|
+
}, c = s(t[0]), l = s(t[1]), u = (t) => {
|
|
982
|
+
if (t && we(t)) return Ce(t, e.dateFormat?.param ?? "yyyy-MM-dd");
|
|
978
983
|
}, d = ({ start: e, end: t }) => {
|
|
979
984
|
let r = [], i = u(e), a = u(t);
|
|
980
985
|
i && r.push(i), a && r.push(a), n(r);
|
|
981
|
-
}, f =
|
|
986
|
+
}, f = a === "toolbar", p = {
|
|
982
987
|
start: c,
|
|
983
988
|
end: l
|
|
984
989
|
};
|
|
985
990
|
return /* @__PURE__ */ Y("div", {
|
|
986
991
|
className: "flex flex-col",
|
|
987
|
-
children: [/* @__PURE__ */ J(
|
|
988
|
-
start: f ? /* @__PURE__ */ J(
|
|
992
|
+
children: [/* @__PURE__ */ J(R, {
|
|
993
|
+
start: f ? /* @__PURE__ */ J(i, {
|
|
989
994
|
type: "button",
|
|
990
995
|
tone: "secondary",
|
|
991
996
|
buttonStyle: "ghost",
|
|
@@ -993,16 +998,16 @@ function Xe({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, tri
|
|
|
993
998
|
iconOnly: !0,
|
|
994
999
|
onClick: r,
|
|
995
1000
|
className: "shrink-0",
|
|
996
|
-
"aria-label":
|
|
997
|
-
children: /* @__PURE__ */ J(
|
|
1001
|
+
"aria-label": o.backToFilters,
|
|
1002
|
+
children: /* @__PURE__ */ J(_e, {
|
|
998
1003
|
"aria-hidden": "true",
|
|
999
1004
|
className: "size-icon-sm rtl:rotate-180"
|
|
1000
1005
|
})
|
|
1001
1006
|
}) : void 0,
|
|
1002
|
-
children: /* @__PURE__ */ J(
|
|
1007
|
+
children: /* @__PURE__ */ J(I, { children: e.label })
|
|
1003
1008
|
}), /* @__PURE__ */ J("div", {
|
|
1004
1009
|
className: "p-surface",
|
|
1005
|
-
children: /* @__PURE__ */ J(
|
|
1010
|
+
children: /* @__PURE__ */ J($e, {
|
|
1006
1011
|
filter: e,
|
|
1007
1012
|
value: p,
|
|
1008
1013
|
onValueChange: d
|
|
@@ -1012,7 +1017,7 @@ function Xe({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, tri
|
|
|
1012
1017
|
}
|
|
1013
1018
|
//#endregion
|
|
1014
1019
|
//#region src/components/features/filters/partials/filter-error-boundary.tsx
|
|
1015
|
-
var
|
|
1020
|
+
var tt = class extends ue {
|
|
1016
1021
|
state = {
|
|
1017
1022
|
hasError: !1,
|
|
1018
1023
|
error: null
|
|
@@ -1042,7 +1047,7 @@ var Ze = class extends oe {
|
|
|
1042
1047
|
className: "filter-error-boundary--component contents",
|
|
1043
1048
|
children: e
|
|
1044
1049
|
}) : /* @__PURE__ */ Y("div", {
|
|
1045
|
-
className: "filter-error-boundary--component rounded-radius border
|
|
1050
|
+
className: r("filter-error-boundary--component rounded-radius border p-surface-xs", d.destructive.edge, d.destructive.wash, d.destructive.ink),
|
|
1046
1051
|
children: [
|
|
1047
1052
|
/* @__PURE__ */ Y("div", {
|
|
1048
1053
|
className: "mb-space-xs flex items-center justify-between",
|
|
@@ -1050,7 +1055,7 @@ var Ze = class extends oe {
|
|
|
1050
1055
|
tag: "span",
|
|
1051
1056
|
weight: "semibold",
|
|
1052
1057
|
children: n.title
|
|
1053
|
-
}), /* @__PURE__ */ J(
|
|
1058
|
+
}), /* @__PURE__ */ J(i, {
|
|
1054
1059
|
type: "button",
|
|
1055
1060
|
tone: "destructive",
|
|
1056
1061
|
buttonStyle: "ghost",
|
|
@@ -1058,11 +1063,11 @@ var Ze = class extends oe {
|
|
|
1058
1063
|
iconOnly: !0,
|
|
1059
1064
|
onClick: this.handleReset,
|
|
1060
1065
|
"aria-label": n.reset,
|
|
1061
|
-
children: /* @__PURE__ */ J(
|
|
1066
|
+
children: /* @__PURE__ */ J(Se, { className: "size-icon-sm" })
|
|
1062
1067
|
})]
|
|
1063
1068
|
}),
|
|
1064
1069
|
/* @__PURE__ */ J(o, { children: n.getDescription(t) }),
|
|
1065
|
-
/* @__PURE__ */ J(
|
|
1070
|
+
/* @__PURE__ */ J(_, {
|
|
1066
1071
|
size: "xs",
|
|
1067
1072
|
className: "mt-space-xs text-destructive",
|
|
1068
1073
|
children: this.state.error?.message || n.unknownError
|
|
@@ -1076,14 +1081,14 @@ var Ze = class extends oe {
|
|
|
1076
1081
|
});
|
|
1077
1082
|
}
|
|
1078
1083
|
};
|
|
1079
|
-
function
|
|
1084
|
+
function nt(e) {
|
|
1080
1085
|
let { strings: t, reportError: n } = $(), r = W(() => ({
|
|
1081
1086
|
title: t.error.title,
|
|
1082
1087
|
reset: t.clear,
|
|
1083
1088
|
getDescription: (e) => e ? X(t.error.descriptionWithKey, { filterKey: e }) : t.error.generic,
|
|
1084
1089
|
unknownError: t.error.unknown
|
|
1085
1090
|
}), [t]);
|
|
1086
|
-
return /* @__PURE__ */ J(
|
|
1091
|
+
return /* @__PURE__ */ J(tt, {
|
|
1087
1092
|
...e,
|
|
1088
1093
|
labels: r,
|
|
1089
1094
|
onError: n
|
|
@@ -1091,9 +1096,9 @@ function Qe(e) {
|
|
|
1091
1096
|
}
|
|
1092
1097
|
//#endregion
|
|
1093
1098
|
//#region src/components/features/filters/partials/filter-list-item.tsx
|
|
1094
|
-
function
|
|
1099
|
+
function rt({ filter: e, onSelect: t }) {
|
|
1095
1100
|
let { strings: n } = $(), r = e.type === Z.DATE ? e.operator === "between" ? n?.selectDateRange : n?.selectDate : e.options ? `${e.options.length} ${n?.options ?? ""}`.trim() : null;
|
|
1096
|
-
return /* @__PURE__ */ Y(
|
|
1101
|
+
return /* @__PURE__ */ Y(w, {
|
|
1097
1102
|
onSelect: t,
|
|
1098
1103
|
children: [!!e.icon && /* @__PURE__ */ J("span", {
|
|
1099
1104
|
className: "shrink-0 text-muted-foreground [&_svg]:size-icon",
|
|
@@ -1102,6 +1107,7 @@ function $e({ filter: e, onSelect: t }) {
|
|
|
1102
1107
|
className: "flex min-w-0 flex-col gap-dense leading-tight",
|
|
1103
1108
|
children: [/* @__PURE__ */ J(o, {
|
|
1104
1109
|
tag: "span",
|
|
1110
|
+
type: "inherit",
|
|
1105
1111
|
lineHeight: "tight",
|
|
1106
1112
|
weight: "medium",
|
|
1107
1113
|
className: "truncate",
|
|
@@ -1119,25 +1125,25 @@ function $e({ filter: e, onSelect: t }) {
|
|
|
1119
1125
|
}
|
|
1120
1126
|
//#endregion
|
|
1121
1127
|
//#region src/components/features/filters/partials/filter-list-content.tsx
|
|
1122
|
-
function
|
|
1128
|
+
function it({ availableFilters: e, activeFilters: t, onFilterSelect: n }) {
|
|
1123
1129
|
let { strings: r } = $(), i = (e) => {
|
|
1124
1130
|
n(e);
|
|
1125
1131
|
};
|
|
1126
|
-
return /* @__PURE__ */ Y(
|
|
1132
|
+
return /* @__PURE__ */ Y(A, {
|
|
1127
1133
|
inset: "compact",
|
|
1128
1134
|
className: "rounded-none",
|
|
1129
|
-
children: [/* @__PURE__ */ J(
|
|
1130
|
-
/* @__PURE__ */ J(
|
|
1131
|
-
e.length > 0 && /* @__PURE__ */ J(
|
|
1135
|
+
children: [/* @__PURE__ */ J(T, { placeholder: r.searchFilters }), /* @__PURE__ */ Y(D, { children: [
|
|
1136
|
+
/* @__PURE__ */ J(E, { children: r.noFiltersAvailable }),
|
|
1137
|
+
e.length > 0 && /* @__PURE__ */ J(O, {
|
|
1132
1138
|
heading: r.availableFilters,
|
|
1133
|
-
children: e.map((e) => /* @__PURE__ */ J(
|
|
1139
|
+
children: e.map((e) => /* @__PURE__ */ J(rt, {
|
|
1134
1140
|
filter: e,
|
|
1135
1141
|
onSelect: () => i(e)
|
|
1136
1142
|
}, e.key))
|
|
1137
1143
|
}),
|
|
1138
|
-
t.length > 0 && /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(
|
|
1144
|
+
t.length > 0 && /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(k, {}), /* @__PURE__ */ J(O, {
|
|
1139
1145
|
heading: r.activeFilters,
|
|
1140
|
-
children: t.map((e) => /* @__PURE__ */ J(
|
|
1146
|
+
children: t.map((e) => /* @__PURE__ */ J(rt, {
|
|
1141
1147
|
filter: e,
|
|
1142
1148
|
onSelect: () => i(e)
|
|
1143
1149
|
}, e.key))
|
|
@@ -1147,8 +1153,8 @@ function et({ availableFilters: e, activeFilters: t, onFilterSelect: n }) {
|
|
|
1147
1153
|
}
|
|
1148
1154
|
//#endregion
|
|
1149
1155
|
//#region src/components/features/filters/partials/regular-filter-content.tsx
|
|
1150
|
-
function
|
|
1151
|
-
let { strings: c, reportError:
|
|
1156
|
+
function at({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onClose: a, triggerSource: s = "chip" }) {
|
|
1157
|
+
let { strings: c, reportError: l } = $(), d = e.multiple === !0 || e.type === Z.MULTI_SELECT, f = s === "toolbar", [p, m] = K(t || []);
|
|
1152
1158
|
U(() => {
|
|
1153
1159
|
m(t || []);
|
|
1154
1160
|
}, [t]);
|
|
@@ -1156,12 +1162,12 @@ function tt({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
1156
1162
|
if (d) {
|
|
1157
1163
|
let e = p.includes(t) ? p.filter((e) => e !== t) : [...p, t];
|
|
1158
1164
|
m(e);
|
|
1159
|
-
} else m([t]), e.closeOnSelect === !0 && (n([t]),
|
|
1165
|
+
} else m([t]), e.closeOnSelect === !0 && (n([t]), a());
|
|
1160
1166
|
}, g = () => {
|
|
1161
1167
|
try {
|
|
1162
|
-
n(p),
|
|
1168
|
+
n(p), a();
|
|
1163
1169
|
} catch (t) {
|
|
1164
|
-
|
|
1170
|
+
l(t, {
|
|
1165
1171
|
phase: "apply",
|
|
1166
1172
|
filterKey: e.key
|
|
1167
1173
|
});
|
|
@@ -1170,8 +1176,8 @@ function tt({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
1170
1176
|
return /* @__PURE__ */ Y("div", {
|
|
1171
1177
|
className: "flex flex-col",
|
|
1172
1178
|
children: [
|
|
1173
|
-
/* @__PURE__ */ J(
|
|
1174
|
-
start: f ? /* @__PURE__ */ J(
|
|
1179
|
+
/* @__PURE__ */ J(R, {
|
|
1180
|
+
start: f ? /* @__PURE__ */ J(i, {
|
|
1175
1181
|
type: "button",
|
|
1176
1182
|
tone: "secondary",
|
|
1177
1183
|
buttonStyle: "ghost",
|
|
@@ -1180,30 +1186,31 @@ function tt({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
1180
1186
|
onClick: r,
|
|
1181
1187
|
className: "shrink-0",
|
|
1182
1188
|
"aria-label": c.backToFilters,
|
|
1183
|
-
children: /* @__PURE__ */ J(
|
|
1189
|
+
children: /* @__PURE__ */ J(_e, {
|
|
1184
1190
|
"aria-hidden": "true",
|
|
1185
1191
|
className: "size-icon-sm rtl:rotate-180"
|
|
1186
1192
|
})
|
|
1187
1193
|
}) : void 0,
|
|
1188
1194
|
children: /* @__PURE__ */ J(o, {
|
|
1189
1195
|
tag: "span",
|
|
1196
|
+
type: "inherit",
|
|
1190
1197
|
weight: "semibold",
|
|
1191
1198
|
children: e.label
|
|
1192
1199
|
})
|
|
1193
1200
|
}),
|
|
1194
|
-
/* @__PURE__ */ Y(
|
|
1201
|
+
/* @__PURE__ */ Y(A, {
|
|
1195
1202
|
inset: "flush",
|
|
1196
1203
|
className: "rounded-none",
|
|
1197
|
-
children: [/* @__PURE__ */ J(
|
|
1204
|
+
children: [/* @__PURE__ */ J(T, { placeholder: X(c.searchPlaceholder, { filterLabel: e.label.toLowerCase() }) }), /* @__PURE__ */ Y(D, {
|
|
1198
1205
|
className: "max-h-64",
|
|
1199
|
-
children: [/* @__PURE__ */ J(
|
|
1206
|
+
children: [/* @__PURE__ */ J(E, { children: /* @__PURE__ */ J(o, {
|
|
1200
1207
|
type: "secondary",
|
|
1201
1208
|
align: "center",
|
|
1202
1209
|
className: "py-space-xl",
|
|
1203
1210
|
children: c.noOptionsFound
|
|
1204
|
-
}) }), /* @__PURE__ */ J(
|
|
1211
|
+
}) }), /* @__PURE__ */ J(O, { children: e.options?.map((e) => {
|
|
1205
1212
|
let t = p.includes(e.value);
|
|
1206
|
-
return /* @__PURE__ */ Y(
|
|
1213
|
+
return /* @__PURE__ */ Y(w, {
|
|
1207
1214
|
onSelect: () => h(e.value),
|
|
1208
1215
|
"data-checked": t || void 0,
|
|
1209
1216
|
disabled: e.disabled,
|
|
@@ -1211,11 +1218,12 @@ function tt({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
1211
1218
|
children: [!!e.icon && /* @__PURE__ */ J("span", {
|
|
1212
1219
|
className: "shrink-0 text-muted-foreground [&_svg]:size-icon",
|
|
1213
1220
|
children: e.icon
|
|
1214
|
-
}), /* @__PURE__ */ Y(
|
|
1221
|
+
}), /* @__PURE__ */ Y(u, {
|
|
1215
1222
|
gap: "dense",
|
|
1216
1223
|
className: "flex min-w-0 flex-1 flex-col leading-tight",
|
|
1217
1224
|
children: [/* @__PURE__ */ J(o, {
|
|
1218
1225
|
tag: "span",
|
|
1226
|
+
type: "inherit",
|
|
1219
1227
|
lineHeight: "tight",
|
|
1220
1228
|
weight: t ? "medium" : "regular",
|
|
1221
1229
|
className: "truncate",
|
|
@@ -1233,12 +1241,12 @@ function tt({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
1233
1241
|
}) })]
|
|
1234
1242
|
})]
|
|
1235
1243
|
}),
|
|
1236
|
-
!!_ && /* @__PURE__ */ J(
|
|
1244
|
+
!!_ && /* @__PURE__ */ J(z, {
|
|
1237
1245
|
caption: X(c.selected, {
|
|
1238
1246
|
count: p.length,
|
|
1239
1247
|
filterLabel: (p.length > 1 ? e.pluralLabel : e.label) ?? e.label
|
|
1240
1248
|
}),
|
|
1241
|
-
children: /* @__PURE__ */ J(
|
|
1249
|
+
children: /* @__PURE__ */ J(i, {
|
|
1242
1250
|
tone: "primary",
|
|
1243
1251
|
size: "sm",
|
|
1244
1252
|
onClick: g,
|
|
@@ -1250,24 +1258,24 @@ function tt({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
1250
1258
|
}
|
|
1251
1259
|
//#endregion
|
|
1252
1260
|
//#region src/components/features/filters/facets/tags-facet.tsx
|
|
1253
|
-
function
|
|
1254
|
-
let { defaultScale: c } =
|
|
1261
|
+
function ot({ filter: t, value: n, onValueChange: a, className: s }) {
|
|
1262
|
+
let { defaultScale: c } = e(), l = N(void 0, c), { strings: d } = $(), [f, p] = K(""), m = H(() => {
|
|
1255
1263
|
let e = f.trim();
|
|
1256
|
-
e && !n.includes(e) && (
|
|
1264
|
+
e && !n.includes(e) && (a([...n, e]), p(""));
|
|
1257
1265
|
}, [
|
|
1258
1266
|
f,
|
|
1259
1267
|
n,
|
|
1260
|
-
|
|
1268
|
+
a
|
|
1261
1269
|
]), h = H((e) => {
|
|
1262
|
-
|
|
1263
|
-
}, [n,
|
|
1270
|
+
a(n.filter((t) => t !== e));
|
|
1271
|
+
}, [n, a]), g = (e) => {
|
|
1264
1272
|
e.key === "Enter" && (e.preventDefault(), m());
|
|
1265
1273
|
}, _ = H(() => {
|
|
1266
|
-
|
|
1267
|
-
}, [
|
|
1274
|
+
a([]), p("");
|
|
1275
|
+
}, [a]), v = n.length > 0, y = n.length === 1 ? d.tag : d.tags, b = v ? /* @__PURE__ */ Y(u, {
|
|
1268
1276
|
gap: "md",
|
|
1269
1277
|
className: "tags-facet--summary",
|
|
1270
|
-
children: [/* @__PURE__ */ Y(
|
|
1278
|
+
children: [/* @__PURE__ */ Y(u, {
|
|
1271
1279
|
direction: "horizontal",
|
|
1272
1280
|
gap: "sm",
|
|
1273
1281
|
justify: "between",
|
|
@@ -1279,9 +1287,9 @@ function nt({ filter: e, value: n, onValueChange: i, className: a }) {
|
|
|
1279
1287
|
children: [
|
|
1280
1288
|
n.length,
|
|
1281
1289
|
" ",
|
|
1282
|
-
|
|
1290
|
+
y
|
|
1283
1291
|
]
|
|
1284
|
-
}), /* @__PURE__ */ J(
|
|
1292
|
+
}), /* @__PURE__ */ J(i, {
|
|
1285
1293
|
onClick: _,
|
|
1286
1294
|
tone: "secondary",
|
|
1287
1295
|
buttonStyle: "ghost",
|
|
@@ -1291,10 +1299,10 @@ function nt({ filter: e, value: n, onValueChange: i, className: a }) {
|
|
|
1291
1299
|
"aria-label": d.clearAll,
|
|
1292
1300
|
children: d.clearAll
|
|
1293
1301
|
})]
|
|
1294
|
-
}), /* @__PURE__ */ J(
|
|
1302
|
+
}), /* @__PURE__ */ J(u, {
|
|
1295
1303
|
direction: "horizontal",
|
|
1296
1304
|
gap: "md",
|
|
1297
|
-
children: n.map((e) => /* @__PURE__ */ Y(
|
|
1305
|
+
children: n.map((e) => /* @__PURE__ */ Y(x, {
|
|
1298
1306
|
tone: "secondary",
|
|
1299
1307
|
className: "flex items-center gap-space-sm py-space-2xs pl-space-md pr-space-sm",
|
|
1300
1308
|
children: [/* @__PURE__ */ J(o, {
|
|
@@ -1303,75 +1311,75 @@ function nt({ filter: e, value: n, onValueChange: i, className: a }) {
|
|
|
1303
1311
|
children: e
|
|
1304
1312
|
}), /* @__PURE__ */ J("button", {
|
|
1305
1313
|
onClick: () => h(e),
|
|
1306
|
-
className: r(
|
|
1314
|
+
className: r(C.target, C.focus, C.toggle),
|
|
1307
1315
|
type: "button",
|
|
1308
1316
|
"aria-label": `${d.removeTag} ${e}`,
|
|
1309
|
-
children: /* @__PURE__ */ J(
|
|
1310
|
-
className:
|
|
1317
|
+
children: /* @__PURE__ */ J(Se, {
|
|
1318
|
+
className: C.icon,
|
|
1311
1319
|
"aria-hidden": "true"
|
|
1312
1320
|
})
|
|
1313
1321
|
})]
|
|
1314
1322
|
}, e))
|
|
1315
1323
|
})]
|
|
1316
1324
|
}) : null;
|
|
1317
|
-
return /* @__PURE__ */ Y(
|
|
1325
|
+
return /* @__PURE__ */ Y(u, {
|
|
1318
1326
|
gap: "lg",
|
|
1319
|
-
className: r("tags-facet--component",
|
|
1320
|
-
children: [/* @__PURE__ */ Y(
|
|
1327
|
+
className: r("tags-facet--component", s),
|
|
1328
|
+
children: [/* @__PURE__ */ Y(u, {
|
|
1321
1329
|
direction: "horizontal",
|
|
1322
1330
|
gap: "md",
|
|
1323
1331
|
wrap: !1,
|
|
1324
1332
|
children: [/* @__PURE__ */ J("div", {
|
|
1325
1333
|
className: "relative flex-1",
|
|
1326
|
-
children: /* @__PURE__ */ J(
|
|
1334
|
+
children: /* @__PURE__ */ J(P, {
|
|
1327
1335
|
type: "text",
|
|
1328
1336
|
value: f,
|
|
1329
1337
|
onChange: (e) => p(e.target.value),
|
|
1330
1338
|
onKeyDown: g,
|
|
1331
|
-
placeholder:
|
|
1339
|
+
placeholder: t.placeholder ?? d.enterTag
|
|
1332
1340
|
})
|
|
1333
|
-
}), /* @__PURE__ */ Y(
|
|
1341
|
+
}), /* @__PURE__ */ Y(i, {
|
|
1334
1342
|
tone: "primary",
|
|
1335
1343
|
onClick: m,
|
|
1336
1344
|
disabled: !f.trim(),
|
|
1337
|
-
size:
|
|
1345
|
+
size: l,
|
|
1338
1346
|
iconOnly: !0,
|
|
1339
|
-
className: r(
|
|
1347
|
+
className: r(j[l], B[l]),
|
|
1340
1348
|
type: "button",
|
|
1341
|
-
children: [/* @__PURE__ */ J(
|
|
1349
|
+
children: [/* @__PURE__ */ J(xe, { className: "size-icon" }), /* @__PURE__ */ J(o, {
|
|
1342
1350
|
tag: "span",
|
|
1343
1351
|
size: "pxs",
|
|
1344
1352
|
className: "sr-only",
|
|
1345
1353
|
children: d.addTag
|
|
1346
1354
|
})]
|
|
1347
1355
|
})]
|
|
1348
|
-
}),
|
|
1356
|
+
}), b]
|
|
1349
1357
|
});
|
|
1350
1358
|
}
|
|
1351
|
-
var
|
|
1352
|
-
|
|
1359
|
+
var st = V.memo(ot);
|
|
1360
|
+
st.displayName = "TagsFacet";
|
|
1353
1361
|
//#endregion
|
|
1354
1362
|
//#region src/components/features/filters/partials/tags-filter-content.tsx
|
|
1355
|
-
function
|
|
1356
|
-
let { strings:
|
|
1363
|
+
function ct({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onClose: a, triggerSource: o = "chip" }) {
|
|
1364
|
+
let { strings: s, reportError: c } = $(), [l, u] = K(t || []), d = o === "toolbar", f = l.length === 1 ? s.tag : s.tags;
|
|
1357
1365
|
U(() => {
|
|
1358
1366
|
u(t || []);
|
|
1359
1367
|
}, [t]);
|
|
1360
|
-
let
|
|
1368
|
+
let p = () => {
|
|
1361
1369
|
try {
|
|
1362
|
-
n(l),
|
|
1370
|
+
n(l), a();
|
|
1363
1371
|
} catch (t) {
|
|
1364
1372
|
c(t, {
|
|
1365
1373
|
phase: "apply",
|
|
1366
1374
|
filterKey: e.key
|
|
1367
1375
|
});
|
|
1368
1376
|
}
|
|
1369
|
-
},
|
|
1377
|
+
}, m = JSON.stringify(l.slice().sort()) !== JSON.stringify((t ?? []).slice().sort());
|
|
1370
1378
|
return /* @__PURE__ */ Y("div", {
|
|
1371
1379
|
className: "flex flex-col",
|
|
1372
1380
|
children: [
|
|
1373
|
-
/* @__PURE__ */ J(
|
|
1374
|
-
start: d ? /* @__PURE__ */ J(
|
|
1381
|
+
/* @__PURE__ */ J(R, {
|
|
1382
|
+
start: d ? /* @__PURE__ */ J(i, {
|
|
1375
1383
|
type: "button",
|
|
1376
1384
|
tone: "secondary",
|
|
1377
1385
|
buttonStyle: "ghost",
|
|
@@ -1379,24 +1387,24 @@ function it({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
1379
1387
|
iconOnly: !0,
|
|
1380
1388
|
onClick: r,
|
|
1381
1389
|
className: "shrink-0",
|
|
1382
|
-
"aria-label":
|
|
1383
|
-
children: /* @__PURE__ */ J(
|
|
1390
|
+
"aria-label": s.backToFilters,
|
|
1391
|
+
children: /* @__PURE__ */ J(_e, {
|
|
1384
1392
|
"aria-hidden": "true",
|
|
1385
1393
|
className: "size-icon-sm rtl:rotate-180"
|
|
1386
1394
|
})
|
|
1387
1395
|
}) : void 0,
|
|
1388
|
-
children: /* @__PURE__ */ J(
|
|
1396
|
+
children: /* @__PURE__ */ J(I, { children: e.label })
|
|
1389
1397
|
}),
|
|
1390
1398
|
/* @__PURE__ */ J("div", {
|
|
1391
1399
|
className: "p-surface",
|
|
1392
|
-
children: /* @__PURE__ */ J(
|
|
1400
|
+
children: /* @__PURE__ */ J(st, {
|
|
1393
1401
|
filter: e,
|
|
1394
1402
|
value: l,
|
|
1395
1403
|
onValueChange: u
|
|
1396
1404
|
})
|
|
1397
1405
|
}),
|
|
1398
|
-
!!
|
|
1399
|
-
caption: /* @__PURE__ */ Y(
|
|
1406
|
+
!!m && /* @__PURE__ */ J(z, {
|
|
1407
|
+
caption: /* @__PURE__ */ Y(g, {
|
|
1400
1408
|
size: "xs",
|
|
1401
1409
|
className: "tabular-nums",
|
|
1402
1410
|
children: [
|
|
@@ -1405,11 +1413,11 @@ function it({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
1405
1413
|
f
|
|
1406
1414
|
]
|
|
1407
1415
|
}),
|
|
1408
|
-
children: /* @__PURE__ */ J(
|
|
1416
|
+
children: /* @__PURE__ */ J(i, {
|
|
1409
1417
|
tone: "primary",
|
|
1410
1418
|
size: "sm",
|
|
1411
|
-
onClick:
|
|
1412
|
-
children:
|
|
1419
|
+
onClick: p,
|
|
1420
|
+
children: s.confirm
|
|
1413
1421
|
})
|
|
1414
1422
|
})
|
|
1415
1423
|
]
|
|
@@ -1417,45 +1425,45 @@ function it({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
1417
1425
|
}
|
|
1418
1426
|
//#endregion
|
|
1419
1427
|
//#region src/components/features/filters/partials/filter-popover-content.tsx
|
|
1420
|
-
function
|
|
1421
|
-
let { strings: d } = $(), f = e?.type === Z.DATE || e?.type === Z.TAGS ? "w-auto min-w-80 gap-0 overflow-hidden" : e?.type
|
|
1428
|
+
function lt({ activeFilterInPopover: e, availableFilters: t, activeFilters: n, getFilterValue: i, setFilterValue: a, onFilterSelect: o, onBackToFilterList: s, onClose: c, triggerSource: l = "chip", finalFocus: u }) {
|
|
1429
|
+
let { strings: d } = $(), f = e?.type === Z.DATE || e?.type === Z.TAGS ? "w-auto min-w-80 gap-0 overflow-hidden" : (e?.type, Z.ASYNC_SELECT, r(m.md, "gap-0 overflow-hidden")), p = (e, t) => {
|
|
1422
1430
|
a(e, t);
|
|
1423
1431
|
};
|
|
1424
|
-
return /* @__PURE__ */ J(
|
|
1432
|
+
return /* @__PURE__ */ J(te, {
|
|
1425
1433
|
finalFocus: u,
|
|
1426
1434
|
type: e?.type === Z.DATE || e?.type === Z.TAGS ? "display" : "menu",
|
|
1427
1435
|
"aria-label": e?.label ?? d.addFilter,
|
|
1428
1436
|
inset: "flush",
|
|
1429
1437
|
className: r("filter-popover-content--component", f),
|
|
1430
1438
|
align: "start",
|
|
1431
|
-
children: e ? e.type === Z.DATE ? /* @__PURE__ */ J(
|
|
1439
|
+
children: e ? e.type === Z.DATE ? /* @__PURE__ */ J(et, {
|
|
1432
1440
|
filter: e,
|
|
1433
1441
|
value: i(e.key),
|
|
1434
1442
|
onFilterChange: (t) => p(e.key, t),
|
|
1435
1443
|
onBackToFilterList: s,
|
|
1436
1444
|
triggerSource: l
|
|
1437
|
-
}) : e.type === Z.TAGS ? /* @__PURE__ */ J(
|
|
1445
|
+
}) : e.type === Z.TAGS ? /* @__PURE__ */ J(ct, {
|
|
1438
1446
|
filter: e,
|
|
1439
1447
|
value: i(e.key),
|
|
1440
1448
|
onFilterChange: (t) => p(e.key, t),
|
|
1441
1449
|
onBackToFilterList: s,
|
|
1442
1450
|
onClose: c,
|
|
1443
1451
|
triggerSource: l
|
|
1444
|
-
}) : e.type === Z.ASYNC_SELECT ? /* @__PURE__ */ J(
|
|
1452
|
+
}) : e.type === Z.ASYNC_SELECT ? /* @__PURE__ */ J(Ze, {
|
|
1445
1453
|
filter: e,
|
|
1446
1454
|
value: i(e.key),
|
|
1447
1455
|
onFilterChange: (t) => p(e.key, t),
|
|
1448
1456
|
onBackToFilterList: s,
|
|
1449
1457
|
onClose: c,
|
|
1450
1458
|
triggerSource: l
|
|
1451
|
-
}) : /* @__PURE__ */ J(
|
|
1459
|
+
}) : /* @__PURE__ */ J(at, {
|
|
1452
1460
|
filter: e,
|
|
1453
1461
|
value: i(e.key),
|
|
1454
1462
|
onFilterChange: (t) => p(e.key, t),
|
|
1455
1463
|
onBackToFilterList: s,
|
|
1456
1464
|
onClose: c,
|
|
1457
1465
|
triggerSource: l
|
|
1458
|
-
}) : /* @__PURE__ */ J(
|
|
1466
|
+
}) : /* @__PURE__ */ J(it, {
|
|
1459
1467
|
availableFilters: t,
|
|
1460
1468
|
activeFilters: n,
|
|
1461
1469
|
onFilterSelect: o
|
|
@@ -1464,24 +1472,24 @@ function at({ activeFilterInPopover: e, availableFilters: t, activeFilters: n, g
|
|
|
1464
1472
|
}
|
|
1465
1473
|
//#endregion
|
|
1466
1474
|
//#region src/components/features/filters/partials/filter-pill.tsx
|
|
1467
|
-
function
|
|
1475
|
+
function ut({ filter: e, value: t, active: n, operator: r, operators: i, onOperatorChange: a, onValueChange: o, onClear: s, availableFilters: c, activeFilters: l, operatorChangeRef: u }) {
|
|
1468
1476
|
let d = G(!1), f = u ?? d, [p, m] = K(!1), h = G(null), g = G(null);
|
|
1469
|
-
return /* @__PURE__ */ J(
|
|
1477
|
+
return /* @__PURE__ */ J(nt, {
|
|
1470
1478
|
filterKey: e.key,
|
|
1471
|
-
children: /* @__PURE__ */ Y(
|
|
1479
|
+
children: /* @__PURE__ */ Y(ee, {
|
|
1472
1480
|
open: p,
|
|
1473
1481
|
onOpenChange: (e) => {
|
|
1474
1482
|
e && f.current || m(e);
|
|
1475
1483
|
},
|
|
1476
1484
|
children: [/* @__PURE__ */ Y("div", {
|
|
1477
1485
|
className: "filter-pill--component filter-pill--anchor relative",
|
|
1478
|
-
children: [/* @__PURE__ */ J(
|
|
1486
|
+
children: [/* @__PURE__ */ J(L, {
|
|
1479
1487
|
render: /* @__PURE__ */ J("span", {}),
|
|
1480
1488
|
nativeButton: !1,
|
|
1481
1489
|
tabIndex: -1,
|
|
1482
1490
|
"aria-hidden": "true",
|
|
1483
1491
|
className: "pointer-events-none absolute inset-0"
|
|
1484
|
-
}), /* @__PURE__ */ J(
|
|
1492
|
+
}), /* @__PURE__ */ J(Je, {
|
|
1485
1493
|
filter: e,
|
|
1486
1494
|
popoverOpen: p,
|
|
1487
1495
|
triggerRef: h,
|
|
@@ -1501,7 +1509,7 @@ function ot({ filter: e, value: t, active: n, operator: r, operators: i, onOpera
|
|
|
1501
1509
|
f.current || (g.current = e?.currentTarget ?? h.current, m(!0));
|
|
1502
1510
|
}
|
|
1503
1511
|
})]
|
|
1504
|
-
}), /* @__PURE__ */ J(
|
|
1512
|
+
}), /* @__PURE__ */ J(lt, {
|
|
1505
1513
|
finalFocus: g,
|
|
1506
1514
|
activeFilterInPopover: e,
|
|
1507
1515
|
availableFilters: c,
|
|
@@ -1516,33 +1524,33 @@ function ot({ filter: e, value: t, active: n, operator: r, operators: i, onOpera
|
|
|
1516
1524
|
})
|
|
1517
1525
|
});
|
|
1518
1526
|
}
|
|
1519
|
-
|
|
1527
|
+
ut.displayName = "FilterPill";
|
|
1520
1528
|
//#endregion
|
|
1521
1529
|
//#region src/components/features/filters/partials/filters-button.tsx
|
|
1522
|
-
function
|
|
1523
|
-
let { defaultScale: u } =
|
|
1530
|
+
function dt({ triggerRef: t, availableFilters: n, activeFilters: a, activeFilterInPopover: o, getFilterValue: s, setFilterValue: c, setActiveFilterInPopover: l }) {
|
|
1531
|
+
let { defaultScale: u } = e(), d = N(void 0, u), [f, p] = K(!1), { strings: m } = $();
|
|
1524
1532
|
return U(() => {
|
|
1525
1533
|
f || l(null);
|
|
1526
|
-
}, [f, l]), /* @__PURE__ */ Y(
|
|
1534
|
+
}, [f, l]), /* @__PURE__ */ Y(ee, {
|
|
1527
1535
|
open: f,
|
|
1528
1536
|
onOpenChange: p,
|
|
1529
|
-
children: [/* @__PURE__ */ J(
|
|
1537
|
+
children: [/* @__PURE__ */ J(L, {
|
|
1530
1538
|
asChild: !0,
|
|
1531
|
-
children: /* @__PURE__ */ J(
|
|
1532
|
-
ref:
|
|
1539
|
+
children: /* @__PURE__ */ J(i, {
|
|
1540
|
+
ref: t,
|
|
1533
1541
|
tone: "secondary",
|
|
1534
1542
|
buttonStyle: "outline",
|
|
1535
1543
|
size: d,
|
|
1536
1544
|
iconOnly: !0,
|
|
1537
1545
|
"aria-label": m.addFilter,
|
|
1538
|
-
className: r("filters-button--component shrink-0",
|
|
1539
|
-
children: /* @__PURE__ */ J(
|
|
1546
|
+
className: r("filters-button--component shrink-0", j[d], B[d]),
|
|
1547
|
+
children: /* @__PURE__ */ J(ye, { className: "size-icon-sm" })
|
|
1540
1548
|
})
|
|
1541
|
-
}), /* @__PURE__ */ J(
|
|
1542
|
-
activeFilterInPopover:
|
|
1549
|
+
}), /* @__PURE__ */ J(lt, {
|
|
1550
|
+
activeFilterInPopover: o,
|
|
1543
1551
|
availableFilters: n,
|
|
1544
|
-
activeFilters:
|
|
1545
|
-
getFilterValue:
|
|
1552
|
+
activeFilters: a,
|
|
1553
|
+
getFilterValue: s,
|
|
1546
1554
|
setFilterValue: c,
|
|
1547
1555
|
onFilterSelect: (e) => {
|
|
1548
1556
|
l(e);
|
|
@@ -1559,28 +1567,28 @@ function st({ triggerRef: e, availableFilters: n, activeFilters: i, activeFilter
|
|
|
1559
1567
|
}
|
|
1560
1568
|
//#endregion
|
|
1561
1569
|
//#region src/components/features/filters/partials/filter-tabs.tsx
|
|
1562
|
-
function
|
|
1563
|
-
let { activeFilters: t, filters: n, replaceFilters:
|
|
1570
|
+
function ft({ tabs: e }) {
|
|
1571
|
+
let { activeFilters: t, filters: n, replaceFilters: r } = $(), i = W(() => t.filter((e) => n.find((t) => t.key === e.key)?.type !== Z.SEARCH), [t, n]), a = W(() => t.filter((e) => n.find((t) => t.key === e.key)?.type === Z.SEARCH), [t, n]), s = W(() => {
|
|
1564
1572
|
for (let t of e) {
|
|
1565
1573
|
if (t.presets.length === 0) {
|
|
1566
|
-
if (
|
|
1574
|
+
if (i.length === 0) return t.id;
|
|
1567
1575
|
continue;
|
|
1568
1576
|
}
|
|
1569
|
-
if (t.presets.length ===
|
|
1570
|
-
let t =
|
|
1577
|
+
if (t.presets.length === i.length && t.presets.every((e) => {
|
|
1578
|
+
let t = i.find((t) => t.key === e.key);
|
|
1571
1579
|
if (!t) return !1;
|
|
1572
1580
|
let n = [...e.value].sort(), r = [...t.value].sort();
|
|
1573
1581
|
return !(n.length !== r.length || n.some((e, t) => e !== r[t]) || e.operator && t.operator !== e.operator);
|
|
1574
1582
|
})) return t.id;
|
|
1575
1583
|
}
|
|
1576
1584
|
return null;
|
|
1577
|
-
}, [e,
|
|
1585
|
+
}, [e, i]), c = H((e) => {
|
|
1578
1586
|
if (e.presets.length === 0) {
|
|
1579
|
-
|
|
1587
|
+
r([...a]);
|
|
1580
1588
|
return;
|
|
1581
1589
|
}
|
|
1582
1590
|
let t = e.presets.map((e) => {
|
|
1583
|
-
let t = n.find((t) => t.key === e.key), r = e.operator ?? t?.operator ?? (t ?
|
|
1591
|
+
let t = n.find((t) => t.key === e.key), r = e.operator ?? t?.operator ?? (t ? Fe(t.type) : "equals");
|
|
1584
1592
|
return {
|
|
1585
1593
|
id: e.key,
|
|
1586
1594
|
key: e.key,
|
|
@@ -1588,33 +1596,34 @@ function ct({ tabs: e }) {
|
|
|
1588
1596
|
operator: r
|
|
1589
1597
|
};
|
|
1590
1598
|
});
|
|
1591
|
-
|
|
1599
|
+
r([...a, ...t]);
|
|
1592
1600
|
}, [
|
|
1593
1601
|
n,
|
|
1594
|
-
|
|
1595
|
-
|
|
1602
|
+
a,
|
|
1603
|
+
r
|
|
1596
1604
|
]);
|
|
1597
|
-
return e.length === 0 ? null : /* @__PURE__ */ J(
|
|
1598
|
-
value:
|
|
1605
|
+
return e.length === 0 ? null : /* @__PURE__ */ J(oe, {
|
|
1606
|
+
value: s,
|
|
1599
1607
|
onValueChange: (t) => {
|
|
1600
1608
|
let n = e.find((e) => e.id === t);
|
|
1601
|
-
n &&
|
|
1609
|
+
n && c(n);
|
|
1602
1610
|
},
|
|
1603
1611
|
className: "filter-tabs--component",
|
|
1604
|
-
children: /* @__PURE__ */ J(
|
|
1612
|
+
children: /* @__PURE__ */ J(ae, {
|
|
1613
|
+
variant: "chips",
|
|
1605
1614
|
role: "group",
|
|
1606
1615
|
"aria-orientation": void 0,
|
|
1607
1616
|
activateOnFocus: !0,
|
|
1608
|
-
className: "
|
|
1617
|
+
className: "gap-space-md",
|
|
1609
1618
|
children: e.map((e) => {
|
|
1610
|
-
let t =
|
|
1611
|
-
return /* @__PURE__ */ Y(
|
|
1619
|
+
let t = s === e.id;
|
|
1620
|
+
return /* @__PURE__ */ Y(ie, {
|
|
1612
1621
|
value: e.id,
|
|
1613
1622
|
role: "button",
|
|
1614
1623
|
"aria-selected": void 0,
|
|
1615
1624
|
"aria-controls": void 0,
|
|
1616
1625
|
"aria-pressed": t,
|
|
1617
|
-
className:
|
|
1626
|
+
className: "filter-tabs--tab",
|
|
1618
1627
|
children: [/* @__PURE__ */ J(o, {
|
|
1619
1628
|
tag: "span",
|
|
1620
1629
|
weight: "medium",
|
|
@@ -1634,14 +1643,14 @@ function ct({ tabs: e }) {
|
|
|
1634
1643
|
}
|
|
1635
1644
|
//#endregion
|
|
1636
1645
|
//#region src/components/features/filters/facets/search-facet.tsx
|
|
1637
|
-
var
|
|
1638
|
-
return /* @__PURE__ */ J(
|
|
1646
|
+
var pt = V.forwardRef(function(e, t) {
|
|
1647
|
+
return /* @__PURE__ */ J(be, {
|
|
1639
1648
|
...e,
|
|
1640
1649
|
ref: t,
|
|
1641
1650
|
className: r("animate-spin", e.className)
|
|
1642
1651
|
});
|
|
1643
1652
|
});
|
|
1644
|
-
function
|
|
1653
|
+
function mt({ filter: e, value: t, onValueChange: n, className: i }) {
|
|
1645
1654
|
let { strings: a, isNavigating: o } = $(), [s, c] = K(t[0] || ""), l = G(s);
|
|
1646
1655
|
U(() => {
|
|
1647
1656
|
l.current = s;
|
|
@@ -1656,14 +1665,14 @@ function ut({ filter: e, value: t, onValueChange: n, className: i }) {
|
|
|
1656
1665
|
}
|
|
1657
1666
|
t[0] !== void 0 && t[0] !== e && t[0] !== u.current && (c(t[0]), u.current = t[0]);
|
|
1658
1667
|
}, [t, o]);
|
|
1659
|
-
let f =
|
|
1668
|
+
let f = ce((e) => {
|
|
1660
1669
|
u.current = e, d.current = !1, n([e]);
|
|
1661
1670
|
}, e.delay ?? 300), p = (e) => {
|
|
1662
1671
|
u.current !== e && f(e);
|
|
1663
1672
|
};
|
|
1664
1673
|
return /* @__PURE__ */ J("div", {
|
|
1665
1674
|
className: r("search-facet--component", "search-facet relative w-full min-w-0 rounded-inner bg-background", i),
|
|
1666
|
-
children: /* @__PURE__ */ J(
|
|
1675
|
+
children: /* @__PURE__ */ J(P, {
|
|
1667
1676
|
type: "text",
|
|
1668
1677
|
"aria-label": e.label,
|
|
1669
1678
|
value: s,
|
|
@@ -1685,20 +1694,20 @@ function ut({ filter: e, value: t, onValueChange: n, className: i }) {
|
|
|
1685
1694
|
return !t || t === "search" ? X(a.searchPlaceholder, { filterLabel: "" }).replace(/\s+([….?!])/g, "$1").replace(/\s{2,}/g, " ").trim() : X(a.searchPlaceholder, { filterLabel: t });
|
|
1686
1695
|
})(),
|
|
1687
1696
|
clearable: s.trim() !== "" && !o,
|
|
1688
|
-
endIcon: o ?
|
|
1697
|
+
endIcon: o ? pt : void 0,
|
|
1689
1698
|
strings: { clear: a.clearSearch }
|
|
1690
1699
|
})
|
|
1691
1700
|
});
|
|
1692
1701
|
}
|
|
1693
|
-
var
|
|
1694
|
-
|
|
1702
|
+
var ht = V.memo(mt);
|
|
1703
|
+
ht.displayName = "SearchFacet";
|
|
1695
1704
|
//#endregion
|
|
1696
1705
|
//#region src/components/features/filters/partials/search-filters-list.tsx
|
|
1697
|
-
function
|
|
1698
|
-
return /* @__PURE__ */ J(q, { children: e.map((e) => /* @__PURE__ */ Y(
|
|
1706
|
+
function gt({ filters: e, getFilterValue: t, setFilterValue: n, className: i }) {
|
|
1707
|
+
return /* @__PURE__ */ J(q, { children: e.map((e) => /* @__PURE__ */ Y(u, {
|
|
1699
1708
|
gap: "lg",
|
|
1700
1709
|
className: r("search-filters-list--component", "w-full min-w-0 sm:w-64 sm:flex-none", e.displayConfig.className, i),
|
|
1701
|
-
children: [/* @__PURE__ */ J(
|
|
1710
|
+
children: [/* @__PURE__ */ J(ht, {
|
|
1702
1711
|
filter: e,
|
|
1703
1712
|
value: t(e.key),
|
|
1704
1713
|
onValueChange: (t) => n(e.key, t)
|
|
@@ -1711,15 +1720,15 @@ function ft({ filters: e, getFilterValue: t, setFilterValue: n, className: i })
|
|
|
1711
1720
|
}
|
|
1712
1721
|
//#endregion
|
|
1713
1722
|
//#region src/components/features/filters/filter-layout.tsx
|
|
1714
|
-
var
|
|
1723
|
+
var _t = {
|
|
1715
1724
|
compact: "lg",
|
|
1716
1725
|
default: "xl"
|
|
1717
|
-
},
|
|
1726
|
+
}, vt = {
|
|
1718
1727
|
compact: "sm",
|
|
1719
1728
|
default: "md"
|
|
1720
1729
|
};
|
|
1721
|
-
function
|
|
1722
|
-
let { getFilterValue:
|
|
1730
|
+
function yt({ className: e, dynamicFilterOptions: t = {}, loadingFilters: n = {}, variant: a = "default", showClearFilters: s = !1, tabs: c }) {
|
|
1731
|
+
let { getFilterValue: l, setFilterValue: d, isFilterActive: f, clearFilters: p, getFilterOperator: m, setFilterOperator: h, isNavigating: g, strings: _ } = $(), { processedFilters: v, searchFilters: y, alwaysVisibleFilters: b, activeRegularFilters: x, popoverFilters: S, hasActive: C } = ze({ dynamicFilterOptions: t }), [w, T] = K(null), E = v.find((e) => e.key === w) ?? null, D = H((e) => {
|
|
1723
1732
|
T(e?.key ?? null);
|
|
1724
1733
|
}, []);
|
|
1725
1734
|
U(() => {
|
|
@@ -1734,23 +1743,23 @@ function ht({ className: e, dynamicFilterOptions: t = {}, loadingFilters: n = {}
|
|
|
1734
1743
|
e !== null && !f(e) && (O.current?.focus(), k.current = null);
|
|
1735
1744
|
}, [f]);
|
|
1736
1745
|
function j(e) {
|
|
1737
|
-
return e.operators && e.operators.length > 0 ? e.operators :
|
|
1746
|
+
return e.operators && e.operators.length > 0 ? e.operators : Pe(e.type, _.operators);
|
|
1738
1747
|
}
|
|
1739
1748
|
function M(e, t) {
|
|
1740
1749
|
h(e, t);
|
|
1741
1750
|
}
|
|
1742
|
-
return /* @__PURE__ */ Y(
|
|
1743
|
-
gap:
|
|
1751
|
+
return /* @__PURE__ */ Y(u, {
|
|
1752
|
+
gap: _t[a],
|
|
1744
1753
|
className: r("filter-layout--component", e),
|
|
1745
|
-
children: [!!c && c.length > 0 && /* @__PURE__ */ J(
|
|
1754
|
+
children: [!!c && c.length > 0 && /* @__PURE__ */ J(ft, { tabs: c }), /* @__PURE__ */ Y(u, {
|
|
1746
1755
|
direction: "horizontal",
|
|
1747
1756
|
align: "center",
|
|
1748
|
-
gap:
|
|
1749
|
-
children: [/* @__PURE__ */ J(
|
|
1757
|
+
gap: vt[a],
|
|
1758
|
+
children: [/* @__PURE__ */ J(nt, {
|
|
1750
1759
|
filterKey: "search-filters",
|
|
1751
|
-
children: /* @__PURE__ */ J(
|
|
1760
|
+
children: /* @__PURE__ */ J(gt, {
|
|
1752
1761
|
filters: y,
|
|
1753
|
-
getFilterValue:
|
|
1762
|
+
getFilterValue: l,
|
|
1754
1763
|
setFilterValue: d
|
|
1755
1764
|
})
|
|
1756
1765
|
}), /* @__PURE__ */ Y("div", {
|
|
@@ -1758,7 +1767,7 @@ function ht({ className: e, dynamicFilterOptions: t = {}, loadingFilters: n = {}
|
|
|
1758
1767
|
children: [
|
|
1759
1768
|
Object.entries(n).filter(([, e]) => e).map(([e]) => {
|
|
1760
1769
|
let t = v.find((t) => t.key === e)?.label || e;
|
|
1761
|
-
return /* @__PURE__ */ Y(
|
|
1770
|
+
return /* @__PURE__ */ Y(u, {
|
|
1762
1771
|
direction: "horizontal",
|
|
1763
1772
|
gap: "sm",
|
|
1764
1773
|
wrap: !1,
|
|
@@ -1770,9 +1779,9 @@ function ht({ className: e, dynamicFilterOptions: t = {}, loadingFilters: n = {}
|
|
|
1770
1779
|
})]
|
|
1771
1780
|
}, `loading-${e}`);
|
|
1772
1781
|
}),
|
|
1773
|
-
[...b, ...x].map((e) => /* @__PURE__ */ J(
|
|
1782
|
+
[...b, ...x].map((e) => /* @__PURE__ */ J(ut, {
|
|
1774
1783
|
filter: e,
|
|
1775
|
-
value:
|
|
1784
|
+
value: l(e.key) ?? [],
|
|
1776
1785
|
active: f(e.key),
|
|
1777
1786
|
operator: m(e.key) || "equals",
|
|
1778
1787
|
operators: j(e),
|
|
@@ -1782,19 +1791,19 @@ function ht({ className: e, dynamicFilterOptions: t = {}, loadingFilters: n = {}
|
|
|
1782
1791
|
availableFilters: S,
|
|
1783
1792
|
activeFilters: [...x, ...b]
|
|
1784
1793
|
}, e.key)),
|
|
1785
|
-
S.length > 0 && /* @__PURE__ */ J(
|
|
1794
|
+
S.length > 0 && /* @__PURE__ */ J(nt, {
|
|
1786
1795
|
filterKey: "filters-button",
|
|
1787
|
-
children: /* @__PURE__ */ J(
|
|
1796
|
+
children: /* @__PURE__ */ J(dt, {
|
|
1788
1797
|
triggerRef: O,
|
|
1789
1798
|
availableFilters: S,
|
|
1790
1799
|
activeFilters: x,
|
|
1791
1800
|
activeFilterInPopover: E,
|
|
1792
|
-
getFilterValue:
|
|
1801
|
+
getFilterValue: l,
|
|
1793
1802
|
setFilterValue: d,
|
|
1794
1803
|
setActiveFilterInPopover: D
|
|
1795
1804
|
})
|
|
1796
1805
|
}),
|
|
1797
|
-
!!
|
|
1806
|
+
!!s && C && /* @__PURE__ */ J(i, {
|
|
1798
1807
|
tone: "secondary",
|
|
1799
1808
|
buttonStyle: "ghost",
|
|
1800
1809
|
onClick: p,
|
|
@@ -1808,8 +1817,8 @@ function ht({ className: e, dynamicFilterOptions: t = {}, loadingFilters: n = {}
|
|
|
1808
1817
|
}
|
|
1809
1818
|
//#endregion
|
|
1810
1819
|
//#region src/components/features/filters/filter-query.ts
|
|
1811
|
-
var
|
|
1812
|
-
function
|
|
1820
|
+
var bt = "__op", xt = ["page"], St = new Set(Object.values(Q));
|
|
1821
|
+
function Ct(e) {
|
|
1813
1822
|
let t = {};
|
|
1814
1823
|
if (!e) return t;
|
|
1815
1824
|
if (e instanceof URLSearchParams) return e.forEach((e, n) => {
|
|
@@ -1821,79 +1830,79 @@ function yt(e) {
|
|
|
1821
1830
|
}
|
|
1822
1831
|
return t;
|
|
1823
1832
|
}
|
|
1824
|
-
function
|
|
1833
|
+
function wt(e) {
|
|
1825
1834
|
let t = {};
|
|
1826
1835
|
for (let [n, r] of Object.entries(e)) r.length !== 0 && (t[n] = r.length === 1 ? r[0] : r);
|
|
1827
1836
|
return t;
|
|
1828
1837
|
}
|
|
1829
|
-
function
|
|
1838
|
+
function Tt(e, t, n) {
|
|
1830
1839
|
let r = e[t] ?? [];
|
|
1831
1840
|
return n === "comma" ? r.flatMap((e) => e.split(",")) : r;
|
|
1832
1841
|
}
|
|
1833
|
-
function
|
|
1842
|
+
function Et(e, t) {
|
|
1834
1843
|
return t.map((e) => e.trim()).filter((e) => e.length > 0).map((t) => {
|
|
1835
1844
|
if (!e.parse) return t;
|
|
1836
1845
|
let n = e.parse(t);
|
|
1837
1846
|
return n == null ? "" : String(n);
|
|
1838
1847
|
}).filter((e) => e.length > 0);
|
|
1839
1848
|
}
|
|
1840
|
-
function
|
|
1849
|
+
function Dt(e, t) {
|
|
1841
1850
|
return t.map((t) => {
|
|
1842
1851
|
let n = e.transform ? e.transform(t) : t, r = e.format ? e.format(n) : n;
|
|
1843
1852
|
return r == null ? "" : String(r);
|
|
1844
1853
|
}).filter((e) => e.length > 0);
|
|
1845
1854
|
}
|
|
1846
|
-
function
|
|
1847
|
-
return e.operator ?? e.operators?.[0]?.value ??
|
|
1855
|
+
function Ot(e) {
|
|
1856
|
+
return e.operator ?? e.operators?.[0]?.value ?? Fe(e.type);
|
|
1848
1857
|
}
|
|
1849
|
-
function
|
|
1858
|
+
function kt(e, t, n) {
|
|
1850
1859
|
let [r] = t[`${e.key}${n}`] ?? [];
|
|
1851
|
-
return r &&
|
|
1860
|
+
return r && St.has(r) ? r : Ot(e);
|
|
1852
1861
|
}
|
|
1853
|
-
function
|
|
1862
|
+
function At(e, t, n) {
|
|
1854
1863
|
return e === "always" || e !== "never" && t !== n;
|
|
1855
1864
|
}
|
|
1856
|
-
function
|
|
1865
|
+
function jt(e) {
|
|
1857
1866
|
return e.type === Z.MULTI_SELECT || e.type === Z.TAGS || e.multiple === !0;
|
|
1858
1867
|
}
|
|
1859
|
-
function
|
|
1860
|
-
let r = n.operatorSuffix ??
|
|
1868
|
+
function Mt(e, t, n = {}) {
|
|
1869
|
+
let r = n.operatorSuffix ?? bt, i = n.arrayFormat ?? "repeat", a = Ct(t);
|
|
1861
1870
|
return e.flatMap((e) => {
|
|
1862
|
-
let t =
|
|
1871
|
+
let t = Et(e, Tt(a, e.key, i));
|
|
1863
1872
|
return t.length === 0 ? [] : [{
|
|
1864
1873
|
id: e.key,
|
|
1865
1874
|
key: e.key,
|
|
1866
|
-
operator:
|
|
1867
|
-
value:
|
|
1875
|
+
operator: kt(e, a, r),
|
|
1876
|
+
value: jt(e) ? t : [t[0]]
|
|
1868
1877
|
}];
|
|
1869
1878
|
});
|
|
1870
1879
|
}
|
|
1871
|
-
function
|
|
1872
|
-
let i = r.operatorSuffix ??
|
|
1880
|
+
function Nt(e, t, n, r = {}) {
|
|
1881
|
+
let i = r.operatorSuffix ?? bt, a = r.arrayFormat ?? "repeat", o = r.preserveUnrelated ?? !0, s = r.includeOperators ?? "changed", c = r.resetPageKeys ?? xt, l = o ? Ct(n) : {}, u = new Map(e.map((e) => [e.key, e]));
|
|
1873
1882
|
for (let t of e) delete l[t.key], delete l[`${t.key}${i}`];
|
|
1874
1883
|
for (let e of c) delete l[e];
|
|
1875
1884
|
for (let e of t) {
|
|
1876
1885
|
let t = u.get(e.key);
|
|
1877
1886
|
if (!t) continue;
|
|
1878
|
-
let n =
|
|
1887
|
+
let n = Dt(t, e.value);
|
|
1879
1888
|
if (n.length === 0) continue;
|
|
1880
1889
|
l[e.key] = a === "comma" ? [n.join(",")] : n;
|
|
1881
|
-
let r =
|
|
1882
|
-
|
|
1890
|
+
let r = Ot(t);
|
|
1891
|
+
At(s, e.operator, r) && (l[`${e.key}${i}`] = [e.operator]);
|
|
1883
1892
|
}
|
|
1884
|
-
return
|
|
1893
|
+
return wt(l);
|
|
1885
1894
|
}
|
|
1886
|
-
function
|
|
1887
|
-
let r = n.preserveUnrelated ?? !0, i = n.resetPageKeys ??
|
|
1895
|
+
function Pt(e, t, n = {}) {
|
|
1896
|
+
let r = n.preserveUnrelated ?? !0, i = n.resetPageKeys ?? xt, a = r ? Ct(e) : {}, o = Ct(t);
|
|
1888
1897
|
for (let e of i) delete a[e];
|
|
1889
1898
|
for (let [e, t] of Object.entries(o)) t.length === 0 ? delete a[e] : a[e] = t;
|
|
1890
|
-
return
|
|
1899
|
+
return wt(a);
|
|
1891
1900
|
}
|
|
1892
1901
|
//#endregion
|
|
1893
1902
|
//#region src/components/features/filters/facets/select-facet.tsx
|
|
1894
|
-
function
|
|
1895
|
-
let { defaultScale: c } =
|
|
1896
|
-
|
|
1903
|
+
function Ft({ filter: t, value: n, onValueChange: a, className: s }) {
|
|
1904
|
+
let { defaultScale: c } = e(), l = N(void 0, c), { strings: u } = $(), [d, f] = K(!1), [p, m] = K(""), h = n.length > 0, g = t.options, _ = (e) => {
|
|
1905
|
+
t.multiple ? n.includes(e) ? a(n.filter((t) => t !== e)) : a([...n, e]) : (a([e]), t.closeOnSelect !== !1 && f(!1));
|
|
1897
1906
|
}, v = (e) => g?.find((t) => t.value === e)?.label ?? e, y = W(() => (g ?? []).map((e) => ({
|
|
1898
1907
|
value: e.value,
|
|
1899
1908
|
label: e.label,
|
|
@@ -1901,10 +1910,10 @@ function jt({ filter: e, value: n, onValueChange: i, className: a }) {
|
|
|
1901
1910
|
icon: e.icon,
|
|
1902
1911
|
selected: n.includes(e.value),
|
|
1903
1912
|
disabled: e.disabled
|
|
1904
|
-
})), [g, n]), b = X(u.searchPlaceholder, { filterLabel:
|
|
1913
|
+
})), [g, n]), b = X(u.searchPlaceholder, { filterLabel: t.label.toLowerCase() });
|
|
1905
1914
|
return /* @__PURE__ */ J("div", {
|
|
1906
|
-
className: r("select-facet--component", "relative",
|
|
1907
|
-
children: /* @__PURE__ */ J(
|
|
1915
|
+
className: r("select-facet--component", "relative", s),
|
|
1916
|
+
children: /* @__PURE__ */ J(se, {
|
|
1908
1917
|
open: d,
|
|
1909
1918
|
onOpenChange: f,
|
|
1910
1919
|
search: !0,
|
|
@@ -1915,13 +1924,13 @@ function jt({ filter: e, value: n, onValueChange: i, className: a }) {
|
|
|
1915
1924
|
empty: u.noOptionsFound
|
|
1916
1925
|
},
|
|
1917
1926
|
contentClassName: "w-(--anchor-width) min-w-56",
|
|
1918
|
-
trigger: /* @__PURE__ */ Y(
|
|
1927
|
+
trigger: /* @__PURE__ */ Y(i, {
|
|
1919
1928
|
tone: "secondary",
|
|
1920
1929
|
buttonStyle: "outline",
|
|
1921
1930
|
size: l,
|
|
1922
1931
|
role: "combobox",
|
|
1923
1932
|
"aria-expanded": d,
|
|
1924
|
-
className:
|
|
1933
|
+
className: M(l),
|
|
1925
1934
|
children: [h ? n.length === 1 ? /* @__PURE__ */ J(o, {
|
|
1926
1935
|
tag: "span",
|
|
1927
1936
|
weight: "semibold",
|
|
@@ -1932,13 +1941,13 @@ function jt({ filter: e, value: n, onValueChange: i, className: a }) {
|
|
|
1932
1941
|
weight: "semibold",
|
|
1933
1942
|
children: X(u.selected, {
|
|
1934
1943
|
count: n.length,
|
|
1935
|
-
filterLabel: (n.length > 1 ?
|
|
1944
|
+
filterLabel: (n.length > 1 ? t.pluralLabel : t.label) ?? t.label
|
|
1936
1945
|
})
|
|
1937
1946
|
}) : /* @__PURE__ */ J(o, {
|
|
1938
1947
|
tag: "span",
|
|
1939
1948
|
type: "secondary",
|
|
1940
|
-
children:
|
|
1941
|
-
}), /* @__PURE__ */ J(
|
|
1949
|
+
children: t.placeholder ?? u.select
|
|
1950
|
+
}), /* @__PURE__ */ J(ve, { className: "ml-control-gap-small size-icon-sm shrink-0 opacity-50" })]
|
|
1942
1951
|
}),
|
|
1943
1952
|
items: y,
|
|
1944
1953
|
onSelect: (e) => _(e.value)
|
|
@@ -1947,120 +1956,120 @@ function jt({ filter: e, value: n, onValueChange: i, className: a }) {
|
|
|
1947
1956
|
}
|
|
1948
1957
|
//#endregion
|
|
1949
1958
|
//#region src/components/features/filters/facets/async-select-facet.tsx
|
|
1950
|
-
function
|
|
1951
|
-
let { defaultScale: c } =
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
]), { options:
|
|
1959
|
+
function It({ filter: t, value: n, onValueChange: a, className: s }) {
|
|
1960
|
+
let { defaultScale: c } = e(), l = N(void 0, c), { strings: d, cacheAsyncOptions: m, getAsyncOptionLabel: h, reportError: g } = $(), [_, v] = K(!1), [y, b] = K(""), x = W(() => /* @__PURE__ */ new Map(), [
|
|
1961
|
+
t.key,
|
|
1962
|
+
t.asyncConfig?.fetcher,
|
|
1963
|
+
t.asyncConfig?.mapToOption
|
|
1964
|
+
]), { options: S, isLoading: C, isFetching: k, isError: j, refetch: P, isBelowMinQuery: F, minQueryLength: I } = Xe(t, y, _, { onError: g });
|
|
1956
1965
|
U(() => {
|
|
1957
|
-
if (
|
|
1958
|
-
for (let e of
|
|
1959
|
-
m(
|
|
1966
|
+
if (S.length !== 0) {
|
|
1967
|
+
for (let e of S) x.set(e.value, e);
|
|
1968
|
+
m(t.key, S);
|
|
1960
1969
|
}
|
|
1961
1970
|
}, [
|
|
1962
1971
|
m,
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1972
|
+
t.key,
|
|
1973
|
+
x,
|
|
1974
|
+
S
|
|
1966
1975
|
]);
|
|
1967
|
-
let
|
|
1968
|
-
let
|
|
1969
|
-
for (let
|
|
1970
|
-
let n =
|
|
1976
|
+
let R = t.multiple !== !1, z = t.maxSelected, B = W(() => t.options ?? [], [t.options]), ne = W(() => {
|
|
1977
|
+
let e = new Set(n), r = new Set([...B, ...S].map((e) => e.value)), i = [];
|
|
1978
|
+
for (let e of n) if (!r.has(e)) {
|
|
1979
|
+
let n = x.get(e);
|
|
1971
1980
|
if (n) i.push(n);
|
|
1972
1981
|
else {
|
|
1973
|
-
let n = B.find((
|
|
1982
|
+
let n = B.find((t) => t.value === e);
|
|
1974
1983
|
if (n) {
|
|
1975
1984
|
i.push(n);
|
|
1976
1985
|
continue;
|
|
1977
1986
|
}
|
|
1978
|
-
let r = h(
|
|
1987
|
+
let r = h(t.key, e);
|
|
1979
1988
|
r && i.push({
|
|
1980
|
-
value:
|
|
1989
|
+
value: e,
|
|
1981
1990
|
label: r,
|
|
1982
|
-
icon:
|
|
1991
|
+
icon: t.icon
|
|
1983
1992
|
});
|
|
1984
1993
|
}
|
|
1985
1994
|
}
|
|
1986
1995
|
return [
|
|
1987
1996
|
...i,
|
|
1988
1997
|
...B,
|
|
1989
|
-
...
|
|
1990
|
-
].sort((
|
|
1998
|
+
...S
|
|
1999
|
+
].sort((t, n) => +!e.has(t.value) - !e.has(n.value));
|
|
1991
2000
|
}, [
|
|
1992
2001
|
B,
|
|
1993
|
-
|
|
2002
|
+
S,
|
|
1994
2003
|
n,
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
2004
|
+
t.key,
|
|
2005
|
+
t.icon,
|
|
2006
|
+
x,
|
|
1998
2007
|
h
|
|
1999
|
-
]), re = (
|
|
2000
|
-
if (
|
|
2001
|
-
if (n.includes(
|
|
2008
|
+
]), re = (e) => {
|
|
2009
|
+
if (R) {
|
|
2010
|
+
if (n.includes(e)) a(n.filter((t) => t !== e));
|
|
2002
2011
|
else {
|
|
2003
2012
|
if (z && n.length >= z) return;
|
|
2004
|
-
|
|
2013
|
+
a([...n, e]);
|
|
2005
2014
|
}
|
|
2006
|
-
} else
|
|
2007
|
-
}, ie = (
|
|
2008
|
-
let n =
|
|
2015
|
+
} else a([e]), t.closeOnSelect !== !1 && v(!1);
|
|
2016
|
+
}, ie = (e) => {
|
|
2017
|
+
let n = S.find((t) => t.value === e);
|
|
2009
2018
|
if (n) return n.label;
|
|
2010
|
-
let r = B.find((
|
|
2019
|
+
let r = B.find((t) => t.value === e);
|
|
2011
2020
|
if (r) return r.label;
|
|
2012
|
-
let i =
|
|
2013
|
-
return i ? i.label : h(
|
|
2014
|
-
}, ae = n.length > 0,
|
|
2021
|
+
let i = x.get(e);
|
|
2022
|
+
return i ? i.label : h(t.key, e) ?? e;
|
|
2023
|
+
}, ae = n.length > 0, oe = W(() => C || k ? /* @__PURE__ */ J(f, {
|
|
2015
2024
|
className: "async-select-facet--component",
|
|
2016
|
-
label:
|
|
2017
|
-
}) :
|
|
2025
|
+
label: d.searching
|
|
2026
|
+
}) : j ? /* @__PURE__ */ J(p, {
|
|
2018
2027
|
variant: "inline",
|
|
2019
|
-
title:
|
|
2020
|
-
action: /* @__PURE__ */ J(
|
|
2028
|
+
title: d.fetchError,
|
|
2029
|
+
action: /* @__PURE__ */ J(i, {
|
|
2021
2030
|
tone: "secondary",
|
|
2022
2031
|
buttonStyle: "outline",
|
|
2023
2032
|
size: "sm",
|
|
2024
2033
|
onClick: (e) => {
|
|
2025
|
-
e.stopPropagation(),
|
|
2034
|
+
e.stopPropagation(), P();
|
|
2026
2035
|
},
|
|
2027
|
-
children:
|
|
2036
|
+
children: d.retryFetch
|
|
2028
2037
|
})
|
|
2029
|
-
}) :
|
|
2038
|
+
}) : F ? /* @__PURE__ */ J("div", {
|
|
2030
2039
|
className: "text-muted-foreground flex items-center justify-center py-space-xl",
|
|
2031
2040
|
children: /* @__PURE__ */ J(o, {
|
|
2032
2041
|
tag: "span",
|
|
2033
2042
|
size: "xs",
|
|
2034
2043
|
type: "secondary",
|
|
2035
|
-
children: X(
|
|
2044
|
+
children: X(d.minQueryHint, { min: I })
|
|
2036
2045
|
})
|
|
2037
2046
|
}) : /* @__PURE__ */ J(o, {
|
|
2038
2047
|
tag: "span",
|
|
2039
2048
|
type: "secondary",
|
|
2040
|
-
children:
|
|
2049
|
+
children: d.noOptionsFound
|
|
2041
2050
|
}), [
|
|
2051
|
+
C,
|
|
2052
|
+
k,
|
|
2042
2053
|
j,
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
p,
|
|
2048
|
-
I
|
|
2054
|
+
F,
|
|
2055
|
+
I,
|
|
2056
|
+
d,
|
|
2057
|
+
P
|
|
2049
2058
|
]);
|
|
2050
2059
|
return /* @__PURE__ */ J("div", {
|
|
2051
|
-
className: r("async-select-facet--component relative",
|
|
2052
|
-
children: /* @__PURE__ */ Y(
|
|
2060
|
+
className: r("async-select-facet--component relative", s),
|
|
2061
|
+
children: /* @__PURE__ */ Y(ee, {
|
|
2053
2062
|
open: _,
|
|
2054
2063
|
onOpenChange: (e) => {
|
|
2055
|
-
v(e), e ||
|
|
2064
|
+
v(e), e || b("");
|
|
2056
2065
|
},
|
|
2057
|
-
children: [/* @__PURE__ */ J(
|
|
2066
|
+
children: [/* @__PURE__ */ J(L, { render: /* @__PURE__ */ Y(i, {
|
|
2058
2067
|
tone: "secondary",
|
|
2059
2068
|
buttonStyle: "outline",
|
|
2060
|
-
size:
|
|
2069
|
+
size: l,
|
|
2061
2070
|
role: "combobox",
|
|
2062
2071
|
"aria-expanded": _,
|
|
2063
|
-
className:
|
|
2072
|
+
className: M(l),
|
|
2064
2073
|
children: [ae ? n.length === 1 ? /* @__PURE__ */ J(o, {
|
|
2065
2074
|
tag: "span",
|
|
2066
2075
|
weight: "semibold",
|
|
@@ -2069,44 +2078,44 @@ function Mt({ filter: e, value: n, onValueChange: i, className: a }) {
|
|
|
2069
2078
|
}) : /* @__PURE__ */ J(o, {
|
|
2070
2079
|
tag: "span",
|
|
2071
2080
|
weight: "semibold",
|
|
2072
|
-
children: X(
|
|
2081
|
+
children: X(d.selected, {
|
|
2073
2082
|
count: n.length,
|
|
2074
|
-
filterLabel: (n.length > 1 ?
|
|
2083
|
+
filterLabel: (n.length > 1 ? t.pluralLabel : t.label) ?? t.label
|
|
2075
2084
|
})
|
|
2076
2085
|
}) : /* @__PURE__ */ J(o, {
|
|
2077
2086
|
tag: "span",
|
|
2078
2087
|
type: "secondary",
|
|
2079
|
-
children:
|
|
2080
|
-
}), /* @__PURE__ */ J(
|
|
2081
|
-
}) }), /* @__PURE__ */ J(
|
|
2088
|
+
children: t.placeholder ?? d.select
|
|
2089
|
+
}), /* @__PURE__ */ J(ve, { className: "ml-control-gap-small size-icon-sm shrink-0 opacity-50" })]
|
|
2090
|
+
}) }), /* @__PURE__ */ J(te, {
|
|
2082
2091
|
type: "menu",
|
|
2083
2092
|
inset: "flush",
|
|
2084
2093
|
className: "w-full min-w-70 gap-0",
|
|
2085
|
-
children: /* @__PURE__ */ Y(
|
|
2094
|
+
children: /* @__PURE__ */ Y(A, {
|
|
2086
2095
|
shouldFilter: !1,
|
|
2087
2096
|
inset: "flush",
|
|
2088
2097
|
className: "rounded-none",
|
|
2089
|
-
children: [/* @__PURE__ */ J(
|
|
2090
|
-
placeholder: X(
|
|
2098
|
+
children: [/* @__PURE__ */ J(T, {
|
|
2099
|
+
placeholder: X(d.searchPlaceholder, { filterLabel: t.label }),
|
|
2091
2100
|
value: y,
|
|
2092
|
-
onValueChange:
|
|
2093
|
-
}), /* @__PURE__ */ J(
|
|
2101
|
+
onValueChange: b
|
|
2102
|
+
}), /* @__PURE__ */ J(D, { children: ne.length === 0 ? /* @__PURE__ */ J(E, { children: oe }) : /* @__PURE__ */ Y(O, { children: [!(!k || C) && /* @__PURE__ */ Y(u, {
|
|
2094
2103
|
direction: "horizontal",
|
|
2095
2104
|
gap: "sm",
|
|
2096
2105
|
wrap: !1,
|
|
2097
2106
|
className: "px-control-sm py-space-xs",
|
|
2098
|
-
children: [/* @__PURE__ */ J(
|
|
2107
|
+
children: [/* @__PURE__ */ J(be, { className: "text-muted-foreground size-icon-sm animate-spin" }), /* @__PURE__ */ J(o, {
|
|
2099
2108
|
tag: "span",
|
|
2100
2109
|
size: "xs",
|
|
2101
2110
|
type: "secondary",
|
|
2102
|
-
children:
|
|
2111
|
+
children: d.searching
|
|
2103
2112
|
})]
|
|
2104
|
-
}), ne.map((e) => /* @__PURE__ */ Y(
|
|
2113
|
+
}), ne.map((e) => /* @__PURE__ */ Y(w, {
|
|
2105
2114
|
value: e.value,
|
|
2106
2115
|
onSelect: () => re(e.value),
|
|
2107
2116
|
disabled: e.disabled || !!z && n.length >= z && !n.includes(e.value),
|
|
2108
2117
|
children: [
|
|
2109
|
-
/* @__PURE__ */ J(
|
|
2118
|
+
/* @__PURE__ */ J(he, { className: r("mr-control-gap size-icon-sm", n.includes(e.value) ? "opacity-100" : "opacity-0") }),
|
|
2110
2119
|
!!e.icon && /* @__PURE__ */ J("span", {
|
|
2111
2120
|
className: "mr-1.5",
|
|
2112
2121
|
children: e.icon
|
|
@@ -2124,8 +2133,8 @@ function Mt({ filter: e, value: n, onValueChange: i, className: a }) {
|
|
|
2124
2133
|
}
|
|
2125
2134
|
//#endregion
|
|
2126
2135
|
//#region src/components/features/filters/facets/range-facet.tsx
|
|
2127
|
-
function
|
|
2128
|
-
let { strings: o } = $(), [s,
|
|
2136
|
+
function Lt({ filter: e, value: t, onValueChange: n, className: i }) {
|
|
2137
|
+
let { strings: o } = $(), [s, c] = K(t.min?.toString() ?? ""), [d, f] = K(t.max?.toString() ?? ""), p = pe(), m = ce((e) => {
|
|
2129
2138
|
(e.min !== t.min || e.max !== t.max) && n(e);
|
|
2130
2139
|
}, e.delay ?? 300);
|
|
2131
2140
|
return U(() => (m({
|
|
@@ -2135,37 +2144,39 @@ function Nt({ filter: e, value: t, onValueChange: n, className: i }) {
|
|
|
2135
2144
|
s,
|
|
2136
2145
|
d,
|
|
2137
2146
|
m
|
|
2138
|
-
]), /* @__PURE__ */ J(
|
|
2147
|
+
]), /* @__PURE__ */ J(u, {
|
|
2139
2148
|
gap: "md",
|
|
2140
2149
|
className: r("range-facet--component", i),
|
|
2141
|
-
children: /* @__PURE__ */ Y(
|
|
2150
|
+
children: /* @__PURE__ */ Y(l, {
|
|
2142
2151
|
columns: {
|
|
2143
2152
|
base: 1,
|
|
2144
2153
|
sm: 2
|
|
2145
2154
|
},
|
|
2146
2155
|
gap: "md",
|
|
2147
|
-
children: [/* @__PURE__ */ Y(
|
|
2156
|
+
children: [/* @__PURE__ */ Y(u, {
|
|
2148
2157
|
gap: "xs",
|
|
2149
2158
|
children: [/* @__PURE__ */ J(a, {
|
|
2150
2159
|
htmlFor: `${p}-min`,
|
|
2160
|
+
className: "text-inherit",
|
|
2151
2161
|
children: o.min
|
|
2152
|
-
}), /* @__PURE__ */ J(
|
|
2162
|
+
}), /* @__PURE__ */ J(P, {
|
|
2153
2163
|
id: `${p}-min`,
|
|
2154
2164
|
type: "text",
|
|
2155
2165
|
value: s,
|
|
2156
2166
|
onChange: (e) => {
|
|
2157
2167
|
let t = e.target.value;
|
|
2158
|
-
(t === "" || /^\d*\.?\d*$/.test(t)) &&
|
|
2168
|
+
(t === "" || /^\d*\.?\d*$/.test(t)) && c(t);
|
|
2159
2169
|
},
|
|
2160
2170
|
placeholder: o.min,
|
|
2161
2171
|
className: "w-full"
|
|
2162
2172
|
})]
|
|
2163
|
-
}), /* @__PURE__ */ Y(
|
|
2173
|
+
}), /* @__PURE__ */ Y(u, {
|
|
2164
2174
|
gap: "xs",
|
|
2165
2175
|
children: [/* @__PURE__ */ J(a, {
|
|
2166
2176
|
htmlFor: `${p}-max`,
|
|
2177
|
+
className: "text-inherit",
|
|
2167
2178
|
children: o.max
|
|
2168
|
-
}), /* @__PURE__ */ J(
|
|
2179
|
+
}), /* @__PURE__ */ J(P, {
|
|
2169
2180
|
id: `${p}-max`,
|
|
2170
2181
|
type: "text",
|
|
2171
2182
|
value: d,
|
|
@@ -2182,17 +2193,17 @@ function Nt({ filter: e, value: t, onValueChange: n, className: i }) {
|
|
|
2182
2193
|
}
|
|
2183
2194
|
//#endregion
|
|
2184
2195
|
//#region src/components/features/filters/validators.ts
|
|
2185
|
-
function
|
|
2196
|
+
function Rt(e) {
|
|
2186
2197
|
return (t) => {
|
|
2187
2198
|
if (t == null || typeof t == "string" && t.length === 0) return !0;
|
|
2188
2199
|
let n = e.safeParse(t);
|
|
2189
2200
|
return n.success ? !0 : n.error?.issues?.[0]?.message ?? n.error?.message ?? !1;
|
|
2190
2201
|
};
|
|
2191
2202
|
}
|
|
2192
|
-
function
|
|
2203
|
+
function zt(e, t) {
|
|
2193
2204
|
return (n) => e(n) ? !0 : t;
|
|
2194
2205
|
}
|
|
2195
2206
|
//#endregion
|
|
2196
|
-
export {
|
|
2207
|
+
export { Pe as A, ze as C, Me as D, Ne as E, Oe as F, Ee as I, De as L, ke as M, Q as N, Fe as O, Z as P, X as R, Be as S, $ as T, nt as _, Ft as a, Je as b, Nt as c, ht as d, ft as f, st as g, lt as h, It as i, Ae as j, je as k, yt as l, ut as m, Rt as n, Pt as o, dt as p, Lt as r, Mt as s, zt as t, gt as u, $e as v, Re as w, Ve as x, Xe as y };
|
|
2197
2208
|
|
|
2198
|
-
//# sourceMappingURL=filters-
|
|
2209
|
+
//# sourceMappingURL=filters-BGfvjP4d.js.map
|