themelia-ui 3.0.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/themelia-ui/SKILL.md +60 -33
- package/.agents/skills/themelia-ui/manifest.json +23 -0
- package/.agents/skills/themelia-ui/references/api-compatibility.md +5 -4
- package/.agents/skills/themelia-ui/references/blocks.md +123 -0
- package/.agents/skills/themelia-ui/references/composition-ladder.md +8 -8
- package/.agents/skills/themelia-ui/references/composition.md +100 -19
- package/.agents/skills/themelia-ui/references/forms.md +23 -3
- package/.agents/skills/themelia-ui/references/framework-wiring.md +41 -13
- package/.agents/skills/themelia-ui/references/i18n.md +4 -2
- package/.agents/skills/themelia-ui/references/imports.md +104 -104
- package/.agents/skills/themelia-ui/references/installation.md +60 -31
- package/.agents/skills/themelia-ui/references/migration.md +156 -5
- package/.agents/skills/themelia-ui/references/provider-and-scoping.md +37 -25
- package/.agents/skills/themelia-ui/references/reference-workflows.md +43 -0
- package/.agents/skills/themelia-ui/references/structure-and-spacing.md +147 -0
- package/.agents/skills/themelia-ui/references/theming.md +174 -131
- package/.agents/skills/themelia-ui/references/troubleshooting.md +88 -30
- package/.agents/skills/themelia-ui/references/verification.md +60 -5
- package/CHANGELOG.md +212 -0
- package/README.md +48 -60
- package/dist/accordion-CHuzMmWL.js +143 -0
- package/dist/{action-menu-BNLURfMK.js → action-menu-BwiL_F6I.js} +35 -33
- package/dist/{alert-dialog-BMVo6Z-8.js → alert-dialog-Cg2HhuBe.js} +1 -1
- package/dist/avatar-Dc_BNYfB.js +93 -0
- package/dist/badge-VlJVZjdm.js +45 -0
- package/dist/base/accordion.js +1 -1
- package/dist/base/action-menu.js +1 -1
- package/dist/base/alert-dialog.js +1 -1
- package/dist/base/aspect-ratio.js +3 -1
- package/dist/base/avatar.js +1 -1
- package/dist/base/badge.js +2 -2
- package/dist/base/batch-action-bar.js +1 -1
- package/dist/base/buttons.js +1 -1
- package/dist/base/cards.js +1 -1
- package/dist/base/carousel.js +6 -4
- package/dist/base/chart.js +1 -1
- package/dist/base/choice-inputs.js +1 -1
- package/dist/base/combobox.js +1 -1
- package/dist/base/command.js +1 -1
- package/dist/base/context-menu.js +22 -21
- package/dist/base/copyable.js +1 -1
- package/dist/base/date-pickers.js +1 -1
- package/dist/base/dialog.js +1 -1
- package/dist/base/display.js +1 -1
- package/dist/base/dropdown-menu.js +1 -1
- package/dist/base/feedback.js +1 -1
- package/dist/base/forms-numeric.js +1 -1
- package/dist/base/forms.js +1 -1
- package/dist/base/hover-card.js +26 -23
- package/dist/base/input-group.js +1 -1
- package/dist/base/item.js +1 -1
- package/dist/base/label.js +1 -1
- package/dist/base/menubar.js +20 -14
- package/dist/base/navigation-menu.js +47 -38
- package/dist/base/navigation.js +1 -1
- package/dist/base/otp-input.js +36 -30
- package/dist/base/overlay.js +1 -1
- package/dist/base/popover-menu.js +1 -1
- package/dist/base/popover.js +1 -1
- package/dist/base/qr-code.js +51 -47
- package/dist/base/repeaters.js +1 -1
- package/dist/base/resizable.js +2 -0
- package/dist/base/sheet.js +1 -1
- package/dist/base/sidebar.js +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 +1 -1
- package/dist/base/timeline.js +1 -1
- package/dist/base/toaster.js +1 -1
- package/dist/base/toggle.js +21 -15
- package/dist/base/toolbar.js +1 -1
- package/dist/base/tooltip.js +1 -1
- package/dist/base/typography.js +2 -2
- package/dist/base/upload.js +1 -1
- package/dist/base/value-inputs.js +1 -1
- package/dist/{batch-action-bar-BZYNKXdV.js → batch-action-bar-DZVMVW83.js} +11 -8
- package/dist/{admin/patterns → blocks/admin}/access.js +79 -76
- package/dist/blocks/admin/commerce.js +2493 -0
- package/dist/{patterns → blocks}/analytics.js +312 -303
- package/dist/{patterns → blocks}/onboarding.js +27 -23
- package/dist/{patterns → blocks}/timelines.js +1 -1
- package/dist/buttons-BX2JfL5X.js +173 -0
- package/dist/cards-Ddhz43Bz.js +279 -0
- package/dist/chart-BkK3Xm10.js +201 -0
- package/dist/choice-inputs-NwRxvmZN.js +694 -0
- package/dist/combobox-519ubijc.js +292 -0
- package/dist/command-JjApYFds.js +156 -0
- package/dist/comments-CCQ2QRaU.js +1443 -0
- package/dist/components/base/action-menu/action-menu.d.ts +1 -1
- package/dist/components/base/action-menu/action-menu.types.d.ts +2 -2
- package/dist/components/base/avatar/avatar.d.ts +5 -2
- package/dist/components/base/badge/badge.d.ts +10 -10
- package/dist/components/base/badge/badge.variants.d.ts +1 -2
- package/dist/components/base/badge/index.d.ts +1 -2
- package/dist/components/base/buttons/button.d.ts +9 -8
- package/dist/components/base/buttons/button.types.d.ts +2 -2
- package/dist/components/base/buttons/index.d.ts +1 -1
- package/dist/components/base/buttons/text-button.d.ts +1 -1
- package/dist/components/base/cards/card-actions.d.ts +1 -1
- package/dist/components/base/cards/card.d.ts +3 -1
- package/dist/components/base/cards/partials/card-header.d.ts +2 -1
- package/dist/components/base/choice-inputs/choice.types.d.ts +2 -2
- package/dist/components/base/choice-inputs/partials/choice-parts.d.ts +3 -3
- package/dist/components/base/command/command.d.ts +5 -2
- package/dist/components/base/display/icon-badge.d.ts +5 -3
- package/dist/components/base/display/index.d.ts +1 -1
- package/dist/components/base/display/metadata-list.d.ts +6 -6
- package/dist/components/base/display/metadata-value.d.ts +1 -1
- package/dist/components/base/display/separator.d.ts +2 -2
- package/dist/components/base/feedback/alert.d.ts +3 -2
- package/dist/components/base/feedback/empty.d.ts +5 -4
- package/dist/components/base/feedback/progress-circle.d.ts +2 -2
- package/dist/components/base/feedback/progress.d.ts +3 -1
- package/dist/components/base/forms/form-field.d.ts +2 -2
- package/dist/components/base/input-group/input-group.d.ts +8 -10
- package/dist/components/base/item/item.d.ts +2 -2
- package/dist/components/base/overlay/index.d.ts +1 -1
- package/dist/components/base/overlay/overlay.types.d.ts +7 -5
- package/dist/components/base/qr-code/qr-code.d.ts +4 -4
- package/dist/components/base/sheet/sheet.d.ts +1 -1
- package/dist/components/base/sidebar/sidebar.d.ts +9 -13
- package/dist/components/base/spinner/spinner.d.ts +2 -2
- package/dist/components/base/structure/adaptive-grid.d.ts +3 -3
- package/dist/components/base/structure/bleed.d.ts +4 -2
- package/dist/components/base/structure/grid.d.ts +10 -4
- package/dist/components/base/structure/index.d.ts +1 -1
- package/dist/components/base/structure/split.d.ts +4 -3
- package/dist/components/base/structure/stack.d.ts +5 -5
- package/dist/components/base/structure/structure.maps.d.ts +2 -1
- package/dist/components/base/structure/structure.types.d.ts +10 -4
- package/dist/components/base/toggle/toggle.d.ts +2 -2
- package/dist/components/base/toolbar/toolbar.d.ts +3 -3
- package/dist/components/base/typography/index.d.ts +2 -0
- package/dist/components/base/typography/rich-text/rich-text.variants.d.ts +9 -0
- package/dist/components/base/typography/text/index.d.ts +1 -0
- package/dist/components/base/typography/text/text.d.ts +15 -8
- package/dist/components/base/typography/text/text.variants.d.ts +41 -0
- package/dist/components/base/value-inputs/color-input.d.ts +1 -7
- package/dist/components/base/value-inputs/slider.d.ts +2 -7
- package/dist/components/{admin/patterns → blocks/admin}/commerce/vendor-profile.d.ts +2 -1
- package/dist/components/{patterns → blocks}/analytics/analytics.strings.d.ts +2 -5
- package/dist/components/features/actions/action-adapters.d.ts +3 -3
- package/dist/components/features/actions/actions.types.d.ts +3 -5
- package/dist/components/features/actions/index.d.ts +1 -1
- package/dist/components/features/activities/activities-feed.d.ts +1 -1
- package/dist/components/features/activities/activities.types.d.ts +4 -4
- package/dist/components/features/activities/activity-parts.d.ts +3 -3
- package/dist/components/features/activities/activity-row.d.ts +4 -4
- package/dist/components/features/activities/index.d.ts +1 -1
- package/dist/components/features/ai-chat/ai-chat.types.d.ts +10 -3
- package/dist/components/features/ai-chat/ai-message-surfaces.d.ts +1 -1
- package/dist/components/features/ai-chat/ai-work-surfaces.d.ts +1 -1
- package/dist/components/features/combobox/combobox.strings.d.ts +2 -2
- package/dist/components/features/combobox/fetching-combobox.d.ts +2 -1
- package/dist/components/features/combobox/resource-combobox.d.ts +3 -0
- package/dist/components/features/combobox/use-suggestions.d.ts +7 -0
- package/dist/components/features/event-calendar/event-calendar.types.d.ts +3 -0
- package/dist/components/features/media-library/index.d.ts +1 -1
- package/dist/components/features/media-library/media-library-parts.d.ts +4 -3
- package/dist/components/features/media-library/media-library-views.d.ts +4 -3
- package/dist/components/features/media-library/media-library.d.ts +1 -1
- package/dist/components/features/media-library/media-library.strings.d.ts +12 -13
- package/dist/components/features/media-library/media-library.types.d.ts +11 -9
- package/dist/components/features/media-library/media-resource-gallery.d.ts +1 -1
- package/dist/components/features/media-library/use-media-library.d.ts +1 -4
- package/dist/components/features/overlays/action-overlay-frame.d.ts +1 -1
- package/dist/components/features/overlays/index.d.ts +1 -1
- package/dist/components/features/overlays/overlay-parts.d.ts +3 -3
- package/dist/components/features/overlays/overlays.types.d.ts +8 -7
- package/dist/components/features/rich-text-editor/index.d.ts +0 -1
- package/dist/components/features/table/data-table-body.d.ts +1 -1
- package/dist/components/features/table/data-table-expanded-row.d.ts +27 -0
- package/dist/components/features/table/data-table-header.d.ts +1 -1
- package/dist/components/features/table/data-table-size.d.ts +1 -1
- package/dist/components/features/table/data-table.d.ts +1 -1
- package/dist/components/features/table/index.d.ts +1 -1
- package/dist/components/features/table/table-helpers.d.ts +9 -3
- package/dist/components/features/table/table.strings.d.ts +11 -0
- package/dist/components/features/table/table.types.d.ts +60 -2
- package/dist/components/features/theme-tweaker/index.d.ts +1 -1
- package/dist/components/features/theme-tweaker/theme-tweaker.strings.d.ts +1 -1
- package/dist/components/features/theme-tweaker/theme-tweaker.types.d.ts +6 -10
- package/dist/components/features/theme-tweaker/theme-tweaker.utils.d.ts +22 -6
- package/dist/components/layout/app-shell/topbar-sidebar-layout.d.ts +1 -1
- package/dist/components/layout/auth/auth.d.ts +1 -1
- package/dist/components/layout/auth/auth.types.d.ts +1 -1
- package/dist/components/primitives/value.d.ts +3 -1
- package/dist/containers-B8d8U9GS.js +2 -0
- package/dist/{copyable-H1TUEY-H.js → copyable-D9Okb1w6.js} +12 -11
- package/dist/core.css +2 -2
- package/dist/css/access.css +2 -1
- package/dist/css/accordion.css +2 -1
- package/dist/css/action-menu.css +2 -1
- package/dist/css/activities.css +2 -1
- package/dist/css/ai-chat.css +2 -1
- package/dist/css/analytics.css +2 -1
- package/dist/css/app-shell.css +2 -1
- package/dist/css/aspect-ratio.css +2 -1
- package/dist/css/async-preview.css +2 -1
- package/dist/css/auth.css +2 -1
- package/dist/css/avatar.css +2 -1
- package/dist/css/badge.css +2 -1
- package/dist/css/batch-action-bar.css +2 -1
- package/dist/css/buttons.css +2 -1
- package/dist/css/cards.css +2 -1
- package/dist/css/carousel.css +2 -1
- package/dist/css/chart.css +2 -1
- package/dist/css/choice-inputs.css +2 -1
- package/dist/css/combobox.css +2 -1
- package/dist/css/combobox2.css +2 -1
- package/dist/css/command.css +2 -1
- package/dist/css/comments.css +2 -1
- package/dist/css/commerce.css +2 -1
- package/dist/css/containers.css +2 -1
- package/dist/css/copyable.css +2 -1
- package/dist/css/data-view.css +2 -1
- package/dist/css/date-pickers.css +2 -1
- package/dist/css/display.css +2 -1
- package/dist/css/dropdown-menu.css +2 -1
- package/dist/css/event-calendar.css +2 -1
- package/dist/css/feedback.css +2 -1
- package/dist/css/filters.css +2 -1
- package/dist/css/forms-numeric.css +2 -1
- package/dist/css/forms.css +2 -1
- package/dist/css/global-search.css +2 -1
- package/dist/css/header.css +2 -1
- package/dist/css/hover-card.css +2 -1
- package/dist/css/input-group.css +2 -1
- package/dist/css/item.css +2 -1
- package/dist/css/kanban.css +2 -1
- package/dist/css/label.css +2 -1
- package/dist/css/map.css +2 -1
- package/dist/css/media-library.css +2 -1
- package/dist/css/mentions.css +2 -1
- package/dist/css/menubar.css +2 -1
- package/dist/css/navigation-menu.css +2 -1
- package/dist/css/navigation.css +2 -1
- package/dist/css/navigation2.css +2 -1
- package/dist/css/onboarding.css +2 -1
- package/dist/css/otp-input.css +2 -1
- package/dist/css/overlay.css +2 -1
- package/dist/css/overlays.css +2 -1
- package/dist/css/page.css +2 -1
- package/dist/css/popover-menu.css +2 -1
- package/dist/css/popover.css +2 -1
- package/dist/css/primitives.css +2 -1
- package/dist/css/products.css +2 -1
- package/dist/css/qr-code.css +2 -1
- package/dist/css/repeaters.css +2 -1
- package/dist/css/resizable.css +2 -1
- package/dist/css/resource-assignment.css +2 -1
- package/dist/css/resource.css +2 -1
- package/dist/css/rich-text-editor.css +2 -1
- package/dist/css/schema-form.css +2 -1
- package/dist/css/sidebar.css +2 -1
- package/dist/css/sidebar2.css +2 -1
- package/dist/css/skeleton.css +2 -1
- package/dist/css/spinner.css +2 -1
- package/dist/css/structure.css +2 -1
- package/dist/css/sync.css +2 -1
- package/dist/css/table.css +2 -1
- package/dist/css/table2.css +2 -1
- package/dist/css/text-inputs.css +2 -1
- package/dist/css/theme-tweaker.css +2 -1
- package/dist/css/timeline.css +2 -1
- package/dist/css/timelines.css +2 -1
- package/dist/css/toaster.css +2 -1
- package/dist/css/toggle.css +2 -1
- package/dist/css/toolbar.css +2 -1
- package/dist/css/tooltip.css +2 -1
- package/dist/css/typography.css +2 -1
- package/dist/css/upload.css +2 -1
- package/dist/css/value-inputs.css +2 -1
- package/dist/css/workspace.css +2 -1
- package/dist/css-graph.json +1027 -0
- package/dist/date-pickers-BwCwKIVM.js +685 -0
- package/dist/{dialog-CtFCuTUF.js → dialog-CAnwRNrm.js} +1 -1
- package/dist/display-a7AoX_u7.js +664 -0
- package/dist/dropdown-menu-Br8kvjrF.js +235 -0
- package/dist/empty.js +0 -0
- package/dist/features/actions.js +6 -6
- package/dist/features/activities.js +219 -216
- package/dist/features/ai-chat.js +593 -565
- package/dist/features/async-preview.js +105 -286
- package/dist/features/combobox.js +328 -314
- package/dist/features/comments.js +1 -1
- package/dist/features/data-view.js +56 -55
- package/dist/features/event-calendar.js +189 -185
- package/dist/features/filters.js +1 -1
- package/dist/features/global-search.js +259 -260
- package/dist/features/kanban.js +39 -37
- package/dist/features/map.js +357 -354
- package/dist/features/media-library.js +931 -931
- package/dist/features/mentions.js +1 -1
- package/dist/features/overlays.js +1 -1
- package/dist/features/products.js +950 -942
- package/dist/features/resource-assignment.js +39 -37
- package/dist/features/resource.js +70 -71
- package/dist/features/rich-text-editor.js +2 -2
- package/dist/features/schema-form.js +342 -338
- package/dist/features/sync.js +14 -12
- package/dist/features/table.js +1 -1
- package/dist/features/theme-tweaker.js +1002 -962
- package/dist/feedback-D4qVsKlD.js +430 -0
- package/dist/{filters-DOLKRSmb.js → filters-BhsTkWpZ.js} +386 -383
- package/dist/forms-C0WeNPFF.js +250 -0
- package/dist/forms-numeric-IwQ1ltNf.js +582 -0
- package/dist/hooks/use-native-dialog.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/input-group-HS_Z0Ei_.js +119 -0
- package/dist/item-M2pmpWXh.js +150 -0
- package/dist/{label-DumoMDm6.js → label-HOBXAscw.js} +7 -5
- package/dist/layout/app-shell.js +4 -2
- package/dist/layout/auth.js +102 -100
- package/dist/layout/header.js +190 -180
- package/dist/layout/navigation.js +1 -1
- package/dist/layout/page.js +18 -16
- package/dist/layout/settings.js +2 -2
- package/dist/layout/sidebar.js +50 -46
- package/dist/layout/workspace.js +71 -69
- package/dist/lib/action-presentation.d.ts +3 -3
- package/dist/lib/component-vocabulary.d.ts +2 -2
- package/dist/lib/css-length.d.ts +2 -0
- package/dist/lib/responsive.d.ts +1 -1
- package/dist/lib/theming/index.d.ts +1 -0
- package/dist/lib/theming/recipes.d.ts +2 -2
- package/dist/lib/theming/themes/dense.d.ts +3 -0
- package/dist/lib/theming/themes/editorial.d.ts +3 -0
- package/dist/lib/theming/themes/index.d.ts +8 -0
- package/dist/lib/theming/themes/pair.d.ts +7 -0
- package/dist/lib/theming/themes/sharp.d.ts +3 -0
- package/dist/lib/theming/themes/soft.d.ts +3 -0
- package/dist/lib/theming/themes/types.d.ts +12 -0
- package/dist/lib/ui-provider/index.d.ts +1 -1
- package/dist/lib/ui-provider/scope.d.ts +5 -8
- package/dist/lib/ui-provider/tokens.d.ts +11 -3
- package/dist/lib/ui-provider/tokens.generated.d.ts +6 -4
- package/dist/lib/ui-provider/types.d.ts +17 -19
- package/dist/lib/ui-provider/ui-scope.d.ts +1 -1
- package/dist/{mentions-BbsEHlcH.js → mentions-BOxbigwp.js} +113 -111
- package/dist/navigation-Bgu7Vc0M.js +622 -0
- package/dist/navigation-DiYACqpE.js +216 -0
- package/dist/overlay-BuQOl8aP.js +356 -0
- package/dist/{overlays-DvVoS3td.js → overlays-1sULyytH.js} +77 -75
- package/dist/popover-CA7SP_iz.js +127 -0
- package/dist/popover-menu-QXgQeWeG.js +192 -0
- package/dist/{primitives-D0bdDozz.js → primitives-BskKlf35.js} +181 -178
- package/dist/primitives.js +1 -1
- package/dist/profiles/admin.json +6 -36
- package/dist/profiles/general.json +6 -96
- package/dist/repeaters-CeH20dvr.js +445 -0
- package/dist/rich-text-editor-D_Ppm8yh.js +491 -0
- package/dist/{sheet-CKcmRbJ9.js → sheet-CJ1-OAla.js} +3 -3
- package/dist/sidebar-D8uGqxio.js +421 -0
- package/dist/skeleton-BTKNKTdj.js +173 -0
- package/dist/spinner-Tc1QCnxM.js +30 -0
- package/dist/{structure-D0WGQAP3.js → structure-CynEZ-OY.js} +15 -23
- package/dist/style.css +1 -1
- package/dist/styles/TOKENS.md +116 -275
- package/dist/styles/animation.css +114 -0
- package/dist/styles/base.css +7 -6
- package/dist/styles/fields.css +45 -63
- package/dist/styles/focus.css +12 -0
- package/dist/styles/forced-colors.css +11 -10
- package/dist/styles/index.css +23 -30
- package/dist/styles/map.css +45 -34
- package/dist/styles/mentions.css +14 -52
- package/dist/styles/overlays.css +7 -7
- package/dist/styles/tailwind.css +76 -127
- package/dist/styles/targets.css +3 -3
- package/dist/styles/theme/colour.css +86 -0
- package/dist/styles/theme/density.css +31 -0
- package/dist/styles/theme/elevation.css +9 -0
- package/dist/styles/theme/layout.css +18 -0
- package/dist/styles/theme/motion.css +18 -0
- package/dist/styles/theme/shape.css +12 -0
- package/dist/styles/theme/size.css +10 -0
- package/dist/styles/theme/spacing.css +11 -0
- package/dist/styles/theme/typography.css +20 -0
- package/dist/styles/tone.css +61 -0
- package/dist/table-B7dtIFUx.js +1262 -0
- package/dist/table-Ds_eO9av.js +191 -0
- package/dist/tailwind.css +76 -127
- package/dist/text-inputs-BboE77nZ.js +395 -0
- package/dist/theming-C5ygF5uf.js +292 -0
- package/dist/theming.js +2 -2
- package/dist/{timeline-BdaGRyj-.js → timeline-BR_jNgvz.js} +57 -49
- package/dist/{timelines-BB7550mz.js → timelines-DXG1BfIN.js} +69 -67
- package/dist/{toaster-bBMgXm8z.js → toaster-CXL8L7Mm.js} +106 -99
- package/dist/tokens.json +1027 -636
- package/dist/toolbar-DBK-c4yy.js +74 -0
- package/dist/tooltip-BPYP-jUm.js +76 -0
- package/dist/{typography-BkxEiwQ1.js → typography-DmeR05Er.js} +87 -53
- package/dist/{ui-provider-Cmoq6i_D.js → ui-provider-DpzLUD12.js} +117 -69
- package/dist/ui-provider.js +1 -1
- package/dist/upload-CYuoJykZ.js +968 -0
- package/dist/use-async-preview-BFwf9ElY.js +188 -0
- package/dist/value-inputs-ng8aVJJZ.js +728 -0
- package/docs/README.md +13 -3
- package/docs/build/browser-composition-fixture.ts +28 -0
- package/docs/build/recipes.md +11484 -10723
- package/docs/generated/component-index.json +9809 -9169
- package/docs/generated/components/INDEX.md +5 -5
- package/docs/generated/components/base--accordion.md +51 -2
- package/docs/generated/components/base--action-menu.md +14 -15
- package/docs/generated/components/base--alert-dialog.md +3 -4
- package/docs/generated/components/base--aspect-ratio.md +3 -4
- package/docs/generated/components/base--avatar.md +7 -7
- package/docs/generated/components/base--badge.md +159 -27
- package/docs/generated/components/base--batch-action-bar.md +6 -7
- package/docs/generated/components/base--buttons.md +151 -47
- package/docs/generated/components/base--cards.md +107 -14
- package/docs/generated/components/base--carousel.md +1 -2
- package/docs/generated/components/base--chart.md +44 -8
- package/docs/generated/components/base--choice-inputs.md +10 -11
- package/docs/generated/components/base--combobox.md +3 -4
- package/docs/generated/components/base--command.md +6 -6
- package/docs/generated/components/base--context-menu.md +1 -2
- package/docs/generated/components/base--copyable.md +6 -7
- package/docs/generated/components/base--date-pickers.md +6 -7
- package/docs/generated/components/base--dialog.md +6 -7
- package/docs/generated/components/base--direction.md +1 -1
- package/docs/generated/components/base--display.md +234 -54
- package/docs/generated/components/base--dropdown-menu.md +6 -7
- package/docs/generated/components/base--feedback.md +71 -18
- package/docs/generated/components/base--forms-numeric.md +6 -7
- package/docs/generated/components/base--forms.md +84 -14
- package/docs/generated/components/base--hover-card.md +3 -4
- package/docs/generated/components/base--input-group.md +27 -30
- package/docs/generated/components/base--item.md +8 -9
- package/docs/generated/components/base--label.md +2 -3
- package/docs/generated/components/base--menubar.md +2 -4
- package/docs/generated/components/base--navigation-menu.md +2 -3
- package/docs/generated/components/base--navigation.md +2 -3
- package/docs/generated/components/base--otp-input.md +3 -4
- package/docs/generated/components/base--overlay.md +56 -47
- package/docs/generated/components/base--popover-menu.md +7 -8
- package/docs/generated/components/base--popover.md +9 -10
- package/docs/generated/components/base--qr-code.md +7 -8
- package/docs/generated/components/base--repeaters.md +6 -7
- package/docs/generated/components/base--resizable.md +2 -3
- package/docs/generated/components/base--sheet.md +12 -13
- package/docs/generated/components/base--sidebar.md +9 -11
- package/docs/generated/components/base--skeleton.md +6 -7
- package/docs/generated/components/base--slot.md +1 -1
- package/docs/generated/components/base--spinner.md +5 -7
- package/docs/generated/components/base--structure.md +320 -70
- package/docs/generated/components/base--table.md +61 -3
- package/docs/generated/components/base--text-inputs.md +17 -18
- package/docs/generated/components/base--timeline.md +45 -4
- package/docs/generated/components/base--toaster.md +43 -12
- package/docs/generated/components/base--toggle.md +11 -12
- package/docs/generated/components/base--toolbar.md +7 -8
- package/docs/generated/components/base--tooltip.md +5 -6
- package/docs/generated/components/base--typography.md +317 -32
- package/docs/generated/components/base--upload.md +8 -9
- package/docs/generated/components/base--value-inputs.md +9 -38
- package/docs/generated/components/{admin--patterns--access.md → blocks--admin--access.md} +15 -6
- package/docs/generated/components/{admin--patterns--commerce.md → blocks--admin--commerce.md} +40 -41
- package/docs/generated/components/{patterns--analytics.md → blocks--analytics.md} +57 -14
- package/docs/generated/components/{patterns--onboarding.md → blocks--onboarding.md} +6 -7
- package/docs/generated/components/{patterns--timelines.md → blocks--timelines.md} +6 -7
- package/docs/generated/components/features--actions.md +8 -18
- package/docs/generated/components/features--activities.md +31 -32
- package/docs/generated/components/features--ai-chat.md +15 -15
- package/docs/generated/components/features--async-preview.md +5 -6
- package/docs/generated/components/features--combobox.md +71 -5
- package/docs/generated/components/features--comments.md +0 -1
- package/docs/generated/components/features--data-view.md +63 -8
- package/docs/generated/components/features--event-calendar.md +1 -2
- package/docs/generated/components/features--filters.md +11 -2
- package/docs/generated/components/features--global-search.md +1 -2
- package/docs/generated/components/features--kanban.md +1 -2
- package/docs/generated/components/features--map.md +1 -2
- package/docs/generated/components/features--media-library.md +105 -38
- package/docs/generated/components/features--mentions.md +7 -7
- package/docs/generated/components/features--overlays.md +75 -22
- package/docs/generated/components/features--products.md +10 -11
- package/docs/generated/components/features--resource-assignment.md +2 -3
- package/docs/generated/components/features--resource.md +3 -4
- package/docs/generated/components/features--rich-text-editor.md +42 -13
- package/docs/generated/components/features--schema-form.md +1 -2
- package/docs/generated/components/features--sync.md +2 -3
- package/docs/generated/components/features--table.md +162 -12
- package/docs/generated/components/features--theme-tweaker.md +30 -15
- package/docs/generated/components/forms.md +2 -2
- package/docs/generated/components/layout--app-shell.md +41 -11
- package/docs/generated/components/layout--auth.md +8 -9
- package/docs/generated/components/layout--containers.md +40 -1
- package/docs/generated/components/layout--header.md +2 -3
- package/docs/generated/components/layout--navigation.md +0 -1
- package/docs/generated/components/layout--page.md +33 -5
- package/docs/generated/components/layout--settings.md +0 -1
- package/docs/generated/components/layout--sidebar.md +47 -7
- package/docs/generated/components/layout--workspace.md +3 -4
- package/docs/generated/components/primitives.md +128 -17
- package/docs/generated/components/theming.md +147 -4
- package/docs/generated/components/ui-provider.md +96 -78
- package/docs/generated/composition-ladder.md +8 -8
- package/docs/generated/consumer-contract.json +5736 -0
- package/docs/generated/imports.md +104 -104
- package/docs/generated/migration-broad-imports.json +267 -90
- package/docs/generated/migration-broad-imports.md +266 -101
- package/docs/generated/migration-codemod.json +365 -70
- package/docs/generated/migration.md +665 -95
- package/docs/generated/profiles.md +27 -27
- package/docs/generated/public-api.md +104 -102
- package/docs/generated/recipes.json +755 -810
- package/docs/generated/workflows/communications-overview/analytics/communications-reference.tsx +19 -0
- package/docs/generated/workflows/index.json +691 -0
- package/docs/generated/workflows/media-picking/media-library/media-picking-reference.tsx +63 -0
- package/docs/generated/workflows/media-picking/media-library/reference-data.ts +3 -0
- package/docs/generated/workflows/multi-section-form/form-workflow/multi-section-reference.tsx +46 -0
- package/docs/generated/workflows/nested-action-flow/action-overlays/nested-action-reference.tsx +39 -0
- package/docs/generated/workflows/record-detail/page-layout/record-detail-reference.tsx +24 -0
- package/docs/generated/workflows/resource-index/data-view/resource-index-reference.tsx +51 -0
- package/docs/generated/workflows/scoped-resource-selection/combobox/scoped-resource-reference.tsx +50 -0
- package/docs/generated/workflows/website-content-editor/media-library/reference-data.ts +3 -0
- package/docs/generated/workflows/website-content-editor/rich-text-editor/website-content-reference.tsx +33 -0
- package/docs/generated/workflows/workspace-navigation/app-shell/workspace-navigation-reference.tsx +26 -0
- package/docs/learn/api-compatibility.md +5 -4
- package/docs/learn/blocks.md +123 -0
- package/docs/learn/composition.md +100 -19
- package/docs/learn/forms.md +23 -3
- package/docs/learn/framework-wiring.md +41 -13
- package/docs/learn/i18n.md +4 -2
- package/docs/learn/installation.md +60 -31
- package/docs/learn/migration.md +156 -5
- package/docs/learn/provider-and-scoping.md +37 -25
- package/docs/learn/reference-workflows.md +43 -0
- package/docs/learn/structure-and-spacing.md +147 -0
- package/docs/learn/theming.md +174 -131
- package/docs/learn/troubleshooting.md +88 -30
- package/docs/learn/verification.md +60 -5
- package/package.json +42 -473
- package/scripts/consumer/codemod.mjs +50 -32
- package/scripts/consumer/contract-reader.mjs +42 -0
- package/scripts/consumer/css-scan.mjs +51 -0
- package/scripts/consumer/diagnose.mjs +136 -0
- package/scripts/consumer/find-component.mjs +30 -17
- package/scripts/consumer/install-skill.mjs +93 -11
- package/src/styles/TOKENS.md +116 -275
- package/dist/accordion-6YPJ9XRO.js +0 -135
- package/dist/admin/patterns/access.css +0 -15
- package/dist/admin/patterns/commerce.css +0 -29
- package/dist/admin/patterns/commerce.js +0 -2493
- package/dist/avatar-CS7zow2q.js +0 -85
- package/dist/badge-CxOuTfVr.js +0 -63
- package/dist/base/accordion.css +0 -3
- package/dist/base/action-menu.css +0 -6
- package/dist/base/alert-dialog.css +0 -4
- package/dist/base/aspect-ratio.css +0 -2
- package/dist/base/avatar.css +0 -4
- package/dist/base/badge.css +0 -2
- package/dist/base/batch-action-bar.css +0 -5
- package/dist/base/buttons.css +0 -4
- package/dist/base/cards.css +0 -13
- package/dist/base/carousel.css +0 -5
- package/dist/base/chart.css +0 -2
- package/dist/base/choice-inputs.css +0 -10
- package/dist/base/combobox.css +0 -3
- package/dist/base/command.css +0 -9
- package/dist/base/context-menu.css +0 -2
- package/dist/base/copyable.css +0 -6
- package/dist/base/date-pickers.css +0 -11
- package/dist/base/dialog.css +0 -4
- package/dist/base/display.css +0 -8
- package/dist/base/dropdown-menu.css +0 -2
- package/dist/base/feedback.css +0 -5
- package/dist/base/forms-numeric.css +0 -12
- package/dist/base/forms.css +0 -14
- package/dist/base/hover-card.css +0 -2
- package/dist/base/input-group.css +0 -6
- package/dist/base/item.css +0 -9
- package/dist/base/label.css +0 -3
- package/dist/base/menubar.css +0 -2
- package/dist/base/navigation-menu.css +0 -2
- package/dist/base/navigation.css +0 -12
- package/dist/base/otp-input.css +0 -9
- package/dist/base/overlay.css +0 -4
- package/dist/base/popover-menu.css +0 -11
- package/dist/base/popover.css +0 -3
- package/dist/base/qr-code.css +0 -2
- package/dist/base/repeaters.css +0 -18
- package/dist/base/resizable.css +0 -2
- package/dist/base/sheet.css +0 -4
- package/dist/base/sidebar.css +0 -12
- package/dist/base/skeleton.css +0 -9
- package/dist/base/spinner.css +0 -2
- package/dist/base/structure.css +0 -2
- package/dist/base/table.css +0 -3
- package/dist/base/text-inputs.css +0 -2
- package/dist/base/timeline.css +0 -9
- package/dist/base/toaster.css +0 -2
- package/dist/base/toggle.css +0 -2
- package/dist/base/toolbar.css +0 -5
- package/dist/base/tooltip.css +0 -2
- package/dist/base/typography.css +0 -2
- package/dist/base/upload.css +0 -10
- package/dist/base/value-inputs.css +0 -14
- package/dist/buttons-CqXKWty3.js +0 -179
- package/dist/cards-C6Ulbkw7.js +0 -271
- package/dist/chart-nomhJ87z.js +0 -193
- package/dist/choice-inputs-OUDn0kQw.js +0 -680
- package/dist/combobox-C8oP92bT.js +0 -266
- package/dist/command-Bp3B6pUu.js +0 -143
- package/dist/comments-CAnDlyXO.js +0 -1438
- package/dist/components/admin/patterns/index.d.ts +0 -2
- package/dist/components/features/rich-text-editor/exec-command-engine.d.ts +0 -2
- package/dist/components/patterns/index.d.ts +0 -3
- package/dist/css/styles.css +0 -1
- package/dist/date-pickers-DOwIT-Nk.js +0 -661
- package/dist/display-B3Q17h5z.js +0 -645
- package/dist/dropdown-menu-TyNLCLML.js +0 -223
- package/dist/features/actions.css +0 -11
- package/dist/features/activities.css +0 -25
- package/dist/features/ai-chat.css +0 -14
- package/dist/features/async-preview.css +0 -10
- package/dist/features/combobox.css +0 -12
- package/dist/features/comments.css +0 -24
- package/dist/features/data-view.css +0 -31
- package/dist/features/event-calendar.css +0 -17
- package/dist/features/filters.css +0 -24
- package/dist/features/global-search.css +0 -19
- package/dist/features/kanban.css +0 -7
- package/dist/features/map.css +0 -15
- package/dist/features/media-library.css +0 -27
- package/dist/features/mentions.css +0 -17
- package/dist/features/overlays.css +0 -11
- package/dist/features/products.css +0 -29
- package/dist/features/resource-assignment.css +0 -14
- package/dist/features/resource.css +0 -15
- package/dist/features/rich-text-editor.css +0 -8
- package/dist/features/schema-form.css +0 -22
- package/dist/features/sync.css +0 -11
- package/dist/features/table.css +0 -20
- package/dist/features/theme-tweaker.css +0 -27
- package/dist/feedback-DRerHGuV.js +0 -469
- package/dist/forms-CPrGGif_.js +0 -242
- package/dist/forms-numeric-CPVsL7Vf.js +0 -569
- package/dist/index.css +0 -3
- package/dist/input-group-BYe0rhoB.js +0 -126
- package/dist/item-B3yQ26as.js +0 -146
- package/dist/layout/app-shell.css +0 -13
- package/dist/layout/auth.css +0 -14
- package/dist/layout/containers.css +0 -2
- package/dist/layout/header.css +0 -20
- package/dist/layout/navigation.css +0 -11
- package/dist/layout/page.css +0 -15
- package/dist/layout/settings.css +0 -16
- package/dist/layout/sidebar.css +0 -16
- package/dist/layout/workspace.css +0 -15
- package/dist/navigation-CsqTA16F.js +0 -614
- package/dist/navigation-DzxzPuwg.js +0 -202
- package/dist/overlay-WQOsLd69.js +0 -345
- package/dist/patterns/analytics.css +0 -15
- package/dist/patterns/onboarding.css +0 -11
- package/dist/patterns/timelines.css +0 -11
- package/dist/popover-DriLnIFc.js +0 -123
- package/dist/popover-menu-C2UCMAe7.js +0 -189
- package/dist/primitives.css +0 -3
- package/dist/repeaters-DuP1N0nw.js +0 -438
- package/dist/rich-text-editor-BQXFe9oN.js +0 -595
- package/dist/sidebar-D0N6ckJL.js +0 -412
- package/dist/skeleton-DGR9df28.js +0 -172
- package/dist/spinner-CUAVFecI.js +0 -52
- package/dist/styles/FACTORS.md +0 -36
- package/dist/styles/SCOPES.md +0 -86
- package/dist/styles/themes/default.css +0 -164
- package/dist/styles/theming/animation.css +0 -143
- package/dist/styles/theming/colors.css +0 -97
- package/dist/styles/theming/feedback.css +0 -17
- package/dist/styles/theming/field.css +0 -21
- package/dist/styles/theming/focus.css +0 -88
- package/dist/styles/theming/layers.css +0 -13
- package/dist/styles/theming/layout.css +0 -21
- package/dist/styles/theming/motion.css +0 -42
- package/dist/styles/theming/overlay.css +0 -52
- package/dist/styles/theming/sizing.css +0 -118
- package/dist/styles/theming/text.css +0 -30
- package/dist/styles/theming/typography.css +0 -26
- package/dist/styles/tokens/components.css +0 -22
- package/dist/styles/tokens/foundation.css +0 -80
- package/dist/styles/tokens/layout.css +0 -19
- package/dist/styles/tokens/palette.css +0 -88
- package/dist/styles/tokens/primitives.css +0 -18
- package/dist/styles/tokens/states.css +0 -77
- package/dist/table-BC4qqsUb.js +0 -180
- package/dist/table-BHDpjajL.js +0 -982
- package/dist/text-inputs-DF_lD7pA.js +0 -385
- package/dist/theming-D6KRU7hO.js +0 -104
- package/dist/toolbar-DWRywF0R.js +0 -68
- package/dist/tooltip-t1VQQ2tZ.js +0 -73
- package/dist/upload-B38YZeFJ.js +0 -938
- package/dist/value-inputs-Q4ymjXlV.js +0 -716
- package/src/styles/FACTORS.md +0 -36
- package/src/styles/SCOPES.md +0 -86
- /package/dist/components/{admin/patterns → blocks/admin}/access/admin.strings.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/access/credential-list.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/access/index.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/access/role-permissions.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/access/sensitive-action.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/account.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/address-lines.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/booking.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/cart.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/commerce.strings.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/commerce.types.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/format-amount.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/index.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/inventory-section.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/invoice.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/loyalty.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/order-customer.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/order-detail.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/order-line-item.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/order-transactions.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/order.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/seo-listing.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/seo-score.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/summary-panel.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/activity-heatmap.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/analytics.types.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/chart-card.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/format-metric-value.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/index.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/metric-bar.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/metric-comparison.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/metric-gradient.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/metric-grid.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/metric-micro-grid.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/metric-skeleton.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/metric-trend-chip.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/metric.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/time-ruler.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/onboarding/checklist.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/onboarding/index.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/onboarding/onboarding.strings.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/timelines/changelog-timeline.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/timelines/index.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/timelines/milestones-timeline.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/timelines/steps.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/timelines/timelines.strings.d.ts +0 -0
- /package/dist/styles/{theming/breakpoints.css → breakpoints.css} +0 -0
|
@@ -1,44 +1,46 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { d as
|
|
5
|
-
import { c as
|
|
6
|
-
import { g as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import { t as
|
|
24
|
-
import { t as
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
1
|
+
import "#core.css";
|
|
2
|
+
import { s as e } from "./typography-DmeR05Er.js";
|
|
3
|
+
import { t } from "./cx--CBrhWH0.js";
|
|
4
|
+
import { d as n } from "./ui-provider-DpzLUD12.js";
|
|
5
|
+
import { c as r, t as i } from "./buttons-BX2JfL5X.js";
|
|
6
|
+
import { g as a, l as o, r as s, t as c, u as l } from "./dropdown-menu-Br8kvjrF.js";
|
|
7
|
+
import { a as u, c as d, l as f, o as p, s as m, t as h, u as g } from "./overlay-BuQOl8aP.js";
|
|
8
|
+
import { t as _ } from "./strings-Co9_qArR.js";
|
|
9
|
+
import { B as v } from "./primitives-BskKlf35.js";
|
|
10
|
+
import { t as y } from "./badge-VlJVZjdm.js";
|
|
11
|
+
import { n as b } from "./feedback-D4qVsKlD.js";
|
|
12
|
+
import { s as x } from "./choice-inputs-NwRxvmZN.js";
|
|
13
|
+
import { l as S } from "./text-inputs-BboE77nZ.js";
|
|
14
|
+
import { a as C, i as w, o as T, r as E, s as D, t as O } from "./command-JjApYFds.js";
|
|
15
|
+
import { t as ee } from "./use-latest-CF0678ae.js";
|
|
16
|
+
import { a as k, o as A } from "./date-pickers-BwCwKIVM.js";
|
|
17
|
+
import { c as j, r as M, t as N } from "./popover-CA7SP_iz.js";
|
|
18
|
+
import { i as te, r as ne, t as re, u as ie } from "./item-M2pmpWXh.js";
|
|
19
|
+
import { n as P } from "./navigation-Bgu7Vc0M.js";
|
|
20
|
+
import { n as ae } from "./popover-menu-QXgQeWeG.js";
|
|
21
|
+
import { t as oe } from "./sheet-CJ1-OAla.js";
|
|
22
|
+
import { t as se } from "./use-debounce-yN5BxUpQ.js";
|
|
23
|
+
import { t as ce } from "./use-mobile-DwY2vtnf.js";
|
|
24
|
+
import { t as le } from "./spinner-Tc1QCnxM.js";
|
|
25
|
+
import { s as ue } from "./value-inputs-ng8aVJJZ.js";
|
|
26
|
+
import { t as F } from "./use-synced-state-DnZ4lW4g.js";
|
|
27
|
+
import { ArrowLeftIcon as de, CalendarIcon as fe, ChevronDownIcon as pe, ChevronRightIcon as me, ListFilterIcon as he, SearchIcon as ge, XIcon as _e } from "lucide-react";
|
|
28
|
+
import { Component as ve, createContext as ye, useCallback as I, useContext as be, useEffect as L, useId as xe, useLayoutEffect as Se, useMemo as R, useRef as z, useState as B } from "react";
|
|
29
|
+
import { Fragment as Ce, jsx as V, jsxs as H } from "react/jsx-runtime";
|
|
29
30
|
import { format as we, isValid as Te, parse as Ee } from "date-fns";
|
|
31
|
+
import "#css/filters.css";
|
|
30
32
|
//#region src/components/features/filters/filter-store.ts
|
|
31
|
-
var De =
|
|
33
|
+
var De = ye(void 0), Oe = ye(0);
|
|
32
34
|
function ke() {
|
|
33
|
-
return
|
|
35
|
+
return be(Oe);
|
|
34
36
|
}
|
|
35
37
|
function U() {
|
|
36
|
-
let e =
|
|
38
|
+
let e = be(De);
|
|
37
39
|
if (!e) throw Error("useFilters must be used inside <FilterProvider>.");
|
|
38
40
|
return e;
|
|
39
41
|
}
|
|
40
42
|
function W(e) {
|
|
41
|
-
let { isNavigating: t } = U(), [n, r] =
|
|
43
|
+
let { isNavigating: t } = U(), [n, r] = B(e), [i, a] = B(t);
|
|
42
44
|
return i !== t && (a(t), t && r(e)), [n, r];
|
|
43
45
|
}
|
|
44
46
|
var G = {
|
|
@@ -83,7 +85,7 @@ var G = {
|
|
|
83
85
|
errorBoundary: "filters__errorBoundary___mJQZT",
|
|
84
86
|
errorBoundaryHead: "filters__errorBoundaryHead___84GD1",
|
|
85
87
|
errorBoundaryDetail: "filters__errorBoundaryDetail___KL14X"
|
|
86
|
-
}, Ae = class extends
|
|
88
|
+
}, Ae = class extends ve {
|
|
87
89
|
state = { error: null };
|
|
88
90
|
static getDerivedStateFromError(e) {
|
|
89
91
|
return { error: e };
|
|
@@ -97,32 +99,33 @@ var G = {
|
|
|
97
99
|
}
|
|
98
100
|
retry = () => this.setState({ error: null });
|
|
99
101
|
render() {
|
|
100
|
-
let { children: n, fallback:
|
|
101
|
-
return this.state.error ?
|
|
102
|
-
|
|
102
|
+
let { children: n, fallback: i, filterKey: a, labels: o, className: s } = this.props;
|
|
103
|
+
return this.state.error ? i || /* @__PURE__ */ H("div", {
|
|
104
|
+
"data-tone": "destructive",
|
|
105
|
+
className: t("filter-error-boundary--component", G.errorBoundary, s),
|
|
103
106
|
children: [
|
|
104
107
|
/* @__PURE__ */ H("div", {
|
|
105
108
|
className: G.errorBoundaryHead,
|
|
106
|
-
children: [/* @__PURE__ */ V(
|
|
109
|
+
children: [/* @__PURE__ */ V(e, {
|
|
107
110
|
tag: "span",
|
|
108
111
|
type: "inherit",
|
|
109
112
|
weight: "semibold",
|
|
110
113
|
children: o.title
|
|
111
|
-
}), /* @__PURE__ */ V(
|
|
114
|
+
}), /* @__PURE__ */ V(r, {
|
|
112
115
|
type: "button",
|
|
113
116
|
tone: "destructive",
|
|
114
|
-
|
|
117
|
+
appearance: "ghost",
|
|
115
118
|
iconOnly: !0,
|
|
116
119
|
"aria-label": o.retry,
|
|
117
120
|
onClick: this.retry,
|
|
118
|
-
children: /* @__PURE__ */ V(
|
|
121
|
+
children: /* @__PURE__ */ V(_e, {})
|
|
119
122
|
})]
|
|
120
123
|
}),
|
|
121
|
-
/* @__PURE__ */ V(
|
|
124
|
+
/* @__PURE__ */ V(e, {
|
|
122
125
|
type: "inherit",
|
|
123
126
|
children: o.describe(a)
|
|
124
127
|
}),
|
|
125
|
-
/* @__PURE__ */ V(
|
|
128
|
+
/* @__PURE__ */ V(v, {
|
|
126
129
|
size: "xs",
|
|
127
130
|
type: "inherit",
|
|
128
131
|
className: G.errorBoundaryDetail,
|
|
@@ -133,7 +136,7 @@ var G = {
|
|
|
133
136
|
}
|
|
134
137
|
};
|
|
135
138
|
function je(e) {
|
|
136
|
-
let { strings: t, reportError: n } = U(), r =
|
|
139
|
+
let { strings: t, reportError: n } = U(), r = R(() => ({
|
|
137
140
|
title: t.error.title,
|
|
138
141
|
describe: t.error.describe,
|
|
139
142
|
retry: t.error.retry
|
|
@@ -177,9 +180,9 @@ function Me() {
|
|
|
177
180
|
}
|
|
178
181
|
};
|
|
179
182
|
}
|
|
180
|
-
var Ne =
|
|
183
|
+
var Ne = ye(null);
|
|
181
184
|
function Pe() {
|
|
182
|
-
return
|
|
185
|
+
return be(Ne);
|
|
183
186
|
}
|
|
184
187
|
//#endregion
|
|
185
188
|
//#region src/components/features/filters/filters.types.ts
|
|
@@ -402,36 +405,36 @@ function Ue(e, t, n, r) {
|
|
|
402
405
|
//#endregion
|
|
403
406
|
//#region src/components/features/filters/filter-context.tsx
|
|
404
407
|
function We({ children: e, filters: t, activeFilters: n, onFilterChange: r, navigating: i = !1, strings: a, onError: o, cache: s }) {
|
|
405
|
-
let [c, l] =
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
}, [t]),
|
|
409
|
-
|
|
408
|
+
let [c, l] = B(0), u = R(() => _(X, a), [a]), d = z(t), f = z(r), p = ee(o);
|
|
409
|
+
L(() => {
|
|
410
|
+
d.current = t;
|
|
411
|
+
}, [t]), L(() => {
|
|
412
|
+
f.current = r;
|
|
410
413
|
}, [r]);
|
|
411
|
-
let [
|
|
412
|
-
|
|
413
|
-
if (s === void 0) return () =>
|
|
414
|
-
}, [s,
|
|
415
|
-
let [,
|
|
416
|
-
|
|
417
|
-
}, [
|
|
414
|
+
let [m] = B(Me), h = s ?? m;
|
|
415
|
+
L(() => {
|
|
416
|
+
if (s === void 0) return () => m.clear();
|
|
417
|
+
}, [s, m]);
|
|
418
|
+
let [, g] = B(0), v = I((e, t) => {
|
|
419
|
+
p.current?.(e, t);
|
|
420
|
+
}, [p]), y = I((e) => f.current([...n, e]), [n]), b = I((e) => f.current(n.filter((t) => t.id !== e && t.key !== e)), [n]), x = I((e, t) => f.current(n.map((n) => n.id === e || n.key === e ? {
|
|
418
421
|
...n,
|
|
419
422
|
...t
|
|
420
|
-
} : n)), [n]),
|
|
421
|
-
l((e) => e + 1),
|
|
422
|
-
}, []),
|
|
423
|
-
l((e) => e + 1),
|
|
424
|
-
}, []),
|
|
423
|
+
} : n)), [n]), S = I(() => {
|
|
424
|
+
l((e) => e + 1), f.current([]);
|
|
425
|
+
}, []), C = I((e) => {
|
|
426
|
+
l((e) => e + 1), f.current(e);
|
|
427
|
+
}, []), w = I((e) => d.current.find((t) => t.key === e), []), T = I((e) => n.find((t) => t.key === e)?.value ?? [], [n]), E = I((e, t) => {
|
|
425
428
|
let r = n.find((t) => t.key === e);
|
|
426
429
|
if (t.length === 0) {
|
|
427
|
-
r &&
|
|
430
|
+
r && b(e);
|
|
428
431
|
return;
|
|
429
432
|
}
|
|
430
433
|
if (r) {
|
|
431
|
-
|
|
434
|
+
x(e, { value: t });
|
|
432
435
|
return;
|
|
433
436
|
}
|
|
434
|
-
let i =
|
|
437
|
+
let i = d.current.find((t) => t.key === e);
|
|
435
438
|
y({
|
|
436
439
|
id: e,
|
|
437
440
|
key: e,
|
|
@@ -441,17 +444,17 @@ function We({ children: e, filters: t, activeFilters: n, onFilterChange: r, navi
|
|
|
441
444
|
}, [
|
|
442
445
|
n,
|
|
443
446
|
y,
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
]),
|
|
447
|
+
b,
|
|
448
|
+
x
|
|
449
|
+
]), D = I((e) => n.some((t) => t.key === e && t.value.length > 0), [n]), O = I((e) => {
|
|
447
450
|
let t = n.find((t) => t.key === e);
|
|
448
451
|
if (t) return t.operator;
|
|
449
|
-
let r =
|
|
452
|
+
let r = d.current.find((t) => t.key === e);
|
|
450
453
|
return r ? r.operator ?? r.operators?.[0]?.value ?? Y(r.type) : "equals";
|
|
451
|
-
}, [n]),
|
|
452
|
-
n.some((t) => t.key === e) &&
|
|
453
|
-
}, [n,
|
|
454
|
-
let n =
|
|
454
|
+
}, [n]), k = I((e, t) => {
|
|
455
|
+
n.some((t) => t.key === e) && x(e, { operator: t });
|
|
456
|
+
}, [n, x]), A = I((e, t) => {
|
|
457
|
+
let n = d.current.find((t) => t.key === e);
|
|
455
458
|
if (!n) return !1;
|
|
456
459
|
try {
|
|
457
460
|
return He(n, t, u);
|
|
@@ -461,57 +464,57 @@ function We({ children: e, filters: t, activeFilters: n, onFilterChange: r, navi
|
|
|
461
464
|
filterKey: e
|
|
462
465
|
}), u.validation.invalidFormat;
|
|
463
466
|
}
|
|
464
|
-
}, [u, v]),
|
|
465
|
-
|
|
466
|
-
}, [
|
|
467
|
+
}, [u, v]), j = I((e) => d.current.filter((t) => t.dependencies?.some((t) => t.key === e)), []), M = I((e, t) => {
|
|
468
|
+
h.rememberLabels(e, t) && g((e) => e + 1);
|
|
469
|
+
}, [h]), N = I((e, t) => h.getLabel(e, t)?.label, [h]), te = R(() => ({
|
|
467
470
|
activeFilters: n,
|
|
468
471
|
filters: t,
|
|
469
472
|
addFilter: y,
|
|
470
|
-
removeFilter:
|
|
471
|
-
updateFilter:
|
|
472
|
-
clearFilters:
|
|
473
|
-
replaceFilters:
|
|
474
|
-
getFilterByKey:
|
|
475
|
-
getFilterValue:
|
|
476
|
-
setFilterValue:
|
|
477
|
-
isFilterActive:
|
|
478
|
-
getFilterOperator:
|
|
479
|
-
setFilterOperator:
|
|
480
|
-
validateFilter:
|
|
481
|
-
getDependentFilters:
|
|
473
|
+
removeFilter: b,
|
|
474
|
+
updateFilter: x,
|
|
475
|
+
clearFilters: S,
|
|
476
|
+
replaceFilters: C,
|
|
477
|
+
getFilterByKey: w,
|
|
478
|
+
getFilterValue: T,
|
|
479
|
+
setFilterValue: E,
|
|
480
|
+
isFilterActive: D,
|
|
481
|
+
getFilterOperator: O,
|
|
482
|
+
setFilterOperator: k,
|
|
483
|
+
validateFilter: A,
|
|
484
|
+
getDependentFilters: j,
|
|
482
485
|
isNavigating: i,
|
|
483
486
|
strings: u,
|
|
484
|
-
cacheAsyncOptions:
|
|
485
|
-
getAsyncOptionLabel:
|
|
487
|
+
cacheAsyncOptions: M,
|
|
488
|
+
getAsyncOptionLabel: N,
|
|
486
489
|
reportError: v
|
|
487
490
|
}), [
|
|
488
491
|
n,
|
|
489
492
|
y,
|
|
490
|
-
|
|
491
|
-
|
|
493
|
+
M,
|
|
494
|
+
S,
|
|
492
495
|
u,
|
|
493
496
|
t,
|
|
494
|
-
|
|
495
|
-
|
|
497
|
+
N,
|
|
498
|
+
j,
|
|
499
|
+
w,
|
|
500
|
+
O,
|
|
496
501
|
T,
|
|
502
|
+
D,
|
|
503
|
+
i,
|
|
504
|
+
b,
|
|
505
|
+
C,
|
|
506
|
+
v,
|
|
497
507
|
k,
|
|
498
508
|
E,
|
|
499
|
-
O,
|
|
500
|
-
i,
|
|
501
509
|
x,
|
|
502
|
-
|
|
503
|
-
v,
|
|
504
|
-
A,
|
|
505
|
-
D,
|
|
506
|
-
S,
|
|
507
|
-
j
|
|
510
|
+
A
|
|
508
511
|
]);
|
|
509
512
|
return /* @__PURE__ */ V(Ne.Provider, {
|
|
510
|
-
value:
|
|
513
|
+
value: h,
|
|
511
514
|
children: /* @__PURE__ */ V(Oe.Provider, {
|
|
512
515
|
value: c,
|
|
513
516
|
children: /* @__PURE__ */ V(De.Provider, {
|
|
514
|
-
value:
|
|
517
|
+
value: te,
|
|
515
518
|
children: e
|
|
516
519
|
})
|
|
517
520
|
})
|
|
@@ -520,86 +523,86 @@ function We({ children: e, filters: t, activeFilters: n, onFilterChange: r, navi
|
|
|
520
523
|
//#endregion
|
|
521
524
|
//#region src/components/features/filters/use-async-options.ts
|
|
522
525
|
function Ge(e, t, n, r = {}) {
|
|
523
|
-
let i = e.asyncConfig, a =
|
|
524
|
-
|
|
525
|
-
if (!
|
|
526
|
-
let t = ++
|
|
527
|
-
return
|
|
526
|
+
let i = e.asyncConfig, a = ee(r.onError), o = Pe(), [s] = B(Me), c = o ?? s, l = (se(t, i?.debounceMs ?? e.delay ?? 300) ?? "").trim(), u = i?.limit ?? 10, d = i?.minQueryLength ?? 0, f = i?.preload ?? !0, p = i?.staleTime ?? 6e4, m = l.length > 0 && l.length < d, h = n && !!i && !m && l.length >= d && (l.length > 0 || f), g = `${e.key}::${l}`, [_, v] = B(0), y = c.getOptions(g), [b, x] = B(y ?? []), [S, C] = B(!1), [w, T] = B(!1), E = y ?? b, D = S && h && !!i && !y, O = w && !y, k = z(0);
|
|
527
|
+
L(() => {
|
|
528
|
+
if (!h || !i || y) return;
|
|
529
|
+
let t = ++k.current, n = new AbortController();
|
|
530
|
+
return C(!0), T(!1), i.fetcher({
|
|
528
531
|
query: l,
|
|
529
532
|
limit: u,
|
|
530
533
|
signal: n.signal
|
|
531
534
|
}).then((e) => {
|
|
532
|
-
if (t !==
|
|
535
|
+
if (t !== k.current) return;
|
|
533
536
|
let n = e.map((e) => i.mapToOption(e));
|
|
534
|
-
c.setOptions(
|
|
537
|
+
c.setOptions(g, n, p), x(n);
|
|
535
538
|
}).catch((n) => {
|
|
536
|
-
t ===
|
|
539
|
+
t === k.current && (n instanceof Error && n.name === "AbortError" || (T(!0), x([]), a.current?.(n, {
|
|
537
540
|
phase: "fetch-options",
|
|
538
541
|
filterKey: e.key
|
|
539
542
|
})));
|
|
540
543
|
}).finally(() => {
|
|
541
|
-
t ===
|
|
544
|
+
t === k.current && C(!1);
|
|
542
545
|
}), () => n.abort();
|
|
543
546
|
}, [
|
|
544
|
-
y,
|
|
545
|
-
c,
|
|
546
|
-
x,
|
|
547
547
|
_,
|
|
548
|
+
c,
|
|
549
|
+
y,
|
|
550
|
+
g,
|
|
548
551
|
i,
|
|
549
552
|
e.key,
|
|
550
553
|
u,
|
|
551
554
|
l,
|
|
552
|
-
|
|
553
|
-
|
|
555
|
+
h,
|
|
556
|
+
p,
|
|
554
557
|
a
|
|
555
558
|
]);
|
|
556
|
-
let
|
|
557
|
-
c.deleteOptions(
|
|
558
|
-
}, [c,
|
|
559
|
+
let A = I(() => {
|
|
560
|
+
c.deleteOptions(g), v((e) => e + 1);
|
|
561
|
+
}, [c, g]);
|
|
559
562
|
return {
|
|
560
|
-
options:
|
|
561
|
-
isLoading:
|
|
562
|
-
isFetching:
|
|
563
|
-
isError:
|
|
564
|
-
refetch:
|
|
565
|
-
isBelowMinQuery:
|
|
566
|
-
minQueryLength:
|
|
563
|
+
options: E,
|
|
564
|
+
isLoading: D && E.length === 0,
|
|
565
|
+
isFetching: D,
|
|
566
|
+
isError: O,
|
|
567
|
+
refetch: A,
|
|
568
|
+
isBelowMinQuery: m,
|
|
569
|
+
minQueryLength: d
|
|
567
570
|
};
|
|
568
571
|
}
|
|
569
572
|
//#endregion
|
|
570
573
|
//#region src/components/features/filters/filter-editors.tsx
|
|
571
574
|
var Ke = "yyyy-MM-dd";
|
|
572
|
-
function Z({ filter:
|
|
575
|
+
function Z({ filter: t, showBack: n, onBack: i }) {
|
|
573
576
|
let { strings: a } = U();
|
|
574
577
|
return /* @__PURE__ */ H("div", {
|
|
575
578
|
className: G.editorHeader,
|
|
576
|
-
children: [n && /* @__PURE__ */ V(
|
|
579
|
+
children: [n && /* @__PURE__ */ V(r, {
|
|
577
580
|
type: "button",
|
|
578
581
|
tone: "neutral",
|
|
579
|
-
|
|
582
|
+
appearance: "ghost",
|
|
580
583
|
iconOnly: !0,
|
|
581
|
-
onClick:
|
|
584
|
+
onClick: i,
|
|
582
585
|
"aria-label": a.backToFilters,
|
|
583
|
-
children: /* @__PURE__ */ V(
|
|
584
|
-
}), /* @__PURE__ */ V(
|
|
586
|
+
children: /* @__PURE__ */ V(de, {})
|
|
587
|
+
}), /* @__PURE__ */ V(e, {
|
|
585
588
|
tag: "span",
|
|
586
589
|
weight: "semibold",
|
|
587
590
|
truncate: !0,
|
|
588
|
-
children:
|
|
591
|
+
children: t.label
|
|
589
592
|
})]
|
|
590
593
|
});
|
|
591
594
|
}
|
|
592
|
-
function qe({ count:
|
|
595
|
+
function qe({ count: t, filter: n, onApply: i }) {
|
|
593
596
|
let { strings: a } = U();
|
|
594
597
|
return /* @__PURE__ */ H("div", {
|
|
595
598
|
className: G.editorFooter,
|
|
596
|
-
children: [/* @__PURE__ */ V(
|
|
599
|
+
children: [/* @__PURE__ */ V(e, {
|
|
597
600
|
size: "xs",
|
|
598
601
|
type: "secondary",
|
|
599
|
-
children: a.selected(
|
|
600
|
-
}), /* @__PURE__ */ V(
|
|
602
|
+
children: a.selected(t, ((t === 1 ? n.label : n.pluralLabel ?? n.label) ?? "").toLowerCase())
|
|
603
|
+
}), /* @__PURE__ */ V(r, {
|
|
601
604
|
type: "button",
|
|
602
|
-
onClick:
|
|
605
|
+
onClick: i,
|
|
603
606
|
children: a.confirm
|
|
604
607
|
})]
|
|
605
608
|
});
|
|
@@ -610,28 +613,28 @@ function Je(e, t) {
|
|
|
610
613
|
function Ye(e, t) {
|
|
611
614
|
return JSON.stringify([...e].sort()) === JSON.stringify([...t].sort());
|
|
612
615
|
}
|
|
613
|
-
function Xe({ filter:
|
|
614
|
-
let { strings: d, reportError: f } = U(), [p, m] =
|
|
616
|
+
function Xe({ filter: e, value: n, onValueChange: r, onBack: i, onClose: a, triggerSource: o = "chip", hook: s, options: c, multiple: l, source: u }) {
|
|
617
|
+
let { strings: d, reportError: f } = U(), [p, m] = F(n), h = !Ye(p, n), g = (t) => {
|
|
615
618
|
try {
|
|
616
|
-
r(
|
|
617
|
-
} catch (
|
|
618
|
-
f(
|
|
619
|
+
r(t), a();
|
|
620
|
+
} catch (t) {
|
|
621
|
+
f(t, {
|
|
619
622
|
phase: "apply",
|
|
620
|
-
filterKey:
|
|
623
|
+
filterKey: e.key
|
|
621
624
|
});
|
|
622
625
|
}
|
|
623
626
|
}, _ = !u.onSearchChange;
|
|
624
627
|
return /* @__PURE__ */ H("div", {
|
|
625
|
-
className:
|
|
628
|
+
className: t(s, G.editor),
|
|
626
629
|
children: [
|
|
627
630
|
/* @__PURE__ */ V(Z, {
|
|
628
|
-
filter:
|
|
631
|
+
filter: e,
|
|
629
632
|
showBack: o === "toolbar",
|
|
630
633
|
onBack: i
|
|
631
634
|
}),
|
|
632
|
-
/* @__PURE__ */ V(
|
|
635
|
+
/* @__PURE__ */ V(ae, {
|
|
633
636
|
...u,
|
|
634
|
-
label:
|
|
637
|
+
label: e.label,
|
|
635
638
|
items: c.map((e) => ({
|
|
636
639
|
value: e.value,
|
|
637
640
|
label: e.label,
|
|
@@ -641,15 +644,15 @@ function Xe({ filter: t, value: n, onValueChange: r, onBack: i, onClose: a, trig
|
|
|
641
644
|
selected: p.includes(e.value),
|
|
642
645
|
searchValue: _ ? e.label : void 0
|
|
643
646
|
})),
|
|
644
|
-
onSelect: ({ value:
|
|
647
|
+
onSelect: ({ value: t }) => {
|
|
645
648
|
if (!l) {
|
|
646
|
-
m([
|
|
649
|
+
m([t]), e.closeOnSelect && g([t]);
|
|
647
650
|
return;
|
|
648
651
|
}
|
|
649
|
-
m((
|
|
652
|
+
m((e) => Je(e, t));
|
|
650
653
|
},
|
|
651
654
|
strings: {
|
|
652
|
-
searchPlaceholder: d.searchPlaceholder(
|
|
655
|
+
searchPlaceholder: d.searchPlaceholder(e.label.toLowerCase()),
|
|
653
656
|
empty: d.noOptionsFound,
|
|
654
657
|
loading: d.searching,
|
|
655
658
|
error: d.fetchError,
|
|
@@ -659,7 +662,7 @@ function Xe({ filter: t, value: n, onValueChange: r, onBack: i, onClose: a, trig
|
|
|
659
662
|
}),
|
|
660
663
|
h && /* @__PURE__ */ V(qe, {
|
|
661
664
|
count: p.length,
|
|
662
|
-
filter:
|
|
665
|
+
filter: e,
|
|
663
666
|
onApply: () => g(p)
|
|
664
667
|
})
|
|
665
668
|
]
|
|
@@ -676,8 +679,8 @@ function Ze(e) {
|
|
|
676
679
|
});
|
|
677
680
|
}
|
|
678
681
|
function Qe(e) {
|
|
679
|
-
let { filter: t } = e, { cacheAsyncOptions: n, reportError: r } = U(), [i, a] =
|
|
680
|
-
return
|
|
682
|
+
let { filter: t } = e, { cacheAsyncOptions: n, reportError: r } = U(), [i, a] = B(""), o = Ge(t, i, !0, { onError: r });
|
|
683
|
+
return L(() => {
|
|
681
684
|
o.options.length > 0 && n(t.key, o.options);
|
|
682
685
|
}, [
|
|
683
686
|
o.options,
|
|
@@ -698,21 +701,21 @@ function Qe(e) {
|
|
|
698
701
|
}
|
|
699
702
|
});
|
|
700
703
|
}
|
|
701
|
-
function $e({ filter:
|
|
702
|
-
let o =
|
|
704
|
+
function $e({ filter: e, value: n, onValueChange: r, onBack: i, triggerSource: a = "chip" }) {
|
|
705
|
+
let o = ce(), { isNavigating: s } = U(), c = e.dateFormat?.param ?? Ke, l = (e) => {
|
|
703
706
|
if (!e) return;
|
|
704
707
|
let t = Ee(e, c, /* @__PURE__ */ new Date());
|
|
705
708
|
return Te(t) ? t : void 0;
|
|
706
|
-
}, u = (e) => e && Te(e) ? we(e, c) : void 0, d =
|
|
709
|
+
}, u = (e) => e && Te(e) ? we(e, c) : void 0, d = e.operator === q.BETWEEN;
|
|
707
710
|
return /* @__PURE__ */ H("div", {
|
|
708
|
-
className:
|
|
711
|
+
className: t("date-filter-editor--component", G.editor),
|
|
709
712
|
children: [/* @__PURE__ */ V(Z, {
|
|
710
|
-
filter:
|
|
713
|
+
filter: e,
|
|
711
714
|
showBack: a === "toolbar",
|
|
712
715
|
onBack: i
|
|
713
716
|
}), /* @__PURE__ */ V("div", {
|
|
714
717
|
className: G.editorBody,
|
|
715
|
-
children: d ? /* @__PURE__ */ V(
|
|
718
|
+
children: d ? /* @__PURE__ */ V(k, {
|
|
716
719
|
disabled: s,
|
|
717
720
|
numberOfMonths: o ? 1 : 2,
|
|
718
721
|
value: {
|
|
@@ -722,7 +725,7 @@ function $e({ filter: t, value: n, onValueChange: r, onBack: i, triggerSource: a
|
|
|
722
725
|
onValueChange: (e) => {
|
|
723
726
|
r([u(e?.from), u(e?.to)].filter((e) => !!e));
|
|
724
727
|
}
|
|
725
|
-
}) : /* @__PURE__ */ V(
|
|
728
|
+
}) : /* @__PURE__ */ V(A, {
|
|
726
729
|
disabled: s,
|
|
727
730
|
value: l(n[0]),
|
|
728
731
|
onValueChange: (e) => {
|
|
@@ -733,28 +736,28 @@ function $e({ filter: t, value: n, onValueChange: r, onBack: i, triggerSource: a
|
|
|
733
736
|
})]
|
|
734
737
|
});
|
|
735
738
|
}
|
|
736
|
-
function et({ filter:
|
|
737
|
-
let { strings: s } = U(), [c, l] =
|
|
739
|
+
function et({ filter: e, value: n, onValueChange: r, onBack: i, onClose: a, triggerSource: o = "chip" }) {
|
|
740
|
+
let { strings: s } = U(), [c, l] = F(n), u = !Ye(c, n);
|
|
738
741
|
return /* @__PURE__ */ H("div", {
|
|
739
|
-
className:
|
|
742
|
+
className: t("tags-filter-editor--component", G.editor),
|
|
740
743
|
children: [
|
|
741
744
|
/* @__PURE__ */ V(Z, {
|
|
742
|
-
filter:
|
|
745
|
+
filter: e,
|
|
743
746
|
showBack: o === "toolbar",
|
|
744
747
|
onBack: i
|
|
745
748
|
}),
|
|
746
749
|
/* @__PURE__ */ V("div", {
|
|
747
750
|
className: G.editorBody,
|
|
748
|
-
children: /* @__PURE__ */ V(
|
|
751
|
+
children: /* @__PURE__ */ V(ue, {
|
|
749
752
|
value: c,
|
|
750
753
|
onValueChange: l,
|
|
751
|
-
placeholder:
|
|
752
|
-
maxTags:
|
|
754
|
+
placeholder: e.placeholder ?? s.enterTags,
|
|
755
|
+
maxTags: e.maxSelected
|
|
753
756
|
})
|
|
754
757
|
}),
|
|
755
758
|
u && /* @__PURE__ */ V(qe, {
|
|
756
759
|
count: c.length,
|
|
757
|
-
filter:
|
|
760
|
+
filter: e,
|
|
758
761
|
onApply: () => {
|
|
759
762
|
r(c), a();
|
|
760
763
|
}
|
|
@@ -762,8 +765,8 @@ function et({ filter: t, value: n, onValueChange: r, onBack: i, onClose: a, trig
|
|
|
762
765
|
]
|
|
763
766
|
});
|
|
764
767
|
}
|
|
765
|
-
function tt({ filter:
|
|
766
|
-
let { strings: s } = U(), [c, l] =
|
|
768
|
+
function tt({ filter: e, value: n, onValueChange: r, onBack: i, onClose: a, triggerSource: o = "chip" }) {
|
|
769
|
+
let { strings: s } = U(), [c, l] = F(n), [u, d] = [c[0] ?? "", c[1] ?? ""], f = (e) => l([e, c[1] ?? ""]), p = (e) => l([c[0] ?? "", e]), m = e.operator === q.BETWEEN, h = R(() => (m ? [u, d] : [u]).filter((e) => e.trim().length > 0), [
|
|
767
770
|
m,
|
|
768
771
|
d,
|
|
769
772
|
u
|
|
@@ -772,19 +775,19 @@ function tt({ filter: t, value: n, onValueChange: r, onBack: i, onClose: a, trig
|
|
|
772
775
|
className: G.editor,
|
|
773
776
|
children: [
|
|
774
777
|
/* @__PURE__ */ V(Z, {
|
|
775
|
-
filter:
|
|
778
|
+
filter: e,
|
|
776
779
|
showBack: o === "toolbar",
|
|
777
780
|
onBack: i
|
|
778
781
|
}),
|
|
779
782
|
/* @__PURE__ */ H("div", {
|
|
780
|
-
className:
|
|
781
|
-
children: [/* @__PURE__ */ V(
|
|
783
|
+
className: t("range-filter-editor--component", G.editorBody, G.rangeBody),
|
|
784
|
+
children: [/* @__PURE__ */ V(S, {
|
|
782
785
|
type: "number",
|
|
783
786
|
value: u,
|
|
784
787
|
onChange: (e) => f(e.target.value),
|
|
785
788
|
placeholder: s.min,
|
|
786
789
|
"aria-label": s.min
|
|
787
|
-
}), m && /* @__PURE__ */ V(
|
|
790
|
+
}), m && /* @__PURE__ */ V(S, {
|
|
788
791
|
type: "number",
|
|
789
792
|
value: d,
|
|
790
793
|
onChange: (e) => p(e.target.value),
|
|
@@ -794,7 +797,7 @@ function tt({ filter: t, value: n, onValueChange: r, onBack: i, onClose: a, trig
|
|
|
794
797
|
}),
|
|
795
798
|
g && /* @__PURE__ */ V(qe, {
|
|
796
799
|
count: h.length,
|
|
797
|
-
filter:
|
|
800
|
+
filter: e,
|
|
798
801
|
onApply: () => {
|
|
799
802
|
r(h), a();
|
|
800
803
|
}
|
|
@@ -820,43 +823,43 @@ function Q(e) {
|
|
|
820
823
|
}
|
|
821
824
|
//#endregion
|
|
822
825
|
//#region src/components/features/filters/filter-operator-select.tsx
|
|
823
|
-
function nt({ operator:
|
|
824
|
-
let { strings: i, isNavigating:
|
|
825
|
-
return n.length <= 1 ? /* @__PURE__ */ V(
|
|
826
|
+
function nt({ operator: t, operators: n, onOperatorChange: r }) {
|
|
827
|
+
let { strings: i, isNavigating: u } = U(), [d, f] = W(!1), p = n.find((e) => e.value === t) ?? n[0];
|
|
828
|
+
return n.length <= 1 ? /* @__PURE__ */ V(e, {
|
|
826
829
|
tag: "span",
|
|
827
830
|
type: "secondary",
|
|
828
831
|
className: G.operatorStatic,
|
|
829
832
|
children: p?.label
|
|
830
|
-
}) : /* @__PURE__ */ H(
|
|
831
|
-
open: d && !
|
|
833
|
+
}) : /* @__PURE__ */ H(c, {
|
|
834
|
+
open: d && !u,
|
|
832
835
|
onOpenChange: f,
|
|
833
|
-
children: [/* @__PURE__ */ V(
|
|
834
|
-
disabled:
|
|
835
|
-
render: (
|
|
836
|
-
...
|
|
836
|
+
children: [/* @__PURE__ */ V(a, {
|
|
837
|
+
disabled: u,
|
|
838
|
+
render: (t) => /* @__PURE__ */ H("button", {
|
|
839
|
+
...t,
|
|
837
840
|
type: "button",
|
|
838
841
|
"aria-label": i.operator,
|
|
839
842
|
className: G.segment,
|
|
840
|
-
onClick: (
|
|
841
|
-
|
|
843
|
+
onClick: (e) => {
|
|
844
|
+
e.stopPropagation(), t.onClick?.(e);
|
|
842
845
|
},
|
|
843
|
-
children: [/* @__PURE__ */ V(
|
|
846
|
+
children: [/* @__PURE__ */ V(e, {
|
|
844
847
|
tag: "span",
|
|
845
848
|
type: "secondary",
|
|
846
849
|
children: p?.label
|
|
847
|
-
}), /* @__PURE__ */ V(
|
|
850
|
+
}), /* @__PURE__ */ V(pe, {
|
|
848
851
|
"aria-hidden": !0,
|
|
849
852
|
className: G.segmentGlyph
|
|
850
853
|
})]
|
|
851
854
|
})
|
|
852
|
-
}), /* @__PURE__ */ V(
|
|
855
|
+
}), /* @__PURE__ */ V(s, {
|
|
853
856
|
align: "start",
|
|
854
|
-
children: /* @__PURE__ */ V(
|
|
855
|
-
value:
|
|
857
|
+
children: /* @__PURE__ */ V(o, {
|
|
858
|
+
value: t,
|
|
856
859
|
onValueChange: (e) => {
|
|
857
860
|
r(e), f(!1);
|
|
858
861
|
},
|
|
859
|
-
children: n.map((e) => /* @__PURE__ */ V(
|
|
862
|
+
children: n.map((e) => /* @__PURE__ */ V(l, {
|
|
860
863
|
value: e.value,
|
|
861
864
|
children: e.label
|
|
862
865
|
}, e.value))
|
|
@@ -868,7 +871,7 @@ function nt({ operator: e, operators: n, onOperatorChange: r }) {
|
|
|
868
871
|
//#region src/components/features/filters/filter-value-display.tsx
|
|
869
872
|
function rt({ filter: n, value: r, className: i }) {
|
|
870
873
|
let { strings: a, getAsyncOptionLabel: o } = U(), s = Ue(n, r, a, (e) => o(n.key, e));
|
|
871
|
-
if (r.length === 0) return /* @__PURE__ */ V(
|
|
874
|
+
if (r.length === 0) return /* @__PURE__ */ V(e, {
|
|
872
875
|
tag: "span",
|
|
873
876
|
type: "secondary",
|
|
874
877
|
truncate: !0,
|
|
@@ -877,9 +880,9 @@ function rt({ filter: n, value: r, className: i }) {
|
|
|
877
880
|
});
|
|
878
881
|
let c = r.slice(0, 2).map((e) => Ve(n, e)?.icon).filter(Boolean);
|
|
879
882
|
return /* @__PURE__ */ H("span", {
|
|
880
|
-
className:
|
|
883
|
+
className: t("filter-value-display--component", G.valueDisplay, i),
|
|
881
884
|
children: [
|
|
882
|
-
n.type === K.DATE && /* @__PURE__ */ V(
|
|
885
|
+
n.type === K.DATE && /* @__PURE__ */ V(fe, {
|
|
883
886
|
"aria-hidden": !0,
|
|
884
887
|
className: G.valueGlyph
|
|
885
888
|
}),
|
|
@@ -890,7 +893,7 @@ function rt({ filter: n, value: r, className: i }) {
|
|
|
890
893
|
children: e
|
|
891
894
|
}, t)), r.length > 2 && /* @__PURE__ */ V("span", {
|
|
892
895
|
className: G.valueIconCount,
|
|
893
|
-
children: /* @__PURE__ */ H(
|
|
896
|
+
children: /* @__PURE__ */ H(e, {
|
|
894
897
|
tag: "span",
|
|
895
898
|
size: "xs",
|
|
896
899
|
weight: "medium",
|
|
@@ -899,7 +902,7 @@ function rt({ filter: n, value: r, className: i }) {
|
|
|
899
902
|
})
|
|
900
903
|
})]
|
|
901
904
|
}),
|
|
902
|
-
/* @__PURE__ */ V(
|
|
905
|
+
/* @__PURE__ */ V(e, {
|
|
903
906
|
tag: "span",
|
|
904
907
|
weight: "medium",
|
|
905
908
|
truncate: !0,
|
|
@@ -911,8 +914,8 @@ function rt({ filter: n, value: r, className: i }) {
|
|
|
911
914
|
//#endregion
|
|
912
915
|
//#region src/components/features/filters/filter-pill.tsx
|
|
913
916
|
function it({ filter: n, value: r, active: i, operator: a, operators: o, onOperatorChange: s, onValueChange: c, onClear: l, className: u }) {
|
|
914
|
-
let { strings: d, isNavigating: f } = U(), [p, m] = W(!1), h =
|
|
915
|
-
return /* @__PURE__ */ H(
|
|
917
|
+
let { strings: d, isNavigating: f } = U(), [p, m] = W(!1), h = z(!1);
|
|
918
|
+
return /* @__PURE__ */ H(N, {
|
|
916
919
|
open: p && !f,
|
|
917
920
|
onOpenChange: (e) => {
|
|
918
921
|
e && h.current || m(e);
|
|
@@ -921,9 +924,9 @@ function it({ filter: n, value: r, active: i, operator: a, operators: o, onOpera
|
|
|
921
924
|
role: "group",
|
|
922
925
|
"aria-label": n.label,
|
|
923
926
|
"data-active": i || void 0,
|
|
924
|
-
className:
|
|
927
|
+
className: t("filter-pill--component", G.pill, n.displayConfig?.className, u),
|
|
925
928
|
children: [
|
|
926
|
-
/* @__PURE__ */ V(
|
|
929
|
+
/* @__PURE__ */ V(j, {
|
|
927
930
|
render: /* @__PURE__ */ V("span", {}),
|
|
928
931
|
nativeButton: !1,
|
|
929
932
|
disabled: f,
|
|
@@ -941,7 +944,7 @@ function it({ filter: n, value: r, active: i, operator: a, operators: o, onOpera
|
|
|
941
944
|
children: [!!n.icon && /* @__PURE__ */ V("span", {
|
|
942
945
|
className: G.pillIcon,
|
|
943
946
|
children: n.icon
|
|
944
|
-
}), /* @__PURE__ */ V(
|
|
947
|
+
}), /* @__PURE__ */ V(e, {
|
|
945
948
|
tag: "span",
|
|
946
949
|
weight: "semibold",
|
|
947
950
|
children: n.label
|
|
@@ -967,7 +970,7 @@ function it({ filter: n, value: r, active: i, operator: a, operators: o, onOpera
|
|
|
967
970
|
/* @__PURE__ */ V("button", {
|
|
968
971
|
type: "button",
|
|
969
972
|
disabled: f,
|
|
970
|
-
className:
|
|
973
|
+
className: t(G.segment, G.pillValue),
|
|
971
974
|
"aria-label": `${d.edit}: ${n.label}`,
|
|
972
975
|
onClick: () => {
|
|
973
976
|
h.current || m(!0);
|
|
@@ -977,24 +980,24 @@ function it({ filter: n, value: r, active: i, operator: a, operators: o, onOpera
|
|
|
977
980
|
value: r
|
|
978
981
|
})
|
|
979
982
|
}),
|
|
980
|
-
i && /* @__PURE__ */ H(
|
|
983
|
+
i && /* @__PURE__ */ H(Ce, { children: [/* @__PURE__ */ V("span", {
|
|
981
984
|
"aria-hidden": !0,
|
|
982
985
|
className: G.pillDivider
|
|
983
986
|
}), /* @__PURE__ */ V("button", {
|
|
984
987
|
type: "button",
|
|
985
988
|
disabled: f,
|
|
986
|
-
className:
|
|
989
|
+
className: t(G.segment, G.segmentClear),
|
|
987
990
|
"aria-label": `${d.clear}: ${n.label}`,
|
|
988
991
|
onClick: (e) => {
|
|
989
992
|
e.stopPropagation(), m(!1), l();
|
|
990
993
|
},
|
|
991
|
-
children: /* @__PURE__ */ V(
|
|
994
|
+
children: /* @__PURE__ */ V(_e, {
|
|
992
995
|
"aria-hidden": !0,
|
|
993
996
|
className: G.segmentGlyph
|
|
994
997
|
})
|
|
995
998
|
})] })
|
|
996
999
|
]
|
|
997
|
-
}), /* @__PURE__ */ V(
|
|
1000
|
+
}), /* @__PURE__ */ V(M, {
|
|
998
1001
|
align: "start",
|
|
999
1002
|
inset: "flush",
|
|
1000
1003
|
className: G.editorPopover,
|
|
@@ -1011,132 +1014,132 @@ function it({ filter: n, value: r, active: i, operator: a, operators: o, onOpera
|
|
|
1011
1014
|
}
|
|
1012
1015
|
//#endregion
|
|
1013
1016
|
//#region src/components/features/filters/filter-sheet.tsx
|
|
1014
|
-
function at({ filters:
|
|
1015
|
-
let [
|
|
1016
|
-
|
|
1017
|
+
function at({ filters: t, loadingFilters: i, showClearFilters: a = !0 }) {
|
|
1018
|
+
let [o, s] = B(!1), [c, l] = B(null), _ = xe(), v = xe(), x = z(null), S = z(null), { activeFilters: C, strings: w, isNavigating: T, getFilterValue: E, setFilterValue: D, getFilterOperator: O, setFilterOperator: ee, clearFilters: k } = U(), A = t.find((e) => e.key === c), j = C.filter((e) => e.value.length > 0).length, M = w.mobileFilters ?? X.mobileFilters, N = (w.filterSummary ?? X.filterSummary)(j), P = () => l(null), ae = (e) => {
|
|
1019
|
+
s(e), e || P();
|
|
1017
1020
|
};
|
|
1018
|
-
return
|
|
1019
|
-
if (!
|
|
1020
|
-
let e =
|
|
1021
|
-
if (
|
|
1022
|
-
|
|
1021
|
+
return Se(() => {
|
|
1022
|
+
if (!o || T) return;
|
|
1023
|
+
let e = x.current;
|
|
1024
|
+
if (c) {
|
|
1025
|
+
S.current = c;
|
|
1023
1026
|
let t = e?.querySelector("[data-filter-editor]");
|
|
1024
1027
|
(t?.querySelector("input") ?? t?.querySelector("[cmdk-root]") ?? t?.querySelector("button"))?.focus();
|
|
1025
|
-
} else
|
|
1028
|
+
} else S.current && [...e?.querySelectorAll("[data-filter-key]") ?? []].find((e) => e.dataset.filterKey === S.current)?.focus();
|
|
1026
1029
|
}, [
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
]), /* @__PURE__ */ H(
|
|
1031
|
-
open:
|
|
1032
|
-
onOpenChange:
|
|
1033
|
-
children: [/* @__PURE__ */ V(
|
|
1030
|
+
o,
|
|
1031
|
+
c,
|
|
1032
|
+
T
|
|
1033
|
+
]), /* @__PURE__ */ H(h, {
|
|
1034
|
+
open: o,
|
|
1035
|
+
onOpenChange: ae,
|
|
1036
|
+
children: [/* @__PURE__ */ V(u, { render: /* @__PURE__ */ H(r, {
|
|
1034
1037
|
tone: "neutral",
|
|
1035
|
-
|
|
1036
|
-
disabled:
|
|
1038
|
+
appearance: "outline",
|
|
1039
|
+
disabled: T,
|
|
1037
1040
|
className: "filter-sheet--trigger",
|
|
1038
1041
|
children: [
|
|
1039
|
-
/* @__PURE__ */ V(
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
+
/* @__PURE__ */ V(he, {}),
|
|
1043
|
+
M,
|
|
1044
|
+
j > 0 && /* @__PURE__ */ V(y, {
|
|
1042
1045
|
tone: "neutral",
|
|
1043
|
-
children:
|
|
1046
|
+
children: j
|
|
1044
1047
|
})
|
|
1045
1048
|
]
|
|
1046
|
-
}) }), /* @__PURE__ */ V(
|
|
1049
|
+
}) }), /* @__PURE__ */ V(oe, {
|
|
1047
1050
|
side: "block-end",
|
|
1048
|
-
size: "
|
|
1051
|
+
size: "90%",
|
|
1049
1052
|
inset: "5vw",
|
|
1050
|
-
"aria-labelledby":
|
|
1051
|
-
"aria-describedby":
|
|
1053
|
+
"aria-labelledby": _,
|
|
1054
|
+
"aria-describedby": v,
|
|
1052
1055
|
className: `filter-sheet--component ${G.mobileSheet}`,
|
|
1053
|
-
children: /* @__PURE__ */ H(
|
|
1054
|
-
/* @__PURE__ */ H(
|
|
1055
|
-
id:
|
|
1056
|
-
children:
|
|
1057
|
-
}), /* @__PURE__ */ V(
|
|
1058
|
-
id:
|
|
1059
|
-
children:
|
|
1056
|
+
children: /* @__PURE__ */ H(n, { children: [
|
|
1057
|
+
/* @__PURE__ */ H(g, { children: [/* @__PURE__ */ V(m, {
|
|
1058
|
+
id: _,
|
|
1059
|
+
children: M
|
|
1060
|
+
}), /* @__PURE__ */ V(p, {
|
|
1061
|
+
id: v,
|
|
1062
|
+
children: N
|
|
1060
1063
|
})] }),
|
|
1061
|
-
/* @__PURE__ */ H(
|
|
1064
|
+
/* @__PURE__ */ H(f, {
|
|
1062
1065
|
className: G.mobileBody,
|
|
1063
|
-
children: [
|
|
1064
|
-
label:
|
|
1066
|
+
children: [T && /* @__PURE__ */ V(b, {
|
|
1067
|
+
label: w.applying,
|
|
1065
1068
|
className: G.applying
|
|
1066
1069
|
}), /* @__PURE__ */ V("div", {
|
|
1067
|
-
ref:
|
|
1068
|
-
inert:
|
|
1069
|
-
"aria-busy":
|
|
1070
|
-
children:
|
|
1070
|
+
ref: x,
|
|
1071
|
+
inert: T || void 0,
|
|
1072
|
+
"aria-busy": T || void 0,
|
|
1073
|
+
children: A ? /* @__PURE__ */ H("div", {
|
|
1071
1074
|
"data-filter-editor": !0,
|
|
1072
1075
|
className: G.mobileEditor,
|
|
1073
1076
|
children: [/* @__PURE__ */ H("div", {
|
|
1074
1077
|
className: G.mobileOperator,
|
|
1075
|
-
children: [/* @__PURE__ */ V(
|
|
1078
|
+
children: [/* @__PURE__ */ V(e, {
|
|
1076
1079
|
size: "xs",
|
|
1077
1080
|
type: "secondary",
|
|
1078
|
-
children:
|
|
1081
|
+
children: w.operator
|
|
1079
1082
|
}), /* @__PURE__ */ V(nt, {
|
|
1080
|
-
operator:
|
|
1081
|
-
operators:
|
|
1082
|
-
onOperatorChange: (e) =>
|
|
1083
|
+
operator: O(A.key),
|
|
1084
|
+
operators: A.operators?.length ? A.operators : J(A.type, w.operators),
|
|
1085
|
+
onOperatorChange: (e) => ee(A.key, e)
|
|
1083
1086
|
})]
|
|
1084
1087
|
}), /* @__PURE__ */ V(Q, {
|
|
1085
|
-
filter:
|
|
1086
|
-
value:
|
|
1087
|
-
onValueChange: (e) =>
|
|
1088
|
-
onBack:
|
|
1089
|
-
onClose:
|
|
1088
|
+
filter: A,
|
|
1089
|
+
value: E(A.key),
|
|
1090
|
+
onValueChange: (e) => D(A.key, e),
|
|
1091
|
+
onBack: P,
|
|
1092
|
+
onClose: P,
|
|
1090
1093
|
triggerSource: "toolbar"
|
|
1091
|
-
},
|
|
1094
|
+
}, A.key)]
|
|
1092
1095
|
}) : /* @__PURE__ */ V("div", {
|
|
1093
1096
|
className: G.mobileFilters,
|
|
1094
|
-
children:
|
|
1097
|
+
children: t.map((t) => /* @__PURE__ */ H("div", {
|
|
1095
1098
|
className: G.mobileFilterRow,
|
|
1096
|
-
children: [/* @__PURE__ */ H(
|
|
1097
|
-
"data-filter-key":
|
|
1099
|
+
children: [/* @__PURE__ */ H(re, {
|
|
1100
|
+
"data-filter-key": t.key,
|
|
1098
1101
|
className: G.mobileFilter,
|
|
1099
1102
|
render: /* @__PURE__ */ V("button", {
|
|
1100
1103
|
type: "button",
|
|
1101
|
-
disabled:
|
|
1102
|
-
onClick: () =>
|
|
1104
|
+
disabled: T || i?.[t.key],
|
|
1105
|
+
onClick: () => l(t.key)
|
|
1103
1106
|
}),
|
|
1104
|
-
children: [/* @__PURE__ */ H(
|
|
1107
|
+
children: [/* @__PURE__ */ H(ne, { children: [/* @__PURE__ */ V(ie, { children: t.label }), /* @__PURE__ */ H(te, {
|
|
1105
1108
|
className: G.mobileValue,
|
|
1106
|
-
children: [
|
|
1109
|
+
children: [E(t.key).length > 0 && /* @__PURE__ */ V(e, {
|
|
1107
1110
|
tag: "span",
|
|
1108
1111
|
size: "inherit",
|
|
1109
1112
|
type: "inherit",
|
|
1110
|
-
children: (
|
|
1113
|
+
children: (t.operators?.length ? t.operators : J(t.type, w.operators)).find((e) => e.value === O(t.key))?.label
|
|
1111
1114
|
}), /* @__PURE__ */ V(rt, {
|
|
1112
|
-
filter:
|
|
1113
|
-
value:
|
|
1115
|
+
filter: t,
|
|
1116
|
+
value: E(t.key)
|
|
1114
1117
|
})]
|
|
1115
|
-
})] }), /* @__PURE__ */ V(
|
|
1116
|
-
}),
|
|
1118
|
+
})] }), /* @__PURE__ */ V(me, { "aria-hidden": !0 })]
|
|
1119
|
+
}), E(t.key).length > 0 && /* @__PURE__ */ V(r, {
|
|
1117
1120
|
iconOnly: !0,
|
|
1118
1121
|
tone: "neutral",
|
|
1119
|
-
|
|
1120
|
-
disabled:
|
|
1121
|
-
"aria-label": (
|
|
1122
|
-
onClick: (
|
|
1123
|
-
|
|
1122
|
+
appearance: "ghost",
|
|
1123
|
+
disabled: T,
|
|
1124
|
+
"aria-label": (w.clearFilter ?? X.clearFilter)(t.label),
|
|
1125
|
+
onClick: (e) => {
|
|
1126
|
+
e.currentTarget.parentElement?.querySelector("[data-filter-key]")?.focus(), D(t.key, []);
|
|
1124
1127
|
},
|
|
1125
|
-
children: /* @__PURE__ */ V(
|
|
1128
|
+
children: /* @__PURE__ */ V(_e, {})
|
|
1126
1129
|
})]
|
|
1127
|
-
},
|
|
1130
|
+
}, t.key))
|
|
1128
1131
|
})
|
|
1129
1132
|
})]
|
|
1130
1133
|
}),
|
|
1131
|
-
!
|
|
1134
|
+
!A && /* @__PURE__ */ H(d, { children: [a && C.length > 0 && /* @__PURE__ */ V(r, {
|
|
1132
1135
|
tone: "neutral",
|
|
1133
|
-
|
|
1134
|
-
disabled:
|
|
1135
|
-
onClick:
|
|
1136
|
-
children:
|
|
1137
|
-
}), /* @__PURE__ */ V(
|
|
1138
|
-
onClick: () =>
|
|
1139
|
-
children:
|
|
1136
|
+
appearance: "ghost",
|
|
1137
|
+
disabled: T,
|
|
1138
|
+
onClick: k,
|
|
1139
|
+
children: w.clearFilters
|
|
1140
|
+
}), /* @__PURE__ */ V(r, {
|
|
1141
|
+
onClick: () => ae(!1),
|
|
1142
|
+
children: w.done ?? X.done
|
|
1140
1143
|
})] })
|
|
1141
1144
|
] })
|
|
1142
1145
|
})]
|
|
@@ -1152,73 +1155,73 @@ function ot(e, t) {
|
|
|
1152
1155
|
value: e.value
|
|
1153
1156
|
}));
|
|
1154
1157
|
}
|
|
1155
|
-
function st({ tabs:
|
|
1158
|
+
function st({ tabs: e, display: n = "tabs", label: r, className: i }) {
|
|
1156
1159
|
let { activeFilters: a, filters: o, replaceFilters: s, isNavigating: c, strings: l } = U(), u = (e) => {
|
|
1157
1160
|
let t = o.find((t) => t.key === e);
|
|
1158
1161
|
return t ? t.operator ?? t.operators?.[0]?.value ?? Y(t.type) : "equals";
|
|
1159
|
-
}, d =
|
|
1162
|
+
}, d = e.find((e) => {
|
|
1160
1163
|
let t = ot(e, u);
|
|
1161
1164
|
return t.length === a.length && t.every((e) => a.some((t) => t.key === e.key && t.operator === e.operator && JSON.stringify(e.operator === "between" ? t.value : [...t.value].sort()) === JSON.stringify(e.operator === "between" ? e.value : [...e.value].sort())));
|
|
1162
|
-
}), f = (
|
|
1165
|
+
}), f = (t) => {
|
|
1163
1166
|
if (c) return;
|
|
1164
|
-
let n =
|
|
1167
|
+
let n = e.find((e) => e.id === t);
|
|
1165
1168
|
n && s(ot(n, u));
|
|
1166
1169
|
};
|
|
1167
|
-
return n === "select" ? /* @__PURE__ */ V(
|
|
1170
|
+
return n === "select" ? /* @__PURE__ */ V(x, {
|
|
1168
1171
|
"aria-label": r ?? l.savedViews,
|
|
1169
1172
|
value: d?.id ?? null,
|
|
1170
1173
|
placeholder: l.customView,
|
|
1171
|
-
options:
|
|
1174
|
+
options: e.map((e) => ({
|
|
1172
1175
|
value: e.id,
|
|
1173
1176
|
label: e.label
|
|
1174
1177
|
})),
|
|
1175
1178
|
onValueChange: f,
|
|
1176
1179
|
disabled: c,
|
|
1177
|
-
className:
|
|
1178
|
-
}) : /* @__PURE__ */ V(
|
|
1180
|
+
className: t("filter-tabs--component", G.viewSelect, i)
|
|
1181
|
+
}) : /* @__PURE__ */ V(P, {
|
|
1179
1182
|
value: d?.id,
|
|
1180
1183
|
onValueChange: f,
|
|
1181
1184
|
strings: { label: r ?? l.savedViews },
|
|
1182
|
-
items:
|
|
1185
|
+
items: e.map((e) => ({
|
|
1183
1186
|
id: e.id,
|
|
1184
1187
|
label: e.label,
|
|
1185
1188
|
disabled: c,
|
|
1186
|
-
badge: e.count === void 0 ? void 0 : /* @__PURE__ */ V(
|
|
1189
|
+
badge: e.count === void 0 ? void 0 : /* @__PURE__ */ V(y, {
|
|
1187
1190
|
tone: "neutral",
|
|
1188
1191
|
children: e.count
|
|
1189
1192
|
})
|
|
1190
1193
|
})),
|
|
1191
|
-
className:
|
|
1194
|
+
className: t("filter-tabs--component", i ?? G.tabs)
|
|
1192
1195
|
});
|
|
1193
1196
|
}
|
|
1194
1197
|
//#endregion
|
|
1195
1198
|
//#region src/components/features/filters/filters-button.tsx
|
|
1196
|
-
function ct({ availableFilters:
|
|
1197
|
-
let { strings: o, getFilterValue: s, setFilterValue: c, isNavigating: l } = U(), [u, d] = W(!1), [f, p] = W(null), m = n === "hidden" ? /* @__PURE__ */ V(
|
|
1199
|
+
function ct({ availableFilters: t, labelVisibility: n = "hidden", className: a }) {
|
|
1200
|
+
let { strings: o, getFilterValue: s, setFilterValue: c, isNavigating: l } = U(), [u, d] = W(!1), [f, p] = W(null), m = n === "hidden" ? /* @__PURE__ */ V(i, {
|
|
1198
1201
|
type: "button",
|
|
1199
1202
|
tone: "neutral",
|
|
1200
|
-
|
|
1203
|
+
appearance: "outline",
|
|
1201
1204
|
iconOnly: !0,
|
|
1202
1205
|
tooltip: o.addFilter,
|
|
1203
1206
|
side: "bottom",
|
|
1204
|
-
className:
|
|
1205
|
-
children: /* @__PURE__ */ V(
|
|
1206
|
-
}) : /* @__PURE__ */ H(
|
|
1207
|
+
className: a,
|
|
1208
|
+
children: /* @__PURE__ */ V(he, {})
|
|
1209
|
+
}) : /* @__PURE__ */ H(r, {
|
|
1207
1210
|
type: "button",
|
|
1208
1211
|
tone: "neutral",
|
|
1209
|
-
|
|
1210
|
-
className:
|
|
1211
|
-
children: [/* @__PURE__ */ V(
|
|
1212
|
+
appearance: "outline",
|
|
1213
|
+
className: a,
|
|
1214
|
+
children: [/* @__PURE__ */ V(he, {}), o.addFilter]
|
|
1212
1215
|
});
|
|
1213
|
-
return /* @__PURE__ */ H(
|
|
1216
|
+
return /* @__PURE__ */ H(N, {
|
|
1214
1217
|
open: u && !l,
|
|
1215
1218
|
onOpenChange: (e) => {
|
|
1216
1219
|
d(e), e || p(null);
|
|
1217
1220
|
},
|
|
1218
|
-
children: [/* @__PURE__ */ V(
|
|
1221
|
+
children: [/* @__PURE__ */ V(j, {
|
|
1219
1222
|
disabled: l,
|
|
1220
1223
|
render: m
|
|
1221
|
-
}), /* @__PURE__ */ V(
|
|
1224
|
+
}), /* @__PURE__ */ V(M, {
|
|
1222
1225
|
align: "start",
|
|
1223
1226
|
inset: "flush",
|
|
1224
1227
|
className: G.editorPopover,
|
|
@@ -1229,26 +1232,26 @@ function ct({ availableFilters: e, labelVisibility: n = "hidden", className: r }
|
|
|
1229
1232
|
onBack: () => p(null),
|
|
1230
1233
|
onClose: () => d(!1),
|
|
1231
1234
|
triggerSource: "toolbar"
|
|
1232
|
-
}) : /* @__PURE__ */ H(
|
|
1235
|
+
}) : /* @__PURE__ */ H(O, { children: [/* @__PURE__ */ V(C, { placeholder: o.searchFilters }), /* @__PURE__ */ H(D, {
|
|
1233
1236
|
className: G.editorList,
|
|
1234
|
-
children: [/* @__PURE__ */ V(
|
|
1237
|
+
children: [/* @__PURE__ */ V(E, { children: o.noFiltersAvailable }), /* @__PURE__ */ V(w, {
|
|
1235
1238
|
heading: o.availableFilters,
|
|
1236
|
-
children:
|
|
1237
|
-
value:
|
|
1238
|
-
onSelect: () => p(
|
|
1239
|
-
children: [
|
|
1239
|
+
children: t.map((t) => /* @__PURE__ */ H(T, {
|
|
1240
|
+
value: t.label,
|
|
1241
|
+
onSelect: () => p(t),
|
|
1242
|
+
children: [t.icon, /* @__PURE__ */ H("span", {
|
|
1240
1243
|
className: G.optionBody,
|
|
1241
|
-
children: [/* @__PURE__ */ V(
|
|
1244
|
+
children: [/* @__PURE__ */ V(e, {
|
|
1242
1245
|
tag: "span",
|
|
1243
|
-
children:
|
|
1244
|
-
}), /* @__PURE__ */ V(
|
|
1246
|
+
children: t.label
|
|
1247
|
+
}), /* @__PURE__ */ V(e, {
|
|
1245
1248
|
tag: "span",
|
|
1246
1249
|
size: "xs",
|
|
1247
1250
|
type: "secondary",
|
|
1248
|
-
children:
|
|
1251
|
+
children: t.type === K.DATE ? o.selectDate : t.options ? o.options(t.options.length) : t.description ?? ""
|
|
1249
1252
|
})]
|
|
1250
1253
|
})]
|
|
1251
|
-
},
|
|
1254
|
+
}, t.key))
|
|
1252
1255
|
})]
|
|
1253
1256
|
})] })
|
|
1254
1257
|
})]
|
|
@@ -1256,50 +1259,50 @@ function ct({ availableFilters: e, labelVisibility: n = "hidden", className: r }
|
|
|
1256
1259
|
}
|
|
1257
1260
|
//#endregion
|
|
1258
1261
|
//#region src/components/features/filters/search-filters.tsx
|
|
1259
|
-
function lt({ filter:
|
|
1260
|
-
let { getFilterValue: r, setFilterValue: i, isNavigating: a, strings: o } = U(), s = r(
|
|
1262
|
+
function lt({ filter: e, className: n }) {
|
|
1263
|
+
let { getFilterValue: r, setFilterValue: i, isNavigating: a, strings: o } = U(), s = r(e.key)[0] ?? "", [c, l] = F(s), u = ke(), [d, f] = B(u);
|
|
1261
1264
|
u !== d && (f(u), l(s));
|
|
1262
|
-
let p =
|
|
1263
|
-
return
|
|
1265
|
+
let p = se(c, e.delay ?? 300);
|
|
1266
|
+
return L(() => {
|
|
1264
1267
|
if (a || p !== c) return;
|
|
1265
|
-
let
|
|
1266
|
-
|
|
1268
|
+
let t = p.trim() ? p : "";
|
|
1269
|
+
t !== s && i(e.key, t ? [t] : []);
|
|
1267
1270
|
}, [
|
|
1268
1271
|
s,
|
|
1269
1272
|
p,
|
|
1270
1273
|
c,
|
|
1271
|
-
|
|
1274
|
+
e.key,
|
|
1272
1275
|
a,
|
|
1273
1276
|
i
|
|
1274
|
-
]), /* @__PURE__ */ V(
|
|
1277
|
+
]), /* @__PURE__ */ V(S, {
|
|
1275
1278
|
value: c,
|
|
1276
1279
|
disabled: a,
|
|
1277
1280
|
onChange: (e) => l(e.target.value),
|
|
1278
|
-
placeholder:
|
|
1279
|
-
"aria-label":
|
|
1280
|
-
startIcon:
|
|
1281
|
+
placeholder: e.placeholder ?? o.searchPlaceholder(e.label.toLowerCase()),
|
|
1282
|
+
"aria-label": e.label,
|
|
1283
|
+
startIcon: ge,
|
|
1281
1284
|
clearable: !0,
|
|
1282
1285
|
onClear: () => l(""),
|
|
1283
|
-
className:
|
|
1286
|
+
className: t("search-filter--component", G.searchInput, n)
|
|
1284
1287
|
});
|
|
1285
1288
|
}
|
|
1286
|
-
function ut({ filters:
|
|
1287
|
-
return
|
|
1288
|
-
filter:
|
|
1289
|
-
className:
|
|
1290
|
-
},
|
|
1289
|
+
function ut({ filters: e, className: n }) {
|
|
1290
|
+
return e.length === 0 ? null : /* @__PURE__ */ V(Ce, { children: e.map((e) => /* @__PURE__ */ V(lt, {
|
|
1291
|
+
filter: e,
|
|
1292
|
+
className: t("search-filters--component", n)
|
|
1293
|
+
}, e.key)) });
|
|
1291
1294
|
}
|
|
1292
1295
|
//#endregion
|
|
1293
1296
|
//#region src/components/features/filters/use-filter-groups.ts
|
|
1294
1297
|
function dt({ dynamicFilterOptions: e } = {}) {
|
|
1295
|
-
let { filters: t, isFilterActive: n } = U(), r =
|
|
1298
|
+
let { filters: t, isFilterActive: n } = U(), r = R(() => e ? t.map((t) => {
|
|
1296
1299
|
let n = e[t.key];
|
|
1297
1300
|
return Array.isArray(n) ? {
|
|
1298
1301
|
...t,
|
|
1299
1302
|
options: n
|
|
1300
1303
|
} : t;
|
|
1301
1304
|
}) : t, [e, t]);
|
|
1302
|
-
return
|
|
1305
|
+
return R(() => {
|
|
1303
1306
|
let e = r.filter((e) => e.type === K.SEARCH), t = [...r.filter((e) => e.type !== K.SEARCH && !e.displayConfig?.hidden && e.displayConfig?.display !== "hidden")].sort((e, t) => (e.displayConfig?.priority ?? 0) - (t.displayConfig?.priority ?? 0)), i = t.filter((e) => n(e.key)), a = t.filter((e) => !n(e.key) && e.displayConfig?.display === "always"), o = t.filter((e) => !n(e.key) && e.displayConfig?.display !== "always");
|
|
1304
1307
|
return {
|
|
1305
1308
|
processedFilters: r,
|
|
@@ -1314,67 +1317,67 @@ function dt({ dynamicFilterOptions: e } = {}) {
|
|
|
1314
1317
|
}
|
|
1315
1318
|
//#endregion
|
|
1316
1319
|
//#region src/components/features/filters/filter-layout.tsx
|
|
1317
|
-
function ft({ className:
|
|
1318
|
-
let
|
|
1319
|
-
...
|
|
1320
|
-
...
|
|
1321
|
-
...
|
|
1322
|
-
].sort((e, t) => (e.displayConfig?.priority ?? 0) - (t.displayConfig?.priority ?? 0) ||
|
|
1320
|
+
function ft({ className: n, dynamicFilterOptions: i, loadingFilters: a, variant: o = "default", showClearFilters: s = !0, tabs: c, mobilePresentation: l = "sheet" }) {
|
|
1321
|
+
let u = ce() && l === "sheet", { getFilterValue: d, setFilterValue: f, isFilterActive: p, clearFilters: m, getFilterOperator: h, setFilterOperator: g, isNavigating: _, strings: v } = U(), y = dt({ dynamicFilterOptions: i }), x = [
|
|
1322
|
+
...y.activeFilters,
|
|
1323
|
+
...y.alwaysVisibleFilters,
|
|
1324
|
+
...y.popoverFilters
|
|
1325
|
+
].sort((e, t) => (e.displayConfig?.priority ?? 0) - (t.displayConfig?.priority ?? 0) || y.processedFilters.indexOf(e) - y.processedFilters.indexOf(t)), S = (e) => e.operators?.length ? e.operators : J(e.type, v.operators), C = (e) => /* @__PURE__ */ V(it, {
|
|
1323
1326
|
filter: e,
|
|
1324
|
-
value:
|
|
1325
|
-
active:
|
|
1326
|
-
operator:
|
|
1327
|
-
operators:
|
|
1328
|
-
onOperatorChange: (t) =>
|
|
1329
|
-
onValueChange: (t) =>
|
|
1330
|
-
onClear: () =>
|
|
1327
|
+
value: d(e.key),
|
|
1328
|
+
active: p(e.key),
|
|
1329
|
+
operator: h(e.key),
|
|
1330
|
+
operators: S(e),
|
|
1331
|
+
onOperatorChange: (t) => g(e.key, t),
|
|
1332
|
+
onValueChange: (t) => f(e.key, t),
|
|
1333
|
+
onClear: () => f(e.key, [])
|
|
1331
1334
|
}, e.key);
|
|
1332
1335
|
return /* @__PURE__ */ H("div", {
|
|
1333
1336
|
"data-slot": "filter-layout",
|
|
1334
|
-
"data-variant":
|
|
1335
|
-
"aria-busy":
|
|
1336
|
-
className:
|
|
1337
|
+
"data-variant": o,
|
|
1338
|
+
"aria-busy": _ || void 0,
|
|
1339
|
+
className: t("filter-layout--component", G.layout, n),
|
|
1337
1340
|
children: [
|
|
1338
|
-
!!
|
|
1339
|
-
tabs:
|
|
1340
|
-
display:
|
|
1341
|
+
!!c?.length && /* @__PURE__ */ V(st, {
|
|
1342
|
+
tabs: c,
|
|
1343
|
+
display: u ? "select" : "tabs"
|
|
1341
1344
|
}),
|
|
1342
1345
|
/* @__PURE__ */ H("div", {
|
|
1343
1346
|
className: G.bar,
|
|
1344
|
-
"data-mobile":
|
|
1345
|
-
"data-busy":
|
|
1346
|
-
children: [/* @__PURE__ */ V(ut, { filters:
|
|
1347
|
-
filters:
|
|
1348
|
-
loadingFilters:
|
|
1349
|
-
showClearFilters:
|
|
1350
|
-
}) : /* @__PURE__ */ H(
|
|
1351
|
-
Object.entries(
|
|
1352
|
-
let n =
|
|
1347
|
+
"data-mobile": u || void 0,
|
|
1348
|
+
"data-busy": _ || void 0,
|
|
1349
|
+
children: [/* @__PURE__ */ V(ut, { filters: y.searchFilters }), u ? x.length > 0 && /* @__PURE__ */ V(at, {
|
|
1350
|
+
filters: x,
|
|
1351
|
+
loadingFilters: a,
|
|
1352
|
+
showClearFilters: s
|
|
1353
|
+
}) : /* @__PURE__ */ H(Ce, { children: [
|
|
1354
|
+
Object.entries(a ?? {}).filter(([, e]) => e).map(([t]) => {
|
|
1355
|
+
let n = y.processedFilters.find((e) => e.key === t)?.label ?? t;
|
|
1353
1356
|
return /* @__PURE__ */ H("span", {
|
|
1354
1357
|
className: G.loadingChip,
|
|
1355
|
-
children: [/* @__PURE__ */ V(
|
|
1358
|
+
children: [/* @__PURE__ */ V(le, {}), /* @__PURE__ */ V(e, {
|
|
1356
1359
|
tag: "span",
|
|
1357
1360
|
type: "secondary",
|
|
1358
|
-
children:
|
|
1361
|
+
children: v.loadingOptions(n)
|
|
1359
1362
|
})]
|
|
1360
|
-
}, `loading-${
|
|
1363
|
+
}, `loading-${t}`);
|
|
1361
1364
|
}),
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1365
|
+
y.activeFilters.map(C),
|
|
1366
|
+
y.alwaysVisibleFilters.map(C),
|
|
1367
|
+
y.popoverFilters.length > 0 && /* @__PURE__ */ V(ct, { availableFilters: y.popoverFilters }),
|
|
1368
|
+
s && y.hasActive && /* @__PURE__ */ V(r, {
|
|
1366
1369
|
type: "button",
|
|
1367
1370
|
tone: "neutral",
|
|
1368
|
-
|
|
1369
|
-
disabled:
|
|
1370
|
-
onClick:
|
|
1371
|
+
appearance: "ghost",
|
|
1372
|
+
disabled: _,
|
|
1373
|
+
onClick: m,
|
|
1371
1374
|
className: G.clear,
|
|
1372
|
-
children:
|
|
1375
|
+
children: v.clearFilters
|
|
1373
1376
|
})
|
|
1374
1377
|
] })]
|
|
1375
1378
|
}),
|
|
1376
|
-
|
|
1377
|
-
label:
|
|
1379
|
+
_ && /* @__PURE__ */ V(b, {
|
|
1380
|
+
label: v.applying,
|
|
1378
1381
|
className: G.applying
|
|
1379
1382
|
})
|
|
1380
1383
|
]
|