@kumix/ui 0.3.17 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -18
- package/dist/account-avatar-DILzuuvz.js +23 -0
- package/dist/account-avatar-DILzuuvz.js.map +1 -0
- package/dist/{cascader-types-BnH6wYD-.d.ts → cascader-types-DVT-znZ-.d.ts} +6 -3
- package/dist/cascader-types-DVT-znZ-.d.ts.map +1 -0
- package/dist/components/agents/agent-activity/activity-row.js +1 -1
- package/dist/components/agents/agent-activity/index.js +1 -1
- package/dist/components/agents/agent-code.js +1 -1
- package/dist/components/agents/ai-sidebar.js +1 -1
- package/dist/components/agents/approval-card/index.js +1 -1
- package/dist/components/agents/citations.js +1 -1
- package/dist/components/agents/code-block.js +1 -1
- package/dist/components/agents/file-diff.js +1 -1
- package/dist/components/agents/image-generation.js +1 -1
- package/dist/components/agents/message-bubble.js +1 -1
- package/dist/components/agents/prompt-input.js +1 -1
- package/dist/components/agents/streaming-response.js +1 -1
- package/dist/components/agents/todo-list.js +1 -1
- package/dist/components/agents/tool-approval.js +1 -1
- package/dist/components/agents/tool-result.js +1 -1
- package/dist/components/agents/voice-orb.d.ts +19 -0
- package/dist/components/agents/voice-orb.d.ts.map +1 -0
- package/dist/components/agents/voice-orb.js +389 -0
- package/dist/components/agents/voice-orb.js.map +1 -0
- package/dist/components/charts/bump-chart/context.d.ts +2 -0
- package/dist/components/charts/bump-chart/context.js +3 -0
- package/dist/components/charts/bump-chart/legend.d.ts +6 -0
- package/dist/components/charts/bump-chart/legend.d.ts.map +1 -0
- package/dist/components/charts/bump-chart/legend.js +60 -0
- package/dist/components/charts/bump-chart/legend.js.map +1 -0
- package/dist/components/charts/bump-chart/plot.d.ts +6 -0
- package/dist/components/charts/bump-chart/plot.d.ts.map +1 -0
- package/dist/components/charts/bump-chart/plot.js +3 -0
- package/dist/components/charts/bump-chart/point.d.ts +10 -0
- package/dist/components/charts/bump-chart/point.d.ts.map +1 -0
- package/dist/components/charts/bump-chart/point.js +124 -0
- package/dist/components/charts/bump-chart/point.js.map +1 -0
- package/dist/components/charts/bump-chart/series.d.ts +11 -0
- package/dist/components/charts/bump-chart/series.d.ts.map +1 -0
- package/dist/components/charts/bump-chart/series.js +101 -0
- package/dist/components/charts/bump-chart/series.js.map +1 -0
- package/dist/components/charts/bump-chart.d.ts +10 -0
- package/dist/components/charts/bump-chart.d.ts.map +1 -0
- package/dist/components/charts/bump-chart.js +23 -0
- package/dist/components/charts/bump-chart.js.map +1 -0
- package/dist/components/charts/composition-chart/context.d.ts +2 -0
- package/dist/components/charts/composition-chart/context.js +3 -0
- package/dist/components/charts/composition-chart/legend.d.ts +6 -0
- package/dist/components/charts/composition-chart/legend.d.ts.map +1 -0
- package/dist/components/charts/composition-chart/legend.js +51 -0
- package/dist/components/charts/composition-chart/legend.js.map +1 -0
- package/dist/components/charts/composition-chart/plot.d.ts +6 -0
- package/dist/components/charts/composition-chart/plot.d.ts.map +1 -0
- package/dist/components/charts/composition-chart/plot.js +174 -0
- package/dist/components/charts/composition-chart/plot.js.map +1 -0
- package/dist/components/charts/composition-chart/tooltip-content.d.ts +6 -0
- package/dist/components/charts/composition-chart/tooltip-content.d.ts.map +1 -0
- package/dist/components/charts/composition-chart/tooltip-content.js +63 -0
- package/dist/components/charts/composition-chart/tooltip-content.js.map +1 -0
- package/dist/components/charts/composition-chart.d.ts +9 -0
- package/dist/components/charts/composition-chart.d.ts.map +1 -0
- package/dist/components/charts/composition-chart.js +26 -0
- package/dist/components/charts/composition-chart.js.map +1 -0
- package/dist/components/charts/funnel-chart.d.ts +50 -0
- package/dist/components/charts/funnel-chart.d.ts.map +1 -0
- package/dist/components/charts/funnel-chart.js +216 -0
- package/dist/components/charts/funnel-chart.js.map +1 -0
- package/dist/components/charts/heat-calendar/grid.d.ts +8 -0
- package/dist/components/charts/heat-calendar/grid.d.ts.map +1 -0
- package/dist/components/charts/heat-calendar/grid.js +127 -0
- package/dist/components/charts/heat-calendar/grid.js.map +1 -0
- package/dist/components/charts/heat-calendar/legend.d.ts +6 -0
- package/dist/components/charts/heat-calendar/legend.d.ts.map +1 -0
- package/dist/components/charts/heat-calendar/legend.js +48 -0
- package/dist/components/charts/heat-calendar/legend.js.map +1 -0
- package/dist/components/charts/heat-calendar/tooltip.d.ts +2 -0
- package/dist/components/charts/heat-calendar/tooltip.js +50 -0
- package/dist/components/charts/heat-calendar/tooltip.js.map +1 -0
- package/dist/components/charts/heat-calendar.d.ts +9 -0
- package/dist/components/charts/heat-calendar.d.ts.map +1 -0
- package/dist/components/charts/heat-calendar.js +23 -0
- package/dist/components/charts/heat-calendar.js.map +1 -0
- package/dist/components/charts/liquidity-heatmap.d.ts +51 -0
- package/dist/components/charts/liquidity-heatmap.d.ts.map +1 -0
- package/dist/components/charts/liquidity-heatmap.js +311 -0
- package/dist/components/charts/liquidity-heatmap.js.map +1 -0
- package/dist/components/charts/order-book/depth-row.d.ts +13 -0
- package/dist/components/charts/order-book/depth-row.d.ts.map +1 -0
- package/dist/components/charts/order-book/depth-row.js +99 -0
- package/dist/components/charts/order-book/depth-row.js.map +1 -0
- package/dist/components/charts/order-book.d.ts +57 -0
- package/dist/components/charts/order-book.d.ts.map +1 -0
- package/dist/components/charts/order-book.js +207 -0
- package/dist/components/charts/order-book.js.map +1 -0
- package/dist/components/charts/price-target-fan/header.d.ts +8 -0
- package/dist/components/charts/price-target-fan/header.d.ts.map +1 -0
- package/dist/components/charts/price-target-fan/header.js +43 -0
- package/dist/components/charts/price-target-fan/header.js.map +1 -0
- package/dist/components/charts/price-target-fan/plot.d.ts +16 -0
- package/dist/components/charts/price-target-fan/plot.d.ts.map +1 -0
- package/dist/components/charts/price-target-fan/plot.js +142 -0
- package/dist/components/charts/price-target-fan/plot.js.map +1 -0
- package/dist/components/charts/price-target-fan/series.d.ts +15 -0
- package/dist/components/charts/price-target-fan/series.d.ts.map +1 -0
- package/dist/components/charts/price-target-fan/series.js +238 -0
- package/dist/components/charts/price-target-fan/series.js.map +1 -0
- package/dist/components/charts/price-target-fan/tooltip.d.ts +2 -0
- package/dist/components/charts/price-target-fan/tooltip.js +58 -0
- package/dist/components/charts/price-target-fan/tooltip.js.map +1 -0
- package/dist/components/charts/price-target-fan.d.ts +10 -0
- package/dist/components/charts/price-target-fan.d.ts.map +1 -0
- package/dist/components/charts/price-target-fan.js +24 -0
- package/dist/components/charts/price-target-fan.js.map +1 -0
- package/dist/components/charts/returns-calendar/grid.d.ts +8 -0
- package/dist/components/charts/returns-calendar/grid.d.ts.map +1 -0
- package/dist/components/charts/returns-calendar/grid.js +176 -0
- package/dist/components/charts/returns-calendar/grid.js.map +1 -0
- package/dist/components/charts/returns-calendar/tooltip.d.ts +2 -0
- package/dist/components/charts/returns-calendar/tooltip.js +55 -0
- package/dist/components/charts/returns-calendar/tooltip.js.map +1 -0
- package/dist/components/charts/returns-calendar.d.ts +48 -0
- package/dist/components/charts/returns-calendar.d.ts.map +1 -0
- package/dist/components/charts/returns-calendar.js +22 -0
- package/dist/components/charts/returns-calendar.js.map +1 -0
- package/dist/components/charts/status-bar/legend.d.ts +8 -0
- package/dist/components/charts/status-bar/legend.d.ts.map +1 -0
- package/dist/components/charts/status-bar/legend.js +37 -0
- package/dist/components/charts/status-bar/legend.js.map +1 -0
- package/dist/components/charts/status-bar/plot.d.ts +12 -0
- package/dist/components/charts/status-bar/plot.d.ts.map +1 -0
- package/dist/components/charts/status-bar/plot.js +176 -0
- package/dist/components/charts/status-bar/plot.js.map +1 -0
- package/dist/components/charts/status-bar/tooltip.d.ts +2 -0
- package/dist/components/charts/status-bar/tooltip.js +49 -0
- package/dist/components/charts/status-bar/tooltip.js.map +1 -0
- package/dist/components/charts/status-bar.d.ts +9 -0
- package/dist/components/charts/status-bar.d.ts.map +1 -0
- package/dist/components/charts/status-bar.js +64 -0
- package/dist/components/charts/status-bar.js.map +1 -0
- package/dist/components/charts/treemap/legend.d.ts +8 -0
- package/dist/components/charts/treemap/legend.d.ts.map +1 -0
- package/dist/components/charts/treemap/legend.js +35 -0
- package/dist/components/charts/treemap/legend.js.map +1 -0
- package/dist/components/charts/treemap/plot.d.ts +13 -0
- package/dist/components/charts/treemap/plot.d.ts.map +1 -0
- package/dist/components/charts/treemap/plot.js +123 -0
- package/dist/components/charts/treemap/plot.js.map +1 -0
- package/dist/components/charts/treemap/tile.d.ts +10 -0
- package/dist/components/charts/treemap/tile.d.ts.map +1 -0
- package/dist/components/charts/treemap/tile.js +114 -0
- package/dist/components/charts/treemap/tile.js.map +1 -0
- package/dist/components/charts/treemap/tooltip.d.ts +11 -0
- package/dist/components/charts/treemap/tooltip.d.ts.map +1 -0
- package/dist/components/charts/treemap/tooltip.js +73 -0
- package/dist/components/charts/treemap/tooltip.js.map +1 -0
- package/dist/components/charts/treemap.d.ts +56 -0
- package/dist/components/charts/treemap.d.ts.map +1 -0
- package/dist/components/charts/treemap.js +71 -0
- package/dist/components/charts/treemap.js.map +1 -0
- package/dist/components/charts/volume-profile/plot.d.ts +12 -0
- package/dist/components/charts/volume-profile/plot.d.ts.map +1 -0
- package/dist/components/charts/volume-profile/plot.js +211 -0
- package/dist/components/charts/volume-profile/plot.js.map +1 -0
- package/dist/components/charts/volume-profile/summary.d.ts +6 -0
- package/dist/components/charts/volume-profile/summary.d.ts.map +1 -0
- package/dist/components/charts/volume-profile/summary.js +76 -0
- package/dist/components/charts/volume-profile/summary.js.map +1 -0
- package/dist/components/charts/volume-profile/tooltip.d.ts +2 -0
- package/dist/components/charts/volume-profile/tooltip.js +84 -0
- package/dist/components/charts/volume-profile/tooltip.js.map +1 -0
- package/dist/components/charts/volume-profile.d.ts +111 -0
- package/dist/components/charts/volume-profile.d.ts.map +1 -0
- package/dist/components/charts/volume-profile.js +82 -0
- package/dist/components/charts/volume-profile.js.map +1 -0
- package/dist/components/custom/confirm-dialog.js +1 -1
- package/dist/components/motion/adaptive-stepper.js +1 -1
- package/dist/components/motion/alert.d.ts +40 -0
- package/dist/components/motion/alert.d.ts.map +1 -0
- package/dist/components/motion/alert.js +247 -0
- package/dist/components/motion/alert.js.map +1 -0
- package/dist/components/motion/animated-badge.js +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.js +1 -1
- package/dist/components/motion/arc-picker.d.ts +28 -0
- package/dist/components/motion/arc-picker.d.ts.map +1 -0
- package/dist/components/motion/arc-picker.js +569 -0
- package/dist/components/motion/arc-picker.js.map +1 -0
- package/dist/components/motion/aspect-ratio.d.ts +23 -0
- package/dist/components/motion/aspect-ratio.d.ts.map +1 -0
- package/dist/components/motion/aspect-ratio.js +61 -0
- package/dist/components/motion/aspect-ratio.js.map +1 -0
- package/dist/components/motion/attachment-upload.d.ts.map +1 -1
- package/dist/components/motion/attachment-upload.js +2 -2
- package/dist/components/motion/attachment-upload.js.map +1 -1
- package/dist/components/motion/availability-scheduler/copy-menu.js +1 -1
- package/dist/components/motion/availability-scheduler/day-row.js +2 -2
- package/dist/components/motion/availability-scheduler/index.js +1 -1
- package/dist/components/motion/bloom-menu.js +1 -1
- package/dist/components/motion/bottom-sheet.js.map +1 -1
- package/dist/components/motion/bouncy-accordion.js +1 -1
- package/dist/components/motion/breadcrumb.d.ts +37 -0
- package/dist/components/motion/breadcrumb.d.ts.map +1 -0
- package/dist/components/motion/breadcrumb.js +259 -0
- package/dist/components/motion/breadcrumb.js.map +1 -0
- package/dist/components/motion/button/stateful.js +1 -1
- package/dist/components/motion/card-folder.js +1 -1
- package/dist/components/motion/center-morph-modal.js +1 -1
- package/dist/components/motion/collapsible.d.ts +34 -0
- package/dist/components/motion/collapsible.d.ts.map +1 -0
- package/dist/components/motion/collapsible.js +237 -0
- package/dist/components/motion/collapsible.js.map +1 -0
- package/dist/components/motion/color-selector.d.ts +28 -0
- package/dist/components/motion/color-selector.d.ts.map +1 -0
- package/dist/components/motion/color-selector.js +97 -0
- package/dist/components/motion/color-selector.js.map +1 -0
- package/dist/components/motion/combobox/list.js +1 -1
- package/dist/components/motion/combobox/trigger.js +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.js +1 -1
- package/dist/components/motion/date-range-picker.d.ts +107 -0
- package/dist/components/motion/date-range-picker.d.ts.map +1 -0
- package/dist/components/motion/date-range-picker.js +907 -0
- package/dist/components/motion/date-range-picker.js.map +1 -0
- package/dist/components/motion/drawer.js.map +1 -1
- package/dist/components/motion/feedback-widget.js +1 -1
- package/dist/components/motion/file-tree.js +1 -1
- package/dist/components/motion/file-upload.js +1 -1
- package/dist/components/motion/infinite-masonry.js +1 -1
- package/dist/components/motion/knockout-bracket.d.ts +190 -0
- package/dist/components/motion/knockout-bracket.d.ts.map +1 -0
- package/dist/components/motion/knockout-bracket.js +952 -0
- package/dist/components/motion/knockout-bracket.js.map +1 -0
- package/dist/components/motion/knockout-wheel.d.ts +183 -0
- package/dist/components/motion/knockout-wheel.d.ts.map +1 -0
- package/dist/components/motion/knockout-wheel.js +1039 -0
- package/dist/components/motion/knockout-wheel.js.map +1 -0
- package/dist/components/motion/morphing-lightbox.d.ts +67 -0
- package/dist/components/motion/morphing-lightbox.d.ts.map +1 -0
- package/dist/components/motion/morphing-lightbox.js +499 -0
- package/dist/components/motion/morphing-lightbox.js.map +1 -0
- package/dist/components/motion/morphing-modal.js.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.js +1 -1
- package/dist/components/motion/multi-select/list.js +1 -1
- package/dist/components/motion/multi-select/trigger.js +1 -1
- package/dist/components/motion/notification-stack.js +1 -1
- package/dist/components/motion/overflow-actions.js +1 -1
- package/dist/components/motion/popover-morph.d.ts +5 -1
- package/dist/components/motion/popover-morph.d.ts.map +1 -1
- package/dist/components/motion/popover-morph.js +78 -27
- package/dist/components/motion/popover-morph.js.map +1 -1
- package/dist/components/motion/prediction-market-card.d.ts +37 -0
- package/dist/components/motion/prediction-market-card.d.ts.map +1 -0
- package/dist/components/motion/prediction-market-card.js +216 -0
- package/dist/components/motion/prediction-market-card.js.map +1 -0
- package/dist/components/motion/prediction-market.d.ts +49 -0
- package/dist/components/motion/prediction-market.d.ts.map +1 -0
- package/dist/components/motion/prediction-market.js +440 -0
- package/dist/components/motion/prediction-market.js.map +1 -0
- package/dist/components/motion/project-folder.js +1 -1
- package/dist/components/motion/project-folder.js.map +1 -1
- package/dist/components/motion/select-morph.js +1 -1
- package/dist/components/motion/select.js +1 -1
- package/dist/components/motion/signup-form.js +1 -1
- package/dist/components/motion/sortable-list.d.ts +53 -0
- package/dist/components/motion/sortable-list.d.ts.map +1 -0
- package/dist/components/motion/sortable-list.js +254 -0
- package/dist/components/motion/sortable-list.js.map +1 -0
- package/dist/components/motion/sortable-stack.d.ts +2 -0
- package/dist/components/motion/sortable-stack.js +3 -0
- package/dist/components/motion/swap/controls.d.ts +22 -0
- package/dist/components/motion/swap/controls.d.ts.map +1 -0
- package/dist/components/motion/swap/controls.js +167 -0
- package/dist/components/motion/swap/controls.js.map +1 -0
- package/dist/components/motion/swap/field.d.ts +14 -0
- package/dist/components/motion/swap/field.d.ts.map +1 -0
- package/dist/components/motion/swap/field.js +107 -0
- package/dist/components/motion/swap/field.js.map +1 -0
- package/dist/components/motion/swap/quote-row.d.ts +13 -0
- package/dist/components/motion/swap/quote-row.d.ts.map +1 -0
- package/dist/components/motion/swap/quote-row.js +55 -0
- package/dist/components/motion/swap/quote-row.js.map +1 -0
- package/dist/components/motion/swap/token-badges.d.ts +19 -0
- package/dist/components/motion/swap/token-badges.d.ts.map +1 -0
- package/dist/components/motion/swap/token-badges.js +54 -0
- package/dist/components/motion/swap/token-badges.js.map +1 -0
- package/dist/components/motion/swap/token-picker.d.ts +14 -0
- package/dist/components/motion/swap/token-picker.d.ts.map +1 -0
- package/dist/components/motion/swap/token-picker.js +190 -0
- package/dist/components/motion/swap/token-picker.js.map +1 -0
- package/dist/components/motion/swap.d.ts +14 -0
- package/dist/components/motion/swap.d.ts.map +1 -0
- package/dist/components/motion/swap.js +378 -0
- package/dist/components/motion/swap.js.map +1 -0
- package/dist/components/motion/table/row-handle.js +1 -1
- package/dist/components/motion/table/table-header.js +1 -1
- package/dist/components/motion/tabs.d.ts +5 -9
- package/dist/components/motion/tabs.d.ts.map +1 -1
- package/dist/components/motion/tabs.js +14 -5
- package/dist/components/motion/tabs.js.map +1 -1
- package/dist/components/motion/theme-toggle.js +1 -1
- package/dist/components/motion/tooltip/positioner.d.ts +33 -0
- package/dist/components/motion/tooltip/positioner.d.ts.map +1 -0
- package/dist/components/motion/tooltip/positioner.js +3 -0
- package/dist/components/motion/tooltip-surface.d.ts +5 -4
- package/dist/components/motion/tooltip-surface.d.ts.map +1 -1
- package/dist/components/motion/tooltip-surface.js +22 -73
- package/dist/components/motion/tooltip-surface.js.map +1 -1
- package/dist/components/motion/tooltip.d.ts +3 -1
- package/dist/components/motion/tooltip.d.ts.map +1 -1
- package/dist/components/motion/tooltip.js +54 -103
- package/dist/components/motion/tooltip.js.map +1 -1
- package/dist/components/motion/wallet-card/account-avatar.d.ts +8 -0
- package/dist/components/motion/wallet-card/account-avatar.d.ts.map +1 -0
- package/dist/components/motion/wallet-card/account-avatar.js +3 -0
- package/dist/components/motion/wallet-card/account-switcher.d.ts +14 -0
- package/dist/components/motion/wallet-card/account-switcher.d.ts.map +1 -0
- package/dist/components/motion/wallet-card/account-switcher.js +153 -0
- package/dist/components/motion/wallet-card/account-switcher.js.map +1 -0
- package/dist/components/motion/wallet-card/actions.d.ts +12 -0
- package/dist/components/motion/wallet-card/actions.d.ts.map +1 -0
- package/dist/components/motion/wallet-card/actions.js +58 -0
- package/dist/components/motion/wallet-card/actions.js.map +1 -0
- package/dist/components/motion/wallet-card/balance-delta.d.ts +12 -0
- package/dist/components/motion/wallet-card/balance-delta.d.ts.map +1 -0
- package/dist/components/motion/wallet-card/balance-delta.js +72 -0
- package/dist/components/motion/wallet-card/balance-delta.js.map +1 -0
- package/dist/components/motion/wallet-card/copy-button.d.ts +12 -0
- package/dist/components/motion/wallet-card/copy-button.d.ts.map +1 -0
- package/dist/components/motion/wallet-card/copy-button.js +41 -0
- package/dist/components/motion/wallet-card/copy-button.js.map +1 -0
- package/dist/components/motion/wallet-card/index.d.ts +13 -0
- package/dist/components/motion/wallet-card/index.d.ts.map +1 -0
- package/dist/components/motion/wallet-card/index.js +115 -0
- package/dist/components/motion/wallet-card/index.js.map +1 -0
- package/dist/components/motion/wallet-card/search-bar.d.ts +17 -0
- package/dist/components/motion/wallet-card/search-bar.d.ts.map +1 -0
- package/dist/components/motion/wallet-card/search-bar.js +156 -0
- package/dist/components/motion/wallet-card/search-bar.js.map +1 -0
- package/dist/components/reui/alert.d.ts +1 -1
- package/dist/components/reui/alert.js +1 -1
- package/dist/components/reui/autocomplete.js +1 -1
- package/dist/components/reui/badge.d.ts +1 -1
- package/dist/components/reui/cascader/cascader-async.d.ts +3 -2
- package/dist/components/reui/cascader/cascader-async.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-async.js.map +1 -1
- package/dist/components/reui/cascader/cascader-columns.js +4 -4
- package/dist/components/reui/cascader/cascader-columns.js.map +1 -1
- package/dist/components/reui/cascader/cascader-context.d.ts +12 -4
- package/dist/components/reui/cascader/cascader-context.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-context.js.map +1 -1
- package/dist/components/reui/cascader/cascader-footer.js +1 -1
- package/dist/components/reui/cascader/cascader-i18n.d.ts +1 -1
- package/dist/components/reui/cascader/cascader-item.d.ts +2 -2
- package/dist/components/reui/cascader/cascader-item.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-item.js +23 -17
- package/dist/components/reui/cascader/cascader-item.js.map +1 -1
- package/dist/components/reui/cascader/cascader-lib.d.ts +8 -1
- package/dist/components/reui/cascader/cascader-lib.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-lib.js +19 -11
- package/dist/components/reui/cascader/cascader-lib.js.map +1 -1
- package/dist/components/reui/cascader/cascader-nav.d.ts +1 -1
- package/dist/components/reui/cascader/cascader-nav.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-nav.js +6 -5
- package/dist/components/reui/cascader/cascader-nav.js.map +1 -1
- package/dist/components/reui/cascader/cascader-types.d.ts +1 -1
- package/dist/components/reui/cascader/cascader-virtual.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-virtual.js.map +1 -1
- package/dist/components/reui/cascader/cascader.d.ts +6 -2
- package/dist/components/reui/cascader/cascader.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader.js +59 -21
- package/dist/components/reui/cascader/cascader.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-column-filter.js +3 -3
- 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 +18 -14
- package/dist/components/reui/data-grid/data-grid-column-header.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-column-visibility.js +1 -1
- package/dist/components/reui/data-grid/data-grid-column-visibility.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-pagination.js +2 -2
- package/dist/components/reui/data-grid/data-grid-pagination.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-scroll-area.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-scroll-area.js +85 -61
- 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.d.ts +7 -2
- package/dist/components/reui/data-grid/data-grid-table-dnd-rows.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js +68 -39
- package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-dnd.d.ts +7 -2
- package/dist/components/reui/data-grid/data-grid-table-dnd.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-dnd.js +90 -26
- package/dist/components/reui/data-grid/data-grid-table-dnd.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.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table.js +157 -38
- package/dist/components/reui/data-grid/data-grid-table.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid.d.ts +16 -0
- package/dist/components/reui/data-grid/data-grid.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid.js +81 -51
- package/dist/components/reui/data-grid/data-grid.js.map +1 -1
- package/dist/components/reui/date-selector.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-agenda-view.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-event.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-month-view.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-nav.js +2 -2
- package/dist/components/reui/filters/filters-advanced.js +2 -2
- package/dist/components/reui/filters/filters-advanced.js.map +1 -1
- package/dist/components/reui/filters/filters-builder.d.ts +1 -1
- package/dist/components/reui/filters/filters-builder.js +1 -1
- package/dist/components/reui/filters/filters-chip.js +2 -2
- package/dist/components/reui/filters/filters-editors.js +1 -1
- package/dist/components/reui/filters/filters-lib.d.ts +1 -1
- package/dist/components/reui/filters/filters.js +1 -1
- package/dist/components/reui/frame.js +1 -1
- package/dist/components/reui/gantt/gantt-bar.js +1 -1
- package/dist/components/reui/gantt/gantt-nav.js +2 -2
- package/dist/components/reui/gantt/gantt-view.js +1 -1
- package/dist/components/reui/kanban.d.ts.map +1 -1
- package/dist/components/reui/kanban.js +30 -1
- package/dist/components/reui/kanban.js.map +1 -1
- package/dist/components/reui/number-field.js +1 -1
- package/dist/components/reui/phone-input.js +1 -1
- package/dist/components/reui/rating.js +1 -1
- package/dist/components/reui/signature-pad.d.ts +160 -0
- package/dist/components/reui/signature-pad.d.ts.map +1 -0
- package/dist/components/reui/signature-pad.js +764 -0
- package/dist/components/reui/signature-pad.js.map +1 -0
- package/dist/components/reui/time-picker.d.ts +202 -0
- package/dist/components/reui/time-picker.d.ts.map +1 -0
- package/dist/components/reui/time-picker.js +1002 -0
- package/dist/components/reui/time-picker.js.map +1 -0
- package/dist/components/reui/tree.js +1 -1
- package/dist/components/ui/accordion.js +1 -1
- package/dist/components/ui/alert-dialog.js +1 -1
- package/dist/components/ui/alert.js +1 -1
- package/dist/components/ui/attachment.js +1 -1
- package/dist/components/ui/breadcrumb.js +1 -1
- package/dist/components/ui/bubble.js +1 -1
- package/dist/components/ui/button-group.js +1 -1
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/button.js +1 -1
- package/dist/components/ui/calendar.js +1 -1
- package/dist/components/ui/carousel.js +1 -1
- package/dist/components/ui/checkbox.js +1 -1
- package/dist/components/ui/combobox.js +1 -1
- package/dist/components/ui/command.js +1 -1
- package/dist/components/ui/context-menu.js +1 -1
- package/dist/components/ui/dialog.js +1 -1
- package/dist/components/ui/dropdown-menu.js +1 -1
- package/dist/components/ui/empty.js +1 -1
- package/dist/components/ui/field.js +1 -1
- package/dist/components/ui/input-group.d.ts +1 -1
- package/dist/components/ui/input-group.js +1 -1
- package/dist/components/ui/input-otp.js +1 -1
- package/dist/components/ui/item.js +1 -1
- package/dist/components/ui/marker.d.ts +1 -1
- package/dist/components/ui/marker.js +1 -1
- package/dist/components/ui/menubar.js +1 -1
- package/dist/components/ui/message-scroller.js +1 -1
- package/dist/components/ui/native-select.js +1 -1
- package/dist/components/ui/navigation-menu.js +1 -1
- package/dist/components/ui/pagination.js +1 -1
- package/dist/components/ui/questionnaire.js +1 -1
- package/dist/components/ui/select.js +1 -1
- package/dist/components/ui/sheet.js +1 -1
- package/dist/components/ui/sidebar.js +1 -1
- package/dist/components/ui/spinner.js +1 -1
- package/dist/components/ui/tabs.js +1 -1
- package/dist/components/ui/toast.js +1 -1
- package/dist/components/ui/toggle.js +1 -1
- package/dist/constants-CsKm9sSk.js +30 -0
- package/dist/constants-CsKm9sSk.js.map +1 -0
- package/dist/context-3_vY1jbv.js +141 -0
- package/dist/context-3_vY1jbv.js.map +1 -0
- package/dist/context-BE60udRT.js +99 -0
- package/dist/context-BE60udRT.js.map +1 -0
- package/dist/context-BYXeJQnz.d.ts +150 -0
- package/dist/context-BYXeJQnz.d.ts.map +1 -0
- package/dist/context-Bc6VC1HA.js +181 -0
- package/dist/context-Bc6VC1HA.js.map +1 -0
- package/dist/context-BqjZ1Z_w.js +111 -0
- package/dist/context-BqjZ1Z_w.js.map +1 -0
- package/dist/context-CZfRKkcZ.js +204 -0
- package/dist/context-CZfRKkcZ.js.map +1 -0
- package/dist/context-Cn-00gfW.js +169 -0
- package/dist/context-Cn-00gfW.js.map +1 -0
- package/dist/context-Cnlo53sV.d.ts +92 -0
- package/dist/context-Cnlo53sV.d.ts.map +1 -0
- package/dist/context-Rl5VCYA8.js +257 -0
- package/dist/context-Rl5VCYA8.js.map +1 -0
- package/dist/context-sD8DQga-.js +122 -0
- package/dist/context-sD8DQga-.js.map +1 -0
- package/dist/{copy-menu-TIKvPaAZ.js → copy-menu-C5GaT4Z-.js} +2 -2
- package/dist/{copy-menu-TIKvPaAZ.js.map → copy-menu-C5GaT4Z-.js.map} +1 -1
- package/dist/ease-B82HVmio.d.ts +50 -0
- package/dist/ease-B82HVmio.d.ts.map +1 -0
- package/dist/hooks/use-modal-scope.d.ts +6 -0
- package/dist/hooks/use-modal-scope.d.ts.map +1 -0
- package/dist/hooks/use-modal-scope.js +83 -0
- package/dist/hooks/use-modal-scope.js.map +1 -0
- package/dist/lib/ease.d.ts +2 -49
- package/dist/model-DfeFradZ.d.ts +9 -0
- package/dist/model-DfeFradZ.d.ts.map +1 -0
- package/dist/model-DlbIqCZg.d.ts +41 -0
- package/dist/model-DlbIqCZg.d.ts.map +1 -0
- package/dist/plot-CdFTbMI_.js +131 -0
- package/dist/plot-CdFTbMI_.js.map +1 -0
- package/dist/positioner-3mCqiebN.js +204 -0
- package/dist/positioner-3mCqiebN.js.map +1 -0
- package/dist/tooltip-BarafYiU.d.ts +67 -0
- package/dist/tooltip-BarafYiU.d.ts.map +1 -0
- package/dist/tooltip-BqxVD6D-.d.ts +64 -0
- package/dist/tooltip-BqxVD6D-.d.ts.map +1 -0
- package/dist/tooltip-C01qUgsW.d.ts +133 -0
- package/dist/tooltip-C01qUgsW.d.ts.map +1 -0
- package/dist/tooltip-C6qUs7px.d.ts +36 -0
- package/dist/tooltip-C6qUs7px.d.ts.map +1 -0
- package/dist/tooltip-DQ4DXgeu.d.ts +94 -0
- package/dist/tooltip-DQ4DXgeu.d.ts.map +1 -0
- package/dist/types-B_6p3LXz.d.ts +36 -0
- package/dist/types-B_6p3LXz.d.ts.map +1 -0
- package/dist/types-D6e3gWOA.d.ts +22 -0
- package/dist/types-D6e3gWOA.d.ts.map +1 -0
- package/dist/use-geometry-CH0foIo7.d.ts +9 -0
- package/dist/use-geometry-CH0foIo7.d.ts.map +1 -0
- package/dist/utils-B3YXTsDI.js +26 -0
- package/dist/utils-B3YXTsDI.js.map +1 -0
- package/package.json +14 -9
- package/dist/cascader-types-BnH6wYD-.d.ts.map +0 -1
- package/dist/lib/ease.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cascader-context.js","names":["React"],"sources":["../../../../src/components/reui/cascader/cascader-context.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\nimport type {\n CascaderActionItem,\n CascaderChangeReason,\n CascaderFlatNode,\n CascaderIndex,\n CascaderLabels,\n CascaderLoadState,\n CascaderMode,\n CascaderNode,\n CascaderSearchScope,\n} from \"./cascader-types\";\n\n/**\n * Four contexts, not one: actions (config and callbacks, near-stable), state\n * (every keystroke), render (`renderItem` identity) and highlight (every arrow\n * key and pointer move). One combined context re-rendered every row on every\n * keystroke, which is what made `React.memo` on the row worth nothing.\n */\n\n/* -------------------------------------------------------------------------- */\n/* Shared types */\n/* -------------------------------------------------------------------------- */\n\nexport interface CascaderColumn<T = unknown> {\n parent: CascaderNode<T> | null;\n items: CascaderNode<T>[];\n depth: number;\n /** The node in this column that is drilled into, if any. */\n activeValue: string | null;\n /** Whether this is the deepest column, the one Base UI owns. */\n active: boolean;\n}\n\nexport interface CascaderItemState<T = unknown> {\n branch: boolean;\n selected: boolean;\n disabled: boolean;\n depth: number;\n count: number;\n /** Ancestor chain, root first. Populated for deep-search rows. */\n path: CascaderNode<T>[];\n}\n\n/* -------------------------------------------------------------------------- */\n/* State */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Everything derived from the query, the path and the selection. One keystroke\n * rebuilds most of it, so never subscribe to it from a row.\n */\nexport interface CascaderStateContextValue<T = unknown> {\n /** Same `useMemo` identity as the actions context's `index`. */\n index: CascaderIndex<T>;\n path: string[];\n expanded: ReadonlySet<string>;\n query: string;\n currentParent: CascaderNode<T> | null;\n /** Rows for the current level, already filtered. */\n levelItems: CascaderNode<T>[];\n deepResults: CascaderNode<T>[] | null;\n /** What `Combobox.Root` is currently rendering, in render order. */\n renderedItems: CascaderNode<T>[];\n columns: CascaderColumn<T>[];\n treeRows: CascaderFlatNode<T>[];\n selectedValues: string[];\n /** Selected nodes below each value, at any depth. Absent means zero. */\n selectedDescendants: ReadonlyMap<string, number>;\n /**\n * Per level, keyed by parent value or `CASCADER_ROOT_KEY`. MEMBERSHIP is the\n * discriminator: no entry means never fetched, an entry with no `loading`, no\n * `error` and no children means fetched and genuinely empty.\n */\n loadStates: ReadonlyMap<string, CascaderLoadState>;\n /** Async search, `null` when idle. Separate: a search belongs to no level. */\n searchState: CascaderLoadState | null;\n announcement: string;\n}\n\nconst CascaderStateContext = React.createContext<CascaderStateContextValue | undefined>(undefined);\n\n/**\n * One provider serves every `T`, so the context holds an erased `unknown` value\n * and this cast restores it. The primitive never inspects the payload.\n */\nexport function useCascaderState<T = unknown>(): CascaderStateContextValue<T> {\n const context = React.useContext(CascaderStateContext);\n if (!context) {\n throw new Error(\"useCascaderState must be used within a Cascader\");\n }\n return context as unknown as CascaderStateContextValue<T>;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Actions */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Config and callbacks, slow enough that a memoised row can subscribe: the\n * mutators are `[]`-dep callbacks over a latest-props ref. The three predicates\n * are the exception, read DURING RENDER where a ref written in an effect would\n * return the previous commit's answer, so each is memoised on its own input.\n */\nexport interface CascaderActionsContextValue<T = unknown> {\n index: CascaderIndex<T>;\n mode: CascaderMode;\n multiple: boolean;\n /** Multi-select only: a commit propagates over the LOADED subtree. */\n cascade: boolean;\n /** Whether a BRANCH is committable. Per-LIST: the check gutter is a COLUMN. */\n branchesSelectable: boolean;\n /** Draws the SINGLE-SELECT check and its gutter. Ignored in multi-select. */\n indicator: boolean;\n expandTrigger?: \"click\" | \"hover\";\n actions: CascaderActionItem[];\n searchScope: CascaderSearchScope;\n maxHeight?: number | string;\n inline: boolean;\n invalid: boolean;\n /**\n * Id prefix; columns are `${baseId}-column-${depth}`. The SCHEME is contract:\n * the filters primitive's `FilterMenuPinKeeper` restores its highlight across\n * a live re-pin through `${baseId}-column-0` and the `cascader-item` slot.\n */\n baseId: string;\n labels: CascaderLabels;\n\n /**\n * Whether rows are WINDOWED. Also handed to `Combobox.Root`, which is what\n * makes an explicit row `index` legal: forwarding one while this is false\n * makes `aria-activedescendant` resolve to nothing. Latched per level.\n */\n virtualized: boolean;\n /** Mounts a windowing renderer, returns its unregister. LAYOUT effect only. */\n registerVirtualRenderer: () => () => void;\n /** The root's `virtualize` prop. `undefined` means \"decide by count\". */\n virtualize?: boolean;\n virtualizeThreshold: number;\n estimateRowSize: number;\n overscan: number;\n\n /** Tells \"this level is empty\" from \"not fetched yet\" before a load state. */\n hasLoader: boolean;\n /** Next page of a level. Latched: a page with nothing new is not re-asked. */\n loadMore: (parentKey: string) => void;\n retryLevel: (parentKey: string) => void;\n /**\n * Evicts one level's async cache, `null` for the root, so membership reads\n * never-loaded. A level that is on screen when evicted refetches at once.\n */\n invalidateLevel: (value: string | null) => void;\n\n /** Index as of the last commit. Use in the stable callbacks, not `index`. */\n getIndex: () => CascaderIndex<T>;\n getState: () => CascaderStateContextValue<T>;\n /** Highlighted row or null. A getter: the highlight moves per arrow key. */\n getHighlighted: () => CascaderNode<T> | null;\n\n setPath: (next: string[] | ((prev: string[]) => string[])) => void;\n pushLevel: (value: string) => void;\n popLevel: () => void;\n goToDepth: (depth: number) => void;\n toggleExpanded: (value: string) => void;\n /**\n * Registers a footer submenu as open or closed. `Combobox` has no\n * `FloatingTree`, so one Escape would dismiss the flyout AND the cascader;\n * the root's `onOpenChange` guard cancels the close while any is open, from a\n * ref so it reads as of that event without re-rendering the root.\n */\n setFlyoutOpen: (key: string, open: boolean) => void;\n hasOpenFlyout: () => boolean;\n setQuery: (next: string) => void;\n /**\n * Replaces the selection. `onValueChange` diffs it against the current one\n * for its node and reason; pass `reason` only when the caller knows better.\n */\n setSelection: (values: string[], reason?: CascaderChangeReason) => void;\n /** Commits a node, for rows outside the listbox such as ancestor columns. */\n commit: (node: CascaderNode<T>) => void;\n navigate: (node: CascaderNode<T>) => void;\n /** Into `node` as a child of `depth`, replacing anything deeper. */\n navigateAt: (node: CascaderNode<T>, depth: number) => void;\n /** Never undefined: falls back to a remembered label, then a synthetic node. */\n resolveNode: (value: string) => CascaderNode<T>;\n isBranch: (node: CascaderNode<T>) => boolean;\n isSelectable: (node: CascaderNode<T>) => boolean;\n isSelected: (node: CascaderNode<T>) => boolean;\n /** Always `false` without `cascade`: partial selection needs propagation. */\n isIndeterminate: (node: CascaderNode<T>) => boolean;\n /**\n * O(1) read of `selectedDescendants`; a memoised row may not subscribe.\n * Unlike `isIndeterminate` this answers in every mode.\n */\n selectedDescendantCount: (node: CascaderNode<T>) => number;\n}\n\nconst CascaderActionsContext = React.createContext<CascaderActionsContextValue | undefined>(\n undefined,\n);\n\nexport function useCascaderActions<T = unknown>(): CascaderActionsContextValue<T> {\n const context = React.useContext(CascaderActionsContext);\n if (!context) {\n throw new Error(\"useCascaderActions must be used within a Cascader\");\n }\n return context as unknown as CascaderActionsContextValue<T>;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Render props */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Their own context, republished every render. They cannot ride on the actions\n * context: an inline closure read off a memoised object is whichever closure\n * that object captured, so the row would call a stale prop over stale state.\n */\nexport interface CascaderRenderContextValue<T = unknown> {\n renderItem?: (node: CascaderNode<T>, state: CascaderItemState<T>) => React.ReactNode;\n renderLabel?: (node: CascaderNode<T>, state: CascaderItemState<T>) => React.ReactNode;\n}\n\nconst CascaderRenderContext = React.createContext<CascaderRenderContextValue>({});\n\nexport function useCascaderRender<T = unknown>(): CascaderRenderContextValue<T> {\n return React.useContext(CascaderRenderContext) as CascaderRenderContextValue<T>;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Highlight store */\n/* -------------------------------------------------------------------------- */\n\nexport interface CascaderHighlight {\n index: number;\n value: string | null;\n}\n\n/**\n * An external store, deliberately NOT React state: `onItemHighlighted` fires on\n * every arrow key AND every pointer move over the list, so `setState` would\n * re-render the whole root at mousemove rate. A store re-renders subscribers\n * only, which inside the primitive is the virtualizer.\n */\nexport interface CascaderHighlightStore {\n subscribe: (onStoreChange: () => void) => () => void;\n getSnapshot: () => CascaderHighlight;\n set: (next: CascaderHighlight) => void;\n}\n\nconst NO_HIGHLIGHT: CascaderHighlight = { index: -1, value: null };\n\nexport function createCascaderHighlightStore(): CascaderHighlightStore {\n let snapshot: CascaderHighlight = NO_HIGHLIGHT;\n const listeners = new Set<() => void>();\n\n return {\n subscribe(onStoreChange) {\n listeners.add(onStoreChange);\n return () => {\n listeners.delete(onStoreChange);\n };\n },\n // The SAME object until something changes; `useSyncExternalStore` needs it.\n getSnapshot() {\n return snapshot;\n },\n set(next) {\n if (next.index === snapshot.index && next.value === snapshot.value) return;\n snapshot = next;\n for (const listener of listeners) listener();\n },\n };\n}\n\n/** Shared and permanently empty, so the hook degrades outside a `Cascader`. */\nconst FALLBACK_HIGHLIGHT_STORE = createCascaderHighlightStore();\n\nconst CascaderHighlightContext =\n React.createContext<CascaderHighlightStore>(FALLBACK_HIGHLIGHT_STORE);\n\n/** Subscribes to the highlight. Re-renders ONLY the calling component. */\nexport function useCascaderHighlight(): CascaderHighlight {\n const store = React.useContext(CascaderHighlightContext);\n return React.useSyncExternalStore(store.subscribe, store.getSnapshot, store.getSnapshot);\n}\n\nexport {\n CascaderActionsContext,\n CascaderHighlightContext,\n CascaderRenderContext,\n CascaderStateContext,\n};\n"],"mappings":";;;AAmFA,MAAM,uBAAuBA,QAAM,cAAqD,KAAA,CAAS;;;;;AAMjG,SAAgB,mBAA8D;CAC5E,MAAM,UAAUA,QAAM,WAAW,oBAAoB;CACrD,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,iDAAiD;CAEnE,OAAO;AACT;AAyGA,MAAM,yBAAyBA,QAAM,cACnC,KAAA,CACF;AAEA,SAAgB,qBAAkE;CAChF,MAAM,UAAUA,QAAM,WAAW,sBAAsB;CACvD,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,mDAAmD;CAErE,OAAO;AACT;AAgBA,MAAM,wBAAwBA,QAAM,cAA0C,CAAC,CAAC;AAEhF,SAAgB,oBAAgE;CAC9E,OAAOA,QAAM,WAAW,qBAAqB;AAC/C;AAuBA,MAAM,eAAkC;CAAE,OAAO;CAAI,OAAO;AAAK;AAEjE,SAAgB,+BAAuD;CACrE,IAAI,WAA8B;CAClC,MAAM,4BAAY,IAAI,IAAgB;CAEtC,OAAO;EACL,UAAU,eAAe;GACvB,UAAU,IAAI,aAAa;GAC3B,aAAa;IACX,UAAU,OAAO,aAAa;GAChC;EACF;EAEA,cAAc;GACZ,OAAO;EACT;EACA,IAAI,MAAM;GACR,IAAI,KAAK,UAAU,SAAS,SAAS,KAAK,UAAU,SAAS,OAAO;GACpE,WAAW;GACX,KAAK,MAAM,YAAY,WAAW,SAAS;EAC7C;CACF;AACF;;AAGA,MAAM,2BAA2B,6BAA6B;AAE9D,MAAM,2BACJA,QAAM,cAAsC,wBAAwB;;AAGtE,SAAgB,uBAA0C;CACxD,MAAM,QAAQA,QAAM,WAAW,wBAAwB;CACvD,OAAOA,QAAM,qBAAqB,MAAM,WAAW,MAAM,aAAa,MAAM,WAAW;AACzF"}
|
|
1
|
+
{"version":3,"file":"cascader-context.js","names":["React"],"sources":["../../../../src/components/reui/cascader/cascader-context.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\nimport type {\n CascaderActionItem,\n CascaderChangeReason,\n CascaderFlatNode,\n CascaderIndex,\n CascaderLabels,\n CascaderLoadState,\n CascaderMode,\n CascaderNode,\n CascaderSearchScope,\n} from \"./cascader-types\";\n\n/**\n * Four contexts, not one: actions (config and callbacks, near-stable), state\n * (every keystroke), render (`renderItem` identity) and highlight (every arrow\n * key and pointer move). One combined context re-rendered every row on every\n * keystroke, which is what made `React.memo` on the row worth nothing.\n */\n\n/* -------------------------------------------------------------------------- */\n/* Shared types */\n/* -------------------------------------------------------------------------- */\n\nexport interface CascaderColumn<T = unknown> {\n parent: CascaderNode<T> | null;\n items: CascaderNode<T>[];\n depth: number;\n /** The node in this column that is drilled into, if any. */\n activeValue: string | null;\n /** Whether this is the deepest column, the one Base UI owns. */\n active: boolean;\n}\n\nexport interface CascaderItemState<T = unknown> {\n branch: boolean;\n selected: boolean;\n /** The node's own flag or a disabled ancestor's, as `isCascaderDisabled`. */\n disabled: boolean;\n depth: number;\n count: number;\n /** Ancestor chain, root first. Populated for deep and global search rows. */\n path: CascaderNode<T>[];\n}\n\n/* -------------------------------------------------------------------------- */\n/* State */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Everything derived from the query, the path and the selection. One keystroke\n * rebuilds most of it, so never subscribe to it from a row.\n */\nexport interface CascaderStateContextValue<T = unknown> {\n /** Same `useMemo` identity as the actions context's `index`. */\n index: CascaderIndex<T>;\n path: string[];\n expanded: ReadonlySet<string>;\n query: string;\n currentParent: CascaderNode<T> | null;\n /** Rows for the current level, already filtered. */\n levelItems: CascaderNode<T>[];\n deepResults: CascaderNode<T>[] | null;\n /** What `Combobox.Root` is currently rendering, in render order. */\n renderedItems: CascaderNode<T>[];\n columns: CascaderColumn<T>[];\n treeRows: CascaderFlatNode<T>[];\n selectedValues: string[];\n /** Selected nodes below each value, at any depth. Absent means zero. */\n selectedDescendants: ReadonlyMap<string, number>;\n /**\n * Per level, keyed by parent value or `CASCADER_ROOT_KEY`. MEMBERSHIP is the\n * discriminator: no entry means never fetched, an entry with no `loading`, no\n * `error` and no children means fetched and genuinely empty.\n */\n loadStates: ReadonlyMap<string, CascaderLoadState>;\n /** Async search, `null` when idle. Separate: a search belongs to no level. */\n searchState: CascaderLoadState | null;\n announcement: string;\n}\n\nconst CascaderStateContext = React.createContext<CascaderStateContextValue | undefined>(undefined);\n\n/**\n * One provider serves every `T`, so the context holds an erased `unknown` value\n * and this cast restores it. The primitive never inspects the payload.\n */\nexport function useCascaderState<T = unknown>(): CascaderStateContextValue<T> {\n const context = React.useContext(CascaderStateContext);\n if (!context) {\n throw new Error(\"useCascaderState must be used within a Cascader\");\n }\n return context as unknown as CascaderStateContextValue<T>;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Actions */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Config and callbacks, slow enough that a memoised row can subscribe: the\n * mutators are `[]`-dep callbacks over a latest-props ref. The predicates are\n * the exception, read DURING RENDER where a ref written in an effect would\n * return the previous commit's answer, so each is memoised on its own input.\n */\nexport interface CascaderActionsContextValue<T = unknown> {\n index: CascaderIndex<T>;\n mode: CascaderMode;\n multiple: boolean;\n /** Multi-select only: a commit propagates over the LOADED subtree. */\n cascade: boolean;\n /** Whether a BRANCH is committable. Per-LIST: the check gutter is a COLUMN. */\n branchesSelectable: boolean;\n /** Draws the SINGLE-SELECT check and its gutter. Ignored in multi-select. */\n indicator: boolean;\n expandTrigger?: \"click\" | \"hover\";\n actions: CascaderActionItem[];\n searchScope: CascaderSearchScope;\n maxHeight?: number | string;\n inline: boolean;\n invalid: boolean;\n /**\n * Id prefix; columns are `${baseId}-column-${depth}`. The SCHEME is contract:\n * the filters primitive's `FilterMenuPinKeeper` restores its highlight across\n * a live re-pin through `${baseId}-column-0` and the `cascader-item` slot.\n */\n baseId: string;\n labels: CascaderLabels;\n\n /**\n * Whether rows are WINDOWED. Also handed to `Combobox.Root`, which is what\n * makes an explicit row `index` legal: forwarding one while this is false\n * makes `aria-activedescendant` resolve to nothing. Latched per level.\n */\n virtualized: boolean;\n /** Mounts a windowing renderer, returns its unregister. LAYOUT effect only. */\n registerVirtualRenderer: () => () => void;\n /** The root's `virtualize` prop. `undefined` means \"decide by count\". */\n virtualize?: boolean;\n virtualizeThreshold: number;\n estimateRowSize: number;\n overscan: number;\n\n /** Tells \"this level is empty\" from \"not fetched yet\" before a load state. */\n hasLoader: boolean;\n /** Next page of a level. Latched: a page with nothing new is not re-asked. */\n loadMore: (parentKey: string) => void;\n retryLevel: (parentKey: string) => void;\n /**\n * Evicts one level's async cache, `null` for the root, so membership reads\n * never-loaded. A level that is on screen when evicted refetches at once.\n */\n invalidateLevel: (value: string | null) => void;\n\n /** Index as of the last commit. Use in the stable callbacks, not `index`. */\n getIndex: () => CascaderIndex<T>;\n getState: () => CascaderStateContextValue<T>;\n /** Highlighted row or null. A getter: the highlight moves per arrow key. */\n getHighlighted: () => CascaderNode<T> | null;\n\n setPath: (next: string[] | ((prev: string[]) => string[])) => void;\n pushLevel: (value: string) => void;\n popLevel: () => void;\n goToDepth: (depth: number) => void;\n toggleExpanded: (value: string) => void;\n /**\n * Registers a footer submenu as open or closed. `Combobox` has no\n * `FloatingTree`, so one Escape would dismiss the flyout AND the cascader;\n * the root's `onOpenChange` guard cancels the close while any is open, from a\n * ref so it reads as of that event without re-rendering the root.\n */\n setFlyoutOpen: (key: string, open: boolean) => void;\n hasOpenFlyout: () => boolean;\n setQuery: (next: string) => void;\n /**\n * Replaces the selection. `onValueChange` diffs it against the current one\n * for its node and reason; pass `reason` only when the caller knows better.\n */\n setSelection: (values: string[], reason?: CascaderChangeReason) => void;\n /** Commits a node, for rows outside the listbox such as ancestor columns. */\n commit: (node: CascaderNode<T>) => void;\n navigate: (node: CascaderNode<T>) => void;\n /** Into `node` as a child of `depth`, replacing anything deeper. */\n navigateAt: (node: CascaderNode<T>, depth: number) => void;\n /** Never undefined: falls back to a remembered label, then a synthetic node. */\n resolveNode: (value: string) => CascaderNode<T>;\n isBranch: (node: CascaderNode<T>) => boolean;\n isSelectable: (node: CascaderNode<T>) => boolean;\n /**\n * The node or an ancestor is `disabled`. Rows render it disabled; row\n * presses, keys, `commit`, `navigate`, `navigateAt` and a held navigation\n * refuse it. `pushLevel`, `setPath`, `toggleExpanded` and `setSelection` are\n * raw setters and do not ask.\n */\n isDisabled: (node: CascaderNode<T>) => boolean;\n isSelected: (node: CascaderNode<T>) => boolean;\n /** Always `false` without `cascade`: partial selection needs propagation. */\n isIndeterminate: (node: CascaderNode<T>) => boolean;\n /**\n * O(1) read of `selectedDescendants`; a memoised row may not subscribe.\n * Unlike `isIndeterminate` this answers in every mode.\n */\n selectedDescendantCount: (node: CascaderNode<T>) => number;\n}\n\nconst CascaderActionsContext = React.createContext<CascaderActionsContextValue | undefined>(\n undefined,\n);\n\nexport function useCascaderActions<T = unknown>(): CascaderActionsContextValue<T> {\n const context = React.useContext(CascaderActionsContext);\n if (!context) {\n throw new Error(\"useCascaderActions must be used within a Cascader\");\n }\n return context as unknown as CascaderActionsContextValue<T>;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Render props */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Their own context, republished every render. They cannot ride on the actions\n * context: an inline closure read off a memoised object is whichever closure\n * that object captured, so the row would call a stale prop over stale state.\n */\nexport interface CascaderRenderContextValue<T = unknown> {\n renderItem?: (node: CascaderNode<T>, state: CascaderItemState<T>) => React.ReactNode;\n renderLabel?: (node: CascaderNode<T>, state: CascaderItemState<T>) => React.ReactNode;\n}\n\nconst CascaderRenderContext = React.createContext<CascaderRenderContextValue>({});\n\nexport function useCascaderRender<T = unknown>(): CascaderRenderContextValue<T> {\n return React.useContext(CascaderRenderContext) as CascaderRenderContextValue<T>;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Highlight store */\n/* -------------------------------------------------------------------------- */\n\nexport interface CascaderHighlight {\n index: number;\n value: string | null;\n}\n\n/**\n * An external store, deliberately NOT React state: `onItemHighlighted` fires on\n * every arrow key AND every pointer move over the list, so `setState` would\n * re-render the whole root at mousemove rate. A store re-renders subscribers\n * only, which inside the primitive is the virtualizer.\n */\nexport interface CascaderHighlightStore {\n subscribe: (onStoreChange: () => void) => () => void;\n getSnapshot: () => CascaderHighlight;\n set: (next: CascaderHighlight) => void;\n}\n\nconst NO_HIGHLIGHT: CascaderHighlight = { index: -1, value: null };\n\nexport function createCascaderHighlightStore(): CascaderHighlightStore {\n let snapshot: CascaderHighlight = NO_HIGHLIGHT;\n const listeners = new Set<() => void>();\n\n return {\n subscribe(onStoreChange) {\n listeners.add(onStoreChange);\n return () => {\n listeners.delete(onStoreChange);\n };\n },\n // The SAME object until something changes; `useSyncExternalStore` needs it.\n getSnapshot() {\n return snapshot;\n },\n set(next) {\n if (next.index === snapshot.index && next.value === snapshot.value) return;\n snapshot = next;\n for (const listener of listeners) listener();\n },\n };\n}\n\n/** Shared and permanently empty, so the hook degrades outside a `Cascader`. */\nconst FALLBACK_HIGHLIGHT_STORE = createCascaderHighlightStore();\n\nconst CascaderHighlightContext =\n React.createContext<CascaderHighlightStore>(FALLBACK_HIGHLIGHT_STORE);\n\n/** Subscribes to the highlight. Re-renders ONLY the calling component. */\nexport function useCascaderHighlight(): CascaderHighlight {\n const store = React.useContext(CascaderHighlightContext);\n return React.useSyncExternalStore(store.subscribe, store.getSnapshot, store.getSnapshot);\n}\n\nexport {\n CascaderActionsContext,\n CascaderHighlightContext,\n CascaderRenderContext,\n CascaderStateContext,\n};\n"],"mappings":";;;AAoFA,MAAM,uBAAuBA,QAAM,cAAqD,KAAA,CAAS;;;;;AAMjG,SAAgB,mBAA8D;CAC5E,MAAM,UAAUA,QAAM,WAAW,oBAAoB;CACrD,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,iDAAiD;CAEnE,OAAO;AACT;AAgHA,MAAM,yBAAyBA,QAAM,cACnC,KAAA,CACF;AAEA,SAAgB,qBAAkE;CAChF,MAAM,UAAUA,QAAM,WAAW,sBAAsB;CACvD,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,mDAAmD;CAErE,OAAO;AACT;AAgBA,MAAM,wBAAwBA,QAAM,cAA0C,CAAC,CAAC;AAEhF,SAAgB,oBAAgE;CAC9E,OAAOA,QAAM,WAAW,qBAAqB;AAC/C;AAuBA,MAAM,eAAkC;CAAE,OAAO;CAAI,OAAO;AAAK;AAEjE,SAAgB,+BAAuD;CACrE,IAAI,WAA8B;CAClC,MAAM,4BAAY,IAAI,IAAgB;CAEtC,OAAO;EACL,UAAU,eAAe;GACvB,UAAU,IAAI,aAAa;GAC3B,aAAa;IACX,UAAU,OAAO,aAAa;GAChC;EACF;EAEA,cAAc;GACZ,OAAO;EACT;EACA,IAAI,MAAM;GACR,IAAI,KAAK,UAAU,SAAS,SAAS,KAAK,UAAU,SAAS,OAAO;GACpE,WAAW;GACX,KAAK,MAAM,YAAY,WAAW,SAAS;EAC7C;CACF;AACF;;AAGA,MAAM,2BAA2B,6BAA6B;AAE9D,MAAM,2BACJA,QAAM,cAAsC,wBAAwB;;AAGtE,SAAgB,uBAA0C;CACxD,MAAM,QAAQA,QAAM,WAAW,wBAAwB;CACvD,OAAOA,QAAM,qBAAqB,MAAM,WAAW,MAAM,aAAa,MAAM,WAAW;AACzF"}
|
|
@@ -4,8 +4,8 @@ import { CASCADER_LIST_PAD_CLASS, getCascaderFooterStops, isCascaderRtl } from "
|
|
|
4
4
|
import { CASCADER_ACTION_CLASS, CascaderGroup, CascaderLabel } from "./cascader-item.js";
|
|
5
5
|
import * as React$1 from "react";
|
|
6
6
|
import { cn } from "@kumix/utils";
|
|
7
|
-
import { ChevronRightIcon } from "lucide-react";
|
|
8
7
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { ChevronRightIcon } from "lucide-react";
|
|
9
9
|
import { Popover } from "@base-ui/react";
|
|
10
10
|
import { useDirection } from "@base-ui/react/direction-provider";
|
|
11
11
|
//#region src/components/reui/cascader/cascader-footer.tsx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as CascaderLabels } from "../../../cascader-types-
|
|
1
|
+
import { s as CascaderLabels } from "../../../cascader-types-DVT-znZ-.js";
|
|
2
2
|
//#region src/components/reui/cascader/cascader-i18n.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* English defaults. Every string the primitive can render lives here, so a
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as CascaderLoadState, p as CascaderNode } from "../../../cascader-types-
|
|
1
|
+
import { d as CascaderLoadState, p as CascaderNode } from "../../../cascader-types-DVT-znZ-.js";
|
|
2
2
|
import * as React$1 from "react";
|
|
3
3
|
import { Combobox } from "@base-ui/react";
|
|
4
4
|
//#region src/components/reui/cascader/cascader-item.d.ts
|
|
@@ -28,7 +28,7 @@ export interface CascaderItemProps extends Omit<Combobox.Item.Props, "value" | "
|
|
|
28
28
|
index?: number;
|
|
29
29
|
/** Indentation depth. Drives `--cascader-indent` in tree mode. */
|
|
30
30
|
depth?: number;
|
|
31
|
-
/** Renders the ancestor chain under the label, for deep
|
|
31
|
+
/** Renders the ancestor chain under the label, for deep and global search. */
|
|
32
32
|
showPath?: boolean;
|
|
33
33
|
/** `option` renders a real `Combobox.Item`; `button` renders identical markup
|
|
34
34
|
* outside the listbox, for the ancestor columns in columns mode. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cascader-item.d.ts","names":["React","ComboboxPrimitive"],"sources":["../../../../src/components/reui/cascader/cascader-item.tsx"],"mappings":";;;;KA0BK;EAAkB;;;;YAIX,mBAAmBA,QAAM,WAAW,eAAe;;;;;;;;qBAsDlD;iBAyBI,0BACP,KACNC,SAAkB,KAAK;;EAIzB;EACA,QAAQD,QAAM;EACd,WAAW,OAAO;EAClB,aAAa,OAAO;EACpB,MAAM;;;EAGN;;EAEA;;EAEA;;;EAGA;;EAEA;;EAEA;;;;EAIA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;;EAIA;;;;EAIA;EACA,WAAWA,QAAM;;;;cAKb,cAAYA,QAAA,uBAAA,MAAA,OAAA,OAAA,UAAA,IAAA,UAAA,QAAA,QAAA,YAAA,YAAA,gBAAA,UAAA,cAAA,eAAA,mBAAA,eAAA,mBAAA,SAAA,OAAA,iBAAA,eAAA,WAAA,UAAA,SAAA,WAAA,UAAA,SAuBf,sBAAiBA,QAAA,IAAA;;;;
|
|
1
|
+
{"version":3,"file":"cascader-item.d.ts","names":["React","ComboboxPrimitive"],"sources":["../../../../src/components/reui/cascader/cascader-item.tsx"],"mappings":";;;;KA0BK;EAAkB;;;;YAIX,mBAAmBA,QAAM,WAAW,eAAe;;;;;;;;qBAsDlD;iBAyBI,0BACP,KACNC,SAAkB,KAAK;;EAIzB;EACA,QAAQD,QAAM;EACd,WAAW,OAAO;EAClB,aAAa,OAAO;EACpB,MAAM;;;EAGN;;EAEA;;EAEA;;;EAGA;;EAEA;;EAEA;;;;EAIA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;;EAIA;;;;EAIA;EACA,WAAWA,QAAM;;;;cAKb,cAAYA,QAAA,uBAAA,MAAA,OAAA,OAAA,UAAA,IAAA,UAAA,QAAA,QAAA,YAAA,YAAA,gBAAA,UAAA,cAAA,eAAA,mBAAA,eAAA,mBAAA,SAAA,OAAA,iBAAA,eAAA,WAAA,UAAA,SAAA,WAAA,UAAA,SAuBf,sBAAiBA,QAAA,IAAA;;;;wBAqoBJ,qBACd,MAAM,cACN,YAAY,oBAAoB;EAEhC;EACA;EACA;EACA;;iBAqBe;;EAEf,YAAY,MAAM,cAAc,kBAAkBA,QAAM;;;;;;iBAOjD,gBAAgB,YAAY,qBAAkBA,QAAA,IAAA;iBA0EtC,2BAA2B,KAAKC,SAAkB,MAAM;;EAEvE;;;;;;;iBAQO,gBAAgB,cAAc,SAAS,qBAAkBD,QAAA,IAAA;iBAYjD,2BACP,KAAKC,SAAkB,WAAW;;EAE1C;EACA,QAAQD,QAAM;;;;iBA+BP,cAAc,OAAO,qBAAkBA,QAAA,IAAA;iBAK/B,+BACP,KAAKC,SAAkB,UAAU;;EAEzC;;;;;iBAMO,oBAAoB,cAAc,SAAS,yBAAsBD,QAAA,IAAA"}
|
|
@@ -4,8 +4,8 @@ import { useCascaderActions, useCascaderRender, useCascaderState } from "./casca
|
|
|
4
4
|
import { getCascaderCount, getCascaderMoreParent, getCascaderPath, isCascaderMoreNode } from "./cascader-lib.js";
|
|
5
5
|
import * as React$1 from "react";
|
|
6
6
|
import { cn } from "@kumix/utils";
|
|
7
|
-
import { CheckIcon, ChevronRightIcon, LoaderCircleIcon, MinusIcon, RotateCwIcon } from "lucide-react";
|
|
8
7
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { CheckIcon, ChevronRightIcon, LoaderCircleIcon, MinusIcon, RotateCwIcon } from "lucide-react";
|
|
9
9
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
10
10
|
import { useRender } from "@base-ui/react/use-render";
|
|
11
11
|
import { Combobox } from "@base-ui/react";
|
|
@@ -44,10 +44,11 @@ const CASCADER_HOVER_EXPAND_DELAY = 150;
|
|
|
44
44
|
/** One row. Branch presses navigate instead of selecting, vetoed here with
|
|
45
45
|
* `preventBaseUIHandler()` on `onClick` (Enter too) and on `onMouseUp`. */
|
|
46
46
|
const CascaderItem = React$1.memo(function CascaderItem({ node, index, depth, showPath = false, as = "option", expanded, indent = 16, branch: branchProp, selectable: selectableProp, selected: selectedProp, indeterminate: indeterminateProp, selectedCount: selectedCountProp, loading, error, childrenLoading = false, childrenError = false, className, children, onClick, onMouseUp, style, ...props }) {
|
|
47
|
-
const { index: treeIndex, mode, labels, isBranch, isSelectable, isSelected, isIndeterminate, selectedDescendantCount, multiple, branchesSelectable, indicator: indicatorEnabled, expandTrigger = "click", navigate, navigateAt, toggleExpanded, commit, virtualized, loadMore, retryLevel } = useCascaderActions();
|
|
47
|
+
const { index: treeIndex, mode, labels, isBranch, isSelectable, isDisabled, isSelected, isIndeterminate, selectedDescendantCount, multiple, branchesSelectable, indicator: indicatorEnabled, expandTrigger = "click", navigate, navigateAt, toggleExpanded, commit, getState, virtualized, loadMore, retryLevel } = useCascaderActions();
|
|
48
48
|
const { renderItem, renderLabel } = useCascaderRender();
|
|
49
49
|
const branch = branchProp ?? isBranch(node);
|
|
50
50
|
const selectable = selectableProp ?? isSelectable(node);
|
|
51
|
+
const disabled = isDisabled(node);
|
|
51
52
|
const selected = selectedProp ?? isSelected(node);
|
|
52
53
|
const indeterminate = !selected && (indeterminateProp ?? isIndeterminate(node));
|
|
53
54
|
const count = branch ? getCascaderCount(treeIndex, node) : 0;
|
|
@@ -63,7 +64,7 @@ const CascaderItem = React$1.memo(function CascaderItem({ node, index, depth, sh
|
|
|
63
64
|
}, []);
|
|
64
65
|
const handleClick = React$1.useCallback((event) => {
|
|
65
66
|
onClick?.(event);
|
|
66
|
-
if (
|
|
67
|
+
if (disabled) return;
|
|
67
68
|
if (branch && !selectable) {
|
|
68
69
|
veto(event);
|
|
69
70
|
navigate(node);
|
|
@@ -71,6 +72,7 @@ const CascaderItem = React$1.memo(function CascaderItem({ node, index, depth, sh
|
|
|
71
72
|
}, [
|
|
72
73
|
onClick,
|
|
73
74
|
node,
|
|
75
|
+
disabled,
|
|
74
76
|
branch,
|
|
75
77
|
selectable,
|
|
76
78
|
veto,
|
|
@@ -78,11 +80,11 @@ const CascaderItem = React$1.memo(function CascaderItem({ node, index, depth, sh
|
|
|
78
80
|
]);
|
|
79
81
|
const handleMouseUp = React$1.useCallback((event) => {
|
|
80
82
|
onMouseUp?.(event);
|
|
81
|
-
if (
|
|
83
|
+
if (disabled) return;
|
|
82
84
|
if (branch && !selectable) veto(event);
|
|
83
85
|
}, [
|
|
84
86
|
onMouseUp,
|
|
85
|
-
|
|
87
|
+
disabled,
|
|
86
88
|
branch,
|
|
87
89
|
selectable,
|
|
88
90
|
veto
|
|
@@ -90,13 +92,15 @@ const CascaderItem = React$1.memo(function CascaderItem({ node, index, depth, sh
|
|
|
90
92
|
const handleExpanderClick = React$1.useCallback((event) => {
|
|
91
93
|
event.stopPropagation();
|
|
92
94
|
veto(event);
|
|
93
|
-
if (
|
|
94
|
-
|
|
95
|
-
else navigate(node);
|
|
95
|
+
if (expanded) {
|
|
96
|
+
if (!disabled || getState().expanded.has(node.value)) toggleExpanded(node.value);
|
|
97
|
+
} else if (!disabled) navigate(node);
|
|
96
98
|
}, [
|
|
97
99
|
veto,
|
|
98
100
|
node,
|
|
101
|
+
disabled,
|
|
99
102
|
expanded,
|
|
103
|
+
getState,
|
|
100
104
|
toggleExpanded,
|
|
101
105
|
navigate
|
|
102
106
|
]);
|
|
@@ -107,12 +111,13 @@ const CascaderItem = React$1.memo(function CascaderItem({ node, index, depth, sh
|
|
|
107
111
|
const handleChevronClick = React$1.useCallback((event) => {
|
|
108
112
|
event.stopPropagation();
|
|
109
113
|
veto(event);
|
|
110
|
-
if (
|
|
114
|
+
if (disabled) return;
|
|
111
115
|
if (as === "button") navigateAt(node, depth ?? 0);
|
|
112
116
|
else navigate(node);
|
|
113
117
|
}, [
|
|
114
118
|
veto,
|
|
115
119
|
node,
|
|
120
|
+
disabled,
|
|
116
121
|
as,
|
|
117
122
|
navigateAt,
|
|
118
123
|
depth,
|
|
@@ -124,7 +129,7 @@ const CascaderItem = React$1.memo(function CascaderItem({ node, index, depth, sh
|
|
|
124
129
|
}, []);
|
|
125
130
|
const handleButtonClick = React$1.useCallback((event) => {
|
|
126
131
|
onClick?.(event);
|
|
127
|
-
if (
|
|
132
|
+
if (disabled) return;
|
|
128
133
|
if (branch && !selectable) {
|
|
129
134
|
navigateAt(node, depth ?? 0);
|
|
130
135
|
return;
|
|
@@ -133,6 +138,7 @@ const CascaderItem = React$1.memo(function CascaderItem({ node, index, depth, sh
|
|
|
133
138
|
}, [
|
|
134
139
|
onClick,
|
|
135
140
|
node,
|
|
141
|
+
disabled,
|
|
136
142
|
branch,
|
|
137
143
|
selectable,
|
|
138
144
|
navigateAt,
|
|
@@ -155,7 +161,7 @@ const CascaderItem = React$1.memo(function CascaderItem({ node, index, depth, sh
|
|
|
155
161
|
retryLevel,
|
|
156
162
|
loadMore
|
|
157
163
|
]);
|
|
158
|
-
const hoverNavigates = expandTrigger === "hover" && mode === "columns" && as === "option" && branch && !
|
|
164
|
+
const hoverNavigates = expandTrigger === "hover" && mode === "columns" && as === "option" && branch && !disabled;
|
|
159
165
|
const hoverTimerRef = React$1.useRef(null);
|
|
160
166
|
const cancelHoverNavigate = React$1.useCallback(() => {
|
|
161
167
|
if (hoverTimerRef.current == null) return;
|
|
@@ -233,7 +239,7 @@ const CascaderItem = React$1.memo(function CascaderItem({ node, index, depth, sh
|
|
|
233
239
|
const itemState = {
|
|
234
240
|
branch,
|
|
235
241
|
selected,
|
|
236
|
-
disabled
|
|
242
|
+
disabled,
|
|
237
243
|
depth: nodeDepth,
|
|
238
244
|
count,
|
|
239
245
|
path: showPath ? getCascaderPath(treeIndex, node.value).slice(0, -1) : []
|
|
@@ -269,7 +275,7 @@ const CascaderItem = React$1.memo(function CascaderItem({ node, index, depth, sh
|
|
|
269
275
|
"data-state": childrenError ? "error" : childrenLoading ? "loading" : "idle",
|
|
270
276
|
onClick: handleExpanderClick,
|
|
271
277
|
onMouseUp: handleExpanderMouseUp,
|
|
272
|
-
className: cn("-ms-0.5", childrenError ? "text-destructive" : "text-muted-foreground", AFFORDANCE_BOX_CLASS, AFFORDANCE_HOVER_CLASS, childrenLoading && "pointer-events-none"),
|
|
278
|
+
className: cn("-ms-0.5", childrenError ? "text-destructive" : "text-muted-foreground", AFFORDANCE_BOX_CLASS, AFFORDANCE_HOVER_CLASS, disabled && expanded && "pointer-events-auto", childrenLoading && "pointer-events-none"),
|
|
273
279
|
children: childrenLoading ? /* @__PURE__ */ jsx(Spinner, {
|
|
274
280
|
"aria-hidden": "true",
|
|
275
281
|
className: "size-4"
|
|
@@ -370,8 +376,8 @@ const CascaderItem = React$1.memo(function CascaderItem({ node, index, depth, sh
|
|
|
370
376
|
type: "button",
|
|
371
377
|
...shared,
|
|
372
378
|
tabIndex: -1,
|
|
373
|
-
disabled
|
|
374
|
-
"aria-disabled":
|
|
379
|
+
disabled,
|
|
380
|
+
"aria-disabled": disabled || void 0,
|
|
375
381
|
onClick: handleButtonClick,
|
|
376
382
|
onMouseDown: handleButtonMouseDown,
|
|
377
383
|
...buttonProps,
|
|
@@ -382,7 +388,7 @@ const CascaderItem = React$1.memo(function CascaderItem({ node, index, depth, sh
|
|
|
382
388
|
...shared,
|
|
383
389
|
value: node,
|
|
384
390
|
...virtualized && index != null ? { index } : null,
|
|
385
|
-
disabled
|
|
391
|
+
disabled,
|
|
386
392
|
...mode === "tree" ? {
|
|
387
393
|
role: "treeitem",
|
|
388
394
|
"aria-level": nodeDepth + 1,
|
|
@@ -399,7 +405,7 @@ const CascaderItem = React$1.memo(function CascaderItem({ node, index, depth, sh
|
|
|
399
405
|
children: body
|
|
400
406
|
});
|
|
401
407
|
});
|
|
402
|
-
/** Ancestor chain under a deep
|
|
408
|
+
/** Ancestor chain under a deep or global hit: "Name" alone is ambiguous. */
|
|
403
409
|
function CascaderItemPath({ node }) {
|
|
404
410
|
const { index, labels } = useCascaderActions();
|
|
405
411
|
const ancestors = getCascaderPath(index, node.value).slice(0, -1);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cascader-item.js","names":["React","ComboboxPrimitive"],"sources":["../../../../src/components/reui/cascader/cascader-item.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Combobox as ComboboxPrimitive } from \"@base-ui/react\";\nimport { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport {\n CheckIcon,\n ChevronRightIcon,\n LoaderCircleIcon,\n MinusIcon,\n RotateCwIcon,\n} from \"lucide-react\";\n\nimport { cn } from \"@kumix/utils\";\nimport { Spinner } from \"../../ui/spinner\";\nimport { useCascaderActions, useCascaderRender, useCascaderState } from \"./cascader-context\";\nimport {\n getCascaderCount,\n getCascaderMoreParent,\n getCascaderPath,\n isCascaderMoreNode,\n} from \"./cascader-lib\";\nimport type { CascaderLoadState, CascaderNode } from \"./cascader-types\";\n\n// Base UI extends its synthetic events with a handler-veto escape hatch.\ntype VetoableEvent = { preventBaseUIHandler?: () => void };\n\n/** A row press. The veto hook is optional: an `as=\"button\"` row is outside Base\n * UI's listbox and gets a plain React event. */\nexport type CascaderRowEvent = React.MouseEvent<HTMLElement> & VetoableEvent;\n\n// Each style's inline inset, as a variable: a row and its absolutely positioned\n// check have to land on the same number, in LOGICAL properties. These eight\n// numbers MIRROR the shared style sheets; keep them in step with\n// `registry/styles/style-*.css`.\nconst ROW_INSET_CLASS = \"[--cascader-row-inset:6px]\";\n\n// Both insets equal, for a row with no check. `!` because a consumer may not\n// import the sheets into `layer(base)`, where the class would win on order.\nconst ROW_FLUSH_CLASS = \"ps-[var(--cascader-row-inset,8px)]! pe-[var(--cascader-row-inset,8px)]!\";\n\n// The same start inset plus room for the check. A flat `pr-8` is wrong in five\n// of the eight styles: 4px of slack in nova, 8px short in maia, luma and sera,\n// and no gutter at all in mira, whose check then overlaps its own label.\nconst ROW_GUTTER_CLASS =\n \"ps-[var(--cascader-row-inset,8px)]! pe-[calc(var(--cascader-row-inset,8px)*2_+_16px)]!\";\n\n// The check's box, inset to match the row's. A physical `right-2` neither\n// mirrors under RTL nor tracks the style's inset; `right-auto` comes with the\n// logical `end-*`, because width + `left` + `right` is over-constrained.\nconst INDICATOR_CLASS =\n \"pointer-events-none absolute flex items-center justify-center size-4 end-[var(--cascader-row-inset,8px)]! rtl:right-auto!\";\n\n// The row's type, gap, radius and icon size per style. No horizontal padding:\n// every row pairs this with `ROW_FLUSH_CLASS` or `ROW_GUTTER_CLASS`.\nconst ROW_THEME_CLASS =\n \"data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground [&_svg:not([class*='size-'])]:size-4 rounded-md py-1\";\n\n/**\n * The row's gap and type, per style, held apart from the rest of the theme.\n *\n * A row that pins its own gap or text size takes `ROW_SHELL_CLASS` and leaves\n * these out, because a `style-<name>:` utility is emitted AFTER the plain one\n * it would have to lose to. Not receiving the token beats overriding it with\n * `!`, which a consumer then has to fight in turn.\n */\nconst ROW_GAP_CLASS = \"gap-2\";\n\nconst ROW_TEXT_CLASS = \"text-sm\";\n\nconst ROW_SHELL_CLASS = `${ROW_THEME_CLASS} relative flex w-full cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 ${ROW_INSET_CLASS}`;\n\nconst ROW_CLASS = `${ROW_SHELL_CLASS} ${ROW_GAP_CLASS} ${ROW_TEXT_CLASS}`;\n\nconst CASCADER_ACTION_INSET_CLASS = `${ROW_INSET_CLASS} ${ROW_FLUSH_CLASS}`;\n\n/** A footer COMMAND: the row theme, so it cannot drift from the list, plus the\n * hover and `focus-visible` fills a plain button never gets. Fills, never a\n * ring: a ring under rows that all paint with a fill read as a different\n * widget bolted on. `focus-visible`, not `focus`, so a pointer press does not\n * leave a command painted as if it were still hovered. Disabled keys off\n * `aria-disabled`, not `:disabled`, to keep it FOCUSABLE: a footer whose only\n * row is disabled has no tab stop. */\nexport const CASCADER_ACTION_CLASS = `${ROW_SHELL_CLASS} ${ROW_TEXT_CLASS} ${ROW_FLUSH_CLASS} hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground cursor-pointer gap-2 transition-colors aria-disabled:pointer-events-none aria-disabled:opacity-50`;\n\n// The box around the affordances that are not the row. 20px around a 16px icon,\n// the outer 2px cancelled at the call site; 24px would set the row height.\nconst AFFORDANCE_BOX_CLASS = \"flex size-5 shrink-0 items-center justify-center rounded-sm\";\n\n// What makes an affordance read as pressable on an already highlighted row. Not\n// `hover:bg-accent`: the row is `bg-accent` under the pointer, so the chip would\n// be invisible. `!` and `**:` for the `CHECKBOX_MARK_CLASS` reason.\nconst AFFORDANCE_HOVER_CLASS =\n \"transition-[background-color,box-shadow,color] hover:bg-background hover:text-foreground! hover:**:text-foreground! hover:shadow-xs\";\n\n// The selection MARK's colour, pinned so nothing can repaint it: every row\n// carries a DESCENDANT highlight rule, and a mark is STATE. Pinned TWICE\n// because icon sets draw with `fill`/`stroke=\"currentColor\"`, which the\n// `<path>` inherits and resolves against the PATH's own `color`. Both halves\n// are asserted in `cascader-behavior.test.tsx`.\nconst CHECKBOX_MARK_CLASS = \"text-primary-foreground! **:text-primary-foreground!\";\nconst INDICATOR_MARK_CLASS = \"text-foreground! **:text-foreground!\";\n\n// Milliseconds the pointer must rest on a branch row before\n// `expandTrigger=\"hover\"` drills in: long enough that a pointer crossing the\n// column on its way elsewhere opens nothing, short enough to read as immediate.\nconst CASCADER_HOVER_EXPAND_DELAY = 150;\n\nexport interface CascaderItemProps\n extends Omit<\n ComboboxPrimitive.Item.Props,\n \"value\" | \"children\" | \"className\" | \"style\" | \"onClick\" | \"onMouseUp\"\n > {\n /** No state callback: the row merges `className` and `style` itself. */\n className?: string;\n style?: React.CSSProperties;\n onClick?: (event: CascaderRowEvent) => void;\n onMouseUp?: (event: CascaderRowEvent) => void;\n node: CascaderNode;\n /** Explicit render index. Required while virtualized and DELIBERATELY IGNORED\n * otherwise: it self-registers the row and breaks `aria-activedescendant`. */\n index?: number;\n /** Indentation depth. Drives `--cascader-indent` in tree mode. */\n depth?: number;\n /** Renders the ancestor chain under the label, for deep-search results. */\n showPath?: boolean;\n /** `option` renders a real `Combobox.Item`; `button` renders identical markup\n * outside the listbox, for the ancestor columns in columns mode. */\n as?: \"option\" | \"button\";\n /** Tree mode: this row is an expanded branch. */\n expanded?: boolean;\n /** Indent each depth by this many pixels. Tree mode only. */\n indent?: number;\n /** Whether the node has children. Defaults to the cascader's own answer, as do\n * the three below: callers pass them because they already hold the level,\n * which keeps a memoised row off the volatile context. */\n branch?: boolean;\n /** Whether the node may be committed. Defaults to the cascader's own answer. */\n selectable?: boolean;\n /** Whether the node is currently selected. Defaults to the cascader's answer. */\n selected?: boolean;\n /** Some but not all of the loaded subtree selected. `cascade` only. */\n indeterminate?: boolean;\n /** Selected nodes below this one, at any depth. Drives the trailing count. */\n selectedCount?: number;\n /** Paging row only: a request for this level is in flight. */\n loading?: boolean;\n /** Paging row only: this level's last request failed. */\n error?: boolean;\n /** Branch row only: this node's OWN children are being fetched. The chevron\n * (or, in tree mode, the expander) becomes a spinner IN PLACE, in the same\n * 16px box: no skeleton row appears below, nothing reflows. */\n childrenLoading?: boolean;\n /** Branch row only: the last fetch of this node's children failed. The same\n * box becomes the retry. The press path is unchanged: it goes through\n * `navigate`, which refires the failed level rather than moving. */\n childrenError?: boolean;\n children?: React.ReactNode;\n}\n\n/** One row. Branch presses navigate instead of selecting, vetoed here with\n * `preventBaseUIHandler()` on `onClick` (Enter too) and on `onMouseUp`. */\nconst CascaderItem = React.memo(function CascaderItem({\n node,\n index,\n depth,\n showPath = false,\n as = \"option\",\n expanded,\n indent = 16,\n branch: branchProp,\n selectable: selectableProp,\n selected: selectedProp,\n indeterminate: indeterminateProp,\n selectedCount: selectedCountProp,\n loading,\n error,\n childrenLoading = false,\n childrenError = false,\n className,\n children,\n onClick,\n onMouseUp,\n style,\n ...props\n}: CascaderItemProps) {\n // The ACTIONS context only: the state context republishes on every keystroke.\n const {\n index: treeIndex,\n mode,\n labels,\n isBranch,\n isSelectable,\n isSelected,\n isIndeterminate,\n selectedDescendantCount,\n multiple,\n branchesSelectable,\n indicator: indicatorEnabled,\n expandTrigger = \"click\",\n navigate,\n navigateAt,\n toggleExpanded,\n commit,\n virtualized,\n loadMore,\n retryLevel,\n } = useCascaderActions();\n // Render props come from an always-current context, or a closure goes stale.\n const { renderItem, renderLabel } = useCascaderRender();\n\n const branch = branchProp ?? isBranch(node);\n const selectable = selectableProp ?? isSelectable(node);\n const selected = selectedProp ?? isSelected(node);\n // A selected node is never also partially selected (a dash in a filled box).\n const indeterminate = !selected && (indeterminateProp ?? isIndeterminate(node));\n const count = branch ? getCascaderCount(treeIndex, node) : 0;\n const nodeDepth = depth ?? treeIndex.depthOf.get(node.value) ?? 0;\n\n // O(1): the cascader publishes a map of selected-descendant counts, because a\n // row walking its own subtree is `rows x descendants`, paid every keystroke.\n const selectedDescendants = branch ? (selectedCountProp ?? selectedDescendantCount(node)) : 0;\n // `multiple` only: with a single selection the trigger, the breadcrumb and\n // the leaf's own check already say where it is, so swapping a branch's real\n // child total (\"24\") for a permanent \"1\" would trade a useful number away.\n const showsSelectedCount = multiple && selectedDescendants > 0;\n const trailingCount = showsSelectedCount ? selectedDescendants : count;\n // Shown selected or not: suppressing it under a checked branch read as data\n // loss, and the row's TWO trailing columns mean the count never has to share\n // a slot with the check.\n const showCount = trailingCount > 0;\n\n // Where a multi-select tree puts its checkbox: at the HEAD of the row, since a\n // trailing box does not follow the label stagger. Per-LIST, never per-row, or\n // the labels below an unselectable row step back out.\n const leadingCheckbox = mode === \"tree\" && multiple;\n\n // Whether this row draws a MARK, and so whether it reserves the gutter one\n // needs. `|| multiple` is the scope of the opt-out: a checkbox is the\n // selection CONTROL, so `indicator={false}` is a no-op in multi-select.\n const showsIndicator = indicatorEnabled || multiple;\n\n const veto = React.useCallback((event: VetoableEvent) => {\n event.preventBaseUIHandler?.();\n }, []);\n\n const handleClick = React.useCallback(\n (event: CascaderRowEvent) => {\n onClick?.(event);\n if (node.disabled) return;\n if (branch && !selectable) {\n veto(event);\n navigate(node);\n }\n },\n [onClick, node, branch, selectable, veto, navigate],\n );\n\n const handleMouseUp = React.useCallback(\n (event: CascaderRowEvent) => {\n onMouseUp?.(event);\n if (node.disabled) return;\n if (branch && !selectable) veto(event);\n },\n [onMouseUp, node, branch, selectable, veto],\n );\n\n // The tree expander's own press. With `selectable=\"any\"` the row press\n // commits, and under `cascade` that selected a whole subtree while the row\n // stayed collapsed, so expanding needs its own target. `stopPropagation`\n // before the veto, so Base UI's handler never runs, and no role: nesting\n // one in `role=\"option\"` fails axe. `navigate` fetches BEFORE it opens.\n const handleExpanderClick = React.useCallback(\n (event: CascaderRowEvent) => {\n event.stopPropagation();\n veto(event);\n if (node.disabled) return;\n if (expanded) toggleExpanded(node.value);\n else navigate(node);\n },\n [veto, node, expanded, toggleExpanded, navigate],\n );\n\n const handleExpanderMouseUp = React.useCallback(\n (event: CascaderRowEvent) => {\n // Base UI treats a drag-select mouseup as a commit; this is not one.\n event.stopPropagation();\n veto(event);\n },\n [veto],\n );\n\n const handleChevronClick = React.useCallback(\n (event: CascaderRowEvent) => {\n event.stopPropagation();\n veto(event);\n if (node.disabled) return;\n // `navigate` falls through to `pushLevel`, which APPENDS: right in the\n // deepest column, but from an ancestor column it duplicated the level and\n // corrupted the path. `navigateAt` rebuilds the trail from this depth.\n if (as === \"button\") navigateAt(node, depth ?? 0);\n else navigate(node);\n },\n [veto, node, as, navigateAt, depth, navigate],\n );\n\n const handleChevronMouseUp = React.useCallback((event: CascaderRowEvent) => veto(event), [veto]);\n\n // Keeps focus in the search field: Base UI prevents the mousedown default for\n // option rows, and focusing a `tabindex=\"-1\"` trail row kills every key.\n const handleButtonMouseDown = React.useCallback((event: React.MouseEvent<HTMLElement>) => {\n event.preventDefault();\n }, []);\n\n const handleButtonClick = React.useCallback(\n (event: CascaderRowEvent) => {\n onClick?.(event);\n if (node.disabled) return;\n if (branch && !selectable) {\n // Button rows only exist in the columns trail, where `depth` is the\n // column's own depth, so navigating replaces the trail from here.\n navigateAt(node, depth ?? 0);\n return;\n }\n if (selectable) commit(node);\n },\n [onClick, node, branch, selectable, navigateAt, depth, commit],\n );\n\n // The paging row's press, never a selection, whatever `selectable` says.\n const handleMoreClick = React.useCallback(\n (event: CascaderRowEvent) => {\n onClick?.(event);\n veto(event);\n const parent = getCascaderMoreParent(node);\n if (parent == null) return;\n if (error) retryLevel(parent);\n else if (!loading) loadMore(parent);\n },\n [onClick, veto, node, error, loading, retryLevel, loadMore],\n );\n\n // `expandTrigger=\"hover\"`: resting on a BRANCH row in the ACTIVE column drills\n // in after a delay. The deepest column of columns mode only, and it never\n // commits, so a pointer crossing the panel cannot change the value.\n const hoverNavigates =\n expandTrigger === \"hover\" && mode === \"columns\" && as === \"option\" && branch && !node.disabled;\n const hoverTimerRef = React.useRef<number | null>(null);\n\n const cancelHoverNavigate = React.useCallback(() => {\n if (hoverTimerRef.current == null) return;\n window.clearTimeout(hoverTimerRef.current);\n hoverTimerRef.current = null;\n }, []);\n\n const handleHoverPointerEnter = React.useCallback(() => {\n cancelHoverNavigate();\n hoverTimerRef.current = window.setTimeout(() => {\n hoverTimerRef.current = null;\n navigate(node);\n }, CASCADER_HOVER_EXPAND_DELAY);\n }, [cancelHoverNavigate, navigate, node]);\n\n // Drilling in demotes this column to the trail WITHOUT unmounting the row, so\n // a pending timer has to die or it fires `navigate` from an inactive column.\n React.useEffect(() => {\n if (!hoverNavigates) cancelHoverNavigate();\n }, [hoverNavigates, cancelHoverNavigate]);\n React.useEffect(() => cancelHoverNavigate, [cancelHoverNavigate]);\n\n /* ------------------------------- paging row ------------------------------ */\n\n if (isCascaderMoreNode(node)) {\n const text = error\n ? labels.error\n : loading\n ? node.count\n ? labels.loadingMore\n : labels.loading\n : labels.loadMore;\n\n const moreStyle =\n mode === \"tree\" && nodeDepth > 0\n ? ({\n ...style,\n \"--cascader-indent\": `${nodeDepth * indent}px`,\n } as React.CSSProperties)\n : style;\n\n const moreShared = {\n \"data-slot\": \"cascader-item\",\n \"data-more\": \"\",\n \"data-state\": error ? \"error\" : loading ? \"loading\" : \"idle\",\n \"data-depth\": nodeDepth,\n style: moreStyle,\n className: cn(\n ROW_SHELL_CLASS,\n ROW_FLUSH_CLASS,\n \"justify-center gap-1.5 text-muted-foreground text-xs\",\n !error && !loading && \"hover:text-foreground\",\n mode === \"tree\" && \"ps-[calc(var(--cascader-row-inset,8px)_+_var(--cascader-indent,0px))]!\",\n className,\n ),\n };\n\n const moreBody = children ?? (\n <>\n {loading ? <LoaderCircleIcon className=\"size-3.5 animate-spin\" aria-hidden /> : null}\n <span>{text}</span>\n {/* TEXT, not a button: a focusable element inside a `role=\"option\"`\n row is a `nested-interactive` violation. */}\n {error ? <span className=\"font-medium text-foreground\">{labels.retry}</span> : null}\n </>\n );\n\n if (as === \"button\") {\n const buttonProps = { ...(props as React.ComponentProps<\"button\">) };\n delete buttonProps[\"aria-setsize\"];\n delete buttonProps[\"aria-posinset\"];\n delete buttonProps[\"aria-level\"];\n\n return (\n <button\n type=\"button\"\n {...moreShared}\n tabIndex={-1}\n onClick={handleMoreClick}\n {...buttonProps}\n >\n {moreBody}\n </button>\n );\n }\n\n return (\n <ComboboxPrimitive.Item\n {...moreShared}\n value={node}\n {...(virtualized && index != null ? { index } : null)}\n {...(mode === \"tree\" ? { role: \"treeitem\" as const, \"aria-level\": nodeDepth + 1 } : null)}\n onClick={handleMoreClick}\n onMouseUp={veto}\n {...props}\n >\n {moreBody}\n </ComboboxPrimitive.Item>\n );\n }\n\n const itemState = {\n branch,\n selected,\n disabled: !!node.disabled,\n depth: nodeDepth,\n count,\n path: showPath ? getCascaderPath(treeIndex, node.value).slice(0, -1) : [],\n };\n\n const custom = renderItem?.(node, itemState);\n const customLabel = renderLabel?.(node, itemState);\n\n // What the markup cannot say: a branch would announce \"Person 24\", a naked\n // number. Trail rows are outside the listbox, so they need words for state.\n const srDetails = [\n branch ? labels.itemCount(count) : null,\n showsSelectedCount ? labels.selectedCount(selectedDescendants) : null,\n branch && mode !== \"tree\" ? labels.branchAffordance : null,\n as === \"button\" && selected ? labels.selectedState : null,\n // Option rows say this with `aria-checked=\"mixed\"`; `role=\"button\"` allows\n // neither that nor `aria-selected`, so a trail row says it in words.\n as === \"button\" && indeterminate ? labels.partiallySelectedState : null,\n ]\n .filter(Boolean)\n .map((detail) => `, ${detail}`)\n .join(\"\");\n\n // Extracted because tree mode renders it INLINE at the head of the row. It\n // reads `data-selected` off the ROW, so it also works on the trail rows.\n const checkbox = (\n <span\n data-slot=\"cascader-item-checkbox\"\n className=\"flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input in-data-indeterminate:border-primary in-data-selected:border-primary in-data-indeterminate:bg-primary in-data-selected:bg-primary in-data-indeterminate:text-primary-foreground in-data-selected:text-primary-foreground transition-colors\"\n >\n {/* Colour declared ON THE ICON with `!`; see `CHECKBOX_MARK_CLASS`. */}\n {indeterminate ? (\n <MinusIcon data-slot=\"cascader-item-dash\" className={cn(CHECKBOX_MARK_CLASS, \"size-3\")} />\n ) : (\n <CheckIcon\n data-slot=\"cascader-item-tick\"\n className={cn(CHECKBOX_MARK_CLASS, \"size-3 in-data-selected:opacity-100 opacity-0\")}\n />\n )}\n </span>\n );\n\n const indicator = (\n <>\n {multiple ? (\n checkbox\n ) : (\n <CheckIcon\n data-slot=\"cascader-item-check\"\n className={cn(\"pointer-events-none\", INDICATOR_MARK_CLASS)}\n />\n )}\n </>\n );\n\n const body = custom ?? children ?? (\n <>\n {/* Tree mode expands in place, so the branch marker leads the row. */}\n {mode === \"tree\" && branch ? (\n <span\n data-slot=\"cascader-item-expander\"\n /* Pure affordance: the row itself carries `aria-expanded`. */\n aria-hidden=\"true\"\n data-state={childrenError ? \"error\" : childrenLoading ? \"loading\" : \"idle\"}\n onClick={handleExpanderClick}\n onMouseUp={handleExpanderMouseUp}\n className={cn(\n \"-ms-0.5\",\n childrenError ? \"text-destructive\" : \"text-muted-foreground\",\n AFFORDANCE_BOX_CLASS,\n AFFORDANCE_HOVER_CLASS,\n childrenLoading && \"pointer-events-none\",\n )}\n >\n {childrenLoading ? (\n <Spinner aria-hidden=\"true\" className=\"size-4\" />\n ) : childrenError ? (\n <RotateCwIcon className=\"size-4\" />\n ) : (\n <ChevronRightIcon\n className={cn(\n \"size-4 transition-transform\",\n /* Collapsed it points INTO the level, so it mirrors; expanded\n it points DOWN, the same in both writing modes, so the mirror\n has to come off or `scaleX(-1)` composed with `rotate(90deg)`\n lands it pointing up. `rtl:rotate-90` beside `rotate-90` was\n a no-op that only looked like it handled this. */\n expanded ? \"rotate-90\" : \"rtl:-scale-x-100\",\n )}\n />\n )}\n </span>\n ) : mode === \"tree\" ? (\n // A LEAF's expander slot, reserved and empty: without it a leaf's label\n // started 28px off its sibling branches' and read as one level up.\n <span\n data-slot=\"cascader-item-expander-spacer\"\n aria-hidden=\"true\"\n className={cn(\"-ms-0.5\", AFFORDANCE_BOX_CLASS)}\n />\n ) : null}\n\n {/* Tree + multi-select: the box leads the row, and an unselectable row\n still reserves its width. */}\n {leadingCheckbox ? (\n selectable ? (\n checkbox\n ) : (\n <span\n data-slot=\"cascader-item-checkbox-spacer\"\n aria-hidden=\"true\"\n className=\"size-4 shrink-0\"\n />\n )\n ) : null}\n\n {node.icon ? (\n <span\n data-slot=\"cascader-item-icon\"\n className=\"flex shrink-0 items-center justify-center text-muted-foreground\"\n >\n {node.icon}\n </span>\n ) : null}\n\n {/* The row box is sized for pieces side by side; this one stacks, so it\n restates the gap: 8px reads as a paragraph break, not a subtitle. */}\n <span className=\"flex min-w-0 flex-1 flex-col items-start gap-0.5\">\n {customLabel ?? (\n <>\n <span className=\"w-full truncate text-start\">{node.label}</span>\n {node.description ? (\n <span\n data-slot=\"cascader-item-description\"\n className=\"w-full truncate text-start text-muted-foreground text-xs\"\n >\n {node.description}\n </span>\n ) : null}\n </>\n )}\n {showPath ? <CascaderItemPath node={node} /> : null}\n </span>\n\n {/* The count is a bare number, and nothing else says a branch opens. */}\n {srDetails ? (\n <span data-slot=\"cascader-item-details\" className=\"sr-only\">\n {srDetails}\n </span>\n ) : null}\n\n {/* Tree mode expands in place, so it has no drill-in chevron. */}\n {branch && mode !== \"tree\" ? (\n <span\n data-slot=\"cascader-item-trailing\"\n aria-hidden=\"true\"\n className=\"ms-auto flex shrink-0 items-center gap-1 text-muted-foreground text-xs tabular-nums\"\n >\n {showCount ? (\n <span\n data-slot=\"cascader-item-count\"\n /* The marker a consumer (and a test) reads to tell the two\n numbers apart without matching on a colour class. */\n {...(showsSelectedCount ? { \"data-selected-count\": \"\" } : null)}\n className={cn(showsSelectedCount && \"text-primary!\")}\n >\n {trailingCount}\n </span>\n ) : null}\n {/* ONLY the chevron is the drill target: sharing a hit area with the count made a number pressable. */}\n {/** biome-ignore lint/a11y/useKeyWithClickEvents: <> */}\n <span\n data-slot=\"cascader-item-chevron\"\n data-state={childrenError ? \"error\" : childrenLoading ? \"loading\" : \"idle\"}\n onClick={selectable ? handleChevronClick : undefined}\n onMouseUp={selectable ? handleChevronMouseUp : undefined}\n onMouseDown={as === \"button\" ? handleButtonMouseDown : undefined}\n className={cn(\n /* Cancels the box's outer slack, so the icon keeps its column. */\n \"-me-0.5\",\n AFFORDANCE_BOX_CLASS,\n selectable && AFFORDANCE_HOVER_CLASS,\n childrenError && \"text-destructive\",\n childrenLoading && \"pointer-events-none\",\n )}\n >\n {childrenLoading ? (\n <Spinner aria-hidden=\"true\" className=\"size-4\" />\n ) : childrenError ? (\n <RotateCwIcon className=\"size-4\" />\n ) : (\n <ChevronRightIcon className=\"size-4 rtl:-scale-x-100\" />\n )}\n </span>\n </span>\n ) : null}\n\n {branch && mode === \"tree\" && showCount ? (\n <span\n data-slot=\"cascader-item-count\"\n {...(showsSelectedCount ? { \"data-selected-count\": \"\" } : null)}\n /* The count is spoken by the sr-only details span instead. */\n aria-hidden=\"true\"\n className={cn(\n \"ms-auto shrink-0 text-muted-foreground text-xs tabular-nums\",\n showsSelectedCount && \"text-primary!\",\n )}\n >\n {trailingCount}\n </span>\n ) : null}\n\n {/* No trailing indicator when a tree's box led the row, or when\n `indicator={false}` opted out. See `showsIndicator`. */}\n {selectable && !leadingCheckbox && showsIndicator ? (\n as === \"button\" ? (\n // No ItemIndicator outside Base UI: `data-selected` drives it.\n (multiple || selected) && (\n <span data-slot=\"cascader-item-indicator\" className={INDICATOR_CLASS}>\n {indicator}\n </span>\n )\n ) : (\n <ComboboxPrimitive.ItemIndicator\n /* Kept mounted for a partial selection too: the row is not\n selected, so Base UI would unmount the box the dash lives in. */\n keepMounted={multiple || indeterminate}\n render={<span data-slot=\"cascader-item-indicator\" className={INDICATOR_CLASS} />}\n >\n {indicator}\n </ComboboxPrimitive.ItemIndicator>\n )\n ) : null}\n </>\n );\n\n const rowStyle =\n mode === \"tree\" && nodeDepth > 0\n ? ({\n ...style,\n \"--cascader-indent\": `${nodeDepth * indent}px`,\n } as React.CSSProperties)\n : style;\n\n const shared = {\n \"data-slot\": \"cascader-item\",\n \"data-branch\": branch || undefined,\n \"data-selected\": selected || undefined,\n \"data-indeterminate\": indeterminate || undefined,\n \"data-depth\": nodeDepth,\n \"data-expanded\": expanded || undefined,\n // No `aria-level`: `role=\"option\"` allows only `aria-selected`,\n // `aria-checked`, `aria-posinset` and `aria-setsize`, and a `role=\"button\"`\n // trail row allows none of the four. Only tree mode has a role that takes a\n // level, and it adds one below.\n style: rowStyle,\n className: cn(\n ROW_CLASS,\n /* Three separate reasons to hand the check gutter back. A multi-select\n tree's box leads the row, so the gutter would be 24px of dead space;\n `indicator={false}` drops the check, and keeping the gutter would park\n the count and the chevron one gutter in from an edge nothing sits on;\n and for branches the question is per-LIST, not per-row, because the old\n `branch && !selectable` put neighbouring chevrons on 24px and 6px in\n nova. One `pe-*` is emitted either way, so nothing here depends on\n class-merge order. */\n leadingCheckbox || !showsIndicator || (branch && !branchesSelectable)\n ? ROW_FLUSH_CLASS\n : ROW_GUTTER_CLASS,\n /* ADDED to the style's own inset, never substituted: replacing it put\n depth 0 at 12px and depth 1 at 16px in maia, luma and sera, a 4px step.\n `_+_` because Tailwind's parser splits on whitespace. */\n mode === \"tree\" && \"ps-[calc(var(--cascader-row-inset,8px)_+_var(--cascader-indent,0px))]!\",\n className,\n ),\n };\n\n if (as === \"button\") {\n const buttonProps = { ...(props as React.ComponentProps<\"button\">) };\n // `role=\"button\"` allows none of these, so they are dropped, not passed.\n delete buttonProps[\"aria-setsize\"];\n delete buttonProps[\"aria-posinset\"];\n delete buttonProps[\"aria-level\"];\n\n return (\n <button\n type=\"button\"\n {...shared}\n /* Focus stays in the search input; the trail uses ArrowLeft. */\n tabIndex={-1}\n disabled={node.disabled}\n aria-disabled={node.disabled || undefined}\n onClick={handleButtonClick}\n onMouseDown={handleButtonMouseDown}\n {...buttonProps}\n >\n {body}\n </button>\n );\n }\n\n return (\n <ComboboxPrimitive.Item\n {...shared}\n value={node}\n /* THE one gate for the explicit index: supply one outside virtualized mode\n and the first arrow key leaves `aria-activedescendant` pointing at\n nothing. */\n {...(virtualized && index != null ? { index } : null)}\n disabled={node.disabled}\n /* Conditional spread, never `role={... : undefined}`: `mergeProps`\n iterates own keys, so `undefined` would delete `role=\"option\"`. */\n {...(mode === \"tree\"\n ? {\n role: \"treeitem\" as const,\n \"aria-level\": nodeDepth + 1,\n ...(branch ? { \"aria-expanded\": !!expanded } : null),\n }\n : branch\n ? { \"aria-haspopup\": \"listbox\" as const }\n : null)}\n /* Only ever `mixed`: a selected row already says so with `aria-selected`,\n and two selection attributes on one row is noise. */\n {...(indeterminate ? { \"aria-checked\": \"mixed\" as const } : null)}\n {...(hoverNavigates\n ? {\n onPointerEnter: handleHoverPointerEnter,\n onPointerLeave: cancelHoverNavigate,\n }\n : null)}\n onClick={handleClick}\n onMouseUp={handleMouseUp}\n {...props}\n >\n {body}\n </ComboboxPrimitive.Item>\n );\n});\n\n/** Ancestor chain under a deep-search result: \"Name\" alone is ambiguous. */\nfunction CascaderItemPath({ node }: { node: CascaderNode }) {\n const { index, labels } = useCascaderActions();\n const ancestors = getCascaderPath(index, node.value).slice(0, -1);\n if (!ancestors.length) return null;\n\n return (\n <span\n data-slot=\"cascader-item-path\"\n className=\"flex w-full items-center gap-0.5 truncate text-start text-muted-foreground text-xs\"\n >\n {ancestors.map((ancestor, i) => (\n <React.Fragment key={ancestor.value}>\n {i > 0 ? <span aria-hidden=\"true\">{labels.pathSeparator}</span> : null}\n <span className=\"truncate\">{ancestor.label}</span>\n </React.Fragment>\n ))}\n </span>\n );\n}\n\n/** Every load-derived prop a row needs. A PAGING row reports the level it\n * belongs to, a BRANCH row the level it OWNS; mutually exclusive, so one call\n * answers both. Exported because a memoised row cannot read them itself. */\nexport function getCascaderMoreProps(\n node: CascaderNode,\n loadStates: ReadonlyMap<string, CascaderLoadState>,\n): {\n loading: boolean;\n error: boolean;\n childrenLoading: boolean;\n childrenError: boolean;\n} {\n const parent = getCascaderMoreParent(node);\n if (parent == null) {\n const own = loadStates.get(node.value);\n return {\n loading: false,\n error: false,\n childrenLoading: !!own?.loading,\n childrenError: !!own?.error,\n };\n }\n const state = loadStates.get(parent);\n return {\n loading: !!state?.loading,\n error: !!state?.error,\n childrenLoading: false,\n childrenError: false,\n };\n}\n\nexport interface CascaderItemsProps {\n /** Replaces the default row for every item. */\n children?: (node: CascaderNode, index: number) => React.ReactNode;\n}\n\n/** Whatever the active view is: the current level, the deepest column, or the\n * flattened tree rows. Lives here so `cascader.tsx` never imports a row\n * component, which would cycle with the context. `index` is deliberately not\n * passed; see `CascaderItemProps`. */\nfunction CascaderItems({ children }: CascaderItemsProps) {\n const { mode, isBranch, isSelectable, isSelected, isIndeterminate } = useCascaderActions();\n const { renderedItems, deepResults, treeRows, loadStates } = useCascaderState();\n const showPath = deepResults !== null;\n\n // Answered once here, as plain booleans, so `React.memo` can skip a row.\n if (mode === \"tree\") {\n return (\n <>\n {treeRows.map((row, i) =>\n children ? (\n <React.Fragment key={row.node.value}>{children(row.node, i)}</React.Fragment>\n ) : (\n <CascaderItem\n key={row.node.value}\n node={row.node}\n depth={row.depth}\n expanded={row.expanded}\n branch={row.branch}\n selectable={isSelectable(row.node)}\n selected={isSelected(row.node)}\n indeterminate={isIndeterminate(row.node)}\n {...getCascaderMoreProps(row.node, loadStates)}\n aria-setsize={row.setSize}\n aria-posinset={row.posInSet}\n />\n ),\n )}\n </>\n );\n }\n\n return (\n <>\n {renderedItems.map((node, i) =>\n children ? (\n <React.Fragment key={node.value}>{children(node, i)}</React.Fragment>\n ) : (\n <CascaderItem\n key={node.value}\n node={node}\n showPath={showPath}\n branch={isBranch(node)}\n selectable={isSelectable(node)}\n selected={isSelected(node)}\n indeterminate={isIndeterminate(node)}\n {...getCascaderMoreProps(node, loadStates)}\n aria-setsize={renderedItems.length}\n aria-posinset={i + 1}\n />\n ),\n )}\n </>\n );\n}\n\n/* -------------------------------------------------------------------------- */\n/* Group / Label / Separator */\n/* -------------------------------------------------------------------------- */\n\n// Whether a `CascaderLabel` has a group to name: Base UI's `Combobox.GroupLabel`\n// THROWS when there is none, and a heading is useful outside a group.\nconst CascaderGroupContext = React.createContext(false);\n\n// A heading over a run of rows. All eight styles are spelled out because the\n// type is not uniform (sera is uppercase), and the inset is the row's own.\nconst CASCADER_LABEL_CLASS = `text-muted-foreground text-xs py-1.5 ${CASCADER_ACTION_INSET_CLASS} block truncate`;\n\n// A rule between two runs. The inline margin is not the combobox separator's:\n// that cancels the container's padding with a per-style number, wrong in a\n// footer and 4px too much in lyra. `--cascader-list-pad` reaches the edge.\nconst CASCADER_SEPARATOR_CLASS =\n \"h-px bg-border my-1 mx-[calc(var(--cascader-list-pad,4px)*-1)]! shrink-0\";\n\nexport interface CascaderGroupProps extends Omit<ComboboxPrimitive.Group.Props, \"className\"> {\n /** Base UI also accepts a state callback here; the group has no state. */\n className?: string;\n}\n\n/** A run of related rows, named by the `CascaderLabel` inside it: the group is\n * `role=\"group\"` and Base UI points its `aria-labelledby` at the label, where a\n * heading alone inside a listbox is dropped from the accessibility tree.\n * Grouping is composition, not data: `CascaderItems` renders one flat run per\n * level, so its indices line up with `listRef`. */\nfunction CascaderGroup({ className, ...props }: CascaderGroupProps) {\n return (\n <CascaderGroupContext.Provider value={true}>\n <ComboboxPrimitive.Group\n data-slot=\"cascader-group\"\n className={cn(\"flex flex-col\", className)}\n {...props}\n />\n </CascaderGroupContext.Provider>\n );\n}\n\nexport interface CascaderLabelProps\n extends Omit<ComboboxPrimitive.GroupLabel.Props, \"className\" | \"style\"> {\n /** No state callback; outside a group this is not a Base UI part at all. */\n className?: string;\n style?: React.CSSProperties;\n}\n\n/** Inside a group: the real thing, with the id association Base UI wires up. */\nfunction CascaderGroupLabel({ className, ...props }: CascaderLabelProps) {\n return (\n <ComboboxPrimitive.GroupLabel\n data-slot=\"cascader-label\"\n className={cn(CASCADER_LABEL_CLASS, className)}\n {...props}\n />\n );\n}\n\n// Outside a group: the same heading as a plain element. A separate component\n// rather than a branch, so the hook count cannot change when a label moves in.\nfunction CascaderPlainLabel({ className, ...props }: CascaderLabelProps) {\n const defaultProps = {\n \"data-slot\": \"cascader-label\",\n className: cn(CASCADER_LABEL_CLASS, className),\n };\n\n return useRender({\n defaultTagName: \"div\",\n render: props.render,\n props: mergeProps<\"div\">(defaultProps, props),\n });\n}\n\n/** A heading. Inside `CascaderGroup` it is the group's accessible name; outside\n * one (the footer flyout is a menu, not a listbox) it is decoration only. */\nfunction CascaderLabel(props: CascaderLabelProps) {\n const grouped = React.useContext(CascaderGroupContext);\n return grouped ? <CascaderGroupLabel {...props} /> : <CascaderPlainLabel {...props} />;\n}\n\nexport interface CascaderSeparatorProps\n extends Omit<ComboboxPrimitive.Separator.Props, \"className\"> {\n /** Base UI also accepts a state callback here; only the orientation varies. */\n className?: string;\n}\n\n/** Decorative on purpose: Base UI's separator is `role=\"separator\"`, which a\n * `listbox` may not own, and a run that needs separating for a screen reader\n * needs a `CascaderGroup`, not a line. A consumer can pass the role back. */\nfunction CascaderSeparator({ className, ...props }: CascaderSeparatorProps) {\n return (\n <ComboboxPrimitive.Separator\n data-slot=\"cascader-separator\"\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn(CASCADER_SEPARATOR_CLASS, className)}\n {...props}\n />\n );\n}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KAUX,CAEL,EACA,CAAA;AAEN;AAQA,MAAM,uBAAuBA,QAAM,cAAc,KAAK;AAItD,MAAM,uBAAuB,wCAAwC,4BAA4B;AAKjG,MAAM,2BACJ;;;;;;AAYF,SAAS,cAAc,EAAE,WAAW,GAAG,SAA6B;CAClE,OACE,oBAAC,qBAAqB,UAAtB;EAA+B,OAAO;EACpC,UAAA,oBAACC,SAAkB,OAAnB;GACE,aAAU;GACV,WAAW,GAAG,iBAAiB,SAAS;GACxC,GAAI;EACL,CAAA;CAC4B,CAAA;AAEnC;;AAUA,SAAS,mBAAmB,EAAE,WAAW,GAAG,SAA6B;CACvE,OACE,oBAACA,SAAkB,YAAnB;EACE,aAAU;EACV,WAAW,GAAG,sBAAsB,SAAS;EAC7C,GAAI;CACL,CAAA;AAEL;AAIA,SAAS,mBAAmB,EAAE,WAAW,GAAG,SAA6B;CACvE,MAAM,eAAe;EACnB,aAAa;EACb,WAAW,GAAG,sBAAsB,SAAS;CAC/C;CAEA,OAAO,UAAU;EACf,gBAAgB;EAChB,QAAQ,MAAM;EACd,OAAO,WAAkB,cAAc,KAAK;CAC9C,CAAC;AACH;;;AAIA,SAAS,cAAc,OAA2B;CAEhD,OADgBD,QAAM,WAAW,oBACpB,IAAI,oBAAC,oBAAD,EAAoB,GAAI,MAAQ,CAAA,IAAI,oBAAC,oBAAD,EAAoB,GAAI,MAAQ,CAAA;AACvF;;;;AAWA,SAAS,kBAAkB,EAAE,WAAW,GAAG,SAAiC;CAC1E,OACE,oBAACC,SAAkB,WAAnB;EACE,aAAU;EACV,MAAK;EACL,eAAY;EACZ,WAAW,GAAG,0BAA0B,SAAS;EACjD,GAAI;CACL,CAAA;AAEL"}
|
|
1
|
+
{"version":3,"file":"cascader-item.js","names":["React","ComboboxPrimitive"],"sources":["../../../../src/components/reui/cascader/cascader-item.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Combobox as ComboboxPrimitive } from \"@base-ui/react\";\nimport { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport {\n CheckIcon,\n ChevronRightIcon,\n LoaderCircleIcon,\n MinusIcon,\n RotateCwIcon,\n} from \"lucide-react\";\n\nimport { cn } from \"@kumix/utils\";\nimport { Spinner } from \"../../ui/spinner\";\nimport { useCascaderActions, useCascaderRender, useCascaderState } from \"./cascader-context\";\nimport {\n getCascaderCount,\n getCascaderMoreParent,\n getCascaderPath,\n isCascaderMoreNode,\n} from \"./cascader-lib\";\nimport type { CascaderLoadState, CascaderNode } from \"./cascader-types\";\n\n// Base UI extends its synthetic events with a handler-veto escape hatch.\ntype VetoableEvent = { preventBaseUIHandler?: () => void };\n\n/** A row press. The veto hook is optional: an `as=\"button\"` row is outside Base\n * UI's listbox and gets a plain React event. */\nexport type CascaderRowEvent = React.MouseEvent<HTMLElement> & VetoableEvent;\n\n// Each style's inline inset, as a variable: a row and its absolutely positioned\n// check have to land on the same number, in LOGICAL properties. These eight\n// numbers MIRROR the shared style sheets; keep them in step with\n// `registry/styles/style-*.css`.\nconst ROW_INSET_CLASS = \"[--cascader-row-inset:6px]\";\n\n// Both insets equal, for a row with no check. `!` because a consumer may not\n// import the sheets into `layer(base)`, where the class would win on order.\nconst ROW_FLUSH_CLASS = \"ps-[var(--cascader-row-inset,8px)]! pe-[var(--cascader-row-inset,8px)]!\";\n\n// The same start inset plus room for the check. A flat `pr-8` is wrong in five\n// of the eight styles: 4px of slack in nova, 8px short in maia, luma and sera,\n// and no gutter at all in mira, whose check then overlaps its own label.\nconst ROW_GUTTER_CLASS =\n \"ps-[var(--cascader-row-inset,8px)]! pe-[calc(var(--cascader-row-inset,8px)*2_+_16px)]!\";\n\n// The check's box, inset to match the row's. A physical `right-2` neither\n// mirrors under RTL nor tracks the style's inset; `right-auto` comes with the\n// logical `end-*`, because width + `left` + `right` is over-constrained.\nconst INDICATOR_CLASS =\n \"pointer-events-none absolute flex items-center justify-center size-4 end-[var(--cascader-row-inset,8px)]! rtl:right-auto!\";\n\n// The row's type, gap, radius and icon size per style. No horizontal padding:\n// every row pairs this with `ROW_FLUSH_CLASS` or `ROW_GUTTER_CLASS`.\nconst ROW_THEME_CLASS =\n \"data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground [&_svg:not([class*='size-'])]:size-4 rounded-md py-1\";\n\n/**\n * The row's gap and type, per style, held apart from the rest of the theme.\n *\n * A row that pins its own gap or text size takes `ROW_SHELL_CLASS` and leaves\n * these out, because a `style-<name>:` utility is emitted AFTER the plain one\n * it would have to lose to. Not receiving the token beats overriding it with\n * `!`, which a consumer then has to fight in turn.\n */\nconst ROW_GAP_CLASS = \"gap-2\";\n\nconst ROW_TEXT_CLASS = \"text-sm\";\n\nconst ROW_SHELL_CLASS = `${ROW_THEME_CLASS} relative flex w-full cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 ${ROW_INSET_CLASS}`;\n\nconst ROW_CLASS = `${ROW_SHELL_CLASS} ${ROW_GAP_CLASS} ${ROW_TEXT_CLASS}`;\n\nconst CASCADER_ACTION_INSET_CLASS = `${ROW_INSET_CLASS} ${ROW_FLUSH_CLASS}`;\n\n/** A footer COMMAND: the row theme, so it cannot drift from the list, plus the\n * hover and `focus-visible` fills a plain button never gets. Fills, never a\n * ring: a ring under rows that all paint with a fill read as a different\n * widget bolted on. `focus-visible`, not `focus`, so a pointer press does not\n * leave a command painted as if it were still hovered. Disabled keys off\n * `aria-disabled`, not `:disabled`, to keep it FOCUSABLE: a footer whose only\n * row is disabled has no tab stop. */\nexport const CASCADER_ACTION_CLASS = `${ROW_SHELL_CLASS} ${ROW_TEXT_CLASS} ${ROW_FLUSH_CLASS} hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground cursor-pointer gap-2 transition-colors aria-disabled:pointer-events-none aria-disabled:opacity-50`;\n\n// The box around the affordances that are not the row. 20px around a 16px icon,\n// the outer 2px cancelled at the call site; 24px would set the row height.\nconst AFFORDANCE_BOX_CLASS = \"flex size-5 shrink-0 items-center justify-center rounded-sm\";\n\n// What makes an affordance read as pressable on an already highlighted row. Not\n// `hover:bg-accent`: the row is `bg-accent` under the pointer, so the chip would\n// be invisible. `!` and `**:` for the `CHECKBOX_MARK_CLASS` reason.\nconst AFFORDANCE_HOVER_CLASS =\n \"transition-[background-color,box-shadow,color] hover:bg-background hover:text-foreground! hover:**:text-foreground! hover:shadow-xs\";\n\n// The selection MARK's colour, pinned so nothing can repaint it: every row\n// carries a DESCENDANT highlight rule, and a mark is STATE. Pinned TWICE\n// because icon sets draw with `fill`/`stroke=\"currentColor\"`, which the\n// `<path>` inherits and resolves against the PATH's own `color`. Both halves\n// are asserted in `cascader-behavior.test.tsx`.\nconst CHECKBOX_MARK_CLASS = \"text-primary-foreground! **:text-primary-foreground!\";\nconst INDICATOR_MARK_CLASS = \"text-foreground! **:text-foreground!\";\n\n// Milliseconds the pointer must rest on a branch row before\n// `expandTrigger=\"hover\"` drills in: long enough that a pointer crossing the\n// column on its way elsewhere opens nothing, short enough to read as immediate.\nconst CASCADER_HOVER_EXPAND_DELAY = 150;\n\nexport interface CascaderItemProps\n extends Omit<\n ComboboxPrimitive.Item.Props,\n \"value\" | \"children\" | \"className\" | \"style\" | \"onClick\" | \"onMouseUp\"\n > {\n /** No state callback: the row merges `className` and `style` itself. */\n className?: string;\n style?: React.CSSProperties;\n onClick?: (event: CascaderRowEvent) => void;\n onMouseUp?: (event: CascaderRowEvent) => void;\n node: CascaderNode;\n /** Explicit render index. Required while virtualized and DELIBERATELY IGNORED\n * otherwise: it self-registers the row and breaks `aria-activedescendant`. */\n index?: number;\n /** Indentation depth. Drives `--cascader-indent` in tree mode. */\n depth?: number;\n /** Renders the ancestor chain under the label, for deep and global search. */\n showPath?: boolean;\n /** `option` renders a real `Combobox.Item`; `button` renders identical markup\n * outside the listbox, for the ancestor columns in columns mode. */\n as?: \"option\" | \"button\";\n /** Tree mode: this row is an expanded branch. */\n expanded?: boolean;\n /** Indent each depth by this many pixels. Tree mode only. */\n indent?: number;\n /** Whether the node has children. Defaults to the cascader's own answer, as do\n * the three below: callers pass them because they already hold the level,\n * which keeps a memoised row off the volatile context. */\n branch?: boolean;\n /** Whether the node may be committed. Defaults to the cascader's own answer. */\n selectable?: boolean;\n /** Whether the node is currently selected. Defaults to the cascader's answer. */\n selected?: boolean;\n /** Some but not all of the loaded subtree selected. `cascade` only. */\n indeterminate?: boolean;\n /** Selected nodes below this one, at any depth. Drives the trailing count. */\n selectedCount?: number;\n /** Paging row only: a request for this level is in flight. */\n loading?: boolean;\n /** Paging row only: this level's last request failed. */\n error?: boolean;\n /** Branch row only: this node's OWN children are being fetched. The chevron\n * (or, in tree mode, the expander) becomes a spinner IN PLACE, in the same\n * 16px box: no skeleton row appears below, nothing reflows. */\n childrenLoading?: boolean;\n /** Branch row only: the last fetch of this node's children failed. The same\n * box becomes the retry. The press path is unchanged: it goes through\n * `navigate`, which refires the failed level rather than moving. */\n childrenError?: boolean;\n children?: React.ReactNode;\n}\n\n/** One row. Branch presses navigate instead of selecting, vetoed here with\n * `preventBaseUIHandler()` on `onClick` (Enter too) and on `onMouseUp`. */\nconst CascaderItem = React.memo(function CascaderItem({\n node,\n index,\n depth,\n showPath = false,\n as = \"option\",\n expanded,\n indent = 16,\n branch: branchProp,\n selectable: selectableProp,\n selected: selectedProp,\n indeterminate: indeterminateProp,\n selectedCount: selectedCountProp,\n loading,\n error,\n childrenLoading = false,\n childrenError = false,\n className,\n children,\n onClick,\n onMouseUp,\n style,\n ...props\n}: CascaderItemProps) {\n // The ACTIONS context only: the state context republishes on every keystroke.\n const {\n index: treeIndex,\n mode,\n labels,\n isBranch,\n isSelectable,\n isDisabled,\n isSelected,\n isIndeterminate,\n selectedDescendantCount,\n multiple,\n branchesSelectable,\n indicator: indicatorEnabled,\n expandTrigger = \"click\",\n navigate,\n navigateAt,\n toggleExpanded,\n commit,\n getState,\n virtualized,\n loadMore,\n retryLevel,\n } = useCascaderActions();\n // Render props come from an always-current context, or a closure goes stale.\n const { renderItem, renderLabel } = useCascaderRender();\n\n const branch = branchProp ?? isBranch(node);\n const selectable = selectableProp ?? isSelectable(node);\n // An ancestor's flag counts: a search hit or a revealed path can list a row\n // inside a branch nobody may open. Asked here, off the near-stable context,\n // so no new prop and only a row that re-renders pays the ancestor walk.\n const disabled = isDisabled(node);\n const selected = selectedProp ?? isSelected(node);\n // A selected node is never also partially selected (a dash in a filled box).\n const indeterminate = !selected && (indeterminateProp ?? isIndeterminate(node));\n const count = branch ? getCascaderCount(treeIndex, node) : 0;\n const nodeDepth = depth ?? treeIndex.depthOf.get(node.value) ?? 0;\n\n // O(1): the cascader publishes a map of selected-descendant counts, because a\n // row walking its own subtree is `rows x descendants`, paid every keystroke.\n const selectedDescendants = branch ? (selectedCountProp ?? selectedDescendantCount(node)) : 0;\n // `multiple` only: with a single selection the trigger, the breadcrumb and\n // the leaf's own check already say where it is, so swapping a branch's real\n // child total (\"24\") for a permanent \"1\" would trade a useful number away.\n const showsSelectedCount = multiple && selectedDescendants > 0;\n const trailingCount = showsSelectedCount ? selectedDescendants : count;\n // Shown selected or not: suppressing it under a checked branch read as data\n // loss, and the row's TWO trailing columns mean the count never has to share\n // a slot with the check.\n const showCount = trailingCount > 0;\n\n // Where a multi-select tree puts its checkbox: at the HEAD of the row, since a\n // trailing box does not follow the label stagger. Per-LIST, never per-row, or\n // the labels below an unselectable row step back out.\n const leadingCheckbox = mode === \"tree\" && multiple;\n\n // Whether this row draws a MARK, and so whether it reserves the gutter one\n // needs. `|| multiple` is the scope of the opt-out: a checkbox is the\n // selection CONTROL, so `indicator={false}` is a no-op in multi-select.\n const showsIndicator = indicatorEnabled || multiple;\n\n const veto = React.useCallback((event: VetoableEvent) => {\n event.preventBaseUIHandler?.();\n }, []);\n\n const handleClick = React.useCallback(\n (event: CascaderRowEvent) => {\n onClick?.(event);\n if (disabled) return;\n if (branch && !selectable) {\n veto(event);\n navigate(node);\n }\n },\n [onClick, node, disabled, branch, selectable, veto, navigate],\n );\n\n const handleMouseUp = React.useCallback(\n (event: CascaderRowEvent) => {\n onMouseUp?.(event);\n if (disabled) return;\n if (branch && !selectable) veto(event);\n },\n [onMouseUp, disabled, branch, selectable, veto],\n );\n\n // The tree expander's own press. With `selectable=\"any\"` the row press\n // commits, and under `cascade` that selected a whole subtree while the row\n // stayed collapsed, so expanding needs its own target. `stopPropagation`\n // before the veto, so Base UI's handler never runs, and no role: nesting\n // one in `role=\"option\"` fails axe. `navigate` fetches BEFORE it opens.\n // A disabled row may still CLOSE what `expanded` opened, never open: a row\n // only a query holds open is not in `expanded`, and the toggle would add it.\n const handleExpanderClick = React.useCallback(\n (event: CascaderRowEvent) => {\n event.stopPropagation();\n veto(event);\n if (expanded) {\n if (!disabled || getState().expanded.has(node.value)) {\n toggleExpanded(node.value);\n }\n } else if (!disabled) navigate(node);\n },\n [veto, node, disabled, expanded, getState, toggleExpanded, navigate],\n );\n\n const handleExpanderMouseUp = React.useCallback(\n (event: CascaderRowEvent) => {\n // Base UI treats a drag-select mouseup as a commit; this is not one.\n event.stopPropagation();\n veto(event);\n },\n [veto],\n );\n\n const handleChevronClick = React.useCallback(\n (event: CascaderRowEvent) => {\n event.stopPropagation();\n veto(event);\n if (disabled) return;\n // `navigate` falls through to `pushLevel`, which APPENDS: right in the\n // deepest column, but from an ancestor column it duplicated the level and\n // corrupted the path. `navigateAt` rebuilds the trail from this depth.\n if (as === \"button\") navigateAt(node, depth ?? 0);\n else navigate(node);\n },\n [veto, node, disabled, as, navigateAt, depth, navigate],\n );\n\n const handleChevronMouseUp = React.useCallback((event: CascaderRowEvent) => veto(event), [veto]);\n\n // Keeps focus in the search field: Base UI prevents the mousedown default for\n // option rows, and focusing a `tabindex=\"-1\"` trail row kills every key.\n const handleButtonMouseDown = React.useCallback((event: React.MouseEvent<HTMLElement>) => {\n event.preventDefault();\n }, []);\n\n const handleButtonClick = React.useCallback(\n (event: CascaderRowEvent) => {\n onClick?.(event);\n if (disabled) return;\n if (branch && !selectable) {\n // Button rows only exist in the columns trail, where `depth` is the\n // column's own depth, so navigating replaces the trail from here.\n navigateAt(node, depth ?? 0);\n return;\n }\n if (selectable) commit(node);\n },\n [onClick, node, disabled, branch, selectable, navigateAt, depth, commit],\n );\n\n // The paging row's press, never a selection, whatever `selectable` says.\n const handleMoreClick = React.useCallback(\n (event: CascaderRowEvent) => {\n onClick?.(event);\n veto(event);\n const parent = getCascaderMoreParent(node);\n if (parent == null) return;\n if (error) retryLevel(parent);\n else if (!loading) loadMore(parent);\n },\n [onClick, veto, node, error, loading, retryLevel, loadMore],\n );\n\n // `expandTrigger=\"hover\"`: resting on a BRANCH row in the ACTIVE column drills\n // in after a delay. The deepest column of columns mode only, and it never\n // commits, so a pointer crossing the panel cannot change the value.\n const hoverNavigates =\n expandTrigger === \"hover\" && mode === \"columns\" && as === \"option\" && branch && !disabled;\n const hoverTimerRef = React.useRef<number | null>(null);\n\n const cancelHoverNavigate = React.useCallback(() => {\n if (hoverTimerRef.current == null) return;\n window.clearTimeout(hoverTimerRef.current);\n hoverTimerRef.current = null;\n }, []);\n\n const handleHoverPointerEnter = React.useCallback(() => {\n cancelHoverNavigate();\n hoverTimerRef.current = window.setTimeout(() => {\n hoverTimerRef.current = null;\n navigate(node);\n }, CASCADER_HOVER_EXPAND_DELAY);\n }, [cancelHoverNavigate, navigate, node]);\n\n // Drilling in demotes this column to the trail WITHOUT unmounting the row, so\n // a pending timer has to die or it fires `navigate` from an inactive column.\n React.useEffect(() => {\n if (!hoverNavigates) cancelHoverNavigate();\n }, [hoverNavigates, cancelHoverNavigate]);\n React.useEffect(() => cancelHoverNavigate, [cancelHoverNavigate]);\n\n /* ------------------------------- paging row ------------------------------ */\n\n if (isCascaderMoreNode(node)) {\n const text = error\n ? labels.error\n : loading\n ? node.count\n ? labels.loadingMore\n : labels.loading\n : labels.loadMore;\n\n const moreStyle =\n mode === \"tree\" && nodeDepth > 0\n ? ({\n ...style,\n \"--cascader-indent\": `${nodeDepth * indent}px`,\n } as React.CSSProperties)\n : style;\n\n const moreShared = {\n \"data-slot\": \"cascader-item\",\n \"data-more\": \"\",\n \"data-state\": error ? \"error\" : loading ? \"loading\" : \"idle\",\n \"data-depth\": nodeDepth,\n style: moreStyle,\n className: cn(\n ROW_SHELL_CLASS,\n ROW_FLUSH_CLASS,\n \"justify-center gap-1.5 text-muted-foreground text-xs\",\n !error && !loading && \"hover:text-foreground\",\n mode === \"tree\" && \"ps-[calc(var(--cascader-row-inset,8px)_+_var(--cascader-indent,0px))]!\",\n className,\n ),\n };\n\n const moreBody = children ?? (\n <>\n {loading ? <LoaderCircleIcon className=\"size-3.5 animate-spin\" aria-hidden /> : null}\n <span>{text}</span>\n {/* TEXT, not a button: a focusable element inside a `role=\"option\"`\n row is a `nested-interactive` violation. */}\n {error ? <span className=\"font-medium text-foreground\">{labels.retry}</span> : null}\n </>\n );\n\n if (as === \"button\") {\n const buttonProps = { ...(props as React.ComponentProps<\"button\">) };\n delete buttonProps[\"aria-setsize\"];\n delete buttonProps[\"aria-posinset\"];\n delete buttonProps[\"aria-level\"];\n\n return (\n <button\n type=\"button\"\n {...moreShared}\n tabIndex={-1}\n onClick={handleMoreClick}\n {...buttonProps}\n >\n {moreBody}\n </button>\n );\n }\n\n return (\n <ComboboxPrimitive.Item\n {...moreShared}\n value={node}\n {...(virtualized && index != null ? { index } : null)}\n {...(mode === \"tree\" ? { role: \"treeitem\" as const, \"aria-level\": nodeDepth + 1 } : null)}\n onClick={handleMoreClick}\n onMouseUp={veto}\n {...props}\n >\n {moreBody}\n </ComboboxPrimitive.Item>\n );\n }\n\n const itemState = {\n branch,\n selected,\n disabled,\n depth: nodeDepth,\n count,\n path: showPath ? getCascaderPath(treeIndex, node.value).slice(0, -1) : [],\n };\n\n const custom = renderItem?.(node, itemState);\n const customLabel = renderLabel?.(node, itemState);\n\n // What the markup cannot say: a branch would announce \"Person 24\", a naked\n // number. Trail rows are outside the listbox, so they need words for state.\n const srDetails = [\n branch ? labels.itemCount(count) : null,\n showsSelectedCount ? labels.selectedCount(selectedDescendants) : null,\n branch && mode !== \"tree\" ? labels.branchAffordance : null,\n as === \"button\" && selected ? labels.selectedState : null,\n // Option rows say this with `aria-checked=\"mixed\"`; `role=\"button\"` allows\n // neither that nor `aria-selected`, so a trail row says it in words.\n as === \"button\" && indeterminate ? labels.partiallySelectedState : null,\n ]\n .filter(Boolean)\n .map((detail) => `, ${detail}`)\n .join(\"\");\n\n // Extracted because tree mode renders it INLINE at the head of the row. It\n // reads `data-selected` off the ROW, so it also works on the trail rows.\n const checkbox = (\n <span\n data-slot=\"cascader-item-checkbox\"\n className=\"flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input in-data-indeterminate:border-primary in-data-selected:border-primary in-data-indeterminate:bg-primary in-data-selected:bg-primary in-data-indeterminate:text-primary-foreground in-data-selected:text-primary-foreground transition-colors\"\n >\n {/* Colour declared ON THE ICON with `!`; see `CHECKBOX_MARK_CLASS`. */}\n {indeterminate ? (\n <MinusIcon data-slot=\"cascader-item-dash\" className={cn(CHECKBOX_MARK_CLASS, \"size-3\")} />\n ) : (\n <CheckIcon\n data-slot=\"cascader-item-tick\"\n className={cn(CHECKBOX_MARK_CLASS, \"size-3 in-data-selected:opacity-100 opacity-0\")}\n />\n )}\n </span>\n );\n\n const indicator = (\n <>\n {multiple ? (\n checkbox\n ) : (\n <CheckIcon\n data-slot=\"cascader-item-check\"\n className={cn(\"pointer-events-none\", INDICATOR_MARK_CLASS)}\n />\n )}\n </>\n );\n\n const body = custom ?? children ?? (\n <>\n {/* Tree mode expands in place, so the branch marker leads the row. */}\n {mode === \"tree\" && branch ? (\n <span\n data-slot=\"cascader-item-expander\"\n /* Pure affordance: the row itself carries `aria-expanded`. */\n aria-hidden=\"true\"\n data-state={childrenError ? \"error\" : childrenLoading ? \"loading\" : \"idle\"}\n onClick={handleExpanderClick}\n onMouseUp={handleExpanderMouseUp}\n className={cn(\n \"-ms-0.5\",\n childrenError ? \"text-destructive\" : \"text-muted-foreground\",\n AFFORDANCE_BOX_CLASS,\n AFFORDANCE_HOVER_CLASS,\n /* A disabled row is `pointer-events-none`; only while open does its\n expander take the pointer back, to close what `expanded` opened. */\n disabled && expanded && \"pointer-events-auto\",\n childrenLoading && \"pointer-events-none\",\n )}\n >\n {childrenLoading ? (\n <Spinner aria-hidden=\"true\" className=\"size-4\" />\n ) : childrenError ? (\n <RotateCwIcon className=\"size-4\" />\n ) : (\n <ChevronRightIcon\n className={cn(\n \"size-4 transition-transform\",\n /* Collapsed it points INTO the level, so it mirrors; expanded\n it points DOWN, the same in both writing modes, so the mirror\n has to come off or `scaleX(-1)` composed with `rotate(90deg)`\n lands it pointing up. `rtl:rotate-90` beside `rotate-90` was\n a no-op that only looked like it handled this. */\n expanded ? \"rotate-90\" : \"rtl:-scale-x-100\",\n )}\n />\n )}\n </span>\n ) : mode === \"tree\" ? (\n // A LEAF's expander slot, reserved and empty: without it a leaf's label\n // started 28px off its sibling branches' and read as one level up.\n <span\n data-slot=\"cascader-item-expander-spacer\"\n aria-hidden=\"true\"\n className={cn(\"-ms-0.5\", AFFORDANCE_BOX_CLASS)}\n />\n ) : null}\n\n {/* Tree + multi-select: the box leads the row, and an unselectable row\n still reserves its width. */}\n {leadingCheckbox ? (\n selectable ? (\n checkbox\n ) : (\n <span\n data-slot=\"cascader-item-checkbox-spacer\"\n aria-hidden=\"true\"\n className=\"size-4 shrink-0\"\n />\n )\n ) : null}\n\n {node.icon ? (\n <span\n data-slot=\"cascader-item-icon\"\n className=\"flex shrink-0 items-center justify-center text-muted-foreground\"\n >\n {node.icon}\n </span>\n ) : null}\n\n {/* The row box is sized for pieces side by side; this one stacks, so it\n restates the gap: 8px reads as a paragraph break, not a subtitle. */}\n <span className=\"flex min-w-0 flex-1 flex-col items-start gap-0.5\">\n {customLabel ?? (\n <>\n <span className=\"w-full truncate text-start\">{node.label}</span>\n {node.description ? (\n <span\n data-slot=\"cascader-item-description\"\n className=\"w-full truncate text-start text-muted-foreground text-xs\"\n >\n {node.description}\n </span>\n ) : null}\n </>\n )}\n {showPath ? <CascaderItemPath node={node} /> : null}\n </span>\n\n {/* The count is a bare number, and nothing else says a branch opens. */}\n {srDetails ? (\n <span data-slot=\"cascader-item-details\" className=\"sr-only\">\n {srDetails}\n </span>\n ) : null}\n\n {/* Tree mode expands in place, so it has no drill-in chevron. */}\n {branch && mode !== \"tree\" ? (\n <span\n data-slot=\"cascader-item-trailing\"\n aria-hidden=\"true\"\n className=\"ms-auto flex shrink-0 items-center gap-1 text-muted-foreground text-xs tabular-nums\"\n >\n {showCount ? (\n <span\n data-slot=\"cascader-item-count\"\n /* The marker a consumer (and a test) reads to tell the two\n numbers apart without matching on a colour class. */\n {...(showsSelectedCount ? { \"data-selected-count\": \"\" } : null)}\n className={cn(showsSelectedCount && \"text-primary!\")}\n >\n {trailingCount}\n </span>\n ) : null}\n {/* ONLY the chevron is the drill target: sharing a hit area with\n the count made a number pressable. */}\n {/** biome-ignore lint/a11y/useKeyWithClickEvents: <> */}\n <span\n data-slot=\"cascader-item-chevron\"\n data-state={childrenError ? \"error\" : childrenLoading ? \"loading\" : \"idle\"}\n onClick={selectable ? handleChevronClick : undefined}\n onMouseUp={selectable ? handleChevronMouseUp : undefined}\n onMouseDown={as === \"button\" ? handleButtonMouseDown : undefined}\n className={cn(\n /* Cancels the box's outer slack, so the icon keeps its column. */\n \"-me-0.5\",\n AFFORDANCE_BOX_CLASS,\n selectable && AFFORDANCE_HOVER_CLASS,\n childrenError && \"text-destructive\",\n childrenLoading && \"pointer-events-none\",\n )}\n >\n {childrenLoading ? (\n <Spinner aria-hidden=\"true\" className=\"size-4\" />\n ) : childrenError ? (\n <RotateCwIcon className=\"size-4\" />\n ) : (\n <ChevronRightIcon className=\"size-4 rtl:-scale-x-100\" />\n )}\n </span>\n </span>\n ) : null}\n\n {branch && mode === \"tree\" && showCount ? (\n <span\n data-slot=\"cascader-item-count\"\n {...(showsSelectedCount ? { \"data-selected-count\": \"\" } : null)}\n /* The count is spoken by the sr-only details span instead. */\n aria-hidden=\"true\"\n className={cn(\n \"ms-auto shrink-0 text-muted-foreground text-xs tabular-nums\",\n showsSelectedCount && \"text-primary!\",\n )}\n >\n {trailingCount}\n </span>\n ) : null}\n\n {/* No trailing indicator when a tree's box led the row, or when\n `indicator={false}` opted out. See `showsIndicator`. */}\n {selectable && !leadingCheckbox && showsIndicator ? (\n as === \"button\" ? (\n // No ItemIndicator outside Base UI: `data-selected` drives it.\n (multiple || selected) && (\n <span data-slot=\"cascader-item-indicator\" className={INDICATOR_CLASS}>\n {indicator}\n </span>\n )\n ) : (\n <ComboboxPrimitive.ItemIndicator\n /* Kept mounted for a partial selection too: the row is not\n selected, so Base UI would unmount the box the dash lives in. */\n keepMounted={multiple || indeterminate}\n render={<span data-slot=\"cascader-item-indicator\" className={INDICATOR_CLASS} />}\n >\n {indicator}\n </ComboboxPrimitive.ItemIndicator>\n )\n ) : null}\n </>\n );\n\n const rowStyle =\n mode === \"tree\" && nodeDepth > 0\n ? ({\n ...style,\n \"--cascader-indent\": `${nodeDepth * indent}px`,\n } as React.CSSProperties)\n : style;\n\n const shared = {\n \"data-slot\": \"cascader-item\",\n \"data-branch\": branch || undefined,\n \"data-selected\": selected || undefined,\n \"data-indeterminate\": indeterminate || undefined,\n \"data-depth\": nodeDepth,\n \"data-expanded\": expanded || undefined,\n // No `aria-level`: `role=\"option\"` allows only `aria-selected`,\n // `aria-checked`, `aria-posinset` and `aria-setsize`, and a `role=\"button\"`\n // trail row allows none of the four. Only tree mode has a role that takes a\n // level, and it adds one below.\n style: rowStyle,\n className: cn(\n ROW_CLASS,\n /* Three separate reasons to hand the check gutter back. A multi-select\n tree's box leads the row, so the gutter would be 24px of dead space;\n `indicator={false}` drops the check, and keeping the gutter would park\n the count and the chevron one gutter in from an edge nothing sits on;\n and for branches the question is per-LIST, not per-row, because the old\n `branch && !selectable` put neighbouring chevrons on 24px and 6px in\n nova. One `pe-*` is emitted either way, so nothing here depends on\n class-merge order. */\n leadingCheckbox || !showsIndicator || (branch && !branchesSelectable)\n ? ROW_FLUSH_CLASS\n : ROW_GUTTER_CLASS,\n /* ADDED to the style's own inset, never substituted: replacing it put\n depth 0 at 12px and depth 1 at 16px in maia, luma and sera, a 4px step.\n `_+_` because Tailwind's parser splits on whitespace. */\n mode === \"tree\" && \"ps-[calc(var(--cascader-row-inset,8px)_+_var(--cascader-indent,0px))]!\",\n className,\n ),\n };\n\n if (as === \"button\") {\n const buttonProps = { ...(props as React.ComponentProps<\"button\">) };\n // `role=\"button\"` allows none of these, so they are dropped, not passed.\n delete buttonProps[\"aria-setsize\"];\n delete buttonProps[\"aria-posinset\"];\n delete buttonProps[\"aria-level\"];\n\n return (\n <button\n type=\"button\"\n {...shared}\n /* Focus stays in the search input; the trail uses ArrowLeft. */\n tabIndex={-1}\n disabled={disabled}\n aria-disabled={disabled || undefined}\n onClick={handleButtonClick}\n onMouseDown={handleButtonMouseDown}\n {...buttonProps}\n >\n {body}\n </button>\n );\n }\n\n return (\n <ComboboxPrimitive.Item\n {...shared}\n value={node}\n /* THE one gate for the explicit index: supply one outside virtualized mode\n and the first arrow key leaves `aria-activedescendant` pointing at\n nothing. */\n {...(virtualized && index != null ? { index } : null)}\n disabled={disabled}\n /* Conditional spread, never `role={... : undefined}`: `mergeProps`\n iterates own keys, so `undefined` would delete `role=\"option\"`. */\n {...(mode === \"tree\"\n ? {\n role: \"treeitem\" as const,\n \"aria-level\": nodeDepth + 1,\n ...(branch ? { \"aria-expanded\": !!expanded } : null),\n }\n : branch\n ? { \"aria-haspopup\": \"listbox\" as const }\n : null)}\n /* Only ever `mixed`: a selected row already says so with `aria-selected`,\n and two selection attributes on one row is noise. */\n {...(indeterminate ? { \"aria-checked\": \"mixed\" as const } : null)}\n {...(hoverNavigates\n ? {\n onPointerEnter: handleHoverPointerEnter,\n onPointerLeave: cancelHoverNavigate,\n }\n : null)}\n onClick={handleClick}\n onMouseUp={handleMouseUp}\n {...props}\n >\n {body}\n </ComboboxPrimitive.Item>\n );\n});\n\n/** Ancestor chain under a deep or global hit: \"Name\" alone is ambiguous. */\nfunction CascaderItemPath({ node }: { node: CascaderNode }) {\n const { index, labels } = useCascaderActions();\n const ancestors = getCascaderPath(index, node.value).slice(0, -1);\n if (!ancestors.length) return null;\n\n return (\n <span\n data-slot=\"cascader-item-path\"\n className=\"flex w-full items-center gap-0.5 truncate text-start text-muted-foreground text-xs\"\n >\n {ancestors.map((ancestor, i) => (\n <React.Fragment key={ancestor.value}>\n {i > 0 ? <span aria-hidden=\"true\">{labels.pathSeparator}</span> : null}\n <span className=\"truncate\">{ancestor.label}</span>\n </React.Fragment>\n ))}\n </span>\n );\n}\n\n/** Every load-derived prop a row needs. A PAGING row reports the level it\n * belongs to, a BRANCH row the level it OWNS; mutually exclusive, so one call\n * answers both. Exported because a memoised row cannot read them itself. */\nexport function getCascaderMoreProps(\n node: CascaderNode,\n loadStates: ReadonlyMap<string, CascaderLoadState>,\n): {\n loading: boolean;\n error: boolean;\n childrenLoading: boolean;\n childrenError: boolean;\n} {\n const parent = getCascaderMoreParent(node);\n if (parent == null) {\n const own = loadStates.get(node.value);\n return {\n loading: false,\n error: false,\n childrenLoading: !!own?.loading,\n childrenError: !!own?.error,\n };\n }\n const state = loadStates.get(parent);\n return {\n loading: !!state?.loading,\n error: !!state?.error,\n childrenLoading: false,\n childrenError: false,\n };\n}\n\nexport interface CascaderItemsProps {\n /** Replaces the default row for every item. */\n children?: (node: CascaderNode, index: number) => React.ReactNode;\n}\n\n/** Whatever the active view is: the current level, the deepest column, or the\n * flattened tree rows. Lives here so `cascader.tsx` never imports a row\n * component, which would cycle with the context. `index` is deliberately not\n * passed; see `CascaderItemProps`. */\nfunction CascaderItems({ children }: CascaderItemsProps) {\n const { mode, isBranch, isSelectable, isSelected, isIndeterminate } = useCascaderActions();\n const { renderedItems, deepResults, treeRows, loadStates } = useCascaderState();\n const showPath = deepResults !== null;\n\n // Answered once here, as plain booleans, so `React.memo` can skip a row.\n if (mode === \"tree\") {\n return (\n <>\n {treeRows.map((row, i) =>\n children ? (\n <React.Fragment key={row.node.value}>{children(row.node, i)}</React.Fragment>\n ) : (\n <CascaderItem\n key={row.node.value}\n node={row.node}\n depth={row.depth}\n expanded={row.expanded}\n branch={row.branch}\n selectable={isSelectable(row.node)}\n selected={isSelected(row.node)}\n indeterminate={isIndeterminate(row.node)}\n {...getCascaderMoreProps(row.node, loadStates)}\n aria-setsize={row.setSize}\n aria-posinset={row.posInSet}\n />\n ),\n )}\n </>\n );\n }\n\n return (\n <>\n {renderedItems.map((node, i) =>\n children ? (\n <React.Fragment key={node.value}>{children(node, i)}</React.Fragment>\n ) : (\n <CascaderItem\n key={node.value}\n node={node}\n showPath={showPath}\n branch={isBranch(node)}\n selectable={isSelectable(node)}\n selected={isSelected(node)}\n indeterminate={isIndeterminate(node)}\n {...getCascaderMoreProps(node, loadStates)}\n aria-setsize={renderedItems.length}\n aria-posinset={i + 1}\n />\n ),\n )}\n </>\n );\n}\n\n/* -------------------------------------------------------------------------- */\n/* Group / Label / Separator */\n/* -------------------------------------------------------------------------- */\n\n// Whether a `CascaderLabel` has a group to name: Base UI's `Combobox.GroupLabel`\n// THROWS when there is none, and a heading is useful outside a group.\nconst CascaderGroupContext = React.createContext(false);\n\n// A heading over a run of rows. All eight styles are spelled out because the\n// type is not uniform (sera is uppercase), and the inset is the row's own.\nconst CASCADER_LABEL_CLASS = `text-muted-foreground text-xs py-1.5 ${CASCADER_ACTION_INSET_CLASS} block truncate`;\n\n// A rule between two runs. The inline margin is not the combobox separator's:\n// that cancels the container's padding with a per-style number, wrong in a\n// footer and 4px too much in lyra. `--cascader-list-pad` reaches the edge.\nconst CASCADER_SEPARATOR_CLASS =\n \"h-px bg-border my-1 mx-[calc(var(--cascader-list-pad,4px)*-1)]! shrink-0\";\n\nexport interface CascaderGroupProps extends Omit<ComboboxPrimitive.Group.Props, \"className\"> {\n /** Base UI also accepts a state callback here; the group has no state. */\n className?: string;\n}\n\n/** A run of related rows, named by the `CascaderLabel` inside it: the group is\n * `role=\"group\"` and Base UI points its `aria-labelledby` at the label, where a\n * heading alone inside a listbox is dropped from the accessibility tree.\n * Grouping is composition, not data: `CascaderItems` renders one flat run per\n * level, so its indices line up with `listRef`. */\nfunction CascaderGroup({ className, ...props }: CascaderGroupProps) {\n return (\n <CascaderGroupContext.Provider value={true}>\n <ComboboxPrimitive.Group\n data-slot=\"cascader-group\"\n className={cn(\"flex flex-col\", className)}\n {...props}\n />\n </CascaderGroupContext.Provider>\n );\n}\n\nexport interface CascaderLabelProps\n extends Omit<ComboboxPrimitive.GroupLabel.Props, \"className\" | \"style\"> {\n /** No state callback; outside a group this is not a Base UI part at all. */\n className?: string;\n style?: React.CSSProperties;\n}\n\n/** Inside a group: the real thing, with the id association Base UI wires up. */\nfunction CascaderGroupLabel({ className, ...props }: CascaderLabelProps) {\n return (\n <ComboboxPrimitive.GroupLabel\n data-slot=\"cascader-label\"\n className={cn(CASCADER_LABEL_CLASS, className)}\n {...props}\n />\n );\n}\n\n// Outside a group: the same heading as a plain element. A separate component\n// rather than a branch, so the hook count cannot change when a label moves in.\nfunction CascaderPlainLabel({ className, ...props }: CascaderLabelProps) {\n const defaultProps = {\n \"data-slot\": \"cascader-label\",\n className: cn(CASCADER_LABEL_CLASS, className),\n };\n\n return useRender({\n defaultTagName: \"div\",\n render: props.render,\n props: mergeProps<\"div\">(defaultProps, props),\n });\n}\n\n/** A heading. Inside `CascaderGroup` it is the group's accessible name; outside\n * one (the footer flyout is a menu, not a listbox) it is decoration only. */\nfunction CascaderLabel(props: CascaderLabelProps) {\n const grouped = React.useContext(CascaderGroupContext);\n return grouped ? <CascaderGroupLabel {...props} /> : <CascaderPlainLabel {...props} />;\n}\n\nexport interface CascaderSeparatorProps\n extends Omit<ComboboxPrimitive.Separator.Props, \"className\"> {\n /** Base UI also accepts a state callback here; only the orientation varies. */\n className?: string;\n}\n\n/** Decorative on purpose: Base UI's separator is `role=\"separator\"`, which a\n * `listbox` may not own, and a run that needs separating for a screen reader\n * needs a `CascaderGroup`, not a line. A consumer can pass the role back. */\nfunction CascaderSeparator({ className, ...props }: CascaderSeparatorProps) {\n return (\n <ComboboxPrimitive.Separator\n data-slot=\"cascader-separator\"\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn(CASCADER_SEPARATOR_CLASS, className)}\n {...props}\n />\n );\n}\n\nexport { CascaderGroup, CascaderItem, CascaderItems, CascaderLabel, CascaderSeparator };\n"],"mappings":";;;;;;;;;;;;AAoCA,MAAM,kBAAkB;AAIxB,MAAM,kBAAkB;AAKxB,MAAM,mBACJ;AAKF,MAAM,kBACJ;AAIF,MAAM,kBACJ;;;;;;;;;AAUF,MAAM,gBAAgB;AAEtB,MAAM,iBAAiB;AAEvB,MAAM,kBAAkB,GAAG,gBAAgB,uLAAuL;AAElO,MAAM,YAAY,GAAG,gBAAgB,GAAG,cAAc,GAAG;AAEzD,MAAM,8BAA8B,GAAG,gBAAgB,GAAG;;;;;;;;AAS1D,MAAa,wBAAwB,GAAG,gBAAgB,GAAG,eAAe,GAAG,gBAAgB;AAI7F,MAAM,uBAAuB;AAK7B,MAAM,yBACJ;AAOF,MAAM,sBAAsB;AAC5B,MAAM,uBAAuB;AAK7B,MAAM,8BAA8B;;;AAwDpC,MAAM,eAAeA,QAAM,KAAK,SAAS,aAAa,EACpD,MACA,OACA,OACA,WAAW,OACX,KAAK,UACL,UACA,SAAS,IACT,QAAQ,YACR,YAAY,gBACZ,UAAU,cACV,eAAe,mBACf,eAAe,mBACf,SACA,OACA,kBAAkB,OAClB,gBAAgB,OAChB,WACA,UACA,SACA,WACA,OACA,GAAG,SACiB;CAEpB,MAAM,EACJ,OAAO,WACP,MACA,QACA,UACA,cACA,YACA,YACA,iBACA,yBACA,UACA,oBACA,WAAW,kBACX,gBAAgB,SAChB,UACA,YACA,gBACA,QACA,UACA,aACA,UACA,eACE,mBAAmB;CAEvB,MA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EAAE,WAAW,GAAG,SAAiC;CAC1E,OACE,oBAACC,SAAkB,WAAnB;EACE,aAAU;EACV,MAAK;EACL,eAAY;EACZ,WAAW,GAAG,0BAA0B,SAAS;EACjD,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as CascaderSelectable, a as CascaderFlatNode, i as CascaderCollapse, m as CascaderPathSegment, o as CascaderIndex, p as CascaderNode } from "../../../cascader-types-
|
|
1
|
+
import { _ as CascaderSelectable, a as CascaderFlatNode, i as CascaderCollapse, m as CascaderPathSegment, o as CascaderIndex, p as CascaderNode } from "../../../cascader-types-DVT-znZ-.js";
|
|
2
2
|
//#region src/components/reui/cascader/cascader-lib.d.ts
|
|
3
3
|
/** Root level key in `childrenOf`. NUL-prefixed so no real value collides. */
|
|
4
4
|
export declare const CASCADER_ROOT_KEY = "\0root";
|
|
@@ -59,6 +59,13 @@ export declare function getCascaderChildren<T>(index: CascaderIndex<T>, parent?:
|
|
|
59
59
|
export declare function isCascaderBranch<T>(index: CascaderIndex<T>, node: CascaderNode<T>): boolean;
|
|
60
60
|
/** Trailing count for the default row. Explicit `count` wins over the tree. */
|
|
61
61
|
export declare function getCascaderCount<T>(index: CascaderIndex<T>, node: CascaderNode<T>): number;
|
|
62
|
+
/**
|
|
63
|
+
* Whether a node is disabled: its own flag, or any ancestor's, since a disabled
|
|
64
|
+
* branch keeps its whole subtree shut. The index's copy counts as its own, so a
|
|
65
|
+
* server hit that omits the flag `items` sets is still caught. Ancestry is
|
|
66
|
+
* `parentOf`: a detached hit the index has never placed answers for itself.
|
|
67
|
+
*/
|
|
68
|
+
export declare function isCascaderDisabled<T>(index: CascaderIndex<T>, node: CascaderNode<T>): boolean;
|
|
62
69
|
/** Whether a node may be committed as a selection. */
|
|
63
70
|
export declare function isCascaderSelectable<T>(index: CascaderIndex<T>, node: CascaderNode<T>, selectable: CascaderSelectable<T>): boolean;
|
|
64
71
|
/** Ancestor chain for `value`, root first. Empty while async data loads. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cascader-lib.d.ts","names":[],"sources":["../../../../src/components/reui/cascader/cascader-lib.tsx"],"mappings":";;;qBAYa;;;;;qBAMA;;;;;;;;;;;qBAiBA;;;;;;qBAQA;;qBAGA;;qBAIA;;wBAiCG,uBAAuB,OAAO,cAAc;;wBAS5C,qBACd,OAAO,aACP,MAAM,gBACN,qBACC;;;;;wBA0Ba,cAAc,SAAS,SAAS;;;;;wBAYhC,uBAAuB,aACrC,mBACA,uBACC,aAAa;wBAUA,mBAAmB,GAAG,MAAM,aAAa;;wBAKzC,sBAAsB,GAAG,MAAM,aAAa;;wBAM5C,mBAAmB,aACjC,gBAAgB,aAAa,kBAC7B,aAAa,MAAM,aAAa,mCAC/B,cAAc;;;;;;wBAgGD,mBAAmB,aACjC,MAAM,cAAc,IACpB,OAAO,6BAA6B,aAAa,OACjD,WAAW,oBAAoB,aAAa,MAC3C,cAAc;;wBAgFD,oBAAoB,GAClC,OAAO,cAAc,IACrB,yBACC,aAAa;;wBAKA,iBAAiB,GAAG,OAAO,cAAc,IAAI,MAAM,aAAa;;wBAMhE,iBAAiB,GAAG,OAAO,cAAc,IAAI,MAAM,aAAa;;
|
|
1
|
+
{"version":3,"file":"cascader-lib.d.ts","names":[],"sources":["../../../../src/components/reui/cascader/cascader-lib.tsx"],"mappings":";;;qBAYa;;;;;qBAMA;;;;;;;;;;;qBAiBA;;;;;;qBAQA;;qBAGA;;qBAIA;;wBAiCG,uBAAuB,OAAO,cAAc;;wBAS5C,qBACd,OAAO,aACP,MAAM,gBACN,qBACC;;;;;wBA0Ba,cAAc,SAAS,SAAS;;;;;wBAYhC,uBAAuB,aACrC,mBACA,uBACC,aAAa;wBAUA,mBAAmB,GAAG,MAAM,aAAa;;wBAKzC,sBAAsB,GAAG,MAAM,aAAa;;wBAM5C,mBAAmB,aACjC,gBAAgB,aAAa,kBAC7B,aAAa,MAAM,aAAa,mCAC/B,cAAc;;;;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I,4BAA4B,GAAG,gBAAgB,aAAa,OAAO;;wBAyBnE,iBAAiB,aAAa;;wBAQ9B;;iBAKC;;EAEf;;EAEA;;;wBAIc,uBAAuB,GACrC,gBAAgB,aAAa,kBAC7B,aAAa,MAAM,aAAa,mCAC/B"}
|
|
@@ -245,19 +245,27 @@ function getCascaderCount(index, node) {
|
|
|
245
245
|
if (typeof node.count === "number") return node.count;
|
|
246
246
|
return index.childrenOf.get(node.value)?.length ?? 0;
|
|
247
247
|
}
|
|
248
|
+
/**
|
|
249
|
+
* Whether a node is disabled: its own flag, or any ancestor's, since a disabled
|
|
250
|
+
* branch keeps its whole subtree shut. The index's copy counts as its own, so a
|
|
251
|
+
* server hit that omits the flag `items` sets is still caught. Ancestry is
|
|
252
|
+
* `parentOf`: a detached hit the index has never placed answers for itself.
|
|
253
|
+
*/
|
|
254
|
+
function isCascaderDisabled(index, node) {
|
|
255
|
+
if (node.disabled || index.byValue.get(node.value)?.disabled) return true;
|
|
256
|
+
const seen = /* @__PURE__ */ new Set([node.value]);
|
|
257
|
+
let cursor = index.parentOf.get(node.value) ?? null;
|
|
258
|
+
while (cursor != null && !seen.has(cursor)) {
|
|
259
|
+
seen.add(cursor);
|
|
260
|
+
if (index.byValue.get(cursor)?.disabled) return true;
|
|
261
|
+
cursor = index.parentOf.get(cursor) ?? null;
|
|
262
|
+
}
|
|
263
|
+
return false;
|
|
264
|
+
}
|
|
248
265
|
/** Whether a node may be committed as a selection. */
|
|
249
266
|
function isCascaderSelectable(index, node, selectable) {
|
|
250
267
|
if (isCascaderMoreNode(node)) return false;
|
|
251
|
-
if (node
|
|
252
|
-
{
|
|
253
|
-
const seen = /* @__PURE__ */ new Set([node.value]);
|
|
254
|
-
let cursor = index.parentOf.get(node.value) ?? null;
|
|
255
|
-
while (cursor != null && !seen.has(cursor)) {
|
|
256
|
-
seen.add(cursor);
|
|
257
|
-
if (index.byValue.get(cursor)?.disabled) return false;
|
|
258
|
-
cursor = index.parentOf.get(cursor) ?? null;
|
|
259
|
-
}
|
|
260
|
-
}
|
|
268
|
+
if (isCascaderDisabled(index, node)) return false;
|
|
261
269
|
if (typeof selectable === "function") return selectable(node);
|
|
262
270
|
if (selectable === "any") return true;
|
|
263
271
|
return !isCascaderBranch(index, node);
|
|
@@ -571,6 +579,6 @@ function findCascaderDataIssues(items, getParent) {
|
|
|
571
579
|
};
|
|
572
580
|
}
|
|
573
581
|
//#endregion
|
|
574
|
-
export { CASCADER_LIST_HEIGHT_CLASS, CASCADER_LIST_PAD_CLASS, CASCADER_MORE_PREFIX, CASCADER_ROOT_KEY, CASCADER_ROWS_CLASS, CASCADER_SCROLL_CLASS, applyCascadeSelection, buildCascaderIndex, collapseCascaderPath, collectCascaderSubtree, createCascaderMoreNode, filterCascaderLevel, findAmbiguousCascaderLabels, findCascaderDataIssues, flattenCascaderTree, foldCascaderText, getCascaderCheckedValues, getCascaderChildren, getCascaderCount, getCascaderFooterStops, getCascaderIndeterminate, getCascaderIndeterminateFrom, getCascaderMoreParent, getCascaderPath, getCascaderSelectedDescendants, getCascaderTabTarget, isCascaderBranch, isCascaderMoreNode, isCascaderRtl, isCascaderSelectable, matchesCascaderQuery, mergeCascaderIndex, normalizeCascaderQuery, resetCascaderWarnings, searchCascaderDeep, warnCascaderOnce };
|
|
582
|
+
export { CASCADER_LIST_HEIGHT_CLASS, CASCADER_LIST_PAD_CLASS, CASCADER_MORE_PREFIX, CASCADER_ROOT_KEY, CASCADER_ROWS_CLASS, CASCADER_SCROLL_CLASS, applyCascadeSelection, buildCascaderIndex, collapseCascaderPath, collectCascaderSubtree, createCascaderMoreNode, filterCascaderLevel, findAmbiguousCascaderLabels, findCascaderDataIssues, flattenCascaderTree, foldCascaderText, getCascaderCheckedValues, getCascaderChildren, getCascaderCount, getCascaderFooterStops, getCascaderIndeterminate, getCascaderIndeterminateFrom, getCascaderMoreParent, getCascaderPath, getCascaderSelectedDescendants, getCascaderTabTarget, isCascaderBranch, isCascaderDisabled, isCascaderMoreNode, isCascaderRtl, isCascaderSelectable, matchesCascaderQuery, mergeCascaderIndex, normalizeCascaderQuery, resetCascaderWarnings, searchCascaderDeep, warnCascaderOnce };
|
|
575
583
|
|
|
576
584
|
//# sourceMappingURL=cascader-lib.js.map
|