themelia-react-ui 1.0.2 → 2.0.1
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 +632 -1
- package/README.md +31 -13
- package/dist/accordion-B6a3vVgA.js +207 -0
- package/dist/accordion-B6a3vVgA.js.map +1 -0
- package/dist/action-menu-TzCoSlwL.js +280 -0
- package/dist/action-menu-TzCoSlwL.js.map +1 -0
- package/dist/{affordance-geometry.generated-CL84ZN9A.js → affordance-geometry.generated-B5iu-Mkr.js} +9 -3
- package/dist/affordance-geometry.generated-B5iu-Mkr.js.map +1 -0
- package/dist/{ai-artifact-DLVdK0Py.js → ai-artifact-BMJdv-6q.js} +389 -391
- package/dist/ai-artifact-BMJdv-6q.js.map +1 -0
- package/dist/{app-shell-C_fKpljx.js → app-shell-ZK5RWdo6.js} +4 -4
- package/dist/{app-shell-C_fKpljx.js.map → app-shell-ZK5RWdo6.js.map} +1 -1
- package/dist/attachment-BtfhGm8i.js +245 -0
- package/dist/attachment-BtfhGm8i.js.map +1 -0
- package/dist/{auth-CAQcasMV.js → auth-CYxKfo69.js} +239 -237
- package/dist/auth-CYxKfo69.js.map +1 -0
- package/dist/{avatar-Bu2HhitA.js → avatar-BBnEJIx8.js} +71 -68
- package/dist/avatar-BBnEJIx8.js.map +1 -0
- package/dist/badge-MrKVNzW9.js +93 -0
- package/dist/badge-MrKVNzW9.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 +19 -19
- package/dist/base/carousel.js.map +1 -1
- package/dist/base/cascader.js +234 -224
- 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 +1 -1
- package/dist/base/command.js +1 -1
- package/dist/base/copyable.js +1 -1
- package/dist/base/date-pickers.js +2 -2
- package/dist/base/display.js +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 +81 -76
- package/dist/base/inline-edit.js.map +1 -1
- package/dist/base/item.js +1 -1
- package/dist/base/media-gallery.js +1 -1
- package/dist/base/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 +7 -4
- package/dist/base/qr-code.js.map +1 -1
- package/dist/base/repeaters.js +175 -174
- 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 +148 -138
- package/dist/base/signature-pad.js.map +1 -1
- package/dist/base/skeleton.js +1 -1
- package/dist/base/spinner.js +1 -1
- package/dist/base/structure.js +1 -1
- package/dist/base/table.js +1 -1
- package/dist/base/text-inputs.js +2 -2
- package/dist/base/toaster.js +4 -4
- package/dist/base/toaster.js.map +1 -1
- package/dist/base/tree.js +1 -1
- package/dist/base/upload-queue.js +1 -1
- package/dist/base/upload.js +3 -3
- package/dist/base/value-inputs.js +2 -2
- package/dist/batch-action-bar-BZGDG-Si.js +104 -0
- package/dist/batch-action-bar-BZGDG-Si.js.map +1 -0
- package/dist/blocks/admin.js +264 -253
- package/dist/blocks/admin.js.map +1 -1
- package/dist/blocks/ai.js +293 -323
- package/dist/blocks/ai.js.map +1 -1
- package/dist/blocks/analytics/usage-card.js +1 -1
- package/dist/blocks/analytics.js +596 -587
- 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 +2246 -1693
- package/dist/blocks/commerce.js.map +1 -1
- package/dist/blocks/data-display.js +3 -2
- package/dist/blocks/onboarding.js +50 -49
- package/dist/blocks/onboarding.js.map +1 -1
- package/dist/blocks/planning.js +82 -91
- package/dist/blocks/planning.js.map +1 -1
- package/dist/blocks/timelines.js +1 -1
- package/dist/breadcrumbs-D5t7I023.js +129 -0
- package/dist/breadcrumbs-D5t7I023.js.map +1 -0
- package/dist/{button-BZyfTvwm.js → button-QYwiyhD2.js} +15 -14
- package/dist/button-QYwiyhD2.js.map +1 -0
- package/dist/buttons-SbIcm1HJ.js +661 -0
- package/dist/buttons-SbIcm1HJ.js.map +1 -0
- package/dist/{cards-qGSErLw_.js → cards-CiiHpKYd.js} +8 -8
- package/dist/cards-CiiHpKYd.js.map +1 -0
- package/dist/{chart-Bsc5BICK.js → chart-QfrARkXl.js} +17 -15
- package/dist/chart-QfrARkXl.js.map +1 -0
- package/dist/checkbox-DhB6K0bK.js +36 -0
- package/dist/checkbox-DhB6K0bK.js.map +1 -0
- package/dist/choice-inputs-t6w3ATNz.js +766 -0
- package/dist/choice-inputs-t6w3ATNz.js.map +1 -0
- package/dist/code-block-Dgbu-CU3.js +185 -0
- package/dist/code-block-Dgbu-CU3.js.map +1 -0
- package/dist/{collapsible-ClvC7Bj3.js → collapsible-D8AEGU1-.js} +4 -4
- package/dist/{collapsible-ClvC7Bj3.js.map → collapsible-D8AEGU1-.js.map} +1 -1
- package/dist/{collection-content-D6S8cv_n.js → collection-content-uK16Grv0.js} +3 -3
- package/dist/{collection-content-D6S8cv_n.js.map → collection-content-uK16Grv0.js.map} +1 -1
- package/dist/{combobox-BFnbJJp3.js → combobox-2Ic8N9bL.js} +103 -98
- package/dist/combobox-2Ic8N9bL.js.map +1 -0
- package/dist/combobox-DLl0bfiq.js +867 -0
- package/dist/combobox-DLl0bfiq.js.map +1 -0
- package/dist/{command-BnmSchli.js → command-kNR20o7x.js} +34 -30
- package/dist/command-kNR20o7x.js.map +1 -0
- package/dist/{comments-u5L0OGip.js → comments-BpDuCUUu.js} +304 -301
- package/dist/comments-BpDuCUUu.js.map +1 -0
- package/dist/components/base/accordion/accordion-variants.d.ts +3 -3
- package/dist/components/base/action-menu/action-menu.d.ts +27 -5
- 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/avatar/stacked-avatars.d.ts +5 -4
- package/dist/components/base/badge/badge.d.ts +1 -1
- package/dist/components/base/badge/badge.recipes.d.ts +6 -6
- 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/base-button.d.ts +7 -0
- package/dist/components/base/buttons/button-group.recipes.d.ts +2 -2
- package/dist/components/base/buttons/button.recipes.d.ts +2 -2
- package/dist/components/base/buttons/button.variants.d.ts +1 -0
- package/dist/components/base/buttons/loader-button.d.ts +3 -1
- package/dist/components/base/buttons/text-button.d.ts +2 -2
- package/dist/components/base/carousel/carousel.d.ts +3 -1
- package/dist/components/base/chart/chart.d.ts +7 -7
- package/dist/components/base/choice-inputs/checkbox.d.ts +6 -7
- package/dist/components/base/choice-inputs/choice-types.d.ts +24 -3
- package/dist/components/base/choice-inputs/pill-radio-group.d.ts +9 -0
- package/dist/components/base/choice-inputs/select-popup.d.ts +9 -1
- package/dist/components/base/choice-inputs/switch-card.d.ts +1 -1
- package/dist/components/base/date-pickers/date-picker-field.d.ts +23 -0
- package/dist/components/base/date-pickers/datepicker.types.d.ts +13 -3
- package/dist/components/base/display/alert-dialog.d.ts +10 -3
- package/dist/components/base/display/content-block.d.ts +4 -2
- package/dist/components/base/display/date-block.d.ts +1 -1
- package/dist/components/base/display/dialog.d.ts +8 -5
- package/dist/components/base/display/icon-badge/icon-badge.d.ts +1 -1
- package/dist/components/base/display/surface-title.d.ts +6 -1
- package/dist/components/base/feedback/alert.d.ts +1 -1
- package/dist/components/base/feedback/state-display.d.ts +5 -4
- package/dist/components/base/forms/form-sizing.d.ts +43 -8
- package/dist/components/base/forms/workflow.d.ts +2 -0
- package/dist/components/base/forms-numeric/coordinates-input.d.ts +3 -0
- package/dist/components/base/forms-numeric/rounding-mode-select.d.ts +4 -1
- package/dist/components/base/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/dropdown-menu.d.ts +2 -2
- package/dist/components/base/navigation/index.d.ts +1 -1
- package/dist/components/base/navigation/language-switcher.d.ts +4 -1
- package/dist/components/base/navigation/overflow-tab-bar.d.ts +7 -0
- package/dist/components/base/navigation/page-header/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 +30 -4
- package/dist/components/base/qr-code/qr-code.d.ts +2 -0
- package/dist/components/base/sheet/index.d.ts +29 -1
- package/dist/components/base/sheet/sheet.d.ts +10 -5
- 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/spinner/spinner.d.ts +3 -2
- package/dist/components/base/structure/structure.types.d.ts +1 -1
- 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 +33 -0
- package/dist/components/base/value-inputs/date-time-input.d.ts +4 -2
- package/dist/components/base/value-inputs/index.d.ts +5 -5
- package/dist/components/base/value-inputs/tags-input.d.ts +38 -12
- package/dist/components/blocks/admin/api-key-list/api-key-list.types.d.ts +1 -1
- package/dist/components/blocks/analytics/format-metric-value.d.ts +11 -1
- package/dist/components/blocks/analytics/index.d.ts +1 -1
- package/dist/components/blocks/analytics/use-metric-format-options.d.ts +3 -0
- package/dist/components/blocks/commerce/address-card/address-card.d.ts +1 -1
- package/dist/components/blocks/commerce/address-card/types.d.ts +4 -1
- package/dist/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.d.ts +4 -0
- package/dist/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.types.d.ts +2 -2
- package/dist/components/blocks/commerce/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 +43 -0
- package/dist/components/blocks/commerce/index.d.ts +13 -5
- package/dist/components/blocks/commerce/inventory-section/types.d.ts +4 -1
- 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/loyalty-points/types.d.ts +1 -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-status/types.d.ts +4 -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 +14 -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/seo-listing/seo-listing-card.d.ts +1 -1
- package/dist/components/blocks/commerce/seo-listing/types.d.ts +3 -1
- package/dist/components/blocks/commerce/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/commerce/vendor-profile/types.d.ts +4 -1
- package/dist/components/blocks/data-display/dense-info-card/dense-info.strings.d.ts +4 -1
- package/dist/components/blocks/data-display/inline-stat/inline-stat.d.ts +4 -1
- package/dist/components/blocks/data-display/metadata/index.d.ts +30 -4
- 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/global-search/partials/global-search-group-heading.d.ts +15 -0
- package/dist/components/features/global-search/partials/global-search-idle-state.d.ts +1 -1
- 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 +4 -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/drawer.d.ts +1 -1
- package/dist/components/features/overlays/hooks/use-overlay-actions.d.ts +2 -2
- package/dist/components/features/overlays/hooks/use-overlay-visibility.d.ts +11 -4
- package/dist/components/features/overlays/index.d.ts +1 -1
- package/dist/components/features/overlays/overlay-tone-icon.d.ts +37 -0
- package/dist/components/features/overlays/overlays.types.d.ts +62 -19
- 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/components/product-variants-manager.d.ts +1 -1
- package/dist/components/features/products/partials/index.d.ts +1 -1
- package/dist/components/features/products/partials/product-metric-tile.d.ts +6 -0
- package/dist/components/features/products/partials/product-tone.d.ts +11 -1
- package/dist/components/features/products/products.types.d.ts +11 -3
- 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 +1 -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 +45 -0
- 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/partials/cell-renderers.d.ts +1 -1
- package/dist/components/features/table/table.types.d.ts +32 -7
- package/dist/components/layout/page/index.d.ts +1 -1
- package/dist/components/layout/page/page.types.d.ts +51 -4
- 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/date.d.ts +16 -3
- package/dist/components/primitives/dimensions.d.ts +6 -0
- package/dist/components/primitives/duration.d.ts +6 -0
- package/dist/components/primitives/file-size.d.ts +6 -0
- package/dist/components/primitives/index.d.ts +1 -1
- package/dist/components/primitives/initials.d.ts +11 -2
- package/dist/components/primitives/link.d.ts +7 -0
- package/dist/components/primitives/money.d.ts +29 -7
- package/dist/components/primitives/number.d.ts +17 -0
- package/dist/components/primitives/value-typography.d.ts +54 -0
- package/dist/components/primitives/value.d.ts +31 -6
- package/dist/components/typography/heading.d.ts +9 -1
- package/dist/components/typography/label.d.ts +3 -0
- package/dist/components/typography/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/running-text.d.ts +12 -0
- package/dist/components/typography/text-link.d.ts +24 -1
- package/dist/components/typography/text.d.ts +12 -0
- package/dist/components/typography/text.styles.d.ts +35 -13
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/checkbox.d.ts +6 -0
- package/dist/components/ui/overlay.recipes.d.ts +6 -2
- package/dist/components/ui/select.d.ts +3 -1
- package/dist/components/ui/switch.d.ts +5 -0
- package/dist/{containers-DqB-bSYE.js → containers-DmWiJa2I.js} +36 -35
- package/dist/containers-DmWiJa2I.js.map +1 -0
- package/dist/{copyable-BTSByfmq.js → copyable-B3Gwgdqc.js} +6 -6
- package/dist/{copyable-BTSByfmq.js.map → copyable-B3Gwgdqc.js.map} +1 -1
- package/dist/data-display-DafIvCl5.js +960 -0
- package/dist/data-display-DafIvCl5.js.map +1 -0
- package/dist/date-BgK3bTdo.js +144 -0
- package/dist/date-BgK3bTdo.js.map +1 -0
- package/dist/date-picker-CF-DtUpF.js +1529 -0
- package/dist/date-picker-CF-DtUpF.js.map +1 -0
- package/dist/date-pickers-BmzxJl5l.js +174 -0
- package/dist/date-pickers-BmzxJl5l.js.map +1 -0
- package/dist/{display-CS6Hbk18.js → display-DsQTVzMz.js} +88 -87
- package/dist/display-DsQTVzMz.js.map +1 -0
- package/dist/{dropdown-menu-D-boNgGO.js → dropdown-menu-E2qmdC7o.js} +23 -16
- package/dist/dropdown-menu-E2qmdC7o.js.map +1 -0
- package/dist/features/activities.js +437 -521
- package/dist/features/activities.js.map +1 -1
- package/dist/features/ai-chat.js +174 -172
- package/dist/features/ai-chat.js.map +1 -1
- package/dist/features/async-preview.js +8 -8
- 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 +139 -138
- package/dist/features/data-view.js.map +1 -1
- package/dist/features/email-composer/engine.js +1 -1
- package/dist/features/email-composer.js +353 -352
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +262 -269
- package/dist/features/event-calendar.js.map +1 -1
- package/dist/features/filters.js +1 -1
- package/dist/features/global-search.js +307 -310
- package/dist/features/global-search.js.map +1 -1
- package/dist/features/kanban.js +95 -97
- package/dist/features/kanban.js.map +1 -1
- package/dist/features/map.js +56 -57
- package/dist/features/map.js.map +1 -1
- package/dist/features/media-library.js +914 -824
- 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 +1272 -1311
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +204 -194
- package/dist/features/questionnaire.js.map +1 -1
- package/dist/features/resource-assignment.js +103 -95
- 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 +193 -189
- package/dist/features/schema-form.js.map +1 -1
- package/dist/features/suggestions.js +3 -3
- package/dist/features/sync.js +7 -7
- package/dist/features/sync.js.map +1 -1
- package/dist/features/table.js +1 -1
- package/dist/features/theme-tweaker.js +455 -455
- package/dist/features/theme-tweaker.js.map +1 -1
- package/dist/feedback-qNuMBtRH.js +233 -0
- package/dist/feedback-qNuMBtRH.js.map +1 -0
- package/dist/field-affordance-recipes-qQeIf4lG.js +48 -0
- package/dist/field-affordance-recipes-qQeIf4lG.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-D6FF8L6s.js → filters-BkHH53uv.js} +414 -412
- package/dist/filters-BkHH53uv.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-CZwrkP7m.js → form-field-DUt4UxSV.js} +7 -7
- package/dist/{form-field-CZwrkP7m.js.map → form-field-DUt4UxSV.js.map} +1 -1
- package/dist/form-sizing-By94KzXE.js +130 -0
- package/dist/form-sizing-By94KzXE.js.map +1 -0
- package/dist/{forms-B5NCbkSC.js → forms-Bzha-Y3B.js} +25 -25
- package/dist/forms-Bzha-Y3B.js.map +1 -0
- package/dist/forms-numeric-C0bvjRPZ.js +906 -0
- package/dist/forms-numeric-C0bvjRPZ.js.map +1 -0
- package/dist/{header-kxruN3RM.js → header-BOefOKd1.js} +38 -41
- package/dist/header-BOefOKd1.js.map +1 -0
- package/dist/{hooks-BrlnCwQd.js → hooks-9k_TtmKh.js} +2 -2
- package/dist/{hooks-BrlnCwQd.js.map → hooks-9k_TtmKh.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-CAuKupo9.js +55 -0
- package/dist/icon-badge-CAuKupo9.js.map +1 -0
- package/dist/index.js +7 -7
- package/dist/input-DWhBBBww.js +262 -0
- package/dist/input-DWhBBBww.js.map +1 -0
- package/dist/{input-vxcaNCYC.js → input-Ddi_LSYv.js} +3 -3
- package/dist/{input-vxcaNCYC.js.map → input-Ddi_LSYv.js.map} +1 -1
- package/dist/interaction-recipes-CHr0dJUs.js +24 -0
- package/dist/interaction-recipes-CHr0dJUs.js.map +1 -0
- package/dist/item-DEmDiTlD.js +265 -0
- package/dist/item-DEmDiTlD.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 +7 -1
- package/dist/lib/field-affordance-recipes.d.ts +41 -1
- package/dist/lib/field-state-recipes.d.ts +9 -6
- package/dist/lib/focus-recipes.d.ts +24 -0
- package/dist/lib/format.d.ts +9 -0
- package/dist/lib/interaction-recipes.d.ts +35 -0
- package/dist/lib/layer-recipes.d.ts +19 -0
- package/dist/lib/money-format.d.ts +30 -0
- package/dist/lib/motion-recipes.d.ts +1 -0
- package/dist/lib/overlay-anatomy-recipes.d.ts +2 -1
- 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 +48 -6
- package/dist/lib/token-merge.generated.d.ts +17 -14
- package/dist/lib/tone-recipes.d.ts +79 -0
- package/dist/lib/track-recipes.d.ts +1 -1
- 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/provider.d.ts +7 -2
- package/dist/lib/ui-provider/store.d.ts +6 -2
- package/dist/lib/ui-provider/types.d.ts +14 -2
- package/dist/lib/utils.js +1 -1
- package/dist/media-gallery-DcTtAaeC.js +203 -0
- package/dist/media-gallery-DcTtAaeC.js.map +1 -0
- package/dist/mentions-D-uyCh01.js +568 -0
- package/dist/mentions-D-uyCh01.js.map +1 -0
- package/dist/{message-SZUNB1eX.js → message-CdHgIWKf.js} +5 -5
- package/dist/{message-SZUNB1eX.js.map → message-CdHgIWKf.js.map} +1 -1
- package/dist/metadata-list-X5rYAKSB.js +394 -0
- package/dist/metadata-list-X5rYAKSB.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-D3KwXmaq.js +145 -0
- package/dist/navigation-D3KwXmaq.js.map +1 -0
- package/dist/navigation-HJf5zxlH.js +268 -0
- package/dist/navigation-HJf5zxlH.js.map +1 -0
- package/dist/{navigation-row-recipes-DQEXQcqY.js → navigation-row-recipes-BVowojQw.js} +2 -2
- package/dist/{navigation-row-recipes-DQEXQcqY.js.map → navigation-row-recipes-BVowojQw.js.map} +1 -1
- package/dist/number-DMhe-Vsk.js +352 -0
- package/dist/number-DMhe-Vsk.js.map +1 -0
- package/dist/overflow-tab-bar-sQHXLlwQ.js +280 -0
- package/dist/overflow-tab-bar-sQHXLlwQ.js.map +1 -0
- package/dist/overlay.recipes-8GHqmlb4.js +6 -0
- package/dist/overlay.recipes-8GHqmlb4.js.map +1 -0
- package/dist/overlays-I0axtYA6.js +999 -0
- package/dist/overlays-I0axtYA6.js.map +1 -0
- package/dist/{page-hGmT4nWK.js → page-B5dTH9gE.js} +79 -68
- package/dist/page-B5dTH9gE.js.map +1 -0
- package/dist/page-header-commands-DjzFEq3E.js +126 -0
- package/dist/page-header-commands-DjzFEq3E.js.map +1 -0
- package/dist/{pagination-NLGqRirf.js → pagination-3bPA_a6K.js} +19 -19
- package/dist/{pagination-NLGqRirf.js.map → pagination-3bPA_a6K.js.map} +1 -1
- package/dist/{popover-CghIYdQf.js → popover-Di55PyAI.js} +8 -8
- package/dist/popover-Di55PyAI.js.map +1 -0
- package/dist/{popover-menu-B4PoWhRl.js → popover-menu-B71Tn2Qz.js} +6 -6
- package/dist/{popover-menu-B4PoWhRl.js.map → popover-menu-B71Tn2Qz.js.map} +1 -1
- package/dist/{popover.recipes-QlD4JenO.js → popover.recipes-Bdyhj2db.js} +2 -2
- package/dist/{popover.recipes-QlD4JenO.js.map → popover.recipes-Bdyhj2db.js.map} +1 -1
- package/dist/primitives-B-CkiEMU.js +379 -0
- package/dist/primitives-B-CkiEMU.js.map +1 -0
- package/dist/primitives.js +5 -5
- package/dist/{progress-BroqrAyV.js → progress-rnS8-uAW.js} +11 -11
- package/dist/progress-rnS8-uAW.js.map +1 -0
- package/dist/{receipt-BuJynLgf.js → receipt-D0oswZ0p.js} +6 -6
- package/dist/{receipt-BuJynLgf.js.map → receipt-D0oswZ0p.js.map} +1 -1
- package/dist/rich-text-DvGulsNJ.js +78 -0
- package/dist/rich-text-DvGulsNJ.js.map +1 -0
- package/dist/rich-text-editor-sMU_Scqm.js +1204 -0
- package/dist/rich-text-editor-sMU_Scqm.js.map +1 -0
- package/dist/rich-text-editor.recipes-CadiF_Uu.js +88 -0
- package/dist/rich-text-editor.recipes-CadiF_Uu.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-Bt_vXY2b.js +48 -0
- package/dist/scroll-area-Bt_vXY2b.js.map +1 -0
- package/dist/{separator-BNIgG3au.js → separator-C8DlRGwF.js} +4 -4
- package/dist/separator-C8DlRGwF.js.map +1 -0
- package/dist/{separator-BhtFyo4x.js → separator-CYHnjsAb.js} +2 -2
- package/dist/{separator-BhtFyo4x.js.map → separator-CYHnjsAb.js.map} +1 -1
- package/dist/services/actions/action-adapters.d.ts +22 -0
- package/dist/services/actions/index.d.ts +1 -1
- package/dist/services/actions.js +23 -6
- package/dist/services/actions.js.map +1 -1
- package/dist/settings-CQW3b-Cu.js +170 -0
- package/dist/settings-CQW3b-Cu.js.map +1 -0
- package/dist/sheet-4SEvVYzA.js +210 -0
- package/dist/sheet-4SEvVYzA.js.map +1 -0
- package/dist/{sidebar-CyR4XKwR.js → sidebar-C7WWR29L.js} +181 -180
- package/dist/sidebar-C7WWR29L.js.map +1 -0
- package/dist/sidebar-d7Dg80ln.js +511 -0
- package/dist/sidebar-d7Dg80ln.js.map +1 -0
- package/dist/{skeleton-3F0uhYn3.js → skeleton-Cz890JZF.js} +10 -10
- package/dist/skeleton-Cz890JZF.js.map +1 -0
- package/dist/smart-card-lFKxn5Hu.js +595 -0
- package/dist/smart-card-lFKxn5Hu.js.map +1 -0
- package/dist/{spinner-Cpf7oRkF.js → spinner-fa3h1Aif.js} +10 -8
- package/dist/spinner-fa3h1Aif.js.map +1 -0
- package/dist/{structure-CRdqVawd.js → structure-DC2dygdA.js} +3 -3
- package/dist/{structure-CRdqVawd.js.map → structure-DC2dygdA.js.map} +1 -1
- package/dist/{structure.recipes-Bqhf9oIh.js → structure.recipes-EPz60cU8.js} +37 -19
- package/dist/structure.recipes-EPz60cU8.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/surface-recipes-BKRVW8Os.js +43 -0
- package/dist/surface-recipes-BKRVW8Os.js.map +1 -0
- package/dist/table-CIKyLUsy.js +163 -0
- package/dist/table-CIKyLUsy.js.map +1 -0
- package/dist/{table-CcRDZiLP.js → table-CrcLN9Io.js} +544 -530
- package/dist/table-CrcLN9Io.js.map +1 -0
- package/dist/tabs-DwBJfjxX.js +190 -0
- package/dist/tabs-DwBJfjxX.js.map +1 -0
- package/dist/{text-inputs-DsR56TR-.js → text-inputs-aaK9wcDT.js} +151 -155
- package/dist/text-inputs-aaK9wcDT.js.map +1 -0
- package/dist/{text.styles-Q4sGAIgA.js → text.styles-g4He6UIW.js} +17 -14
- package/dist/text.styles-g4He6UIW.js.map +1 -0
- package/dist/theme.css +16 -12
- package/dist/themes/green.css +24 -0
- package/dist/{timelines-D1pkt3se.js → timelines-C_SBwHNP.js} +154 -164
- package/dist/timelines-C_SBwHNP.js.map +1 -0
- package/dist/tone-recipes-CPoExcTE.js +70 -0
- package/dist/tone-recipes-CPoExcTE.js.map +1 -0
- package/dist/tooltip-CsfgrfS7.js +111 -0
- package/dist/tooltip-CsfgrfS7.js.map +1 -0
- package/dist/track-recipes-CDcKmndW.js +10 -0
- package/dist/track-recipes-CDcKmndW.js.map +1 -0
- package/dist/{tree-BtmYyMZV.js → tree-BiKhg8AY.js} +72 -70
- package/dist/tree-BiKhg8AY.js.map +1 -0
- package/dist/typography/rich-text.js +1 -1
- package/dist/typography-DTRkE9zL.js +117 -0
- package/dist/typography-DTRkE9zL.js.map +1 -0
- package/dist/typography.js +2 -2
- package/dist/{ui-provider-DRPn3qNl.js → ui-provider-1D_NSYzO.js} +30 -23
- package/dist/ui-provider-1D_NSYzO.js.map +1 -0
- package/dist/ui-provider.js +3 -3
- package/dist/{upload-CDbYw1WN.js → upload-BO8-CLN6.js} +294 -293
- package/dist/upload-BO8-CLN6.js.map +1 -0
- package/dist/{upload-queue-CNd_hH_a.js → upload-queue-EOC8g1gf.js} +133 -138
- package/dist/upload-queue-EOC8g1gf.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-VyJLUwRr.js → usage-card-obRaBskq.js} +42 -43
- package/dist/{usage-card-VyJLUwRr.js.map → usage-card-obRaBskq.js.map} +1 -1
- package/dist/{utils-BvH9PSmq.js → utils-l5LpDw2z.js} +264 -62
- package/dist/utils-l5LpDw2z.js.map +1 -0
- package/dist/value-inputs-TAYMX111.js +947 -0
- package/dist/value-inputs-TAYMX111.js.map +1 -0
- package/dist/value-typography-b8wpz1eX.js +116 -0
- package/dist/value-typography-b8wpz1eX.js.map +1 -0
- package/dist/workspace-DH0v0KcB.js +407 -0
- package/dist/workspace-DH0v0KcB.js.map +1 -0
- package/docs/consumer-skill/SKILL.md +62 -50
- package/docs/consumer-skill/examples/app-layout.tsx +3 -5
- package/docs/consumer-skill/examples/composition.tsx +3 -3
- package/docs/consumer-skill/examples/detail.tsx +59 -13
- package/docs/consumer-skill/examples/edit.tsx +2 -2
- package/docs/consumer-skill/examples/layout-blocks.tsx +20 -0
- package/docs/consumer-skill/examples/manifest.json +28 -6
- package/docs/consumer-skill/examples/receipt.tsx +2 -2
- package/docs/consumer-skill/examples/scoped-directory.tsx +3 -3
- 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 +139 -24
- package/docs/consumer-skill/references/design-contract.md +12 -3
- package/docs/consumer-skill/references/discovery.md +4 -0
- package/docs/consumer-skill/references/installation.md +33 -1
- package/docs/consumer-skill/references/integration.md +32 -1
- package/docs/consumer-skill/references/public-api.json +1051 -610
- package/docs/consumer-skill/references/review.md +44 -8
- package/docs/consumer-skill/references/theming.md +14 -4
- package/docs/consumer-skill/references/tokens.json +5 -2
- package/docs/consumer-skill/references/workflows.md +30 -9
- package/docs/consumer-skill/scripts/composition-policy.mjs +127 -6
- package/docs/consumer-skill/scripts/discovery.mjs +11 -3
- package/docs/consumer-skill/scripts/pin-button-defaults.mjs +95 -0
- package/docs/consumer-skill/scripts/surface-policy.mjs +139 -5
- package/package.json +13 -3
- package/dist/accordion-BRTcsp8J.js +0 -205
- package/dist/accordion-BRTcsp8J.js.map +0 -1
- package/dist/action-menu-Drxw_vJk.js +0 -265
- package/dist/action-menu-Drxw_vJk.js.map +0 -1
- package/dist/affordance-geometry.generated-CL84ZN9A.js.map +0 -1
- package/dist/ai-artifact-DLVdK0Py.js.map +0 -1
- package/dist/attachment-DbjUWsP0.js +0 -244
- package/dist/attachment-DbjUWsP0.js.map +0 -1
- package/dist/auth-CAQcasMV.js.map +0 -1
- package/dist/avatar-Bu2HhitA.js.map +0 -1
- package/dist/badge-CzId1Wlm.js +0 -92
- package/dist/badge-CzId1Wlm.js.map +0 -1
- package/dist/breadcrumbs-BuYz5SDU.js +0 -128
- package/dist/breadcrumbs-BuYz5SDU.js.map +0 -1
- package/dist/button-BZDasD04.js +0 -651
- package/dist/button-BZDasD04.js.map +0 -1
- package/dist/button-BZyfTvwm.js.map +0 -1
- package/dist/buttons-D_6KJvEE.js +0 -99
- package/dist/buttons-D_6KJvEE.js.map +0 -1
- package/dist/cards-qGSErLw_.js.map +0 -1
- package/dist/chart-Bsc5BICK.js.map +0 -1
- package/dist/checkbox-BQNDjUCh.js +0 -34
- package/dist/checkbox-BQNDjUCh.js.map +0 -1
- package/dist/choice-inputs-Mk3iWbhr.js +0 -725
- package/dist/choice-inputs-Mk3iWbhr.js.map +0 -1
- package/dist/code-block-DzHKRybS.js +0 -183
- package/dist/code-block-DzHKRybS.js.map +0 -1
- package/dist/combobox-BFnbJJp3.js.map +0 -1
- package/dist/combobox-hozNwUcc.js +0 -847
- package/dist/combobox-hozNwUcc.js.map +0 -1
- package/dist/command-BnmSchli.js.map +0 -1
- package/dist/comments-u5L0OGip.js.map +0 -1
- package/dist/containers-DqB-bSYE.js.map +0 -1
- package/dist/data-display-Bihs9Ven.js +0 -1342
- package/dist/data-display-Bihs9Ven.js.map +0 -1
- package/dist/date-DOKhJPu7.js +0 -140
- package/dist/date-DOKhJPu7.js.map +0 -1
- package/dist/date-picker-DzP5HQq7.js +0 -1541
- package/dist/date-picker-DzP5HQq7.js.map +0 -1
- package/dist/date-pickers-BpgGz7S-.js +0 -196
- package/dist/date-pickers-BpgGz7S-.js.map +0 -1
- package/dist/display-CS6Hbk18.js.map +0 -1
- package/dist/dropdown-menu-D-boNgGO.js.map +0 -1
- package/dist/feedback-CJkUAapr.js +0 -233
- package/dist/feedback-CJkUAapr.js.map +0 -1
- package/dist/field-affordance-recipes-uKY4MsZ_.js +0 -25
- package/dist/field-affordance-recipes-uKY4MsZ_.js.map +0 -1
- package/dist/field-state-recipes-DQQpiLWC.js +0 -11
- package/dist/field-state-recipes-DQQpiLWC.js.map +0 -1
- package/dist/filters-D6FF8L6s.js.map +0 -1
- package/dist/form-sizing-QP8aIRaW.js +0 -103
- package/dist/form-sizing-QP8aIRaW.js.map +0 -1
- package/dist/format-iamDSqs2.js +0 -110
- package/dist/format-iamDSqs2.js.map +0 -1
- package/dist/forms-B5NCbkSC.js.map +0 -1
- package/dist/forms-numeric-Crrm80Lm.js +0 -867
- package/dist/forms-numeric-Crrm80Lm.js.map +0 -1
- package/dist/header-kxruN3RM.js.map +0 -1
- package/dist/icon-badge-Btc6pQrp.js +0 -53
- package/dist/icon-badge-Btc6pQrp.js.map +0 -1
- package/dist/input-SX9V0AL3.js +0 -255
- package/dist/input-SX9V0AL3.js.map +0 -1
- package/dist/item-DE4YnuJx.js +0 -258
- package/dist/item-DE4YnuJx.js.map +0 -1
- package/dist/media-gallery-DLp3HAz0.js +0 -201
- package/dist/media-gallery-DLp3HAz0.js.map +0 -1
- package/dist/mentions-Cl0Kt_Pd.js +0 -565
- package/dist/mentions-Cl0Kt_Pd.js.map +0 -1
- package/dist/navigation-DnQSNMT0.js +0 -276
- package/dist/navigation-DnQSNMT0.js.map +0 -1
- package/dist/navigation-DyytsLRB.js +0 -265
- package/dist/navigation-DyytsLRB.js.map +0 -1
- package/dist/number-DasMFWEG.js +0 -269
- package/dist/number-DasMFWEG.js.map +0 -1
- package/dist/overlay.recipes-BxW5FIfK.js +0 -6
- package/dist/overlay.recipes-BxW5FIfK.js.map +0 -1
- package/dist/overlays-DUbs1KEi.js +0 -1011
- package/dist/overlays-DUbs1KEi.js.map +0 -1
- package/dist/page-hGmT4nWK.js.map +0 -1
- package/dist/page-header-D8nERkn5.js +0 -112
- package/dist/page-header-D8nERkn5.js.map +0 -1
- package/dist/popover-CghIYdQf.js.map +0 -1
- package/dist/primitives-C7ff0QaI.js +0 -337
- package/dist/primitives-C7ff0QaI.js.map +0 -1
- package/dist/progress-BroqrAyV.js.map +0 -1
- package/dist/rich-text-DlxDOtf4.js +0 -32
- package/dist/rich-text-DlxDOtf4.js.map +0 -1
- package/dist/rich-text-editor-BKyG7rWz.js +0 -574
- package/dist/rich-text-editor-BKyG7rWz.js.map +0 -1
- package/dist/rich-text-editor.recipes-B72Nfuze.js +0 -81
- package/dist/rich-text-editor.recipes-B72Nfuze.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/sanitize-html-BG9FGe-j.js +0 -64
- package/dist/sanitize-html-BG9FGe-j.js.map +0 -1
- package/dist/scroll-area-D-pIhEKl.js +0 -47
- package/dist/scroll-area-D-pIhEKl.js.map +0 -1
- package/dist/separator-BNIgG3au.js.map +0 -1
- package/dist/settings-DOTOzeZ2.js +0 -161
- package/dist/settings-DOTOzeZ2.js.map +0 -1
- package/dist/sheet-BFhrNehm.js +0 -205
- package/dist/sheet-BFhrNehm.js.map +0 -1
- package/dist/sidebar-CyR4XKwR.js.map +0 -1
- package/dist/sidebar-SvGJ0Zwi.js +0 -506
- package/dist/sidebar-SvGJ0Zwi.js.map +0 -1
- package/dist/skeleton-3F0uhYn3.js.map +0 -1
- package/dist/smart-card-DjGVV2xr.js +0 -584
- package/dist/smart-card-DjGVV2xr.js.map +0 -1
- package/dist/spinner-Cpf7oRkF.js.map +0 -1
- package/dist/structure.recipes-Bqhf9oIh.js.map +0 -1
- package/dist/surface-recipes-Dd__PD-w.js +0 -28
- package/dist/surface-recipes-Dd__PD-w.js.map +0 -1
- package/dist/table-CLtJTxoR.js +0 -147
- package/dist/table-CLtJTxoR.js.map +0 -1
- package/dist/table-CcRDZiLP.js.map +0 -1
- package/dist/tabs-BNgu7g0u.js +0 -188
- package/dist/tabs-BNgu7g0u.js.map +0 -1
- package/dist/text-inputs-DsR56TR-.js.map +0 -1
- package/dist/text.styles-Q4sGAIgA.js.map +0 -1
- package/dist/timelines-D1pkt3se.js.map +0 -1
- package/dist/track-recipes-LLPNVwFg.js +0 -10
- package/dist/track-recipes-LLPNVwFg.js.map +0 -1
- package/dist/tree-BtmYyMZV.js.map +0 -1
- package/dist/typography-BxQgiZyw.js +0 -96
- package/dist/typography-BxQgiZyw.js.map +0 -1
- package/dist/ui-provider-DRPn3qNl.js.map +0 -1
- package/dist/upload-CDbYw1WN.js.map +0 -1
- package/dist/upload-queue-CNd_hH_a.js.map +0 -1
- package/dist/use-file-drop-target-BX7GnhoQ.js +0 -39
- package/dist/use-file-drop-target-BX7GnhoQ.js.map +0 -1
- package/dist/utils-BvH9PSmq.js.map +0 -1
- package/dist/value-inputs-D0KCrfVC.js +0 -840
- package/dist/value-inputs-D0KCrfVC.js.map +0 -1
- package/dist/workspace-CcR8r-Nt.js +0 -395
- package/dist/workspace-CcR8r-Nt.js.map +0 -1
- /package/dist/components/{blocks/data-display/metadata → base/metadata-list}/metadata-list.strings.d.ts +0 -0
|
@@ -1,32 +1,34 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { s as e, v as t } from "./ui-provider-1D_NSYzO.js";
|
|
3
3
|
import { useStrings as n } from "./lib/strings.js";
|
|
4
|
-
import { t as r } from "./utils-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { r as c, t as l } from "./structure-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { t as
|
|
11
|
-
import {
|
|
12
|
-
import { t as
|
|
13
|
-
import { t as y } from "./
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { t as
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import { t as
|
|
21
|
-
import { t as z } from "./
|
|
22
|
-
import {
|
|
23
|
-
import { t as oe } from "./
|
|
24
|
-
import
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
4
|
+
import { t as r } from "./utils-l5LpDw2z.js";
|
|
5
|
+
import { n as i } from "./buttons-SbIcm1HJ.js";
|
|
6
|
+
import { a, i as o, s } from "./typography-DTRkE9zL.js";
|
|
7
|
+
import { r as c, t as l } from "./structure-DC2dygdA.js";
|
|
8
|
+
import { r as u } from "./tone-recipes-CPoExcTE.js";
|
|
9
|
+
import { n as d, t as f } from "./feedback-qNuMBtRH.js";
|
|
10
|
+
import { t as p } from "./interaction-recipes-CHr0dJUs.js";
|
|
11
|
+
import { _ as m, g as h, m as g } from "./primitives-B-CkiEMU.js";
|
|
12
|
+
import { t as _ } from "./number-DMhe-Vsk.js";
|
|
13
|
+
import { n as v, t as y } from "./date-BgK3bTdo.js";
|
|
14
|
+
import { t as b } from "./badge-MrKVNzW9.js";
|
|
15
|
+
import { n as x } from "./field-affordance-recipes-qQeIf4lG.js";
|
|
16
|
+
import { a as S, i as C, n as w, o as T, r as E, s as D, t as O } from "./command-kNR20o7x.js";
|
|
17
|
+
import { _ as k, f as A, u as j } from "./form-sizing-By94KzXE.js";
|
|
18
|
+
import { t as M } from "./input-DWhBBBww.js";
|
|
19
|
+
import { t as N } from "./date-picker-CF-DtUpF.js";
|
|
20
|
+
import { a as P, c as ee, i as F, o as I, r as L, t as te } from "./popover-Di55PyAI.js";
|
|
21
|
+
import { n as ne, r as R, t as z } from "./control-group-recipes-DBXmfh2E.js";
|
|
22
|
+
import { i as re, r as ie, t as ae } from "./tabs-DwBJfjxX.js";
|
|
23
|
+
import { t as oe } from "./popover-menu-B71Tn2Qz.js";
|
|
24
|
+
import { t as se } from "./use-debounced-callback-Cx1h-hdv.js";
|
|
25
|
+
import { t as ce } from "./use-debounce-DZ_1ZBPa.js";
|
|
26
|
+
import B, { Component as le, createContext as ue, useCallback as V, useContext as de, useEffect as H, useId as fe, useMemo as U, useRef as W, useState as G } from "react";
|
|
27
|
+
import { Fragment as pe, jsx as K, jsxs as q } from "react/jsx-runtime";
|
|
28
|
+
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";
|
|
29
|
+
import { format as Ce, isValid as J, parse as we } from "date-fns";
|
|
28
30
|
//#region src/components/features/filters/filters.strings.ts
|
|
29
|
-
var
|
|
31
|
+
var Te = {
|
|
30
32
|
loading: "Loading",
|
|
31
33
|
loadingOptions: "Loading {filterLabel} options...",
|
|
32
34
|
addFilter: "Add filter",
|
|
@@ -108,7 +110,7 @@ var Ce = {
|
|
|
108
110
|
function Y(e, t) {
|
|
109
111
|
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
112
|
}
|
|
111
|
-
function
|
|
113
|
+
function Ee(e, t, n) {
|
|
112
114
|
let r = t.split("."), i = e;
|
|
113
115
|
for (let e of r) {
|
|
114
116
|
if (typeof i != "object" || !i) return t;
|
|
@@ -143,12 +145,12 @@ var X = {
|
|
|
143
145
|
HAS_ANY: "has_any",
|
|
144
146
|
HAS_ALL: "has_all"
|
|
145
147
|
};
|
|
146
|
-
function
|
|
148
|
+
function De(e) {
|
|
147
149
|
return e;
|
|
148
150
|
}
|
|
149
151
|
//#endregion
|
|
150
152
|
//#region src/components/features/filters/operator-options.ts
|
|
151
|
-
function
|
|
153
|
+
function Oe(e) {
|
|
152
154
|
return [
|
|
153
155
|
{
|
|
154
156
|
label: e.contains,
|
|
@@ -164,7 +166,7 @@ function Ee(e) {
|
|
|
164
166
|
}
|
|
165
167
|
];
|
|
166
168
|
}
|
|
167
|
-
function
|
|
169
|
+
function ke(e) {
|
|
168
170
|
return [{
|
|
169
171
|
label: e.is,
|
|
170
172
|
value: Z.EQUALS
|
|
@@ -173,7 +175,7 @@ function De(e) {
|
|
|
173
175
|
value: Z.NOT
|
|
174
176
|
}];
|
|
175
177
|
}
|
|
176
|
-
function
|
|
178
|
+
function Ae(e) {
|
|
177
179
|
return [
|
|
178
180
|
{
|
|
179
181
|
label: e.equals,
|
|
@@ -189,7 +191,7 @@ function Oe(e) {
|
|
|
189
191
|
}
|
|
190
192
|
];
|
|
191
193
|
}
|
|
192
|
-
function
|
|
194
|
+
function je(e) {
|
|
193
195
|
return [
|
|
194
196
|
{
|
|
195
197
|
label: e.before,
|
|
@@ -205,15 +207,15 @@ function ke(e) {
|
|
|
205
207
|
}
|
|
206
208
|
];
|
|
207
209
|
}
|
|
208
|
-
function
|
|
210
|
+
function Me(e) {
|
|
209
211
|
return [{
|
|
210
212
|
label: e.equals,
|
|
211
213
|
value: Z.EQUALS
|
|
212
214
|
}];
|
|
213
215
|
}
|
|
214
|
-
function
|
|
216
|
+
function Ne(e, t) {
|
|
215
217
|
switch (e) {
|
|
216
|
-
case X.SEARCH: return
|
|
218
|
+
case X.SEARCH: return Oe(t);
|
|
217
219
|
case X.TAGS: return [
|
|
218
220
|
{
|
|
219
221
|
label: t.has,
|
|
@@ -229,13 +231,13 @@ function je(e, t) {
|
|
|
229
231
|
}
|
|
230
232
|
];
|
|
231
233
|
case X.SELECT:
|
|
232
|
-
case X.ASYNC_SELECT: return
|
|
233
|
-
case X.RANGE: return
|
|
234
|
-
case X.DATE: return
|
|
235
|
-
default: return
|
|
234
|
+
case X.ASYNC_SELECT: return ke(t);
|
|
235
|
+
case X.RANGE: return Ae(t);
|
|
236
|
+
case X.DATE: return je(t);
|
|
237
|
+
default: return Oe(t);
|
|
236
238
|
}
|
|
237
239
|
}
|
|
238
|
-
function
|
|
240
|
+
function Pe(e) {
|
|
239
241
|
switch (e) {
|
|
240
242
|
case X.SEARCH: return Z.CONTAINS;
|
|
241
243
|
case X.TAGS: return Z.HAS;
|
|
@@ -248,7 +250,7 @@ function Me(e) {
|
|
|
248
250
|
}
|
|
249
251
|
//#endregion
|
|
250
252
|
//#region src/components/features/filters/utils/filter-utils.ts
|
|
251
|
-
function
|
|
253
|
+
function Fe(e, t, n) {
|
|
252
254
|
if (e.type === "date" && Array.isArray(t) && t.every((e) => typeof e == "string")) return !0;
|
|
253
255
|
if (e.validation?.required && (!t || Array.isArray(t) && t.length === 0)) return n("validation.required");
|
|
254
256
|
if (typeof t == "number") {
|
|
@@ -264,8 +266,8 @@ function Ne(e, t, n) {
|
|
|
264
266
|
}
|
|
265
267
|
//#endregion
|
|
266
268
|
//#region src/components/features/filters/filter-context.tsx
|
|
267
|
-
var
|
|
268
|
-
function
|
|
269
|
+
var Ie = ue(void 0);
|
|
270
|
+
function Le({ children: e, filters: t, activeFilters: r, onFilterChange: i, navigating: a = !1, strings: o, onError: s }) {
|
|
269
271
|
let c = W(t), l = W(i), u = W(s);
|
|
270
272
|
u.current = s;
|
|
271
273
|
let [d, f] = G(0), p = W(/* @__PURE__ */ new Map()), m = U(() => {
|
|
@@ -281,7 +283,7 @@ function Fe({ children: e, filters: t, activeFilters: r, onFilterChange: i, navi
|
|
|
281
283
|
});
|
|
282
284
|
}
|
|
283
285
|
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(
|
|
286
|
+
}, [t]), h = JSON.stringify(r.filter((e) => m.has(e.key)).map(({ key: e, value: t }) => [e, t])), g = n(Te, o);
|
|
285
287
|
H(() => {
|
|
286
288
|
c.current = t;
|
|
287
289
|
}, [t]), H(() => {
|
|
@@ -308,7 +310,7 @@ function Fe({ children: e, filters: t, activeFilters: r, onFilterChange: i, navi
|
|
|
308
310
|
if (t.length === 0) n && v(e);
|
|
309
311
|
else if (n) y(e, { value: t });
|
|
310
312
|
else {
|
|
311
|
-
let n = c.current.find((t) => t.key === e), r = n?.operator ?? n?.operators?.[0]?.value ?? (n ?
|
|
313
|
+
let n = c.current.find((t) => t.key === e), r = n?.operator ?? n?.operators?.[0]?.value ?? (n ? Pe(n.type) : "equals");
|
|
312
314
|
_({
|
|
313
315
|
id: e,
|
|
314
316
|
key: e,
|
|
@@ -325,7 +327,7 @@ function Fe({ children: e, filters: t, activeFilters: r, onFilterChange: i, navi
|
|
|
325
327
|
r.find((t) => t.key === e) && y(e, { operator: t });
|
|
326
328
|
}, [r, y]), O = V((e, t) => {
|
|
327
329
|
let n = c.current.find((t) => t.key === e);
|
|
328
|
-
return n ?
|
|
330
|
+
return n ? Fe(n, t, (e) => Ee(g, e)) : !1;
|
|
329
331
|
}, [g]), k = V((e) => c.current.filter((t) => t.dependencies?.some((t) => t.key === e)), []), A = V((e, t) => {
|
|
330
332
|
let n = m.get(e)?.options;
|
|
331
333
|
if (!n) return;
|
|
@@ -403,19 +405,19 @@ function Fe({ children: e, filters: t, activeFilters: r, onFilterChange: i, navi
|
|
|
403
405
|
j,
|
|
404
406
|
M
|
|
405
407
|
]);
|
|
406
|
-
return /* @__PURE__ */ K(
|
|
408
|
+
return /* @__PURE__ */ K(Ie.Provider, {
|
|
407
409
|
value: N,
|
|
408
410
|
children: e
|
|
409
411
|
});
|
|
410
412
|
}
|
|
411
413
|
function Q() {
|
|
412
|
-
let e =
|
|
414
|
+
let e = de(Ie);
|
|
413
415
|
if (!e) throw Error("useFilters must be used within a FilterProvider");
|
|
414
416
|
return e;
|
|
415
417
|
}
|
|
416
418
|
//#endregion
|
|
417
419
|
//#region src/components/features/filters/hooks/use-filter-groups.ts
|
|
418
|
-
function
|
|
420
|
+
function Re(e = {}) {
|
|
419
421
|
let { dynamicFilterOptions: t } = e, { filters: n, isFilterActive: r } = Q(), i = U(() => t ? n.map((e) => {
|
|
420
422
|
let n = t[e.key];
|
|
421
423
|
return Array.isArray(n) ? {
|
|
@@ -438,28 +440,28 @@ function Ie(e = {}) {
|
|
|
438
440
|
}
|
|
439
441
|
//#endregion
|
|
440
442
|
//#region src/components/features/filters/partials/filter-operator-select.tsx
|
|
441
|
-
function
|
|
443
|
+
function ze({ operator: e, operators: t, onOperatorChange: n, segmentResetClass: o }) {
|
|
442
444
|
let [c, l] = G(!1), { strings: u } = Q(), d = t.find((t) => t.value === e)?.label || e;
|
|
443
|
-
return /* @__PURE__ */ K(
|
|
445
|
+
return /* @__PURE__ */ K(oe, {
|
|
444
446
|
open: c,
|
|
445
447
|
onOpenChange: l,
|
|
446
448
|
search: !1,
|
|
447
449
|
contentLabel: u.operator,
|
|
448
|
-
trigger: /* @__PURE__ */ K(
|
|
450
|
+
trigger: /* @__PURE__ */ K(i, {
|
|
449
451
|
tone: "secondary",
|
|
450
452
|
buttonStyle: "ghost",
|
|
451
|
-
className: r("filter-operator-select--component",
|
|
453
|
+
className: r("filter-operator-select--component", o, "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"),
|
|
452
454
|
onClick: (e) => {
|
|
453
455
|
e.stopPropagation();
|
|
454
456
|
},
|
|
455
457
|
type: "button",
|
|
456
|
-
children: /* @__PURE__ */ K(
|
|
458
|
+
children: /* @__PURE__ */ K(s, {
|
|
457
459
|
tag: "span",
|
|
458
460
|
type: "secondary",
|
|
459
461
|
children: d
|
|
460
462
|
})
|
|
461
463
|
}),
|
|
462
|
-
header: /* @__PURE__ */ K(
|
|
464
|
+
header: /* @__PURE__ */ K(a, {
|
|
463
465
|
tag: "span",
|
|
464
466
|
children: u.operator
|
|
465
467
|
}),
|
|
@@ -476,18 +478,18 @@ function Le({ operator: e, operators: t, onOperatorChange: n, segmentResetClass:
|
|
|
476
478
|
}
|
|
477
479
|
//#endregion
|
|
478
480
|
//#region src/components/features/filters/partials/filter-value-display.tsx
|
|
479
|
-
function
|
|
481
|
+
function Be({ filter: e, value: t }) {
|
|
480
482
|
let { strings: n } = Q();
|
|
481
|
-
return t.length === 0 && e.type !== X.DATE ? /* @__PURE__ */ K(
|
|
483
|
+
return t.length === 0 && e.type !== X.DATE ? /* @__PURE__ */ K(s, {
|
|
482
484
|
tag: "span",
|
|
483
485
|
type: "secondary",
|
|
484
486
|
className: "filter-value-display--component leading-none",
|
|
485
487
|
children: n.nothingSelected
|
|
486
|
-
}) : e.type === X.ASYNC_SELECT && !e.options?.length ? /* @__PURE__ */ K(
|
|
488
|
+
}) : e.type === X.ASYNC_SELECT && !e.options?.length ? /* @__PURE__ */ K(s, {
|
|
487
489
|
tag: "span",
|
|
488
490
|
weight: "semibold",
|
|
489
491
|
className: "filter-value-display--component leading-none",
|
|
490
|
-
children:
|
|
492
|
+
children: He(e, t, n)
|
|
491
493
|
}) : e.options && e.type !== X.DATE ? /* @__PURE__ */ q(l, {
|
|
492
494
|
direction: "horizontal",
|
|
493
495
|
gap: "xs",
|
|
@@ -504,73 +506,73 @@ function Re({ filter: e, value: t }) {
|
|
|
504
506
|
}, t) : null;
|
|
505
507
|
}), t.length > 2 && /* @__PURE__ */ K("div", {
|
|
506
508
|
className: "bg-muted border-background relative -ml-space-sm flex size-icon items-center justify-center rounded-full border",
|
|
507
|
-
children: /* @__PURE__ */ q(
|
|
509
|
+
children: /* @__PURE__ */ q(s, {
|
|
508
510
|
tag: "span",
|
|
509
511
|
size: "xs",
|
|
510
512
|
weight: "medium",
|
|
511
|
-
children: ["+", /* @__PURE__ */ K(
|
|
513
|
+
children: ["+", /* @__PURE__ */ K(_, {
|
|
512
514
|
value: t.length - 2,
|
|
513
515
|
size: "inherit",
|
|
514
516
|
align: "center"
|
|
515
517
|
})]
|
|
516
518
|
})
|
|
517
519
|
})]
|
|
518
|
-
}), /* @__PURE__ */ K(
|
|
520
|
+
}), /* @__PURE__ */ K(s, {
|
|
519
521
|
tag: "span",
|
|
520
522
|
weight: "semibold",
|
|
521
523
|
className: "truncate leading-none",
|
|
522
|
-
children:
|
|
524
|
+
children: Ue(e, t, n)
|
|
523
525
|
})]
|
|
524
526
|
}) : e.type === X.DATE ? /* @__PURE__ */ q(l, {
|
|
525
527
|
direction: "horizontal",
|
|
526
528
|
gap: "xs",
|
|
527
529
|
wrap: !1,
|
|
528
530
|
className: "filter-value-display--component",
|
|
529
|
-
children: [/* @__PURE__ */ K(
|
|
530
|
-
}) : /* @__PURE__ */ K(
|
|
531
|
+
children: [/* @__PURE__ */ K(me, { className: "text-muted-foreground size-icon-sm" }), Ve(e, t, n)]
|
|
532
|
+
}) : /* @__PURE__ */ K(s, {
|
|
531
533
|
tag: "span",
|
|
532
534
|
weight: "semibold",
|
|
533
535
|
className: "filter-value-display--component truncate leading-none",
|
|
534
|
-
children:
|
|
536
|
+
children: Ue(e, t, n)
|
|
535
537
|
});
|
|
536
538
|
}
|
|
537
|
-
function
|
|
538
|
-
return e.operator === "between" && t.length === 2 ?
|
|
539
|
+
function Ve(e, t, n) {
|
|
540
|
+
return e.operator === "between" && t.length === 2 ? Ke(t[0], t[1], e.dateFormat?.display) : t.length === 1 ? Ge(t[0], e.dateFormat?.display) : t.length === 2 ? Ke(t[0], t[1], e.dateFormat?.display) : /* @__PURE__ */ K(m, {
|
|
539
541
|
weight: "semibold",
|
|
540
542
|
className: "truncate leading-none",
|
|
541
543
|
children: e.datePickerConfig?.noDatePlaceholder || n.calendar.notDateSelected
|
|
542
544
|
});
|
|
543
545
|
}
|
|
544
|
-
function
|
|
546
|
+
function He(e, t, n) {
|
|
545
547
|
return t.length === 0 ? "" : Y(n.selected, {
|
|
546
548
|
count: t.length,
|
|
547
549
|
filterLabel: (t.length > 1 ? e.pluralLabel : e.label) ?? e.label
|
|
548
550
|
});
|
|
549
551
|
}
|
|
550
|
-
function
|
|
552
|
+
function Ue(e, t, n) {
|
|
551
553
|
return t.length > 1 ? Y(n.selected, {
|
|
552
554
|
count: t.length,
|
|
553
555
|
filterLabel: e.pluralLabel ?? e.label
|
|
554
556
|
}) : t.map((t) => e.options?.find((e) => e.value === t)?.label || t).join(", ");
|
|
555
557
|
}
|
|
556
|
-
function
|
|
558
|
+
function We(e) {
|
|
557
559
|
let t = new Date(e);
|
|
558
560
|
return !Number.isNaN(t.getTime());
|
|
559
561
|
}
|
|
560
|
-
function
|
|
561
|
-
return
|
|
562
|
+
function Ge(e, t) {
|
|
563
|
+
return We(e) ? /* @__PURE__ */ K(y, {
|
|
562
564
|
value: e,
|
|
563
565
|
format: t,
|
|
564
566
|
weight: "semibold",
|
|
565
567
|
className: "truncate leading-none"
|
|
566
|
-
}) : /* @__PURE__ */ K(
|
|
568
|
+
}) : /* @__PURE__ */ K(m, {
|
|
567
569
|
weight: "semibold",
|
|
568
570
|
className: "truncate leading-none",
|
|
569
571
|
children: e
|
|
570
572
|
});
|
|
571
573
|
}
|
|
572
|
-
function
|
|
573
|
-
return
|
|
574
|
+
function Ke(e, t, n) {
|
|
575
|
+
return We(e) && We(t) ? /* @__PURE__ */ K(v, {
|
|
574
576
|
from: e,
|
|
575
577
|
to: t,
|
|
576
578
|
format: n,
|
|
@@ -579,19 +581,19 @@ function We(e, t, n) {
|
|
|
579
581
|
}) : /* @__PURE__ */ q("span", {
|
|
580
582
|
className: "inline-flex min-w-0 items-center gap-space-xs truncate leading-none",
|
|
581
583
|
children: [
|
|
582
|
-
|
|
583
|
-
/* @__PURE__ */ K(
|
|
584
|
+
Ge(e, n),
|
|
585
|
+
/* @__PURE__ */ K(m, {
|
|
584
586
|
weight: "semibold",
|
|
585
587
|
children: "–"
|
|
586
588
|
}),
|
|
587
|
-
|
|
589
|
+
Ge(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: h } =
|
|
595
|
+
function qe({ filter: n, value: a, active: o, popoverOpen: c, triggerRef: l, operators: u, operator: d, onOperatorChange: f, onFilterClear: p, onFilterClick: m }) {
|
|
596
|
+
let { defaultScale: h } = e(), g = t(void 0, h), { strings: _ } = Q(), v = B.useId(), y = B.useId(), b = `${R.joinedItem} !border-0 !rounded-none !shadow-none focus-visible:!ring-0 focus-visible:!border-transparent`, x = () => /* @__PURE__ */ K("div", {
|
|
595
597
|
"aria-hidden": !0,
|
|
596
598
|
className: "w-px self-stretch bg-border"
|
|
597
599
|
});
|
|
@@ -599,13 +601,13 @@ function Ge({ filter: n, value: a, active: o, popoverOpen: c, triggerRef: l, ope
|
|
|
599
601
|
role: "group",
|
|
600
602
|
"aria-label": n.label,
|
|
601
603
|
"data-active": o || void 0,
|
|
602
|
-
className: r("active-filter-item--component",
|
|
604
|
+
className: r("active-filter-item--component", R.joinedFrame, z[g], "bg-background", n.displayConfig?.className),
|
|
603
605
|
children: [
|
|
604
|
-
/* @__PURE__ */ q(
|
|
606
|
+
/* @__PURE__ */ q(i, {
|
|
605
607
|
type: "button",
|
|
606
608
|
tone: "secondary",
|
|
607
609
|
buttonStyle: "ghost",
|
|
608
|
-
className: r(b, "flex h-full items-center gap-space-sm px-control hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground"),
|
|
610
|
+
className: r(b, "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"),
|
|
609
611
|
ref: l,
|
|
610
612
|
"aria-haspopup": "dialog",
|
|
611
613
|
"aria-expanded": c,
|
|
@@ -615,24 +617,24 @@ function Ge({ filter: n, value: a, active: o, popoverOpen: c, triggerRef: l, ope
|
|
|
615
617
|
className: "flex items-center text-muted-foreground",
|
|
616
618
|
children: n.icon
|
|
617
619
|
}),
|
|
618
|
-
/* @__PURE__ */ K(
|
|
620
|
+
/* @__PURE__ */ K(s, {
|
|
619
621
|
id: v,
|
|
620
622
|
tag: "span",
|
|
621
623
|
weight: "semibold",
|
|
622
624
|
children: n.label
|
|
623
625
|
}),
|
|
624
|
-
/* @__PURE__ */ K(
|
|
626
|
+
/* @__PURE__ */ K(ge, { className: "size-icon-sm" })
|
|
625
627
|
]
|
|
626
628
|
}),
|
|
627
629
|
/* @__PURE__ */ K(x, {}),
|
|
628
|
-
/* @__PURE__ */ K(
|
|
630
|
+
/* @__PURE__ */ K(ze, {
|
|
629
631
|
operator: d,
|
|
630
632
|
operators: u,
|
|
631
633
|
onOperatorChange: f,
|
|
632
634
|
segmentResetClass: b
|
|
633
635
|
}),
|
|
634
636
|
/* @__PURE__ */ K(x, {}),
|
|
635
|
-
/* @__PURE__ */ K(
|
|
637
|
+
/* @__PURE__ */ K(i, {
|
|
636
638
|
type: "button",
|
|
637
639
|
tone: "secondary",
|
|
638
640
|
buttonStyle: "ghost",
|
|
@@ -640,28 +642,28 @@ function Ge({ filter: n, value: a, active: o, popoverOpen: c, triggerRef: l, ope
|
|
|
640
642
|
"aria-haspopup": "dialog",
|
|
641
643
|
"aria-expanded": c,
|
|
642
644
|
onClick: m,
|
|
643
|
-
className: r(b, "flex h-full 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"),
|
|
645
|
+
className: r(b, "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
646
|
children: /* @__PURE__ */ K("span", {
|
|
645
647
|
id: y,
|
|
646
648
|
className: "min-w-0",
|
|
647
|
-
children: /* @__PURE__ */ K(
|
|
649
|
+
children: /* @__PURE__ */ K(Be, {
|
|
648
650
|
filter: n,
|
|
649
651
|
value: a
|
|
650
652
|
})
|
|
651
653
|
})
|
|
652
654
|
}),
|
|
653
|
-
!!o && /* @__PURE__ */ q(
|
|
655
|
+
!!o && /* @__PURE__ */ q(pe, { children: [/* @__PURE__ */ K(x, {}), /* @__PURE__ */ q(i, {
|
|
654
656
|
type: "button",
|
|
655
657
|
tone: "secondary",
|
|
656
658
|
buttonStyle: "ghost",
|
|
657
|
-
className: r(b, "flex h-full 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"),
|
|
659
|
+
className: r(b, "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
660
|
onClick: (e) => {
|
|
659
661
|
e.stopPropagation(), e.preventDefault(), p();
|
|
660
662
|
},
|
|
661
|
-
children: [/* @__PURE__ */ K(
|
|
663
|
+
children: [/* @__PURE__ */ K(Se, {
|
|
662
664
|
"aria-hidden": "true",
|
|
663
665
|
className: "size-icon"
|
|
664
|
-
}), /* @__PURE__ */ K(
|
|
666
|
+
}), /* @__PURE__ */ K(s, {
|
|
665
667
|
tag: "span",
|
|
666
668
|
className: "sr-only",
|
|
667
669
|
children: _.clear
|
|
@@ -672,18 +674,18 @@ function Ge({ filter: n, value: a, active: o, popoverOpen: c, triggerRef: l, ope
|
|
|
672
674
|
}
|
|
673
675
|
//#endregion
|
|
674
676
|
//#region src/components/features/filters/hooks/use-async-options.ts
|
|
675
|
-
function
|
|
677
|
+
function Je(e, t, n) {
|
|
676
678
|
for (let [t, r] of e) Date.now() - r.timestamp > n && e.delete(t);
|
|
677
679
|
return e.get(t);
|
|
678
680
|
}
|
|
679
|
-
function
|
|
681
|
+
function Ye(e, t, n, r = {}) {
|
|
680
682
|
let { asyncConfig: i } = e, a = i?.fetcher, o = i?.mapToOption, s = U(() => /* @__PURE__ */ new Map(), [
|
|
681
683
|
e.key,
|
|
682
684
|
a,
|
|
683
685
|
o
|
|
684
686
|
]), c = W(r.onError);
|
|
685
687
|
c.current = r.onError;
|
|
686
|
-
let l = i?.debounceMs ?? e.delay ?? 300, u = (
|
|
688
|
+
let l = i?.debounceMs ?? e.delay ?? 300, u = (ce(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 = U(() => i?.queryKey ? JSON.stringify(i.queryKey({
|
|
687
689
|
query: u,
|
|
688
690
|
limit: d
|
|
689
691
|
})) : JSON.stringify([
|
|
@@ -706,7 +708,7 @@ function qe(e, t, n, r = {}) {
|
|
|
706
708
|
u,
|
|
707
709
|
d
|
|
708
710
|
]), [S, C] = G(() => {
|
|
709
|
-
let e =
|
|
711
|
+
let e = Je(s, b, h);
|
|
710
712
|
return {
|
|
711
713
|
cache: s,
|
|
712
714
|
data: e?.data ?? [],
|
|
@@ -718,7 +720,7 @@ function qe(e, t, n, r = {}) {
|
|
|
718
720
|
return H(() => {
|
|
719
721
|
let t = D.current !== w;
|
|
720
722
|
if (D.current = w, !v) return;
|
|
721
|
-
let n =
|
|
723
|
+
let n = Je(s, b, h), r = n !== void 0 && Date.now() - n.timestamp < m, i = new AbortController();
|
|
722
724
|
if (r && !t) return C({
|
|
723
725
|
cache: s,
|
|
724
726
|
data: n.data,
|
|
@@ -780,22 +782,22 @@ function qe(e, t, n, r = {}) {
|
|
|
780
782
|
}
|
|
781
783
|
//#endregion
|
|
782
784
|
//#region src/components/features/filters/partials/async-filter-content.tsx
|
|
783
|
-
function
|
|
784
|
-
let { strings: c, cacheAsyncOptions:
|
|
785
|
+
function Xe({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onClose: a, triggerSource: o = "chip" }) {
|
|
786
|
+
let { strings: c, cacheAsyncOptions: u, getAsyncOptionLabel: p, reportError: m } = Q(), [h, g] = G(""), [_, v] = G(t ?? []), y = W(t);
|
|
785
787
|
if (t !== y.current) {
|
|
786
788
|
let e = y.current ?? [], n = t ?? [];
|
|
787
789
|
y.current = t, (n.length !== e.length || n.some((t, n) => t !== e[n])) && v(n);
|
|
788
790
|
}
|
|
789
|
-
let { options:
|
|
791
|
+
let { options: b, isLoading: x, isFetching: D, isError: k, refetch: A, isBelowMinQuery: j, minQueryLength: M } = Ye(e, h, !0, { onError: m });
|
|
790
792
|
H(() => {
|
|
791
|
-
|
|
793
|
+
b.length > 0 && u(e.key, b);
|
|
792
794
|
}, [
|
|
793
|
-
|
|
795
|
+
u,
|
|
794
796
|
e.key,
|
|
795
|
-
|
|
797
|
+
b
|
|
796
798
|
]);
|
|
797
|
-
let N = e.multiple !== !1,
|
|
798
|
-
let t = new Set(_), n = new Set(
|
|
799
|
+
let N = e.multiple !== !1, P = e.maxSelected, ee = o === "toolbar", I = _.length !== t.length || _.some((e) => !t.includes(e)), te = U(() => {
|
|
800
|
+
let t = new Set(_), n = new Set(b.map((e) => e.value)), r = [];
|
|
799
801
|
for (let t of _) if (!n.has(t)) {
|
|
800
802
|
let n = p(e.key, t);
|
|
801
803
|
n && r.push({
|
|
@@ -804,9 +806,9 @@ function Je({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
804
806
|
icon: e.icon
|
|
805
807
|
});
|
|
806
808
|
}
|
|
807
|
-
return [...r, ...
|
|
809
|
+
return [...r, ...b].sort((e, n) => +!t.has(e.value) - !t.has(n.value));
|
|
808
810
|
}, [
|
|
809
|
-
|
|
811
|
+
b,
|
|
810
812
|
_,
|
|
811
813
|
e.key,
|
|
812
814
|
e.icon,
|
|
@@ -815,16 +817,16 @@ function Je({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
815
817
|
if (N) {
|
|
816
818
|
if (_.includes(t)) v(_.filter((e) => e !== t));
|
|
817
819
|
else {
|
|
818
|
-
if (
|
|
820
|
+
if (P && _.length >= P) return;
|
|
819
821
|
v([..._, t]);
|
|
820
822
|
}
|
|
821
823
|
} else v([t]), e.closeOnSelect === !0 && (n([t]), a());
|
|
822
824
|
}, R = () => {
|
|
823
825
|
n(_), a();
|
|
824
|
-
}, z = U(() =>
|
|
826
|
+
}, z = U(() => x || D ? /* @__PURE__ */ K(d, { label: c.searching }) : k ? /* @__PURE__ */ K(f, {
|
|
825
827
|
variant: "inline",
|
|
826
828
|
title: c.fetchError,
|
|
827
|
-
action: /* @__PURE__ */ K(
|
|
829
|
+
action: /* @__PURE__ */ K(i, {
|
|
828
830
|
tone: "secondary",
|
|
829
831
|
buttonStyle: "outline",
|
|
830
832
|
size: "sm",
|
|
@@ -835,24 +837,24 @@ function Je({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
835
837
|
})
|
|
836
838
|
}) : j ? /* @__PURE__ */ K("div", {
|
|
837
839
|
className: "text-muted-foreground flex items-center justify-center py-space-xl",
|
|
838
|
-
children: /* @__PURE__ */ K(
|
|
840
|
+
children: /* @__PURE__ */ K(s, {
|
|
839
841
|
tag: "span",
|
|
840
842
|
size: "xs",
|
|
841
843
|
type: "secondary",
|
|
842
844
|
children: Y(c.minQueryHint, { min: M })
|
|
843
845
|
})
|
|
844
846
|
}) : c.noOptionsFound, [
|
|
847
|
+
x,
|
|
845
848
|
D,
|
|
846
|
-
O,
|
|
847
849
|
k,
|
|
848
850
|
j,
|
|
849
851
|
M,
|
|
850
852
|
c,
|
|
851
853
|
A
|
|
852
854
|
]);
|
|
853
|
-
return /* @__PURE__ */ q(
|
|
854
|
-
/* @__PURE__ */ q(
|
|
855
|
-
start: ee ? /* @__PURE__ */ K(
|
|
855
|
+
return /* @__PURE__ */ q(pe, { children: [
|
|
856
|
+
/* @__PURE__ */ q(F, {
|
|
857
|
+
start: ee ? /* @__PURE__ */ K(i, {
|
|
856
858
|
tone: "secondary",
|
|
857
859
|
buttonStyle: "ghost",
|
|
858
860
|
size: "sm",
|
|
@@ -860,59 +862,59 @@ function Je({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
860
862
|
className: "shrink-0",
|
|
861
863
|
onClick: r,
|
|
862
864
|
"aria-label": c.backToFilters,
|
|
863
|
-
children: /* @__PURE__ */ K(
|
|
865
|
+
children: /* @__PURE__ */ K(_e, {
|
|
864
866
|
"aria-hidden": "true",
|
|
865
867
|
className: "size-icon-sm rtl:rotate-180"
|
|
866
868
|
})
|
|
867
869
|
}) : void 0,
|
|
868
|
-
children: [/* @__PURE__ */ K(
|
|
870
|
+
children: [/* @__PURE__ */ K(s, {
|
|
869
871
|
tag: "span",
|
|
870
872
|
weight: "semibold",
|
|
871
873
|
children: e.label
|
|
872
|
-
}), /* @__PURE__ */ K(
|
|
874
|
+
}), /* @__PURE__ */ K(s, {
|
|
873
875
|
tag: "span",
|
|
874
876
|
size: "xs",
|
|
875
877
|
type: "secondary",
|
|
876
878
|
children: c.selectValues
|
|
877
879
|
})]
|
|
878
880
|
}),
|
|
879
|
-
/* @__PURE__ */ q(
|
|
881
|
+
/* @__PURE__ */ q(O, {
|
|
880
882
|
shouldFilter: !1,
|
|
881
883
|
inset: "flush",
|
|
882
884
|
className: "rounded-none",
|
|
883
|
-
children: [/* @__PURE__ */ K(
|
|
885
|
+
children: [/* @__PURE__ */ K(C, {
|
|
884
886
|
placeholder: Y(c.searchPlaceholder, { filterLabel: e.label.toLowerCase() }),
|
|
885
887
|
value: h,
|
|
886
888
|
onValueChange: g
|
|
887
|
-
}), /* @__PURE__ */ K(
|
|
889
|
+
}), /* @__PURE__ */ K(T, { children: te.length === 0 ? /* @__PURE__ */ K(w, { children: z }) : /* @__PURE__ */ q(E, { children: [!(!D || x) && /* @__PURE__ */ q(l, {
|
|
888
890
|
direction: "horizontal",
|
|
889
891
|
gap: "sm",
|
|
890
892
|
wrap: !1,
|
|
891
893
|
className: "px-control-sm py-space-xs",
|
|
892
|
-
children: [/* @__PURE__ */ K(
|
|
894
|
+
children: [/* @__PURE__ */ K(be, { className: "text-muted-foreground size-icon-sm animate-spin" }), /* @__PURE__ */ K(s, {
|
|
893
895
|
tag: "span",
|
|
894
896
|
size: "xs",
|
|
895
897
|
type: "secondary",
|
|
896
898
|
children: c.searching
|
|
897
899
|
})]
|
|
898
|
-
}),
|
|
900
|
+
}), te.map((e) => /* @__PURE__ */ q(S, {
|
|
899
901
|
onSelect: () => ne(e.value),
|
|
900
902
|
"data-checked": _.includes(e.value) || void 0,
|
|
901
|
-
disabled: e.disabled || !!
|
|
903
|
+
disabled: e.disabled || !!P && _.length >= P && !_.includes(e.value),
|
|
902
904
|
className: "flex items-center gap-space-sm",
|
|
903
|
-
children: [e.icon, /* @__PURE__ */ K(
|
|
905
|
+
children: [e.icon, /* @__PURE__ */ K(s, {
|
|
904
906
|
tag: "span",
|
|
905
907
|
lineHeight: "tight",
|
|
906
908
|
children: e.label
|
|
907
909
|
})]
|
|
908
910
|
}, e.value))] }) })]
|
|
909
911
|
}),
|
|
910
|
-
|
|
912
|
+
I && /* @__PURE__ */ K(L, {
|
|
911
913
|
caption: Y(c.selected, {
|
|
912
914
|
count: _.length,
|
|
913
915
|
filterLabel: (_.length > 1 ? e.pluralLabel : e.label) ?? e.label
|
|
914
916
|
}),
|
|
915
|
-
children: /* @__PURE__ */ K(
|
|
917
|
+
children: /* @__PURE__ */ K(i, {
|
|
916
918
|
tone: "primary",
|
|
917
919
|
size: "sm",
|
|
918
920
|
onClick: R,
|
|
@@ -923,12 +925,12 @@ function Je({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
923
925
|
}
|
|
924
926
|
//#endregion
|
|
925
927
|
//#region src/components/features/filters/facets/date-facet.tsx
|
|
926
|
-
var
|
|
927
|
-
function
|
|
928
|
+
var Ze = [];
|
|
929
|
+
function Qe({ filter: e, value: t, onValueChange: n, className: i }) {
|
|
928
930
|
let { strings: a } = Q(), 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
931
|
from: t.start,
|
|
930
932
|
to: t.end
|
|
931
|
-
} : void 0, m = !o && t.start &&
|
|
933
|
+
} : void 0, m = !o && t.start && J(t.start) ? t.start : void 0, h = {
|
|
932
934
|
format: s,
|
|
933
935
|
readableFormat: c,
|
|
934
936
|
placeholder: l,
|
|
@@ -936,7 +938,7 @@ function Xe({ filter: e, value: t, onValueChange: n, className: i }) {
|
|
|
936
938
|
numberOfMonths: 1,
|
|
937
939
|
className: r("date-facet--component", "w-full", i)
|
|
938
940
|
};
|
|
939
|
-
return o ? /* @__PURE__ */ K(
|
|
941
|
+
return o ? /* @__PURE__ */ K(N, {
|
|
940
942
|
mode: "range",
|
|
941
943
|
value: p,
|
|
942
944
|
onValueChange: (e) => {
|
|
@@ -947,9 +949,9 @@ function Xe({ filter: e, value: t, onValueChange: n, className: i }) {
|
|
|
947
949
|
},
|
|
948
950
|
withConfirm: u,
|
|
949
951
|
closeOnSelect: d,
|
|
950
|
-
presets: f ? void 0 :
|
|
952
|
+
presets: f ? void 0 : Ze,
|
|
951
953
|
...h
|
|
952
|
-
}) : /* @__PURE__ */ K(
|
|
954
|
+
}) : /* @__PURE__ */ K(N, {
|
|
953
955
|
mode: "single",
|
|
954
956
|
value: m,
|
|
955
957
|
onValueChange: (e) => {
|
|
@@ -964,28 +966,28 @@ function Xe({ filter: e, value: t, onValueChange: n, className: i }) {
|
|
|
964
966
|
}
|
|
965
967
|
//#endregion
|
|
966
968
|
//#region src/components/features/filters/partials/date-filter-content.tsx
|
|
967
|
-
function
|
|
968
|
-
let { strings:
|
|
969
|
+
function $e({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, triggerSource: a = "chip" }) {
|
|
970
|
+
let { strings: o } = Q(), s = (t) => {
|
|
969
971
|
if (!t) return;
|
|
970
972
|
if (e.dateFormat?.param) {
|
|
971
|
-
let n =
|
|
972
|
-
return
|
|
973
|
+
let n = we(t, e.dateFormat.param, /* @__PURE__ */ new Date());
|
|
974
|
+
return J(n) ? n : void 0;
|
|
973
975
|
}
|
|
974
976
|
let n = new Date(t);
|
|
975
|
-
return
|
|
976
|
-
}, c =
|
|
977
|
-
if (t &&
|
|
977
|
+
return J(n) ? n : void 0;
|
|
978
|
+
}, c = s(t[0]), l = s(t[1]), u = (t) => {
|
|
979
|
+
if (t && J(t)) return Ce(t, e.dateFormat?.param ?? "yyyy-MM-dd");
|
|
978
980
|
}, d = ({ start: e, end: t }) => {
|
|
979
981
|
let r = [], i = u(e), a = u(t);
|
|
980
982
|
i && r.push(i), a && r.push(a), n(r);
|
|
981
|
-
}, f =
|
|
983
|
+
}, f = a === "toolbar", p = {
|
|
982
984
|
start: c,
|
|
983
985
|
end: l
|
|
984
986
|
};
|
|
985
987
|
return /* @__PURE__ */ q("div", {
|
|
986
988
|
className: "flex flex-col",
|
|
987
|
-
children: [/* @__PURE__ */ K(
|
|
988
|
-
start: f ? /* @__PURE__ */ K(
|
|
989
|
+
children: [/* @__PURE__ */ K(F, {
|
|
990
|
+
start: f ? /* @__PURE__ */ K(i, {
|
|
989
991
|
type: "button",
|
|
990
992
|
tone: "secondary",
|
|
991
993
|
buttonStyle: "ghost",
|
|
@@ -993,16 +995,16 @@ function Ze({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, tri
|
|
|
993
995
|
iconOnly: !0,
|
|
994
996
|
onClick: r,
|
|
995
997
|
className: "shrink-0",
|
|
996
|
-
"aria-label":
|
|
997
|
-
children: /* @__PURE__ */ K(
|
|
998
|
+
"aria-label": o.backToFilters,
|
|
999
|
+
children: /* @__PURE__ */ K(_e, {
|
|
998
1000
|
"aria-hidden": "true",
|
|
999
1001
|
className: "size-icon-sm rtl:rotate-180"
|
|
1000
1002
|
})
|
|
1001
1003
|
}) : void 0,
|
|
1002
|
-
children: /* @__PURE__ */ K(
|
|
1004
|
+
children: /* @__PURE__ */ K(P, { children: e.label })
|
|
1003
1005
|
}), /* @__PURE__ */ K("div", {
|
|
1004
1006
|
className: "p-surface",
|
|
1005
|
-
children: /* @__PURE__ */ K(
|
|
1007
|
+
children: /* @__PURE__ */ K(Qe, {
|
|
1006
1008
|
filter: e,
|
|
1007
1009
|
value: p,
|
|
1008
1010
|
onValueChange: d
|
|
@@ -1012,7 +1014,7 @@ function Ze({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, tri
|
|
|
1012
1014
|
}
|
|
1013
1015
|
//#endregion
|
|
1014
1016
|
//#region src/components/features/filters/partials/filter-error-boundary.tsx
|
|
1015
|
-
var
|
|
1017
|
+
var et = class extends le {
|
|
1016
1018
|
state = {
|
|
1017
1019
|
hasError: !1,
|
|
1018
1020
|
error: null
|
|
@@ -1042,15 +1044,15 @@ var Qe = class extends se {
|
|
|
1042
1044
|
className: "filter-error-boundary--component contents",
|
|
1043
1045
|
children: e
|
|
1044
1046
|
}) : /* @__PURE__ */ q("div", {
|
|
1045
|
-
className: "filter-error-boundary--component rounded-radius border
|
|
1047
|
+
className: r("filter-error-boundary--component rounded-radius border p-surface-xs", u.destructive.edge, u.destructive.wash, u.destructive.ink),
|
|
1046
1048
|
children: [
|
|
1047
1049
|
/* @__PURE__ */ q("div", {
|
|
1048
1050
|
className: "mb-space-xs flex items-center justify-between",
|
|
1049
|
-
children: [/* @__PURE__ */ K(
|
|
1051
|
+
children: [/* @__PURE__ */ K(s, {
|
|
1050
1052
|
tag: "span",
|
|
1051
1053
|
weight: "semibold",
|
|
1052
1054
|
children: n.title
|
|
1053
|
-
}), /* @__PURE__ */ K(
|
|
1055
|
+
}), /* @__PURE__ */ K(i, {
|
|
1054
1056
|
type: "button",
|
|
1055
1057
|
tone: "destructive",
|
|
1056
1058
|
buttonStyle: "ghost",
|
|
@@ -1058,11 +1060,11 @@ var Qe = class extends se {
|
|
|
1058
1060
|
iconOnly: !0,
|
|
1059
1061
|
onClick: this.handleReset,
|
|
1060
1062
|
"aria-label": n.reset,
|
|
1061
|
-
children: /* @__PURE__ */ K(
|
|
1063
|
+
children: /* @__PURE__ */ K(Se, { className: "size-icon-sm" })
|
|
1062
1064
|
})]
|
|
1063
1065
|
}),
|
|
1064
|
-
/* @__PURE__ */ K(
|
|
1065
|
-
/* @__PURE__ */ K(
|
|
1066
|
+
/* @__PURE__ */ K(s, { children: n.getDescription(t) }),
|
|
1067
|
+
/* @__PURE__ */ K(g, {
|
|
1066
1068
|
size: "xs",
|
|
1067
1069
|
className: "mt-space-xs text-destructive",
|
|
1068
1070
|
children: this.state.error?.message || n.unknownError
|
|
@@ -1076,14 +1078,14 @@ var Qe = class extends se {
|
|
|
1076
1078
|
});
|
|
1077
1079
|
}
|
|
1078
1080
|
};
|
|
1079
|
-
function
|
|
1081
|
+
function tt(e) {
|
|
1080
1082
|
let { strings: t, reportError: n } = Q(), r = U(() => ({
|
|
1081
1083
|
title: t.error.title,
|
|
1082
1084
|
reset: t.clear,
|
|
1083
1085
|
getDescription: (e) => e ? Y(t.error.descriptionWithKey, { filterKey: e }) : t.error.generic,
|
|
1084
1086
|
unknownError: t.error.unknown
|
|
1085
1087
|
}), [t]);
|
|
1086
|
-
return /* @__PURE__ */ K(
|
|
1088
|
+
return /* @__PURE__ */ K(et, {
|
|
1087
1089
|
...e,
|
|
1088
1090
|
labels: r,
|
|
1089
1091
|
onError: n
|
|
@@ -1091,22 +1093,22 @@ function $(e) {
|
|
|
1091
1093
|
}
|
|
1092
1094
|
//#endregion
|
|
1093
1095
|
//#region src/components/features/filters/partials/filter-list-item.tsx
|
|
1094
|
-
function
|
|
1096
|
+
function nt({ filter: e, onSelect: t }) {
|
|
1095
1097
|
let { strings: n } = Q(), r = e.type === X.DATE ? e.operator === "between" ? n?.selectDateRange : n?.selectDate : e.options ? `${e.options.length} ${n?.options ?? ""}`.trim() : null;
|
|
1096
|
-
return /* @__PURE__ */ q(
|
|
1098
|
+
return /* @__PURE__ */ q(S, {
|
|
1097
1099
|
onSelect: t,
|
|
1098
1100
|
children: [!!e.icon && /* @__PURE__ */ K("span", {
|
|
1099
1101
|
className: "shrink-0 text-muted-foreground [&_svg]:size-icon",
|
|
1100
1102
|
children: e.icon
|
|
1101
1103
|
}), /* @__PURE__ */ q("div", {
|
|
1102
1104
|
className: "flex min-w-0 flex-col gap-dense leading-tight",
|
|
1103
|
-
children: [/* @__PURE__ */ K(
|
|
1105
|
+
children: [/* @__PURE__ */ K(s, {
|
|
1104
1106
|
tag: "span",
|
|
1105
1107
|
lineHeight: "tight",
|
|
1106
1108
|
weight: "medium",
|
|
1107
1109
|
className: "truncate",
|
|
1108
1110
|
children: e.label
|
|
1109
|
-
}), !!r && /* @__PURE__ */ K(
|
|
1111
|
+
}), !!r && /* @__PURE__ */ K(s, {
|
|
1110
1112
|
tag: "span",
|
|
1111
1113
|
lineHeight: "tight",
|
|
1112
1114
|
size: "xs",
|
|
@@ -1119,25 +1121,25 @@ function $e({ filter: e, onSelect: t }) {
|
|
|
1119
1121
|
}
|
|
1120
1122
|
//#endregion
|
|
1121
1123
|
//#region src/components/features/filters/partials/filter-list-content.tsx
|
|
1122
|
-
function
|
|
1124
|
+
function rt({ availableFilters: e, activeFilters: t, onFilterSelect: n }) {
|
|
1123
1125
|
let { strings: r } = Q(), i = (e) => {
|
|
1124
1126
|
n(e);
|
|
1125
1127
|
};
|
|
1126
|
-
return /* @__PURE__ */ q(
|
|
1128
|
+
return /* @__PURE__ */ q(O, {
|
|
1127
1129
|
inset: "compact",
|
|
1128
1130
|
className: "rounded-none",
|
|
1129
|
-
children: [/* @__PURE__ */ K(
|
|
1130
|
-
/* @__PURE__ */ K(
|
|
1131
|
-
e.length > 0 && /* @__PURE__ */ K(
|
|
1131
|
+
children: [/* @__PURE__ */ K(C, { placeholder: r.searchFilters }), /* @__PURE__ */ q(T, { children: [
|
|
1132
|
+
/* @__PURE__ */ K(w, { children: r.noFiltersAvailable }),
|
|
1133
|
+
e.length > 0 && /* @__PURE__ */ K(E, {
|
|
1132
1134
|
heading: r.availableFilters,
|
|
1133
|
-
children: e.map((e) => /* @__PURE__ */ K(
|
|
1135
|
+
children: e.map((e) => /* @__PURE__ */ K(nt, {
|
|
1134
1136
|
filter: e,
|
|
1135
1137
|
onSelect: () => i(e)
|
|
1136
1138
|
}, e.key))
|
|
1137
1139
|
}),
|
|
1138
|
-
t.length > 0 && /* @__PURE__ */ q(
|
|
1140
|
+
t.length > 0 && /* @__PURE__ */ q(pe, { children: [/* @__PURE__ */ K(D, {}), /* @__PURE__ */ K(E, {
|
|
1139
1141
|
heading: r.activeFilters,
|
|
1140
|
-
children: t.map((e) => /* @__PURE__ */ K(
|
|
1142
|
+
children: t.map((e) => /* @__PURE__ */ K(nt, {
|
|
1141
1143
|
filter: e,
|
|
1142
1144
|
onSelect: () => i(e)
|
|
1143
1145
|
}, e.key))
|
|
@@ -1147,7 +1149,7 @@ function et({ availableFilters: e, activeFilters: t, onFilterSelect: n }) {
|
|
|
1147
1149
|
}
|
|
1148
1150
|
//#endregion
|
|
1149
1151
|
//#region src/components/features/filters/partials/regular-filter-content.tsx
|
|
1150
|
-
function
|
|
1152
|
+
function it({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onClose: a, triggerSource: o = "chip" }) {
|
|
1151
1153
|
let { strings: c, reportError: u } = Q(), d = e.multiple === !0 || e.type === X.MULTI_SELECT, f = o === "toolbar", [p, m] = G(t || []);
|
|
1152
1154
|
H(() => {
|
|
1153
1155
|
m(t || []);
|
|
@@ -1170,8 +1172,8 @@ function tt({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
1170
1172
|
return /* @__PURE__ */ q("div", {
|
|
1171
1173
|
className: "flex flex-col",
|
|
1172
1174
|
children: [
|
|
1173
|
-
/* @__PURE__ */ K(
|
|
1174
|
-
start: f ? /* @__PURE__ */ K(
|
|
1175
|
+
/* @__PURE__ */ K(F, {
|
|
1176
|
+
start: f ? /* @__PURE__ */ K(i, {
|
|
1175
1177
|
type: "button",
|
|
1176
1178
|
tone: "secondary",
|
|
1177
1179
|
buttonStyle: "ghost",
|
|
@@ -1180,30 +1182,30 @@ function tt({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
1180
1182
|
onClick: r,
|
|
1181
1183
|
className: "shrink-0",
|
|
1182
1184
|
"aria-label": c.backToFilters,
|
|
1183
|
-
children: /* @__PURE__ */ K(
|
|
1185
|
+
children: /* @__PURE__ */ K(_e, {
|
|
1184
1186
|
"aria-hidden": "true",
|
|
1185
1187
|
className: "size-icon-sm rtl:rotate-180"
|
|
1186
1188
|
})
|
|
1187
1189
|
}) : void 0,
|
|
1188
|
-
children: /* @__PURE__ */ K(
|
|
1190
|
+
children: /* @__PURE__ */ K(s, {
|
|
1189
1191
|
tag: "span",
|
|
1190
1192
|
weight: "semibold",
|
|
1191
1193
|
children: e.label
|
|
1192
1194
|
})
|
|
1193
1195
|
}),
|
|
1194
|
-
/* @__PURE__ */ q(
|
|
1196
|
+
/* @__PURE__ */ q(O, {
|
|
1195
1197
|
inset: "flush",
|
|
1196
1198
|
className: "rounded-none",
|
|
1197
|
-
children: [/* @__PURE__ */ K(
|
|
1199
|
+
children: [/* @__PURE__ */ K(C, { placeholder: Y(c.searchPlaceholder, { filterLabel: e.label.toLowerCase() }) }), /* @__PURE__ */ q(T, {
|
|
1198
1200
|
className: "max-h-64",
|
|
1199
|
-
children: [/* @__PURE__ */ K(
|
|
1201
|
+
children: [/* @__PURE__ */ K(w, { children: /* @__PURE__ */ K(s, {
|
|
1200
1202
|
type: "secondary",
|
|
1201
1203
|
align: "center",
|
|
1202
1204
|
className: "py-space-xl",
|
|
1203
1205
|
children: c.noOptionsFound
|
|
1204
|
-
}) }), /* @__PURE__ */ K(
|
|
1206
|
+
}) }), /* @__PURE__ */ K(E, { children: e.options?.map((e) => {
|
|
1205
1207
|
let t = p.includes(e.value);
|
|
1206
|
-
return /* @__PURE__ */ q(
|
|
1208
|
+
return /* @__PURE__ */ q(S, {
|
|
1207
1209
|
onSelect: () => h(e.value),
|
|
1208
1210
|
"data-checked": t || void 0,
|
|
1209
1211
|
disabled: e.disabled,
|
|
@@ -1214,13 +1216,13 @@ function tt({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
1214
1216
|
}), /* @__PURE__ */ q(l, {
|
|
1215
1217
|
gap: "dense",
|
|
1216
1218
|
className: "flex min-w-0 flex-1 flex-col leading-tight",
|
|
1217
|
-
children: [/* @__PURE__ */ K(
|
|
1219
|
+
children: [/* @__PURE__ */ K(s, {
|
|
1218
1220
|
tag: "span",
|
|
1219
1221
|
lineHeight: "tight",
|
|
1220
1222
|
weight: t ? "medium" : "regular",
|
|
1221
1223
|
className: "truncate",
|
|
1222
1224
|
children: e.label
|
|
1223
|
-
}), !!e.description && /* @__PURE__ */ K(
|
|
1225
|
+
}), !!e.description && /* @__PURE__ */ K(s, {
|
|
1224
1226
|
tag: "span",
|
|
1225
1227
|
size: "xs",
|
|
1226
1228
|
lineHeight: "tight",
|
|
@@ -1233,12 +1235,12 @@ function tt({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
1233
1235
|
}) })]
|
|
1234
1236
|
})]
|
|
1235
1237
|
}),
|
|
1236
|
-
!!_ && /* @__PURE__ */ K(
|
|
1238
|
+
!!_ && /* @__PURE__ */ K(L, {
|
|
1237
1239
|
caption: Y(c.selected, {
|
|
1238
1240
|
count: p.length,
|
|
1239
1241
|
filterLabel: (p.length > 1 ? e.pluralLabel : e.label) ?? e.label
|
|
1240
1242
|
}),
|
|
1241
|
-
children: /* @__PURE__ */ K(
|
|
1243
|
+
children: /* @__PURE__ */ K(i, {
|
|
1242
1244
|
tone: "primary",
|
|
1243
1245
|
size: "sm",
|
|
1244
1246
|
onClick: g,
|
|
@@ -1250,8 +1252,8 @@ function tt({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
1250
1252
|
}
|
|
1251
1253
|
//#endregion
|
|
1252
1254
|
//#region src/components/features/filters/facets/tags-facet.tsx
|
|
1253
|
-
function
|
|
1254
|
-
let { defaultScale: c } =
|
|
1255
|
+
function at({ filter: t, value: n, onValueChange: a, className: o }) {
|
|
1256
|
+
let { defaultScale: c } = e(), u = k(void 0, c), { strings: d } = Q(), [f, p] = G(""), m = V(() => {
|
|
1255
1257
|
let e = f.trim();
|
|
1256
1258
|
e && !n.includes(e) && (a([...n, e]), p(""));
|
|
1257
1259
|
}, [
|
|
@@ -1264,7 +1266,7 @@ function nt({ filter: e, value: n, onValueChange: a, className: o }) {
|
|
|
1264
1266
|
e.key === "Enter" && (e.preventDefault(), m());
|
|
1265
1267
|
}, _ = V(() => {
|
|
1266
1268
|
a([]), p("");
|
|
1267
|
-
}, [a]),
|
|
1269
|
+
}, [a]), v = n.length > 0, y = n.length === 1 ? d.tag : d.tags, S = v ? /* @__PURE__ */ q(l, {
|
|
1268
1270
|
gap: "md",
|
|
1269
1271
|
className: "tags-facet--summary",
|
|
1270
1272
|
children: [/* @__PURE__ */ q(l, {
|
|
@@ -1272,16 +1274,16 @@ function nt({ filter: e, value: n, onValueChange: a, className: o }) {
|
|
|
1272
1274
|
gap: "sm",
|
|
1273
1275
|
justify: "between",
|
|
1274
1276
|
wrap: !1,
|
|
1275
|
-
children: [/* @__PURE__ */ q(
|
|
1277
|
+
children: [/* @__PURE__ */ q(s, {
|
|
1276
1278
|
tag: "span",
|
|
1277
1279
|
size: "xs",
|
|
1278
1280
|
type: "secondary",
|
|
1279
1281
|
children: [
|
|
1280
1282
|
n.length,
|
|
1281
1283
|
" ",
|
|
1282
|
-
|
|
1284
|
+
y
|
|
1283
1285
|
]
|
|
1284
|
-
}), /* @__PURE__ */ K(
|
|
1286
|
+
}), /* @__PURE__ */ K(i, {
|
|
1285
1287
|
onClick: _,
|
|
1286
1288
|
tone: "secondary",
|
|
1287
1289
|
buttonStyle: "ghost",
|
|
@@ -1294,20 +1296,20 @@ function nt({ filter: e, value: n, onValueChange: a, className: o }) {
|
|
|
1294
1296
|
}), /* @__PURE__ */ K(l, {
|
|
1295
1297
|
direction: "horizontal",
|
|
1296
1298
|
gap: "md",
|
|
1297
|
-
children: n.map((e) => /* @__PURE__ */ q(
|
|
1299
|
+
children: n.map((e) => /* @__PURE__ */ q(b, {
|
|
1298
1300
|
tone: "secondary",
|
|
1299
1301
|
className: "flex items-center gap-space-sm py-space-2xs pl-space-md pr-space-sm",
|
|
1300
|
-
children: [/* @__PURE__ */ K(
|
|
1302
|
+
children: [/* @__PURE__ */ K(s, {
|
|
1301
1303
|
tag: "span",
|
|
1302
1304
|
size: "xs",
|
|
1303
1305
|
children: e
|
|
1304
1306
|
}), /* @__PURE__ */ K("button", {
|
|
1305
1307
|
onClick: () => h(e),
|
|
1306
|
-
className: r(
|
|
1308
|
+
className: r(x.target, x.focus, x.toggle),
|
|
1307
1309
|
type: "button",
|
|
1308
1310
|
"aria-label": `${d.removeTag} ${e}`,
|
|
1309
|
-
children: /* @__PURE__ */ K(
|
|
1310
|
-
className:
|
|
1311
|
+
children: /* @__PURE__ */ K(Se, {
|
|
1312
|
+
className: x.icon,
|
|
1311
1313
|
"aria-hidden": "true"
|
|
1312
1314
|
})
|
|
1313
1315
|
})]
|
|
@@ -1323,21 +1325,22 @@ function nt({ filter: e, value: n, onValueChange: a, className: o }) {
|
|
|
1323
1325
|
wrap: !1,
|
|
1324
1326
|
children: [/* @__PURE__ */ K("div", {
|
|
1325
1327
|
className: "relative flex-1",
|
|
1326
|
-
children: /* @__PURE__ */ K(
|
|
1328
|
+
children: /* @__PURE__ */ K(M, {
|
|
1327
1329
|
type: "text",
|
|
1328
1330
|
value: f,
|
|
1329
1331
|
onChange: (e) => p(e.target.value),
|
|
1330
1332
|
onKeyDown: g,
|
|
1331
|
-
placeholder:
|
|
1333
|
+
placeholder: t.placeholder ?? d.enterTag
|
|
1332
1334
|
})
|
|
1333
|
-
}), /* @__PURE__ */ q(
|
|
1335
|
+
}), /* @__PURE__ */ q(i, {
|
|
1336
|
+
tone: "primary",
|
|
1334
1337
|
onClick: m,
|
|
1335
1338
|
disabled: !f.trim(),
|
|
1336
1339
|
size: u,
|
|
1337
1340
|
iconOnly: !0,
|
|
1338
|
-
className: r(
|
|
1341
|
+
className: r(j[u], ne[u]),
|
|
1339
1342
|
type: "button",
|
|
1340
|
-
children: [/* @__PURE__ */ K(
|
|
1343
|
+
children: [/* @__PURE__ */ K(xe, { className: "size-icon" }), /* @__PURE__ */ K(s, {
|
|
1341
1344
|
tag: "span",
|
|
1342
1345
|
size: "pxs",
|
|
1343
1346
|
className: "sr-only",
|
|
@@ -1347,30 +1350,30 @@ function nt({ filter: e, value: n, onValueChange: a, className: o }) {
|
|
|
1347
1350
|
}), S]
|
|
1348
1351
|
});
|
|
1349
1352
|
}
|
|
1350
|
-
var
|
|
1351
|
-
|
|
1353
|
+
var ot = B.memo(at);
|
|
1354
|
+
ot.displayName = "TagsFacet";
|
|
1352
1355
|
//#endregion
|
|
1353
1356
|
//#region src/components/features/filters/partials/tags-filter-content.tsx
|
|
1354
|
-
function
|
|
1355
|
-
let { strings:
|
|
1357
|
+
function st({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onClose: a, triggerSource: o = "chip" }) {
|
|
1358
|
+
let { strings: s, reportError: c } = Q(), [l, u] = G(t || []), d = o === "toolbar", f = l.length === 1 ? s.tag : s.tags;
|
|
1356
1359
|
H(() => {
|
|
1357
1360
|
u(t || []);
|
|
1358
1361
|
}, [t]);
|
|
1359
|
-
let
|
|
1362
|
+
let p = () => {
|
|
1360
1363
|
try {
|
|
1361
|
-
n(l),
|
|
1364
|
+
n(l), a();
|
|
1362
1365
|
} catch (t) {
|
|
1363
1366
|
c(t, {
|
|
1364
1367
|
phase: "apply",
|
|
1365
1368
|
filterKey: e.key
|
|
1366
1369
|
});
|
|
1367
1370
|
}
|
|
1368
|
-
},
|
|
1371
|
+
}, m = JSON.stringify(l.slice().sort()) !== JSON.stringify((t ?? []).slice().sort());
|
|
1369
1372
|
return /* @__PURE__ */ q("div", {
|
|
1370
1373
|
className: "flex flex-col",
|
|
1371
1374
|
children: [
|
|
1372
|
-
/* @__PURE__ */ K(
|
|
1373
|
-
start: d ? /* @__PURE__ */ K(
|
|
1375
|
+
/* @__PURE__ */ K(F, {
|
|
1376
|
+
start: d ? /* @__PURE__ */ K(i, {
|
|
1374
1377
|
type: "button",
|
|
1375
1378
|
tone: "secondary",
|
|
1376
1379
|
buttonStyle: "ghost",
|
|
@@ -1378,24 +1381,24 @@ function it({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
1378
1381
|
iconOnly: !0,
|
|
1379
1382
|
onClick: r,
|
|
1380
1383
|
className: "shrink-0",
|
|
1381
|
-
"aria-label":
|
|
1382
|
-
children: /* @__PURE__ */ K(
|
|
1384
|
+
"aria-label": s.backToFilters,
|
|
1385
|
+
children: /* @__PURE__ */ K(_e, {
|
|
1383
1386
|
"aria-hidden": "true",
|
|
1384
1387
|
className: "size-icon-sm rtl:rotate-180"
|
|
1385
1388
|
})
|
|
1386
1389
|
}) : void 0,
|
|
1387
|
-
children: /* @__PURE__ */ K(
|
|
1390
|
+
children: /* @__PURE__ */ K(P, { children: e.label })
|
|
1388
1391
|
}),
|
|
1389
1392
|
/* @__PURE__ */ K("div", {
|
|
1390
1393
|
className: "p-surface",
|
|
1391
|
-
children: /* @__PURE__ */ K(
|
|
1394
|
+
children: /* @__PURE__ */ K(ot, {
|
|
1392
1395
|
filter: e,
|
|
1393
1396
|
value: l,
|
|
1394
1397
|
onValueChange: u
|
|
1395
1398
|
})
|
|
1396
1399
|
}),
|
|
1397
|
-
!!
|
|
1398
|
-
caption: /* @__PURE__ */ q(
|
|
1400
|
+
!!m && /* @__PURE__ */ K(L, {
|
|
1401
|
+
caption: /* @__PURE__ */ q(h, {
|
|
1399
1402
|
size: "xs",
|
|
1400
1403
|
className: "tabular-nums",
|
|
1401
1404
|
children: [
|
|
@@ -1404,11 +1407,11 @@ function it({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
1404
1407
|
f
|
|
1405
1408
|
]
|
|
1406
1409
|
}),
|
|
1407
|
-
children: /* @__PURE__ */ K(
|
|
1410
|
+
children: /* @__PURE__ */ K(i, {
|
|
1408
1411
|
tone: "primary",
|
|
1409
1412
|
size: "sm",
|
|
1410
|
-
onClick:
|
|
1411
|
-
children:
|
|
1413
|
+
onClick: p,
|
|
1414
|
+
children: s.confirm
|
|
1412
1415
|
})
|
|
1413
1416
|
})
|
|
1414
1417
|
]
|
|
@@ -1416,45 +1419,45 @@ function it({ filter: e, value: t, onFilterChange: n, onBackToFilterList: r, onC
|
|
|
1416
1419
|
}
|
|
1417
1420
|
//#endregion
|
|
1418
1421
|
//#region src/components/features/filters/partials/filter-popover-content.tsx
|
|
1419
|
-
function
|
|
1422
|
+
function ct({ activeFilterInPopover: e, availableFilters: t, activeFilters: n, getFilterValue: i, setFilterValue: a, onFilterSelect: o, onBackToFilterList: s, onClose: c, triggerSource: l = "chip", finalFocus: u }) {
|
|
1420
1423
|
let { strings: d } = Q(), f = e?.type === X.DATE || e?.type === X.TAGS ? "w-auto min-w-80 gap-0 overflow-hidden" : e?.type === X.ASYNC_SELECT ? "w-72 gap-0 overflow-hidden" : "w-64 gap-0 overflow-hidden", p = (e, t) => {
|
|
1421
1424
|
a(e, t);
|
|
1422
1425
|
};
|
|
1423
|
-
return /* @__PURE__ */ K(
|
|
1426
|
+
return /* @__PURE__ */ K(te, {
|
|
1424
1427
|
finalFocus: u,
|
|
1425
1428
|
type: e?.type === X.DATE || e?.type === X.TAGS ? "display" : "menu",
|
|
1426
1429
|
"aria-label": e?.label ?? d.addFilter,
|
|
1427
1430
|
inset: "flush",
|
|
1428
1431
|
className: r("filter-popover-content--component", f),
|
|
1429
1432
|
align: "start",
|
|
1430
|
-
children: e ? e.type === X.DATE ? /* @__PURE__ */ K(
|
|
1433
|
+
children: e ? e.type === X.DATE ? /* @__PURE__ */ K($e, {
|
|
1431
1434
|
filter: e,
|
|
1432
1435
|
value: i(e.key),
|
|
1433
1436
|
onFilterChange: (t) => p(e.key, t),
|
|
1434
1437
|
onBackToFilterList: s,
|
|
1435
1438
|
triggerSource: l
|
|
1436
|
-
}) : e.type === X.TAGS ? /* @__PURE__ */ K(
|
|
1439
|
+
}) : e.type === X.TAGS ? /* @__PURE__ */ K(st, {
|
|
1437
1440
|
filter: e,
|
|
1438
1441
|
value: i(e.key),
|
|
1439
1442
|
onFilterChange: (t) => p(e.key, t),
|
|
1440
1443
|
onBackToFilterList: s,
|
|
1441
1444
|
onClose: c,
|
|
1442
1445
|
triggerSource: l
|
|
1443
|
-
}) : e.type === X.ASYNC_SELECT ? /* @__PURE__ */ K(
|
|
1446
|
+
}) : e.type === X.ASYNC_SELECT ? /* @__PURE__ */ K(Xe, {
|
|
1444
1447
|
filter: e,
|
|
1445
1448
|
value: i(e.key),
|
|
1446
1449
|
onFilterChange: (t) => p(e.key, t),
|
|
1447
1450
|
onBackToFilterList: s,
|
|
1448
1451
|
onClose: c,
|
|
1449
1452
|
triggerSource: l
|
|
1450
|
-
}) : /* @__PURE__ */ K(
|
|
1453
|
+
}) : /* @__PURE__ */ K(it, {
|
|
1451
1454
|
filter: e,
|
|
1452
1455
|
value: i(e.key),
|
|
1453
1456
|
onFilterChange: (t) => p(e.key, t),
|
|
1454
1457
|
onBackToFilterList: s,
|
|
1455
1458
|
onClose: c,
|
|
1456
1459
|
triggerSource: l
|
|
1457
|
-
}) : /* @__PURE__ */ K(
|
|
1460
|
+
}) : /* @__PURE__ */ K(rt, {
|
|
1458
1461
|
availableFilters: t,
|
|
1459
1462
|
activeFilters: n,
|
|
1460
1463
|
onFilterSelect: o
|
|
@@ -1463,24 +1466,24 @@ function at({ activeFilterInPopover: e, availableFilters: t, activeFilters: n, g
|
|
|
1463
1466
|
}
|
|
1464
1467
|
//#endregion
|
|
1465
1468
|
//#region src/components/features/filters/partials/filter-pill.tsx
|
|
1466
|
-
function
|
|
1469
|
+
function lt({ filter: e, value: t, active: n, operator: r, operators: i, onOperatorChange: a, onValueChange: o, onClear: s, availableFilters: c, activeFilters: l, operatorChangeRef: u }) {
|
|
1467
1470
|
let d = W(!1), f = u ?? d, [p, m] = G(!1), h = W(null), g = W(null);
|
|
1468
|
-
return /* @__PURE__ */ K(
|
|
1471
|
+
return /* @__PURE__ */ K(tt, {
|
|
1469
1472
|
filterKey: e.key,
|
|
1470
|
-
children: /* @__PURE__ */ q(
|
|
1473
|
+
children: /* @__PURE__ */ q(I, {
|
|
1471
1474
|
open: p,
|
|
1472
1475
|
onOpenChange: (e) => {
|
|
1473
1476
|
e && f.current || m(e);
|
|
1474
1477
|
},
|
|
1475
1478
|
children: [/* @__PURE__ */ q("div", {
|
|
1476
1479
|
className: "filter-pill--component filter-pill--anchor relative",
|
|
1477
|
-
children: [/* @__PURE__ */ K(
|
|
1480
|
+
children: [/* @__PURE__ */ K(ee, {
|
|
1478
1481
|
render: /* @__PURE__ */ K("span", {}),
|
|
1479
1482
|
nativeButton: !1,
|
|
1480
1483
|
tabIndex: -1,
|
|
1481
1484
|
"aria-hidden": "true",
|
|
1482
1485
|
className: "pointer-events-none absolute inset-0"
|
|
1483
|
-
}), /* @__PURE__ */ K(
|
|
1486
|
+
}), /* @__PURE__ */ K(qe, {
|
|
1484
1487
|
filter: e,
|
|
1485
1488
|
popoverOpen: p,
|
|
1486
1489
|
triggerRef: h,
|
|
@@ -1500,7 +1503,7 @@ function ot({ filter: e, value: t, active: n, operator: r, operators: i, onOpera
|
|
|
1500
1503
|
f.current || (g.current = e?.currentTarget ?? h.current, m(!0));
|
|
1501
1504
|
}
|
|
1502
1505
|
})]
|
|
1503
|
-
}), /* @__PURE__ */ K(
|
|
1506
|
+
}), /* @__PURE__ */ K(ct, {
|
|
1504
1507
|
finalFocus: g,
|
|
1505
1508
|
activeFilterInPopover: e,
|
|
1506
1509
|
availableFilters: c,
|
|
@@ -1515,33 +1518,33 @@ function ot({ filter: e, value: t, active: n, operator: r, operators: i, onOpera
|
|
|
1515
1518
|
})
|
|
1516
1519
|
});
|
|
1517
1520
|
}
|
|
1518
|
-
|
|
1521
|
+
lt.displayName = "FilterPill";
|
|
1519
1522
|
//#endregion
|
|
1520
1523
|
//#region src/components/features/filters/partials/filters-button.tsx
|
|
1521
|
-
function
|
|
1522
|
-
let { defaultScale: u } =
|
|
1524
|
+
function ut({ triggerRef: t, availableFilters: n, activeFilters: a, activeFilterInPopover: o, getFilterValue: s, setFilterValue: c, setActiveFilterInPopover: l }) {
|
|
1525
|
+
let { defaultScale: u } = e(), d = k(void 0, u), [f, p] = G(!1), { strings: m } = Q();
|
|
1523
1526
|
return H(() => {
|
|
1524
1527
|
f || l(null);
|
|
1525
|
-
}, [f, l]), /* @__PURE__ */ q(
|
|
1528
|
+
}, [f, l]), /* @__PURE__ */ q(I, {
|
|
1526
1529
|
open: f,
|
|
1527
1530
|
onOpenChange: p,
|
|
1528
|
-
children: [/* @__PURE__ */ K(
|
|
1531
|
+
children: [/* @__PURE__ */ K(ee, {
|
|
1529
1532
|
asChild: !0,
|
|
1530
|
-
children: /* @__PURE__ */ K(
|
|
1531
|
-
ref:
|
|
1533
|
+
children: /* @__PURE__ */ K(i, {
|
|
1534
|
+
ref: t,
|
|
1532
1535
|
tone: "secondary",
|
|
1533
1536
|
buttonStyle: "outline",
|
|
1534
1537
|
size: d,
|
|
1535
1538
|
iconOnly: !0,
|
|
1536
1539
|
"aria-label": m.addFilter,
|
|
1537
|
-
className: r("filters-button--component shrink-0",
|
|
1538
|
-
children: /* @__PURE__ */ K(
|
|
1540
|
+
className: r("filters-button--component shrink-0", j[d], ne[d]),
|
|
1541
|
+
children: /* @__PURE__ */ K(ye, { className: "size-icon-sm" })
|
|
1539
1542
|
})
|
|
1540
|
-
}), /* @__PURE__ */ K(
|
|
1541
|
-
activeFilterInPopover:
|
|
1543
|
+
}), /* @__PURE__ */ K(ct, {
|
|
1544
|
+
activeFilterInPopover: o,
|
|
1542
1545
|
availableFilters: n,
|
|
1543
|
-
activeFilters:
|
|
1544
|
-
getFilterValue:
|
|
1546
|
+
activeFilters: a,
|
|
1547
|
+
getFilterValue: s,
|
|
1545
1548
|
setFilterValue: c,
|
|
1546
1549
|
onFilterSelect: (e) => {
|
|
1547
1550
|
l(e);
|
|
@@ -1558,28 +1561,28 @@ function st({ triggerRef: e, availableFilters: n, activeFilters: i, activeFilter
|
|
|
1558
1561
|
}
|
|
1559
1562
|
//#endregion
|
|
1560
1563
|
//#region src/components/features/filters/partials/filter-tabs.tsx
|
|
1561
|
-
function
|
|
1562
|
-
let { activeFilters: t, filters: n, replaceFilters:
|
|
1564
|
+
function dt({ tabs: e }) {
|
|
1565
|
+
let { activeFilters: t, filters: n, replaceFilters: i } = Q(), a = U(() => t.filter((e) => n.find((t) => t.key === e.key)?.type !== X.SEARCH), [t, n]), o = U(() => t.filter((e) => n.find((t) => t.key === e.key)?.type === X.SEARCH), [t, n]), c = U(() => {
|
|
1563
1566
|
for (let t of e) {
|
|
1564
1567
|
if (t.presets.length === 0) {
|
|
1565
|
-
if (
|
|
1568
|
+
if (a.length === 0) return t.id;
|
|
1566
1569
|
continue;
|
|
1567
1570
|
}
|
|
1568
|
-
if (t.presets.length ===
|
|
1569
|
-
let t =
|
|
1571
|
+
if (t.presets.length === a.length && t.presets.every((e) => {
|
|
1572
|
+
let t = a.find((t) => t.key === e.key);
|
|
1570
1573
|
if (!t) return !1;
|
|
1571
1574
|
let n = [...e.value].sort(), r = [...t.value].sort();
|
|
1572
1575
|
return !(n.length !== r.length || n.some((e, t) => e !== r[t]) || e.operator && t.operator !== e.operator);
|
|
1573
1576
|
})) return t.id;
|
|
1574
1577
|
}
|
|
1575
1578
|
return null;
|
|
1576
|
-
}, [e,
|
|
1579
|
+
}, [e, a]), l = V((e) => {
|
|
1577
1580
|
if (e.presets.length === 0) {
|
|
1578
|
-
|
|
1581
|
+
i([...o]);
|
|
1579
1582
|
return;
|
|
1580
1583
|
}
|
|
1581
1584
|
let t = e.presets.map((e) => {
|
|
1582
|
-
let t = n.find((t) => t.key === e.key), r = e.operator ?? t?.operator ?? (t ?
|
|
1585
|
+
let t = n.find((t) => t.key === e.key), r = e.operator ?? t?.operator ?? (t ? Pe(t.type) : "equals");
|
|
1583
1586
|
return {
|
|
1584
1587
|
id: e.key,
|
|
1585
1588
|
key: e.key,
|
|
@@ -1587,44 +1590,43 @@ function ct({ tabs: e }) {
|
|
|
1587
1590
|
operator: r
|
|
1588
1591
|
};
|
|
1589
1592
|
});
|
|
1590
|
-
|
|
1593
|
+
i([...o, ...t]);
|
|
1591
1594
|
}, [
|
|
1592
1595
|
n,
|
|
1593
|
-
|
|
1594
|
-
|
|
1596
|
+
o,
|
|
1597
|
+
i
|
|
1595
1598
|
]);
|
|
1596
|
-
return e.length === 0 ? null : /* @__PURE__ */ K(
|
|
1599
|
+
return e.length === 0 ? null : /* @__PURE__ */ K(ae, {
|
|
1597
1600
|
value: c,
|
|
1598
1601
|
onValueChange: (t) => {
|
|
1599
1602
|
let n = e.find((e) => e.id === t);
|
|
1600
1603
|
n && l(n);
|
|
1601
1604
|
},
|
|
1602
1605
|
className: "filter-tabs--component",
|
|
1603
|
-
children: /* @__PURE__ */ K(
|
|
1606
|
+
children: /* @__PURE__ */ K(ie, {
|
|
1604
1607
|
role: "group",
|
|
1605
1608
|
"aria-orientation": void 0,
|
|
1606
1609
|
activateOnFocus: !0,
|
|
1607
1610
|
className: "h-auto! flex-wrap justify-start gap-space-md bg-transparent p-0",
|
|
1608
1611
|
children: e.map((e) => {
|
|
1609
1612
|
let t = c === e.id;
|
|
1610
|
-
return /* @__PURE__ */ q(
|
|
1613
|
+
return /* @__PURE__ */ q(re, {
|
|
1611
1614
|
value: e.id,
|
|
1612
1615
|
role: "button",
|
|
1613
1616
|
"aria-selected": void 0,
|
|
1614
1617
|
"aria-controls": void 0,
|
|
1615
1618
|
"aria-pressed": t,
|
|
1616
|
-
className: r("h-action-sm flex-none gap-space-sm rounded-inner px-control-sm py-0 transition-colors after:hidden data-active:bg-
|
|
1617
|
-
children: [/* @__PURE__ */ K(
|
|
1619
|
+
className: r("h-action-sm flex-none gap-space-sm rounded-inner px-control-sm py-0 transition-colors after:hidden data-active:bg-accent data-active:text-accent-foreground data-active:hover:bg-accent data-active:hover:text-accent-foreground", t ? p.togglePressed : `text-muted-foreground ${p.toggleHover}`),
|
|
1620
|
+
children: [/* @__PURE__ */ K(s, {
|
|
1618
1621
|
tag: "span",
|
|
1619
|
-
weight: "
|
|
1622
|
+
weight: "medium",
|
|
1620
1623
|
className: "text-inherit",
|
|
1621
1624
|
children: e.label
|
|
1622
|
-
}), e.count !== void 0 && /* @__PURE__ */ K(
|
|
1625
|
+
}), e.count !== void 0 && /* @__PURE__ */ K(s, {
|
|
1623
1626
|
tag: "span",
|
|
1624
1627
|
size: "xs",
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
className: r("text-inherit", t ? "text-background" : "text-muted-foreground"),
|
|
1628
|
+
type: "secondary",
|
|
1629
|
+
className: "tabular-nums",
|
|
1628
1630
|
children: e.count
|
|
1629
1631
|
})]
|
|
1630
1632
|
}, e.id);
|
|
@@ -1634,14 +1636,14 @@ function ct({ tabs: e }) {
|
|
|
1634
1636
|
}
|
|
1635
1637
|
//#endregion
|
|
1636
1638
|
//#region src/components/features/filters/facets/search-facet.tsx
|
|
1637
|
-
var
|
|
1638
|
-
return /* @__PURE__ */ K(
|
|
1639
|
+
var ft = B.forwardRef(function(e, t) {
|
|
1640
|
+
return /* @__PURE__ */ K(be, {
|
|
1639
1641
|
...e,
|
|
1640
1642
|
ref: t,
|
|
1641
1643
|
className: r("animate-spin", e.className)
|
|
1642
1644
|
});
|
|
1643
1645
|
});
|
|
1644
|
-
function
|
|
1646
|
+
function pt({ filter: e, value: t, onValueChange: n, className: i }) {
|
|
1645
1647
|
let { strings: a, isNavigating: o } = Q(), [s, c] = G(t[0] || ""), l = W(s);
|
|
1646
1648
|
H(() => {
|
|
1647
1649
|
l.current = s;
|
|
@@ -1656,14 +1658,14 @@ function ut({ filter: e, value: t, onValueChange: n, className: i }) {
|
|
|
1656
1658
|
}
|
|
1657
1659
|
t[0] !== void 0 && t[0] !== e && t[0] !== u.current && (c(t[0]), u.current = t[0]);
|
|
1658
1660
|
}, [t, o]);
|
|
1659
|
-
let f =
|
|
1661
|
+
let f = se((e) => {
|
|
1660
1662
|
u.current = e, d.current = !1, n([e]);
|
|
1661
1663
|
}, e.delay ?? 300), p = (e) => {
|
|
1662
1664
|
u.current !== e && f(e);
|
|
1663
1665
|
};
|
|
1664
1666
|
return /* @__PURE__ */ K("div", {
|
|
1665
1667
|
className: r("search-facet--component", "search-facet relative w-full min-w-0 rounded-inner bg-background", i),
|
|
1666
|
-
children: /* @__PURE__ */ K(
|
|
1668
|
+
children: /* @__PURE__ */ K(M, {
|
|
1667
1669
|
type: "text",
|
|
1668
1670
|
"aria-label": e.label,
|
|
1669
1671
|
value: s,
|
|
@@ -1685,24 +1687,24 @@ function ut({ filter: e, value: t, onValueChange: n, className: i }) {
|
|
|
1685
1687
|
return !t || t === "search" ? Y(a.searchPlaceholder, { filterLabel: "" }).replace(/\s+([….?!])/g, "$1").replace(/\s{2,}/g, " ").trim() : Y(a.searchPlaceholder, { filterLabel: t });
|
|
1686
1688
|
})(),
|
|
1687
1689
|
clearable: s.trim() !== "" && !o,
|
|
1688
|
-
endIcon: o ?
|
|
1690
|
+
endIcon: o ? ft : void 0,
|
|
1689
1691
|
strings: { clear: a.clearSearch }
|
|
1690
1692
|
})
|
|
1691
1693
|
});
|
|
1692
1694
|
}
|
|
1693
|
-
var
|
|
1694
|
-
|
|
1695
|
+
var mt = B.memo(pt);
|
|
1696
|
+
mt.displayName = "SearchFacet";
|
|
1695
1697
|
//#endregion
|
|
1696
1698
|
//#region src/components/features/filters/partials/search-filters-list.tsx
|
|
1697
|
-
function
|
|
1698
|
-
return /* @__PURE__ */ K(
|
|
1699
|
+
function ht({ filters: e, getFilterValue: t, setFilterValue: n, className: i }) {
|
|
1700
|
+
return /* @__PURE__ */ K(pe, { children: e.map((e) => /* @__PURE__ */ q(l, {
|
|
1699
1701
|
gap: "lg",
|
|
1700
|
-
className: r("search-filters-list--component", "w-full min-w-0 sm:w-64 sm:flex-none", e.displayConfig.className,
|
|
1701
|
-
children: [/* @__PURE__ */ K(
|
|
1702
|
+
className: r("search-filters-list--component", "w-full min-w-0 sm:w-64 sm:flex-none", e.displayConfig.className, i),
|
|
1703
|
+
children: [/* @__PURE__ */ K(mt, {
|
|
1702
1704
|
filter: e,
|
|
1703
1705
|
value: t(e.key),
|
|
1704
1706
|
onValueChange: (t) => n(e.key, t)
|
|
1705
|
-
}), !!e.description && /* @__PURE__ */ K(
|
|
1707
|
+
}), !!e.description && /* @__PURE__ */ K(s, {
|
|
1706
1708
|
size: "xs",
|
|
1707
1709
|
type: "secondary",
|
|
1708
1710
|
children: e.description
|
|
@@ -1711,15 +1713,15 @@ function ft({ filters: e, getFilterValue: t, setFilterValue: n, className: a })
|
|
|
1711
1713
|
}
|
|
1712
1714
|
//#endregion
|
|
1713
1715
|
//#region src/components/features/filters/filter-layout.tsx
|
|
1714
|
-
var
|
|
1716
|
+
var gt = {
|
|
1715
1717
|
compact: "lg",
|
|
1716
1718
|
default: "xl"
|
|
1717
|
-
},
|
|
1719
|
+
}, _t = {
|
|
1718
1720
|
compact: "sm",
|
|
1719
1721
|
default: "md"
|
|
1720
1722
|
};
|
|
1721
|
-
function
|
|
1722
|
-
let { getFilterValue: u, setFilterValue: d, isFilterActive: f, clearFilters: p, getFilterOperator: m, setFilterOperator: h, isNavigating: g, strings: _ } = Q(), { processedFilters: v, searchFilters: y, alwaysVisibleFilters: b, activeRegularFilters: x, popoverFilters: S, hasActive: C } =
|
|
1723
|
+
function vt({ className: e, dynamicFilterOptions: t = {}, loadingFilters: n = {}, variant: a = "default", showClearFilters: o = !1, tabs: c }) {
|
|
1724
|
+
let { getFilterValue: u, setFilterValue: d, isFilterActive: f, clearFilters: p, getFilterOperator: m, setFilterOperator: h, isNavigating: g, strings: _ } = Q(), { processedFilters: v, searchFilters: y, alwaysVisibleFilters: b, activeRegularFilters: x, popoverFilters: S, hasActive: C } = Re({ dynamicFilterOptions: t }), [w, T] = G(null), E = v.find((e) => e.key === w) ?? null, D = V((e) => {
|
|
1723
1725
|
T(e?.key ?? null);
|
|
1724
1726
|
}, []);
|
|
1725
1727
|
H(() => {
|
|
@@ -1734,21 +1736,21 @@ function ht({ className: e, dynamicFilterOptions: t = {}, loadingFilters: n = {}
|
|
|
1734
1736
|
e !== null && !f(e) && (O.current?.focus(), k.current = null);
|
|
1735
1737
|
}, [f]);
|
|
1736
1738
|
function j(e) {
|
|
1737
|
-
return e.operators && e.operators.length > 0 ? e.operators :
|
|
1739
|
+
return e.operators && e.operators.length > 0 ? e.operators : Ne(e.type, _.operators);
|
|
1738
1740
|
}
|
|
1739
1741
|
function M(e, t) {
|
|
1740
1742
|
h(e, t);
|
|
1741
1743
|
}
|
|
1742
1744
|
return /* @__PURE__ */ q(l, {
|
|
1743
|
-
gap:
|
|
1745
|
+
gap: gt[a],
|
|
1744
1746
|
className: r("filter-layout--component", e),
|
|
1745
|
-
children: [!!c && c.length > 0 && /* @__PURE__ */ K(
|
|
1747
|
+
children: [!!c && c.length > 0 && /* @__PURE__ */ K(dt, { tabs: c }), /* @__PURE__ */ q(l, {
|
|
1746
1748
|
direction: "horizontal",
|
|
1747
1749
|
align: "center",
|
|
1748
|
-
gap:
|
|
1749
|
-
children: [/* @__PURE__ */ K(
|
|
1750
|
+
gap: _t[a],
|
|
1751
|
+
children: [/* @__PURE__ */ K(tt, {
|
|
1750
1752
|
filterKey: "search-filters",
|
|
1751
|
-
children: /* @__PURE__ */ K(
|
|
1753
|
+
children: /* @__PURE__ */ K(ht, {
|
|
1752
1754
|
filters: y,
|
|
1753
1755
|
getFilterValue: u,
|
|
1754
1756
|
setFilterValue: d
|
|
@@ -1763,14 +1765,14 @@ function ht({ className: e, dynamicFilterOptions: t = {}, loadingFilters: n = {}
|
|
|
1763
1765
|
gap: "sm",
|
|
1764
1766
|
wrap: !1,
|
|
1765
1767
|
className: "rounded-radius bg-muted/50 px-control-sm py-space-xs",
|
|
1766
|
-
children: [/* @__PURE__ */ K("div", { className: "border-muted-foreground/30 border-t-primary size-icon-sm animate-spin rounded-full border-2" }), /* @__PURE__ */ K(
|
|
1768
|
+
children: [/* @__PURE__ */ K("div", { className: "border-muted-foreground/30 border-t-primary size-icon-sm animate-spin rounded-full border-2" }), /* @__PURE__ */ K(s, {
|
|
1767
1769
|
tag: "span",
|
|
1768
1770
|
type: "secondary",
|
|
1769
1771
|
children: Y(_.loadingOptions, { filterLabel: t })
|
|
1770
1772
|
})]
|
|
1771
1773
|
}, `loading-${e}`);
|
|
1772
1774
|
}),
|
|
1773
|
-
[...b, ...x].map((e) => /* @__PURE__ */ K(
|
|
1775
|
+
[...b, ...x].map((e) => /* @__PURE__ */ K(lt, {
|
|
1774
1776
|
filter: e,
|
|
1775
1777
|
value: u(e.key) ?? [],
|
|
1776
1778
|
active: f(e.key),
|
|
@@ -1782,9 +1784,9 @@ function ht({ className: e, dynamicFilterOptions: t = {}, loadingFilters: n = {}
|
|
|
1782
1784
|
availableFilters: S,
|
|
1783
1785
|
activeFilters: [...x, ...b]
|
|
1784
1786
|
}, e.key)),
|
|
1785
|
-
S.length > 0 && /* @__PURE__ */ K(
|
|
1787
|
+
S.length > 0 && /* @__PURE__ */ K(tt, {
|
|
1786
1788
|
filterKey: "filters-button",
|
|
1787
|
-
children: /* @__PURE__ */ K(
|
|
1789
|
+
children: /* @__PURE__ */ K(ut, {
|
|
1788
1790
|
triggerRef: O,
|
|
1789
1791
|
availableFilters: S,
|
|
1790
1792
|
activeFilters: x,
|
|
@@ -1794,7 +1796,7 @@ function ht({ className: e, dynamicFilterOptions: t = {}, loadingFilters: n = {}
|
|
|
1794
1796
|
setActiveFilterInPopover: D
|
|
1795
1797
|
})
|
|
1796
1798
|
}),
|
|
1797
|
-
!!o && C && /* @__PURE__ */ K(
|
|
1799
|
+
!!o && C && /* @__PURE__ */ K(i, {
|
|
1798
1800
|
tone: "secondary",
|
|
1799
1801
|
buttonStyle: "ghost",
|
|
1800
1802
|
onClick: p,
|
|
@@ -1808,8 +1810,8 @@ function ht({ className: e, dynamicFilterOptions: t = {}, loadingFilters: n = {}
|
|
|
1808
1810
|
}
|
|
1809
1811
|
//#endregion
|
|
1810
1812
|
//#region src/components/features/filters/filter-query.ts
|
|
1811
|
-
var
|
|
1812
|
-
function
|
|
1813
|
+
var yt = "__op", bt = ["page"], xt = new Set(Object.values(Z));
|
|
1814
|
+
function $(e) {
|
|
1813
1815
|
let t = {};
|
|
1814
1816
|
if (!e) return t;
|
|
1815
1817
|
if (e instanceof URLSearchParams) return e.forEach((e, n) => {
|
|
@@ -1821,79 +1823,79 @@ function yt(e) {
|
|
|
1821
1823
|
}
|
|
1822
1824
|
return t;
|
|
1823
1825
|
}
|
|
1824
|
-
function
|
|
1826
|
+
function St(e) {
|
|
1825
1827
|
let t = {};
|
|
1826
1828
|
for (let [n, r] of Object.entries(e)) r.length !== 0 && (t[n] = r.length === 1 ? r[0] : r);
|
|
1827
1829
|
return t;
|
|
1828
1830
|
}
|
|
1829
|
-
function
|
|
1831
|
+
function Ct(e, t, n) {
|
|
1830
1832
|
let r = e[t] ?? [];
|
|
1831
1833
|
return n === "comma" ? r.flatMap((e) => e.split(",")) : r;
|
|
1832
1834
|
}
|
|
1833
|
-
function
|
|
1835
|
+
function wt(e, t) {
|
|
1834
1836
|
return t.map((e) => e.trim()).filter((e) => e.length > 0).map((t) => {
|
|
1835
1837
|
if (!e.parse) return t;
|
|
1836
1838
|
let n = e.parse(t);
|
|
1837
1839
|
return n == null ? "" : String(n);
|
|
1838
1840
|
}).filter((e) => e.length > 0);
|
|
1839
1841
|
}
|
|
1840
|
-
function
|
|
1842
|
+
function Tt(e, t) {
|
|
1841
1843
|
return t.map((t) => {
|
|
1842
1844
|
let n = e.transform ? e.transform(t) : t, r = e.format ? e.format(n) : n;
|
|
1843
1845
|
return r == null ? "" : String(r);
|
|
1844
1846
|
}).filter((e) => e.length > 0);
|
|
1845
1847
|
}
|
|
1846
|
-
function
|
|
1847
|
-
return e.operator ?? e.operators?.[0]?.value ??
|
|
1848
|
+
function Et(e) {
|
|
1849
|
+
return e.operator ?? e.operators?.[0]?.value ?? Pe(e.type);
|
|
1848
1850
|
}
|
|
1849
|
-
function
|
|
1851
|
+
function Dt(e, t, n) {
|
|
1850
1852
|
let [r] = t[`${e.key}${n}`] ?? [];
|
|
1851
|
-
return r &&
|
|
1853
|
+
return r && xt.has(r) ? r : Et(e);
|
|
1852
1854
|
}
|
|
1853
|
-
function
|
|
1855
|
+
function Ot(e, t, n) {
|
|
1854
1856
|
return e === "always" || e !== "never" && t !== n;
|
|
1855
1857
|
}
|
|
1856
|
-
function
|
|
1858
|
+
function kt(e) {
|
|
1857
1859
|
return e.type === X.MULTI_SELECT || e.type === X.TAGS || e.multiple === !0;
|
|
1858
1860
|
}
|
|
1859
|
-
function
|
|
1860
|
-
let r = n.operatorSuffix ??
|
|
1861
|
+
function At(e, t, n = {}) {
|
|
1862
|
+
let r = n.operatorSuffix ?? yt, i = n.arrayFormat ?? "repeat", a = $(t);
|
|
1861
1863
|
return e.flatMap((e) => {
|
|
1862
|
-
let t =
|
|
1864
|
+
let t = wt(e, Ct(a, e.key, i));
|
|
1863
1865
|
return t.length === 0 ? [] : [{
|
|
1864
1866
|
id: e.key,
|
|
1865
1867
|
key: e.key,
|
|
1866
|
-
operator:
|
|
1867
|
-
value:
|
|
1868
|
+
operator: Dt(e, a, r),
|
|
1869
|
+
value: kt(e) ? t : [t[0]]
|
|
1868
1870
|
}];
|
|
1869
1871
|
});
|
|
1870
1872
|
}
|
|
1871
|
-
function
|
|
1872
|
-
let i = r.operatorSuffix ??
|
|
1873
|
+
function jt(e, t, n, r = {}) {
|
|
1874
|
+
let i = r.operatorSuffix ?? yt, a = r.arrayFormat ?? "repeat", o = r.preserveUnrelated ?? !0, s = r.includeOperators ?? "changed", c = r.resetPageKeys ?? bt, l = o ? $(n) : {}, u = new Map(e.map((e) => [e.key, e]));
|
|
1873
1875
|
for (let t of e) delete l[t.key], delete l[`${t.key}${i}`];
|
|
1874
1876
|
for (let e of c) delete l[e];
|
|
1875
1877
|
for (let e of t) {
|
|
1876
1878
|
let t = u.get(e.key);
|
|
1877
1879
|
if (!t) continue;
|
|
1878
|
-
let n =
|
|
1880
|
+
let n = Tt(t, e.value);
|
|
1879
1881
|
if (n.length === 0) continue;
|
|
1880
1882
|
l[e.key] = a === "comma" ? [n.join(",")] : n;
|
|
1881
|
-
let r =
|
|
1882
|
-
|
|
1883
|
+
let r = Et(t);
|
|
1884
|
+
Ot(s, e.operator, r) && (l[`${e.key}${i}`] = [e.operator]);
|
|
1883
1885
|
}
|
|
1884
|
-
return
|
|
1886
|
+
return St(l);
|
|
1885
1887
|
}
|
|
1886
|
-
function
|
|
1887
|
-
let r = n.preserveUnrelated ?? !0, i = n.resetPageKeys ??
|
|
1888
|
+
function Mt(e, t, n = {}) {
|
|
1889
|
+
let r = n.preserveUnrelated ?? !0, i = n.resetPageKeys ?? bt, a = r ? $(e) : {}, o = $(t);
|
|
1888
1890
|
for (let e of i) delete a[e];
|
|
1889
1891
|
for (let [e, t] of Object.entries(o)) t.length === 0 ? delete a[e] : a[e] = t;
|
|
1890
|
-
return
|
|
1892
|
+
return St(a);
|
|
1891
1893
|
}
|
|
1892
1894
|
//#endregion
|
|
1893
1895
|
//#region src/components/features/filters/facets/select-facet.tsx
|
|
1894
|
-
function
|
|
1895
|
-
let { defaultScale: c } =
|
|
1896
|
-
|
|
1896
|
+
function Nt({ filter: t, value: n, onValueChange: a, className: o }) {
|
|
1897
|
+
let { defaultScale: c } = e(), l = k(void 0, c), { strings: u } = Q(), [d, f] = G(!1), [p, m] = G(""), h = n.length > 0, g = t.options, _ = (e) => {
|
|
1898
|
+
t.multiple ? n.includes(e) ? a(n.filter((t) => t !== e)) : a([...n, e]) : (a([e]), t.closeOnSelect !== !1 && f(!1));
|
|
1897
1899
|
}, v = (e) => g?.find((t) => t.value === e)?.label ?? e, y = U(() => (g ?? []).map((e) => ({
|
|
1898
1900
|
value: e.value,
|
|
1899
1901
|
label: e.label,
|
|
@@ -1901,10 +1903,10 @@ function jt({ filter: e, value: n, onValueChange: a, className: o }) {
|
|
|
1901
1903
|
icon: e.icon,
|
|
1902
1904
|
selected: n.includes(e.value),
|
|
1903
1905
|
disabled: e.disabled
|
|
1904
|
-
})), [g, n]), b = Y(u.searchPlaceholder, { filterLabel:
|
|
1906
|
+
})), [g, n]), b = Y(u.searchPlaceholder, { filterLabel: t.label.toLowerCase() });
|
|
1905
1907
|
return /* @__PURE__ */ K("div", {
|
|
1906
1908
|
className: r("select-facet--component", "relative", o),
|
|
1907
|
-
children: /* @__PURE__ */ K(
|
|
1909
|
+
children: /* @__PURE__ */ K(oe, {
|
|
1908
1910
|
open: d,
|
|
1909
1911
|
onOpenChange: f,
|
|
1910
1912
|
search: !0,
|
|
@@ -1915,30 +1917,30 @@ function jt({ filter: e, value: n, onValueChange: a, className: o }) {
|
|
|
1915
1917
|
empty: u.noOptionsFound
|
|
1916
1918
|
},
|
|
1917
1919
|
contentClassName: "w-(--anchor-width) min-w-56",
|
|
1918
|
-
trigger: /* @__PURE__ */ q(
|
|
1920
|
+
trigger: /* @__PURE__ */ q(i, {
|
|
1919
1921
|
tone: "secondary",
|
|
1920
1922
|
buttonStyle: "outline",
|
|
1921
1923
|
size: l,
|
|
1922
1924
|
role: "combobox",
|
|
1923
1925
|
"aria-expanded": d,
|
|
1924
|
-
className:
|
|
1925
|
-
children: [h ? n.length === 1 ? /* @__PURE__ */ K(
|
|
1926
|
+
className: A(l),
|
|
1927
|
+
children: [h ? n.length === 1 ? /* @__PURE__ */ K(s, {
|
|
1926
1928
|
tag: "span",
|
|
1927
1929
|
weight: "semibold",
|
|
1928
1930
|
className: "truncate",
|
|
1929
1931
|
children: v(n[0])
|
|
1930
|
-
}) : /* @__PURE__ */ K(
|
|
1932
|
+
}) : /* @__PURE__ */ K(s, {
|
|
1931
1933
|
tag: "span",
|
|
1932
1934
|
weight: "semibold",
|
|
1933
1935
|
children: Y(u.selected, {
|
|
1934
1936
|
count: n.length,
|
|
1935
|
-
filterLabel: (n.length > 1 ?
|
|
1937
|
+
filterLabel: (n.length > 1 ? t.pluralLabel : t.label) ?? t.label
|
|
1936
1938
|
})
|
|
1937
|
-
}) : /* @__PURE__ */ K(
|
|
1939
|
+
}) : /* @__PURE__ */ K(s, {
|
|
1938
1940
|
tag: "span",
|
|
1939
1941
|
type: "secondary",
|
|
1940
|
-
children:
|
|
1941
|
-
}), /* @__PURE__ */ K(
|
|
1942
|
+
children: t.placeholder ?? u.select
|
|
1943
|
+
}), /* @__PURE__ */ K(ve, { className: "ml-control-gap-small size-icon-sm shrink-0 opacity-50" })]
|
|
1942
1944
|
}),
|
|
1943
1945
|
items: y,
|
|
1944
1946
|
onSelect: (e) => _(e.value)
|
|
@@ -1947,171 +1949,171 @@ function jt({ filter: e, value: n, onValueChange: a, className: o }) {
|
|
|
1947
1949
|
}
|
|
1948
1950
|
//#endregion
|
|
1949
1951
|
//#region src/components/features/filters/facets/async-select-facet.tsx
|
|
1950
|
-
function
|
|
1951
|
-
let { defaultScale: c } =
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
]), { options:
|
|
1952
|
+
function Pt({ filter: t, value: n, onValueChange: a, className: o }) {
|
|
1953
|
+
let { defaultScale: c } = e(), u = k(void 0, c), { strings: p, cacheAsyncOptions: m, getAsyncOptionLabel: h, reportError: g } = Q(), [_, v] = G(!1), [y, b] = G(""), x = U(() => /* @__PURE__ */ new Map(), [
|
|
1954
|
+
t.key,
|
|
1955
|
+
t.asyncConfig?.fetcher,
|
|
1956
|
+
t.asyncConfig?.mapToOption
|
|
1957
|
+
]), { options: D, isLoading: j, isFetching: M, isError: N, refetch: P, isBelowMinQuery: F, minQueryLength: L } = Ye(t, y, _, { onError: g });
|
|
1956
1958
|
H(() => {
|
|
1957
|
-
if (
|
|
1958
|
-
for (let e of
|
|
1959
|
-
m(
|
|
1959
|
+
if (D.length !== 0) {
|
|
1960
|
+
for (let e of D) x.set(e.value, e);
|
|
1961
|
+
m(t.key, D);
|
|
1960
1962
|
}
|
|
1961
1963
|
}, [
|
|
1962
1964
|
m,
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1965
|
+
t.key,
|
|
1966
|
+
x,
|
|
1967
|
+
D
|
|
1966
1968
|
]);
|
|
1967
|
-
let ne =
|
|
1968
|
-
let
|
|
1969
|
-
for (let
|
|
1970
|
-
let n =
|
|
1969
|
+
let ne = t.multiple !== !1, R = t.maxSelected, z = U(() => t.options ?? [], [t.options]), re = U(() => {
|
|
1970
|
+
let e = new Set(n), r = new Set([...z, ...D].map((e) => e.value)), i = [];
|
|
1971
|
+
for (let e of n) if (!r.has(e)) {
|
|
1972
|
+
let n = x.get(e);
|
|
1971
1973
|
if (n) i.push(n);
|
|
1972
1974
|
else {
|
|
1973
|
-
let n = z.find((
|
|
1975
|
+
let n = z.find((t) => t.value === e);
|
|
1974
1976
|
if (n) {
|
|
1975
1977
|
i.push(n);
|
|
1976
1978
|
continue;
|
|
1977
1979
|
}
|
|
1978
|
-
let r = h(
|
|
1980
|
+
let r = h(t.key, e);
|
|
1979
1981
|
r && i.push({
|
|
1980
|
-
value:
|
|
1982
|
+
value: e,
|
|
1981
1983
|
label: r,
|
|
1982
|
-
icon:
|
|
1984
|
+
icon: t.icon
|
|
1983
1985
|
});
|
|
1984
1986
|
}
|
|
1985
1987
|
}
|
|
1986
1988
|
return [
|
|
1987
1989
|
...i,
|
|
1988
1990
|
...z,
|
|
1989
|
-
...
|
|
1990
|
-
].sort((
|
|
1991
|
+
...D
|
|
1992
|
+
].sort((t, n) => +!e.has(t.value) - !e.has(n.value));
|
|
1991
1993
|
}, [
|
|
1992
1994
|
z,
|
|
1993
|
-
|
|
1995
|
+
D,
|
|
1994
1996
|
n,
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1997
|
+
t.key,
|
|
1998
|
+
t.icon,
|
|
1999
|
+
x,
|
|
1998
2000
|
h
|
|
1999
|
-
]), ie = (
|
|
2001
|
+
]), ie = (e) => {
|
|
2000
2002
|
if (ne) {
|
|
2001
|
-
if (n.includes(
|
|
2003
|
+
if (n.includes(e)) a(n.filter((t) => t !== e));
|
|
2002
2004
|
else {
|
|
2003
2005
|
if (R && n.length >= R) return;
|
|
2004
|
-
a([...n,
|
|
2006
|
+
a([...n, e]);
|
|
2005
2007
|
}
|
|
2006
|
-
} else a([
|
|
2007
|
-
}, ae = (
|
|
2008
|
-
let n =
|
|
2008
|
+
} else a([e]), t.closeOnSelect !== !1 && v(!1);
|
|
2009
|
+
}, ae = (e) => {
|
|
2010
|
+
let n = D.find((t) => t.value === e);
|
|
2009
2011
|
if (n) return n.label;
|
|
2010
|
-
let r = z.find((
|
|
2012
|
+
let r = z.find((t) => t.value === e);
|
|
2011
2013
|
if (r) return r.label;
|
|
2012
|
-
let i =
|
|
2013
|
-
return i ? i.label : h(
|
|
2014
|
-
}, oe = n.length > 0,
|
|
2014
|
+
let i = x.get(e);
|
|
2015
|
+
return i ? i.label : h(t.key, e) ?? e;
|
|
2016
|
+
}, oe = n.length > 0, se = U(() => j || M ? /* @__PURE__ */ K(d, {
|
|
2015
2017
|
className: "async-select-facet--component",
|
|
2016
2018
|
label: p.searching
|
|
2017
|
-
}) :
|
|
2019
|
+
}) : N ? /* @__PURE__ */ K(f, {
|
|
2018
2020
|
variant: "inline",
|
|
2019
2021
|
title: p.fetchError,
|
|
2020
|
-
action: /* @__PURE__ */ K(
|
|
2022
|
+
action: /* @__PURE__ */ K(i, {
|
|
2021
2023
|
tone: "secondary",
|
|
2022
2024
|
buttonStyle: "outline",
|
|
2023
2025
|
size: "sm",
|
|
2024
2026
|
onClick: (e) => {
|
|
2025
|
-
e.stopPropagation(),
|
|
2027
|
+
e.stopPropagation(), P();
|
|
2026
2028
|
},
|
|
2027
2029
|
children: p.retryFetch
|
|
2028
2030
|
})
|
|
2029
|
-
}) :
|
|
2031
|
+
}) : F ? /* @__PURE__ */ K("div", {
|
|
2030
2032
|
className: "text-muted-foreground flex items-center justify-center py-space-xl",
|
|
2031
|
-
children: /* @__PURE__ */ K(
|
|
2033
|
+
children: /* @__PURE__ */ K(s, {
|
|
2032
2034
|
tag: "span",
|
|
2033
2035
|
size: "xs",
|
|
2034
2036
|
type: "secondary",
|
|
2035
2037
|
children: Y(p.minQueryHint, { min: L })
|
|
2036
2038
|
})
|
|
2037
|
-
}) : /* @__PURE__ */ K(
|
|
2039
|
+
}) : /* @__PURE__ */ K(s, {
|
|
2038
2040
|
tag: "span",
|
|
2039
2041
|
type: "secondary",
|
|
2040
2042
|
children: p.noOptionsFound
|
|
2041
2043
|
}), [
|
|
2042
2044
|
j,
|
|
2043
2045
|
M,
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
+
N,
|
|
2047
|
+
F,
|
|
2046
2048
|
L,
|
|
2047
2049
|
p,
|
|
2048
|
-
|
|
2050
|
+
P
|
|
2049
2051
|
]);
|
|
2050
2052
|
return /* @__PURE__ */ K("div", {
|
|
2051
2053
|
className: r("async-select-facet--component relative", o),
|
|
2052
|
-
children: /* @__PURE__ */ q(
|
|
2054
|
+
children: /* @__PURE__ */ q(I, {
|
|
2053
2055
|
open: _,
|
|
2054
2056
|
onOpenChange: (e) => {
|
|
2055
|
-
v(e), e ||
|
|
2057
|
+
v(e), e || b("");
|
|
2056
2058
|
},
|
|
2057
|
-
children: [/* @__PURE__ */ K(
|
|
2059
|
+
children: [/* @__PURE__ */ K(ee, { render: /* @__PURE__ */ q(i, {
|
|
2058
2060
|
tone: "secondary",
|
|
2059
2061
|
buttonStyle: "outline",
|
|
2060
|
-
size:
|
|
2062
|
+
size: u,
|
|
2061
2063
|
role: "combobox",
|
|
2062
2064
|
"aria-expanded": _,
|
|
2063
|
-
className:
|
|
2064
|
-
children: [oe ? n.length === 1 ? /* @__PURE__ */ K(
|
|
2065
|
+
className: A(u),
|
|
2066
|
+
children: [oe ? n.length === 1 ? /* @__PURE__ */ K(s, {
|
|
2065
2067
|
tag: "span",
|
|
2066
2068
|
weight: "semibold",
|
|
2067
2069
|
className: "truncate",
|
|
2068
2070
|
children: ae(n[0])
|
|
2069
|
-
}) : /* @__PURE__ */ K(
|
|
2071
|
+
}) : /* @__PURE__ */ K(s, {
|
|
2070
2072
|
tag: "span",
|
|
2071
2073
|
weight: "semibold",
|
|
2072
2074
|
children: Y(p.selected, {
|
|
2073
2075
|
count: n.length,
|
|
2074
|
-
filterLabel: (n.length > 1 ?
|
|
2076
|
+
filterLabel: (n.length > 1 ? t.pluralLabel : t.label) ?? t.label
|
|
2075
2077
|
})
|
|
2076
|
-
}) : /* @__PURE__ */ K(
|
|
2078
|
+
}) : /* @__PURE__ */ K(s, {
|
|
2077
2079
|
tag: "span",
|
|
2078
2080
|
type: "secondary",
|
|
2079
|
-
children:
|
|
2080
|
-
}), /* @__PURE__ */ K(
|
|
2081
|
-
}) }), /* @__PURE__ */ K(
|
|
2081
|
+
children: t.placeholder ?? p.select
|
|
2082
|
+
}), /* @__PURE__ */ K(ve, { className: "ml-control-gap-small size-icon-sm shrink-0 opacity-50" })]
|
|
2083
|
+
}) }), /* @__PURE__ */ K(te, {
|
|
2082
2084
|
type: "menu",
|
|
2083
2085
|
inset: "flush",
|
|
2084
2086
|
className: "w-full min-w-70 gap-0",
|
|
2085
|
-
children: /* @__PURE__ */ q(
|
|
2087
|
+
children: /* @__PURE__ */ q(O, {
|
|
2086
2088
|
shouldFilter: !1,
|
|
2087
2089
|
inset: "flush",
|
|
2088
2090
|
className: "rounded-none",
|
|
2089
|
-
children: [/* @__PURE__ */ K(
|
|
2090
|
-
placeholder: Y(p.searchPlaceholder, { filterLabel:
|
|
2091
|
+
children: [/* @__PURE__ */ K(C, {
|
|
2092
|
+
placeholder: Y(p.searchPlaceholder, { filterLabel: t.label }),
|
|
2091
2093
|
value: y,
|
|
2092
|
-
onValueChange:
|
|
2093
|
-
}), /* @__PURE__ */ K(
|
|
2094
|
+
onValueChange: b
|
|
2095
|
+
}), /* @__PURE__ */ K(T, { children: re.length === 0 ? /* @__PURE__ */ K(w, { children: se }) : /* @__PURE__ */ q(E, { children: [!(!M || j) && /* @__PURE__ */ q(l, {
|
|
2094
2096
|
direction: "horizontal",
|
|
2095
2097
|
gap: "sm",
|
|
2096
2098
|
wrap: !1,
|
|
2097
2099
|
className: "px-control-sm py-space-xs",
|
|
2098
|
-
children: [/* @__PURE__ */ K(
|
|
2100
|
+
children: [/* @__PURE__ */ K(be, { className: "text-muted-foreground size-icon-sm animate-spin" }), /* @__PURE__ */ K(s, {
|
|
2099
2101
|
tag: "span",
|
|
2100
2102
|
size: "xs",
|
|
2101
2103
|
type: "secondary",
|
|
2102
2104
|
children: p.searching
|
|
2103
2105
|
})]
|
|
2104
|
-
}), re.map((e) => /* @__PURE__ */ q(
|
|
2106
|
+
}), re.map((e) => /* @__PURE__ */ q(S, {
|
|
2105
2107
|
value: e.value,
|
|
2106
2108
|
onSelect: () => ie(e.value),
|
|
2107
2109
|
disabled: e.disabled || !!R && n.length >= R && !n.includes(e.value),
|
|
2108
2110
|
children: [
|
|
2109
|
-
/* @__PURE__ */ K(
|
|
2111
|
+
/* @__PURE__ */ K(he, { className: r("mr-control-gap size-icon-sm", n.includes(e.value) ? "opacity-100" : "opacity-0") }),
|
|
2110
2112
|
!!e.icon && /* @__PURE__ */ K("span", {
|
|
2111
2113
|
className: "mr-1.5",
|
|
2112
2114
|
children: e.icon
|
|
2113
2115
|
}),
|
|
2114
|
-
/* @__PURE__ */ K(
|
|
2116
|
+
/* @__PURE__ */ K(s, {
|
|
2115
2117
|
tag: "span",
|
|
2116
2118
|
children: e.label
|
|
2117
2119
|
})
|
|
@@ -2124,8 +2126,8 @@ function Mt({ filter: e, value: n, onValueChange: a, className: o }) {
|
|
|
2124
2126
|
}
|
|
2125
2127
|
//#endregion
|
|
2126
2128
|
//#region src/components/features/filters/facets/range-facet.tsx
|
|
2127
|
-
function
|
|
2128
|
-
let { strings:
|
|
2129
|
+
function Ft({ filter: e, value: t, onValueChange: n, className: i }) {
|
|
2130
|
+
let { strings: a } = Q(), [s, u] = G(t.min?.toString() ?? ""), [d, f] = G(t.max?.toString() ?? ""), p = fe(), m = se((e) => {
|
|
2129
2131
|
(e.min !== t.min || e.max !== t.max) && n(e);
|
|
2130
2132
|
}, e.delay ?? 300);
|
|
2131
2133
|
return H(() => (m({
|
|
@@ -2146,10 +2148,10 @@ function Nt({ filter: e, value: t, onValueChange: n, className: i }) {
|
|
|
2146
2148
|
gap: "md",
|
|
2147
2149
|
children: [/* @__PURE__ */ q(l, {
|
|
2148
2150
|
gap: "xs",
|
|
2149
|
-
children: [/* @__PURE__ */ K(
|
|
2151
|
+
children: [/* @__PURE__ */ K(o, {
|
|
2150
2152
|
htmlFor: `${p}-min`,
|
|
2151
|
-
children:
|
|
2152
|
-
}), /* @__PURE__ */ K(
|
|
2153
|
+
children: a.min
|
|
2154
|
+
}), /* @__PURE__ */ K(M, {
|
|
2153
2155
|
id: `${p}-min`,
|
|
2154
2156
|
type: "text",
|
|
2155
2157
|
value: s,
|
|
@@ -2157,15 +2159,15 @@ function Nt({ filter: e, value: t, onValueChange: n, className: i }) {
|
|
|
2157
2159
|
let t = e.target.value;
|
|
2158
2160
|
(t === "" || /^\d*\.?\d*$/.test(t)) && u(t);
|
|
2159
2161
|
},
|
|
2160
|
-
placeholder:
|
|
2162
|
+
placeholder: a.min,
|
|
2161
2163
|
className: "w-full"
|
|
2162
2164
|
})]
|
|
2163
2165
|
}), /* @__PURE__ */ q(l, {
|
|
2164
2166
|
gap: "xs",
|
|
2165
|
-
children: [/* @__PURE__ */ K(
|
|
2167
|
+
children: [/* @__PURE__ */ K(o, {
|
|
2166
2168
|
htmlFor: `${p}-max`,
|
|
2167
|
-
children:
|
|
2168
|
-
}), /* @__PURE__ */ K(
|
|
2169
|
+
children: a.max
|
|
2170
|
+
}), /* @__PURE__ */ K(M, {
|
|
2169
2171
|
id: `${p}-max`,
|
|
2170
2172
|
type: "text",
|
|
2171
2173
|
value: d,
|
|
@@ -2173,7 +2175,7 @@ function Nt({ filter: e, value: t, onValueChange: n, className: i }) {
|
|
|
2173
2175
|
let t = e.target.value;
|
|
2174
2176
|
(t === "" || /^\d*\.?\d*$/.test(t)) && f(t);
|
|
2175
2177
|
},
|
|
2176
|
-
placeholder:
|
|
2178
|
+
placeholder: a.max,
|
|
2177
2179
|
className: "w-full"
|
|
2178
2180
|
})]
|
|
2179
2181
|
})]
|
|
@@ -2182,17 +2184,17 @@ function Nt({ filter: e, value: t, onValueChange: n, className: i }) {
|
|
|
2182
2184
|
}
|
|
2183
2185
|
//#endregion
|
|
2184
2186
|
//#region src/components/features/filters/validators.ts
|
|
2185
|
-
function
|
|
2187
|
+
function It(e) {
|
|
2186
2188
|
return (t) => {
|
|
2187
2189
|
if (t == null || typeof t == "string" && t.length === 0) return !0;
|
|
2188
2190
|
let n = e.safeParse(t);
|
|
2189
2191
|
return n.success ? !0 : n.error?.issues?.[0]?.message ?? n.error?.message ?? !1;
|
|
2190
2192
|
};
|
|
2191
2193
|
}
|
|
2192
|
-
function
|
|
2194
|
+
function Lt(e, t) {
|
|
2193
2195
|
return (n) => e(n) ? !0 : t;
|
|
2194
2196
|
}
|
|
2195
2197
|
//#endregion
|
|
2196
|
-
export {
|
|
2198
|
+
export { Ne as A, Re as C, je as D, Me as E, De as F, Te as I, Ee as L, Oe as M, Z as N, Pe as O, X as P, Y as R, ze as S, Q as T, tt as _, Nt as a, qe as b, jt as c, mt as d, dt as f, ot as g, ct as h, Pt as i, ke as j, Ae as k, vt as l, lt as m, It as n, Mt as o, ut as p, Ft as r, At as s, Lt as t, ht as u, Qe as v, Le as w, Be as x, Ye as y };
|
|
2197
2199
|
|
|
2198
|
-
//# sourceMappingURL=filters-
|
|
2200
|
+
//# sourceMappingURL=filters-BkHH53uv.js.map
|