@espressif/dashboard-ui-components 1.11.2 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/rules/dashboard-ui-consumption.md +176 -5
- package/.cursor/rules/dashboard-ui-consumption.mdc +163 -4
- package/CHANGELOG.md +1005 -0
- package/README.md +240 -7
- package/THIRD-PARTY-NOTICES.md +2 -1
- package/dist/alert.props-CcKo49Rb.d.ts +44 -0
- package/dist/animation/index.d.ts +3 -0
- package/dist/animation/index.js +3 -0
- package/dist/avatar.props-2q5BsX-R.d.ts +29 -0
- package/dist/button-BK-DIR_L.d.ts +21 -0
- package/dist/button-BxJ7s6sR.d.ts +76 -0
- package/dist/calendar.props-BtCzuWH1.d.ts +12 -0
- package/dist/carousel/index.d.ts +2 -0
- package/dist/carousel/index.js +2 -0
- package/dist/charts/index.d.ts +5 -0
- package/dist/charts/index.js +9 -0
- package/dist/common/app-logo/app-logo.js +1 -1
- package/dist/common/index.d.ts +9 -20
- package/dist/common/my-account-menu/my-account-menu.js +45 -13
- package/dist/common/profile-card/profile-card.js +3 -2
- package/dist/components/accordion/accordion.js +14 -5
- package/dist/components/accordion/index.d.ts +36 -0
- package/dist/components/accordion/index.js +2 -0
- package/dist/components/advanced-search-box/advanced-search-box.js +8 -2
- package/dist/components/advanced-search-box/index.d.ts +29 -0
- package/dist/components/advanced-search-box/index.js +2 -0
- package/dist/components/alert/alert.js +2 -1
- package/dist/components/alert/index.d.ts +12 -0
- package/dist/components/alert/index.js +2 -0
- package/dist/components/anchored-panel/anchored-panel.js +83 -0
- package/dist/components/anchored-panel/index.d.ts +31 -0
- package/dist/components/anchored-panel/index.js +2 -0
- package/dist/components/animated-containers/index.d.ts +13 -0
- package/dist/components/animated-containers/index.js +2 -0
- package/dist/components/async-multi-select/async-multi-select.js +48 -7
- package/dist/components/async-multi-select/index.d.ts +63 -0
- package/dist/components/async-multi-select/index.js +2 -0
- package/dist/components/avatar/avatar.js +11 -4
- package/dist/components/avatar/index.d.ts +8 -0
- package/dist/components/avatar/index.js +2 -0
- package/dist/components/avatar-group/avatar-group.js +35 -0
- package/dist/components/avatar-group/index.d.ts +31 -0
- package/dist/components/avatar-group/index.js +2 -0
- package/dist/components/badge/index.d.ts +14 -0
- package/dist/components/badge/index.js +2 -0
- package/dist/components/breadcrumb/index.d.ts +21 -0
- package/dist/components/breadcrumb/index.js +2 -0
- package/dist/components/bubble/bubble.js +18 -0
- package/dist/components/bubble/index.d.ts +19 -0
- package/dist/components/bubble/index.js +2 -0
- package/dist/components/button/button.js +87 -25
- package/dist/components/button/flash-button.js +9 -3
- package/dist/components/button/index.d.ts +56 -0
- package/dist/components/button/index.js +6 -0
- package/dist/components/button-group/index.d.ts +16 -0
- package/dist/components/button-group/index.js +2 -0
- package/dist/components/calendar/calendar.js +5 -5
- package/dist/components/calendar/index.d.ts +11 -0
- package/dist/components/calendar/index.js +2 -0
- package/dist/components/card/index.d.ts +11 -0
- package/dist/components/card/index.js +2 -0
- package/dist/components/card-rail/card-rail.js +50 -0
- package/dist/components/card-rail/index.d.ts +30 -0
- package/dist/components/card-rail/index.js +2 -0
- package/dist/components/cards/collapsible-card.js +5 -2
- package/dist/components/cards/index.d.ts +16200 -0
- package/dist/components/cards/index.js +8 -0
- package/dist/components/cards/section-card.js +133 -8
- package/dist/components/cards/simple-card.js +5 -2
- package/dist/components/carousel/carousel.js +137 -49
- package/dist/components/carousel/index.d.ts +130 -0
- package/dist/components/carousel/index.js +2 -0
- package/dist/components/category-card/category-card.js +111 -0
- package/dist/components/category-card/index.d.ts +55 -0
- package/dist/components/category-card/index.js +2 -0
- package/dist/components/chart/area-chart.js +95 -85
- package/dist/components/chart/bar-chart.js +123 -60
- package/dist/components/chart/chart.js +127 -3
- package/dist/components/chart/composed-chart.js +109 -98
- package/dist/components/chart/donut-chart.js +23 -5
- package/dist/components/chart/index.d.ts +732 -0
- package/dist/components/chart/index.js +9 -0
- package/dist/components/chart/line-chart.js +93 -83
- package/dist/components/chart/treemap-chart.js +71 -58
- package/dist/components/check-badge/check-badge.js +25 -0
- package/dist/components/check-badge/index.d.ts +13 -0
- package/dist/components/check-badge/index.js +2 -0
- package/dist/components/checkbox/index.d.ts +8 -0
- package/dist/components/checkbox/index.js +2 -0
- package/dist/components/choice-card/choice-card.js +99 -0
- package/dist/components/choice-card/index.d.ts +41 -0
- package/dist/components/choice-card/index.js +2 -0
- package/dist/components/circular-progress/circular-progress.js +5 -2
- package/dist/components/circular-progress/index.d.ts +23 -0
- package/dist/components/circular-progress/index.js +2 -0
- package/dist/components/code/index.d.ts +40 -0
- package/dist/components/code/index.js +2 -0
- package/dist/components/code-editor/code-editor.js +9 -3
- package/dist/components/code-editor/index.d.ts +82 -0
- package/dist/components/code-editor/index.js +2 -0
- package/dist/components/collapsible/index.d.ts +42 -0
- package/dist/components/collapsible/index.js +2 -0
- package/dist/components/column-panel/column-panel.js +38 -0
- package/dist/components/column-panel/index.d.ts +37 -0
- package/dist/components/column-panel/index.js +3 -0
- package/dist/components/column-panel/use-panel-flag.js +27 -0
- package/dist/components/combobox/index.d.ts +28 -0
- package/dist/components/combobox/index.js +2 -0
- package/dist/components/confirmation-dialog/confirmation-dialog.js +1 -1
- package/dist/components/confirmation-dialog/index.d.ts +40 -0
- package/dist/components/confirmation-dialog/index.js +3 -0
- package/dist/components/content-container/index.d.ts +16 -0
- package/dist/components/content-container/index.js +2 -0
- package/dist/components/copiable-text/index.d.ts +33 -0
- package/dist/components/copiable-text/index.js +2 -0
- package/dist/components/coverflow/_constants/coverflow-poses.js +23 -0
- package/dist/components/coverflow/_constants/coverflow-shapes.js +23 -0
- package/dist/components/coverflow/_hooks/use-coverflow.js +90 -0
- package/dist/components/coverflow/_utils/ring.js +24 -0
- package/dist/components/coverflow/coverflow.js +198 -0
- package/dist/components/coverflow/index.d.ts +105 -0
- package/dist/components/coverflow/index.js +2 -0
- package/dist/components/data-table/data-table.js +9 -2
- package/dist/components/data-table/index.d.ts +120 -0
- package/dist/components/data-table/index.js +3 -0
- package/dist/components/date-picker/date-picker.js +5 -2
- package/dist/components/date-picker/index.d.ts +50 -0
- package/dist/components/date-picker/index.js +2 -0
- package/dist/components/date-range-picker/date-range-picker.js +11 -2
- package/dist/components/date-range-picker/index.d.ts +100 -0
- package/dist/components/date-range-picker/index.js +3 -0
- package/dist/components/date-time-picker/date-time-picker.js +5 -2
- package/dist/components/date-time-picker/index.d.ts +79 -0
- package/dist/components/date-time-picker/index.js +2 -0
- package/dist/components/device-icon/index.d.ts +17 -0
- package/dist/components/device-icon/index.js +2 -0
- package/dist/components/dialog/index.d.ts +38 -0
- package/dist/components/dialog/index.js +2 -0
- package/dist/components/dropdown-menu/index.d.ts +57 -0
- package/dist/components/dropdown-menu/index.js +2 -0
- package/dist/components/dynamic-list/dynamic-list.js +4 -4
- package/dist/components/dynamic-list/index.d.ts +74 -0
- package/dist/components/dynamic-list/index.js +2 -0
- package/dist/components/error-display/index.d.ts +17 -0
- package/dist/components/error-display/index.js +3 -0
- package/dist/components/expandable-text/expandable-text-overlay.js +78 -0
- package/dist/components/expandable-text/expandable-text.js +73 -0
- package/dist/components/expandable-text/index.d.ts +39 -0
- package/dist/components/expandable-text/index.js +2 -0
- package/dist/components/expandable-text/use-clamped.js +23 -0
- package/dist/components/facet-filters/_hooks/use-filter-group.js +51 -0
- package/dist/components/facet-filters/active-filters.js +31 -0
- package/dist/components/facet-filters/filter-group.js +110 -0
- package/dist/components/facet-filters/filters-panel.js +59 -0
- package/dist/components/facet-filters/filters-pill.js +40 -0
- package/dist/components/facet-filters/index.d.ts +104 -0
- package/dist/components/facet-filters/index.js +6 -0
- package/dist/components/facet-filters/use-filters-collapsed.js +21 -0
- package/dist/components/feature-grid/feature-grid.js +115 -0
- package/dist/components/feature-grid/index.d.ts +53 -0
- package/dist/components/feature-grid/index.js +2 -0
- package/dist/components/file-input/file-input.js +9 -3
- package/dist/components/file-input/index.d.ts +78 -0
- package/dist/components/file-input/index.js +2 -0
- package/dist/components/file-upload/file-upload.js +10 -5
- package/dist/components/file-upload/index.d.ts +38 -0
- package/dist/components/file-upload/index.js +2 -0
- package/dist/components/filters-bar/filters-bar.js +5 -1
- package/dist/components/filters-bar/index.d.ts +26 -0
- package/dist/components/filters-bar/index.js +2 -0
- package/dist/components/flip-card/flip-card.js +147 -0
- package/dist/components/flip-card/index.d.ts +43 -0
- package/dist/components/flip-card/index.js +2 -0
- package/dist/components/floating-window/_hooks/use-drag-move.js +76 -0
- package/dist/components/floating-window/floating-window.js +97 -0
- package/dist/components/floating-window/index.d.ts +45 -0
- package/dist/components/floating-window/index.js +2 -0
- package/dist/components/form/index.d.ts +28 -0
- package/dist/components/form/index.js +2 -0
- package/dist/components/fullscreen-dialog/fullscreen-dialog.js +6 -2
- package/dist/components/fullscreen-dialog/index.d.ts +38 -0
- package/dist/components/fullscreen-dialog/index.js +2 -0
- package/dist/components/horizontal-stepper/horizontal-stepper.js +122 -0
- package/dist/components/horizontal-stepper/index.d.ts +70 -0
- package/dist/components/horizontal-stepper/index.js +2 -0
- package/dist/components/icon-avatar/index.d.ts +9 -0
- package/dist/components/icon-avatar/index.js +2 -0
- package/dist/components/icon-text-action-card/icon-text-action-card.js +9 -5
- package/dist/components/icon-text-action-card/index.d.ts +11 -0
- package/dist/components/icon-text-action-card/index.js +2 -0
- package/dist/components/identicon/identicon.js +33 -0
- package/dist/components/identicon/index.d.ts +26 -0
- package/dist/components/identicon/index.js +2 -0
- package/dist/components/illustration/index.d.ts +37 -0
- package/dist/components/illustration/index.js +3 -0
- package/dist/components/index.d.ts +177 -19529
- package/dist/components/index.js +61 -10
- package/dist/components/input/index.d.ts +15 -0
- package/dist/components/input/index.js +3 -0
- package/dist/components/input-group/index.d.ts +35 -0
- package/dist/components/input-group/index.js +2 -0
- package/dist/components/input-group/input-group.js +41 -0
- package/dist/components/input-otp/index.d.ts +63 -0
- package/dist/components/input-otp/index.js +2 -0
- package/dist/components/key-value-manager/index.d.ts +63 -0
- package/dist/components/key-value-manager/index.js +2 -0
- package/dist/components/key-value-manager/key-value-manager-table.js +7 -5
- package/dist/components/label/index.d.ts +8 -0
- package/dist/components/label/index.js +2 -0
- package/dist/components/link/index.d.ts +33 -0
- package/dist/components/link/index.js +2 -0
- package/dist/components/list/index.d.ts +9 -0
- package/dist/components/list/index.js +3 -0
- package/dist/components/list/list-item.utils.js +1 -1
- package/dist/components/list/list.js +3 -1
- package/dist/components/list-details/index.d.ts +51 -0
- package/dist/components/list-details/index.js +2 -0
- package/dist/components/list-details/list-details.js +5 -2
- package/dist/components/lottie-animation-container/index.d.ts +10 -0
- package/dist/components/lottie-animation-container/index.js +2 -0
- package/dist/components/lottie-animation-container/lottie-animation-container.js +22 -3
- package/dist/components/lottie-animations/index.d.ts +8 -0
- package/dist/components/lottie-animations/index.js +2 -0
- package/dist/components/markdown-content/index.d.ts +32 -0
- package/dist/components/markdown-content/index.js +2 -0
- package/dist/components/media-card/index.d.ts +125 -0
- package/dist/components/media-card/index.js +4 -0
- package/dist/components/media-card/media-card-image.js +59 -0
- package/dist/components/media-card/media-card-reveal.js +76 -0
- package/dist/components/media-card/media-card.classes.js +37 -0
- package/dist/components/media-card/media-card.js +91 -0
- package/dist/components/media-stage/index.d.ts +41 -0
- package/dist/components/media-stage/index.js +2 -0
- package/dist/components/media-stage/media-stage.js +48 -0
- package/dist/components/menu/index.d.ts +14 -0
- package/dist/components/menu/index.js +2 -0
- package/dist/components/message-scroller/_hooks/use-follow-bottom.js +85 -0
- package/dist/components/message-scroller/index.d.ts +29 -0
- package/dist/components/message-scroller/index.js +2 -0
- package/dist/components/message-scroller/message-scroller.js +65 -0
- package/dist/components/mini-bar-chart/index.d.ts +40 -0
- package/dist/components/mini-bar-chart/index.js +2 -0
- package/dist/components/mini-bar-chart/mini-bar-chart.js +93 -0
- package/dist/components/monospace-content/index.d.ts +43 -0
- package/dist/components/monospace-content/index.js +2 -0
- package/dist/components/monospace-content/monospace-content.js +1 -1
- package/dist/components/nav-bar/index.d.ts +148 -0
- package/dist/components/nav-bar/index.js +2 -0
- package/dist/components/nav-bar/nav-bar-details-panel.js +158 -44
- package/dist/components/nav-bar/nav-bar-mobile-menu.js +93 -27
- package/dist/components/nav-bar/nav-bar.js +256 -138
- package/dist/components/nav-bar/use-nav-bar-hover-details.js +80 -0
- package/dist/components/nav-bar/use-nav-bar-overflow.js +5 -5
- package/dist/components/notice-strip/index.d.ts +32 -0
- package/dist/components/notice-strip/index.js +2 -0
- package/dist/components/notice-strip/notice-strip.js +57 -0
- package/dist/components/option-card-group/index.d.ts +50 -0
- package/dist/components/option-card-group/index.js +2 -0
- package/dist/components/option-card-group/option-card-group.js +76 -0
- package/dist/components/overflow-badge-list/index.d.ts +63 -0
- package/dist/components/overflow-badge-list/index.js +2 -0
- package/dist/components/overflow-badge-list/overflow-badge-list.js +78 -19
- package/dist/components/page-banner/index.d.ts +33 -0
- package/dist/components/page-banner/index.js +2 -0
- package/dist/components/page-banner/page-banner.js +56 -0
- package/dist/components/page-container/index.d.ts +20 -0
- package/dist/components/page-container/index.js +3 -0
- package/dist/components/page-container/page-container.js +5 -5
- package/dist/components/pagination/index.d.ts +31 -0
- package/dist/components/pagination/index.js +3 -0
- package/dist/components/popover/index.d.ts +60 -0
- package/dist/components/popover/index.js +3 -0
- package/dist/components/preview-card/index.d.ts +24 -0
- package/dist/components/preview-card/index.js +2 -0
- package/dist/components/progress-bar/index.d.ts +32 -0
- package/dist/components/progress-bar/index.js +2 -0
- package/dist/components/progress-bar/progress-bar.js +22 -6
- package/dist/components/radio-group/index.d.ts +24 -0
- package/dist/components/radio-group/index.js +2 -0
- package/dist/components/rank-numeral/index.d.ts +30 -0
- package/dist/components/rank-numeral/index.js +2 -0
- package/dist/components/rank-numeral/rank-numeral.js +26 -0
- package/dist/components/reaction-button/index.d.ts +32 -0
- package/dist/components/reaction-button/index.js +2 -0
- package/dist/components/reaction-button/reaction-button.js +50 -0
- package/dist/components/readout/index.d.ts +31 -0
- package/dist/components/readout/index.js +2 -0
- package/dist/components/readout/readout.js +63 -0
- package/dist/components/requirement-list/index.d.ts +52 -0
- package/dist/components/requirement-list/index.js +2 -0
- package/dist/components/requirement-list/requirement-list.js +29 -8
- package/dist/components/resizable/index.d.ts +31 -0
- package/dist/components/resizable/index.js +4 -0
- package/dist/components/resizable/resizable-group.js +23 -0
- package/dist/components/resizable/resizable-panel.js +28 -0
- package/dist/components/resizable/resizable-separator.js +24 -0
- package/dist/components/reveal/index.d.ts +23 -0
- package/dist/components/reveal/index.js +2 -0
- package/dist/components/reveal/reveal.js +24 -0
- package/dist/components/scroll-area/index.d.ts +27 -0
- package/dist/components/scroll-area/index.js +2 -0
- package/dist/components/scrollable-sections/index.d.ts +58 -0
- package/dist/components/scrollable-sections/index.js +2 -0
- package/dist/components/scrollable-sections/scrollable-sections.js +11 -3
- package/dist/components/search-box/index.d.ts +32 -0
- package/dist/components/search-box/index.js +2 -0
- package/dist/components/search-box/search-box.js +18 -3
- package/dist/components/search-field-shell.js +1 -1
- package/dist/components/select/index.d.ts +44 -0
- package/dist/components/select/index.js +2 -0
- package/dist/components/selectable-card-list/checkbox-card-list.js +5 -3
- package/dist/components/selectable-card-list/index.d.ts +76 -0
- package/dist/components/selectable-card-list/index.js +2 -0
- package/dist/components/selectable-card-list/radio-card-list.js +12 -6
- package/dist/components/selectable-card-list/selectable-card-list-shared.js +24 -12
- package/dist/components/selectable-card-list/selectable-card-list.js +12 -3
- package/dist/components/separator/index.d.ts +24 -0
- package/dist/components/separator/index.js +2 -0
- package/dist/components/share-menu/index.d.ts +55 -0
- package/dist/components/share-menu/index.js +2 -0
- package/dist/components/share-menu/share-marks.js +31 -0
- package/dist/components/share-menu/share-menu.js +140 -0
- package/dist/components/share-menu/share-urls.js +15 -0
- package/dist/components/sheet/index.d.ts +41 -0
- package/dist/components/sheet/index.js +2 -0
- package/dist/components/showcase-card/index.d.ts +53 -0
- package/dist/components/showcase-card/index.js +2 -0
- package/dist/components/showcase-card/showcase-card.js +75 -0
- package/dist/components/sidebar/index.d.ts +109 -0
- package/dist/components/sidebar/index.js +4 -0
- package/dist/components/sidebar/sidebar.js +56 -40
- package/dist/components/simple-clickable-card/index.d.ts +11 -0
- package/dist/components/simple-clickable-card/index.js +2 -0
- package/dist/components/simple-clickable-card/simple-clickable-card-shared.js +2 -2
- package/dist/components/simple-clickable-card/simple-clickable-card.js +5 -2
- package/dist/components/simple-info-card/index.d.ts +25 -0
- package/dist/components/simple-info-card/index.js +2 -0
- package/dist/components/simple-info-card/simple-info-card.js +6 -3
- package/dist/components/simple-list/index.d.ts +63 -0
- package/dist/components/simple-list/index.js +2 -0
- package/dist/components/simple-list/simple-list.js +3 -1
- package/dist/components/simple-paginated-list/index.d.ts +20 -0
- package/dist/components/simple-paginated-list/index.js +2 -0
- package/dist/components/simplified-date/index.d.ts +18 -0
- package/dist/components/simplified-date/index.js +2 -0
- package/dist/components/skeleton/index.d.ts +5 -0
- package/dist/components/skeleton/index.js +2 -0
- package/dist/components/skeletons/index.d.ts +11 -0
- package/dist/components/skeletons/index.js +2 -0
- package/dist/components/sort-menu/index.d.ts +34 -0
- package/dist/components/sort-menu/index.js +2 -0
- package/dist/components/sort-menu/sort-menu.js +39 -0
- package/dist/components/spinner/index.d.ts +15 -0
- package/dist/components/spinner/index.js +2 -0
- package/dist/components/stat-card/index.d.ts +43 -0
- package/dist/components/stat-card/index.js +2 -0
- package/dist/components/stat-card/stat-card.js +31 -12
- package/dist/components/status-badge/index.d.ts +24 -0
- package/dist/components/status-badge/index.js +2 -0
- package/dist/components/status-badge/status-badge.js +3 -2
- package/dist/components/status-card-list/index.d.ts +24 -0
- package/dist/components/status-card-list/index.js +2 -0
- package/dist/components/status-card-list/status-card-list.js +8 -4
- package/dist/components/step-tabs/index.d.ts +94 -0
- package/dist/components/step-tabs/index.js +2 -0
- package/dist/components/step-tabs/step-tabs.js +202 -0
- package/dist/components/style-scope/index.d.ts +32 -0
- package/dist/components/style-scope/index.js +2 -0
- package/dist/components/style-scope/style-scope.js +49 -0
- package/dist/components/switch/index.d.ts +15 -0
- package/dist/components/switch/index.js +2 -0
- package/dist/components/table/index.d.ts +18 -0
- package/dist/components/table/index.js +2 -0
- package/dist/components/tabs/index.d.ts +103 -0
- package/dist/components/tabs/index.js +2 -0
- package/dist/components/tag/index.d.ts +31 -0
- package/dist/components/tag/index.js +2 -0
- package/dist/components/tag/tag.js +79 -28
- package/dist/components/tag-input/index.d.ts +36 -0
- package/dist/components/tag-input/index.js +2 -0
- package/dist/components/tag-input/tag-input.js +10 -4
- package/dist/components/text-effects/index.d.ts +53 -0
- package/dist/components/text-effects/index.js +6 -0
- package/dist/components/textarea/index.d.ts +16 -0
- package/dist/components/textarea/index.js +2 -0
- package/dist/components/thumbnail-strip/index.d.ts +42 -0
- package/dist/components/thumbnail-strip/index.js +2 -0
- package/dist/components/thumbnail-strip/thumbnail-strip.js +124 -0
- package/dist/components/thumbnail-strip/use-scroll-edges.js +41 -0
- package/dist/components/time-picker/index.d.ts +13 -0
- package/dist/components/time-picker/index.js +2 -0
- package/dist/components/timeline/index.d.ts +39 -0
- package/dist/components/timeline/index.js +2 -0
- package/dist/components/timeline/timeline.js +85 -0
- package/dist/components/toast/index.d.ts +56 -0
- package/dist/components/toast/index.js +2 -0
- package/dist/components/toast/toast.js +42 -32
- package/dist/components/togglable-items-list/index.d.ts +28 -0
- package/dist/components/togglable-items-list/index.js +2 -0
- package/dist/components/toggle-group/index.d.ts +35 -0
- package/dist/components/toggle-group/index.js +2 -0
- package/dist/components/toolbar/index.d.ts +58 -0
- package/dist/components/toolbar/index.js +3 -0
- package/dist/components/toolbar/toolbar-button.js +40 -0
- package/dist/components/toolbar/toolbar.js +56 -0
- package/dist/components/tooltip/index.d.ts +29 -0
- package/dist/components/tooltip/index.js +3 -0
- package/dist/components/tooltip/tooltip.js +12 -2
- package/dist/components/transfer-list/index.d.ts +36 -0
- package/dist/components/transfer-list/index.js +2 -0
- package/dist/components/transfer-list/transfer-list.js +1 -1
- package/dist/components/truncated-line-with-tooltip/index.d.ts +22 -0
- package/dist/components/truncated-line-with-tooltip/index.js +2 -0
- package/dist/components/truncated-line-with-tooltip/truncated-line-with-tooltip.js +26 -8
- package/dist/components/typography/index.d.ts +19 -0
- package/dist/components/typography/index.js +3 -0
- package/dist/components/use-mobile/index.d.ts +3 -0
- package/dist/components/use-mobile/index.js +2 -0
- package/dist/components/user-type-badge/index.d.ts +39 -0
- package/dist/components/user-type-badge/index.js +3 -0
- package/dist/components/user-type-badge/user-type-badge.js +2 -1
- package/dist/components/vertical-stepper/index.d.ts +7 -0
- package/dist/components/vertical-stepper/index.js +2 -0
- package/dist/components/vertical-stepper/vertical-stepper.js +33 -6
- package/dist/components/view-toggle/index.d.ts +38 -0
- package/dist/components/view-toggle/index.js +2 -0
- package/dist/components/view-toggle/view-toggle.js +56 -0
- package/dist/core/animate-ui/components/animate/code.js +83 -9
- package/dist/core/animate-ui/components/animate/tabs.js +234 -19
- package/dist/core/animate-ui/components/animate/tooltip.js +10 -2
- package/dist/core/animate-ui/components/base/preview-card.js +20 -3
- package/dist/core/animate-ui/components/buttons/copy.js +12 -6
- package/dist/core/animate-ui/components/radix/dialog.js +17 -3
- package/dist/core/animate-ui/components/radix/dropdown-menu.js +26 -9
- package/dist/core/animate-ui/components/radix/sheet.js +20 -4
- package/dist/core/animate-ui/components/radix/sidebar.js +9 -9
- package/dist/core/animate-ui/components/radix/toggle-group.js +103 -13
- package/dist/core/animate-ui/components/radix/toggle.js +5 -5
- package/dist/core/animate-ui/primitives/animate/code-block.js +31 -4
- package/dist/core/animate-ui/primitives/animate/shiki-highlighter.js +5 -2
- package/dist/core/animate-ui/primitives/animate/tabs.js +7 -4
- package/dist/core/animate-ui/primitives/animate/tooltip.js +10 -3
- package/dist/core/animate-ui/primitives/base/preview-card.js +2 -2
- package/dist/core/animate-ui/primitives/base/progress.js +1 -1
- package/dist/core/animate-ui/primitives/base/radio.js +3 -3
- package/dist/core/animate-ui/primitives/effects/highlight.js +1 -0
- package/dist/core/animate-ui/primitives/radix/accordion.js +1 -1
- package/dist/core/animate-ui/primitives/radix/dialog.js +6 -3
- package/dist/core/animate-ui/primitives/radix/dropdown-menu.js +2 -2
- package/dist/core/animate-ui/primitives/radix/sheet.js +7 -3
- package/dist/core/animate-ui/primitives/radix/switch.js +2 -2
- package/dist/core/animate-ui/primitives/radix/toggle-group.js +2 -2
- package/dist/core/badge.js +5 -2
- package/dist/core/breadcrumb.js +1 -1
- package/dist/core/button/button.js +8 -8
- package/dist/core/button/craft-button.js +8 -2
- package/dist/core/button.js +17 -7
- package/dist/core/card.js +23 -5
- package/dist/core/combobox/combobox.js +8 -2
- package/dist/core/command.js +3 -3
- package/dist/core/form.js +1 -1
- package/dist/core/hooks/use-nested-layer-press-guard.js +46 -0
- package/dist/core/hooks/use-on-screen.js +33 -0
- package/dist/core/hooks/use-prefers-reduced-motion.js +19 -0
- package/dist/core/hooks/use-scroll-overflow.js +20 -0
- package/dist/core/index.d.ts +30 -5
- package/dist/core/index.js +5 -2
- package/dist/core/input/input-password.js +13 -9
- package/dist/core/input/input.js +38 -12
- package/dist/core/input-otp/input-otp.js +9 -5
- package/dist/core/popover-group.js +48 -0
- package/dist/core/popover-hover.js +127 -0
- package/dist/core/popover.js +75 -6
- package/dist/core/select.js +35 -20
- package/dist/core/table.js +5 -3
- package/dist/core/textarea/textarea.js +11 -3
- package/dist/data-table/index.d.ts +4 -0
- package/dist/data-table/index.js +3 -0
- package/dist/date/index.d.ts +11 -0
- package/dist/date/index.js +7 -0
- package/dist/forms/index.d.ts +4 -0
- package/dist/forms/index.js +2 -0
- package/dist/icon-avatar.props-RYtw2eSW.d.ts +31 -0
- package/dist/icon-text-action-card.props-B2ggncUK.d.ts +53 -0
- package/dist/index.d.ts +169 -15
- package/dist/index.js +63 -10
- package/dist/input-CYI1hhGc.d.ts +38 -0
- package/dist/layouts/index.d.ts +132 -8
- package/dist/layouts/index.js +3 -1
- package/dist/layouts/minimal-workspace-layout/minimal-workspace-layout-context.js +5 -0
- package/dist/layouts/minimal-workspace-layout/minimal-workspace-layout.js +404 -0
- package/dist/layouts/minimal-workspace-layout/rail-logo.js +90 -0
- package/dist/layouts/minimal-workspace-layout/sidebar-trigger.js +42 -0
- package/dist/layouts/shared/account-menu-props.js +21 -0
- package/dist/layouts/shared/footer-branding.js +34 -0
- package/dist/layouts/shared/sidebar-logo.js +59 -0
- package/dist/layouts/workspace-layout/account-menu/account-menu.js +9 -3
- package/dist/layouts/workspace-layout/footer/footer.js +1 -1
- package/dist/layouts/workspace-layout/header/header.js +1 -1
- package/dist/layouts/workspace-layout/workspace-layout.js +28 -80
- package/dist/{list.props-x1j3CbcF.d.ts → list.props-DP_xPTqU.d.ts} +2 -1
- package/dist/markdown/index.d.ts +11 -0
- package/dist/markdown/index.js +5 -0
- package/dist/my-account-menu.props-C7DK71WC.d.ts +67 -0
- package/dist/page-container.props-JutTvKFq.d.ts +48 -0
- package/dist/resizable.props-RxFY5tm_.d.ts +44 -0
- package/dist/section-card-B7c5uc08.d.ts +84 -0
- package/dist/simple-clickable-card.props-BrPCw7CR.d.ts +51 -0
- package/dist/slot-DGErA9zi.d.ts +10 -0
- package/dist/status-badge.props-lKlEOfRt.d.ts +32 -0
- package/dist/style-axes-DSQ2DGc5.d.ts +133 -0
- package/dist/toast/index.d.ts +6 -0
- package/dist/toast/index.js +2 -0
- package/dist/tooltip-C0bYa8a3.d.ts +37 -0
- package/dist/{types-DtUxK-Am.d.ts → types-CkXflqg7.d.ts} +31 -1
- package/dist/utils/cn.js +6 -1
- package/dist/utils/color.js +35 -10
- package/dist/utils/index.d.ts +18 -2
- package/dist/utils/index.js +4 -1
- package/dist/utils/silver-shine.js +16 -1
- package/dist/utils/style-axes.js +227 -0
- package/dist/utils/variant.js +104 -8
- package/dist/utils/view-transition.js +21 -0
- package/dist/variant-D81RhpbR.d.ts +104 -0
- package/dist/vertical-stepper.props-BXYcbW70.d.ts +29 -0
- package/package.json +52 -6
- package/src/styles/colors.css +100 -4
- package/src/styles/globals.css +8 -131
- package/src/styles/style-axes.css +21 -0
- package/src/styles/theme.css +696 -0
- package/dist/app-logo.props-Ct7QBdTd.d.ts +0 -40
- package/dist/popover-ByLD3-Qv.d.ts +0 -204
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn.js";
|
|
2
|
+
import { Children } from "react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/avatar-group/avatar-group.tsx
|
|
5
|
+
var chipSizeClasses = {
|
|
6
|
+
sm: "h-5 min-w-5 px-1 text-[10px]",
|
|
7
|
+
default: "h-7 min-w-7 px-1.5 text-xs",
|
|
8
|
+
lg: "h-10 min-w-10 px-2 text-sm",
|
|
9
|
+
xl: "h-19 min-w-19 px-3 text-xl"
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* A row of overlapping avatars — the people behind something, at a glance.
|
|
13
|
+
* Each sits on a ring of the page background so the overlap reads as a stack;
|
|
14
|
+
* past `max` (or up to `total`) a "+N" chip says how many more there are.
|
|
15
|
+
*/
|
|
16
|
+
function AvatarGroup({ children, max, total, size = "default", label, className }) {
|
|
17
|
+
const items = Children.toArray(children);
|
|
18
|
+
const shown = max === void 0 ? items : items.slice(0, Math.max(0, max));
|
|
19
|
+
const more = Math.max(0, (total ?? items.length) - shown.length);
|
|
20
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
21
|
+
role: label ? "group" : void 0,
|
|
22
|
+
"aria-label": label,
|
|
23
|
+
"aria-hidden": label ? void 0 : true,
|
|
24
|
+
className: cn("flex items-center", className),
|
|
25
|
+
children: [shown.map((item, index) => /* @__PURE__ */ jsx("span", {
|
|
26
|
+
className: "-ml-2 inline-flex shrink-0 rounded-full ring-2 ring-background first:ml-0",
|
|
27
|
+
children: item
|
|
28
|
+
}, index)), more > 0 && /* @__PURE__ */ jsxs("span", {
|
|
29
|
+
className: cn("-ml-2 inline-flex shrink-0 items-center justify-center rounded-full bg-muted font-medium text-muted-foreground ring-2 ring-background first:ml-0", chipSizeClasses[size]),
|
|
30
|
+
children: ["+", more]
|
|
31
|
+
})]
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
export { AvatarGroup as default };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { a as AvatarSize } from '../../avatar.props-2q5BsX-R.js';
|
|
4
|
+
import '../../index-BQANnKs9.js';
|
|
5
|
+
|
|
6
|
+
interface AvatarGroupProps {
|
|
7
|
+
/** The `Avatar`s, in order; the first sits on top. */
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
/** Show at most this many; the rest become a "+N" chip. Default: all of them. */
|
|
10
|
+
max?: number;
|
|
11
|
+
/**
|
|
12
|
+
* How many people the group stands for, when that is more than the avatars
|
|
13
|
+
* passed (the five most active of 31 makers). The chip counts the
|
|
14
|
+
* difference. Default: the number of children.
|
|
15
|
+
*/
|
|
16
|
+
total?: number;
|
|
17
|
+
/** Size of the "+N" chip — match the avatars'. Default `default`. */
|
|
18
|
+
size?: AvatarSize;
|
|
19
|
+
/** Accessible name for the group ("31 makers"). Without one the group is decorative. */
|
|
20
|
+
label?: string;
|
|
21
|
+
className?: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* A row of overlapping avatars — the people behind something, at a glance.
|
|
26
|
+
* Each sits on a ring of the page background so the overlap reads as a stack;
|
|
27
|
+
* past `max` (or up to `total`) a "+N" chip says how many more there are.
|
|
28
|
+
*/
|
|
29
|
+
declare function AvatarGroup({ children, max, total, size, label, className }: AvatarGroupProps): React.JSX.Element;
|
|
30
|
+
|
|
31
|
+
export { AvatarGroup, type AvatarGroupProps };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { k as StyleAxisProps } from '../../style-axes-DSQ2DGc5.js';
|
|
4
|
+
import { f as Variant } from '../../variant-D81RhpbR.js';
|
|
5
|
+
import { C as Color } from '../../index-BQANnKs9.js';
|
|
6
|
+
|
|
7
|
+
declare const badgeVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
8
|
+
interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, Pick<StyleAxisProps, "radius"> {
|
|
9
|
+
color?: Color;
|
|
10
|
+
variant?: Variant;
|
|
11
|
+
}
|
|
12
|
+
declare function Badge({ className, variant, color, style, children, radius, ...props }: BadgeProps): React.JSX.Element;
|
|
13
|
+
|
|
14
|
+
export { Badge, type BadgeProps, badgeVariants };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
declare const Breadcrumb: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
|
|
4
|
+
separator?: React.ReactNode;
|
|
5
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
6
|
+
declare const BreadcrumbList: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
|
|
7
|
+
declare const BreadcrumbItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
|
|
8
|
+
declare const BreadcrumbLink: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
|
|
9
|
+
asChild?: boolean;
|
|
10
|
+
} & React.RefAttributes<HTMLAnchorElement>>;
|
|
11
|
+
declare const BreadcrumbPage: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
12
|
+
declare const BreadcrumbSeparator: {
|
|
13
|
+
({ children, className, ...props }: React.ComponentProps<"li">): React.JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
declare const BreadcrumbEllipsis: {
|
|
17
|
+
({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "../../core/breadcrumb.js";
|
|
2
|
+
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/bubble/bubble.tsx
|
|
4
|
+
/**
|
|
5
|
+
* One turn's text in a conversation (shadcn's Bubble, on the library's
|
|
6
|
+
* tokens). The person's own words sit in a soft tinted box; the other side is
|
|
7
|
+
* plain text on the page, so a long reply reads like a page rather than a
|
|
8
|
+
* stack of boxes.
|
|
9
|
+
*/
|
|
10
|
+
function Bubble({ variant = "plain", size = "base", className, ...props }) {
|
|
11
|
+
return /* @__PURE__ */ jsx("div", {
|
|
12
|
+
"data-slot": "bubble",
|
|
13
|
+
className: cn("min-w-0 wrap-break-word whitespace-pre-line text-foreground", size === "sm" ? "text-sm leading-normal" : "text-base leading-relaxed", variant === "filled" && "rounded-2xl rounded-br-md bg-primary/7 dark:bg-primary/15", variant === "filled" && (size === "sm" ? "px-3.5 py-2" : "px-4 py-2.5"), className),
|
|
14
|
+
...props
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { Bubble };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { HTMLAttributes } from 'react';
|
|
3
|
+
|
|
4
|
+
interface BubbleProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
/** `filled` for the person's own words (a soft primary tint), `plain` for the other side (no box: text on the page). */
|
|
6
|
+
variant?: "filled" | "plain";
|
|
7
|
+
/** `base` (default): reading size, for a conversation that owns the page. `sm`: the page's working text size, for a conversation in a column beside other things. */
|
|
8
|
+
size?: "base" | "sm";
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* One turn's text in a conversation (shadcn's Bubble, on the library's
|
|
13
|
+
* tokens). The person's own words sit in a soft tinted box; the other side is
|
|
14
|
+
* plain text on the page, so a long reply reads like a page rather than a
|
|
15
|
+
* stack of boxes.
|
|
16
|
+
*/
|
|
17
|
+
declare function Bubble({ variant, size, className, ...props }: BubbleProps): React.JSX.Element;
|
|
18
|
+
|
|
19
|
+
export { Bubble, type BubbleProps };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { cn } from "../../utils/cn.js";
|
|
2
|
+
import { SILVER_SOLID_SHEEN_STYLE, SilverBezelOverlay, SilverMetallicBorderOverlay } from "../../utils/silver-shine.js";
|
|
3
|
+
import { useStyleAxes } from "../../utils/style-axes.js";
|
|
2
4
|
import { Button as Button$1, buttonVariants } from "../../core/button.js";
|
|
3
5
|
import Tooltip from "../tooltip/tooltip.js";
|
|
4
6
|
import * as React$1 from "react";
|
|
@@ -10,56 +12,72 @@ var presetButtonColors = {
|
|
|
10
12
|
primary: {
|
|
11
13
|
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
12
14
|
outline: "border-primary/30 text-primary hover:bg-primary/5 hover:border-primary",
|
|
15
|
+
glow: "border-primary/30 text-primary hover:bg-primary/5 hover:border-primary shadow-glow shadow-primary/45",
|
|
13
16
|
ghost: "text-primary hover:bg-primary/10",
|
|
14
17
|
link: "text-primary"
|
|
15
18
|
},
|
|
16
19
|
secondary: {
|
|
17
20
|
default: "bg-secondary text-secondary-foreground hover:bg-secondary/90",
|
|
18
21
|
outline: "border-secondary/30 text-secondary hover:bg-secondary/5 hover:border-secondary",
|
|
22
|
+
glow: "border-secondary/30 text-secondary hover:bg-secondary/5 hover:border-secondary shadow-glow shadow-secondary/45",
|
|
19
23
|
ghost: "text-secondary hover:bg-secondary/10",
|
|
20
24
|
link: "text-secondary"
|
|
21
25
|
},
|
|
22
26
|
error: {
|
|
23
27
|
default: "bg-error text-error-foreground hover:bg-error/90",
|
|
24
28
|
outline: "border-error/30 text-error hover:bg-error/5 hover:border-error",
|
|
29
|
+
glow: "border-error/30 text-error hover:bg-error/5 hover:border-error shadow-glow shadow-error/45",
|
|
25
30
|
ghost: "text-error hover:bg-error/10",
|
|
26
31
|
link: "text-error"
|
|
27
32
|
},
|
|
28
33
|
info: {
|
|
29
34
|
default: "bg-info text-info-foreground hover:bg-info/90",
|
|
30
35
|
outline: "border-info/30 text-info hover:bg-info/5 hover:border-info",
|
|
36
|
+
glow: "border-info/30 text-info hover:bg-info/5 hover:border-info shadow-glow shadow-info/45",
|
|
31
37
|
ghost: "text-info hover:bg-info/10",
|
|
32
38
|
link: "text-info"
|
|
33
39
|
},
|
|
34
40
|
success: {
|
|
35
41
|
default: "bg-success text-success-foreground hover:bg-success/90",
|
|
36
42
|
outline: "border-success/30 text-success hover:bg-success/5 hover:border-success",
|
|
43
|
+
glow: "border-success/30 text-success hover:bg-success/5 hover:border-success shadow-glow shadow-success/45",
|
|
37
44
|
ghost: "text-success hover:bg-success/10",
|
|
38
45
|
link: "text-success"
|
|
39
46
|
},
|
|
40
47
|
warning: {
|
|
41
48
|
default: "bg-warning text-warning-foreground hover:bg-warning/90",
|
|
42
49
|
outline: "border-warning/30 text-warning hover:bg-warning/5 hover:border-warning",
|
|
50
|
+
glow: "border-warning/30 text-warning hover:bg-warning/5 hover:border-warning shadow-glow shadow-warning/45",
|
|
43
51
|
ghost: "text-warning hover:bg-warning/10",
|
|
44
52
|
link: "text-warning"
|
|
45
53
|
},
|
|
46
54
|
disabled: {
|
|
47
55
|
default: "bg-disabled text-disabled-foreground",
|
|
48
56
|
outline: "border-disabled/30 text-disabled",
|
|
57
|
+
glow: "border-disabled/30 text-disabled shadow-glow shadow-disabled/45",
|
|
49
58
|
ghost: "text-disabled",
|
|
50
59
|
link: "text-disabled"
|
|
51
60
|
},
|
|
52
61
|
gray: {
|
|
53
62
|
default: "bg-gray text-gray-foreground hover:bg-gray/90",
|
|
54
63
|
outline: "border-input text-gray hover:bg-gray/5 hover:border-gray",
|
|
64
|
+
glow: "border-input text-gray hover:bg-gray/5 hover:border-gray shadow-glow shadow-gray/45",
|
|
55
65
|
ghost: "text-gray hover:bg-gray/10",
|
|
56
66
|
link: "text-gray"
|
|
57
67
|
},
|
|
58
68
|
mist: {
|
|
59
69
|
default: "bg-mist text-mist-foreground hover:bg-mist/90",
|
|
60
70
|
outline: "border-mist-border text-mist-foreground hover:bg-mist hover:border-mist-border",
|
|
71
|
+
glow: "border-mist-border text-mist-foreground hover:bg-mist hover:border-mist-border shadow-glow shadow-mist-foreground/45",
|
|
61
72
|
ghost: "text-mist-foreground hover:bg-mist",
|
|
62
73
|
link: "text-mist-foreground"
|
|
74
|
+
},
|
|
75
|
+
silver: {
|
|
76
|
+
default: "relative bg-gray text-gray-foreground hover:bg-gray/90",
|
|
77
|
+
outline: "relative isolate border-0 text-gray hover:bg-gray/5",
|
|
78
|
+
glow: "relative isolate border-0 text-gray hover:bg-gray/5 shadow-glow shadow-gray/45",
|
|
79
|
+
ghost: "text-gray hover:bg-gray/10",
|
|
80
|
+
link: "text-gray"
|
|
63
81
|
}
|
|
64
82
|
};
|
|
65
83
|
var primaryHoverRingClasses = "hover:ring-primary/90 focus-visible:ring-primary/90";
|
|
@@ -72,7 +90,8 @@ var presetRingColors = {
|
|
|
72
90
|
warning: "hover:ring-warning/90 focus-visible:ring-warning/90",
|
|
73
91
|
disabled: "hover:ring-disabled/90 focus-visible:ring-disabled/90",
|
|
74
92
|
gray: "hover:ring-gray/90 focus-visible:ring-gray/90",
|
|
75
|
-
mist: "hover:ring-mist-border focus-visible:ring-mist-border"
|
|
93
|
+
mist: "hover:ring-mist-border focus-visible:ring-mist-border",
|
|
94
|
+
silver: "hover:ring-gray/90 focus-visible:ring-gray/90"
|
|
76
95
|
};
|
|
77
96
|
/** `hideRingOnHover` still shows keyboard focus; only the hover ring is suppressed. */
|
|
78
97
|
var presetFocusVisibleRingColors = {
|
|
@@ -84,7 +103,8 @@ var presetFocusVisibleRingColors = {
|
|
|
84
103
|
warning: "focus-visible:ring-warning/90",
|
|
85
104
|
disabled: "focus-visible:ring-disabled/90",
|
|
86
105
|
gray: "focus-visible:ring-gray/90",
|
|
87
|
-
mist: "focus-visible:ring-mist-border"
|
|
106
|
+
mist: "focus-visible:ring-mist-border",
|
|
107
|
+
silver: "focus-visible:ring-gray/90"
|
|
88
108
|
};
|
|
89
109
|
var iconOnlyLabelClasses = {
|
|
90
110
|
sm: "max-sm:sr-only",
|
|
@@ -130,20 +150,40 @@ function ProgressBarOverlay() {
|
|
|
130
150
|
}
|
|
131
151
|
});
|
|
132
152
|
}
|
|
133
|
-
var iconAnimateClasses = "transition-transform duration-
|
|
134
|
-
|
|
153
|
+
var iconAnimateClasses = "transition-transform duration-[var(--espd-duration-normal,200ms)]";
|
|
154
|
+
/**
|
|
155
|
+
* The styled button: preset `color`s, start/end icons, loading indicators,
|
|
156
|
+
* tooltip and `asChild` for links. Not the same as the uncoloured base
|
|
157
|
+
* `Button` that `/core` exports. Note `fullWidth` defaults to `true`.
|
|
158
|
+
*/
|
|
159
|
+
var Button = React$1.forwardRef(({ children, color = "primary", startIcon, endIcon, fullWidth = true, loading = false, loadingIndicator = "spinner", animateStartIconOnHover = false, animateEndIconOnHover = false, hideRingOnHover = false, usePrimaryColorOnHover = false, tooltip, iconOnlyBelow, disabled, className, variant = "default", size, asChild = false, radius, elevation, border, style, ...props }, ref) => {
|
|
160
|
+
const axes = useStyleAxes({
|
|
161
|
+
radius,
|
|
162
|
+
elevation,
|
|
163
|
+
border,
|
|
164
|
+
style
|
|
165
|
+
}, [
|
|
166
|
+
"radius",
|
|
167
|
+
"elevation",
|
|
168
|
+
"border"
|
|
169
|
+
]);
|
|
135
170
|
const needsGroup = animateStartIconOnHover || animateEndIconOnHover;
|
|
136
171
|
const isProgressBar = loading && loadingIndicator === "progress-bar";
|
|
137
172
|
const isSpinner = loading && loadingIndicator === "spinner";
|
|
138
173
|
const resolvedVariant = variant ?? "default";
|
|
139
174
|
const colorClasses = presetButtonColors[color]?.[resolvedVariant] ?? "";
|
|
140
175
|
const ringClasses = presetRingColors[color] ?? "";
|
|
141
|
-
const
|
|
176
|
+
const silverSurface = color === "silver" && resolvedVariant === "default";
|
|
177
|
+
const silverRing = color === "silver" && (resolvedVariant === "outline" || resolvedVariant === "glow");
|
|
178
|
+
const primaryHoverSurface = usePrimaryColorOnHover && (resolvedVariant === "outline" || resolvedVariant === "glow" || resolvedVariant === "ghost");
|
|
142
179
|
const primaryHoverLink = usePrimaryColorOnHover && resolvedVariant === "link";
|
|
143
|
-
const
|
|
180
|
+
const child = asChild ? React$1.Children.only(children) : null;
|
|
181
|
+
const labelContent = child ? child.props.children : children;
|
|
182
|
+
const label = iconOnlyBelow && labelContent != null ? /* @__PURE__ */ jsx("span", {
|
|
144
183
|
className: iconOnlyLabelClasses[iconOnlyBelow],
|
|
145
|
-
children
|
|
146
|
-
}) :
|
|
184
|
+
children: labelContent
|
|
185
|
+
}) : labelContent;
|
|
186
|
+
const isDisabled = Boolean(disabled || loading);
|
|
147
187
|
const wrapIcon = (icon, direction) => {
|
|
148
188
|
if (!icon) return null;
|
|
149
189
|
if (!(direction === "start" ? animateStartIconOnHover : animateEndIconOnHover)) return icon;
|
|
@@ -152,22 +192,11 @@ var Button = React$1.forwardRef(({ children, color = "primary", startIcon, endIc
|
|
|
152
192
|
children: icon
|
|
153
193
|
});
|
|
154
194
|
};
|
|
155
|
-
const
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
className: cn(colorClasses, primaryHoverSurface && "hover:bg-primary/10", primaryHoverLink && "hover:text-primary", fullWidth && size !== "icon" && "w-full", needsGroup && "group", isProgressBar && "relative overflow-hidden", !hideRingOnHover && variant !== "link" && [
|
|
161
|
-
"ring-offset-background transition-all duration-300",
|
|
162
|
-
"hover:ring-2 hover:ring-offset-2 focus-visible:ring-2 focus-visible:ring-offset-2",
|
|
163
|
-
primaryHoverSurface ? primaryHoverRingClasses : ringClasses
|
|
164
|
-
], hideRingOnHover && variant !== "link" && [
|
|
165
|
-
"ring-offset-background transition-all duration-300",
|
|
166
|
-
"hover:ring-0 focus-visible:ring-2 focus-visible:ring-offset-2",
|
|
167
|
-
primaryHoverSurface ? "focus-visible:ring-primary/90" : presetFocusVisibleRingColors[color]
|
|
168
|
-
], variant === "link" && "hover:ring-0 focus-visible:underline", "shadow-none", getIconOnlyButtonClasses(iconOnlyBelow, size, Boolean(endIcon)), className),
|
|
169
|
-
...props,
|
|
170
|
-
children: [isProgressBar && /* @__PURE__ */ jsx(ProgressBarOverlay, {}), isProgressBar ? /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsxs("span", {
|
|
195
|
+
const content = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
196
|
+
silverSurface && /* @__PURE__ */ jsx(SilverBezelOverlay, {}),
|
|
197
|
+
silverRing && /* @__PURE__ */ jsx(SilverMetallicBorderOverlay, {}),
|
|
198
|
+
isProgressBar && /* @__PURE__ */ jsx(ProgressBarOverlay, {}),
|
|
199
|
+
isProgressBar ? /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsxs("span", {
|
|
171
200
|
className: "relative z-10 inline-flex items-center gap-2",
|
|
172
201
|
children: [
|
|
173
202
|
wrapIcon(startIcon, "start"),
|
|
@@ -178,7 +207,40 @@ var Button = React$1.forwardRef(({ children, color = "primary", startIcon, endIc
|
|
|
178
207
|
isSpinner ? /* @__PURE__ */ jsx(LoaderCircle, { className: "animate-spin" }) : wrapIcon(startIcon, "start"),
|
|
179
208
|
label,
|
|
180
209
|
!isSpinner && wrapIcon(endIcon, "end")
|
|
181
|
-
] })
|
|
210
|
+
] })
|
|
211
|
+
] });
|
|
212
|
+
const asChildDisabledProps = asChild && isDisabled ? {
|
|
213
|
+
"aria-disabled": true,
|
|
214
|
+
"data-disabled": "",
|
|
215
|
+
tabIndex: -1,
|
|
216
|
+
onClickCapture: (event) => {
|
|
217
|
+
event.preventDefault();
|
|
218
|
+
event.stopPropagation();
|
|
219
|
+
}
|
|
220
|
+
} : void 0;
|
|
221
|
+
const button = /* @__PURE__ */ jsx(Button$1, {
|
|
222
|
+
ref,
|
|
223
|
+
variant,
|
|
224
|
+
size,
|
|
225
|
+
asChild,
|
|
226
|
+
disabled: asChild ? void 0 : disabled || loading,
|
|
227
|
+
style: silverSurface ? {
|
|
228
|
+
...SILVER_SOLID_SHEEN_STYLE,
|
|
229
|
+
...axes.style
|
|
230
|
+
} : axes.style,
|
|
231
|
+
className: cn(colorClasses, primaryHoverSurface && "hover:bg-primary/10", primaryHoverLink && "hover:text-primary", fullWidth && size !== "icon" && "w-full", needsGroup && "group", isProgressBar && "relative overflow-hidden", !hideRingOnHover && variant !== "link" && [
|
|
232
|
+
"ring-offset-background transition-all duration-[var(--espd-duration-slow,300ms)]",
|
|
233
|
+
"hover:ring-[length:var(--espd-ring-width,2px)] hover:ring-offset-[length:var(--espd-ring-offset,2px)]",
|
|
234
|
+
"focus-visible:ring-[length:var(--espd-ring-width,2px)] focus-visible:ring-offset-[length:var(--espd-ring-offset,2px)]",
|
|
235
|
+
primaryHoverSurface ? primaryHoverRingClasses : ringClasses
|
|
236
|
+
], hideRingOnHover && variant !== "link" && [
|
|
237
|
+
"ring-offset-background transition-all duration-[var(--espd-duration-slow,300ms)]",
|
|
238
|
+
"hover:ring-0 focus-visible:ring-[length:var(--espd-ring-width,2px)] focus-visible:ring-offset-[length:var(--espd-ring-offset,2px)]",
|
|
239
|
+
primaryHoverSurface ? "focus-visible:ring-primary/90" : presetFocusVisibleRingColors[color]
|
|
240
|
+
], variant === "link" && "hover:ring-0 focus-visible:underline", variant === "default" || variant === "outline" ? "shadow-[shadow:var(--espd-own-elevation,var(--espd-elevation-control,0_0_#0000))]" : variant !== "glow" && "shadow-none", getIconOnlyButtonClasses(iconOnlyBelow, size, Boolean(endIcon)), asChild && isDisabled && "pointer-events-none opacity-50", className),
|
|
241
|
+
...props,
|
|
242
|
+
...asChildDisabledProps,
|
|
243
|
+
children: child ? React$1.cloneElement(child, void 0, content) : content
|
|
182
244
|
});
|
|
183
245
|
if (!tooltip) return button;
|
|
184
246
|
return /* @__PURE__ */ jsx(Tooltip, {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../../utils/cn.js";
|
|
3
|
+
import { useStyleAxes } from "../../utils/style-axes.js";
|
|
3
4
|
import { Button } from "../../core/button/button.js";
|
|
4
5
|
import * as React$1 from "react";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { ZapIcon } from "lucide-react";
|
|
7
7
|
import { useAnimate } from "motion/react";
|
|
8
|
+
import { ZapIcon } from "lucide-react";
|
|
8
9
|
//#region src/components/button/flash-button.tsx
|
|
9
10
|
/** Resting bg + text; hover transitions to bg-background (invert). */
|
|
10
11
|
var flashButtonBgClasses = {
|
|
@@ -42,7 +43,11 @@ var flashButtonDarkBorderClasses = {
|
|
|
42
43
|
gray: "dark:hover:border-gray/30",
|
|
43
44
|
mist: "dark:hover:border-mist-border/30"
|
|
44
45
|
};
|
|
45
|
-
function FlashButton({ label, icon, iconPosition = "end", hideIcon = false, size, color = "primary", className, onMouseEnter, onMouseLeave, ...props }) {
|
|
46
|
+
function FlashButton({ label, icon, iconPosition = "end", hideIcon = false, size, color = "primary", className, onMouseEnter, onMouseLeave, radius, style, ...props }) {
|
|
47
|
+
const axes = useStyleAxes({
|
|
48
|
+
radius,
|
|
49
|
+
style
|
|
50
|
+
}, ["radius"]);
|
|
46
51
|
const [scope, animate] = useAnimate();
|
|
47
52
|
const isHovering = React$1.useRef(false);
|
|
48
53
|
const flashLoop = React$1.useCallback(async () => {
|
|
@@ -82,9 +87,10 @@ function FlashButton({ label, icon, iconPosition = "end", hideIcon = false, size
|
|
|
82
87
|
const iconSize = size === "lg" ? "size-4" : size === "sm" ? "size-2.5" : "size-3";
|
|
83
88
|
return /* @__PURE__ */ jsxs(Button, {
|
|
84
89
|
size,
|
|
85
|
-
className: cn(flashButtonBgClasses[color], "group relative cursor-pointer gap-1.5 overflow-hidden rounded-
|
|
90
|
+
className: cn(flashButtonBgClasses[color], "group relative cursor-pointer gap-1.5 overflow-hidden rounded-[var(--espd-own-radius,var(--espd-radius-control,calc(infinity*1px)))] transition-all duration-500 hover:shadow-md dark:border dark:border-transparent", flashButtonDarkBorderClasses[color], className),
|
|
86
91
|
onMouseEnter: handleMouseEnter,
|
|
87
92
|
onMouseLeave: handleMouseLeave,
|
|
93
|
+
style: axes.style,
|
|
88
94
|
...props,
|
|
89
95
|
children: [
|
|
90
96
|
/* @__PURE__ */ jsx("span", {
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export { B as Button, a as ButtonIconOnlyBreakpoint, b as ButtonProps } from '../../button-BxJ7s6sR.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
5
|
+
import { k as StyleAxisProps } from '../../style-axes-DSQ2DGc5.js';
|
|
6
|
+
import { P as PresetColor } from '../../index-BQANnKs9.js';
|
|
7
|
+
import { HTMLMotionProps } from 'motion/react';
|
|
8
|
+
import { W as WithAsChild } from '../../slot-DGErA9zi.js';
|
|
9
|
+
export { b as buttonVariants } from '../../button-BK-DIR_L.js';
|
|
10
|
+
|
|
11
|
+
declare const buttonVariants$1: (props?: ({
|
|
12
|
+
variant?: "default" | "secondary" | "link" | "outline" | "destructive" | "ghost" | null | undefined;
|
|
13
|
+
size?: "sm" | "default" | "lg" | "icon" | null | undefined;
|
|
14
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
15
|
+
|
|
16
|
+
interface CraftButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, Pick<StyleAxisProps, "radius"> {
|
|
17
|
+
size?: VariantProps<typeof buttonVariants$1>["size"];
|
|
18
|
+
color?: PresetColor;
|
|
19
|
+
children?: React.ReactNode;
|
|
20
|
+
asChild?: boolean;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface InvertButtonProps extends Omit<CraftButtonProps, "children"> {
|
|
24
|
+
label: React.ReactNode;
|
|
25
|
+
icon?: React.ReactNode;
|
|
26
|
+
}
|
|
27
|
+
declare function InvertButton({ label, icon, ...props }: InvertButtonProps): React.JSX.Element;
|
|
28
|
+
|
|
29
|
+
interface FlashButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, Pick<StyleAxisProps, "radius"> {
|
|
30
|
+
label: React.ReactNode;
|
|
31
|
+
icon?: React.ReactNode;
|
|
32
|
+
iconPosition?: "start" | "end";
|
|
33
|
+
hideIcon?: boolean;
|
|
34
|
+
size?: VariantProps<typeof buttonVariants$1>["size"];
|
|
35
|
+
color?: PresetColor;
|
|
36
|
+
}
|
|
37
|
+
declare function FlashButton({ label, icon, iconPosition, hideIcon, size, color, className, onMouseEnter, onMouseLeave, radius, style, ...props }: FlashButtonProps): React.JSX.Element;
|
|
38
|
+
|
|
39
|
+
type ButtonProps = WithAsChild<HTMLMotionProps<'button'> & {
|
|
40
|
+
hoverScale?: number;
|
|
41
|
+
tapScale?: number;
|
|
42
|
+
}>;
|
|
43
|
+
|
|
44
|
+
declare const buttonVariants: (props?: ({
|
|
45
|
+
variant?: "default" | "secondary" | "accent" | "link" | "outline" | "destructive" | "ghost" | null | undefined;
|
|
46
|
+
size?: "sm" | "default" | "lg" | null | undefined;
|
|
47
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
48
|
+
type CopyButtonProps = Omit<ButtonProps, 'children'> & VariantProps<typeof buttonVariants> & Pick<StyleAxisProps, 'radius'> & {
|
|
49
|
+
content: string;
|
|
50
|
+
copied?: boolean;
|
|
51
|
+
onCopiedChange?: (copied: boolean, content?: string) => void;
|
|
52
|
+
delay?: number;
|
|
53
|
+
};
|
|
54
|
+
declare function CopyButton({ className, content, copied, onCopiedChange, onClick, variant, size, delay, radius, style, ...props }: CopyButtonProps): React.JSX.Element;
|
|
55
|
+
|
|
56
|
+
export { CopyButton, type CopyButtonProps, FlashButton, type FlashButtonProps, InvertButton, type InvertButtonProps };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { buttonVariants } from "../../core/button.js";
|
|
2
|
+
import { Button } from "./button.js";
|
|
3
|
+
import { InvertButton } from "./invert-button.js";
|
|
4
|
+
import { FlashButton } from "./flash-button.js";
|
|
5
|
+
import { CopyButton } from "../../core/animate-ui/components/buttons/copy.js";
|
|
6
|
+
export { Button, CopyButton, FlashButton, InvertButton, buttonVariants };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import { Separator } from '../separator/index.js';
|
|
5
|
+
import '@radix-ui/react-separator';
|
|
6
|
+
|
|
7
|
+
declare const buttonGroupVariants: (props?: ({
|
|
8
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
9
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
|
+
declare function ButtonGroup({ className, orientation, ...props }: React.ComponentProps<"div"> & VariantProps<typeof buttonGroupVariants>): React$1.JSX.Element;
|
|
11
|
+
declare function ButtonGroupText({ className, asChild, ...props }: React.ComponentProps<"div"> & {
|
|
12
|
+
asChild?: boolean;
|
|
13
|
+
}): React$1.JSX.Element;
|
|
14
|
+
declare function ButtonGroupSeparator({ className, orientation, ...props }: React.ComponentProps<typeof Separator>): React$1.JSX.Element;
|
|
15
|
+
|
|
16
|
+
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants };
|
|
@@ -33,11 +33,11 @@ function Calendar({ className, classNames, showOutsideDays = true, captionLayout
|
|
|
33
33
|
week: cn("mt-2 flex w-full", defaultClassNames.week),
|
|
34
34
|
week_number_header: cn("w-[var(--cell-size)] select-none", defaultClassNames.week_number_header),
|
|
35
35
|
week_number: cn("text-[0.8rem] text-muted-foreground select-none", defaultClassNames.week_number),
|
|
36
|
-
day: cn("group/day relative aspect-square h-full w-full p-0 text-center select-none [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md", defaultClassNames.day),
|
|
37
|
-
range_start: cn("rounded-l-md bg-accent", defaultClassNames.range_start),
|
|
36
|
+
day: cn("group/day relative aspect-square h-full w-full p-0 text-center select-none [&:first-child[data-selected=true]_button]:rounded-l-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))] [&:last-child[data-selected=true]_button]:rounded-r-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))]", defaultClassNames.day),
|
|
37
|
+
range_start: cn("rounded-l-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))] bg-accent", defaultClassNames.range_start),
|
|
38
38
|
range_middle: cn("rounded-none", defaultClassNames.range_middle),
|
|
39
|
-
range_end: cn("rounded-r-md bg-accent", defaultClassNames.range_end),
|
|
40
|
-
today: cn("rounded-md bg-accent text-accent-foreground data-[selected=true]:rounded-none", defaultClassNames.today),
|
|
39
|
+
range_end: cn("rounded-r-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))] bg-accent", defaultClassNames.range_end),
|
|
40
|
+
today: cn("rounded-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))] bg-accent text-accent-foreground data-[selected=true]:rounded-none", defaultClassNames.today),
|
|
41
41
|
outside: cn("text-disabled aria-selected:text-muted-foreground", defaultClassNames.outside),
|
|
42
42
|
disabled: cn("text-muted-foreground opacity-50", defaultClassNames.disabled),
|
|
43
43
|
hidden: cn("invisible", defaultClassNames.hidden),
|
|
@@ -96,7 +96,7 @@ function CalendarDayButton({ className: dayClassName, day, modifiers, ...props }
|
|
|
96
96
|
className: cn(buttonVariants({
|
|
97
97
|
variant: "ghost",
|
|
98
98
|
size: "icon"
|
|
99
|
-
}), "flex aspect-square size-auto w-full min-w-[var(--cell-size)] flex-col gap-1 leading-none font-normal", "group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50", "data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground", "data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground", "data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground", "data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground", "[&>span]:text-xs [&>span]:opacity-70", dayClassName),
|
|
99
|
+
}), "flex aspect-square size-auto w-full min-w-[var(--cell-size)] flex-col gap-1 leading-none font-normal rounded-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))]", "group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50", "data-[range-end=true]:rounded-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))] data-[range-end=true]:rounded-r-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))] data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground", "data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground", "data-[range-start=true]:rounded-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))] data-[range-start=true]:rounded-l-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))] data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground", "data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground", "[&>span]:text-xs [&>span]:opacity-70", dayClassName),
|
|
100
100
|
...props
|
|
101
101
|
});
|
|
102
102
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DayButton } from 'react-day-picker';
|
|
3
|
+
import { C as CalendarProps } from '../../calendar.props-BtCzuWH1.js';
|
|
4
|
+
|
|
5
|
+
declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: CalendarProps): React.JSX.Element;
|
|
6
|
+
declare namespace Calendar {
|
|
7
|
+
var displayName: string;
|
|
8
|
+
}
|
|
9
|
+
declare function CalendarDayButton({ className: dayClassName, day, modifiers, ...props }: React.ComponentProps<typeof DayButton>): React.JSX.Element;
|
|
10
|
+
|
|
11
|
+
export { Calendar, CalendarDayButton, CalendarProps };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { k as StyleAxisProps, d as DensityProps } from '../../style-axes-DSQ2DGc5.js';
|
|
3
|
+
|
|
4
|
+
declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & StyleAxisProps & DensityProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
|
|
11
|
+
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn.js";
|
|
2
|
+
import { Typography } from "../typography/typography.js";
|
|
3
|
+
import { Children, useId } from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/card-rail/card-rail.tsx
|
|
6
|
+
var GRID_COLUMNS = {
|
|
7
|
+
2: "@5xl:grid-cols-2",
|
|
8
|
+
3: "@5xl:grid-cols-3",
|
|
9
|
+
4: "@5xl:grid-cols-4"
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* A titled shelf of cards: the heading on the left, an action ("View all")
|
|
13
|
+
* on the right. It follows its OWN width, not the viewport's: a grid once it
|
|
14
|
+
* is wide (64rem), a horizontal scroll-snap strip below that, each card at
|
|
15
|
+
* 44% of the strip (84% under 42rem) so the next one peeks in. The strip has
|
|
16
|
+
* no visible scrollbar; it scrolls by touch, trackpad and keyboard.
|
|
17
|
+
*/
|
|
18
|
+
function CardRail({ title, titleAs = "h2", titleId, action, columns = 3, children, className }) {
|
|
19
|
+
const generated = useId();
|
|
20
|
+
const headingId = titleId ?? generated;
|
|
21
|
+
const items = Children.toArray(children);
|
|
22
|
+
return /* @__PURE__ */ jsxs("section", {
|
|
23
|
+
"aria-labelledby": headingId,
|
|
24
|
+
"data-slot": "card-rail",
|
|
25
|
+
className: cn("@container flex min-w-0 flex-col gap-4", className),
|
|
26
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
27
|
+
className: "flex items-end justify-between gap-4",
|
|
28
|
+
children: [/* @__PURE__ */ jsx(Typography, {
|
|
29
|
+
id: headingId,
|
|
30
|
+
variant: "h4",
|
|
31
|
+
as: titleAs,
|
|
32
|
+
className: "m-0 min-w-0 tracking-tight text-foreground",
|
|
33
|
+
children: title
|
|
34
|
+
}), action && /* @__PURE__ */ jsx("div", {
|
|
35
|
+
className: "shrink-0",
|
|
36
|
+
children: action
|
|
37
|
+
})]
|
|
38
|
+
}), /* @__PURE__ */ jsx("ul", {
|
|
39
|
+
"data-slot": "card-rail-list",
|
|
40
|
+
className: cn("m-0 flex list-none snap-x snap-mandatory gap-4 overflow-x-auto p-0 pb-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", "@5xl:grid @5xl:gap-6 @5xl:overflow-visible @5xl:pb-0", GRID_COLUMNS[columns]),
|
|
41
|
+
children: items.map((item, index) => /* @__PURE__ */ jsx("li", {
|
|
42
|
+
"data-slot": "card-rail-item",
|
|
43
|
+
className: "flex shrink-0 basis-[84%] snap-start @2xl:basis-[44%] @5xl:basis-auto [&>*]:w-full",
|
|
44
|
+
children: item
|
|
45
|
+
}, index))
|
|
46
|
+
})]
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { CardRail };
|