@espressif/dashboard-ui-components 1.11.1 → 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 +1020 -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 +50 -19
- 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,39 @@
|
|
|
1
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuTrigger } from "../../core/animate-ui/components/radix/dropdown-menu.js";
|
|
2
|
+
import { Button } from "../button/button.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { ArrowUpDown, ChevronDown } from "lucide-react";
|
|
5
|
+
//#region src/components/sort-menu/sort-menu.tsx
|
|
6
|
+
/**
|
|
7
|
+
* A one-of picker: the current choice as the button's label, the choices in a
|
|
8
|
+
* menu. A sort by default; with another `icon`, any filter of the same shape.
|
|
9
|
+
*/
|
|
10
|
+
function SortMenu({ value, options, onChange, labelOf, label, icon, iconOnlyBelow, align = "end" }) {
|
|
11
|
+
function handleChange(next) {
|
|
12
|
+
const option = options.find((o) => o === next);
|
|
13
|
+
if (option !== void 0) onChange(option);
|
|
14
|
+
}
|
|
15
|
+
return /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsx(DropdownMenuTrigger, {
|
|
16
|
+
asChild: true,
|
|
17
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
18
|
+
variant: "outline",
|
|
19
|
+
fullWidth: false,
|
|
20
|
+
"aria-label": `${label}: ${labelOf(value)}`,
|
|
21
|
+
startIcon: icon ?? /* @__PURE__ */ jsx(ArrowUpDown, { className: "h-4 w-4" }),
|
|
22
|
+
endIcon: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4" }),
|
|
23
|
+
iconOnlyBelow,
|
|
24
|
+
children: labelOf(value)
|
|
25
|
+
})
|
|
26
|
+
}), /* @__PURE__ */ jsx(DropdownMenuContent, {
|
|
27
|
+
align,
|
|
28
|
+
children: /* @__PURE__ */ jsx(DropdownMenuRadioGroup, {
|
|
29
|
+
value,
|
|
30
|
+
onValueChange: handleChange,
|
|
31
|
+
children: options.map((option) => /* @__PURE__ */ jsx(DropdownMenuRadioItem, {
|
|
32
|
+
value: option,
|
|
33
|
+
children: labelOf(option)
|
|
34
|
+
}, option))
|
|
35
|
+
})
|
|
36
|
+
})] });
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
export { SortMenu };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as lucide_react from 'lucide-react';
|
|
2
|
+
import { LoaderCircle } from 'lucide-react';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { C as Color } from '../../index-BQANnKs9.js';
|
|
5
|
+
|
|
6
|
+
type SpinnerProps = Omit<React.ComponentPropsWithoutRef<typeof LoaderCircle>, "color" | "size"> & {
|
|
7
|
+
color?: Color;
|
|
8
|
+
size?: number;
|
|
9
|
+
};
|
|
10
|
+
declare const Spinner: React.ForwardRefExoticComponent<Omit<Omit<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>, "ref">, "size" | "color"> & {
|
|
11
|
+
color?: Color;
|
|
12
|
+
size?: number;
|
|
13
|
+
} & React.RefAttributes<SVGSVGElement>>;
|
|
14
|
+
|
|
15
|
+
export { Spinner, type SpinnerProps };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
3
|
+
import { C as Color, S as Size } from '../../index-BQANnKs9.js';
|
|
4
|
+
import { k as StyleAxisProps } from '../../style-axes-DSQ2DGc5.js';
|
|
5
|
+
|
|
6
|
+
type StatCardSize = Size;
|
|
7
|
+
type StatCardValueType = "string" | "number" | "percentage";
|
|
8
|
+
/**
|
|
9
|
+
* The card's surface: `tinted` (default) is a soft gradient of `color`;
|
|
10
|
+
* `plain` is the card surface with a border, so a row of tiles reads as one
|
|
11
|
+
* set while each keeps its coloured icon.
|
|
12
|
+
*/
|
|
13
|
+
type StatCardSurface = "tinted" | "plain";
|
|
14
|
+
interface StatCardProps extends Omit<HTMLAttributes<HTMLDivElement>, "color">, Pick<StyleAxisProps, "radius"> {
|
|
15
|
+
color?: Color;
|
|
16
|
+
size?: StatCardSize;
|
|
17
|
+
loading?: boolean;
|
|
18
|
+
icon?: ReactNode;
|
|
19
|
+
heading: string | ReactNode;
|
|
20
|
+
value: number;
|
|
21
|
+
previousValue?: number;
|
|
22
|
+
previousValueComparisonTip?: string | ReactNode;
|
|
23
|
+
infoContent?: string | ReactNode;
|
|
24
|
+
valueType?: StatCardValueType;
|
|
25
|
+
surface?: StatCardSurface;
|
|
26
|
+
/**
|
|
27
|
+
* A small picture between the value and the caption — a sparkline, a
|
|
28
|
+
* `MiniBarChart`, a `ProgressBar`. Its row is a fixed height (32px at the
|
|
29
|
+
* default size), so a row of cards stays level whether or not each has one.
|
|
30
|
+
*/
|
|
31
|
+
visual?: ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* One line under the value (and the visual), trimmed when it does not fit:
|
|
34
|
+
* what the number is made of ("5 source · 2 firmware"), or its largest
|
|
35
|
+
* share. A string also becomes the line's `title`, so the trimmed part can
|
|
36
|
+
* still be read.
|
|
37
|
+
*/
|
|
38
|
+
caption?: ReactNode;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
declare const StatCard: React.ForwardRefExoticComponent<StatCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
42
|
+
|
|
43
|
+
export { StatCard, type StatCardProps, type StatCardSize, type StatCardSurface, type StatCardValueType };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../../utils/cn.js";
|
|
3
3
|
import { isPresetColor } from "../../utils/color.js";
|
|
4
|
+
import { useStyleAxes } from "../../utils/style-axes.js";
|
|
4
5
|
import { Popover, PopoverContent, PopoverTrigger } from "../../core/popover.js";
|
|
5
6
|
import { IconAvatar } from "../icon-avatar/icon-avatar.js";
|
|
6
7
|
import { Typography } from "../typography/typography.js";
|
|
@@ -34,7 +35,7 @@ var PRESET_INFO_CLASS = {
|
|
|
34
35
|
};
|
|
35
36
|
var SIZE_STYLES = {
|
|
36
37
|
sm: {
|
|
37
|
-
card: "rounded-2xl p-4",
|
|
38
|
+
card: "rounded-[var(--espd-own-radius,var(--espd-radius-surface,var(--radius-2xl)))] p-4",
|
|
38
39
|
gap: "gap-4",
|
|
39
40
|
headerGap: "gap-3",
|
|
40
41
|
avatar: 40,
|
|
@@ -42,11 +43,12 @@ var SIZE_STYLES = {
|
|
|
42
43
|
heading: "text-base",
|
|
43
44
|
value: "text-2xl",
|
|
44
45
|
footer: "text-xs",
|
|
45
|
-
badge: "gap-1 rounded-
|
|
46
|
-
info: "size-7 [&_svg]:size-4"
|
|
46
|
+
badge: "gap-1 rounded-[var(--espd-own-radius,var(--espd-radius-pill,calc(infinity*1px)))] px-2.5 py-0.5 text-xs",
|
|
47
|
+
info: "size-7 [&_svg]:size-4",
|
|
48
|
+
visual: "h-7"
|
|
47
49
|
},
|
|
48
50
|
default: {
|
|
49
|
-
card: "rounded-2xl p-5",
|
|
51
|
+
card: "rounded-[var(--espd-own-radius,var(--espd-radius-surface,var(--radius-2xl)))] p-5",
|
|
50
52
|
gap: "gap-5",
|
|
51
53
|
headerGap: "gap-3",
|
|
52
54
|
avatar: 52,
|
|
@@ -54,11 +56,12 @@ var SIZE_STYLES = {
|
|
|
54
56
|
heading: "text-xl",
|
|
55
57
|
value: "text-3xl",
|
|
56
58
|
footer: "text-sm",
|
|
57
|
-
badge: "gap-1 rounded-
|
|
58
|
-
info: "size-8 [&_svg]:size-5"
|
|
59
|
+
badge: "gap-1 rounded-[var(--espd-own-radius,var(--espd-radius-pill,calc(infinity*1px)))] px-3 py-1 text-sm",
|
|
60
|
+
info: "size-8 [&_svg]:size-5",
|
|
61
|
+
visual: "h-8"
|
|
59
62
|
},
|
|
60
63
|
lg: {
|
|
61
|
-
card: "rounded-3xl p-6",
|
|
64
|
+
card: "rounded-[var(--espd-own-radius,var(--espd-radius-surface,var(--radius-3xl)))] p-6",
|
|
62
65
|
gap: "gap-6",
|
|
63
66
|
headerGap: "gap-4",
|
|
64
67
|
avatar: 60,
|
|
@@ -66,8 +69,9 @@ var SIZE_STYLES = {
|
|
|
66
69
|
heading: "text-2xl",
|
|
67
70
|
value: "text-4xl",
|
|
68
71
|
footer: "text-base",
|
|
69
|
-
badge: "gap-1.5 rounded-
|
|
70
|
-
info: "size-9 [&_svg]:size-6"
|
|
72
|
+
badge: "gap-1.5 rounded-[var(--espd-own-radius,var(--espd-radius-pill,calc(infinity*1px)))] px-3.5 py-1 text-base",
|
|
73
|
+
info: "size-9 [&_svg]:size-6",
|
|
74
|
+
visual: "h-10"
|
|
71
75
|
}
|
|
72
76
|
};
|
|
73
77
|
function hasRenderableContent(content) {
|
|
@@ -81,7 +85,9 @@ function resolveStatColor(color, value, previousValue) {
|
|
|
81
85
|
if (previousValue !== void 0) return value - previousValue < 0 ? "error" : "success";
|
|
82
86
|
return "primary";
|
|
83
87
|
}
|
|
84
|
-
|
|
88
|
+
var PLAIN_SURFACE_CLASS = "border-[length:var(--espd-border-width-surface,1px)] border-border bg-card";
|
|
89
|
+
function resolveSurface(color, surface) {
|
|
90
|
+
if (surface === "plain") return { className: PLAIN_SURFACE_CLASS };
|
|
85
91
|
if (isPresetColor(color)) return { className: PRESET_SURFACE_CLASS[color] };
|
|
86
92
|
return { style: { backgroundImage: `linear-gradient(135deg, color-mix(in srgb, ${color} 7%, transparent), color-mix(in srgb, ${color} 14%, transparent))` } };
|
|
87
93
|
}
|
|
@@ -113,10 +119,11 @@ function getTrend(value, previousValue) {
|
|
|
113
119
|
label: `${Math.abs(percent).toLocaleString(void 0, { maximumFractionDigits: 1 })}%`
|
|
114
120
|
};
|
|
115
121
|
}
|
|
116
|
-
var StatCard = React$1.forwardRef(({ color, size = "default", loading = false, icon, heading, value, previousValue, previousValueComparisonTip, infoContent, valueType = "number", className, style, ...divProps }, ref) => {
|
|
122
|
+
var StatCard = React$1.forwardRef(({ color, size = "default", loading = false, icon, heading, value, previousValue, previousValueComparisonTip, infoContent, valueType = "number", surface: surfaceKind = "tinted", visual, caption, className, style, radius, ...divProps }, ref) => {
|
|
123
|
+
const { partStyle } = useStyleAxes({ radius }, ["radius"]);
|
|
117
124
|
const s = SIZE_STYLES[size];
|
|
118
125
|
const statColor = resolveStatColor(color, value, previousValue);
|
|
119
|
-
const surface = resolveSurface(statColor);
|
|
126
|
+
const surface = resolveSurface(statColor, surfaceKind);
|
|
120
127
|
const trend = getTrend(value, previousValue);
|
|
121
128
|
const showTrend = trend !== void 0 && !(value === 0 && previousValue === 0);
|
|
122
129
|
const showInfo = hasRenderableContent(infoContent);
|
|
@@ -130,6 +137,7 @@ var StatCard = React$1.forwardRef(({ color, size = "default", loading = false, i
|
|
|
130
137
|
ref,
|
|
131
138
|
className: cn("relative isolate flex w-full flex-col overflow-hidden border border-transparent text-foreground", s.card, surface.className, className),
|
|
132
139
|
style: {
|
|
140
|
+
...partStyle,
|
|
133
141
|
...surface.style,
|
|
134
142
|
...style
|
|
135
143
|
},
|
|
@@ -165,6 +173,17 @@ var StatCard = React$1.forwardRef(({ color, size = "default", loading = false, i
|
|
|
165
173
|
className: cn("font-bold leading-none tracking-tight text-foreground", s.value),
|
|
166
174
|
children: formatValue(value, valueType)
|
|
167
175
|
}),
|
|
176
|
+
visual != null || caption != null ? /* @__PURE__ */ jsxs("div", {
|
|
177
|
+
className: "flex min-w-0 flex-col gap-2",
|
|
178
|
+
children: [visual != null ? /* @__PURE__ */ jsx("div", {
|
|
179
|
+
className: cn("flex w-full items-end", s.visual),
|
|
180
|
+
children: visual
|
|
181
|
+
}) : null, caption != null ? /* @__PURE__ */ jsx("div", {
|
|
182
|
+
className: cn("min-w-0 truncate text-foreground-secondary", s.footer),
|
|
183
|
+
title: typeof caption === "string" ? caption : void 0,
|
|
184
|
+
children: caption
|
|
185
|
+
}) : null]
|
|
186
|
+
}) : null,
|
|
168
187
|
showFooter ? /* @__PURE__ */ jsxs("div", {
|
|
169
188
|
className: cn("flex items-center gap-3", s.footer),
|
|
170
189
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { a as StatusBadgeProps } from '../../status-badge.props-lKlEOfRt.js';
|
|
4
|
+
export { S as StatusBadgeIcon } from '../../status-badge.props-lKlEOfRt.js';
|
|
5
|
+
import 'lucide-react';
|
|
6
|
+
import '../../index-BQANnKs9.js';
|
|
7
|
+
import '../../variant-D81RhpbR.js';
|
|
8
|
+
import '../../style-axes-DSQ2DGc5.js';
|
|
9
|
+
|
|
10
|
+
declare const statusBadgeSizeVariants: (props?: ({
|
|
11
|
+
size?: "sm" | "default" | "lg" | null | undefined;
|
|
12
|
+
hasIcon?: boolean | null | undefined;
|
|
13
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
14
|
+
/**
|
|
15
|
+
* Shared icon+label status chip. Consumers resolve their per-status
|
|
16
|
+
* presentation (icon, colour, translated label) and hand the results in here,
|
|
17
|
+
* so every status badge across apps stays visually consistent.
|
|
18
|
+
*
|
|
19
|
+
* The primitive stays i18n-free and registry-free — the per-status mapping
|
|
20
|
+
* belongs in the consuming app's domain layer.
|
|
21
|
+
*/
|
|
22
|
+
declare const StatusBadge: React.ForwardRefExoticComponent<StatusBadgeProps & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
|
|
24
|
+
export { StatusBadge, StatusBadgeProps, statusBadgeSizeVariants };
|
|
@@ -22,7 +22,7 @@ var ICON_PX = {
|
|
|
22
22
|
default: 16,
|
|
23
23
|
lg: 18
|
|
24
24
|
};
|
|
25
|
-
var statusBadgeSizeVariants = cva("rounded-
|
|
25
|
+
var statusBadgeSizeVariants = cva("rounded-[var(--espd-own-radius,var(--espd-radius-pill,calc(infinity*1px)))] font-normal [&_svg]:shrink-0", {
|
|
26
26
|
variants: {
|
|
27
27
|
size: {
|
|
28
28
|
sm: "gap-1 py-0.5 text-xs",
|
|
@@ -79,7 +79,7 @@ var statusBadgeSizeVariants = cva("rounded-full font-normal [&_svg]:shrink-0", {
|
|
|
79
79
|
* The primitive stays i18n-free and registry-free — the per-status mapping
|
|
80
80
|
* belongs in the consuming app's domain layer.
|
|
81
81
|
*/
|
|
82
|
-
var StatusBadge = React$1.forwardRef(({ label, icon: Icon, color, variant = "soft", size = "default", isLoading = false, className, labelClassName, ...props }, ref) => {
|
|
82
|
+
var StatusBadge = React$1.forwardRef(({ label, icon: Icon, color, variant = "soft", size = "default", isLoading = false, className, labelClassName, radius, ...props }, ref) => {
|
|
83
83
|
const iconPx = ICON_PX[size];
|
|
84
84
|
const showIcon = isLoading || !!Icon;
|
|
85
85
|
return /* @__PURE__ */ jsx("div", {
|
|
@@ -89,6 +89,7 @@ var StatusBadge = React$1.forwardRef(({ label, icon: Icon, color, variant = "sof
|
|
|
89
89
|
children: /* @__PURE__ */ jsxs(Badge, {
|
|
90
90
|
color,
|
|
91
91
|
variant,
|
|
92
|
+
radius,
|
|
92
93
|
className: cn(statusBadgeSizeVariants({
|
|
93
94
|
size,
|
|
94
95
|
hasIcon: showIcon
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { k as StyleAxisProps } from '../../style-axes-DSQ2DGc5.js';
|
|
4
|
+
|
|
5
|
+
type StatusCardState = "success" | "warning" | "error" | "in_progress" | "not_started";
|
|
6
|
+
type StatusCardListSize = "sm" | "default" | "lg";
|
|
7
|
+
interface StatusCardListItem {
|
|
8
|
+
id: string;
|
|
9
|
+
icon: ReactNode;
|
|
10
|
+
title: ReactNode;
|
|
11
|
+
description?: ReactNode;
|
|
12
|
+
action?: ReactNode;
|
|
13
|
+
state: StatusCardState;
|
|
14
|
+
}
|
|
15
|
+
/** Style axis `radius`: each item card. */
|
|
16
|
+
interface StatusCardListProps extends Pick<StyleAxisProps, "radius"> {
|
|
17
|
+
data: StatusCardListItem[];
|
|
18
|
+
size?: StatusCardListSize;
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
declare function StatusCardList({ data, size, className, radius, }: StatusCardListProps): React.JSX.Element;
|
|
23
|
+
|
|
24
|
+
export { StatusCardList, type StatusCardListItem, type StatusCardListProps, type StatusCardListSize, type StatusCardState };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../../utils/cn.js";
|
|
3
|
+
import { useStyleAxes } from "../../utils/style-axes.js";
|
|
3
4
|
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../../core/animate-ui/components/animate/tooltip.js";
|
|
4
5
|
import { IconAvatar } from "../icon-avatar/icon-avatar.js";
|
|
5
6
|
import { cloneElement, isValidElement, useCallback, useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
@@ -194,14 +195,15 @@ function StatusEndIndicator({ state, endIconClass, endIconSizeClass }) {
|
|
|
194
195
|
});
|
|
195
196
|
}
|
|
196
197
|
}
|
|
197
|
-
function StatusCardListRow({ item, s }) {
|
|
198
|
+
function StatusCardListRow({ item, s, rowStyle }) {
|
|
198
199
|
const visuals = stateVisuals[item.state];
|
|
199
200
|
return /* @__PURE__ */ jsxs(motion.li, {
|
|
200
201
|
layout: true,
|
|
201
202
|
initial: false,
|
|
202
203
|
animate: stateSurfaceMotion(item.state),
|
|
203
204
|
transition: cardMotionTransition,
|
|
204
|
-
|
|
205
|
+
style: rowStyle,
|
|
206
|
+
className: cn("flex items-center rounded-[var(--espd-own-radius,var(--espd-radius-surface,var(--radius-lg)))] border-[length:var(--espd-own-border-width,var(--espd-border-width-surface,1px))] border-solid text-left", s.rowPad, s.gap),
|
|
205
207
|
children: [
|
|
206
208
|
/* @__PURE__ */ jsx(motion.span, {
|
|
207
209
|
layout: "position",
|
|
@@ -264,8 +266,9 @@ function StatusCardListRow({ item, s }) {
|
|
|
264
266
|
]
|
|
265
267
|
});
|
|
266
268
|
}
|
|
267
|
-
function StatusCardList({ data, size = "default", className }) {
|
|
269
|
+
function StatusCardList({ data, size = "default", className, radius }) {
|
|
268
270
|
const s = sizeStyles[size];
|
|
271
|
+
const { partStyle: rowStyle } = useStyleAxes({ radius }, ["radius"]);
|
|
269
272
|
return /* @__PURE__ */ jsx(TooltipProvider, {
|
|
270
273
|
openDelay: 300,
|
|
271
274
|
closeDelay: 100,
|
|
@@ -273,7 +276,8 @@ function StatusCardList({ data, size = "default", className }) {
|
|
|
273
276
|
className: cn("flex flex-col min-w-0", s.listGap, className),
|
|
274
277
|
children: data.map((item) => /* @__PURE__ */ jsx(StatusCardListRow, {
|
|
275
278
|
item,
|
|
276
|
-
s
|
|
279
|
+
s,
|
|
280
|
+
rowStyle
|
|
277
281
|
}, item.id))
|
|
278
282
|
})
|
|
279
283
|
});
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { C as Color } from '../../index-BQANnKs9.js';
|
|
4
|
+
import { c as VerticalStepperStepStatus } from '../../vertical-stepper.props-BXYcbW70.js';
|
|
5
|
+
|
|
6
|
+
/** One step. `status` is the steppers' status (`stale` included), so one product's chain feeds all three. */
|
|
7
|
+
interface StepTabsStep {
|
|
8
|
+
id: string;
|
|
9
|
+
/** Already-translated word. Keep it to one or two words: the strip is one row. */
|
|
10
|
+
label: string;
|
|
11
|
+
/** Drawn as a mark before the word and read after it. Independent of which step is on show. */
|
|
12
|
+
status: VerticalStepperStepStatus;
|
|
13
|
+
/** Shown before the mark: a Lucide element or any element; it is sized to the strip. Default none. */
|
|
14
|
+
icon?: ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* About the step, already translated: text ("Spec edited after this build")
|
|
17
|
+
* or React content (formatting, an icon, a time, a badge). Shown in a
|
|
18
|
+
* tooltip on hover and keyboard focus, and read as the tab's description, so
|
|
19
|
+
* it is rendered twice: once in the tooltip, once hidden for assistive tech.
|
|
20
|
+
* Nothing focusable or interactive (no buttons, links or inputs: neither
|
|
21
|
+
* keyboard nor touch can reach a tab's tooltip) and no `id`s. Supplementary,
|
|
22
|
+
* since touch has no hover; actions belong on the step's page. Replaces the
|
|
23
|
+
* mark's own tooltip. Default none.
|
|
24
|
+
*/
|
|
25
|
+
description?: ReactNode;
|
|
26
|
+
/**
|
|
27
|
+
* A step the person cannot go to yet. Still drawn and still reached with the
|
|
28
|
+
* arrow keys (so a screen reader hears it, and its `description` can say
|
|
29
|
+
* why), but choosing it does nothing. Default `false`.
|
|
30
|
+
*/
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
}
|
|
33
|
+
type StepTabsSize = "sm" | "default" | "lg";
|
|
34
|
+
type StepTabsVariant = "rounded" | "line";
|
|
35
|
+
interface StepTabsProps {
|
|
36
|
+
steps: StepTabsStep[];
|
|
37
|
+
/** The id of the step on show. Controlled; it may name a `not_started` step. */
|
|
38
|
+
value: string;
|
|
39
|
+
/** Called with a step's id when it is chosen, including the step already on show. */
|
|
40
|
+
onValueChange: (id: string) => void;
|
|
41
|
+
/** `sm`: a 28px strip with small text, for a toolbar. `lg`: 40px steps with base text. Default `default` (32px steps). */
|
|
42
|
+
size?: StepTabsSize;
|
|
43
|
+
/**
|
|
44
|
+
* `rounded`: the step on show sits on a tinted pill among plain words, with
|
|
45
|
+
* no outline round the group. `line`: an underline under the step on show;
|
|
46
|
+
* the strip's own bottom rule is drawn only with `rule`. Default `rounded`.
|
|
47
|
+
*/
|
|
48
|
+
variant?: StepTabsVariant;
|
|
49
|
+
/** Tint of the pill or underline, the word on show and the marks (`stale` stays `warning`). Default `primary`. */
|
|
50
|
+
color?: Color;
|
|
51
|
+
/** `line` only: draw the strip's own bottom rule. Default `false` (a toolbar usually has one). */
|
|
52
|
+
rule?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* `rounded` only: sit the steps in a tray recessed into the bar, so they
|
|
55
|
+
* read as one control (a segmented control) rather than loose words: a
|
|
56
|
+
* translucent floor (`bg-recessed`) with inner shadows for walls and a light
|
|
57
|
+
* lip below (`shadow-recessed`), both per theme. No line of its own, so it
|
|
58
|
+
* adds none beside a toolbar's rule; translucent, so the pill's tinted wash
|
|
59
|
+
* keeps its hue on it over any bar. Default `false`.
|
|
60
|
+
*/
|
|
61
|
+
tray?: boolean;
|
|
62
|
+
/** Accessible name of the strip ("Steps"). Required: the caller translates it. */
|
|
63
|
+
ariaLabel: string;
|
|
64
|
+
/**
|
|
65
|
+
* Words for the statuses, read after each step's word and shown as its
|
|
66
|
+
* mark's tooltip. Defaults: complete "Done", in_progress "In progress",
|
|
67
|
+
* stale "Out of date", not_started "Not started" (never read: a step not
|
|
68
|
+
* started is just its word).
|
|
69
|
+
*/
|
|
70
|
+
statusLabels?: Partial<Record<VerticalStepperStepStatus, string>>;
|
|
71
|
+
className?: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* A one-row strip of a product's steps that is both navigation and progress:
|
|
76
|
+
* each step is a tab the person can go to, and each carries its status as a
|
|
77
|
+
* mark before its word. Built for a toolbar (`size="sm"`). It has no panels —
|
|
78
|
+
* the caller shows the step's page (usually a route) in `onValueChange`.
|
|
79
|
+
*
|
|
80
|
+
* Keyboard: one tab stop (the step on show); ←/→ move between steps and wrap,
|
|
81
|
+
* Home/End jump to the ends, Enter or Space chooses — like `Tabs`, focusing a
|
|
82
|
+
* step never chooses it, so arrowing across does not navigate. A `disabled`
|
|
83
|
+
* step is reached by the arrows but cannot be chosen.
|
|
84
|
+
*
|
|
85
|
+
* A step's `description` (text or non-interactive React content) shows in a
|
|
86
|
+
* tooltip on hover and keyboard focus (a disabled step's too) and is read as
|
|
87
|
+
* the tab's description.
|
|
88
|
+
*
|
|
89
|
+
* Status and selection are independent: the step on show may be one not
|
|
90
|
+
* started, and a stale step may come before a complete one.
|
|
91
|
+
*/
|
|
92
|
+
declare function StepTabs({ steps, value, onValueChange, size, variant, color, rule, tray, ariaLabel, statusLabels, className, }: StepTabsProps): React.JSX.Element;
|
|
93
|
+
|
|
94
|
+
export { StepTabs, type StepTabsProps, type StepTabsSize, type StepTabsStep, type StepTabsVariant };
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn.js";
|
|
2
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../../core/animate-ui/components/animate/tooltip.js";
|
|
3
|
+
import { Tabs, TabsList, TabsTrigger } from "../../core/animate-ui/components/animate/tabs.js";
|
|
4
|
+
import { cloneElement, isValidElement, useId } from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { Check, TriangleAlert, X } from "lucide-react";
|
|
7
|
+
//#region src/components/step-tabs/step-tabs.tsx
|
|
8
|
+
var DEFAULT_STATUS_LABELS = {
|
|
9
|
+
complete: "Done",
|
|
10
|
+
in_progress: "In progress",
|
|
11
|
+
stale: "Out of date",
|
|
12
|
+
failed: "Failed",
|
|
13
|
+
not_started: "Not started"
|
|
14
|
+
};
|
|
15
|
+
var sizes = {
|
|
16
|
+
sm: {
|
|
17
|
+
mark: "size-3",
|
|
18
|
+
dot: "size-1.5",
|
|
19
|
+
icon: "size-3.5",
|
|
20
|
+
rounded: "",
|
|
21
|
+
line: ""
|
|
22
|
+
},
|
|
23
|
+
default: {
|
|
24
|
+
mark: "size-3.5",
|
|
25
|
+
dot: "size-1.5",
|
|
26
|
+
icon: "size-4",
|
|
27
|
+
rounded: "h-8 px-3",
|
|
28
|
+
line: "py-2"
|
|
29
|
+
},
|
|
30
|
+
lg: {
|
|
31
|
+
mark: "size-4",
|
|
32
|
+
dot: "size-2",
|
|
33
|
+
icon: "size-5",
|
|
34
|
+
rounded: "h-10 px-4",
|
|
35
|
+
line: ""
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* A mark's colour, its lightness held where a glyph reads (3:1): at most L 55
|
|
40
|
+
* on a light page, at least L 50 on a dark one; hue and chroma stay. Without
|
|
41
|
+
* relative colour syntax, the colour as given. The dot fills with currentColor.
|
|
42
|
+
*/
|
|
43
|
+
var IN_COLOR = "text-[color:var(--espd-tabs-color)] supports-[color:lch(from_red_l_c_h)]:text-[color:lch(from_var(--espd-tabs-color)_min(l,55)_c_h)] dark:supports-[color:lch(from_red_l_c_h)]:text-[color:lch(from_var(--espd-tabs-color)_max(l,50)_c_h)]";
|
|
44
|
+
var IN_ERROR = "text-error supports-[color:lch(from_red_l_c_h)]:text-[color:lch(from_var(--color-error)_min(l,55)_c_h)] dark:supports-[color:lch(from_red_l_c_h)]:text-[color:lch(from_var(--color-error)_max(l,50)_c_h)]";
|
|
45
|
+
var IN_WARNING = "text-warning supports-[color:lch(from_red_l_c_h)]:text-[color:lch(from_var(--color-warning)_min(l,55)_c_h)] dark:supports-[color:lch(from_red_l_c_h)]:text-[color:lch(from_var(--color-warning)_max(l,50)_c_h)]";
|
|
46
|
+
function sized(icon, className) {
|
|
47
|
+
if (isValidElement(icon)) {
|
|
48
|
+
const el = icon;
|
|
49
|
+
return cloneElement(el, { className: cn(className, el.props.className) });
|
|
50
|
+
}
|
|
51
|
+
return icon;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The status as a shape, never colour alone: a check, a dot that throbs with a
|
|
55
|
+
* soft halo (still, with no halo, under reduced motion), a warning triangle or
|
|
56
|
+
* an error cross. A step not started has
|
|
57
|
+
* none and keeps no room for one, so its word sits centred in the pill. Hidden
|
|
58
|
+
* from assistive tech; the trigger says it in words.
|
|
59
|
+
*/
|
|
60
|
+
function StepMark({ status, label, size }) {
|
|
61
|
+
const s = sizes[size];
|
|
62
|
+
if (status === "not_started") return null;
|
|
63
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
64
|
+
"aria-hidden": true,
|
|
65
|
+
"data-mark": status,
|
|
66
|
+
title: label,
|
|
67
|
+
className: cn("inline-flex shrink-0 items-center justify-center", s.mark),
|
|
68
|
+
children: [
|
|
69
|
+
status === "complete" && /* @__PURE__ */ jsx(Check, {
|
|
70
|
+
strokeWidth: 3,
|
|
71
|
+
className: cn("size-full", IN_COLOR)
|
|
72
|
+
}),
|
|
73
|
+
status === "in_progress" && /* @__PURE__ */ jsx("span", { className: cn("relative rounded-full bg-current motion-safe:animate-throb", "before:absolute before:inset-0 before:rounded-full before:bg-current before:opacity-0 motion-safe:before:animate-throb-ring", IN_COLOR, s.dot) }),
|
|
74
|
+
status === "stale" && /* @__PURE__ */ jsx(TriangleAlert, {
|
|
75
|
+
strokeWidth: 2.5,
|
|
76
|
+
className: cn("size-full", IN_WARNING)
|
|
77
|
+
}),
|
|
78
|
+
status === "failed" && /* @__PURE__ */ jsx(X, {
|
|
79
|
+
strokeWidth: 3,
|
|
80
|
+
className: cn("size-full", IN_ERROR)
|
|
81
|
+
})
|
|
82
|
+
]
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* The pill under the step on show (Tabs' highlight, reached from the Tabs root)
|
|
87
|
+
* takes a hairline in its own colour at 18%, just stronger than its 10% wash:
|
|
88
|
+
* a shade darker on a light page, a shade lighter on a dark one. On a dark page
|
|
89
|
+
* 15%: the same hue reads brighter there and the edge would lead the wash.
|
|
90
|
+
*/
|
|
91
|
+
var PILL_EDGE = "[&_[data-slot=motion-highlight]]:border [&_[data-slot=motion-highlight]]:border-[color:color-mix(in_oklab,var(--espd-tabs-color)_18%,transparent)] dark:[&_[data-slot=motion-highlight]]:border-[color:color-mix(in_oklab,var(--espd-tabs-color)_15%,transparent)]";
|
|
92
|
+
/** A description to show: anything React renders, so not `null`, `undefined`, `false` or `""`. */
|
|
93
|
+
function hasDescription(step) {
|
|
94
|
+
return step.description != null && step.description !== false && step.description !== "";
|
|
95
|
+
}
|
|
96
|
+
/** Arrow keys, Home and End move focus between the tabs (wrapping); they never choose one. */
|
|
97
|
+
function moveFocus(event) {
|
|
98
|
+
const tabs = Array.from(event.currentTarget.querySelectorAll("[role=\"tab\"]"));
|
|
99
|
+
const from = tabs.indexOf(event.target);
|
|
100
|
+
if (from === -1) return;
|
|
101
|
+
const last = tabs.length - 1;
|
|
102
|
+
const to = {
|
|
103
|
+
ArrowRight: from === last ? 0 : from + 1,
|
|
104
|
+
ArrowLeft: from === 0 ? last : from - 1,
|
|
105
|
+
Home: 0,
|
|
106
|
+
End: last
|
|
107
|
+
}[event.key];
|
|
108
|
+
if (to === void 0) return;
|
|
109
|
+
event.preventDefault();
|
|
110
|
+
tabs[to]?.focus();
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* A one-row strip of a product's steps that is both navigation and progress:
|
|
114
|
+
* each step is a tab the person can go to, and each carries its status as a
|
|
115
|
+
* mark before its word. Built for a toolbar (`size="sm"`). It has no panels —
|
|
116
|
+
* the caller shows the step's page (usually a route) in `onValueChange`.
|
|
117
|
+
*
|
|
118
|
+
* Keyboard: one tab stop (the step on show); ←/→ move between steps and wrap,
|
|
119
|
+
* Home/End jump to the ends, Enter or Space chooses — like `Tabs`, focusing a
|
|
120
|
+
* step never chooses it, so arrowing across does not navigate. A `disabled`
|
|
121
|
+
* step is reached by the arrows but cannot be chosen.
|
|
122
|
+
*
|
|
123
|
+
* A step's `description` (text or non-interactive React content) shows in a
|
|
124
|
+
* tooltip on hover and keyboard focus (a disabled step's too) and is read as
|
|
125
|
+
* the tab's description.
|
|
126
|
+
*
|
|
127
|
+
* Status and selection are independent: the step on show may be one not
|
|
128
|
+
* started, and a stale step may come before a complete one.
|
|
129
|
+
*/
|
|
130
|
+
function StepTabs({ steps, value, onValueChange, size = "default", variant = "rounded", color = "primary", rule = false, tray = false, ariaLabel, statusLabels, className }) {
|
|
131
|
+
const s = sizes[size];
|
|
132
|
+
const id = useId();
|
|
133
|
+
const descriptionId = (index) => `${id}-description-${index}`;
|
|
134
|
+
const labels = {
|
|
135
|
+
...DEFAULT_STATUS_LABELS,
|
|
136
|
+
...statusLabels
|
|
137
|
+
};
|
|
138
|
+
const isLine = variant === "line";
|
|
139
|
+
const tabStop = steps.some((step) => step.id === value) ? value : steps[0]?.id;
|
|
140
|
+
const chooseUnlessDisabled = (step) => (event) => {
|
|
141
|
+
if (step.disabled) event.preventDefault();
|
|
142
|
+
};
|
|
143
|
+
const strip = /* @__PURE__ */ jsxs(Tabs, {
|
|
144
|
+
value,
|
|
145
|
+
onValueChange,
|
|
146
|
+
className: cn("w-fit max-w-full", !isLine && PILL_EDGE, className),
|
|
147
|
+
children: [/* @__PURE__ */ jsx(TabsList, {
|
|
148
|
+
"aria-label": ariaLabel,
|
|
149
|
+
variant,
|
|
150
|
+
size,
|
|
151
|
+
color,
|
|
152
|
+
fullWidth: false,
|
|
153
|
+
onKeyDown: moveFocus,
|
|
154
|
+
className: cn("gap-0.5", !isLine && "border-transparent", !isLine && tray && "bg-recessed shadow-recessed", isLine && !rule && "border-b-transparent"),
|
|
155
|
+
children: steps.map((step, index) => {
|
|
156
|
+
const word = step.status === "not_started" ? void 0 : labels[step.status];
|
|
157
|
+
const selected = step.id === value;
|
|
158
|
+
const described = hasDescription(step);
|
|
159
|
+
const trigger = /* @__PURE__ */ jsxs(TabsTrigger, {
|
|
160
|
+
value: step.id,
|
|
161
|
+
"aria-disabled": step.disabled || void 0,
|
|
162
|
+
"aria-describedby": described ? descriptionId(index) : void 0,
|
|
163
|
+
tabIndex: step.id === tabStop ? 0 : -1,
|
|
164
|
+
"data-status": step.status,
|
|
165
|
+
onClick: chooseUnlessDisabled(step),
|
|
166
|
+
className: cn("align-top data-[state=inactive]:not-aria-disabled:hover:text-foreground aria-disabled:cursor-not-allowed aria-disabled:opacity-50", isLine ? s.line : s.rounded),
|
|
167
|
+
children: [
|
|
168
|
+
step.icon ? sized(step.icon, cn("shrink-0", s.icon)) : null,
|
|
169
|
+
/* @__PURE__ */ jsx(StepMark, {
|
|
170
|
+
status: step.status,
|
|
171
|
+
label: described ? void 0 : labels[step.status],
|
|
172
|
+
size
|
|
173
|
+
}),
|
|
174
|
+
/* @__PURE__ */ jsxs("span", {
|
|
175
|
+
className: "whitespace-nowrap",
|
|
176
|
+
children: [step.label, word ? /* @__PURE__ */ jsxs("span", {
|
|
177
|
+
className: "sr-only",
|
|
178
|
+
children: [", ", word]
|
|
179
|
+
}) : null]
|
|
180
|
+
})
|
|
181
|
+
]
|
|
182
|
+
}, step.id);
|
|
183
|
+
if (!described) return trigger;
|
|
184
|
+
return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
185
|
+
asChild: true,
|
|
186
|
+
"data-state": selected ? "active" : "inactive",
|
|
187
|
+
children: trigger
|
|
188
|
+
}), /* @__PURE__ */ jsx(TooltipContent, {
|
|
189
|
+
className: "max-w-xs",
|
|
190
|
+
children: step.description
|
|
191
|
+
})] }, step.id);
|
|
192
|
+
})
|
|
193
|
+
}), steps.map((step, index) => hasDescription(step) ? /* @__PURE__ */ jsx("div", {
|
|
194
|
+
id: descriptionId(index),
|
|
195
|
+
hidden: true,
|
|
196
|
+
children: step.description
|
|
197
|
+
}, step.id) : null)]
|
|
198
|
+
});
|
|
199
|
+
return steps.some(hasDescription) ? /* @__PURE__ */ jsx(TooltipProvider, { children: strip }) : strip;
|
|
200
|
+
}
|
|
201
|
+
//#endregion
|
|
202
|
+
export { StepTabs };
|