@kumix/ui 0.3.11 → 0.3.13
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/README.md +13 -13
- package/dist/components/agents/agent-activity/activity-row.d.ts +1 -2
- package/dist/components/agents/agent-activity/activity-row.d.ts.map +1 -1
- package/dist/components/agents/agent-activity/activity-row.js +1 -1
- package/dist/components/agents/agent-activity/activity-row.js.map +1 -1
- package/dist/components/agents/agent-activity/index.d.ts +2 -2
- package/dist/components/agents/agent-activity/index.d.ts.map +1 -1
- package/dist/components/agents/agent-activity/index.js +1 -1
- package/dist/components/agents/agent-activity/index.js.map +1 -1
- package/dist/components/agents/agent-code.d.ts +8 -9
- package/dist/components/agents/agent-code.d.ts.map +1 -1
- package/dist/components/agents/agent-code.js +1 -1
- package/dist/components/agents/agent-code.js.map +1 -1
- package/dist/components/agents/agent-disclosure.d.ts +2 -3
- package/dist/components/agents/agent-disclosure.d.ts.map +1 -1
- package/dist/components/agents/agent-disclosure.js +1 -1
- package/dist/components/agents/agent-disclosure.js.map +1 -1
- package/dist/components/agents/ai-sidebar.d.ts +8 -9
- package/dist/components/agents/ai-sidebar.d.ts.map +1 -1
- package/dist/components/agents/ai-sidebar.js +1 -1
- package/dist/components/agents/ai-sidebar.js.map +1 -1
- package/dist/components/agents/approval-card/index.d.ts +2 -2
- package/dist/components/agents/approval-card/index.d.ts.map +1 -1
- package/dist/components/agents/approval-card/index.js +1 -1
- package/dist/components/agents/approval-card/index.js.map +1 -1
- package/dist/components/agents/chat-app.d.ts +2 -3
- package/dist/components/agents/chat-app.d.ts.map +1 -1
- package/dist/components/agents/chat-app.js +1 -1
- package/dist/components/agents/chat-app.js.map +1 -1
- package/dist/components/agents/citations.d.ts +10 -11
- package/dist/components/agents/citations.d.ts.map +1 -1
- package/dist/components/agents/citations.js +1 -1
- package/dist/components/agents/citations.js.map +1 -1
- package/dist/components/agents/code-block.d.ts +3 -4
- package/dist/components/agents/code-block.d.ts.map +1 -1
- package/dist/components/agents/code-block.js +1 -1
- package/dist/components/agents/code-block.js.map +1 -1
- package/dist/components/agents/file-diff.d.ts +5 -6
- package/dist/components/agents/file-diff.d.ts.map +1 -1
- package/dist/components/agents/file-diff.js +1 -1
- package/dist/components/agents/file-diff.js.map +1 -1
- package/dist/components/agents/image-generation.d.ts +3 -4
- package/dist/components/agents/image-generation.d.ts.map +1 -1
- package/dist/components/agents/image-generation.js +1 -1
- package/dist/components/agents/image-generation.js.map +1 -1
- package/dist/components/agents/loading-states/agent-progress.d.ts +2 -3
- package/dist/components/agents/loading-states/agent-progress.d.ts.map +1 -1
- package/dist/components/agents/loading-states/agent-progress.js +1 -1
- package/dist/components/agents/loading-states/agent-progress.js.map +1 -1
- package/dist/components/agents/loading-states/reasoning-text.d.ts +3 -4
- package/dist/components/agents/loading-states/reasoning-text.d.ts.map +1 -1
- package/dist/components/agents/loading-states/reasoning-text.js +1 -1
- package/dist/components/agents/loading-states/reasoning-text.js.map +1 -1
- package/dist/components/agents/loading-states/thinking-shimmer.d.ts +2 -3
- package/dist/components/agents/loading-states/thinking-shimmer.d.ts.map +1 -1
- package/dist/components/agents/loading-states/thinking-shimmer.js +1 -1
- package/dist/components/agents/loading-states/thinking-shimmer.js.map +1 -1
- package/dist/components/agents/message-bubble.d.ts +10 -11
- package/dist/components/agents/message-bubble.d.ts.map +1 -1
- package/dist/components/agents/message-bubble.js +1 -1
- package/dist/components/agents/message-bubble.js.map +1 -1
- package/dist/components/agents/message-context.d.ts +2 -3
- package/dist/components/agents/message-context.d.ts.map +1 -1
- package/dist/components/agents/message-scroller.d.ts +2 -3
- package/dist/components/agents/message-scroller.d.ts.map +1 -1
- package/dist/components/agents/message-scroller.js +1 -1
- package/dist/components/agents/message-scroller.js.map +1 -1
- package/dist/components/agents/message.d.ts +18 -18
- package/dist/components/agents/message.d.ts.map +1 -1
- package/dist/components/agents/message.js +1 -1
- package/dist/components/agents/message.js.map +1 -1
- package/dist/components/agents/prompt-input.d.ts +4 -5
- package/dist/components/agents/prompt-input.d.ts.map +1 -1
- package/dist/components/agents/prompt-input.js +1 -1
- package/dist/components/agents/prompt-input.js.map +1 -1
- package/dist/components/agents/streaming-response.d.ts +4 -5
- package/dist/components/agents/streaming-response.d.ts.map +1 -1
- package/dist/components/agents/streaming-response.js +1 -1
- package/dist/components/agents/streaming-response.js.map +1 -1
- package/dist/components/agents/todo-list.d.ts +4 -5
- package/dist/components/agents/todo-list.d.ts.map +1 -1
- package/dist/components/agents/todo-list.js +1 -1
- package/dist/components/agents/todo-list.js.map +1 -1
- package/dist/components/agents/tool-approval.d.ts +6 -7
- package/dist/components/agents/tool-approval.d.ts.map +1 -1
- package/dist/components/agents/tool-approval.js +1 -1
- package/dist/components/agents/tool-approval.js.map +1 -1
- package/dist/components/agents/tool-result.d.ts +6 -7
- package/dist/components/agents/tool-result.d.ts.map +1 -1
- package/dist/components/agents/tool-result.js +1 -1
- package/dist/components/agents/tool-result.js.map +1 -1
- package/dist/components/custom/confirm-dialog.d.ts +2 -3
- package/dist/components/custom/confirm-dialog.d.ts.map +1 -1
- package/dist/components/custom/toast.d.ts +6 -7
- package/dist/components/custom/toast.d.ts.map +1 -1
- package/dist/components/motion/action-swap-blur.d.ts +7 -7
- package/dist/components/motion/action-swap-blur.d.ts.map +1 -1
- package/dist/components/motion/action-swap-cascade.d.ts +7 -7
- package/dist/components/motion/action-swap-cascade.d.ts.map +1 -1
- package/dist/components/motion/action-swap-roll.d.ts +7 -7
- package/dist/components/motion/action-swap-roll.d.ts.map +1 -1
- package/dist/components/motion/action-swap.d.ts +10 -11
- package/dist/components/motion/action-swap.d.ts.map +1 -1
- package/dist/components/motion/action-swap.js +1 -1
- package/dist/components/motion/action-swap.js.map +1 -1
- package/dist/components/motion/adaptive-stepper.d.ts +7 -8
- package/dist/components/motion/adaptive-stepper.d.ts.map +1 -1
- package/dist/components/motion/adaptive-stepper.js +1 -1
- package/dist/components/motion/adaptive-stepper.js.map +1 -1
- package/dist/components/motion/animated-badge.d.ts +4 -5
- package/dist/components/motion/animated-badge.d.ts.map +1 -1
- package/dist/components/motion/animated-badge.js +1 -1
- package/dist/components/motion/animated-badge.js.map +1 -1
- package/dist/components/motion/animated-number.d.ts +2 -3
- package/dist/components/motion/animated-number.d.ts.map +1 -1
- package/dist/components/motion/animated-number.js +1 -1
- package/dist/components/motion/animated-number.js.map +1 -1
- package/dist/components/motion/animated-sidebar.d.ts +28 -29
- package/dist/components/motion/animated-sidebar.d.ts.map +1 -1
- package/dist/components/motion/animated-sidebar.js +1 -1
- package/dist/components/motion/animated-sidebar.js.map +1 -1
- package/dist/components/motion/animated-toast-stack.d.ts +10 -11
- package/dist/components/motion/animated-toast-stack.d.ts.map +1 -1
- package/dist/components/motion/animated-toast-stack.js +1 -1
- package/dist/components/motion/animated-toast-stack.js.map +1 -1
- package/dist/components/motion/attachment-upload.d.ts +7 -8
- package/dist/components/motion/attachment-upload.d.ts.map +1 -1
- package/dist/components/motion/attachment-upload.js +1 -1
- package/dist/components/motion/attachment-upload.js.map +1 -1
- package/dist/components/motion/availability-scheduler/copy-menu.d.ts +1 -2
- package/dist/components/motion/availability-scheduler/copy-menu.d.ts.map +1 -1
- package/dist/components/motion/availability-scheduler/day-row.d.ts +1 -2
- package/dist/components/motion/availability-scheduler/day-row.d.ts.map +1 -1
- package/dist/components/motion/availability-scheduler/icon-button.d.ts +1 -2
- package/dist/components/motion/availability-scheduler/icon-button.d.ts.map +1 -1
- package/dist/components/motion/availability-scheduler/icon-button.js +1 -1
- package/dist/components/motion/availability-scheduler/icon-button.js.map +1 -1
- package/dist/components/motion/availability-scheduler/index.d.ts +3 -3
- package/dist/components/motion/availability-scheduler/index.d.ts.map +1 -1
- package/dist/components/motion/availability-scheduler/index.js +1 -1
- package/dist/components/motion/availability-scheduler/index.js.map +1 -1
- package/dist/components/motion/availability-scheduler/time-select.d.ts +1 -2
- package/dist/components/motion/availability-scheduler/time-select.d.ts.map +1 -1
- package/dist/components/motion/bloom-menu.d.ts +2 -3
- package/dist/components/motion/bloom-menu.d.ts.map +1 -1
- package/dist/components/motion/bloom-menu.js +1 -1
- package/dist/components/motion/bloom-menu.js.map +1 -1
- package/dist/components/motion/bottom-sheet.d.ts +2 -3
- package/dist/components/motion/bottom-sheet.d.ts.map +1 -1
- package/dist/components/motion/bottom-sheet.js +1 -1
- package/dist/components/motion/bottom-sheet.js.map +1 -1
- package/dist/components/motion/bounce-sidebar.d.ts +3 -4
- package/dist/components/motion/bounce-sidebar.d.ts.map +1 -1
- package/dist/components/motion/bounce-sidebar.js +1 -1
- package/dist/components/motion/bounce-sidebar.js.map +1 -1
- package/dist/components/motion/bouncy-accordion.d.ts +4 -5
- package/dist/components/motion/bouncy-accordion.d.ts.map +1 -1
- package/dist/components/motion/bouncy-accordion.js +1 -1
- package/dist/components/motion/bouncy-accordion.js.map +1 -1
- package/dist/components/motion/button/base.d.ts +6 -7
- package/dist/components/motion/button/base.d.ts.map +1 -1
- package/dist/components/motion/button/base.js +1 -1
- package/dist/components/motion/button/base.js.map +1 -1
- package/dist/components/motion/button/magnetic.d.ts +2 -3
- package/dist/components/motion/button/magnetic.d.ts.map +1 -1
- package/dist/components/motion/button/metallic.d.ts +2 -3
- package/dist/components/motion/button/metallic.d.ts.map +1 -1
- package/dist/components/motion/button/metallic.js +1 -1
- package/dist/components/motion/button/metallic.js.map +1 -1
- package/dist/components/motion/button/stateful.d.ts +3 -4
- package/dist/components/motion/button/stateful.d.ts.map +1 -1
- package/dist/components/motion/card-folder.d.ts +30 -0
- package/dist/components/motion/card-folder.d.ts.map +1 -0
- package/dist/components/motion/card-folder.js +254 -0
- package/dist/components/motion/card-folder.js.map +1 -0
- package/dist/components/motion/center-morph-modal.d.ts +8 -9
- package/dist/components/motion/center-morph-modal.d.ts.map +1 -1
- package/dist/components/motion/center-morph-modal.js +1 -1
- package/dist/components/motion/center-morph-modal.js.map +1 -1
- package/dist/components/motion/checkbox.d.ts +2 -3
- package/dist/components/motion/checkbox.d.ts.map +1 -1
- package/dist/components/motion/checkbox.js +1 -1
- package/dist/components/motion/checkbox.js.map +1 -1
- package/dist/components/motion/chromatic-text-reveal.d.ts +2 -3
- package/dist/components/motion/chromatic-text-reveal.d.ts.map +1 -1
- package/dist/components/motion/chromatic-text-reveal.js +1 -1
- package/dist/components/motion/chromatic-text-reveal.js.map +1 -1
- package/dist/components/motion/combobox/content.d.ts +2 -3
- package/dist/components/motion/combobox/content.d.ts.map +1 -1
- package/dist/components/motion/combobox/content.js +1 -1
- package/dist/components/motion/combobox/content.js.map +1 -1
- package/dist/components/motion/combobox/context.d.ts +9 -10
- package/dist/components/motion/combobox/context.d.ts.map +1 -1
- package/dist/components/motion/combobox/context.js +1 -1
- package/dist/components/motion/combobox/context.js.map +1 -1
- package/dist/components/motion/combobox/list.d.ts +12 -13
- package/dist/components/motion/combobox/list.d.ts.map +1 -1
- package/dist/components/motion/combobox/list.js +1 -1
- package/dist/components/motion/combobox/list.js.map +1 -1
- package/dist/components/motion/combobox/trigger.d.ts +6 -7
- package/dist/components/motion/combobox/trigger.d.ts.map +1 -1
- package/dist/components/motion/combobox/trigger.js +1 -1
- package/dist/components/motion/combobox/trigger.js.map +1 -1
- package/dist/components/motion/command-palette.d.ts +3 -4
- package/dist/components/motion/command-palette.d.ts.map +1 -1
- package/dist/components/motion/command-palette.js +1 -1
- package/dist/components/motion/command-palette.js.map +1 -1
- package/dist/components/motion/context-menu.d.ts +20 -21
- package/dist/components/motion/context-menu.d.ts.map +1 -1
- package/dist/components/motion/context-menu.js +1 -1
- package/dist/components/motion/context-menu.js.map +1 -1
- package/dist/components/motion/cylinder-carousel.d.ts +2 -3
- package/dist/components/motion/cylinder-carousel.d.ts.map +1 -1
- package/dist/components/motion/cylinder-carousel.js +1 -1
- package/dist/components/motion/cylinder-carousel.js.map +1 -1
- package/dist/components/motion/digit-swap.d.ts +23 -0
- package/dist/components/motion/digit-swap.d.ts.map +1 -0
- package/dist/components/motion/digit-swap.js +77 -0
- package/dist/components/motion/digit-swap.js.map +1 -0
- package/dist/components/motion/dock.d.ts +5 -6
- package/dist/components/motion/dock.d.ts.map +1 -1
- package/dist/components/motion/dock.js +1 -1
- package/dist/components/motion/dock.js.map +1 -1
- package/dist/components/motion/drawer.d.ts +2 -3
- package/dist/components/motion/drawer.d.ts.map +1 -1
- package/dist/components/motion/drawer.js +1 -1
- package/dist/components/motion/drawer.js.map +1 -1
- package/dist/components/motion/dynamic-island.d.ts +4 -5
- package/dist/components/motion/dynamic-island.d.ts.map +1 -1
- package/dist/components/motion/dynamic-island.js +1 -1
- package/dist/components/motion/dynamic-island.js.map +1 -1
- package/dist/components/motion/expandable-action-bar.d.ts +6 -7
- package/dist/components/motion/expandable-action-bar.d.ts.map +1 -1
- package/dist/components/motion/expandable-action-bar.js +1 -1
- package/dist/components/motion/expandable-action-bar.js.map +1 -1
- package/dist/components/motion/expandable-control.d.ts +4 -5
- package/dist/components/motion/expandable-control.d.ts.map +1 -1
- package/dist/components/motion/expandable-control.js +1 -1
- package/dist/components/motion/expandable-control.js.map +1 -1
- package/dist/components/motion/expandable-tabs.d.ts +4 -5
- package/dist/components/motion/expandable-tabs.d.ts.map +1 -1
- package/dist/components/motion/expandable-tabs.js +1 -1
- package/dist/components/motion/expandable-tabs.js.map +1 -1
- package/dist/components/motion/expanding-arrow-button.d.ts +2 -3
- package/dist/components/motion/expanding-arrow-button.d.ts.map +1 -1
- package/dist/components/motion/expanding-arrow-button.js +1 -1
- package/dist/components/motion/expanding-arrow-button.js.map +1 -1
- package/dist/components/motion/feedback-widget.d.ts +3 -4
- package/dist/components/motion/feedback-widget.d.ts.map +1 -1
- package/dist/components/motion/feedback-widget.js +1 -1
- package/dist/components/motion/feedback-widget.js.map +1 -1
- package/dist/components/motion/file-tree.d.ts +7 -8
- package/dist/components/motion/file-tree.d.ts.map +1 -1
- package/dist/components/motion/file-tree.js +1 -1
- package/dist/components/motion/file-tree.js.map +1 -1
- package/dist/components/motion/file-upload.d.ts +7 -8
- package/dist/components/motion/file-upload.d.ts.map +1 -1
- package/dist/components/motion/file-upload.js +1 -1
- package/dist/components/motion/file-upload.js.map +1 -1
- package/dist/components/motion/hold-action-button.d.ts +2 -3
- package/dist/components/motion/hold-action-button.d.ts.map +1 -1
- package/dist/components/motion/hold-action-button.js +1 -1
- package/dist/components/motion/hold-action-button.js.map +1 -1
- package/dist/components/motion/infinite-masonry.d.ts +3 -4
- package/dist/components/motion/infinite-masonry.d.ts.map +1 -1
- package/dist/components/motion/infinite-masonry.js +1 -1
- package/dist/components/motion/infinite-masonry.js.map +1 -1
- package/dist/components/motion/input.d.ts +3 -4
- package/dist/components/motion/input.d.ts.map +1 -1
- package/dist/components/motion/input.js +1 -1
- package/dist/components/motion/input.js.map +1 -1
- package/dist/components/motion/liquid.d.ts +6 -7
- package/dist/components/motion/liquid.d.ts.map +1 -1
- package/dist/components/motion/liquid.js +1 -1
- package/dist/components/motion/liquid.js.map +1 -1
- package/dist/components/motion/loader.d.ts +3 -4
- package/dist/components/motion/loader.d.ts.map +1 -1
- package/dist/components/motion/loader.js +1 -1
- package/dist/components/motion/loader.js.map +1 -1
- package/dist/components/motion/magnetic.d.ts +2 -3
- package/dist/components/motion/magnetic.d.ts.map +1 -1
- package/dist/components/motion/magnetic.js +1 -1
- package/dist/components/motion/magnetic.js.map +1 -1
- package/dist/components/motion/marquee.d.ts +2 -3
- package/dist/components/motion/marquee.d.ts.map +1 -1
- package/dist/components/motion/marquee.js +1 -1
- package/dist/components/motion/marquee.js.map +1 -1
- package/dist/components/motion/morphing-modal.d.ts +2 -3
- package/dist/components/motion/morphing-modal.d.ts.map +1 -1
- package/dist/components/motion/morphing-modal.js +1 -1
- package/dist/components/motion/morphing-modal.js.map +1 -1
- package/dist/components/motion/morphing-search.d.ts +3 -4
- package/dist/components/motion/morphing-search.d.ts.map +1 -1
- package/dist/components/motion/morphing-search.js +1 -1
- package/dist/components/motion/morphing-search.js.map +1 -1
- package/dist/components/motion/morphing-tabs.d.ts +4 -5
- package/dist/components/motion/morphing-tabs.d.ts.map +1 -1
- package/dist/components/motion/morphing-tabs.js +1 -1
- package/dist/components/motion/morphing-tabs.js.map +1 -1
- package/dist/components/motion/multi-select/content.d.ts +2 -3
- package/dist/components/motion/multi-select/content.d.ts.map +1 -1
- package/dist/components/motion/multi-select/content.js +1 -1
- package/dist/components/motion/multi-select/content.js.map +1 -1
- package/dist/components/motion/multi-select/context.d.ts +9 -10
- package/dist/components/motion/multi-select/context.d.ts.map +1 -1
- package/dist/components/motion/multi-select/context.js +1 -1
- package/dist/components/motion/multi-select/context.js.map +1 -1
- package/dist/components/motion/multi-select/list.d.ts +12 -13
- package/dist/components/motion/multi-select/list.d.ts.map +1 -1
- package/dist/components/motion/multi-select/list.js +1 -1
- package/dist/components/motion/multi-select/list.js.map +1 -1
- package/dist/components/motion/multi-select/trigger.d.ts +6 -7
- package/dist/components/motion/multi-select/trigger.d.ts.map +1 -1
- package/dist/components/motion/multi-select/trigger.js +1 -1
- package/dist/components/motion/multi-select/trigger.js.map +1 -1
- package/dist/components/motion/not-found/glitch.d.ts +1 -2
- package/dist/components/motion/not-found/glitch.d.ts.map +1 -1
- package/dist/components/motion/not-found/magnetic.d.ts +1 -2
- package/dist/components/motion/not-found/magnetic.d.ts.map +1 -1
- package/dist/components/motion/not-found/magnetic.js +1 -1
- package/dist/components/motion/not-found/magnetic.js.map +1 -1
- package/dist/components/motion/not-found/shared.d.ts +4 -5
- package/dist/components/motion/not-found/shared.d.ts.map +1 -1
- package/dist/components/motion/not-found/shared.js +1 -1
- package/dist/components/motion/not-found/shared.js.map +1 -1
- package/dist/components/motion/not-found/spotlight.d.ts +1 -2
- package/dist/components/motion/not-found/spotlight.d.ts.map +1 -1
- package/dist/components/motion/not-found/spotlight.js +1 -1
- package/dist/components/motion/not-found/spotlight.js.map +1 -1
- package/dist/components/motion/not-found/stacked.d.ts +1 -2
- package/dist/components/motion/not-found/stacked.d.ts.map +1 -1
- package/dist/components/motion/not-found/terminal.d.ts +1 -2
- package/dist/components/motion/not-found/terminal.d.ts.map +1 -1
- package/dist/components/motion/notification-stack.d.ts +4 -5
- package/dist/components/motion/notification-stack.d.ts.map +1 -1
- package/dist/components/motion/notification-stack.js +1 -1
- package/dist/components/motion/notification-stack.js.map +1 -1
- package/dist/components/motion/number-ticker.d.ts +2 -3
- package/dist/components/motion/number-ticker.d.ts.map +1 -1
- package/dist/components/motion/number-ticker.js +1 -1
- package/dist/components/motion/number-ticker.js.map +1 -1
- package/dist/components/motion/otp-input.d.ts +3 -4
- package/dist/components/motion/otp-input.d.ts.map +1 -1
- package/dist/components/motion/otp-input.js +1 -1
- package/dist/components/motion/otp-input.js.map +1 -1
- package/dist/components/motion/overflow-actions.d.ts +5 -6
- package/dist/components/motion/overflow-actions.d.ts.map +1 -1
- package/dist/components/motion/overflow-actions.js +1 -1
- package/dist/components/motion/overflow-actions.js.map +1 -1
- package/dist/components/motion/parallax.d.ts +2 -3
- package/dist/components/motion/parallax.d.ts.map +1 -1
- package/dist/components/motion/parallax.js +1 -1
- package/dist/components/motion/parallax.js.map +1 -1
- package/dist/components/motion/popover-morph.d.ts +6 -7
- package/dist/components/motion/popover-morph.d.ts.map +1 -1
- package/dist/components/motion/popover-morph.js +1 -1
- package/dist/components/motion/popover-morph.js.map +1 -1
- package/dist/components/motion/popover.d.ts +6 -7
- package/dist/components/motion/popover.d.ts.map +1 -1
- package/dist/components/motion/popover.js +1 -1
- package/dist/components/motion/popover.js.map +1 -1
- package/dist/components/motion/preview-rail.d.ts +3 -4
- package/dist/components/motion/preview-rail.d.ts.map +1 -1
- package/dist/components/motion/preview-rail.js +1 -1
- package/dist/components/motion/preview-rail.js.map +1 -1
- package/dist/components/motion/project-folder.d.ts +3 -4
- package/dist/components/motion/project-folder.d.ts.map +1 -1
- package/dist/components/motion/project-folder.js +1 -1
- package/dist/components/motion/project-folder.js.map +1 -1
- package/dist/components/motion/pull-to-refresh.d.ts +3 -4
- package/dist/components/motion/pull-to-refresh.d.ts.map +1 -1
- package/dist/components/motion/pull-to-refresh.js +1 -1
- package/dist/components/motion/pull-to-refresh.js.map +1 -1
- package/dist/components/motion/radio.d.ts +4 -5
- package/dist/components/motion/radio.d.ts.map +1 -1
- package/dist/components/motion/radio.js +1 -1
- package/dist/components/motion/radio.js.map +1 -1
- package/dist/components/motion/range-slider-bubble.d.ts +2 -3
- package/dist/components/motion/range-slider-bubble.d.ts.map +1 -1
- package/dist/components/motion/range-slider-bubble.js +1 -1
- package/dist/components/motion/range-slider-bubble.js.map +1 -1
- package/dist/components/motion/range-slider-fluid.d.ts +2 -3
- package/dist/components/motion/range-slider-fluid.d.ts.map +1 -1
- package/dist/components/motion/range-slider-fluid.js +1 -1
- package/dist/components/motion/range-slider-fluid.js.map +1 -1
- package/dist/components/motion/range-slider-ruler.d.ts +2 -3
- package/dist/components/motion/range-slider-ruler.d.ts.map +1 -1
- package/dist/components/motion/range-slider-ruler.js +1 -1
- package/dist/components/motion/range-slider-ruler.js.map +1 -1
- package/dist/components/motion/range-slider-wave.d.ts +2 -3
- package/dist/components/motion/range-slider-wave.d.ts.map +1 -1
- package/dist/components/motion/range-slider-wave.js +1 -1
- package/dist/components/motion/range-slider-wave.js.map +1 -1
- package/dist/components/motion/range-slider.d.ts +2 -3
- package/dist/components/motion/range-slider.d.ts.map +1 -1
- package/dist/components/motion/range-slider.js +1 -1
- package/dist/components/motion/range-slider.js.map +1 -1
- package/dist/components/motion/scroll-progress.d.ts +4 -5
- package/dist/components/motion/scroll-progress.d.ts.map +1 -1
- package/dist/components/motion/scroll-progress.js +1 -1
- package/dist/components/motion/scroll-progress.js.map +1 -1
- package/dist/components/motion/scroll-reveal.d.ts +2 -3
- package/dist/components/motion/scroll-reveal.d.ts.map +1 -1
- package/dist/components/motion/scroll-reveal.js +1 -1
- package/dist/components/motion/scroll-reveal.js.map +1 -1
- package/dist/components/motion/scroll-to.d.ts +2 -3
- package/dist/components/motion/scroll-to.d.ts.map +1 -1
- package/dist/components/motion/scroll-to.js +1 -1
- package/dist/components/motion/scroll-to.js.map +1 -1
- package/dist/components/motion/select-morph.d.ts +10 -11
- package/dist/components/motion/select-morph.d.ts.map +1 -1
- package/dist/components/motion/select-morph.js +1 -1
- package/dist/components/motion/select-morph.js.map +1 -1
- package/dist/components/motion/select.d.ts +10 -11
- package/dist/components/motion/select.d.ts.map +1 -1
- package/dist/components/motion/select.js +1 -1
- package/dist/components/motion/select.js.map +1 -1
- package/dist/components/motion/shader-background.d.ts +4 -5
- package/dist/components/motion/shader-background.d.ts.map +1 -1
- package/dist/components/motion/shader-background.js +1 -1
- package/dist/components/motion/shader-background.js.map +1 -1
- package/dist/components/motion/shared-layout-bg.d.ts +2 -3
- package/dist/components/motion/shared-layout-bg.d.ts.map +1 -1
- package/dist/components/motion/shared-layout-bg.js +1 -1
- package/dist/components/motion/shared-layout-bg.js.map +1 -1
- package/dist/components/motion/signup-form.d.ts +7 -8
- package/dist/components/motion/signup-form.d.ts.map +1 -1
- package/dist/components/motion/signup-form.js +1 -1
- package/dist/components/motion/signup-form.js.map +1 -1
- package/dist/components/motion/slide-action-button.d.ts +2 -3
- package/dist/components/motion/slide-action-button.d.ts.map +1 -1
- package/dist/components/motion/slide-action-button.js +1 -1
- package/dist/components/motion/slide-action-button.js.map +1 -1
- package/dist/components/motion/smooth-scroll.d.ts +6 -7
- package/dist/components/motion/smooth-scroll.d.ts.map +1 -1
- package/dist/components/motion/swipeable-list.d.ts +8 -9
- package/dist/components/motion/swipeable-list.d.ts.map +1 -1
- package/dist/components/motion/swipeable-list.js +1 -1
- package/dist/components/motion/swipeable-list.js.map +1 -1
- package/dist/components/motion/switch.d.ts +2 -3
- package/dist/components/motion/switch.d.ts.map +1 -1
- package/dist/components/motion/switch.js +1 -1
- package/dist/components/motion/switch.js.map +1 -1
- package/dist/components/motion/table/editable-cell.d.ts +1 -2
- package/dist/components/motion/table/editable-cell.d.ts.map +1 -1
- package/dist/components/motion/table/index.d.ts +2 -2
- package/dist/components/motion/table/index.d.ts.map +1 -1
- package/dist/components/motion/table/index.js +1 -1
- package/dist/components/motion/table/index.js.map +1 -1
- package/dist/components/motion/table/row-handle.d.ts +1 -2
- package/dist/components/motion/table/row-handle.d.ts.map +1 -1
- package/dist/components/motion/table/skeleton-rows.d.ts +1 -2
- package/dist/components/motion/table/skeleton-rows.d.ts.map +1 -1
- package/dist/components/motion/table/skeleton-rows.js +1 -1
- package/dist/components/motion/table/skeleton-rows.js.map +1 -1
- package/dist/components/motion/table/table-header.d.ts +2 -3
- package/dist/components/motion/table/table-header.d.ts.map +1 -1
- package/dist/components/motion/table/table-header.js +1 -1
- package/dist/components/motion/table/table-header.js.map +1 -1
- package/dist/components/motion/table/table-menu.d.ts +2 -3
- package/dist/components/motion/table/table-menu.d.ts.map +1 -1
- package/dist/components/motion/table/table-menu.js +1 -1
- package/dist/components/motion/table/table-menu.js.map +1 -1
- package/dist/components/motion/tabs.d.ts +4 -5
- package/dist/components/motion/tabs.d.ts.map +1 -1
- package/dist/components/motion/tabs.js +1 -1
- package/dist/components/motion/tabs.js.map +1 -1
- package/dist/components/motion/text-cascade.d.ts +2 -3
- package/dist/components/motion/text-cascade.d.ts.map +1 -1
- package/dist/components/motion/text-reveal.d.ts +2 -3
- package/dist/components/motion/text-reveal.d.ts.map +1 -1
- package/dist/components/motion/text-reveal.js +1 -1
- package/dist/components/motion/text-reveal.js.map +1 -1
- package/dist/components/motion/text-scramble.d.ts +2 -3
- package/dist/components/motion/text-scramble.d.ts.map +1 -1
- package/dist/components/motion/text-scramble.js +1 -1
- package/dist/components/motion/text-scramble.js.map +1 -1
- package/dist/components/motion/text-shimmer.d.ts +2 -3
- package/dist/components/motion/text-shimmer.d.ts.map +1 -1
- package/dist/components/motion/text-shimmer.js +1 -1
- package/dist/components/motion/text-shimmer.js.map +1 -1
- package/dist/components/motion/theme-toggle.d.ts +5 -6
- package/dist/components/motion/theme-toggle.d.ts.map +1 -1
- package/dist/components/motion/theme-toggle.js +1 -1
- package/dist/components/motion/theme-toggle.js.map +1 -1
- package/dist/components/motion/tilt-card.d.ts +2 -3
- package/dist/components/motion/tilt-card.d.ts.map +1 -1
- package/dist/components/motion/tilt-card.js +1 -1
- package/dist/components/motion/tilt-card.js.map +1 -1
- package/dist/components/motion/tooltip.d.ts +2 -3
- package/dist/components/motion/tooltip.d.ts.map +1 -1
- package/dist/components/motion/tooltip.js +1 -1
- package/dist/components/motion/tooltip.js.map +1 -1
- package/dist/components/motion/wheel-picker.d.ts +3 -4
- package/dist/components/motion/wheel-picker.d.ts.map +1 -1
- package/dist/components/motion/wheel-picker.js +1 -1
- package/dist/components/motion/wheel-picker.js.map +1 -1
- package/dist/components/reui/alert.d.ts.map +1 -1
- package/dist/components/reui/alert.js +1 -1
- package/dist/components/reui/alert.js.map +1 -1
- package/dist/components/reui/autocomplete.d.ts +2 -2
- package/dist/components/reui/autocomplete.d.ts.map +1 -1
- package/dist/components/reui/autocomplete.js +1 -1
- package/dist/components/reui/autocomplete.js.map +1 -1
- package/dist/components/reui/badge.d.ts +1 -1
- package/dist/components/reui/badge.d.ts.map +1 -1
- package/dist/components/reui/badge.js +1 -1
- package/dist/components/reui/badge.js.map +1 -1
- package/dist/components/reui/cascader/cascader-async.d.ts +8 -9
- package/dist/components/reui/cascader/cascader-async.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-columns.d.ts +3 -3
- package/dist/components/reui/cascader/cascader-columns.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-columns.js +1 -1
- package/dist/components/reui/cascader/cascader-columns.js.map +1 -1
- package/dist/components/reui/cascader/cascader-context.d.ts +13 -13
- package/dist/components/reui/cascader/cascader-context.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-footer.d.ts +8 -8
- package/dist/components/reui/cascader/cascader-footer.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-footer.js +1 -1
- package/dist/components/reui/cascader/cascader-footer.js.map +1 -1
- package/dist/components/reui/cascader/cascader-i18n.d.ts +3 -4
- package/dist/components/reui/cascader/cascader-i18n.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-item.d.ts +9 -9
- package/dist/components/reui/cascader/cascader-item.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-item.js +1 -1
- package/dist/components/reui/cascader/cascader-item.js.map +1 -1
- package/dist/components/reui/cascader/cascader-lib.d.ts +38 -39
- package/dist/components/reui/cascader/cascader-lib.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-nav.d.ts +6 -6
- package/dist/components/reui/cascader/cascader-nav.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-nav.js +1 -1
- package/dist/components/reui/cascader/cascader-nav.js.map +1 -1
- package/dist/components/reui/cascader/cascader-virtual.d.ts +6 -6
- package/dist/components/reui/cascader/cascader-virtual.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader.d.ts +19 -19
- package/dist/components/reui/cascader/cascader.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader.js +1 -1
- package/dist/components/reui/cascader/cascader.js.map +1 -1
- package/dist/components/reui/code-block/code-block-highlight.d.ts +32 -33
- package/dist/components/reui/code-block/code-block-highlight.d.ts.map +1 -1
- package/dist/components/reui/code-block/code-block.d.ts +7 -7
- package/dist/components/reui/code-block/code-block.d.ts.map +1 -1
- package/dist/components/reui/code-block/code-block.js +1 -1
- package/dist/components/reui/code-block/code-block.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-cell-selection.js +1 -1
- package/dist/components/reui/data-grid/data-grid-cell-selection.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-column-filter.js +1 -1
- package/dist/components/reui/data-grid/data-grid-column-filter.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-column-header.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-column-header.js +9 -6
- package/dist/components/reui/data-grid/data-grid-column-header.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-i18n.d.ts +1 -1
- package/dist/components/reui/data-grid/data-grid-i18n.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-pagination.js +1 -1
- package/dist/components/reui/data-grid/data-grid-pagination.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-scroll-area.js +1 -1
- package/dist/components/reui/data-grid/data-grid-scroll-area.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js +1 -1
- package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-virtual.js +1 -1
- package/dist/components/reui/data-grid/data-grid-table-virtual.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table.js +1 -1
- package/dist/components/reui/data-grid/data-grid-table.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid.d.ts +28 -28
- package/dist/components/reui/data-grid/data-grid.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid.js +1 -1
- package/dist/components/reui/data-grid/data-grid.js.map +1 -1
- package/dist/components/reui/date-selector.d.ts +11 -12
- package/dist/components/reui/date-selector.d.ts.map +1 -1
- package/dist/components/reui/date-selector.js +1 -1
- package/dist/components/reui/date-selector.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-agenda-view.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-agenda-view.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-content.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-content.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-event.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-event.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-month-view.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-month-view.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-nav.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-nav.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-resource-view.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-resource-view.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-time-grid.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-time-grid.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar.d.ts.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar.js.map +1 -1
- package/dist/components/reui/filters/filters-advanced.d.ts +6 -7
- package/dist/components/reui/filters/filters-advanced.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-advanced.js +1 -1
- package/dist/components/reui/filters/filters-advanced.js.map +1 -1
- package/dist/components/reui/filters/filters-builder.d.ts +5 -5
- package/dist/components/reui/filters/filters-builder.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-builder.js +1 -1
- package/dist/components/reui/filters/filters-builder.js.map +1 -1
- package/dist/components/reui/filters/filters-chip.d.ts +10 -11
- package/dist/components/reui/filters/filters-chip.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-chip.js +1 -1
- package/dist/components/reui/filters/filters-chip.js.map +1 -1
- package/dist/components/reui/filters/filters-context.d.ts +30 -30
- package/dist/components/reui/filters/filters-context.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-date.d.ts +13 -14
- package/dist/components/reui/filters/filters-date.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-dnd.d.ts +15 -16
- package/dist/components/reui/filters/filters-dnd.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-editors.d.ts +14 -14
- package/dist/components/reui/filters/filters-editors.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-editors.js +1 -1
- package/dist/components/reui/filters/filters-editors.js.map +1 -1
- package/dist/components/reui/filters/filters-i18n.d.ts +4 -5
- package/dist/components/reui/filters/filters-i18n.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-lib.d.ts +34 -35
- package/dist/components/reui/filters/filters-lib.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-operators.d.ts +13 -14
- package/dist/components/reui/filters/filters-operators.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-query.d.ts +29 -30
- package/dist/components/reui/filters/filters-query.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-types.d.ts +31 -32
- package/dist/components/reui/filters/filters-types.d.ts.map +1 -1
- package/dist/components/reui/filters/filters.d.ts +5 -5
- package/dist/components/reui/filters/filters.d.ts.map +1 -1
- package/dist/components/reui/filters/filters.js +1 -1
- package/dist/components/reui/filters/filters.js.map +1 -1
- package/dist/components/reui/frame.d.ts +1 -1
- package/dist/components/reui/frame.d.ts.map +1 -1
- package/dist/components/reui/frame.js +1 -1
- package/dist/components/reui/frame.js.map +1 -1
- package/dist/components/reui/gantt/gantt-bar.js +1 -1
- package/dist/components/reui/gantt/gantt-bar.js.map +1 -1
- package/dist/components/reui/gantt/gantt-nav.js +1 -1
- package/dist/components/reui/gantt/gantt-nav.js.map +1 -1
- package/dist/components/reui/gantt/gantt-view.js +1 -1
- package/dist/components/reui/gantt/gantt-view.js.map +1 -1
- package/dist/components/reui/gantt/gantt.d.ts.map +1 -1
- package/dist/components/reui/gantt/gantt.js +1 -1
- package/dist/components/reui/gantt/gantt.js.map +1 -1
- package/dist/components/reui/icon-stack.js +1 -1
- package/dist/components/reui/icon-stack.js.map +1 -1
- package/dist/components/reui/icon-tile.d.ts.map +1 -1
- package/dist/components/reui/icon-tile.js +1 -1
- package/dist/components/reui/icon-tile.js.map +1 -1
- package/dist/components/reui/kanban.d.ts +11 -11
- package/dist/components/reui/kanban.d.ts.map +1 -1
- package/dist/components/reui/kanban.js +1 -1
- package/dist/components/reui/kanban.js.map +1 -1
- package/dist/components/reui/number-field.js +1 -1
- package/dist/components/reui/number-field.js.map +1 -1
- package/dist/components/reui/phone-input.js +1 -1
- package/dist/components/reui/phone-input.js.map +1 -1
- package/dist/components/reui/rating.d.ts.map +1 -1
- package/dist/components/reui/rating.js +1 -1
- package/dist/components/reui/rating.js.map +1 -1
- package/dist/components/reui/scrollspy.d.ts +1 -2
- package/dist/components/reui/scrollspy.d.ts.map +1 -1
- package/dist/components/reui/sortable.d.ts +6 -6
- package/dist/components/reui/sortable.d.ts.map +1 -1
- package/dist/components/reui/sortable.js +1 -1
- package/dist/components/reui/sortable.js.map +1 -1
- package/dist/components/reui/stepper.d.ts.map +1 -1
- package/dist/components/reui/stepper.js +1 -1
- package/dist/components/reui/stepper.js.map +1 -1
- package/dist/components/reui/timeline.d.ts.map +1 -1
- package/dist/components/reui/timeline.js +1 -1
- package/dist/components/reui/timeline.js.map +1 -1
- package/dist/components/reui/tree.d.ts.map +1 -1
- package/dist/components/reui/tree.js +1 -1
- package/dist/components/reui/tree.js.map +1 -1
- package/dist/components/ui/accordion.d.ts.map +1 -1
- package/dist/components/ui/accordion.js +1 -1
- package/dist/components/ui/accordion.js.map +1 -1
- package/dist/components/ui/alert-dialog.js +1 -1
- package/dist/components/ui/alert-dialog.js.map +1 -1
- package/dist/components/ui/alert.d.ts.map +1 -1
- package/dist/components/ui/alert.js +1 -1
- package/dist/components/ui/alert.js.map +1 -1
- package/dist/components/ui/aspect-ratio.js +1 -1
- package/dist/components/ui/aspect-ratio.js.map +1 -1
- package/dist/components/ui/attachment.js +1 -1
- package/dist/components/ui/attachment.js.map +1 -1
- package/dist/components/ui/avatar.d.ts.map +1 -1
- package/dist/components/ui/avatar.js +1 -1
- package/dist/components/ui/avatar.js.map +1 -1
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/badge.d.ts.map +1 -1
- package/dist/components/ui/badge.js +1 -1
- package/dist/components/ui/badge.js.map +1 -1
- package/dist/components/ui/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/breadcrumb.js +1 -1
- package/dist/components/ui/breadcrumb.js.map +1 -1
- package/dist/components/ui/bubble.d.ts +1 -1
- package/dist/components/ui/bubble.d.ts.map +1 -1
- package/dist/components/ui/bubble.js +1 -1
- package/dist/components/ui/bubble.js.map +1 -1
- package/dist/components/ui/button-group.js +1 -1
- package/dist/components/ui/button-group.js.map +1 -1
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/button.js +1 -1
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/calendar.js +1 -1
- package/dist/components/ui/calendar.js.map +1 -1
- package/dist/components/ui/card.d.ts.map +1 -1
- package/dist/components/ui/card.js +1 -1
- package/dist/components/ui/card.js.map +1 -1
- package/dist/components/ui/carousel.js +1 -1
- package/dist/components/ui/carousel.js.map +1 -1
- package/dist/components/ui/chart.d.ts +2 -2
- package/dist/components/ui/chart.d.ts.map +1 -1
- package/dist/components/ui/chart.js +1 -1
- package/dist/components/ui/chart.js.map +1 -1
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/checkbox.js +2 -2
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/combobox.js +1 -1
- package/dist/components/ui/combobox.js.map +1 -1
- package/dist/components/ui/command.js +1 -1
- package/dist/components/ui/command.js.map +1 -1
- package/dist/components/ui/context-menu.d.ts.map +1 -1
- package/dist/components/ui/context-menu.js +1 -1
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/dialog.js +1 -1
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/drawer.d.ts.map +1 -1
- package/dist/components/ui/drawer.js +1 -1
- package/dist/components/ui/drawer.js.map +1 -1
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.js +1 -1
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/ui/empty.d.ts.map +1 -1
- package/dist/components/ui/empty.js +1 -1
- package/dist/components/ui/empty.js.map +1 -1
- package/dist/components/ui/field.js +2 -2
- package/dist/components/ui/field.js.map +1 -1
- package/dist/components/ui/hover-card.d.ts.map +1 -1
- package/dist/components/ui/hover-card.js +1 -1
- package/dist/components/ui/hover-card.js.map +1 -1
- package/dist/components/ui/input-group.js +1 -1
- package/dist/components/ui/input-group.js.map +1 -1
- package/dist/components/ui/input-otp.d.ts.map +1 -1
- package/dist/components/ui/input-otp.js +1 -1
- package/dist/components/ui/input-otp.js.map +1 -1
- package/dist/components/ui/input.d.ts.map +1 -1
- package/dist/components/ui/input.js +1 -1
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/item.d.ts +2 -2
- package/dist/components/ui/item.js +1 -1
- package/dist/components/ui/item.js.map +1 -1
- package/dist/components/ui/kbd.js +1 -1
- package/dist/components/ui/kbd.js.map +1 -1
- package/dist/components/ui/label.d.ts.map +1 -1
- package/dist/components/ui/label.js +1 -1
- package/dist/components/ui/label.js.map +1 -1
- package/dist/components/ui/marker.d.ts +1 -1
- package/dist/components/ui/marker.d.ts.map +1 -1
- package/dist/components/ui/marker.js +1 -1
- package/dist/components/ui/marker.js.map +1 -1
- package/dist/components/ui/menubar.js +1 -1
- package/dist/components/ui/menubar.js.map +1 -1
- package/dist/components/ui/message-scroller.js +1 -1
- package/dist/components/ui/message-scroller.js.map +1 -1
- package/dist/components/ui/message.d.ts.map +1 -1
- package/dist/components/ui/message.js +1 -1
- package/dist/components/ui/message.js.map +1 -1
- package/dist/components/ui/native-select.d.ts.map +1 -1
- package/dist/components/ui/native-select.js +1 -1
- package/dist/components/ui/native-select.js.map +1 -1
- package/dist/components/ui/navigation-menu.d.ts.map +1 -1
- package/dist/components/ui/navigation-menu.js +1 -1
- package/dist/components/ui/navigation-menu.js.map +1 -1
- package/dist/components/ui/pagination.js +1 -1
- package/dist/components/ui/pagination.js.map +1 -1
- package/dist/components/ui/popover.d.ts.map +1 -1
- package/dist/components/ui/popover.js +1 -1
- package/dist/components/ui/popover.js.map +1 -1
- package/dist/components/ui/progress.d.ts.map +1 -1
- package/dist/components/ui/progress.js +1 -1
- package/dist/components/ui/progress.js.map +1 -1
- package/dist/components/ui/questionnaire.js +3 -3
- package/dist/components/ui/questionnaire.js.map +1 -1
- package/dist/components/ui/radio-group.d.ts.map +1 -1
- package/dist/components/ui/radio-group.js +2 -2
- package/dist/components/ui/radio-group.js.map +1 -1
- package/dist/components/ui/resizable.d.ts.map +1 -1
- package/dist/components/ui/resizable.js +1 -1
- package/dist/components/ui/resizable.js.map +1 -1
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.js +1 -1
- package/dist/components/ui/scroll-area.js.map +1 -1
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/select.js +1 -1
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/separator.d.ts.map +1 -1
- package/dist/components/ui/separator.js +1 -1
- package/dist/components/ui/separator.js.map +1 -1
- package/dist/components/ui/sheet.js +1 -1
- package/dist/components/ui/sheet.js.map +1 -1
- package/dist/components/ui/sidebar.d.ts +1 -1
- package/dist/components/ui/sidebar.js +1 -1
- package/dist/components/ui/sidebar.js.map +1 -1
- package/dist/components/ui/skeleton.js +1 -1
- package/dist/components/ui/skeleton.js.map +1 -1
- package/dist/components/ui/slider.d.ts.map +1 -1
- package/dist/components/ui/slider.js +1 -1
- package/dist/components/ui/slider.js.map +1 -1
- package/dist/components/ui/spinner.d.ts.map +1 -1
- package/dist/components/ui/spinner.js +1 -1
- package/dist/components/ui/spinner.js.map +1 -1
- package/dist/components/ui/switch.d.ts.map +1 -1
- package/dist/components/ui/switch.js +2 -2
- package/dist/components/ui/switch.js.map +1 -1
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/components/ui/table.js +1 -1
- package/dist/components/ui/table.js.map +1 -1
- package/dist/components/ui/tabs.d.ts +1 -1
- package/dist/components/ui/tabs.d.ts.map +1 -1
- package/dist/components/ui/tabs.js +1 -1
- package/dist/components/ui/tabs.js.map +1 -1
- package/dist/components/ui/textarea.d.ts.map +1 -1
- package/dist/components/ui/textarea.js +1 -1
- package/dist/components/ui/textarea.js.map +1 -1
- package/dist/components/ui/toast.js +2 -2
- package/dist/components/ui/toast.js.map +1 -1
- package/dist/components/ui/toggle-group.js +1 -1
- package/dist/components/ui/toggle-group.js.map +1 -1
- package/dist/components/ui/toggle.d.ts +1 -1
- package/dist/components/ui/toggle.d.ts.map +1 -1
- package/dist/components/ui/toggle.js +1 -1
- package/dist/components/ui/toggle.js.map +1 -1
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/components/ui/tooltip.js +1 -1
- package/dist/components/ui/tooltip.js.map +1 -1
- package/dist/{data-grid-i18n-52UUYPbr.d.ts → data-grid-i18n-TQR2PZlU.d.ts} +1 -13
- package/dist/data-grid-i18n-TQR2PZlU.d.ts.map +1 -0
- package/dist/hooks/use-body-classes.d.ts +1 -2
- package/dist/hooks/use-body-classes.d.ts.map +1 -1
- package/dist/hooks/use-copy-to-clipboard.d.ts +1 -2
- package/dist/hooks/use-copy-to-clipboard.d.ts.map +1 -1
- package/dist/hooks/use-dismiss.d.ts +3 -4
- package/dist/hooks/use-dismiss.d.ts.map +1 -1
- package/dist/hooks/use-favicon.d.ts +1 -2
- package/dist/hooks/use-favicon.d.ts.map +1 -1
- package/dist/hooks/use-file-upload.d.ts +7 -8
- package/dist/hooks/use-file-upload.d.ts.map +1 -1
- package/dist/hooks/use-hover-capable.d.ts +1 -2
- package/dist/hooks/use-hover-capable.d.ts.map +1 -1
- package/dist/hooks/use-hover-gesture.d.ts +2 -3
- package/dist/hooks/use-hover-gesture.d.ts.map +1 -1
- package/dist/hooks/use-hydrated.d.ts +1 -2
- package/dist/hooks/use-hydrated.d.ts.map +1 -1
- package/dist/hooks/use-intersection-observer.d.ts +1 -2
- package/dist/hooks/use-intersection-observer.d.ts.map +1 -1
- package/dist/hooks/use-is-mac.d.ts +1 -2
- package/dist/hooks/use-is-mac.d.ts.map +1 -1
- package/dist/hooks/use-media-query.d.ts +1 -2
- package/dist/hooks/use-media-query.d.ts.map +1 -1
- package/dist/hooks/use-meta-color.d.ts +1 -2
- package/dist/hooks/use-meta-color.d.ts.map +1 -1
- package/dist/hooks/use-mobile.d.ts +1 -2
- package/dist/hooks/use-mobile.d.ts.map +1 -1
- package/dist/hooks/use-mutation-observer.d.ts +1 -2
- package/dist/hooks/use-mutation-observer.d.ts.map +1 -1
- package/dist/hooks/use-on-open.d.ts +1 -2
- package/dist/hooks/use-on-open.d.ts.map +1 -1
- package/dist/hooks/use-row-cursor.d.ts +1 -2
- package/dist/hooks/use-row-cursor.d.ts.map +1 -1
- package/dist/hooks/use-scroll-position.d.ts +1 -2
- package/dist/hooks/use-scroll-position.d.ts.map +1 -1
- package/dist/hooks/use-slider-input.d.ts +1 -2
- package/dist/hooks/use-slider-input.d.ts.map +1 -1
- package/dist/hooks/use-slider.d.ts +3 -4
- package/dist/hooks/use-slider.d.ts.map +1 -1
- package/dist/hooks/use-tap-gesture.d.ts +3 -4
- package/dist/hooks/use-tap-gesture.d.ts.map +1 -1
- package/dist/hooks/use-touch-capable.d.ts +1 -2
- package/dist/hooks/use-touch-capable.d.ts.map +1 -1
- package/dist/hooks/use-viewport.d.ts +1 -2
- package/dist/hooks/use-viewport.d.ts.map +1 -1
- package/dist/lib/ease.d.ts +10 -11
- package/dist/lib/ease.d.ts.map +1 -1
- package/dist/lib/favicon.d.ts +1 -2
- package/dist/lib/favicon.d.ts.map +1 -1
- package/dist/lib/text-shimmer.d.ts +3 -4
- package/dist/lib/text-shimmer.d.ts.map +1 -1
- package/dist/lib/tick-sound.d.ts +1 -2
- package/dist/lib/tick-sound.d.ts.map +1 -1
- package/dist/lib/touch.d.ts +6 -7
- package/dist/lib/touch.d.ts.map +1 -1
- package/package.json +6 -4
- package/dist/data-grid-i18n-52UUYPbr.d.ts.map +0 -1
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* fixed day. An absolute pick still stores one day, because "on 14 August"
|
|
6
6
|
* does mean that day.
|
|
7
7
|
*/
|
|
8
|
-
interface FilterDateValue {
|
|
8
|
+
export interface FilterDateValue {
|
|
9
9
|
/** An absolute day, `yyyy-MM-dd`. Mutually exclusive with `relative`. */
|
|
10
10
|
date?: string;
|
|
11
11
|
/** A token re-resolved on every read. */
|
|
@@ -14,30 +14,29 @@ interface FilterDateValue {
|
|
|
14
14
|
time?: string;
|
|
15
15
|
}
|
|
16
16
|
/** A calendar offset from now, resolved at read time. */
|
|
17
|
-
interface FilterRelativeDate {
|
|
17
|
+
export interface FilterRelativeDate {
|
|
18
18
|
unit: "day" | "week" | "month" | "year";
|
|
19
19
|
offset: number;
|
|
20
20
|
}
|
|
21
|
-
declare const FILTER_DATE_FORMAT = "yyyy-MM-dd";
|
|
22
|
-
declare const RELATIVE_TODAY: FilterRelativeDate;
|
|
23
|
-
declare const RELATIVE_TOMORROW: FilterRelativeDate;
|
|
24
|
-
declare const RELATIVE_YESTERDAY: FilterRelativeDate;
|
|
25
|
-
declare const RELATIVE_NEXT_WEEK: FilterRelativeDate;
|
|
26
|
-
declare function applyFilterRelative(relative: FilterRelativeDate, now: Date): Date;
|
|
27
|
-
declare function resolveFilterDate(value: FilterDateValue | undefined, now?: Date): Date | null;
|
|
28
|
-
declare function toFilterDateValue(date: Date, time?: string): FilterDateValue;
|
|
21
|
+
export declare const FILTER_DATE_FORMAT = "yyyy-MM-dd";
|
|
22
|
+
export declare const RELATIVE_TODAY: FilterRelativeDate;
|
|
23
|
+
export declare const RELATIVE_TOMORROW: FilterRelativeDate;
|
|
24
|
+
export declare const RELATIVE_YESTERDAY: FilterRelativeDate;
|
|
25
|
+
export declare const RELATIVE_NEXT_WEEK: FilterRelativeDate;
|
|
26
|
+
export declare function applyFilterRelative(relative: FilterRelativeDate, now: Date): Date;
|
|
27
|
+
export declare function resolveFilterDate(value: FilterDateValue | undefined, now?: Date): Date | null;
|
|
28
|
+
export declare function toFilterDateValue(date: Date, time?: string): FilterDateValue;
|
|
29
29
|
/**
|
|
30
30
|
* Parses a typed phrase, or null when nothing matches. Relative phrasing gives
|
|
31
31
|
* a RELATIVE value and an explicit date an ABSOLUTE one; flattening the two is
|
|
32
32
|
* what freezes a saved view.
|
|
33
33
|
*/
|
|
34
|
-
declare function parseFilterDate(text: string, now?: Date): FilterDateValue | null;
|
|
34
|
+
export declare function parseFilterDate(text: string, now?: Date): FilterDateValue | null;
|
|
35
35
|
/**
|
|
36
36
|
* Human wording for a value. Relative values render as their phrase, not the
|
|
37
37
|
* resolved day, so a chip reading "is today" does not go stale tomorrow.
|
|
38
38
|
*/
|
|
39
|
-
declare function formatFilterDate(value: FilterDateValue | undefined, now?: Date, pattern?: string): string;
|
|
40
|
-
declare function isFilterTime(time: string): boolean;
|
|
39
|
+
export declare function formatFilterDate(value: FilterDateValue | undefined, now?: Date, pattern?: string): string;
|
|
40
|
+
export declare function isFilterTime(time: string): boolean;
|
|
41
41
|
//#endregion
|
|
42
|
-
export { FILTER_DATE_FORMAT, FilterDateValue, FilterRelativeDate, RELATIVE_NEXT_WEEK, RELATIVE_TODAY, RELATIVE_TOMORROW, RELATIVE_YESTERDAY, applyFilterRelative, formatFilterDate, isFilterTime, parseFilterDate, resolveFilterDate, toFilterDateValue };
|
|
43
42
|
//# sourceMappingURL=filters-date.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filters-date.d.ts","names":[],"sources":["../../../../src/components/reui/filters/filters-date.tsx"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"filters-date.d.ts","names":[],"sources":["../../../../src/components/reui/filters/filters-date.tsx"],"mappings":";;;;;;;iBAmBiB;;EAEf;;EAEA,WAAW;;EAEX;;;iBAIe;EACf;EACA;;qBAGW;qBAEA,gBAAgB;qBAChB,mBAAmB;qBACnB,oBAAoB;qBAIpB,oBAAoB;wBAKjB,oBAAoB,UAAU,oBAAoB,KAAK,OAAO;wBAQ9D,kBACd,OAAO,6BACP,MAAK,OACJ;wBAUa,kBAAkB,MAAM,MAAM,gBAAgB;;;;;;wBAiC9C,gBAAgB,cAAc,MAAK,OAAoB;;;;;wBAqEvD,iBACd,OAAO,6BACP,MAAK,MACL;wBAsBc,aAAa"}
|
|
@@ -5,7 +5,7 @@ import * as React$1 from "react";
|
|
|
5
5
|
* imported: filters installs on its own and must not pull a whole calendar into
|
|
6
6
|
* `shadcn add filters`. Vanilla-DOM overlay, so a drag renders no React.
|
|
7
7
|
*/
|
|
8
|
-
declare const FILTER_DND_ACTIVATION: {
|
|
8
|
+
export declare const FILTER_DND_ACTIVATION: {
|
|
9
9
|
/** Mouse travel before a press becomes a drag. Below this it stays a click. */
|
|
10
10
|
readonly moveDistancePx: 5;
|
|
11
11
|
/** Touch long-press before a drag starts, so a swipe still scrolls. */
|
|
@@ -17,13 +17,13 @@ declare const FILTER_DND_ACTIVATION: {
|
|
|
17
17
|
readonly carryPointerOffsetPx: 12;
|
|
18
18
|
};
|
|
19
19
|
/** One rule row, or one group's header row. Both are drag sources and targets. */
|
|
20
|
-
declare const FILTER_ROW_SELECTOR = "[data-slot=\"filter-row\"]";
|
|
20
|
+
export declare const FILTER_ROW_SELECTOR = "[data-slot=\"filter-row\"]";
|
|
21
21
|
/** Explicit "drop INSIDE": a row hit test can only ever say "beside". */
|
|
22
|
-
declare const FILTER_DROP_ZONE_SELECTOR = "[data-drop-parent]";
|
|
22
|
+
export declare const FILTER_DROP_ZONE_SELECTOR = "[data-drop-parent]";
|
|
23
23
|
/** Marked alongside the zone, so lighting the group costs no `:has()`. */
|
|
24
|
-
declare const FILTER_GROUP_SELECTOR = "[data-slot=\"filter-group\"]";
|
|
24
|
+
export declare const FILTER_GROUP_SELECTOR = "[data-slot=\"filter-group\"]";
|
|
25
25
|
/** Geometry only, so resolution is a pure function and a table test. */
|
|
26
|
-
interface FilterDropBox {
|
|
26
|
+
export interface FilterDropBox {
|
|
27
27
|
top: number;
|
|
28
28
|
bottom: number;
|
|
29
29
|
left: number;
|
|
@@ -35,7 +35,7 @@ interface FilterDropBox {
|
|
|
35
35
|
/** How many rows enclose this box. Deeper wins. */
|
|
36
36
|
depth: number;
|
|
37
37
|
}
|
|
38
|
-
interface FilterDropResolution<T extends FilterDropBox> {
|
|
38
|
+
export interface FilterDropResolution<T extends FilterDropBox> {
|
|
39
39
|
target: T;
|
|
40
40
|
/** Null for a zone: INTO the group rather than beside anything. */
|
|
41
41
|
edge: "before" | "after" | null;
|
|
@@ -51,16 +51,16 @@ interface FilterDropResolution<T extends FilterDropBox> {
|
|
|
51
51
|
* Half the gap makes siblings tile, and the depth sort keeps the child ahead of
|
|
52
52
|
* that group. Rows only: zones are explicit strips.
|
|
53
53
|
*/
|
|
54
|
-
declare const FILTER_ROW_SEAM_PX = 6;
|
|
54
|
+
export declare const FILTER_ROW_SEAM_PX = 6;
|
|
55
55
|
/**
|
|
56
56
|
* Zones before rows, then the DEEPEST box: a group's rect encloses everything
|
|
57
57
|
* it holds, so a nested condition would otherwise resolve to its whole group.
|
|
58
58
|
* `seam` is a parameter, not the constant inlined, so the tiling rule itself is
|
|
59
59
|
* a table test.
|
|
60
60
|
*/
|
|
61
|
-
declare function resolveFilterDrop<T extends FilterDropBox>(zones: T[], rows: T[], x: number, y: number, seam?: number): FilterDropResolution<T> | null;
|
|
61
|
+
export declare function resolveFilterDrop<T extends FilterDropBox>(zones: T[], rows: T[], x: number, y: number, seam?: number): FilterDropResolution<T> | null;
|
|
62
62
|
/** Where a dragged node started, which is what makes a drop a no-op or not. */
|
|
63
|
-
interface FilterDropOrigin {
|
|
63
|
+
export interface FilterDropOrigin {
|
|
64
64
|
parentId: string;
|
|
65
65
|
index: number;
|
|
66
66
|
}
|
|
@@ -68,21 +68,21 @@ interface FilterDropOrigin {
|
|
|
68
68
|
* Both indices name the slot the node already occupies, because
|
|
69
69
|
* `moveFilterNodeTo` closes the gap the detach leaves. Copy is never a no-op.
|
|
70
70
|
*/
|
|
71
|
-
declare function isFilterDropNoop(resolution: FilterDropResolution<FilterDropBox> | null, origin: FilterDropOrigin | null, copy: boolean): boolean;
|
|
71
|
+
export declare function isFilterDropNoop(resolution: FilterDropResolution<FilterDropBox> | null, origin: FilterDropOrigin | null, copy: boolean): boolean;
|
|
72
72
|
/** Cancel and fully revert every in-flight filter row drag. */
|
|
73
|
-
declare function cancelActiveFilterDrags(): void;
|
|
73
|
+
export declare function cancelActiveFilterDrags(): void;
|
|
74
74
|
/**
|
|
75
75
|
* Whether a drag ended within the last few frames. Exported: a consumer's own
|
|
76
76
|
* row click handler needs the same answer the suppressor below needs.
|
|
77
77
|
*/
|
|
78
|
-
declare function wasRecentFilterDrag(): boolean;
|
|
79
|
-
interface FilterDropDetails {
|
|
78
|
+
export declare function wasRecentFilterDrag(): boolean;
|
|
79
|
+
export interface FilterDropDetails {
|
|
80
80
|
parentId: string;
|
|
81
81
|
index: number;
|
|
82
82
|
/** Alt was held at release: copy the node rather than moving it. */
|
|
83
83
|
copy: boolean;
|
|
84
84
|
}
|
|
85
|
-
interface FilterRowDragOptions {
|
|
85
|
+
export interface FilterRowDragOptions {
|
|
86
86
|
/** The PANEL, not its body: the top-level append zone is in the footer. */
|
|
87
87
|
root: () => HTMLElement | null;
|
|
88
88
|
onDrop: (nodeId: string, details: FilterDropDetails) => void;
|
|
@@ -93,9 +93,8 @@ interface FilterRowDragOptions {
|
|
|
93
93
|
* not also be `draggable` and race the browser's HTML5 drag, with its ghost, no
|
|
94
94
|
* copy affordance and no way to report a drop into a nested target.
|
|
95
95
|
*/
|
|
96
|
-
declare function useFilterRowDrag(options: FilterRowDragOptions): (nodeId: string) => {
|
|
96
|
+
export declare function useFilterRowDrag(options: FilterRowDragOptions): (nodeId: string) => {
|
|
97
97
|
onPointerDown: (event: React$1.PointerEvent<HTMLElement>) => void;
|
|
98
98
|
};
|
|
99
99
|
//#endregion
|
|
100
|
-
export { FILTER_DND_ACTIVATION, FILTER_DROP_ZONE_SELECTOR, FILTER_GROUP_SELECTOR, FILTER_ROW_SEAM_PX, FILTER_ROW_SELECTOR, FilterDropBox, FilterDropDetails, FilterDropOrigin, FilterDropResolution, FilterRowDragOptions, cancelActiveFilterDrags, isFilterDropNoop, resolveFilterDrop, useFilterRowDrag, wasRecentFilterDrag };
|
|
101
100
|
//# sourceMappingURL=filters-dnd.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filters-dnd.d.ts","names":[],"sources":["../../../../src/components/reui/filters/filters-dnd.tsx"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"filters-dnd.d.ts","names":[],"sources":["../../../../src/components/reui/filters/filters-dnd.tsx"],"mappings":";;;;;;;qBASa;;;;;;;;;;;;qBAaA;;qBAGA;;qBAGA;;iBAGI;EACf;EACA;EACA;EACA;;EAEA;;EAEA;;EAEA;;iBAGe,qBAAqB,UAAU;EAC9C,QAAQ;;EAER;;;;;;;;;;;;;qBAkBW;;;;;;;wBAQG,kBAAkB,UAAU,eAC1C,OAAO,KACP,MAAM,KACN,WACA,WACA,gBACC,qBAAqB;;iBAyBP;EACf;EACA;;;;;;wBAOc,iBACd,YAAY,qBAAqB,uBACjC,QAAQ,yBACR;;wBAWc;;;;;wBAUA;iBAiIC;EACf;EACA;;EAEA;;iBAGe;;EAEf,YAAY;EACZ,SAAS,gBAAgB,SAAS;EAClC;;;;;;;wBA2Xc,iBAAiB,SAAS,wBAAoB;EAcjC,gBAAA,OAAA,QAAM,aAAa"}
|
|
@@ -8,18 +8,18 @@ import * as React$1 from "react";
|
|
|
8
8
|
* in an EFFECT, plus the root's `FilterResolutionStore`, without which a
|
|
9
9
|
* `loadOptions`-only field showed its raw id once the menu closed.
|
|
10
10
|
*/
|
|
11
|
-
declare function useFilterOptions<V, O>(field: FilterField<V, O> | undefined, enabled: boolean, debounceMs?: number): FilterOptionsState<O>;
|
|
11
|
+
export declare function useFilterOptions<V, O>(field: FilterField<V, O> | undefined, enabled: boolean, debounceMs?: number): FilterOptionsState<O>;
|
|
12
12
|
/**
|
|
13
13
|
* Resolves committed values no loaded page covered, through `resolveValues`: a
|
|
14
14
|
* restored saved view holds ids the loader never returned. The claim set marks
|
|
15
15
|
* an omitted id asked, so only a REJECTED resolve lets a later mount retry.
|
|
16
16
|
*/
|
|
17
|
-
declare function useFilterValueResolution<V, O>(field: FilterField<V, O> | undefined, values: readonly unknown[]): void;
|
|
18
|
-
declare function FilterTextEditor<V, O>({ value, onValueChange, commit, cancel, autoFocusProps, labels, host, field }: FilterEditorProps<V, O>): React$1.JSX.Element;
|
|
19
|
-
declare function FilterNumberEditor<V, O>({ value, onValueChange, commit, cancel, autoFocusProps, labels, host, field }: FilterEditorProps<V, O>): React$1.JSX.Element;
|
|
20
|
-
declare function FilterRangeEditor<V, O>({ value, onValueChange, commit, cancel, autoFocusProps, labels, host, field }: FilterEditorProps<V, O>): React$1.JSX.Element;
|
|
17
|
+
export declare function useFilterValueResolution<V, O>(field: FilterField<V, O> | undefined, values: readonly unknown[]): void;
|
|
18
|
+
export declare function FilterTextEditor<V, O>({ value, onValueChange, commit, cancel, autoFocusProps, labels, host, field }: FilterEditorProps<V, O>): React$1.JSX.Element;
|
|
19
|
+
export declare function FilterNumberEditor<V, O>({ value, onValueChange, commit, cancel, autoFocusProps, labels, host, field }: FilterEditorProps<V, O>): React$1.JSX.Element;
|
|
20
|
+
export declare function FilterRangeEditor<V, O>({ value, onValueChange, commit, cancel, autoFocusProps, labels, host, field }: FilterEditorProps<V, O>): React$1.JSX.Element;
|
|
21
21
|
/** One row. The shape both the operator menu and the option editors hand over. */
|
|
22
|
-
interface FilterListItem {
|
|
22
|
+
export interface FilterListItem {
|
|
23
23
|
value: string;
|
|
24
24
|
label: string;
|
|
25
25
|
icon?: React$1.ReactNode;
|
|
@@ -33,7 +33,7 @@ interface FilterListItem {
|
|
|
33
33
|
*/
|
|
34
34
|
exclusive?: boolean;
|
|
35
35
|
}
|
|
36
|
-
interface FilterMenuProps {
|
|
36
|
+
export interface FilterMenuProps {
|
|
37
37
|
items: FilterListItem[];
|
|
38
38
|
/** Committed values. Drives the check mark and the pinned group. */
|
|
39
39
|
selected: string[];
|
|
@@ -75,17 +75,17 @@ interface FilterMenuProps {
|
|
|
75
75
|
* brings the typeahead, RTL handling and live region with it. Only the pinning
|
|
76
76
|
* and the paging affordance stay out here.
|
|
77
77
|
*/
|
|
78
|
-
declare function FilterMenu({ items, selected, multiple, onSelectionChange, labels, ariaLabel, searchPlaceholder, searchable, maxHeight, pinSelected, sortSelected, preFiltered, autoFocusProps, query, onQueryChange, state }: FilterMenuProps): React$1.JSX.Element;
|
|
79
|
-
declare function FilterSelectEditor<V, O>(props: FilterEditorProps<V, O>): React$1.JSX.Element;
|
|
80
|
-
declare function FilterMultiSelectEditor<V, O>(props: FilterEditorProps<V, O>): React$1.JSX.Element;
|
|
81
|
-
declare function FilterBooleanEditor<V, O>({ value, onValueChange, commit, labels, autoFocusProps, field }: FilterEditorProps<V, O>): React$1.JSX.Element;
|
|
82
|
-
declare const DEFAULT_FILTER_EDITORS: FilterEditorRegistry;
|
|
78
|
+
export declare function FilterMenu({ items, selected, multiple, onSelectionChange, labels, ariaLabel, searchPlaceholder, searchable, maxHeight, pinSelected, sortSelected, preFiltered, autoFocusProps, query, onQueryChange, state }: FilterMenuProps): React$1.JSX.Element;
|
|
79
|
+
export declare function FilterSelectEditor<V, O>(props: FilterEditorProps<V, O>): React$1.JSX.Element;
|
|
80
|
+
export declare function FilterMultiSelectEditor<V, O>(props: FilterEditorProps<V, O>): React$1.JSX.Element;
|
|
81
|
+
export declare function FilterBooleanEditor<V, O>({ value, onValueChange, commit, labels, autoFocusProps, field }: FilterEditorProps<V, O>): React$1.JSX.Element;
|
|
82
|
+
export declare const DEFAULT_FILTER_EDITORS: FilterEditorRegistry;
|
|
83
83
|
/**
|
|
84
84
|
* Picks the editor for a (field, operator) pair: the field's own `editor`, then
|
|
85
85
|
* the operator's ARITY, then the field's `type`. Arity outranks type because
|
|
86
86
|
* "between" wants two boxes whatever the field said.
|
|
87
87
|
*/
|
|
88
|
-
declare function resolveFilterEditor<V, O>(field: FilterField<V, O>, operator: FilterOperator | undefined, editors: FilterEditorRegistry): AnyFilterEditor | undefined;
|
|
88
|
+
export declare function resolveFilterEditor<V, O>(field: FilterField<V, O>, operator: FilterOperator | undefined, editors: FilterEditorRegistry): AnyFilterEditor | undefined;
|
|
89
89
|
//#endregion
|
|
90
|
-
export {
|
|
90
|
+
export type { AnyFilterEditor, FilterEditorRegistry };
|
|
91
91
|
//# sourceMappingURL=filters-editors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filters-editors.d.ts","names":[],"sources":["../../../../src/components/reui/filters/filters-editors.tsx"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"filters-editors.d.ts","names":[],"sources":["../../../../src/components/reui/filters/filters-editors.tsx"],"mappings":";;;;;;;;;;wBAgGgB,iBAAiB,GAAG,GAClC,OAAO,YAAY,GAAG,gBACtB,kBACA,sBACC,mBAAmB;;;;;;wBAoJN,yBAAyB,GAAG,GAC1C,OAAO,YAAY,GAAG,gBACtB;wBAuJc,iBAAiB,GAAG,KAClC,OACA,eACA,QACA,QACA,gBACA,QACA,MACA,SACC,kBAAkB,GAAG,KAAE,QAAA,IAAA;wBA+BV,mBAAmB,GAAG,KACpC,OACA,eACA,QACA,QACA,gBACA,QACA,MACA,SACC,kBAAkB,GAAG,KAAE,QAAA,IAAA;wBA2BV,kBAAkB,GAAG,KACnC,OACA,eACA,QACA,QACA,gBACA,QACA,MACA,SACC,kBAAkB,GAAG,KAAE,QAAA,IAAA;;iBAwCT;EACf;EACA;EACA,OAAO,QAAM;EACb;EACA;EACA;;;;;;EAMA;;iBAyJe;EACf,OAAO;;EAEP;EACA;;EAEA,oBAAoB;EACpB,QAAQ;EACR;EACA;;EAEA;;;;;;EAMA;;;;;EAKA;;;;;EAKA;;EAEA;EACA,iBAAiB;;EAEjB;EACA,iBAAiB;EACjB,QAAQ,KAAK;;;;;;;;wBASC,aACd,OACA,UACA,UACA,mBACA,QACA,WACA,mBACA,YACA,WACA,aACA,cACA,aACA,gBACA,OACA,eACA,SACC,kBAAe,QAAA,IAAA;wBA8YF,mBAAmB,GAAG,GAAG,OAAO,kBAAkB,GAAG,KAAE,QAAA,IAAA;wBAIvD,wBAAwB,GAAG,GAAG,OAAO,kBAAkB,GAAG,KAAE,QAAA,IAAA;wBAiB5D,oBAAoB,GAAG,KACrC,OACA,eACA,QACA,QACA,gBACA,SACC,kBAAkB,GAAG,KAAE,QAAA,IAAA;qBAmCb,wBAAwB;;;;;;wBAcrB,oBAAoB,GAAG,GACrC,OAAO,YAAY,GAAG,IACtB,UAAU,4BACV,SAAS,uBACR"}
|
|
@@ -10,7 +10,7 @@ import { Cascader, CascaderEmpty, CascaderList, CascaderPanel, CascaderStatus }
|
|
|
10
10
|
import { FilterActionsContext, filterControlSizes } from "./filters-context.js";
|
|
11
11
|
import { applyFilterExclusiveSelection, filterFilterOptions, joinFilterPath, normalizeFilterQuery, warnFilterOnce } from "./filters-lib.js";
|
|
12
12
|
import * as React$1 from "react";
|
|
13
|
-
import { cn } from "
|
|
13
|
+
import { cn } from "cn";
|
|
14
14
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
15
15
|
import { CheckIcon, XIcon } from "lucide-react";
|
|
16
16
|
//#region src/components/reui/filters/filters-editors.tsx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filters-editors.js","names":["React"],"sources":["../../../../src/components/reui/filters/filters-editors.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { CheckIcon, XIcon } from \"lucide-react\";\n\nimport { cn } from \"@kumix/utils\";\nimport { Button } from \"../../ui/button\";\nimport { ButtonGroup } from \"../../ui/button-group\";\nimport { Input } from \"../../ui/input\";\nimport type { CascaderItemState, CascaderProps } from \"../cascader/cascader\";\nimport {\n Cascader,\n CascaderEmpty,\n CascaderList,\n CascaderPanel,\n CascaderStatus,\n} from \"../cascader/cascader\";\nimport { useCascaderActions, useCascaderHighlight } from \"../cascader/cascader-context\";\nimport { CascaderFooter } from \"../cascader/cascader-footer\";\nimport { CascaderItems } from \"../cascader/cascader-item\";\nimport { CascaderInput, CascaderNav } from \"../cascader/cascader-nav\";\nimport type { CascaderActionItem, CascaderNode } from \"../cascader/cascader-types\";\nimport {\n FilterActionsContext,\n type FilterResolutionStore,\n filterControlSizes,\n} from \"./filters-context\";\nimport {\n applyFilterExclusiveSelection,\n filterFilterOptions,\n joinFilterPath,\n normalizeFilterQuery,\n warnFilterOnce,\n} from \"./filters-lib\";\nimport type {\n AnyFilterEditor,\n FilterEditorProps,\n FilterEditorRegistry,\n FilterField,\n FilterIndex,\n FilterLabels,\n FilterLoadResult,\n FilterOperator,\n FilterOption,\n FilterOptionsState,\n} from \"./filters-types\";\n\n/* -------------------------------------------------------------------------- */\n/* The options service */\n/* -------------------------------------------------------------------------- */\n\ninterface OptionsInternalState<O> {\n items: FilterOption<O>[];\n loading: boolean;\n error: boolean;\n hasMore: boolean;\n cursor?: string;\n}\n\nconst IDLE: OptionsInternalState<never> = {\n items: [],\n loading: false,\n error: false,\n hasMore: false,\n};\n\n/** Stable no-op subscription, for a hook running outside a `Filters` root. */\nconst emptySubscribe = () => () => {};\nconst zeroVersion = () => 0;\n\n/**\n * The joined path of a field, from the schema index. Keyed by PATH, not field\n * identity, so labels survive a schema rebuild; an unknown field uses its id.\n */\nfunction filterFieldKey<V, O>(\n field: FilterField<V, O> | undefined,\n index: FilterIndex | undefined,\n): string | null {\n if (!field) return null;\n if (index) {\n for (const entry of index.all) {\n if ((entry.field as unknown) === (field as unknown)) {\n return joinFilterPath(entry.path);\n }\n }\n }\n return `#${field.id}`;\n}\n\n/**\n * The shared option service every option-backed editor receives: debouncing,\n * aborting, cursor paging and value-to-label resolution. A deliberate fork of\n * the cascader's async machinery. Resolution is two-tier: a ref cache written\n * in an EFFECT, plus the root's `FilterResolutionStore`, without which a\n * `loadOptions`-only field showed its raw id once the menu closed.\n */\nexport function useFilterOptions<V, O>(\n field: FilterField<V, O> | undefined,\n enabled: boolean,\n debounceMs = 250,\n): FilterOptionsState<O> {\n const [query, setQueryState] = React.useState(\"\");\n const [state, setState] = React.useState<OptionsInternalState<O>>(\n IDLE as OptionsInternalState<O>,\n );\n\n const cache = React.useRef(new Map<string, FilterOption<O>>());\n const requestId = React.useRef(0);\n const abortRef = React.useRef<AbortController | null>(null);\n\n // Read directly, so this degrades outside a `Filters` root instead of throwing.\n const actionsContext = React.useContext(FilterActionsContext);\n const shared: FilterResolutionStore | null = actionsContext?.resolution ?? null;\n const sharedKey = filterFieldKey(field, actionsContext?.index);\n\n // Re-render when a label lands ANYWHERE under this root, not just here.\n React.useSyncExternalStore(\n shared ? shared.subscribe : emptySubscribe,\n shared ? shared.getVersion : zeroVersion,\n shared ? shared.getVersion : zeroVersion,\n );\n\n const staticOptions = field?.options;\n const loadOptions = field?.loadOptions;\n const isAsync = Boolean(loadOptions);\n\n // Seeded in an effect, not during render, so the render stays pure.\n React.useEffect(() => {\n if (!staticOptions) return;\n for (const option of staticOptions) cache.current.set(option.value, option);\n if (shared && sharedKey) shared.set(sharedKey, staticOptions);\n }, [staticOptions, shared, sharedKey]);\n\n React.useEffect(() => {\n for (const option of state.items) cache.current.set(option.value, option);\n if (shared && sharedKey && state.items.length) {\n shared.set(sharedKey, state.items);\n }\n }, [state.items, shared, sharedKey]);\n\n const run = React.useCallback(\n async (nextQuery: string, cursor: string | undefined, append: boolean) => {\n if (!loadOptions) return;\n\n abortRef.current?.abort();\n const controller = new AbortController();\n abortRef.current = controller;\n const id = ++requestId.current;\n\n setState((previous) => ({\n ...previous,\n loading: true,\n error: false,\n items: append ? previous.items : [],\n }));\n\n try {\n const result = await loadOptions(nextQuery, {\n signal: controller.signal,\n cursor,\n });\n // A superseded request must not write; the id, not the abort, decides.\n if (id !== requestId.current) return;\n\n const normalized: FilterLoadResult<O> = Array.isArray(result) ? { items: result } : result;\n\n setState((previous) => ({\n items: append ? [...previous.items, ...normalized.items] : normalized.items,\n loading: false,\n error: false,\n hasMore: normalized.hasMore ?? Boolean(normalized.nextCursor),\n cursor: normalized.nextCursor,\n }));\n } catch (error) {\n if (id !== requestId.current) return;\n if ((error as Error)?.name === \"AbortError\") return;\n setState((previous) => ({\n ...previous,\n loading: false,\n error: true,\n hasMore: false,\n }));\n }\n },\n [loadOptions],\n );\n\n React.useEffect(() => {\n if (!enabled || !isAsync) return;\n const timer = setTimeout(() => void run(query, undefined, false), debounceMs);\n return () => clearTimeout(timer);\n }, [enabled, isAsync, query, debounceMs, run]);\n\n React.useEffect(() => {\n return () => abortRef.current?.abort();\n }, []);\n\n const normalizedQuery = normalizeFilterQuery(query);\n\n // Async results are server-filtered; re-filtering hides what the label omits.\n const items = React.useMemo(() => {\n if (isAsync) return state.items;\n return filterFilterOptions(staticOptions ?? [], normalizedQuery);\n }, [isAsync, state.items, staticOptions, normalizedQuery]);\n\n const setQuery = React.useCallback((next: string) => setQueryState(next), []);\n\n const loadMore = React.useCallback(() => {\n if (!state.hasMore || state.loading) return;\n void run(query, state.cursor, true);\n }, [state.hasMore, state.loading, state.cursor, query, run]);\n\n const retry = React.useCallback(() => {\n void run(query, undefined, false);\n }, [query, run]);\n\n const resolve = React.useCallback(\n (value: string) => {\n // The ref cache cannot be the only tier: a ref write triggers no render,\n // so the chip would paint the raw value and never repaint. The shared\n // store holds other instances' pages and re-renders this one on a gain.\n const declared = staticOptions?.find((option) => option.value === value);\n if (declared) return declared;\n const fromShared = shared && sharedKey ? shared.get(sharedKey, value) : undefined;\n if (fromShared) return fromShared as FilterOption<O>;\n return cache.current.get(value);\n },\n [staticOptions, shared, sharedKey],\n );\n\n return {\n items,\n loading: state.loading,\n error: state.error,\n hasMore: state.hasMore,\n query,\n setQuery,\n loadMore,\n retry,\n resolve,\n };\n}\n\n/**\n * Resolves committed values no loaded page covered, through `resolveValues`: a\n * restored saved view holds ids the loader never returned. The claim set marks\n * an omitted id asked, so only a REJECTED resolve lets a later mount retry.\n */\nexport function useFilterValueResolution<V, O>(\n field: FilterField<V, O> | undefined,\n values: readonly unknown[],\n): void {\n const actionsContext = React.useContext(FilterActionsContext);\n const shared: FilterResolutionStore | null = actionsContext?.resolution ?? null;\n const sharedKey = filterFieldKey(field, actionsContext?.index);\n const resolveValues = field?.resolveValues;\n const staticOptions = field?.options;\n // Keyed by CONTENT; NUL cannot occur inside a real stored value.\n const valuesKey = values.map((entry) => String(entry)).join(\"\\u0000\");\n\n React.useEffect(() => {\n if (!resolveValues || !shared || !sharedKey || valuesKey === \"\") return;\n const missing = valuesKey.split(\"\\u0000\").filter((value) => {\n if (staticOptions?.some((option) => option.value === value)) return false;\n return shared.get(sharedKey, value) === undefined;\n });\n const wanted = shared.claim(sharedKey, missing);\n if (wanted.length === 0) return;\n\n // No unmount guard: the store outlives the component.\n void Promise.resolve(resolveValues(wanted)).then(\n (options) => shared.set(sharedKey, options),\n () => shared.release(sharedKey, wanted),\n );\n }, [resolveValues, shared, sharedKey, valuesKey, staticOptions]);\n}\n\n/* -------------------------------------------------------------------------- */\n/* Shared chrome */\n/* -------------------------------------------------------------------------- */\n\n/**\n * The panel every editor renders into. A plain flex column, NOT a combobox: an\n * editor inside a Base UI composite would inherit its `aria-activedescendant`\n * and arrow keys, which is hostile to a colour picker or a slider.\n */\nfunction EditorPanel({ children, className }: { children: React.ReactNode; className?: string }) {\n return (\n <div\n data-slot=\"filter-editor\"\n className={cn(\n \"flex w-full flex-col gap-2 p-2\",\n /* The list height cap as a VARIABLE, not the `maxHeight` prop, which\n becomes an inline style no consumer class can beat. 16rem is the\n 256px the menu has always used. */\n \"[--cascader-max-height:16rem]\",\n className,\n )}\n >\n {children}\n </div>\n );\n}\n\nfunction EditorFooter({\n onCancel,\n onCommit,\n labels,\n host,\n}: Pick<FilterEditorProps, \"labels\" | \"host\"> & {\n onCancel: () => void;\n onCommit: () => void;\n}) {\n // The ONE ladder, not a hardcoded rung: `size=\"sm\"` here measured 4px short\n // of the bar's own controls at `size=\"default\"` in all eight styles.\n const actions = React.useContext(FilterActionsContext);\n const sizes = filterControlSizes({ size: actions?.size ?? \"default\" });\n\n // The create host advances on commit and has Back; amend must offer discard.\n if (host === \"create\") return null;\n return (\n <div className=\"flex items-center justify-end gap-1.5 pt-1\">\n <Button variant=\"ghost\" size={sizes.button} onClick={onCancel}>\n {labels.discard}\n </Button>\n <Button size={sizes.button} onClick={onCommit}>\n {labels.apply}\n </Button>\n </div>\n );\n}\n\n/**\n * `w-full` because `ButtonGroup` is `w-fit`, which collapses inside this\n * fixed-width panel. Sera is an underline style, so its direct children flatten\n * to one bottom-only edge - `border-b-input`, not transparent, since the\n * buttons are the trailing edge and the rule would stop mid-panel.\n */\nconst EDITOR_FIELD_GROUP = \"w-full\";\n\n/**\n * Confirm and cancel, an OUTLINE pair FUSED onto the field's trailing edge.\n * Returns a FRAGMENT: `ButtonGroup` fuses with selectors matching DIRECT\n * children only, so a wrapper div renders three separate boxes. `size=\"icon\"`\n * because every style's icon button at that size is exactly its input's height.\n */\nfunction EditorCommitButtons({\n onCancel,\n onCommit,\n labels,\n}: Pick<FilterEditorProps, \"labels\"> & {\n onCancel: () => void;\n onCommit: () => void;\n}) {\n return (\n <>\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"icon\"\n aria-label={labels.apply}\n onClick={onCommit}\n >\n <CheckIcon aria-hidden=\"true\" />\n </Button>\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"icon\"\n aria-label={labels.discard}\n onClick={onCancel}\n >\n <XIcon aria-hidden=\"true\" />\n </Button>\n </>\n );\n}\n\nfunction useCommitKeys(commit: () => void, cancel: () => void) {\n return React.useCallback(\n (event: React.KeyboardEvent) => {\n if (event.key === \"Enter\" && !event.nativeEvent.isComposing) {\n event.preventDefault();\n commit();\n return;\n }\n if (event.key === \"Escape\") {\n event.preventDefault();\n // Stop here so a surrounding dialog does not also close.\n event.stopPropagation();\n cancel();\n }\n },\n [commit, cancel],\n );\n}\n\n/* -------------------------------------------------------------------------- */\n/* Text / number */\n/* -------------------------------------------------------------------------- */\n\nexport function FilterTextEditor<V, O>({\n value,\n onValueChange,\n commit,\n cancel,\n autoFocusProps,\n labels,\n host,\n field,\n}: FilterEditorProps<V, O>) {\n const onKeyDown = useCommitKeys(() => commit(), cancel);\n return (\n // A width, not shrink-to-fit: the popover is `w-auto`, so an unsized box\n // changes width between the hosts. `w-72` is measured - it holds about 23\n // characters in sera and 27 in nova; `w-64` held about eighteen, too short\n // for an email, and `w-80` was the widest control in a bar of compact\n // chips. Capped at the viewport because `w-80` is 320px and a 360px phone\n // has 40px to spare. A `w-*` on the field wins.\n <EditorPanel className={cn(\"w-72 min-w-0 max-w-[calc(100vw-2rem)]\", field.className)}>\n <ButtonGroup className={EDITOR_FIELD_GROUP}>\n <Input\n {...autoFocusProps}\n value={(value as string) ?? \"\"}\n placeholder={field.placeholder ?? labels.valuePlaceholder}\n aria-label={field.label}\n onChange={(event) => onValueChange(event.target.value as V)}\n onKeyDown={onKeyDown}\n />\n {/*\n A lone input still belongs in the group: the per-style sheets re-round\n the LAST child, so a group with nothing fused draws the bare field.\n */}\n {host === \"create\" ? null : (\n <EditorCommitButtons labels={labels} onCancel={cancel} onCommit={() => commit()} />\n )}\n </ButtonGroup>\n </EditorPanel>\n );\n}\n\nexport function FilterNumberEditor<V, O>({\n value,\n onValueChange,\n commit,\n cancel,\n autoFocusProps,\n labels,\n host,\n field,\n}: FilterEditorProps<V, O>) {\n const onKeyDown = useCommitKeys(() => commit(), cancel);\n return (\n // Deliberately not the text editor's `w-72`: number values are short by\n // construction, and a wide box around \"42\" is the opposite defect.\n <EditorPanel className={cn(\"w-56 min-w-0\", field.className)}>\n <ButtonGroup className={EDITOR_FIELD_GROUP}>\n <Input\n {...autoFocusProps}\n type=\"number\"\n value={value === undefined || value === null ? \"\" : String(value)}\n placeholder={field.placeholder}\n aria-label={field.label}\n onChange={(event) => {\n const raw = event.target.value;\n onValueChange((raw === \"\" ? undefined : Number(raw)) as V);\n }}\n onKeyDown={onKeyDown}\n />\n {host === \"create\" ? null : (\n <EditorCommitButtons labels={labels} onCancel={cancel} onCommit={() => commit()} />\n )}\n </ButtonGroup>\n </EditorPanel>\n );\n}\n\nexport function FilterRangeEditor<V, O>({\n value,\n onValueChange,\n commit,\n cancel,\n autoFocusProps,\n labels,\n host,\n field,\n}: FilterEditorProps<V, O>) {\n const tuple = (Array.isArray(value) ? value : []) as unknown[];\n const onKeyDown = useCommitKeys(() => commit(), cancel);\n\n const update = (index: 0 | 1, raw: string) => {\n const next = [tuple[0], tuple[1]];\n next[index] = raw === \"\" ? undefined : Number(raw);\n onValueChange(next as V);\n };\n\n return (\n <EditorPanel>\n <div className=\"flex items-center gap-1.5\">\n <Input\n {...autoFocusProps}\n type=\"number\"\n value={tuple[0] === undefined ? \"\" : String(tuple[0])}\n aria-label={labels.rangeFrom(field.label)}\n onChange={(event) => update(0, event.target.value)}\n onKeyDown={onKeyDown}\n />\n <span className=\"text-muted-foreground text-xs\">{labels.rangeSeparator}</span>\n <Input\n type=\"number\"\n value={tuple[1] === undefined ? \"\" : String(tuple[1])}\n aria-label={labels.rangeTo(field.label)}\n onChange={(event) => update(1, event.target.value)}\n onKeyDown={onKeyDown}\n />\n </div>\n <EditorFooter host={host} labels={labels} onCancel={cancel} onCommit={() => commit()} />\n </EditorPanel>\n );\n}\n\n/* -------------------------------------------------------------------------- */\n/* The menu */\n/* -------------------------------------------------------------------------- */\n\n/** One row. The shape both the operator menu and the option editors hand over. */\nexport interface FilterListItem {\n value: string;\n label: string;\n icon?: React.ReactNode;\n description?: string;\n keywords?: string[];\n disabled?: boolean;\n /**\n * A None row, from `FilterOption.exclusive`. LAYOUT only: what a pick DOES is\n * `applyFilterExclusiveSelection`, in the option editor's handler. A consumer\n * composing `FilterMenu` into an editor of their own owns the same call.\n */\n exclusive?: boolean;\n}\n\n/**\n * Beyond the cascader's own fields: one divider flag, on the first row of a\n * group that is not the first, because grouping happens out here. A separator\n * NODE would join the option ring, and `[data-selected] + :not([data-selected])`\n * reads the LIVE selection, so unticking a pinned row drew a second line.\n */\ninterface FilterMenuMeta {\n divider?: boolean;\n /**\n * Carries `FilterListItem.exclusive` down to the row. The rule above it is\n * `aria-hidden`, so the row's accessible name is the only channel arriving\n * before the press, and `renderItem` receives the node and nothing else.\n *\n * `[data-slot=filter-menu-exclusive-hint]` is also the handle a consumer\n * styles the row through: the cascader's row element takes no attribute of\n * ours, so `:has([data-slot=filter-menu-exclusive-hint])` selects it.\n */\n exclusive?: boolean;\n}\n\n/** Joins a selection into one comparable key; NUL cannot occur in a value. */\nconst PIN_SEPARATOR = \"\\u0000\";\n\n/** A bound on a race: each attempt costs one task and stops on success. */\nconst MAX_PIN_RESTORE_ATTEMPTS = 4;\n\ninterface PendingPinRestore {\n /** The row the user was on when the rows moved. Tracked by VALUE, never index. */\n value: string;\n /** The index it sat at, which is the half of the signature Base UI keeps. */\n index: number;\n /** The order the rows landed in, so the target's new position is known. */\n order: string[];\n attempts: number;\n}\n\n/**\n * Carries the HIGHLIGHT across a live re-pin. Base UI holds it as an INDEX and\n * a keyed reorder MOVES the DOM node rather than remounting it, so the index\n * map only rebuilds when the `MutationObserver` fires: until then, ticking a\n * row moves the highlight down one. So this ARMS in the layout effect, where\n * the map still reads the OLD order, and fires on the signature (SAME index,\n * DIFFERENT row) from a TASK, re-trying because the store event and the re-sort\n * are unordered. A synthetic `mousemove`, since Base UI exposes no setter.\n */\nfunction FilterMenuPinKeeper({\n order,\n items,\n}: {\n order: string[];\n /** The data the order was derived from, by identity. */\n items: FilterListItem[];\n}) {\n const { baseId } = useCascaderActions();\n const highlight = useCascaderHighlight();\n const previousRef = React.useRef<{\n order: string[];\n items: FilterListItem[];\n } | null>(null);\n const pendingRef = React.useRef<PendingPinRestore | null>(null);\n const timerRef = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n\n // From the render: on the reordering commit a ref still holds the OLD row.\n const highlightedValue = highlight.value;\n const highlightedIndex = highlight.index;\n\n const stop = React.useCallback(() => {\n pendingRef.current = null;\n if (timerRef.current === null) return;\n clearTimeout(timerRef.current);\n timerRef.current = null;\n }, []);\n\n const startRestore = React.useCallback(() => {\n const attempt = () => {\n timerRef.current = null;\n const pending = pendingRef.current;\n if (!pending) return;\n\n const target = pending.order.indexOf(pending.value);\n const rows = document\n .getElementById(`${baseId}-column-0`)\n ?.querySelectorAll<HTMLElement>('[data-slot=\"cascader-item\"]');\n // A WINDOWED list renders a subset, so row N is not order[N]. Leave it.\n if (target < 0 || !rows || rows.length !== pending.order.length) {\n stop();\n return;\n }\n\n rows[target]?.dispatchEvent(new MouseEvent(\"mousemove\", { bubbles: true }));\n\n pending.attempts += 1;\n if (pending.attempts >= MAX_PIN_RESTORE_ATTEMPTS) {\n stop();\n return;\n }\n timerRef.current = setTimeout(attempt, 0);\n };\n\n timerRef.current = setTimeout(attempt, 0);\n }, [baseId, stop]);\n\n // No dependency list: the arm must run on the commit that reorders the rows.\n React.useLayoutEffect(() => {\n const previous = previousRef.current;\n previousRef.current = { order, items };\n\n if (!previous || previous.order === order) return;\n // New DATA (a page, a query) is Base UI's to highlight; only a re-pin is ours.\n if (previous.items !== items) return;\n if (!highlightedValue) return;\n // Content, not identity: a re-pin can leave the rows in the same order.\n if (isSameOrder(previous.order, order)) return;\n\n pendingRef.current = {\n value: highlightedValue,\n index: highlightedIndex,\n order,\n attempts: 0,\n };\n });\n\n React.useEffect(() => {\n const pending = pendingRef.current;\n if (!pending) return;\n\n // Back where it belongs, or moved by the user: either way the arm is spent.\n if (highlightedValue === pending.value || highlightedIndex !== pending.index) {\n stop();\n return;\n }\n // Already chasing this one; a second chain would double every dispatch.\n if (pending.attempts > 0 || timerRef.current !== null) return;\n startRestore();\n }, [highlightedValue, highlightedIndex, startRestore, stop]);\n\n React.useEffect(() => stop, [stop]);\n\n return null;\n}\n\n/** Element-wise, because the arrays are rebuilt on every selection change. */\nfunction isSameOrder(a: string[], b: string[]) {\n if (a.length !== b.length) return false;\n for (let index = 0; index < a.length; index += 1) {\n if (a[index] !== b[index]) return false;\n }\n return true;\n}\n\nexport interface FilterMenuProps {\n items: FilterListItem[];\n /** Committed values. Drives the check mark and the pinned group. */\n selected: string[];\n multiple?: boolean;\n /** Receives the FULL next selection, so no caller re-derives it. */\n onSelectionChange: (values: string[]) => void;\n labels: FilterLabels;\n ariaLabel: string;\n searchPlaceholder?: string;\n /** Whether the search field is VISIBLE. It is always rendered regardless. */\n searchable?: boolean;\n /**\n * Viewport height before the list scrolls, in pixels. Omitted on purpose by\n * the option editors: it becomes an inline style a consumer's `className`\n * cannot outrank, so the panel publishes `--cascader-max-height` instead.\n */\n maxHeight?: number;\n /**\n * Pin selected rows above the rest, with a full-bleed rule between them. Off\n * by default; the option editors read `FilterField.pinSelected` per field.\n */\n pinSelected?: boolean;\n /**\n * Order INSIDE each group, plus WHEN the partition is taken. Declaration\n * order by default, so the partition is stable rather than a re-sort.\n */\n sortSelected?: \"none\" | \"label\" | \"snapshot\";\n /** The caller already filtered `items`, so the cascader must not re-filter. */\n preFiltered?: boolean;\n autoFocusProps?: FilterEditorProps[\"autoFocusProps\"];\n /** Controlled query. Pair it with `onQueryChange` to filter outside. */\n query?: string;\n onQueryChange?: (query: string) => void;\n state?: Pick<FilterOptionsState<unknown>, \"loading\" | \"error\" | \"hasMore\" | \"loadMore\" | \"retry\">;\n}\n\n/**\n * One accessible list, shared by the operator menu and every option editor. It\n * is the CASCADER configured flat, not a list this file implements, which\n * brings the typeahead, RTL handling and live region with it. Only the pinning\n * and the paging affordance stay out here.\n */\nexport function FilterMenu({\n items,\n selected,\n multiple = false,\n onSelectionChange,\n labels,\n ariaLabel,\n searchPlaceholder,\n searchable = true,\n maxHeight,\n pinSelected = false,\n sortSelected = \"none\",\n preFiltered = false,\n autoFocusProps,\n query,\n onQueryChange,\n state,\n}: FilterMenuProps) {\n /**\n * The pin set as a KEY, not an array: `selected` is a fresh array on most\n * renders, so a memo depending on it re-partitions every render.\n */\n const liveKey = pinSelected ? selected.join(PIN_SEPARATOR) : \"\";\n\n /**\n * The same set, frozen at OPEN, for `sortSelected: \"snapshot\"`. LIVE is the\n * default: \"your picks, then the rest\" is about the CURRENT selection, and\n * `FilterMenuPinKeeper` pays for rows moving under the pointer.\n */\n const [snapshotKey] = React.useState(() => liveKey);\n // `pinSelected` re-checked here, not just through `liveKey`: `snapshotKey` is\n // frozen at MOUNT, so a menu that lost the prop would keep partitioning.\n const pinnedKey = !pinSelected ? \"\" : sortSelected === \"snapshot\" ? snapshotKey : liveKey;\n\n // Uncontrolled unless the caller owns the query, as an option service does.\n const [ownQuery, setOwnQuery] = React.useState(\"\");\n const currentQuery = query ?? ownQuery;\n const setQuery = onQueryChange ?? setOwnQuery;\n\n /**\n * Memoized on the SELECTION, not the query: folding the query in re-sorted\n * 4,000 rows on every keystroke, for a one pixel rule.\n */\n const partitioned = React.useMemo(() => {\n const pinned = new Set(pinnedKey ? pinnedKey.split(PIN_SEPARATOR) : []);\n\n /*\n Exclusive rows come out BEFORE the pin partition; their position is fixed.\n Pinning is by SELECTION, so a ticked None row would lift itself above the\n very rule drawn to set it apart and drop back on untick. Grouping by ROLE\n means the pinned group counts ordinary picks only, which is also why\n picking None draws no pin rule: it clears every other pick.\n */\n const exclusive = items.filter((item) => item.exclusive);\n const values = exclusive.length ? items.filter((item) => !item.exclusive) : items;\n\n const chosen = pinned.size ? values.filter((item) => pinned.has(item.value)) : [];\n const rest = pinned.size ? values.filter((item) => !pinned.has(item.value)) : values;\n\n // The SCHEMA's order inside each group unless the field asks otherwise:\n // option order is usually semantic.\n const ordered =\n sortSelected === \"label\"\n ? [\n [...chosen].sort((a, b) => a.label.localeCompare(b.label)),\n [...rest].sort((a, b) => a.label.localeCompare(b.label)),\n [...exclusive].sort((a, b) => a.label.localeCompare(b.label)),\n ]\n : [chosen, rest, exclusive];\n\n const rows = [...ordered[0], ...ordered[1], ...ordered[2]];\n\n return {\n chosenCount: chosen.length,\n /** Index of the first exclusive row, or -1 when the list has none. */\n exclusiveAt: exclusive.length ? rows.length - exclusive.length : -1,\n // The render order alone, so a REORDER is an identity compare.\n order: rows.map((item) => item.value),\n nodes: rows.map<CascaderNode<FilterMenuMeta>>((item) => ({\n value: item.value,\n label: item.label,\n icon: item.icon,\n description: item.description,\n keywords: item.keywords,\n disabled: item.disabled,\n // Only exclusive rows carry `data`, so the ordinary 4,000 keep theirs.\n data: item.exclusive ? { exclusive: true } : undefined,\n })),\n };\n }, [items, pinnedKey, sortSelected]);\n\n // No rule under a query: \"your picks, then the rest\" is about the WHOLE list.\n const dividerAt = partitioned.chosenCount && !currentQuery.trim() ? partitioned.chosenCount : -1;\n\n // Survives a search, unlike the pin rule: it is a fact about the row.\n const exclusiveDividerAt = partitioned.exclusiveAt;\n\n const nodes = React.useMemo<CascaderNode<FilterMenuMeta>[]>(() => {\n const total = partitioned.nodes.length;\n // Only a boundary with rows on BOTH sides is one: a rule on row 0 would\n // be a line above the top of the list.\n const marks = [dividerAt, exclusiveDividerAt].filter((index) => index > 0 && index < total);\n if (marks.length === 0) return partitioned.nodes;\n // Rows rewritten, not rebuilt: copying 4,000 objects would undo the split.\n const next = partitioned.nodes.slice();\n for (const index of marks) {\n // MERGED, never replaced: the two boundaries usually fall on one row, and\n // overwriting `data` dropped the flag the accessible name is built from.\n next[index] = {\n ...next[index],\n data: { ...next[index].data, divider: true },\n };\n }\n return next;\n }, [partitioned, dividerAt, exclusiveDividerAt]);\n\n const renderItem = React.useCallback(\n (node: CascaderNode<FilterMenuMeta>, itemState: CascaderItemState<FilterMenuMeta>) => (\n <>\n {node.data?.divider ? (\n <span\n data-slot=\"filter-menu-divider\"\n aria-hidden=\"true\"\n /* Full bleed, over the per-style `--cascader-list-pad` the shell\n publishes: a rule stopping at the row's inset box reads as a gap.\n Centred in the 8px the row gives back above itself, not `top-0`. */\n className=\"absolute inset-x-[calc(var(--cascader-list-pad,4px)*-1)] -top-1 h-px bg-border\"\n />\n ) : null}\n\n {node.icon ? (\n <span\n data-slot=\"filter-menu-icon\"\n className=\"flex shrink-0 items-center justify-center text-muted-foreground\"\n >\n {node.icon}\n </span>\n ) : null}\n\n <span className=\"flex min-w-0 flex-1 flex-col items-start gap-0.5\">\n <span className=\"w-full truncate text-start\">{node.label}</span>\n {node.description ? (\n <span className=\"w-full truncate text-start text-muted-foreground text-xs\">\n {node.description}\n </span>\n ) : null}\n </span>\n\n {/*\n What the aria-hidden rule says, for the people it does not reach.\n Inside the option element so it joins the row's accessible NAME, not\n an `aria-describedby`: a description is announced late or not at all,\n and this has to arrive before the press. The cascader's `srDetails`\n cannot either: `renderItem` replaces the row body. Empty copy renders\n nothing, so `labels.exclusiveHint` of \"\" silences it.\n */}\n {node.data?.exclusive && labels.exclusiveHint ? (\n <span data-slot=\"filter-menu-exclusive-hint\" className=\"sr-only\">\n {`, ${labels.exclusiveHint}`}\n </span>\n ) : null}\n\n {/* A check mark in both modes, never the cascader's default box. */}\n {itemState.selected ? (\n <span\n data-slot=\"filter-menu-check\"\n /* The gutter every style already reserves, on the cascader's own\n logical inset. `end-*` rather than `right-2`, so RTL mirrors. */\n className=\"pointer-events-none absolute end-(--cascader-row-inset,8px)! flex size-4 items-center justify-center rtl:right-auto!\"\n >\n <CheckIcon className=\"text-foreground! **:text-foreground!\" />\n </span>\n ) : null}\n </>\n ),\n [labels.exclusiveHint],\n );\n\n const cascaderLabels = React.useMemo(\n () => ({\n search: searchPlaceholder ?? labels.searchOptions,\n empty: labels.empty,\n loading: labels.loading,\n loadingMore: labels.loadingMore,\n loadMore: labels.loadMore,\n error: labels.error,\n retry: labels.retry,\n // Named after the field, not the cascader's own \"Top level\" wording.\n rootLevel: ariaLabel,\n panelLabel: ariaLabel,\n // Run FLAT, so the default hint would teach branch keys that do not exist.\n keyboardHint: () => \"\",\n // From `FilterLabels`, so the menu ships no English of its own.\n resultsAnnouncement: labels.resultsAnnouncement,\n actionsLabel: labels.actionsLabel,\n }),\n [labels, ariaLabel, searchPlaceholder],\n );\n\n /**\n * Paging and retry in the pinned footer, never a row: a row would join the\n * option ring, where arrows land on it and a query filters it away mid-page.\n */\n const actions = React.useMemo<CascaderActionItem[]>(() => {\n if (state?.error) {\n return [{ value: \"retry\", label: labels.retry, onSelect: state.retry }];\n }\n if (state?.hasMore) {\n return [\n {\n value: \"load-more\",\n label: state.loading ? labels.loadingMore : labels.loadMore,\n disabled: state.loading,\n onSelect: state.loadMore,\n },\n ];\n }\n return [];\n }, [state, labels]);\n\n const shared = {\n // Inline and pinned open with a no-op handler, so the unconditional\n // `setOpen(false)` of a single-select commit cannot dismiss the popover.\n inline: true,\n open: true,\n onOpenChange: () => {},\n items: nodes,\n inputValue: currentQuery,\n onInputValueChange: setQuery,\n maxHeight,\n renderItem,\n labels: cascaderLabels,\n actions,\n // The option service is the ONE filter when it owns the query.\n ...(preFiltered ? { filter: () => true } : null),\n };\n\n const cascaderProps: CascaderProps<FilterMenuMeta> = multiple\n ? {\n ...shared,\n multiple: true,\n value: selected,\n onValueChange: (values: string[]) => onSelectionChange(values),\n }\n : {\n ...shared,\n value: selected[0] ?? \"\",\n onValueChange: (value: string) => onSelectionChange(value ? [value] : []),\n };\n\n return (\n <Cascader {...cascaderProps}>\n <CascaderPanel>\n {/*\n `searchable: false` hides the FIELD, never removes it: the input owns\n focus and `aria-activedescendant`, so a menu without one has no\n keyboard. The class goes on the nav so the strip's border goes too.\n */}\n <CascaderNav\n className={cn(\n /* The nav's divider is `border-border/60` and the group separator\n is a full-opacity `bg-border`; two strengths read as a mistake. */\n \"border-border\",\n !searchable && \"sr-only\",\n )}\n >\n <CascaderInput\n {...(autoFocusProps ?? {})}\n placeholder={searchPlaceholder ?? labels.searchOptions}\n aria-label={ariaLabel}\n />\n </CascaderNav>\n <CascaderEmpty>\n {state?.error ? labels.error : state?.loading ? labels.loading : labels.empty}\n </CascaderEmpty>\n {/*\n Plain rows, DELIBERATELY not `CascaderVirtualItems`: windowing stands\n `FilterMenuPinKeeper` down. The long lists are async and PAGE 25.\n */}\n <CascaderList\n /**\n * Real layout space around the group rule, which is absolutely\n * positioned and adds no height. `renderItem` cannot reach the row's\n * own box, and a spacer NODE would join the option ring.\n *\n * `:has()` is affordable here: scoped to this one list, a compound\n * whose descendant exists on at most ONE row, and these menus render\n * tens of rows rather than thousands.\n */\n className=\"[&>[data-slot=cascader-item]:has([data-slot=filter-menu-divider])]:mt-2\"\n >\n <CascaderItems />\n </CascaderList>\n <CascaderFooter />\n <CascaderStatus />\n {/*\n Last, so its layout effect reads the reordered DOM after every row has\n registered. Not mounted at all for a menu that cannot reorder.\n */}\n {pinSelected && sortSelected !== \"snapshot\" ? (\n <FilterMenuPinKeeper order={partitioned.order} items={items} />\n ) : null}\n </CascaderPanel>\n </Cascader>\n );\n}\n\n/* -------------------------------------------------------------------------- */\n/* Option based editors */\n/* -------------------------------------------------------------------------- */\n\nfunction OptionEditor<V, O>(props: FilterEditorProps<V, O> & { multiple: boolean }) {\n const { multiple, options, labels, autoFocusProps, commit, cancel, onValueChange, value, field } =\n props;\n\n const selected = React.useMemo(() => {\n if (value === undefined || value === null) return [];\n return (Array.isArray(value) ? value : [value]) as string[];\n }, [value]);\n\n const announce = React.useContext(FilterActionsContext)?.announce;\n\n return (\n /*\n A DELIBERATELY narrow default: 12rem holds around 22 characters at every\n style's row size. `field.className` lands LAST, so a consumer's `w-*` wins.\n */\n <EditorPanel className={cn(\"w-48 min-w-0 gap-0 p-0\", field.className)}>\n <FilterMenu\n items={options.items}\n selected={selected}\n multiple={multiple}\n onSelectionChange={(raw) => {\n /*\n The ONE place the None rule is applied: every route into a selection\n arrives here, so click and keyboard cannot disagree, and only the\n editor can ANSWER it - `options.resolve` sees the schema and every\n loaded page, where the menu holds only the rows on screen.\n */\n const values = applyFilterExclusiveSelection(raw, selected, (value) =>\n Boolean(options.resolve(value)?.exclusive),\n );\n\n /*\n Identity is the test: the rule hands back `raw` itself unless it\n intervened. Announced because nothing else reports it: focus never\n moved, and nobody is on the rows that lost their check marks.\n */\n if (values !== raw && announce) {\n const arrived = values.find((entry) => !selected.includes(entry));\n const cleared = raw.length - values.length;\n if (arrived !== undefined && cleared > 0) {\n announce(\n labels.exclusiveAnnouncement(options.resolve(arrived)?.label ?? arrived, cleared),\n );\n }\n } else if (values === raw && raw.length > 1) {\n /*\n The hole in the rule, made LOUD. An unresolvable value is treated\n as ordinary and cannot be told from an id whose label has not\n arrived, so this warns rather than acts. Needs a SEEN None row.\n */\n const hasNoneRow =\n options.items.some((item) => item.exclusive) ||\n Boolean(field.options?.some((option) => option.exclusive));\n const unresolved = hasNoneRow\n ? raw.find((entry) => options.resolve(entry) === undefined)\n : undefined;\n if (unresolved !== undefined) {\n warnFilterOnce(\n `exclusive-unresolved:${field.id}`,\n `field \"${field.id}\" has an exclusive option, but the value ` +\n `\"${unresolved}\" resolves to no option, so the None rule ` +\n `cannot tell whether it is the exclusive one and has left ` +\n `it in place. Declare the exclusive option in the field's ` +\n `\\`options\\` even when the rest of the list is async, or ` +\n `cover stored values with \\`resolveValues\\`.`,\n );\n }\n }\n\n if (!multiple) {\n const next = values[0];\n // Base UI deselects the committed row; an empty filter is no gain.\n if (next === undefined) {\n cancel();\n return;\n }\n onValueChange(next as V);\n commit(next as V);\n return;\n }\n onValueChange(values as V);\n // Every toggle commits with the popover open: several picks, one gesture.\n commit(values as V, { close: false });\n }}\n labels={labels}\n ariaLabel={field.label}\n searchable={field.searchable ?? true}\n // Not a composed `Search ${label}...`: hardcoded English no `labels`\n // override could reach, and lowercasing a label is locale-hostile.\n searchPlaceholder={field.placeholder}\n pinSelected={field.pinSelected ?? false}\n sortSelected={field.sortSelected}\n // `useFilterOptions` already applied the query, locally or server side.\n preFiltered\n query={options.query}\n onQueryChange={options.setQuery}\n state={options}\n autoFocusProps={autoFocusProps}\n />\n </EditorPanel>\n );\n}\n\nexport function FilterSelectEditor<V, O>(props: FilterEditorProps<V, O>) {\n return <OptionEditor {...props} multiple={false} />;\n}\n\nexport function FilterMultiSelectEditor<V, O>(props: FilterEditorProps<V, O>) {\n return <OptionEditor {...props} multiple />;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Boolean */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Module level, so the menu's index is not rebuilt on every render. Not in\n * `FilterLabels`: the chip's own display spells the same two words out.\n */\nconst BOOLEAN_ITEMS: FilterListItem[] = [\n { value: \"true\", label: \"True\" },\n { value: \"false\", label: \"False\" },\n];\n\nexport function FilterBooleanEditor<V, O>({\n value,\n onValueChange,\n commit,\n labels,\n autoFocusProps,\n field,\n}: FilterEditorProps<V, O>) {\n return (\n // Two words, and `field.className` lands last so a consumer's `w-*` wins.\n <EditorPanel className={cn(\"w-40 min-w-0 gap-0 p-0\", field.className)}>\n <FilterMenu\n items={BOOLEAN_ITEMS}\n selected={value === true ? [\"true\"] : value === false ? [\"false\"] : []}\n onSelectionChange={(values) => {\n /* Deselecting the committed row leaves nothing to filter on, so it is\n a no-op rather than a commit of `false`. */\n if (values.length === 0) return;\n const next = (values[0] === \"true\") as V;\n onValueChange(next);\n commit(next);\n }}\n labels={labels}\n ariaLabel={field.label}\n /* Two rows: a search over them is more chrome than list, but the\n field is still rendered, hidden, because it owns the keyboard. */\n searchable={false}\n autoFocusProps={autoFocusProps}\n />\n </EditorPanel>\n );\n}\n\n/* -------------------------------------------------------------------------- */\n/* Resolution */\n/* -------------------------------------------------------------------------- */\n\nexport type {\n AnyFilterEditor,\n FilterEditorRegistry,\n} from \"./filters-types\";\n\nexport const DEFAULT_FILTER_EDITORS: FilterEditorRegistry = {\n text: FilterTextEditor,\n number: FilterNumberEditor,\n range: FilterRangeEditor,\n select: FilterSelectEditor,\n multiselect: FilterMultiSelectEditor,\n boolean: FilterBooleanEditor,\n};\n\n/**\n * Picks the editor for a (field, operator) pair: the field's own `editor`, then\n * the operator's ARITY, then the field's `type`. Arity outranks type because\n * \"between\" wants two boxes whatever the field said.\n */\nexport function resolveFilterEditor<V, O>(\n field: FilterField<V, O>,\n operator: FilterOperator | undefined,\n editors: FilterEditorRegistry,\n): AnyFilterEditor | undefined {\n if (typeof field.editor === \"function\") {\n // The one place a consumer's typed editor meets the erased registry.\n return field.editor as unknown as AnyFilterEditor;\n }\n if (typeof field.editor === \"string\") {\n const named = editors[field.editor];\n if (named) return named;\n }\n\n const arity = operator?.arity ?? \"one\";\n if (arity === \"none\") return undefined;\n if (arity === \"range\") return editors.range;\n if (arity === \"many\") {\n // An option-backed field gets checkboxes; anything else receives an array.\n if (field.options || field.loadOptions) return editors.multiselect;\n }\n\n return editors[field.type ?? \"text\"] ?? editors.text;\n}\n"],"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AAU,UAAU,OAAO,CAAC,MAAM,IAAI,UAAU,QAAQ,CAAC,OAAO,IAAI,CAAC;GACrE,oBAAoB,WAAW;IAG7B,IAAI,OAAO,WAAW,GAAG;IACzB,MAAM,OAAQ,OAAO,OAAO;IAC5B,cAAc,IAAI;IAClB,OAAO,IAAI;GACb;GACQ;GACR,WAAW,MAAM;GAGjB,YAAY;GACI;EACjB,CAAA;CACU,CAAA;AAEjB;AAWA,MAAa,yBAA+C;CAC1D,MAAM;CACN,QAAQ;CACR,OAAO;CACP,QAAQ;CACR,aAAa;CACb,SAAS;AACX;;;;;;AAOA,SAAgB,oBACd,OACA,UACA,SAC6B;CAC7B,IAAI,OAAO,MAAM,WAAW,YAE1B,OAAO,MAAM;CAEf,IAAI,OAAO,MAAM,WAAW,UAAU;EACpC,MAAM,QAAQ,QAAQ,MAAM;EAC5B,IAAI,OAAO,OAAO;CACpB;CAEA,MAAM,QAAQ,UAAU,SAAS;CACjC,IAAI,UAAU,QAAQ,OAAO,KAAA;CAC7B,IAAI,UAAU,SAAS,OAAO,QAAQ;CACtC,IAAI,UAAU,QAER;MAAA,MAAM,WAAW,MAAM,aAAa,OAAO,QAAQ;CAAA;CAGzD,OAAO,QAAQ,MAAM,QAAQ,WAAW,QAAQ;AAClD"}
|
|
1
|
+
{"version":3,"file":"filters-editors.js","names":["React"],"sources":["../../../../src/components/reui/filters/filters-editors.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { cn } from \"cn\";\nimport { CheckIcon, XIcon } from \"lucide-react\";\n\nimport { Button } from \"../../ui/button\";\nimport { ButtonGroup } from \"../../ui/button-group\";\nimport { Input } from \"../../ui/input\";\nimport type { CascaderItemState, CascaderProps } from \"../cascader/cascader\";\nimport {\n Cascader,\n CascaderEmpty,\n CascaderList,\n CascaderPanel,\n CascaderStatus,\n} from \"../cascader/cascader\";\nimport { useCascaderActions, useCascaderHighlight } from \"../cascader/cascader-context\";\nimport { CascaderFooter } from \"../cascader/cascader-footer\";\nimport { CascaderItems } from \"../cascader/cascader-item\";\nimport { CascaderInput, CascaderNav } from \"../cascader/cascader-nav\";\nimport type { CascaderActionItem, CascaderNode } from \"../cascader/cascader-types\";\nimport {\n FilterActionsContext,\n type FilterResolutionStore,\n filterControlSizes,\n} from \"./filters-context\";\nimport {\n applyFilterExclusiveSelection,\n filterFilterOptions,\n joinFilterPath,\n normalizeFilterQuery,\n warnFilterOnce,\n} from \"./filters-lib\";\nimport type {\n AnyFilterEditor,\n FilterEditorProps,\n FilterEditorRegistry,\n FilterField,\n FilterIndex,\n FilterLabels,\n FilterLoadResult,\n FilterOperator,\n FilterOption,\n FilterOptionsState,\n} from \"./filters-types\";\n\n/* -------------------------------------------------------------------------- */\n/* The options service */\n/* -------------------------------------------------------------------------- */\n\ninterface OptionsInternalState<O> {\n items: FilterOption<O>[];\n loading: boolean;\n error: boolean;\n hasMore: boolean;\n cursor?: string;\n}\n\nconst IDLE: OptionsInternalState<never> = {\n items: [],\n loading: false,\n error: false,\n hasMore: false,\n};\n\n/** Stable no-op subscription, for a hook running outside a `Filters` root. */\nconst emptySubscribe = () => () => {};\nconst zeroVersion = () => 0;\n\n/**\n * The joined path of a field, from the schema index. Keyed by PATH, not field\n * identity, so labels survive a schema rebuild; an unknown field uses its id.\n */\nfunction filterFieldKey<V, O>(\n field: FilterField<V, O> | undefined,\n index: FilterIndex | undefined,\n): string | null {\n if (!field) return null;\n if (index) {\n for (const entry of index.all) {\n if ((entry.field as unknown) === (field as unknown)) {\n return joinFilterPath(entry.path);\n }\n }\n }\n return `#${field.id}`;\n}\n\n/**\n * The shared option service every option-backed editor receives: debouncing,\n * aborting, cursor paging and value-to-label resolution. A deliberate fork of\n * the cascader's async machinery. Resolution is two-tier: a ref cache written\n * in an EFFECT, plus the root's `FilterResolutionStore`, without which a\n * `loadOptions`-only field showed its raw id once the menu closed.\n */\nexport function useFilterOptions<V, O>(\n field: FilterField<V, O> | undefined,\n enabled: boolean,\n debounceMs = 250,\n): FilterOptionsState<O> {\n const [query, setQueryState] = React.useState(\"\");\n const [state, setState] = React.useState<OptionsInternalState<O>>(\n IDLE as OptionsInternalState<O>,\n );\n\n const cache = React.useRef(new Map<string, FilterOption<O>>());\n const requestId = React.useRef(0);\n const abortRef = React.useRef<AbortController | null>(null);\n\n // Read directly, so this degrades outside a `Filters` root instead of throwing.\n const actionsContext = React.useContext(FilterActionsContext);\n const shared: FilterResolutionStore | null = actionsContext?.resolution ?? null;\n const sharedKey = filterFieldKey(field, actionsContext?.index);\n\n // Re-render when a label lands ANYWHERE under this root, not just here.\n React.useSyncExternalStore(\n shared ? shared.subscribe : emptySubscribe,\n shared ? shared.getVersion : zeroVersion,\n shared ? shared.getVersion : zeroVersion,\n );\n\n const staticOptions = field?.options;\n const loadOptions = field?.loadOptions;\n const isAsync = Boolean(loadOptions);\n\n // Seeded in an effect, not during render, so the render stays pure.\n React.useEffect(() => {\n if (!staticOptions) return;\n for (const option of staticOptions) cache.current.set(option.value, option);\n if (shared && sharedKey) shared.set(sharedKey, staticOptions);\n }, [staticOptions, shared, sharedKey]);\n\n React.useEffect(() => {\n for (const option of state.items) cache.current.set(option.value, option);\n if (shared && sharedKey && state.items.length) {\n shared.set(sharedKey, state.items);\n }\n }, [state.items, shared, sharedKey]);\n\n const run = React.useCallback(\n async (nextQuery: string, cursor: string | undefined, append: boolean) => {\n if (!loadOptions) return;\n\n abortRef.current?.abort();\n const controller = new AbortController();\n abortRef.current = controller;\n const id = ++requestId.current;\n\n setState((previous) => ({\n ...previous,\n loading: true,\n error: false,\n items: append ? previous.items : [],\n }));\n\n try {\n const result = await loadOptions(nextQuery, {\n signal: controller.signal,\n cursor,\n });\n // A superseded request must not write; the id, not the abort, decides.\n if (id !== requestId.current) return;\n\n const normalized: FilterLoadResult<O> = Array.isArray(result) ? { items: result } : result;\n\n setState((previous) => ({\n items: append ? [...previous.items, ...normalized.items] : normalized.items,\n loading: false,\n error: false,\n hasMore: normalized.hasMore ?? Boolean(normalized.nextCursor),\n cursor: normalized.nextCursor,\n }));\n } catch (error) {\n if (id !== requestId.current) return;\n if ((error as Error)?.name === \"AbortError\") return;\n setState((previous) => ({\n ...previous,\n loading: false,\n error: true,\n hasMore: false,\n }));\n }\n },\n [loadOptions],\n );\n\n React.useEffect(() => {\n if (!enabled || !isAsync) return;\n const timer = setTimeout(() => void run(query, undefined, false), debounceMs);\n return () => clearTimeout(timer);\n }, [enabled, isAsync, query, debounceMs, run]);\n\n React.useEffect(() => {\n return () => abortRef.current?.abort();\n }, []);\n\n const normalizedQuery = normalizeFilterQuery(query);\n\n // Async results are server-filtered; re-filtering hides what the label omits.\n const items = React.useMemo(() => {\n if (isAsync) return state.items;\n return filterFilterOptions(staticOptions ?? [], normalizedQuery);\n }, [isAsync, state.items, staticOptions, normalizedQuery]);\n\n const setQuery = React.useCallback((next: string) => setQueryState(next), []);\n\n const loadMore = React.useCallback(() => {\n if (!state.hasMore || state.loading) return;\n void run(query, state.cursor, true);\n }, [state.hasMore, state.loading, state.cursor, query, run]);\n\n const retry = React.useCallback(() => {\n void run(query, undefined, false);\n }, [query, run]);\n\n const resolve = React.useCallback(\n (value: string) => {\n // The ref cache cannot be the only tier: a ref write triggers no render,\n // so the chip would paint the raw value and never repaint. The shared\n // store holds other instances' pages and re-renders this one on a gain.\n const declared = staticOptions?.find((option) => option.value === value);\n if (declared) return declared;\n const fromShared = shared && sharedKey ? shared.get(sharedKey, value) : undefined;\n if (fromShared) return fromShared as FilterOption<O>;\n return cache.current.get(value);\n },\n [staticOptions, shared, sharedKey],\n );\n\n return {\n items,\n loading: state.loading,\n error: state.error,\n hasMore: state.hasMore,\n query,\n setQuery,\n loadMore,\n retry,\n resolve,\n };\n}\n\n/**\n * Resolves committed values no loaded page covered, through `resolveValues`: a\n * restored saved view holds ids the loader never returned. The claim set marks\n * an omitted id asked, so only a REJECTED resolve lets a later mount retry.\n */\nexport function useFilterValueResolution<V, O>(\n field: FilterField<V, O> | undefined,\n values: readonly unknown[],\n): void {\n const actionsContext = React.useContext(FilterActionsContext);\n const shared: FilterResolutionStore | null = actionsContext?.resolution ?? null;\n const sharedKey = filterFieldKey(field, actionsContext?.index);\n const resolveValues = field?.resolveValues;\n const staticOptions = field?.options;\n // Keyed by CONTENT; NUL cannot occur inside a real stored value.\n const valuesKey = values.map((entry) => String(entry)).join(\"\\u0000\");\n\n React.useEffect(() => {\n if (!resolveValues || !shared || !sharedKey || valuesKey === \"\") return;\n const missing = valuesKey.split(\"\\u0000\").filter((value) => {\n if (staticOptions?.some((option) => option.value === value)) return false;\n return shared.get(sharedKey, value) === undefined;\n });\n const wanted = shared.claim(sharedKey, missing);\n if (wanted.length === 0) return;\n\n // No unmount guard: the store outlives the component.\n void Promise.resolve(resolveValues(wanted)).then(\n (options) => shared.set(sharedKey, options),\n () => shared.release(sharedKey, wanted),\n );\n }, [resolveValues, shared, sharedKey, valuesKey, staticOptions]);\n}\n\n/* -------------------------------------------------------------------------- */\n/* Shared chrome */\n/* -------------------------------------------------------------------------- */\n\n/**\n * The panel every editor renders into. A plain flex column, NOT a combobox: an\n * editor inside a Base UI composite would inherit its `aria-activedescendant`\n * and arrow keys, which is hostile to a colour picker or a slider.\n */\nfunction EditorPanel({ children, className }: { children: React.ReactNode; className?: string }) {\n return (\n <div\n data-slot=\"filter-editor\"\n className={cn(\n \"flex w-full flex-col gap-2 p-2\",\n /* The list height cap as a VARIABLE, not the `maxHeight` prop, which\n becomes an inline style no consumer class can beat. 16rem is the\n 256px the menu has always used. */\n \"[--cascader-max-height:16rem]\",\n className,\n )}\n >\n {children}\n </div>\n );\n}\n\nfunction EditorFooter({\n onCancel,\n onCommit,\n labels,\n host,\n}: Pick<FilterEditorProps, \"labels\" | \"host\"> & {\n onCancel: () => void;\n onCommit: () => void;\n}) {\n // The ONE ladder, not a hardcoded rung: `size=\"sm\"` here measured 4px short\n // of the bar's own controls at `size=\"default\"` in all eight styles.\n const actions = React.useContext(FilterActionsContext);\n const sizes = filterControlSizes({ size: actions?.size ?? \"default\" });\n\n // The create host advances on commit and has Back; amend must offer discard.\n if (host === \"create\") return null;\n return (\n <div className=\"flex items-center justify-end gap-1.5 pt-1\">\n <Button variant=\"ghost\" size={sizes.button} onClick={onCancel}>\n {labels.discard}\n </Button>\n <Button size={sizes.button} onClick={onCommit}>\n {labels.apply}\n </Button>\n </div>\n );\n}\n\n/**\n * `w-full` because `ButtonGroup` is `w-fit`, which collapses inside this\n * fixed-width panel. Sera is an underline style, so its direct children flatten\n * to one bottom-only edge - `border-b-input`, not transparent, since the\n * buttons are the trailing edge and the rule would stop mid-panel.\n */\nconst EDITOR_FIELD_GROUP = \"w-full\";\n\n/**\n * Confirm and cancel, an OUTLINE pair FUSED onto the field's trailing edge.\n * Returns a FRAGMENT: `ButtonGroup` fuses with selectors matching DIRECT\n * children only, so a wrapper div renders three separate boxes. `size=\"icon\"`\n * because every style's icon button at that size is exactly its input's height.\n */\nfunction EditorCommitButtons({\n onCancel,\n onCommit,\n labels,\n}: Pick<FilterEditorProps, \"labels\"> & {\n onCancel: () => void;\n onCommit: () => void;\n}) {\n return (\n <>\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"icon\"\n aria-label={labels.apply}\n onClick={onCommit}\n >\n <CheckIcon aria-hidden=\"true\" />\n </Button>\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"icon\"\n aria-label={labels.discard}\n onClick={onCancel}\n >\n <XIcon aria-hidden=\"true\" />\n </Button>\n </>\n );\n}\n\nfunction useCommitKeys(commit: () => void, cancel: () => void) {\n return React.useCallback(\n (event: React.KeyboardEvent) => {\n if (event.key === \"Enter\" && !event.nativeEvent.isComposing) {\n event.preventDefault();\n commit();\n return;\n }\n if (event.key === \"Escape\") {\n event.preventDefault();\n // Stop here so a surrounding dialog does not also close.\n event.stopPropagation();\n cancel();\n }\n },\n [commit, cancel],\n );\n}\n\n/* -------------------------------------------------------------------------- */\n/* Text / number */\n/* -------------------------------------------------------------------------- */\n\nexport function FilterTextEditor<V, O>({\n value,\n onValueChange,\n commit,\n cancel,\n autoFocusProps,\n labels,\n host,\n field,\n}: FilterEditorProps<V, O>) {\n const onKeyDown = useCommitKeys(() => commit(), cancel);\n return (\n // A width, not shrink-to-fit: the popover is `w-auto`, so an unsized box\n // changes width between the hosts. `w-72` is measured - it holds about 23\n // characters in sera and 27 in nova; `w-64` held about eighteen, too short\n // for an email, and `w-80` was the widest control in a bar of compact\n // chips. Capped at the viewport because `w-80` is 320px and a 360px phone\n // has 40px to spare. A `w-*` on the field wins.\n <EditorPanel className={cn(\"w-72 min-w-0 max-w-[calc(100vw-2rem)]\", field.className)}>\n <ButtonGroup className={EDITOR_FIELD_GROUP}>\n <Input\n {...autoFocusProps}\n value={(value as string) ?? \"\"}\n placeholder={field.placeholder ?? labels.valuePlaceholder}\n aria-label={field.label}\n onChange={(event) => onValueChange(event.target.value as V)}\n onKeyDown={onKeyDown}\n />\n {/*\n A lone input still belongs in the group: the per-style sheets re-round\n the LAST child, so a group with nothing fused draws the bare field.\n */}\n {host === \"create\" ? null : (\n <EditorCommitButtons labels={labels} onCancel={cancel} onCommit={() => commit()} />\n )}\n </ButtonGroup>\n </EditorPanel>\n );\n}\n\nexport function FilterNumberEditor<V, O>({\n value,\n onValueChange,\n commit,\n cancel,\n autoFocusProps,\n labels,\n host,\n field,\n}: FilterEditorProps<V, O>) {\n const onKeyDown = useCommitKeys(() => commit(), cancel);\n return (\n // Deliberately not the text editor's `w-72`: number values are short by\n // construction, and a wide box around \"42\" is the opposite defect.\n <EditorPanel className={cn(\"w-56 min-w-0\", field.className)}>\n <ButtonGroup className={EDITOR_FIELD_GROUP}>\n <Input\n {...autoFocusProps}\n type=\"number\"\n value={value === undefined || value === null ? \"\" : String(value)}\n placeholder={field.placeholder}\n aria-label={field.label}\n onChange={(event) => {\n const raw = event.target.value;\n onValueChange((raw === \"\" ? undefined : Number(raw)) as V);\n }}\n onKeyDown={onKeyDown}\n />\n {host === \"create\" ? null : (\n <EditorCommitButtons labels={labels} onCancel={cancel} onCommit={() => commit()} />\n )}\n </ButtonGroup>\n </EditorPanel>\n );\n}\n\nexport function FilterRangeEditor<V, O>({\n value,\n onValueChange,\n commit,\n cancel,\n autoFocusProps,\n labels,\n host,\n field,\n}: FilterEditorProps<V, O>) {\n const tuple = (Array.isArray(value) ? value : []) as unknown[];\n const onKeyDown = useCommitKeys(() => commit(), cancel);\n\n const update = (index: 0 | 1, raw: string) => {\n const next = [tuple[0], tuple[1]];\n next[index] = raw === \"\" ? undefined : Number(raw);\n onValueChange(next as V);\n };\n\n return (\n <EditorPanel>\n <div className=\"flex items-center gap-1.5\">\n <Input\n {...autoFocusProps}\n type=\"number\"\n value={tuple[0] === undefined ? \"\" : String(tuple[0])}\n aria-label={labels.rangeFrom(field.label)}\n onChange={(event) => update(0, event.target.value)}\n onKeyDown={onKeyDown}\n />\n <span className=\"text-muted-foreground text-xs\">{labels.rangeSeparator}</span>\n <Input\n type=\"number\"\n value={tuple[1] === undefined ? \"\" : String(tuple[1])}\n aria-label={labels.rangeTo(field.label)}\n onChange={(event) => update(1, event.target.value)}\n onKeyDown={onKeyDown}\n />\n </div>\n <EditorFooter host={host} labels={labels} onCancel={cancel} onCommit={() => commit()} />\n </EditorPanel>\n );\n}\n\n/* -------------------------------------------------------------------------- */\n/* The menu */\n/* -------------------------------------------------------------------------- */\n\n/** One row. The shape both the operator menu and the option editors hand over. */\nexport interface FilterListItem {\n value: string;\n label: string;\n icon?: React.ReactNode;\n description?: string;\n keywords?: string[];\n disabled?: boolean;\n /**\n * A None row, from `FilterOption.exclusive`. LAYOUT only: what a pick DOES is\n * `applyFilterExclusiveSelection`, in the option editor's handler. A consumer\n * composing `FilterMenu` into an editor of their own owns the same call.\n */\n exclusive?: boolean;\n}\n\n/**\n * Beyond the cascader's own fields: one divider flag, on the first row of a\n * group that is not the first, because grouping happens out here. A separator\n * NODE would join the option ring, and `[data-selected] + :not([data-selected])`\n * reads the LIVE selection, so unticking a pinned row drew a second line.\n */\ninterface FilterMenuMeta {\n divider?: boolean;\n /**\n * Carries `FilterListItem.exclusive` down to the row. The rule above it is\n * `aria-hidden`, so the row's accessible name is the only channel arriving\n * before the press, and `renderItem` receives the node and nothing else.\n *\n * `[data-slot=filter-menu-exclusive-hint]` is also the handle a consumer\n * styles the row through: the cascader's row element takes no attribute of\n * ours, so `:has([data-slot=filter-menu-exclusive-hint])` selects it.\n */\n exclusive?: boolean;\n}\n\n/** Joins a selection into one comparable key; NUL cannot occur in a value. */\nconst PIN_SEPARATOR = \"\\u0000\";\n\n/** A bound on a race: each attempt costs one task and stops on success. */\nconst MAX_PIN_RESTORE_ATTEMPTS = 4;\n\ninterface PendingPinRestore {\n /** The row the user was on when the rows moved. Tracked by VALUE, never index. */\n value: string;\n /** The index it sat at, which is the half of the signature Base UI keeps. */\n index: number;\n /** The order the rows landed in, so the target's new position is known. */\n order: string[];\n attempts: number;\n}\n\n/**\n * Carries the HIGHLIGHT across a live re-pin. Base UI holds it as an INDEX and\n * a keyed reorder MOVES the DOM node rather than remounting it, so the index\n * map only rebuilds when the `MutationObserver` fires: until then, ticking a\n * row moves the highlight down one. So this ARMS in the layout effect, where\n * the map still reads the OLD order, and fires on the signature (SAME index,\n * DIFFERENT row) from a TASK, re-trying because the store event and the re-sort\n * are unordered. A synthetic `mousemove`, since Base UI exposes no setter.\n */\nfunction FilterMenuPinKeeper({\n order,\n items,\n}: {\n order: string[];\n /** The data the order was derived from, by identity. */\n items: FilterListItem[];\n}) {\n const { baseId } = useCascaderActions();\n const highlight = useCascaderHighlight();\n const previousRef = React.useRef<{\n order: string[];\n items: FilterListItem[];\n } | null>(null);\n const pendingRef = React.useRef<PendingPinRestore | null>(null);\n const timerRef = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n\n // From the render: on the reordering commit a ref still holds the OLD row.\n const highlightedValue = highlight.value;\n const highlightedIndex = highlight.index;\n\n const stop = React.useCallback(() => {\n pendingRef.current = null;\n if (timerRef.current === null) return;\n clearTimeout(timerRef.current);\n timerRef.current = null;\n }, []);\n\n const startRestore = React.useCallback(() => {\n const attempt = () => {\n timerRef.current = null;\n const pending = pendingRef.current;\n if (!pending) return;\n\n const target = pending.order.indexOf(pending.value);\n const rows = document\n .getElementById(`${baseId}-column-0`)\n ?.querySelectorAll<HTMLElement>('[data-slot=\"cascader-item\"]');\n // A WINDOWED list renders a subset, so row N is not order[N]. Leave it.\n if (target < 0 || !rows || rows.length !== pending.order.length) {\n stop();\n return;\n }\n\n rows[target]?.dispatchEvent(new MouseEvent(\"mousemove\", { bubbles: true }));\n\n pending.attempts += 1;\n if (pending.attempts >= MAX_PIN_RESTORE_ATTEMPTS) {\n stop();\n return;\n }\n timerRef.current = setTimeout(attempt, 0);\n };\n\n timerRef.current = setTimeout(attempt, 0);\n }, [baseId, stop]);\n\n // No dependency list: the arm must run on the commit that reorders the rows.\n React.useLayoutEffect(() => {\n const previous = previousRef.current;\n previousRef.current = { order, items };\n\n if (!previous || previous.order === order) return;\n // New DATA (a page, a query) is Base UI's to highlight; only a re-pin is ours.\n if (previous.items !== items) return;\n if (!highlightedValue) return;\n // Content, not identity: a re-pin can leave the rows in the same order.\n if (isSameOrder(previous.order, order)) return;\n\n pendingRef.current = {\n value: highlightedValue,\n index: highlightedIndex,\n order,\n attempts: 0,\n };\n });\n\n React.useEffect(() => {\n const pending = pendingRef.current;\n if (!pending) return;\n\n // Back where it belongs, or moved by the user: either way the arm is spent.\n if (highlightedValue === pending.value || highlightedIndex !== pending.index) {\n stop();\n return;\n }\n // Already chasing this one; a second chain would double every dispatch.\n if (pending.attempts > 0 || timerRef.current !== null) return;\n startRestore();\n }, [highlightedValue, highlightedIndex, startRestore, stop]);\n\n React.useEffect(() => stop, [stop]);\n\n return null;\n}\n\n/** Element-wise, because the arrays are rebuilt on every selection change. */\nfunction isSameOrder(a: string[], b: string[]) {\n if (a.length !== b.length) return false;\n for (let index = 0; index < a.length; index += 1) {\n if (a[index] !== b[index]) return false;\n }\n return true;\n}\n\nexport interface FilterMenuProps {\n items: FilterListItem[];\n /** Committed values. Drives the check mark and the pinned group. */\n selected: string[];\n multiple?: boolean;\n /** Receives the FULL next selection, so no caller re-derives it. */\n onSelectionChange: (values: string[]) => void;\n labels: FilterLabels;\n ariaLabel: string;\n searchPlaceholder?: string;\n /** Whether the search field is VISIBLE. It is always rendered regardless. */\n searchable?: boolean;\n /**\n * Viewport height before the list scrolls, in pixels. Omitted on purpose by\n * the option editors: it becomes an inline style a consumer's `className`\n * cannot outrank, so the panel publishes `--cascader-max-height` instead.\n */\n maxHeight?: number;\n /**\n * Pin selected rows above the rest, with a full-bleed rule between them. Off\n * by default; the option editors read `FilterField.pinSelected` per field.\n */\n pinSelected?: boolean;\n /**\n * Order INSIDE each group, plus WHEN the partition is taken. Declaration\n * order by default, so the partition is stable rather than a re-sort.\n */\n sortSelected?: \"none\" | \"label\" | \"snapshot\";\n /** The caller already filtered `items`, so the cascader must not re-filter. */\n preFiltered?: boolean;\n autoFocusProps?: FilterEditorProps[\"autoFocusProps\"];\n /** Controlled query. Pair it with `onQueryChange` to filter outside. */\n query?: string;\n onQueryChange?: (query: string) => void;\n state?: Pick<FilterOptionsState<unknown>, \"loading\" | \"error\" | \"hasMore\" | \"loadMore\" | \"retry\">;\n}\n\n/**\n * One accessible list, shared by the operator menu and every option editor. It\n * is the CASCADER configured flat, not a list this file implements, which\n * brings the typeahead, RTL handling and live region with it. Only the pinning\n * and the paging affordance stay out here.\n */\nexport function FilterMenu({\n items,\n selected,\n multiple = false,\n onSelectionChange,\n labels,\n ariaLabel,\n searchPlaceholder,\n searchable = true,\n maxHeight,\n pinSelected = false,\n sortSelected = \"none\",\n preFiltered = false,\n autoFocusProps,\n query,\n onQueryChange,\n state,\n}: FilterMenuProps) {\n /**\n * The pin set as a KEY, not an array: `selected` is a fresh array on most\n * renders, so a memo depending on it re-partitions every render.\n */\n const liveKey = pinSelected ? selected.join(PIN_SEPARATOR) : \"\";\n\n /**\n * The same set, frozen at OPEN, for `sortSelected: \"snapshot\"`. LIVE is the\n * default: \"your picks, then the rest\" is about the CURRENT selection, and\n * `FilterMenuPinKeeper` pays for rows moving under the pointer.\n */\n const [snapshotKey] = React.useState(() => liveKey);\n // `pinSelected` re-checked here, not just through `liveKey`: `snapshotKey` is\n // frozen at MOUNT, so a menu that lost the prop would keep partitioning.\n const pinnedKey = !pinSelected ? \"\" : sortSelected === \"snapshot\" ? snapshotKey : liveKey;\n\n // Uncontrolled unless the caller owns the query, as an option service does.\n const [ownQuery, setOwnQuery] = React.useState(\"\");\n const currentQuery = query ?? ownQuery;\n const setQuery = onQueryChange ?? setOwnQuery;\n\n /**\n * Memoized on the SELECTION, not the query: folding the query in re-sorted\n * 4,000 rows on every keystroke, for a one pixel rule.\n */\n const partitioned = React.useMemo(() => {\n const pinned = new Set(pinnedKey ? pinnedKey.split(PIN_SEPARATOR) : []);\n\n /*\n Exclusive rows come out BEFORE the pin partition; their position is fixed.\n Pinning is by SELECTION, so a ticked None row would lift itself above the\n very rule drawn to set it apart and drop back on untick. Grouping by ROLE\n means the pinned group counts ordinary picks only, which is also why\n picking None draws no pin rule: it clears every other pick.\n */\n const exclusive = items.filter((item) => item.exclusive);\n const values = exclusive.length ? items.filter((item) => !item.exclusive) : items;\n\n const chosen = pinned.size ? values.filter((item) => pinned.has(item.value)) : [];\n const rest = pinned.size ? values.filter((item) => !pinned.has(item.value)) : values;\n\n // The SCHEMA's order inside each group unless the field asks otherwise:\n // option order is usually semantic.\n const ordered =\n sortSelected === \"label\"\n ? [\n [...chosen].sort((a, b) => a.label.localeCompare(b.label)),\n [...rest].sort((a, b) => a.label.localeCompare(b.label)),\n [...exclusive].sort((a, b) => a.label.localeCompare(b.label)),\n ]\n : [chosen, rest, exclusive];\n\n const rows = [...ordered[0], ...ordered[1], ...ordered[2]];\n\n return {\n chosenCount: chosen.length,\n /** Index of the first exclusive row, or -1 when the list has none. */\n exclusiveAt: exclusive.length ? rows.length - exclusive.length : -1,\n // The render order alone, so a REORDER is an identity compare.\n order: rows.map((item) => item.value),\n nodes: rows.map<CascaderNode<FilterMenuMeta>>((item) => ({\n value: item.value,\n label: item.label,\n icon: item.icon,\n description: item.description,\n keywords: item.keywords,\n disabled: item.disabled,\n // Only exclusive rows carry `data`, so the ordinary 4,000 keep theirs.\n data: item.exclusive ? { exclusive: true } : undefined,\n })),\n };\n }, [items, pinnedKey, sortSelected]);\n\n // No rule under a query: \"your picks, then the rest\" is about the WHOLE list.\n const dividerAt = partitioned.chosenCount && !currentQuery.trim() ? partitioned.chosenCount : -1;\n\n // Survives a search, unlike the pin rule: it is a fact about the row.\n const exclusiveDividerAt = partitioned.exclusiveAt;\n\n const nodes = React.useMemo<CascaderNode<FilterMenuMeta>[]>(() => {\n const total = partitioned.nodes.length;\n // Only a boundary with rows on BOTH sides is one: a rule on row 0 would\n // be a line above the top of the list.\n const marks = [dividerAt, exclusiveDividerAt].filter((index) => index > 0 && index < total);\n if (marks.length === 0) return partitioned.nodes;\n // Rows rewritten, not rebuilt: copying 4,000 objects would undo the split.\n const next = partitioned.nodes.slice();\n for (const index of marks) {\n // MERGED, never replaced: the two boundaries usually fall on one row, and\n // overwriting `data` dropped the flag the accessible name is built from.\n next[index] = {\n ...next[index],\n data: { ...next[index].data, divider: true },\n };\n }\n return next;\n }, [partitioned, dividerAt, exclusiveDividerAt]);\n\n const renderItem = React.useCallback(\n (node: CascaderNode<FilterMenuMeta>, itemState: CascaderItemState<FilterMenuMeta>) => (\n <>\n {node.data?.divider ? (\n <span\n data-slot=\"filter-menu-divider\"\n aria-hidden=\"true\"\n /* Full bleed, over the per-style `--cascader-list-pad` the shell\n publishes: a rule stopping at the row's inset box reads as a gap.\n Centred in the 8px the row gives back above itself, not `top-0`. */\n className=\"absolute inset-x-[calc(var(--cascader-list-pad,4px)*-1)] -top-1 h-px bg-border\"\n />\n ) : null}\n\n {node.icon ? (\n <span\n data-slot=\"filter-menu-icon\"\n className=\"flex shrink-0 items-center justify-center text-muted-foreground\"\n >\n {node.icon}\n </span>\n ) : null}\n\n <span className=\"flex min-w-0 flex-1 flex-col items-start gap-0.5\">\n <span className=\"w-full truncate text-start\">{node.label}</span>\n {node.description ? (\n <span className=\"w-full truncate text-start text-muted-foreground text-xs\">\n {node.description}\n </span>\n ) : null}\n </span>\n\n {/*\n What the aria-hidden rule says, for the people it does not reach.\n Inside the option element so it joins the row's accessible NAME, not\n an `aria-describedby`: a description is announced late or not at all,\n and this has to arrive before the press. The cascader's `srDetails`\n cannot either: `renderItem` replaces the row body. Empty copy renders\n nothing, so `labels.exclusiveHint` of \"\" silences it.\n */}\n {node.data?.exclusive && labels.exclusiveHint ? (\n <span data-slot=\"filter-menu-exclusive-hint\" className=\"sr-only\">\n {`, ${labels.exclusiveHint}`}\n </span>\n ) : null}\n\n {/* A check mark in both modes, never the cascader's default box. */}\n {itemState.selected ? (\n <span\n data-slot=\"filter-menu-check\"\n /* The gutter every style already reserves, on the cascader's own\n logical inset. `end-*` rather than `right-2`, so RTL mirrors. */\n className=\"pointer-events-none absolute end-(--cascader-row-inset,8px)! flex size-4 items-center justify-center rtl:right-auto!\"\n >\n <CheckIcon className=\"text-foreground! **:text-foreground!\" />\n </span>\n ) : null}\n </>\n ),\n [labels.exclusiveHint],\n );\n\n const cascaderLabels = React.useMemo(\n () => ({\n search: searchPlaceholder ?? labels.searchOptions,\n empty: labels.empty,\n loading: labels.loading,\n loadingMore: labels.loadingMore,\n loadMore: labels.loadMore,\n error: labels.error,\n retry: labels.retry,\n // Named after the field, not the cascader's own \"Top level\" wording.\n rootLevel: ariaLabel,\n panelLabel: ariaLabel,\n // Run FLAT, so the default hint would teach branch keys that do not exist.\n keyboardHint: () => \"\",\n // From `FilterLabels`, so the menu ships no English of its own.\n resultsAnnouncement: labels.resultsAnnouncement,\n actionsLabel: labels.actionsLabel,\n }),\n [labels, ariaLabel, searchPlaceholder],\n );\n\n /**\n * Paging and retry in the pinned footer, never a row: a row would join the\n * option ring, where arrows land on it and a query filters it away mid-page.\n */\n const actions = React.useMemo<CascaderActionItem[]>(() => {\n if (state?.error) {\n return [{ value: \"retry\", label: labels.retry, onSelect: state.retry }];\n }\n if (state?.hasMore) {\n return [\n {\n value: \"load-more\",\n label: state.loading ? labels.loadingMore : labels.loadMore,\n disabled: state.loading,\n onSelect: state.loadMore,\n },\n ];\n }\n return [];\n }, [state, labels]);\n\n const shared = {\n // Inline and pinned open with a no-op handler, so the unconditional\n // `setOpen(false)` of a single-select commit cannot dismiss the popover.\n inline: true,\n open: true,\n onOpenChange: () => {},\n items: nodes,\n inputValue: currentQuery,\n onInputValueChange: setQuery,\n maxHeight,\n renderItem,\n labels: cascaderLabels,\n actions,\n // The option service is the ONE filter when it owns the query.\n ...(preFiltered ? { filter: () => true } : null),\n };\n\n const cascaderProps: CascaderProps<FilterMenuMeta> = multiple\n ? {\n ...shared,\n multiple: true,\n value: selected,\n onValueChange: (values: string[]) => onSelectionChange(values),\n }\n : {\n ...shared,\n value: selected[0] ?? \"\",\n onValueChange: (value: string) => onSelectionChange(value ? [value] : []),\n };\n\n return (\n <Cascader {...cascaderProps}>\n <CascaderPanel>\n {/*\n `searchable: false` hides the FIELD, never removes it: the input owns\n focus and `aria-activedescendant`, so a menu without one has no\n keyboard. The class goes on the nav so the strip's border goes too.\n */}\n <CascaderNav\n className={cn(\n /* The nav's divider is `border-border/60` and the group separator\n is a full-opacity `bg-border`; two strengths read as a mistake. */\n \"border-border\",\n !searchable && \"sr-only\",\n )}\n >\n <CascaderInput\n {...(autoFocusProps ?? {})}\n placeholder={searchPlaceholder ?? labels.searchOptions}\n aria-label={ariaLabel}\n />\n </CascaderNav>\n <CascaderEmpty>\n {state?.error ? labels.error : state?.loading ? labels.loading : labels.empty}\n </CascaderEmpty>\n {/*\n Plain rows, DELIBERATELY not `CascaderVirtualItems`: windowing stands\n `FilterMenuPinKeeper` down. The long lists are async and PAGE 25.\n */}\n <CascaderList\n /**\n * Real layout space around the group rule, which is absolutely\n * positioned and adds no height. `renderItem` cannot reach the row's\n * own box, and a spacer NODE would join the option ring.\n *\n * `:has()` is affordable here: scoped to this one list, a compound\n * whose descendant exists on at most ONE row, and these menus render\n * tens of rows rather than thousands.\n */\n className=\"[&>[data-slot=cascader-item]:has([data-slot=filter-menu-divider])]:mt-2\"\n >\n <CascaderItems />\n </CascaderList>\n <CascaderFooter />\n <CascaderStatus />\n {/*\n Last, so its layout effect reads the reordered DOM after every row has\n registered. Not mounted at all for a menu that cannot reorder.\n */}\n {pinSelected && sortSelected !== \"snapshot\" ? (\n <FilterMenuPinKeeper order={partitioned.order} items={items} />\n ) : null}\n </CascaderPanel>\n </Cascader>\n );\n}\n\n/* -------------------------------------------------------------------------- */\n/* Option based editors */\n/* -------------------------------------------------------------------------- */\n\nfunction OptionEditor<V, O>(props: FilterEditorProps<V, O> & { multiple: boolean }) {\n const { multiple, options, labels, autoFocusProps, commit, cancel, onValueChange, value, field } =\n props;\n\n const selected = React.useMemo(() => {\n if (value === undefined || value === null) return [];\n return (Array.isArray(value) ? value : [value]) as string[];\n }, [value]);\n\n const announce = React.useContext(FilterActionsContext)?.announce;\n\n return (\n /*\n A DELIBERATELY narrow default: 12rem holds around 22 characters at every\n style's row size. `field.className` lands LAST, so a consumer's `w-*` wins.\n */\n <EditorPanel className={cn(\"w-48 min-w-0 gap-0 p-0\", field.className)}>\n <FilterMenu\n items={options.items}\n selected={selected}\n multiple={multiple}\n onSelectionChange={(raw) => {\n /*\n The ONE place the None rule is applied: every route into a selection\n arrives here, so click and keyboard cannot disagree, and only the\n editor can ANSWER it - `options.resolve` sees the schema and every\n loaded page, where the menu holds only the rows on screen.\n */\n const values = applyFilterExclusiveSelection(raw, selected, (value) =>\n Boolean(options.resolve(value)?.exclusive),\n );\n\n /*\n Identity is the test: the rule hands back `raw` itself unless it\n intervened. Announced because nothing else reports it: focus never\n moved, and nobody is on the rows that lost their check marks.\n */\n if (values !== raw && announce) {\n const arrived = values.find((entry) => !selected.includes(entry));\n const cleared = raw.length - values.length;\n if (arrived !== undefined && cleared > 0) {\n announce(\n labels.exclusiveAnnouncement(options.resolve(arrived)?.label ?? arrived, cleared),\n );\n }\n } else if (values === raw && raw.length > 1) {\n /*\n The hole in the rule, made LOUD. An unresolvable value is treated\n as ordinary and cannot be told from an id whose label has not\n arrived, so this warns rather than acts. Needs a SEEN None row.\n */\n const hasNoneRow =\n options.items.some((item) => item.exclusive) ||\n Boolean(field.options?.some((option) => option.exclusive));\n const unresolved = hasNoneRow\n ? raw.find((entry) => options.resolve(entry) === undefined)\n : undefined;\n if (unresolved !== undefined) {\n warnFilterOnce(\n `exclusive-unresolved:${field.id}`,\n `field \"${field.id}\" has an exclusive option, but the value ` +\n `\"${unresolved}\" resolves to no option, so the None rule ` +\n `cannot tell whether it is the exclusive one and has left ` +\n `it in place. Declare the exclusive option in the field's ` +\n `\\`options\\` even when the rest of the list is async, or ` +\n `cover stored values with \\`resolveValues\\`.`,\n );\n }\n }\n\n if (!multiple) {\n const next = values[0];\n // Base UI deselects the committed row; an empty filter is no gain.\n if (next === undefined) {\n cancel();\n return;\n }\n onValueChange(next as V);\n commit(next as V);\n return;\n }\n onValueChange(values as V);\n // Every toggle commits with the popover open: several picks, one gesture.\n commit(values as V, { close: false });\n }}\n labels={labels}\n ariaLabel={field.label}\n searchable={field.searchable ?? true}\n // Not a composed `Search ${label}...`: hardcoded English no `labels`\n // override could reach, and lowercasing a label is locale-hostile.\n searchPlaceholder={field.placeholder}\n pinSelected={field.pinSelected ?? false}\n sortSelected={field.sortSelected}\n // `useFilterOptions` already applied the query, locally or server side.\n preFiltered\n query={options.query}\n onQueryChange={options.setQuery}\n state={options}\n autoFocusProps={autoFocusProps}\n />\n </EditorPanel>\n );\n}\n\nexport function FilterSelectEditor<V, O>(props: FilterEditorProps<V, O>) {\n return <OptionEditor {...props} multiple={false} />;\n}\n\nexport function FilterMultiSelectEditor<V, O>(props: FilterEditorProps<V, O>) {\n return <OptionEditor {...props} multiple />;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Boolean */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Module level, so the menu's index is not rebuilt on every render. Not in\n * `FilterLabels`: the chip's own display spells the same two words out.\n */\nconst BOOLEAN_ITEMS: FilterListItem[] = [\n { value: \"true\", label: \"True\" },\n { value: \"false\", label: \"False\" },\n];\n\nexport function FilterBooleanEditor<V, O>({\n value,\n onValueChange,\n commit,\n labels,\n autoFocusProps,\n field,\n}: FilterEditorProps<V, O>) {\n return (\n // Two words, and `field.className` lands last so a consumer's `w-*` wins.\n <EditorPanel className={cn(\"w-40 min-w-0 gap-0 p-0\", field.className)}>\n <FilterMenu\n items={BOOLEAN_ITEMS}\n selected={value === true ? [\"true\"] : value === false ? [\"false\"] : []}\n onSelectionChange={(values) => {\n /* Deselecting the committed row leaves nothing to filter on, so it is\n a no-op rather than a commit of `false`. */\n if (values.length === 0) return;\n const next = (values[0] === \"true\") as V;\n onValueChange(next);\n commit(next);\n }}\n labels={labels}\n ariaLabel={field.label}\n /* Two rows: a search over them is more chrome than list, but the\n field is still rendered, hidden, because it owns the keyboard. */\n searchable={false}\n autoFocusProps={autoFocusProps}\n />\n </EditorPanel>\n );\n}\n\n/* -------------------------------------------------------------------------- */\n/* Resolution */\n/* -------------------------------------------------------------------------- */\n\nexport type {\n AnyFilterEditor,\n FilterEditorRegistry,\n} from \"./filters-types\";\n\nexport const DEFAULT_FILTER_EDITORS: FilterEditorRegistry = {\n text: FilterTextEditor,\n number: FilterNumberEditor,\n range: FilterRangeEditor,\n select: FilterSelectEditor,\n multiselect: FilterMultiSelectEditor,\n boolean: FilterBooleanEditor,\n};\n\n/**\n * Picks the editor for a (field, operator) pair: the field's own `editor`, then\n * the operator's ARITY, then the field's `type`. Arity outranks type because\n * \"between\" wants two boxes whatever the field said.\n */\nexport function resolveFilterEditor<V, O>(\n field: FilterField<V, O>,\n operator: FilterOperator | undefined,\n editors: FilterEditorRegistry,\n): AnyFilterEditor | undefined {\n if (typeof field.editor === \"function\") {\n // The one place a consumer's typed editor meets the erased registry.\n return field.editor as unknown as AnyFilterEditor;\n }\n if (typeof field.editor === \"string\") {\n const named = editors[field.editor];\n if (named) return named;\n }\n\n const arity = operator?.arity ?? \"one\";\n if (arity === \"none\") return undefined;\n if (arity === \"range\") return editors.range;\n if (arity === \"many\") {\n // An option-backed field gets checkboxes; anything else receives an array.\n if (field.options || field.loadOptions) return editors.multiselect;\n }\n\n return editors[field.type ?? \"text\"] ?? editors.text;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA2DA,MAAM,OAAoC;CACxC,OAAO,CAAC;CACR,SAAS;CACT,OAAO;CACP,SAAS;AACX;;AAGA,MAAM,6BAA6B,CAAC;AACpC,MAAM,oBAAoB;;;;;AAM1B,SAAS,eACP,OACA,OACe;CACf,IAAI,CAAC,OAAO,OAAO;CACnB,IAAI,OACG;OAAA,MAAM,SAAS,MAAM,KACxB,IAAK,MAAM,UAAuB,OAChC,OAAO,eAAe,MAAM,IAAI;CAAA;CAItC,OAAO,IAAI,MAAM;AACnB;;;;;;;;AASA,SAAgB,iBACd,OACA,SACA,aAAa,KACU;CACvB,MAAM,CAAC,OAAO,iBAAiBA,QAAM,SAAS,EAAE;CAChD,MAAM,CAAC,OAAO,YAAYA,QAAM,SAC9B,IACF;CAEA,MAAM,QAAQA,QAAM,uBAAO,IAAI,IAA6B,CAAC;CAC7D,MAAM,YAAYA,QAAM,OAAO,CAAC;CAChC,MAAM,WAAWA,QAAM,OAA+B,IAAI;CAG1D,MAAM,iBAAiBA,QAAM,WAAW,oBAAoB;CAC5D,MAAM,SAAuC,gBAAgB,cAAc;CAC3E,MAAM,YAAY,eAAe,OAAO,gBAAgB,KAAK;CAG7D,QAAM,qBACJ,SAAS,OAAO,YAAY,gBAC5B,SAAS,OAAO,aAAa,aAC7B,SAAS,OAAO,aAAa,WAC/B;CAEA,MAAM,gBAAgB,OAAO;CAC7B,MAAM,cAAc,OAAO;CAC3B,MAAM,UAAU,QAAQ,WAAW;CAGnC,QAAM,gBAAgB;EACpB,IAAI,CAAC,eAAe;EACpB,KAAK,MAA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tC;CAAE,OAAO;CAAQ,OAAO;AAAO,GAC/B;CAAE,OAAO;CAAS,OAAO;AAAQ,CACnC;AAEA,SAAgB,oBAA0B,EACxC,OACA,eACA,QACA,QACA,gBACA,SAC0B;CAC1B,OAEE,oBAAC,aAAD;EAAa,WAAW,GAAG,0BAA0B,MAAM,SAAS;EAClE,UAAA,oBAAC,YAAD;GACE,OAAO;GACP,UAAU,UAAU,OAAO,CAAC,MAAM,IAAI,UAAU,QAAQ,CAAC,OAAO,IAAI,CAAC;GACrE,oBAAoB,WAAW;IAG7B,IAAI,OAAO,WAAW,GAAG;IACzB,MAAM,OAAQ,OAAO,OAAO;IAC5B,cAAc,IAAI;IAClB,OAAO,IAAI;GACb;GACQ;GACR,WAAW,MAAM;GAGjB,YAAY;GACI;EACjB,CAAA;CACU,CAAA;AAEjB;AAWA,MAAa,yBAA+C;CAC1D,MAAM;CACN,QAAQ;CACR,OAAO;CACP,QAAQ;CACR,aAAa;CACb,SAAS;AACX;;;;;;AAOA,SAAgB,oBACd,OACA,UACA,SAC6B;CAC7B,IAAI,OAAO,MAAM,WAAW,YAE1B,OAAO,MAAM;CAEf,IAAI,OAAO,MAAM,WAAW,UAAU;EACpC,MAAM,QAAQ,QAAQ,MAAM;EAC5B,IAAI,OAAO,OAAO;CACpB;CAEA,MAAM,QAAQ,UAAU,SAAS;CACjC,IAAI,UAAU,QAAQ,OAAO,KAAA;CAC7B,IAAI,UAAU,SAAS,OAAO,QAAQ;CACtC,IAAI,UAAU,QAER;MAAA,MAAM,WAAW,MAAM,aAAa,OAAO,QAAQ;CAAA;CAGzD,OAAO,QAAQ,MAAM,QAAQ,WAAW,QAAQ;AAClD"}
|
|
@@ -5,20 +5,19 @@ import { FilterDraftStep, FilterIssue, FilterIssueReason, FilterLabels } from ".
|
|
|
5
5
|
* wizard) and `showRecords` (a consumer's own panel heading) are unread by the
|
|
6
6
|
* shipped chrome and kept on purpose; do not prune them as dead keys.
|
|
7
7
|
*/
|
|
8
|
-
declare const DEFAULT_FILTER_LABELS: FilterLabels;
|
|
8
|
+
export declare const DEFAULT_FILTER_LABELS: FilterLabels;
|
|
9
9
|
/**
|
|
10
10
|
* Shallow merge over the defaults, like the cascader's. A deep merge would leak
|
|
11
11
|
* the default back into a replaced function-valued label for the arguments the
|
|
12
12
|
* consumer did not think about.
|
|
13
13
|
*/
|
|
14
|
-
declare function resolveFilterLabels(labels?: Partial<FilterLabels>): FilterLabels;
|
|
14
|
+
export declare function resolveFilterLabels(labels?: Partial<FilterLabels>): FilterLabels;
|
|
15
15
|
/**
|
|
16
16
|
* The sentence for one issue. Takes the ISSUE, not just the reason: a field's
|
|
17
17
|
* `validate` supplies its own words, so `custom` has nothing to look up.
|
|
18
18
|
*/
|
|
19
|
-
declare function filterIssueLabel(issue: Pick<FilterIssue, "reason" | "message"> | FilterIssueReason, labels: FilterLabels): string;
|
|
19
|
+
export declare function filterIssueLabel(issue: Pick<FilterIssue, "reason" | "message"> | FilterIssueReason, labels: FilterLabels): string;
|
|
20
20
|
/** The search placeholder for a step's panel. */
|
|
21
|
-
declare function stepPlaceholder(step: FilterDraftStep, labels: FilterLabels): string;
|
|
21
|
+
export declare function stepPlaceholder(step: FilterDraftStep, labels: FilterLabels): string;
|
|
22
22
|
//#endregion
|
|
23
|
-
export { DEFAULT_FILTER_LABELS, filterIssueLabel, resolveFilterLabels, stepPlaceholder };
|
|
24
23
|
//# sourceMappingURL=filters-i18n.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filters-i18n.d.ts","names":[],"sources":["../../../../src/components/reui/filters/filters-i18n.tsx"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"filters-i18n.d.ts","names":[],"sources":["../../../../src/components/reui/filters/filters-i18n.tsx"],"mappings":";;;;;;;qBAca,uBAAuB;;;;;;wBAuGpB,oBAAoB,SAAS,QAAQ,gBAAgB;;;;;wBASrD,iBACd,OAAO,KAAK,qCAAqC,mBACjD,QAAQ;;wBAYM,gBAAgB,MAAM,iBAAiB,QAAQ"}
|