@espressif/dashboard-ui-components 1.11.2 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/rules/dashboard-ui-consumption.md +176 -5
- package/.cursor/rules/dashboard-ui-consumption.mdc +163 -4
- package/CHANGELOG.md +1005 -0
- package/README.md +240 -7
- package/THIRD-PARTY-NOTICES.md +2 -1
- package/dist/alert.props-CcKo49Rb.d.ts +44 -0
- package/dist/animation/index.d.ts +3 -0
- package/dist/animation/index.js +3 -0
- package/dist/avatar.props-2q5BsX-R.d.ts +29 -0
- package/dist/button-BK-DIR_L.d.ts +21 -0
- package/dist/button-BxJ7s6sR.d.ts +76 -0
- package/dist/calendar.props-BtCzuWH1.d.ts +12 -0
- package/dist/carousel/index.d.ts +2 -0
- package/dist/carousel/index.js +2 -0
- package/dist/charts/index.d.ts +5 -0
- package/dist/charts/index.js +9 -0
- package/dist/common/app-logo/app-logo.js +1 -1
- package/dist/common/index.d.ts +9 -20
- package/dist/common/my-account-menu/my-account-menu.js +45 -13
- package/dist/common/profile-card/profile-card.js +3 -2
- package/dist/components/accordion/accordion.js +14 -5
- package/dist/components/accordion/index.d.ts +36 -0
- package/dist/components/accordion/index.js +2 -0
- package/dist/components/advanced-search-box/advanced-search-box.js +8 -2
- package/dist/components/advanced-search-box/index.d.ts +29 -0
- package/dist/components/advanced-search-box/index.js +2 -0
- package/dist/components/alert/alert.js +2 -1
- package/dist/components/alert/index.d.ts +12 -0
- package/dist/components/alert/index.js +2 -0
- package/dist/components/anchored-panel/anchored-panel.js +83 -0
- package/dist/components/anchored-panel/index.d.ts +31 -0
- package/dist/components/anchored-panel/index.js +2 -0
- package/dist/components/animated-containers/index.d.ts +13 -0
- package/dist/components/animated-containers/index.js +2 -0
- package/dist/components/async-multi-select/async-multi-select.js +48 -7
- package/dist/components/async-multi-select/index.d.ts +63 -0
- package/dist/components/async-multi-select/index.js +2 -0
- package/dist/components/avatar/avatar.js +11 -4
- package/dist/components/avatar/index.d.ts +8 -0
- package/dist/components/avatar/index.js +2 -0
- package/dist/components/avatar-group/avatar-group.js +35 -0
- package/dist/components/avatar-group/index.d.ts +31 -0
- package/dist/components/avatar-group/index.js +2 -0
- package/dist/components/badge/index.d.ts +14 -0
- package/dist/components/badge/index.js +2 -0
- package/dist/components/breadcrumb/index.d.ts +21 -0
- package/dist/components/breadcrumb/index.js +2 -0
- package/dist/components/bubble/bubble.js +18 -0
- package/dist/components/bubble/index.d.ts +19 -0
- package/dist/components/bubble/index.js +2 -0
- package/dist/components/button/button.js +87 -25
- package/dist/components/button/flash-button.js +9 -3
- package/dist/components/button/index.d.ts +56 -0
- package/dist/components/button/index.js +6 -0
- package/dist/components/button-group/index.d.ts +16 -0
- package/dist/components/button-group/index.js +2 -0
- package/dist/components/calendar/calendar.js +5 -5
- package/dist/components/calendar/index.d.ts +11 -0
- package/dist/components/calendar/index.js +2 -0
- package/dist/components/card/index.d.ts +11 -0
- package/dist/components/card/index.js +2 -0
- package/dist/components/card-rail/card-rail.js +50 -0
- package/dist/components/card-rail/index.d.ts +30 -0
- package/dist/components/card-rail/index.js +2 -0
- package/dist/components/cards/collapsible-card.js +5 -2
- package/dist/components/cards/index.d.ts +16200 -0
- package/dist/components/cards/index.js +8 -0
- package/dist/components/cards/section-card.js +133 -8
- package/dist/components/cards/simple-card.js +5 -2
- package/dist/components/carousel/carousel.js +137 -49
- package/dist/components/carousel/index.d.ts +130 -0
- package/dist/components/carousel/index.js +2 -0
- package/dist/components/category-card/category-card.js +111 -0
- package/dist/components/category-card/index.d.ts +55 -0
- package/dist/components/category-card/index.js +2 -0
- package/dist/components/chart/area-chart.js +95 -85
- package/dist/components/chart/bar-chart.js +123 -60
- package/dist/components/chart/chart.js +127 -3
- package/dist/components/chart/composed-chart.js +109 -98
- package/dist/components/chart/donut-chart.js +23 -5
- package/dist/components/chart/index.d.ts +732 -0
- package/dist/components/chart/index.js +9 -0
- package/dist/components/chart/line-chart.js +93 -83
- package/dist/components/chart/treemap-chart.js +71 -58
- package/dist/components/check-badge/check-badge.js +25 -0
- package/dist/components/check-badge/index.d.ts +13 -0
- package/dist/components/check-badge/index.js +2 -0
- package/dist/components/checkbox/index.d.ts +8 -0
- package/dist/components/checkbox/index.js +2 -0
- package/dist/components/choice-card/choice-card.js +99 -0
- package/dist/components/choice-card/index.d.ts +41 -0
- package/dist/components/choice-card/index.js +2 -0
- package/dist/components/circular-progress/circular-progress.js +5 -2
- package/dist/components/circular-progress/index.d.ts +23 -0
- package/dist/components/circular-progress/index.js +2 -0
- package/dist/components/code/index.d.ts +40 -0
- package/dist/components/code/index.js +2 -0
- package/dist/components/code-editor/code-editor.js +9 -3
- package/dist/components/code-editor/index.d.ts +82 -0
- package/dist/components/code-editor/index.js +2 -0
- package/dist/components/collapsible/index.d.ts +42 -0
- package/dist/components/collapsible/index.js +2 -0
- package/dist/components/column-panel/column-panel.js +38 -0
- package/dist/components/column-panel/index.d.ts +37 -0
- package/dist/components/column-panel/index.js +3 -0
- package/dist/components/column-panel/use-panel-flag.js +27 -0
- package/dist/components/combobox/index.d.ts +28 -0
- package/dist/components/combobox/index.js +2 -0
- package/dist/components/confirmation-dialog/confirmation-dialog.js +1 -1
- package/dist/components/confirmation-dialog/index.d.ts +40 -0
- package/dist/components/confirmation-dialog/index.js +3 -0
- package/dist/components/content-container/index.d.ts +16 -0
- package/dist/components/content-container/index.js +2 -0
- package/dist/components/copiable-text/index.d.ts +33 -0
- package/dist/components/copiable-text/index.js +2 -0
- package/dist/components/coverflow/_constants/coverflow-poses.js +23 -0
- package/dist/components/coverflow/_constants/coverflow-shapes.js +23 -0
- package/dist/components/coverflow/_hooks/use-coverflow.js +90 -0
- package/dist/components/coverflow/_utils/ring.js +24 -0
- package/dist/components/coverflow/coverflow.js +198 -0
- package/dist/components/coverflow/index.d.ts +105 -0
- package/dist/components/coverflow/index.js +2 -0
- package/dist/components/data-table/data-table.js +9 -2
- package/dist/components/data-table/index.d.ts +120 -0
- package/dist/components/data-table/index.js +3 -0
- package/dist/components/date-picker/date-picker.js +5 -2
- package/dist/components/date-picker/index.d.ts +50 -0
- package/dist/components/date-picker/index.js +2 -0
- package/dist/components/date-range-picker/date-range-picker.js +11 -2
- package/dist/components/date-range-picker/index.d.ts +100 -0
- package/dist/components/date-range-picker/index.js +3 -0
- package/dist/components/date-time-picker/date-time-picker.js +5 -2
- package/dist/components/date-time-picker/index.d.ts +79 -0
- package/dist/components/date-time-picker/index.js +2 -0
- package/dist/components/device-icon/index.d.ts +17 -0
- package/dist/components/device-icon/index.js +2 -0
- package/dist/components/dialog/index.d.ts +38 -0
- package/dist/components/dialog/index.js +2 -0
- package/dist/components/dropdown-menu/index.d.ts +57 -0
- package/dist/components/dropdown-menu/index.js +2 -0
- package/dist/components/dynamic-list/dynamic-list.js +4 -4
- package/dist/components/dynamic-list/index.d.ts +74 -0
- package/dist/components/dynamic-list/index.js +2 -0
- package/dist/components/error-display/index.d.ts +17 -0
- package/dist/components/error-display/index.js +3 -0
- package/dist/components/expandable-text/expandable-text-overlay.js +78 -0
- package/dist/components/expandable-text/expandable-text.js +73 -0
- package/dist/components/expandable-text/index.d.ts +39 -0
- package/dist/components/expandable-text/index.js +2 -0
- package/dist/components/expandable-text/use-clamped.js +23 -0
- package/dist/components/facet-filters/_hooks/use-filter-group.js +51 -0
- package/dist/components/facet-filters/active-filters.js +31 -0
- package/dist/components/facet-filters/filter-group.js +110 -0
- package/dist/components/facet-filters/filters-panel.js +59 -0
- package/dist/components/facet-filters/filters-pill.js +40 -0
- package/dist/components/facet-filters/index.d.ts +104 -0
- package/dist/components/facet-filters/index.js +6 -0
- package/dist/components/facet-filters/use-filters-collapsed.js +21 -0
- package/dist/components/feature-grid/feature-grid.js +115 -0
- package/dist/components/feature-grid/index.d.ts +53 -0
- package/dist/components/feature-grid/index.js +2 -0
- package/dist/components/file-input/file-input.js +9 -3
- package/dist/components/file-input/index.d.ts +78 -0
- package/dist/components/file-input/index.js +2 -0
- package/dist/components/file-upload/file-upload.js +10 -5
- package/dist/components/file-upload/index.d.ts +38 -0
- package/dist/components/file-upload/index.js +2 -0
- package/dist/components/filters-bar/filters-bar.js +5 -1
- package/dist/components/filters-bar/index.d.ts +26 -0
- package/dist/components/filters-bar/index.js +2 -0
- package/dist/components/flip-card/flip-card.js +147 -0
- package/dist/components/flip-card/index.d.ts +43 -0
- package/dist/components/flip-card/index.js +2 -0
- package/dist/components/floating-window/_hooks/use-drag-move.js +76 -0
- package/dist/components/floating-window/floating-window.js +97 -0
- package/dist/components/floating-window/index.d.ts +45 -0
- package/dist/components/floating-window/index.js +2 -0
- package/dist/components/form/index.d.ts +28 -0
- package/dist/components/form/index.js +2 -0
- package/dist/components/fullscreen-dialog/fullscreen-dialog.js +6 -2
- package/dist/components/fullscreen-dialog/index.d.ts +38 -0
- package/dist/components/fullscreen-dialog/index.js +2 -0
- package/dist/components/horizontal-stepper/horizontal-stepper.js +122 -0
- package/dist/components/horizontal-stepper/index.d.ts +70 -0
- package/dist/components/horizontal-stepper/index.js +2 -0
- package/dist/components/icon-avatar/index.d.ts +9 -0
- package/dist/components/icon-avatar/index.js +2 -0
- package/dist/components/icon-text-action-card/icon-text-action-card.js +9 -5
- package/dist/components/icon-text-action-card/index.d.ts +11 -0
- package/dist/components/icon-text-action-card/index.js +2 -0
- package/dist/components/identicon/identicon.js +33 -0
- package/dist/components/identicon/index.d.ts +26 -0
- package/dist/components/identicon/index.js +2 -0
- package/dist/components/illustration/index.d.ts +37 -0
- package/dist/components/illustration/index.js +3 -0
- package/dist/components/index.d.ts +177 -19529
- package/dist/components/index.js +61 -10
- package/dist/components/input/index.d.ts +15 -0
- package/dist/components/input/index.js +3 -0
- package/dist/components/input-group/index.d.ts +35 -0
- package/dist/components/input-group/index.js +2 -0
- package/dist/components/input-group/input-group.js +41 -0
- package/dist/components/input-otp/index.d.ts +63 -0
- package/dist/components/input-otp/index.js +2 -0
- package/dist/components/key-value-manager/index.d.ts +63 -0
- package/dist/components/key-value-manager/index.js +2 -0
- package/dist/components/key-value-manager/key-value-manager-table.js +7 -5
- package/dist/components/label/index.d.ts +8 -0
- package/dist/components/label/index.js +2 -0
- package/dist/components/link/index.d.ts +33 -0
- package/dist/components/link/index.js +2 -0
- package/dist/components/list/index.d.ts +9 -0
- package/dist/components/list/index.js +3 -0
- package/dist/components/list/list-item.utils.js +1 -1
- package/dist/components/list/list.js +3 -1
- package/dist/components/list-details/index.d.ts +51 -0
- package/dist/components/list-details/index.js +2 -0
- package/dist/components/list-details/list-details.js +5 -2
- package/dist/components/lottie-animation-container/index.d.ts +10 -0
- package/dist/components/lottie-animation-container/index.js +2 -0
- package/dist/components/lottie-animation-container/lottie-animation-container.js +22 -3
- package/dist/components/lottie-animations/index.d.ts +8 -0
- package/dist/components/lottie-animations/index.js +2 -0
- package/dist/components/markdown-content/index.d.ts +32 -0
- package/dist/components/markdown-content/index.js +2 -0
- package/dist/components/media-card/index.d.ts +125 -0
- package/dist/components/media-card/index.js +4 -0
- package/dist/components/media-card/media-card-image.js +59 -0
- package/dist/components/media-card/media-card-reveal.js +76 -0
- package/dist/components/media-card/media-card.classes.js +37 -0
- package/dist/components/media-card/media-card.js +91 -0
- package/dist/components/media-stage/index.d.ts +41 -0
- package/dist/components/media-stage/index.js +2 -0
- package/dist/components/media-stage/media-stage.js +48 -0
- package/dist/components/menu/index.d.ts +14 -0
- package/dist/components/menu/index.js +2 -0
- package/dist/components/message-scroller/_hooks/use-follow-bottom.js +85 -0
- package/dist/components/message-scroller/index.d.ts +29 -0
- package/dist/components/message-scroller/index.js +2 -0
- package/dist/components/message-scroller/message-scroller.js +65 -0
- package/dist/components/mini-bar-chart/index.d.ts +40 -0
- package/dist/components/mini-bar-chart/index.js +2 -0
- package/dist/components/mini-bar-chart/mini-bar-chart.js +93 -0
- package/dist/components/monospace-content/index.d.ts +43 -0
- package/dist/components/monospace-content/index.js +2 -0
- package/dist/components/monospace-content/monospace-content.js +1 -1
- package/dist/components/nav-bar/index.d.ts +148 -0
- package/dist/components/nav-bar/index.js +2 -0
- package/dist/components/nav-bar/nav-bar-details-panel.js +158 -44
- package/dist/components/nav-bar/nav-bar-mobile-menu.js +93 -27
- package/dist/components/nav-bar/nav-bar.js +256 -138
- package/dist/components/nav-bar/use-nav-bar-hover-details.js +80 -0
- package/dist/components/nav-bar/use-nav-bar-overflow.js +5 -5
- package/dist/components/notice-strip/index.d.ts +32 -0
- package/dist/components/notice-strip/index.js +2 -0
- package/dist/components/notice-strip/notice-strip.js +57 -0
- package/dist/components/option-card-group/index.d.ts +50 -0
- package/dist/components/option-card-group/index.js +2 -0
- package/dist/components/option-card-group/option-card-group.js +76 -0
- package/dist/components/overflow-badge-list/index.d.ts +63 -0
- package/dist/components/overflow-badge-list/index.js +2 -0
- package/dist/components/overflow-badge-list/overflow-badge-list.js +78 -19
- package/dist/components/page-banner/index.d.ts +33 -0
- package/dist/components/page-banner/index.js +2 -0
- package/dist/components/page-banner/page-banner.js +56 -0
- package/dist/components/page-container/index.d.ts +20 -0
- package/dist/components/page-container/index.js +3 -0
- package/dist/components/page-container/page-container.js +5 -5
- package/dist/components/pagination/index.d.ts +31 -0
- package/dist/components/pagination/index.js +3 -0
- package/dist/components/popover/index.d.ts +60 -0
- package/dist/components/popover/index.js +3 -0
- package/dist/components/preview-card/index.d.ts +24 -0
- package/dist/components/preview-card/index.js +2 -0
- package/dist/components/progress-bar/index.d.ts +32 -0
- package/dist/components/progress-bar/index.js +2 -0
- package/dist/components/progress-bar/progress-bar.js +22 -6
- package/dist/components/radio-group/index.d.ts +24 -0
- package/dist/components/radio-group/index.js +2 -0
- package/dist/components/rank-numeral/index.d.ts +30 -0
- package/dist/components/rank-numeral/index.js +2 -0
- package/dist/components/rank-numeral/rank-numeral.js +26 -0
- package/dist/components/reaction-button/index.d.ts +32 -0
- package/dist/components/reaction-button/index.js +2 -0
- package/dist/components/reaction-button/reaction-button.js +50 -0
- package/dist/components/readout/index.d.ts +31 -0
- package/dist/components/readout/index.js +2 -0
- package/dist/components/readout/readout.js +63 -0
- package/dist/components/requirement-list/index.d.ts +52 -0
- package/dist/components/requirement-list/index.js +2 -0
- package/dist/components/requirement-list/requirement-list.js +29 -8
- package/dist/components/resizable/index.d.ts +31 -0
- package/dist/components/resizable/index.js +4 -0
- package/dist/components/resizable/resizable-group.js +23 -0
- package/dist/components/resizable/resizable-panel.js +28 -0
- package/dist/components/resizable/resizable-separator.js +24 -0
- package/dist/components/reveal/index.d.ts +23 -0
- package/dist/components/reveal/index.js +2 -0
- package/dist/components/reveal/reveal.js +24 -0
- package/dist/components/scroll-area/index.d.ts +27 -0
- package/dist/components/scroll-area/index.js +2 -0
- package/dist/components/scrollable-sections/index.d.ts +58 -0
- package/dist/components/scrollable-sections/index.js +2 -0
- package/dist/components/scrollable-sections/scrollable-sections.js +11 -3
- package/dist/components/search-box/index.d.ts +32 -0
- package/dist/components/search-box/index.js +2 -0
- package/dist/components/search-box/search-box.js +18 -3
- package/dist/components/search-field-shell.js +1 -1
- package/dist/components/select/index.d.ts +44 -0
- package/dist/components/select/index.js +2 -0
- package/dist/components/selectable-card-list/checkbox-card-list.js +5 -3
- package/dist/components/selectable-card-list/index.d.ts +76 -0
- package/dist/components/selectable-card-list/index.js +2 -0
- package/dist/components/selectable-card-list/radio-card-list.js +12 -6
- package/dist/components/selectable-card-list/selectable-card-list-shared.js +24 -12
- package/dist/components/selectable-card-list/selectable-card-list.js +12 -3
- package/dist/components/separator/index.d.ts +24 -0
- package/dist/components/separator/index.js +2 -0
- package/dist/components/share-menu/index.d.ts +55 -0
- package/dist/components/share-menu/index.js +2 -0
- package/dist/components/share-menu/share-marks.js +31 -0
- package/dist/components/share-menu/share-menu.js +140 -0
- package/dist/components/share-menu/share-urls.js +15 -0
- package/dist/components/sheet/index.d.ts +41 -0
- package/dist/components/sheet/index.js +2 -0
- package/dist/components/showcase-card/index.d.ts +53 -0
- package/dist/components/showcase-card/index.js +2 -0
- package/dist/components/showcase-card/showcase-card.js +75 -0
- package/dist/components/sidebar/index.d.ts +109 -0
- package/dist/components/sidebar/index.js +4 -0
- package/dist/components/sidebar/sidebar.js +56 -40
- package/dist/components/simple-clickable-card/index.d.ts +11 -0
- package/dist/components/simple-clickable-card/index.js +2 -0
- package/dist/components/simple-clickable-card/simple-clickable-card-shared.js +2 -2
- package/dist/components/simple-clickable-card/simple-clickable-card.js +5 -2
- package/dist/components/simple-info-card/index.d.ts +25 -0
- package/dist/components/simple-info-card/index.js +2 -0
- package/dist/components/simple-info-card/simple-info-card.js +6 -3
- package/dist/components/simple-list/index.d.ts +63 -0
- package/dist/components/simple-list/index.js +2 -0
- package/dist/components/simple-list/simple-list.js +3 -1
- package/dist/components/simple-paginated-list/index.d.ts +20 -0
- package/dist/components/simple-paginated-list/index.js +2 -0
- package/dist/components/simplified-date/index.d.ts +18 -0
- package/dist/components/simplified-date/index.js +2 -0
- package/dist/components/skeleton/index.d.ts +5 -0
- package/dist/components/skeleton/index.js +2 -0
- package/dist/components/skeletons/index.d.ts +11 -0
- package/dist/components/skeletons/index.js +2 -0
- package/dist/components/sort-menu/index.d.ts +34 -0
- package/dist/components/sort-menu/index.js +2 -0
- package/dist/components/sort-menu/sort-menu.js +39 -0
- package/dist/components/spinner/index.d.ts +15 -0
- package/dist/components/spinner/index.js +2 -0
- package/dist/components/stat-card/index.d.ts +43 -0
- package/dist/components/stat-card/index.js +2 -0
- package/dist/components/stat-card/stat-card.js +31 -12
- package/dist/components/status-badge/index.d.ts +24 -0
- package/dist/components/status-badge/index.js +2 -0
- package/dist/components/status-badge/status-badge.js +3 -2
- package/dist/components/status-card-list/index.d.ts +24 -0
- package/dist/components/status-card-list/index.js +2 -0
- package/dist/components/status-card-list/status-card-list.js +8 -4
- package/dist/components/step-tabs/index.d.ts +94 -0
- package/dist/components/step-tabs/index.js +2 -0
- package/dist/components/step-tabs/step-tabs.js +202 -0
- package/dist/components/style-scope/index.d.ts +32 -0
- package/dist/components/style-scope/index.js +2 -0
- package/dist/components/style-scope/style-scope.js +49 -0
- package/dist/components/switch/index.d.ts +15 -0
- package/dist/components/switch/index.js +2 -0
- package/dist/components/table/index.d.ts +18 -0
- package/dist/components/table/index.js +2 -0
- package/dist/components/tabs/index.d.ts +103 -0
- package/dist/components/tabs/index.js +2 -0
- package/dist/components/tag/index.d.ts +31 -0
- package/dist/components/tag/index.js +2 -0
- package/dist/components/tag/tag.js +79 -28
- package/dist/components/tag-input/index.d.ts +36 -0
- package/dist/components/tag-input/index.js +2 -0
- package/dist/components/tag-input/tag-input.js +10 -4
- package/dist/components/text-effects/index.d.ts +53 -0
- package/dist/components/text-effects/index.js +6 -0
- package/dist/components/textarea/index.d.ts +16 -0
- package/dist/components/textarea/index.js +2 -0
- package/dist/components/thumbnail-strip/index.d.ts +42 -0
- package/dist/components/thumbnail-strip/index.js +2 -0
- package/dist/components/thumbnail-strip/thumbnail-strip.js +124 -0
- package/dist/components/thumbnail-strip/use-scroll-edges.js +41 -0
- package/dist/components/time-picker/index.d.ts +13 -0
- package/dist/components/time-picker/index.js +2 -0
- package/dist/components/timeline/index.d.ts +39 -0
- package/dist/components/timeline/index.js +2 -0
- package/dist/components/timeline/timeline.js +85 -0
- package/dist/components/toast/index.d.ts +56 -0
- package/dist/components/toast/index.js +2 -0
- package/dist/components/toast/toast.js +42 -32
- package/dist/components/togglable-items-list/index.d.ts +28 -0
- package/dist/components/togglable-items-list/index.js +2 -0
- package/dist/components/toggle-group/index.d.ts +35 -0
- package/dist/components/toggle-group/index.js +2 -0
- package/dist/components/toolbar/index.d.ts +58 -0
- package/dist/components/toolbar/index.js +3 -0
- package/dist/components/toolbar/toolbar-button.js +40 -0
- package/dist/components/toolbar/toolbar.js +56 -0
- package/dist/components/tooltip/index.d.ts +29 -0
- package/dist/components/tooltip/index.js +3 -0
- package/dist/components/tooltip/tooltip.js +12 -2
- package/dist/components/transfer-list/index.d.ts +36 -0
- package/dist/components/transfer-list/index.js +2 -0
- package/dist/components/transfer-list/transfer-list.js +1 -1
- package/dist/components/truncated-line-with-tooltip/index.d.ts +22 -0
- package/dist/components/truncated-line-with-tooltip/index.js +2 -0
- package/dist/components/truncated-line-with-tooltip/truncated-line-with-tooltip.js +26 -8
- package/dist/components/typography/index.d.ts +19 -0
- package/dist/components/typography/index.js +3 -0
- package/dist/components/use-mobile/index.d.ts +3 -0
- package/dist/components/use-mobile/index.js +2 -0
- package/dist/components/user-type-badge/index.d.ts +39 -0
- package/dist/components/user-type-badge/index.js +3 -0
- package/dist/components/user-type-badge/user-type-badge.js +2 -1
- package/dist/components/vertical-stepper/index.d.ts +7 -0
- package/dist/components/vertical-stepper/index.js +2 -0
- package/dist/components/vertical-stepper/vertical-stepper.js +33 -6
- package/dist/components/view-toggle/index.d.ts +38 -0
- package/dist/components/view-toggle/index.js +2 -0
- package/dist/components/view-toggle/view-toggle.js +56 -0
- package/dist/core/animate-ui/components/animate/code.js +83 -9
- package/dist/core/animate-ui/components/animate/tabs.js +234 -19
- package/dist/core/animate-ui/components/animate/tooltip.js +10 -2
- package/dist/core/animate-ui/components/base/preview-card.js +20 -3
- package/dist/core/animate-ui/components/buttons/copy.js +12 -6
- package/dist/core/animate-ui/components/radix/dialog.js +17 -3
- package/dist/core/animate-ui/components/radix/dropdown-menu.js +26 -9
- package/dist/core/animate-ui/components/radix/sheet.js +20 -4
- package/dist/core/animate-ui/components/radix/sidebar.js +9 -9
- package/dist/core/animate-ui/components/radix/toggle-group.js +103 -13
- package/dist/core/animate-ui/components/radix/toggle.js +5 -5
- package/dist/core/animate-ui/primitives/animate/code-block.js +31 -4
- package/dist/core/animate-ui/primitives/animate/shiki-highlighter.js +5 -2
- package/dist/core/animate-ui/primitives/animate/tabs.js +7 -4
- package/dist/core/animate-ui/primitives/animate/tooltip.js +10 -3
- package/dist/core/animate-ui/primitives/base/preview-card.js +2 -2
- package/dist/core/animate-ui/primitives/base/progress.js +1 -1
- package/dist/core/animate-ui/primitives/base/radio.js +3 -3
- package/dist/core/animate-ui/primitives/effects/highlight.js +1 -0
- package/dist/core/animate-ui/primitives/radix/accordion.js +1 -1
- package/dist/core/animate-ui/primitives/radix/dialog.js +6 -3
- package/dist/core/animate-ui/primitives/radix/dropdown-menu.js +2 -2
- package/dist/core/animate-ui/primitives/radix/sheet.js +7 -3
- package/dist/core/animate-ui/primitives/radix/switch.js +2 -2
- package/dist/core/animate-ui/primitives/radix/toggle-group.js +2 -2
- package/dist/core/badge.js +5 -2
- package/dist/core/breadcrumb.js +1 -1
- package/dist/core/button/button.js +8 -8
- package/dist/core/button/craft-button.js +8 -2
- package/dist/core/button.js +17 -7
- package/dist/core/card.js +23 -5
- package/dist/core/combobox/combobox.js +8 -2
- package/dist/core/command.js +3 -3
- package/dist/core/form.js +1 -1
- package/dist/core/hooks/use-nested-layer-press-guard.js +46 -0
- package/dist/core/hooks/use-on-screen.js +33 -0
- package/dist/core/hooks/use-prefers-reduced-motion.js +19 -0
- package/dist/core/hooks/use-scroll-overflow.js +20 -0
- package/dist/core/index.d.ts +30 -5
- package/dist/core/index.js +5 -2
- package/dist/core/input/input-password.js +13 -9
- package/dist/core/input/input.js +38 -12
- package/dist/core/input-otp/input-otp.js +9 -5
- package/dist/core/popover-group.js +48 -0
- package/dist/core/popover-hover.js +127 -0
- package/dist/core/popover.js +75 -6
- package/dist/core/select.js +35 -20
- package/dist/core/table.js +5 -3
- package/dist/core/textarea/textarea.js +11 -3
- package/dist/data-table/index.d.ts +4 -0
- package/dist/data-table/index.js +3 -0
- package/dist/date/index.d.ts +11 -0
- package/dist/date/index.js +7 -0
- package/dist/forms/index.d.ts +4 -0
- package/dist/forms/index.js +2 -0
- package/dist/icon-avatar.props-RYtw2eSW.d.ts +31 -0
- package/dist/icon-text-action-card.props-B2ggncUK.d.ts +53 -0
- package/dist/index.d.ts +169 -15
- package/dist/index.js +63 -10
- package/dist/input-CYI1hhGc.d.ts +38 -0
- package/dist/layouts/index.d.ts +132 -8
- package/dist/layouts/index.js +3 -1
- package/dist/layouts/minimal-workspace-layout/minimal-workspace-layout-context.js +5 -0
- package/dist/layouts/minimal-workspace-layout/minimal-workspace-layout.js +404 -0
- package/dist/layouts/minimal-workspace-layout/rail-logo.js +90 -0
- package/dist/layouts/minimal-workspace-layout/sidebar-trigger.js +42 -0
- package/dist/layouts/shared/account-menu-props.js +21 -0
- package/dist/layouts/shared/footer-branding.js +34 -0
- package/dist/layouts/shared/sidebar-logo.js +59 -0
- package/dist/layouts/workspace-layout/account-menu/account-menu.js +9 -3
- package/dist/layouts/workspace-layout/footer/footer.js +1 -1
- package/dist/layouts/workspace-layout/header/header.js +1 -1
- package/dist/layouts/workspace-layout/workspace-layout.js +28 -80
- package/dist/{list.props-x1j3CbcF.d.ts → list.props-DP_xPTqU.d.ts} +2 -1
- package/dist/markdown/index.d.ts +11 -0
- package/dist/markdown/index.js +5 -0
- package/dist/my-account-menu.props-C7DK71WC.d.ts +67 -0
- package/dist/page-container.props-JutTvKFq.d.ts +48 -0
- package/dist/resizable.props-RxFY5tm_.d.ts +44 -0
- package/dist/section-card-B7c5uc08.d.ts +84 -0
- package/dist/simple-clickable-card.props-BrPCw7CR.d.ts +51 -0
- package/dist/slot-DGErA9zi.d.ts +10 -0
- package/dist/status-badge.props-lKlEOfRt.d.ts +32 -0
- package/dist/style-axes-DSQ2DGc5.d.ts +133 -0
- package/dist/toast/index.d.ts +6 -0
- package/dist/toast/index.js +2 -0
- package/dist/tooltip-C0bYa8a3.d.ts +37 -0
- package/dist/{types-DtUxK-Am.d.ts → types-CkXflqg7.d.ts} +31 -1
- package/dist/utils/cn.js +6 -1
- package/dist/utils/color.js +35 -10
- package/dist/utils/index.d.ts +18 -2
- package/dist/utils/index.js +4 -1
- package/dist/utils/silver-shine.js +16 -1
- package/dist/utils/style-axes.js +227 -0
- package/dist/utils/variant.js +104 -8
- package/dist/utils/view-transition.js +21 -0
- package/dist/variant-D81RhpbR.d.ts +104 -0
- package/dist/vertical-stepper.props-BXYcbW70.d.ts +29 -0
- package/package.json +52 -6
- package/src/styles/colors.css +100 -4
- package/src/styles/globals.css +8 -131
- package/src/styles/style-axes.css +21 -0
- package/src/styles/theme.css +696 -0
- package/dist/app-logo.props-Ct7QBdTd.d.ts +0 -40
- package/dist/popover-ByLD3-Qv.d.ts +0 -204
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { cn } from "../../../../utils/cn.js";
|
|
2
|
+
import { useStyleAxes } from "../../../../utils/style-axes.js";
|
|
2
3
|
import { DropdownMenu as DropdownMenu$1, DropdownMenuCheckboxItem as DropdownMenuCheckboxItem$1, DropdownMenuContent as DropdownMenuContent$1, DropdownMenuGroup as DropdownMenuGroup$1, DropdownMenuHighlight, DropdownMenuHighlightItem, DropdownMenuItem as DropdownMenuItem$1, DropdownMenuItemIndicator, DropdownMenuLabel as DropdownMenuLabel$1, DropdownMenuRadioGroup as DropdownMenuRadioGroup$1, DropdownMenuRadioItem as DropdownMenuRadioItem$1, DropdownMenuSeparator as DropdownMenuSeparator$1, DropdownMenuShortcut as DropdownMenuShortcut$1, DropdownMenuSub as DropdownMenuSub$1, DropdownMenuSubContent as DropdownMenuSubContent$1, DropdownMenuSubTrigger as DropdownMenuSubTrigger$1, DropdownMenuTrigger as DropdownMenuTrigger$1 } from "../../primitives/radix/dropdown-menu.js";
|
|
3
4
|
import "react";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -10,13 +11,21 @@ function DropdownMenu(props) {
|
|
|
10
11
|
function DropdownMenuTrigger(props) {
|
|
11
12
|
return /* @__PURE__ */ jsx(DropdownMenuTrigger$1, { ...props });
|
|
12
13
|
}
|
|
13
|
-
function DropdownMenuContent({ sideOffset = 4, className, children, ...props }) {
|
|
14
|
+
function DropdownMenuContent({ sideOffset = 4, className, children, radius, elevation, style, ...props }) {
|
|
15
|
+
const { partStyle } = useStyleAxes({
|
|
16
|
+
radius,
|
|
17
|
+
elevation
|
|
18
|
+
}, ["radius", "elevation"]);
|
|
14
19
|
return /* @__PURE__ */ jsx(DropdownMenuContent$1, {
|
|
15
20
|
sideOffset,
|
|
16
|
-
|
|
21
|
+
style: partStyle ? {
|
|
22
|
+
...partStyle,
|
|
23
|
+
...style
|
|
24
|
+
} : style,
|
|
25
|
+
className: cn("bg-popover text-popover-foreground z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] max-w-xs origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-[var(--espd-own-radius,var(--espd-radius-overlay,var(--radius-2xl)))] border px-1 py-1.5 shadow-[shadow:var(--espd-own-elevation,var(--espd-elevation-overlay,var(--shadow-lg)))] outline-none will-change-[opacity,transform] select-none", className),
|
|
17
26
|
...props,
|
|
18
27
|
children: /* @__PURE__ */ jsx(DropdownMenuHighlight, {
|
|
19
|
-
className: "absolute inset-0 bg-accent z-0 rounded-sm",
|
|
28
|
+
className: "absolute inset-0 bg-accent z-0 rounded-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-sm)))]",
|
|
20
29
|
children
|
|
21
30
|
})
|
|
22
31
|
});
|
|
@@ -32,7 +41,7 @@ function DropdownMenuItem({ className, inset, variant = "default", disabled, ...
|
|
|
32
41
|
disabled,
|
|
33
42
|
"data-inset": inset,
|
|
34
43
|
"data-variant": variant,
|
|
35
|
-
className: cn("focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
44
|
+
className: cn("focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-sm)))] px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
36
45
|
...props
|
|
37
46
|
})
|
|
38
47
|
});
|
|
@@ -42,7 +51,7 @@ function DropdownMenuCheckboxItem({ className, children, checked, disabled, ...p
|
|
|
42
51
|
disabled,
|
|
43
52
|
children: /* @__PURE__ */ jsxs(DropdownMenuCheckboxItem$1, {
|
|
44
53
|
disabled,
|
|
45
|
-
className: cn("focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
54
|
+
className: cn("focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-sm)))] py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
46
55
|
checked,
|
|
47
56
|
...props,
|
|
48
57
|
children: [/* @__PURE__ */ jsx("span", {
|
|
@@ -70,7 +79,7 @@ function DropdownMenuRadioItem({ className, children, disabled, ...props }) {
|
|
|
70
79
|
disabled,
|
|
71
80
|
children: /* @__PURE__ */ jsxs(DropdownMenuRadioItem$1, {
|
|
72
81
|
disabled,
|
|
73
|
-
className: cn("focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
82
|
+
className: cn("focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-sm)))] py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
74
83
|
...props,
|
|
75
84
|
children: [/* @__PURE__ */ jsx("span", {
|
|
76
85
|
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
|
|
@@ -110,7 +119,7 @@ function DropdownMenuSubTrigger({ disabled, className, inset, children, ...props
|
|
|
110
119
|
children: /* @__PURE__ */ jsxs(DropdownMenuSubTrigger$1, {
|
|
111
120
|
disabled,
|
|
112
121
|
"data-inset": inset,
|
|
113
|
-
className: cn("focus:text-accent-foreground data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8", "data-[state=open]:[&_[data-slot=chevron]]:rotate-90 [&_[data-slot=chevron]]:transition-transform [&_[data-slot=chevron]]:duration-300 [&_[data-slot=chevron]]:ease-in-out", className),
|
|
122
|
+
className: cn("focus:text-accent-foreground data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-sm)))] px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8", "data-[state=open]:[&_[data-slot=chevron]]:rotate-90 [&_[data-slot=chevron]]:transition-transform [&_[data-slot=chevron]]:duration-300 [&_[data-slot=chevron]]:ease-in-out", className),
|
|
114
123
|
...props,
|
|
115
124
|
children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, {
|
|
116
125
|
"data-slot": "chevron",
|
|
@@ -119,9 +128,17 @@ function DropdownMenuSubTrigger({ disabled, className, inset, children, ...props
|
|
|
119
128
|
})
|
|
120
129
|
});
|
|
121
130
|
}
|
|
122
|
-
function DropdownMenuSubContent({ className, ...props }) {
|
|
131
|
+
function DropdownMenuSubContent({ className, radius, elevation, style, ...props }) {
|
|
132
|
+
const { partStyle } = useStyleAxes({
|
|
133
|
+
radius,
|
|
134
|
+
elevation
|
|
135
|
+
}, ["radius", "elevation"]);
|
|
123
136
|
return /* @__PURE__ */ jsx(DropdownMenuSubContent$1, {
|
|
124
|
-
|
|
137
|
+
style: partStyle ? {
|
|
138
|
+
...partStyle,
|
|
139
|
+
...style
|
|
140
|
+
} : style,
|
|
141
|
+
className: cn("bg-popover text-popover-foreground z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-[var(--espd-own-radius,var(--espd-radius-overlay,var(--radius-md)))] border p-1 shadow-[shadow:var(--espd-own-elevation,var(--espd-elevation-overlay,var(--shadow-lg)))] outline-none", className),
|
|
125
142
|
...props
|
|
126
143
|
});
|
|
127
144
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { cn } from "../../../../utils/cn.js";
|
|
2
|
+
import { densityStyle, useStyleAxes } from "../../../../utils/style-axes.js";
|
|
2
3
|
import { Sheet as Sheet$1, SheetClose as SheetClose$1, SheetContent as SheetContent$1, SheetDescription as SheetDescription$1, SheetFooter as SheetFooter$1, SheetHeader as SheetHeader$1, SheetOverlay as SheetOverlay$1, SheetPortal, SheetTitle as SheetTitle$1, SheetTrigger as SheetTrigger$1 } from "../../primitives/radix/sheet.js";
|
|
3
4
|
import * as React$1 from "react";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -27,14 +28,19 @@ function SheetTrigger(props) {
|
|
|
27
28
|
}
|
|
28
29
|
function SheetOverlay({ className, ...props }) {
|
|
29
30
|
return /* @__PURE__ */ jsx(SheetOverlay$1, {
|
|
30
|
-
className: cn("fixed inset-0 z-50 bg-
|
|
31
|
+
className: cn("fixed inset-0 z-50 bg-[var(--espd-overlay-scrim,rgb(0_0_0/0.5))] backdrop-blur-[var(--espd-overlay-blur,0px)]", className),
|
|
31
32
|
...props
|
|
32
33
|
});
|
|
33
34
|
}
|
|
34
35
|
function SheetClose(props) {
|
|
35
36
|
return /* @__PURE__ */ jsx(SheetClose$1, { ...props });
|
|
36
37
|
}
|
|
37
|
-
function SheetContent({ className, children, side = "right", showCloseButton = true, onEscapeKeyDown, onPointerDownOutside, ...props }) {
|
|
38
|
+
function SheetContent({ className, children, side = "right", showCloseButton = true, onEscapeKeyDown, onPointerDownOutside, radius, elevation, density, style, ...props }) {
|
|
39
|
+
const { partStyle } = useStyleAxes({
|
|
40
|
+
radius,
|
|
41
|
+
elevation
|
|
42
|
+
}, ["radius", "elevation"]);
|
|
43
|
+
const density_ = densityStyle(density);
|
|
38
44
|
const floating = React$1.useContext(SheetFloatingContext);
|
|
39
45
|
const { closeOnEscape, closeOnOutsideClick } = React$1.useContext(SheetDismissContext);
|
|
40
46
|
const closeClassName = "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none";
|
|
@@ -49,9 +55,14 @@ function SheetContent({ className, children, side = "right", showCloseButton = t
|
|
|
49
55
|
onPointerDownOutside?.(event);
|
|
50
56
|
if (!closeOnOutsideClick) event.preventDefault();
|
|
51
57
|
},
|
|
58
|
+
style: density_ ? {
|
|
59
|
+
...density_,
|
|
60
|
+
...style
|
|
61
|
+
} : style,
|
|
52
62
|
...props,
|
|
53
63
|
children: /* @__PURE__ */ jsxs("div", {
|
|
54
|
-
|
|
64
|
+
style: partStyle,
|
|
65
|
+
className: "bg-background relative flex h-full flex-col gap-0 rounded-[var(--espd-own-radius,var(--espd-radius-overlay,var(--radius-lg)))] shadow-[shadow:var(--espd-own-elevation,var(--espd-elevation-overlay,var(--shadow-lg)))] overflow-auto",
|
|
55
66
|
children: [children, showCloseButton && /* @__PURE__ */ jsxs(SheetClose, {
|
|
56
67
|
className: closeClassName,
|
|
57
68
|
children: [/* @__PURE__ */ jsx(XIcon, { className: "size-4" }), /* @__PURE__ */ jsx("span", {
|
|
@@ -62,7 +73,7 @@ function SheetContent({ className, children, side = "right", showCloseButton = t
|
|
|
62
73
|
})
|
|
63
74
|
})] });
|
|
64
75
|
return /* @__PURE__ */ jsxs(SheetPortal, { children: [/* @__PURE__ */ jsx(SheetOverlay, {}), /* @__PURE__ */ jsxs(SheetContent$1, {
|
|
65
|
-
className: cn("bg-background fixed z-50 flex flex-col gap-0 shadow-lg", side === "right" && "h-full w-[350px] max-w-full border-l", side === "left" && "h-full w-[350px] max-w-full border-r", side === "top" && "h-[350px] w-full border-b", side === "bottom" && "h-[350px] w-full border-t", className),
|
|
76
|
+
className: cn("bg-background fixed z-50 flex flex-col gap-0 shadow-[shadow:var(--espd-own-elevation,var(--espd-elevation-overlay,var(--shadow-lg)))]", side === "right" && "h-full w-[350px] max-w-full border-l", side === "left" && "h-full w-[350px] max-w-full border-r", side === "top" && "h-[350px] w-full border-b", side === "bottom" && "h-[350px] w-full border-t", className),
|
|
66
77
|
side,
|
|
67
78
|
onEscapeKeyDown: (event) => {
|
|
68
79
|
onEscapeKeyDown?.(event);
|
|
@@ -72,6 +83,11 @@ function SheetContent({ className, children, side = "right", showCloseButton = t
|
|
|
72
83
|
onPointerDownOutside?.(event);
|
|
73
84
|
if (!closeOnOutsideClick) event.preventDefault();
|
|
74
85
|
},
|
|
86
|
+
style: partStyle || density_ ? {
|
|
87
|
+
...density_,
|
|
88
|
+
...partStyle,
|
|
89
|
+
...style
|
|
90
|
+
} : style,
|
|
75
91
|
...props,
|
|
76
92
|
children: [children, showCloseButton && /* @__PURE__ */ jsxs(SheetClose, {
|
|
77
93
|
className: closeClassName,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../../../../utils/cn.js";
|
|
3
3
|
import { getStrictContext } from "../../../utils/get-strict-context.js";
|
|
4
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../animate/tooltip.js";
|
|
4
5
|
import { Highlight, HighlightItem } from "../../primitives/effects/highlight.js";
|
|
5
6
|
import { Button } from "../../../button.js";
|
|
6
|
-
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../animate/tooltip.js";
|
|
7
7
|
import { ScrollArea } from "../../../scroll-area.js";
|
|
8
8
|
import { useIsMobile } from "../../../hooks/use-mobile.js";
|
|
9
9
|
import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from "./sheet.js";
|
|
@@ -83,7 +83,7 @@ function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: set
|
|
|
83
83
|
}) })
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
|
-
function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas", className, children, animateOnHover = true, containerClassName, transition = {
|
|
86
|
+
function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas", className, children, animateOnHover = true, containerClassName, mobileClassName, transition = {
|
|
87
87
|
type: "spring",
|
|
88
88
|
stiffness: 350,
|
|
89
89
|
damping: 35
|
|
@@ -111,7 +111,7 @@ function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas"
|
|
|
111
111
|
"data-sidebar": "sidebar",
|
|
112
112
|
"data-slot": "sidebar",
|
|
113
113
|
"data-mobile": "true",
|
|
114
|
-
className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",
|
|
114
|
+
className: cn("bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden", mobileClassName),
|
|
115
115
|
style: { "--sidebar-width": SIDEBAR_WIDTH_MOBILE },
|
|
116
116
|
side,
|
|
117
117
|
children: [/* @__PURE__ */ jsxs(SheetHeader, {
|
|
@@ -297,22 +297,22 @@ function SidebarMenuItem({ className, ...props }) {
|
|
|
297
297
|
...props
|
|
298
298
|
});
|
|
299
299
|
}
|
|
300
|
-
var sidebarMenuButtonActiveVariants = cva("bg-sidebar-accent text-sidebar-accent-foreground rounded-md", {
|
|
300
|
+
var sidebarMenuButtonActiveVariants = cva("bg-sidebar-accent text-sidebar-accent-foreground rounded-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))]", {
|
|
301
301
|
variants: { variant: {
|
|
302
302
|
default: "bg-sidebar-accent text-sidebar-accent-foreground",
|
|
303
303
|
outline: "bg-sidebar-accent text-sidebar-accent-foreground shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
|
|
304
304
|
} },
|
|
305
305
|
defaultVariants: { variant: "default" }
|
|
306
306
|
});
|
|
307
|
-
var sidebarMenuButtonVariants = cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] [&:not([data-highlight])]:hover:bg-sidebar-accent [&:not([data-highlight])]:hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground [&:not([data-highlight])]:data-[state=open]:hover:bg-sidebar-accent [&:not([data-highlight])]:data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0", {
|
|
307
|
+
var sidebarMenuButtonVariants = cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))] p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] [&:not([data-highlight])]:hover:bg-sidebar-accent [&:not([data-highlight])]:hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground [&:not([data-highlight])]:data-[state=open]:hover:bg-sidebar-accent [&:not([data-highlight])]:data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0", {
|
|
308
308
|
variants: {
|
|
309
309
|
variant: {
|
|
310
310
|
default: "[&:not([data-highlight])]:hover:bg-sidebar-accent [&:not([data-highlight])]:hover:text-sidebar-accent-foreground",
|
|
311
311
|
outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] [&:not([data-highlight])]:hover:bg-sidebar-accent [&:not([data-highlight])]:hover:text-sidebar-accent-foreground [&:not([data-highlight])]:hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
|
|
312
312
|
},
|
|
313
313
|
size: {
|
|
314
|
-
default: "h-8 text-sm",
|
|
315
|
-
sm: "h-7 text-xs",
|
|
314
|
+
default: "h-[var(--espd-sidebar-row-height,calc(var(--spacing)*8))] text-sm",
|
|
315
|
+
sm: "h-[var(--espd-sidebar-row-height-sm,calc(var(--spacing)*7))] text-xs",
|
|
316
316
|
lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!"
|
|
317
317
|
}
|
|
318
318
|
},
|
|
@@ -401,13 +401,13 @@ function SidebarMenuSubItem({ className, ...props }) {
|
|
|
401
401
|
}
|
|
402
402
|
function SidebarMenuSubButton({ asChild = false, size = "md", isActive = false, className, ...props }) {
|
|
403
403
|
return /* @__PURE__ */ jsx(HighlightItem, {
|
|
404
|
-
activeClassName: "bg-sidebar-accent text-sidebar-accent-foreground rounded-md",
|
|
404
|
+
activeClassName: "bg-sidebar-accent text-sidebar-accent-foreground rounded-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))]",
|
|
405
405
|
children: /* @__PURE__ */ jsx(asChild ? Slot.Root : "a", {
|
|
406
406
|
"data-slot": "sidebar-menu-sub-button",
|
|
407
407
|
"data-sidebar": "menu-sub-button",
|
|
408
408
|
"data-size": size,
|
|
409
409
|
"data-active": isActive,
|
|
410
|
-
className: cn("text-sidebar-foreground ring-sidebar-ring [&:not([data-highlight])]:hover:bg-sidebar-accent [&:not([data-highlight])]:hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0", "data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground", size === "sm" && "text-xs", size === "md" && "text-sm", "group-data-[collapsible=icon]:hidden", className),
|
|
410
|
+
className: cn("text-sidebar-foreground ring-sidebar-ring [&:not([data-highlight])]:hover:bg-sidebar-accent [&:not([data-highlight])]:hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))] px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0", "data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground", size === "sm" && "text-xs", size === "md" && "text-sm", "group-data-[collapsible=icon]:hidden", className),
|
|
411
411
|
...props
|
|
412
412
|
})
|
|
413
413
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { cn } from "../../../../utils/cn.js";
|
|
2
|
-
import { isPresetColor } from "../../../../utils/color.js";
|
|
2
|
+
import { contrastingForeground, isPresetColor } from "../../../../utils/color.js";
|
|
3
|
+
import { useStyleAxes } from "../../../../utils/style-axes.js";
|
|
3
4
|
import { getStrictContext } from "../../../utils/get-strict-context.js";
|
|
4
5
|
import { ToggleGroup as ToggleGroup$1, ToggleGroupHighlight, ToggleGroupHighlightItem, ToggleGroupItem as ToggleGroupItem$1, useToggleGroup as useToggleGroup$1 } from "../../primitives/radix/toggle-group.js";
|
|
5
6
|
import { toggleVariants } from "./toggle.js";
|
|
@@ -51,21 +52,99 @@ var presetMultipleSelectedSurface = {
|
|
|
51
52
|
gray: "data-[state=on]:bg-gray/10 data-[state=on]:border-gray/20",
|
|
52
53
|
mist: "data-[state=on]:bg-mist data-[state=on]:border-mist-border"
|
|
53
54
|
};
|
|
55
|
+
/** `glow`: the group's border and halo in its colour — the recipe of `TabsList variant="glow"`. */
|
|
56
|
+
var presetGlowFrame = {
|
|
57
|
+
primary: "border-primary/30 shadow-glow shadow-primary/45",
|
|
58
|
+
secondary: "border-secondary/30 shadow-glow shadow-secondary/45",
|
|
59
|
+
error: "border-error/30 shadow-glow shadow-error/45",
|
|
60
|
+
info: "border-info/30 shadow-glow shadow-info/45",
|
|
61
|
+
success: "border-success/30 shadow-glow shadow-success/45",
|
|
62
|
+
warning: "border-warning/30 shadow-glow shadow-warning/45",
|
|
63
|
+
disabled: "border-disabled/30 shadow-glow shadow-disabled/45",
|
|
64
|
+
gray: "border-gray/30 shadow-glow shadow-gray/45",
|
|
65
|
+
mist: "border-mist-border shadow-glow shadow-mist-foreground/45"
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* `solid`: the selected item is a pill filled with the group's colour, its
|
|
69
|
+
* text in that preset's `-foreground` — the recipe of `TabsList
|
|
70
|
+
* variant="solid"`. Mist is nearly the surface it sits on, so its pill keeps
|
|
71
|
+
* its own hairline to stay visible.
|
|
72
|
+
*/
|
|
73
|
+
var presetSolidFill = {
|
|
74
|
+
primary: "bg-primary shadow-sm",
|
|
75
|
+
secondary: "bg-secondary shadow-sm",
|
|
76
|
+
error: "bg-error shadow-sm",
|
|
77
|
+
info: "bg-info shadow-sm",
|
|
78
|
+
success: "bg-success shadow-sm",
|
|
79
|
+
warning: "bg-warning shadow-sm",
|
|
80
|
+
disabled: "bg-disabled shadow-sm",
|
|
81
|
+
gray: "bg-gray shadow-sm",
|
|
82
|
+
mist: "bg-mist shadow-sm border border-mist-border"
|
|
83
|
+
};
|
|
84
|
+
var presetSolidText = {
|
|
85
|
+
primary: "data-[state=on]:text-primary-foreground",
|
|
86
|
+
secondary: "data-[state=on]:text-secondary-foreground",
|
|
87
|
+
error: "data-[state=on]:text-error-foreground",
|
|
88
|
+
info: "data-[state=on]:text-info-foreground",
|
|
89
|
+
success: "data-[state=on]:text-success-foreground",
|
|
90
|
+
warning: "data-[state=on]:text-warning-foreground",
|
|
91
|
+
disabled: "data-[state=on]:text-disabled-foreground",
|
|
92
|
+
gray: "data-[state=on]:text-gray-foreground",
|
|
93
|
+
mist: "data-[state=on]:text-mist-foreground"
|
|
94
|
+
};
|
|
95
|
+
/** `solid` with `type="multiple"`: no sliding pill, so each pressed item is filled itself. */
|
|
96
|
+
var presetMultipleSolidSurface = {
|
|
97
|
+
primary: "data-[state=on]:bg-primary",
|
|
98
|
+
secondary: "data-[state=on]:bg-secondary",
|
|
99
|
+
error: "data-[state=on]:bg-error",
|
|
100
|
+
info: "data-[state=on]:bg-info",
|
|
101
|
+
success: "data-[state=on]:bg-success",
|
|
102
|
+
warning: "data-[state=on]:bg-warning",
|
|
103
|
+
disabled: "data-[state=on]:bg-disabled",
|
|
104
|
+
gray: "data-[state=on]:bg-gray",
|
|
105
|
+
mist: "data-[state=on]:bg-mist data-[state=on]:border-mist-border"
|
|
106
|
+
};
|
|
107
|
+
var arbitrarySolidFillClass = "bg-[var(--toggle-group-accent)] shadow-sm";
|
|
108
|
+
var arbitrarySolidTextClass = "data-[state=on]:text-[var(--toggle-group-accent-foreground)]";
|
|
109
|
+
var arbitraryMultipleSolidSurfaceClass = "data-[state=on]:bg-[var(--toggle-group-accent)]";
|
|
110
|
+
var arbitraryGlowFrameClass = "border-[color-mix(in_srgb,var(--toggle-group-accent)_30%,transparent)] shadow-glow shadow-[color-mix(in_srgb,var(--toggle-group-accent)_45%,transparent)]";
|
|
54
111
|
var arbitrarySelectedHighlightClass = "border bg-[color-mix(in_srgb,var(--toggle-group-accent)_10%,transparent)] border-[color-mix(in_srgb,var(--toggle-group-accent)_20%,transparent)]";
|
|
55
112
|
var arbitraryMultipleSelectedSurfaceClass = "data-[state=on]:border data-[state=on]:bg-[color-mix(in_srgb,var(--toggle-group-accent)_10%,transparent)] data-[state=on]:border-[color-mix(in_srgb,var(--toggle-group-accent)_20%,transparent)]";
|
|
56
|
-
function
|
|
113
|
+
function resolveSolidColorTokens(color) {
|
|
114
|
+
if (isPresetColor(color)) return {
|
|
115
|
+
highlightClass: presetSolidFill[color],
|
|
116
|
+
multipleSelectedSurfaceClass: cn("data-[state=on]:border", presetMultipleSolidSurface[color]),
|
|
117
|
+
selectedTextClass: presetSolidText[color]
|
|
118
|
+
};
|
|
119
|
+
return {
|
|
120
|
+
highlightClass: arbitrarySolidFillClass,
|
|
121
|
+
multipleSelectedSurfaceClass: arbitraryMultipleSolidSurfaceClass,
|
|
122
|
+
selectedTextClass: arbitrarySolidTextClass,
|
|
123
|
+
arbitraryAccent: color,
|
|
124
|
+
arbitraryAccentForeground: contrastingForeground(color)
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
function resolveToggleGroupColorTokens(color, variant) {
|
|
128
|
+
if (variant === "solid") return resolveSolidColorTokens(color);
|
|
57
129
|
if (isPresetColor(color)) return {
|
|
58
130
|
highlightClass: cn(presetSelectedHighlightBg[color], presetSelectedHighlightBorder[color]),
|
|
59
131
|
multipleSelectedSurfaceClass: cn("data-[state=on]:border", presetMultipleSelectedSurface[color]),
|
|
60
|
-
selectedTextClass: presetSelectedText[color]
|
|
132
|
+
selectedTextClass: presetSelectedText[color],
|
|
133
|
+
glowFrameClass: presetGlowFrame[color]
|
|
61
134
|
};
|
|
62
135
|
return {
|
|
63
136
|
highlightClass: arbitrarySelectedHighlightClass,
|
|
137
|
+
glowFrameClass: arbitraryGlowFrameClass,
|
|
64
138
|
multipleSelectedSurfaceClass: arbitraryMultipleSelectedSurfaceClass,
|
|
65
139
|
selectedTextClass: "data-[state=on]:text-[var(--toggle-group-accent)]",
|
|
66
140
|
arbitraryAccent: color
|
|
67
141
|
};
|
|
68
142
|
}
|
|
143
|
+
/** Corner rounding for the frame, the highlight and the items. */
|
|
144
|
+
var CONTROL_RADIUS = "rounded-[var(--espd-own-radius,var(--espd-radius-control,var(--radius-md)))]";
|
|
145
|
+
function radiusClass(variant) {
|
|
146
|
+
return variant === "default" ? CONTROL_RADIUS : "rounded-full";
|
|
147
|
+
}
|
|
69
148
|
var [ToggleGroupProvider, useToggleGroup] = getStrictContext("ToggleGroupStyledContext");
|
|
70
149
|
/** Horizontal padding + min width; applied after `toggleVariants` so it overrides size defaults. */
|
|
71
150
|
var toggleGroupItemSizeClasses = {
|
|
@@ -74,39 +153,50 @@ var toggleGroupItemSizeClasses = {
|
|
|
74
153
|
lg: "px-4 min-w-11",
|
|
75
154
|
icon: "px-3 min-w-10"
|
|
76
155
|
};
|
|
77
|
-
function ToggleGroup({ className, size, color = "primary", children, style, ...props }) {
|
|
78
|
-
const
|
|
156
|
+
function ToggleGroup({ className, size, color = "primary", variant = "default", children, style, radius, ...props }) {
|
|
157
|
+
const { partStyle } = useStyleAxes({ radius }, ["radius"]);
|
|
158
|
+
const colorTokens = React$1.useMemo(() => resolveToggleGroupColorTokens(color, variant), [color, variant]);
|
|
79
159
|
return /* @__PURE__ */ jsx(ToggleGroup$1, {
|
|
80
160
|
"data-size": size,
|
|
81
|
-
className: cn("group/toggle-group flex w-fit items-center gap-0.5
|
|
82
|
-
style: colorTokens.arbitraryAccent ? {
|
|
161
|
+
className: cn("group/toggle-group flex w-fit items-center gap-0.5 border-[length:var(--espd-own-border-width,var(--espd-border-width-control,1px))] bg-transparent ring-offset-background transition-[box-shadow,border-color] duration-200 ease-in-out", radiusClass(variant), variant === "default" ? "border-input p-1.5" : "p-1", variant === "rounded" && colorTokens.glowFrameClass?.split(" ")[0], variant === "glow" && colorTokens.glowFrameClass, variant === "solid" && "border-border", "focus-within:outline-none focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2", className),
|
|
162
|
+
style: colorTokens.arbitraryAccent || partStyle ? {
|
|
163
|
+
...partStyle,
|
|
83
164
|
...style,
|
|
84
|
-
["--toggle-group-accent"]: colorTokens.arbitraryAccent
|
|
165
|
+
...colorTokens.arbitraryAccent && { ["--toggle-group-accent"]: colorTokens.arbitraryAccent },
|
|
166
|
+
...colorTokens.arbitraryAccentForeground && { ["--toggle-group-accent-foreground"]: colorTokens.arbitraryAccentForeground }
|
|
85
167
|
} : style,
|
|
86
168
|
...props,
|
|
87
169
|
children: /* @__PURE__ */ jsx(ToggleGroupProvider, {
|
|
88
170
|
value: {
|
|
89
171
|
size,
|
|
90
|
-
|
|
172
|
+
variant,
|
|
173
|
+
colorTokens,
|
|
174
|
+
axisStyle: partStyle
|
|
91
175
|
},
|
|
92
176
|
children: props.type === "single" ? /* @__PURE__ */ jsx(ToggleGroupHighlight, {
|
|
93
|
-
|
|
177
|
+
style: partStyle,
|
|
178
|
+
className: cn(radiusClass(variant), colorTokens.highlightClass),
|
|
94
179
|
children
|
|
95
180
|
}) : children
|
|
96
181
|
})
|
|
97
182
|
});
|
|
98
183
|
}
|
|
99
184
|
function ToggleGroupItem({ className, children, size, ...props }) {
|
|
100
|
-
const { size: contextSize, colorTokens } = useToggleGroup();
|
|
185
|
+
const { size: contextSize, variant, colorTokens, axisStyle } = useToggleGroup();
|
|
101
186
|
const { type } = useToggleGroup$1();
|
|
102
187
|
const itemSize = contextSize ?? size ?? "default";
|
|
103
188
|
return /* @__PURE__ */ jsx(ToggleGroupHighlightItem, {
|
|
104
189
|
value: props.value,
|
|
105
|
-
|
|
190
|
+
style: type === "multiple" ? axisStyle : void 0,
|
|
191
|
+
className: cn(type === "multiple" && radiusClass(variant)),
|
|
106
192
|
children: /* @__PURE__ */ jsx(ToggleGroupItem$1, {
|
|
107
193
|
"data-size": contextSize || size,
|
|
108
|
-
className: cn(toggleVariants({ size: contextSize || size }), "relative z-10 flex-1 shrink-0
|
|
194
|
+
className: cn(toggleVariants({ size: contextSize || size }), "relative z-10 flex-1 shrink-0 border border-transparent shadow-none focus:z-10 focus-visible:z-10", radiusClass(variant), toggleGroupItemSizeClasses[itemSize], colorTokens.selectedTextClass, type === "single" && "data-[state=on]:bg-transparent", type === "multiple" && colorTokens.multipleSelectedSurfaceClass, className),
|
|
109
195
|
...props,
|
|
196
|
+
style: axisStyle ? {
|
|
197
|
+
...axisStyle,
|
|
198
|
+
...props.style
|
|
199
|
+
} : props.style,
|
|
110
200
|
children
|
|
111
201
|
})
|
|
112
202
|
});
|
|
@@ -2,16 +2,16 @@ import "react";
|
|
|
2
2
|
import "react/jsx-runtime";
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
4
|
//#region src/core/animate-ui/components/radix/toggle.tsx
|
|
5
|
-
var toggleVariants = cva("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted/40 hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,background-color,box-shadow] duration-200 ease-in-out aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap", {
|
|
5
|
+
var toggleVariants = cva("inline-flex items-center justify-center gap-2 rounded-[var(--espd-own-radius,var(--espd-radius-control,var(--radius-md)))] text-sm font-medium hover:bg-muted/40 hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,background-color,box-shadow] duration-200 ease-in-out aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap", {
|
|
6
6
|
variants: {
|
|
7
7
|
variant: {
|
|
8
8
|
default: "bg-transparent",
|
|
9
|
-
outline: "border border-input bg-transparent shadow-xs hover:bg-accent/40 hover:text-accent-foreground"
|
|
9
|
+
outline: "border-[length:var(--espd-own-border-width,var(--espd-border-width-control,1px))] border-input bg-transparent shadow-xs hover:bg-accent/40 hover:text-accent-foreground"
|
|
10
10
|
},
|
|
11
11
|
size: {
|
|
12
|
-
default: "h-9 px-2 min-w-9",
|
|
13
|
-
sm: "h-8 px-1.5 min-w-8",
|
|
14
|
-
lg: "h-10 px-2.5 min-w-10",
|
|
12
|
+
default: "h-[var(--espd-control-height-md,calc(var(--spacing)*9))] px-2 min-w-[var(--espd-control-height-md,calc(var(--spacing)*9))]",
|
|
13
|
+
sm: "h-[var(--espd-control-height-sm,calc(var(--spacing)*8))] px-1.5 min-w-[var(--espd-control-height-sm,calc(var(--spacing)*8))]",
|
|
14
|
+
lg: "h-[var(--espd-control-height-lg,calc(var(--spacing)*10))] px-2.5 min-w-[var(--espd-control-height-lg,calc(var(--spacing)*10))]",
|
|
15
15
|
icon: "size-9"
|
|
16
16
|
}
|
|
17
17
|
},
|
|
@@ -5,10 +5,17 @@ import { escapeHtml } from "./escape-html.js";
|
|
|
5
5
|
import * as React$1 from "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
//#region src/core/animate-ui/primitives/animate/code-block.tsx
|
|
8
|
+
/** Plain, escaped text with the same line structure Shiki emits, so numbering, marks and ids work unhighlighted too. */
|
|
9
|
+
function plainLines(code, mark) {
|
|
10
|
+
return `<pre><code>${code.split("\n").map((text, i) => {
|
|
11
|
+
const { id, marked } = mark(i + 1);
|
|
12
|
+
return `<span ${`class="line${marked ? " highlighted" : ""}" data-line="${i + 1}"${id ? ` id="${escapeHtml(id)}"` : ""}`}>${escapeHtml(text)}</span>`;
|
|
13
|
+
}).join("\n")}</code></pre>`;
|
|
14
|
+
}
|
|
8
15
|
function CodeBlock({ ref, code, lang, theme = "light", themes = {
|
|
9
16
|
light: "everforest-light",
|
|
10
17
|
dark: "everforest-dark"
|
|
11
|
-
}, writing = false, duration = 5e3, delay = 0, onDone, onWrite, scrollContainerRef, inView = false, inViewOnce = true, inViewMargin = "0px", ...props }) {
|
|
18
|
+
}, writing = false, duration = 5e3, delay = 0, onDone, onWrite, scrollContainerRef, inView = false, inViewOnce = true, inViewMargin = "0px", lineNumbers = false, highlightLines, lineIdPrefix, maxHighlightLength = 2e5, ...props }) {
|
|
12
19
|
const { ref: localRef, isInView } = useIsInView(ref, {
|
|
13
20
|
inView,
|
|
14
21
|
inViewOnce,
|
|
@@ -17,19 +24,35 @@ function CodeBlock({ ref, code, lang, theme = "light", themes = {
|
|
|
17
24
|
const [visibleCode, setVisibleCode] = React$1.useState("");
|
|
18
25
|
const [highlightedCode, setHighlightedCode] = React$1.useState("");
|
|
19
26
|
const [isDone, setIsDone] = React$1.useState(false);
|
|
27
|
+
const marks = (highlightLines ?? []).join(",");
|
|
20
28
|
React$1.useEffect(() => {
|
|
21
29
|
if (!visibleCode.length || !isInView) return;
|
|
30
|
+
const marked = new Set(marks ? marks.split(",").map(Number) : []);
|
|
31
|
+
const mark = (line) => ({
|
|
32
|
+
id: lineIdPrefix ? `${lineIdPrefix}${line}` : void 0,
|
|
33
|
+
marked: marked.has(line)
|
|
34
|
+
});
|
|
22
35
|
const loadHighlightedCode = async () => {
|
|
36
|
+
if (visibleCode.length > maxHighlightLength) {
|
|
37
|
+
setHighlightedCode(plainLines(visibleCode, mark));
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
23
40
|
const normalizedLang = normalizeLang(lang);
|
|
24
41
|
try {
|
|
25
42
|
setHighlightedCode((await getHighlighter()).codeToHtml(visibleCode, {
|
|
26
43
|
lang: normalizedLang,
|
|
27
44
|
themes,
|
|
28
|
-
defaultColor: theme
|
|
45
|
+
defaultColor: theme,
|
|
46
|
+
transformers: [{ line(node, line) {
|
|
47
|
+
const { id, marked: isMarked } = mark(line);
|
|
48
|
+
node.properties["data-line"] = line;
|
|
49
|
+
if (id) node.properties.id = id;
|
|
50
|
+
if (isMarked) this.addClassToHast(node, "highlighted");
|
|
51
|
+
} }]
|
|
29
52
|
}));
|
|
30
53
|
} catch (e) {
|
|
31
54
|
console.warn(`[dashboard-ui-components] Falling back to plain text for lang="${lang}"; not in the curated Shiki bundle.`, e);
|
|
32
|
-
setHighlightedCode(
|
|
55
|
+
setHighlightedCode(plainLines(visibleCode, mark));
|
|
33
56
|
}
|
|
34
57
|
};
|
|
35
58
|
loadHighlightedCode();
|
|
@@ -41,7 +64,10 @@ function CodeBlock({ ref, code, lang, theme = "light", themes = {
|
|
|
41
64
|
duration,
|
|
42
65
|
delay,
|
|
43
66
|
visibleCode,
|
|
44
|
-
theme
|
|
67
|
+
theme,
|
|
68
|
+
marks,
|
|
69
|
+
lineIdPrefix,
|
|
70
|
+
maxHighlightLength
|
|
45
71
|
]);
|
|
46
72
|
React$1.useEffect(() => {
|
|
47
73
|
if (!writing) {
|
|
@@ -123,6 +149,7 @@ function CodeBlock({ ref, code, lang, theme = "light", themes = {
|
|
|
123
149
|
ref: localRef,
|
|
124
150
|
"data-writing": writing ? "" : void 0,
|
|
125
151
|
"data-done": isDone ? "" : void 0,
|
|
152
|
+
"data-line-numbers": lineNumbers ? "" : void 0,
|
|
126
153
|
dangerouslySetInnerHTML: { __html: highlightedCode },
|
|
127
154
|
...props
|
|
128
155
|
});
|
|
@@ -11,7 +11,8 @@ var LANG_ALIASES = {
|
|
|
11
11
|
yml: "yaml",
|
|
12
12
|
"c++": "cpp",
|
|
13
13
|
"c#": "csharp",
|
|
14
|
-
docker: "dockerfile"
|
|
14
|
+
docker: "dockerfile",
|
|
15
|
+
properties: "ini"
|
|
15
16
|
};
|
|
16
17
|
var highlighterPromise = null;
|
|
17
18
|
/**
|
|
@@ -49,7 +50,9 @@ function getHighlighter() {
|
|
|
49
50
|
import("shiki/langs/java.mjs"),
|
|
50
51
|
import("shiki/langs/sql.mjs"),
|
|
51
52
|
import("shiki/langs/xml.mjs"),
|
|
52
|
-
import("shiki/langs/dockerfile.mjs")
|
|
53
|
+
import("shiki/langs/dockerfile.mjs"),
|
|
54
|
+
import("shiki/langs/cmake.mjs"),
|
|
55
|
+
import("shiki/langs/ini.mjs")
|
|
53
56
|
],
|
|
54
57
|
engine: createOnigurumaEngine(import("shiki/wasm"))
|
|
55
58
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { getStrictContext } from "../../../utils/get-strict-context.js";
|
|
3
|
-
import { Highlight, HighlightItem } from "../effects/highlight.js";
|
|
4
3
|
import { Slot } from "./slot.js";
|
|
4
|
+
import { Highlight, HighlightItem } from "../effects/highlight.js";
|
|
5
5
|
import * as React$1 from "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
import { motion } from "motion/react";
|
|
@@ -75,7 +75,7 @@ function TabsHighlightItem(props) {
|
|
|
75
75
|
...props
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
|
-
function TabsTrigger({ ref, value, asChild = false, ...props }) {
|
|
78
|
+
function TabsTrigger({ ref, value, asChild = false, onClick, ...props }) {
|
|
79
79
|
const { activeValue, handleValueChange, registerTrigger } = useTabs();
|
|
80
80
|
const localRef = React$1.useRef(null);
|
|
81
81
|
React$1.useImperativeHandle(ref, () => localRef.current);
|
|
@@ -87,9 +87,12 @@ function TabsTrigger({ ref, value, asChild = false, ...props }) {
|
|
|
87
87
|
ref: localRef,
|
|
88
88
|
"data-slot": "tabs-trigger",
|
|
89
89
|
role: "tab",
|
|
90
|
-
onClick: () => handleValueChange(value),
|
|
91
90
|
"data-state": activeValue === value ? "active" : "inactive",
|
|
92
|
-
...props
|
|
91
|
+
...props,
|
|
92
|
+
onClick: (event) => {
|
|
93
|
+
onClick?.(event);
|
|
94
|
+
if (!event.defaultPrevented) handleValueChange(value);
|
|
95
|
+
}
|
|
93
96
|
});
|
|
94
97
|
}
|
|
95
98
|
function TabsContents({ children, transition = {
|
|
@@ -7,6 +7,10 @@ import { AnimatePresence, LayoutGroup, motion } from "motion/react";
|
|
|
7
7
|
import { FloatingArrow, FloatingPortal, arrow, autoUpdate, flip, offset, shift, useFloating } from "@floating-ui/react";
|
|
8
8
|
//#region src/core/animate-ui/primitives/animate/tooltip.tsx
|
|
9
9
|
var [GlobalTooltipProvider, useGlobalTooltip] = getStrictContext("GlobalTooltipProvider");
|
|
10
|
+
var TooltipProviderPresence = React$1.createContext(false);
|
|
11
|
+
function useHasTooltipProvider() {
|
|
12
|
+
return React$1.useContext(TooltipProviderPresence);
|
|
13
|
+
}
|
|
10
14
|
var [LocalTooltipProvider, useTooltip] = getStrictContext("LocalTooltipProvider");
|
|
11
15
|
function getResolvedSide(placement) {
|
|
12
16
|
if (placement.includes("-")) return placement.split("-")[0];
|
|
@@ -69,7 +73,7 @@ function TooltipProvider({ children, id, openDelay = 700, closeDelay = 300, tran
|
|
|
69
73
|
window.removeEventListener("resize", hideImmediate, true);
|
|
70
74
|
};
|
|
71
75
|
}, [hideImmediate]);
|
|
72
|
-
return /* @__PURE__ */
|
|
76
|
+
return /* @__PURE__ */ jsx(GlobalTooltipProvider, {
|
|
73
77
|
value: {
|
|
74
78
|
showTooltip,
|
|
75
79
|
hideTooltip,
|
|
@@ -80,7 +84,10 @@ function TooltipProvider({ children, id, openDelay = 700, closeDelay = 300, tran
|
|
|
80
84
|
setReferenceEl,
|
|
81
85
|
referenceElRef
|
|
82
86
|
},
|
|
83
|
-
children:
|
|
87
|
+
children: /* @__PURE__ */ jsxs(TooltipProviderPresence.Provider, {
|
|
88
|
+
value: true,
|
|
89
|
+
children: [/* @__PURE__ */ jsx(LayoutGroup, { children }), /* @__PURE__ */ jsx(TooltipOverlay, {})]
|
|
90
|
+
})
|
|
84
91
|
});
|
|
85
92
|
}
|
|
86
93
|
var [RenderedTooltipProvider, useRenderedTooltip] = getStrictContext("RenderedTooltipContext");
|
|
@@ -348,4 +355,4 @@ function TooltipTrigger({ ref, onMouseEnter, onMouseLeave, onFocus, onBlur, onPo
|
|
|
348
355
|
});
|
|
349
356
|
}
|
|
350
357
|
//#endregion
|
|
351
|
-
export { Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger, useGlobalTooltip, useTooltip };
|
|
358
|
+
export { Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger, useGlobalTooltip, useHasTooltipProvider, useTooltip };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useControlledState } from "../../../hooks/use-controlled-state.js";
|
|
3
2
|
import { getStrictContext } from "../../../utils/get-strict-context.js";
|
|
3
|
+
import { useControlledState } from "../../../hooks/use-controlled-state.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import { AnimatePresence, motion, useMotionValue, useSpring } from "motion/react";
|
|
7
|
-
import { PreviewCard } from "@base-ui
|
|
7
|
+
import { PreviewCard } from "@base-ui/react/preview-card";
|
|
8
8
|
//#region src/core/animate-ui/primitives/base/preview-card.tsx
|
|
9
9
|
var [PreviewCardProvider, usePreviewCard] = getStrictContext("PreviewCardContext");
|
|
10
10
|
function PreviewCard$1({ followCursor = false, followCursorSpringOptions = {
|
|
@@ -4,7 +4,7 @@ import { CountingNumber } from "../texts/counting-number.js";
|
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import { motion } from "motion/react";
|
|
7
|
-
import { Progress } from "@base-ui
|
|
7
|
+
import { Progress } from "@base-ui/react/progress";
|
|
8
8
|
//#region src/core/animate-ui/primitives/base/progress.tsx
|
|
9
9
|
var [ProgressProvider, useProgress] = getStrictContext("ProgressContext");
|
|
10
10
|
var Progress$1 = (props) => {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useControlledState } from "../../../hooks/use-controlled-state.js";
|
|
3
2
|
import { getStrictContext } from "../../../utils/get-strict-context.js";
|
|
3
|
+
import { useControlledState } from "../../../hooks/use-controlled-state.js";
|
|
4
4
|
import * as React$1 from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import { AnimatePresence, motion } from "motion/react";
|
|
7
|
-
import { RadioGroup } from "@base-ui
|
|
8
|
-
import { Radio } from "@base-ui
|
|
7
|
+
import { RadioGroup } from "@base-ui/react/radio-group";
|
|
8
|
+
import { Radio } from "@base-ui/react/radio";
|
|
9
9
|
//#region src/core/animate-ui/primitives/base/radio.tsx
|
|
10
10
|
var [RadioGroupProvider, useRadioGroup] = getStrictContext("RadioGroupContext");
|
|
11
11
|
var [RadioProvider, useRadio] = getStrictContext("RadioContext");
|