@espressif/dashboard-ui-components 1.11.2 → 1.12.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/.claude/rules/dashboard-ui-consumption.md +176 -5
- package/.cursor/rules/dashboard-ui-consumption.mdc +163 -4
- package/CHANGELOG.md +1005 -0
- package/README.md +240 -7
- package/THIRD-PARTY-NOTICES.md +2 -1
- package/dist/alert.props-CcKo49Rb.d.ts +44 -0
- package/dist/animation/index.d.ts +3 -0
- package/dist/animation/index.js +3 -0
- package/dist/avatar.props-2q5BsX-R.d.ts +29 -0
- package/dist/button-BK-DIR_L.d.ts +21 -0
- package/dist/button-BxJ7s6sR.d.ts +76 -0
- package/dist/calendar.props-BtCzuWH1.d.ts +12 -0
- package/dist/carousel/index.d.ts +2 -0
- package/dist/carousel/index.js +2 -0
- package/dist/charts/index.d.ts +5 -0
- package/dist/charts/index.js +9 -0
- package/dist/common/app-logo/app-logo.js +1 -1
- package/dist/common/index.d.ts +9 -20
- package/dist/common/my-account-menu/my-account-menu.js +45 -13
- package/dist/common/profile-card/profile-card.js +3 -2
- package/dist/components/accordion/accordion.js +14 -5
- package/dist/components/accordion/index.d.ts +36 -0
- package/dist/components/accordion/index.js +2 -0
- package/dist/components/advanced-search-box/advanced-search-box.js +8 -2
- package/dist/components/advanced-search-box/index.d.ts +29 -0
- package/dist/components/advanced-search-box/index.js +2 -0
- package/dist/components/alert/alert.js +2 -1
- package/dist/components/alert/index.d.ts +12 -0
- package/dist/components/alert/index.js +2 -0
- package/dist/components/anchored-panel/anchored-panel.js +83 -0
- package/dist/components/anchored-panel/index.d.ts +31 -0
- package/dist/components/anchored-panel/index.js +2 -0
- package/dist/components/animated-containers/index.d.ts +13 -0
- package/dist/components/animated-containers/index.js +2 -0
- package/dist/components/async-multi-select/async-multi-select.js +48 -7
- package/dist/components/async-multi-select/index.d.ts +63 -0
- package/dist/components/async-multi-select/index.js +2 -0
- package/dist/components/avatar/avatar.js +11 -4
- package/dist/components/avatar/index.d.ts +8 -0
- package/dist/components/avatar/index.js +2 -0
- package/dist/components/avatar-group/avatar-group.js +35 -0
- package/dist/components/avatar-group/index.d.ts +31 -0
- package/dist/components/avatar-group/index.js +2 -0
- package/dist/components/badge/index.d.ts +14 -0
- package/dist/components/badge/index.js +2 -0
- package/dist/components/breadcrumb/index.d.ts +21 -0
- package/dist/components/breadcrumb/index.js +2 -0
- package/dist/components/bubble/bubble.js +18 -0
- package/dist/components/bubble/index.d.ts +19 -0
- package/dist/components/bubble/index.js +2 -0
- package/dist/components/button/button.js +87 -25
- package/dist/components/button/flash-button.js +9 -3
- package/dist/components/button/index.d.ts +56 -0
- package/dist/components/button/index.js +6 -0
- package/dist/components/button-group/index.d.ts +16 -0
- package/dist/components/button-group/index.js +2 -0
- package/dist/components/calendar/calendar.js +5 -5
- package/dist/components/calendar/index.d.ts +11 -0
- package/dist/components/calendar/index.js +2 -0
- package/dist/components/card/index.d.ts +11 -0
- package/dist/components/card/index.js +2 -0
- package/dist/components/card-rail/card-rail.js +50 -0
- package/dist/components/card-rail/index.d.ts +30 -0
- package/dist/components/card-rail/index.js +2 -0
- package/dist/components/cards/collapsible-card.js +5 -2
- package/dist/components/cards/index.d.ts +16200 -0
- package/dist/components/cards/index.js +8 -0
- package/dist/components/cards/section-card.js +133 -8
- package/dist/components/cards/simple-card.js +5 -2
- package/dist/components/carousel/carousel.js +137 -49
- package/dist/components/carousel/index.d.ts +130 -0
- package/dist/components/carousel/index.js +2 -0
- package/dist/components/category-card/category-card.js +111 -0
- package/dist/components/category-card/index.d.ts +55 -0
- package/dist/components/category-card/index.js +2 -0
- package/dist/components/chart/area-chart.js +95 -85
- package/dist/components/chart/bar-chart.js +123 -60
- package/dist/components/chart/chart.js +127 -3
- package/dist/components/chart/composed-chart.js +109 -98
- package/dist/components/chart/donut-chart.js +23 -5
- package/dist/components/chart/index.d.ts +732 -0
- package/dist/components/chart/index.js +9 -0
- package/dist/components/chart/line-chart.js +93 -83
- package/dist/components/chart/treemap-chart.js +71 -58
- package/dist/components/check-badge/check-badge.js +25 -0
- package/dist/components/check-badge/index.d.ts +13 -0
- package/dist/components/check-badge/index.js +2 -0
- package/dist/components/checkbox/index.d.ts +8 -0
- package/dist/components/checkbox/index.js +2 -0
- package/dist/components/choice-card/choice-card.js +99 -0
- package/dist/components/choice-card/index.d.ts +41 -0
- package/dist/components/choice-card/index.js +2 -0
- package/dist/components/circular-progress/circular-progress.js +5 -2
- package/dist/components/circular-progress/index.d.ts +23 -0
- package/dist/components/circular-progress/index.js +2 -0
- package/dist/components/code/index.d.ts +40 -0
- package/dist/components/code/index.js +2 -0
- package/dist/components/code-editor/code-editor.js +9 -3
- package/dist/components/code-editor/index.d.ts +82 -0
- package/dist/components/code-editor/index.js +2 -0
- package/dist/components/collapsible/index.d.ts +42 -0
- package/dist/components/collapsible/index.js +2 -0
- package/dist/components/column-panel/column-panel.js +38 -0
- package/dist/components/column-panel/index.d.ts +37 -0
- package/dist/components/column-panel/index.js +3 -0
- package/dist/components/column-panel/use-panel-flag.js +27 -0
- package/dist/components/combobox/index.d.ts +28 -0
- package/dist/components/combobox/index.js +2 -0
- package/dist/components/confirmation-dialog/confirmation-dialog.js +1 -1
- package/dist/components/confirmation-dialog/index.d.ts +40 -0
- package/dist/components/confirmation-dialog/index.js +3 -0
- package/dist/components/content-container/index.d.ts +16 -0
- package/dist/components/content-container/index.js +2 -0
- package/dist/components/copiable-text/index.d.ts +33 -0
- package/dist/components/copiable-text/index.js +2 -0
- package/dist/components/coverflow/_constants/coverflow-poses.js +23 -0
- package/dist/components/coverflow/_constants/coverflow-shapes.js +23 -0
- package/dist/components/coverflow/_hooks/use-coverflow.js +90 -0
- package/dist/components/coverflow/_utils/ring.js +24 -0
- package/dist/components/coverflow/coverflow.js +198 -0
- package/dist/components/coverflow/index.d.ts +105 -0
- package/dist/components/coverflow/index.js +2 -0
- package/dist/components/data-table/data-table.js +9 -2
- package/dist/components/data-table/index.d.ts +120 -0
- package/dist/components/data-table/index.js +3 -0
- package/dist/components/date-picker/date-picker.js +5 -2
- package/dist/components/date-picker/index.d.ts +50 -0
- package/dist/components/date-picker/index.js +2 -0
- package/dist/components/date-range-picker/date-range-picker.js +11 -2
- package/dist/components/date-range-picker/index.d.ts +100 -0
- package/dist/components/date-range-picker/index.js +3 -0
- package/dist/components/date-time-picker/date-time-picker.js +5 -2
- package/dist/components/date-time-picker/index.d.ts +79 -0
- package/dist/components/date-time-picker/index.js +2 -0
- package/dist/components/device-icon/index.d.ts +17 -0
- package/dist/components/device-icon/index.js +2 -0
- package/dist/components/dialog/index.d.ts +38 -0
- package/dist/components/dialog/index.js +2 -0
- package/dist/components/dropdown-menu/index.d.ts +57 -0
- package/dist/components/dropdown-menu/index.js +2 -0
- package/dist/components/dynamic-list/dynamic-list.js +4 -4
- package/dist/components/dynamic-list/index.d.ts +74 -0
- package/dist/components/dynamic-list/index.js +2 -0
- package/dist/components/error-display/index.d.ts +17 -0
- package/dist/components/error-display/index.js +3 -0
- package/dist/components/expandable-text/expandable-text-overlay.js +78 -0
- package/dist/components/expandable-text/expandable-text.js +73 -0
- package/dist/components/expandable-text/index.d.ts +39 -0
- package/dist/components/expandable-text/index.js +2 -0
- package/dist/components/expandable-text/use-clamped.js +23 -0
- package/dist/components/facet-filters/_hooks/use-filter-group.js +51 -0
- package/dist/components/facet-filters/active-filters.js +31 -0
- package/dist/components/facet-filters/filter-group.js +110 -0
- package/dist/components/facet-filters/filters-panel.js +59 -0
- package/dist/components/facet-filters/filters-pill.js +40 -0
- package/dist/components/facet-filters/index.d.ts +104 -0
- package/dist/components/facet-filters/index.js +6 -0
- package/dist/components/facet-filters/use-filters-collapsed.js +21 -0
- package/dist/components/feature-grid/feature-grid.js +115 -0
- package/dist/components/feature-grid/index.d.ts +53 -0
- package/dist/components/feature-grid/index.js +2 -0
- package/dist/components/file-input/file-input.js +9 -3
- package/dist/components/file-input/index.d.ts +78 -0
- package/dist/components/file-input/index.js +2 -0
- package/dist/components/file-upload/file-upload.js +10 -5
- package/dist/components/file-upload/index.d.ts +38 -0
- package/dist/components/file-upload/index.js +2 -0
- package/dist/components/filters-bar/filters-bar.js +5 -1
- package/dist/components/filters-bar/index.d.ts +26 -0
- package/dist/components/filters-bar/index.js +2 -0
- package/dist/components/flip-card/flip-card.js +147 -0
- package/dist/components/flip-card/index.d.ts +43 -0
- package/dist/components/flip-card/index.js +2 -0
- package/dist/components/floating-window/_hooks/use-drag-move.js +76 -0
- package/dist/components/floating-window/floating-window.js +97 -0
- package/dist/components/floating-window/index.d.ts +45 -0
- package/dist/components/floating-window/index.js +2 -0
- package/dist/components/form/index.d.ts +28 -0
- package/dist/components/form/index.js +2 -0
- package/dist/components/fullscreen-dialog/fullscreen-dialog.js +6 -2
- package/dist/components/fullscreen-dialog/index.d.ts +38 -0
- package/dist/components/fullscreen-dialog/index.js +2 -0
- package/dist/components/horizontal-stepper/horizontal-stepper.js +122 -0
- package/dist/components/horizontal-stepper/index.d.ts +70 -0
- package/dist/components/horizontal-stepper/index.js +2 -0
- package/dist/components/icon-avatar/index.d.ts +9 -0
- package/dist/components/icon-avatar/index.js +2 -0
- package/dist/components/icon-text-action-card/icon-text-action-card.js +9 -5
- package/dist/components/icon-text-action-card/index.d.ts +11 -0
- package/dist/components/icon-text-action-card/index.js +2 -0
- package/dist/components/identicon/identicon.js +33 -0
- package/dist/components/identicon/index.d.ts +26 -0
- package/dist/components/identicon/index.js +2 -0
- package/dist/components/illustration/index.d.ts +37 -0
- package/dist/components/illustration/index.js +3 -0
- package/dist/components/index.d.ts +177 -19529
- package/dist/components/index.js +61 -10
- package/dist/components/input/index.d.ts +15 -0
- package/dist/components/input/index.js +3 -0
- package/dist/components/input-group/index.d.ts +35 -0
- package/dist/components/input-group/index.js +2 -0
- package/dist/components/input-group/input-group.js +41 -0
- package/dist/components/input-otp/index.d.ts +63 -0
- package/dist/components/input-otp/index.js +2 -0
- package/dist/components/key-value-manager/index.d.ts +63 -0
- package/dist/components/key-value-manager/index.js +2 -0
- package/dist/components/key-value-manager/key-value-manager-table.js +7 -5
- package/dist/components/label/index.d.ts +8 -0
- package/dist/components/label/index.js +2 -0
- package/dist/components/link/index.d.ts +33 -0
- package/dist/components/link/index.js +2 -0
- package/dist/components/list/index.d.ts +9 -0
- package/dist/components/list/index.js +3 -0
- package/dist/components/list/list-item.utils.js +1 -1
- package/dist/components/list/list.js +3 -1
- package/dist/components/list-details/index.d.ts +51 -0
- package/dist/components/list-details/index.js +2 -0
- package/dist/components/list-details/list-details.js +5 -2
- package/dist/components/lottie-animation-container/index.d.ts +10 -0
- package/dist/components/lottie-animation-container/index.js +2 -0
- package/dist/components/lottie-animation-container/lottie-animation-container.js +22 -3
- package/dist/components/lottie-animations/index.d.ts +8 -0
- package/dist/components/lottie-animations/index.js +2 -0
- package/dist/components/markdown-content/index.d.ts +32 -0
- package/dist/components/markdown-content/index.js +2 -0
- package/dist/components/media-card/index.d.ts +125 -0
- package/dist/components/media-card/index.js +4 -0
- package/dist/components/media-card/media-card-image.js +59 -0
- package/dist/components/media-card/media-card-reveal.js +76 -0
- package/dist/components/media-card/media-card.classes.js +37 -0
- package/dist/components/media-card/media-card.js +91 -0
- package/dist/components/media-stage/index.d.ts +41 -0
- package/dist/components/media-stage/index.js +2 -0
- package/dist/components/media-stage/media-stage.js +48 -0
- package/dist/components/menu/index.d.ts +14 -0
- package/dist/components/menu/index.js +2 -0
- package/dist/components/message-scroller/_hooks/use-follow-bottom.js +85 -0
- package/dist/components/message-scroller/index.d.ts +29 -0
- package/dist/components/message-scroller/index.js +2 -0
- package/dist/components/message-scroller/message-scroller.js +65 -0
- package/dist/components/mini-bar-chart/index.d.ts +40 -0
- package/dist/components/mini-bar-chart/index.js +2 -0
- package/dist/components/mini-bar-chart/mini-bar-chart.js +93 -0
- package/dist/components/monospace-content/index.d.ts +43 -0
- package/dist/components/monospace-content/index.js +2 -0
- package/dist/components/monospace-content/monospace-content.js +1 -1
- package/dist/components/nav-bar/index.d.ts +148 -0
- package/dist/components/nav-bar/index.js +2 -0
- package/dist/components/nav-bar/nav-bar-details-panel.js +158 -44
- package/dist/components/nav-bar/nav-bar-mobile-menu.js +93 -27
- package/dist/components/nav-bar/nav-bar.js +256 -138
- package/dist/components/nav-bar/use-nav-bar-hover-details.js +80 -0
- package/dist/components/nav-bar/use-nav-bar-overflow.js +5 -5
- package/dist/components/notice-strip/index.d.ts +32 -0
- package/dist/components/notice-strip/index.js +2 -0
- package/dist/components/notice-strip/notice-strip.js +57 -0
- package/dist/components/option-card-group/index.d.ts +50 -0
- package/dist/components/option-card-group/index.js +2 -0
- package/dist/components/option-card-group/option-card-group.js +76 -0
- package/dist/components/overflow-badge-list/index.d.ts +63 -0
- package/dist/components/overflow-badge-list/index.js +2 -0
- package/dist/components/overflow-badge-list/overflow-badge-list.js +78 -19
- package/dist/components/page-banner/index.d.ts +33 -0
- package/dist/components/page-banner/index.js +2 -0
- package/dist/components/page-banner/page-banner.js +56 -0
- package/dist/components/page-container/index.d.ts +20 -0
- package/dist/components/page-container/index.js +3 -0
- package/dist/components/page-container/page-container.js +5 -5
- package/dist/components/pagination/index.d.ts +31 -0
- package/dist/components/pagination/index.js +3 -0
- package/dist/components/popover/index.d.ts +60 -0
- package/dist/components/popover/index.js +3 -0
- package/dist/components/preview-card/index.d.ts +24 -0
- package/dist/components/preview-card/index.js +2 -0
- package/dist/components/progress-bar/index.d.ts +32 -0
- package/dist/components/progress-bar/index.js +2 -0
- package/dist/components/progress-bar/progress-bar.js +22 -6
- package/dist/components/radio-group/index.d.ts +24 -0
- package/dist/components/radio-group/index.js +2 -0
- package/dist/components/rank-numeral/index.d.ts +30 -0
- package/dist/components/rank-numeral/index.js +2 -0
- package/dist/components/rank-numeral/rank-numeral.js +26 -0
- package/dist/components/reaction-button/index.d.ts +32 -0
- package/dist/components/reaction-button/index.js +2 -0
- package/dist/components/reaction-button/reaction-button.js +50 -0
- package/dist/components/readout/index.d.ts +31 -0
- package/dist/components/readout/index.js +2 -0
- package/dist/components/readout/readout.js +63 -0
- package/dist/components/requirement-list/index.d.ts +52 -0
- package/dist/components/requirement-list/index.js +2 -0
- package/dist/components/requirement-list/requirement-list.js +29 -8
- package/dist/components/resizable/index.d.ts +31 -0
- package/dist/components/resizable/index.js +4 -0
- package/dist/components/resizable/resizable-group.js +23 -0
- package/dist/components/resizable/resizable-panel.js +28 -0
- package/dist/components/resizable/resizable-separator.js +24 -0
- package/dist/components/reveal/index.d.ts +23 -0
- package/dist/components/reveal/index.js +2 -0
- package/dist/components/reveal/reveal.js +24 -0
- package/dist/components/scroll-area/index.d.ts +27 -0
- package/dist/components/scroll-area/index.js +2 -0
- package/dist/components/scrollable-sections/index.d.ts +58 -0
- package/dist/components/scrollable-sections/index.js +2 -0
- package/dist/components/scrollable-sections/scrollable-sections.js +11 -3
- package/dist/components/search-box/index.d.ts +32 -0
- package/dist/components/search-box/index.js +2 -0
- package/dist/components/search-box/search-box.js +18 -3
- package/dist/components/search-field-shell.js +1 -1
- package/dist/components/select/index.d.ts +44 -0
- package/dist/components/select/index.js +2 -0
- package/dist/components/selectable-card-list/checkbox-card-list.js +5 -3
- package/dist/components/selectable-card-list/index.d.ts +76 -0
- package/dist/components/selectable-card-list/index.js +2 -0
- package/dist/components/selectable-card-list/radio-card-list.js +12 -6
- package/dist/components/selectable-card-list/selectable-card-list-shared.js +24 -12
- package/dist/components/selectable-card-list/selectable-card-list.js +12 -3
- package/dist/components/separator/index.d.ts +24 -0
- package/dist/components/separator/index.js +2 -0
- package/dist/components/share-menu/index.d.ts +55 -0
- package/dist/components/share-menu/index.js +2 -0
- package/dist/components/share-menu/share-marks.js +31 -0
- package/dist/components/share-menu/share-menu.js +140 -0
- package/dist/components/share-menu/share-urls.js +15 -0
- package/dist/components/sheet/index.d.ts +41 -0
- package/dist/components/sheet/index.js +2 -0
- package/dist/components/showcase-card/index.d.ts +53 -0
- package/dist/components/showcase-card/index.js +2 -0
- package/dist/components/showcase-card/showcase-card.js +75 -0
- package/dist/components/sidebar/index.d.ts +109 -0
- package/dist/components/sidebar/index.js +4 -0
- package/dist/components/sidebar/sidebar.js +56 -40
- package/dist/components/simple-clickable-card/index.d.ts +11 -0
- package/dist/components/simple-clickable-card/index.js +2 -0
- package/dist/components/simple-clickable-card/simple-clickable-card-shared.js +2 -2
- package/dist/components/simple-clickable-card/simple-clickable-card.js +5 -2
- package/dist/components/simple-info-card/index.d.ts +25 -0
- package/dist/components/simple-info-card/index.js +2 -0
- package/dist/components/simple-info-card/simple-info-card.js +6 -3
- package/dist/components/simple-list/index.d.ts +63 -0
- package/dist/components/simple-list/index.js +2 -0
- package/dist/components/simple-list/simple-list.js +3 -1
- package/dist/components/simple-paginated-list/index.d.ts +20 -0
- package/dist/components/simple-paginated-list/index.js +2 -0
- package/dist/components/simplified-date/index.d.ts +18 -0
- package/dist/components/simplified-date/index.js +2 -0
- package/dist/components/skeleton/index.d.ts +5 -0
- package/dist/components/skeleton/index.js +2 -0
- package/dist/components/skeletons/index.d.ts +11 -0
- package/dist/components/skeletons/index.js +2 -0
- package/dist/components/sort-menu/index.d.ts +34 -0
- package/dist/components/sort-menu/index.js +2 -0
- package/dist/components/sort-menu/sort-menu.js +39 -0
- package/dist/components/spinner/index.d.ts +15 -0
- package/dist/components/spinner/index.js +2 -0
- package/dist/components/stat-card/index.d.ts +43 -0
- package/dist/components/stat-card/index.js +2 -0
- package/dist/components/stat-card/stat-card.js +31 -12
- package/dist/components/status-badge/index.d.ts +24 -0
- package/dist/components/status-badge/index.js +2 -0
- package/dist/components/status-badge/status-badge.js +3 -2
- package/dist/components/status-card-list/index.d.ts +24 -0
- package/dist/components/status-card-list/index.js +2 -0
- package/dist/components/status-card-list/status-card-list.js +8 -4
- package/dist/components/step-tabs/index.d.ts +94 -0
- package/dist/components/step-tabs/index.js +2 -0
- package/dist/components/step-tabs/step-tabs.js +202 -0
- package/dist/components/style-scope/index.d.ts +32 -0
- package/dist/components/style-scope/index.js +2 -0
- package/dist/components/style-scope/style-scope.js +49 -0
- package/dist/components/switch/index.d.ts +15 -0
- package/dist/components/switch/index.js +2 -0
- package/dist/components/table/index.d.ts +18 -0
- package/dist/components/table/index.js +2 -0
- package/dist/components/tabs/index.d.ts +103 -0
- package/dist/components/tabs/index.js +2 -0
- package/dist/components/tag/index.d.ts +31 -0
- package/dist/components/tag/index.js +2 -0
- package/dist/components/tag/tag.js +79 -28
- package/dist/components/tag-input/index.d.ts +36 -0
- package/dist/components/tag-input/index.js +2 -0
- package/dist/components/tag-input/tag-input.js +10 -4
- package/dist/components/text-effects/index.d.ts +53 -0
- package/dist/components/text-effects/index.js +6 -0
- package/dist/components/textarea/index.d.ts +16 -0
- package/dist/components/textarea/index.js +2 -0
- package/dist/components/thumbnail-strip/index.d.ts +42 -0
- package/dist/components/thumbnail-strip/index.js +2 -0
- package/dist/components/thumbnail-strip/thumbnail-strip.js +124 -0
- package/dist/components/thumbnail-strip/use-scroll-edges.js +41 -0
- package/dist/components/time-picker/index.d.ts +13 -0
- package/dist/components/time-picker/index.js +2 -0
- package/dist/components/timeline/index.d.ts +39 -0
- package/dist/components/timeline/index.js +2 -0
- package/dist/components/timeline/timeline.js +85 -0
- package/dist/components/toast/index.d.ts +56 -0
- package/dist/components/toast/index.js +2 -0
- package/dist/components/toast/toast.js +42 -32
- package/dist/components/togglable-items-list/index.d.ts +28 -0
- package/dist/components/togglable-items-list/index.js +2 -0
- package/dist/components/toggle-group/index.d.ts +35 -0
- package/dist/components/toggle-group/index.js +2 -0
- package/dist/components/toolbar/index.d.ts +58 -0
- package/dist/components/toolbar/index.js +3 -0
- package/dist/components/toolbar/toolbar-button.js +40 -0
- package/dist/components/toolbar/toolbar.js +56 -0
- package/dist/components/tooltip/index.d.ts +29 -0
- package/dist/components/tooltip/index.js +3 -0
- package/dist/components/tooltip/tooltip.js +12 -2
- package/dist/components/transfer-list/index.d.ts +36 -0
- package/dist/components/transfer-list/index.js +2 -0
- package/dist/components/transfer-list/transfer-list.js +1 -1
- package/dist/components/truncated-line-with-tooltip/index.d.ts +22 -0
- package/dist/components/truncated-line-with-tooltip/index.js +2 -0
- package/dist/components/truncated-line-with-tooltip/truncated-line-with-tooltip.js +26 -8
- package/dist/components/typography/index.d.ts +19 -0
- package/dist/components/typography/index.js +3 -0
- package/dist/components/use-mobile/index.d.ts +3 -0
- package/dist/components/use-mobile/index.js +2 -0
- package/dist/components/user-type-badge/index.d.ts +39 -0
- package/dist/components/user-type-badge/index.js +3 -0
- package/dist/components/user-type-badge/user-type-badge.js +2 -1
- package/dist/components/vertical-stepper/index.d.ts +7 -0
- package/dist/components/vertical-stepper/index.js +2 -0
- package/dist/components/vertical-stepper/vertical-stepper.js +33 -6
- package/dist/components/view-toggle/index.d.ts +38 -0
- package/dist/components/view-toggle/index.js +2 -0
- package/dist/components/view-toggle/view-toggle.js +56 -0
- package/dist/core/animate-ui/components/animate/code.js +83 -9
- package/dist/core/animate-ui/components/animate/tabs.js +234 -19
- package/dist/core/animate-ui/components/animate/tooltip.js +10 -2
- package/dist/core/animate-ui/components/base/preview-card.js +20 -3
- package/dist/core/animate-ui/components/buttons/copy.js +12 -6
- package/dist/core/animate-ui/components/radix/dialog.js +17 -3
- package/dist/core/animate-ui/components/radix/dropdown-menu.js +26 -9
- package/dist/core/animate-ui/components/radix/sheet.js +20 -4
- package/dist/core/animate-ui/components/radix/sidebar.js +9 -9
- package/dist/core/animate-ui/components/radix/toggle-group.js +103 -13
- package/dist/core/animate-ui/components/radix/toggle.js +5 -5
- package/dist/core/animate-ui/primitives/animate/code-block.js +31 -4
- package/dist/core/animate-ui/primitives/animate/shiki-highlighter.js +5 -2
- package/dist/core/animate-ui/primitives/animate/tabs.js +7 -4
- package/dist/core/animate-ui/primitives/animate/tooltip.js +10 -3
- package/dist/core/animate-ui/primitives/base/preview-card.js +2 -2
- package/dist/core/animate-ui/primitives/base/progress.js +1 -1
- package/dist/core/animate-ui/primitives/base/radio.js +3 -3
- package/dist/core/animate-ui/primitives/effects/highlight.js +1 -0
- package/dist/core/animate-ui/primitives/radix/accordion.js +1 -1
- package/dist/core/animate-ui/primitives/radix/dialog.js +6 -3
- package/dist/core/animate-ui/primitives/radix/dropdown-menu.js +2 -2
- package/dist/core/animate-ui/primitives/radix/sheet.js +7 -3
- package/dist/core/animate-ui/primitives/radix/switch.js +2 -2
- package/dist/core/animate-ui/primitives/radix/toggle-group.js +2 -2
- package/dist/core/badge.js +5 -2
- package/dist/core/breadcrumb.js +1 -1
- package/dist/core/button/button.js +8 -8
- package/dist/core/button/craft-button.js +8 -2
- package/dist/core/button.js +17 -7
- package/dist/core/card.js +23 -5
- package/dist/core/combobox/combobox.js +8 -2
- package/dist/core/command.js +3 -3
- package/dist/core/form.js +1 -1
- package/dist/core/hooks/use-nested-layer-press-guard.js +46 -0
- package/dist/core/hooks/use-on-screen.js +33 -0
- package/dist/core/hooks/use-prefers-reduced-motion.js +19 -0
- package/dist/core/hooks/use-scroll-overflow.js +20 -0
- package/dist/core/index.d.ts +30 -5
- package/dist/core/index.js +5 -2
- package/dist/core/input/input-password.js +13 -9
- package/dist/core/input/input.js +38 -12
- package/dist/core/input-otp/input-otp.js +9 -5
- package/dist/core/popover-group.js +48 -0
- package/dist/core/popover-hover.js +127 -0
- package/dist/core/popover.js +75 -6
- package/dist/core/select.js +35 -20
- package/dist/core/table.js +5 -3
- package/dist/core/textarea/textarea.js +11 -3
- package/dist/data-table/index.d.ts +4 -0
- package/dist/data-table/index.js +3 -0
- package/dist/date/index.d.ts +11 -0
- package/dist/date/index.js +7 -0
- package/dist/forms/index.d.ts +4 -0
- package/dist/forms/index.js +2 -0
- package/dist/icon-avatar.props-RYtw2eSW.d.ts +31 -0
- package/dist/icon-text-action-card.props-B2ggncUK.d.ts +53 -0
- package/dist/index.d.ts +169 -15
- package/dist/index.js +63 -10
- package/dist/input-CYI1hhGc.d.ts +38 -0
- package/dist/layouts/index.d.ts +132 -8
- package/dist/layouts/index.js +3 -1
- package/dist/layouts/minimal-workspace-layout/minimal-workspace-layout-context.js +5 -0
- package/dist/layouts/minimal-workspace-layout/minimal-workspace-layout.js +404 -0
- package/dist/layouts/minimal-workspace-layout/rail-logo.js +90 -0
- package/dist/layouts/minimal-workspace-layout/sidebar-trigger.js +42 -0
- package/dist/layouts/shared/account-menu-props.js +21 -0
- package/dist/layouts/shared/footer-branding.js +34 -0
- package/dist/layouts/shared/sidebar-logo.js +59 -0
- package/dist/layouts/workspace-layout/account-menu/account-menu.js +9 -3
- package/dist/layouts/workspace-layout/footer/footer.js +1 -1
- package/dist/layouts/workspace-layout/header/header.js +1 -1
- package/dist/layouts/workspace-layout/workspace-layout.js +28 -80
- package/dist/{list.props-x1j3CbcF.d.ts → list.props-DP_xPTqU.d.ts} +2 -1
- package/dist/markdown/index.d.ts +11 -0
- package/dist/markdown/index.js +5 -0
- package/dist/my-account-menu.props-C7DK71WC.d.ts +67 -0
- package/dist/page-container.props-JutTvKFq.d.ts +48 -0
- package/dist/resizable.props-RxFY5tm_.d.ts +44 -0
- package/dist/section-card-B7c5uc08.d.ts +84 -0
- package/dist/simple-clickable-card.props-BrPCw7CR.d.ts +51 -0
- package/dist/slot-DGErA9zi.d.ts +10 -0
- package/dist/status-badge.props-lKlEOfRt.d.ts +32 -0
- package/dist/style-axes-DSQ2DGc5.d.ts +133 -0
- package/dist/toast/index.d.ts +6 -0
- package/dist/toast/index.js +2 -0
- package/dist/tooltip-C0bYa8a3.d.ts +37 -0
- package/dist/{types-DtUxK-Am.d.ts → types-CkXflqg7.d.ts} +31 -1
- package/dist/utils/cn.js +6 -1
- package/dist/utils/color.js +35 -10
- package/dist/utils/index.d.ts +18 -2
- package/dist/utils/index.js +4 -1
- package/dist/utils/silver-shine.js +16 -1
- package/dist/utils/style-axes.js +227 -0
- package/dist/utils/variant.js +104 -8
- package/dist/utils/view-transition.js +21 -0
- package/dist/variant-D81RhpbR.d.ts +104 -0
- package/dist/vertical-stepper.props-BXYcbW70.d.ts +29 -0
- package/package.json +52 -6
- package/src/styles/colors.css +100 -4
- package/src/styles/globals.css +8 -131
- package/src/styles/style-axes.css +21 -0
- package/src/styles/theme.css +696 -0
- package/dist/app-logo.props-Ct7QBdTd.d.ts +0 -40
- package/dist/popover-ByLD3-Qv.d.ts +0 -204
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../utils/cn.js";
|
|
3
|
+
import { Button } from "../button/button.js";
|
|
4
|
+
import { usePrefersReducedMotion } from "../../core/hooks/use-prefers-reduced-motion.js";
|
|
5
|
+
import { useOnScreen } from "../../core/hooks/use-on-screen.js";
|
|
6
|
+
import { VISIBLE_REACH, poseFor } from "./_constants/coverflow-poses.js";
|
|
7
|
+
import { COVERFLOW_SHAPES } from "./_constants/coverflow-shapes.js";
|
|
8
|
+
import { ringOffset } from "./_utils/ring.js";
|
|
9
|
+
import { useCoverflow } from "./_hooks/use-coverflow.js";
|
|
10
|
+
import * as React$1 from "react";
|
|
11
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
+
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
13
|
+
//#region src/components/coverflow/coverflow.tsx
|
|
14
|
+
var DELAY_MIN = 1e3;
|
|
15
|
+
var DELAY_MAX = 1e4;
|
|
16
|
+
var DELAY_DEFAULT = 5e3;
|
|
17
|
+
function clamp(value, min, max, fallback) {
|
|
18
|
+
if (!Number.isFinite(value)) return fallback;
|
|
19
|
+
return Math.min(max, Math.max(min, Math.floor(value)));
|
|
20
|
+
}
|
|
21
|
+
var DEFAULT_LABELS = {
|
|
22
|
+
carousel: "Carousel",
|
|
23
|
+
previous: "Previous",
|
|
24
|
+
next: "Next",
|
|
25
|
+
pick: "Choose an item",
|
|
26
|
+
show: (name) => `Show ${name}`,
|
|
27
|
+
open: (name) => `Open ${name}`
|
|
28
|
+
};
|
|
29
|
+
/** The default face: the item's image, or the fallback when there is none or it fails to load. */
|
|
30
|
+
function ImageFace({ item, state, variant, fallback }) {
|
|
31
|
+
const [failed, setFailed] = React$1.useState(false);
|
|
32
|
+
if (!item.image || failed) return /* @__PURE__ */ jsx(Fragment$1, { children: fallback ?? /* @__PURE__ */ jsx("div", { className: "h-full w-full rounded-2xl bg-muted" }) });
|
|
33
|
+
return /* @__PURE__ */ jsx("img", {
|
|
34
|
+
src: item.image,
|
|
35
|
+
alt: item.imageAlt ?? "",
|
|
36
|
+
draggable: false,
|
|
37
|
+
loading: state.visible ? "eager" : "lazy",
|
|
38
|
+
onError: () => setFailed(true),
|
|
39
|
+
className: cn("h-full w-full", variant === "cutout" ? "object-contain drop-shadow-2xl" : "rounded-2xl border border-border bg-muted object-cover shadow-2xl")
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
/** One card, posed by its distance from the front, standing on its own reflection. */
|
|
43
|
+
function Card({ item, offset, front, props, onPick }) {
|
|
44
|
+
const { aspect = "landscape", variant = "card", reflection = true, renderFace, imageFallback, onOpen, openCursor = "zoom-in", labels } = props;
|
|
45
|
+
const shape = COVERFLOW_SHAPES[aspect];
|
|
46
|
+
const state = {
|
|
47
|
+
offset,
|
|
48
|
+
visible: Math.abs(offset) <= VISIBLE_REACH
|
|
49
|
+
};
|
|
50
|
+
const face = () => renderFace ? renderFace(item, state) : /* @__PURE__ */ jsx(ImageFace, {
|
|
51
|
+
item,
|
|
52
|
+
state,
|
|
53
|
+
variant,
|
|
54
|
+
fallback: imageFallback
|
|
55
|
+
});
|
|
56
|
+
const faceClass = cn("relative block w-full rounded-2xl", shape.face);
|
|
57
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
58
|
+
"data-slot": "coverflow-card",
|
|
59
|
+
className: cn("absolute inset-x-0 top-0 mx-auto transition-all duration-700 ease-out transform-3d motion-reduce:transition-none", shape.card, poseFor(offset)),
|
|
60
|
+
"aria-hidden": front ? void 0 : true,
|
|
61
|
+
children: [front && !onOpen ? /* @__PURE__ */ jsx("div", {
|
|
62
|
+
className: faceClass,
|
|
63
|
+
children: face()
|
|
64
|
+
}) : /* @__PURE__ */ jsx("button", {
|
|
65
|
+
type: "button",
|
|
66
|
+
tabIndex: front ? 0 : -1,
|
|
67
|
+
"aria-label": front ? (labels?.open ?? DEFAULT_LABELS.open)(item.name) : void 0,
|
|
68
|
+
onClick: () => onPick(offset),
|
|
69
|
+
className: cn(faceClass, "outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background", front && openCursor === "zoom-in" ? "cursor-zoom-in" : "cursor-pointer"),
|
|
70
|
+
children: face()
|
|
71
|
+
}), reflection && /* @__PURE__ */ jsx("div", {
|
|
72
|
+
"aria-hidden": true,
|
|
73
|
+
"data-slot": "coverflow-reflection",
|
|
74
|
+
className: cn("relative mt-px w-full overflow-hidden opacity-50 mask-b-from-0% mask-b-to-90%", shape.reflection),
|
|
75
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
76
|
+
className: cn("w-full -scale-y-100", shape.face),
|
|
77
|
+
children: face()
|
|
78
|
+
})
|
|
79
|
+
})]
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
function Arrows({ labels, onPrevious, onNext }) {
|
|
83
|
+
const arrow = "absolute top-1/3 z-40 rounded-full bg-background";
|
|
84
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Button, {
|
|
85
|
+
variant: "outline",
|
|
86
|
+
size: "icon",
|
|
87
|
+
fullWidth: false,
|
|
88
|
+
className: cn(arrow, "left-0"),
|
|
89
|
+
"aria-label": labels?.previous ?? DEFAULT_LABELS.previous,
|
|
90
|
+
startIcon: /* @__PURE__ */ jsx(ChevronLeft, { "aria-hidden": true }),
|
|
91
|
+
onClick: onPrevious
|
|
92
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
93
|
+
variant: "outline",
|
|
94
|
+
size: "icon",
|
|
95
|
+
fullWidth: false,
|
|
96
|
+
className: cn(arrow, "right-0"),
|
|
97
|
+
"aria-label": labels?.next ?? DEFAULT_LABELS.next,
|
|
98
|
+
startIcon: /* @__PURE__ */ jsx(ChevronRight, { "aria-hidden": true }),
|
|
99
|
+
onClick: onNext
|
|
100
|
+
})] });
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* A 3D coverflow seen from inside a ring of cards: the front card facing you,
|
|
104
|
+
* the others turned toward you on either side, all standing on a glass floor,
|
|
105
|
+
* with the front item's caption beneath. It never ends — both sides always
|
|
106
|
+
* show cards, and it turns round from the last item to the first.
|
|
107
|
+
*
|
|
108
|
+
* Arrows, the arrow keys, a swipe, a dot or a click on a side card brings a
|
|
109
|
+
* card round; choosing the front card calls `onOpen`. With `autoplay` it turns
|
|
110
|
+
* by itself, except under reduced motion, off screen, or while in use.
|
|
111
|
+
*
|
|
112
|
+
* It draws no background: the reflections need a dark floor, so put it on one
|
|
113
|
+
* (a `.dark` scope with `bg-background`, for instance).
|
|
114
|
+
*/
|
|
115
|
+
function Coverflow(props) {
|
|
116
|
+
const { items, index, defaultIndex, onIndexChange, autoplay = false, delay = DELAY_DEFAULT, showArrows = true, showDots = true, onOpen, labels, "aria-labelledby": labelledBy, className } = props;
|
|
117
|
+
const root = React$1.useRef(null);
|
|
118
|
+
const reducedMotion = usePrefersReducedMotion();
|
|
119
|
+
const onScreen = useOnScreen(root);
|
|
120
|
+
const count = items.length;
|
|
121
|
+
const flow = useCoverflow({
|
|
122
|
+
count,
|
|
123
|
+
index,
|
|
124
|
+
defaultIndex,
|
|
125
|
+
onIndexChange: onIndexChange && ((next) => onIndexChange(next, items[next])),
|
|
126
|
+
autoplayMs: autoplay && onScreen && !reducedMotion ? clamp(delay, DELAY_MIN, DELAY_MAX, DELAY_DEFAULT) : null
|
|
127
|
+
});
|
|
128
|
+
const front = items[flow.index];
|
|
129
|
+
function pick(offset) {
|
|
130
|
+
if (flow.wasSwipe()) return;
|
|
131
|
+
if (offset === 0) {
|
|
132
|
+
if (front) onOpen?.(front);
|
|
133
|
+
} else flow.turn(offset);
|
|
134
|
+
}
|
|
135
|
+
if (!front) return null;
|
|
136
|
+
const many = count > 1;
|
|
137
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
138
|
+
ref: root,
|
|
139
|
+
"data-slot": "coverflow",
|
|
140
|
+
role: "region",
|
|
141
|
+
"aria-roledescription": "carousel",
|
|
142
|
+
"aria-labelledby": labelledBy,
|
|
143
|
+
"aria-label": labelledBy ? void 0 : labels?.carousel ?? DEFAULT_LABELS.carousel,
|
|
144
|
+
className: cn("flex flex-col gap-6", className),
|
|
145
|
+
onKeyDown: many ? flow.onKeyDown : void 0,
|
|
146
|
+
onMouseEnter: () => flow.hold(true),
|
|
147
|
+
onMouseLeave: () => flow.hold(false),
|
|
148
|
+
onFocus: () => flow.hold(true),
|
|
149
|
+
onBlur: (event) => {
|
|
150
|
+
if (!event.currentTarget.contains(event.relatedTarget)) flow.hold(false);
|
|
151
|
+
},
|
|
152
|
+
children: [
|
|
153
|
+
/* @__PURE__ */ jsxs("div", {
|
|
154
|
+
"data-slot": "coverflow-stage",
|
|
155
|
+
className: cn("relative touch-pan-y select-none perspective-distant", COVERFLOW_SHAPES[props.aspect ?? "landscape"].stage),
|
|
156
|
+
onPointerDown: many ? flow.onPointerDown : void 0,
|
|
157
|
+
onPointerUp: many ? flow.onPointerUp : void 0,
|
|
158
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
159
|
+
className: "relative h-full transform-3d",
|
|
160
|
+
children: Array.from({ length: flow.slots }, (_, slot) => {
|
|
161
|
+
const item = items[slot % count];
|
|
162
|
+
const offset = ringOffset(slot, flow.slot, flow.slots);
|
|
163
|
+
return /* @__PURE__ */ jsx(Card, {
|
|
164
|
+
item,
|
|
165
|
+
offset,
|
|
166
|
+
front: offset === 0,
|
|
167
|
+
props,
|
|
168
|
+
onPick: pick
|
|
169
|
+
}, `${item.id}:${Math.floor(slot / count)}`);
|
|
170
|
+
})
|
|
171
|
+
}), many && showArrows && /* @__PURE__ */ jsx(Arrows, {
|
|
172
|
+
labels,
|
|
173
|
+
onPrevious: () => flow.turn(-1),
|
|
174
|
+
onNext: () => flow.turn(1)
|
|
175
|
+
})]
|
|
176
|
+
}),
|
|
177
|
+
/* @__PURE__ */ jsx("div", {
|
|
178
|
+
"aria-live": "polite",
|
|
179
|
+
"data-slot": "coverflow-caption",
|
|
180
|
+
children: front.caption
|
|
181
|
+
}),
|
|
182
|
+
many && showDots && /* @__PURE__ */ jsx("div", {
|
|
183
|
+
role: "group",
|
|
184
|
+
"aria-label": labels?.pick ?? DEFAULT_LABELS.pick,
|
|
185
|
+
className: "flex justify-center gap-2",
|
|
186
|
+
children: items.map((item, i) => /* @__PURE__ */ jsx("button", {
|
|
187
|
+
type: "button",
|
|
188
|
+
"aria-label": (labels?.show ?? DEFAULT_LABELS.show)(item.name),
|
|
189
|
+
"aria-current": i === flow.index ? true : void 0,
|
|
190
|
+
onClick: () => flow.show(i),
|
|
191
|
+
className: cn("h-2 rounded-full transition-all duration-300 motion-reduce:transition-none", i === flow.index ? "w-6 bg-primary" : "w-2 bg-border hover:bg-foreground-secondary")
|
|
192
|
+
}, item.id))
|
|
193
|
+
})
|
|
194
|
+
]
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
//#endregion
|
|
198
|
+
export { Coverflow };
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
interface CoverflowItem {
|
|
5
|
+
/** Stable key; also what `onOpen` and `onIndexChange` report. */
|
|
6
|
+
id: string;
|
|
7
|
+
/** The accessible name: dots ("Show …") and the front card ("Open …") use it. */
|
|
8
|
+
name: string;
|
|
9
|
+
/** The picture on the card. Optional only when `renderFace` draws the face. */
|
|
10
|
+
image?: string;
|
|
11
|
+
/** Alt text. Default "" — the name is already on the card's button and in the caption. */
|
|
12
|
+
imageAlt?: string;
|
|
13
|
+
/** Shown under the stage while this item is in front: a title, a blurb, actions. */
|
|
14
|
+
caption?: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
/** Accessible names. Pass translated strings; English is the fallback (same convention as `CarouselLabels`). */
|
|
17
|
+
interface CoverflowLabels {
|
|
18
|
+
/** Names the region when there is no visible heading (`aria-labelledby`). Default "Carousel". */
|
|
19
|
+
carousel?: string;
|
|
20
|
+
/** The previous arrow. Default "Previous". */
|
|
21
|
+
previous?: string;
|
|
22
|
+
/** The next arrow. Default "Next". */
|
|
23
|
+
next?: string;
|
|
24
|
+
/** The dot row. Default "Choose an item". */
|
|
25
|
+
pick?: string;
|
|
26
|
+
/** One dot. Default `Show ${name}`. */
|
|
27
|
+
show?: (name: string) => string;
|
|
28
|
+
/** The front card, when `onOpen` is set. Default `Open ${name}`. */
|
|
29
|
+
open?: (name: string) => string;
|
|
30
|
+
}
|
|
31
|
+
/** The card's proportions; sets the card width per breakpoint, the reflection depth and the stage height together. */
|
|
32
|
+
type CoverflowAspect = 'square' | 'landscape';
|
|
33
|
+
/** How the image sits on the card. */
|
|
34
|
+
type CoverflowVariant = 'card' | 'cutout';
|
|
35
|
+
interface CoverflowFaceState {
|
|
36
|
+
/** Places from the front: 0 is the front, negative is left. */
|
|
37
|
+
offset: number;
|
|
38
|
+
/** Within the visible reach — the moment to load or render an expensive picture. */
|
|
39
|
+
visible: boolean;
|
|
40
|
+
}
|
|
41
|
+
interface CoverflowProps {
|
|
42
|
+
items: CoverflowItem[];
|
|
43
|
+
/** `square` (cut-out objects, 1:1) or `landscape` (photos, 4:3). Default `landscape`. */
|
|
44
|
+
aspect?: CoverflowAspect;
|
|
45
|
+
/**
|
|
46
|
+
* `card`: the image fills a rounded, bordered card with a shadow (`object-cover`) — photos.
|
|
47
|
+
* `cutout`: the image floats with no card behind it (`object-contain`, drop shadow) — transparent PNGs.
|
|
48
|
+
* Default `card`.
|
|
49
|
+
*/
|
|
50
|
+
variant?: CoverflowVariant;
|
|
51
|
+
/** Draw the glass reflection under each card. Default `true`. */
|
|
52
|
+
reflection?: boolean;
|
|
53
|
+
/** Called when the front card is chosen. Without it the front card is a picture, not a button. */
|
|
54
|
+
onOpen?: (item: CoverflowItem) => void;
|
|
55
|
+
/**
|
|
56
|
+
* The front card's cursor, saying what choosing it does: `zoom-in` (the
|
|
57
|
+
* default) for a picture opened larger, `pointer` for a card that leads
|
|
58
|
+
* somewhere — a project's own page. Only with `onOpen`.
|
|
59
|
+
*/
|
|
60
|
+
openCursor?: 'zoom-in' | 'pointer';
|
|
61
|
+
/** Controlled front item, by index into `items`. */
|
|
62
|
+
index?: number;
|
|
63
|
+
/** Uncontrolled starting item. Default 0. */
|
|
64
|
+
defaultIndex?: number;
|
|
65
|
+
/** The front item changed (any cause: arrows, keys, swipe, dots, autoplay). */
|
|
66
|
+
onIndexChange?: (index: number, item: CoverflowItem) => void;
|
|
67
|
+
/** Turn by itself. Never under reduced motion, off screen, in a hidden tab, or while the pointer or focus is inside. Default `false`, as in `Carousel`. */
|
|
68
|
+
autoplay?: boolean;
|
|
69
|
+
/** Milliseconds between turns. Clamped to `[1000, 10000]`. Default 5000. */
|
|
70
|
+
delay?: number;
|
|
71
|
+
/** Show the arrows. Default `true`. */
|
|
72
|
+
showArrows?: boolean;
|
|
73
|
+
/** Show the dot row. Default `true`. */
|
|
74
|
+
showDots?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Replaces the default face (the image) when the picture is not a plain URL: rendered on demand,
|
|
77
|
+
* animated, a component. Drawn TWICE (the card and its reflection), so it must be picture-only —
|
|
78
|
+
* nothing focusable, no ids.
|
|
79
|
+
*/
|
|
80
|
+
renderFace?: (item: CoverflowItem, state: CoverflowFaceState) => ReactNode;
|
|
81
|
+
/** Shown when `image` is missing or fails to load. Default: a `bg-muted` tile. */
|
|
82
|
+
imageFallback?: ReactNode;
|
|
83
|
+
labels?: CoverflowLabels;
|
|
84
|
+
/** Names the region by a visible heading instead of `labels.carousel`. */
|
|
85
|
+
'aria-labelledby'?: string;
|
|
86
|
+
/** Applied to the root. Background, spacing — never the stage's height (that comes from `aspect`). */
|
|
87
|
+
className?: string;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* A 3D coverflow seen from inside a ring of cards: the front card facing you,
|
|
92
|
+
* the others turned toward you on either side, all standing on a glass floor,
|
|
93
|
+
* with the front item's caption beneath. It never ends — both sides always
|
|
94
|
+
* show cards, and it turns round from the last item to the first.
|
|
95
|
+
*
|
|
96
|
+
* Arrows, the arrow keys, a swipe, a dot or a click on a side card brings a
|
|
97
|
+
* card round; choosing the front card calls `onOpen`. With `autoplay` it turns
|
|
98
|
+
* by itself, except under reduced motion, off screen, or while in use.
|
|
99
|
+
*
|
|
100
|
+
* It draws no background: the reflections need a dark floor, so put it on one
|
|
101
|
+
* (a `.dark` scope with `bg-background`, for instance).
|
|
102
|
+
*/
|
|
103
|
+
declare function Coverflow(props: CoverflowProps): React.JSX.Element | null;
|
|
104
|
+
|
|
105
|
+
export { Coverflow, type CoverflowAspect, type CoverflowFaceState, type CoverflowItem, type CoverflowLabels, type CoverflowProps, type CoverflowVariant };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { cn } from "../../utils/cn.js";
|
|
2
|
+
import { densityStyle, useStyleAxes } from "../../utils/style-axes.js";
|
|
2
3
|
import { useScrollOverflow } from "../../core/hooks/use-scroll-overflow.js";
|
|
3
4
|
import { Checkbox } from "../../core/checkbox/motion-checkbox.js";
|
|
4
5
|
import { Table } from "../../core/table.js";
|
|
@@ -15,7 +16,11 @@ import { Columns2 } from "lucide-react";
|
|
|
15
16
|
import { getCoreRowModel, getPaginationRowModel, useReactTable } from "@tanstack/react-table";
|
|
16
17
|
//#region src/components/data-table/data-table.tsx
|
|
17
18
|
var edgeShadowClass = "pointer-events-none absolute inset-y-0 z-[3] w-4 from-black/10 to-transparent opacity-0 transition-opacity dark:from-black/40";
|
|
18
|
-
function DataTable({ columns, data, tableActionsContent, isFetching, pageIndex = 0, hasNextPage = false, hasPrevPage = false, onNextPage, onPrevPage, pageSize = 5, onPageSizeChange, pageSizeOptions = DEFAULT_PAGE_SIZE_OPTIONS, showColumnVisibilitySelector = true, columnVisibilityLabel = "Columns", noResultsHeading = "No results", noResultsDescription = "No results found. Try adjusting your search or filter to find what you're looking for.", noResultsAction, noResultsIllustration, hideNoResultsIllustration, pageLabel, previousLabel = "Previous", nextLabel = "Next", pageSizeOptionLabel, onRowClick, showBorder = false, rowSelection, onRowSelectionChange, getRowId, enableMultiRowSelection = true, enableRowSelection = false, tableRowClassName, getRowClassName, className, hidePaginationControls = false }) {
|
|
19
|
+
function DataTable({ columns, data, tableActionsContent, isFetching, pageIndex = 0, hasNextPage = false, hasPrevPage = false, onNextPage, onPrevPage, pageSize = 5, onPageSizeChange, pageSizeOptions = DEFAULT_PAGE_SIZE_OPTIONS, showColumnVisibilitySelector = true, columnVisibilityLabel = "Columns", noResultsHeading = "No results", noResultsDescription = "No results found. Try adjusting your search or filter to find what you're looking for.", noResultsAction, noResultsIllustration, hideNoResultsIllustration, pageLabel, previousLabel = "Previous", nextLabel = "Next", pageSizeOptionLabel, onRowClick, showBorder = false, rowSelection, onRowSelectionChange, getRowId, enableMultiRowSelection = true, enableRowSelection = false, tableRowClassName, getRowClassName, className, hidePaginationControls = false, radius, border, density }) {
|
|
20
|
+
const { partStyle } = useStyleAxes({
|
|
21
|
+
radius,
|
|
22
|
+
border
|
|
23
|
+
}, ["radius", "border"]);
|
|
19
24
|
const [columnVisibility, setColumnVisibility] = useState(() => {
|
|
20
25
|
const initial = {};
|
|
21
26
|
for (const col of columns) {
|
|
@@ -105,6 +110,7 @@ function DataTable({ columns, data, tableActionsContent, isFetching, pageIndex =
|
|
|
105
110
|
return /* @__PURE__ */ jsxs("div", {
|
|
106
111
|
ref: rootRef,
|
|
107
112
|
className: cn("space-y-3", className),
|
|
113
|
+
style: densityStyle(density),
|
|
108
114
|
children: [
|
|
109
115
|
showToolbar && /* @__PURE__ */ jsxs("div", {
|
|
110
116
|
className: "flex flex-wrap items-center gap-3 data-table-toolbar",
|
|
@@ -129,7 +135,8 @@ function DataTable({ columns, data, tableActionsContent, isFetching, pageIndex =
|
|
|
129
135
|
/* @__PURE__ */ jsxs("div", {
|
|
130
136
|
"data-overflow-start": overflow.start || void 0,
|
|
131
137
|
"data-overflow-end": overflow.end || void 0,
|
|
132
|
-
|
|
138
|
+
style: partStyle,
|
|
139
|
+
className: cn("group/data-table relative overflow-hidden rounded-[var(--espd-own-radius,var(--espd-radius-surface,var(--radius-md)))] data-table-container", showToolbar && "mt-6", showBorder && "border-[length:var(--espd-own-border-width,var(--espd-border-width-surface,1px))] border-border/50"),
|
|
133
140
|
children: [
|
|
134
141
|
/* @__PURE__ */ jsxs(Table, {
|
|
135
142
|
ref: tableRef,
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { ColumnDef, RowSelectionState, OnChangeFn } from '@tanstack/react-table';
|
|
4
|
+
import { k as StyleAxisProps, d as DensityProps } from '../../style-axes-DSQ2DGc5.js';
|
|
5
|
+
|
|
6
|
+
/** Style axes: `radius`, and `border` (with `showBorder`). */
|
|
7
|
+
interface DataTableProps<TData, TValue> extends Pick<StyleAxisProps, "radius" | "border">, DensityProps {
|
|
8
|
+
/**
|
|
9
|
+
* Column definitions. Responsive behaviour is set per column through `meta`
|
|
10
|
+
* (see `DataTableColumnMeta`): `sticky` pins leading columns while the table
|
|
11
|
+
* scrolls horizontally, `wrap` lets long text wrap instead of staying on
|
|
12
|
+
* one line, and `hideBelow` hides lower-priority columns while the table is
|
|
13
|
+
* narrow.
|
|
14
|
+
*/
|
|
15
|
+
columns: ColumnDef<TData, TValue>[];
|
|
16
|
+
data: TData[];
|
|
17
|
+
tableActionsContent?: ReactNode;
|
|
18
|
+
isFetching?: boolean;
|
|
19
|
+
pageIndex?: number;
|
|
20
|
+
hasNextPage?: boolean;
|
|
21
|
+
hasPrevPage?: boolean;
|
|
22
|
+
onNextPage?: () => void;
|
|
23
|
+
onPrevPage?: () => void;
|
|
24
|
+
pageSize?: number;
|
|
25
|
+
onPageSizeChange?: (size: number) => void;
|
|
26
|
+
/**
|
|
27
|
+
* Page sizes offered in the page-size selector. Defaults to
|
|
28
|
+
* `DEFAULT_PAGE_SIZE_OPTIONS` (`[5, 10, 15, 20, 25]`); pass `[]` to hide the
|
|
29
|
+
* selector. The current `pageSize` is always selectable, even when absent from
|
|
30
|
+
* this list. The selector is also hidden when `onPageSizeChange` is omitted,
|
|
31
|
+
* since it would have no effect.
|
|
32
|
+
*/
|
|
33
|
+
pageSizeOptions?: readonly number[];
|
|
34
|
+
showColumnVisibilitySelector?: boolean;
|
|
35
|
+
columnVisibilityLabel?: string;
|
|
36
|
+
noResultsHeading?: string | ReactNode;
|
|
37
|
+
noResultsDescription?: string | ReactNode;
|
|
38
|
+
noResultsAction?: ReactNode;
|
|
39
|
+
noResultsIllustration?: ReactNode;
|
|
40
|
+
hideNoResultsIllustration?: boolean;
|
|
41
|
+
pageLabel?: string;
|
|
42
|
+
previousLabel?: string;
|
|
43
|
+
nextLabel?: string;
|
|
44
|
+
pageSizeOptionLabel?: (size: number) => string;
|
|
45
|
+
onRowClick?: (row: TData) => void;
|
|
46
|
+
showBorder?: boolean;
|
|
47
|
+
rowSelection?: RowSelectionState;
|
|
48
|
+
onRowSelectionChange?: OnChangeFn<RowSelectionState>;
|
|
49
|
+
getRowId?: (row: TData, index: number) => string;
|
|
50
|
+
enableMultiRowSelection?: boolean;
|
|
51
|
+
enableRowSelection?: boolean;
|
|
52
|
+
/** Extra class names on each `<TableRow>` (e.g. `group` for row-hover affordances). */
|
|
53
|
+
tableRowClassName?: string;
|
|
54
|
+
/** Compute per-row class names (e.g. highlight top rows). */
|
|
55
|
+
getRowClassName?: (row: TData, index: number) => string | undefined;
|
|
56
|
+
/** Extra class names for the outer DataTable wrapper. */
|
|
57
|
+
className?: string;
|
|
58
|
+
hidePaginationControls?: boolean;
|
|
59
|
+
}
|
|
60
|
+
declare function DataTable<TData, TValue>({ columns, data, tableActionsContent, isFetching, pageIndex, hasNextPage, hasPrevPage, onNextPage, onPrevPage, pageSize, onPageSizeChange, pageSizeOptions, showColumnVisibilitySelector, columnVisibilityLabel, noResultsHeading, noResultsDescription, noResultsAction, noResultsIllustration, hideNoResultsIllustration, pageLabel, previousLabel, nextLabel, pageSizeOptionLabel, onRowClick, showBorder, rowSelection, onRowSelectionChange, getRowId, enableMultiRowSelection, enableRowSelection, tableRowClassName, getRowClassName, className, hidePaginationControls, radius, border, density, }: DataTableProps<TData, TValue>): React.JSX.Element;
|
|
61
|
+
|
|
62
|
+
/** Responsive options read from a column's `meta`. */
|
|
63
|
+
interface DataTableColumnMeta {
|
|
64
|
+
/** Start with the column hidden; users can show it from the Columns menu. */
|
|
65
|
+
defaultHidden?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Pin the column to the left edge while the table scrolls horizontally.
|
|
68
|
+
* Only leading columns can be pinned: a sticky column after a non-sticky one
|
|
69
|
+
* is ignored. The row-selection checkbox column is pinned along with them.
|
|
70
|
+
*/
|
|
71
|
+
sticky?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Let the cell text wrap. Cells stay on one line by default so that narrow
|
|
74
|
+
* screens scroll the table instead of squashing every column; use this for
|
|
75
|
+
* long free-text columns such as descriptions.
|
|
76
|
+
*/
|
|
77
|
+
wrap?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Give the column whatever width the other columns leave, and never let its
|
|
80
|
+
* content widen the table. Pair it with a cell that truncates (`truncate`)
|
|
81
|
+
* so a long value ends in an ellipsis at the column edge instead of making
|
|
82
|
+
* the table scroll. With `wrap`, the text wraps within that width instead,
|
|
83
|
+
* but keeps `wrap`'s 16rem minimum.
|
|
84
|
+
*/
|
|
85
|
+
fill?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Hide the column while the table is narrower than this: a size from
|
|
88
|
+
* Tailwind's container scale (`sm` 24rem/384px, `md` 28rem/448px, `lg`
|
|
89
|
+
* 32rem/512px, `xl` 36rem/576px, `2xl` 42rem/672px, `3xl` 48rem/768px,
|
|
90
|
+
* `4xl` 56rem/896px, `5xl` 64rem/1024px, `6xl` 72rem/1152px, `7xl`
|
|
91
|
+
* 80rem/1280px) or a width in pixels. A table on a phone is narrower than
|
|
92
|
+
* `sm`, so `hideBelow: "sm"` hides the column on phones.
|
|
93
|
+
*
|
|
94
|
+
* Measured against the table's own width, not the viewport, so it also
|
|
95
|
+
* applies in sheets, split panes and next to a sidebar. Users can still show
|
|
96
|
+
* the column from the Columns menu; visibility is only re-applied when the
|
|
97
|
+
* width crosses the breakpoint.
|
|
98
|
+
*/
|
|
99
|
+
hideBelow?: DataTableBreakpoint | number;
|
|
100
|
+
}
|
|
101
|
+
/** Tailwind's container-query sizes (`@sm` … `@7xl`). */
|
|
102
|
+
type DataTableBreakpoint = "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl";
|
|
103
|
+
|
|
104
|
+
interface DataTableRowActionsProps {
|
|
105
|
+
children: ReactNode;
|
|
106
|
+
/** Never hide the actions, e.g. when the same component renders outside a table. */
|
|
107
|
+
alwaysVisible?: boolean;
|
|
108
|
+
/** Keep the actions visible on viewports narrower than this breakpoint. */
|
|
109
|
+
alwaysVisibleBelow?: "md";
|
|
110
|
+
className?: string;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Row action cell content for DataTable. Hidden until the row is hovered, but
|
|
114
|
+
* only on devices that can hover, so touch screens always show it. Stays visible
|
|
115
|
+
* for keyboard focus and while a menu or dialog it opened is open. Clicks and
|
|
116
|
+
* key presses don't reach the row's own click handler.
|
|
117
|
+
*/
|
|
118
|
+
declare function DataTableRowActions({ children, alwaysVisible, alwaysVisibleBelow, className, }: DataTableRowActionsProps): React.JSX.Element;
|
|
119
|
+
|
|
120
|
+
export { DataTable, type DataTableBreakpoint, type DataTableColumnMeta, type DataTableProps, DataTableRowActions, type DataTableRowActionsProps };
|
|
@@ -10,7 +10,7 @@ import { CalendarIcon } from "lucide-react";
|
|
|
10
10
|
import { format } from "date-fns";
|
|
11
11
|
//#region src/components/date-picker/date-picker.tsx
|
|
12
12
|
function DatePicker(props) {
|
|
13
|
-
const { value, onChange, defaultValue, formatDate, name, trigger, placeholder = "Pick a date", label, size, hideIcon = false, disabled = false, required = false, rounded = false, error, errorContent, startHelperContent, endHelperContent, hintContent, clearable = false, clearLabel = "Clear", calendarProps, open: controlledOpen, onOpenChange, className } = props;
|
|
13
|
+
const { value, onChange, defaultValue, formatDate, name, trigger, placeholder = "Pick a date", label, size, hideIcon = false, disabled = false, required = false, rounded = false, radius, popoverRadius, popoverElevation, error, errorContent, startHelperContent, endHelperContent, hintContent, clearable = false, clearLabel = "Clear", calendarProps, open: controlledOpen, onOpenChange, className } = props;
|
|
14
14
|
const [uncontrolledDate, setUncontrolledDate] = useState(defaultValue);
|
|
15
15
|
const [internalOpen, setInternalOpen] = useState(false);
|
|
16
16
|
const isControlled = "value" in props;
|
|
@@ -42,6 +42,7 @@ function DatePicker(props) {
|
|
|
42
42
|
disabled,
|
|
43
43
|
required,
|
|
44
44
|
rounded,
|
|
45
|
+
radius,
|
|
45
46
|
error,
|
|
46
47
|
errorContent,
|
|
47
48
|
startHelperContent,
|
|
@@ -73,7 +74,9 @@ function DatePicker(props) {
|
|
|
73
74
|
})
|
|
74
75
|
}), /* @__PURE__ */ jsx(PopoverContent, {
|
|
75
76
|
align: "start",
|
|
76
|
-
|
|
77
|
+
radius: popoverRadius,
|
|
78
|
+
elevation: popoverElevation,
|
|
79
|
+
className: "w-auto overflow-hidden rounded-[var(--espd-own-radius,var(--espd-radius-overlay,var(--radius-2xl)))] p-1 shadow-[shadow:var(--espd-own-elevation,var(--espd-elevation-overlay,var(--shadow-lg)))]",
|
|
77
80
|
children: /* @__PURE__ */ jsx(Calendar, {
|
|
78
81
|
mode: "single",
|
|
79
82
|
selected: selectedDate,
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { C as CalendarProps } from '../../calendar.props-BtCzuWH1.js';
|
|
4
|
+
import { S as Size } from '../../index-BQANnKs9.js';
|
|
5
|
+
import { k as StyleAxisProps } from '../../style-axes-DSQ2DGc5.js';
|
|
6
|
+
import 'react-day-picker';
|
|
7
|
+
|
|
8
|
+
interface DatePickerProps extends Pick<StyleAxisProps, "radius"> {
|
|
9
|
+
value?: Date;
|
|
10
|
+
onChange?: (date: Date | undefined) => void;
|
|
11
|
+
defaultValue?: Date;
|
|
12
|
+
formatDate?: (date: Date) => string;
|
|
13
|
+
name?: string;
|
|
14
|
+
trigger?: React__default.ReactNode;
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
label?: React__default.ReactNode;
|
|
17
|
+
size?: Size;
|
|
18
|
+
hideIcon?: boolean;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
required?: boolean;
|
|
21
|
+
/** Fully rounded trigger. Same as `radius="full"` (the trigger's radius); `radius` wins when both are set. */
|
|
22
|
+
rounded?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Corner radius of the calendar popover (overlay role), like `radius` on
|
|
25
|
+
* `PopoverContent`. `radius` shapes the trigger only.
|
|
26
|
+
*/
|
|
27
|
+
popoverRadius?: StyleAxisProps["radius"];
|
|
28
|
+
/** Shadow of the calendar popover (overlay role), like `elevation` on `PopoverContent`. */
|
|
29
|
+
popoverElevation?: StyleAxisProps["elevation"];
|
|
30
|
+
error?: boolean;
|
|
31
|
+
errorContent?: React__default.ReactNode;
|
|
32
|
+
startHelperContent?: React__default.ReactNode;
|
|
33
|
+
endHelperContent?: React__default.ReactNode;
|
|
34
|
+
hintContent?: React__default.ReactNode;
|
|
35
|
+
/** Renders an X button next to the trigger that clears the selection. */
|
|
36
|
+
clearable?: boolean;
|
|
37
|
+
/** Accessible name of the clear button. @default "Clear" */
|
|
38
|
+
clearLabel?: string;
|
|
39
|
+
calendarProps?: Omit<CalendarProps, "mode" | "selected" | "onSelect">;
|
|
40
|
+
open?: boolean;
|
|
41
|
+
onOpenChange?: (open: boolean) => void;
|
|
42
|
+
className?: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
declare function DatePicker(props: DatePickerProps): React.JSX.Element;
|
|
46
|
+
declare namespace DatePicker {
|
|
47
|
+
var displayName: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export { DatePicker, type DatePickerProps };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { cn } from "../../utils/cn.js";
|
|
2
|
+
import { useStyleAxes } from "../../utils/style-axes.js";
|
|
2
3
|
import { Button } from "../button/button.js";
|
|
3
4
|
import { Popover, PopoverContent, PopoverTrigger } from "../../core/popover.js";
|
|
4
5
|
import { Input } from "../../core/input/input.js";
|
|
@@ -29,8 +30,12 @@ var parseDateOrNull = (value, dateFormat) => {
|
|
|
29
30
|
const parsed = parse(value, dateFormat, /* @__PURE__ */ new Date());
|
|
30
31
|
return isValid(parsed) ? parsed : null;
|
|
31
32
|
};
|
|
32
|
-
function DateRangePicker({ presets, presetLabels, allowCustom = false, lockEndToToday = false, disableFutureDates = false, dateFormat = DEFAULT_DATE_FORMAT, onChange, onPresetChange, onDraftChange, selectedPresetId, selectedStartDate, selectedEndDate, clearable = false, clearLabel = "Clear", onClear, trigger, placeholder = "Select date range", label, size, hideIcon = false, disabled = false, required = false, rounded = false, error, errorContent, startHelperContent, endHelperContent, hintContent, align = "start", side = "bottom", className }) {
|
|
33
|
+
function DateRangePicker({ presets, presetLabels, allowCustom = false, lockEndToToday = false, disableFutureDates = false, dateFormat = DEFAULT_DATE_FORMAT, onChange, onPresetChange, onDraftChange, selectedPresetId, selectedStartDate, selectedEndDate, clearable = false, clearLabel = "Clear", onClear, trigger, placeholder = "Select date range", label, size, hideIcon = false, disabled = false, required = false, rounded = false, radius, popoverRadius, popoverElevation, error, errorContent, startHelperContent, endHelperContent, hintContent, align = "start", side = "bottom", className }) {
|
|
33
34
|
const [open, setOpen] = React$1.useState(false);
|
|
35
|
+
const popoverAxes = useStyleAxes({
|
|
36
|
+
radius: popoverRadius,
|
|
37
|
+
elevation: popoverElevation
|
|
38
|
+
}, ["radius", "elevation"]);
|
|
34
39
|
const [showCalendar, setShowCalendar] = React$1.useState(false);
|
|
35
40
|
const [draftRange, setDraftRange] = React$1.useState(EMPTY_DRAFT_RANGE);
|
|
36
41
|
const [calendarMonth, setCalendarMonth] = React$1.useState(/* @__PURE__ */ new Date());
|
|
@@ -157,6 +162,7 @@ function DateRangePicker({ presets, presetLabels, allowCustom = false, lockEndTo
|
|
|
157
162
|
disabled,
|
|
158
163
|
required,
|
|
159
164
|
rounded,
|
|
165
|
+
radius,
|
|
160
166
|
error,
|
|
161
167
|
errorContent,
|
|
162
168
|
startHelperContent,
|
|
@@ -247,6 +253,8 @@ function DateRangePicker({ presets, presetLabels, allowCustom = false, lockEndTo
|
|
|
247
253
|
align,
|
|
248
254
|
side,
|
|
249
255
|
collisionPadding: 16,
|
|
256
|
+
radius: popoverRadius,
|
|
257
|
+
elevation: popoverElevation,
|
|
250
258
|
className: cn("w-auto min-w-[10rem] gap-0 p-0 relative", isInline ? "max-h-(--radix-popover-content-available-height) max-w-(--radix-popover-content-available-width) overflow-y-auto" : "overflow-visible", allowCustom && showCalendar && calendarLayout === "right" && "rounded-r-none", allowCustom && showCalendar && calendarLayout === "left" && "rounded-l-none"),
|
|
251
259
|
children: [
|
|
252
260
|
/* @__PURE__ */ jsxs("div", {
|
|
@@ -288,7 +296,8 @@ function DateRangePicker({ presets, presetLabels, allowCustom = false, lockEndTo
|
|
|
288
296
|
}),
|
|
289
297
|
allowCustom && showCalendar && !isInline && /* @__PURE__ */ jsx("div", {
|
|
290
298
|
ref: calendarRef,
|
|
291
|
-
|
|
299
|
+
style: popoverAxes.partStyle,
|
|
300
|
+
className: cn("absolute top-0 border bg-popover text-popover-foreground shadow-[shadow:var(--espd-own-elevation,var(--espd-elevation-overlay,var(--shadow-lg)))]", calendarLayout === "right" ? "left-full -ml-px rounded-r-[var(--espd-own-radius,var(--espd-radius-overlay,var(--radius-2xl)))] border-l" : "right-full -mr-px rounded-l-[var(--espd-own-radius,var(--espd-radius-overlay,var(--radius-2xl)))] border-r"),
|
|
292
301
|
children: calendarBody
|
|
293
302
|
})
|
|
294
303
|
]
|