@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,112 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { densityAttribute } from "../../tokens/density.js";
|
|
3
|
+
import { cn } from "../../utils/cn.js";
|
|
4
|
+
import { ButtonBase } from "../../primitives/ButtonBase.js";
|
|
5
|
+
import { TouchTarget } from "../../primitives/TouchTarget.js";
|
|
6
|
+
import { ButtonContext } from "../button/ButtonContext.js";
|
|
7
|
+
import { mergeDataTokens } from "../../utils/merge-data-tokens.js";
|
|
8
|
+
import { pendingClasses, useButtonPending } from "../button/button-pending.js";
|
|
9
|
+
import { iconFacesStyles } from "../../primitives/icon-faces-styles.js";
|
|
10
|
+
import { IconFaces } from "../../primitives/IconFaces.js";
|
|
11
|
+
import { useWarnOnce } from "../../utils/warn-once.js";
|
|
12
|
+
import { ToolbarContext } from "../../primitives/ToolbarContext.js";
|
|
13
|
+
import { TooltipTrigger, WithoutDescription, useInTooltipTrigger } from "../tooltip/tooltip-trigger.js";
|
|
14
|
+
import { LazyTooltip } from "../tooltip/lazy-tooltip.js";
|
|
15
|
+
import { iconButtonStyles } from "./icon-button-styles.js";
|
|
16
|
+
import { useContext } from "react";
|
|
17
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
18
|
+
//#region src/components/icon-button/IconButton.tsx
|
|
19
|
+
/**
|
|
20
|
+
* M3 Expressive icon button: filled (default), tonal, outlined and standard variants;
|
|
21
|
+
* XS–XL sizes; narrow, default or wide widths; round or square shape; an optional toggle
|
|
22
|
+
* form; a press morph; and its label as a tooltip on hover and keyboard focus.
|
|
23
|
+
*
|
|
24
|
+
* Shares `size`, `shape` and `disabled` with `ButtonContext`, so it fits in button groups,
|
|
25
|
+
* and takes its default variant from it (`iconButtonVariant`).
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* <IconButton icon={<SearchIcon />} aria-label="Search" onPress={openSearch} />
|
|
29
|
+
* <IconButton variant="standard" icon={<MoreIcon />} aria-label="More options" />
|
|
30
|
+
* <IconButton toggle variant="filled" icon={<StarIcon />} selectedIcon={<StarFilledIcon />}
|
|
31
|
+
* aria-label="Favourite" selected={isFavourite} onSelectedChange={setFavourite} />
|
|
32
|
+
* <IconButton icon={<RefreshIcon />} aria-label="Refresh" pending={refreshing} onPress={refresh} />
|
|
33
|
+
*/
|
|
34
|
+
function IconButton(props) {
|
|
35
|
+
const { variant: variantProp, size: sizeProp, width = "default", shape: shapeProp, density: densityProp, disabled: disabledProp, icon, tooltip = true, pendingIndicator, labels, classNames, className, selectedIcon, iconTransition = "swap", ...base } = props;
|
|
36
|
+
const rotates = iconTransition === "rotate" && selectedIcon !== void 0;
|
|
37
|
+
const context = useContext(ButtonContext);
|
|
38
|
+
const toolbar = useContext(ToolbarContext);
|
|
39
|
+
const inTooltipTrigger = useInTooltipTrigger();
|
|
40
|
+
const size = sizeProp ?? context.size ?? "sm";
|
|
41
|
+
const shape = shapeProp ?? context.shape ?? "round";
|
|
42
|
+
const squareInFloatingToolbar = toolbar?.kind === "floating" && shape === "square";
|
|
43
|
+
useWarnOnce(squareInFloatingToolbar, "[@windmorph/react] Avoid square icon buttons in a floating toolbar (M3): their shape conflicts with its fully rounded container.");
|
|
44
|
+
useWarnOnce(toolbar?.orientation === "vertical" && width === "wide", "[@windmorph/react] Avoid wide icon buttons in a vertical toolbar (M3): use the default or narrow width.");
|
|
45
|
+
const variant = variantProp ?? context.iconButtonVariant ?? "filled";
|
|
46
|
+
const density = densityProp ?? context.density;
|
|
47
|
+
const styles = iconButtonStyles({
|
|
48
|
+
variant,
|
|
49
|
+
size,
|
|
50
|
+
width,
|
|
51
|
+
shape,
|
|
52
|
+
toggle: base.toggle === true,
|
|
53
|
+
connected: context.connected ?? "none",
|
|
54
|
+
toolbar: toolbar?.color ?? "none"
|
|
55
|
+
});
|
|
56
|
+
const tokenAttributes = {
|
|
57
|
+
"data-tokens": mergeDataTokens("md-comp-icon-button", base),
|
|
58
|
+
"data-variant": variant,
|
|
59
|
+
"data-size": size,
|
|
60
|
+
"data-width": width
|
|
61
|
+
};
|
|
62
|
+
const pending = useButtonPending({
|
|
63
|
+
pending: base.pending,
|
|
64
|
+
pendingIndicator,
|
|
65
|
+
labels,
|
|
66
|
+
size,
|
|
67
|
+
ariaLabel: base["aria-label"],
|
|
68
|
+
ariaLabelledby: base["aria-labelledby"],
|
|
69
|
+
ref: base.ref,
|
|
70
|
+
indicatorClassName: cn(pendingClasses.indicator, classNames?.pendingIndicator)
|
|
71
|
+
});
|
|
72
|
+
const baseProps = {
|
|
73
|
+
...base,
|
|
74
|
+
...tokenAttributes,
|
|
75
|
+
...pending.rootProps,
|
|
76
|
+
...densityAttribute(density),
|
|
77
|
+
disabled: disabledProp ?? context.disabled ?? false,
|
|
78
|
+
className: styles.root({ class: cn(classNames?.root, className) })
|
|
79
|
+
};
|
|
80
|
+
const button = /* @__PURE__ */ jsx(ButtonBase, {
|
|
81
|
+
...baseProps,
|
|
82
|
+
children: ({ isSelected }) => /* @__PURE__ */ jsxs("span", {
|
|
83
|
+
...pending.contentProps,
|
|
84
|
+
className: styles.content({ class: cn(pending.takesPending && pendingClasses.content, classNames?.content) }),
|
|
85
|
+
children: [
|
|
86
|
+
(size === "xs" || size === "sm") && /* @__PURE__ */ jsx(TouchTarget, {}),
|
|
87
|
+
/* @__PURE__ */ jsx("span", {
|
|
88
|
+
"aria-hidden": "true",
|
|
89
|
+
className: styles.icon({ class: cn(rotates && iconFacesStyles().cell(), pending.takesPending && pendingClasses.replaced, classNames?.icon) }),
|
|
90
|
+
children: rotates ? /* @__PURE__ */ jsx(IconFaces, {
|
|
91
|
+
icon,
|
|
92
|
+
alternateIcon: selectedIcon,
|
|
93
|
+
alternate: isSelected,
|
|
94
|
+
transition: "rotate"
|
|
95
|
+
}) : isSelected && selectedIcon ? selectedIcon : icon
|
|
96
|
+
}),
|
|
97
|
+
pending.indicator,
|
|
98
|
+
pending.hiddenName
|
|
99
|
+
]
|
|
100
|
+
})
|
|
101
|
+
});
|
|
102
|
+
const label = base["aria-label"];
|
|
103
|
+
if (!tooltip || inTooltipTrigger || !label || base["aria-labelledby"]) return button;
|
|
104
|
+
return /* @__PURE__ */ jsxs(TooltipTrigger, { children: [/* @__PURE__ */ jsx(WithoutDescription, { children: button }), /* @__PURE__ */ jsx(LazyTooltip, {
|
|
105
|
+
classNames: { panel: classNames?.tooltip },
|
|
106
|
+
children: label
|
|
107
|
+
})] });
|
|
108
|
+
}
|
|
109
|
+
//#endregion
|
|
110
|
+
export { IconButton };
|
|
111
|
+
|
|
112
|
+
//# sourceMappingURL=IconButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconButton.js","names":[],"sources":["../../../src/components/icon-button/IconButton.tsx"],"sourcesContent":["'use client';\n\nimport { useContext, type ReactElement, type Ref } from 'react';\nimport {\n ButtonBase,\n type ButtonBaseActionProps,\n type ButtonBaseLinkProps,\n type ButtonBaseProps,\n type ButtonBaseToggleProps,\n} from '../../primitives/ButtonBase';\nimport { IconFaces } from '../../primitives/IconFaces';\nimport { iconFacesStyles, type IconTransition } from '../../primitives/icon-faces-styles';\nimport { TouchTarget } from '../../primitives/TouchTarget';\nimport { densityAttribute, type Density } from '../../tokens/density';\nimport { cn } from '../../utils/cn';\nimport { useWarnOnce } from '../../utils/warn-once';\nimport type { ButtonShape, ButtonSize } from '../button/button-styles';\nimport { ButtonContext } from '../button/ButtonContext';\nimport { ToolbarContext } from '../../primitives/ToolbarContext';\nimport { LazyTooltip } from '../tooltip/lazy-tooltip';\nimport {\n TooltipTrigger,\n useInTooltipTrigger,\n WithoutDescription,\n} from '../tooltip/tooltip-trigger';\nimport {\n iconButtonStyles,\n type IconButtonVariant,\n type IconButtonWidth,\n} from './icon-button-styles';\nimport { mergeDataTokens } from '../../utils/merge-data-tokens';\nimport { pendingClasses, useButtonPending, type ButtonLabels } from '../button/button-pending';\n\nexport interface IconButtonClassNames {\n /** The button element itself; merged with `className`. */\n root?: string;\n /** Inner wrapper around the icon. */\n content?: string;\n /** The icon. */\n icon?: string;\n /** The built-in plain tooltip that shows the label (`tooltip`). */\n tooltip?: string;\n /** The slot holding the loading indicator while `pending`, centred over the hidden icon. */\n pendingIndicator?: string;\n}\n\n/** Icon buttons have no visible text, so an accessible name is required. */\ntype AccessibleName =\n | {\n /** The button's accessible name, also shown in its tooltip. Required without `aria-labelledby`. */\n 'aria-label': string;\n /** The id of an element that names the button, instead of `aria-label`. */\n 'aria-labelledby'?: string;\n }\n | {\n /** The button's accessible name, also shown in its tooltip. Required without `aria-labelledby`. */\n 'aria-label'?: string;\n /** The id of an element that names the button, instead of `aria-label`. */\n 'aria-labelledby': string;\n };\n\ninterface IconButtonOwnProps {\n /**\n * Colour style. Filled is the M3 default; toolbars and app bars default their icon\n * buttons to `standard` through `ButtonContext`.\n * @default \"filled\"\n */\n variant?: IconButtonVariant;\n /** Container and icon size, from extra small to extra large. @default \"sm\" */\n size?: ButtonSize;\n /** Container width: narrow, default or wide, at the same height. @default \"default\" */\n width?: IconButtonWidth;\n /** Fully round corners, or square ones (still rounded, but less). @default \"round\" */\n shape?: ButtonShape;\n /**\n * Web density, `0` to `-3`: each step takes 4px off the container's height and width (an\n * S button: 40px at 0, 28px at -3), never below the icon plus 4px; the touch target stays\n * 48 × 48px. Left out, the button takes the density of the nearest `ThemeProvider` or\n * `ThemeScope`; icon buttons in a field's icon slots, and in app bars, toolbars, search bars,\n * a navigation rail's header and dialog and sheet headers, keep their size. M3 asks for density\n * to be the reader's choice rather than a default, so prefer setting it there.\n * @default 0\n */\n density?: Density;\n /** The icon, e.g. a Material Symbols SVG. Hidden from assistive tech; `aria-label` names the button. */\n icon: ReactElement;\n /**\n * Shows the `aria-label` in a plain tooltip on hover and keyboard focus, as M3 asks of\n * icon buttons on the web. The tooltip only repeats the name, so it isn't linked as a\n * description (no double announcement). It steps aside when the button is already inside a\n * `TooltipTrigger` or `RichTooltipTrigger`, and when it's named by `aria-labelledby`.\n * @default true\n */\n tooltip?: boolean;\n /** Classes for each part. `classNames.root` is merged with `className`. */\n classNames?: IconButtonClassNames;\n /** Words the button announces. */\n labels?: Partial<ButtonLabels>;\n}\n\ninterface IconButtonPendingProps {\n /**\n * Shows a loading indicator in place of the icon while an action runs, and blocks presses.\n * The button keeps its size, its colours and keyboard focus; its accessible name gains\n * `labels.pending` (the tooltip keeps showing only the `aria-label`), and a focused button\n * announces it. The indicator appears after 200ms, so a quick action doesn't flash. Use it\n * for actions that take a moment, not for every button in a list.\n * @default false\n */\n pending?: boolean;\n /**\n * Replaces the loading indicator shown while `pending`, e.g. a `CircularProgressIndicator`\n * for a wait that may pass five seconds. It's centred over the icon and takes the content\n * colour; a progress indicator also loses its track, as M3 asks inside a button.\n */\n pendingIndicator?: ReactElement;\n}\n\ntype OmitOwn<T> = Omit<\n T,\n | keyof IconButtonOwnProps\n | keyof IconButtonPendingProps\n | 'children'\n | 'aria-label'\n | 'aria-labelledby'\n>;\n\nexport type IconButtonActionProps = IconButtonOwnProps &\n IconButtonPendingProps &\n OmitOwn<ButtonBaseActionProps> &\n AccessibleName;\nexport type IconButtonLinkProps = IconButtonOwnProps &\n IconButtonPendingProps &\n OmitOwn<ButtonBaseLinkProps> &\n AccessibleName;\nexport type IconButtonToggleProps = IconButtonOwnProps &\n OmitOwn<ButtonBaseToggleProps> &\n AccessibleName & {\n /** Toggle buttons have no pending state. */\n pending?: never;\n /** Toggle buttons have no pending state. */\n pendingIndicator?: never;\n /** Icon shown while selected, e.g. the filled form of `icon`. */\n selectedIcon?: ReactElement;\n /**\n * How `icon` hands over to `selectedIcon`: `swap` changes it at once, `rotate` turns and\n * crossfades the two (counter-clockwise as it selects, in LTR). `rotate` is an extension\n * beyond the M3 spec, matching Google's Expressive showcase, like the FAB menu's.\n * Reduced motion keeps only the crossfade. Needs `selectedIcon`.\n * @default \"swap\"\n */\n iconTransition?: IconTransition;\n };\n\nexport type IconButtonProps = IconButtonActionProps | IconButtonLinkProps | IconButtonToggleProps;\n\n/**\n * M3 Expressive icon button: filled (default), tonal, outlined and standard variants;\n * XS–XL sizes; narrow, default or wide widths; round or square shape; an optional toggle\n * form; a press morph; and its label as a tooltip on hover and keyboard focus.\n *\n * Shares `size`, `shape` and `disabled` with `ButtonContext`, so it fits in button groups,\n * and takes its default variant from it (`iconButtonVariant`).\n *\n * @example\n * <IconButton icon={<SearchIcon />} aria-label=\"Search\" onPress={openSearch} />\n * <IconButton variant=\"standard\" icon={<MoreIcon />} aria-label=\"More options\" />\n * <IconButton toggle variant=\"filled\" icon={<StarIcon />} selectedIcon={<StarFilledIcon />}\n * aria-label=\"Favourite\" selected={isFavourite} onSelectedChange={setFavourite} />\n * <IconButton icon={<RefreshIcon />} aria-label=\"Refresh\" pending={refreshing} onPress={refresh} />\n */\nexport function IconButton(props: IconButtonProps) {\n const {\n variant: variantProp,\n size: sizeProp,\n width = 'default',\n shape: shapeProp,\n density: densityProp,\n disabled: disabledProp,\n icon,\n tooltip = true,\n pendingIndicator,\n labels,\n classNames,\n className,\n // Only toggle props carry `selectedIcon`; the others read it as undefined.\n selectedIcon,\n iconTransition = 'swap',\n ...base\n } = props as Omit<IconButtonToggleProps, 'pendingIndicator'> &\n IconButtonProps & { pendingIndicator?: ReactElement };\n const rotates = iconTransition === 'rotate' && selectedIcon !== undefined;\n\n const context = useContext(ButtonContext);\n const toolbar = useContext(ToolbarContext);\n const inTooltipTrigger = useInTooltipTrigger();\n const size = sizeProp ?? context.size ?? 'sm';\n const shape = shapeProp ?? context.shape ?? 'round';\n const squareInFloatingToolbar = toolbar?.kind === 'floating' && shape === 'square';\n // Once per button, not on every render.\n useWarnOnce(\n squareInFloatingToolbar,\n '[@windmorph/react] Avoid square icon buttons in a floating toolbar (M3): their shape conflicts with its fully rounded container.',\n );\n useWarnOnce(\n toolbar?.orientation === 'vertical' && width === 'wide',\n '[@windmorph/react] Avoid wide icon buttons in a vertical toolbar (M3): use the default or narrow width.',\n );\n const variant = variantProp ?? context.iconButtonVariant ?? 'filled';\n const density = densityProp ?? context.density;\n const styles = iconButtonStyles({\n variant,\n size,\n width,\n shape,\n toggle: base.toggle === true,\n connected: context.connected ?? 'none',\n toolbar: toolbar?.color ?? 'none',\n });\n\n // Destructuring a union merges its members (see Button); `base` holds one member's props.\n // The component tokens' hooks (icon-button-tokens.ts), also public styling hooks for apps.\n const tokenAttributes = {\n 'data-tokens': mergeDataTokens('md-comp-icon-button', base),\n 'data-variant': variant,\n 'data-size': size,\n // Read by a button group, which spaces narrow icon buttons wider apart.\n 'data-width': width,\n };\n const pending = useButtonPending<HTMLElement>({\n pending: base.pending,\n pendingIndicator,\n labels,\n size,\n ariaLabel: base['aria-label'],\n ariaLabelledby: base['aria-labelledby'],\n ref: base.ref as Ref<HTMLElement> | undefined,\n indicatorClassName: cn(pendingClasses.indicator, classNames?.pendingIndicator),\n });\n const baseProps = {\n ...base,\n ...tokenAttributes,\n ...pending.rootProps,\n ...densityAttribute(density),\n disabled: disabledProp ?? context.disabled ?? false,\n className: styles.root({ class: cn(classNames?.root, className) }),\n } as ButtonBaseProps;\n\n const button = (\n <ButtonBase {...baseProps}>\n {({ isSelected }) => (\n <span\n {...pending.contentProps}\n className={styles.content({\n class: cn(pending.takesPending && pendingClasses.content, classNames?.content),\n })}\n >\n {(size === 'xs' || size === 'sm') && <TouchTarget />}\n <span\n aria-hidden=\"true\"\n className={styles.icon({\n class: cn(\n rotates && iconFacesStyles().cell(),\n pending.takesPending && pendingClasses.replaced,\n classNames?.icon,\n ),\n })}\n >\n {rotates ? (\n <IconFaces\n icon={icon}\n alternateIcon={selectedIcon}\n alternate={isSelected}\n transition=\"rotate\"\n />\n ) : isSelected && selectedIcon ? (\n selectedIcon\n ) : (\n icon\n )}\n </span>\n {pending.indicator}\n {pending.hiddenName}\n </span>\n )}\n </ButtonBase>\n );\n\n const label = base['aria-label'];\n if (!tooltip || inTooltipTrigger || !label || base['aria-labelledby']) return button;\n return (\n <TooltipTrigger>\n <WithoutDescription>{button}</WithoutDescription>\n <LazyTooltip classNames={{ panel: classNames?.tooltip }}>{label}</LazyTooltip>\n </TooltipTrigger>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2KA,SAAgB,WAAW,OAAwB;CACjD,MAAM,EACJ,SAAS,aACT,MAAM,UACN,QAAQ,WACR,OAAO,WACP,SAAS,aACT,UAAU,cACV,MACA,UAAU,MACV,kBACA,QACA,YACA,WAEA,cACA,iBAAiB,QACjB,GAAG,SACD;CAEJ,MAAM,UAAU,mBAAmB,YAAY,iBAAiB,KAAA;CAEhE,MAAM,UAAU,WAAW,aAAa;CACxC,MAAM,UAAU,WAAW,cAAc;CACzC,MAAM,mBAAmB,oBAAoB;CAC7C,MAAM,OAAO,YAAY,QAAQ,QAAQ;CACzC,MAAM,QAAQ,aAAa,QAAQ,SAAS;CAC5C,MAAM,0BAA0B,SAAS,SAAS,cAAc,UAAU;CAE1E,YACE,yBACA,kIACF;CACA,YACE,SAAS,gBAAgB,cAAc,UAAU,QACjD,yGACF;CACA,MAAM,UAAU,eAAe,QAAQ,qBAAqB;CAC5D,MAAM,UAAU,eAAe,QAAQ;CACvC,MAAM,SAAS,iBAAiB;EAC9B;EACA;EACA;EACA;EACA,QAAQ,KAAK,WAAW;EACxB,WAAW,QAAQ,aAAa;EAChC,SAAS,SAAS,SAAS;CAC7B,CAAC;CAID,MAAM,kBAAkB;EACtB,eAAe,gBAAgB,uBAAuB,IAAI;EAC1D,gBAAgB;EAChB,aAAa;EAEb,cAAc;CAChB;CACA,MAAM,UAAU,iBAA8B;EAC5C,SAAS,KAAK;EACd;EACA;EACA;EACA,WAAW,KAAK;EAChB,gBAAgB,KAAK;EACrB,KAAK,KAAK;EACV,oBAAoB,GAAG,eAAe,WAAW,YAAY,gBAAgB;CAC/E,CAAC;CACD,MAAM,YAAY;EAChB,GAAG;EACH,GAAG;EACH,GAAG,QAAQ;EACX,GAAG,iBAAiB,OAAO;EAC3B,UAAU,gBAAgB,QAAQ,YAAY;EAC9C,WAAW,OAAO,KAAK,EAAE,OAAO,GAAG,YAAY,MAAM,SAAS,EAAE,CAAC;CACnE;CAEA,MAAM,SACJ,oBAAC,YAAD;EAAY,GAAI;EACZ,WAAA,EAAE,iBACF,qBAAC,QAAD;GACE,GAAI,QAAQ;GACZ,WAAW,OAAO,QAAQ,EACxB,OAAO,GAAG,QAAQ,gBAAgB,eAAe,SAAS,YAAY,OAAO,EAC/E,CAAC;GAJH,UAAA;KAMI,SAAS,QAAQ,SAAS,SAAS,oBAAC,aAAD,CAAc,CAAA;IACnD,oBAAC,QAAD;KACE,eAAY;KACZ,WAAW,OAAO,KAAK,EACrB,OAAO,GACL,WAAW,gBAAgB,CAAC,CAAC,KAAK,GAClC,QAAQ,gBAAgB,eAAe,UACvC,YAAY,IACd,EACF,CAAC;KAEA,UAAA,UACC,oBAAC,WAAD;MACQ;MACN,eAAe;MACf,WAAW;MACX,YAAW;KACZ,CAAA,IACC,cAAc,eAChB,eAEA;IAEE,CAAA;IACL,QAAQ;IACR,QAAQ;GACL;;CAEE,CAAA;CAGd,MAAM,QAAQ,KAAK;CACnB,IAAI,CAAC,WAAW,oBAAoB,CAAC,SAAS,KAAK,oBAAoB,OAAO;CAC9E,OACE,qBAAC,gBAAD,EAAA,UAAA,CACE,oBAAC,oBAAD,EAAA,UAAqB,OAA2B,CAAA,GAChD,oBAAC,aAAD;EAAa,YAAY,EAAE,OAAO,YAAY,QAAQ;EAAI,UAAA;CAAmB,CAAA,CAC/D,EAAA,CAAA;AAEpB"}
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import { VariantProps } from "../../utils/tv.js";
|
|
2
|
+
//#region src/components/icon-button/icon-button-styles.d.ts
|
|
3
|
+
/** Variant definitions for {@link IconButton}; extend them to add variants. */
|
|
4
|
+
export declare const iconButtonStyles: import("tailwind-variants").TVReturnType<{
|
|
5
|
+
variant: {
|
|
6
|
+
standard: {
|
|
7
|
+
root: string;
|
|
8
|
+
};
|
|
9
|
+
filled: {
|
|
10
|
+
root: string[];
|
|
11
|
+
};
|
|
12
|
+
tonal: {
|
|
13
|
+
root: string[];
|
|
14
|
+
};
|
|
15
|
+
outlined: {
|
|
16
|
+
root: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
size: {
|
|
20
|
+
xs: {
|
|
21
|
+
root: string;
|
|
22
|
+
icon: string;
|
|
23
|
+
};
|
|
24
|
+
sm: {
|
|
25
|
+
root: string;
|
|
26
|
+
icon: string;
|
|
27
|
+
};
|
|
28
|
+
md: {
|
|
29
|
+
root: string;
|
|
30
|
+
content: string;
|
|
31
|
+
icon: string;
|
|
32
|
+
};
|
|
33
|
+
lg: {
|
|
34
|
+
root: string;
|
|
35
|
+
icon: string;
|
|
36
|
+
};
|
|
37
|
+
xl: {
|
|
38
|
+
root: string;
|
|
39
|
+
icon: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
width: {
|
|
43
|
+
narrow: {};
|
|
44
|
+
default: {};
|
|
45
|
+
wide: {};
|
|
46
|
+
};
|
|
47
|
+
shape: {
|
|
48
|
+
round: {};
|
|
49
|
+
square: {};
|
|
50
|
+
};
|
|
51
|
+
toggle: {
|
|
52
|
+
true: {};
|
|
53
|
+
false: {};
|
|
54
|
+
};
|
|
55
|
+
/** Position in a connected button group, set by `ButtonGroup`. */
|
|
56
|
+
connected: {
|
|
57
|
+
none: {};
|
|
58
|
+
leading: {};
|
|
59
|
+
middle: {};
|
|
60
|
+
trailing: {};
|
|
61
|
+
};
|
|
62
|
+
/** The colour scheme of an enclosing toolbar, set from its context. */
|
|
63
|
+
toolbar: {
|
|
64
|
+
none: {};
|
|
65
|
+
standard: {};
|
|
66
|
+
vibrant: {};
|
|
67
|
+
};
|
|
68
|
+
}, {
|
|
69
|
+
root: string[];
|
|
70
|
+
content: string;
|
|
71
|
+
icon: string;
|
|
72
|
+
}, undefined, {
|
|
73
|
+
variant: {
|
|
74
|
+
standard: {
|
|
75
|
+
root: string;
|
|
76
|
+
};
|
|
77
|
+
filled: {
|
|
78
|
+
root: string[];
|
|
79
|
+
};
|
|
80
|
+
tonal: {
|
|
81
|
+
root: string[];
|
|
82
|
+
};
|
|
83
|
+
outlined: {
|
|
84
|
+
root: string;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
size: {
|
|
88
|
+
xs: {
|
|
89
|
+
root: string;
|
|
90
|
+
icon: string;
|
|
91
|
+
};
|
|
92
|
+
sm: {
|
|
93
|
+
root: string;
|
|
94
|
+
icon: string;
|
|
95
|
+
};
|
|
96
|
+
md: {
|
|
97
|
+
root: string;
|
|
98
|
+
content: string;
|
|
99
|
+
icon: string;
|
|
100
|
+
};
|
|
101
|
+
lg: {
|
|
102
|
+
root: string;
|
|
103
|
+
icon: string;
|
|
104
|
+
};
|
|
105
|
+
xl: {
|
|
106
|
+
root: string;
|
|
107
|
+
icon: string;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
width: {
|
|
111
|
+
narrow: {};
|
|
112
|
+
default: {};
|
|
113
|
+
wide: {};
|
|
114
|
+
};
|
|
115
|
+
shape: {
|
|
116
|
+
round: {};
|
|
117
|
+
square: {};
|
|
118
|
+
};
|
|
119
|
+
toggle: {
|
|
120
|
+
true: {};
|
|
121
|
+
false: {};
|
|
122
|
+
};
|
|
123
|
+
/** Position in a connected button group, set by `ButtonGroup`. */
|
|
124
|
+
connected: {
|
|
125
|
+
none: {};
|
|
126
|
+
leading: {};
|
|
127
|
+
middle: {};
|
|
128
|
+
trailing: {};
|
|
129
|
+
};
|
|
130
|
+
/** The colour scheme of an enclosing toolbar, set from its context. */
|
|
131
|
+
toolbar: {
|
|
132
|
+
none: {};
|
|
133
|
+
standard: {};
|
|
134
|
+
vibrant: {};
|
|
135
|
+
};
|
|
136
|
+
}, {
|
|
137
|
+
root: string[];
|
|
138
|
+
content: string;
|
|
139
|
+
icon: string;
|
|
140
|
+
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
141
|
+
variant: {
|
|
142
|
+
standard: {
|
|
143
|
+
root: string;
|
|
144
|
+
};
|
|
145
|
+
filled: {
|
|
146
|
+
root: string[];
|
|
147
|
+
};
|
|
148
|
+
tonal: {
|
|
149
|
+
root: string[];
|
|
150
|
+
};
|
|
151
|
+
outlined: {
|
|
152
|
+
root: string;
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
size: {
|
|
156
|
+
xs: {
|
|
157
|
+
root: string;
|
|
158
|
+
icon: string;
|
|
159
|
+
};
|
|
160
|
+
sm: {
|
|
161
|
+
root: string;
|
|
162
|
+
icon: string;
|
|
163
|
+
};
|
|
164
|
+
md: {
|
|
165
|
+
root: string;
|
|
166
|
+
content: string;
|
|
167
|
+
icon: string;
|
|
168
|
+
};
|
|
169
|
+
lg: {
|
|
170
|
+
root: string;
|
|
171
|
+
icon: string;
|
|
172
|
+
};
|
|
173
|
+
xl: {
|
|
174
|
+
root: string;
|
|
175
|
+
icon: string;
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
width: {
|
|
179
|
+
narrow: {};
|
|
180
|
+
default: {};
|
|
181
|
+
wide: {};
|
|
182
|
+
};
|
|
183
|
+
shape: {
|
|
184
|
+
round: {};
|
|
185
|
+
square: {};
|
|
186
|
+
};
|
|
187
|
+
toggle: {
|
|
188
|
+
true: {};
|
|
189
|
+
false: {};
|
|
190
|
+
};
|
|
191
|
+
/** Position in a connected button group, set by `ButtonGroup`. */
|
|
192
|
+
connected: {
|
|
193
|
+
none: {};
|
|
194
|
+
leading: {};
|
|
195
|
+
middle: {};
|
|
196
|
+
trailing: {};
|
|
197
|
+
};
|
|
198
|
+
/** The colour scheme of an enclosing toolbar, set from its context. */
|
|
199
|
+
toolbar: {
|
|
200
|
+
none: {};
|
|
201
|
+
standard: {};
|
|
202
|
+
vibrant: {};
|
|
203
|
+
};
|
|
204
|
+
}, {
|
|
205
|
+
root: string[];
|
|
206
|
+
content: string;
|
|
207
|
+
icon: string;
|
|
208
|
+
}>>;
|
|
209
|
+
/**
|
|
210
|
+
* The variants of {@link iconButtonStyles}, for building on its styles. They are the recipe's keys, not
|
|
211
|
+
* component props: their names (`hasIcon`, `isOpen`…) follow the classes and may change.
|
|
212
|
+
*/
|
|
213
|
+
export type IconButtonStyleProps = VariantProps<typeof iconButtonStyles>;
|
|
214
|
+
export type IconButtonVariant = NonNullable<IconButtonStyleProps['variant']>;
|
|
215
|
+
export type IconButtonWidth = NonNullable<IconButtonStyleProps['width']>;
|
|
216
|
+
//#endregion
|
|
217
|
+
//# sourceMappingURL=icon-button-styles.d.ts.map
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import { tv } from "../../utils/tv.js";
|
|
2
|
+
import { connectedShapeVariants } from "../button/connected-shapes.js";
|
|
3
|
+
import { forcedColorClasses, nonBouncingMorph } from "../button/button-styles.js";
|
|
4
|
+
//#region src/components/icon-button/icon-button-styles.ts
|
|
5
|
+
const round = "rounded-[min(var(--_md-comp-icon-button-container-shape-round-capped),calc(var(--m3-icon-button-height)/2))]";
|
|
6
|
+
const square = "rounded-[var(--_md-comp-icon-button-container-shape-square)]";
|
|
7
|
+
const pressed = {
|
|
8
|
+
xs: "data-pressed:rounded-corner-small",
|
|
9
|
+
sm: "data-pressed:rounded-corner-small",
|
|
10
|
+
md: "data-pressed:rounded-corner-medium",
|
|
11
|
+
lg: "data-pressed:rounded-corner-large",
|
|
12
|
+
xl: "data-pressed:rounded-corner-large"
|
|
13
|
+
};
|
|
14
|
+
/** Toggle, selected: round becomes square… */
|
|
15
|
+
const selectedSquare = "data-selected:not-data-pressed:not-data-disabled:rounded-[var(--_md-comp-icon-button-container-shape-square)]";
|
|
16
|
+
/** …and square becomes round (Compose `SelectedContainerShapeSquare` = full). */
|
|
17
|
+
const selectedRound = "data-selected:not-data-pressed:not-data-disabled:rounded-[min(var(--_md-comp-icon-button-container-shape-round-capped),calc(var(--m3-icon-button-height)/2))]";
|
|
18
|
+
/** Container widths in px: narrow / default / wide, 4px less per density step. */
|
|
19
|
+
const widths = {
|
|
20
|
+
xs: {
|
|
21
|
+
narrow: "w-[max(24px,calc(28px+var(--md-sys-density,0)*4px))]",
|
|
22
|
+
default: "w-[max(24px,calc(32px+var(--md-sys-density,0)*4px))]",
|
|
23
|
+
wide: "w-[calc(40px+var(--md-sys-density,0)*4px)]"
|
|
24
|
+
},
|
|
25
|
+
sm: {
|
|
26
|
+
narrow: "w-[max(28px,calc(32px+var(--md-sys-density,0)*4px))]",
|
|
27
|
+
default: "w-[calc(40px+var(--md-sys-density,0)*4px)]",
|
|
28
|
+
wide: "w-[calc(52px+var(--md-sys-density,0)*4px)]"
|
|
29
|
+
},
|
|
30
|
+
md: {
|
|
31
|
+
narrow: "w-[calc(48px+var(--md-sys-density,0)*4px)]",
|
|
32
|
+
default: "w-[calc(56px+var(--md-sys-density,0)*4px)]",
|
|
33
|
+
wide: "w-[calc(72px+var(--md-sys-density,0)*4px)]"
|
|
34
|
+
},
|
|
35
|
+
lg: {
|
|
36
|
+
narrow: "w-[calc(64px+var(--md-sys-density,0)*4px)]",
|
|
37
|
+
default: "w-[calc(96px+var(--md-sys-density,0)*4px)]",
|
|
38
|
+
wide: "w-[calc(128px+var(--md-sys-density,0)*4px)]"
|
|
39
|
+
},
|
|
40
|
+
xl: {
|
|
41
|
+
narrow: "w-[calc(104px+var(--md-sys-density,0)*4px)]",
|
|
42
|
+
default: "w-[calc(136px+var(--md-sys-density,0)*4px)]",
|
|
43
|
+
wide: "w-[calc(184px+var(--md-sys-density,0)*4px)]"
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* In a connected button group, the width is a minimum: the group's equal columns stretch the
|
|
48
|
+
* button (2026-10-15). Extra small and small connected buttons are at least 48px wide (button
|
|
49
|
+
* group specs).
|
|
50
|
+
*/
|
|
51
|
+
const connectedWidths = {
|
|
52
|
+
xs: {
|
|
53
|
+
narrow: "w-auto min-w-[48px]",
|
|
54
|
+
default: "w-auto min-w-[48px]",
|
|
55
|
+
wide: "w-auto min-w-[48px]"
|
|
56
|
+
},
|
|
57
|
+
sm: {
|
|
58
|
+
narrow: "w-auto min-w-[48px]",
|
|
59
|
+
default: "w-auto min-w-[48px]",
|
|
60
|
+
wide: "w-auto min-w-[52px]"
|
|
61
|
+
},
|
|
62
|
+
md: {
|
|
63
|
+
narrow: "w-auto min-w-[48px]",
|
|
64
|
+
default: "w-auto min-w-[56px]",
|
|
65
|
+
wide: "w-auto min-w-[72px]"
|
|
66
|
+
},
|
|
67
|
+
lg: {
|
|
68
|
+
narrow: "w-auto min-w-[64px]",
|
|
69
|
+
default: "w-auto min-w-[96px]",
|
|
70
|
+
wide: "w-auto min-w-[128px]"
|
|
71
|
+
},
|
|
72
|
+
xl: {
|
|
73
|
+
narrow: "w-auto min-w-[104px]",
|
|
74
|
+
default: "w-auto min-w-[136px]",
|
|
75
|
+
wide: "w-auto min-w-[184px]"
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
const SIZES = Object.keys(pressed);
|
|
79
|
+
const WIDTHS = [
|
|
80
|
+
"narrow",
|
|
81
|
+
"default",
|
|
82
|
+
"wide"
|
|
83
|
+
];
|
|
84
|
+
const shapeVariants = [
|
|
85
|
+
{
|
|
86
|
+
connected: "none",
|
|
87
|
+
shape: "round",
|
|
88
|
+
class: { root: round }
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
connected: "none",
|
|
92
|
+
shape: "square",
|
|
93
|
+
class: { root: square }
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
connected: "none",
|
|
97
|
+
toggle: true,
|
|
98
|
+
shape: "round",
|
|
99
|
+
class: { root: selectedSquare }
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
connected: "none",
|
|
103
|
+
toggle: true,
|
|
104
|
+
shape: "square",
|
|
105
|
+
class: { root: selectedRound }
|
|
106
|
+
}
|
|
107
|
+
];
|
|
108
|
+
const sizeVariants = SIZES.flatMap((size) => [
|
|
109
|
+
{
|
|
110
|
+
size,
|
|
111
|
+
connected: "none",
|
|
112
|
+
class: { root: pressed[size] }
|
|
113
|
+
},
|
|
114
|
+
...WIDTHS.map((width) => ({
|
|
115
|
+
size,
|
|
116
|
+
width,
|
|
117
|
+
class: { root: widths[size][width] }
|
|
118
|
+
})),
|
|
119
|
+
...WIDTHS.map((width) => ({
|
|
120
|
+
size,
|
|
121
|
+
width,
|
|
122
|
+
connected: [
|
|
123
|
+
"leading",
|
|
124
|
+
"middle",
|
|
125
|
+
"trailing"
|
|
126
|
+
],
|
|
127
|
+
class: { root: connectedWidths[size][width] }
|
|
128
|
+
}))
|
|
129
|
+
]);
|
|
130
|
+
/** Variant definitions for {@link IconButton}; extend them to add variants. */
|
|
131
|
+
const iconButtonStyles = tv({
|
|
132
|
+
slots: {
|
|
133
|
+
root: [
|
|
134
|
+
"inline-flex shrink-0 cursor-pointer items-center justify-center p-0 align-middle select-none",
|
|
135
|
+
"h-[var(--m3-icon-button-height)]",
|
|
136
|
+
"state-layer focus-ring container-motion",
|
|
137
|
+
nonBouncingMorph,
|
|
138
|
+
"data-disabled:cursor-default",
|
|
139
|
+
forcedColorClasses.disabled
|
|
140
|
+
],
|
|
141
|
+
content: "relative inline-flex items-center justify-center",
|
|
142
|
+
icon: "inline-flex shrink-0 items-center justify-center [&>svg]:size-full"
|
|
143
|
+
},
|
|
144
|
+
variants: {
|
|
145
|
+
variant: {
|
|
146
|
+
standard: { root: "bg-transparent text-[color:var(--_md-comp-icon-button-icon-color)] data-disabled:text-on-surface/38" },
|
|
147
|
+
filled: { root: ["bg-[var(--_md-comp-icon-button-container-color)] text-[color:var(--_md-comp-icon-button-icon-color)] data-disabled:bg-on-surface/10 data-disabled:text-on-surface/38", "forced-colors:border forced-colors:border-solid forced-colors:border-[CanvasText]"] },
|
|
148
|
+
tonal: { root: ["bg-[var(--_md-comp-icon-button-container-color)] text-[color:var(--_md-comp-icon-button-icon-color)] data-disabled:bg-on-surface/10 data-disabled:text-on-surface/38", "forced-colors:border forced-colors:border-solid forced-colors:border-[CanvasText]"] },
|
|
149
|
+
outlined: { root: "border border-solid border-[color:var(--_md-comp-icon-button-outline-color)] bg-transparent text-[color:var(--_md-comp-icon-button-icon-color)] data-disabled:not-data-selected:border-outline-variant/10 data-disabled:text-on-surface/38" }
|
|
150
|
+
},
|
|
151
|
+
size: {
|
|
152
|
+
xs: {
|
|
153
|
+
root: "[--m3-icon-button-height:max(24px,calc(32px+var(--md-sys-density,0)*4px))]",
|
|
154
|
+
icon: "size-[20px]"
|
|
155
|
+
},
|
|
156
|
+
sm: {
|
|
157
|
+
root: "[--m3-icon-button-height:calc(40px+var(--md-sys-density,0)*4px)]",
|
|
158
|
+
icon: "size-[24px]"
|
|
159
|
+
},
|
|
160
|
+
md: {
|
|
161
|
+
root: "[--m3-icon-button-height:calc(56px+var(--md-sys-density,0)*4px)]",
|
|
162
|
+
content: "after:absolute after:top-1/2 after:left-1/2 after:h-[48px] after:w-[max(100%,48px)] after:-translate-x-1/2 after:-translate-y-1/2 after:content-['']",
|
|
163
|
+
icon: "size-[24px]"
|
|
164
|
+
},
|
|
165
|
+
lg: {
|
|
166
|
+
root: "[--m3-icon-button-height:calc(96px+var(--md-sys-density,0)*4px)]",
|
|
167
|
+
icon: "size-[32px]"
|
|
168
|
+
},
|
|
169
|
+
xl: {
|
|
170
|
+
root: "[--m3-icon-button-height:calc(136px+var(--md-sys-density,0)*4px)]",
|
|
171
|
+
icon: "size-[40px]"
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
width: {
|
|
175
|
+
narrow: {},
|
|
176
|
+
default: {},
|
|
177
|
+
wide: {}
|
|
178
|
+
},
|
|
179
|
+
shape: {
|
|
180
|
+
round: {},
|
|
181
|
+
square: {}
|
|
182
|
+
},
|
|
183
|
+
toggle: {
|
|
184
|
+
true: {},
|
|
185
|
+
false: {}
|
|
186
|
+
},
|
|
187
|
+
/** Position in a connected button group, set by `ButtonGroup`. */
|
|
188
|
+
connected: {
|
|
189
|
+
none: {},
|
|
190
|
+
leading: {},
|
|
191
|
+
middle: {},
|
|
192
|
+
trailing: {}
|
|
193
|
+
},
|
|
194
|
+
/** The colour scheme of an enclosing toolbar, set from its context. */
|
|
195
|
+
toolbar: {
|
|
196
|
+
none: {},
|
|
197
|
+
standard: {},
|
|
198
|
+
vibrant: {}
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
compoundVariants: [
|
|
202
|
+
...shapeVariants,
|
|
203
|
+
...sizeVariants,
|
|
204
|
+
...connectedShapeVariants,
|
|
205
|
+
{
|
|
206
|
+
variant: "outlined",
|
|
207
|
+
size: "lg",
|
|
208
|
+
class: { root: "border-2" }
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
variant: "outlined",
|
|
212
|
+
size: "xl",
|
|
213
|
+
class: { root: "border-3" }
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
toggle: true,
|
|
217
|
+
class: { root: ["bg-[var(--_md-comp-icon-button-unselected-container-color)] text-[color:var(--_md-comp-icon-button-unselected-icon-color)] data-selected:not-data-disabled:bg-[var(--_md-comp-icon-button-selected-container-color)] data-selected:not-data-disabled:text-[color:var(--_md-comp-icon-button-selected-icon-color)]", forcedColorClasses.selected] }
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
variant: "outlined",
|
|
221
|
+
toggle: true,
|
|
222
|
+
class: { root: "data-disabled:data-selected:bg-on-surface/10 data-selected:border-transparent" }
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
variant: "tonal",
|
|
226
|
+
toggle: true,
|
|
227
|
+
toolbar: "vibrant",
|
|
228
|
+
class: { root: "data-selected:not-data-disabled:bg-surface-container data-selected:not-data-disabled:text-on-surface" }
|
|
229
|
+
}
|
|
230
|
+
],
|
|
231
|
+
defaultVariants: {
|
|
232
|
+
variant: "filled",
|
|
233
|
+
size: "sm",
|
|
234
|
+
width: "default",
|
|
235
|
+
shape: "round",
|
|
236
|
+
toggle: false,
|
|
237
|
+
connected: "none",
|
|
238
|
+
toolbar: "none"
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
//#endregion
|
|
242
|
+
export { iconButtonStyles };
|
|
243
|
+
|
|
244
|
+
//# sourceMappingURL=icon-button-styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon-button-styles.js","names":[],"sources":["../../../src/components/icon-button/icon-button-styles.ts"],"sourcesContent":["import { tv, type VariantProps } from '../../utils/tv';\nimport { forcedColorClasses, nonBouncingMorph } from '../button/button-styles';\nimport { connectedShapeVariants } from '../button/connected-shapes';\n\n/*\n * Values follow the M3 Expressive icon button specs and Compose's *IconButtonTokens files.\n * Width = icon size + leading + trailing space; Compose's \"Uniform\" width option is the\n * default width. Every class is written out in full so Tailwind can find it.\n *\n * Colours (2026-10-13, from the spec's colour table): standard icons are\n * `on-surface-variant` (`primary` when a toggle is selected), and outlined ones have an\n * `outline-variant` outline around an `on-surface-variant` icon. A container that needs\n * another content colour for its standard and outlined icon buttons (a vibrant toolbar, a\n * snackbar) sets `--md-comp-icon-button-icon-color` on an ancestor, e.g. to `currentColor`\n * to inherit its own text colour.\n *\n * The resting, selected and unselected colours, the outline colour and the resting corners\n * come from the component tokens (`icon-button-tokens.ts`): the root carries\n * `data-tokens=\"md-comp-icon-button\"`, `data-variant` and `data-size`, and the classes read\n * one private variable per part. A consumer class (`bg-tertiary`) still wins in `cn()`.\n *\n * A disabled outlined icon button's outline is `outline-variant` at 10%, the same as a\n * disabled outlined Button (the tokens keep `outline-variant` and give no opacity of their\n * own; Button's is the disabled container opacity). A selected outlined toggle has no\n * outline, disabled or not (2026-10-13).\n */\n/*\n * The resting round and square corners come from the component tokens\n * (`icon-button-tokens.ts`, `--md-comp-icon-button-<size>-container-shape-*`); full corners\n * are capped at half the height (the set's derived `container-shape-round-capped`), and at half\n * the dense height too.\n */\nconst round =\n 'rounded-[min(var(--_md-comp-icon-button-container-shape-round-capped),calc(var(--m3-icon-button-height)/2))]';\nconst square = 'rounded-[var(--_md-comp-icon-button-container-shape-square)]';\n\nconst pressed = {\n xs: 'data-pressed:rounded-corner-small',\n sm: 'data-pressed:rounded-corner-small',\n md: 'data-pressed:rounded-corner-medium',\n lg: 'data-pressed:rounded-corner-large',\n xl: 'data-pressed:rounded-corner-large',\n} as const;\n\n/** Toggle, selected: round becomes square… */\nconst selectedSquare =\n 'data-selected:not-data-pressed:not-data-disabled:rounded-[var(--_md-comp-icon-button-container-shape-square)]';\n\n/** …and square becomes round (Compose `SelectedContainerShapeSquare` = full). */\nconst selectedRound =\n 'data-selected:not-data-pressed:not-data-disabled:rounded-[min(var(--_md-comp-icon-button-container-shape-round-capped),calc(var(--m3-icon-button-height)/2))]';\n\n/*\n * Web density (`--md-sys-density`, 0 to -3; M3: \"Avoid applying density by default … give\n * people a way to choose a higher density\"): each step takes 4px off the container's height\n * and width, as Material Components Web's icon button density did (48px, 4px a step, to 28px:\n * the 24px icon and 2px on each side). Here every size and width follows, never below its\n * icon plus 4px (24px at XS, 28px at S). The touch target stays 48 × 48px, extending past\n * the container (`TouchTarget` at XS and S, the content's `::after` at M). The round corners'\n * cap follows the height.\n */\n\n/** Container widths in px: narrow / default / wide, 4px less per density step. */\nconst widths = {\n xs: {\n narrow: 'w-[max(24px,calc(28px+var(--md-sys-density,0)*4px))]',\n default: 'w-[max(24px,calc(32px+var(--md-sys-density,0)*4px))]',\n wide: 'w-[calc(40px+var(--md-sys-density,0)*4px)]',\n },\n sm: {\n narrow: 'w-[max(28px,calc(32px+var(--md-sys-density,0)*4px))]',\n default: 'w-[calc(40px+var(--md-sys-density,0)*4px)]',\n wide: 'w-[calc(52px+var(--md-sys-density,0)*4px)]',\n },\n md: {\n narrow: 'w-[calc(48px+var(--md-sys-density,0)*4px)]',\n default: 'w-[calc(56px+var(--md-sys-density,0)*4px)]',\n wide: 'w-[calc(72px+var(--md-sys-density,0)*4px)]',\n },\n lg: {\n narrow: 'w-[calc(64px+var(--md-sys-density,0)*4px)]',\n default: 'w-[calc(96px+var(--md-sys-density,0)*4px)]',\n wide: 'w-[calc(128px+var(--md-sys-density,0)*4px)]',\n },\n xl: {\n narrow: 'w-[calc(104px+var(--md-sys-density,0)*4px)]',\n default: 'w-[calc(136px+var(--md-sys-density,0)*4px)]',\n wide: 'w-[calc(184px+var(--md-sys-density,0)*4px)]',\n },\n} as const;\n\n/**\n * In a connected button group, the width is a minimum: the group's equal columns stretch the\n * button (2026-10-15). Extra small and small connected buttons are at least 48px wide (button\n * group specs).\n */\nconst connectedWidths = {\n xs: {\n narrow: 'w-auto min-w-[48px]',\n default: 'w-auto min-w-[48px]',\n wide: 'w-auto min-w-[48px]',\n },\n sm: {\n narrow: 'w-auto min-w-[48px]',\n default: 'w-auto min-w-[48px]',\n wide: 'w-auto min-w-[52px]',\n },\n md: {\n narrow: 'w-auto min-w-[48px]',\n default: 'w-auto min-w-[56px]',\n wide: 'w-auto min-w-[72px]',\n },\n lg: {\n narrow: 'w-auto min-w-[64px]',\n default: 'w-auto min-w-[96px]',\n wide: 'w-auto min-w-[128px]',\n },\n xl: {\n narrow: 'w-auto min-w-[104px]',\n default: 'w-auto min-w-[136px]',\n wide: 'w-auto min-w-[184px]',\n },\n} as const;\n\ntype Size = keyof typeof pressed;\nconst SIZES = Object.keys(pressed) as Size[];\nconst WIDTHS = ['narrow', 'default', 'wide'] as const;\n\nconst shapeVariants = [\n { connected: 'none' as const, shape: 'round' as const, class: { root: round } },\n { connected: 'none' as const, shape: 'square' as const, class: { root: square } },\n {\n connected: 'none' as const,\n toggle: true,\n shape: 'round' as const,\n class: { root: selectedSquare },\n },\n {\n connected: 'none' as const,\n toggle: true,\n shape: 'square' as const,\n class: { root: selectedRound },\n },\n];\n\nconst sizeVariants = SIZES.flatMap((size) => [\n { size, connected: 'none' as const, class: { root: pressed[size] } },\n ...WIDTHS.map((width) => ({ size, width, class: { root: widths[size][width] } })),\n ...WIDTHS.map((width) => ({\n size,\n width,\n connected: ['leading' as const, 'middle' as const, 'trailing' as const],\n class: { root: connectedWidths[size][width] },\n })),\n]);\n\n/** Variant definitions for {@link IconButton}; extend them to add variants. */\nexport const iconButtonStyles = tv({\n slots: {\n root: [\n 'inline-flex shrink-0 cursor-pointer items-center justify-center p-0 align-middle select-none',\n // The height, per size (`--m3-icon-button-height`).\n 'h-[var(--m3-icon-button-height)]',\n 'state-layer focus-ring container-motion',\n // Every morph, toggles included, on the default effects spring, which never bounces:\n // Compose's IconButton \"DefaultEffects is intentional here to prevent any bounce\".\n nonBouncingMorph,\n 'data-disabled:cursor-default',\n forcedColorClasses.disabled,\n ],\n // Library-owned inner wrapper: holds the icon and the touch target.\n content: 'relative inline-flex items-center justify-center',\n icon: 'inline-flex shrink-0 items-center justify-center [&>svg]:size-full',\n },\n variants: {\n variant: {\n standard: {\n root: 'bg-transparent text-[color:var(--_md-comp-icon-button-icon-color)] data-disabled:text-on-surface/38',\n },\n filled: {\n root: [\n 'bg-[var(--_md-comp-icon-button-container-color)] text-[color:var(--_md-comp-icon-button-icon-color)] data-disabled:bg-on-surface/10 data-disabled:text-on-surface/38',\n // Forced colours paint the container as Canvas: a 1px CanvasText boundary keeps it\n // visible, as Material Web's filled and tonal icon buttons (2026-10-15).\n 'forced-colors:border forced-colors:border-solid forced-colors:border-[CanvasText]',\n ],\n },\n tonal: {\n root: [\n 'bg-[var(--_md-comp-icon-button-container-color)] text-[color:var(--_md-comp-icon-button-icon-color)] data-disabled:bg-on-surface/10 data-disabled:text-on-surface/38',\n // Forced colours paint the container as Canvas: a 1px CanvasText boundary keeps it\n // visible, as Material Web's filled and tonal icon buttons (2026-10-15).\n 'forced-colors:border forced-colors:border-solid forced-colors:border-[CanvasText]',\n ],\n },\n outlined: {\n root: 'border border-solid border-[color:var(--_md-comp-icon-button-outline-color)] bg-transparent text-[color:var(--_md-comp-icon-button-icon-color)] data-disabled:not-data-selected:border-outline-variant/10 data-disabled:text-on-surface/38',\n },\n },\n // Heights: 32 / 40 / 56 / 96 / 136px, 4px less per density step.\n size: {\n xs: {\n root: '[--m3-icon-button-height:max(24px,calc(32px+var(--md-sys-density,0)*4px))]',\n icon: 'size-[20px]',\n },\n sm: {\n root: '[--m3-icon-button-height:calc(40px+var(--md-sys-density,0)*4px)]',\n icon: 'size-[24px]',\n },\n md: {\n root: '[--m3-icon-button-height:calc(56px+var(--md-sys-density,0)*4px)]',\n // A dense M (narrow from -1, every width at -3) is under 48px: its content's `::after`\n // is the touch target (`TouchTarget`'s box, without adding an element at density 0).\n content:\n \"after:absolute after:top-1/2 after:left-1/2 after:h-[48px] after:w-[max(100%,48px)] after:-translate-x-1/2 after:-translate-y-1/2 after:content-['']\",\n icon: 'size-[24px]',\n },\n lg: {\n root: '[--m3-icon-button-height:calc(96px+var(--md-sys-density,0)*4px)]',\n icon: 'size-[32px]',\n },\n xl: {\n root: '[--m3-icon-button-height:calc(136px+var(--md-sys-density,0)*4px)]',\n icon: 'size-[40px]',\n },\n },\n width: { narrow: {}, default: {}, wide: {} },\n shape: { round: {}, square: {} },\n toggle: { true: {}, false: {} },\n /** Position in a connected button group, set by `ButtonGroup`. */\n connected: { none: {}, leading: {}, middle: {}, trailing: {} },\n /** The colour scheme of an enclosing toolbar, set from its context. */\n toolbar: { none: {}, standard: {}, vibrant: {} },\n },\n compoundVariants: [\n ...shapeVariants,\n ...sizeVariants,\n ...connectedShapeVariants,\n { variant: 'outlined', size: 'lg', class: { root: 'border-2' } },\n { variant: 'outlined', size: 'xl', class: { root: 'border-3' } },\n // Toggle colours: unselected → selected, from the component tokens.\n {\n toggle: true,\n class: {\n root: [\n 'bg-[var(--_md-comp-icon-button-unselected-container-color)] text-[color:var(--_md-comp-icon-button-unselected-icon-color)] data-selected:not-data-disabled:bg-[var(--_md-comp-icon-button-selected-container-color)] data-selected:not-data-disabled:text-[color:var(--_md-comp-icon-button-selected-icon-color)]',\n forcedColorClasses.selected,\n ],\n },\n },\n {\n variant: 'outlined',\n toggle: true,\n class: {\n root: 'data-disabled:data-selected:bg-on-surface/10 data-selected:border-transparent',\n },\n },\n // In a vibrant toolbar (M3 toolbar colour spec, FloatingToolbarTokens.VibrantButton*),\n // selected tonal toggles turn surface-container / on-surface. Standard icons take the\n // toolbar's on-primary-container through --md-comp-icon-button-icon-color.\n {\n variant: 'tonal',\n toggle: true,\n toolbar: 'vibrant',\n class: {\n root: 'data-selected:not-data-disabled:bg-surface-container data-selected:not-data-disabled:text-on-surface',\n },\n },\n ],\n defaultVariants: {\n variant: 'filled',\n size: 'sm',\n width: 'default',\n shape: 'round',\n toggle: false,\n connected: 'none',\n toolbar: 'none',\n },\n});\n\n/**\n * The variants of {@link iconButtonStyles}, for building on its styles. They are the recipe's keys, not\n * component props: their names (`hasIcon`, `isOpen`…) follow the classes and may change.\n */\nexport type IconButtonStyleProps = VariantProps<typeof iconButtonStyles>;\nexport type IconButtonVariant = NonNullable<IconButtonStyleProps['variant']>;\nexport type IconButtonWidth = NonNullable<IconButtonStyleProps['width']>;\n"],"mappings":";;;;AAgCA,MAAM,QACJ;AACF,MAAM,SAAS;AAEf,MAAM,UAAU;CACd,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;AACN;;AAGA,MAAM,iBACJ;;AAGF,MAAM,gBACJ;;AAaF,MAAM,SAAS;CACb,IAAI;EACF,QAAQ;EACR,SAAS;EACT,MAAM;CACR;CACA,IAAI;EACF,QAAQ;EACR,SAAS;EACT,MAAM;CACR;CACA,IAAI;EACF,QAAQ;EACR,SAAS;EACT,MAAM;CACR;CACA,IAAI;EACF,QAAQ;EACR,SAAS;EACT,MAAM;CACR;CACA,IAAI;EACF,QAAQ;EACR,SAAS;EACT,MAAM;CACR;AACF;;;;;;AAOA,MAAM,kBAAkB;CACtB,IAAI;EACF,QAAQ;EACR,SAAS;EACT,MAAM;CACR;CACA,IAAI;EACF,QAAQ;EACR,SAAS;EACT,MAAM;CACR;CACA,IAAI;EACF,QAAQ;EACR,SAAS;EACT,MAAM;CACR;CACA,IAAI;EACF,QAAQ;EACR,SAAS;EACT,MAAM;CACR;CACA,IAAI;EACF,QAAQ;EACR,SAAS;EACT,MAAM;CACR;AACF;AAGA,MAAM,QAAQ,OAAO,KAAK,OAAO;AACjC,MAAM,SAAS;CAAC;CAAU;CAAW;AAAM;AAE3C,MAAM,gBAAgB;CACpB;EAAE,WAAW;EAAiB,OAAO;EAAkB,OAAO,EAAE,MAAM,MAAM;CAAE;CAC9E;EAAE,WAAW;EAAiB,OAAO;EAAmB,OAAO,EAAE,MAAM,OAAO;CAAE;CAChF;EACE,WAAW;EACX,QAAQ;EACR,OAAO;EACP,OAAO,EAAE,MAAM,eAAe;CAChC;CACA;EACE,WAAW;EACX,QAAQ;EACR,OAAO;EACP,OAAO,EAAE,MAAM,cAAc;CAC/B;AACF;AAEA,MAAM,eAAe,MAAM,SAAS,SAAS;CAC3C;EAAE;EAAM,WAAW;EAAiB,OAAO,EAAE,MAAM,QAAQ,MAAM;CAAE;CACnE,GAAG,OAAO,KAAK,WAAW;EAAE;EAAM;EAAO,OAAO,EAAE,MAAM,OAAO,KAAK,CAAC,OAAO;CAAE,EAAE;CAChF,GAAG,OAAO,KAAK,WAAW;EACxB;EACA;EACA,WAAW;GAAC;GAAoB;GAAmB;EAAmB;EACtE,OAAO,EAAE,MAAM,gBAAgB,KAAK,CAAC,OAAO;CAC9C,EAAE;AACJ,CAAC;;AAGD,MAAa,mBAAmB,GAAG;CACjC,OAAO;EACL,MAAM;GACJ;GAEA;GACA;GAGA;GACA;GACA,mBAAmB;EACrB;EAEA,SAAS;EACT,MAAM;CACR;CACA,UAAU;EACR,SAAS;GACP,UAAU,EACR,MAAM,sGACR;GACA,QAAQ,EACN,MAAM,CACJ,wKAGA,mFACF,EACF;GACA,OAAO,EACL,MAAM,CACJ,wKAGA,mFACF,EACF;GACA,UAAU,EACR,MAAM,6OACR;EACF;EAEA,MAAM;GACJ,IAAI;IACF,MAAM;IACN,MAAM;GACR;GACA,IAAI;IACF,MAAM;IACN,MAAM;GACR;GACA,IAAI;IACF,MAAM;IAGN,SACE;IACF,MAAM;GACR;GACA,IAAI;IACF,MAAM;IACN,MAAM;GACR;GACA,IAAI;IACF,MAAM;IACN,MAAM;GACR;EACF;EACA,OAAO;GAAE,QAAQ,CAAC;GAAG,SAAS,CAAC;GAAG,MAAM,CAAC;EAAE;EAC3C,OAAO;GAAE,OAAO,CAAC;GAAG,QAAQ,CAAC;EAAE;EAC/B,QAAQ;GAAE,MAAM,CAAC;GAAG,OAAO,CAAC;EAAE;;EAE9B,WAAW;GAAE,MAAM,CAAC;GAAG,SAAS,CAAC;GAAG,QAAQ,CAAC;GAAG,UAAU,CAAC;EAAE;;EAE7D,SAAS;GAAE,MAAM,CAAC;GAAG,UAAU,CAAC;GAAG,SAAS,CAAC;EAAE;CACjD;CACA,kBAAkB;EAChB,GAAG;EACH,GAAG;EACH,GAAG;EACH;GAAE,SAAS;GAAY,MAAM;GAAM,OAAO,EAAE,MAAM,WAAW;EAAE;EAC/D;GAAE,SAAS;GAAY,MAAM;GAAM,OAAO,EAAE,MAAM,WAAW;EAAE;EAE/D;GACE,QAAQ;GACR,OAAO,EACL,MAAM,CACJ,qTACA,mBAAmB,QACrB,EACF;EACF;EACA;GACE,SAAS;GACT,QAAQ;GACR,OAAO,EACL,MAAM,gFACR;EACF;EAIA;GACE,SAAS;GACT,QAAQ;GACR,SAAS;GACT,OAAO,EACL,MAAM,uGACR;EACF;CACF;CACA,iBAAiB;EACf,SAAS;EACT,MAAM;EACN,OAAO;EACP,OAAO;EACP,QAAQ;EACR,WAAW;EACX,SAAS;CACX;AACF,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ComponentTokenSet } from "../../tokens/component.js";
|
|
2
|
+
import "../../index.js";
|
|
3
|
+
//#region src/components/icon-button/icon-button-tokens.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* The tokens of {@link IconButton}: `--md-comp-icon-button-<variant>-<part>` per variant
|
|
6
|
+
* and `--md-comp-icon-button-<size>-container-shape-<round|square>` per size. The standard
|
|
7
|
+
* and outlined icon colours fall back to `--md-comp-icon-button-icon-color`.
|
|
8
|
+
*/
|
|
9
|
+
export declare const iconButtonTokenSet: ComponentTokenSet<never>;
|
|
10
|
+
//#endregion
|
|
11
|
+
//# sourceMappingURL=icon-button-tokens.d.ts.map
|