@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,4 +1,5 @@
|
|
|
1
1
|
import { cn } from "../../utils/cn.js";
|
|
2
|
+
import { useStyleAxes } from "../../utils/style-axes.js";
|
|
2
3
|
import { inputLabelClassName } from "../../core/field-label-row.js";
|
|
3
4
|
import * as React$1 from "react";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -105,7 +106,11 @@ function resolveBrowseTokens(color) {
|
|
|
105
106
|
style: { "--fi-accent": color }
|
|
106
107
|
};
|
|
107
108
|
}
|
|
108
|
-
var FileInput = React$1.forwardRef(function FileInput({ label, required, size, rounded, color = "primary", startHelperContent, endHelperContent, hintContent, error, errorContent, startIcon, disabled = false, readOnly = false, id, className, name, accept, multiple = false, files: filesProp, onFilesChange, onChange, browseLabel = "Browse", changeLabel = "Change", clearLabel = "Clear file", placeholder = "No file chosen", andMoreLabel = (n) => `and ${n} more`, ...restProps }, ref) {
|
|
109
|
+
var FileInput = React$1.forwardRef(function FileInput({ label, required, size, rounded, color = "primary", startHelperContent, endHelperContent, hintContent, error, errorContent, startIcon, disabled = false, readOnly = false, id, className, name, accept, multiple = false, files: filesProp, onFilesChange, onChange, browseLabel = "Browse", changeLabel = "Change", clearLabel = "Clear file", placeholder = "No file chosen", andMoreLabel = (n) => `and ${n} more`, radius, border, ...restProps }, ref) {
|
|
110
|
+
const axes = useStyleAxes({
|
|
111
|
+
radius,
|
|
112
|
+
border
|
|
113
|
+
}, ["radius", "border"]);
|
|
109
114
|
const autoId = React$1.useId();
|
|
110
115
|
const inputId = id ?? autoId;
|
|
111
116
|
const effectiveSize = size ?? "default";
|
|
@@ -210,7 +215,7 @@ var FileInput = React$1.forwardRef(function FileInput({ label, required, size, r
|
|
|
210
215
|
})]
|
|
211
216
|
});
|
|
212
217
|
}
|
|
213
|
-
const containerClasses = cn("flex w-full items-center overflow-hidden ps-3 border border-input bg-background ring-offset-background transition-[box-shadow,border-color] duration-200 ease-in-out", "focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2", sizeClasses[effectiveSize], rounded ? "rounded-full" : "rounded-md", hasError && "border-destructive focus-within:ring-destructive", startIcon && "ps-9", disabled && "cursor-not-allowed opacity-50", readOnly && "cursor-default bg-muted");
|
|
218
|
+
const containerClasses = cn("flex w-full items-center overflow-hidden ps-3 border-[length:var(--espd-own-border-width,var(--espd-border-width-control,1px))] border-input bg-background ring-offset-background transition-[box-shadow,border-color] duration-200 ease-in-out", "focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2", sizeClasses[effectiveSize], rounded && radius === void 0 ? "rounded-full" : "rounded-[var(--espd-own-radius,var(--espd-radius-control,var(--radius-md)))]", hasError && "border-destructive focus-within:ring-destructive", startIcon && "ps-9", disabled && "cursor-not-allowed opacity-50", readOnly && "cursor-default bg-muted");
|
|
214
219
|
const actionButtonClasses = cn("inline-flex shrink-0 cursor-pointer items-center justify-center gap-1.5 rounded-md px-2 text-[length:inherit] font-medium transition-colors", browseTokens.buttonText, "hover:bg-accent", "focus-visible:outline-none focus-visible:ring-0", disabled && "pointer-events-none opacity-50");
|
|
215
220
|
return /* @__PURE__ */ jsxs("div", {
|
|
216
221
|
className: cn("@container flex-1 space-y-2", className),
|
|
@@ -258,6 +263,7 @@ var FileInput = React$1.forwardRef(function FileInput({ label, required, size, r
|
|
|
258
263
|
onClick: openFileDialog,
|
|
259
264
|
onKeyDown: onDisplayKeyDown,
|
|
260
265
|
className: containerClasses,
|
|
266
|
+
style: axes.style,
|
|
261
267
|
children: [
|
|
262
268
|
/* @__PURE__ */ jsx("span", {
|
|
263
269
|
className: "min-w-0 flex-1 truncate",
|
|
@@ -274,7 +280,7 @@ var FileInput = React$1.forwardRef(function FileInput({ label, required, size, r
|
|
|
274
280
|
children: /* @__PURE__ */ jsx(X, { className: iconSizeClasses[effectiveSize] })
|
|
275
281
|
}),
|
|
276
282
|
!readOnly && /* @__PURE__ */ jsx("div", {
|
|
277
|
-
className: cn("inline-flex shrink-0 self-stretch items-center border-s", browseTokens.wrapperBorder, browseTokens.wrapperBg, rounded ? "rounded-e-full" : "rounded-e-[calc(var(--radius)-1px)]"),
|
|
283
|
+
className: cn("inline-flex shrink-0 self-stretch items-center border-s", browseTokens.wrapperBorder, browseTokens.wrapperBg, rounded && radius === void 0 ? "rounded-e-full" : "rounded-e-[calc(var(--radius)-1px)]"),
|
|
278
284
|
children: /* @__PURE__ */ jsxs("button", {
|
|
279
285
|
type: "button",
|
|
280
286
|
disabled,
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { S as Size, C as Color } from '../../index-BQANnKs9.js';
|
|
3
|
+
import { k as StyleAxisProps } from '../../style-axes-DSQ2DGc5.js';
|
|
4
|
+
|
|
5
|
+
interface FileInputProps extends Pick<StyleAxisProps, "radius" | "border"> {
|
|
6
|
+
/** Label displayed above the input. */
|
|
7
|
+
label?: React.ReactNode;
|
|
8
|
+
/** Marks the field as required (appends a red asterisk to the label). */
|
|
9
|
+
required?: boolean;
|
|
10
|
+
/** Controls height, padding and font size. @default "default" */
|
|
11
|
+
size?: Size;
|
|
12
|
+
/** Uses fully-rounded corners instead of the default border radius. Same as `radius="full"`; `radius` wins when both are set. */
|
|
13
|
+
rounded?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Accent color for the browse/change button area.
|
|
16
|
+
* Accepts any preset color token (`"primary"`, `"secondary"`, `"error"`, …)
|
|
17
|
+
* or an arbitrary CSS color string (hex, `rgb()`, `var(--token)`).
|
|
18
|
+
* Only affects the browse/change button — not the container border.
|
|
19
|
+
* @default "primary"
|
|
20
|
+
*/
|
|
21
|
+
color?: Color;
|
|
22
|
+
/** Helper text rendered below the control on the leading side. Hidden when `errorContent` is shown. */
|
|
23
|
+
startHelperContent?: React.ReactNode;
|
|
24
|
+
/** Helper text rendered below the control on the trailing side. Hidden when `errorContent` is shown. */
|
|
25
|
+
endHelperContent?: React.ReactNode;
|
|
26
|
+
/** Hint text displayed beside the label. */
|
|
27
|
+
hintContent?: React.ReactNode;
|
|
28
|
+
/** Applies error border / ring styling when `true`. */
|
|
29
|
+
error?: boolean;
|
|
30
|
+
/** Error message displayed below the control (replaces helper content). */
|
|
31
|
+
errorContent?: React.ReactNode;
|
|
32
|
+
/** Icon rendered inside the display area on the leading side. */
|
|
33
|
+
startIcon?: React.ReactNode;
|
|
34
|
+
/** Disables the control and all interactive elements. */
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
/** Prevents file selection while still displaying the current value. */
|
|
37
|
+
readOnly?: boolean;
|
|
38
|
+
/** HTML `id` for the hidden file input. Auto-generated when omitted. */
|
|
39
|
+
id?: string;
|
|
40
|
+
/** CSS class applied to the outermost wrapper. */
|
|
41
|
+
className?: string;
|
|
42
|
+
/** HTML `name` for the hidden file input (used in native form submission). */
|
|
43
|
+
name?: string;
|
|
44
|
+
/** Comma-separated MIME types or extensions (e.g. `".png,.jpg"`, `"image/*"`). Passed to the hidden `<input accept>`. */
|
|
45
|
+
accept?: string;
|
|
46
|
+
/** Allow selecting multiple files. @default false */
|
|
47
|
+
multiple?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Controlled file list. When provided (including `[]`), the parent owns the list;
|
|
50
|
+
* update via `onFilesChange`. When omitted, the component keeps files in internal state.
|
|
51
|
+
*/
|
|
52
|
+
files?: File[];
|
|
53
|
+
/** Fires after the file list changes. */
|
|
54
|
+
onFilesChange?: (files: File[]) => void;
|
|
55
|
+
/**
|
|
56
|
+
* Standard `onChange` handler — fires with a synthetic event whose `target.files`
|
|
57
|
+
* reflects the current list. Compatible with `react-hook-form` `register()`.
|
|
58
|
+
*/
|
|
59
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
60
|
+
/** Label for the action button when no file is selected. @default "Browse" */
|
|
61
|
+
browseLabel?: string;
|
|
62
|
+
/** Label for the action button when a file is already selected. @default "Change" */
|
|
63
|
+
changeLabel?: string;
|
|
64
|
+
/** Accessible label for the clear (×) button. @default "Clear file" */
|
|
65
|
+
clearLabel?: string;
|
|
66
|
+
/** Placeholder text when no file is selected. @default "No file chosen" */
|
|
67
|
+
placeholder?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Formats the "and N more" suffix when multiple files are selected.
|
|
70
|
+
* Receives the count of *additional* files beyond the first.
|
|
71
|
+
* @default (n) => `and ${n} more`
|
|
72
|
+
*/
|
|
73
|
+
andMoreLabel?: (remaining: number) => string;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
declare const FileInput: React.ForwardRefExoticComponent<FileInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
77
|
+
|
|
78
|
+
export { FileInput, type FileInputProps };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { cn } from "../../utils/cn.js";
|
|
2
|
+
import { useStyleAxes } from "../../utils/style-axes.js";
|
|
2
3
|
import { buttonVariants } from "../../core/button.js";
|
|
3
4
|
import { Button } from "../button/button.js";
|
|
4
5
|
import { IconAvatar } from "../icon-avatar/icon-avatar.js";
|
|
@@ -63,7 +64,8 @@ function mergeFiles(existing, incoming, multiple) {
|
|
|
63
64
|
}
|
|
64
65
|
return next;
|
|
65
66
|
}
|
|
66
|
-
var FileUpload = React$1.forwardRef(function FileUpload({ className, title = "Drag & drop files here", description, browseLabel = "Browse files", multiple = false, disabled = false, onChange, onFilesChange, files: filesProp, hideDropzoneOnFileSelect = false, id, ...inputPropsRest }, ref) {
|
|
67
|
+
var FileUpload = React$1.forwardRef(function FileUpload({ className, title = "Drag & drop files here", description, browseLabel = "Browse files", multiple = false, disabled = false, onChange, onFilesChange, files: filesProp, hideDropzoneOnFileSelect = false, layout = "stacked", id, radius, ...inputPropsRest }, ref) {
|
|
68
|
+
const { partStyle } = useStyleAxes({ radius }, ["radius"]);
|
|
67
69
|
const autoId = React$1.useId();
|
|
68
70
|
const inputId = id ?? autoId;
|
|
69
71
|
const descriptionId = `${inputId}-description`;
|
|
@@ -183,6 +185,7 @@ var FileUpload = React$1.forwardRef(function FileUpload({ className, title = "Dr
|
|
|
183
185
|
const hasDescription = description != null && description !== "";
|
|
184
186
|
const dropZoneLabel = `${title}. ${browseLabel}`;
|
|
185
187
|
const showDropzone = !(hideDropzoneOnFileSelect && listFiles.length > 0);
|
|
188
|
+
const row = layout === "row";
|
|
186
189
|
return /* @__PURE__ */ jsxs("div", {
|
|
187
190
|
className: cn("w-full space-y-3", className),
|
|
188
191
|
children: [
|
|
@@ -228,13 +231,14 @@ var FileUpload = React$1.forwardRef(function FileUpload({ className, title = "Dr
|
|
|
228
231
|
onDragLeave,
|
|
229
232
|
onDragOver,
|
|
230
233
|
onDrop,
|
|
231
|
-
|
|
234
|
+
style: partStyle,
|
|
235
|
+
className: cn("flex rounded-[var(--espd-own-radius,var(--espd-radius-surface,var(--radius-xl)))] border-[length:var(--espd-own-border-width,var(--espd-border-width-surface,2px))] border-dashed border-input bg-background transition-colors outline-none", row ? "flex-row items-center gap-3 px-4 py-3 text-left" : "flex-col items-center gap-3 px-6 py-8 text-center", !disabled && "cursor-pointer hover:border-muted-foreground/40", isDragging && !disabled && "border-primary bg-primary/5", disabled && "pointer-events-none opacity-50", "focus-visible:border-input focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),
|
|
232
236
|
children: [
|
|
233
237
|
/* @__PURE__ */ jsx("span", {
|
|
234
238
|
className: "inline-flex",
|
|
235
239
|
"aria-hidden": true,
|
|
236
240
|
children: /* @__PURE__ */ jsx(IconAvatar, {
|
|
237
|
-
size: 48,
|
|
241
|
+
size: row ? 36 : 48,
|
|
238
242
|
color: "primary",
|
|
239
243
|
ring: {
|
|
240
244
|
show: true,
|
|
@@ -247,7 +251,7 @@ var FileUpload = React$1.forwardRef(function FileUpload({ className, title = "Dr
|
|
|
247
251
|
})
|
|
248
252
|
}),
|
|
249
253
|
/* @__PURE__ */ jsxs("div", {
|
|
250
|
-
className: "space-y-1",
|
|
254
|
+
className: cn("space-y-1", row && "min-w-0 flex-1 space-y-0.5"),
|
|
251
255
|
children: [/* @__PURE__ */ jsx(Typography, {
|
|
252
256
|
variant: "body2",
|
|
253
257
|
as: "p",
|
|
@@ -277,7 +281,8 @@ var FileUpload = React$1.forwardRef(function FileUpload({ className, title = "Dr
|
|
|
277
281
|
className: "flex flex-col gap-2",
|
|
278
282
|
"aria-live": "polite",
|
|
279
283
|
children: listFiles.map((file, index) => /* @__PURE__ */ jsxs("li", {
|
|
280
|
-
|
|
284
|
+
style: partStyle,
|
|
285
|
+
className: "flex items-center gap-3 rounded-[var(--espd-own-radius,var(--espd-radius-surface,var(--radius-xl)))] border-[length:var(--espd-own-border-width,var(--espd-border-width-surface,1px))] border-input bg-background px-3 py-2.5",
|
|
281
286
|
children: [
|
|
282
287
|
/* @__PURE__ */ jsx(FileListItemIcon, {}),
|
|
283
288
|
/* @__PURE__ */ jsxs("div", {
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { k as StyleAxisProps } from '../../style-axes-DSQ2DGc5.js';
|
|
3
|
+
|
|
4
|
+
interface FileUploadProps extends Omit<React.ComponentPropsWithoutRef<"input">, "type" | "value" | "defaultValue" | "className">, Pick<StyleAxisProps, "radius"> {
|
|
5
|
+
/** Applied to the outer wrapper */
|
|
6
|
+
className?: string;
|
|
7
|
+
/** Primary line in the drop zone */
|
|
8
|
+
title?: string;
|
|
9
|
+
/** Optional muted line under the title */
|
|
10
|
+
description?: string;
|
|
11
|
+
/** Label for the browse control */
|
|
12
|
+
browseLabel?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Controlled file list. When provided (including `[]`), the parent owns the list;
|
|
15
|
+
* update via `onFilesChange` (e.g. react-hook-form `Controller`). When omitted, the
|
|
16
|
+
* component keeps files in internal state (uncontrolled).
|
|
17
|
+
*/
|
|
18
|
+
files?: File[];
|
|
19
|
+
/** Fires after the file list and input are updated */
|
|
20
|
+
onFilesChange?: (files: File[]) => void;
|
|
21
|
+
/**
|
|
22
|
+
* When true, hides the dropzone once one or more files are selected, and
|
|
23
|
+
* restores it when all files are removed. In `multiple` mode this prevents
|
|
24
|
+
* adding more files through the dropzone while files are present. Default: false.
|
|
25
|
+
*/
|
|
26
|
+
hideDropzoneOnFileSelect?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* `stacked` (default): the icon, the lines and the browse control one under
|
|
29
|
+
* the other, centred — a drop zone that is the page's main thing.
|
|
30
|
+
* `row`: all three on one compact line, the browse control at its end — a
|
|
31
|
+
* drop zone inside a form or a card, where a tall one would dominate.
|
|
32
|
+
*/
|
|
33
|
+
layout?: "stacked" | "row";
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
declare const FileUpload: React.ForwardRefExoticComponent<FileUploadProps & React.RefAttributes<HTMLInputElement>>;
|
|
37
|
+
|
|
38
|
+
export { FileUpload, type FileUploadProps };
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { cn } from "../../utils/cn.js";
|
|
2
|
+
import { densityStyle } from "../../utils/style-axes.js";
|
|
2
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
4
|
//#region src/components/filters-bar/filters-bar.tsx
|
|
4
|
-
function FiltersBar({ search, actions, filters, searchClassName, className }) {
|
|
5
|
+
function FiltersBar({ search, actions, filters, searchClassName, className, density }) {
|
|
6
|
+
const style = densityStyle(density);
|
|
5
7
|
if (!filters) return /* @__PURE__ */ jsxs("div", {
|
|
6
8
|
className: cn("flex w-full items-center justify-between gap-3 md:gap-4", className),
|
|
9
|
+
style,
|
|
7
10
|
children: [search && /* @__PURE__ */ jsx("div", {
|
|
8
11
|
className: cn("min-w-0 flex-1", searchClassName ?? "max-w-md"),
|
|
9
12
|
children: search
|
|
@@ -14,6 +17,7 @@ function FiltersBar({ search, actions, filters, searchClassName, className }) {
|
|
|
14
17
|
});
|
|
15
18
|
return /* @__PURE__ */ jsx("div", {
|
|
16
19
|
className: cn("@container w-full", className),
|
|
20
|
+
style,
|
|
17
21
|
children: /* @__PURE__ */ jsxs("div", {
|
|
18
22
|
className: "flex flex-col gap-3 @3xl:flex-row @3xl:flex-wrap @3xl:items-center @3xl:gap-x-5",
|
|
19
23
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { d as DensityProps } from '../../style-axes-DSQ2DGc5.js';
|
|
4
|
+
|
|
5
|
+
interface FiltersBarProps extends DensityProps {
|
|
6
|
+
/** Search box. Grows to fill the first row next to `actions`. */
|
|
7
|
+
search?: ReactNode;
|
|
8
|
+
/** Primary actions (create, scope menus). End-aligned and never shrunk. */
|
|
9
|
+
actions?: ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* Filter controls and "Clear all". Below a 768px-wide bar they sit in a
|
|
12
|
+
* second row that scrolls sideways; from 768px up they share one wrapping
|
|
13
|
+
* row with the search and actions. Omit for a single search + actions row.
|
|
14
|
+
*/
|
|
15
|
+
filters?: ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Replaces the search wrapper's default width: `max-w-md` for a single row,
|
|
18
|
+
* `@3xl:w-xs` with `filters`. For example `@3xl:w-sm` for a wider box.
|
|
19
|
+
*/
|
|
20
|
+
searchClassName?: string;
|
|
21
|
+
className?: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare function FiltersBar({ search, actions, filters, searchClassName, className, density, }: FiltersBarProps): React.JSX.Element;
|
|
25
|
+
|
|
26
|
+
export { FiltersBar, type FiltersBarProps };
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn.js";
|
|
2
|
+
import { usePrefersReducedMotion } from "../../core/hooks/use-prefers-reduced-motion.js";
|
|
3
|
+
import * as React$1 from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/flip-card/flip-card.tsx
|
|
6
|
+
var ROTATE = {
|
|
7
|
+
x: "rotateX",
|
|
8
|
+
y: "rotateY"
|
|
9
|
+
};
|
|
10
|
+
var TRANSLATE = {
|
|
11
|
+
x: "translateY",
|
|
12
|
+
y: "translateX"
|
|
13
|
+
};
|
|
14
|
+
var MOVES = "transition-transform duration-700 ease-in-out motion-reduce:transition-none";
|
|
15
|
+
/** One face. The hidden one is out of the accessibility tree and unreachable by keyboard. */
|
|
16
|
+
function Face({ hidden, side, className, style, onTransitionEnd, children }) {
|
|
17
|
+
const ref = React$1.useRef(null);
|
|
18
|
+
React$1.useLayoutEffect(() => {
|
|
19
|
+
ref.current?.toggleAttribute("inert", hidden);
|
|
20
|
+
}, [hidden]);
|
|
21
|
+
return /* @__PURE__ */ jsx("div", {
|
|
22
|
+
ref,
|
|
23
|
+
"data-slot": `flip-card-${side}`,
|
|
24
|
+
"aria-hidden": hidden || void 0,
|
|
25
|
+
className: cn("absolute inset-0", className),
|
|
26
|
+
style,
|
|
27
|
+
onTransitionEnd,
|
|
28
|
+
children
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/** Whether `event` is the end of this element's own transform transition (not a child's). */
|
|
32
|
+
function ownTransformEnd(event) {
|
|
33
|
+
return event.target === event.currentTarget && event.propertyName === "transform";
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* How each face sits in a slide: the one showing at rest, the one that just
|
|
37
|
+
* left still travelling out (or gone past the far edge), and once that has
|
|
38
|
+
* ended, the hidden face waits — moved without a transition — before the near
|
|
39
|
+
* edge, ready to follow the next one in.
|
|
40
|
+
*/
|
|
41
|
+
function slideStyles(axis, flipped, parked, turnClassName) {
|
|
42
|
+
const translate = TRANSLATE[axis];
|
|
43
|
+
const showing = {
|
|
44
|
+
className: cn(MOVES, turnClassName),
|
|
45
|
+
style: { transform: `${translate}(0%)` }
|
|
46
|
+
};
|
|
47
|
+
const hidden = parked ? {
|
|
48
|
+
className: "transition-none",
|
|
49
|
+
style: { transform: `${translate}(-100%)` }
|
|
50
|
+
} : {
|
|
51
|
+
className: cn(MOVES, turnClassName),
|
|
52
|
+
style: { transform: `${translate}(100%)` }
|
|
53
|
+
};
|
|
54
|
+
return flipped ? {
|
|
55
|
+
front: hidden,
|
|
56
|
+
back: showing
|
|
57
|
+
} : {
|
|
58
|
+
front: showing,
|
|
59
|
+
back: hidden
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* A card with two faces that shows one and changes to the other. Controlled
|
|
64
|
+
* by `flipped`; every change moves the same way, so a card that keeps
|
|
65
|
+
* swapping what it shows (load the hidden face, then flip) reads as one
|
|
66
|
+
* continuous motion, never as going back. `effect="turn"` turns it over;
|
|
67
|
+
* `effect="slide"` slides the face showing out past the far edge while the
|
|
68
|
+
* next follows it in from the near one. Under reduced motion the faces swap
|
|
69
|
+
* in place. The card takes its size from its parent or `className`: the
|
|
70
|
+
* faces fill it.
|
|
71
|
+
*/
|
|
72
|
+
function FlipCard({ front, back, flipped = false, axis = "y", effect = "turn", onFlipEnd, faceClassName, turnClassName, className, ...props }) {
|
|
73
|
+
const reducedMotion = usePrefersReducedMotion();
|
|
74
|
+
const [turns, setTurns] = React$1.useState(flipped ? 1 : 0);
|
|
75
|
+
const [seen, setSeen] = React$1.useState(flipped);
|
|
76
|
+
const [parked, setParked] = React$1.useState(true);
|
|
77
|
+
if (seen !== flipped) {
|
|
78
|
+
setSeen(flipped);
|
|
79
|
+
setTurns((count) => count + 1);
|
|
80
|
+
setParked(false);
|
|
81
|
+
}
|
|
82
|
+
const onFlipEndRef = React$1.useRef(onFlipEnd);
|
|
83
|
+
React$1.useEffect(() => {
|
|
84
|
+
onFlipEndRef.current = onFlipEnd;
|
|
85
|
+
});
|
|
86
|
+
const firstTurns = React$1.useRef(turns);
|
|
87
|
+
React$1.useEffect(() => {
|
|
88
|
+
if (reducedMotion && turns !== firstTurns.current) onFlipEndRef.current?.();
|
|
89
|
+
}, [reducedMotion, turns]);
|
|
90
|
+
function handleTurnEnd(event) {
|
|
91
|
+
if (ownTransformEnd(event)) onFlipEnd?.();
|
|
92
|
+
}
|
|
93
|
+
if (effect === "slide") {
|
|
94
|
+
const faces = slideStyles(axis, flipped, parked || reducedMotion, turnClassName);
|
|
95
|
+
const endFor = (showing) => (event) => {
|
|
96
|
+
if (!ownTransformEnd(event)) return;
|
|
97
|
+
if (showing) onFlipEnd?.();
|
|
98
|
+
else setParked(true);
|
|
99
|
+
};
|
|
100
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
101
|
+
"data-slot": "flip-card",
|
|
102
|
+
className: cn("relative overflow-hidden", className),
|
|
103
|
+
...props,
|
|
104
|
+
children: [/* @__PURE__ */ jsx(Face, {
|
|
105
|
+
hidden: flipped,
|
|
106
|
+
side: "front",
|
|
107
|
+
className: cn(faceClassName, faces.front.className),
|
|
108
|
+
style: faces.front.style,
|
|
109
|
+
onTransitionEnd: endFor(!flipped),
|
|
110
|
+
children: front
|
|
111
|
+
}), /* @__PURE__ */ jsx(Face, {
|
|
112
|
+
hidden: !flipped,
|
|
113
|
+
side: "back",
|
|
114
|
+
className: cn(faceClassName, faces.back.className),
|
|
115
|
+
style: faces.back.style,
|
|
116
|
+
onTransitionEnd: endFor(flipped),
|
|
117
|
+
children: back
|
|
118
|
+
})]
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
const angle = (axis === "x" ? -180 : 180) * turns;
|
|
122
|
+
return /* @__PURE__ */ jsx("div", {
|
|
123
|
+
"data-slot": "flip-card",
|
|
124
|
+
className: cn("relative perspective-midrange", className),
|
|
125
|
+
...props,
|
|
126
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
127
|
+
"data-slot": "flip-card-inner",
|
|
128
|
+
className: cn("absolute inset-0 transform-3d", MOVES, turnClassName),
|
|
129
|
+
style: { transform: `${ROTATE[axis]}(${angle}deg)` },
|
|
130
|
+
onTransitionEnd: handleTurnEnd,
|
|
131
|
+
children: [/* @__PURE__ */ jsx(Face, {
|
|
132
|
+
hidden: flipped,
|
|
133
|
+
side: "front",
|
|
134
|
+
className: cn("backface-hidden", faceClassName),
|
|
135
|
+
children: front
|
|
136
|
+
}), /* @__PURE__ */ jsx(Face, {
|
|
137
|
+
hidden: !flipped,
|
|
138
|
+
side: "back",
|
|
139
|
+
className: cn("backface-hidden", faceClassName),
|
|
140
|
+
style: { transform: `${ROTATE[axis]}(180deg)` },
|
|
141
|
+
children: back
|
|
142
|
+
})]
|
|
143
|
+
})
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
//#endregion
|
|
147
|
+
export { FlipCard };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The axis the card changes about. Turning: `x` tips it over top to bottom (a
|
|
6
|
+
* split-flap), `y` turns it like a page. Sliding: `x` moves the faces down,
|
|
7
|
+
* `y` moves them sideways.
|
|
8
|
+
*/
|
|
9
|
+
type FlipCardAxis = "x" | "y";
|
|
10
|
+
/** How one face gives way to the other: turned over, or slid out with the next following it in. */
|
|
11
|
+
type FlipCardEffect = "turn" | "slide";
|
|
12
|
+
interface FlipCardProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
|
13
|
+
/** The face showing while `flipped` is false. */
|
|
14
|
+
front: ReactNode;
|
|
15
|
+
/** The face showing while `flipped` is true. */
|
|
16
|
+
back: ReactNode;
|
|
17
|
+
/** Which face shows. Each change moves the same way, never back. */
|
|
18
|
+
flipped?: boolean;
|
|
19
|
+
/** Defaults to `y`. */
|
|
20
|
+
axis?: FlipCardAxis;
|
|
21
|
+
/** Defaults to `turn`. */
|
|
22
|
+
effect?: FlipCardEffect;
|
|
23
|
+
/** Called when a change has finished (at once under reduced motion, where the faces swap in place). */
|
|
24
|
+
onFlipEnd?: () => void;
|
|
25
|
+
/** Classes for both faces, which fill the card. */
|
|
26
|
+
faceClassName?: string;
|
|
27
|
+
/** Timing classes (`duration-*`, `ease-*`, `delay-*`) for what moves: the turning layer, or both faces in a slide. */
|
|
28
|
+
turnClassName?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* A card with two faces that shows one and changes to the other. Controlled
|
|
33
|
+
* by `flipped`; every change moves the same way, so a card that keeps
|
|
34
|
+
* swapping what it shows (load the hidden face, then flip) reads as one
|
|
35
|
+
* continuous motion, never as going back. `effect="turn"` turns it over;
|
|
36
|
+
* `effect="slide"` slides the face showing out past the far edge while the
|
|
37
|
+
* next follows it in from the near one. Under reduced motion the faces swap
|
|
38
|
+
* in place. The card takes its size from its parent or `className`: the
|
|
39
|
+
* faces fill it.
|
|
40
|
+
*/
|
|
41
|
+
declare function FlipCard({ front, back, flipped, axis, effect, onFlipEnd, faceClassName, turnClassName, className, ...props }: FlipCardProps): React.JSX.Element;
|
|
42
|
+
|
|
43
|
+
export { FlipCard, type FlipCardAxis, type FlipCardEffect, type FlipCardProps };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { useLayoutEffect, useRef, useState } from "react";
|
|
2
|
+
//#region src/components/floating-window/_hooks/use-drag-move.ts
|
|
3
|
+
var DEFAULT_WINDOW_POSITION = {
|
|
4
|
+
x: 24,
|
|
5
|
+
y: 56
|
|
6
|
+
};
|
|
7
|
+
/** Keeps the whole frame inside the viewport. */
|
|
8
|
+
function clampToViewport(position, frame, viewport) {
|
|
9
|
+
return {
|
|
10
|
+
x: Math.min(Math.max(position.x, 0), Math.max(viewport.width - frame.width, 0)),
|
|
11
|
+
y: Math.min(Math.max(position.y, 0), Math.max(viewport.height - frame.height, 0))
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Drags a fixed-position frame by a handle. The frame's position is a
|
|
16
|
+
* transform written to the element on every pointer move — a value that
|
|
17
|
+
* changes per frame cannot be a class, so it is written from here, never from
|
|
18
|
+
* a `style` prop — and handed back once the pointer is released, clamped to
|
|
19
|
+
* the viewport, for the caller to remember. Attach `frameRef` to the frame:
|
|
20
|
+
* the frame is placed the moment it mounts (so a window that comes back from
|
|
21
|
+
* a pill opens where it was) and again whenever the remembered spot changes.
|
|
22
|
+
*/
|
|
23
|
+
function useDragMove(position, onMove) {
|
|
24
|
+
const [frame, setFrame] = useState(null);
|
|
25
|
+
const current = useRef(position ?? DEFAULT_WINDOW_POSITION);
|
|
26
|
+
const drag = useRef(null);
|
|
27
|
+
function place(next) {
|
|
28
|
+
current.current = next;
|
|
29
|
+
if (frame) frame.style.transform = `translate(${next.x}px, ${next.y}px)`;
|
|
30
|
+
}
|
|
31
|
+
useLayoutEffect(() => {
|
|
32
|
+
const wanted = position ?? DEFAULT_WINDOW_POSITION;
|
|
33
|
+
place(frame ? clampToViewport(wanted, frame.getBoundingClientRect(), {
|
|
34
|
+
width: window.innerWidth,
|
|
35
|
+
height: window.innerHeight
|
|
36
|
+
}) : wanted);
|
|
37
|
+
}, [position, frame]);
|
|
38
|
+
function onPointerDown(event) {
|
|
39
|
+
if (event.button !== 0 || event.target instanceof Element && event.target.closest("button, a, input")) return;
|
|
40
|
+
event.currentTarget.setPointerCapture?.(event.pointerId);
|
|
41
|
+
drag.current = {
|
|
42
|
+
pointerId: event.pointerId,
|
|
43
|
+
dx: event.clientX - current.current.x,
|
|
44
|
+
dy: event.clientY - current.current.y
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function onPointerMove(event) {
|
|
48
|
+
const active = drag.current;
|
|
49
|
+
if (!active || active.pointerId !== event.pointerId) return;
|
|
50
|
+
place({
|
|
51
|
+
x: event.clientX - active.dx,
|
|
52
|
+
y: event.clientY - active.dy
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function onPointerUp(event) {
|
|
56
|
+
const active = drag.current;
|
|
57
|
+
if (!active || active.pointerId !== event.pointerId) return;
|
|
58
|
+
drag.current = null;
|
|
59
|
+
event.currentTarget.releasePointerCapture?.(event.pointerId);
|
|
60
|
+
const settled = frame ? clampToViewport(current.current, frame.getBoundingClientRect(), {
|
|
61
|
+
width: window.innerWidth,
|
|
62
|
+
height: window.innerHeight
|
|
63
|
+
}) : current.current;
|
|
64
|
+
place(settled);
|
|
65
|
+
onMove(settled);
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
frameRef: setFrame,
|
|
69
|
+
onPointerDown,
|
|
70
|
+
onPointerMove,
|
|
71
|
+
onPointerUp,
|
|
72
|
+
onPointerCancel: onPointerUp
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
//#endregion
|
|
76
|
+
export { DEFAULT_WINDOW_POSITION, clampToViewport, useDragMove };
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn.js";
|
|
2
|
+
import { Button } from "../button/button.js";
|
|
3
|
+
import { Typography } from "../typography/typography.js";
|
|
4
|
+
import { ToolbarButton } from "../toolbar/toolbar-button.js";
|
|
5
|
+
import { useDragMove } from "./_hooks/use-drag-move.js";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { Dock, GripHorizontal, MessageSquare, Minus, X } from "lucide-react";
|
|
8
|
+
//#region src/components/floating-window/floating-window.tsx
|
|
9
|
+
/** The window folded away: a pill in the bottom-left corner that opens it again. */
|
|
10
|
+
function Pill({ title, label, attention, onRestore }) {
|
|
11
|
+
return /* @__PURE__ */ jsxs(Button, {
|
|
12
|
+
type: "button",
|
|
13
|
+
variant: "outline",
|
|
14
|
+
color: "gray",
|
|
15
|
+
radius: "full",
|
|
16
|
+
fullWidth: false,
|
|
17
|
+
"aria-label": attention ? `${label} (${attention})` : label,
|
|
18
|
+
startIcon: /* @__PURE__ */ jsx(MessageSquare, { className: "h-4 w-4" }),
|
|
19
|
+
onClick: onRestore,
|
|
20
|
+
className: "view-transition-morph fixed bottom-4 left-4 z-30 bg-background shadow-float",
|
|
21
|
+
children: [title, attention && /* @__PURE__ */ jsx("span", {
|
|
22
|
+
"aria-hidden": true,
|
|
23
|
+
"data-attention": true,
|
|
24
|
+
className: "absolute top-0 right-0 size-2.5 rounded-full bg-error ring-2 ring-background"
|
|
25
|
+
})]
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A small window floating over the page, moved by its bar: a non-modal
|
|
30
|
+
* dialog, so the page behind it stays live. Its bar carries Minimize (to a
|
|
31
|
+
* pill in the bottom-left corner), the way back (Dock) and the way out
|
|
32
|
+
* (Close); Escape docks. Wrap `onMinimize` / `onRestore` in
|
|
33
|
+
* `startViewTransition` and the window morphs into its pill and back.
|
|
34
|
+
*/
|
|
35
|
+
function FloatingWindow({ title, children, position, onMove, minimized = false, onMinimize, onRestore, onDock, onClose, dockLabel, closeLabel, minimizeLabel, restoreLabel, attention, moveLabel, className }) {
|
|
36
|
+
const handle = useDragMove(position, onMove);
|
|
37
|
+
function onKeyDown(event) {
|
|
38
|
+
if (event.key === "Escape") {
|
|
39
|
+
event.stopPropagation();
|
|
40
|
+
onDock();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
if (minimized) return /* @__PURE__ */ jsx(Pill, {
|
|
44
|
+
title,
|
|
45
|
+
label: restoreLabel ?? title,
|
|
46
|
+
...attention ? { attention } : {},
|
|
47
|
+
onRestore
|
|
48
|
+
});
|
|
49
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
50
|
+
ref: handle.frameRef,
|
|
51
|
+
role: "dialog",
|
|
52
|
+
"aria-label": title,
|
|
53
|
+
onKeyDown,
|
|
54
|
+
"data-slot": "floating-window",
|
|
55
|
+
className: cn("view-transition-morph fixed top-0 left-0 z-30 flex h-128 max-h-dvh w-96 max-w-dvw flex-col overflow-hidden rounded-xl border border-border bg-background shadow-float", className),
|
|
56
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
57
|
+
"aria-label": moveLabel,
|
|
58
|
+
onPointerDown: handle.onPointerDown,
|
|
59
|
+
onPointerMove: handle.onPointerMove,
|
|
60
|
+
onPointerUp: handle.onPointerUp,
|
|
61
|
+
onPointerCancel: handle.onPointerCancel,
|
|
62
|
+
className: "flex h-9 shrink-0 cursor-move touch-none items-center gap-2 border-b border-border bg-surface-container-low px-2 select-none",
|
|
63
|
+
children: [
|
|
64
|
+
/* @__PURE__ */ jsx(GripHorizontal, {
|
|
65
|
+
className: "h-4 w-4 shrink-0 text-foreground-muted",
|
|
66
|
+
"aria-hidden": true
|
|
67
|
+
}),
|
|
68
|
+
/* @__PURE__ */ jsx(Typography, {
|
|
69
|
+
variant: "subtitle2",
|
|
70
|
+
as: "h2",
|
|
71
|
+
className: "m-0 min-w-0 flex-1 truncate text-foreground",
|
|
72
|
+
children: title
|
|
73
|
+
}),
|
|
74
|
+
onMinimize && /* @__PURE__ */ jsx(ToolbarButton, {
|
|
75
|
+
label: minimizeLabel ?? title,
|
|
76
|
+
icon: /* @__PURE__ */ jsx(Minus, {}),
|
|
77
|
+
onClick: onMinimize
|
|
78
|
+
}),
|
|
79
|
+
/* @__PURE__ */ jsx(ToolbarButton, {
|
|
80
|
+
label: dockLabel,
|
|
81
|
+
icon: /* @__PURE__ */ jsx(Dock, {}),
|
|
82
|
+
onClick: onDock
|
|
83
|
+
}),
|
|
84
|
+
/* @__PURE__ */ jsx(ToolbarButton, {
|
|
85
|
+
label: closeLabel,
|
|
86
|
+
icon: /* @__PURE__ */ jsx(X, {}),
|
|
87
|
+
onClick: onClose
|
|
88
|
+
})
|
|
89
|
+
]
|
|
90
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
91
|
+
className: "min-h-0 flex-1",
|
|
92
|
+
children
|
|
93
|
+
})]
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
//#endregion
|
|
97
|
+
export { FloatingWindow };
|