@espressif/dashboard-ui-components 1.11.1 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/rules/dashboard-ui-consumption.md +176 -5
- package/.cursor/rules/dashboard-ui-consumption.mdc +163 -4
- package/CHANGELOG.md +1020 -0
- package/README.md +240 -7
- package/THIRD-PARTY-NOTICES.md +2 -1
- package/dist/alert.props-CcKo49Rb.d.ts +44 -0
- package/dist/animation/index.d.ts +3 -0
- package/dist/animation/index.js +3 -0
- package/dist/avatar.props-2q5BsX-R.d.ts +29 -0
- package/dist/button-BK-DIR_L.d.ts +21 -0
- package/dist/button-BxJ7s6sR.d.ts +76 -0
- package/dist/calendar.props-BtCzuWH1.d.ts +12 -0
- package/dist/carousel/index.d.ts +2 -0
- package/dist/carousel/index.js +2 -0
- package/dist/charts/index.d.ts +5 -0
- package/dist/charts/index.js +9 -0
- package/dist/common/app-logo/app-logo.js +1 -1
- package/dist/common/index.d.ts +9 -20
- package/dist/common/my-account-menu/my-account-menu.js +45 -13
- package/dist/common/profile-card/profile-card.js +3 -2
- package/dist/components/accordion/accordion.js +14 -5
- package/dist/components/accordion/index.d.ts +36 -0
- package/dist/components/accordion/index.js +2 -0
- package/dist/components/advanced-search-box/advanced-search-box.js +8 -2
- package/dist/components/advanced-search-box/index.d.ts +29 -0
- package/dist/components/advanced-search-box/index.js +2 -0
- package/dist/components/alert/alert.js +2 -1
- package/dist/components/alert/index.d.ts +12 -0
- package/dist/components/alert/index.js +2 -0
- package/dist/components/anchored-panel/anchored-panel.js +83 -0
- package/dist/components/anchored-panel/index.d.ts +31 -0
- package/dist/components/anchored-panel/index.js +2 -0
- package/dist/components/animated-containers/index.d.ts +13 -0
- package/dist/components/animated-containers/index.js +2 -0
- package/dist/components/async-multi-select/async-multi-select.js +48 -7
- package/dist/components/async-multi-select/index.d.ts +63 -0
- package/dist/components/async-multi-select/index.js +2 -0
- package/dist/components/avatar/avatar.js +11 -4
- package/dist/components/avatar/index.d.ts +8 -0
- package/dist/components/avatar/index.js +2 -0
- package/dist/components/avatar-group/avatar-group.js +35 -0
- package/dist/components/avatar-group/index.d.ts +31 -0
- package/dist/components/avatar-group/index.js +2 -0
- package/dist/components/badge/index.d.ts +14 -0
- package/dist/components/badge/index.js +2 -0
- package/dist/components/breadcrumb/index.d.ts +21 -0
- package/dist/components/breadcrumb/index.js +2 -0
- package/dist/components/bubble/bubble.js +18 -0
- package/dist/components/bubble/index.d.ts +19 -0
- package/dist/components/bubble/index.js +2 -0
- package/dist/components/button/button.js +87 -25
- package/dist/components/button/flash-button.js +9 -3
- package/dist/components/button/index.d.ts +56 -0
- package/dist/components/button/index.js +6 -0
- package/dist/components/button-group/index.d.ts +16 -0
- package/dist/components/button-group/index.js +2 -0
- package/dist/components/calendar/calendar.js +5 -5
- package/dist/components/calendar/index.d.ts +11 -0
- package/dist/components/calendar/index.js +2 -0
- package/dist/components/card/index.d.ts +11 -0
- package/dist/components/card/index.js +2 -0
- package/dist/components/card-rail/card-rail.js +50 -0
- package/dist/components/card-rail/index.d.ts +30 -0
- package/dist/components/card-rail/index.js +2 -0
- package/dist/components/cards/collapsible-card.js +5 -2
- package/dist/components/cards/index.d.ts +16200 -0
- package/dist/components/cards/index.js +8 -0
- package/dist/components/cards/section-card.js +133 -8
- package/dist/components/cards/simple-card.js +5 -2
- package/dist/components/carousel/carousel.js +137 -49
- package/dist/components/carousel/index.d.ts +130 -0
- package/dist/components/carousel/index.js +2 -0
- package/dist/components/category-card/category-card.js +111 -0
- package/dist/components/category-card/index.d.ts +55 -0
- package/dist/components/category-card/index.js +2 -0
- package/dist/components/chart/area-chart.js +95 -85
- package/dist/components/chart/bar-chart.js +123 -60
- package/dist/components/chart/chart.js +127 -3
- package/dist/components/chart/composed-chart.js +109 -98
- package/dist/components/chart/donut-chart.js +23 -5
- package/dist/components/chart/index.d.ts +732 -0
- package/dist/components/chart/index.js +9 -0
- package/dist/components/chart/line-chart.js +93 -83
- package/dist/components/chart/treemap-chart.js +71 -58
- package/dist/components/check-badge/check-badge.js +25 -0
- package/dist/components/check-badge/index.d.ts +13 -0
- package/dist/components/check-badge/index.js +2 -0
- package/dist/components/checkbox/index.d.ts +8 -0
- package/dist/components/checkbox/index.js +2 -0
- package/dist/components/choice-card/choice-card.js +99 -0
- package/dist/components/choice-card/index.d.ts +41 -0
- package/dist/components/choice-card/index.js +2 -0
- package/dist/components/circular-progress/circular-progress.js +5 -2
- package/dist/components/circular-progress/index.d.ts +23 -0
- package/dist/components/circular-progress/index.js +2 -0
- package/dist/components/code/index.d.ts +40 -0
- package/dist/components/code/index.js +2 -0
- package/dist/components/code-editor/code-editor.js +9 -3
- package/dist/components/code-editor/index.d.ts +82 -0
- package/dist/components/code-editor/index.js +2 -0
- package/dist/components/collapsible/index.d.ts +42 -0
- package/dist/components/collapsible/index.js +2 -0
- package/dist/components/column-panel/column-panel.js +38 -0
- package/dist/components/column-panel/index.d.ts +37 -0
- package/dist/components/column-panel/index.js +3 -0
- package/dist/components/column-panel/use-panel-flag.js +27 -0
- package/dist/components/combobox/index.d.ts +28 -0
- package/dist/components/combobox/index.js +2 -0
- package/dist/components/confirmation-dialog/confirmation-dialog.js +1 -1
- package/dist/components/confirmation-dialog/index.d.ts +40 -0
- package/dist/components/confirmation-dialog/index.js +3 -0
- package/dist/components/content-container/index.d.ts +16 -0
- package/dist/components/content-container/index.js +2 -0
- package/dist/components/copiable-text/index.d.ts +33 -0
- package/dist/components/copiable-text/index.js +2 -0
- package/dist/components/coverflow/_constants/coverflow-poses.js +23 -0
- package/dist/components/coverflow/_constants/coverflow-shapes.js +23 -0
- package/dist/components/coverflow/_hooks/use-coverflow.js +90 -0
- package/dist/components/coverflow/_utils/ring.js +24 -0
- package/dist/components/coverflow/coverflow.js +198 -0
- package/dist/components/coverflow/index.d.ts +105 -0
- package/dist/components/coverflow/index.js +2 -0
- package/dist/components/data-table/data-table.js +9 -2
- package/dist/components/data-table/index.d.ts +120 -0
- package/dist/components/data-table/index.js +3 -0
- package/dist/components/date-picker/date-picker.js +5 -2
- package/dist/components/date-picker/index.d.ts +50 -0
- package/dist/components/date-picker/index.js +2 -0
- package/dist/components/date-range-picker/date-range-picker.js +11 -2
- package/dist/components/date-range-picker/index.d.ts +100 -0
- package/dist/components/date-range-picker/index.js +3 -0
- package/dist/components/date-time-picker/date-time-picker.js +5 -2
- package/dist/components/date-time-picker/index.d.ts +79 -0
- package/dist/components/date-time-picker/index.js +2 -0
- package/dist/components/device-icon/index.d.ts +17 -0
- package/dist/components/device-icon/index.js +2 -0
- package/dist/components/dialog/index.d.ts +38 -0
- package/dist/components/dialog/index.js +2 -0
- package/dist/components/dropdown-menu/index.d.ts +57 -0
- package/dist/components/dropdown-menu/index.js +2 -0
- package/dist/components/dynamic-list/dynamic-list.js +4 -4
- package/dist/components/dynamic-list/index.d.ts +74 -0
- package/dist/components/dynamic-list/index.js +2 -0
- package/dist/components/error-display/index.d.ts +17 -0
- package/dist/components/error-display/index.js +3 -0
- package/dist/components/expandable-text/expandable-text-overlay.js +78 -0
- package/dist/components/expandable-text/expandable-text.js +73 -0
- package/dist/components/expandable-text/index.d.ts +39 -0
- package/dist/components/expandable-text/index.js +2 -0
- package/dist/components/expandable-text/use-clamped.js +23 -0
- package/dist/components/facet-filters/_hooks/use-filter-group.js +51 -0
- package/dist/components/facet-filters/active-filters.js +31 -0
- package/dist/components/facet-filters/filter-group.js +110 -0
- package/dist/components/facet-filters/filters-panel.js +59 -0
- package/dist/components/facet-filters/filters-pill.js +40 -0
- package/dist/components/facet-filters/index.d.ts +104 -0
- package/dist/components/facet-filters/index.js +6 -0
- package/dist/components/facet-filters/use-filters-collapsed.js +21 -0
- package/dist/components/feature-grid/feature-grid.js +115 -0
- package/dist/components/feature-grid/index.d.ts +53 -0
- package/dist/components/feature-grid/index.js +2 -0
- package/dist/components/file-input/file-input.js +9 -3
- package/dist/components/file-input/index.d.ts +78 -0
- package/dist/components/file-input/index.js +2 -0
- package/dist/components/file-upload/file-upload.js +10 -5
- package/dist/components/file-upload/index.d.ts +38 -0
- package/dist/components/file-upload/index.js +2 -0
- package/dist/components/filters-bar/filters-bar.js +5 -1
- package/dist/components/filters-bar/index.d.ts +26 -0
- package/dist/components/filters-bar/index.js +2 -0
- package/dist/components/flip-card/flip-card.js +147 -0
- package/dist/components/flip-card/index.d.ts +43 -0
- package/dist/components/flip-card/index.js +2 -0
- package/dist/components/floating-window/_hooks/use-drag-move.js +76 -0
- package/dist/components/floating-window/floating-window.js +97 -0
- package/dist/components/floating-window/index.d.ts +45 -0
- package/dist/components/floating-window/index.js +2 -0
- package/dist/components/form/index.d.ts +28 -0
- package/dist/components/form/index.js +2 -0
- package/dist/components/fullscreen-dialog/fullscreen-dialog.js +6 -2
- package/dist/components/fullscreen-dialog/index.d.ts +38 -0
- package/dist/components/fullscreen-dialog/index.js +2 -0
- package/dist/components/horizontal-stepper/horizontal-stepper.js +122 -0
- package/dist/components/horizontal-stepper/index.d.ts +70 -0
- package/dist/components/horizontal-stepper/index.js +2 -0
- package/dist/components/icon-avatar/index.d.ts +9 -0
- package/dist/components/icon-avatar/index.js +2 -0
- package/dist/components/icon-text-action-card/icon-text-action-card.js +9 -5
- package/dist/components/icon-text-action-card/index.d.ts +11 -0
- package/dist/components/icon-text-action-card/index.js +2 -0
- package/dist/components/identicon/identicon.js +33 -0
- package/dist/components/identicon/index.d.ts +26 -0
- package/dist/components/identicon/index.js +2 -0
- package/dist/components/illustration/index.d.ts +37 -0
- package/dist/components/illustration/index.js +3 -0
- package/dist/components/index.d.ts +177 -19529
- package/dist/components/index.js +61 -10
- package/dist/components/input/index.d.ts +15 -0
- package/dist/components/input/index.js +3 -0
- package/dist/components/input-group/index.d.ts +35 -0
- package/dist/components/input-group/index.js +2 -0
- package/dist/components/input-group/input-group.js +41 -0
- package/dist/components/input-otp/index.d.ts +63 -0
- package/dist/components/input-otp/index.js +2 -0
- package/dist/components/key-value-manager/index.d.ts +63 -0
- package/dist/components/key-value-manager/index.js +2 -0
- package/dist/components/key-value-manager/key-value-manager-table.js +7 -5
- package/dist/components/label/index.d.ts +8 -0
- package/dist/components/label/index.js +2 -0
- package/dist/components/link/index.d.ts +33 -0
- package/dist/components/link/index.js +2 -0
- package/dist/components/list/index.d.ts +9 -0
- package/dist/components/list/index.js +3 -0
- package/dist/components/list/list-item.utils.js +1 -1
- package/dist/components/list/list.js +3 -1
- package/dist/components/list-details/index.d.ts +51 -0
- package/dist/components/list-details/index.js +2 -0
- package/dist/components/list-details/list-details.js +5 -2
- package/dist/components/lottie-animation-container/index.d.ts +10 -0
- package/dist/components/lottie-animation-container/index.js +2 -0
- package/dist/components/lottie-animation-container/lottie-animation-container.js +22 -3
- package/dist/components/lottie-animations/index.d.ts +8 -0
- package/dist/components/lottie-animations/index.js +2 -0
- package/dist/components/markdown-content/index.d.ts +32 -0
- package/dist/components/markdown-content/index.js +2 -0
- package/dist/components/media-card/index.d.ts +125 -0
- package/dist/components/media-card/index.js +4 -0
- package/dist/components/media-card/media-card-image.js +59 -0
- package/dist/components/media-card/media-card-reveal.js +76 -0
- package/dist/components/media-card/media-card.classes.js +37 -0
- package/dist/components/media-card/media-card.js +91 -0
- package/dist/components/media-stage/index.d.ts +41 -0
- package/dist/components/media-stage/index.js +2 -0
- package/dist/components/media-stage/media-stage.js +48 -0
- package/dist/components/menu/index.d.ts +14 -0
- package/dist/components/menu/index.js +2 -0
- package/dist/components/message-scroller/_hooks/use-follow-bottom.js +85 -0
- package/dist/components/message-scroller/index.d.ts +29 -0
- package/dist/components/message-scroller/index.js +2 -0
- package/dist/components/message-scroller/message-scroller.js +65 -0
- package/dist/components/mini-bar-chart/index.d.ts +40 -0
- package/dist/components/mini-bar-chart/index.js +2 -0
- package/dist/components/mini-bar-chart/mini-bar-chart.js +93 -0
- package/dist/components/monospace-content/index.d.ts +43 -0
- package/dist/components/monospace-content/index.js +2 -0
- package/dist/components/monospace-content/monospace-content.js +1 -1
- package/dist/components/nav-bar/index.d.ts +148 -0
- package/dist/components/nav-bar/index.js +2 -0
- package/dist/components/nav-bar/nav-bar-details-panel.js +158 -44
- package/dist/components/nav-bar/nav-bar-mobile-menu.js +93 -27
- package/dist/components/nav-bar/nav-bar.js +256 -138
- package/dist/components/nav-bar/use-nav-bar-hover-details.js +80 -0
- package/dist/components/nav-bar/use-nav-bar-overflow.js +5 -5
- package/dist/components/notice-strip/index.d.ts +32 -0
- package/dist/components/notice-strip/index.js +2 -0
- package/dist/components/notice-strip/notice-strip.js +57 -0
- package/dist/components/option-card-group/index.d.ts +50 -0
- package/dist/components/option-card-group/index.js +2 -0
- package/dist/components/option-card-group/option-card-group.js +76 -0
- package/dist/components/overflow-badge-list/index.d.ts +63 -0
- package/dist/components/overflow-badge-list/index.js +2 -0
- package/dist/components/overflow-badge-list/overflow-badge-list.js +78 -19
- package/dist/components/page-banner/index.d.ts +33 -0
- package/dist/components/page-banner/index.js +2 -0
- package/dist/components/page-banner/page-banner.js +56 -0
- package/dist/components/page-container/index.d.ts +20 -0
- package/dist/components/page-container/index.js +3 -0
- package/dist/components/page-container/page-container.js +5 -5
- package/dist/components/pagination/index.d.ts +31 -0
- package/dist/components/pagination/index.js +3 -0
- package/dist/components/popover/index.d.ts +60 -0
- package/dist/components/popover/index.js +3 -0
- package/dist/components/preview-card/index.d.ts +24 -0
- package/dist/components/preview-card/index.js +2 -0
- package/dist/components/progress-bar/index.d.ts +32 -0
- package/dist/components/progress-bar/index.js +2 -0
- package/dist/components/progress-bar/progress-bar.js +22 -6
- package/dist/components/radio-group/index.d.ts +24 -0
- package/dist/components/radio-group/index.js +2 -0
- package/dist/components/rank-numeral/index.d.ts +30 -0
- package/dist/components/rank-numeral/index.js +2 -0
- package/dist/components/rank-numeral/rank-numeral.js +26 -0
- package/dist/components/reaction-button/index.d.ts +32 -0
- package/dist/components/reaction-button/index.js +2 -0
- package/dist/components/reaction-button/reaction-button.js +50 -0
- package/dist/components/readout/index.d.ts +31 -0
- package/dist/components/readout/index.js +2 -0
- package/dist/components/readout/readout.js +63 -0
- package/dist/components/requirement-list/index.d.ts +52 -0
- package/dist/components/requirement-list/index.js +2 -0
- package/dist/components/requirement-list/requirement-list.js +29 -8
- package/dist/components/resizable/index.d.ts +31 -0
- package/dist/components/resizable/index.js +4 -0
- package/dist/components/resizable/resizable-group.js +23 -0
- package/dist/components/resizable/resizable-panel.js +28 -0
- package/dist/components/resizable/resizable-separator.js +24 -0
- package/dist/components/reveal/index.d.ts +23 -0
- package/dist/components/reveal/index.js +2 -0
- package/dist/components/reveal/reveal.js +24 -0
- package/dist/components/scroll-area/index.d.ts +27 -0
- package/dist/components/scroll-area/index.js +2 -0
- package/dist/components/scrollable-sections/index.d.ts +58 -0
- package/dist/components/scrollable-sections/index.js +2 -0
- package/dist/components/scrollable-sections/scrollable-sections.js +11 -3
- package/dist/components/search-box/index.d.ts +32 -0
- package/dist/components/search-box/index.js +2 -0
- package/dist/components/search-box/search-box.js +18 -3
- package/dist/components/search-field-shell.js +1 -1
- package/dist/components/select/index.d.ts +44 -0
- package/dist/components/select/index.js +2 -0
- package/dist/components/selectable-card-list/checkbox-card-list.js +5 -3
- package/dist/components/selectable-card-list/index.d.ts +76 -0
- package/dist/components/selectable-card-list/index.js +2 -0
- package/dist/components/selectable-card-list/radio-card-list.js +12 -6
- package/dist/components/selectable-card-list/selectable-card-list-shared.js +24 -12
- package/dist/components/selectable-card-list/selectable-card-list.js +12 -3
- package/dist/components/separator/index.d.ts +24 -0
- package/dist/components/separator/index.js +2 -0
- package/dist/components/share-menu/index.d.ts +55 -0
- package/dist/components/share-menu/index.js +2 -0
- package/dist/components/share-menu/share-marks.js +31 -0
- package/dist/components/share-menu/share-menu.js +140 -0
- package/dist/components/share-menu/share-urls.js +15 -0
- package/dist/components/sheet/index.d.ts +41 -0
- package/dist/components/sheet/index.js +2 -0
- package/dist/components/showcase-card/index.d.ts +53 -0
- package/dist/components/showcase-card/index.js +2 -0
- package/dist/components/showcase-card/showcase-card.js +75 -0
- package/dist/components/sidebar/index.d.ts +109 -0
- package/dist/components/sidebar/index.js +4 -0
- package/dist/components/sidebar/sidebar.js +56 -40
- package/dist/components/simple-clickable-card/index.d.ts +11 -0
- package/dist/components/simple-clickable-card/index.js +2 -0
- package/dist/components/simple-clickable-card/simple-clickable-card-shared.js +2 -2
- package/dist/components/simple-clickable-card/simple-clickable-card.js +5 -2
- package/dist/components/simple-info-card/index.d.ts +25 -0
- package/dist/components/simple-info-card/index.js +2 -0
- package/dist/components/simple-info-card/simple-info-card.js +6 -3
- package/dist/components/simple-list/index.d.ts +63 -0
- package/dist/components/simple-list/index.js +2 -0
- package/dist/components/simple-list/simple-list.js +3 -1
- package/dist/components/simple-paginated-list/index.d.ts +20 -0
- package/dist/components/simple-paginated-list/index.js +2 -0
- package/dist/components/simplified-date/index.d.ts +18 -0
- package/dist/components/simplified-date/index.js +2 -0
- package/dist/components/skeleton/index.d.ts +5 -0
- package/dist/components/skeleton/index.js +2 -0
- package/dist/components/skeletons/index.d.ts +11 -0
- package/dist/components/skeletons/index.js +2 -0
- package/dist/components/sort-menu/index.d.ts +34 -0
- package/dist/components/sort-menu/index.js +2 -0
- package/dist/components/sort-menu/sort-menu.js +39 -0
- package/dist/components/spinner/index.d.ts +15 -0
- package/dist/components/spinner/index.js +2 -0
- package/dist/components/stat-card/index.d.ts +43 -0
- package/dist/components/stat-card/index.js +2 -0
- package/dist/components/stat-card/stat-card.js +31 -12
- package/dist/components/status-badge/index.d.ts +24 -0
- package/dist/components/status-badge/index.js +2 -0
- package/dist/components/status-badge/status-badge.js +3 -2
- package/dist/components/status-card-list/index.d.ts +24 -0
- package/dist/components/status-card-list/index.js +2 -0
- package/dist/components/status-card-list/status-card-list.js +8 -4
- package/dist/components/step-tabs/index.d.ts +94 -0
- package/dist/components/step-tabs/index.js +2 -0
- package/dist/components/step-tabs/step-tabs.js +202 -0
- package/dist/components/style-scope/index.d.ts +32 -0
- package/dist/components/style-scope/index.js +2 -0
- package/dist/components/style-scope/style-scope.js +49 -0
- package/dist/components/switch/index.d.ts +15 -0
- package/dist/components/switch/index.js +2 -0
- package/dist/components/table/index.d.ts +18 -0
- package/dist/components/table/index.js +2 -0
- package/dist/components/tabs/index.d.ts +103 -0
- package/dist/components/tabs/index.js +2 -0
- package/dist/components/tag/index.d.ts +31 -0
- package/dist/components/tag/index.js +2 -0
- package/dist/components/tag/tag.js +79 -28
- package/dist/components/tag-input/index.d.ts +36 -0
- package/dist/components/tag-input/index.js +2 -0
- package/dist/components/tag-input/tag-input.js +10 -4
- package/dist/components/text-effects/index.d.ts +53 -0
- package/dist/components/text-effects/index.js +6 -0
- package/dist/components/textarea/index.d.ts +16 -0
- package/dist/components/textarea/index.js +2 -0
- package/dist/components/thumbnail-strip/index.d.ts +42 -0
- package/dist/components/thumbnail-strip/index.js +2 -0
- package/dist/components/thumbnail-strip/thumbnail-strip.js +124 -0
- package/dist/components/thumbnail-strip/use-scroll-edges.js +41 -0
- package/dist/components/time-picker/index.d.ts +13 -0
- package/dist/components/time-picker/index.js +2 -0
- package/dist/components/timeline/index.d.ts +39 -0
- package/dist/components/timeline/index.js +2 -0
- package/dist/components/timeline/timeline.js +85 -0
- package/dist/components/toast/index.d.ts +56 -0
- package/dist/components/toast/index.js +2 -0
- package/dist/components/toast/toast.js +42 -32
- package/dist/components/togglable-items-list/index.d.ts +28 -0
- package/dist/components/togglable-items-list/index.js +2 -0
- package/dist/components/toggle-group/index.d.ts +35 -0
- package/dist/components/toggle-group/index.js +2 -0
- package/dist/components/toolbar/index.d.ts +58 -0
- package/dist/components/toolbar/index.js +3 -0
- package/dist/components/toolbar/toolbar-button.js +40 -0
- package/dist/components/toolbar/toolbar.js +56 -0
- package/dist/components/tooltip/index.d.ts +29 -0
- package/dist/components/tooltip/index.js +3 -0
- package/dist/components/tooltip/tooltip.js +12 -2
- package/dist/components/transfer-list/index.d.ts +36 -0
- package/dist/components/transfer-list/index.js +2 -0
- package/dist/components/transfer-list/transfer-list.js +1 -1
- package/dist/components/truncated-line-with-tooltip/index.d.ts +22 -0
- package/dist/components/truncated-line-with-tooltip/index.js +2 -0
- package/dist/components/truncated-line-with-tooltip/truncated-line-with-tooltip.js +26 -8
- package/dist/components/typography/index.d.ts +19 -0
- package/dist/components/typography/index.js +3 -0
- package/dist/components/use-mobile/index.d.ts +3 -0
- package/dist/components/use-mobile/index.js +2 -0
- package/dist/components/user-type-badge/index.d.ts +39 -0
- package/dist/components/user-type-badge/index.js +3 -0
- package/dist/components/user-type-badge/user-type-badge.js +2 -1
- package/dist/components/vertical-stepper/index.d.ts +7 -0
- package/dist/components/vertical-stepper/index.js +2 -0
- package/dist/components/vertical-stepper/vertical-stepper.js +33 -6
- package/dist/components/view-toggle/index.d.ts +38 -0
- package/dist/components/view-toggle/index.js +2 -0
- package/dist/components/view-toggle/view-toggle.js +56 -0
- package/dist/core/animate-ui/components/animate/code.js +83 -9
- package/dist/core/animate-ui/components/animate/tabs.js +234 -19
- package/dist/core/animate-ui/components/animate/tooltip.js +10 -2
- package/dist/core/animate-ui/components/base/preview-card.js +20 -3
- package/dist/core/animate-ui/components/buttons/copy.js +12 -6
- package/dist/core/animate-ui/components/radix/dialog.js +17 -3
- package/dist/core/animate-ui/components/radix/dropdown-menu.js +26 -9
- package/dist/core/animate-ui/components/radix/sheet.js +20 -4
- package/dist/core/animate-ui/components/radix/sidebar.js +9 -9
- package/dist/core/animate-ui/components/radix/toggle-group.js +103 -13
- package/dist/core/animate-ui/components/radix/toggle.js +5 -5
- package/dist/core/animate-ui/primitives/animate/code-block.js +31 -4
- package/dist/core/animate-ui/primitives/animate/shiki-highlighter.js +5 -2
- package/dist/core/animate-ui/primitives/animate/tabs.js +7 -4
- package/dist/core/animate-ui/primitives/animate/tooltip.js +10 -3
- package/dist/core/animate-ui/primitives/base/preview-card.js +2 -2
- package/dist/core/animate-ui/primitives/base/progress.js +1 -1
- package/dist/core/animate-ui/primitives/base/radio.js +3 -3
- package/dist/core/animate-ui/primitives/effects/highlight.js +1 -0
- package/dist/core/animate-ui/primitives/radix/accordion.js +1 -1
- package/dist/core/animate-ui/primitives/radix/dialog.js +6 -3
- package/dist/core/animate-ui/primitives/radix/dropdown-menu.js +2 -2
- package/dist/core/animate-ui/primitives/radix/sheet.js +7 -3
- package/dist/core/animate-ui/primitives/radix/switch.js +2 -2
- package/dist/core/animate-ui/primitives/radix/toggle-group.js +2 -2
- package/dist/core/badge.js +5 -2
- package/dist/core/breadcrumb.js +1 -1
- package/dist/core/button/button.js +8 -8
- package/dist/core/button/craft-button.js +8 -2
- package/dist/core/button.js +17 -7
- package/dist/core/card.js +23 -5
- package/dist/core/combobox/combobox.js +8 -2
- package/dist/core/command.js +3 -3
- package/dist/core/form.js +1 -1
- package/dist/core/hooks/use-nested-layer-press-guard.js +46 -0
- package/dist/core/hooks/use-on-screen.js +33 -0
- package/dist/core/hooks/use-prefers-reduced-motion.js +19 -0
- package/dist/core/hooks/use-scroll-overflow.js +20 -0
- package/dist/core/index.d.ts +30 -5
- package/dist/core/index.js +5 -2
- package/dist/core/input/input-password.js +13 -9
- package/dist/core/input/input.js +38 -12
- package/dist/core/input-otp/input-otp.js +9 -5
- package/dist/core/popover-group.js +48 -0
- package/dist/core/popover-hover.js +127 -0
- package/dist/core/popover.js +75 -6
- package/dist/core/select.js +50 -19
- package/dist/core/table.js +5 -3
- package/dist/core/textarea/textarea.js +11 -3
- package/dist/data-table/index.d.ts +4 -0
- package/dist/data-table/index.js +3 -0
- package/dist/date/index.d.ts +11 -0
- package/dist/date/index.js +7 -0
- package/dist/forms/index.d.ts +4 -0
- package/dist/forms/index.js +2 -0
- package/dist/icon-avatar.props-RYtw2eSW.d.ts +31 -0
- package/dist/icon-text-action-card.props-B2ggncUK.d.ts +53 -0
- package/dist/index.d.ts +169 -15
- package/dist/index.js +63 -10
- package/dist/input-CYI1hhGc.d.ts +38 -0
- package/dist/layouts/index.d.ts +132 -8
- package/dist/layouts/index.js +3 -1
- package/dist/layouts/minimal-workspace-layout/minimal-workspace-layout-context.js +5 -0
- package/dist/layouts/minimal-workspace-layout/minimal-workspace-layout.js +404 -0
- package/dist/layouts/minimal-workspace-layout/rail-logo.js +90 -0
- package/dist/layouts/minimal-workspace-layout/sidebar-trigger.js +42 -0
- package/dist/layouts/shared/account-menu-props.js +21 -0
- package/dist/layouts/shared/footer-branding.js +34 -0
- package/dist/layouts/shared/sidebar-logo.js +59 -0
- package/dist/layouts/workspace-layout/account-menu/account-menu.js +9 -3
- package/dist/layouts/workspace-layout/footer/footer.js +1 -1
- package/dist/layouts/workspace-layout/header/header.js +1 -1
- package/dist/layouts/workspace-layout/workspace-layout.js +28 -80
- package/dist/{list.props-x1j3CbcF.d.ts → list.props-DP_xPTqU.d.ts} +2 -1
- package/dist/markdown/index.d.ts +11 -0
- package/dist/markdown/index.js +5 -0
- package/dist/my-account-menu.props-C7DK71WC.d.ts +67 -0
- package/dist/page-container.props-JutTvKFq.d.ts +48 -0
- package/dist/resizable.props-RxFY5tm_.d.ts +44 -0
- package/dist/section-card-B7c5uc08.d.ts +84 -0
- package/dist/simple-clickable-card.props-BrPCw7CR.d.ts +51 -0
- package/dist/slot-DGErA9zi.d.ts +10 -0
- package/dist/status-badge.props-lKlEOfRt.d.ts +32 -0
- package/dist/style-axes-DSQ2DGc5.d.ts +133 -0
- package/dist/toast/index.d.ts +6 -0
- package/dist/toast/index.js +2 -0
- package/dist/tooltip-C0bYa8a3.d.ts +37 -0
- package/dist/{types-DtUxK-Am.d.ts → types-CkXflqg7.d.ts} +31 -1
- package/dist/utils/cn.js +6 -1
- package/dist/utils/color.js +35 -10
- package/dist/utils/index.d.ts +18 -2
- package/dist/utils/index.js +4 -1
- package/dist/utils/silver-shine.js +16 -1
- package/dist/utils/style-axes.js +227 -0
- package/dist/utils/variant.js +104 -8
- package/dist/utils/view-transition.js +21 -0
- package/dist/variant-D81RhpbR.d.ts +104 -0
- package/dist/vertical-stepper.props-BXYcbW70.d.ts +29 -0
- package/package.json +52 -6
- package/src/styles/colors.css +100 -4
- package/src/styles/globals.css +8 -131
- package/src/styles/style-axes.css +21 -0
- package/src/styles/theme.css +696 -0
- package/dist/app-logo.props-Ct7QBdTd.d.ts +0 -40
- package/dist/popover-ByLD3-Qv.d.ts +0 -204
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../../utils/cn.js";
|
|
3
|
-
import { IconAvatar } from "../icon-avatar/icon-avatar.js";
|
|
4
3
|
import { TruncatedLineWithTooltip } from "../truncated-line-with-tooltip/truncated-line-with-tooltip.js";
|
|
4
|
+
import { IconAvatar } from "../icon-avatar/icon-avatar.js";
|
|
5
5
|
import { cloneElement, isValidElement } from "react";
|
|
6
6
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { Check, X } from "lucide-react";
|
|
@@ -110,8 +110,13 @@ function FormFieldMirrors({ name, form, value, multiple }) {
|
|
|
110
110
|
})
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
|
+
/** A row's border (and, for `tint`, background) for its selection state. */
|
|
114
|
+
function selectionClassName(selected, style) {
|
|
115
|
+
if (!selected || style === "none") return "border-border";
|
|
116
|
+
return style === "tint" ? "border-primary/4 bg-primary/4 dark:border-primary/8 dark:bg-primary/8" : "border-primary";
|
|
117
|
+
}
|
|
113
118
|
function SelectableCardListRowContent({ item, selected, s }) {
|
|
114
|
-
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
|
|
119
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [item.icon != null && /* @__PURE__ */ jsx("span", {
|
|
115
120
|
className: "flex shrink-0 items-center justify-center",
|
|
116
121
|
children: /* @__PURE__ */ jsx(IconAvatar, {
|
|
117
122
|
size: s.avatar,
|
|
@@ -120,16 +125,23 @@ function SelectableCardListRowContent({ item, selected, s }) {
|
|
|
120
125
|
})
|
|
121
126
|
}), /* @__PURE__ */ jsxs("span", {
|
|
122
127
|
className: "flex min-w-0 flex-1 flex-col gap-0.5",
|
|
123
|
-
children: [
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
128
|
+
children: [
|
|
129
|
+
/* @__PURE__ */ jsx(TruncatedLineWithTooltip, {
|
|
130
|
+
className: s.primary,
|
|
131
|
+
tooltipContent: primaryTooltipContent(item),
|
|
132
|
+
children: item.primaryText
|
|
133
|
+
}),
|
|
134
|
+
item.secondaryText != null ? /* @__PURE__ */ jsx(TruncatedLineWithTooltip, {
|
|
135
|
+
className: s.secondary,
|
|
136
|
+
tooltipContent: item.secondaryText,
|
|
137
|
+
children: item.secondaryText
|
|
138
|
+
}) : null,
|
|
139
|
+
item.note != null ? /* @__PURE__ */ jsx("span", {
|
|
140
|
+
className: cn(s.secondary, "font-medium", item.disabled ? "text-muted-foreground" : "text-primary"),
|
|
141
|
+
children: item.note
|
|
142
|
+
}) : null
|
|
143
|
+
]
|
|
132
144
|
})] });
|
|
133
145
|
}
|
|
134
146
|
//#endregion
|
|
135
|
-
export { FormFieldMirrors, SelectableCardListElementIndicator, SelectableCardListRowContent, SelectableCardSwitchVisual, controlAriaLabel, iconSized, sizeStyles };
|
|
147
|
+
export { FormFieldMirrors, SelectableCardListElementIndicator, SelectableCardListRowContent, SelectableCardSwitchVisual, controlAriaLabel, iconSized, selectionClassName, sizeStyles };
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { useStyleAxes } from "../../utils/style-axes.js";
|
|
2
3
|
import { CheckboxCardList } from "./checkbox-card-list.js";
|
|
3
4
|
import { RadioCardList } from "./radio-card-list.js";
|
|
4
5
|
import { jsx } from "react/jsx-runtime";
|
|
5
6
|
//#region src/components/selectable-card-list/selectable-card-list.tsx
|
|
6
7
|
function SelectableCardList(props) {
|
|
7
|
-
const { data, size = "default", className, name, form, element = "auto", "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy } = props;
|
|
8
|
+
const { data, size = "default", className, name, form, element = "auto", "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, radius, border, cardSelectionStyle } = props;
|
|
9
|
+
const { partStyle: rowStyle } = useStyleAxes({
|
|
10
|
+
radius,
|
|
11
|
+
border
|
|
12
|
+
}, ["radius", "border"]);
|
|
8
13
|
if (props.allowMultiple === true) return /* @__PURE__ */ jsx(CheckboxCardList, {
|
|
9
14
|
data,
|
|
10
15
|
value: props.value,
|
|
@@ -15,7 +20,9 @@ function SelectableCardList(props) {
|
|
|
15
20
|
ariaLabelledBy,
|
|
16
21
|
name,
|
|
17
22
|
form,
|
|
18
|
-
element
|
|
23
|
+
element,
|
|
24
|
+
rowStyle,
|
|
25
|
+
selectionStyle: cardSelectionStyle
|
|
19
26
|
});
|
|
20
27
|
return /* @__PURE__ */ jsx(RadioCardList, {
|
|
21
28
|
data,
|
|
@@ -27,7 +34,9 @@ function SelectableCardList(props) {
|
|
|
27
34
|
ariaLabelledBy,
|
|
28
35
|
name,
|
|
29
36
|
form,
|
|
30
|
-
element
|
|
37
|
+
element,
|
|
38
|
+
rowStyle,
|
|
39
|
+
selectionStyle: cardSelectionStyle
|
|
31
40
|
});
|
|
32
41
|
}
|
|
33
42
|
//#endregion
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
3
|
+
|
|
4
|
+
interface SeparatorProps extends React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root> {
|
|
5
|
+
/**
|
|
6
|
+
* Optional text displayed between two separator lines.
|
|
7
|
+
* When provided, the component renders a compound layout instead of a single line.
|
|
8
|
+
*/
|
|
9
|
+
label?: string;
|
|
10
|
+
/**
|
|
11
|
+
* When `true` and `orientation` is `"vertical"`, each character in the label
|
|
12
|
+
* is rendered upright and stacked top-to-bottom. Has no effect on horizontal
|
|
13
|
+
* separators. Defaults to `false` (normal horizontal text).
|
|
14
|
+
*/
|
|
15
|
+
stackLabel?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Additional class names applied to the label `<span>`.
|
|
18
|
+
* Use this to override the default label typography or color.
|
|
19
|
+
*/
|
|
20
|
+
labelClassName?: string;
|
|
21
|
+
}
|
|
22
|
+
declare const Separator: React.ForwardRefExoticComponent<SeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
|
|
24
|
+
export { Separator, type SeparatorProps };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ReactNode, ReactElement } from 'react';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Where a link can be shared: copied, handed to the device's own share sheet
|
|
6
|
+
* (`native`, hidden where the browser has none), or posted to a site.
|
|
7
|
+
*/
|
|
8
|
+
type ShareTarget = "copy" | "native" | "x" | "reddit" | "linkedin" | "telegram" | "email";
|
|
9
|
+
interface ShareMenuLabels {
|
|
10
|
+
copy: string;
|
|
11
|
+
/** Shown in place of `copy` for a moment after the link is copied. */
|
|
12
|
+
copied: string;
|
|
13
|
+
native: string;
|
|
14
|
+
x: string;
|
|
15
|
+
reddit: string;
|
|
16
|
+
linkedin: string;
|
|
17
|
+
telegram: string;
|
|
18
|
+
email: string;
|
|
19
|
+
}
|
|
20
|
+
interface ShareMenuProps {
|
|
21
|
+
/** The link being shared. */
|
|
22
|
+
url: string;
|
|
23
|
+
/** What it is: the post's title, the email's subject, the share sheet's title. */
|
|
24
|
+
title: string;
|
|
25
|
+
/** A line to go with it, where the target takes one (X, Telegram, email, the share sheet). */
|
|
26
|
+
text?: string;
|
|
27
|
+
/** The targets, in order. Default every one. */
|
|
28
|
+
targets?: readonly ShareTarget[];
|
|
29
|
+
/** Already-translated labels; English when absent. */
|
|
30
|
+
labels?: Partial<ShareMenuLabels>;
|
|
31
|
+
/** Icons per target; the library's own when absent (monochrome site marks drawn in `currentColor`). */
|
|
32
|
+
icons?: Partial<Record<ShareTarget, ReactNode>>;
|
|
33
|
+
/** The button that opens the menu — usually a `Button` with a share icon. */
|
|
34
|
+
trigger: ReactElement;
|
|
35
|
+
/** Which side of the trigger the menu lines up with. Default `end`. */
|
|
36
|
+
align?: "start" | "center" | "end";
|
|
37
|
+
/** Called when a target is chosen (and, for `copy`, once the link is on the clipboard). For analytics. */
|
|
38
|
+
onShare?: (target: ShareTarget) => void;
|
|
39
|
+
/** The clipboard refused the copy. The menu stays open so another target can be picked. */
|
|
40
|
+
onCopyError?: (error: unknown) => void;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Share a link: copy it, hand it to the device's share sheet, or open a
|
|
45
|
+
* site's own share page (X, Reddit, LinkedIn, Telegram) in a new tab, or start
|
|
46
|
+
* an email. Copy says "Link copied" in place for a moment, then closes the
|
|
47
|
+
* menu. Built on `DropdownMenu`, so focus, Escape and the arrow keys behave
|
|
48
|
+
* like every other menu.
|
|
49
|
+
*/
|
|
50
|
+
declare function ShareMenu({ url, title, text, targets, labels, icons, trigger, align, onShare, onCopyError, }: ShareMenuProps): React.JSX.Element;
|
|
51
|
+
declare namespace ShareMenu {
|
|
52
|
+
var displayName: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { ShareMenu, type ShareMenuLabels, type ShareMenuProps, type ShareTarget };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
//#region src/components/share-menu/share-marks.tsx
|
|
3
|
+
function XMark({ className }) {
|
|
4
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
5
|
+
viewBox: "0 0 24 24",
|
|
6
|
+
"aria-hidden": true,
|
|
7
|
+
className,
|
|
8
|
+
fill: "currentColor",
|
|
9
|
+
children: /* @__PURE__ */ jsx("path", { d: "M17.75 3h3.07l-6.7 7.66L22 21h-6.17l-4.83-6.32L5.47 21H2.4l7.17-8.2L2 3h6.33l4.37 5.77L17.75 3Zm-1.08 16.18h1.7L7.4 4.73H5.58l11.1 14.45Z" })
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
function RedditMark({ className }) {
|
|
13
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
14
|
+
viewBox: "0 0 24 24",
|
|
15
|
+
"aria-hidden": true,
|
|
16
|
+
className,
|
|
17
|
+
fill: "currentColor",
|
|
18
|
+
children: /* @__PURE__ */ jsx("path", { d: "M22 12.14a2.2 2.2 0 0 0-3.72-1.58 10.8 10.8 0 0 0-5.8-1.83l1-4.6 3.2.68a1.56 1.56 0 1 0 .16-.76l-3.58-.76a.38.38 0 0 0-.45.29l-1.1 5.15a10.8 10.8 0 0 0-5.88 1.83 2.2 2.2 0 1 0-2.42 3.6 4.3 4.3 0 0 0-.05.66c0 3.37 3.92 6.1 8.76 6.1s8.76-2.73 8.76-6.1c0-.22-.02-.44-.05-.66A2.2 2.2 0 0 0 22 12.14ZM7.04 13.7a1.56 1.56 0 1 1 3.12 0 1.56 1.56 0 0 1-3.12 0Zm8.72 4.13c-1.07 1.07-3.12 1.15-3.72 1.15-.6 0-2.65-.08-3.72-1.15a.4.4 0 0 1 .57-.57c.67.68 2.11.92 3.15.92 1.04 0 2.48-.24 3.15-.92a.4.4 0 1 1 .57.57Zm-.28-2.57a1.56 1.56 0 1 1 0-3.12 1.56 1.56 0 0 1 0 3.12Z" })
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function LinkedInMark({ className }) {
|
|
22
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
23
|
+
viewBox: "0 0 24 24",
|
|
24
|
+
"aria-hidden": true,
|
|
25
|
+
className,
|
|
26
|
+
fill: "currentColor",
|
|
27
|
+
children: /* @__PURE__ */ jsx("path", { d: "M20.45 20.45h-3.56v-5.57c0-1.33-.02-3.04-1.85-3.04-1.85 0-2.14 1.45-2.14 2.94v5.67H9.35V9h3.42v1.56h.05a3.75 3.75 0 0 1 3.37-1.85c3.6 0 4.27 2.37 4.27 5.46v6.28ZM5.34 7.43a2.06 2.06 0 1 1 0-4.13 2.06 2.06 0 0 1 0 4.13ZM7.12 20.45H3.56V9h3.56v11.45ZM22.22 0H1.77C.79 0 0 .77 0 1.73v20.54C0 23.23.79 24 1.77 24h20.45c.98 0 1.78-.77 1.78-1.73V1.73C24 .77 23.2 0 22.22 0Z" })
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
export { LinkedInMark, RedditMark, XMark };
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger } from "../../core/animate-ui/components/radix/dropdown-menu.js";
|
|
2
|
+
import { LinkedInMark, RedditMark, XMark } from "./share-marks.js";
|
|
3
|
+
import { shareUrl } from "./share-urls.js";
|
|
4
|
+
import * as React$1 from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { Check, Link, Mail, Send, Share2 } from "lucide-react";
|
|
7
|
+
//#region src/components/share-menu/share-menu.tsx
|
|
8
|
+
/** How long "Link copied" shows before the menu closes. */
|
|
9
|
+
var COPIED_MS = 1400;
|
|
10
|
+
var ALL_TARGETS = [
|
|
11
|
+
"copy",
|
|
12
|
+
"native",
|
|
13
|
+
"x",
|
|
14
|
+
"reddit",
|
|
15
|
+
"linkedin",
|
|
16
|
+
"telegram",
|
|
17
|
+
"email"
|
|
18
|
+
];
|
|
19
|
+
var DEFAULT_LABELS = {
|
|
20
|
+
copy: "Copy link",
|
|
21
|
+
copied: "Link copied",
|
|
22
|
+
native: "Share via…",
|
|
23
|
+
x: "Post on X",
|
|
24
|
+
reddit: "Share on Reddit",
|
|
25
|
+
linkedin: "Share on LinkedIn",
|
|
26
|
+
telegram: "Send on Telegram",
|
|
27
|
+
email: "Send by email"
|
|
28
|
+
};
|
|
29
|
+
var DEFAULT_ICONS = {
|
|
30
|
+
copy: /* @__PURE__ */ jsx(Link, { "aria-hidden": true }),
|
|
31
|
+
native: /* @__PURE__ */ jsx(Share2, { "aria-hidden": true }),
|
|
32
|
+
x: /* @__PURE__ */ jsx(XMark, { className: "size-4" }),
|
|
33
|
+
reddit: /* @__PURE__ */ jsx(RedditMark, { className: "size-4" }),
|
|
34
|
+
linkedin: /* @__PURE__ */ jsx(LinkedInMark, { className: "size-4" }),
|
|
35
|
+
telegram: /* @__PURE__ */ jsx(Send, { "aria-hidden": true }),
|
|
36
|
+
email: /* @__PURE__ */ jsx(Mail, { "aria-hidden": true })
|
|
37
|
+
};
|
|
38
|
+
function canShareNatively() {
|
|
39
|
+
return typeof navigator !== "undefined" && typeof navigator.share === "function";
|
|
40
|
+
}
|
|
41
|
+
/** Copied, and the moment it was, so the menu can say so and then close. */
|
|
42
|
+
function useCopied(onDone) {
|
|
43
|
+
const [copied, setCopied] = React$1.useState(false);
|
|
44
|
+
const timer = React$1.useRef(null);
|
|
45
|
+
React$1.useEffect(() => () => {
|
|
46
|
+
if (timer.current) clearTimeout(timer.current);
|
|
47
|
+
}, []);
|
|
48
|
+
return {
|
|
49
|
+
copied,
|
|
50
|
+
flash: React$1.useCallback(() => {
|
|
51
|
+
setCopied(true);
|
|
52
|
+
if (timer.current) clearTimeout(timer.current);
|
|
53
|
+
timer.current = setTimeout(() => {
|
|
54
|
+
setCopied(false);
|
|
55
|
+
onDone();
|
|
56
|
+
}, COPIED_MS);
|
|
57
|
+
}, [onDone])
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Share a link: copy it, hand it to the device's share sheet, or open a
|
|
62
|
+
* site's own share page (X, Reddit, LinkedIn, Telegram) in a new tab, or start
|
|
63
|
+
* an email. Copy says "Link copied" in place for a moment, then closes the
|
|
64
|
+
* menu. Built on `DropdownMenu`, so focus, Escape and the arrow keys behave
|
|
65
|
+
* like every other menu.
|
|
66
|
+
*/
|
|
67
|
+
function ShareMenu({ url, title, text, targets = ALL_TARGETS, labels, icons, trigger, align = "end", onShare, onCopyError }) {
|
|
68
|
+
const [open, setOpen] = React$1.useState(false);
|
|
69
|
+
const { copied, flash } = useCopied(React$1.useCallback(() => setOpen(false), []));
|
|
70
|
+
const words = {
|
|
71
|
+
...DEFAULT_LABELS,
|
|
72
|
+
...labels
|
|
73
|
+
};
|
|
74
|
+
const iconOf = (target) => icons?.[target] ?? DEFAULT_ICONS[target];
|
|
75
|
+
const shown = targets.filter((target) => target !== "native" || canShareNatively());
|
|
76
|
+
const actions = shown.filter((target) => target === "copy" || target === "native");
|
|
77
|
+
const sites = shown.filter((target) => target !== "copy" && target !== "native");
|
|
78
|
+
function copy(event) {
|
|
79
|
+
event.preventDefault();
|
|
80
|
+
navigator.clipboard.writeText(url).then(() => {
|
|
81
|
+
flash();
|
|
82
|
+
onShare?.("copy");
|
|
83
|
+
}).catch((error) => onCopyError?.(error));
|
|
84
|
+
}
|
|
85
|
+
function openSite(site) {
|
|
86
|
+
onShare?.(site);
|
|
87
|
+
const href = shareUrl(site, {
|
|
88
|
+
url,
|
|
89
|
+
title,
|
|
90
|
+
text
|
|
91
|
+
});
|
|
92
|
+
if (site === "email") {
|
|
93
|
+
window.location.assign(href);
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
window.open(href, "_blank", "noopener,noreferrer");
|
|
97
|
+
}
|
|
98
|
+
function shareNatively() {
|
|
99
|
+
onShare?.("native");
|
|
100
|
+
navigator.share({
|
|
101
|
+
url,
|
|
102
|
+
title,
|
|
103
|
+
text
|
|
104
|
+
}).catch(() => void 0);
|
|
105
|
+
}
|
|
106
|
+
return /* @__PURE__ */ jsxs(DropdownMenu, {
|
|
107
|
+
open,
|
|
108
|
+
onOpenChange: setOpen,
|
|
109
|
+
children: [/* @__PURE__ */ jsx(DropdownMenuTrigger, {
|
|
110
|
+
asChild: true,
|
|
111
|
+
children: trigger
|
|
112
|
+
}), /* @__PURE__ */ jsxs(DropdownMenuContent, {
|
|
113
|
+
align,
|
|
114
|
+
className: "min-w-52",
|
|
115
|
+
children: [
|
|
116
|
+
actions.map((target) => target === "copy" ? /* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
117
|
+
onSelect: copy,
|
|
118
|
+
children: [copied ? /* @__PURE__ */ jsx(Check, {
|
|
119
|
+
"aria-hidden": true,
|
|
120
|
+
className: "text-success"
|
|
121
|
+
}) : iconOf(target), /* @__PURE__ */ jsx("span", {
|
|
122
|
+
"aria-live": "polite",
|
|
123
|
+
children: copied ? words.copied : words.copy
|
|
124
|
+
})]
|
|
125
|
+
}, target) : /* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
126
|
+
onSelect: shareNatively,
|
|
127
|
+
children: [iconOf(target), words.native]
|
|
128
|
+
}, target)),
|
|
129
|
+
actions.length > 0 && sites.length > 0 ? /* @__PURE__ */ jsx(DropdownMenuSeparator, {}) : null,
|
|
130
|
+
sites.map((site) => /* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
131
|
+
onSelect: () => openSite(site),
|
|
132
|
+
children: [iconOf(site), words[site]]
|
|
133
|
+
}, site))
|
|
134
|
+
]
|
|
135
|
+
})]
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
ShareMenu.displayName = "ShareMenu";
|
|
139
|
+
//#endregion
|
|
140
|
+
export { ShareMenu };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region src/components/share-menu/share-urls.ts
|
|
2
|
+
var q = encodeURIComponent;
|
|
3
|
+
/** Where each site takes a post: its own share intent, filled in. */
|
|
4
|
+
function shareUrl(site, { url, title, text }) {
|
|
5
|
+
const words = text ? `${title} — ${text}` : title;
|
|
6
|
+
switch (site) {
|
|
7
|
+
case "x": return `https://x.com/intent/post?url=${q(url)}&text=${q(words)}`;
|
|
8
|
+
case "reddit": return `https://www.reddit.com/submit?url=${q(url)}&title=${q(title)}`;
|
|
9
|
+
case "linkedin": return `https://www.linkedin.com/sharing/share-offsite/?url=${q(url)}`;
|
|
10
|
+
case "telegram": return `https://t.me/share/url?url=${q(url)}&text=${q(words)}`;
|
|
11
|
+
case "email": return `mailto:?subject=${q(title)}&body=${q(text ? `${text}\n\n${url}` : url)}`;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { shareUrl };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Dialog } from 'radix-ui';
|
|
3
|
+
import { HTMLMotionProps } from 'motion/react';
|
|
4
|
+
import { k as StyleAxisProps, d as DensityProps } from '../../style-axes-DSQ2DGc5.js';
|
|
5
|
+
|
|
6
|
+
type SheetProps$1 = React.ComponentProps<typeof Dialog.Root>;
|
|
7
|
+
type SheetTriggerProps$1 = React.ComponentProps<typeof Dialog.Trigger>;
|
|
8
|
+
type SheetCloseProps$1 = React.ComponentProps<typeof Dialog.Close>;
|
|
9
|
+
type Side = 'top' | 'bottom' | 'left' | 'right';
|
|
10
|
+
type SheetContentProps$1 = React.ComponentProps<typeof Dialog.Content> & HTMLMotionProps<'div'> & {
|
|
11
|
+
side?: Side;
|
|
12
|
+
};
|
|
13
|
+
type SheetHeaderProps$1 = React.ComponentProps<'div'>;
|
|
14
|
+
type SheetFooterProps$1 = React.ComponentProps<'div'>;
|
|
15
|
+
type SheetTitleProps$1 = React.ComponentProps<typeof Dialog.Title>;
|
|
16
|
+
type SheetDescriptionProps$1 = React.ComponentProps<typeof Dialog.Description>;
|
|
17
|
+
|
|
18
|
+
type SheetProps = SheetProps$1 & {
|
|
19
|
+
floating?: boolean;
|
|
20
|
+
closeOnEscape?: boolean;
|
|
21
|
+
closeOnOutsideClick?: boolean;
|
|
22
|
+
};
|
|
23
|
+
declare function Sheet({ floating, closeOnEscape, closeOnOutsideClick, ...props }: SheetProps): React.JSX.Element;
|
|
24
|
+
type SheetTriggerProps = SheetTriggerProps$1;
|
|
25
|
+
declare function SheetTrigger(props: SheetTriggerProps): React.JSX.Element;
|
|
26
|
+
type SheetCloseProps = SheetCloseProps$1;
|
|
27
|
+
declare function SheetClose(props: SheetCloseProps): React.JSX.Element;
|
|
28
|
+
type SheetContentProps = SheetContentProps$1 & Pick<StyleAxisProps, 'radius' | 'elevation'> & DensityProps & {
|
|
29
|
+
showCloseButton?: boolean;
|
|
30
|
+
};
|
|
31
|
+
declare function SheetContent({ className, children, side, showCloseButton, onEscapeKeyDown, onPointerDownOutside, radius, elevation, density, style, ...props }: SheetContentProps): React.JSX.Element;
|
|
32
|
+
type SheetHeaderProps = SheetHeaderProps$1;
|
|
33
|
+
declare function SheetHeader({ className, ...props }: SheetHeaderProps): React.JSX.Element;
|
|
34
|
+
type SheetFooterProps = SheetFooterProps$1;
|
|
35
|
+
declare function SheetFooter({ className, ...props }: SheetFooterProps): React.JSX.Element;
|
|
36
|
+
type SheetTitleProps = SheetTitleProps$1;
|
|
37
|
+
declare function SheetTitle({ className, ...props }: SheetTitleProps): React.JSX.Element;
|
|
38
|
+
type SheetDescriptionProps = SheetDescriptionProps$1;
|
|
39
|
+
declare function SheetDescription({ className, ...props }: SheetDescriptionProps): React.JSX.Element;
|
|
40
|
+
|
|
41
|
+
export { Sheet, SheetClose, type SheetCloseProps, SheetContent, type SheetContentProps, SheetDescription, type SheetDescriptionProps, SheetFooter, type SheetFooterProps, SheetHeader, type SheetHeaderProps, type SheetProps, SheetTitle, type SheetTitleProps, SheetTrigger, type SheetTriggerProps };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger } from "../../core/animate-ui/components/radix/sheet.js";
|
|
2
|
+
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ReactNode, ReactElement } from 'react';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Where the card's title goes: a page (a real link), a page of this app
|
|
6
|
+
* (`link` wraps the title in the router's own link, so it opens without a
|
|
7
|
+
* reload) or an action on this page (a button).
|
|
8
|
+
*/
|
|
9
|
+
type ShowcaseCardOpen = {
|
|
10
|
+
href: string;
|
|
11
|
+
} | {
|
|
12
|
+
link: (title: ReactNode) => ReactElement;
|
|
13
|
+
} | {
|
|
14
|
+
onOpen: () => void;
|
|
15
|
+
label: string;
|
|
16
|
+
};
|
|
17
|
+
interface ShowcaseCardProps {
|
|
18
|
+
/** The picture, filling the media area. */
|
|
19
|
+
media: ReactNode;
|
|
20
|
+
/** `bleed` (default) for a photo or drawing; `inset` for an icon on a tint, which `mediaClassName` gives. */
|
|
21
|
+
mediaLayout?: "bleed" | "inset";
|
|
22
|
+
/** On the media area: the inset tint, a different aspect. */
|
|
23
|
+
mediaClassName?: string;
|
|
24
|
+
/** Drawn over the picture, always visible (a rank numeral, a badge). */
|
|
25
|
+
mediaOverlay?: ReactNode;
|
|
26
|
+
/** The actions strip over the picture: on hover, always on touch screens. */
|
|
27
|
+
reveal?: ReactNode;
|
|
28
|
+
title: string;
|
|
29
|
+
/** What the title opens. Absent for a card whose one action is a button of its own (the footer's): the title is then plain text. */
|
|
30
|
+
open?: ShowcaseCardOpen;
|
|
31
|
+
/** Read with the title, before it (a screen-reader-only rank). */
|
|
32
|
+
titlePrefix?: ReactNode;
|
|
33
|
+
/** Beside the title, above the card's link (a popover button). */
|
|
34
|
+
titleAction?: ReactNode;
|
|
35
|
+
/** The row under the title: who made it, when, what it runs on. */
|
|
36
|
+
meta: ReactNode;
|
|
37
|
+
/** The bottom row: counters, what it brings. */
|
|
38
|
+
footer?: ReactNode;
|
|
39
|
+
/** On the body under the picture: a roomier card where it has the space. */
|
|
40
|
+
bodyClassName?: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* A catalogue card on `MediaCard`: a picture with an actions strip that
|
|
45
|
+
* slides up over it, the name (the whole card opens it), a meta row and a
|
|
46
|
+
* footer row. Props only: builds, hardware parts or templates fill the same
|
|
47
|
+
* frame. Cards glide to their new places in a view transition
|
|
48
|
+
* (`view-transition-glide`), for instance when a filters panel opens beside
|
|
49
|
+
* the grid.
|
|
50
|
+
*/
|
|
51
|
+
declare function ShowcaseCard({ media, mediaLayout, mediaClassName, mediaOverlay, reveal, title, open, titlePrefix, titleAction, meta, footer, bodyClassName }: ShowcaseCardProps): React.JSX.Element;
|
|
52
|
+
|
|
53
|
+
export { ShowcaseCard, type ShowcaseCardOpen, type ShowcaseCardProps };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn.js";
|
|
2
|
+
import { MediaCard, MediaCardAction, MediaCardBody, MediaCardFooter, MediaCardLink, MediaCardMedia, MediaCardMeta, MediaCardTitle } from "../media-card/media-card.js";
|
|
3
|
+
import { MediaCardReveal } from "../media-card/media-card-reveal.js";
|
|
4
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/showcase-card/showcase-card.tsx
|
|
6
|
+
function TitleLink({ open, titlePrefix, title }) {
|
|
7
|
+
if (!open) return /* @__PURE__ */ jsxs(Fragment, { children: [titlePrefix, title] });
|
|
8
|
+
if ("href" in open) return /* @__PURE__ */ jsxs(MediaCardLink, {
|
|
9
|
+
href: open.href,
|
|
10
|
+
children: [titlePrefix, title]
|
|
11
|
+
});
|
|
12
|
+
if ("link" in open) return /* @__PURE__ */ jsx(MediaCardLink, {
|
|
13
|
+
asChild: true,
|
|
14
|
+
children: open.link(/* @__PURE__ */ jsxs(Fragment, { children: [titlePrefix, title] }))
|
|
15
|
+
});
|
|
16
|
+
return /* @__PURE__ */ jsx(MediaCardLink, {
|
|
17
|
+
asChild: true,
|
|
18
|
+
children: /* @__PURE__ */ jsxs("button", {
|
|
19
|
+
type: "button",
|
|
20
|
+
"aria-label": open.label,
|
|
21
|
+
onClick: open.onOpen,
|
|
22
|
+
children: [titlePrefix, title]
|
|
23
|
+
})
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* A catalogue card on `MediaCard`: a picture with an actions strip that
|
|
28
|
+
* slides up over it, the name (the whole card opens it), a meta row and a
|
|
29
|
+
* footer row. Props only: builds, hardware parts or templates fill the same
|
|
30
|
+
* frame. Cards glide to their new places in a view transition
|
|
31
|
+
* (`view-transition-glide`), for instance when a filters panel opens beside
|
|
32
|
+
* the grid.
|
|
33
|
+
*/
|
|
34
|
+
function ShowcaseCard({ media, mediaLayout, mediaClassName, mediaOverlay, reveal, title, open, titlePrefix, titleAction, meta, footer, bodyClassName }) {
|
|
35
|
+
return /* @__PURE__ */ jsxs(MediaCard, {
|
|
36
|
+
elevation: "none",
|
|
37
|
+
className: "view-transition-glide h-full",
|
|
38
|
+
children: [/* @__PURE__ */ jsxs(MediaCardMedia, {
|
|
39
|
+
layout: mediaLayout,
|
|
40
|
+
className: mediaClassName,
|
|
41
|
+
children: [
|
|
42
|
+
media,
|
|
43
|
+
mediaOverlay,
|
|
44
|
+
reveal && /* @__PURE__ */ jsx(MediaCardReveal, {
|
|
45
|
+
variant: "strip",
|
|
46
|
+
className: "items-center justify-between gap-3",
|
|
47
|
+
children: reveal
|
|
48
|
+
})
|
|
49
|
+
]
|
|
50
|
+
}), /* @__PURE__ */ jsxs(MediaCardBody, {
|
|
51
|
+
className: cn("gap-3", bodyClassName),
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ jsxs("div", {
|
|
54
|
+
className: "flex items-start gap-2",
|
|
55
|
+
children: [/* @__PURE__ */ jsx(MediaCardTitle, {
|
|
56
|
+
className: "flex-1 font-semibold",
|
|
57
|
+
title,
|
|
58
|
+
children: /* @__PURE__ */ jsx(TitleLink, {
|
|
59
|
+
open,
|
|
60
|
+
titlePrefix,
|
|
61
|
+
title
|
|
62
|
+
})
|
|
63
|
+
}), titleAction && /* @__PURE__ */ jsx(MediaCardAction, { children: titleAction })]
|
|
64
|
+
}),
|
|
65
|
+
/* @__PURE__ */ jsx(MediaCardMeta, { children: meta }),
|
|
66
|
+
footer && /* @__PURE__ */ jsx(MediaCardFooter, {
|
|
67
|
+
className: "block",
|
|
68
|
+
children: footer
|
|
69
|
+
})
|
|
70
|
+
]
|
|
71
|
+
})]
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
//#endregion
|
|
75
|
+
export { ShowcaseCard };
|