@windmorph/react 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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,257 @@
|
|
|
1
|
+
import { color, corner, defineComponentTokens, elevation, px } from "../../tokens/component.js";
|
|
2
|
+
//#region src/components/button/button-tokens.ts
|
|
3
|
+
const container = { property: "background-color" };
|
|
4
|
+
const label = { property: "color" };
|
|
5
|
+
const selectedContainer = {
|
|
6
|
+
property: "background-color",
|
|
7
|
+
state: "selected"
|
|
8
|
+
};
|
|
9
|
+
const selectedLabel = {
|
|
10
|
+
property: "color",
|
|
11
|
+
state: "selected"
|
|
12
|
+
};
|
|
13
|
+
const unselectedContainer = {
|
|
14
|
+
property: "background-color",
|
|
15
|
+
state: "unselected"
|
|
16
|
+
};
|
|
17
|
+
const unselectedLabel = {
|
|
18
|
+
property: "color",
|
|
19
|
+
state: "unselected"
|
|
20
|
+
};
|
|
21
|
+
const roundShape = { property: "border-top-left-radius" };
|
|
22
|
+
const squareShape = {
|
|
23
|
+
property: "border-top-left-radius",
|
|
24
|
+
state: "selected"
|
|
25
|
+
};
|
|
26
|
+
/** The private parts every variant without its own token takes from its resting colours. */
|
|
27
|
+
const followsResting = { "unselected-label-text-color": "var(--_md-comp-button-label-text-color)" };
|
|
28
|
+
/** The six colour tokens of a variant with a full toggle set. */
|
|
29
|
+
function toggleColors(compose, colors) {
|
|
30
|
+
return {
|
|
31
|
+
"container-color": {
|
|
32
|
+
value: colors.container,
|
|
33
|
+
description: "The container.",
|
|
34
|
+
compose: `${compose}.ContainerColor`,
|
|
35
|
+
paints: container
|
|
36
|
+
},
|
|
37
|
+
"label-text-color": {
|
|
38
|
+
value: colors.label,
|
|
39
|
+
description: "The label and icon.",
|
|
40
|
+
compose: `${compose}.LabelTextColor`,
|
|
41
|
+
paints: label
|
|
42
|
+
},
|
|
43
|
+
"selected-container-color": {
|
|
44
|
+
value: colors.selectedContainer,
|
|
45
|
+
description: "The container of a selected toggle.",
|
|
46
|
+
compose: `${compose}.SelectedContainerColor`,
|
|
47
|
+
paints: selectedContainer
|
|
48
|
+
},
|
|
49
|
+
"selected-label-text-color": {
|
|
50
|
+
value: colors.selectedLabel,
|
|
51
|
+
description: "The label and icon of a selected toggle.",
|
|
52
|
+
compose: `${compose}.SelectedLabelTextColor`,
|
|
53
|
+
paints: selectedLabel
|
|
54
|
+
},
|
|
55
|
+
"unselected-container-color": {
|
|
56
|
+
value: colors.unselectedContainer,
|
|
57
|
+
description: "The container of an unselected toggle.",
|
|
58
|
+
compose: `${compose}.UnselectedContainerColor`,
|
|
59
|
+
paints: unselectedContainer
|
|
60
|
+
},
|
|
61
|
+
"unselected-label-text-color": {
|
|
62
|
+
value: colors.unselectedLabel,
|
|
63
|
+
description: "The label and icon of an unselected toggle.",
|
|
64
|
+
compose: `${compose}.UnselectedLabelTextColor`,
|
|
65
|
+
paints: unselectedLabel
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
/** A size's round and square corners; round is full, capped at half the height. */
|
|
70
|
+
function shapes(compose, square) {
|
|
71
|
+
return {
|
|
72
|
+
"container-shape-round": {
|
|
73
|
+
value: corner("full"),
|
|
74
|
+
description: "The round shape: full corners, at most half the height.",
|
|
75
|
+
compose: `${compose}.ContainerShapeRound`,
|
|
76
|
+
paints: roundShape
|
|
77
|
+
},
|
|
78
|
+
"container-shape-square": {
|
|
79
|
+
value: square,
|
|
80
|
+
description: "The square shape, which a selected round toggle also takes.",
|
|
81
|
+
compose: `${compose}.ContainerShapeSquare`,
|
|
82
|
+
paints: squareShape
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* The tokens of {@link Button}: `--md-comp-button-<variant>-<part>` per variant and
|
|
88
|
+
* `--md-comp-button-<size>-container-shape-<round|square>` per size.
|
|
89
|
+
*/
|
|
90
|
+
const buttonTokenSet = defineComponentTokens({
|
|
91
|
+
name: "md-comp-button",
|
|
92
|
+
tokens: {},
|
|
93
|
+
scopes: {
|
|
94
|
+
variant: {
|
|
95
|
+
filled: {
|
|
96
|
+
prefix: "md-comp-button-filled",
|
|
97
|
+
tokens: toggleColors("FilledButtonTokens", {
|
|
98
|
+
container: color("primary"),
|
|
99
|
+
label: color("on-primary"),
|
|
100
|
+
selectedContainer: color("primary"),
|
|
101
|
+
selectedLabel: color("on-primary"),
|
|
102
|
+
unselectedContainer: color("surface-container"),
|
|
103
|
+
unselectedLabel: color("on-surface-variant")
|
|
104
|
+
}),
|
|
105
|
+
fixed: {
|
|
106
|
+
"container-elevation": elevation(0),
|
|
107
|
+
"outline-color": "transparent"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
elevated: {
|
|
111
|
+
prefix: "md-comp-button-elevated",
|
|
112
|
+
tokens: {
|
|
113
|
+
"container-color": {
|
|
114
|
+
value: color("surface-container-low"),
|
|
115
|
+
description: "The container.",
|
|
116
|
+
compose: "ElevatedButtonTokens.ContainerColor",
|
|
117
|
+
paints: container
|
|
118
|
+
},
|
|
119
|
+
"label-text-color": {
|
|
120
|
+
value: color("primary"),
|
|
121
|
+
description: "The label and icon, and an unselected toggle’s.",
|
|
122
|
+
compose: "ElevatedButtonTokens.LabelTextColor",
|
|
123
|
+
paints: label
|
|
124
|
+
},
|
|
125
|
+
"container-elevation": {
|
|
126
|
+
value: elevation(1),
|
|
127
|
+
description: "The shadow at rest.",
|
|
128
|
+
compose: "ElevatedButtonTokens.ContainerElevation",
|
|
129
|
+
paints: { property: "box-shadow" }
|
|
130
|
+
},
|
|
131
|
+
"selected-container-color": {
|
|
132
|
+
value: color("primary"),
|
|
133
|
+
description: "The container of a selected toggle.",
|
|
134
|
+
compose: "ElevatedButtonTokens.SelectedContainerColor",
|
|
135
|
+
paints: selectedContainer
|
|
136
|
+
},
|
|
137
|
+
"selected-label-text-color": {
|
|
138
|
+
value: color("on-primary"),
|
|
139
|
+
description: "The label and icon of a selected toggle.",
|
|
140
|
+
compose: "ElevatedButtonTokens.SelectedLabelTextColor",
|
|
141
|
+
paints: selectedLabel
|
|
142
|
+
},
|
|
143
|
+
"unselected-container-color": {
|
|
144
|
+
value: color("surface-container-low"),
|
|
145
|
+
description: "The container of an unselected toggle.",
|
|
146
|
+
compose: "ElevatedButtonTokens.UnselectedContainerColor",
|
|
147
|
+
paints: unselectedContainer
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
fixed: {
|
|
151
|
+
...followsResting,
|
|
152
|
+
"outline-color": "transparent"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
tonal: {
|
|
156
|
+
prefix: "md-comp-button-tonal",
|
|
157
|
+
tokens: toggleColors("TonalButtonTokens", {
|
|
158
|
+
container: color("secondary-container"),
|
|
159
|
+
label: color("on-secondary-container"),
|
|
160
|
+
selectedContainer: color("secondary"),
|
|
161
|
+
selectedLabel: color("on-secondary"),
|
|
162
|
+
unselectedContainer: color("secondary-container"),
|
|
163
|
+
unselectedLabel: color("on-secondary-container")
|
|
164
|
+
}),
|
|
165
|
+
fixed: {
|
|
166
|
+
"container-elevation": elevation(0),
|
|
167
|
+
"outline-color": "transparent"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
outlined: {
|
|
171
|
+
prefix: "md-comp-button-outlined",
|
|
172
|
+
tokens: {
|
|
173
|
+
"outline-color": {
|
|
174
|
+
value: color("outline-variant"),
|
|
175
|
+
description: "The outline.",
|
|
176
|
+
compose: "OutlinedButtonTokens.OutlineColor",
|
|
177
|
+
paints: { property: "border-top-color" }
|
|
178
|
+
},
|
|
179
|
+
"label-text-color": {
|
|
180
|
+
value: color("on-surface-variant"),
|
|
181
|
+
description: "The label and icon, and an unselected toggle’s.",
|
|
182
|
+
compose: "OutlinedButtonTokens.LabelTextColor",
|
|
183
|
+
paints: label
|
|
184
|
+
},
|
|
185
|
+
"selected-container-color": {
|
|
186
|
+
value: color("inverse-surface"),
|
|
187
|
+
description: "The container of a selected toggle, which has no outline.",
|
|
188
|
+
compose: "OutlinedButtonTokens.SelectedContainerColor",
|
|
189
|
+
paints: selectedContainer
|
|
190
|
+
},
|
|
191
|
+
"selected-label-text-color": {
|
|
192
|
+
value: color("inverse-on-surface"),
|
|
193
|
+
description: "The label and icon of a selected toggle.",
|
|
194
|
+
compose: "OutlinedButtonTokens.SelectedLabelTextColor",
|
|
195
|
+
paints: selectedLabel
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
fixed: {
|
|
199
|
+
...followsResting,
|
|
200
|
+
"container-color": "transparent",
|
|
201
|
+
"container-elevation": elevation(0),
|
|
202
|
+
"unselected-container-color": "transparent"
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
text: {
|
|
206
|
+
prefix: "md-comp-button-text",
|
|
207
|
+
tokens: { "label-text-color": {
|
|
208
|
+
value: color("primary"),
|
|
209
|
+
description: "The label and icon.",
|
|
210
|
+
compose: "TextButtonTokens.LabelTextColor",
|
|
211
|
+
paints: label
|
|
212
|
+
} },
|
|
213
|
+
fixed: {
|
|
214
|
+
...followsResting,
|
|
215
|
+
"container-color": "transparent",
|
|
216
|
+
"container-elevation": elevation(0),
|
|
217
|
+
"outline-color": "transparent",
|
|
218
|
+
"selected-container-color": "transparent",
|
|
219
|
+
"selected-label-text-color": "var(--_md-comp-button-label-text-color)",
|
|
220
|
+
"unselected-container-color": "transparent"
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
size: {
|
|
225
|
+
xs: {
|
|
226
|
+
prefix: "md-comp-button-xsmall",
|
|
227
|
+
tokens: shapes("ButtonXSmallTokens", corner("medium")),
|
|
228
|
+
fixed: { "half-height": px(16) }
|
|
229
|
+
},
|
|
230
|
+
sm: {
|
|
231
|
+
prefix: "md-comp-button-small",
|
|
232
|
+
tokens: shapes("ButtonSmallTokens", corner("medium")),
|
|
233
|
+
fixed: { "half-height": px(20) }
|
|
234
|
+
},
|
|
235
|
+
md: {
|
|
236
|
+
prefix: "md-comp-button-medium",
|
|
237
|
+
tokens: shapes("ButtonMediumTokens", corner("large")),
|
|
238
|
+
fixed: { "half-height": px(28) }
|
|
239
|
+
},
|
|
240
|
+
lg: {
|
|
241
|
+
prefix: "md-comp-button-large",
|
|
242
|
+
tokens: shapes("ButtonLargeTokens", corner("extra-large")),
|
|
243
|
+
fixed: { "half-height": px(48) }
|
|
244
|
+
},
|
|
245
|
+
xl: {
|
|
246
|
+
prefix: "md-comp-button-xlarge",
|
|
247
|
+
tokens: shapes("ButtonXLargeTokens", corner("extra-large")),
|
|
248
|
+
fixed: { "half-height": px(68) }
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
derived: { "container-shape-round-capped": "min(var(--_md-comp-button-container-shape-round), var(--_md-comp-button-half-height))" }
|
|
253
|
+
});
|
|
254
|
+
//#endregion
|
|
255
|
+
export { buttonTokenSet };
|
|
256
|
+
|
|
257
|
+
//# sourceMappingURL=button-tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-tokens.js","names":[],"sources":["../../../src/components/button/button-tokens.ts"],"sourcesContent":["import {\n color,\n corner,\n defineComponentTokens,\n elevation,\n px,\n type ComponentToken,\n type TokenPaints,\n type TokenValue,\n} from '../../tokens/component';\n\n/*\n * Button's component tokens, M3 Expressive's `md.comp.button.<variant>.*` and\n * `md.comp.button.<size>.*` names (checked against m3.material.io's token tables,\n * 2026-10-14), with Compose's defaults. `button-styles.ts` reads one private variable per\n * part; the root's `data-variant` and `data-size` pick the public names and defaults. The\n * split button's halves read the same colours (`buttonVariantClasses`), so a variant's\n * tokens restyle them too.\n *\n * A toggle's unselected colours default to M3's own values. Where M3 has no unselected\n * token for a variant (the elevated and outlined label, the outlined container), the\n * unselected part follows the resting one. Hover, focus, pressed and disabled values, the\n * pressed shape, outline widths and sizes stay classes.\n */\n\nconst container: TokenPaints = { property: 'background-color' };\nconst label: TokenPaints = { property: 'color' };\nconst selectedContainer: TokenPaints = { property: 'background-color', state: 'selected' };\nconst selectedLabel: TokenPaints = { property: 'color', state: 'selected' };\n// An unselected toggle has no attribute of its own, so the probe story marks its instance.\nconst unselectedContainer: TokenPaints = { property: 'background-color', state: 'unselected' };\nconst unselectedLabel: TokenPaints = { property: 'color', state: 'unselected' };\nconst roundShape: TokenPaints = { property: 'border-top-left-radius' };\n// A selected round toggle takes the square shape, so that's where the square token shows.\nconst squareShape: TokenPaints = { property: 'border-top-left-radius', state: 'selected' };\n\n/** The private parts every variant without its own token takes from its resting colours. */\nconst followsResting = {\n 'unselected-label-text-color': 'var(--_md-comp-button-label-text-color)',\n} as const;\n\n/** The six colour tokens of a variant with a full toggle set. */\nfunction toggleColors(\n compose: string,\n colors: {\n container: TokenValue;\n label: TokenValue;\n selectedContainer: TokenValue;\n selectedLabel: TokenValue;\n unselectedContainer: TokenValue;\n unselectedLabel: TokenValue;\n },\n) {\n return {\n 'container-color': {\n value: colors.container,\n description: 'The container.',\n compose: `${compose}.ContainerColor`,\n paints: container,\n },\n 'label-text-color': {\n value: colors.label,\n description: 'The label and icon.',\n compose: `${compose}.LabelTextColor`,\n paints: label,\n },\n 'selected-container-color': {\n value: colors.selectedContainer,\n description: 'The container of a selected toggle.',\n compose: `${compose}.SelectedContainerColor`,\n paints: selectedContainer,\n },\n 'selected-label-text-color': {\n value: colors.selectedLabel,\n description: 'The label and icon of a selected toggle.',\n compose: `${compose}.SelectedLabelTextColor`,\n paints: selectedLabel,\n },\n 'unselected-container-color': {\n value: colors.unselectedContainer,\n description: 'The container of an unselected toggle.',\n compose: `${compose}.UnselectedContainerColor`,\n paints: unselectedContainer,\n },\n 'unselected-label-text-color': {\n value: colors.unselectedLabel,\n description: 'The label and icon of an unselected toggle.',\n compose: `${compose}.UnselectedLabelTextColor`,\n paints: unselectedLabel,\n },\n } satisfies Record<string, ComponentToken>;\n}\n\n/** A size's round and square corners; round is full, capped at half the height. */\nfunction shapes(compose: string, square: TokenValue) {\n return {\n 'container-shape-round': {\n value: corner('full'),\n description: 'The round shape: full corners, at most half the height.',\n compose: `${compose}.ContainerShapeRound`,\n paints: roundShape,\n },\n 'container-shape-square': {\n value: square,\n description: 'The square shape, which a selected round toggle also takes.',\n compose: `${compose}.ContainerShapeSquare`,\n paints: squareShape,\n },\n } satisfies Record<string, ComponentToken>;\n}\n\n/**\n * The tokens of {@link Button}: `--md-comp-button-<variant>-<part>` per variant and\n * `--md-comp-button-<size>-container-shape-<round|square>` per size.\n */\nexport const buttonTokenSet = defineComponentTokens({\n name: 'md-comp-button',\n tokens: {},\n scopes: {\n variant: {\n filled: {\n prefix: 'md-comp-button-filled',\n tokens: toggleColors('FilledButtonTokens', {\n container: color('primary'),\n label: color('on-primary'),\n selectedContainer: color('primary'),\n selectedLabel: color('on-primary'),\n unselectedContainer: color('surface-container'),\n unselectedLabel: color('on-surface-variant'),\n }),\n fixed: { 'container-elevation': elevation(0), 'outline-color': 'transparent' },\n },\n elevated: {\n prefix: 'md-comp-button-elevated',\n tokens: {\n 'container-color': {\n value: color('surface-container-low'),\n description: 'The container.',\n compose: 'ElevatedButtonTokens.ContainerColor',\n paints: container,\n },\n 'label-text-color': {\n value: color('primary'),\n description: 'The label and icon, and an unselected toggle’s.',\n compose: 'ElevatedButtonTokens.LabelTextColor',\n paints: label,\n },\n 'container-elevation': {\n value: elevation(1),\n description: 'The shadow at rest.',\n compose: 'ElevatedButtonTokens.ContainerElevation',\n paints: { property: 'box-shadow' },\n },\n 'selected-container-color': {\n value: color('primary'),\n description: 'The container of a selected toggle.',\n compose: 'ElevatedButtonTokens.SelectedContainerColor',\n paints: selectedContainer,\n },\n 'selected-label-text-color': {\n value: color('on-primary'),\n description: 'The label and icon of a selected toggle.',\n compose: 'ElevatedButtonTokens.SelectedLabelTextColor',\n paints: selectedLabel,\n },\n 'unselected-container-color': {\n value: color('surface-container-low'),\n description: 'The container of an unselected toggle.',\n compose: 'ElevatedButtonTokens.UnselectedContainerColor',\n paints: unselectedContainer,\n },\n },\n fixed: { ...followsResting, 'outline-color': 'transparent' },\n },\n tonal: {\n prefix: 'md-comp-button-tonal',\n tokens: toggleColors('TonalButtonTokens', {\n container: color('secondary-container'),\n label: color('on-secondary-container'),\n selectedContainer: color('secondary'),\n selectedLabel: color('on-secondary'),\n unselectedContainer: color('secondary-container'),\n unselectedLabel: color('on-secondary-container'),\n }),\n fixed: { 'container-elevation': elevation(0), 'outline-color': 'transparent' },\n },\n outlined: {\n prefix: 'md-comp-button-outlined',\n tokens: {\n 'outline-color': {\n value: color('outline-variant'),\n description: 'The outline.',\n compose: 'OutlinedButtonTokens.OutlineColor',\n paints: { property: 'border-top-color' },\n },\n 'label-text-color': {\n value: color('on-surface-variant'),\n description: 'The label and icon, and an unselected toggle’s.',\n compose: 'OutlinedButtonTokens.LabelTextColor',\n paints: label,\n },\n 'selected-container-color': {\n value: color('inverse-surface'),\n description: 'The container of a selected toggle, which has no outline.',\n compose: 'OutlinedButtonTokens.SelectedContainerColor',\n paints: selectedContainer,\n },\n 'selected-label-text-color': {\n value: color('inverse-on-surface'),\n description: 'The label and icon of a selected toggle.',\n compose: 'OutlinedButtonTokens.SelectedLabelTextColor',\n paints: selectedLabel,\n },\n },\n fixed: {\n ...followsResting,\n 'container-color': 'transparent',\n 'container-elevation': elevation(0),\n 'unselected-container-color': 'transparent',\n },\n },\n text: {\n prefix: 'md-comp-button-text',\n tokens: {\n 'label-text-color': {\n value: color('primary'),\n description: 'The label and icon.',\n compose: 'TextButtonTokens.LabelTextColor',\n paints: label,\n },\n },\n // Text buttons have no toggle form; the toggle parts only complete the scope.\n fixed: {\n ...followsResting,\n 'container-color': 'transparent',\n 'container-elevation': elevation(0),\n 'outline-color': 'transparent',\n 'selected-container-color': 'transparent',\n 'selected-label-text-color': 'var(--_md-comp-button-label-text-color)',\n 'unselected-container-color': 'transparent',\n },\n },\n },\n size: {\n xs: {\n prefix: 'md-comp-button-xsmall',\n tokens: shapes('ButtonXSmallTokens', corner('medium')),\n fixed: { 'half-height': px(16) },\n },\n sm: {\n prefix: 'md-comp-button-small',\n tokens: shapes('ButtonSmallTokens', corner('medium')),\n fixed: { 'half-height': px(20) },\n },\n md: {\n prefix: 'md-comp-button-medium',\n tokens: shapes('ButtonMediumTokens', corner('large')),\n fixed: { 'half-height': px(28) },\n },\n lg: {\n prefix: 'md-comp-button-large',\n tokens: shapes('ButtonLargeTokens', corner('extra-large')),\n fixed: { 'half-height': px(48) },\n },\n xl: {\n prefix: 'md-comp-button-xlarge',\n tokens: shapes('ButtonXLargeTokens', corner('extra-large')),\n fixed: { 'half-height': px(68) },\n },\n },\n },\n derived: {\n // Full corners stop at half the height, so the press morph interpolates smoothly.\n 'container-shape-round-capped':\n 'min(var(--_md-comp-button-container-shape-round), var(--_md-comp-button-half-height))',\n },\n});\n"],"mappings":";;AAyBA,MAAM,YAAyB,EAAE,UAAU,mBAAmB;AAC9D,MAAM,QAAqB,EAAE,UAAU,QAAQ;AAC/C,MAAM,oBAAiC;CAAE,UAAU;CAAoB,OAAO;AAAW;AACzF,MAAM,gBAA6B;CAAE,UAAU;CAAS,OAAO;AAAW;AAE1E,MAAM,sBAAmC;CAAE,UAAU;CAAoB,OAAO;AAAa;AAC7F,MAAM,kBAA+B;CAAE,UAAU;CAAS,OAAO;AAAa;AAC9E,MAAM,aAA0B,EAAE,UAAU,yBAAyB;AAErE,MAAM,cAA2B;CAAE,UAAU;CAA0B,OAAO;AAAW;;AAGzF,MAAM,iBAAiB,EACrB,+BAA+B,0CACjC;;AAGA,SAAS,aACP,SACA,QAQA;CACA,OAAO;EACL,mBAAmB;GACjB,OAAO,OAAO;GACd,aAAa;GACb,SAAS,GAAG,QAAQ;GACpB,QAAQ;EACV;EACA,oBAAoB;GAClB,OAAO,OAAO;GACd,aAAa;GACb,SAAS,GAAG,QAAQ;GACpB,QAAQ;EACV;EACA,4BAA4B;GAC1B,OAAO,OAAO;GACd,aAAa;GACb,SAAS,GAAG,QAAQ;GACpB,QAAQ;EACV;EACA,6BAA6B;GAC3B,OAAO,OAAO;GACd,aAAa;GACb,SAAS,GAAG,QAAQ;GACpB,QAAQ;EACV;EACA,8BAA8B;GAC5B,OAAO,OAAO;GACd,aAAa;GACb,SAAS,GAAG,QAAQ;GACpB,QAAQ;EACV;EACA,+BAA+B;GAC7B,OAAO,OAAO;GACd,aAAa;GACb,SAAS,GAAG,QAAQ;GACpB,QAAQ;EACV;CACF;AACF;;AAGA,SAAS,OAAO,SAAiB,QAAoB;CACnD,OAAO;EACL,yBAAyB;GACvB,OAAO,OAAO,MAAM;GACpB,aAAa;GACb,SAAS,GAAG,QAAQ;GACpB,QAAQ;EACV;EACA,0BAA0B;GACxB,OAAO;GACP,aAAa;GACb,SAAS,GAAG,QAAQ;GACpB,QAAQ;EACV;CACF;AACF;;;;;AAMA,MAAa,iBAAiB,sBAAsB;CAClD,MAAM;CACN,QAAQ,CAAC;CACT,QAAQ;EACN,SAAS;GACP,QAAQ;IACN,QAAQ;IACR,QAAQ,aAAa,sBAAsB;KACzC,WAAW,MAAM,SAAS;KAC1B,OAAO,MAAM,YAAY;KACzB,mBAAmB,MAAM,SAAS;KAClC,eAAe,MAAM,YAAY;KACjC,qBAAqB,MAAM,mBAAmB;KAC9C,iBAAiB,MAAM,oBAAoB;IAC7C,CAAC;IACD,OAAO;KAAE,uBAAuB,UAAU,CAAC;KAAG,iBAAiB;IAAc;GAC/E;GACA,UAAU;IACR,QAAQ;IACR,QAAQ;KACN,mBAAmB;MACjB,OAAO,MAAM,uBAAuB;MACpC,aAAa;MACb,SAAS;MACT,QAAQ;KACV;KACA,oBAAoB;MAClB,OAAO,MAAM,SAAS;MACtB,aAAa;MACb,SAAS;MACT,QAAQ;KACV;KACA,uBAAuB;MACrB,OAAO,UAAU,CAAC;MAClB,aAAa;MACb,SAAS;MACT,QAAQ,EAAE,UAAU,aAAa;KACnC;KACA,4BAA4B;MAC1B,OAAO,MAAM,SAAS;MACtB,aAAa;MACb,SAAS;MACT,QAAQ;KACV;KACA,6BAA6B;MAC3B,OAAO,MAAM,YAAY;MACzB,aAAa;MACb,SAAS;MACT,QAAQ;KACV;KACA,8BAA8B;MAC5B,OAAO,MAAM,uBAAuB;MACpC,aAAa;MACb,SAAS;MACT,QAAQ;KACV;IACF;IACA,OAAO;KAAE,GAAG;KAAgB,iBAAiB;IAAc;GAC7D;GACA,OAAO;IACL,QAAQ;IACR,QAAQ,aAAa,qBAAqB;KACxC,WAAW,MAAM,qBAAqB;KACtC,OAAO,MAAM,wBAAwB;KACrC,mBAAmB,MAAM,WAAW;KACpC,eAAe,MAAM,cAAc;KACnC,qBAAqB,MAAM,qBAAqB;KAChD,iBAAiB,MAAM,wBAAwB;IACjD,CAAC;IACD,OAAO;KAAE,uBAAuB,UAAU,CAAC;KAAG,iBAAiB;IAAc;GAC/E;GACA,UAAU;IACR,QAAQ;IACR,QAAQ;KACN,iBAAiB;MACf,OAAO,MAAM,iBAAiB;MAC9B,aAAa;MACb,SAAS;MACT,QAAQ,EAAE,UAAU,mBAAmB;KACzC;KACA,oBAAoB;MAClB,OAAO,MAAM,oBAAoB;MACjC,aAAa;MACb,SAAS;MACT,QAAQ;KACV;KACA,4BAA4B;MAC1B,OAAO,MAAM,iBAAiB;MAC9B,aAAa;MACb,SAAS;MACT,QAAQ;KACV;KACA,6BAA6B;MAC3B,OAAO,MAAM,oBAAoB;MACjC,aAAa;MACb,SAAS;MACT,QAAQ;KACV;IACF;IACA,OAAO;KACL,GAAG;KACH,mBAAmB;KACnB,uBAAuB,UAAU,CAAC;KAClC,8BAA8B;IAChC;GACF;GACA,MAAM;IACJ,QAAQ;IACR,QAAQ,EACN,oBAAoB;KAClB,OAAO,MAAM,SAAS;KACtB,aAAa;KACb,SAAS;KACT,QAAQ;IACV,EACF;IAEA,OAAO;KACL,GAAG;KACH,mBAAmB;KACnB,uBAAuB,UAAU,CAAC;KAClC,iBAAiB;KACjB,4BAA4B;KAC5B,6BAA6B;KAC7B,8BAA8B;IAChC;GACF;EACF;EACA,MAAM;GACJ,IAAI;IACF,QAAQ;IACR,QAAQ,OAAO,sBAAsB,OAAO,QAAQ,CAAC;IACrD,OAAO,EAAE,eAAe,GAAG,EAAE,EAAE;GACjC;GACA,IAAI;IACF,QAAQ;IACR,QAAQ,OAAO,qBAAqB,OAAO,QAAQ,CAAC;IACpD,OAAO,EAAE,eAAe,GAAG,EAAE,EAAE;GACjC;GACA,IAAI;IACF,QAAQ;IACR,QAAQ,OAAO,sBAAsB,OAAO,OAAO,CAAC;IACpD,OAAO,EAAE,eAAe,GAAG,EAAE,EAAE;GACjC;GACA,IAAI;IACF,QAAQ;IACR,QAAQ,OAAO,qBAAqB,OAAO,aAAa,CAAC;IACzD,OAAO,EAAE,eAAe,GAAG,EAAE,EAAE;GACjC;GACA,IAAI;IACF,QAAQ;IACR,QAAQ,OAAO,sBAAsB,OAAO,aAAa,CAAC;IAC1D,OAAO,EAAE,eAAe,GAAG,EAAE,EAAE;GACjC;EACF;CACF;CACA,SAAS,EAEP,gCACE,wFACJ;AACF,CAAC"}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
//#region src/components/button/connected-shapes.ts
|
|
2
|
+
const connectedShapeVariants = [
|
|
3
|
+
{
|
|
4
|
+
size: "xs",
|
|
5
|
+
connected: "leading",
|
|
6
|
+
shape: "round",
|
|
7
|
+
class: { root: "rounded-s-[min(var(--md-sys-shape-corner-full),16px)] rounded-e-corner-extra-small data-pressed:rounded-e-[2px] data-selected:not-data-pressed:not-data-disabled:rounded-e-[min(var(--md-sys-shape-corner-full),16px)]" }
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
size: "xs",
|
|
11
|
+
connected: "leading",
|
|
12
|
+
shape: "square",
|
|
13
|
+
class: { root: "rounded-corner-extra-small data-pressed:rounded-e-[2px] data-selected:not-data-pressed:not-data-disabled:rounded-[min(var(--md-sys-shape-corner-full),16px)]" }
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
size: "xs",
|
|
17
|
+
connected: "middle",
|
|
18
|
+
class: { root: "rounded-corner-extra-small data-pressed:rounded-[2px] data-selected:not-data-pressed:not-data-disabled:rounded-[min(var(--md-sys-shape-corner-full),16px)]" }
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
size: "xs",
|
|
22
|
+
connected: "trailing",
|
|
23
|
+
shape: "round",
|
|
24
|
+
class: { root: "rounded-e-[min(var(--md-sys-shape-corner-full),16px)] rounded-s-corner-extra-small data-pressed:rounded-s-[2px] data-selected:not-data-pressed:not-data-disabled:rounded-s-[min(var(--md-sys-shape-corner-full),16px)]" }
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
size: "xs",
|
|
28
|
+
connected: "trailing",
|
|
29
|
+
shape: "square",
|
|
30
|
+
class: { root: "rounded-corner-extra-small data-pressed:rounded-s-[2px] data-selected:not-data-pressed:not-data-disabled:rounded-[min(var(--md-sys-shape-corner-full),16px)]" }
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
size: "sm",
|
|
34
|
+
connected: "leading",
|
|
35
|
+
shape: "round",
|
|
36
|
+
class: { root: "rounded-s-[min(var(--md-sys-shape-corner-full),20px)] rounded-e-corner-small data-pressed:rounded-e-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-e-[min(var(--md-sys-shape-corner-full),20px)]" }
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
size: "sm",
|
|
40
|
+
connected: "leading",
|
|
41
|
+
shape: "square",
|
|
42
|
+
class: { root: "rounded-corner-small data-pressed:rounded-e-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-[min(var(--md-sys-shape-corner-full),20px)]" }
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
size: "sm",
|
|
46
|
+
connected: "middle",
|
|
47
|
+
class: { root: "rounded-corner-small data-pressed:rounded-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-[min(var(--md-sys-shape-corner-full),20px)]" }
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
size: "sm",
|
|
51
|
+
connected: "trailing",
|
|
52
|
+
shape: "round",
|
|
53
|
+
class: { root: "rounded-e-[min(var(--md-sys-shape-corner-full),20px)] rounded-s-corner-small data-pressed:rounded-s-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-s-[min(var(--md-sys-shape-corner-full),20px)]" }
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
size: "sm",
|
|
57
|
+
connected: "trailing",
|
|
58
|
+
shape: "square",
|
|
59
|
+
class: { root: "rounded-corner-small data-pressed:rounded-s-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-[min(var(--md-sys-shape-corner-full),20px)]" }
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
size: "md",
|
|
63
|
+
connected: "leading",
|
|
64
|
+
shape: "round",
|
|
65
|
+
class: { root: "rounded-s-[min(var(--md-sys-shape-corner-full),28px)] rounded-e-corner-small data-pressed:rounded-e-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-e-[min(var(--md-sys-shape-corner-full),28px)]" }
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
size: "md",
|
|
69
|
+
connected: "leading",
|
|
70
|
+
shape: "square",
|
|
71
|
+
class: { root: "rounded-corner-small data-pressed:rounded-e-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-[min(var(--md-sys-shape-corner-full),28px)]" }
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
size: "md",
|
|
75
|
+
connected: "middle",
|
|
76
|
+
class: { root: "rounded-corner-small data-pressed:rounded-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-[min(var(--md-sys-shape-corner-full),28px)]" }
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
size: "md",
|
|
80
|
+
connected: "trailing",
|
|
81
|
+
shape: "round",
|
|
82
|
+
class: { root: "rounded-e-[min(var(--md-sys-shape-corner-full),28px)] rounded-s-corner-small data-pressed:rounded-s-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-s-[min(var(--md-sys-shape-corner-full),28px)]" }
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
size: "md",
|
|
86
|
+
connected: "trailing",
|
|
87
|
+
shape: "square",
|
|
88
|
+
class: { root: "rounded-corner-small data-pressed:rounded-s-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-[min(var(--md-sys-shape-corner-full),28px)]" }
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
size: "lg",
|
|
92
|
+
connected: "leading",
|
|
93
|
+
shape: "round",
|
|
94
|
+
class: { root: "rounded-s-[min(var(--md-sys-shape-corner-full),48px)] rounded-e-corner-large data-pressed:rounded-e-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-e-[min(var(--md-sys-shape-corner-full),48px)]" }
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
size: "lg",
|
|
98
|
+
connected: "leading",
|
|
99
|
+
shape: "square",
|
|
100
|
+
class: { root: "rounded-corner-large data-pressed:rounded-e-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-[min(var(--md-sys-shape-corner-full),48px)]" }
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
size: "lg",
|
|
104
|
+
connected: "middle",
|
|
105
|
+
class: { root: "rounded-corner-large data-pressed:rounded-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-[min(var(--md-sys-shape-corner-full),48px)]" }
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
size: "lg",
|
|
109
|
+
connected: "trailing",
|
|
110
|
+
shape: "round",
|
|
111
|
+
class: { root: "rounded-e-[min(var(--md-sys-shape-corner-full),48px)] rounded-s-corner-large data-pressed:rounded-s-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-s-[min(var(--md-sys-shape-corner-full),48px)]" }
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
size: "lg",
|
|
115
|
+
connected: "trailing",
|
|
116
|
+
shape: "square",
|
|
117
|
+
class: { root: "rounded-corner-large data-pressed:rounded-s-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-[min(var(--md-sys-shape-corner-full),48px)]" }
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
size: "xl",
|
|
121
|
+
connected: "leading",
|
|
122
|
+
shape: "round",
|
|
123
|
+
class: { root: "rounded-s-[min(var(--md-sys-shape-corner-full),68px)] rounded-e-corner-large-increased data-pressed:rounded-e-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-e-[min(var(--md-sys-shape-corner-full),68px)]" }
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
size: "xl",
|
|
127
|
+
connected: "leading",
|
|
128
|
+
shape: "square",
|
|
129
|
+
class: { root: "rounded-corner-large-increased data-pressed:rounded-e-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-[min(var(--md-sys-shape-corner-full),68px)]" }
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
size: "xl",
|
|
133
|
+
connected: "middle",
|
|
134
|
+
class: { root: "rounded-corner-large-increased data-pressed:rounded-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-[min(var(--md-sys-shape-corner-full),68px)]" }
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
size: "xl",
|
|
138
|
+
connected: "trailing",
|
|
139
|
+
shape: "round",
|
|
140
|
+
class: { root: "rounded-e-[min(var(--md-sys-shape-corner-full),68px)] rounded-s-corner-large-increased data-pressed:rounded-s-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-s-[min(var(--md-sys-shape-corner-full),68px)]" }
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
size: "xl",
|
|
144
|
+
connected: "trailing",
|
|
145
|
+
shape: "square",
|
|
146
|
+
class: { root: "rounded-corner-large-increased data-pressed:rounded-s-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-[min(var(--md-sys-shape-corner-full),68px)]" }
|
|
147
|
+
}
|
|
148
|
+
];
|
|
149
|
+
//#endregion
|
|
150
|
+
export { connectedShapeVariants };
|
|
151
|
+
|
|
152
|
+
//# sourceMappingURL=connected-shapes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connected-shapes.js","names":[],"sources":["../../../src/components/button/connected-shapes.ts"],"sourcesContent":["/*\n * Corners of a button or icon button in a connected button group, by size and position\n * (set per child by `ButtonGroup`). From the M3 Expressive button group specs\n * (2026-10-13):\n *\n * - Round groups: the outer corners are full, and the inner corners stay square-ish at\n * 4 / 8 / 8 / 16 / 20px (XS–XL).\n * - Square groups: every corner takes that size, the outer ones too.\n * - Pressed, an inner corner tightens to 4px (Compose's `PressedInnerCornerCornerSize`;\n * the spec gives no value), and to 2px at XS, whose inner corners already rest at 4px,\n * so a press always shows a change (2026-10-13). Selected, the whole button becomes\n * fully round.\n *\n * Corners are logical (`s` / `e`), so they mirror in RTL. Every class is written out in\n * full: Tailwind finds classes by scanning for literal strings.\n */\nexport const connectedShapeVariants = [\n {\n size: 'xs',\n connected: 'leading',\n shape: 'round',\n class: {\n root: 'rounded-s-[min(var(--md-sys-shape-corner-full),16px)] rounded-e-corner-extra-small data-pressed:rounded-e-[2px] data-selected:not-data-pressed:not-data-disabled:rounded-e-[min(var(--md-sys-shape-corner-full),16px)]',\n },\n },\n {\n size: 'xs',\n connected: 'leading',\n shape: 'square',\n class: {\n root: 'rounded-corner-extra-small data-pressed:rounded-e-[2px] data-selected:not-data-pressed:not-data-disabled:rounded-[min(var(--md-sys-shape-corner-full),16px)]',\n },\n },\n {\n size: 'xs',\n connected: 'middle',\n class: {\n root: 'rounded-corner-extra-small data-pressed:rounded-[2px] data-selected:not-data-pressed:not-data-disabled:rounded-[min(var(--md-sys-shape-corner-full),16px)]',\n },\n },\n {\n size: 'xs',\n connected: 'trailing',\n shape: 'round',\n class: {\n root: 'rounded-e-[min(var(--md-sys-shape-corner-full),16px)] rounded-s-corner-extra-small data-pressed:rounded-s-[2px] data-selected:not-data-pressed:not-data-disabled:rounded-s-[min(var(--md-sys-shape-corner-full),16px)]',\n },\n },\n {\n size: 'xs',\n connected: 'trailing',\n shape: 'square',\n class: {\n root: 'rounded-corner-extra-small data-pressed:rounded-s-[2px] data-selected:not-data-pressed:not-data-disabled:rounded-[min(var(--md-sys-shape-corner-full),16px)]',\n },\n },\n {\n size: 'sm',\n connected: 'leading',\n shape: 'round',\n class: {\n root: 'rounded-s-[min(var(--md-sys-shape-corner-full),20px)] rounded-e-corner-small data-pressed:rounded-e-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-e-[min(var(--md-sys-shape-corner-full),20px)]',\n },\n },\n {\n size: 'sm',\n connected: 'leading',\n shape: 'square',\n class: {\n root: 'rounded-corner-small data-pressed:rounded-e-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-[min(var(--md-sys-shape-corner-full),20px)]',\n },\n },\n {\n size: 'sm',\n connected: 'middle',\n class: {\n root: 'rounded-corner-small data-pressed:rounded-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-[min(var(--md-sys-shape-corner-full),20px)]',\n },\n },\n {\n size: 'sm',\n connected: 'trailing',\n shape: 'round',\n class: {\n root: 'rounded-e-[min(var(--md-sys-shape-corner-full),20px)] rounded-s-corner-small data-pressed:rounded-s-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-s-[min(var(--md-sys-shape-corner-full),20px)]',\n },\n },\n {\n size: 'sm',\n connected: 'trailing',\n shape: 'square',\n class: {\n root: 'rounded-corner-small data-pressed:rounded-s-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-[min(var(--md-sys-shape-corner-full),20px)]',\n },\n },\n {\n size: 'md',\n connected: 'leading',\n shape: 'round',\n class: {\n root: 'rounded-s-[min(var(--md-sys-shape-corner-full),28px)] rounded-e-corner-small data-pressed:rounded-e-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-e-[min(var(--md-sys-shape-corner-full),28px)]',\n },\n },\n {\n size: 'md',\n connected: 'leading',\n shape: 'square',\n class: {\n root: 'rounded-corner-small data-pressed:rounded-e-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-[min(var(--md-sys-shape-corner-full),28px)]',\n },\n },\n {\n size: 'md',\n connected: 'middle',\n class: {\n root: 'rounded-corner-small data-pressed:rounded-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-[min(var(--md-sys-shape-corner-full),28px)]',\n },\n },\n {\n size: 'md',\n connected: 'trailing',\n shape: 'round',\n class: {\n root: 'rounded-e-[min(var(--md-sys-shape-corner-full),28px)] rounded-s-corner-small data-pressed:rounded-s-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-s-[min(var(--md-sys-shape-corner-full),28px)]',\n },\n },\n {\n size: 'md',\n connected: 'trailing',\n shape: 'square',\n class: {\n root: 'rounded-corner-small data-pressed:rounded-s-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-[min(var(--md-sys-shape-corner-full),28px)]',\n },\n },\n {\n size: 'lg',\n connected: 'leading',\n shape: 'round',\n class: {\n root: 'rounded-s-[min(var(--md-sys-shape-corner-full),48px)] rounded-e-corner-large data-pressed:rounded-e-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-e-[min(var(--md-sys-shape-corner-full),48px)]',\n },\n },\n {\n size: 'lg',\n connected: 'leading',\n shape: 'square',\n class: {\n root: 'rounded-corner-large data-pressed:rounded-e-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-[min(var(--md-sys-shape-corner-full),48px)]',\n },\n },\n {\n size: 'lg',\n connected: 'middle',\n class: {\n root: 'rounded-corner-large data-pressed:rounded-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-[min(var(--md-sys-shape-corner-full),48px)]',\n },\n },\n {\n size: 'lg',\n connected: 'trailing',\n shape: 'round',\n class: {\n root: 'rounded-e-[min(var(--md-sys-shape-corner-full),48px)] rounded-s-corner-large data-pressed:rounded-s-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-s-[min(var(--md-sys-shape-corner-full),48px)]',\n },\n },\n {\n size: 'lg',\n connected: 'trailing',\n shape: 'square',\n class: {\n root: 'rounded-corner-large data-pressed:rounded-s-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-[min(var(--md-sys-shape-corner-full),48px)]',\n },\n },\n {\n size: 'xl',\n connected: 'leading',\n shape: 'round',\n class: {\n root: 'rounded-s-[min(var(--md-sys-shape-corner-full),68px)] rounded-e-corner-large-increased data-pressed:rounded-e-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-e-[min(var(--md-sys-shape-corner-full),68px)]',\n },\n },\n {\n size: 'xl',\n connected: 'leading',\n shape: 'square',\n class: {\n root: 'rounded-corner-large-increased data-pressed:rounded-e-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-[min(var(--md-sys-shape-corner-full),68px)]',\n },\n },\n {\n size: 'xl',\n connected: 'middle',\n class: {\n root: 'rounded-corner-large-increased data-pressed:rounded-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-[min(var(--md-sys-shape-corner-full),68px)]',\n },\n },\n {\n size: 'xl',\n connected: 'trailing',\n shape: 'round',\n class: {\n root: 'rounded-e-[min(var(--md-sys-shape-corner-full),68px)] rounded-s-corner-large-increased data-pressed:rounded-s-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-s-[min(var(--md-sys-shape-corner-full),68px)]',\n },\n },\n {\n size: 'xl',\n connected: 'trailing',\n shape: 'square',\n class: {\n root: 'rounded-corner-large-increased data-pressed:rounded-s-corner-extra-small data-selected:not-data-pressed:not-data-disabled:rounded-[min(var(--md-sys-shape-corner-full),68px)]',\n },\n },\n] as const;\n"],"mappings":";AAgBA,MAAa,yBAAyB;CACpC;EACE,MAAM;EACN,WAAW;EACX,OAAO;EACP,OAAO,EACL,MAAM,yNACR;CACF;CACA;EACE,MAAM;EACN,WAAW;EACX,OAAO;EACP,OAAO,EACL,MAAM,+JACR;CACF;CACA;EACE,MAAM;EACN,WAAW;EACX,OAAO,EACL,MAAM,6JACR;CACF;CACA;EACE,MAAM;EACN,WAAW;EACX,OAAO;EACP,OAAO,EACL,MAAM,yNACR;CACF;CACA;EACE,MAAM;EACN,WAAW;EACX,OAAO;EACP,OAAO,EACL,MAAM,+JACR;CACF;CACA;EACE,MAAM;EACN,WAAW;EACX,OAAO;EACP,OAAO,EACL,MAAM,gOACR;CACF;CACA;EACE,MAAM;EACN,WAAW;EACX,OAAO;EACP,OAAO,EACL,MAAM,sKACR;CACF;CACA;EACE,MAAM;EACN,WAAW;EACX,OAAO,EACL,MAAM,oKACR;CACF;CACA;EACE,MAAM;EACN,WAAW;EACX,OAAO;EACP,OAAO,EACL,MAAM,gOACR;CACF;CACA;EACE,MAAM;EACN,WAAW;EACX,OAAO;EACP,OAAO,EACL,MAAM,sKACR;CACF;CACA;EACE,MAAM;EACN,WAAW;EACX,OAAO;EACP,OAAO,EACL,MAAM,gOACR;CACF;CACA;EACE,MAAM;EACN,WAAW;EACX,OAAO;EACP,OAAO,EACL,MAAM,sKACR;CACF;CACA;EACE,MAAM;EACN,WAAW;EACX,OAAO,EACL,MAAM,oKACR;CACF;CACA;EACE,MAAM;EACN,WAAW;EACX,OAAO;EACP,OAAO,EACL,MAAM,gOACR;CACF;CACA;EACE,MAAM;EACN,WAAW;EACX,OAAO;EACP,OAAO,EACL,MAAM,sKACR;CACF;CACA;EACE,MAAM;EACN,WAAW;EACX,OAAO;EACP,OAAO,EACL,MAAM,gOACR;CACF;CACA;EACE,MAAM;EACN,WAAW;EACX,OAAO;EACP,OAAO,EACL,MAAM,sKACR;CACF;CACA;EACE,MAAM;EACN,WAAW;EACX,OAAO,EACL,MAAM,oKACR;CACF;CACA;EACE,MAAM;EACN,WAAW;EACX,OAAO;EACP,OAAO,EACL,MAAM,gOACR;CACF;CACA;EACE,MAAM;EACN,WAAW;EACX,OAAO;EACP,OAAO,EACL,MAAM,sKACR;CACF;CACA;EACE,MAAM;EACN,WAAW;EACX,OAAO;EACP,OAAO,EACL,MAAM,0OACR;CACF;CACA;EACE,MAAM;EACN,WAAW;EACX,OAAO;EACP,OAAO,EACL,MAAM,gLACR;CACF;CACA;EACE,MAAM;EACN,WAAW;EACX,OAAO,EACL,MAAM,8KACR;CACF;CACA;EACE,MAAM;EACN,WAAW;EACX,OAAO;EACP,OAAO,EACL,MAAM,0OACR;CACF;CACA;EACE,MAAM;EACN,WAAW;EACX,OAAO;EACP,OAAO,EACL,MAAM,gLACR;CACF;AACF"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { ButtonBaseDivActionProps, ButtonBaseLinkProps } from "../../primitives/ButtonBase.js";
|
|
2
|
+
import { CardVariant } from "./card-styles.js";
|
|
3
|
+
import { ComponentPropsWithRef, ReactNode } from "react";
|
|
4
|
+
//#region src/components/card/Card.d.ts
|
|
5
|
+
interface CardOwnProps {
|
|
6
|
+
/** The M3 style: filled, elevated or outlined. @default "filled" */
|
|
7
|
+
variant?: CardVariant;
|
|
8
|
+
/**
|
|
9
|
+
* The card is being dragged (picked up to move it): M3 raises it (filled and outlined
|
|
10
|
+
* to level 3, elevated to 4) and, on an interactive card, shows the dragged state layer.
|
|
11
|
+
* Set it from your drag and drop code; it sets `data-dragged`.
|
|
12
|
+
* @default false
|
|
13
|
+
*/
|
|
14
|
+
dragged?: boolean;
|
|
15
|
+
/** Classes for the card, merged with its own; consumer classes win. */
|
|
16
|
+
className?: string;
|
|
17
|
+
/** The card's content: its media, headline, text and actions. */
|
|
18
|
+
children?: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Button props that don't apply to a card (cards aren't toggles or menu triggers), and the
|
|
22
|
+
* ones a card describes itself.
|
|
23
|
+
*/
|
|
24
|
+
type NotForCards = 'toggle' | 'preventFocusOnPress' | 'className' | 'children';
|
|
25
|
+
/** A container card. */
|
|
26
|
+
export interface CardStaticProps extends CardOwnProps, Omit<ComponentPropsWithRef<'div'>, 'className' | 'children'> {
|
|
27
|
+
/** Makes the card a link (`<a>`). It must not contain other buttons or links then. */
|
|
28
|
+
href?: undefined;
|
|
29
|
+
/** Makes the card pressable (`<div role="button">`). It must not contain other buttons or links then. */
|
|
30
|
+
onPress?: undefined;
|
|
31
|
+
/** Disables a pressable or link card. A container card can't be disabled. @default false */
|
|
32
|
+
disabled?: undefined;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* A pressable card, rendered as `<div role="button">` because cards hold headings, media
|
|
36
|
+
* and blocks that a `<button>` may not. It is named by its text, in reading order, as a link
|
|
37
|
+
* card is: keep the headline first and the text short. Use `aria-label` only for a card that
|
|
38
|
+
* shows no text. It must not contain other buttons or links.
|
|
39
|
+
*/
|
|
40
|
+
export interface CardActionProps extends CardOwnProps, Omit<ButtonBaseDivActionProps, 'as' | 'onPress' | NotForCards> {
|
|
41
|
+
onPress: NonNullable<ButtonBaseDivActionProps['onPress']>;
|
|
42
|
+
}
|
|
43
|
+
/** A card that is a link, named by its text. It must not contain other buttons or links. */
|
|
44
|
+
export interface CardLinkProps extends CardOwnProps, Omit<ButtonBaseLinkProps, NotForCards> {}
|
|
45
|
+
export type CardProps = CardStaticProps | CardActionProps | CardLinkProps;
|
|
46
|
+
/**
|
|
47
|
+
* M3 card: filled, elevated or outlined. Static by default; with `onPress` or `href` the
|
|
48
|
+
* whole card is pressable, with M3 state layers, hover elevation and a focus ring.
|
|
49
|
+
* Content is clipped to the 12px corners; add `overflow-visible` to turn that off.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* <Card variant="elevated" className="p-4">…</Card>
|
|
53
|
+
* <Card href="/trips/kyoto">
|
|
54
|
+
* <img src={photo} alt="" />
|
|
55
|
+
* <h3 className="p-4 text-title-medium">Kyoto</h3>
|
|
56
|
+
* </Card>
|
|
57
|
+
*/
|
|
58
|
+
export declare function Card(props: CardProps): import("react").JSX.Element;
|
|
59
|
+
//#endregion
|
|
60
|
+
//# sourceMappingURL=Card.d.ts.map
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../utils/cn.js";
|
|
3
|
+
import { ButtonBase } from "../../primitives/ButtonBase.js";
|
|
4
|
+
import { mergeDataTokens } from "../../utils/merge-data-tokens.js";
|
|
5
|
+
import { cardStyles } from "./card-styles.js";
|
|
6
|
+
import { useEffect } from "react";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
import { useObjectRef } from "react-aria";
|
|
9
|
+
//#region src/components/card/Card.tsx
|
|
10
|
+
const FOCUSABLE = "a[href], button, input, select, textarea, [tabindex]:not([tabindex=\"-1\"])";
|
|
11
|
+
/** Warns in development when an interactive card contains its own interactive content. */
|
|
12
|
+
function useNoNestedInteractive(ref, interactive) {
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
if (process.env.NODE_ENV === "production" || !interactive) return;
|
|
15
|
+
const nested = ref.current?.querySelector(FOCUSABLE);
|
|
16
|
+
if (nested) console.warn("[@windmorph/react] A pressable or link Card must not contain buttons, links or form fields; use a static Card with its own actions instead.", nested);
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* M3 card: filled, elevated or outlined. Static by default; with `onPress` or `href` the
|
|
21
|
+
* whole card is pressable, with M3 state layers, hover elevation and a focus ring.
|
|
22
|
+
* Content is clipped to the 12px corners; add `overflow-visible` to turn that off.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* <Card variant="elevated" className="p-4">…</Card>
|
|
26
|
+
* <Card href="/trips/kyoto">
|
|
27
|
+
* <img src={photo} alt="" />
|
|
28
|
+
* <h3 className="p-4 text-title-medium">Kyoto</h3>
|
|
29
|
+
* </Card>
|
|
30
|
+
*/
|
|
31
|
+
function Card(props) {
|
|
32
|
+
const isLink = props.href !== void 0;
|
|
33
|
+
const isAction = !isLink && props.onPress !== void 0;
|
|
34
|
+
const interactive = isLink || isAction;
|
|
35
|
+
const { variant, dragged = false, className, ref, ...rest } = props;
|
|
36
|
+
const domRef = useObjectRef(ref);
|
|
37
|
+
useNoNestedInteractive(domRef, interactive);
|
|
38
|
+
const classes = cn(cardStyles({
|
|
39
|
+
variant,
|
|
40
|
+
interactive
|
|
41
|
+
}), className);
|
|
42
|
+
const tokenAttributes = {
|
|
43
|
+
"data-tokens": mergeDataTokens("md-comp-card", rest),
|
|
44
|
+
"data-variant": variant ?? "filled"
|
|
45
|
+
};
|
|
46
|
+
if (!interactive) {
|
|
47
|
+
const { href, onPress, disabled, ...div } = rest;
|
|
48
|
+
return /* @__PURE__ */ jsx("div", {
|
|
49
|
+
...div,
|
|
50
|
+
...tokenAttributes,
|
|
51
|
+
ref: domRef,
|
|
52
|
+
"data-dragged": dragged || void 0,
|
|
53
|
+
className: classes
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
const baseProps = {
|
|
57
|
+
...rest,
|
|
58
|
+
...tokenAttributes,
|
|
59
|
+
...isAction ? { as: "div" } : {},
|
|
60
|
+
dragged,
|
|
61
|
+
ref: domRef,
|
|
62
|
+
className: classes
|
|
63
|
+
};
|
|
64
|
+
return /* @__PURE__ */ jsx(ButtonBase, { ...baseProps });
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
export { Card };
|
|
68
|
+
|
|
69
|
+
//# sourceMappingURL=Card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.js","names":[],"sources":["../../../src/components/card/Card.tsx"],"sourcesContent":["'use client';\n\nimport {\n useEffect,\n type ComponentPropsWithRef,\n type ReactNode,\n type Ref,\n type RefObject,\n} from 'react';\nimport { useObjectRef } from 'react-aria';\nimport {\n ButtonBase,\n type ButtonBaseDivActionProps,\n type ButtonBaseLinkProps,\n type ButtonBaseProps,\n} from '../../primitives/ButtonBase';\nimport { cn } from '../../utils/cn';\nimport { cardStyles, type CardVariant } from './card-styles';\nimport { mergeDataTokens } from '../../utils/merge-data-tokens';\n\ninterface CardOwnProps {\n /** The M3 style: filled, elevated or outlined. @default \"filled\" */\n variant?: CardVariant;\n /**\n * The card is being dragged (picked up to move it): M3 raises it (filled and outlined\n * to level 3, elevated to 4) and, on an interactive card, shows the dragged state layer.\n * Set it from your drag and drop code; it sets `data-dragged`.\n * @default false\n */\n dragged?: boolean;\n /** Classes for the card, merged with its own; consumer classes win. */\n className?: string;\n /** The card's content: its media, headline, text and actions. */\n children?: ReactNode;\n}\n\n/**\n * Button props that don't apply to a card (cards aren't toggles or menu triggers), and the\n * ones a card describes itself.\n */\ntype NotForCards = 'toggle' | 'preventFocusOnPress' | 'className' | 'children';\n\n/** A container card. */\nexport interface CardStaticProps\n extends CardOwnProps, Omit<ComponentPropsWithRef<'div'>, 'className' | 'children'> {\n /** Makes the card a link (`<a>`). It must not contain other buttons or links then. */\n href?: undefined;\n /** Makes the card pressable (`<div role=\"button\">`). It must not contain other buttons or links then. */\n onPress?: undefined;\n /** Disables a pressable or link card. A container card can't be disabled. @default false */\n disabled?: undefined;\n}\n\n/**\n * A pressable card, rendered as `<div role=\"button\">` because cards hold headings, media\n * and blocks that a `<button>` may not. It is named by its text, in reading order, as a link\n * card is: keep the headline first and the text short. Use `aria-label` only for a card that\n * shows no text. It must not contain other buttons or links.\n */\nexport interface CardActionProps\n extends CardOwnProps, Omit<ButtonBaseDivActionProps, 'as' | 'onPress' | NotForCards> {\n onPress: NonNullable<ButtonBaseDivActionProps['onPress']>;\n}\n\n/** A card that is a link, named by its text. It must not contain other buttons or links. */\nexport interface CardLinkProps extends CardOwnProps, Omit<ButtonBaseLinkProps, NotForCards> {}\n\nexport type CardProps = CardStaticProps | CardActionProps | CardLinkProps;\n\nconst FOCUSABLE = 'a[href], button, input, select, textarea, [tabindex]:not([tabindex=\"-1\"])';\n\n/** Warns in development when an interactive card contains its own interactive content. */\nfunction useNoNestedInteractive(ref: RefObject<HTMLElement | null>, interactive: boolean) {\n useEffect(() => {\n if (process.env.NODE_ENV === 'production' || !interactive) return;\n const nested = ref.current?.querySelector(FOCUSABLE);\n if (nested) {\n console.warn(\n '[@windmorph/react] A pressable or link Card must not contain buttons, links or form fields; ' +\n 'use a static Card with its own actions instead.',\n nested,\n );\n }\n });\n}\n\n/**\n * M3 card: filled, elevated or outlined. Static by default; with `onPress` or `href` the\n * whole card is pressable, with M3 state layers, hover elevation and a focus ring.\n * Content is clipped to the 12px corners; add `overflow-visible` to turn that off.\n *\n * @example\n * <Card variant=\"elevated\" className=\"p-4\">…</Card>\n * <Card href=\"/trips/kyoto\">\n * <img src={photo} alt=\"\" />\n * <h3 className=\"p-4 text-title-medium\">Kyoto</h3>\n * </Card>\n */\nexport function Card(props: CardProps) {\n const isLink = props.href !== undefined;\n const isAction = !isLink && props.onPress !== undefined;\n const interactive = isLink || isAction;\n const { variant, dragged = false, className, ref, ...rest } = props;\n const domRef = useObjectRef(ref as Ref<HTMLElement>);\n useNoNestedInteractive(domRef, interactive);\n\n const classes = cn(cardStyles({ variant, interactive }), className);\n // The component tokens' hooks (card-tokens.ts), also public styling hooks for apps.\n const tokenAttributes = {\n 'data-tokens': mergeDataTokens('md-comp-card', rest),\n 'data-variant': variant ?? 'filled',\n };\n\n if (!interactive) {\n const { href, onPress, disabled, ...div } = rest as CardStaticProps;\n return (\n <div\n {...div}\n {...tokenAttributes}\n ref={domRef as Ref<HTMLDivElement>}\n data-dragged={dragged || undefined}\n className={classes}\n />\n );\n }\n\n // Destructuring a union merges its members (see Button); `rest` holds one member's props.\n const baseProps = {\n ...rest,\n ...tokenAttributes,\n ...(isAction ? { as: 'div' as const } : {}),\n dragged,\n ref: domRef,\n className: classes,\n } as ButtonBaseProps;\n return <ButtonBase {...baseProps} />;\n}\n"],"mappings":";;;;;;;;;AAqEA,MAAM,YAAY;;AAGlB,SAAS,uBAAuB,KAAoC,aAAsB;CACxF,gBAAgB;EACd,IAAI,QAAQ,IAAI,aAAa,gBAAgB,CAAC,aAAa;EAC3D,MAAM,SAAS,IAAI,SAAS,cAAc,SAAS;EACnD,IAAI,QACF,QAAQ,KACN,+IAEA,MACF;CAEJ,CAAC;AACH;;;;;;;;;;;;;AAcA,SAAgB,KAAK,OAAkB;CACrC,MAAM,SAAS,MAAM,SAAS,KAAA;CAC9B,MAAM,WAAW,CAAC,UAAU,MAAM,YAAY,KAAA;CAC9C,MAAM,cAAc,UAAU;CAC9B,MAAM,EAAE,SAAS,UAAU,OAAO,WAAW,KAAK,GAAG,SAAS;CAC9D,MAAM,SAAS,aAAa,GAAuB;CACnD,uBAAuB,QAAQ,WAAW;CAE1C,MAAM,UAAU,GAAG,WAAW;EAAE;EAAS;CAAY,CAAC,GAAG,SAAS;CAElE,MAAM,kBAAkB;EACtB,eAAe,gBAAgB,gBAAgB,IAAI;EACnD,gBAAgB,WAAW;CAC7B;CAEA,IAAI,CAAC,aAAa;EAChB,MAAM,EAAE,MAAM,SAAS,UAAU,GAAG,QAAQ;EAC5C,OACE,oBAAC,OAAD;GACE,GAAI;GACJ,GAAI;GACJ,KAAK;GACL,gBAAc,WAAW,KAAA;GACzB,WAAW;EACZ,CAAA;CAEL;CAGA,MAAM,YAAY;EAChB,GAAG;EACH,GAAG;EACH,GAAI,WAAW,EAAE,IAAI,MAAe,IAAI,CAAC;EACzC;EACA,KAAK;EACL,WAAW;CACb;CACA,OAAO,oBAAC,YAAD,EAAY,GAAI,UAAY,CAAA;AACrC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { VariantProps } from "../../utils/tv.js";
|
|
2
|
+
//#region src/components/card/card-styles.d.ts
|
|
3
|
+
/** Variant definitions for {@link Card}; extend them to add variants. */
|
|
4
|
+
export declare const cardStyles: import("tailwind-variants").TVReturnType<{
|
|
5
|
+
variant: {
|
|
6
|
+
filled: "data-dragged:shadow-elevation-3";
|
|
7
|
+
elevated: "data-dragged:shadow-elevation-4";
|
|
8
|
+
outlined: "border border-solid border-[color:var(--_md-comp-card-outline-color)] data-dragged:shadow-elevation-3";
|
|
9
|
+
};
|
|
10
|
+
interactive: {
|
|
11
|
+
true: string[];
|
|
12
|
+
false: "";
|
|
13
|
+
};
|
|
14
|
+
}, undefined, string[], {
|
|
15
|
+
variant: {
|
|
16
|
+
filled: "data-dragged:shadow-elevation-3";
|
|
17
|
+
elevated: "data-dragged:shadow-elevation-4";
|
|
18
|
+
outlined: "border border-solid border-[color:var(--_md-comp-card-outline-color)] data-dragged:shadow-elevation-3";
|
|
19
|
+
};
|
|
20
|
+
interactive: {
|
|
21
|
+
true: string[];
|
|
22
|
+
false: "";
|
|
23
|
+
};
|
|
24
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
25
|
+
variant: {
|
|
26
|
+
filled: "data-dragged:shadow-elevation-3";
|
|
27
|
+
elevated: "data-dragged:shadow-elevation-4";
|
|
28
|
+
outlined: "border border-solid border-[color:var(--_md-comp-card-outline-color)] data-dragged:shadow-elevation-3";
|
|
29
|
+
};
|
|
30
|
+
interactive: {
|
|
31
|
+
true: string[];
|
|
32
|
+
false: "";
|
|
33
|
+
};
|
|
34
|
+
}, undefined>>;
|
|
35
|
+
/**
|
|
36
|
+
* The variants of {@link cardStyles}, for building on its styles. They are the recipe's keys, not
|
|
37
|
+
* component props: their names (`hasIcon`, `isOpen`…) follow the classes and may change.
|
|
38
|
+
*/
|
|
39
|
+
export type CardStyleProps = VariantProps<typeof cardStyles>;
|
|
40
|
+
export type CardVariant = NonNullable<CardStyleProps['variant']>;
|
|
41
|
+
//#endregion
|
|
42
|
+
//# sourceMappingURL=card-styles.d.ts.map
|