@windmorph/react 0.0.0-stage → 0.1.1
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/LICENSE +21 -0
- package/NOTICE +23 -0
- package/README.md +149 -2
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +112 -0
- package/dist/cli.js.map +1 -0
- package/dist/components/app-bar/AppBarItems.js +23 -0
- package/dist/components/app-bar/AppBarItems.js.map +1 -0
- package/dist/components/app-bar/TopAppBar.d.ts +89 -0
- package/dist/components/app-bar/TopAppBar.js +103 -0
- package/dist/components/app-bar/TopAppBar.js.map +1 -0
- package/dist/components/app-bar/app-bar-styles.d.ts +280 -0
- package/dist/components/app-bar/app-bar-styles.js +142 -0
- package/dist/components/app-bar/app-bar-styles.js.map +1 -0
- package/dist/components/app-bar/app-bar-tokens.d.ts +7 -0
- package/dist/components/app-bar/app-bar-tokens.js +64 -0
- package/dist/components/app-bar/app-bar-tokens.js.map +1 -0
- package/dist/components/app-bar/use-app-bar-scroll.d.ts +6 -0
- package/dist/components/app-bar/use-app-bar-scroll.js +139 -0
- package/dist/components/app-bar/use-app-bar-scroll.js.map +1 -0
- package/dist/components/autocomplete/Autocomplete.d.ts +142 -0
- package/dist/components/autocomplete/Autocomplete.js +284 -0
- package/dist/components/autocomplete/Autocomplete.js.map +1 -0
- package/dist/components/badge/Badge.d.ts +71 -0
- package/dist/components/badge/Badge.js +72 -0
- package/dist/components/badge/Badge.js.map +1 -0
- package/dist/components/badge/badge-styles.d.ts +100 -0
- package/dist/components/badge/badge-styles.js +43 -0
- package/dist/components/badge/badge-styles.js.map +1 -0
- package/dist/components/badge/badge-tokens.d.ts +7 -0
- package/dist/components/badge/badge-tokens.js +40 -0
- package/dist/components/badge/badge-tokens.js.map +1 -0
- package/dist/components/button/Button.d.ts +91 -0
- package/dist/components/button/Button.js +96 -0
- package/dist/components/button/Button.js.map +1 -0
- package/dist/components/button/ButtonContext.d.ts +30 -0
- package/dist/components/button/ButtonContext.js +18 -0
- package/dist/components/button/ButtonContext.js.map +1 -0
- package/dist/components/button/DensityZeroButtons.js +25 -0
- package/dist/components/button/DensityZeroButtons.js.map +1 -0
- package/dist/components/button/button-pending.d.ts +10 -0
- package/dist/components/button/button-pending.js +166 -0
- package/dist/components/button/button-pending.js.map +1 -0
- package/dist/components/button/button-styles.d.ts +216 -0
- package/dist/components/button/button-styles.js +199 -0
- package/dist/components/button/button-styles.js.map +1 -0
- package/dist/components/button/button-tokens.d.ts +10 -0
- package/dist/components/button/button-tokens.js +257 -0
- package/dist/components/button/button-tokens.js.map +1 -0
- package/dist/components/button/connected-shapes.js +152 -0
- package/dist/components/button/connected-shapes.js.map +1 -0
- package/dist/components/card/Card.d.ts +60 -0
- package/dist/components/card/Card.js +69 -0
- package/dist/components/card/Card.js.map +1 -0
- package/dist/components/card/card-styles.d.ts +42 -0
- package/dist/components/card/card-styles.js +64 -0
- package/dist/components/card/card-styles.js.map +1 -0
- package/dist/components/card/card-tokens.d.ts +7 -0
- package/dist/components/card/card-tokens.js +84 -0
- package/dist/components/card/card-tokens.js.map +1 -0
- package/dist/components/carousel/Carousel.d.ts +124 -0
- package/dist/components/carousel/Carousel.js +387 -0
- package/dist/components/carousel/Carousel.js.map +1 -0
- package/dist/components/carousel/carousel-keylines.js +486 -0
- package/dist/components/carousel/carousel-keylines.js.map +1 -0
- package/dist/components/carousel/carousel-press-area.js +35 -0
- package/dist/components/carousel/carousel-press-area.js.map +1 -0
- package/dist/components/carousel/carousel-styles.d.ts +188 -0
- package/dist/components/carousel/carousel-styles.js +116 -0
- package/dist/components/carousel/carousel-styles.js.map +1 -0
- package/dist/components/carousel/carousel-tokens.d.ts +7 -0
- package/dist/components/carousel/carousel-tokens.js +18 -0
- package/dist/components/carousel/carousel-tokens.js.map +1 -0
- package/dist/components/checkbox/Checkbox.d.ts +78 -0
- package/dist/components/checkbox/Checkbox.js +77 -0
- package/dist/components/checkbox/Checkbox.js.map +1 -0
- package/dist/components/checkbox/checkbox-box.js +34 -0
- package/dist/components/checkbox/checkbox-box.js.map +1 -0
- package/dist/components/checkbox/checkbox-styles.d.ts +100 -0
- package/dist/components/checkbox/checkbox-styles.js +54 -0
- package/dist/components/checkbox/checkbox-styles.js.map +1 -0
- package/dist/components/checkbox/checkbox-tokens.d.ts +7 -0
- package/dist/components/checkbox/checkbox-tokens.js +41 -0
- package/dist/components/checkbox/checkbox-tokens.js.map +1 -0
- package/dist/components/chip/Chip.d.ts +171 -0
- package/dist/components/chip/Chip.js +348 -0
- package/dist/components/chip/Chip.js.map +1 -0
- package/dist/components/chip/ChipSet.d.ts +70 -0
- package/dist/components/chip/ChipSet.js +198 -0
- package/dist/components/chip/ChipSet.js.map +1 -0
- package/dist/components/chip/chip-styles.d.ts +263 -0
- package/dist/components/chip/chip-styles.js +360 -0
- package/dist/components/chip/chip-styles.js.map +1 -0
- package/dist/components/chip/chip-tokens.d.ts +13 -0
- package/dist/components/chip/chip-tokens.js +185 -0
- package/dist/components/chip/chip-tokens.js.map +1 -0
- package/dist/components/date-picker/CalendarGrid.js +94 -0
- package/dist/components/date-picker/CalendarGrid.js.map +1 -0
- package/dist/components/date-picker/CompactDateDialog.js +63 -0
- package/dist/components/date-picker/CompactDateDialog.js.map +1 -0
- package/dist/components/date-picker/DateField.d.ts +161 -0
- package/dist/components/date-picker/DateField.js +393 -0
- package/dist/components/date-picker/DateField.js.map +1 -0
- package/dist/components/date-picker/DateInput.d.ts +20 -0
- package/dist/components/date-picker/DateInput.js +99 -0
- package/dist/components/date-picker/DateInput.js.map +1 -0
- package/dist/components/date-picker/DatePicker.d.ts +165 -0
- package/dist/components/date-picker/DatePicker.js +492 -0
- package/dist/components/date-picker/DatePicker.js.map +1 -0
- package/dist/components/date-picker/PickerDialog.d.ts +121 -0
- package/dist/components/date-picker/PickerDialog.js +161 -0
- package/dist/components/date-picker/PickerDialog.js.map +1 -0
- package/dist/components/date-picker/calendar-parts.js +141 -0
- package/dist/components/date-picker/calendar-parts.js.map +1 -0
- package/dist/components/date-picker/date-format.js +72 -0
- package/dist/components/date-picker/date-format.js.map +1 -0
- package/dist/components/date-picker/date-picker-styles.d.ts +247 -0
- package/dist/components/date-picker/date-picker-styles.js +163 -0
- package/dist/components/date-picker/date-picker-styles.js.map +1 -0
- package/dist/components/date-picker/date-picker-tokens.d.ts +7 -0
- package/dist/components/date-picker/date-picker-tokens.js +104 -0
- package/dist/components/date-picker/date-picker-tokens.js.map +1 -0
- package/dist/components/date-picker/picker-dialog-context.js +8 -0
- package/dist/components/date-picker/picker-dialog-context.js.map +1 -0
- package/dist/components/date-picker/picker-dialog-styles.d.ts +95 -0
- package/dist/components/date-picker/picker-dialog-styles.js +57 -0
- package/dist/components/date-picker/picker-dialog-styles.js.map +1 -0
- package/dist/components/date-picker/picker-icons.js +24 -0
- package/dist/components/date-picker/picker-icons.js.map +1 -0
- package/dist/components/date-picker/use-media-query.js +21 -0
- package/dist/components/date-picker/use-media-query.js.map +1 -0
- package/dist/components/date-picker/use-size-transform.js +62 -0
- package/dist/components/date-picker/use-size-transform.js.map +1 -0
- package/dist/components/date-picker/use-view-exit.js +68 -0
- package/dist/components/date-picker/use-view-exit.js.map +1 -0
- package/dist/components/dialog/Dialog.d.ts +267 -0
- package/dist/components/dialog/Dialog.js +521 -0
- package/dist/components/dialog/Dialog.js.map +1 -0
- package/dist/components/dialog/dialog-styles.d.ts +335 -0
- package/dist/components/dialog/dialog-styles.js +377 -0
- package/dist/components/dialog/dialog-styles.js.map +1 -0
- package/dist/components/dialog/dialog-tokens.d.ts +7 -0
- package/dist/components/dialog/dialog-tokens.js +57 -0
- package/dist/components/dialog/dialog-tokens.js.map +1 -0
- package/dist/components/divider/Divider.d.ts +59 -0
- package/dist/components/divider/Divider.js +53 -0
- package/dist/components/divider/Divider.js.map +1 -0
- package/dist/components/divider/divider-styles.d.ts +90 -0
- package/dist/components/divider/divider-styles.js +66 -0
- package/dist/components/divider/divider-styles.js.map +1 -0
- package/dist/components/divider/divider-tokens.d.ts +7 -0
- package/dist/components/divider/divider-tokens.js +16 -0
- package/dist/components/divider/divider-tokens.js.map +1 -0
- package/dist/components/fab/Fab.d.ts +130 -0
- package/dist/components/fab/Fab.js +137 -0
- package/dist/components/fab/Fab.js.map +1 -0
- package/dist/components/fab/FabTooltip.js +36 -0
- package/dist/components/fab/FabTooltip.js.map +1 -0
- package/dist/components/fab/fab-styles.d.ts +286 -0
- package/dist/components/fab/fab-styles.js +131 -0
- package/dist/components/fab/fab-styles.js.map +1 -0
- package/dist/components/fab/fab-tokens.d.ts +12 -0
- package/dist/components/fab/fab-tokens.js +105 -0
- package/dist/components/fab/fab-tokens.js.map +1 -0
- package/dist/components/fab-menu/FabMenu.d.ts +156 -0
- package/dist/components/fab-menu/FabMenu.js +291 -0
- package/dist/components/fab-menu/FabMenu.js.map +1 -0
- package/dist/components/fab-menu/fab-menu-stagger.js +51 -0
- package/dist/components/fab-menu/fab-menu-stagger.js.map +1 -0
- package/dist/components/fab-menu/fab-menu-styles.d.ts +166 -0
- package/dist/components/fab-menu/fab-menu-styles.js +107 -0
- package/dist/components/fab-menu/fab-menu-styles.js.map +1 -0
- package/dist/components/fab-menu/fab-menu-tokens.d.ts +7 -0
- package/dist/components/fab-menu/fab-menu-tokens.js +120 -0
- package/dist/components/fab-menu/fab-menu-tokens.js.map +1 -0
- package/dist/components/icon-button/IconButton.d.ts +125 -0
- package/dist/components/icon-button/IconButton.js +112 -0
- package/dist/components/icon-button/IconButton.js.map +1 -0
- package/dist/components/icon-button/icon-button-styles.d.ts +217 -0
- package/dist/components/icon-button/icon-button-styles.js +244 -0
- package/dist/components/icon-button/icon-button-styles.js.map +1 -0
- package/dist/components/icon-button/icon-button-tokens.d.ts +11 -0
- package/dist/components/icon-button/icon-button-tokens.js +215 -0
- package/dist/components/icon-button/icon-button-tokens.js.map +1 -0
- package/dist/components/list/List.d.ts +265 -0
- package/dist/components/list/List.js +1386 -0
- package/dist/components/list/List.js.map +1 -0
- package/dist/components/list/ListMedia.d.ts +88 -0
- package/dist/components/list/ListMedia.js +132 -0
- package/dist/components/list/ListMedia.js.map +1 -0
- package/dist/components/list/list-styles.d.ts +375 -0
- package/dist/components/list/list-styles.js +220 -0
- package/dist/components/list/list-styles.js.map +1 -0
- package/dist/components/list/list-tokens.d.ts +7 -0
- package/dist/components/list/list-tokens.js +92 -0
- package/dist/components/list/list-tokens.js.map +1 -0
- package/dist/components/loading-indicator/LoadingIndicator.d.ts +65 -0
- package/dist/components/loading-indicator/LoadingIndicator.js +92 -0
- package/dist/components/loading-indicator/LoadingIndicator.js.map +1 -0
- package/dist/components/loading-indicator/lazy-loading-indicator.js +25 -0
- package/dist/components/loading-indicator/lazy-loading-indicator.js.map +1 -0
- package/dist/components/loading-indicator/loading-indicator-frames.js +149 -0
- package/dist/components/loading-indicator/loading-indicator-frames.js.map +1 -0
- package/dist/components/loading-indicator/loading-indicator-styles.d.ts +36 -0
- package/dist/components/loading-indicator/loading-indicator-styles.js +22 -0
- package/dist/components/loading-indicator/loading-indicator-styles.js.map +1 -0
- package/dist/components/loading-indicator/loading-indicator-tokens.d.ts +7 -0
- package/dist/components/loading-indicator/loading-indicator-tokens.js +44 -0
- package/dist/components/loading-indicator/loading-indicator-tokens.js.map +1 -0
- package/dist/components/menu/Menu.d.ts +215 -0
- package/dist/components/menu/Menu.js +715 -0
- package/dist/components/menu/Menu.js.map +1 -0
- package/dist/components/menu/menu-styles.d.ts +354 -0
- package/dist/components/menu/menu-styles.js +219 -0
- package/dist/components/menu/menu-styles.js.map +1 -0
- package/dist/components/menu/menu-tokens.d.ts +7 -0
- package/dist/components/menu/menu-tokens.js +93 -0
- package/dist/components/menu/menu-tokens.js.map +1 -0
- package/dist/components/menu/menu-trigger.d.ts +51 -0
- package/dist/components/menu/menu-trigger.js +100 -0
- package/dist/components/menu/menu-trigger.js.map +1 -0
- package/dist/components/menu/use-reveal-entering.js +42 -0
- package/dist/components/menu/use-reveal-entering.js.map +1 -0
- package/dist/components/navigation/NavItem.d.ts +54 -0
- package/dist/components/navigation/NavItem.js +182 -0
- package/dist/components/navigation/NavItem.js.map +1 -0
- package/dist/components/navigation/NavigationBar.d.ts +64 -0
- package/dist/components/navigation/NavigationBar.js +121 -0
- package/dist/components/navigation/NavigationBar.js.map +1 -0
- package/dist/components/navigation/NavigationRail.d.ts +91 -0
- package/dist/components/navigation/NavigationRail.js +285 -0
- package/dist/components/navigation/NavigationRail.js.map +1 -0
- package/dist/components/navigation/nav-item-styles.d.ts +190 -0
- package/dist/components/navigation/nav-item-styles.js +123 -0
- package/dist/components/navigation/nav-item-styles.js.map +1 -0
- package/dist/components/navigation/navigation-styles.d.ts +239 -0
- package/dist/components/navigation/navigation-styles.js +134 -0
- package/dist/components/navigation/navigation-styles.js.map +1 -0
- package/dist/components/navigation/navigation-tokens.d.ts +9 -0
- package/dist/components/navigation/navigation-tokens.js +114 -0
- package/dist/components/navigation/navigation-tokens.js.map +1 -0
- package/dist/components/navigation/use-hide-on-scroll.js +115 -0
- package/dist/components/navigation/use-hide-on-scroll.js.map +1 -0
- package/dist/components/navigation/use-item-arrow-keys.js +37 -0
- package/dist/components/navigation/use-item-arrow-keys.js.map +1 -0
- package/dist/components/navigation/use-rail-item-morph.js +61 -0
- package/dist/components/navigation/use-rail-item-morph.js.map +1 -0
- package/dist/components/progress/ProgressIndicator.d.ts +95 -0
- package/dist/components/progress/ProgressIndicator.js +426 -0
- package/dist/components/progress/ProgressIndicator.js.map +1 -0
- package/dist/components/progress/progress-geometry.js +285 -0
- package/dist/components/progress/progress-geometry.js.map +1 -0
- package/dist/components/progress/progress-styles.d.ts +81 -0
- package/dist/components/progress/progress-styles.js +43 -0
- package/dist/components/progress/progress-styles.js.map +1 -0
- package/dist/components/progress/progress-tokens.d.ts +7 -0
- package/dist/components/progress/progress-tokens.js +39 -0
- package/dist/components/progress/progress-tokens.js.map +1 -0
- package/dist/components/pull-to-refresh/PullToRefresh.d.ts +94 -0
- package/dist/components/pull-to-refresh/PullToRefresh.js +395 -0
- package/dist/components/pull-to-refresh/PullToRefresh.js.map +1 -0
- package/dist/components/pull-to-refresh/pull-to-refresh-math.js +37 -0
- package/dist/components/pull-to-refresh/pull-to-refresh-math.js.map +1 -0
- package/dist/components/pull-to-refresh/pull-to-refresh-styles.d.ts +53 -0
- package/dist/components/pull-to-refresh/pull-to-refresh-styles.js +14 -0
- package/dist/components/pull-to-refresh/pull-to-refresh-styles.js.map +1 -0
- package/dist/components/radio/RadioGroup.d.ts +121 -0
- package/dist/components/radio/RadioGroup.js +163 -0
- package/dist/components/radio/RadioGroup.js.map +1 -0
- package/dist/components/radio/radio-ring.js +21 -0
- package/dist/components/radio/radio-ring.js.map +1 -0
- package/dist/components/radio/radio-styles.d.ts +155 -0
- package/dist/components/radio/radio-styles.js +60 -0
- package/dist/components/radio/radio-styles.js.map +1 -0
- package/dist/components/radio/radio-tokens.d.ts +7 -0
- package/dist/components/radio/radio-tokens.js +31 -0
- package/dist/components/radio/radio-tokens.js.map +1 -0
- package/dist/components/search/SearchAppBar.d.ts +45 -0
- package/dist/components/search/SearchAppBar.js +61 -0
- package/dist/components/search/SearchAppBar.js.map +1 -0
- package/dist/components/search/SearchBar.d.ts +147 -0
- package/dist/components/search/SearchBar.js +412 -0
- package/dist/components/search/SearchBar.js.map +1 -0
- package/dist/components/search/search-styles.d.ts +243 -0
- package/dist/components/search/search-styles.js +143 -0
- package/dist/components/search/search-styles.js.map +1 -0
- package/dist/components/search/search-tokens.d.ts +9 -0
- package/dist/components/search/search-tokens.js +70 -0
- package/dist/components/search/search-tokens.js.map +1 -0
- package/dist/components/select/Select.d.ts +187 -0
- package/dist/components/select/Select.js +319 -0
- package/dist/components/select/Select.js.map +1 -0
- package/dist/components/select/field-shell.d.ts +29 -0
- package/dist/components/select/field-shell.js +135 -0
- package/dist/components/select/field-shell.js.map +1 -0
- package/dist/components/select/option-list.d.ts +81 -0
- package/dist/components/select/option-list.js +291 -0
- package/dist/components/select/option-list.js.map +1 -0
- package/dist/components/select/search-list.js +135 -0
- package/dist/components/select/search-list.js.map +1 -0
- package/dist/components/select/selection-cap.js +30 -0
- package/dist/components/select/selection-cap.js.map +1 -0
- package/dist/components/sheet/BottomSheet.d.ts +154 -0
- package/dist/components/sheet/BottomSheet.js +442 -0
- package/dist/components/sheet/BottomSheet.js.map +1 -0
- package/dist/components/sheet/SheetTrigger.d.ts +25 -0
- package/dist/components/sheet/SheetTrigger.js +46 -0
- package/dist/components/sheet/SheetTrigger.js.map +1 -0
- package/dist/components/sheet/SideSheet.d.ts +139 -0
- package/dist/components/sheet/SideSheet.js +289 -0
- package/dist/components/sheet/SideSheet.js.map +1 -0
- package/dist/components/sheet/bottom-sheet-gesture.js +30 -0
- package/dist/components/sheet/bottom-sheet-gesture.js.map +1 -0
- package/dist/components/sheet/lazy-bottom-sheet.js +33 -0
- package/dist/components/sheet/lazy-bottom-sheet.js.map +1 -0
- package/dist/components/sheet/sheet-gesture.js +48 -0
- package/dist/components/sheet/sheet-gesture.js.map +1 -0
- package/dist/components/sheet/sheet-icons.js +31 -0
- package/dist/components/sheet/sheet-icons.js.map +1 -0
- package/dist/components/sheet/sheet-settle.js +58 -0
- package/dist/components/sheet/sheet-settle.js.map +1 -0
- package/dist/components/sheet/sheet-styles.d.ts +312 -0
- package/dist/components/sheet/sheet-styles.js +229 -0
- package/dist/components/sheet/sheet-styles.js.map +1 -0
- package/dist/components/sheet/sheet-tokens.d.ts +12 -0
- package/dist/components/sheet/sheet-tokens.js +115 -0
- package/dist/components/sheet/sheet-tokens.js.map +1 -0
- package/dist/components/sheet/side-swipe-gesture.js +22 -0
- package/dist/components/sheet/side-swipe-gesture.js.map +1 -0
- package/dist/components/sheet/use-peek-inert.js +32 -0
- package/dist/components/sheet/use-peek-inert.js.map +1 -0
- package/dist/components/sheet/use-side-swipe.js +174 -0
- package/dist/components/sheet/use-side-swipe.js.map +1 -0
- package/dist/components/slider/Slider.d.ts +129 -0
- package/dist/components/slider/Slider.js +295 -0
- package/dist/components/slider/Slider.js.map +1 -0
- package/dist/components/slider/slider-geometry.js +138 -0
- package/dist/components/slider/slider-geometry.js.map +1 -0
- package/dist/components/slider/slider-styles.d.ts +133 -0
- package/dist/components/slider/slider-styles.js +97 -0
- package/dist/components/slider/slider-styles.js.map +1 -0
- package/dist/components/slider/slider-tokens.d.ts +7 -0
- package/dist/components/slider/slider-tokens.js +66 -0
- package/dist/components/slider/slider-tokens.js.map +1 -0
- package/dist/components/slider/use-touch-track.js +138 -0
- package/dist/components/slider/use-touch-track.js.map +1 -0
- package/dist/components/snackbar/Snackbar.d.ts +96 -0
- package/dist/components/snackbar/Snackbar.js +253 -0
- package/dist/components/snackbar/Snackbar.js.map +1 -0
- package/dist/components/snackbar/snackbar-state.d.ts +58 -0
- package/dist/components/snackbar/snackbar-state.js +73 -0
- package/dist/components/snackbar/snackbar-state.js.map +1 -0
- package/dist/components/snackbar/snackbar-styles.d.ts +109 -0
- package/dist/components/snackbar/snackbar-styles.js +67 -0
- package/dist/components/snackbar/snackbar-styles.js.map +1 -0
- package/dist/components/snackbar/snackbar-tokens.d.ts +7 -0
- package/dist/components/snackbar/snackbar-tokens.js +54 -0
- package/dist/components/snackbar/snackbar-tokens.js.map +1 -0
- package/dist/components/split-button/SplitButton.d.ts +109 -0
- package/dist/components/split-button/SplitButton.js +195 -0
- package/dist/components/split-button/SplitButton.js.map +1 -0
- package/dist/components/split-button/split-button-styles.d.ts +214 -0
- package/dist/components/split-button/split-button-styles.js +164 -0
- package/dist/components/split-button/split-button-styles.js.map +1 -0
- package/dist/components/split-button/split-button-tokens.d.ts +7 -0
- package/dist/components/split-button/split-button-tokens.js +36 -0
- package/dist/components/split-button/split-button-tokens.js.map +1 -0
- package/dist/components/switch/Switch.d.ts +82 -0
- package/dist/components/switch/Switch.js +165 -0
- package/dist/components/switch/Switch.js.map +1 -0
- package/dist/components/switch/switch-styles.d.ts +96 -0
- package/dist/components/switch/switch-styles.js +68 -0
- package/dist/components/switch/switch-styles.js.map +1 -0
- package/dist/components/switch/switch-thumb.js +41 -0
- package/dist/components/switch/switch-thumb.js.map +1 -0
- package/dist/components/switch/switch-tokens.d.ts +7 -0
- package/dist/components/switch/switch-tokens.js +78 -0
- package/dist/components/switch/switch-tokens.js.map +1 -0
- package/dist/components/tabs/Tabs.d.ts +120 -0
- package/dist/components/tabs/Tabs.js +346 -0
- package/dist/components/tabs/Tabs.js.map +1 -0
- package/dist/components/tabs/tabs-styles.d.ts +198 -0
- package/dist/components/tabs/tabs-styles.js +99 -0
- package/dist/components/tabs/tabs-styles.js.map +1 -0
- package/dist/components/tabs/tabs-tokens.d.ts +7 -0
- package/dist/components/tabs/tabs-tokens.js +121 -0
- package/dist/components/tabs/tabs-tokens.js.map +1 -0
- package/dist/components/text-field/TextField.d.ts +175 -0
- package/dist/components/text-field/TextField.js +250 -0
- package/dist/components/text-field/TextField.js.map +1 -0
- package/dist/components/text-field/text-field-styles.d.ts +252 -0
- package/dist/components/text-field/text-field-styles.js +209 -0
- package/dist/components/text-field/text-field-styles.js.map +1 -0
- package/dist/components/text-field/text-field-tokens.d.ts +7 -0
- package/dist/components/text-field/text-field-tokens.js +177 -0
- package/dist/components/text-field/text-field-tokens.js.map +1 -0
- package/dist/components/time-picker/TimePicker.d.ts +142 -0
- package/dist/components/time-picker/TimePicker.js +700 -0
- package/dist/components/time-picker/TimePicker.js.map +1 -0
- package/dist/components/time-picker/time-picker-styles.d.ts +175 -0
- package/dist/components/time-picker/time-picker-styles.js +112 -0
- package/dist/components/time-picker/time-picker-styles.js.map +1 -0
- package/dist/components/time-picker/time-picker-tokens.d.ts +7 -0
- package/dist/components/time-picker/time-picker-tokens.js +86 -0
- package/dist/components/time-picker/time-picker-tokens.js.map +1 -0
- package/dist/components/toolbar/Toolbar.d.ts +209 -0
- package/dist/components/toolbar/Toolbar.js +282 -0
- package/dist/components/toolbar/Toolbar.js.map +1 -0
- package/dist/components/toolbar/toolbar-styles.d.ts +403 -0
- package/dist/components/toolbar/toolbar-styles.js +253 -0
- package/dist/components/toolbar/toolbar-styles.js.map +1 -0
- package/dist/components/toolbar/toolbar-tokens.d.ts +27 -0
- package/dist/components/toolbar/toolbar-tokens.js +117 -0
- package/dist/components/toolbar/toolbar-tokens.js.map +1 -0
- package/dist/components/toolbar/use-toolbar-scroll-expansion.d.ts +56 -0
- package/dist/components/toolbar/use-toolbar-scroll-expansion.js +86 -0
- package/dist/components/toolbar/use-toolbar-scroll-expansion.js.map +1 -0
- package/dist/components/tooltip/Tooltip.d.ts +131 -0
- package/dist/components/tooltip/Tooltip.js +388 -0
- package/dist/components/tooltip/Tooltip.js.map +1 -0
- package/dist/components/tooltip/lazy-tooltip.js +35 -0
- package/dist/components/tooltip/lazy-tooltip.js.map +1 -0
- package/dist/components/tooltip/tooltip-placement.d.ts +16 -0
- package/dist/components/tooltip/tooltip-placement.js +14 -0
- package/dist/components/tooltip/tooltip-placement.js.map +1 -0
- package/dist/components/tooltip/tooltip-styles.d.ts +142 -0
- package/dist/components/tooltip/tooltip-styles.js +81 -0
- package/dist/components/tooltip/tooltip-styles.js.map +1 -0
- package/dist/components/tooltip/tooltip-tokens.d.ts +9 -0
- package/dist/components/tooltip/tooltip-tokens.js +72 -0
- package/dist/components/tooltip/tooltip-tokens.js.map +1 -0
- package/dist/components/tooltip/tooltip-trigger.d.ts +42 -0
- package/dist/components/tooltip/tooltip-trigger.js +115 -0
- package/dist/components/tooltip/tooltip-trigger.js.map +1 -0
- package/dist/composites/button-group/ButtonGroup.d.ts +116 -0
- package/dist/composites/button-group/ButtonGroup.js +270 -0
- package/dist/composites/button-group/ButtonGroup.js.map +1 -0
- package/dist/composites/button-group/button-group-styles.d.ts +73 -0
- package/dist/composites/button-group/button-group-styles.js +87 -0
- package/dist/composites/button-group/button-group-styles.js.map +1 -0
- package/dist/composites/button-group/lazy-overflow-menu.js +43 -0
- package/dist/composites/button-group/lazy-overflow-menu.js.map +1 -0
- package/dist/composites/button-group/overflow-menu-list.js +26 -0
- package/dist/composites/button-group/overflow-menu-list.js.map +1 -0
- package/dist/composites/button-group/use-overflow.js +75 -0
- package/dist/composites/button-group/use-overflow.js.map +1 -0
- package/dist/composites/button-group/use-press-expansion.js +155 -0
- package/dist/composites/button-group/use-press-expansion.js.map +1 -0
- package/dist/index.d.ts +142 -0
- package/dist/index.js +136 -0
- package/dist/motion/get-m3-spring.d.ts +6 -0
- package/dist/motion/get-m3-spring.js +10 -0
- package/dist/motion/get-m3-spring.js.map +1 -0
- package/dist/motion/reduced-motion.js +19 -0
- package/dist/motion/reduced-motion.js.map +1 -0
- package/dist/motion/use-m3-spring.d.ts +13 -0
- package/dist/motion/use-m3-spring.js +22 -0
- package/dist/motion/use-m3-spring.js.map +1 -0
- package/dist/next/NextRouterProvider.d.ts +13 -0
- package/dist/next/NextRouterProvider.js +26 -0
- package/dist/next/NextRouterProvider.js.map +1 -0
- package/dist/next/get-theme-from-cookies.d.ts +32 -0
- package/dist/next/get-theme-from-cookies.js +27 -0
- package/dist/next/get-theme-from-cookies.js.map +1 -0
- package/dist/next/navigation-guard.d.ts +30 -0
- package/dist/next/navigation-guard.js +68 -0
- package/dist/next/navigation-guard.js.map +1 -0
- package/dist/next.d.ts +5 -0
- package/dist/next.js +5 -0
- package/dist/primitives/ButtonBase.d.ts +115 -0
- package/dist/primitives/ButtonBase.js +231 -0
- package/dist/primitives/ButtonBase.js.map +1 -0
- package/dist/primitives/DomDirectionLocale.d.ts +18 -0
- package/dist/primitives/DomDirectionLocale.js +28 -0
- package/dist/primitives/DomDirectionLocale.js.map +1 -0
- package/dist/primitives/Field.d.ts +50 -0
- package/dist/primitives/Field.js +74 -0
- package/dist/primitives/Field.js.map +1 -0
- package/dist/primitives/IconFaces.js +23 -0
- package/dist/primitives/IconFaces.js.map +1 -0
- package/dist/primitives/Overlay.d.ts +39 -0
- package/dist/primitives/Overlay.js +86 -0
- package/dist/primitives/Overlay.js.map +1 -0
- package/dist/primitives/SelectionControl.d.ts +55 -0
- package/dist/primitives/SelectionControl.js +58 -0
- package/dist/primitives/SelectionControl.js.map +1 -0
- package/dist/primitives/Surface.d.ts +123 -0
- package/dist/primitives/Surface.js +68 -0
- package/dist/primitives/Surface.js.map +1 -0
- package/dist/primitives/ToolbarContext.js +12 -0
- package/dist/primitives/ToolbarContext.js.map +1 -0
- package/dist/primitives/TouchTarget.d.ts +14 -0
- package/dist/primitives/TouchTarget.js +20 -0
- package/dist/primitives/TouchTarget.js.map +1 -0
- package/dist/primitives/TriggerContext.d.ts +34 -0
- package/dist/primitives/TriggerContext.js +24 -0
- package/dist/primitives/TriggerContext.js.map +1 -0
- package/dist/primitives/hidden-input-focus.js +27 -0
- package/dist/primitives/hidden-input-focus.js.map +1 -0
- package/dist/primitives/icon-faces-styles.d.ts +9 -0
- package/dist/primitives/icon-faces-styles.js +45 -0
- package/dist/primitives/icon-faces-styles.js.map +1 -0
- package/dist/primitives/locale-with-direction.d.ts +9 -0
- package/dist/primitives/locale-with-direction.js +17 -0
- package/dist/primitives/locale-with-direction.js.map +1 -0
- package/dist/primitives/morph-path.d.ts +25 -0
- package/dist/primitives/morph-path.js +38 -0
- package/dist/primitives/morph-path.js.map +1 -0
- package/dist/primitives/selection-control-styles.d.ts +54 -0
- package/dist/primitives/selection-control-styles.js +44 -0
- package/dist/primitives/selection-control-styles.js.map +1 -0
- package/dist/primitives/use-m3-interaction.d.ts +51 -0
- package/dist/primitives/use-m3-interaction.js +149 -0
- package/dist/primitives/use-m3-interaction.js.map +1 -0
- package/dist/primitives/use-m3-morph.d.ts +18 -0
- package/dist/primitives/use-m3-morph.js +36 -0
- package/dist/primitives/use-m3-morph.js.map +1 -0
- package/dist/primitives/use-presence.d.ts +19 -0
- package/dist/primitives/use-presence.js +37 -0
- package/dist/primitives/use-presence.js.map +1 -0
- package/dist/primitives.d.ts +36 -0
- package/dist/primitives.js +34 -0
- package/dist/shapes/corner-rounding.d.ts +13 -0
- package/dist/shapes/corner-rounding.js +18 -0
- package/dist/shapes/corner-rounding.js.map +1 -0
- package/dist/shapes/cubic.d.ts +52 -0
- package/dist/shapes/cubic.js +189 -0
- package/dist/shapes/cubic.js.map +1 -0
- package/dist/shapes/feature-mapping.js +80 -0
- package/dist/shapes/feature-mapping.js.map +1 -0
- package/dist/shapes/features.d.ts +23 -0
- package/dist/shapes/features.js +82 -0
- package/dist/shapes/features.js.map +1 -0
- package/dist/shapes/float-mapping.js +65 -0
- package/dist/shapes/float-mapping.js.map +1 -0
- package/dist/shapes/generated/material-shape-path-record.d.ts +11 -0
- package/dist/shapes/generated/material-shape-path-record.js +48 -0
- package/dist/shapes/generated/material-shape-path-record.js.map +1 -0
- package/dist/shapes/generated/material-shape-paths.d.ts +78 -0
- package/dist/shapes/generated/material-shape-paths.js +218 -0
- package/dist/shapes/generated/material-shape-paths.js.map +1 -0
- package/dist/shapes/mask.d.ts +14 -0
- package/dist/shapes/mask.js +24 -0
- package/dist/shapes/mask.js.map +1 -0
- package/dist/shapes/material-shapes.d.ts +11 -0
- package/dist/shapes/material-shapes.js +250 -0
- package/dist/shapes/material-shapes.js.map +1 -0
- package/dist/shapes/morph.d.ts +25 -0
- package/dist/shapes/morph.js +97 -0
- package/dist/shapes/morph.js.map +1 -0
- package/dist/shapes/path.d.ts +33 -0
- package/dist/shapes/path.js +47 -0
- package/dist/shapes/path.js.map +1 -0
- package/dist/shapes/point.d.ts +28 -0
- package/dist/shapes/point.js +103 -0
- package/dist/shapes/point.js.map +1 -0
- package/dist/shapes/polygon-measure.js +140 -0
- package/dist/shapes/polygon-measure.js.map +1 -0
- package/dist/shapes/rounded-polygon.d.ts +44 -0
- package/dist/shapes/rounded-polygon.js +278 -0
- package/dist/shapes/rounded-polygon.js.map +1 -0
- package/dist/shapes/shape-path.d.ts +15 -0
- package/dist/shapes/shapes.d.ts +53 -0
- package/dist/shapes/shapes.js +171 -0
- package/dist/shapes/shapes.js.map +1 -0
- package/dist/styles/generated/components.css +710 -0
- package/dist/styles/generated/theme.css +247 -0
- package/dist/styles/generated/themes.css +3361 -0
- package/dist/styles/generated/tokens.css +284 -0
- package/dist/styles/styles.css +15 -0
- package/dist/styles/utilities.css +283 -0
- package/dist/styles.compiled.css +2 -0
- package/dist/theme/ThemeProvider.d.ts +72 -0
- package/dist/theme/ThemeProvider.js +144 -0
- package/dist/theme/ThemeProvider.js.map +1 -0
- package/dist/theme/ThemeScope.d.ts +32 -0
- package/dist/theme/ThemeScope.js +67 -0
- package/dist/theme/ThemeScope.js.map +1 -0
- package/dist/theme/ThemeScript.d.ts +26 -0
- package/dist/theme/ThemeScript.js +44 -0
- package/dist/theme/ThemeScript.js.map +1 -0
- package/dist/theme/context.d.ts +32 -0
- package/dist/theme/context.js +47 -0
- package/dist/theme/context.js.map +1 -0
- package/dist/theme/create-theme.d.ts +60 -0
- package/dist/theme/create-theme.js +47 -0
- package/dist/theme/create-theme.js.map +1 -0
- package/dist/theme/css.js +54 -0
- package/dist/theme/css.js.map +1 -0
- package/dist/theme/parse-palettes.js +40 -0
- package/dist/theme/parse-palettes.js.map +1 -0
- package/dist/theme/scheme.d.ts +6 -0
- package/dist/theme/scheme.js +118 -0
- package/dist/theme/scheme.js.map +1 -0
- package/dist/theme/state.d.ts +38 -0
- package/dist/theme/state.js +93 -0
- package/dist/theme/state.js.map +1 -0
- package/dist/theme/storage.js +21 -0
- package/dist/theme/storage.js.map +1 -0
- package/dist/tokens/breakpoints.d.ts +15 -0
- package/dist/tokens/breakpoints.js +16 -0
- package/dist/tokens/breakpoints.js.map +1 -0
- package/dist/tokens/color.d.ts +104 -0
- package/dist/tokens/color.js +147 -0
- package/dist/tokens/color.js.map +1 -0
- package/dist/tokens/component.d.ts +110 -0
- package/dist/tokens/component.js +67 -0
- package/dist/tokens/component.js.map +1 -0
- package/dist/tokens/density.d.ts +20 -0
- package/dist/tokens/density.js +27 -0
- package/dist/tokens/density.js.map +1 -0
- package/dist/tokens/elevation.d.ts +44 -0
- package/dist/tokens/elevation.js +45 -0
- package/dist/tokens/elevation.js.map +1 -0
- package/dist/tokens/motion.d.ts +79 -0
- package/dist/tokens/motion.js +126 -0
- package/dist/tokens/motion.js.map +1 -0
- package/dist/tokens/shape.d.ts +22 -0
- package/dist/tokens/shape.js +22 -0
- package/dist/tokens/shape.js.map +1 -0
- package/dist/tokens/spring-velocity.d.ts +19 -0
- package/dist/tokens/spring-velocity.js +44 -0
- package/dist/tokens/spring-velocity.js.map +1 -0
- package/dist/tokens/state.d.ts +18 -0
- package/dist/tokens/state.js +19 -0
- package/dist/tokens/state.js.map +1 -0
- package/dist/tokens/typography.d.ts +64 -0
- package/dist/tokens/typography.js +60 -0
- package/dist/tokens/typography.js.map +1 -0
- package/dist/tokens/z-index.d.ts +17 -0
- package/dist/tokens/z-index.js +18 -0
- package/dist/tokens/z-index.js.map +1 -0
- package/dist/utils/announce.js +51 -0
- package/dist/utils/announce.js.map +1 -0
- package/dist/utils/assert-collection-children.js +26 -0
- package/dist/utils/assert-collection-children.js.map +1 -0
- package/dist/utils/closed-by.d.ts +9 -0
- package/dist/utils/closed-by.js +12 -0
- package/dist/utils/closed-by.js.map +1 -0
- package/dist/utils/cn.d.ts +31 -0
- package/dist/utils/cn.js +37 -0
- package/dist/utils/cn.js.map +1 -0
- package/dist/utils/composite-keys.js +32 -0
- package/dist/utils/composite-keys.js.map +1 -0
- package/dist/utils/focus-visible.js +14 -0
- package/dist/utils/focus-visible.js.map +1 -0
- package/dist/utils/focus.js +51 -0
- package/dist/utils/focus.js.map +1 -0
- package/dist/utils/focusable-disabled.js +12 -0
- package/dist/utils/focusable-disabled.js.map +1 -0
- package/dist/utils/keep-pressed-in-place.d.ts +60 -0
- package/dist/utils/keep-pressed-in-place.js +127 -0
- package/dist/utils/keep-pressed-in-place.js.map +1 -0
- package/dist/utils/load-on-demand.js +111 -0
- package/dist/utils/load-on-demand.js.map +1 -0
- package/dist/utils/merge-data-tokens.d.ts +9 -0
- package/dist/utils/merge-data-tokens.js +15 -0
- package/dist/utils/merge-data-tokens.js.map +1 -0
- package/dist/utils/natural-size.js +53 -0
- package/dist/utils/natural-size.js.map +1 -0
- package/dist/utils/nearest-reveal.js +28 -0
- package/dist/utils/nearest-reveal.js.map +1 -0
- package/dist/utils/placement.js +14 -0
- package/dist/utils/placement.js.map +1 -0
- package/dist/utils/radio-group-keys.js +74 -0
- package/dist/utils/radio-group-keys.js.map +1 -0
- package/dist/utils/rendered-description.js +17 -0
- package/dist/utils/rendered-description.js.map +1 -0
- package/dist/utils/root-props.d.ts +103 -0
- package/dist/utils/root-props.js +51 -0
- package/dist/utils/root-props.js.map +1 -0
- package/dist/utils/search.d.ts +11 -0
- package/dist/utils/search.js +18 -0
- package/dist/utils/search.js.map +1 -0
- package/dist/utils/shortcut.js +20 -0
- package/dist/utils/shortcut.js.map +1 -0
- package/dist/utils/split-data-attributes.d.ts +12 -0
- package/dist/utils/split-data-attributes.js +20 -0
- package/dist/utils/split-data-attributes.js.map +1 -0
- package/dist/utils/toolbar-keys.js +28 -0
- package/dist/utils/toolbar-keys.js.map +1 -0
- package/dist/utils/tv.d.ts +7 -0
- package/dist/utils/tv.js +9 -0
- package/dist/utils/tv.js.map +1 -0
- package/dist/utils/typeahead.js +64 -0
- package/dist/utils/typeahead.js.map +1 -0
- package/dist/utils/warn-once.js +30 -0
- package/dist/utils/warn-once.js.map +1 -0
- package/dist/vendor/material-color-utilities/blend/blend.js +88 -0
- package/dist/vendor/material-color-utilities/blend/blend.js.map +1 -0
- package/dist/vendor/material-color-utilities/contrast/contrast.js +131 -0
- package/dist/vendor/material-color-utilities/contrast/contrast.js.map +1 -0
- package/dist/vendor/material-color-utilities/dislike/dislike_analyzer.js +58 -0
- package/dist/vendor/material-color-utilities/dislike/dislike_analyzer.js.map +1 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/color_spec_2021.js +620 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/color_spec_2021.js.map +1 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/color_spec_2025.js +786 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/color_spec_2025.js.map +1 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/contrast_curve.js +59 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/contrast_curve.js.map +1 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/dynamic_color.js +420 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/dynamic_color.js.map +1 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/dynamic_scheme.js +701 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/dynamic_scheme.js.map +1 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/material_dynamic_colors.js +374 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/material_dynamic_colors.js.map +1 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/tone_delta_pair.js +65 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/tone_delta_pair.js.map +1 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/variant.js +38 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/variant.js.map +1 -0
- package/dist/vendor/material-color-utilities/hct/cam16.js +309 -0
- package/dist/vendor/material-color-utilities/hct/cam16.js.map +1 -0
- package/dist/vendor/material-color-utilities/hct/hct.js +148 -0
- package/dist/vendor/material-color-utilities/hct/hct.js.map +1 -0
- package/dist/vendor/material-color-utilities/hct/hct_solver.js +660 -0
- package/dist/vendor/material-color-utilities/hct/hct_solver.js.map +1 -0
- package/dist/vendor/material-color-utilities/hct/viewing_conditions.js +117 -0
- package/dist/vendor/material-color-utilities/hct/viewing_conditions.js.map +1 -0
- package/dist/vendor/material-color-utilities/index.js +51 -0
- package/dist/vendor/material-color-utilities/index.js.map +1 -0
- package/dist/vendor/material-color-utilities/palettes/core_palette.js +22 -0
- package/dist/vendor/material-color-utilities/palettes/core_palette.js.map +1 -0
- package/dist/vendor/material-color-utilities/palettes/tonal_palette.js +134 -0
- package/dist/vendor/material-color-utilities/palettes/tonal_palette.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme.js +21 -0
- package/dist/vendor/material-color-utilities/scheme/scheme.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_android.js +21 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_android.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_content.js +22 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_content.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_expressive.js +38 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_expressive.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_fidelity.js +22 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_fidelity.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_fruit_salad.js +22 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_fruit_salad.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_monochrome.js +22 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_monochrome.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_neutral.js +36 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_neutral.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_rainbow.js +22 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_rainbow.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_tonal_spot.js +41 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_tonal_spot.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_vibrant.js +39 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_vibrant.js.map +1 -0
- package/dist/vendor/material-color-utilities/score/score.js +115 -0
- package/dist/vendor/material-color-utilities/score/score.js.map +1 -0
- package/dist/vendor/material-color-utilities/temperature/temperature_cache.js +227 -0
- package/dist/vendor/material-color-utilities/temperature/temperature_cache.js.map +1 -0
- package/dist/vendor/material-color-utilities/utils/color_utils.js +246 -0
- package/dist/vendor/material-color-utilities/utils/color_utils.js.map +1 -0
- package/dist/vendor/material-color-utilities/utils/image_utils.js +21 -0
- package/dist/vendor/material-color-utilities/utils/image_utils.js.map +1 -0
- package/dist/vendor/material-color-utilities/utils/math_utils.js +119 -0
- package/dist/vendor/material-color-utilities/utils/math_utils.js.map +1 -0
- package/dist/vendor/material-color-utilities/utils/string_utils.js +74 -0
- package/dist/vendor/material-color-utilities/utils/string_utils.js.map +1 -0
- package/dist/vendor/material-color-utilities/utils/theme_utils.js +24 -0
- package/dist/vendor/material-color-utilities/utils/theme_utils.js.map +1 -0
- package/package.json +114 -3
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import { ButtonBaseActionProps, ButtonBaseLinkProps } from "../../primitives/ButtonBase.js";
|
|
2
|
+
import { IconTransition } from "../../primitives/icon-faces-styles.js";
|
|
3
|
+
import { FabElevation } from "../fab/fab-styles.js";
|
|
4
|
+
import { DockedToolbarArrangement, DockedToolbarColor, FloatingToolbarColor, ToolbarExitEdge, ToolbarOrientation } from "./toolbar-styles.js";
|
|
5
|
+
import { ComponentPropsWithRef, ReactElement, ReactNode } from "react";
|
|
6
|
+
//#region src/components/toolbar/Toolbar.d.ts
|
|
7
|
+
type Naming = {
|
|
8
|
+
/** Accessible name for the toolbar. Required unless `aria-labelledby` is set. */
|
|
9
|
+
'aria-label': string;
|
|
10
|
+
} | {
|
|
11
|
+
/** The id of the element that names the toolbar. Required unless `aria-label` is set. */
|
|
12
|
+
'aria-labelledby': string;
|
|
13
|
+
};
|
|
14
|
+
type DivProps<Own> = Omit<ComponentPropsWithRef<'div'>, keyof Own | 'aria-label' | 'aria-labelledby' | 'color'>;
|
|
15
|
+
export interface DockedToolbarClassNames {
|
|
16
|
+
/** The toolbar's container, merged with `className`. */
|
|
17
|
+
root?: string;
|
|
18
|
+
}
|
|
19
|
+
interface DockedToolbarOwnProps {
|
|
20
|
+
/**
|
|
21
|
+
* Centre the items 32px apart (M3's default), or spread them across the toolbar, which
|
|
22
|
+
* M3 recommends in compact windows. @default "centered"
|
|
23
|
+
*/
|
|
24
|
+
arrangement?: DockedToolbarArrangement;
|
|
25
|
+
/**
|
|
26
|
+
* The container colour: `standard` (`surface-container`) or `vibrant`
|
|
27
|
+
* (`primary-container`), as the floating toolbar's. @default "standard"
|
|
28
|
+
*/
|
|
29
|
+
color?: DockedToolbarColor;
|
|
30
|
+
/**
|
|
31
|
+
* Shows the toolbar. Hiding it slides it off the bottom of the window, e.g. while the
|
|
32
|
+
* page scrolls (`useToolbarScrollExit`). A hidden toolbar is `inert`. @default true
|
|
33
|
+
*/
|
|
34
|
+
visible?: boolean;
|
|
35
|
+
/** The toolbar's controls, e.g. icon buttons, buttons or a FAB. */
|
|
36
|
+
children: ReactNode;
|
|
37
|
+
/** Classes for each part, by slot. */
|
|
38
|
+
classNames?: DockedToolbarClassNames;
|
|
39
|
+
}
|
|
40
|
+
export type DockedToolbarProps = DockedToolbarOwnProps & Naming & DivProps<DockedToolbarOwnProps>;
|
|
41
|
+
/**
|
|
42
|
+
* M3 Expressive docked toolbar: a full-width 64px bar of actions, usually along the bottom
|
|
43
|
+
* of the window (it replaces the bottom app bar). Tab and the arrow keys move between its
|
|
44
|
+
* controls (M3).
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* <DockedToolbar aria-label="Message actions" className="fixed inset-x-0 bottom-0">
|
|
48
|
+
* <IconButton icon={<ArchiveIcon />} aria-label="Archive" />
|
|
49
|
+
* <IconButton icon={<DeleteIcon />} aria-label="Delete" />
|
|
50
|
+
* </DockedToolbar>
|
|
51
|
+
*/
|
|
52
|
+
export declare function DockedToolbar(props: DockedToolbarProps): import("react").JSX.Element;
|
|
53
|
+
export interface FloatingToolbarClassNames {
|
|
54
|
+
/** The outer container, merged with `className`. */
|
|
55
|
+
root?: string;
|
|
56
|
+
/** The main content group. */
|
|
57
|
+
items?: string;
|
|
58
|
+
/** The group of `leading` controls. */
|
|
59
|
+
leading?: string;
|
|
60
|
+
/** The group of `trailing` controls. */
|
|
61
|
+
trailing?: string;
|
|
62
|
+
/** The toolbar's surface when it has a FAB. */
|
|
63
|
+
surface?: string;
|
|
64
|
+
/** The box the FAB fills (56px, 80px while collapsed). */
|
|
65
|
+
fab?: string;
|
|
66
|
+
}
|
|
67
|
+
interface FloatingToolbarBaseProps {
|
|
68
|
+
/** Lay the controls out in a row, or in a column at a window edge. @default "horizontal" */
|
|
69
|
+
orientation?: ToolbarOrientation;
|
|
70
|
+
/**
|
|
71
|
+
* The container colour: `standard` (`surface-container`) or `vibrant`
|
|
72
|
+
* (`primary-container`). @default "standard"
|
|
73
|
+
*/
|
|
74
|
+
color?: FloatingToolbarColor;
|
|
75
|
+
/**
|
|
76
|
+
* Level 1 elevation, which M3 gives floating toolbars by default. Remove it when the
|
|
77
|
+
* content beneath is visually distinct. @default true
|
|
78
|
+
*/
|
|
79
|
+
elevated?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Shows the leading and trailing content, or (with a FAB) the toolbar itself. Collapse
|
|
82
|
+
* it while the page scrolls, e.g. with `useToolbarScrollExpansion`. Collapsed controls
|
|
83
|
+
* stay in the tab order and the accessibility tree, and keyboard focus inside the
|
|
84
|
+
* toolbar expands it, so every control stays reachable. @default true
|
|
85
|
+
*/
|
|
86
|
+
expanded?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Shows the toolbar. Hiding it slides it off `exitEdge`, e.g. while the page scrolls
|
|
89
|
+
* (`useToolbarScrollExit`). A hidden toolbar is `inert`. Don't combine it with
|
|
90
|
+
* collapsing: M3 says a toolbar shouldn't both collapse and leave the screen.
|
|
91
|
+
* @default true
|
|
92
|
+
*/
|
|
93
|
+
visible?: boolean;
|
|
94
|
+
/** The window edge a hidden toolbar slides past (logical). @default "bottom" */
|
|
95
|
+
exitEdge?: ToolbarExitEdge;
|
|
96
|
+
/** The main controls, always shown. */
|
|
97
|
+
children: ReactNode;
|
|
98
|
+
/** Classes for each part, by slot. */
|
|
99
|
+
classNames?: FloatingToolbarClassNames;
|
|
100
|
+
}
|
|
101
|
+
type FloatingToolbarContent = {
|
|
102
|
+
/** Controls before the main content, hidden while collapsed. */
|
|
103
|
+
leading?: ReactNode;
|
|
104
|
+
/** Controls after the main content, hidden while collapsed. */
|
|
105
|
+
trailing?: ReactNode;
|
|
106
|
+
fab?: undefined;
|
|
107
|
+
fabPlacement?: undefined;
|
|
108
|
+
} | {
|
|
109
|
+
leading?: undefined;
|
|
110
|
+
trailing?: undefined;
|
|
111
|
+
/**
|
|
112
|
+
* A FAB beside the toolbar, usually a {@link ToolbarFab}. Collapsing hides the
|
|
113
|
+
* toolbar and grows the FAB from 56px to 80px.
|
|
114
|
+
*/
|
|
115
|
+
fab: ReactElement;
|
|
116
|
+
/**
|
|
117
|
+
* Side of the toolbar the FAB sits on. `top` is the same as `start` and `bottom` as
|
|
118
|
+
* `end`, so the value can stay put when the orientation changes. @default "end"
|
|
119
|
+
*/
|
|
120
|
+
fabPlacement?: 'start' | 'end' | 'top' | 'bottom';
|
|
121
|
+
};
|
|
122
|
+
type FloatingToolbarOwnProps = FloatingToolbarBaseProps & FloatingToolbarContent;
|
|
123
|
+
export type FloatingToolbarProps = FloatingToolbarOwnProps & Naming & DivProps<FloatingToolbarBaseProps & Record<'leading' | 'trailing' | 'fab' | 'fabPlacement', unknown>>;
|
|
124
|
+
/**
|
|
125
|
+
* M3 Expressive floating toolbar: a pill of controls that floats above the content,
|
|
126
|
+
* horizontal or vertical, in standard or vibrant colours. Leading and trailing content
|
|
127
|
+
* collapse with `expanded`; or pair it with a FAB, and collapsing hides the toolbar while
|
|
128
|
+
* the FAB grows. Tab and the arrow keys move between its
|
|
129
|
+
* controls (M3).
|
|
130
|
+
*
|
|
131
|
+
* @example
|
|
132
|
+
* <FloatingToolbar aria-label="Formatting" expanded={expanded} className="fixed bottom-4 start-1/2"
|
|
133
|
+
* leading={<IconButton icon={<UndoIcon />} aria-label="Undo" />}>
|
|
134
|
+
* <IconButton toggle icon={<BoldIcon />} aria-label="Bold" />
|
|
135
|
+
* </FloatingToolbar>
|
|
136
|
+
*
|
|
137
|
+
* <FloatingToolbar aria-label="Actions" fab={<ToolbarFab icon={<AddIcon />} aria-label="New" />}>
|
|
138
|
+
* <IconButton icon={<SearchIcon />} aria-label="Search" />
|
|
139
|
+
* </FloatingToolbar>
|
|
140
|
+
*/
|
|
141
|
+
export declare function FloatingToolbar(props: FloatingToolbarProps): import("react").JSX.Element;
|
|
142
|
+
export interface ToolbarFabClassNames {
|
|
143
|
+
/** The FAB's button, merged with `className`. */
|
|
144
|
+
root?: string;
|
|
145
|
+
/** The icon. */
|
|
146
|
+
icon?: string;
|
|
147
|
+
/** The built-in plain tooltip that shows the label (`tooltip`). */
|
|
148
|
+
tooltip?: string;
|
|
149
|
+
}
|
|
150
|
+
type AccessibleName = {
|
|
151
|
+
/** Accessible name for the FAB, also its tooltip. Required unless `aria-labelledby` is set. */
|
|
152
|
+
'aria-label': string;
|
|
153
|
+
/** The id of the element that names the FAB. */
|
|
154
|
+
'aria-labelledby'?: string;
|
|
155
|
+
} | {
|
|
156
|
+
/** Accessible name for the FAB, also its tooltip. */
|
|
157
|
+
'aria-label'?: string;
|
|
158
|
+
/** The id of the element that names the FAB. Required unless `aria-label` is set. */
|
|
159
|
+
'aria-labelledby': string;
|
|
160
|
+
};
|
|
161
|
+
interface ToolbarFabOwnProps {
|
|
162
|
+
/**
|
|
163
|
+
* The icon (while the toolbar is collapsed, when `expandedIcon` is set). Hidden from
|
|
164
|
+
* assistive tech; `aria-label` names the FAB.
|
|
165
|
+
*/
|
|
166
|
+
icon: ReactElement;
|
|
167
|
+
/**
|
|
168
|
+
* The icon while the toolbar is expanded, e.g. "close" for a FAB that collapses the
|
|
169
|
+
* toolbar. Without it, the FAB always shows `icon`.
|
|
170
|
+
*/
|
|
171
|
+
expandedIcon?: ReactElement;
|
|
172
|
+
/**
|
|
173
|
+
* How the FAB hands over between `icon` and `expandedIcon`: `swap` halfway through the
|
|
174
|
+
* toolbar's expand / collapse spring, or `rotate`, where the outgoing icon turns 90° and
|
|
175
|
+
* fades out while the incoming one turns in and fades in. `rotate` goes beyond the M3
|
|
176
|
+
* spec; it matches Google's Expressive showcase motion. It mirrors in RTL, and reduced
|
|
177
|
+
* motion keeps only the crossfade. Only used with `expandedIcon`. @default "swap"
|
|
178
|
+
*/
|
|
179
|
+
iconTransition?: IconTransition;
|
|
180
|
+
/**
|
|
181
|
+
* The FAB's colour scheme. Defaults to the toolbar's colour: `primary-container`
|
|
182
|
+
* (standard) or `tertiary-container` (vibrant).
|
|
183
|
+
* @default the toolbar's color, or "standard" outside a toolbar
|
|
184
|
+
*/
|
|
185
|
+
color?: FloatingToolbarColor;
|
|
186
|
+
/**
|
|
187
|
+
* Shows `aria-label` in a plain tooltip on hover and keyboard focus, as M3 asks of FABs
|
|
188
|
+
* on the web. @default true
|
|
189
|
+
*/
|
|
190
|
+
tooltip?: boolean;
|
|
191
|
+
/**
|
|
192
|
+
* As on `Fab`: level 2 by default (hover 3), `lowered` level 1, or `flat` level 0.
|
|
193
|
+
* @default "default"
|
|
194
|
+
*/
|
|
195
|
+
elevation?: FabElevation;
|
|
196
|
+
/** Classes for each part, by slot. */
|
|
197
|
+
classNames?: ToolbarFabClassNames;
|
|
198
|
+
}
|
|
199
|
+
type OmitToolbarFab<T> = Omit<T, keyof ToolbarFabOwnProps | 'children' | 'disabled' | 'toggle' | 'aria-label' | 'aria-labelledby'>;
|
|
200
|
+
export type ToolbarFabProps = ToolbarFabOwnProps & AccessibleName & (OmitToolbarFab<ButtonBaseActionProps> | OmitToolbarFab<ButtonBaseLinkProps>);
|
|
201
|
+
/**
|
|
202
|
+
* The FAB of a {@link FloatingToolbar} (Compose's `StandardFloatingActionButton` /
|
|
203
|
+
* `VibrantFloatingActionButton`): it fills the toolbar's FAB box, 56px or 80px while the
|
|
204
|
+
* toolbar is collapsed, with 16px corners at level 2. With `expandedIcon` it shows that
|
|
205
|
+
* icon while the toolbar is expanded and `icon` while it is collapsed.
|
|
206
|
+
*/
|
|
207
|
+
export declare function ToolbarFab({ icon, expandedIcon, iconTransition, color, tooltip, elevation, classNames, className, ...base }: ToolbarFabProps): import("react").JSX.Element;
|
|
208
|
+
//#endregion
|
|
209
|
+
//# sourceMappingURL=Toolbar.d.ts.map
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../utils/cn.js";
|
|
3
|
+
import { ButtonBase } from "../../primitives/ButtonBase.js";
|
|
4
|
+
import { ButtonContext, standardIconButtons } from "../button/ButtonContext.js";
|
|
5
|
+
import { mergeDataTokens } from "../../utils/merge-data-tokens.js";
|
|
6
|
+
import { iconFacesStyles } from "../../primitives/icon-faces-styles.js";
|
|
7
|
+
import { IconFaces } from "../../primitives/IconFaces.js";
|
|
8
|
+
import { useWarnOnce } from "../../utils/warn-once.js";
|
|
9
|
+
import { ToolbarContext } from "../../primitives/ToolbarContext.js";
|
|
10
|
+
import { TooltipTrigger, WithoutDescription } from "../tooltip/tooltip-trigger.js";
|
|
11
|
+
import { LazyTooltip } from "../tooltip/lazy-tooltip.js";
|
|
12
|
+
import { DomDirectionLocale } from "../../primitives/DomDirectionLocale.js";
|
|
13
|
+
import { toolbarKeyDown } from "../../utils/toolbar-keys.js";
|
|
14
|
+
import { useNaturalSize } from "../../utils/natural-size.js";
|
|
15
|
+
import { dockedToolbarStyles, floatingToolbarStyles, toolbarCollapseAnchor, toolbarFabStyles } from "./toolbar-styles.js";
|
|
16
|
+
import { useContext, useMemo, useState } from "react";
|
|
17
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
18
|
+
import { mergeProps, mergeRefs, useFocusRing, useObjectRef, useToolbar } from "react-aria";
|
|
19
|
+
//#region src/components/toolbar/Toolbar.tsx
|
|
20
|
+
const DOCKED = {
|
|
21
|
+
standard: {
|
|
22
|
+
kind: "docked",
|
|
23
|
+
color: "standard"
|
|
24
|
+
},
|
|
25
|
+
vibrant: {
|
|
26
|
+
kind: "docked",
|
|
27
|
+
color: "vibrant"
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
/** The `data-*` and `inert` attributes of a toolbar that has exited the screen. */
|
|
31
|
+
const exitProps = (visible) => ({
|
|
32
|
+
"data-hidden": visible ? void 0 : true,
|
|
33
|
+
inert: !visible || void 0
|
|
34
|
+
});
|
|
35
|
+
/** Applies React Aria's toolbar behaviour (role, arrow keys) with the DOM's direction. */
|
|
36
|
+
function useToolbarRoot(ref, directionRef, props) {
|
|
37
|
+
const merged = useMemo(() => mergeRefs(ref, directionRef), [ref, directionRef]);
|
|
38
|
+
const rootRef = useObjectRef(merged);
|
|
39
|
+
const { toolbarProps: aria } = useToolbar(props, rootRef);
|
|
40
|
+
const { orientation } = props;
|
|
41
|
+
const nested = aria.onKeyDownCapture === void 0;
|
|
42
|
+
return {
|
|
43
|
+
rootRef,
|
|
44
|
+
toolbarProps: {
|
|
45
|
+
...aria,
|
|
46
|
+
onFocusCapture: void 0,
|
|
47
|
+
onBlurCapture: void 0,
|
|
48
|
+
onKeyDownCapture: nested ? void 0 : (event) => void toolbarKeyDown(event, orientation)
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* M3 Expressive docked toolbar: a full-width 64px bar of actions, usually along the bottom
|
|
54
|
+
* of the window (it replaces the bottom app bar). Tab and the arrow keys move between its
|
|
55
|
+
* controls (M3).
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* <DockedToolbar aria-label="Message actions" className="fixed inset-x-0 bottom-0">
|
|
59
|
+
* <IconButton icon={<ArchiveIcon />} aria-label="Archive" />
|
|
60
|
+
* <IconButton icon={<DeleteIcon />} aria-label="Delete" />
|
|
61
|
+
* </DockedToolbar>
|
|
62
|
+
*/
|
|
63
|
+
function DockedToolbar(props) {
|
|
64
|
+
return /* @__PURE__ */ jsx(DomDirectionLocale, { children: (directionRef) => /* @__PURE__ */ jsx(DockedToolbarRoot, {
|
|
65
|
+
...props,
|
|
66
|
+
directionRef
|
|
67
|
+
}) });
|
|
68
|
+
}
|
|
69
|
+
function DockedToolbarRoot({ arrangement, color = "standard", visible = true, children, classNames, className, ref, directionRef, ...rest }) {
|
|
70
|
+
const { rootRef, toolbarProps } = useToolbarRoot(ref, directionRef, {
|
|
71
|
+
...rest,
|
|
72
|
+
orientation: "horizontal"
|
|
73
|
+
});
|
|
74
|
+
return /* @__PURE__ */ jsx("div", {
|
|
75
|
+
...mergeProps(rest, toolbarProps),
|
|
76
|
+
...exitProps(visible),
|
|
77
|
+
ref: rootRef,
|
|
78
|
+
"data-tokens": mergeDataTokens("md-comp-toolbar-docked", rest),
|
|
79
|
+
"data-color": color,
|
|
80
|
+
className: dockedToolbarStyles({
|
|
81
|
+
arrangement,
|
|
82
|
+
color
|
|
83
|
+
}).root({ class: cn(classNames?.root, className) }),
|
|
84
|
+
children: /* @__PURE__ */ jsx(ToolbarContext, {
|
|
85
|
+
value: DOCKED[color],
|
|
86
|
+
children: /* @__PURE__ */ jsx(ButtonContext, {
|
|
87
|
+
value: standardIconButtons,
|
|
88
|
+
children
|
|
89
|
+
})
|
|
90
|
+
})
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* M3 Expressive floating toolbar: a pill of controls that floats above the content,
|
|
95
|
+
* horizontal or vertical, in standard or vibrant colours. Leading and trailing content
|
|
96
|
+
* collapse with `expanded`; or pair it with a FAB, and collapsing hides the toolbar while
|
|
97
|
+
* the FAB grows. Tab and the arrow keys move between its
|
|
98
|
+
* controls (M3).
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* <FloatingToolbar aria-label="Formatting" expanded={expanded} className="fixed bottom-4 start-1/2"
|
|
102
|
+
* leading={<IconButton icon={<UndoIcon />} aria-label="Undo" />}>
|
|
103
|
+
* <IconButton toggle icon={<BoldIcon />} aria-label="Bold" />
|
|
104
|
+
* </FloatingToolbar>
|
|
105
|
+
*
|
|
106
|
+
* <FloatingToolbar aria-label="Actions" fab={<ToolbarFab icon={<AddIcon />} aria-label="New" />}>
|
|
107
|
+
* <IconButton icon={<SearchIcon />} aria-label="Search" />
|
|
108
|
+
* </FloatingToolbar>
|
|
109
|
+
*/
|
|
110
|
+
function FloatingToolbar(props) {
|
|
111
|
+
return /* @__PURE__ */ jsx(DomDirectionLocale, { children: (directionRef) => /* @__PURE__ */ jsx(FloatingToolbarRoot, {
|
|
112
|
+
...props,
|
|
113
|
+
directionRef
|
|
114
|
+
}) });
|
|
115
|
+
}
|
|
116
|
+
function FloatingToolbarRoot({ orientation = "horizontal", color = "standard", elevated = true, expanded: expandedProp = true, visible = true, exitEdge, leading, trailing, fab, fabPlacement, children, classNames, className, style, ref, directionRef, ...rest }) {
|
|
117
|
+
const { rootRef, toolbarProps } = useToolbarRoot(ref, directionRef, {
|
|
118
|
+
...rest,
|
|
119
|
+
orientation
|
|
120
|
+
});
|
|
121
|
+
const { isFocusVisible, focusProps } = useFocusRing({ within: true });
|
|
122
|
+
const [focusInCollapsed, setFocusInCollapsed] = useState(false);
|
|
123
|
+
const expanded = expandedProp || isFocusVisible || focusInCollapsed;
|
|
124
|
+
const collapsedFocusProps = {
|
|
125
|
+
onFocus: (event) => {
|
|
126
|
+
if (!expanded && isInCollapsed(event.target)) setFocusInCollapsed(true);
|
|
127
|
+
},
|
|
128
|
+
onBlur: (event) => {
|
|
129
|
+
if (!isInCollapsed(event.relatedTarget)) setFocusInCollapsed(false);
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
const hasFab = fab != null;
|
|
133
|
+
const styles = floatingToolbarStyles({
|
|
134
|
+
orientation,
|
|
135
|
+
color,
|
|
136
|
+
elevated,
|
|
137
|
+
exitEdge: exitEdge ?? "bottom",
|
|
138
|
+
hasFab,
|
|
139
|
+
fabAt: fabPlacement === "start" || fabPlacement === "top" ? "start" : "end"
|
|
140
|
+
});
|
|
141
|
+
const [contentRef, toolbarSize, toolbarResized] = useNaturalSize(orientation === "horizontal" ? "width" : "height", hasFab);
|
|
142
|
+
const context = useMemo(() => ({
|
|
143
|
+
kind: "floating",
|
|
144
|
+
color,
|
|
145
|
+
expanded,
|
|
146
|
+
orientation
|
|
147
|
+
}), [
|
|
148
|
+
color,
|
|
149
|
+
expanded,
|
|
150
|
+
orientation
|
|
151
|
+
]);
|
|
152
|
+
useWarnOnce(!visible && !expandedProp, "[@windmorph/react] A FloatingToolbar shouldn't both collapse and leave the screen (M3): use `expanded` or `visible`, not both.");
|
|
153
|
+
const collapsible = (slot, content) => content != null && /* @__PURE__ */ jsx(ToolbarCollapsible, {
|
|
154
|
+
slot,
|
|
155
|
+
expanded,
|
|
156
|
+
orientation,
|
|
157
|
+
styles,
|
|
158
|
+
className: classNames?.[slot],
|
|
159
|
+
children: content
|
|
160
|
+
});
|
|
161
|
+
return /* @__PURE__ */ jsx("div", {
|
|
162
|
+
...mergeProps(rest, toolbarProps, focusProps, collapsedFocusProps),
|
|
163
|
+
...exitProps(visible),
|
|
164
|
+
ref: rootRef,
|
|
165
|
+
"data-tokens": mergeDataTokens("md-comp-toolbar-floating", rest),
|
|
166
|
+
"data-color": color,
|
|
167
|
+
"data-expanded": expanded,
|
|
168
|
+
style: toolbarSize === void 0 ? style : {
|
|
169
|
+
"--m3-toolbar-size": `${toolbarSize}px`,
|
|
170
|
+
...style
|
|
171
|
+
},
|
|
172
|
+
className: styles.root({ class: cn(classNames?.root, className) }),
|
|
173
|
+
children: /* @__PURE__ */ jsx(ToolbarContext, {
|
|
174
|
+
value: context,
|
|
175
|
+
children: /* @__PURE__ */ jsx(ButtonContext, {
|
|
176
|
+
value: standardIconButtons,
|
|
177
|
+
children: hasFab ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", {
|
|
178
|
+
className: styles.toolbarSlot(),
|
|
179
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
180
|
+
"data-collapsed": !expanded || void 0,
|
|
181
|
+
"data-toolbar-collapsible": "",
|
|
182
|
+
"data-resized": toolbarResized || void 0,
|
|
183
|
+
className: styles.surface({ class: classNames?.surface }),
|
|
184
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
185
|
+
ref: contentRef,
|
|
186
|
+
className: styles.content({ class: classNames?.items }),
|
|
187
|
+
children
|
|
188
|
+
})
|
|
189
|
+
})
|
|
190
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
191
|
+
className: styles.fabSlot(),
|
|
192
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
193
|
+
"data-collapsed": !expanded || void 0,
|
|
194
|
+
className: styles.fabBox({ class: classNames?.fab }),
|
|
195
|
+
children: fab
|
|
196
|
+
})
|
|
197
|
+
})] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
198
|
+
collapsible("leading", leading),
|
|
199
|
+
/* @__PURE__ */ jsx("div", {
|
|
200
|
+
className: styles.items({ class: classNames?.items }),
|
|
201
|
+
children
|
|
202
|
+
}),
|
|
203
|
+
collapsible("trailing", trailing)
|
|
204
|
+
] })
|
|
205
|
+
})
|
|
206
|
+
})
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Leading or trailing content: its box animates its width (or height) in px between 0 and
|
|
211
|
+
* the content's measured size, so expanding shows the spatial spring's overshoot.
|
|
212
|
+
*/
|
|
213
|
+
function ToolbarCollapsible({ slot, expanded, orientation, styles, className, children }) {
|
|
214
|
+
const axis = orientation === "horizontal" ? "width" : "height";
|
|
215
|
+
const [ref, size, resized] = useNaturalSize(axis);
|
|
216
|
+
return /* @__PURE__ */ jsx("div", {
|
|
217
|
+
"data-collapsed": !expanded || void 0,
|
|
218
|
+
"data-toolbar-collapsible": "",
|
|
219
|
+
"data-resized": resized || void 0,
|
|
220
|
+
style: size === void 0 ? void 0 : { [axis]: expanded ? size : 0 },
|
|
221
|
+
className: styles.collapse(),
|
|
222
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
223
|
+
"data-collapsed": !expanded || void 0,
|
|
224
|
+
className: styles.clip({ class: toolbarCollapseAnchor({
|
|
225
|
+
slot,
|
|
226
|
+
orientation
|
|
227
|
+
}) }),
|
|
228
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
229
|
+
ref,
|
|
230
|
+
className: styles.items({ class: cn(styles.collapsibleItems(), className) }),
|
|
231
|
+
children
|
|
232
|
+
})
|
|
233
|
+
})
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
/** Whether an element sits in collapsible content (leading, trailing or the FAB's toolbar). */
|
|
237
|
+
function isInCollapsed(element) {
|
|
238
|
+
return element instanceof Element && element.closest("[data-toolbar-collapsible]") !== null;
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* The FAB of a {@link FloatingToolbar} (Compose's `StandardFloatingActionButton` /
|
|
242
|
+
* `VibrantFloatingActionButton`): it fills the toolbar's FAB box, 56px or 80px while the
|
|
243
|
+
* toolbar is collapsed, with 16px corners at level 2. With `expandedIcon` it shows that
|
|
244
|
+
* icon while the toolbar is expanded and `icon` while it is collapsed.
|
|
245
|
+
*/
|
|
246
|
+
function ToolbarFab({ icon, expandedIcon, iconTransition, color, tooltip = true, elevation, classNames, className, ...base }) {
|
|
247
|
+
const toolbar = useContext(ToolbarContext);
|
|
248
|
+
const fabColor = color ?? toolbar?.color ?? "standard";
|
|
249
|
+
const styles = toolbarFabStyles({
|
|
250
|
+
color: fabColor,
|
|
251
|
+
elevation
|
|
252
|
+
});
|
|
253
|
+
const baseProps = {
|
|
254
|
+
...base,
|
|
255
|
+
className: styles.root({ class: cn(classNames?.root, className) })
|
|
256
|
+
};
|
|
257
|
+
const fab = /* @__PURE__ */ jsx(ButtonBase, {
|
|
258
|
+
...baseProps,
|
|
259
|
+
"data-tokens": mergeDataTokens("md-comp-toolbar-floating-fab", base),
|
|
260
|
+
"data-color": fabColor,
|
|
261
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
262
|
+
"aria-hidden": "true",
|
|
263
|
+
className: styles.icon({ class: cn(expandedIcon && iconFacesStyles().cell(), classNames?.icon) }),
|
|
264
|
+
children: expandedIcon ? /* @__PURE__ */ jsx(IconFaces, {
|
|
265
|
+
icon,
|
|
266
|
+
alternateIcon: expandedIcon,
|
|
267
|
+
alternate: toolbar?.expanded ?? true,
|
|
268
|
+
transition: iconTransition
|
|
269
|
+
}) : icon
|
|
270
|
+
})
|
|
271
|
+
});
|
|
272
|
+
const label = base["aria-label"];
|
|
273
|
+
if (!tooltip || !label) return fab;
|
|
274
|
+
return /* @__PURE__ */ jsxs(TooltipTrigger, { children: [/* @__PURE__ */ jsx(WithoutDescription, { children: fab }), /* @__PURE__ */ jsx(LazyTooltip, {
|
|
275
|
+
classNames: { panel: classNames?.tooltip },
|
|
276
|
+
children: label
|
|
277
|
+
})] });
|
|
278
|
+
}
|
|
279
|
+
//#endregion
|
|
280
|
+
export { DockedToolbar, FloatingToolbar, ToolbarFab };
|
|
281
|
+
|
|
282
|
+
//# sourceMappingURL=Toolbar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toolbar.js","names":[],"sources":["../../../src/components/toolbar/Toolbar.tsx"],"sourcesContent":["'use client';\n\nimport {\n useContext,\n useMemo,\n useState,\n type ComponentPropsWithRef,\n type CSSProperties,\n type FocusEvent,\n type HTMLAttributes,\n type ReactElement,\n type ReactNode,\n type Ref,\n type RefCallback,\n} from 'react';\nimport { mergeProps, mergeRefs, useFocusRing, useObjectRef, useToolbar } from 'react-aria';\nimport {\n ButtonBase,\n type ButtonBaseActionProps,\n type ButtonBaseLinkProps,\n type ButtonBaseProps,\n} from '../../primitives/ButtonBase';\nimport { DomDirectionLocale } from '../../primitives/DomDirectionLocale';\nimport { IconFaces } from '../../primitives/IconFaces';\nimport { iconFacesStyles, type IconTransition } from '../../primitives/icon-faces-styles';\nimport { ButtonContext, standardIconButtons } from '../button/ButtonContext';\nimport { cn } from '../../utils/cn';\nimport { toolbarKeyDown } from '../../utils/toolbar-keys';\nimport { useWarnOnce } from '../../utils/warn-once';\nimport type { FabElevation } from '../fab/fab-styles';\nimport { LazyTooltip } from '../tooltip/lazy-tooltip';\nimport { TooltipTrigger, WithoutDescription } from '../tooltip/tooltip-trigger';\nimport { ToolbarContext } from '../../primitives/ToolbarContext';\nimport {\n dockedToolbarStyles,\n floatingToolbarStyles,\n toolbarCollapseAnchor,\n toolbarFabStyles,\n type DockedToolbarArrangement,\n type DockedToolbarColor,\n type FloatingToolbarColor,\n type ToolbarExitEdge,\n type ToolbarOrientation,\n} from './toolbar-styles';\nimport { mergeDataTokens } from '../../utils/merge-data-tokens';\nimport { useNaturalSize } from '../../utils/natural-size';\n\nconst DOCKED = {\n standard: { kind: 'docked', color: 'standard' },\n vibrant: { kind: 'docked', color: 'vibrant' },\n} as const;\n\n/** The `data-*` and `inert` attributes of a toolbar that has exited the screen. */\nconst exitProps = (visible: boolean) => ({\n 'data-hidden': visible ? undefined : true,\n inert: !visible || undefined,\n});\n\ntype Naming =\n | {\n /** Accessible name for the toolbar. Required unless `aria-labelledby` is set. */\n 'aria-label': string;\n }\n | {\n /** The id of the element that names the toolbar. Required unless `aria-label` is set. */\n 'aria-labelledby': string;\n };\n\ntype DivProps<Own> = Omit<\n ComponentPropsWithRef<'div'>,\n keyof Own | 'aria-label' | 'aria-labelledby' | 'color'\n>;\n\n/** Applies React Aria's toolbar behaviour (role, arrow keys) with the DOM's direction. */\nfunction useToolbarRoot(\n ref: Ref<HTMLDivElement> | undefined,\n directionRef: RefCallback<HTMLElement>,\n props: { orientation: ToolbarOrientation; 'aria-label'?: string; 'aria-labelledby'?: string },\n) {\n const merged = useMemo(\n () => mergeRefs<HTMLDivElement>(ref, directionRef as RefCallback<HTMLDivElement>),\n [ref, directionRef],\n );\n const rootRef = useObjectRef<HTMLDivElement>(merged);\n const { toolbarProps: aria } = useToolbar(props, rootRef);\n /*\n * M3, not the WAI-ARIA single-tab-stop pattern (2026-10-13): \"Tab or Arrows: Navigate\n * between interactive elements\". Tab and Shift+Tab are left to the browser, so they move\n * through every control in order and then out of the toolbar; React Aria's focus restoring\n * is dropped too, so Tab enters at the first control and Shift+Tab at the last. The arrow\n * keys follow the APG toolbar (2026-10-15): along the orientation, flipped in RTL, they\n * wrap at the ends, and Home and End reach the first and last control; a text field keeps\n * them for its caret. A toolbar nested in another leaves its keys to the outer one.\n */\n const { orientation } = props;\n const nested = aria.onKeyDownCapture === undefined;\n const toolbarProps: HTMLAttributes<HTMLElement> = {\n ...aria,\n onFocusCapture: undefined,\n onBlurCapture: undefined,\n onKeyDownCapture: nested ? undefined : (event) => void toolbarKeyDown(event, orientation),\n };\n return { rootRef, toolbarProps };\n}\n\nexport interface DockedToolbarClassNames {\n /** The toolbar's container, merged with `className`. */\n root?: string;\n}\n\ninterface DockedToolbarOwnProps {\n /**\n * Centre the items 32px apart (M3's default), or spread them across the toolbar, which\n * M3 recommends in compact windows. @default \"centered\"\n */\n arrangement?: DockedToolbarArrangement;\n /**\n * The container colour: `standard` (`surface-container`) or `vibrant`\n * (`primary-container`), as the floating toolbar's. @default \"standard\"\n */\n color?: DockedToolbarColor;\n /**\n * Shows the toolbar. Hiding it slides it off the bottom of the window, e.g. while the\n * page scrolls (`useToolbarScrollExit`). A hidden toolbar is `inert`. @default true\n */\n visible?: boolean;\n /** The toolbar's controls, e.g. icon buttons, buttons or a FAB. */\n children: ReactNode;\n /** Classes for each part, by slot. */\n classNames?: DockedToolbarClassNames;\n}\n\nexport type DockedToolbarProps = DockedToolbarOwnProps & Naming & DivProps<DockedToolbarOwnProps>;\n\n/**\n * M3 Expressive docked toolbar: a full-width 64px bar of actions, usually along the bottom\n * of the window (it replaces the bottom app bar). Tab and the arrow keys move between its\n * controls (M3).\n *\n * @example\n * <DockedToolbar aria-label=\"Message actions\" className=\"fixed inset-x-0 bottom-0\">\n * <IconButton icon={<ArchiveIcon />} aria-label=\"Archive\" />\n * <IconButton icon={<DeleteIcon />} aria-label=\"Delete\" />\n * </DockedToolbar>\n */\nexport function DockedToolbar(props: DockedToolbarProps) {\n return (\n <DomDirectionLocale>\n {(directionRef) => <DockedToolbarRoot {...props} directionRef={directionRef} />}\n </DomDirectionLocale>\n );\n}\n\nfunction DockedToolbarRoot({\n arrangement,\n color = 'standard',\n visible = true,\n children,\n classNames,\n className,\n ref,\n directionRef,\n ...rest\n}: DockedToolbarProps & { directionRef: RefCallback<HTMLElement> }) {\n const { rootRef, toolbarProps } = useToolbarRoot(ref, directionRef, {\n ...rest,\n orientation: 'horizontal',\n });\n return (\n <div\n {...mergeProps(rest, toolbarProps)}\n {...exitProps(visible)}\n ref={rootRef}\n data-tokens={mergeDataTokens('md-comp-toolbar-docked', rest)}\n data-color={color}\n className={dockedToolbarStyles({ arrangement, color }).root({\n class: cn(classNames?.root, className),\n })}\n >\n <ToolbarContext value={DOCKED[color]}>\n <ButtonContext value={standardIconButtons}>{children}</ButtonContext>\n </ToolbarContext>\n </div>\n );\n}\n\nexport interface FloatingToolbarClassNames {\n /** The outer container, merged with `className`. */\n root?: string;\n /** The main content group. */\n items?: string;\n /** The group of `leading` controls. */\n leading?: string;\n /** The group of `trailing` controls. */\n trailing?: string;\n /** The toolbar's surface when it has a FAB. */\n surface?: string;\n /** The box the FAB fills (56px, 80px while collapsed). */\n fab?: string;\n}\n\ninterface FloatingToolbarBaseProps {\n /** Lay the controls out in a row, or in a column at a window edge. @default \"horizontal\" */\n orientation?: ToolbarOrientation;\n /**\n * The container colour: `standard` (`surface-container`) or `vibrant`\n * (`primary-container`). @default \"standard\"\n */\n color?: FloatingToolbarColor;\n /**\n * Level 1 elevation, which M3 gives floating toolbars by default. Remove it when the\n * content beneath is visually distinct. @default true\n */\n elevated?: boolean;\n /**\n * Shows the leading and trailing content, or (with a FAB) the toolbar itself. Collapse\n * it while the page scrolls, e.g. with `useToolbarScrollExpansion`. Collapsed controls\n * stay in the tab order and the accessibility tree, and keyboard focus inside the\n * toolbar expands it, so every control stays reachable. @default true\n */\n expanded?: boolean;\n /**\n * Shows the toolbar. Hiding it slides it off `exitEdge`, e.g. while the page scrolls\n * (`useToolbarScrollExit`). A hidden toolbar is `inert`. Don't combine it with\n * collapsing: M3 says a toolbar shouldn't both collapse and leave the screen.\n * @default true\n */\n visible?: boolean;\n /** The window edge a hidden toolbar slides past (logical). @default \"bottom\" */\n exitEdge?: ToolbarExitEdge;\n /** The main controls, always shown. */\n children: ReactNode;\n /** Classes for each part, by slot. */\n classNames?: FloatingToolbarClassNames;\n}\n\ntype FloatingToolbarContent =\n | {\n /** Controls before the main content, hidden while collapsed. */\n leading?: ReactNode;\n /** Controls after the main content, hidden while collapsed. */\n trailing?: ReactNode;\n fab?: undefined;\n fabPlacement?: undefined;\n }\n | {\n leading?: undefined;\n trailing?: undefined;\n /**\n * A FAB beside the toolbar, usually a {@link ToolbarFab}. Collapsing hides the\n * toolbar and grows the FAB from 56px to 80px.\n */\n fab: ReactElement;\n /**\n * Side of the toolbar the FAB sits on. `top` is the same as `start` and `bottom` as\n * `end`, so the value can stay put when the orientation changes. @default \"end\"\n */\n fabPlacement?: 'start' | 'end' | 'top' | 'bottom';\n };\n\ntype FloatingToolbarOwnProps = FloatingToolbarBaseProps & FloatingToolbarContent;\n\nexport type FloatingToolbarProps = FloatingToolbarOwnProps &\n Naming &\n DivProps<\n FloatingToolbarBaseProps & Record<'leading' | 'trailing' | 'fab' | 'fabPlacement', unknown>\n >;\n\n/**\n * M3 Expressive floating toolbar: a pill of controls that floats above the content,\n * horizontal or vertical, in standard or vibrant colours. Leading and trailing content\n * collapse with `expanded`; or pair it with a FAB, and collapsing hides the toolbar while\n * the FAB grows. Tab and the arrow keys move between its\n * controls (M3).\n *\n * @example\n * <FloatingToolbar aria-label=\"Formatting\" expanded={expanded} className=\"fixed bottom-4 start-1/2\"\n * leading={<IconButton icon={<UndoIcon />} aria-label=\"Undo\" />}>\n * <IconButton toggle icon={<BoldIcon />} aria-label=\"Bold\" />\n * </FloatingToolbar>\n *\n * <FloatingToolbar aria-label=\"Actions\" fab={<ToolbarFab icon={<AddIcon />} aria-label=\"New\" />}>\n * <IconButton icon={<SearchIcon />} aria-label=\"Search\" />\n * </FloatingToolbar>\n */\nexport function FloatingToolbar(props: FloatingToolbarProps) {\n return (\n <DomDirectionLocale>\n {(directionRef) => <FloatingToolbarRoot {...props} directionRef={directionRef} />}\n </DomDirectionLocale>\n );\n}\n\nfunction FloatingToolbarRoot({\n orientation = 'horizontal',\n color = 'standard',\n elevated = true,\n expanded: expandedProp = true,\n visible = true,\n exitEdge,\n leading,\n trailing,\n fab,\n fabPlacement,\n children,\n classNames,\n className,\n style,\n ref,\n directionRef,\n ...rest\n}: FloatingToolbarProps & { directionRef: RefCallback<HTMLElement> }) {\n const { rootRef, toolbarProps } = useToolbarRoot(ref, directionRef, { ...rest, orientation });\n // Keyboard focus inside expands the toolbar. So does any focus that lands on collapsed\n // content (only the keyboard or assistive tech can reach it), so collapsed controls stay\n // reachable. Pointer focus on the always-shown controls doesn't.\n const { isFocusVisible, focusProps } = useFocusRing({ within: true });\n const [focusInCollapsed, setFocusInCollapsed] = useState(false);\n const expanded = expandedProp || isFocusVisible || focusInCollapsed;\n const collapsedFocusProps = {\n onFocus: (event: FocusEvent<HTMLElement>) => {\n if (!expanded && isInCollapsed(event.target)) setFocusInCollapsed(true);\n },\n onBlur: (event: FocusEvent<HTMLElement>) => {\n if (!isInCollapsed(event.relatedTarget)) setFocusInCollapsed(false);\n },\n };\n const hasFab = fab != null;\n const fabAt = fabPlacement === 'start' || fabPlacement === 'top' ? 'start' : 'end';\n const styles = floatingToolbarStyles({\n orientation,\n color,\n elevated,\n exitEdge: exitEdge ?? 'bottom',\n hasFab,\n fabAt,\n });\n // The toolbar content's natural length, so the slot keeps the expanded size and the\n // surface can animate between it and 0.\n const [contentRef, toolbarSize, toolbarResized] = useNaturalSize<HTMLDivElement>(\n orientation === 'horizontal' ? 'width' : 'height',\n hasFab,\n );\n const context = useMemo(\n () => ({ kind: 'floating', color, expanded, orientation }) as const,\n [color, expanded, orientation],\n );\n // Once per toolbar, however often it collapses and leaves while scrolling.\n useWarnOnce(\n !visible && !expandedProp,\n \"[@windmorph/react] A FloatingToolbar shouldn't both collapse and leave the screen (M3): use `expanded` or `visible`, not both.\",\n );\n\n const collapsible = (slot: 'leading' | 'trailing', content: ReactNode) =>\n content != null && (\n <ToolbarCollapsible\n slot={slot}\n expanded={expanded}\n orientation={orientation}\n styles={styles}\n className={classNames?.[slot]}\n >\n {content}\n </ToolbarCollapsible>\n );\n\n return (\n <div\n {...mergeProps(rest, toolbarProps, focusProps, collapsedFocusProps)}\n {...exitProps(visible)}\n ref={rootRef}\n data-tokens={mergeDataTokens('md-comp-toolbar-floating', rest)}\n data-color={color}\n data-expanded={expanded}\n style={\n toolbarSize === undefined\n ? style\n : ({ '--m3-toolbar-size': `${toolbarSize}px`, ...style } as CSSProperties)\n }\n className={styles.root({ class: cn(classNames?.root, className) })}\n >\n <ToolbarContext value={context}>\n <ButtonContext value={standardIconButtons}>\n {hasFab ? (\n <>\n <div className={styles.toolbarSlot()}>\n <div\n data-collapsed={!expanded || undefined}\n data-toolbar-collapsible=\"\"\n data-resized={toolbarResized || undefined}\n className={styles.surface({ class: classNames?.surface })}\n >\n <div ref={contentRef} className={styles.content({ class: classNames?.items })}>\n {children}\n </div>\n </div>\n </div>\n <div className={styles.fabSlot()}>\n <div\n data-collapsed={!expanded || undefined}\n className={styles.fabBox({ class: classNames?.fab })}\n >\n {fab}\n </div>\n </div>\n </>\n ) : (\n <>\n {collapsible('leading', leading)}\n <div className={styles.items({ class: classNames?.items })}>{children}</div>\n {collapsible('trailing', trailing)}\n </>\n )}\n </ButtonContext>\n </ToolbarContext>\n </div>\n );\n}\n\n/**\n * Leading or trailing content: its box animates its width (or height) in px between 0 and\n * the content's measured size, so expanding shows the spatial spring's overshoot.\n */\nfunction ToolbarCollapsible({\n slot,\n expanded,\n orientation,\n styles,\n className,\n children,\n}: {\n slot: 'leading' | 'trailing';\n expanded: boolean;\n orientation: ToolbarOrientation;\n styles: ReturnType<typeof floatingToolbarStyles>;\n className?: string;\n children: ReactNode;\n}) {\n const axis = orientation === 'horizontal' ? 'width' : 'height';\n const [ref, size, resized] = useNaturalSize<HTMLDivElement>(axis);\n return (\n <div\n data-collapsed={!expanded || undefined}\n data-toolbar-collapsible=\"\"\n data-resized={resized || undefined}\n style={size === undefined ? undefined : { [axis]: expanded ? size : 0 }}\n className={styles.collapse()}\n >\n <div\n data-collapsed={!expanded || undefined}\n className={styles.clip({ class: toolbarCollapseAnchor({ slot, orientation }) })}\n >\n <div\n ref={ref}\n className={styles.items({ class: cn(styles.collapsibleItems(), className) })}\n >\n {children}\n </div>\n </div>\n </div>\n );\n}\n\n/** Whether an element sits in collapsible content (leading, trailing or the FAB's toolbar). */\nfunction isInCollapsed(element: EventTarget | null) {\n return element instanceof Element && element.closest('[data-toolbar-collapsible]') !== null;\n}\n\nexport interface ToolbarFabClassNames {\n /** The FAB's button, merged with `className`. */\n root?: string;\n /** The icon. */\n icon?: string;\n /** The built-in plain tooltip that shows the label (`tooltip`). */\n tooltip?: string;\n}\n\ntype AccessibleName =\n | {\n /** Accessible name for the FAB, also its tooltip. Required unless `aria-labelledby` is set. */\n 'aria-label': string;\n /** The id of the element that names the FAB. */\n 'aria-labelledby'?: string;\n }\n | {\n /** Accessible name for the FAB, also its tooltip. */\n 'aria-label'?: string;\n /** The id of the element that names the FAB. Required unless `aria-label` is set. */\n 'aria-labelledby': string;\n };\n\ninterface ToolbarFabOwnProps {\n /**\n * The icon (while the toolbar is collapsed, when `expandedIcon` is set). Hidden from\n * assistive tech; `aria-label` names the FAB.\n */\n icon: ReactElement;\n /**\n * The icon while the toolbar is expanded, e.g. \"close\" for a FAB that collapses the\n * toolbar. Without it, the FAB always shows `icon`.\n */\n expandedIcon?: ReactElement;\n /**\n * How the FAB hands over between `icon` and `expandedIcon`: `swap` halfway through the\n * toolbar's expand / collapse spring, or `rotate`, where the outgoing icon turns 90° and\n * fades out while the incoming one turns in and fades in. `rotate` goes beyond the M3\n * spec; it matches Google's Expressive showcase motion. It mirrors in RTL, and reduced\n * motion keeps only the crossfade. Only used with `expandedIcon`. @default \"swap\"\n */\n iconTransition?: IconTransition;\n /**\n * The FAB's colour scheme. Defaults to the toolbar's colour: `primary-container`\n * (standard) or `tertiary-container` (vibrant).\n * @default the toolbar's color, or \"standard\" outside a toolbar\n */\n color?: FloatingToolbarColor;\n /**\n * Shows `aria-label` in a plain tooltip on hover and keyboard focus, as M3 asks of FABs\n * on the web. @default true\n */\n tooltip?: boolean;\n /**\n * As on `Fab`: level 2 by default (hover 3), `lowered` level 1, or `flat` level 0.\n * @default \"default\"\n */\n elevation?: FabElevation;\n /** Classes for each part, by slot. */\n classNames?: ToolbarFabClassNames;\n}\n\ntype OmitToolbarFab<T> = Omit<\n T,\n keyof ToolbarFabOwnProps | 'children' | 'disabled' | 'toggle' | 'aria-label' | 'aria-labelledby'\n>;\n\nexport type ToolbarFabProps = ToolbarFabOwnProps &\n AccessibleName &\n (OmitToolbarFab<ButtonBaseActionProps> | OmitToolbarFab<ButtonBaseLinkProps>);\n\n/**\n * The FAB of a {@link FloatingToolbar} (Compose's `StandardFloatingActionButton` /\n * `VibrantFloatingActionButton`): it fills the toolbar's FAB box, 56px or 80px while the\n * toolbar is collapsed, with 16px corners at level 2. With `expandedIcon` it shows that\n * icon while the toolbar is expanded and `icon` while it is collapsed.\n */\nexport function ToolbarFab({\n icon,\n expandedIcon,\n iconTransition,\n color,\n tooltip = true,\n elevation,\n classNames,\n className,\n ...base\n}: ToolbarFabProps) {\n const toolbar = useContext(ToolbarContext);\n const fabColor = color ?? toolbar?.color ?? 'standard';\n const styles = toolbarFabStyles({ color: fabColor, elevation });\n const baseProps = {\n ...base,\n className: styles.root({ class: cn(classNames?.root, className) }),\n } as ButtonBaseProps;\n const fab = (\n <ButtonBase\n {...baseProps}\n // The component tokens' hooks (toolbar-tokens.ts), also public styling hooks for apps.\n data-tokens={mergeDataTokens('md-comp-toolbar-floating-fab', base)}\n data-color={fabColor}\n >\n <span\n aria-hidden=\"true\"\n className={styles.icon({\n class: cn(expandedIcon && iconFacesStyles().cell(), classNames?.icon),\n })}\n >\n {expandedIcon ? (\n <IconFaces\n icon={icon}\n alternateIcon={expandedIcon}\n alternate={toolbar?.expanded ?? true}\n transition={iconTransition}\n />\n ) : (\n icon\n )}\n </span>\n </ButtonBase>\n );\n const label = base['aria-label'];\n if (!tooltip || !label) return fab;\n return (\n <TooltipTrigger>\n {/* The tooltip repeats the name, so it isn't also the FAB's description. */}\n <WithoutDescription>{fab}</WithoutDescription>\n <LazyTooltip classNames={{ panel: classNames?.tooltip }}>{label}</LazyTooltip>\n </TooltipTrigger>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA+CA,MAAM,SAAS;CACb,UAAU;EAAE,MAAM;EAAU,OAAO;CAAW;CAC9C,SAAS;EAAE,MAAM;EAAU,OAAO;CAAU;AAC9C;;AAGA,MAAM,aAAa,aAAsB;CACvC,eAAe,UAAU,KAAA,IAAY;CACrC,OAAO,CAAC,WAAW,KAAA;AACrB;;AAkBA,SAAS,eACP,KACA,cACA,OACA;CACA,MAAM,SAAS,cACP,UAA0B,KAAK,YAA2C,GAChF,CAAC,KAAK,YAAY,CACpB;CACA,MAAM,UAAU,aAA6B,MAAM;CACnD,MAAM,EAAE,cAAc,SAAS,WAAW,OAAO,OAAO;CAUxD,MAAM,EAAE,gBAAgB;CACxB,MAAM,SAAS,KAAK,qBAAqB,KAAA;CAOzC,OAAO;EAAE;EAAS,cAAA;GALhB,GAAG;GACH,gBAAgB,KAAA;GAChB,eAAe,KAAA;GACf,kBAAkB,SAAS,KAAA,KAAa,UAAU,KAAK,eAAe,OAAO,WAAW;EAE7D;CAAE;AACjC;;;;;;;;;;;;AA0CA,SAAgB,cAAc,OAA2B;CACvD,OACE,oBAAC,oBAAD,EAAA,WACI,iBAAiB,oBAAC,mBAAD;EAAmB,GAAI;EAAqB;CAAe,CAAA,EAC5D,CAAA;AAExB;AAEA,SAAS,kBAAkB,EACzB,aACA,QAAQ,YACR,UAAU,MACV,UACA,YACA,WACA,KACA,cACA,GAAG,QAC+D;CAClE,MAAM,EAAE,SAAS,iBAAiB,eAAe,KAAK,cAAc;EAClE,GAAG;EACH,aAAa;CACf,CAAC;CACD,OACE,oBAAC,OAAD;EACE,GAAI,WAAW,MAAM,YAAY;EACjC,GAAI,UAAU,OAAO;EACrB,KAAK;EACL,eAAa,gBAAgB,0BAA0B,IAAI;EAC3D,cAAY;EACZ,WAAW,oBAAoB;GAAE;GAAa;EAAM,CAAC,CAAC,CAAC,KAAK,EAC1D,OAAO,GAAG,YAAY,MAAM,SAAS,EACvC,CAAC;EAED,UAAA,oBAAC,gBAAD;GAAgB,OAAO,OAAO;GAC5B,UAAA,oBAAC,eAAD;IAAe,OAAO;IAAsB;GAAwB,CAAA;EACtD,CAAA;CACb,CAAA;AAET;;;;;;;;;;;;;;;;;;AAqGA,SAAgB,gBAAgB,OAA6B;CAC3D,OACE,oBAAC,oBAAD,EAAA,WACI,iBAAiB,oBAAC,qBAAD;EAAqB,GAAI;EAAqB;CAAe,CAAA,EAC9D,CAAA;AAExB;AAEA,SAAS,oBAAoB,EAC3B,cAAc,cACd,QAAQ,YACR,WAAW,MACX,UAAU,eAAe,MACzB,UAAU,MACV,UACA,SACA,UACA,KACA,cACA,UACA,YACA,WACA,OACA,KACA,cACA,GAAG,QACiE;CACpE,MAAM,EAAE,SAAS,iBAAiB,eAAe,KAAK,cAAc;EAAE,GAAG;EAAM;CAAY,CAAC;CAI5F,MAAM,EAAE,gBAAgB,eAAe,aAAa,EAAE,QAAQ,KAAK,CAAC;CACpE,MAAM,CAAC,kBAAkB,uBAAuB,SAAS,KAAK;CAC9D,MAAM,WAAW,gBAAgB,kBAAkB;CACnD,MAAM,sBAAsB;EAC1B,UAAU,UAAmC;GAC3C,IAAI,CAAC,YAAY,cAAc,MAAM,MAAM,GAAG,oBAAoB,IAAI;EACxE;EACA,SAAS,UAAmC;GAC1C,IAAI,CAAC,cAAc,MAAM,aAAa,GAAG,oBAAoB,KAAK;EACpE;CACF;CACA,MAAM,SAAS,OAAO;CAEtB,MAAM,SAAS,sBAAsB;EACnC;EACA;EACA;EACA,UAAU,YAAY;EACtB;EACA,OAPY,iBAAiB,WAAW,iBAAiB,QAAQ,UAAU;CAQ7E,CAAC;CAGD,MAAM,CAAC,YAAY,aAAa,kBAAkB,eAChD,gBAAgB,eAAe,UAAU,UACzC,MACF;CACA,MAAM,UAAU,eACP;EAAE,MAAM;EAAY;EAAO;EAAU;CAAY,IACxD;EAAC;EAAO;EAAU;CAAW,CAC/B;CAEA,YACE,CAAC,WAAW,CAAC,cACb,gIACF;CAEA,MAAM,eAAe,MAA8B,YACjD,WAAW,QACT,oBAAC,oBAAD;EACQ;EACI;EACG;EACL;EACR,WAAW,aAAa;EAEvB,UAAA;CACiB,CAAA;CAGxB,OACE,oBAAC,OAAD;EACE,GAAI,WAAW,MAAM,cAAc,YAAY,mBAAmB;EAClE,GAAI,UAAU,OAAO;EACrB,KAAK;EACL,eAAa,gBAAgB,4BAA4B,IAAI;EAC7D,cAAY;EACZ,iBAAe;EACf,OACE,gBAAgB,KAAA,IACZ,QACC;GAAE,qBAAqB,GAAG,YAAY;GAAK,GAAG;EAAM;EAE3D,WAAW,OAAO,KAAK,EAAE,OAAO,GAAG,YAAY,MAAM,SAAS,EAAE,CAAC;EAEjE,UAAA,oBAAC,gBAAD;GAAgB,OAAO;GACrB,UAAA,oBAAC,eAAD;IAAe,OAAO;IACnB,UAAA,SACC,qBAAA,YAAA,EAAA,UAAA,CACE,oBAAC,OAAD;KAAK,WAAW,OAAO,YAAY;KACjC,UAAA,oBAAC,OAAD;MACE,kBAAgB,CAAC,YAAY,KAAA;MAC7B,4BAAyB;MACzB,gBAAc,kBAAkB,KAAA;MAChC,WAAW,OAAO,QAAQ,EAAE,OAAO,YAAY,QAAQ,CAAC;MAExD,UAAA,oBAAC,OAAD;OAAK,KAAK;OAAY,WAAW,OAAO,QAAQ,EAAE,OAAO,YAAY,MAAM,CAAC;OACzE;MACE,CAAA;KACF,CAAA;IACF,CAAA,GACL,oBAAC,OAAD;KAAK,WAAW,OAAO,QAAQ;KAC7B,UAAA,oBAAC,OAAD;MACE,kBAAgB,CAAC,YAAY,KAAA;MAC7B,WAAW,OAAO,OAAO,EAAE,OAAO,YAAY,IAAI,CAAC;MAElD,UAAA;KACE,CAAA;IACF,CAAA,CACL,EAAA,CAAA,IAEF,qBAAA,YAAA,EAAA,UAAA;KACG,YAAY,WAAW,OAAO;KAC/B,oBAAC,OAAD;MAAK,WAAW,OAAO,MAAM,EAAE,OAAO,YAAY,MAAM,CAAC;MAAI;KAAc,CAAA;KAC1E,YAAY,YAAY,QAAQ;IACjC,EAAA,CAAA;GAES,CAAA;EACD,CAAA;CACb,CAAA;AAET;;;;;AAMA,SAAS,mBAAmB,EAC1B,MACA,UACA,aACA,QACA,WACA,YAQC;CACD,MAAM,OAAO,gBAAgB,eAAe,UAAU;CACtD,MAAM,CAAC,KAAK,MAAM,WAAW,eAA+B,IAAI;CAChE,OACE,oBAAC,OAAD;EACE,kBAAgB,CAAC,YAAY,KAAA;EAC7B,4BAAyB;EACzB,gBAAc,WAAW,KAAA;EACzB,OAAO,SAAS,KAAA,IAAY,KAAA,IAAY,GAAG,OAAO,WAAW,OAAO,EAAE;EACtE,WAAW,OAAO,SAAS;EAE3B,UAAA,oBAAC,OAAD;GACE,kBAAgB,CAAC,YAAY,KAAA;GAC7B,WAAW,OAAO,KAAK,EAAE,OAAO,sBAAsB;IAAE;IAAM;GAAY,CAAC,EAAE,CAAC;GAE9E,UAAA,oBAAC,OAAD;IACO;IACL,WAAW,OAAO,MAAM,EAAE,OAAO,GAAG,OAAO,iBAAiB,GAAG,SAAS,EAAE,CAAC;IAE1E;GACE,CAAA;EACF,CAAA;CACF,CAAA;AAET;;AAGA,SAAS,cAAc,SAA6B;CAClD,OAAO,mBAAmB,WAAW,QAAQ,QAAQ,4BAA4B,MAAM;AACzF;;;;;;;AA+EA,SAAgB,WAAW,EACzB,MACA,cACA,gBACA,OACA,UAAU,MACV,WACA,YACA,WACA,GAAG,QACe;CAClB,MAAM,UAAU,WAAW,cAAc;CACzC,MAAM,WAAW,SAAS,SAAS,SAAS;CAC5C,MAAM,SAAS,iBAAiB;EAAE,OAAO;EAAU;CAAU,CAAC;CAC9D,MAAM,YAAY;EAChB,GAAG;EACH,WAAW,OAAO,KAAK,EAAE,OAAO,GAAG,YAAY,MAAM,SAAS,EAAE,CAAC;CACnE;CACA,MAAM,MACJ,oBAAC,YAAD;EACE,GAAI;EAEJ,eAAa,gBAAgB,gCAAgC,IAAI;EACjE,cAAY;EAEZ,UAAA,oBAAC,QAAD;GACE,eAAY;GACZ,WAAW,OAAO,KAAK,EACrB,OAAO,GAAG,gBAAgB,gBAAgB,CAAC,CAAC,KAAK,GAAG,YAAY,IAAI,EACtE,CAAC;GAEA,UAAA,eACC,oBAAC,WAAD;IACQ;IACN,eAAe;IACf,WAAW,SAAS,YAAY;IAChC,YAAY;GACb,CAAA,IAED;EAEE,CAAA;CACI,CAAA;CAEd,MAAM,QAAQ,KAAK;CACnB,IAAI,CAAC,WAAW,CAAC,OAAO,OAAO;CAC/B,OACE,qBAAC,gBAAD,EAAA,UAAA,CAEE,oBAAC,oBAAD,EAAA,UAAqB,IAAwB,CAAA,GAC7C,oBAAC,aAAD;EAAa,YAAY,EAAE,OAAO,YAAY,QAAQ;EAAI,UAAA;CAAmB,CAAA,CAC/D,EAAA,CAAA;AAEpB"}
|