@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,270 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../utils/cn.js";
|
|
3
|
+
import { ToggleGroupStateContext } from "../../primitives/ButtonBase.js";
|
|
4
|
+
import { ButtonContext } from "../../components/button/ButtonContext.js";
|
|
5
|
+
import { Button } from "../../components/button/Button.js";
|
|
6
|
+
import { useWarnOnce } from "../../utils/warn-once.js";
|
|
7
|
+
import { IconButton } from "../../components/icon-button/IconButton.js";
|
|
8
|
+
import { buttonGroupStyles } from "./button-group-styles.js";
|
|
9
|
+
import { MenuTrigger } from "../../components/menu/menu-trigger.js";
|
|
10
|
+
import { DomDirectionLocale } from "../../primitives/DomDirectionLocale.js";
|
|
11
|
+
import { focusCheckedRadio, notePointerDown, radioGroupKeyDown } from "../../utils/radio-group-keys.js";
|
|
12
|
+
import { toolbarKeyDown } from "../../utils/toolbar-keys.js";
|
|
13
|
+
import { LazyOverflowMenuList } from "./lazy-overflow-menu.js";
|
|
14
|
+
import { useOverflow } from "./use-overflow.js";
|
|
15
|
+
import { usePressExpansion } from "./use-press-expansion.js";
|
|
16
|
+
import { Children, isValidElement, useContext, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
17
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
18
|
+
import { mergeProps, mergeRefs, useObjectRef, useToggleButtonGroup, useToolbar } from "react-aria";
|
|
19
|
+
import { useToggleGroupState } from "react-stately";
|
|
20
|
+
//#region src/composites/button-group/ButtonGroup.tsx
|
|
21
|
+
/** Material Symbols `more_vert` (Apache-2.0), the overflow indicator's icon. */
|
|
22
|
+
function MoreVertIcon() {
|
|
23
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
24
|
+
viewBox: "0 -960 960 960",
|
|
25
|
+
fill: "currentColor",
|
|
26
|
+
children: /* @__PURE__ */ jsx("path", { d: "M480-160q-33 0-56.5-23.5T400-240q0-33 23.5-56.5T480-320q33 0 56.5 23.5T560-240q0 33-23.5 56.5T480-160Zm0-240q-33 0-56.5-23.5T400-480q0-33 23.5-56.5T480-560q33 0 56.5 23.5T560-480q0 33-23.5 56.5T480-400Zm0-240q-33 0-56.5-23.5T400-720q0-33 23.5-56.5T480-800q33 0 56.5 23.5T560-720q0 33-23.5 56.5T480-640Z" })
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
const DEFAULT_LABELS = { more: "More options" };
|
|
30
|
+
const ICON_BUTTON_VARIANTS = [
|
|
31
|
+
"filled",
|
|
32
|
+
"tonal",
|
|
33
|
+
"outlined"
|
|
34
|
+
];
|
|
35
|
+
/** The icon button variant a group's `buttonVariant` implies, if it exists for icon buttons. */
|
|
36
|
+
function iconVariantOf(variant) {
|
|
37
|
+
return variant && ICON_BUTTON_VARIANTS.includes(variant) ? variant : void 0;
|
|
38
|
+
}
|
|
39
|
+
function positionOf(index, count) {
|
|
40
|
+
if (count < 2) return void 0;
|
|
41
|
+
if (index === 0) return "leading";
|
|
42
|
+
if (index === count - 1) return "trailing";
|
|
43
|
+
return "middle";
|
|
44
|
+
}
|
|
45
|
+
/** The group's ref, also reporting its element to `DomDirectionLocale`. */
|
|
46
|
+
function useGroupRef(ref, directionRef) {
|
|
47
|
+
const merged = useMemo(() => mergeRefs(ref, directionRef), [ref, directionRef]);
|
|
48
|
+
return useObjectRef(merged);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* M3 Expressive button group. Shares size, shape, variant and disabled with its `Button`
|
|
52
|
+
* and `IconButton` children. A standard group grows a pressed button while its neighbours
|
|
53
|
+
* shrink; a `connected` group joins the buttons with shared inner corners and, by default,
|
|
54
|
+
* only changes the pressed button's shape (`expandedRatio` opts it into the bump). Tab reaches the group and the arrow keys move
|
|
55
|
+
* between its buttons, wrapping, with Home and End (a `toolbar`). With `selectionMode`, toggle
|
|
56
|
+
* buttons that have a `value` form a single or multiple selection; a single selection is a
|
|
57
|
+
* radio group, whose arrow keys select as they move.
|
|
58
|
+
*
|
|
59
|
+
* Children must be direct `Button` / `IconButton` elements so each gets its position.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* <ButtonGroup variant="connected" selectionMode="single" defaultSelectedKeys={['week']}
|
|
63
|
+
* aria-label="Calendar view">
|
|
64
|
+
* <Button toggle value="day">Day</Button>
|
|
65
|
+
* <Button toggle value="week">Week</Button>
|
|
66
|
+
* <Button toggle value="month">Month</Button>
|
|
67
|
+
* </ButtonGroup>
|
|
68
|
+
*/
|
|
69
|
+
function ButtonGroup(props) {
|
|
70
|
+
return /* @__PURE__ */ jsx(DomDirectionLocale, { children: (directionRef) => /* @__PURE__ */ jsx(ButtonGroupRoot, {
|
|
71
|
+
...props,
|
|
72
|
+
directionRef
|
|
73
|
+
}) });
|
|
74
|
+
}
|
|
75
|
+
function ButtonGroupRoot({ variant = "standard", size, shape, buttonVariant, disabled, selectionMode = "none", selectedKeys, defaultSelectedKeys, onSelectionChange, deselectable = true, expandedRatio, overflow = false, labels, className, classNames, children, ref, directionRef, ...props }) {
|
|
76
|
+
const domRef = useGroupRef(ref, directionRef);
|
|
77
|
+
const parent = useContext(ButtonContext);
|
|
78
|
+
const hasSelection = selectionMode !== "none";
|
|
79
|
+
const currentKeys = useRef(/* @__PURE__ */ new Set());
|
|
80
|
+
const handleSelectionChange = (keys) => {
|
|
81
|
+
const previous = currentKeys.current;
|
|
82
|
+
if (keys.size === previous.size && [...keys].every((key) => previous.has(key))) return;
|
|
83
|
+
onSelectionChange?.(keys);
|
|
84
|
+
};
|
|
85
|
+
const state = useToggleGroupState({
|
|
86
|
+
selectionMode: hasSelection ? selectionMode : "single",
|
|
87
|
+
selectedKeys,
|
|
88
|
+
defaultSelectedKeys,
|
|
89
|
+
onSelectionChange: handleSelectionChange,
|
|
90
|
+
disallowEmptySelection: !deselectable,
|
|
91
|
+
isDisabled: disabled
|
|
92
|
+
});
|
|
93
|
+
const { groupProps } = useToggleButtonGroup({
|
|
94
|
+
...props,
|
|
95
|
+
isDisabled: disabled,
|
|
96
|
+
orientation: "horizontal"
|
|
97
|
+
}, state, domRef);
|
|
98
|
+
const { toolbarProps } = useToolbar({
|
|
99
|
+
...props,
|
|
100
|
+
orientation: "horizontal"
|
|
101
|
+
}, domRef);
|
|
102
|
+
const groupAria = withGroupKeys(hasSelection ? groupProps : toolbarProps, selectionMode === "single");
|
|
103
|
+
useLayoutEffect(() => {
|
|
104
|
+
currentKeys.current = state.selectedKeys;
|
|
105
|
+
});
|
|
106
|
+
usePressExpansion(domRef, expandedRatio ?? (variant === "standard" ? .15 : 0));
|
|
107
|
+
const groupSize = size ?? parent.size ?? "sm";
|
|
108
|
+
const iconButtonVariant = iconVariantOf(buttonVariant);
|
|
109
|
+
const shared = useMemo(() => ({
|
|
110
|
+
variant: buttonVariant ?? parent.variant,
|
|
111
|
+
size: size ?? parent.size,
|
|
112
|
+
shape: shape ?? parent.shape,
|
|
113
|
+
disabled: disabled ?? parent.disabled,
|
|
114
|
+
iconButtonVariant: iconButtonVariant ?? parent.iconButtonVariant,
|
|
115
|
+
density: parent.density
|
|
116
|
+
}), [
|
|
117
|
+
buttonVariant,
|
|
118
|
+
iconButtonVariant,
|
|
119
|
+
size,
|
|
120
|
+
shape,
|
|
121
|
+
disabled,
|
|
122
|
+
parent
|
|
123
|
+
]);
|
|
124
|
+
const items = Children.toArray(children).filter(isValidElement);
|
|
125
|
+
const visible = useOverflow(domRef, overflow, items.length);
|
|
126
|
+
const overflowing = overflow && visible < items.length;
|
|
127
|
+
useGroupWarnings(variant, items, buttonVariant, iconButtonVariant);
|
|
128
|
+
const shown = overflowing ? visible + 1 : items.length;
|
|
129
|
+
const contextFor = (index) => variant === "connected" ? {
|
|
130
|
+
...shared,
|
|
131
|
+
connected: positionOf(index, shown)
|
|
132
|
+
} : shared;
|
|
133
|
+
const content = items.map((child, index) => /* @__PURE__ */ jsx(ButtonContext, {
|
|
134
|
+
value: contextFor(Math.min(index, shown - 1)),
|
|
135
|
+
children: child
|
|
136
|
+
}, child.key ?? index));
|
|
137
|
+
if (overflow) content.push(/* @__PURE__ */ jsx(ButtonContext, {
|
|
138
|
+
value: contextFor(shown - 1),
|
|
139
|
+
children: /* @__PURE__ */ jsx(OverflowMenu, {
|
|
140
|
+
groupRef: domRef,
|
|
141
|
+
hidden: items.slice(visible),
|
|
142
|
+
offset: visible,
|
|
143
|
+
label: labels?.more ?? DEFAULT_LABELS.more,
|
|
144
|
+
selectionMode,
|
|
145
|
+
selectedKeys: state.selectedKeys,
|
|
146
|
+
disabled: Boolean(disabled ?? parent.disabled),
|
|
147
|
+
classNames
|
|
148
|
+
})
|
|
149
|
+
}, "overflow"));
|
|
150
|
+
return /* @__PURE__ */ jsx("div", {
|
|
151
|
+
...mergeProps(props, groupAria),
|
|
152
|
+
ref: domRef,
|
|
153
|
+
"data-variant": variant,
|
|
154
|
+
"data-size": groupSize,
|
|
155
|
+
className: cn(buttonGroupStyles({
|
|
156
|
+
variant,
|
|
157
|
+
size: groupSize,
|
|
158
|
+
overflow
|
|
159
|
+
}), classNames?.root, className),
|
|
160
|
+
children: hasSelection ? /* @__PURE__ */ jsx(ToggleGroupStateContext, {
|
|
161
|
+
value: state,
|
|
162
|
+
children: content
|
|
163
|
+
}) : content
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* The group's arrow keys. React Aria's toolbar keys (kept for Tab, which enters and leaves
|
|
168
|
+
* the group as one stop) are replaced: a toolbar's arrows wrap and Home and End reach its
|
|
169
|
+
* ends (WAI-ARIA APG toolbar), and a single selection is a radio group whose arrows also
|
|
170
|
+
* select (APG radio group, as `RadioGroup` does) and which Tab enters at the selected
|
|
171
|
+
* button. A group nested in a toolbar leaves its keys to the toolbar, as React Aria does.
|
|
172
|
+
*/
|
|
173
|
+
function withGroupKeys(aria, single) {
|
|
174
|
+
const ariaKeyDown = aria.onKeyDownCapture;
|
|
175
|
+
if (!ariaKeyDown) return aria;
|
|
176
|
+
return {
|
|
177
|
+
...aria,
|
|
178
|
+
onKeyDownCapture: (event) => {
|
|
179
|
+
if (event.key === "Tab") ariaKeyDown(event);
|
|
180
|
+
else if (single) radioGroupKeyDown(event);
|
|
181
|
+
else toolbarKeyDown(event, "horizontal");
|
|
182
|
+
},
|
|
183
|
+
onFocus: single ? (event) => void focusCheckedRadio(event) : void 0,
|
|
184
|
+
onPointerDownCapture: single ? notePointerDown : void 0
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Development warnings, once per group, for what the M3 button group guidelines advise
|
|
189
|
+
* against: standard icon buttons and text buttons in a group ("they have no container
|
|
190
|
+
* treatment"), and a connected group with nothing to select ("Avoid using a connected
|
|
191
|
+
* group when none of the buttons can be toggled"). Only the variants the group or the
|
|
192
|
+
* buttons set count: a toolbar's standard default doesn't.
|
|
193
|
+
*/
|
|
194
|
+
function useGroupWarnings(variant, items, buttonVariant, iconButtonVariant) {
|
|
195
|
+
const containerless = items.some((child) => child.type === IconButton ? (child.props.variant ?? iconButtonVariant) === "standard" : child.type === Button && (child.props.variant ?? buttonVariant) === "text");
|
|
196
|
+
const nothingToSelect = variant === "connected" && items.length > 0 && !items.some((child) => child.props.toggle);
|
|
197
|
+
useWarnOnce(containerless, "[@windmorph/react] Avoid standard icon buttons and text buttons in a ButtonGroup (M3): they have no container, so the group has nothing to shape.");
|
|
198
|
+
useWarnOnce(nothingToSelect, "[@windmorph/react] A connected ButtonGroup is for selection (M3): use toggle buttons in it, or a standard group for actions.");
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* The overflow indicator (Compose `ButtonGroupDefaults.OverflowIndicator`: a filled icon
|
|
202
|
+
* button with `more_vert` and a "More options" tooltip, here the group's icon button
|
|
203
|
+
* variant) and its menu. Choosing an item clicks the folded button itself, so its own
|
|
204
|
+
* press handler, link, toggle or group selection runs as if it had been pressed. The menu's
|
|
205
|
+
* code loads once a button folds (see `LazyOverflowMenuList`); the indicator is always
|
|
206
|
+
* rendered, so the group can measure it.
|
|
207
|
+
*/
|
|
208
|
+
function OverflowMenu({ groupRef, hidden, offset, label, selectionMode, selectedKeys, disabled, classNames }) {
|
|
209
|
+
const [pressed, setPressed] = useState(/* @__PURE__ */ new Set());
|
|
210
|
+
const elementAt = (key) => groupRef.current?.children[Number(key)];
|
|
211
|
+
const keyOf = (index) => String(offset + index);
|
|
212
|
+
const readPressed = () => setPressed(new Set(hidden.map((_, index) => keyOf(index)).filter((key) => elementAt(key)?.getAttribute("aria-pressed") === "true")));
|
|
213
|
+
const indicator = useRef(null);
|
|
214
|
+
const keepFocus = () => requestAnimationFrame(() => {
|
|
215
|
+
const active = document.activeElement;
|
|
216
|
+
if (!active || active === document.body || active.closest("[role=\"menu\"]")) indicator.current?.focus({ preventScroll: true });
|
|
217
|
+
});
|
|
218
|
+
const grouped = selectionMode !== "none";
|
|
219
|
+
const hasToggles = hidden.some((child) => child.props.toggle);
|
|
220
|
+
const menuSelectionMode = grouped ? selectionMode : hasToggles ? "multiple" : "none";
|
|
221
|
+
const selected = hidden.map((child, index) => ({
|
|
222
|
+
child,
|
|
223
|
+
key: keyOf(index)
|
|
224
|
+
})).filter(({ child, key }) => grouped ? child.props.value !== void 0 && selectedKeys.has(child.props.value) : pressed.has(key)).map(({ key }) => key);
|
|
225
|
+
const disabledKeys = hidden.map((child, index) => ({
|
|
226
|
+
child,
|
|
227
|
+
key: keyOf(index)
|
|
228
|
+
})).filter(({ child }) => disabled || child.props.disabled).map(({ key }) => key);
|
|
229
|
+
return /* @__PURE__ */ jsxs(MenuTrigger, {
|
|
230
|
+
onOpenChange: (open) => open ? readPressed() : keepFocus(),
|
|
231
|
+
children: [/* @__PURE__ */ jsx(IconButton, {
|
|
232
|
+
icon: /* @__PURE__ */ jsx(MoreVertIcon, {}),
|
|
233
|
+
"aria-label": label,
|
|
234
|
+
className: classNames?.overflowButton,
|
|
235
|
+
onPressStart: (event) => {
|
|
236
|
+
indicator.current = event.target;
|
|
237
|
+
}
|
|
238
|
+
}), hidden.length > 0 && /* @__PURE__ */ jsx(LazyOverflowMenuList, {
|
|
239
|
+
items: hidden.map((child, index) => ({
|
|
240
|
+
key: keyOf(index),
|
|
241
|
+
...describe(child, selected.includes(keyOf(index))),
|
|
242
|
+
checkable: grouped ? child.props.value !== void 0 : Boolean(child.props.toggle)
|
|
243
|
+
})),
|
|
244
|
+
selectionMode: menuSelectionMode,
|
|
245
|
+
selectedKeys: selected,
|
|
246
|
+
disabledKeys,
|
|
247
|
+
classNames: { panel: classNames?.overflowMenu },
|
|
248
|
+
onAction: (key) => {
|
|
249
|
+
elementAt(String(key))?.click();
|
|
250
|
+
setTimeout(readPressed);
|
|
251
|
+
}
|
|
252
|
+
})]
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
/** A folded button's menu label and icon. */
|
|
256
|
+
function describe(child, isSelected) {
|
|
257
|
+
const { props } = child;
|
|
258
|
+
if (child.type === IconButton) return {
|
|
259
|
+
label: props["aria-label"],
|
|
260
|
+
icon: isSelected && props.selectedIcon || props.icon
|
|
261
|
+
};
|
|
262
|
+
return {
|
|
263
|
+
label: props.children,
|
|
264
|
+
icon: isSelected && props.selectedLeadingIcon || props.leadingIcon
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
//#endregion
|
|
268
|
+
export { ButtonGroup };
|
|
269
|
+
|
|
270
|
+
//# sourceMappingURL=ButtonGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonGroup.js","names":[],"sources":["../../../src/composites/button-group/ButtonGroup.tsx"],"sourcesContent":["'use client';\n\nimport {\n Children,\n isValidElement,\n useContext,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n type ComponentPropsWithRef,\n type HTMLAttributes,\n type Key,\n type ReactElement,\n type ReactNode,\n type Ref,\n type RefCallback,\n type RefObject,\n} from 'react';\nimport { mergeProps, mergeRefs, useObjectRef, useToggleButtonGroup, useToolbar } from 'react-aria';\nimport { useToggleGroupState } from 'react-stately';\nimport { Button } from '../../components/button/Button';\nimport type { ButtonShape, ButtonSize, ButtonVariant } from '../../components/button/button-styles';\nimport {\n ButtonContext,\n ToggleGroupStateContext,\n type ButtonContextValue,\n} from '../../components/button/ButtonContext';\nimport { IconButton } from '../../components/icon-button/IconButton';\nimport type { IconButtonVariant } from '../../components/icon-button/icon-button-styles';\nimport { MenuTrigger } from '../../components/menu/menu-trigger';\nimport { DomDirectionLocale } from '../../primitives/DomDirectionLocale';\nimport { cn } from '../../utils/cn';\nimport {\n focusCheckedRadio,\n notePointerDown,\n radioGroupKeyDown,\n} from '../../utils/radio-group-keys';\nimport { toolbarKeyDown } from '../../utils/toolbar-keys';\nimport type { VariantProps } from '../../utils/tv';\nimport { useWarnOnce } from '../../utils/warn-once';\nimport { buttonGroupStyles } from './button-group-styles';\nimport { LazyOverflowMenuList } from './lazy-overflow-menu';\nimport { useOverflow } from './use-overflow';\nimport { usePressExpansion } from './use-press-expansion';\n\n/** Material Symbols `more_vert` (Apache-2.0), the overflow indicator's icon. */\nfunction MoreVertIcon() {\n return (\n <svg viewBox=\"0 -960 960 960\" fill=\"currentColor\">\n <path d=\"M480-160q-33 0-56.5-23.5T400-240q0-33 23.5-56.5T480-320q33 0 56.5 23.5T560-240q0 33-23.5 56.5T480-160Zm0-240q-33 0-56.5-23.5T400-480q0-33 23.5-56.5T480-560q33 0 56.5 23.5T560-480q0 33-23.5 56.5T480-400Zm0-240q-33 0-56.5-23.5T400-720q0-33 23.5-56.5T480-800q33 0 56.5 23.5T560-720q0 33-23.5 56.5T480-640Z\" />\n </svg>\n );\n}\n\nexport type ButtonGroupVariant = NonNullable<VariantProps<typeof buttonGroupStyles>['variant']>;\nexport type ButtonGroupSelectionMode = 'none' | 'single' | 'multiple';\n\n/** Text the group adds for assistive tech and its tooltip; translate it for your locale. */\nexport interface ButtonGroupLabels {\n /** The overflow indicator's name and tooltip. @default \"More options\" */\n more: string;\n}\n\nconst DEFAULT_LABELS: ButtonGroupLabels = { more: 'More options' };\n\nexport interface ButtonGroupClassNames {\n /** The group's outer element; `className` is merged here too. */\n root?: string;\n /** The overflow indicator, the \"More options\" icon button (`overflow`). */\n overflowButton?: string;\n /** The overflow indicator's menu of folded buttons (`overflow`). */\n overflowMenu?: string;\n}\n\nexport interface ButtonGroupProps extends Omit<\n ComponentPropsWithRef<'div'>,\n 'onChange' | 'defaultValue'\n> {\n /**\n * `standard` spaces the buttons apart (18 / 12 / 8px by size); `connected` joins them 2px\n * apart with shared inner corners across the container's width (the M3 Expressive\n * replacement for segmented buttons). A standard group grows a pressed button into its\n * neighbours' space; a connected one only changes its shape unless `expandedRatio` is set.\n * @default \"standard\"\n */\n variant?: ButtonGroupVariant;\n /**\n * Size shared by every button and icon button in the group; it also sets the spacing.\n * Unset, the buttons keep their own (or an enclosing toolbar's) size.\n * @default \"sm\"\n */\n size?: ButtonSize;\n /**\n * Shape shared by the buttons. A `square` connected group gives its outer corners the\n * size of its inner ones (4 / 8 / 8 / 16 / 20px). Unset, the buttons keep their own.\n * @default \"round\"\n */\n shape?: ButtonShape;\n /**\n * Variant shared by every `Button` in the group. `filled`, `tonal` and `outlined` reach\n * the `IconButton`s too, so a group never mixes colour styles; a button's own `variant`\n * wins. Unset, the buttons keep their own.\n * @default \"filled\"\n */\n buttonVariant?: ButtonVariant;\n /** Disables every button in the group. @default false */\n disabled?: boolean;\n /**\n * Lets toggle buttons with a `value` act as one selection. `single` behaves like\n * radio buttons, `multiple` like checkboxes. @default \"none\"\n */\n selectionMode?: ButtonGroupSelectionMode;\n /** Controlled selection: the `value`s of the selected toggle buttons. */\n selectedKeys?: Iterable<string>;\n /** Initial selection when uncontrolled. */\n defaultSelectedKeys?: Iterable<string>;\n /** Called with the selected toggle buttons' `value`s when the selection changes. */\n onSelectionChange?: (keys: Set<string>) => void;\n /**\n * The last selected button can be deselected, leaving none. `false` keeps at least one\n * selected. @default true\n */\n deselectable?: boolean;\n /**\n * How much a pressed button grows, as a fraction of its width; its neighbours shrink by the\n * same amount and the group keeps its width. `0` turns it off. Standard groups default to\n * 0.15. Connected groups default to 0 (the spec: they \"don't affect adjacent buttons\", as\n * in Compose's connected sample); set a ratio to opt in, as Compose can by combining a\n * button group's `animateWidth` with the connected shapes. Under reduced motion there's\n * no bump. @default 0.15, or 0 when `variant` is \"connected\"\n */\n expandedRatio?: number;\n /**\n * Folds the trailing buttons that don't fit into a menu behind a trailing \"More options\"\n * icon button (M3: \"Buttons at the trailing edge of the button group can be customized to\n * collapse into an overflow menu at smaller breakpoints\"). The group then fills its\n * container's width and re-measures as it resizes. Each folded button becomes a menu\n * item with its label (an icon button's `aria-label`) and icon; disabled buttons stay\n * disabled, and toggles show their selection. Choosing an item presses the button.\n * @default false\n */\n overflow?: boolean;\n /**\n * Text for assistive tech, e.g. the overflow indicator's name.\n * @default { more: \"More options\" }\n */\n labels?: Partial<ButtonGroupLabels>;\n /** Classes for each part. `classNames.root` is merged with `className`. */\n classNames?: ButtonGroupClassNames;\n children?: ReactNode;\n}\n\n/** The props the group reads from its children for the overflow menu and warnings. */\ninterface ChildProps {\n variant?: string;\n toggle?: boolean;\n value?: string;\n disabled?: boolean;\n children?: ReactNode;\n leadingIcon?: ReactElement;\n selectedLeadingIcon?: ReactElement;\n icon?: ReactElement;\n selectedIcon?: ReactElement;\n 'aria-label'?: string;\n}\n\nconst ICON_BUTTON_VARIANTS: readonly string[] = ['filled', 'tonal', 'outlined'];\n\n/** The icon button variant a group's `buttonVariant` implies, if it exists for icon buttons. */\nfunction iconVariantOf(variant: ButtonVariant | undefined): IconButtonVariant | undefined {\n return variant && ICON_BUTTON_VARIANTS.includes(variant)\n ? (variant as IconButtonVariant)\n : undefined;\n}\n\ntype Position = NonNullable<ButtonContextValue['connected']>;\n\nfunction positionOf(index: number, count: number): Position | undefined {\n if (count < 2) return undefined;\n if (index === 0) return 'leading';\n if (index === count - 1) return 'trailing';\n return 'middle';\n}\n\n/** The group's ref, also reporting its element to `DomDirectionLocale`. */\nfunction useGroupRef(ref: Ref<HTMLDivElement> | undefined, directionRef: RefCallback<HTMLElement>) {\n // Arrow keys follow the laid-out direction, which React Aria reads from its locale.\n const merged = useMemo(\n () => mergeRefs<HTMLDivElement>(ref, directionRef as RefCallback<HTMLDivElement>),\n [ref, directionRef],\n );\n return useObjectRef<HTMLDivElement>(merged);\n}\n\n/**\n * M3 Expressive button group. Shares size, shape, variant and disabled with its `Button`\n * and `IconButton` children. A standard group grows a pressed button while its neighbours\n * shrink; a `connected` group joins the buttons with shared inner corners and, by default,\n * only changes the pressed button's shape (`expandedRatio` opts it into the bump). Tab reaches the group and the arrow keys move\n * between its buttons, wrapping, with Home and End (a `toolbar`). With `selectionMode`, toggle\n * buttons that have a `value` form a single or multiple selection; a single selection is a\n * radio group, whose arrow keys select as they move.\n *\n * Children must be direct `Button` / `IconButton` elements so each gets its position.\n *\n * @example\n * <ButtonGroup variant=\"connected\" selectionMode=\"single\" defaultSelectedKeys={['week']}\n * aria-label=\"Calendar view\">\n * <Button toggle value=\"day\">Day</Button>\n * <Button toggle value=\"week\">Week</Button>\n * <Button toggle value=\"month\">Month</Button>\n * </ButtonGroup>\n */\nexport function ButtonGroup(props: ButtonGroupProps) {\n return (\n <DomDirectionLocale>\n {(directionRef) => <ButtonGroupRoot {...props} directionRef={directionRef} />}\n </DomDirectionLocale>\n );\n}\n\nfunction ButtonGroupRoot({\n variant = 'standard',\n size,\n shape,\n buttonVariant,\n disabled,\n selectionMode = 'none',\n selectedKeys,\n defaultSelectedKeys,\n onSelectionChange,\n deselectable = true,\n expandedRatio,\n overflow = false,\n labels,\n className,\n classNames,\n children,\n ref,\n directionRef,\n ...props\n}: ButtonGroupProps & { directionRef: RefCallback<HTMLElement> }) {\n const domRef = useGroupRef(ref, directionRef);\n const parent = useContext(ButtonContext);\n const hasSelection = selectionMode !== 'none';\n\n // React Stately reports a change even when the selection is unchanged (e.g. clicking\n // the only selected button of a group that isn't `deselectable`); only real changes reach callers.\n const currentKeys = useRef<ReadonlySet<Key>>(new Set());\n const handleSelectionChange = (keys: Set<Key>) => {\n const previous = currentKeys.current;\n if (keys.size === previous.size && [...keys].every((key) => previous.has(key))) return;\n onSelectionChange?.(keys as Set<string>);\n };\n\n const state = useToggleGroupState({\n selectionMode: hasSelection ? selectionMode : 'single',\n selectedKeys,\n defaultSelectedKeys,\n onSelectionChange: handleSelectionChange,\n disallowEmptySelection: !deselectable,\n isDisabled: disabled,\n });\n const { groupProps } = useToggleButtonGroup(\n { ...props, isDisabled: disabled, orientation: 'horizontal' },\n state,\n domRef,\n );\n // Without a selection the group is a React Aria toolbar: Tab enters and leaves it as one\n // stop, and the arrow keys move between its buttons.\n const { toolbarProps } = useToolbar({ ...props, orientation: 'horizontal' }, domRef);\n const groupAria = withGroupKeys(\n hasSelection ? groupProps : toolbarProps,\n selectionMode === 'single',\n );\n\n useLayoutEffect(() => {\n currentKeys.current = state.selectedKeys;\n });\n\n usePressExpansion(domRef, expandedRatio ?? (variant === 'standard' ? 0.15 : 0));\n\n const groupSize = size ?? parent.size ?? 'sm';\n const iconButtonVariant = iconVariantOf(buttonVariant);\n const shared = useMemo<ButtonContextValue>(\n () => ({\n variant: buttonVariant ?? parent.variant,\n size: size ?? parent.size,\n shape: shape ?? parent.shape,\n disabled: disabled ?? parent.disabled,\n iconButtonVariant: iconButtonVariant ?? parent.iconButtonVariant,\n density: parent.density,\n }),\n [buttonVariant, iconButtonVariant, size, shape, disabled, parent],\n );\n\n const items = Children.toArray(children).filter(isValidElement) as ReactElement<ChildProps>[];\n const visible = useOverflow(domRef, overflow, items.length);\n const overflowing = overflow && visible < items.length;\n\n useGroupWarnings(variant, items, buttonVariant, iconButtonVariant);\n\n // Connected corners follow the buttons that show, the overflow indicator last.\n const shown = overflowing ? visible + 1 : items.length;\n const contextFor = (index: number): ButtonContextValue =>\n variant === 'connected' ? { ...shared, connected: positionOf(index, shown) } : shared;\n const content = items.map((child, index) => (\n <ButtonContext key={child.key ?? index} value={contextFor(Math.min(index, shown - 1))}>\n {child}\n </ButtonContext>\n ));\n if (overflow) {\n content.push(\n <ButtonContext key=\"overflow\" value={contextFor(shown - 1)}>\n <OverflowMenu\n groupRef={domRef}\n hidden={items.slice(visible)}\n offset={visible}\n label={labels?.more ?? DEFAULT_LABELS.more}\n selectionMode={selectionMode}\n selectedKeys={state.selectedKeys}\n disabled={Boolean(disabled ?? parent.disabled)}\n classNames={classNames}\n />\n </ButtonContext>,\n );\n }\n\n return (\n <div\n {...mergeProps(props, groupAria)}\n ref={domRef}\n // Public styling hooks for apps, as on Button: the group's variant and the size it spaces\n // its buttons for (its own, an enclosing toolbar's, or `sm`).\n data-variant={variant}\n data-size={groupSize}\n className={cn(\n buttonGroupStyles({ variant, size: groupSize, overflow }),\n classNames?.root,\n className,\n )}\n >\n {hasSelection ? (\n <ToggleGroupStateContext value={state}>{content}</ToggleGroupStateContext>\n ) : (\n content\n )}\n </div>\n );\n}\n\n/**\n * The group's arrow keys. React Aria's toolbar keys (kept for Tab, which enters and leaves\n * the group as one stop) are replaced: a toolbar's arrows wrap and Home and End reach its\n * ends (WAI-ARIA APG toolbar), and a single selection is a radio group whose arrows also\n * select (APG radio group, as `RadioGroup` does) and which Tab enters at the selected\n * button. A group nested in a toolbar leaves its keys to the toolbar, as React Aria does.\n */\nfunction withGroupKeys(\n aria: HTMLAttributes<HTMLElement>,\n single: boolean,\n): HTMLAttributes<HTMLElement> {\n const ariaKeyDown = aria.onKeyDownCapture;\n if (!ariaKeyDown) return aria;\n return {\n ...aria,\n onKeyDownCapture: (event) => {\n if (event.key === 'Tab') ariaKeyDown(event);\n else if (single) radioGroupKeyDown(event);\n else toolbarKeyDown(event, 'horizontal');\n },\n onFocus: single ? (event) => void focusCheckedRadio(event) : undefined,\n onPointerDownCapture: single ? notePointerDown : undefined,\n };\n}\n\n/**\n * Development warnings, once per group, for what the M3 button group guidelines advise\n * against: standard icon buttons and text buttons in a group (\"they have no container\n * treatment\"), and a connected group with nothing to select (\"Avoid using a connected\n * group when none of the buttons can be toggled\"). Only the variants the group or the\n * buttons set count: a toolbar's standard default doesn't.\n */\nfunction useGroupWarnings(\n variant: ButtonGroupVariant,\n items: ReactElement<ChildProps>[],\n buttonVariant: ButtonVariant | undefined,\n iconButtonVariant: IconButtonVariant | undefined,\n) {\n const containerless = items.some((child) =>\n child.type === IconButton\n ? (child.props.variant ?? iconButtonVariant) === 'standard'\n : child.type === Button && (child.props.variant ?? buttonVariant) === 'text',\n );\n const nothingToSelect =\n variant === 'connected' && items.length > 0 && !items.some((child) => child.props.toggle);\n useWarnOnce(\n containerless,\n '[@windmorph/react] Avoid standard icon buttons and text buttons in a ButtonGroup (M3): they have no container, so the group has nothing to shape.',\n );\n useWarnOnce(\n nothingToSelect,\n '[@windmorph/react] A connected ButtonGroup is for selection (M3): use toggle buttons in it, or a standard group for actions.',\n );\n}\n\ninterface OverflowMenuProps {\n groupRef: RefObject<HTMLDivElement | null>;\n /** The folded buttons, in order. */\n hidden: ReactElement<ChildProps>[];\n /** The index of the first folded button among the group's children. */\n offset: number;\n label: string;\n selectionMode: ButtonGroupSelectionMode;\n selectedKeys: ReadonlySet<Key>;\n disabled: boolean;\n classNames: ButtonGroupClassNames | undefined;\n}\n\n/**\n * The overflow indicator (Compose `ButtonGroupDefaults.OverflowIndicator`: a filled icon\n * button with `more_vert` and a \"More options\" tooltip, here the group's icon button\n * variant) and its menu. Choosing an item clicks the folded button itself, so its own\n * press handler, link, toggle or group selection runs as if it had been pressed. The menu's\n * code loads once a button folds (see `LazyOverflowMenuList`); the indicator is always\n * rendered, so the group can measure it.\n */\nfunction OverflowMenu({\n groupRef,\n hidden,\n offset,\n label,\n selectionMode,\n selectedKeys,\n disabled,\n classNames,\n}: OverflowMenuProps) {\n // Folded standalone toggles keep their state inside them: read it when the menu opens\n // and after each choice.\n const [pressed, setPressed] = useState<ReadonlySet<string>>(new Set());\n const elementAt = (key: string) =>\n groupRef.current?.children[Number(key)] as HTMLElement | undefined;\n const keyOf = (index: number) => String(offset + index);\n const readPressed = () =>\n setPressed(\n new Set(\n hidden\n .map((_, index) => keyOf(index))\n .filter((key) => elementAt(key)?.getAttribute('aria-pressed') === 'true'),\n ),\n );\n\n // A choice made with the mouse closed the menu with focus still on its item, which then\n // left with the menu and dropped focus on <body>. Once the menu has closed, focus still in\n // it (or on the page) goes back to the indicator, as after a keyboard choice (2026-10-15).\n const indicator = useRef<HTMLElement | null>(null);\n const keepFocus = () =>\n requestAnimationFrame(() => {\n const active = document.activeElement;\n if (!active || active === document.body || active.closest('[role=\"menu\"]')) {\n indicator.current?.focus({ preventScroll: true });\n }\n });\n\n const grouped = selectionMode !== 'none';\n const hasToggles = hidden.some((child) => child.props.toggle);\n const menuSelectionMode = grouped ? selectionMode : hasToggles ? 'multiple' : 'none';\n const selected = hidden\n .map((child, index) => ({ child, key: keyOf(index) }))\n .filter(({ child, key }) =>\n grouped\n ? child.props.value !== undefined && selectedKeys.has(child.props.value)\n : pressed.has(key),\n )\n .map(({ key }) => key);\n const disabledKeys = hidden\n .map((child, index) => ({ child, key: keyOf(index) }))\n .filter(({ child }) => disabled || child.props.disabled)\n .map(({ key }) => key);\n\n return (\n <MenuTrigger onOpenChange={(open) => (open ? readPressed() : keepFocus())}>\n <IconButton\n icon={<MoreVertIcon />}\n aria-label={label}\n className={classNames?.overflowButton}\n onPressStart={(event) => {\n indicator.current = event.target as HTMLElement;\n }}\n />\n {hidden.length > 0 && (\n <LazyOverflowMenuList\n items={hidden.map((child, index) => ({\n key: keyOf(index),\n ...describe(child, selected.includes(keyOf(index))),\n // Only a toggle (or a button in the group's selection) is checkable; an action\n // stays a plain item even when the menu is selectable.\n checkable: grouped ? child.props.value !== undefined : Boolean(child.props.toggle),\n }))}\n selectionMode={menuSelectionMode}\n selectedKeys={selected}\n disabledKeys={disabledKeys}\n classNames={{ panel: classNames?.overflowMenu }}\n onAction={(key) => {\n elementAt(String(key))?.click();\n // The button updates once this event is handled.\n setTimeout(readPressed);\n }}\n />\n )}\n </MenuTrigger>\n );\n}\n\n/** A folded button's menu label and icon. */\nfunction describe(child: ReactElement<ChildProps>, isSelected: boolean) {\n const { props } = child;\n if (child.type === IconButton) {\n return {\n label: props['aria-label'],\n icon: (isSelected && props.selectedIcon) || props.icon,\n };\n }\n return {\n label: props.children,\n icon: (isSelected && props.selectedLeadingIcon) || props.leadingIcon,\n };\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
//#region src/composites/button-group/button-group-styles.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Variant definitions for `ButtonGroup`, from the M3 Expressive button group specs
|
|
4
|
+
* (2026-10-13). Standard groups space their buttons 18 / 12 / 8 / 8 / 8px apart (XS–XL), so
|
|
5
|
+
* the XS and S buttons' 48px targets don't overlap. Connected groups are 2px apart at every
|
|
6
|
+
* size, and span their container with the buttons sharing the extra width ("The connected
|
|
7
|
+
* button group should span the width of the page or surface it's placed on"); a consumer
|
|
8
|
+
* `w-fit` (or a `max-w-*`) narrows it. Connected buttons are equally wide (2026-10-13, as
|
|
9
|
+
* Compose's connected sample gives each `weight(1f)`): the group is a grid of `1fr` columns
|
|
10
|
+
* (2026-10-15), so a definite width is shared equally, and a group sized by its content gives
|
|
11
|
+
* every button the widest one's natural width, never squeezing a longer label into its
|
|
12
|
+
* padding. The columns are `minmax(auto, 1fr)`, so with too little room a button shrinks no
|
|
13
|
+
* further than its own minimum width, as in a flex row. `auto-cols-auto` on the group sizes
|
|
14
|
+
* them by their content instead. While the press
|
|
15
|
+
* bump pins the buttons' widths (`data-pinned`), the group lays them out as a flex row of the
|
|
16
|
+
* same widths, so the bump can animate their `flex-basis`.
|
|
17
|
+
*
|
|
18
|
+
* With `overflow`, a standard group fills its container's width too, so it can measure the
|
|
19
|
+
* room it has; its buttons stay at the start. Buttons folded into the overflow menu carry
|
|
20
|
+
* `data-overflow-hidden`; while measuring, the group is a flex row of its content's width
|
|
21
|
+
* and no button grows.
|
|
22
|
+
*/
|
|
23
|
+
export declare const buttonGroupStyles: import("tailwind-variants").TVReturnType<{
|
|
24
|
+
variant: {
|
|
25
|
+
standard: "inline-flex";
|
|
26
|
+
connected: "grid w-full grid-flow-col auto-cols-[1fr] gap-[2px] data-pinned:flex";
|
|
27
|
+
};
|
|
28
|
+
size: {
|
|
29
|
+
xs: "";
|
|
30
|
+
sm: "";
|
|
31
|
+
md: "";
|
|
32
|
+
lg: "";
|
|
33
|
+
xl: "";
|
|
34
|
+
};
|
|
35
|
+
overflow: {
|
|
36
|
+
true: "w-full min-w-0 *:data-overflow-hidden:hidden data-measuring:flex data-measuring:w-max data-measuring:*:grow-0";
|
|
37
|
+
false: "";
|
|
38
|
+
};
|
|
39
|
+
}, undefined, "items-center", {
|
|
40
|
+
variant: {
|
|
41
|
+
standard: "inline-flex";
|
|
42
|
+
connected: "grid w-full grid-flow-col auto-cols-[1fr] gap-[2px] data-pinned:flex";
|
|
43
|
+
};
|
|
44
|
+
size: {
|
|
45
|
+
xs: "";
|
|
46
|
+
sm: "";
|
|
47
|
+
md: "";
|
|
48
|
+
lg: "";
|
|
49
|
+
xl: "";
|
|
50
|
+
};
|
|
51
|
+
overflow: {
|
|
52
|
+
true: "w-full min-w-0 *:data-overflow-hidden:hidden data-measuring:flex data-measuring:w-max data-measuring:*:grow-0";
|
|
53
|
+
false: "";
|
|
54
|
+
};
|
|
55
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
56
|
+
variant: {
|
|
57
|
+
standard: "inline-flex";
|
|
58
|
+
connected: "grid w-full grid-flow-col auto-cols-[1fr] gap-[2px] data-pinned:flex";
|
|
59
|
+
};
|
|
60
|
+
size: {
|
|
61
|
+
xs: "";
|
|
62
|
+
sm: "";
|
|
63
|
+
md: "";
|
|
64
|
+
lg: "";
|
|
65
|
+
xl: "";
|
|
66
|
+
};
|
|
67
|
+
overflow: {
|
|
68
|
+
true: "w-full min-w-0 *:data-overflow-hidden:hidden data-measuring:flex data-measuring:w-max data-measuring:*:grow-0";
|
|
69
|
+
false: "";
|
|
70
|
+
};
|
|
71
|
+
}, undefined>>;
|
|
72
|
+
//#endregion
|
|
73
|
+
//# sourceMappingURL=button-group-styles.d.ts.map
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { tv } from "../../utils/tv.js";
|
|
2
|
+
//#region src/composites/button-group/button-group-styles.ts
|
|
3
|
+
/**
|
|
4
|
+
* Variant definitions for `ButtonGroup`, from the M3 Expressive button group specs
|
|
5
|
+
* (2026-10-13). Standard groups space their buttons 18 / 12 / 8 / 8 / 8px apart (XS–XL), so
|
|
6
|
+
* the XS and S buttons' 48px targets don't overlap. Connected groups are 2px apart at every
|
|
7
|
+
* size, and span their container with the buttons sharing the extra width ("The connected
|
|
8
|
+
* button group should span the width of the page or surface it's placed on"); a consumer
|
|
9
|
+
* `w-fit` (or a `max-w-*`) narrows it. Connected buttons are equally wide (2026-10-13, as
|
|
10
|
+
* Compose's connected sample gives each `weight(1f)`): the group is a grid of `1fr` columns
|
|
11
|
+
* (2026-10-15), so a definite width is shared equally, and a group sized by its content gives
|
|
12
|
+
* every button the widest one's natural width, never squeezing a longer label into its
|
|
13
|
+
* padding. The columns are `minmax(auto, 1fr)`, so with too little room a button shrinks no
|
|
14
|
+
* further than its own minimum width, as in a flex row. `auto-cols-auto` on the group sizes
|
|
15
|
+
* them by their content instead. While the press
|
|
16
|
+
* bump pins the buttons' widths (`data-pinned`), the group lays them out as a flex row of the
|
|
17
|
+
* same widths, so the bump can animate their `flex-basis`.
|
|
18
|
+
*
|
|
19
|
+
* With `overflow`, a standard group fills its container's width too, so it can measure the
|
|
20
|
+
* room it has; its buttons stay at the start. Buttons folded into the overflow menu carry
|
|
21
|
+
* `data-overflow-hidden`; while measuring, the group is a flex row of its content's width
|
|
22
|
+
* and no button grows.
|
|
23
|
+
*/
|
|
24
|
+
const buttonGroupStyles = tv({
|
|
25
|
+
base: "items-center",
|
|
26
|
+
variants: {
|
|
27
|
+
variant: {
|
|
28
|
+
standard: "inline-flex",
|
|
29
|
+
connected: "grid w-full grid-flow-col auto-cols-[1fr] gap-[2px] data-pinned:flex"
|
|
30
|
+
},
|
|
31
|
+
size: {
|
|
32
|
+
xs: "",
|
|
33
|
+
sm: "",
|
|
34
|
+
md: "",
|
|
35
|
+
lg: "",
|
|
36
|
+
xl: ""
|
|
37
|
+
},
|
|
38
|
+
overflow: {
|
|
39
|
+
true: "w-full min-w-0 *:data-overflow-hidden:hidden data-measuring:flex data-measuring:w-max data-measuring:*:grow-0",
|
|
40
|
+
false: ""
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
compoundVariants: [
|
|
44
|
+
{
|
|
45
|
+
variant: "standard",
|
|
46
|
+
overflow: true,
|
|
47
|
+
class: "flex"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
variant: "standard",
|
|
51
|
+
size: "xs",
|
|
52
|
+
class: [
|
|
53
|
+
"gap-(--m3-button-group-gap)",
|
|
54
|
+
"[--m3-button-group-gap:max(18px,calc(48px-max(24px,calc(32px+var(--md-sys-density,0)*4px))))]",
|
|
55
|
+
"has-[[data-tokens~=md-comp-icon-button][data-width=narrow]]:[--m3-button-group-gap:max(18px,calc(48px-max(24px,calc(28px+var(--md-sys-density,0)*4px))))]"
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
variant: "standard",
|
|
60
|
+
size: "sm",
|
|
61
|
+
class: [
|
|
62
|
+
"gap-(--m3-button-group-gap)",
|
|
63
|
+
"[--m3-button-group-gap:max(12px,calc(8px-var(--md-sys-density,0)*4px))]",
|
|
64
|
+
"has-[[data-tokens~=md-comp-icon-button][data-width=narrow]]:[--m3-button-group-gap:max(12px,calc(48px-max(28px,calc(32px+var(--md-sys-density,0)*4px))))]"
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
variant: "standard",
|
|
69
|
+
size: "md",
|
|
70
|
+
class: ["gap-(--m3-button-group-gap) [--m3-button-group-gap:8px]", "has-[[data-tokens~=md-comp-icon-button][data-width=narrow]]:[--m3-button-group-gap:max(8px,calc(var(--md-sys-density,0)*-4px))]"]
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
variant: "standard",
|
|
74
|
+
size: ["lg", "xl"],
|
|
75
|
+
class: "gap-[8px]"
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
defaultVariants: {
|
|
79
|
+
variant: "standard",
|
|
80
|
+
size: "sm",
|
|
81
|
+
overflow: false
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
//#endregion
|
|
85
|
+
export { buttonGroupStyles };
|
|
86
|
+
|
|
87
|
+
//# sourceMappingURL=button-group-styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-group-styles.js","names":[],"sources":["../../../src/composites/button-group/button-group-styles.ts"],"sourcesContent":["import { tv } from '../../utils/tv';\n\n/**\n * Variant definitions for `ButtonGroup`, from the M3 Expressive button group specs\n * (2026-10-13). Standard groups space their buttons 18 / 12 / 8 / 8 / 8px apart (XS–XL), so\n * the XS and S buttons' 48px targets don't overlap. Connected groups are 2px apart at every\n * size, and span their container with the buttons sharing the extra width (\"The connected\n * button group should span the width of the page or surface it's placed on\"); a consumer\n * `w-fit` (or a `max-w-*`) narrows it. Connected buttons are equally wide (2026-10-13, as\n * Compose's connected sample gives each `weight(1f)`): the group is a grid of `1fr` columns\n * (2026-10-15), so a definite width is shared equally, and a group sized by its content gives\n * every button the widest one's natural width, never squeezing a longer label into its\n * padding. The columns are `minmax(auto, 1fr)`, so with too little room a button shrinks no\n * further than its own minimum width, as in a flex row. `auto-cols-auto` on the group sizes\n * them by their content instead. While the press\n * bump pins the buttons' widths (`data-pinned`), the group lays them out as a flex row of the\n * same widths, so the bump can animate their `flex-basis`.\n *\n * With `overflow`, a standard group fills its container's width too, so it can measure the\n * room it has; its buttons stay at the start. Buttons folded into the overflow menu carry\n * `data-overflow-hidden`; while measuring, the group is a flex row of its content's width\n * and no button grows.\n */\nexport const buttonGroupStyles = tv({\n base: 'items-center',\n variants: {\n variant: {\n standard: 'inline-flex',\n connected: 'grid w-full grid-flow-col auto-cols-[1fr] gap-[2px] data-pinned:flex',\n },\n size: { xs: '', sm: '', md: '', lg: '', xl: '' },\n overflow: {\n true: 'w-full min-w-0 *:data-overflow-hidden:hidden data-measuring:flex data-measuring:w-max data-measuring:*:grow-0',\n false: '',\n },\n },\n compoundVariants: [\n { variant: 'standard', overflow: true, class: 'flex' },\n // XS and S: the spec's 18 / 12px, growing as density shrinks the icon buttons (their\n // default widths: XS max(24px, 32px + 4px a step), S 40px + 4px a step), so neighbouring\n // centres stay 48px apart and their 48px touch targets never overlap (2026-10-15). A\n // group holding a narrow icon button spaces by the narrow width instead (XS max(24px,\n // 28px + 4px a step), S max(28px, 32px + 4px a step), M 48px + 4px a step), so the gap is\n // max(spec, 48px − narrow width) (2026-10-17). The gap is a variable, so a consumer `gap-*`\n // still replaces it.\n {\n variant: 'standard',\n size: 'xs',\n class: [\n 'gap-(--m3-button-group-gap)',\n '[--m3-button-group-gap:max(18px,calc(48px-max(24px,calc(32px+var(--md-sys-density,0)*4px))))]',\n 'has-[[data-tokens~=md-comp-icon-button][data-width=narrow]]:[--m3-button-group-gap:max(18px,calc(48px-max(24px,calc(28px+var(--md-sys-density,0)*4px))))]',\n ],\n },\n {\n variant: 'standard',\n size: 'sm',\n class: [\n 'gap-(--m3-button-group-gap)',\n '[--m3-button-group-gap:max(12px,calc(8px-var(--md-sys-density,0)*4px))]',\n 'has-[[data-tokens~=md-comp-icon-button][data-width=narrow]]:[--m3-button-group-gap:max(12px,calc(48px-max(28px,calc(32px+var(--md-sys-density,0)*4px))))]',\n ],\n },\n {\n variant: 'standard',\n size: 'md',\n class: [\n 'gap-(--m3-button-group-gap) [--m3-button-group-gap:8px]',\n 'has-[[data-tokens~=md-comp-icon-button][data-width=narrow]]:[--m3-button-group-gap:max(8px,calc(var(--md-sys-density,0)*-4px))]',\n ],\n },\n { variant: 'standard', size: ['lg', 'xl'], class: 'gap-[8px]' },\n ],\n defaultVariants: { variant: 'standard', size: 'sm', overflow: false },\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAuBA,MAAa,oBAAoB,GAAG;CAClC,MAAM;CACN,UAAU;EACR,SAAS;GACP,UAAU;GACV,WAAW;EACb;EACA,MAAM;GAAE,IAAI;GAAI,IAAI;GAAI,IAAI;GAAI,IAAI;GAAI,IAAI;EAAG;EAC/C,UAAU;GACR,MAAM;GACN,OAAO;EACT;CACF;CACA,kBAAkB;EAChB;GAAE,SAAS;GAAY,UAAU;GAAM,OAAO;EAAO;EAQrD;GACE,SAAS;GACT,MAAM;GACN,OAAO;IACL;IACA;IACA;GACF;EACF;EACA;GACE,SAAS;GACT,MAAM;GACN,OAAO;IACL;IACA;IACA;GACF;EACF;EACA;GACE,SAAS;GACT,MAAM;GACN,OAAO,CACL,2DACA,iIACF;EACF;EACA;GAAE,SAAS;GAAY,MAAM,CAAC,MAAM,IAAI;GAAG,OAAO;EAAY;CAChE;CACA,iBAAiB;EAAE,SAAS;EAAY,MAAM;EAAM,UAAU;CAAM;AACtE,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { onDemand } from "../../utils/load-on-demand.js";
|
|
3
|
+
import { MenuTriggerContext } from "../../components/menu/menu-trigger.js";
|
|
4
|
+
import { useContext, useEffect, useState } from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
//#region src/composites/button-group/lazy-overflow-menu.tsx
|
|
7
|
+
const menu = onDemand(() => import("./overflow-menu-list.js").then((module) => module.OverflowMenuList));
|
|
8
|
+
menu.preload;
|
|
9
|
+
/**
|
|
10
|
+
* `ButtonGroup`'s overflow menu, whose code loads only once a button folds: a group without
|
|
11
|
+
* `overflow`, or whose buttons all fit, never carries `Menu`. It sits inside the indicator's
|
|
12
|
+
* `MenuTrigger` and is rendered only while something is folded. Rendering it starts the
|
|
13
|
+
* load, so the menu is usually ready long before the indicator is pressed, and then opens in
|
|
14
|
+
* the same pass as the press (it never suspends, see `onDemand`). It mounts once loaded, or
|
|
15
|
+
* when the menu opens if that comes first, and shows nothing until then. A failed load is
|
|
16
|
+
* tried again when the pointer moves over the indicator, focus enters it, or the menu opens.
|
|
17
|
+
*/
|
|
18
|
+
function LazyOverflowMenuList(props) {
|
|
19
|
+
const trigger = useContext(MenuTriggerContext);
|
|
20
|
+
const isOpen = trigger?.state.isOpen === true;
|
|
21
|
+
const [ready, setReady] = useState(isOpen);
|
|
22
|
+
if (isOpen && !ready) setReady(true);
|
|
23
|
+
const triggerRef = trigger?.triggerRef;
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
let mounted = true;
|
|
26
|
+
const preload = () => void menu.preload().then(() => mounted && setReady(true), () => void 0);
|
|
27
|
+
preload();
|
|
28
|
+
const element = triggerRef?.current;
|
|
29
|
+
element?.addEventListener("pointerover", preload);
|
|
30
|
+
element?.addEventListener("focusin", preload);
|
|
31
|
+
return () => {
|
|
32
|
+
mounted = false;
|
|
33
|
+
element?.removeEventListener("pointerover", preload);
|
|
34
|
+
element?.removeEventListener("focusin", preload);
|
|
35
|
+
};
|
|
36
|
+
}, [triggerRef]);
|
|
37
|
+
if (!ready) return null;
|
|
38
|
+
return /* @__PURE__ */ jsx(menu.Component, { ...props });
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { LazyOverflowMenuList };
|
|
42
|
+
|
|
43
|
+
//# sourceMappingURL=lazy-overflow-menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lazy-overflow-menu.js","names":[],"sources":["../../../src/composites/button-group/lazy-overflow-menu.tsx"],"sourcesContent":["'use client';\n\nimport { useContext, useEffect, useState } from 'react';\nimport { MenuTriggerContext } from '../../components/menu/menu-trigger';\nimport { onDemand } from '../../utils/load-on-demand';\nimport type { OverflowMenuListProps } from './overflow-menu-list';\n\nconst menu = onDemand<OverflowMenuListProps>(() =>\n import('./overflow-menu-list').then((module) => module.OverflowMenuList),\n);\n\n/**\n * Starts loading the overflow menu's module (and `Menu` with it), once; later calls return\n * the same promise.\n */\nexport const preloadOverflowMenu = menu.preload;\n\n/**\n * `ButtonGroup`'s overflow menu, whose code loads only once a button folds: a group without\n * `overflow`, or whose buttons all fit, never carries `Menu`. It sits inside the indicator's\n * `MenuTrigger` and is rendered only while something is folded. Rendering it starts the\n * load, so the menu is usually ready long before the indicator is pressed, and then opens in\n * the same pass as the press (it never suspends, see `onDemand`). It mounts once loaded, or\n * when the menu opens if that comes first, and shows nothing until then. A failed load is\n * tried again when the pointer moves over the indicator, focus enters it, or the menu opens.\n */\nexport function LazyOverflowMenuList(props: OverflowMenuListProps) {\n const trigger = useContext(MenuTriggerContext);\n const isOpen = trigger?.state.isOpen === true;\n const [ready, setReady] = useState(isOpen);\n // Set during render, so an open before the load ends renders the menu in the same pass.\n if (isOpen && !ready) setReady(true);\n\n const triggerRef = trigger?.triggerRef;\n useEffect(() => {\n let mounted = true;\n // A failed preload is left to the next hover, focus or open, which loads again.\n const preload = () =>\n void menu.preload().then(\n () => mounted && setReady(true),\n () => undefined,\n );\n preload();\n const element = triggerRef?.current;\n element?.addEventListener('pointerover', preload);\n element?.addEventListener('focusin', preload);\n return () => {\n mounted = false;\n element?.removeEventListener('pointerover', preload);\n element?.removeEventListener('focusin', preload);\n };\n }, [triggerRef]);\n\n if (!ready) return null;\n return <menu.Component {...props} />;\n}\n"],"mappings":";;;;;;AAOA,MAAM,OAAO,eACX,OAAO,0BAAuB,CAAC,MAAM,WAAW,OAAO,gBAAgB,CACzE;AAMmC,KAAK;;;;;;;;;;AAWxC,SAAgB,qBAAqB,OAA8B;CACjE,MAAM,UAAU,WAAW,kBAAkB;CAC7C,MAAM,SAAS,SAAS,MAAM,WAAW;CACzC,MAAM,CAAC,OAAO,YAAY,SAAS,MAAM;CAEzC,IAAI,UAAU,CAAC,OAAO,SAAS,IAAI;CAEnC,MAAM,aAAa,SAAS;CAC5B,gBAAgB;EACd,IAAI,UAAU;EAEd,MAAM,gBACJ,KAAK,KAAK,QAAQ,CAAC,CAAC,WACZ,WAAW,SAAS,IAAI,SACxB,KAAA,CACR;EACF,QAAQ;EACR,MAAM,UAAU,YAAY;EAC5B,SAAS,iBAAiB,eAAe,OAAO;EAChD,SAAS,iBAAiB,WAAW,OAAO;EAC5C,aAAa;GACX,UAAU;GACV,SAAS,oBAAoB,eAAe,OAAO;GACnD,SAAS,oBAAoB,WAAW,OAAO;EACjD;CACF,GAAG,CAAC,UAAU,CAAC;CAEf,IAAI,CAAC,OAAO,OAAO;CACnB,OAAO,oBAAC,KAAK,WAAN,EAAgB,GAAI,MAAQ,CAAA;AACrC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { CheckableMenuItem, Menu } from "../../components/menu/Menu.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
//#region src/composites/button-group/overflow-menu-list.tsx
|
|
5
|
+
/**
|
|
6
|
+
* The overflow indicator's menu: one item per folded button, opening at the indicator's
|
|
7
|
+
* end. In a selectable menu only toggles (and buttons in the group's selection) are
|
|
8
|
+
* checkable; actions stay plain items. `ButtonGroup` loads this module (and `Menu` with it) only once a button folds,
|
|
9
|
+
* through `LazyOverflowMenuList`.
|
|
10
|
+
*/
|
|
11
|
+
function OverflowMenuList({ items, ...props }) {
|
|
12
|
+
return /* @__PURE__ */ jsx(Menu, {
|
|
13
|
+
...props,
|
|
14
|
+
placement: "bottom-end",
|
|
15
|
+
children: items.map(({ key, label, icon, checkable }) => /* @__PURE__ */ jsx(CheckableMenuItem, {
|
|
16
|
+
leadingIcon: icon,
|
|
17
|
+
checkable,
|
|
18
|
+
textValue: typeof label === "string" ? label : void 0,
|
|
19
|
+
children: label
|
|
20
|
+
}, key))
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { OverflowMenuList };
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=overflow-menu-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overflow-menu-list.js","names":[],"sources":["../../../src/composites/button-group/overflow-menu-list.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode } from 'react';\nimport { CheckableMenuItem, Menu, type MenuProps } from '../../components/menu/Menu';\n\n/** A folded button as a menu item. */\nexport interface OverflowMenuItem {\n /** The button's index among the group's children, as a string. */\n key: string;\n label: ReactNode;\n icon: ReactNode;\n /**\n * Whether the item shows and announces a checked state: a toggle button, or a button in\n * the group's selection. Actions stay plain menu items in a selectable menu.\n */\n checkable: boolean;\n}\n\nexport interface OverflowMenuListProps extends Pick<\n MenuProps,\n 'selectionMode' | 'selectedKeys' | 'disabledKeys' | 'onAction' | 'classNames'\n> {\n /** The folded buttons, in order. */\n items: OverflowMenuItem[];\n}\n\n/**\n * The overflow indicator's menu: one item per folded button, opening at the indicator's\n * end. In a selectable menu only toggles (and buttons in the group's selection) are\n * checkable; actions stay plain items. `ButtonGroup` loads this module (and `Menu` with it) only once a button folds,\n * through `LazyOverflowMenuList`.\n */\nexport function OverflowMenuList({ items, ...props }: OverflowMenuListProps) {\n return (\n <Menu {...props} placement=\"bottom-end\">\n {items.map(({ key, label, icon, checkable }) => (\n <CheckableMenuItem\n key={key}\n leadingIcon={icon}\n checkable={checkable}\n textValue={typeof label === 'string' ? label : undefined}\n >\n {label}\n </CheckableMenuItem>\n ))}\n </Menu>\n );\n}\n"],"mappings":";;;;;;;;;;AAgCA,SAAgB,iBAAiB,EAAE,OAAO,GAAG,SAAgC;CAC3E,OACE,oBAAC,MAAD;EAAM,GAAI;EAAO,WAAU;EACxB,UAAA,MAAM,KAAK,EAAE,KAAK,OAAO,MAAM,gBAC9B,oBAAC,mBAAD;GAEE,aAAa;GACF;GACX,WAAW,OAAO,UAAU,WAAW,QAAQ,KAAA;GAE9C,UAAA;EACgB,GANZ,GAMY,CACpB;CACG,CAAA;AAEV"}
|