@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,54 @@
|
|
|
1
|
+
import { color, corner, defineComponentTokens, elevation } from "../../tokens/component.js";
|
|
2
|
+
//#region src/components/snackbar/snackbar-tokens.ts
|
|
3
|
+
/** The tokens of {@link Snackbar}: `--md-comp-snackbar-<part>`. */
|
|
4
|
+
const snackbarTokenSet = defineComponentTokens({
|
|
5
|
+
name: "md-comp-snackbar",
|
|
6
|
+
tokens: {
|
|
7
|
+
"container-color": {
|
|
8
|
+
value: color("inverse-surface"),
|
|
9
|
+
description: "The container.",
|
|
10
|
+
compose: "SnackbarTokens.ContainerColor",
|
|
11
|
+
paints: { property: "background-color" }
|
|
12
|
+
},
|
|
13
|
+
"container-shape": {
|
|
14
|
+
value: corner("extra-small"),
|
|
15
|
+
description: "The corners.",
|
|
16
|
+
compose: "SnackbarTokens.ContainerShape",
|
|
17
|
+
paints: { property: "border-top-left-radius" }
|
|
18
|
+
},
|
|
19
|
+
"container-elevation": {
|
|
20
|
+
value: elevation(3),
|
|
21
|
+
description: "The shadow.",
|
|
22
|
+
compose: "SnackbarTokens.ContainerElevation",
|
|
23
|
+
paints: { property: "box-shadow" }
|
|
24
|
+
},
|
|
25
|
+
"supporting-text-color": {
|
|
26
|
+
value: color("inverse-on-surface"),
|
|
27
|
+
description: "The message.",
|
|
28
|
+
compose: "SnackbarTokens.SupportingTextColor",
|
|
29
|
+
paints: { property: "color" }
|
|
30
|
+
},
|
|
31
|
+
"action-label-text-color": {
|
|
32
|
+
value: color("inverse-primary"),
|
|
33
|
+
description: "The action, a text button.",
|
|
34
|
+
compose: "SnackbarTokens.ActionLabelTextColor",
|
|
35
|
+
paints: {
|
|
36
|
+
property: "color",
|
|
37
|
+
slot: "action"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"icon-color": {
|
|
41
|
+
value: color("inverse-on-surface"),
|
|
42
|
+
description: "The dismiss icon button.",
|
|
43
|
+
compose: "SnackbarTokens.IconColor",
|
|
44
|
+
paints: {
|
|
45
|
+
property: "color",
|
|
46
|
+
slot: "dismiss"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
//#endregion
|
|
52
|
+
export { snackbarTokenSet };
|
|
53
|
+
|
|
54
|
+
//# sourceMappingURL=snackbar-tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snackbar-tokens.js","names":[],"sources":["../../../src/components/snackbar/snackbar-tokens.ts"],"sourcesContent":["import { color, corner, defineComponentTokens, elevation } from '../../tokens/component';\n\n/*\n * Snackbar's component tokens, M3's `md.comp.snackbar.*` names (checked against\n * m3.material.io's token tables, 2026-10-14), with Compose's SnackbarTokens defaults.\n * `snackbar-styles.ts` reads one private variable per part. The action and dismiss buttons'\n * hover, focus and pressed layers follow their colours; sizes and padding stay classes.\n */\n\n/** The tokens of {@link Snackbar}: `--md-comp-snackbar-<part>`. */\nexport const snackbarTokenSet = defineComponentTokens({\n name: 'md-comp-snackbar',\n tokens: {\n 'container-color': {\n value: color('inverse-surface'),\n description: 'The container.',\n compose: 'SnackbarTokens.ContainerColor',\n paints: { property: 'background-color' },\n },\n 'container-shape': {\n value: corner('extra-small'),\n description: 'The corners.',\n compose: 'SnackbarTokens.ContainerShape',\n paints: { property: 'border-top-left-radius' },\n },\n 'container-elevation': {\n value: elevation(3),\n description: 'The shadow.',\n compose: 'SnackbarTokens.ContainerElevation',\n paints: { property: 'box-shadow' },\n },\n 'supporting-text-color': {\n value: color('inverse-on-surface'),\n description: 'The message.',\n compose: 'SnackbarTokens.SupportingTextColor',\n paints: { property: 'color' },\n },\n 'action-label-text-color': {\n value: color('inverse-primary'),\n description: 'The action, a text button.',\n compose: 'SnackbarTokens.ActionLabelTextColor',\n paints: { property: 'color', slot: 'action' },\n },\n 'icon-color': {\n value: color('inverse-on-surface'),\n description: 'The dismiss icon button.',\n compose: 'SnackbarTokens.IconColor',\n paints: { property: 'color', slot: 'dismiss' },\n },\n },\n});\n"],"mappings":";;;AAUA,MAAa,mBAAmB,sBAAsB;CACpD,MAAM;CACN,QAAQ;EACN,mBAAmB;GACjB,OAAO,MAAM,iBAAiB;GAC9B,aAAa;GACb,SAAS;GACT,QAAQ,EAAE,UAAU,mBAAmB;EACzC;EACA,mBAAmB;GACjB,OAAO,OAAO,aAAa;GAC3B,aAAa;GACb,SAAS;GACT,QAAQ,EAAE,UAAU,yBAAyB;EAC/C;EACA,uBAAuB;GACrB,OAAO,UAAU,CAAC;GAClB,aAAa;GACb,SAAS;GACT,QAAQ,EAAE,UAAU,aAAa;EACnC;EACA,yBAAyB;GACvB,OAAO,MAAM,oBAAoB;GACjC,aAAa;GACb,SAAS;GACT,QAAQ,EAAE,UAAU,QAAQ;EAC9B;EACA,2BAA2B;GACzB,OAAO,MAAM,iBAAiB;GAC9B,aAAa;GACb,SAAS;GACT,QAAQ;IAAE,UAAU;IAAS,MAAM;GAAS;EAC9C;EACA,cAAc;GACZ,OAAO,MAAM,oBAAoB;GACjC,aAAa;GACb,SAAS;GACT,QAAQ;IAAE,UAAU;IAAS,MAAM;GAAU;EAC/C;CACF;AACF,CAAC"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { ButtonBaseActionProps, ButtonBaseLinkProps } from "../../primitives/ButtonBase.js";
|
|
2
|
+
import { MenuProps } from "../menu/Menu.js";
|
|
3
|
+
import { SplitButtonSize, SplitButtonVariant } from "./split-button-styles.js";
|
|
4
|
+
import { ComponentPropsWithRef, ReactElement, ReactNode, Ref } from "react";
|
|
5
|
+
import { PressEvent } from "react-aria";
|
|
6
|
+
//#region src/components/split-button/SplitButton.d.ts
|
|
7
|
+
export interface SplitButtonClassNames {
|
|
8
|
+
/** The group holding both buttons; merged with `className`. */
|
|
9
|
+
root?: string;
|
|
10
|
+
/** The leading (main action) button. */
|
|
11
|
+
leading?: string;
|
|
12
|
+
/** Inner wrapper of the leading button, around its icon and label. */
|
|
13
|
+
content?: string;
|
|
14
|
+
/** The leading button's label text. */
|
|
15
|
+
label?: string;
|
|
16
|
+
/** The leading button's icon. */
|
|
17
|
+
icon?: string;
|
|
18
|
+
/** The trailing (menu) button. */
|
|
19
|
+
trailing?: string;
|
|
20
|
+
/** Inner wrapper of the trailing button, around its icon. */
|
|
21
|
+
trailingContent?: string;
|
|
22
|
+
/** The trailing button's chevron, which turns while the menu is open. */
|
|
23
|
+
menuIcon?: string;
|
|
24
|
+
}
|
|
25
|
+
/** Words a {@link SplitButton} announces. */
|
|
26
|
+
export interface SplitButtonLabels {
|
|
27
|
+
/**
|
|
28
|
+
* The trailing button's name; name it for what the menu holds ("More send options").
|
|
29
|
+
* @default "More options"
|
|
30
|
+
*/
|
|
31
|
+
menu: string;
|
|
32
|
+
}
|
|
33
|
+
interface SplitButtonOwnProps {
|
|
34
|
+
/** The M3 style of both buttons: filled, tonal, outlined or elevated. @default "filled" */
|
|
35
|
+
variant?: SplitButtonVariant;
|
|
36
|
+
/** Height, padding and label size of both buttons, from extra small to extra large. @default "sm" */
|
|
37
|
+
size?: SplitButtonSize;
|
|
38
|
+
/** Icon before the label, or on its own with `leadingLabel`. Hidden from assistive tech. */
|
|
39
|
+
leadingIcon?: ReactElement;
|
|
40
|
+
/** Words the split button announces, with English defaults. */
|
|
41
|
+
labels?: Partial<SplitButtonLabels>;
|
|
42
|
+
/**
|
|
43
|
+
* The `<Menu>` the trailing button opens, 4px below it and aligned with its end edge
|
|
44
|
+
* unless the menu sets its own `placement` or `offset`. Leave it out to open something
|
|
45
|
+
* else: the trailing button then takes an enclosing trigger (a `DialogTrigger`, a
|
|
46
|
+
* `RichTooltipTrigger`, …), or reports presses through `onTrailingPress` and `onOpenChange`.
|
|
47
|
+
*/
|
|
48
|
+
menu?: ReactElement<MenuProps>;
|
|
49
|
+
/** Called when the trailing button is pressed. Without a menu or trigger it also toggles `open`. */
|
|
50
|
+
onTrailingPress?: (event: PressEvent) => void;
|
|
51
|
+
/** Ref to the trailing button, e.g. to anchor a custom overlay to it. */
|
|
52
|
+
trailingRef?: Ref<HTMLButtonElement>;
|
|
53
|
+
/** Whether the trailing button's menu or overlay is open (controlled). */
|
|
54
|
+
open?: boolean;
|
|
55
|
+
/** Whether the menu starts open (uncontrolled). @default false */
|
|
56
|
+
defaultOpen?: boolean;
|
|
57
|
+
/** Called with the new state when the menu or overlay opens or closes. */
|
|
58
|
+
onOpenChange?: (open: boolean) => void;
|
|
59
|
+
/** Disables both buttons. @default false */
|
|
60
|
+
disabled?: boolean;
|
|
61
|
+
/** Classes for each part, by slot. `classNames.root` is merged with `className`. */
|
|
62
|
+
classNames?: SplitButtonClassNames;
|
|
63
|
+
}
|
|
64
|
+
/** The leading button shows a label, an icon and a label, or an icon alone. */
|
|
65
|
+
type LeadingContent = {
|
|
66
|
+
/** The leading button's label. */
|
|
67
|
+
children: ReactNode;
|
|
68
|
+
leadingLabel?: undefined;
|
|
69
|
+
} | {
|
|
70
|
+
children?: undefined;
|
|
71
|
+
leadingIcon: ReactElement;
|
|
72
|
+
/** Accessible name of an icon-only leading button. */
|
|
73
|
+
leadingLabel: string;
|
|
74
|
+
};
|
|
75
|
+
/** The leading button's own attributes; the rest of the DOM props go to the wrapper. */
|
|
76
|
+
interface LeadingActionProps extends Pick<ButtonBaseActionProps, 'onPress' | 'onPressStart' | 'onPressEnd'> {
|
|
77
|
+
/** The leading button's `type`, e.g. `submit` to send the form it's in. @default "button" */
|
|
78
|
+
type?: ButtonBaseActionProps['type'];
|
|
79
|
+
}
|
|
80
|
+
interface LeadingLinkProps extends Pick<ButtonBaseLinkProps, 'onPress'> {
|
|
81
|
+
/** Makes the leading button a link (`<a>`) to this URL. */
|
|
82
|
+
href: string;
|
|
83
|
+
/** The leading link's `target`, e.g. `_blank`. */
|
|
84
|
+
target?: ButtonBaseLinkProps['target'];
|
|
85
|
+
/** The leading link's `rel`, e.g. `noopener`. */
|
|
86
|
+
rel?: ButtonBaseLinkProps['rel'];
|
|
87
|
+
}
|
|
88
|
+
type LeadingProps = LeadingActionProps | LeadingLinkProps;
|
|
89
|
+
export type SplitButtonProps = SplitButtonOwnProps & LeadingContent & LeadingProps & Omit<ComponentPropsWithRef<'div'>, keyof SplitButtonOwnProps | 'children' | 'leadingLabel' | 'onPress' | 'onPressStart' | 'onPressEnd' | 'type'>;
|
|
90
|
+
/**
|
|
91
|
+
* M3 Expressive split button: a leading action and a trailing button that opens a menu
|
|
92
|
+
* of related actions (or another overlay). Five sizes (`xs`–`xl`) in the filled, tonal,
|
|
93
|
+
* outlined and elevated styles. While the menu is open the trailing button becomes round
|
|
94
|
+
* and its chevron turns over. The wrapper is a `group`; `className`, `style`, `data-*` and
|
|
95
|
+
* `aria-*` go on it, and leading-button props (`onPress`, `href`, …) go to the leading button.
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* <SplitButton
|
|
99
|
+
* leadingIcon={<SendIcon />}
|
|
100
|
+
* onPress={send}
|
|
101
|
+
* labels={{ menu: 'More send options' }}
|
|
102
|
+
* menu={<Menu onAction={schedule}><MenuItem key="later">Send later</MenuItem></Menu>}
|
|
103
|
+
* >
|
|
104
|
+
* Send
|
|
105
|
+
* </SplitButton>
|
|
106
|
+
*/
|
|
107
|
+
export declare function SplitButton(props: SplitButtonProps): import("react").JSX.Element;
|
|
108
|
+
//#endregion
|
|
109
|
+
//# sourceMappingURL=SplitButton.d.ts.map
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../utils/cn.js";
|
|
3
|
+
import { TriggerContext } from "../../primitives/TriggerContext.js";
|
|
4
|
+
import { ButtonBase } from "../../primitives/ButtonBase.js";
|
|
5
|
+
import { TouchTarget } from "../../primitives/TouchTarget.js";
|
|
6
|
+
import { mergeDataTokens } from "../../utils/merge-data-tokens.js";
|
|
7
|
+
import { MenuTrigger } from "../menu/menu-trigger.js";
|
|
8
|
+
import { splitButtonStyles } from "./split-button-styles.js";
|
|
9
|
+
import { cloneElement, useContext, useMemo } from "react";
|
|
10
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { useControlledState } from "react-stately/useControlledState";
|
|
12
|
+
//#region src/components/split-button/SplitButton.tsx
|
|
13
|
+
/** Material Symbols "keyboard_arrow_down" (Apache-2.0). */
|
|
14
|
+
function ArrowDownIcon() {
|
|
15
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
16
|
+
viewBox: "0 -960 960 960",
|
|
17
|
+
fill: "currentColor",
|
|
18
|
+
children: /* @__PURE__ */ jsx("path", { d: "M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z" })
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
const DEFAULT_LABELS = { menu: "More options" };
|
|
22
|
+
/**
|
|
23
|
+
* M3 Expressive split button: a leading action and a trailing button that opens a menu
|
|
24
|
+
* of related actions (or another overlay). Five sizes (`xs`–`xl`) in the filled, tonal,
|
|
25
|
+
* outlined and elevated styles. While the menu is open the trailing button becomes round
|
|
26
|
+
* and its chevron turns over. The wrapper is a `group`; `className`, `style`, `data-*` and
|
|
27
|
+
* `aria-*` go on it, and leading-button props (`onPress`, `href`, …) go to the leading button.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* <SplitButton
|
|
31
|
+
* leadingIcon={<SendIcon />}
|
|
32
|
+
* onPress={send}
|
|
33
|
+
* labels={{ menu: 'More send options' }}
|
|
34
|
+
* menu={<Menu onAction={schedule}><MenuItem key="later">Send later</MenuItem></Menu>}
|
|
35
|
+
* >
|
|
36
|
+
* Send
|
|
37
|
+
* </SplitButton>
|
|
38
|
+
*/
|
|
39
|
+
function SplitButton(props) {
|
|
40
|
+
const { variant = "filled", size = "sm", children, leadingIcon, leadingLabel, labels, menu, onTrailingPress, trailingRef, open, defaultOpen, onOpenChange, disabled, classNames, className, onPress, ...rest } = props;
|
|
41
|
+
const { href, target, rel, type, onPressStart, onPressEnd, ...root } = rest;
|
|
42
|
+
const outerTrigger = useContext(TriggerContext);
|
|
43
|
+
const [isOpen, setOpen] = useControlledState(open, defaultOpen ?? false, onOpenChange);
|
|
44
|
+
const styles = splitButtonStyles({
|
|
45
|
+
variant,
|
|
46
|
+
size
|
|
47
|
+
});
|
|
48
|
+
const hasTouchTarget = size === "xs" || size === "sm";
|
|
49
|
+
const halfTokens = {
|
|
50
|
+
"data-tokens": "md-comp-button",
|
|
51
|
+
"data-variant": variant
|
|
52
|
+
};
|
|
53
|
+
const leadingProps = {
|
|
54
|
+
...halfTokens,
|
|
55
|
+
"data-slot": "leading",
|
|
56
|
+
disabled,
|
|
57
|
+
onPress,
|
|
58
|
+
onPressStart,
|
|
59
|
+
onPressEnd,
|
|
60
|
+
"aria-label": leadingLabel,
|
|
61
|
+
className: styles.leading({ class: classNames?.leading }),
|
|
62
|
+
...href !== void 0 ? {
|
|
63
|
+
href,
|
|
64
|
+
target,
|
|
65
|
+
rel
|
|
66
|
+
} : { type }
|
|
67
|
+
};
|
|
68
|
+
const trailingProps = {
|
|
69
|
+
tokenAttributes: halfTokens,
|
|
70
|
+
label: labels?.menu ?? DEFAULT_LABELS.menu,
|
|
71
|
+
disabled,
|
|
72
|
+
hasTouchTarget,
|
|
73
|
+
buttonRef: trailingRef,
|
|
74
|
+
className: styles.trailing({ class: classNames?.trailing }),
|
|
75
|
+
contentClassName: styles.trailingContent({ class: classNames?.trailingContent }),
|
|
76
|
+
iconClassName: styles.menuIcon({ class: classNames?.menuIcon })
|
|
77
|
+
};
|
|
78
|
+
let trailing;
|
|
79
|
+
if (menu) trailing = /* @__PURE__ */ jsxs(MenuTrigger, {
|
|
80
|
+
open: isOpen,
|
|
81
|
+
onOpenChange: setOpen,
|
|
82
|
+
children: [/* @__PURE__ */ jsx(OpenOnMouseRelease, { children: /* @__PURE__ */ jsx(TrailingButton, {
|
|
83
|
+
...trailingProps,
|
|
84
|
+
open: isOpen,
|
|
85
|
+
onPress: onTrailingPress
|
|
86
|
+
}) }), cloneElement(menu, {
|
|
87
|
+
placement: menu.props.placement ?? "bottom-end",
|
|
88
|
+
offset: menu.props.offset ?? 4,
|
|
89
|
+
containerPadding: menu.props.containerPadding ?? 0
|
|
90
|
+
})]
|
|
91
|
+
});
|
|
92
|
+
else if (outerTrigger) trailing = /* @__PURE__ */ jsx(TrailingButton, {
|
|
93
|
+
...trailingProps,
|
|
94
|
+
open: outerTrigger["aria-expanded"] === true,
|
|
95
|
+
onPress: onTrailingPress
|
|
96
|
+
});
|
|
97
|
+
else trailing = /* @__PURE__ */ jsx(TrailingButton, {
|
|
98
|
+
...trailingProps,
|
|
99
|
+
open: isOpen,
|
|
100
|
+
"aria-expanded": isOpen,
|
|
101
|
+
onPress: (event) => {
|
|
102
|
+
setOpen(!isOpen);
|
|
103
|
+
onTrailingPress?.(event);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
107
|
+
role: "group",
|
|
108
|
+
...root,
|
|
109
|
+
"data-tokens": mergeDataTokens("md-comp-split-button", root),
|
|
110
|
+
"data-variant": variant,
|
|
111
|
+
"data-size": size,
|
|
112
|
+
className: styles.root({ class: cn(classNames?.root, className) }),
|
|
113
|
+
children: [/* @__PURE__ */ jsx(TriggerContext, {
|
|
114
|
+
value: null,
|
|
115
|
+
children: /* @__PURE__ */ jsx(ButtonBase, {
|
|
116
|
+
...leadingProps,
|
|
117
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
118
|
+
className: styles.content({ class: classNames?.content }),
|
|
119
|
+
children: [
|
|
120
|
+
hasTouchTarget && /* @__PURE__ */ jsx(TouchTarget, {}),
|
|
121
|
+
leadingIcon && /* @__PURE__ */ jsx("span", {
|
|
122
|
+
"aria-hidden": "true",
|
|
123
|
+
className: styles.icon({ class: classNames?.icon }),
|
|
124
|
+
children: leadingIcon
|
|
125
|
+
}),
|
|
126
|
+
children != null && /* @__PURE__ */ jsx("span", {
|
|
127
|
+
className: styles.label({ class: classNames?.label }),
|
|
128
|
+
children
|
|
129
|
+
})
|
|
130
|
+
]
|
|
131
|
+
})
|
|
132
|
+
})
|
|
133
|
+
}), trailing]
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* A menu trigger opens on pointer down for a mouse (React Aria, like native menus). The
|
|
138
|
+
* split button opens it on release instead, so the trailing button's pressed shape shows
|
|
139
|
+
* while it's held, as the spec draws it ("Pressed" before "Selected"; 2026-10-13). A
|
|
140
|
+
* release outside the button doesn't open it. Keyboard and touch are unchanged.
|
|
141
|
+
*/
|
|
142
|
+
function OpenOnMouseRelease({ children }) {
|
|
143
|
+
const trigger = useContext(TriggerContext);
|
|
144
|
+
const value = useMemo(() => {
|
|
145
|
+
if (!trigger) return null;
|
|
146
|
+
const { onPressStart, onPress } = trigger;
|
|
147
|
+
return {
|
|
148
|
+
...trigger,
|
|
149
|
+
onPressStart: (event) => {
|
|
150
|
+
if (event.pointerType !== "mouse") onPressStart?.(event);
|
|
151
|
+
},
|
|
152
|
+
onPress: (event) => {
|
|
153
|
+
if (event.pointerType === "mouse") {
|
|
154
|
+
event.target.closest("button")?.focus({ preventScroll: true });
|
|
155
|
+
onPressStart?.(event);
|
|
156
|
+
}
|
|
157
|
+
onPress?.(event);
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
}, [trigger]);
|
|
161
|
+
return /* @__PURE__ */ jsx(TriggerContext, {
|
|
162
|
+
value,
|
|
163
|
+
children
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* The trailing button. An enclosing trigger (the menu's or another overlay's) adds its
|
|
168
|
+
* press handler and `aria-expanded` through `TriggerContext`.
|
|
169
|
+
*/
|
|
170
|
+
function TrailingButton({ tokenAttributes, label, open, disabled, hasTouchTarget, buttonRef, onPress, "aria-expanded": ariaExpanded, className, contentClassName, iconClassName }) {
|
|
171
|
+
return /* @__PURE__ */ jsx(ButtonBase, {
|
|
172
|
+
...tokenAttributes,
|
|
173
|
+
"data-slot": "trailing",
|
|
174
|
+
ref: buttonRef,
|
|
175
|
+
"aria-label": label,
|
|
176
|
+
"aria-expanded": ariaExpanded,
|
|
177
|
+
"data-open": open || void 0,
|
|
178
|
+
disabled,
|
|
179
|
+
onPress,
|
|
180
|
+
className,
|
|
181
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
182
|
+
className: contentClassName,
|
|
183
|
+
children: [hasTouchTarget && /* @__PURE__ */ jsx(TouchTarget, {}), /* @__PURE__ */ jsx("span", {
|
|
184
|
+
"aria-hidden": "true",
|
|
185
|
+
"data-motion": "standard",
|
|
186
|
+
className: iconClassName,
|
|
187
|
+
children: /* @__PURE__ */ jsx(ArrowDownIcon, {})
|
|
188
|
+
})]
|
|
189
|
+
})
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
//#endregion
|
|
193
|
+
export { SplitButton };
|
|
194
|
+
|
|
195
|
+
//# sourceMappingURL=SplitButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SplitButton.js","names":[],"sources":["../../../src/components/split-button/SplitButton.tsx"],"sourcesContent":["'use client';\n\nimport {\n cloneElement,\n useContext,\n useMemo,\n type ComponentPropsWithRef,\n type ReactElement,\n type ReactNode,\n type Ref,\n} from 'react';\nimport type { PressEvent } from 'react-aria';\nimport { useControlledState } from 'react-stately/useControlledState';\nimport {\n ButtonBase,\n type ButtonBaseActionProps,\n type ButtonBaseLinkProps,\n} from '../../primitives/ButtonBase';\nimport { TouchTarget } from '../../primitives/TouchTarget';\nimport { TriggerContext, type TriggerContextValue } from '../../primitives/TriggerContext';\nimport { cn } from '../../utils/cn';\nimport type { MenuProps } from '../menu/Menu';\nimport { MenuTrigger } from '../menu/menu-trigger';\nimport {\n splitButtonStyles,\n type SplitButtonSize,\n type SplitButtonVariant,\n} from './split-button-styles';\nimport { mergeDataTokens } from '../../utils/merge-data-tokens';\n\n/** Material Symbols \"keyboard_arrow_down\" (Apache-2.0). */\nfunction ArrowDownIcon() {\n return (\n <svg viewBox=\"0 -960 960 960\" fill=\"currentColor\">\n <path d=\"M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z\" />\n </svg>\n );\n}\n\nexport interface SplitButtonClassNames {\n /** The group holding both buttons; merged with `className`. */\n root?: string;\n /** The leading (main action) button. */\n leading?: string;\n /** Inner wrapper of the leading button, around its icon and label. */\n content?: string;\n /** The leading button's label text. */\n label?: string;\n /** The leading button's icon. */\n icon?: string;\n /** The trailing (menu) button. */\n trailing?: string;\n /** Inner wrapper of the trailing button, around its icon. */\n trailingContent?: string;\n /** The trailing button's chevron, which turns while the menu is open. */\n menuIcon?: string;\n}\n\n/** Words a {@link SplitButton} announces. */\nexport interface SplitButtonLabels {\n /**\n * The trailing button's name; name it for what the menu holds (\"More send options\").\n * @default \"More options\"\n */\n menu: string;\n}\n\nconst DEFAULT_LABELS: SplitButtonLabels = { menu: 'More options' };\n\ninterface SplitButtonOwnProps {\n /** The M3 style of both buttons: filled, tonal, outlined or elevated. @default \"filled\" */\n variant?: SplitButtonVariant;\n /** Height, padding and label size of both buttons, from extra small to extra large. @default \"sm\" */\n size?: SplitButtonSize;\n /** Icon before the label, or on its own with `leadingLabel`. Hidden from assistive tech. */\n leadingIcon?: ReactElement;\n /** Words the split button announces, with English defaults. */\n labels?: Partial<SplitButtonLabels>;\n /**\n * The `<Menu>` the trailing button opens, 4px below it and aligned with its end edge\n * unless the menu sets its own `placement` or `offset`. Leave it out to open something\n * else: the trailing button then takes an enclosing trigger (a `DialogTrigger`, a\n * `RichTooltipTrigger`, …), or reports presses through `onTrailingPress` and `onOpenChange`.\n */\n menu?: ReactElement<MenuProps>;\n /** Called when the trailing button is pressed. Without a menu or trigger it also toggles `open`. */\n onTrailingPress?: (event: PressEvent) => void;\n /** Ref to the trailing button, e.g. to anchor a custom overlay to it. */\n trailingRef?: Ref<HTMLButtonElement>;\n /** Whether the trailing button's menu or overlay is open (controlled). */\n open?: boolean;\n /** Whether the menu starts open (uncontrolled). @default false */\n defaultOpen?: boolean;\n /** Called with the new state when the menu or overlay opens or closes. */\n onOpenChange?: (open: boolean) => void;\n /** Disables both buttons. @default false */\n disabled?: boolean;\n /** Classes for each part, by slot. `classNames.root` is merged with `className`. */\n classNames?: SplitButtonClassNames;\n}\n\n/** The leading button shows a label, an icon and a label, or an icon alone. */\ntype LeadingContent =\n | {\n /** The leading button's label. */\n children: ReactNode;\n leadingLabel?: undefined;\n }\n | {\n children?: undefined;\n leadingIcon: ReactElement;\n /** Accessible name of an icon-only leading button. */\n leadingLabel: string;\n };\n\n/** The leading button's own attributes; the rest of the DOM props go to the wrapper. */\ninterface LeadingActionProps extends Pick<\n ButtonBaseActionProps,\n 'onPress' | 'onPressStart' | 'onPressEnd'\n> {\n /** The leading button's `type`, e.g. `submit` to send the form it's in. @default \"button\" */\n type?: ButtonBaseActionProps['type'];\n}\n\ninterface LeadingLinkProps extends Pick<ButtonBaseLinkProps, 'onPress'> {\n /** Makes the leading button a link (`<a>`) to this URL. */\n href: string;\n /** The leading link's `target`, e.g. `_blank`. */\n target?: ButtonBaseLinkProps['target'];\n /** The leading link's `rel`, e.g. `noopener`. */\n rel?: ButtonBaseLinkProps['rel'];\n}\n\ntype LeadingProps = LeadingActionProps | LeadingLinkProps;\n\nexport type SplitButtonProps = SplitButtonOwnProps &\n LeadingContent &\n LeadingProps &\n Omit<\n ComponentPropsWithRef<'div'>,\n | keyof SplitButtonOwnProps\n | 'children'\n | 'leadingLabel'\n | 'onPress'\n | 'onPressStart'\n | 'onPressEnd'\n | 'type'\n >;\n\n/**\n * M3 Expressive split button: a leading action and a trailing button that opens a menu\n * of related actions (or another overlay). Five sizes (`xs`–`xl`) in the filled, tonal,\n * outlined and elevated styles. While the menu is open the trailing button becomes round\n * and its chevron turns over. The wrapper is a `group`; `className`, `style`, `data-*` and\n * `aria-*` go on it, and leading-button props (`onPress`, `href`, …) go to the leading button.\n *\n * @example\n * <SplitButton\n * leadingIcon={<SendIcon />}\n * onPress={send}\n * labels={{ menu: 'More send options' }}\n * menu={<Menu onAction={schedule}><MenuItem key=\"later\">Send later</MenuItem></Menu>}\n * >\n * Send\n * </SplitButton>\n */\nexport function SplitButton(props: SplitButtonProps) {\n const {\n variant = 'filled',\n size = 'sm',\n children,\n leadingIcon,\n leadingLabel,\n labels,\n menu,\n onTrailingPress,\n trailingRef,\n open,\n defaultOpen,\n onOpenChange,\n disabled,\n classNames,\n className,\n onPress,\n ...rest\n } = props;\n const { href, target, rel, type, onPressStart, onPressEnd, ...root } = rest as typeof rest & {\n href?: string;\n target?: string;\n rel?: string;\n type?: ButtonBaseActionProps['type'];\n onPressStart?: ButtonBaseActionProps['onPressStart'];\n onPressEnd?: ButtonBaseActionProps['onPressEnd'];\n };\n const outerTrigger = useContext(TriggerContext);\n const [isOpen, setOpen] = useControlledState(open, defaultOpen ?? false, onOpenChange);\n const styles = splitButtonStyles({ variant, size });\n const hasTouchTarget = size === 'xs' || size === 'sm';\n // The halves are buttons: they read Button's colour tokens (button-tokens.ts).\n const halfTokens = { 'data-tokens': 'md-comp-button', 'data-variant': variant };\n const leadingAttributes = { ...halfTokens, 'data-slot': 'leading' };\n const leadingProps = {\n ...leadingAttributes,\n disabled,\n onPress,\n onPressStart,\n onPressEnd,\n 'aria-label': leadingLabel,\n className: styles.leading({ class: classNames?.leading }),\n ...(href !== undefined ? { href, target, rel } : { type }),\n } as ButtonBaseActionProps | ButtonBaseLinkProps;\n\n const trailingProps = {\n tokenAttributes: halfTokens,\n label: labels?.menu ?? DEFAULT_LABELS.menu,\n disabled,\n hasTouchTarget,\n buttonRef: trailingRef,\n className: styles.trailing({ class: classNames?.trailing }),\n contentClassName: styles.trailingContent({ class: classNames?.trailingContent }),\n iconClassName: styles.menuIcon({ class: classNames?.menuIcon }),\n };\n\n let trailing: ReactNode;\n if (menu) {\n trailing = (\n <MenuTrigger open={isOpen} onOpenChange={setOpen}>\n <OpenOnMouseRelease>\n <TrailingButton {...trailingProps} open={isOpen} onPress={onTrailingPress} />\n </OpenOnMouseRelease>\n {cloneElement(menu, {\n placement: menu.props.placement ?? 'bottom-end',\n offset: menu.props.offset ?? 4,\n // Aligned with the trailing button even against the window's edge.\n containerPadding: menu.props.containerPadding ?? 0,\n })}\n </MenuTrigger>\n );\n } else if (outerTrigger) {\n // An enclosing trigger (dialog, sheet, rich tooltip) opens its overlay from here.\n trailing = (\n <TrailingButton\n {...trailingProps}\n open={outerTrigger['aria-expanded'] === true}\n onPress={onTrailingPress}\n />\n );\n } else {\n trailing = (\n <TrailingButton\n {...trailingProps}\n open={isOpen}\n aria-expanded={isOpen}\n onPress={(event) => {\n setOpen(!isOpen);\n onTrailingPress?.(event);\n }}\n />\n );\n }\n\n return (\n <div\n // A group of its two buttons, so assistive tech reads them together and an app may name\n // it (`aria-label`, which ARIA prohibits on a generic `div`).\n role=\"group\"\n {...root}\n // The component tokens' hooks (split-button-tokens.ts); `data-variant` and `data-size`\n // are also public styling hooks for apps.\n data-tokens={mergeDataTokens('md-comp-split-button', root)}\n data-variant={variant}\n data-size={size}\n className={styles.root({ class: cn(classNames?.root, className) })}\n >\n {/* The leading button must not pick up the trailing button's trigger props. */}\n <TriggerContext value={null}>\n <ButtonBase {...leadingProps}>\n <span className={styles.content({ class: classNames?.content })}>\n {hasTouchTarget && <TouchTarget />}\n {leadingIcon && (\n <span aria-hidden=\"true\" className={styles.icon({ class: classNames?.icon })}>\n {leadingIcon}\n </span>\n )}\n {children != null && (\n <span className={styles.label({ class: classNames?.label })}>{children}</span>\n )}\n </span>\n </ButtonBase>\n </TriggerContext>\n {trailing}\n </div>\n );\n}\n\n/**\n * A menu trigger opens on pointer down for a mouse (React Aria, like native menus). The\n * split button opens it on release instead, so the trailing button's pressed shape shows\n * while it's held, as the spec draws it (\"Pressed\" before \"Selected\"; 2026-10-13). A\n * release outside the button doesn't open it. Keyboard and touch are unchanged.\n */\nfunction OpenOnMouseRelease({ children }: { children: ReactNode }) {\n const trigger = useContext(TriggerContext);\n const value = useMemo<TriggerContextValue | null>(() => {\n if (!trigger) return null;\n const { onPressStart, onPress } = trigger;\n return {\n ...trigger,\n onPressStart: (event) => {\n if (event.pointerType !== 'mouse') onPressStart?.(event);\n },\n onPress: (event) => {\n if (event.pointerType === 'mouse') {\n // Focus the trigger first, so closing the menu returns focus to it.\n (event.target as Element).closest<HTMLElement>('button')?.focus({ preventScroll: true });\n onPressStart?.(event);\n }\n onPress?.(event);\n },\n };\n }, [trigger]);\n return <TriggerContext value={value}>{children}</TriggerContext>;\n}\n\ninterface TrailingButtonProps {\n /** Button's token hooks: `data-tokens` and `data-variant`. */\n tokenAttributes: { 'data-tokens': string; 'data-variant': string };\n label: string;\n open: boolean;\n disabled?: boolean;\n hasTouchTarget: boolean;\n buttonRef?: Ref<HTMLButtonElement>;\n onPress?: (event: PressEvent) => void;\n 'aria-expanded'?: boolean;\n className: string;\n contentClassName: string;\n iconClassName: string;\n}\n\n/**\n * The trailing button. An enclosing trigger (the menu's or another overlay's) adds its\n * press handler and `aria-expanded` through `TriggerContext`.\n */\nfunction TrailingButton({\n tokenAttributes,\n label,\n open,\n disabled,\n hasTouchTarget,\n buttonRef,\n onPress,\n 'aria-expanded': ariaExpanded,\n className,\n contentClassName,\n iconClassName,\n}: TrailingButtonProps) {\n return (\n <ButtonBase\n {...tokenAttributes}\n data-slot=\"trailing\"\n ref={buttonRef}\n aria-label={label}\n aria-expanded={ariaExpanded}\n data-open={open || undefined}\n disabled={disabled}\n onPress={onPress}\n className={className}\n >\n <span className={contentClassName}>\n {hasTouchTarget && <TouchTarget />}\n {/* M3: the trailing button always shows this icon, since it turns over when open. */}\n <span aria-hidden=\"true\" data-motion=\"standard\" className={iconClassName}>\n <ArrowDownIcon />\n </span>\n </span>\n </ButtonBase>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AA+BA,SAAS,gBAAgB;CACvB,OACE,oBAAC,OAAD;EAAK,SAAQ;EAAiB,MAAK;EACjC,UAAA,oBAAC,QAAD,EAAM,GAAE,wDAAyD,CAAA;CAC9D,CAAA;AAET;AA8BA,MAAM,iBAAoC,EAAE,MAAM,eAAe;;;;;;;;;;;;;;;;;;AAmGjE,SAAgB,YAAY,OAAyB;CACnD,MAAM,EACJ,UAAU,UACV,OAAO,MACP,UACA,aACA,cACA,QACA,MACA,iBACA,aACA,MACA,aACA,cACA,UACA,YACA,WACA,SACA,GAAG,SACD;CACJ,MAAM,EAAE,MAAM,QAAQ,KAAK,MAAM,cAAc,YAAY,GAAG,SAAS;CAQvE,MAAM,eAAe,WAAW,cAAc;CAC9C,MAAM,CAAC,QAAQ,WAAW,mBAAmB,MAAM,eAAe,OAAO,YAAY;CACrF,MAAM,SAAS,kBAAkB;EAAE;EAAS;CAAK,CAAC;CAClD,MAAM,iBAAiB,SAAS,QAAQ,SAAS;CAEjD,MAAM,aAAa;EAAE,eAAe;EAAkB,gBAAgB;CAAQ;CAE9E,MAAM,eAAe;EADO,GAAG;EAAY,aAAa;EAGtD;EACA;EACA;EACA;EACA,cAAc;EACd,WAAW,OAAO,QAAQ,EAAE,OAAO,YAAY,QAAQ,CAAC;EACxD,GAAI,SAAS,KAAA,IAAY;GAAE;GAAM;GAAQ;EAAI,IAAI,EAAE,KAAK;CAC1D;CAEA,MAAM,gBAAgB;EACpB,iBAAiB;EACjB,OAAO,QAAQ,QAAQ,eAAe;EACtC;EACA;EACA,WAAW;EACX,WAAW,OAAO,SAAS,EAAE,OAAO,YAAY,SAAS,CAAC;EAC1D,kBAAkB,OAAO,gBAAgB,EAAE,OAAO,YAAY,gBAAgB,CAAC;EAC/E,eAAe,OAAO,SAAS,EAAE,OAAO,YAAY,SAAS,CAAC;CAChE;CAEA,IAAI;CACJ,IAAI,MACF,WACE,qBAAC,aAAD;EAAa,MAAM;EAAQ,cAAc;EAAzC,UAAA,CACE,oBAAC,oBAAD,EAAA,UACE,oBAAC,gBAAD;GAAgB,GAAI;GAAe,MAAM;GAAQ,SAAS;EAAkB,CAAA,EAC1D,CAAA,GACnB,aAAa,MAAM;GAClB,WAAW,KAAK,MAAM,aAAa;GACnC,QAAQ,KAAK,MAAM,UAAU;GAE7B,kBAAkB,KAAK,MAAM,oBAAoB;EACnD,CAAC,CACU;;MAEV,IAAI,cAET,WACE,oBAAC,gBAAD;EACE,GAAI;EACJ,MAAM,aAAa,qBAAqB;EACxC,SAAS;CACV,CAAA;MAGH,WACE,oBAAC,gBAAD;EACE,GAAI;EACJ,MAAM;EACN,iBAAe;EACf,UAAU,UAAU;GAClB,QAAQ,CAAC,MAAM;GACf,kBAAkB,KAAK;EACzB;CACD,CAAA;CAIL,OACE,qBAAC,OAAD;EAGE,MAAK;EACL,GAAI;EAGJ,eAAa,gBAAgB,wBAAwB,IAAI;EACzD,gBAAc;EACd,aAAW;EACX,WAAW,OAAO,KAAK,EAAE,OAAO,GAAG,YAAY,MAAM,SAAS,EAAE,CAAC;EAVnE,UAAA,CAaE,oBAAC,gBAAD;GAAgB,OAAO;GACrB,UAAA,oBAAC,YAAD;IAAY,GAAI;IACd,UAAA,qBAAC,QAAD;KAAM,WAAW,OAAO,QAAQ,EAAE,OAAO,YAAY,QAAQ,CAAC;KAA9D,UAAA;MACG,kBAAkB,oBAAC,aAAD,CAAc,CAAA;MAChC,eACC,oBAAC,QAAD;OAAM,eAAY;OAAO,WAAW,OAAO,KAAK,EAAE,OAAO,YAAY,KAAK,CAAC;OACxE,UAAA;MACG,CAAA;MAEP,YAAY,QACX,oBAAC,QAAD;OAAM,WAAW,OAAO,MAAM,EAAE,OAAO,YAAY,MAAM,CAAC;OAAI;MAAe,CAAA;KAE3E;;GACI,CAAA;EACE,CAAA,GACf,QACE;;AAET;;;;;;;AAQA,SAAS,mBAAmB,EAAE,YAAqC;CACjE,MAAM,UAAU,WAAW,cAAc;CACzC,MAAM,QAAQ,cAA0C;EACtD,IAAI,CAAC,SAAS,OAAO;EACrB,MAAM,EAAE,cAAc,YAAY;EAClC,OAAO;GACL,GAAG;GACH,eAAe,UAAU;IACvB,IAAI,MAAM,gBAAgB,SAAS,eAAe,KAAK;GACzD;GACA,UAAU,UAAU;IAClB,IAAI,MAAM,gBAAgB,SAAS;KAEjC,MAAO,OAAmB,QAAqB,QAAQ,CAAC,EAAE,MAAM,EAAE,eAAe,KAAK,CAAC;KACvF,eAAe,KAAK;IACtB;IACA,UAAU,KAAK;GACjB;EACF;CACF,GAAG,CAAC,OAAO,CAAC;CACZ,OAAO,oBAAC,gBAAD;EAAuB;EAAQ;CAAyB,CAAA;AACjE;;;;;AAqBA,SAAS,eAAe,EACtB,iBACA,OACA,MACA,UACA,gBACA,WACA,SACA,iBAAiB,cACjB,WACA,kBACA,iBACsB;CACtB,OACE,oBAAC,YAAD;EACE,GAAI;EACJ,aAAU;EACV,KAAK;EACL,cAAY;EACZ,iBAAe;EACf,aAAW,QAAQ,KAAA;EACT;EACD;EACE;EAEX,UAAA,qBAAC,QAAD;GAAM,WAAW;GAAjB,UAAA,CACG,kBAAkB,oBAAC,aAAD,CAAc,CAAA,GAEjC,oBAAC,QAAD;IAAM,eAAY;IAAO,eAAY;IAAW,WAAW;IACzD,UAAA,oBAAC,eAAD,CAAgB,CAAA;GACZ,CAAA,CACF;;CACI,CAAA;AAEhB"}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import { VariantProps } from "../../utils/tv.js";
|
|
2
|
+
//#region src/components/split-button/split-button-styles.d.ts
|
|
3
|
+
/** Variant definitions for {@link SplitButton}; extend them to add variants. */
|
|
4
|
+
export declare const splitButtonStyles: import("tailwind-variants").TVReturnType<{
|
|
5
|
+
variant: {
|
|
6
|
+
readonly filled: {
|
|
7
|
+
readonly leading: string;
|
|
8
|
+
readonly trailing: string;
|
|
9
|
+
};
|
|
10
|
+
readonly elevated: {
|
|
11
|
+
readonly leading: string;
|
|
12
|
+
readonly trailing: string;
|
|
13
|
+
};
|
|
14
|
+
readonly tonal: {
|
|
15
|
+
readonly leading: string;
|
|
16
|
+
readonly trailing: string;
|
|
17
|
+
};
|
|
18
|
+
readonly outlined: {
|
|
19
|
+
readonly leading: "[--m3-button-border:1px] border-(length:--m3-button-border) border-solid border-[color:var(--_md-comp-button-outline-color)] bg-[var(--_md-comp-button-container-color)] text-[color:var(--_md-comp-button-label-text-color)] shadow-[shadow:var(--_md-comp-button-container-elevation)] data-disabled:not-data-selected:border-outline-variant/10";
|
|
20
|
+
readonly trailing: "[--m3-button-border:1px] border-(length:--m3-button-border) border-solid border-[color:var(--_md-comp-button-outline-color)] bg-[var(--_md-comp-button-container-color)] text-[color:var(--_md-comp-button-label-text-color)] shadow-[shadow:var(--_md-comp-button-container-elevation)] data-disabled:not-data-selected:border-outline-variant/10";
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
size: {
|
|
24
|
+
xs: {
|
|
25
|
+
root: string;
|
|
26
|
+
leading: string[];
|
|
27
|
+
content: string;
|
|
28
|
+
icon: string;
|
|
29
|
+
trailing: string[];
|
|
30
|
+
menuIcon: string;
|
|
31
|
+
};
|
|
32
|
+
sm: {
|
|
33
|
+
root: string;
|
|
34
|
+
leading: string[];
|
|
35
|
+
content: string;
|
|
36
|
+
icon: string;
|
|
37
|
+
trailing: string[];
|
|
38
|
+
menuIcon: string;
|
|
39
|
+
};
|
|
40
|
+
md: {
|
|
41
|
+
leading: string[];
|
|
42
|
+
content: string;
|
|
43
|
+
icon: string;
|
|
44
|
+
trailing: string[];
|
|
45
|
+
menuIcon: string;
|
|
46
|
+
};
|
|
47
|
+
lg: {
|
|
48
|
+
leading: string[];
|
|
49
|
+
content: string;
|
|
50
|
+
icon: string;
|
|
51
|
+
trailing: string[];
|
|
52
|
+
menuIcon: string;
|
|
53
|
+
};
|
|
54
|
+
xl: {
|
|
55
|
+
leading: string[];
|
|
56
|
+
content: string;
|
|
57
|
+
icon: string;
|
|
58
|
+
trailing: string[];
|
|
59
|
+
menuIcon: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
}, {
|
|
63
|
+
root: string;
|
|
64
|
+
leading: string[];
|
|
65
|
+
content: string;
|
|
66
|
+
trailingContent: string;
|
|
67
|
+
label: string;
|
|
68
|
+
icon: string;
|
|
69
|
+
trailing: string[];
|
|
70
|
+
menuIcon: string[];
|
|
71
|
+
}, undefined, {
|
|
72
|
+
variant: {
|
|
73
|
+
readonly filled: {
|
|
74
|
+
readonly leading: string;
|
|
75
|
+
readonly trailing: string;
|
|
76
|
+
};
|
|
77
|
+
readonly elevated: {
|
|
78
|
+
readonly leading: string;
|
|
79
|
+
readonly trailing: string;
|
|
80
|
+
};
|
|
81
|
+
readonly tonal: {
|
|
82
|
+
readonly leading: string;
|
|
83
|
+
readonly trailing: string;
|
|
84
|
+
};
|
|
85
|
+
readonly outlined: {
|
|
86
|
+
readonly leading: "[--m3-button-border:1px] border-(length:--m3-button-border) border-solid border-[color:var(--_md-comp-button-outline-color)] bg-[var(--_md-comp-button-container-color)] text-[color:var(--_md-comp-button-label-text-color)] shadow-[shadow:var(--_md-comp-button-container-elevation)] data-disabled:not-data-selected:border-outline-variant/10";
|
|
87
|
+
readonly trailing: "[--m3-button-border:1px] border-(length:--m3-button-border) border-solid border-[color:var(--_md-comp-button-outline-color)] bg-[var(--_md-comp-button-container-color)] text-[color:var(--_md-comp-button-label-text-color)] shadow-[shadow:var(--_md-comp-button-container-elevation)] data-disabled:not-data-selected:border-outline-variant/10";
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
size: {
|
|
91
|
+
xs: {
|
|
92
|
+
root: string;
|
|
93
|
+
leading: string[];
|
|
94
|
+
content: string;
|
|
95
|
+
icon: string;
|
|
96
|
+
trailing: string[];
|
|
97
|
+
menuIcon: string;
|
|
98
|
+
};
|
|
99
|
+
sm: {
|
|
100
|
+
root: string;
|
|
101
|
+
leading: string[];
|
|
102
|
+
content: string;
|
|
103
|
+
icon: string;
|
|
104
|
+
trailing: string[];
|
|
105
|
+
menuIcon: string;
|
|
106
|
+
};
|
|
107
|
+
md: {
|
|
108
|
+
leading: string[];
|
|
109
|
+
content: string;
|
|
110
|
+
icon: string;
|
|
111
|
+
trailing: string[];
|
|
112
|
+
menuIcon: string;
|
|
113
|
+
};
|
|
114
|
+
lg: {
|
|
115
|
+
leading: string[];
|
|
116
|
+
content: string;
|
|
117
|
+
icon: string;
|
|
118
|
+
trailing: string[];
|
|
119
|
+
menuIcon: string;
|
|
120
|
+
};
|
|
121
|
+
xl: {
|
|
122
|
+
leading: string[];
|
|
123
|
+
content: string;
|
|
124
|
+
icon: string;
|
|
125
|
+
trailing: string[];
|
|
126
|
+
menuIcon: string;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
}, {
|
|
130
|
+
root: string;
|
|
131
|
+
leading: string[];
|
|
132
|
+
content: string;
|
|
133
|
+
trailingContent: string;
|
|
134
|
+
label: string;
|
|
135
|
+
icon: string;
|
|
136
|
+
trailing: string[];
|
|
137
|
+
menuIcon: string[];
|
|
138
|
+
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
139
|
+
variant: {
|
|
140
|
+
readonly filled: {
|
|
141
|
+
readonly leading: string;
|
|
142
|
+
readonly trailing: string;
|
|
143
|
+
};
|
|
144
|
+
readonly elevated: {
|
|
145
|
+
readonly leading: string;
|
|
146
|
+
readonly trailing: string;
|
|
147
|
+
};
|
|
148
|
+
readonly tonal: {
|
|
149
|
+
readonly leading: string;
|
|
150
|
+
readonly trailing: string;
|
|
151
|
+
};
|
|
152
|
+
readonly outlined: {
|
|
153
|
+
readonly leading: "[--m3-button-border:1px] border-(length:--m3-button-border) border-solid border-[color:var(--_md-comp-button-outline-color)] bg-[var(--_md-comp-button-container-color)] text-[color:var(--_md-comp-button-label-text-color)] shadow-[shadow:var(--_md-comp-button-container-elevation)] data-disabled:not-data-selected:border-outline-variant/10";
|
|
154
|
+
readonly trailing: "[--m3-button-border:1px] border-(length:--m3-button-border) border-solid border-[color:var(--_md-comp-button-outline-color)] bg-[var(--_md-comp-button-container-color)] text-[color:var(--_md-comp-button-label-text-color)] shadow-[shadow:var(--_md-comp-button-container-elevation)] data-disabled:not-data-selected:border-outline-variant/10";
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
size: {
|
|
158
|
+
xs: {
|
|
159
|
+
root: string;
|
|
160
|
+
leading: string[];
|
|
161
|
+
content: string;
|
|
162
|
+
icon: string;
|
|
163
|
+
trailing: string[];
|
|
164
|
+
menuIcon: string;
|
|
165
|
+
};
|
|
166
|
+
sm: {
|
|
167
|
+
root: string;
|
|
168
|
+
leading: string[];
|
|
169
|
+
content: string;
|
|
170
|
+
icon: string;
|
|
171
|
+
trailing: string[];
|
|
172
|
+
menuIcon: string;
|
|
173
|
+
};
|
|
174
|
+
md: {
|
|
175
|
+
leading: string[];
|
|
176
|
+
content: string;
|
|
177
|
+
icon: string;
|
|
178
|
+
trailing: string[];
|
|
179
|
+
menuIcon: string;
|
|
180
|
+
};
|
|
181
|
+
lg: {
|
|
182
|
+
leading: string[];
|
|
183
|
+
content: string;
|
|
184
|
+
icon: string;
|
|
185
|
+
trailing: string[];
|
|
186
|
+
menuIcon: string;
|
|
187
|
+
};
|
|
188
|
+
xl: {
|
|
189
|
+
leading: string[];
|
|
190
|
+
content: string;
|
|
191
|
+
icon: string;
|
|
192
|
+
trailing: string[];
|
|
193
|
+
menuIcon: string;
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
}, {
|
|
197
|
+
root: string;
|
|
198
|
+
leading: string[];
|
|
199
|
+
content: string;
|
|
200
|
+
trailingContent: string;
|
|
201
|
+
label: string;
|
|
202
|
+
icon: string;
|
|
203
|
+
trailing: string[];
|
|
204
|
+
menuIcon: string[];
|
|
205
|
+
}>>;
|
|
206
|
+
/**
|
|
207
|
+
* The variants of {@link splitButtonStyles}, for building on its styles. They are the recipe's keys, not
|
|
208
|
+
* component props: their names (`hasIcon`, `isOpen`…) follow the classes and may change.
|
|
209
|
+
*/
|
|
210
|
+
export type SplitButtonStyleProps = VariantProps<typeof splitButtonStyles>;
|
|
211
|
+
export type SplitButtonVariant = NonNullable<SplitButtonStyleProps['variant']>;
|
|
212
|
+
export type SplitButtonSize = NonNullable<SplitButtonStyleProps['size']>;
|
|
213
|
+
//#endregion
|
|
214
|
+
//# sourceMappingURL=split-button-styles.d.ts.map
|