@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,227 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
//#region src/utils/style-axes.ts
|
|
3
|
+
var RADII = [
|
|
4
|
+
"none",
|
|
5
|
+
"xs",
|
|
6
|
+
"sm",
|
|
7
|
+
"md",
|
|
8
|
+
"lg",
|
|
9
|
+
"xl",
|
|
10
|
+
"2xl",
|
|
11
|
+
"full"
|
|
12
|
+
];
|
|
13
|
+
var ELEVATIONS = [
|
|
14
|
+
"none",
|
|
15
|
+
"xs",
|
|
16
|
+
"sm",
|
|
17
|
+
"md",
|
|
18
|
+
"lg",
|
|
19
|
+
"xl"
|
|
20
|
+
];
|
|
21
|
+
var BORDERS = [
|
|
22
|
+
"none",
|
|
23
|
+
"default",
|
|
24
|
+
"strong"
|
|
25
|
+
];
|
|
26
|
+
var DENSITIES = [
|
|
27
|
+
"compact",
|
|
28
|
+
"default",
|
|
29
|
+
"comfortable"
|
|
30
|
+
];
|
|
31
|
+
var BUILT_IN_VALUES = {
|
|
32
|
+
radius: {
|
|
33
|
+
none: "0px",
|
|
34
|
+
xs: "var(--radius-xs, 0.125rem)",
|
|
35
|
+
sm: "var(--radius-sm, calc(0.5rem - 4px))",
|
|
36
|
+
md: "var(--radius-md, calc(0.5rem - 2px))",
|
|
37
|
+
lg: "var(--radius-lg, 0.5rem)",
|
|
38
|
+
xl: "var(--radius-xl, 0.75rem)",
|
|
39
|
+
"2xl": "var(--radius-2xl, 1rem)",
|
|
40
|
+
full: "calc(infinity * 1px)"
|
|
41
|
+
},
|
|
42
|
+
elevation: {
|
|
43
|
+
none: "0 0 #0000",
|
|
44
|
+
xs: "var(--shadow-xs, 0 1px 2px 0 rgb(0 0 0 / 0.05))",
|
|
45
|
+
sm: "var(--shadow-sm, 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1))",
|
|
46
|
+
md: "var(--shadow-md, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1))",
|
|
47
|
+
lg: "var(--shadow-lg, 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1))",
|
|
48
|
+
xl: "var(--shadow-xl, 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1))"
|
|
49
|
+
},
|
|
50
|
+
border: {
|
|
51
|
+
none: "0px",
|
|
52
|
+
default: "1px",
|
|
53
|
+
strong: "2px"
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
var step = (n) => `calc(var(--spacing) * ${n})`;
|
|
57
|
+
var BUILT_IN_DENSITIES = {
|
|
58
|
+
compact: {
|
|
59
|
+
"--espd-control-height-sm": step(7),
|
|
60
|
+
"--espd-control-height-md": step(8),
|
|
61
|
+
"--espd-control-height-lg": step(9),
|
|
62
|
+
"--espd-button-padding-x-sm": step(2),
|
|
63
|
+
"--espd-button-padding-x-md": step(3),
|
|
64
|
+
"--espd-button-padding-x-lg": step(6),
|
|
65
|
+
"--espd-table-head-height": step(8),
|
|
66
|
+
"--espd-table-cell-padding": step(1.5),
|
|
67
|
+
"--espd-item-height": "2rem",
|
|
68
|
+
"--espd-sidebar-row-height": step(7),
|
|
69
|
+
"--espd-sidebar-row-height-sm": step(6),
|
|
70
|
+
"--espd-gap-field": step(1.5),
|
|
71
|
+
"--espd-gap-stack": step(3)
|
|
72
|
+
},
|
|
73
|
+
default: {
|
|
74
|
+
"--espd-control-height-sm": step(8),
|
|
75
|
+
"--espd-control-height-md": step(9),
|
|
76
|
+
"--espd-control-height-lg": step(10),
|
|
77
|
+
"--espd-button-padding-x-sm": step(3),
|
|
78
|
+
"--espd-button-padding-x-md": step(4),
|
|
79
|
+
"--espd-button-padding-x-lg": step(8),
|
|
80
|
+
"--espd-table-head-height": step(10),
|
|
81
|
+
"--espd-table-cell-padding": step(2),
|
|
82
|
+
"--espd-item-height": "2.5rem",
|
|
83
|
+
"--espd-sidebar-row-height": step(8),
|
|
84
|
+
"--espd-sidebar-row-height-sm": step(7),
|
|
85
|
+
"--espd-gap-field": step(2),
|
|
86
|
+
"--espd-gap-stack": step(4)
|
|
87
|
+
},
|
|
88
|
+
comfortable: {
|
|
89
|
+
"--espd-control-height-sm": step(9),
|
|
90
|
+
"--espd-control-height-md": step(10),
|
|
91
|
+
"--espd-control-height-lg": step(11),
|
|
92
|
+
"--espd-button-padding-x-sm": step(4),
|
|
93
|
+
"--espd-button-padding-x-md": step(5),
|
|
94
|
+
"--espd-button-padding-x-lg": step(10),
|
|
95
|
+
"--espd-table-head-height": step(12),
|
|
96
|
+
"--espd-table-cell-padding": step(3),
|
|
97
|
+
"--espd-item-height": "3rem",
|
|
98
|
+
"--espd-sidebar-row-height": step(10),
|
|
99
|
+
"--espd-sidebar-row-height-sm": step(8),
|
|
100
|
+
"--espd-gap-field": step(2.5),
|
|
101
|
+
"--espd-gap-stack": step(6)
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
var BUILT_IN_NAMES = {
|
|
105
|
+
radius: RADII,
|
|
106
|
+
elevation: ELEVATIONS,
|
|
107
|
+
border: BORDERS,
|
|
108
|
+
density: DENSITIES
|
|
109
|
+
};
|
|
110
|
+
var registeredValues = {
|
|
111
|
+
radius: /* @__PURE__ */ new Map(),
|
|
112
|
+
elevation: /* @__PURE__ */ new Map(),
|
|
113
|
+
border: /* @__PURE__ */ new Map()
|
|
114
|
+
};
|
|
115
|
+
var registeredDensities = /* @__PURE__ */ new Map();
|
|
116
|
+
function isBuiltIn(axis, name) {
|
|
117
|
+
return BUILT_IN_NAMES[axis].includes(name);
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Adds a radius, elevation or border value every component with that axis
|
|
121
|
+
* accepts. `css` is one CSS value: a length for radius and border, a
|
|
122
|
+
* `box-shadow` for elevation. Registering a built-in name is ignored with a
|
|
123
|
+
* warning: built-ins never change. Registering an existing custom name
|
|
124
|
+
* replaces its value.
|
|
125
|
+
*/
|
|
126
|
+
function registerStyleValue(axis, name, css) {
|
|
127
|
+
if (isBuiltIn(axis, name)) {
|
|
128
|
+
console.warn(`registerStyleValue: "${name}" is a built-in ${axis} and cannot be replaced.`);
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
registeredValues[axis].set(name, css);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Adds a density: the tokens it sets on the container that takes it. Same
|
|
135
|
+
* rules as {@link registerStyleValue}.
|
|
136
|
+
*/
|
|
137
|
+
function registerDensity(name, tokens) {
|
|
138
|
+
if (isBuiltIn("density", name)) {
|
|
139
|
+
console.warn(`registerDensity: "${name}" is a built-in density and cannot be replaced.`);
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
registeredDensities.set(name, { ...tokens });
|
|
143
|
+
}
|
|
144
|
+
/** The built-in values of an axis followed by every registered one. */
|
|
145
|
+
function listStyleValues(axis) {
|
|
146
|
+
const registered = axis === "density" ? registeredDensities : registeredValues[axis];
|
|
147
|
+
return [...BUILT_IN_NAMES[axis], ...registered.keys()];
|
|
148
|
+
}
|
|
149
|
+
/** The CSS for a value of an axis, or `undefined` when it is unknown. */
|
|
150
|
+
function resolveStyleValue(axis, value) {
|
|
151
|
+
if (isBuiltIn(axis, value)) return BUILT_IN_VALUES[axis][value];
|
|
152
|
+
return registeredValues[axis].get(value);
|
|
153
|
+
}
|
|
154
|
+
/** The tokens a density sets, or `undefined` when it is unknown. */
|
|
155
|
+
function resolveDensity(value) {
|
|
156
|
+
if (isBuiltIn("density", value)) return { ...BUILT_IN_DENSITIES[value] };
|
|
157
|
+
const tokens = registeredDensities.get(value);
|
|
158
|
+
return tokens && { ...tokens };
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Inline style for a container's `density` prop: the density's tokens, which
|
|
162
|
+
* inherit, so everything inside the container takes them. `undefined` (no
|
|
163
|
+
* prop, or an unknown name) leaves the DOM unchanged.
|
|
164
|
+
*/
|
|
165
|
+
function densityStyle(density) {
|
|
166
|
+
return density === void 0 ? void 0 : resolveDensity(density);
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* The private custom property each axis sets on a component's root. Parts
|
|
170
|
+
* read it first, then the role token, then their own literal, in one var()
|
|
171
|
+
* chain. (No example class here: the stylesheet scans `dist/`, so a class
|
|
172
|
+
* written in this comment would be generated.)
|
|
173
|
+
*/
|
|
174
|
+
var STYLE_AXIS_VARIABLES = {
|
|
175
|
+
radius: "--espd-own-radius",
|
|
176
|
+
elevation: "--espd-own-elevation",
|
|
177
|
+
border: "--espd-own-border-width"
|
|
178
|
+
};
|
|
179
|
+
/**
|
|
180
|
+
* The styles of a component with style axes. For each axis it takes whose
|
|
181
|
+
* prop is set (and resolves), it sets the private variable.
|
|
182
|
+
*
|
|
183
|
+
* - `style`: for the root, with the caller's `style` merged last. With no
|
|
184
|
+
* axis prop set it is the caller's `style` itself, so the DOM is unchanged.
|
|
185
|
+
* - `partStyle`: the private variables alone, for every other element of the
|
|
186
|
+
* component that reads them. The stylesheet registers them as
|
|
187
|
+
* non-inheriting (`@property … { inherits: false }`), so each element that
|
|
188
|
+
* reads one must carry it; that is also what keeps a value from leaking
|
|
189
|
+
* into nested components.
|
|
190
|
+
*/
|
|
191
|
+
function useStyleAxes(props, axes) {
|
|
192
|
+
const { radius, elevation, border, style } = props;
|
|
193
|
+
const key = axes.join(" ");
|
|
194
|
+
return React$1.useMemo(() => {
|
|
195
|
+
const values = {
|
|
196
|
+
radius,
|
|
197
|
+
elevation,
|
|
198
|
+
border
|
|
199
|
+
};
|
|
200
|
+
const own = {};
|
|
201
|
+
for (const axis of key.split(" ").filter(Boolean)) {
|
|
202
|
+
const value = values[axis];
|
|
203
|
+
const css = value !== void 0 ? resolveStyleValue(axis, value) : void 0;
|
|
204
|
+
if (css) own[STYLE_AXIS_VARIABLES[axis]] = css;
|
|
205
|
+
}
|
|
206
|
+
if (Object.keys(own).length === 0) return {
|
|
207
|
+
style,
|
|
208
|
+
partStyle: void 0
|
|
209
|
+
};
|
|
210
|
+
const partStyle = own;
|
|
211
|
+
return {
|
|
212
|
+
style: {
|
|
213
|
+
...partStyle,
|
|
214
|
+
...style
|
|
215
|
+
},
|
|
216
|
+
partStyle
|
|
217
|
+
};
|
|
218
|
+
}, [
|
|
219
|
+
radius,
|
|
220
|
+
elevation,
|
|
221
|
+
border,
|
|
222
|
+
style,
|
|
223
|
+
key
|
|
224
|
+
]);
|
|
225
|
+
}
|
|
226
|
+
//#endregion
|
|
227
|
+
export { BORDERS, DENSITIES, ELEVATIONS, RADII, STYLE_AXIS_VARIABLES, densityStyle, listStyleValues, registerDensity, registerStyleValue, resolveDensity, resolveStyleValue, useStyleAxes };
|
package/dist/utils/variant.js
CHANGED
|
@@ -2,12 +2,37 @@ import { cn } from "./cn.js";
|
|
|
2
2
|
import { isPresetColor, resolveColor } from "./color.js";
|
|
3
3
|
import { SILVER_SOLID_SURFACE_STYLE } from "./silver-shine.js";
|
|
4
4
|
//#region src/utils/variant.ts
|
|
5
|
+
/** The five built-in variants. Registered variants are in {@link listVariants}. */
|
|
5
6
|
var VARIANTS = [
|
|
6
7
|
"outline",
|
|
7
8
|
"solid",
|
|
8
9
|
"soft",
|
|
9
|
-
"gradient"
|
|
10
|
+
"gradient",
|
|
11
|
+
"glow"
|
|
10
12
|
];
|
|
13
|
+
var registeredVariants = /* @__PURE__ */ new Map();
|
|
14
|
+
function isBuiltInVariant(variant) {
|
|
15
|
+
return VARIANTS.includes(variant);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Adds a variant every variant-driven component accepts (Badge, Alert, Tag,
|
|
19
|
+
* SimpleClickableCard, Toast, …). Its styles come from `recipe(color)`, in the
|
|
20
|
+
* same shape `resolveVariantStyles` returns; built-in-only extras such as the
|
|
21
|
+
* gradient hover layers or silver overlays are opt-in fields of that shape.
|
|
22
|
+
* Registering a built-in name is ignored with a warning: built-ins never change.
|
|
23
|
+
* Registering an existing custom name replaces its recipe.
|
|
24
|
+
*/
|
|
25
|
+
function registerVariant(name, recipe) {
|
|
26
|
+
if (isBuiltInVariant(name)) {
|
|
27
|
+
console.warn(`registerVariant: "${name}" is a built-in variant and cannot be replaced.`);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
registeredVariants.set(name, recipe);
|
|
31
|
+
}
|
|
32
|
+
/** The built-in variants followed by every registered one. */
|
|
33
|
+
function listVariants() {
|
|
34
|
+
return [...VARIANTS, ...registeredVariants.keys()];
|
|
35
|
+
}
|
|
11
36
|
/** Duration (ms) for shared gradient hover animations (preset surfaces + overlay crossfade). */
|
|
12
37
|
var VARIANT_GRADIENT_TRANSITION_DURATION_MS = 2e3;
|
|
13
38
|
/**
|
|
@@ -116,6 +141,11 @@ var PRESET_VARIANT_STYLES = {
|
|
|
116
141
|
container: "",
|
|
117
142
|
foreground: "text-primary",
|
|
118
143
|
description: "text-primary/60"
|
|
144
|
+
},
|
|
145
|
+
glow: {
|
|
146
|
+
container: "border border-primary/15 bg-primary/4 text-primary shadow-glow shadow-primary/45 [&>svg]:text-primary",
|
|
147
|
+
foreground: "text-primary",
|
|
148
|
+
description: "text-primary/80"
|
|
119
149
|
}
|
|
120
150
|
},
|
|
121
151
|
secondary: {
|
|
@@ -138,6 +168,11 @@ var PRESET_VARIANT_STYLES = {
|
|
|
138
168
|
container: "",
|
|
139
169
|
foreground: "text-secondary",
|
|
140
170
|
description: "text-secondary/60"
|
|
171
|
+
},
|
|
172
|
+
glow: {
|
|
173
|
+
container: "border border-secondary/15 bg-secondary/4 text-secondary shadow-glow shadow-secondary/45 [&>svg]:text-secondary",
|
|
174
|
+
foreground: "text-secondary",
|
|
175
|
+
description: "text-secondary/80"
|
|
141
176
|
}
|
|
142
177
|
},
|
|
143
178
|
info: {
|
|
@@ -160,6 +195,11 @@ var PRESET_VARIANT_STYLES = {
|
|
|
160
195
|
container: "",
|
|
161
196
|
foreground: "text-info",
|
|
162
197
|
description: "text-info/60"
|
|
198
|
+
},
|
|
199
|
+
glow: {
|
|
200
|
+
container: "border border-info/15 bg-info/4 text-info shadow-glow shadow-info/45 [&>svg]:text-info",
|
|
201
|
+
foreground: "text-info",
|
|
202
|
+
description: "text-info/80"
|
|
163
203
|
}
|
|
164
204
|
},
|
|
165
205
|
warning: {
|
|
@@ -182,6 +222,11 @@ var PRESET_VARIANT_STYLES = {
|
|
|
182
222
|
container: "",
|
|
183
223
|
foreground: "text-warning",
|
|
184
224
|
description: "text-warning/60"
|
|
225
|
+
},
|
|
226
|
+
glow: {
|
|
227
|
+
container: "border border-warning/15 bg-warning/4 text-warning shadow-glow shadow-warning/45 [&>svg]:text-warning",
|
|
228
|
+
foreground: "text-warning",
|
|
229
|
+
description: "text-warning"
|
|
185
230
|
}
|
|
186
231
|
},
|
|
187
232
|
error: {
|
|
@@ -204,6 +249,11 @@ var PRESET_VARIANT_STYLES = {
|
|
|
204
249
|
container: "",
|
|
205
250
|
foreground: "text-error",
|
|
206
251
|
description: "text-error/60"
|
|
252
|
+
},
|
|
253
|
+
glow: {
|
|
254
|
+
container: "border border-error/15 bg-error/4 text-error shadow-glow shadow-error/45 [&>svg]:text-error",
|
|
255
|
+
foreground: "text-error",
|
|
256
|
+
description: "text-error/80"
|
|
207
257
|
}
|
|
208
258
|
},
|
|
209
259
|
success: {
|
|
@@ -226,6 +276,11 @@ var PRESET_VARIANT_STYLES = {
|
|
|
226
276
|
container: "",
|
|
227
277
|
foreground: "text-success",
|
|
228
278
|
description: "text-success/60"
|
|
279
|
+
},
|
|
280
|
+
glow: {
|
|
281
|
+
container: "border border-success/15 bg-success/4 text-success shadow-glow shadow-success/45 [&>svg]:text-success",
|
|
282
|
+
foreground: "text-success",
|
|
283
|
+
description: "text-success/80"
|
|
229
284
|
}
|
|
230
285
|
},
|
|
231
286
|
disabled: {
|
|
@@ -248,6 +303,11 @@ var PRESET_VARIANT_STYLES = {
|
|
|
248
303
|
container: "",
|
|
249
304
|
foreground: "text-disabled",
|
|
250
305
|
description: "text-disabled/60"
|
|
306
|
+
},
|
|
307
|
+
glow: {
|
|
308
|
+
container: "border border-disabled/15 bg-disabled/4 text-disabled shadow-glow shadow-disabled/45 [&>svg]:text-disabled",
|
|
309
|
+
foreground: "text-disabled",
|
|
310
|
+
description: "text-disabled/80"
|
|
251
311
|
}
|
|
252
312
|
},
|
|
253
313
|
gray: {
|
|
@@ -270,6 +330,11 @@ var PRESET_VARIANT_STYLES = {
|
|
|
270
330
|
container: "",
|
|
271
331
|
foreground: "text-gray",
|
|
272
332
|
description: "text-gray/60"
|
|
333
|
+
},
|
|
334
|
+
glow: {
|
|
335
|
+
container: "border border-gray/15 bg-gray/4 text-gray shadow-glow shadow-gray/45 [&>svg]:text-gray",
|
|
336
|
+
foreground: "text-gray",
|
|
337
|
+
description: "text-gray/80"
|
|
273
338
|
}
|
|
274
339
|
},
|
|
275
340
|
mist: {
|
|
@@ -292,6 +357,11 @@ var PRESET_VARIANT_STYLES = {
|
|
|
292
357
|
container: "",
|
|
293
358
|
foreground: "text-mist-foreground",
|
|
294
359
|
description: "text-mist-secondary"
|
|
360
|
+
},
|
|
361
|
+
glow: {
|
|
362
|
+
container: "border border-mist-foreground/15 bg-mist-foreground/4 text-mist-foreground shadow-glow shadow-mist-foreground/45 [&>svg]:text-mist-foreground",
|
|
363
|
+
foreground: "text-mist-foreground",
|
|
364
|
+
description: "text-mist-secondary"
|
|
295
365
|
}
|
|
296
366
|
}
|
|
297
367
|
};
|
|
@@ -322,8 +392,18 @@ var SILVER_VARIANT_ROWS = {
|
|
|
322
392
|
container: "",
|
|
323
393
|
foreground: "text-gray",
|
|
324
394
|
description: "text-gray/60"
|
|
395
|
+
},
|
|
396
|
+
glow: {
|
|
397
|
+
container: "border border-gray/15 bg-gray/4 text-gray shadow-glow shadow-gray/45 [&>svg]:text-gray",
|
|
398
|
+
foreground: "text-gray",
|
|
399
|
+
description: "text-gray/80"
|
|
325
400
|
}
|
|
326
401
|
};
|
|
402
|
+
/**
|
|
403
|
+
* Text and icon colour on a `solid` surface of an arbitrary colour: the
|
|
404
|
+
* `--espd-on-solid-foreground` token (white by default) for inline styles.
|
|
405
|
+
*/
|
|
406
|
+
var ON_SOLID_FOREGROUND = "var(--espd-on-solid-foreground, #fff)";
|
|
327
407
|
function getArbitraryVariantStyles(variant, color) {
|
|
328
408
|
const text = resolveColor(color, "text");
|
|
329
409
|
const border = resolveColor(color, "border");
|
|
@@ -351,14 +431,26 @@ function getArbitraryVariantStyles(variant, color) {
|
|
|
351
431
|
...text.style
|
|
352
432
|
}
|
|
353
433
|
};
|
|
434
|
+
if (variant === "glow") return {
|
|
435
|
+
container: cn("border [&>svg]:text-current", text.className),
|
|
436
|
+
foreground: text.className ?? "",
|
|
437
|
+
foregroundStyle: text.style,
|
|
438
|
+
description: "text-current/80",
|
|
439
|
+
containerStyle: {
|
|
440
|
+
backgroundColor: `color-mix(in oklab, ${color} 4%, transparent)`,
|
|
441
|
+
borderColor: `color-mix(in oklab, ${color} 15%, transparent)`,
|
|
442
|
+
boxShadow: `0 0 15px -5.5px color-mix(in oklab, ${color} 45%, transparent)`,
|
|
443
|
+
...text.style
|
|
444
|
+
}
|
|
445
|
+
};
|
|
354
446
|
if (variant === "solid") return {
|
|
355
|
-
container: "border border-transparent text-
|
|
356
|
-
foreground: "text-
|
|
357
|
-
foregroundStyle: { color:
|
|
358
|
-
description: "text-
|
|
447
|
+
container: "border border-transparent text-[color:var(--espd-on-solid-foreground,#fff)] [&>svg]:text-[color:var(--espd-on-solid-foreground,#fff)]",
|
|
448
|
+
foreground: "text-[color:var(--espd-on-solid-foreground,#fff)]",
|
|
449
|
+
foregroundStyle: { color: ON_SOLID_FOREGROUND },
|
|
450
|
+
description: "text-[color:var(--espd-on-solid-foreground,#fff)]/80",
|
|
359
451
|
containerStyle: {
|
|
360
452
|
backgroundColor: color,
|
|
361
|
-
color:
|
|
453
|
+
color: ON_SOLID_FOREGROUND
|
|
362
454
|
}
|
|
363
455
|
};
|
|
364
456
|
return {
|
|
@@ -385,9 +477,13 @@ function getArbitraryVariantStyles(variant, color) {
|
|
|
385
477
|
/**
|
|
386
478
|
* Resolve a `(variant, color)` tuple to container/foreground/description
|
|
387
479
|
* classes (and inline styles for arbitrary colors). Single source of truth
|
|
388
|
-
* for the
|
|
480
|
+
* for the five standard variants across Alert, Badge, Tag, SimpleClickableCard.
|
|
389
481
|
*/
|
|
390
482
|
function resolveVariantStyles(variant, color) {
|
|
483
|
+
if (!isBuiltInVariant(variant)) {
|
|
484
|
+
const recipe = registeredVariants.get(variant);
|
|
485
|
+
if (recipe) return recipe(color);
|
|
486
|
+
}
|
|
391
487
|
if (color === "silver") {
|
|
392
488
|
const row = SILVER_VARIANT_ROWS[variant];
|
|
393
489
|
if (variant === "gradient") return {
|
|
@@ -423,4 +519,4 @@ function resolveVariantStyles(variant, color) {
|
|
|
423
519
|
return getArbitraryVariantStyles(variant, color);
|
|
424
520
|
}
|
|
425
521
|
//#endregion
|
|
426
|
-
export { PRESET_GRADIENT_BACKDROP, PRESET_GRADIENT_FRAME, SILVER_GRADIENT_BACKDROP, VARIANTS, VARIANT_GRADIENT_BACKDROP_BASE, VARIANT_GRADIENT_DURATION_CLASS, VARIANT_GRADIENT_HOVER_OVERLAY_CLASS, VARIANT_GRADIENT_TRANSITION_DURATION_MS, arbitraryGradientBackgroundImage, resolveVariantStyles };
|
|
522
|
+
export { PRESET_GRADIENT_BACKDROP, PRESET_GRADIENT_FRAME, SILVER_GRADIENT_BACKDROP, VARIANTS, VARIANT_GRADIENT_BACKDROP_BASE, VARIANT_GRADIENT_DURATION_CLASS, VARIANT_GRADIENT_HOVER_OVERLAY_CLASS, VARIANT_GRADIENT_TRANSITION_DURATION_MS, arbitraryGradientBackgroundImage, listVariants, registerVariant, resolveVariantStyles };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { flushSync } from "react-dom";
|
|
2
|
+
//#region src/utils/view-transition.ts
|
|
3
|
+
/**
|
|
4
|
+
* Apply a React state change inside a view transition, so elements carrying
|
|
5
|
+
* `view-transition-morph` / `view-transition-glide` animate from their old
|
|
6
|
+
* place to their new one. Where the browser has no View Transitions, or the
|
|
7
|
+
* user asked for reduced motion, the change is applied directly.
|
|
8
|
+
*/
|
|
9
|
+
function startViewTransition(update) {
|
|
10
|
+
const canTransition = typeof document !== "undefined" && typeof document.startViewTransition === "function";
|
|
11
|
+
const reduce = typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
12
|
+
if (!canTransition || reduce) {
|
|
13
|
+
update();
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
document.startViewTransition(() => {
|
|
17
|
+
flushSync(update);
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { startViewTransition };
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { P as PresetColor, C as Color } from './index-BQANnKs9.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The variant names `resolveVariantStyles` accepts. An app adds its own by
|
|
6
|
+
* declaration merging plus `registerVariant` at runtime:
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* declare module "@espressif/dashboard-ui-components/utils" {
|
|
10
|
+
* interface VariantRegistry { glow: true }
|
|
11
|
+
* }
|
|
12
|
+
* registerVariant("glow", (color) => ({ container: "…", foreground: "…", description: "…" }))
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
interface VariantRegistry {
|
|
16
|
+
outline: true;
|
|
17
|
+
solid: true;
|
|
18
|
+
soft: true;
|
|
19
|
+
gradient: true;
|
|
20
|
+
glow: true;
|
|
21
|
+
}
|
|
22
|
+
type Variant = keyof VariantRegistry;
|
|
23
|
+
/** The five built-in variants. Registered variants are in {@link listVariants}. */
|
|
24
|
+
declare const VARIANTS: readonly ["outline", "solid", "soft", "gradient", "glow"];
|
|
25
|
+
type BuiltInVariant = (typeof VARIANTS)[number];
|
|
26
|
+
/** Builds a registered variant's styles for one colour (preset, "silver" or any CSS colour). */
|
|
27
|
+
type VariantRecipe = (color: Color) => VariantStyles;
|
|
28
|
+
/**
|
|
29
|
+
* Adds a variant every variant-driven component accepts (Badge, Alert, Tag,
|
|
30
|
+
* SimpleClickableCard, Toast, …). Its styles come from `recipe(color)`, in the
|
|
31
|
+
* same shape `resolveVariantStyles` returns; built-in-only extras such as the
|
|
32
|
+
* gradient hover layers or silver overlays are opt-in fields of that shape.
|
|
33
|
+
* Registering a built-in name is ignored with a warning: built-ins never change.
|
|
34
|
+
* Registering an existing custom name replaces its recipe.
|
|
35
|
+
*/
|
|
36
|
+
declare function registerVariant(name: Exclude<Variant, BuiltInVariant>, recipe: VariantRecipe): void;
|
|
37
|
+
/** The built-in variants followed by every registered one. */
|
|
38
|
+
declare function listVariants(): Variant[];
|
|
39
|
+
/** Duration (ms) for shared gradient hover animations (preset surfaces + overlay crossfade). */
|
|
40
|
+
declare const VARIANT_GRADIENT_TRANSITION_DURATION_MS = 2000;
|
|
41
|
+
/**
|
|
42
|
+
* Tailwind duration class — keep in sync with {@link VARIANT_GRADIENT_TRANSITION_DURATION_MS}
|
|
43
|
+
* so preset gradients, arbitrary gradient styles, and gradient backdrop overlays feel consistent.
|
|
44
|
+
*/
|
|
45
|
+
declare const VARIANT_GRADIENT_DURATION_CLASS: "duration-[2000ms]";
|
|
46
|
+
/**
|
|
47
|
+
* Gradient hover cannot interpolate between two Tailwind `background-image` values on one
|
|
48
|
+
* element (it snaps). Preset gradients use crossfading absolute underlays + `opacity` instead.
|
|
49
|
+
*/
|
|
50
|
+
declare const VARIANT_GRADIENT_BACKDROP_BASE = "pointer-events-none absolute inset-0 -z-10 rounded-[inherit] bg-[length:100%_100%]";
|
|
51
|
+
declare const VARIANT_GRADIENT_HOVER_OVERLAY_CLASS: string;
|
|
52
|
+
/** Transparent frame + text/icon tint — gradients paint on {@link PRESET_GRADIENT_BACKDROP} layers. */
|
|
53
|
+
declare const PRESET_GRADIENT_FRAME: Record<PresetColor, string>;
|
|
54
|
+
declare const PRESET_GRADIENT_BACKDROP: Record<PresetColor, {
|
|
55
|
+
idle: string;
|
|
56
|
+
hover: string;
|
|
57
|
+
}>;
|
|
58
|
+
interface VariantStyles {
|
|
59
|
+
/** Container/surface classes (background, border, text). */
|
|
60
|
+
container: string;
|
|
61
|
+
containerStyle?: React.CSSProperties;
|
|
62
|
+
/** Foreground/text classes (use on labels, icons not living inside the container). */
|
|
63
|
+
foreground: string;
|
|
64
|
+
foregroundStyle?: React.CSSProperties;
|
|
65
|
+
/** Description/secondary text classes (slightly de-emphasized). */
|
|
66
|
+
description: string;
|
|
67
|
+
descriptionStyle?: React.CSSProperties;
|
|
68
|
+
/**
|
|
69
|
+
* Preset `gradient` only: idle/hover gradient utility classes for absolute underlay spans
|
|
70
|
+
* (smooth hover = opacity crossfade, see {@link VARIANT_GRADIENT_BACKDROP_BASE}).
|
|
71
|
+
*/
|
|
72
|
+
gradientHoverLayers?: {
|
|
73
|
+
idle: string;
|
|
74
|
+
hover: string;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Non-preset `gradient` only: inline `backgroundImage` for each underlay (same crossfade pattern).
|
|
78
|
+
*/
|
|
79
|
+
gradientHoverLayersInline?: {
|
|
80
|
+
idle: React.CSSProperties;
|
|
81
|
+
hover: React.CSSProperties;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* `color === "silver" + variant === "gradient"`: render the metallic shine overlay (subtle
|
|
85
|
+
* surface-wide linear-gradient + inset bezel) on top of the gradient underlay layers.
|
|
86
|
+
* See `SilverShineOverlay`.
|
|
87
|
+
*/
|
|
88
|
+
silverShine?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* `color === "silver" + variant === "outline"`: render the metallic ring overlay (1px gradient
|
|
91
|
+
* border with a truly transparent interior). See `SilverMetallicBorderOverlay`.
|
|
92
|
+
*/
|
|
93
|
+
silverBorder?: boolean;
|
|
94
|
+
}
|
|
95
|
+
/** Non-preset `gradient` variant: `backgroundImage` for arbitrary colors (`idle` / `hover`). */
|
|
96
|
+
declare function arbitraryGradientBackgroundImage(color: string, emphasis: "idle" | "hover"): string;
|
|
97
|
+
/**
|
|
98
|
+
* Resolve a `(variant, color)` tuple to container/foreground/description
|
|
99
|
+
* classes (and inline styles for arbitrary colors). Single source of truth
|
|
100
|
+
* for the five standard variants across Alert, Badge, Tag, SimpleClickableCard.
|
|
101
|
+
*/
|
|
102
|
+
declare function resolveVariantStyles(variant: Variant, color: Color): VariantStyles;
|
|
103
|
+
|
|
104
|
+
export { PRESET_GRADIENT_BACKDROP as P, VARIANTS as V, PRESET_GRADIENT_FRAME as a, VARIANT_GRADIENT_BACKDROP_BASE as b, VARIANT_GRADIENT_DURATION_CLASS as c, VARIANT_GRADIENT_HOVER_OVERLAY_CLASS as d, VARIANT_GRADIENT_TRANSITION_DURATION_MS as e, type Variant as f, type VariantRecipe as g, type VariantRegistry as h, type VariantStyles as i, arbitraryGradientBackgroundImage as j, resolveVariantStyles as k, listVariants as l, registerVariant as r };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* `stale`: done once, but what it was made from has changed since, so it needs
|
|
5
|
+
* doing again. Drawn in `warning`; counts as reached.
|
|
6
|
+
*
|
|
7
|
+
* `failed`: it ran and did not succeed (a check that found a problem, a build
|
|
8
|
+
* that broke). Drawn in `error`; counts as reached.
|
|
9
|
+
*/
|
|
10
|
+
type VerticalStepperStepStatus = "in_progress" | "not_started" | "complete" | "stale" | "failed";
|
|
11
|
+
type VerticalStepperSize = "sm" | "default" | "lg";
|
|
12
|
+
interface VerticalStepperStep {
|
|
13
|
+
id: string;
|
|
14
|
+
title: string;
|
|
15
|
+
description: string;
|
|
16
|
+
icon: ReactNode;
|
|
17
|
+
status: VerticalStepperStepStatus;
|
|
18
|
+
endAction?: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
interface VerticalStepperProps {
|
|
21
|
+
data: VerticalStepperStep[];
|
|
22
|
+
onStepClick?: (id: string) => void;
|
|
23
|
+
size?: VerticalStepperSize;
|
|
24
|
+
className?: string;
|
|
25
|
+
/** Defaults to "Progress" */
|
|
26
|
+
ariaLabel?: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type { VerticalStepperProps as V, VerticalStepperSize as a, VerticalStepperStep as b, VerticalStepperStepStatus as c };
|