@windmorph/react 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/NOTICE +23 -0
- package/README.md +149 -2
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +112 -0
- package/dist/cli.js.map +1 -0
- package/dist/components/app-bar/AppBarItems.js +23 -0
- package/dist/components/app-bar/AppBarItems.js.map +1 -0
- package/dist/components/app-bar/TopAppBar.d.ts +89 -0
- package/dist/components/app-bar/TopAppBar.js +103 -0
- package/dist/components/app-bar/TopAppBar.js.map +1 -0
- package/dist/components/app-bar/app-bar-styles.d.ts +280 -0
- package/dist/components/app-bar/app-bar-styles.js +142 -0
- package/dist/components/app-bar/app-bar-styles.js.map +1 -0
- package/dist/components/app-bar/app-bar-tokens.d.ts +7 -0
- package/dist/components/app-bar/app-bar-tokens.js +64 -0
- package/dist/components/app-bar/app-bar-tokens.js.map +1 -0
- package/dist/components/app-bar/use-app-bar-scroll.d.ts +6 -0
- package/dist/components/app-bar/use-app-bar-scroll.js +139 -0
- package/dist/components/app-bar/use-app-bar-scroll.js.map +1 -0
- package/dist/components/autocomplete/Autocomplete.d.ts +142 -0
- package/dist/components/autocomplete/Autocomplete.js +284 -0
- package/dist/components/autocomplete/Autocomplete.js.map +1 -0
- package/dist/components/badge/Badge.d.ts +71 -0
- package/dist/components/badge/Badge.js +72 -0
- package/dist/components/badge/Badge.js.map +1 -0
- package/dist/components/badge/badge-styles.d.ts +100 -0
- package/dist/components/badge/badge-styles.js +43 -0
- package/dist/components/badge/badge-styles.js.map +1 -0
- package/dist/components/badge/badge-tokens.d.ts +7 -0
- package/dist/components/badge/badge-tokens.js +40 -0
- package/dist/components/badge/badge-tokens.js.map +1 -0
- package/dist/components/button/Button.d.ts +91 -0
- package/dist/components/button/Button.js +96 -0
- package/dist/components/button/Button.js.map +1 -0
- package/dist/components/button/ButtonContext.d.ts +30 -0
- package/dist/components/button/ButtonContext.js +18 -0
- package/dist/components/button/ButtonContext.js.map +1 -0
- package/dist/components/button/DensityZeroButtons.js +25 -0
- package/dist/components/button/DensityZeroButtons.js.map +1 -0
- package/dist/components/button/button-pending.d.ts +10 -0
- package/dist/components/button/button-pending.js +166 -0
- package/dist/components/button/button-pending.js.map +1 -0
- package/dist/components/button/button-styles.d.ts +216 -0
- package/dist/components/button/button-styles.js +199 -0
- package/dist/components/button/button-styles.js.map +1 -0
- package/dist/components/button/button-tokens.d.ts +10 -0
- package/dist/components/button/button-tokens.js +257 -0
- package/dist/components/button/button-tokens.js.map +1 -0
- package/dist/components/button/connected-shapes.js +152 -0
- package/dist/components/button/connected-shapes.js.map +1 -0
- package/dist/components/card/Card.d.ts +60 -0
- package/dist/components/card/Card.js +69 -0
- package/dist/components/card/Card.js.map +1 -0
- package/dist/components/card/card-styles.d.ts +42 -0
- package/dist/components/card/card-styles.js +64 -0
- package/dist/components/card/card-styles.js.map +1 -0
- package/dist/components/card/card-tokens.d.ts +7 -0
- package/dist/components/card/card-tokens.js +84 -0
- package/dist/components/card/card-tokens.js.map +1 -0
- package/dist/components/carousel/Carousel.d.ts +124 -0
- package/dist/components/carousel/Carousel.js +387 -0
- package/dist/components/carousel/Carousel.js.map +1 -0
- package/dist/components/carousel/carousel-keylines.js +486 -0
- package/dist/components/carousel/carousel-keylines.js.map +1 -0
- package/dist/components/carousel/carousel-press-area.js +35 -0
- package/dist/components/carousel/carousel-press-area.js.map +1 -0
- package/dist/components/carousel/carousel-styles.d.ts +188 -0
- package/dist/components/carousel/carousel-styles.js +116 -0
- package/dist/components/carousel/carousel-styles.js.map +1 -0
- package/dist/components/carousel/carousel-tokens.d.ts +7 -0
- package/dist/components/carousel/carousel-tokens.js +18 -0
- package/dist/components/carousel/carousel-tokens.js.map +1 -0
- package/dist/components/checkbox/Checkbox.d.ts +78 -0
- package/dist/components/checkbox/Checkbox.js +77 -0
- package/dist/components/checkbox/Checkbox.js.map +1 -0
- package/dist/components/checkbox/checkbox-box.js +34 -0
- package/dist/components/checkbox/checkbox-box.js.map +1 -0
- package/dist/components/checkbox/checkbox-styles.d.ts +100 -0
- package/dist/components/checkbox/checkbox-styles.js +54 -0
- package/dist/components/checkbox/checkbox-styles.js.map +1 -0
- package/dist/components/checkbox/checkbox-tokens.d.ts +7 -0
- package/dist/components/checkbox/checkbox-tokens.js +41 -0
- package/dist/components/checkbox/checkbox-tokens.js.map +1 -0
- package/dist/components/chip/Chip.d.ts +171 -0
- package/dist/components/chip/Chip.js +348 -0
- package/dist/components/chip/Chip.js.map +1 -0
- package/dist/components/chip/ChipSet.d.ts +70 -0
- package/dist/components/chip/ChipSet.js +198 -0
- package/dist/components/chip/ChipSet.js.map +1 -0
- package/dist/components/chip/chip-styles.d.ts +263 -0
- package/dist/components/chip/chip-styles.js +360 -0
- package/dist/components/chip/chip-styles.js.map +1 -0
- package/dist/components/chip/chip-tokens.d.ts +13 -0
- package/dist/components/chip/chip-tokens.js +185 -0
- package/dist/components/chip/chip-tokens.js.map +1 -0
- package/dist/components/date-picker/CalendarGrid.js +94 -0
- package/dist/components/date-picker/CalendarGrid.js.map +1 -0
- package/dist/components/date-picker/CompactDateDialog.js +63 -0
- package/dist/components/date-picker/CompactDateDialog.js.map +1 -0
- package/dist/components/date-picker/DateField.d.ts +161 -0
- package/dist/components/date-picker/DateField.js +393 -0
- package/dist/components/date-picker/DateField.js.map +1 -0
- package/dist/components/date-picker/DateInput.d.ts +20 -0
- package/dist/components/date-picker/DateInput.js +99 -0
- package/dist/components/date-picker/DateInput.js.map +1 -0
- package/dist/components/date-picker/DatePicker.d.ts +165 -0
- package/dist/components/date-picker/DatePicker.js +492 -0
- package/dist/components/date-picker/DatePicker.js.map +1 -0
- package/dist/components/date-picker/PickerDialog.d.ts +121 -0
- package/dist/components/date-picker/PickerDialog.js +161 -0
- package/dist/components/date-picker/PickerDialog.js.map +1 -0
- package/dist/components/date-picker/calendar-parts.js +141 -0
- package/dist/components/date-picker/calendar-parts.js.map +1 -0
- package/dist/components/date-picker/date-format.js +72 -0
- package/dist/components/date-picker/date-format.js.map +1 -0
- package/dist/components/date-picker/date-picker-styles.d.ts +247 -0
- package/dist/components/date-picker/date-picker-styles.js +163 -0
- package/dist/components/date-picker/date-picker-styles.js.map +1 -0
- package/dist/components/date-picker/date-picker-tokens.d.ts +7 -0
- package/dist/components/date-picker/date-picker-tokens.js +104 -0
- package/dist/components/date-picker/date-picker-tokens.js.map +1 -0
- package/dist/components/date-picker/picker-dialog-context.js +8 -0
- package/dist/components/date-picker/picker-dialog-context.js.map +1 -0
- package/dist/components/date-picker/picker-dialog-styles.d.ts +95 -0
- package/dist/components/date-picker/picker-dialog-styles.js +57 -0
- package/dist/components/date-picker/picker-dialog-styles.js.map +1 -0
- package/dist/components/date-picker/picker-icons.js +24 -0
- package/dist/components/date-picker/picker-icons.js.map +1 -0
- package/dist/components/date-picker/use-media-query.js +21 -0
- package/dist/components/date-picker/use-media-query.js.map +1 -0
- package/dist/components/date-picker/use-size-transform.js +62 -0
- package/dist/components/date-picker/use-size-transform.js.map +1 -0
- package/dist/components/date-picker/use-view-exit.js +68 -0
- package/dist/components/date-picker/use-view-exit.js.map +1 -0
- package/dist/components/dialog/Dialog.d.ts +267 -0
- package/dist/components/dialog/Dialog.js +521 -0
- package/dist/components/dialog/Dialog.js.map +1 -0
- package/dist/components/dialog/dialog-styles.d.ts +335 -0
- package/dist/components/dialog/dialog-styles.js +377 -0
- package/dist/components/dialog/dialog-styles.js.map +1 -0
- package/dist/components/dialog/dialog-tokens.d.ts +7 -0
- package/dist/components/dialog/dialog-tokens.js +57 -0
- package/dist/components/dialog/dialog-tokens.js.map +1 -0
- package/dist/components/divider/Divider.d.ts +59 -0
- package/dist/components/divider/Divider.js +53 -0
- package/dist/components/divider/Divider.js.map +1 -0
- package/dist/components/divider/divider-styles.d.ts +90 -0
- package/dist/components/divider/divider-styles.js +66 -0
- package/dist/components/divider/divider-styles.js.map +1 -0
- package/dist/components/divider/divider-tokens.d.ts +7 -0
- package/dist/components/divider/divider-tokens.js +16 -0
- package/dist/components/divider/divider-tokens.js.map +1 -0
- package/dist/components/fab/Fab.d.ts +130 -0
- package/dist/components/fab/Fab.js +137 -0
- package/dist/components/fab/Fab.js.map +1 -0
- package/dist/components/fab/FabTooltip.js +36 -0
- package/dist/components/fab/FabTooltip.js.map +1 -0
- package/dist/components/fab/fab-styles.d.ts +286 -0
- package/dist/components/fab/fab-styles.js +131 -0
- package/dist/components/fab/fab-styles.js.map +1 -0
- package/dist/components/fab/fab-tokens.d.ts +12 -0
- package/dist/components/fab/fab-tokens.js +105 -0
- package/dist/components/fab/fab-tokens.js.map +1 -0
- package/dist/components/fab-menu/FabMenu.d.ts +156 -0
- package/dist/components/fab-menu/FabMenu.js +291 -0
- package/dist/components/fab-menu/FabMenu.js.map +1 -0
- package/dist/components/fab-menu/fab-menu-stagger.js +51 -0
- package/dist/components/fab-menu/fab-menu-stagger.js.map +1 -0
- package/dist/components/fab-menu/fab-menu-styles.d.ts +166 -0
- package/dist/components/fab-menu/fab-menu-styles.js +107 -0
- package/dist/components/fab-menu/fab-menu-styles.js.map +1 -0
- package/dist/components/fab-menu/fab-menu-tokens.d.ts +7 -0
- package/dist/components/fab-menu/fab-menu-tokens.js +120 -0
- package/dist/components/fab-menu/fab-menu-tokens.js.map +1 -0
- package/dist/components/icon-button/IconButton.d.ts +125 -0
- package/dist/components/icon-button/IconButton.js +112 -0
- package/dist/components/icon-button/IconButton.js.map +1 -0
- package/dist/components/icon-button/icon-button-styles.d.ts +217 -0
- package/dist/components/icon-button/icon-button-styles.js +244 -0
- package/dist/components/icon-button/icon-button-styles.js.map +1 -0
- package/dist/components/icon-button/icon-button-tokens.d.ts +11 -0
- package/dist/components/icon-button/icon-button-tokens.js +215 -0
- package/dist/components/icon-button/icon-button-tokens.js.map +1 -0
- package/dist/components/list/List.d.ts +265 -0
- package/dist/components/list/List.js +1386 -0
- package/dist/components/list/List.js.map +1 -0
- package/dist/components/list/ListMedia.d.ts +88 -0
- package/dist/components/list/ListMedia.js +132 -0
- package/dist/components/list/ListMedia.js.map +1 -0
- package/dist/components/list/list-styles.d.ts +375 -0
- package/dist/components/list/list-styles.js +220 -0
- package/dist/components/list/list-styles.js.map +1 -0
- package/dist/components/list/list-tokens.d.ts +7 -0
- package/dist/components/list/list-tokens.js +92 -0
- package/dist/components/list/list-tokens.js.map +1 -0
- package/dist/components/loading-indicator/LoadingIndicator.d.ts +65 -0
- package/dist/components/loading-indicator/LoadingIndicator.js +92 -0
- package/dist/components/loading-indicator/LoadingIndicator.js.map +1 -0
- package/dist/components/loading-indicator/lazy-loading-indicator.js +25 -0
- package/dist/components/loading-indicator/lazy-loading-indicator.js.map +1 -0
- package/dist/components/loading-indicator/loading-indicator-frames.js +149 -0
- package/dist/components/loading-indicator/loading-indicator-frames.js.map +1 -0
- package/dist/components/loading-indicator/loading-indicator-styles.d.ts +36 -0
- package/dist/components/loading-indicator/loading-indicator-styles.js +22 -0
- package/dist/components/loading-indicator/loading-indicator-styles.js.map +1 -0
- package/dist/components/loading-indicator/loading-indicator-tokens.d.ts +7 -0
- package/dist/components/loading-indicator/loading-indicator-tokens.js +44 -0
- package/dist/components/loading-indicator/loading-indicator-tokens.js.map +1 -0
- package/dist/components/menu/Menu.d.ts +215 -0
- package/dist/components/menu/Menu.js +715 -0
- package/dist/components/menu/Menu.js.map +1 -0
- package/dist/components/menu/menu-styles.d.ts +354 -0
- package/dist/components/menu/menu-styles.js +219 -0
- package/dist/components/menu/menu-styles.js.map +1 -0
- package/dist/components/menu/menu-tokens.d.ts +7 -0
- package/dist/components/menu/menu-tokens.js +93 -0
- package/dist/components/menu/menu-tokens.js.map +1 -0
- package/dist/components/menu/menu-trigger.d.ts +51 -0
- package/dist/components/menu/menu-trigger.js +100 -0
- package/dist/components/menu/menu-trigger.js.map +1 -0
- package/dist/components/menu/use-reveal-entering.js +42 -0
- package/dist/components/menu/use-reveal-entering.js.map +1 -0
- package/dist/components/navigation/NavItem.d.ts +54 -0
- package/dist/components/navigation/NavItem.js +182 -0
- package/dist/components/navigation/NavItem.js.map +1 -0
- package/dist/components/navigation/NavigationBar.d.ts +64 -0
- package/dist/components/navigation/NavigationBar.js +121 -0
- package/dist/components/navigation/NavigationBar.js.map +1 -0
- package/dist/components/navigation/NavigationRail.d.ts +91 -0
- package/dist/components/navigation/NavigationRail.js +285 -0
- package/dist/components/navigation/NavigationRail.js.map +1 -0
- package/dist/components/navigation/nav-item-styles.d.ts +190 -0
- package/dist/components/navigation/nav-item-styles.js +123 -0
- package/dist/components/navigation/nav-item-styles.js.map +1 -0
- package/dist/components/navigation/navigation-styles.d.ts +239 -0
- package/dist/components/navigation/navigation-styles.js +134 -0
- package/dist/components/navigation/navigation-styles.js.map +1 -0
- package/dist/components/navigation/navigation-tokens.d.ts +9 -0
- package/dist/components/navigation/navigation-tokens.js +114 -0
- package/dist/components/navigation/navigation-tokens.js.map +1 -0
- package/dist/components/navigation/use-hide-on-scroll.js +115 -0
- package/dist/components/navigation/use-hide-on-scroll.js.map +1 -0
- package/dist/components/navigation/use-item-arrow-keys.js +37 -0
- package/dist/components/navigation/use-item-arrow-keys.js.map +1 -0
- package/dist/components/navigation/use-rail-item-morph.js +61 -0
- package/dist/components/navigation/use-rail-item-morph.js.map +1 -0
- package/dist/components/progress/ProgressIndicator.d.ts +95 -0
- package/dist/components/progress/ProgressIndicator.js +426 -0
- package/dist/components/progress/ProgressIndicator.js.map +1 -0
- package/dist/components/progress/progress-geometry.js +285 -0
- package/dist/components/progress/progress-geometry.js.map +1 -0
- package/dist/components/progress/progress-styles.d.ts +81 -0
- package/dist/components/progress/progress-styles.js +43 -0
- package/dist/components/progress/progress-styles.js.map +1 -0
- package/dist/components/progress/progress-tokens.d.ts +7 -0
- package/dist/components/progress/progress-tokens.js +39 -0
- package/dist/components/progress/progress-tokens.js.map +1 -0
- package/dist/components/pull-to-refresh/PullToRefresh.d.ts +94 -0
- package/dist/components/pull-to-refresh/PullToRefresh.js +395 -0
- package/dist/components/pull-to-refresh/PullToRefresh.js.map +1 -0
- package/dist/components/pull-to-refresh/pull-to-refresh-math.js +37 -0
- package/dist/components/pull-to-refresh/pull-to-refresh-math.js.map +1 -0
- package/dist/components/pull-to-refresh/pull-to-refresh-styles.d.ts +53 -0
- package/dist/components/pull-to-refresh/pull-to-refresh-styles.js +14 -0
- package/dist/components/pull-to-refresh/pull-to-refresh-styles.js.map +1 -0
- package/dist/components/radio/RadioGroup.d.ts +121 -0
- package/dist/components/radio/RadioGroup.js +163 -0
- package/dist/components/radio/RadioGroup.js.map +1 -0
- package/dist/components/radio/radio-ring.js +21 -0
- package/dist/components/radio/radio-ring.js.map +1 -0
- package/dist/components/radio/radio-styles.d.ts +155 -0
- package/dist/components/radio/radio-styles.js +60 -0
- package/dist/components/radio/radio-styles.js.map +1 -0
- package/dist/components/radio/radio-tokens.d.ts +7 -0
- package/dist/components/radio/radio-tokens.js +31 -0
- package/dist/components/radio/radio-tokens.js.map +1 -0
- package/dist/components/search/SearchAppBar.d.ts +45 -0
- package/dist/components/search/SearchAppBar.js +61 -0
- package/dist/components/search/SearchAppBar.js.map +1 -0
- package/dist/components/search/SearchBar.d.ts +147 -0
- package/dist/components/search/SearchBar.js +412 -0
- package/dist/components/search/SearchBar.js.map +1 -0
- package/dist/components/search/search-styles.d.ts +243 -0
- package/dist/components/search/search-styles.js +143 -0
- package/dist/components/search/search-styles.js.map +1 -0
- package/dist/components/search/search-tokens.d.ts +9 -0
- package/dist/components/search/search-tokens.js +70 -0
- package/dist/components/search/search-tokens.js.map +1 -0
- package/dist/components/select/Select.d.ts +187 -0
- package/dist/components/select/Select.js +319 -0
- package/dist/components/select/Select.js.map +1 -0
- package/dist/components/select/field-shell.d.ts +29 -0
- package/dist/components/select/field-shell.js +135 -0
- package/dist/components/select/field-shell.js.map +1 -0
- package/dist/components/select/option-list.d.ts +81 -0
- package/dist/components/select/option-list.js +291 -0
- package/dist/components/select/option-list.js.map +1 -0
- package/dist/components/select/search-list.js +135 -0
- package/dist/components/select/search-list.js.map +1 -0
- package/dist/components/select/selection-cap.js +30 -0
- package/dist/components/select/selection-cap.js.map +1 -0
- package/dist/components/sheet/BottomSheet.d.ts +154 -0
- package/dist/components/sheet/BottomSheet.js +442 -0
- package/dist/components/sheet/BottomSheet.js.map +1 -0
- package/dist/components/sheet/SheetTrigger.d.ts +25 -0
- package/dist/components/sheet/SheetTrigger.js +46 -0
- package/dist/components/sheet/SheetTrigger.js.map +1 -0
- package/dist/components/sheet/SideSheet.d.ts +139 -0
- package/dist/components/sheet/SideSheet.js +289 -0
- package/dist/components/sheet/SideSheet.js.map +1 -0
- package/dist/components/sheet/bottom-sheet-gesture.js +30 -0
- package/dist/components/sheet/bottom-sheet-gesture.js.map +1 -0
- package/dist/components/sheet/lazy-bottom-sheet.js +33 -0
- package/dist/components/sheet/lazy-bottom-sheet.js.map +1 -0
- package/dist/components/sheet/sheet-gesture.js +48 -0
- package/dist/components/sheet/sheet-gesture.js.map +1 -0
- package/dist/components/sheet/sheet-icons.js +31 -0
- package/dist/components/sheet/sheet-icons.js.map +1 -0
- package/dist/components/sheet/sheet-settle.js +58 -0
- package/dist/components/sheet/sheet-settle.js.map +1 -0
- package/dist/components/sheet/sheet-styles.d.ts +312 -0
- package/dist/components/sheet/sheet-styles.js +229 -0
- package/dist/components/sheet/sheet-styles.js.map +1 -0
- package/dist/components/sheet/sheet-tokens.d.ts +12 -0
- package/dist/components/sheet/sheet-tokens.js +115 -0
- package/dist/components/sheet/sheet-tokens.js.map +1 -0
- package/dist/components/sheet/side-swipe-gesture.js +22 -0
- package/dist/components/sheet/side-swipe-gesture.js.map +1 -0
- package/dist/components/sheet/use-peek-inert.js +32 -0
- package/dist/components/sheet/use-peek-inert.js.map +1 -0
- package/dist/components/sheet/use-side-swipe.js +174 -0
- package/dist/components/sheet/use-side-swipe.js.map +1 -0
- package/dist/components/slider/Slider.d.ts +129 -0
- package/dist/components/slider/Slider.js +295 -0
- package/dist/components/slider/Slider.js.map +1 -0
- package/dist/components/slider/slider-geometry.js +138 -0
- package/dist/components/slider/slider-geometry.js.map +1 -0
- package/dist/components/slider/slider-styles.d.ts +133 -0
- package/dist/components/slider/slider-styles.js +97 -0
- package/dist/components/slider/slider-styles.js.map +1 -0
- package/dist/components/slider/slider-tokens.d.ts +7 -0
- package/dist/components/slider/slider-tokens.js +66 -0
- package/dist/components/slider/slider-tokens.js.map +1 -0
- package/dist/components/slider/use-touch-track.js +138 -0
- package/dist/components/slider/use-touch-track.js.map +1 -0
- package/dist/components/snackbar/Snackbar.d.ts +96 -0
- package/dist/components/snackbar/Snackbar.js +253 -0
- package/dist/components/snackbar/Snackbar.js.map +1 -0
- package/dist/components/snackbar/snackbar-state.d.ts +58 -0
- package/dist/components/snackbar/snackbar-state.js +73 -0
- package/dist/components/snackbar/snackbar-state.js.map +1 -0
- package/dist/components/snackbar/snackbar-styles.d.ts +109 -0
- package/dist/components/snackbar/snackbar-styles.js +67 -0
- package/dist/components/snackbar/snackbar-styles.js.map +1 -0
- package/dist/components/snackbar/snackbar-tokens.d.ts +7 -0
- package/dist/components/snackbar/snackbar-tokens.js +54 -0
- package/dist/components/snackbar/snackbar-tokens.js.map +1 -0
- package/dist/components/split-button/SplitButton.d.ts +109 -0
- package/dist/components/split-button/SplitButton.js +195 -0
- package/dist/components/split-button/SplitButton.js.map +1 -0
- package/dist/components/split-button/split-button-styles.d.ts +214 -0
- package/dist/components/split-button/split-button-styles.js +164 -0
- package/dist/components/split-button/split-button-styles.js.map +1 -0
- package/dist/components/split-button/split-button-tokens.d.ts +7 -0
- package/dist/components/split-button/split-button-tokens.js +36 -0
- package/dist/components/split-button/split-button-tokens.js.map +1 -0
- package/dist/components/switch/Switch.d.ts +82 -0
- package/dist/components/switch/Switch.js +165 -0
- package/dist/components/switch/Switch.js.map +1 -0
- package/dist/components/switch/switch-styles.d.ts +96 -0
- package/dist/components/switch/switch-styles.js +68 -0
- package/dist/components/switch/switch-styles.js.map +1 -0
- package/dist/components/switch/switch-thumb.js +41 -0
- package/dist/components/switch/switch-thumb.js.map +1 -0
- package/dist/components/switch/switch-tokens.d.ts +7 -0
- package/dist/components/switch/switch-tokens.js +78 -0
- package/dist/components/switch/switch-tokens.js.map +1 -0
- package/dist/components/tabs/Tabs.d.ts +120 -0
- package/dist/components/tabs/Tabs.js +346 -0
- package/dist/components/tabs/Tabs.js.map +1 -0
- package/dist/components/tabs/tabs-styles.d.ts +198 -0
- package/dist/components/tabs/tabs-styles.js +99 -0
- package/dist/components/tabs/tabs-styles.js.map +1 -0
- package/dist/components/tabs/tabs-tokens.d.ts +7 -0
- package/dist/components/tabs/tabs-tokens.js +121 -0
- package/dist/components/tabs/tabs-tokens.js.map +1 -0
- package/dist/components/text-field/TextField.d.ts +175 -0
- package/dist/components/text-field/TextField.js +250 -0
- package/dist/components/text-field/TextField.js.map +1 -0
- package/dist/components/text-field/text-field-styles.d.ts +252 -0
- package/dist/components/text-field/text-field-styles.js +209 -0
- package/dist/components/text-field/text-field-styles.js.map +1 -0
- package/dist/components/text-field/text-field-tokens.d.ts +7 -0
- package/dist/components/text-field/text-field-tokens.js +177 -0
- package/dist/components/text-field/text-field-tokens.js.map +1 -0
- package/dist/components/time-picker/TimePicker.d.ts +142 -0
- package/dist/components/time-picker/TimePicker.js +700 -0
- package/dist/components/time-picker/TimePicker.js.map +1 -0
- package/dist/components/time-picker/time-picker-styles.d.ts +175 -0
- package/dist/components/time-picker/time-picker-styles.js +112 -0
- package/dist/components/time-picker/time-picker-styles.js.map +1 -0
- package/dist/components/time-picker/time-picker-tokens.d.ts +7 -0
- package/dist/components/time-picker/time-picker-tokens.js +86 -0
- package/dist/components/time-picker/time-picker-tokens.js.map +1 -0
- package/dist/components/toolbar/Toolbar.d.ts +209 -0
- package/dist/components/toolbar/Toolbar.js +282 -0
- package/dist/components/toolbar/Toolbar.js.map +1 -0
- package/dist/components/toolbar/toolbar-styles.d.ts +403 -0
- package/dist/components/toolbar/toolbar-styles.js +253 -0
- package/dist/components/toolbar/toolbar-styles.js.map +1 -0
- package/dist/components/toolbar/toolbar-tokens.d.ts +27 -0
- package/dist/components/toolbar/toolbar-tokens.js +117 -0
- package/dist/components/toolbar/toolbar-tokens.js.map +1 -0
- package/dist/components/toolbar/use-toolbar-scroll-expansion.d.ts +56 -0
- package/dist/components/toolbar/use-toolbar-scroll-expansion.js +86 -0
- package/dist/components/toolbar/use-toolbar-scroll-expansion.js.map +1 -0
- package/dist/components/tooltip/Tooltip.d.ts +131 -0
- package/dist/components/tooltip/Tooltip.js +388 -0
- package/dist/components/tooltip/Tooltip.js.map +1 -0
- package/dist/components/tooltip/lazy-tooltip.js +35 -0
- package/dist/components/tooltip/lazy-tooltip.js.map +1 -0
- package/dist/components/tooltip/tooltip-placement.d.ts +16 -0
- package/dist/components/tooltip/tooltip-placement.js +14 -0
- package/dist/components/tooltip/tooltip-placement.js.map +1 -0
- package/dist/components/tooltip/tooltip-styles.d.ts +142 -0
- package/dist/components/tooltip/tooltip-styles.js +81 -0
- package/dist/components/tooltip/tooltip-styles.js.map +1 -0
- package/dist/components/tooltip/tooltip-tokens.d.ts +9 -0
- package/dist/components/tooltip/tooltip-tokens.js +72 -0
- package/dist/components/tooltip/tooltip-tokens.js.map +1 -0
- package/dist/components/tooltip/tooltip-trigger.d.ts +42 -0
- package/dist/components/tooltip/tooltip-trigger.js +115 -0
- package/dist/components/tooltip/tooltip-trigger.js.map +1 -0
- package/dist/composites/button-group/ButtonGroup.d.ts +116 -0
- package/dist/composites/button-group/ButtonGroup.js +270 -0
- package/dist/composites/button-group/ButtonGroup.js.map +1 -0
- package/dist/composites/button-group/button-group-styles.d.ts +73 -0
- package/dist/composites/button-group/button-group-styles.js +87 -0
- package/dist/composites/button-group/button-group-styles.js.map +1 -0
- package/dist/composites/button-group/lazy-overflow-menu.js +43 -0
- package/dist/composites/button-group/lazy-overflow-menu.js.map +1 -0
- package/dist/composites/button-group/overflow-menu-list.js +26 -0
- package/dist/composites/button-group/overflow-menu-list.js.map +1 -0
- package/dist/composites/button-group/use-overflow.js +75 -0
- package/dist/composites/button-group/use-overflow.js.map +1 -0
- package/dist/composites/button-group/use-press-expansion.js +155 -0
- package/dist/composites/button-group/use-press-expansion.js.map +1 -0
- package/dist/index.d.ts +142 -0
- package/dist/index.js +136 -0
- package/dist/motion/get-m3-spring.d.ts +6 -0
- package/dist/motion/get-m3-spring.js +10 -0
- package/dist/motion/get-m3-spring.js.map +1 -0
- package/dist/motion/reduced-motion.js +19 -0
- package/dist/motion/reduced-motion.js.map +1 -0
- package/dist/motion/use-m3-spring.d.ts +13 -0
- package/dist/motion/use-m3-spring.js +22 -0
- package/dist/motion/use-m3-spring.js.map +1 -0
- package/dist/next/NextRouterProvider.d.ts +13 -0
- package/dist/next/NextRouterProvider.js +26 -0
- package/dist/next/NextRouterProvider.js.map +1 -0
- package/dist/next/get-theme-from-cookies.d.ts +32 -0
- package/dist/next/get-theme-from-cookies.js +27 -0
- package/dist/next/get-theme-from-cookies.js.map +1 -0
- package/dist/next/navigation-guard.d.ts +30 -0
- package/dist/next/navigation-guard.js +68 -0
- package/dist/next/navigation-guard.js.map +1 -0
- package/dist/next.d.ts +5 -0
- package/dist/next.js +5 -0
- package/dist/primitives/ButtonBase.d.ts +115 -0
- package/dist/primitives/ButtonBase.js +231 -0
- package/dist/primitives/ButtonBase.js.map +1 -0
- package/dist/primitives/DomDirectionLocale.d.ts +18 -0
- package/dist/primitives/DomDirectionLocale.js +28 -0
- package/dist/primitives/DomDirectionLocale.js.map +1 -0
- package/dist/primitives/Field.d.ts +50 -0
- package/dist/primitives/Field.js +74 -0
- package/dist/primitives/Field.js.map +1 -0
- package/dist/primitives/IconFaces.js +23 -0
- package/dist/primitives/IconFaces.js.map +1 -0
- package/dist/primitives/Overlay.d.ts +39 -0
- package/dist/primitives/Overlay.js +86 -0
- package/dist/primitives/Overlay.js.map +1 -0
- package/dist/primitives/SelectionControl.d.ts +55 -0
- package/dist/primitives/SelectionControl.js +58 -0
- package/dist/primitives/SelectionControl.js.map +1 -0
- package/dist/primitives/Surface.d.ts +123 -0
- package/dist/primitives/Surface.js +68 -0
- package/dist/primitives/Surface.js.map +1 -0
- package/dist/primitives/ToolbarContext.js +12 -0
- package/dist/primitives/ToolbarContext.js.map +1 -0
- package/dist/primitives/TouchTarget.d.ts +14 -0
- package/dist/primitives/TouchTarget.js +20 -0
- package/dist/primitives/TouchTarget.js.map +1 -0
- package/dist/primitives/TriggerContext.d.ts +34 -0
- package/dist/primitives/TriggerContext.js +24 -0
- package/dist/primitives/TriggerContext.js.map +1 -0
- package/dist/primitives/hidden-input-focus.js +27 -0
- package/dist/primitives/hidden-input-focus.js.map +1 -0
- package/dist/primitives/icon-faces-styles.d.ts +9 -0
- package/dist/primitives/icon-faces-styles.js +45 -0
- package/dist/primitives/icon-faces-styles.js.map +1 -0
- package/dist/primitives/locale-with-direction.d.ts +9 -0
- package/dist/primitives/locale-with-direction.js +17 -0
- package/dist/primitives/locale-with-direction.js.map +1 -0
- package/dist/primitives/morph-path.d.ts +25 -0
- package/dist/primitives/morph-path.js +38 -0
- package/dist/primitives/morph-path.js.map +1 -0
- package/dist/primitives/selection-control-styles.d.ts +54 -0
- package/dist/primitives/selection-control-styles.js +44 -0
- package/dist/primitives/selection-control-styles.js.map +1 -0
- package/dist/primitives/use-m3-interaction.d.ts +51 -0
- package/dist/primitives/use-m3-interaction.js +149 -0
- package/dist/primitives/use-m3-interaction.js.map +1 -0
- package/dist/primitives/use-m3-morph.d.ts +18 -0
- package/dist/primitives/use-m3-morph.js +36 -0
- package/dist/primitives/use-m3-morph.js.map +1 -0
- package/dist/primitives/use-presence.d.ts +19 -0
- package/dist/primitives/use-presence.js +37 -0
- package/dist/primitives/use-presence.js.map +1 -0
- package/dist/primitives.d.ts +36 -0
- package/dist/primitives.js +34 -0
- package/dist/shapes/corner-rounding.d.ts +13 -0
- package/dist/shapes/corner-rounding.js +18 -0
- package/dist/shapes/corner-rounding.js.map +1 -0
- package/dist/shapes/cubic.d.ts +52 -0
- package/dist/shapes/cubic.js +189 -0
- package/dist/shapes/cubic.js.map +1 -0
- package/dist/shapes/feature-mapping.js +80 -0
- package/dist/shapes/feature-mapping.js.map +1 -0
- package/dist/shapes/features.d.ts +23 -0
- package/dist/shapes/features.js +82 -0
- package/dist/shapes/features.js.map +1 -0
- package/dist/shapes/float-mapping.js +65 -0
- package/dist/shapes/float-mapping.js.map +1 -0
- package/dist/shapes/generated/material-shape-path-record.d.ts +11 -0
- package/dist/shapes/generated/material-shape-path-record.js +48 -0
- package/dist/shapes/generated/material-shape-path-record.js.map +1 -0
- package/dist/shapes/generated/material-shape-paths.d.ts +78 -0
- package/dist/shapes/generated/material-shape-paths.js +218 -0
- package/dist/shapes/generated/material-shape-paths.js.map +1 -0
- package/dist/shapes/mask.d.ts +14 -0
- package/dist/shapes/mask.js +24 -0
- package/dist/shapes/mask.js.map +1 -0
- package/dist/shapes/material-shapes.d.ts +11 -0
- package/dist/shapes/material-shapes.js +250 -0
- package/dist/shapes/material-shapes.js.map +1 -0
- package/dist/shapes/morph.d.ts +25 -0
- package/dist/shapes/morph.js +97 -0
- package/dist/shapes/morph.js.map +1 -0
- package/dist/shapes/path.d.ts +33 -0
- package/dist/shapes/path.js +47 -0
- package/dist/shapes/path.js.map +1 -0
- package/dist/shapes/point.d.ts +28 -0
- package/dist/shapes/point.js +103 -0
- package/dist/shapes/point.js.map +1 -0
- package/dist/shapes/polygon-measure.js +140 -0
- package/dist/shapes/polygon-measure.js.map +1 -0
- package/dist/shapes/rounded-polygon.d.ts +44 -0
- package/dist/shapes/rounded-polygon.js +278 -0
- package/dist/shapes/rounded-polygon.js.map +1 -0
- package/dist/shapes/shape-path.d.ts +15 -0
- package/dist/shapes/shapes.d.ts +53 -0
- package/dist/shapes/shapes.js +171 -0
- package/dist/shapes/shapes.js.map +1 -0
- package/dist/styles/generated/components.css +710 -0
- package/dist/styles/generated/theme.css +247 -0
- package/dist/styles/generated/themes.css +3361 -0
- package/dist/styles/generated/tokens.css +284 -0
- package/dist/styles/styles.css +15 -0
- package/dist/styles/utilities.css +283 -0
- package/dist/styles.compiled.css +2 -0
- package/dist/theme/ThemeProvider.d.ts +72 -0
- package/dist/theme/ThemeProvider.js +144 -0
- package/dist/theme/ThemeProvider.js.map +1 -0
- package/dist/theme/ThemeScope.d.ts +32 -0
- package/dist/theme/ThemeScope.js +67 -0
- package/dist/theme/ThemeScope.js.map +1 -0
- package/dist/theme/ThemeScript.d.ts +26 -0
- package/dist/theme/ThemeScript.js +44 -0
- package/dist/theme/ThemeScript.js.map +1 -0
- package/dist/theme/context.d.ts +32 -0
- package/dist/theme/context.js +47 -0
- package/dist/theme/context.js.map +1 -0
- package/dist/theme/create-theme.d.ts +60 -0
- package/dist/theme/create-theme.js +47 -0
- package/dist/theme/create-theme.js.map +1 -0
- package/dist/theme/css.js +54 -0
- package/dist/theme/css.js.map +1 -0
- package/dist/theme/parse-palettes.js +40 -0
- package/dist/theme/parse-palettes.js.map +1 -0
- package/dist/theme/scheme.d.ts +6 -0
- package/dist/theme/scheme.js +118 -0
- package/dist/theme/scheme.js.map +1 -0
- package/dist/theme/state.d.ts +38 -0
- package/dist/theme/state.js +93 -0
- package/dist/theme/state.js.map +1 -0
- package/dist/theme/storage.js +21 -0
- package/dist/theme/storage.js.map +1 -0
- package/dist/tokens/breakpoints.d.ts +15 -0
- package/dist/tokens/breakpoints.js +16 -0
- package/dist/tokens/breakpoints.js.map +1 -0
- package/dist/tokens/color.d.ts +104 -0
- package/dist/tokens/color.js +147 -0
- package/dist/tokens/color.js.map +1 -0
- package/dist/tokens/component.d.ts +110 -0
- package/dist/tokens/component.js +67 -0
- package/dist/tokens/component.js.map +1 -0
- package/dist/tokens/density.d.ts +20 -0
- package/dist/tokens/density.js +27 -0
- package/dist/tokens/density.js.map +1 -0
- package/dist/tokens/elevation.d.ts +44 -0
- package/dist/tokens/elevation.js +45 -0
- package/dist/tokens/elevation.js.map +1 -0
- package/dist/tokens/motion.d.ts +79 -0
- package/dist/tokens/motion.js +126 -0
- package/dist/tokens/motion.js.map +1 -0
- package/dist/tokens/shape.d.ts +22 -0
- package/dist/tokens/shape.js +22 -0
- package/dist/tokens/shape.js.map +1 -0
- package/dist/tokens/spring-velocity.d.ts +19 -0
- package/dist/tokens/spring-velocity.js +44 -0
- package/dist/tokens/spring-velocity.js.map +1 -0
- package/dist/tokens/state.d.ts +18 -0
- package/dist/tokens/state.js +19 -0
- package/dist/tokens/state.js.map +1 -0
- package/dist/tokens/typography.d.ts +64 -0
- package/dist/tokens/typography.js +60 -0
- package/dist/tokens/typography.js.map +1 -0
- package/dist/tokens/z-index.d.ts +17 -0
- package/dist/tokens/z-index.js +18 -0
- package/dist/tokens/z-index.js.map +1 -0
- package/dist/utils/announce.js +51 -0
- package/dist/utils/announce.js.map +1 -0
- package/dist/utils/assert-collection-children.js +26 -0
- package/dist/utils/assert-collection-children.js.map +1 -0
- package/dist/utils/closed-by.d.ts +9 -0
- package/dist/utils/closed-by.js +12 -0
- package/dist/utils/closed-by.js.map +1 -0
- package/dist/utils/cn.d.ts +31 -0
- package/dist/utils/cn.js +37 -0
- package/dist/utils/cn.js.map +1 -0
- package/dist/utils/composite-keys.js +32 -0
- package/dist/utils/composite-keys.js.map +1 -0
- package/dist/utils/focus-visible.js +14 -0
- package/dist/utils/focus-visible.js.map +1 -0
- package/dist/utils/focus.js +51 -0
- package/dist/utils/focus.js.map +1 -0
- package/dist/utils/focusable-disabled.js +12 -0
- package/dist/utils/focusable-disabled.js.map +1 -0
- package/dist/utils/keep-pressed-in-place.d.ts +60 -0
- package/dist/utils/keep-pressed-in-place.js +127 -0
- package/dist/utils/keep-pressed-in-place.js.map +1 -0
- package/dist/utils/load-on-demand.js +111 -0
- package/dist/utils/load-on-demand.js.map +1 -0
- package/dist/utils/merge-data-tokens.d.ts +9 -0
- package/dist/utils/merge-data-tokens.js +15 -0
- package/dist/utils/merge-data-tokens.js.map +1 -0
- package/dist/utils/natural-size.js +53 -0
- package/dist/utils/natural-size.js.map +1 -0
- package/dist/utils/nearest-reveal.js +28 -0
- package/dist/utils/nearest-reveal.js.map +1 -0
- package/dist/utils/placement.js +14 -0
- package/dist/utils/placement.js.map +1 -0
- package/dist/utils/radio-group-keys.js +74 -0
- package/dist/utils/radio-group-keys.js.map +1 -0
- package/dist/utils/rendered-description.js +17 -0
- package/dist/utils/rendered-description.js.map +1 -0
- package/dist/utils/root-props.d.ts +103 -0
- package/dist/utils/root-props.js +51 -0
- package/dist/utils/root-props.js.map +1 -0
- package/dist/utils/search.d.ts +11 -0
- package/dist/utils/search.js +18 -0
- package/dist/utils/search.js.map +1 -0
- package/dist/utils/shortcut.js +20 -0
- package/dist/utils/shortcut.js.map +1 -0
- package/dist/utils/split-data-attributes.d.ts +12 -0
- package/dist/utils/split-data-attributes.js +20 -0
- package/dist/utils/split-data-attributes.js.map +1 -0
- package/dist/utils/toolbar-keys.js +28 -0
- package/dist/utils/toolbar-keys.js.map +1 -0
- package/dist/utils/tv.d.ts +7 -0
- package/dist/utils/tv.js +9 -0
- package/dist/utils/tv.js.map +1 -0
- package/dist/utils/typeahead.js +64 -0
- package/dist/utils/typeahead.js.map +1 -0
- package/dist/utils/warn-once.js +30 -0
- package/dist/utils/warn-once.js.map +1 -0
- package/dist/vendor/material-color-utilities/blend/blend.js +88 -0
- package/dist/vendor/material-color-utilities/blend/blend.js.map +1 -0
- package/dist/vendor/material-color-utilities/contrast/contrast.js +131 -0
- package/dist/vendor/material-color-utilities/contrast/contrast.js.map +1 -0
- package/dist/vendor/material-color-utilities/dislike/dislike_analyzer.js +58 -0
- package/dist/vendor/material-color-utilities/dislike/dislike_analyzer.js.map +1 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/color_spec_2021.js +620 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/color_spec_2021.js.map +1 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/color_spec_2025.js +786 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/color_spec_2025.js.map +1 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/contrast_curve.js +59 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/contrast_curve.js.map +1 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/dynamic_color.js +420 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/dynamic_color.js.map +1 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/dynamic_scheme.js +701 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/dynamic_scheme.js.map +1 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/material_dynamic_colors.js +374 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/material_dynamic_colors.js.map +1 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/tone_delta_pair.js +65 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/tone_delta_pair.js.map +1 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/variant.js +38 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/variant.js.map +1 -0
- package/dist/vendor/material-color-utilities/hct/cam16.js +309 -0
- package/dist/vendor/material-color-utilities/hct/cam16.js.map +1 -0
- package/dist/vendor/material-color-utilities/hct/hct.js +148 -0
- package/dist/vendor/material-color-utilities/hct/hct.js.map +1 -0
- package/dist/vendor/material-color-utilities/hct/hct_solver.js +660 -0
- package/dist/vendor/material-color-utilities/hct/hct_solver.js.map +1 -0
- package/dist/vendor/material-color-utilities/hct/viewing_conditions.js +117 -0
- package/dist/vendor/material-color-utilities/hct/viewing_conditions.js.map +1 -0
- package/dist/vendor/material-color-utilities/index.js +51 -0
- package/dist/vendor/material-color-utilities/index.js.map +1 -0
- package/dist/vendor/material-color-utilities/palettes/core_palette.js +22 -0
- package/dist/vendor/material-color-utilities/palettes/core_palette.js.map +1 -0
- package/dist/vendor/material-color-utilities/palettes/tonal_palette.js +134 -0
- package/dist/vendor/material-color-utilities/palettes/tonal_palette.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme.js +21 -0
- package/dist/vendor/material-color-utilities/scheme/scheme.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_android.js +21 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_android.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_content.js +22 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_content.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_expressive.js +38 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_expressive.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_fidelity.js +22 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_fidelity.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_fruit_salad.js +22 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_fruit_salad.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_monochrome.js +22 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_monochrome.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_neutral.js +36 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_neutral.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_rainbow.js +22 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_rainbow.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_tonal_spot.js +41 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_tonal_spot.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_vibrant.js +39 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_vibrant.js.map +1 -0
- package/dist/vendor/material-color-utilities/score/score.js +115 -0
- package/dist/vendor/material-color-utilities/score/score.js.map +1 -0
- package/dist/vendor/material-color-utilities/temperature/temperature_cache.js +227 -0
- package/dist/vendor/material-color-utilities/temperature/temperature_cache.js.map +1 -0
- package/dist/vendor/material-color-utilities/utils/color_utils.js +246 -0
- package/dist/vendor/material-color-utilities/utils/color_utils.js.map +1 -0
- package/dist/vendor/material-color-utilities/utils/image_utils.js +21 -0
- package/dist/vendor/material-color-utilities/utils/image_utils.js.map +1 -0
- package/dist/vendor/material-color-utilities/utils/math_utils.js +119 -0
- package/dist/vendor/material-color-utilities/utils/math_utils.js.map +1 -0
- package/dist/vendor/material-color-utilities/utils/string_utils.js +74 -0
- package/dist/vendor/material-color-utilities/utils/string_utils.js.map +1 -0
- package/dist/vendor/material-color-utilities/utils/theme_utils.js +24 -0
- package/dist/vendor/material-color-utilities/utils/theme_utils.js.map +1 -0
- package/package.json +114 -3
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { tv } from "../../utils/tv.js";
|
|
2
|
+
import { selectionControlStyles } from "../../primitives/selection-control-styles.js";
|
|
3
|
+
/** Variant definitions for {@link Switch}. */
|
|
4
|
+
const switchStyles = tv({
|
|
5
|
+
extend: selectionControlStyles,
|
|
6
|
+
slots: {
|
|
7
|
+
control: [
|
|
8
|
+
"h-[32px] w-[52px] border-2 border-solid",
|
|
9
|
+
"border-[color:var(--_md-comp-switch-unselected-track-outline-color)]",
|
|
10
|
+
"bg-[var(--_md-comp-switch-unselected-track-color)]",
|
|
11
|
+
"touch-pan-y",
|
|
12
|
+
"[transition-property:background-color,border-color]",
|
|
13
|
+
"[transition-duration:var(--md-sys-motion-spring-effects-default-duration)]",
|
|
14
|
+
"[transition-timing-function:var(--md-sys-motion-spring-effects-default-easing)]",
|
|
15
|
+
"control-checked:border-[color:var(--_md-comp-switch-selected-track-color)]",
|
|
16
|
+
"control-checked:bg-[var(--_md-comp-switch-selected-track-color)]",
|
|
17
|
+
"group-data-disabled/control:border-[color-mix(in_srgb,var(--md-sys-color-on-surface)_12%,var(--md-sys-color-surface))]",
|
|
18
|
+
"group-data-disabled/control:bg-[color-mix(in_srgb,var(--md-sys-color-surface-container-highest)_12%,var(--md-sys-color-surface))]",
|
|
19
|
+
"group-data-disabled/control:control-checked:border-transparent",
|
|
20
|
+
"group-data-disabled/control:control-checked:bg-[color-mix(in_srgb,var(--md-sys-color-on-surface)_12%,var(--md-sys-color-surface))]",
|
|
21
|
+
"forced-colors:forced-color-adjust-none forced-colors:border-[CanvasText]! forced-colors:bg-[Canvas]!",
|
|
22
|
+
"forced-colors:control-checked:border-[Highlight]! forced-colors:control-checked:bg-[Highlight]!",
|
|
23
|
+
"forced-colors:group-data-disabled/control:border-[GrayText]!",
|
|
24
|
+
"forced-colors:group-data-disabled/control:control-checked:border-[GrayText]! forced-colors:group-data-disabled/control:control-checked:bg-[GrayText]!"
|
|
25
|
+
],
|
|
26
|
+
stateLayer: [
|
|
27
|
+
"[--m3-switch-layer:max(32px,calc(40px+var(--md-sys-density,0)*4px))]",
|
|
28
|
+
"pointer-events-none absolute top-[calc(14px-var(--m3-switch-layer)/2)] start-[calc(var(--m3-thumb-center)-2px-var(--m3-switch-layer)/2)] size-[var(--m3-switch-layer)] rounded-full",
|
|
29
|
+
"state-layer [--m3-ripple-size:calc(var(--m3-switch-layer)/2)] [--m3-ripple-start:calc(var(--m3-switch-layer)*0.3)]",
|
|
30
|
+
"[--m3-state-layer-color:var(--md-sys-color-on-surface)]",
|
|
31
|
+
"data-checked:[--m3-state-layer-color:var(--md-sys-color-primary)]",
|
|
32
|
+
"[--m3-transition-property:inset-inline-start]",
|
|
33
|
+
"[--m3-transition-duration:var(--md-sys-motion-spring-spatial-fast-duration)]",
|
|
34
|
+
"[--m3-transition-easing:var(--md-sys-motion-spring-spatial-fast-easing)]",
|
|
35
|
+
"[--m3-transition-delay:0s]"
|
|
36
|
+
],
|
|
37
|
+
thumb: [
|
|
38
|
+
"absolute top-[calc(14px-var(--m3-thumb-size)/2)] start-[calc(var(--m3-thumb-center)-var(--m3-thumb-size)/2-2px)]",
|
|
39
|
+
"flex size-[var(--m3-thumb-size)] items-center justify-center rounded-full",
|
|
40
|
+
"bg-[var(--_md-comp-switch-unselected-handle-color)] text-[color:var(--_md-comp-switch-unselected-icon-color)]",
|
|
41
|
+
"[transition-property:width,height,top,inset-inline-start,background-color]",
|
|
42
|
+
"[transition-duration:var(--md-sys-motion-spring-spatial-fast-duration),var(--md-sys-motion-spring-spatial-fast-duration),var(--md-sys-motion-spring-spatial-fast-duration),var(--md-sys-motion-spring-spatial-fast-duration),var(--md-sys-motion-spring-effects-default-duration)] [transition-timing-function:var(--md-sys-motion-spring-spatial-fast-easing),var(--md-sys-motion-spring-spatial-fast-easing),var(--md-sys-motion-spring-spatial-fast-easing),var(--md-sys-motion-spring-spatial-fast-easing),var(--md-sys-motion-spring-effects-default-easing)]",
|
|
43
|
+
"group-data-pressed/control:[transition-duration:0s,0s,0s,0s,var(--md-sys-motion-spring-effects-default-duration)]",
|
|
44
|
+
"group-data-hovered/control:bg-on-surface-variant",
|
|
45
|
+
"group-data-focus-visible/control:bg-on-surface-variant",
|
|
46
|
+
"group-data-pressed/control:bg-on-surface-variant",
|
|
47
|
+
"control-checked:bg-[var(--_md-comp-switch-selected-handle-color)]",
|
|
48
|
+
"control-checked:text-[color:var(--_md-comp-switch-selected-icon-color)]",
|
|
49
|
+
"control-checked:group-data-hovered/control:bg-primary-container",
|
|
50
|
+
"control-checked:group-data-focus-visible/control:bg-primary-container",
|
|
51
|
+
"control-checked:group-data-pressed/control:bg-primary-container",
|
|
52
|
+
"group-data-disabled/control:bg-[color-mix(in_srgb,var(--md-sys-color-on-surface)_38%,var(--md-sys-color-surface))]",
|
|
53
|
+
"group-data-disabled/control:text-[color-mix(in_srgb,var(--md-sys-color-surface-container-highest)_38%,var(--md-sys-color-surface))]",
|
|
54
|
+
"group-data-disabled/control:control-checked:bg-surface",
|
|
55
|
+
"group-data-disabled/control:control-checked:text-[color-mix(in_srgb,var(--md-sys-color-on-surface)_38%,var(--md-sys-color-surface))]",
|
|
56
|
+
"forced-colors:forced-color-adjust-none forced-colors:bg-[CanvasText]! forced-colors:text-[Canvas]!",
|
|
57
|
+
"forced-colors:control-checked:bg-[HighlightText]! forced-colors:control-checked:text-[Highlight]!",
|
|
58
|
+
"forced-colors:group-data-disabled/control:bg-[GrayText]! forced-colors:group-data-disabled/control:text-[Canvas]!",
|
|
59
|
+
"forced-colors:group-data-disabled/control:control-checked:bg-[Canvas]! forced-colors:group-data-disabled/control:control-checked:text-[GrayText]!"
|
|
60
|
+
],
|
|
61
|
+
icon: "inline-flex size-[16px] items-center justify-center [&>svg]:size-full"
|
|
62
|
+
},
|
|
63
|
+
defaultVariants: { kind: "track" }
|
|
64
|
+
});
|
|
65
|
+
//#endregion
|
|
66
|
+
export { switchStyles };
|
|
67
|
+
|
|
68
|
+
//# sourceMappingURL=switch-styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch-styles.js","names":[],"sources":["../../../src/components/switch/switch-styles.ts"],"sourcesContent":["import { selectionControlStyles } from '../../primitives/selection-control-styles';\nimport { tv, type VariantProps } from '../../utils/tv';\n\n/*\n * Values follow Compose Material 3 (Switch.kt and SwitchTokens): a 52×32px track with a\n * 2px outline; the thumb is 16px (off), 24px (on, or with an icon) and 28px (pressed),\n * centred 16px or 36px from the track's start. Pressing (or dragging) snaps the\n * thumb; releasing animates it on the fast spatial spring. The 40px state layer\n * follows the thumb. Web density (`--md-sys-density`) takes 4px a step off the state layer,\n * to 32px at -2 and -3 so it still rings a pressed 28px thumb (Material Components Web's\n * switch density shrinks only the state layer, 48 → 28px, never the track).\n * Disabled colours are Compose's composites over `surface`. `--m3-thumb-size` and\n * `--m3-thumb-center` are set by the component. The resting track, outline, handle and icon\n * colours come from the switch's component tokens (`switch-tokens.ts`, `--md-comp-switch-*`);\n * a consumer class (`classNames.control`, `classNames.thumb`) still wins in `cn()`. Every\n * class is written out in full.\n */\n\nconst thumbMotion =\n '[transition-duration:var(--md-sys-motion-spring-spatial-fast-duration),var(--md-sys-motion-spring-spatial-fast-duration),var(--md-sys-motion-spring-spatial-fast-duration),var(--md-sys-motion-spring-spatial-fast-duration),var(--md-sys-motion-spring-effects-default-duration)] [transition-timing-function:var(--md-sys-motion-spring-spatial-fast-easing),var(--md-sys-motion-spring-spatial-fast-easing),var(--md-sys-motion-spring-spatial-fast-easing),var(--md-sys-motion-spring-spatial-fast-easing),var(--md-sys-motion-spring-effects-default-easing)]';\n\n/** Variant definitions for {@link Switch}. */\nexport const switchStyles = tv({\n extend: selectionControlStyles,\n slots: {\n // The control is the track.\n control: [\n 'h-[32px] w-[52px] border-2 border-solid',\n 'border-[color:var(--_md-comp-switch-unselected-track-outline-color)]',\n 'bg-[var(--_md-comp-switch-unselected-track-color)]',\n // The thumb can be dragged sideways; vertical swipes still scroll the page.\n 'touch-pan-y',\n '[transition-property:background-color,border-color]',\n '[transition-duration:var(--md-sys-motion-spring-effects-default-duration)]',\n '[transition-timing-function:var(--md-sys-motion-spring-effects-default-easing)]',\n 'control-checked:border-[color:var(--_md-comp-switch-selected-track-color)]',\n 'control-checked:bg-[var(--_md-comp-switch-selected-track-color)]',\n 'group-data-disabled/control:border-[color-mix(in_srgb,var(--md-sys-color-on-surface)_12%,var(--md-sys-color-surface))]',\n 'group-data-disabled/control:bg-[color-mix(in_srgb,var(--md-sys-color-surface-container-highest)_12%,var(--md-sys-color-surface))]',\n 'group-data-disabled/control:control-checked:border-transparent',\n 'group-data-disabled/control:control-checked:bg-[color-mix(in_srgb,var(--md-sys-color-on-surface)_12%,var(--md-sys-color-surface))]',\n // Forced colours: the thumb is a background, which forced colours drop, so the track and\n // thumb take system colours: an outlined `Canvas` track with a `CanvasText` thumb when\n // off, a `Highlight` track with a `HighlightText` thumb when on, `GrayText` when disabled.\n 'forced-colors:forced-color-adjust-none forced-colors:border-[CanvasText]! forced-colors:bg-[Canvas]!',\n 'forced-colors:control-checked:border-[Highlight]! forced-colors:control-checked:bg-[Highlight]!',\n 'forced-colors:group-data-disabled/control:border-[GrayText]!',\n 'forced-colors:group-data-disabled/control:control-checked:border-[GrayText]! forced-colors:group-data-disabled/control:control-checked:bg-[GrayText]!',\n ],\n stateLayer: [\n // 40px, 4px less per density step down to 32px (`--m3-switch-layer`), centred on the\n // thumb: the track's 2px border is outside the positioning box.\n '[--m3-switch-layer:max(32px,calc(40px+var(--md-sys-density,0)*4px))]',\n 'pointer-events-none absolute top-[calc(14px-var(--m3-switch-layer)/2)] start-[calc(var(--m3-thumb-center)-2px-var(--m3-switch-layer)/2)] size-[var(--m3-switch-layer)] rounded-full',\n 'state-layer [--m3-ripple-size:calc(var(--m3-switch-layer)/2)] [--m3-ripple-start:calc(var(--m3-switch-layer)*0.3)]',\n '[--m3-state-layer-color:var(--md-sys-color-on-surface)]',\n 'data-checked:[--m3-state-layer-color:var(--md-sys-color-primary)]',\n '[--m3-transition-property:inset-inline-start]',\n '[--m3-transition-duration:var(--md-sys-motion-spring-spatial-fast-duration)]',\n '[--m3-transition-easing:var(--md-sys-motion-spring-spatial-fast-easing)]',\n '[--m3-transition-delay:0s]',\n ],\n thumb: [\n 'absolute top-[calc(14px-var(--m3-thumb-size)/2)] start-[calc(var(--m3-thumb-center)-var(--m3-thumb-size)/2-2px)]',\n 'flex size-[var(--m3-thumb-size)] items-center justify-center rounded-full',\n 'bg-[var(--_md-comp-switch-unselected-handle-color)] text-[color:var(--_md-comp-switch-unselected-icon-color)]',\n '[transition-property:width,height,top,inset-inline-start,background-color]',\n thumbMotion,\n 'group-data-pressed/control:[transition-duration:0s,0s,0s,0s,var(--md-sys-motion-spring-effects-default-duration)]',\n 'group-data-hovered/control:bg-on-surface-variant',\n 'group-data-focus-visible/control:bg-on-surface-variant',\n 'group-data-pressed/control:bg-on-surface-variant',\n 'control-checked:bg-[var(--_md-comp-switch-selected-handle-color)]',\n 'control-checked:text-[color:var(--_md-comp-switch-selected-icon-color)]',\n 'control-checked:group-data-hovered/control:bg-primary-container',\n 'control-checked:group-data-focus-visible/control:bg-primary-container',\n 'control-checked:group-data-pressed/control:bg-primary-container',\n 'group-data-disabled/control:bg-[color-mix(in_srgb,var(--md-sys-color-on-surface)_38%,var(--md-sys-color-surface))]',\n 'group-data-disabled/control:text-[color-mix(in_srgb,var(--md-sys-color-surface-container-highest)_38%,var(--md-sys-color-surface))]',\n 'group-data-disabled/control:control-checked:bg-surface',\n 'group-data-disabled/control:control-checked:text-[color-mix(in_srgb,var(--md-sys-color-on-surface)_38%,var(--md-sys-color-surface))]',\n 'forced-colors:forced-color-adjust-none forced-colors:bg-[CanvasText]! forced-colors:text-[Canvas]!',\n 'forced-colors:control-checked:bg-[HighlightText]! forced-colors:control-checked:text-[Highlight]!',\n 'forced-colors:group-data-disabled/control:bg-[GrayText]! forced-colors:group-data-disabled/control:text-[Canvas]!',\n 'forced-colors:group-data-disabled/control:control-checked:bg-[Canvas]! forced-colors:group-data-disabled/control:control-checked:text-[GrayText]!',\n ],\n icon: 'inline-flex size-[16px] items-center justify-center [&>svg]:size-full',\n },\n defaultVariants: { kind: 'track' },\n});\n\n/**\n * The variants of {@link switchStyles}, for building on its styles. They are the recipe's keys, not\n * component props: their names (`hasIcon`, `isOpen`…) follow the classes and may change.\n */\nexport type SwitchStyleProps = VariantProps<typeof switchStyles>;\n"],"mappings":";;;AAsBA,MAAa,eAAe,GAAG;CAC7B,QAAQ;CACR,OAAO;EAEL,SAAS;GACP;GACA;GACA;GAEA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GAIA;GACA;GACA;GACA;EACF;EACA,YAAY;GAGV;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EACA,OAAO;GACL;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EACA,MAAM;CACR;CACA,iBAAiB,EAAE,MAAM,QAAQ;AACnC,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { switchStyles } from "./switch-styles.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
const CheckIcon = () => /* @__PURE__ */ jsx("svg", {
|
|
4
|
+
viewBox: "0 -960 960 960",
|
|
5
|
+
fill: "currentColor",
|
|
6
|
+
children: /* @__PURE__ */ jsx("path", { d: "M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z" })
|
|
7
|
+
});
|
|
8
|
+
const CloseIcon = () => /* @__PURE__ */ jsx("svg", {
|
|
9
|
+
viewBox: "0 -960 960 960",
|
|
10
|
+
fill: "currentColor",
|
|
11
|
+
children: /* @__PURE__ */ jsx("path", { d: "m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z" })
|
|
12
|
+
});
|
|
13
|
+
/** Thumb size and centre in px (Compose `ThumbNode`). */
|
|
14
|
+
function thumbGeometry(selected, pressed, hasIcon) {
|
|
15
|
+
return {
|
|
16
|
+
size: pressed ? 28 : selected || hasIcon ? 24 : 16,
|
|
17
|
+
center: selected ? 36 : 16
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The thumb and its optional icon, placed by `--m3-thumb-size` and `--m3-thumb-center` on
|
|
22
|
+
* the track and styled from a `group/control` ancestor's state attributes. Shared with
|
|
23
|
+
* list items that are switches, so it carries the switch's component tokens
|
|
24
|
+
* (`switch-tokens.ts`) itself.
|
|
25
|
+
*/
|
|
26
|
+
function SwitchThumb({ styles = switchStyles(), icon, className, iconClassName }) {
|
|
27
|
+
return /* @__PURE__ */ jsx("span", {
|
|
28
|
+
"aria-hidden": "true",
|
|
29
|
+
"data-tokens": "md-comp-switch",
|
|
30
|
+
"data-slot": "thumb",
|
|
31
|
+
className: styles.thumb({ class: className }),
|
|
32
|
+
children: icon && /* @__PURE__ */ jsx("span", {
|
|
33
|
+
className: styles.icon({ class: iconClassName }),
|
|
34
|
+
children: icon
|
|
35
|
+
})
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
export { CheckIcon, CloseIcon, SwitchThumb, thumbGeometry };
|
|
40
|
+
|
|
41
|
+
//# sourceMappingURL=switch-thumb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch-thumb.js","names":[],"sources":["../../../src/components/switch/switch-thumb.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { switchStyles } from './switch-styles';\n\n/** The thumb's resting centres in px, off and on (Compose `ThumbNode`). */\nexport const THUMB_OFF_CENTER = 16;\nexport const THUMB_ON_CENTER = 36;\n\nexport const CheckIcon = () => (\n <svg viewBox=\"0 -960 960 960\" fill=\"currentColor\">\n <path d=\"M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z\" />\n </svg>\n);\n\nexport const CloseIcon = () => (\n <svg viewBox=\"0 -960 960 960\" fill=\"currentColor\">\n <path d=\"m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z\" />\n </svg>\n);\n\n/** Thumb size and centre in px (Compose `ThumbNode`). */\nexport function thumbGeometry(selected: boolean, pressed: boolean, hasIcon: boolean) {\n const size = pressed ? 28 : selected || hasIcon ? 24 : 16;\n return { size, center: selected ? THUMB_ON_CENTER : THUMB_OFF_CENTER };\n}\n\n/**\n * The thumb and its optional icon, placed by `--m3-thumb-size` and `--m3-thumb-center` on\n * the track and styled from a `group/control` ancestor's state attributes. Shared with\n * list items that are switches, so it carries the switch's component tokens\n * (`switch-tokens.ts`) itself.\n */\nexport function SwitchThumb({\n styles = switchStyles(),\n icon,\n className,\n iconClassName,\n}: {\n styles?: ReturnType<typeof switchStyles>;\n icon?: ReactNode;\n className?: string;\n iconClassName?: string;\n}) {\n return (\n <span\n aria-hidden=\"true\"\n data-tokens=\"md-comp-switch\"\n data-slot=\"thumb\"\n className={styles.thumb({ class: className })}\n >\n {icon && <span className={styles.icon({ class: iconClassName })}>{icon}</span>}\n </span>\n );\n}\n"],"mappings":";;AAOA,MAAa,kBACX,oBAAC,OAAD;CAAK,SAAQ;CAAiB,MAAK;CACjC,UAAA,oBAAC,QAAD,EAAM,GAAE,wDAAyD,CAAA;AAC9D,CAAA;AAGP,MAAa,kBACX,oBAAC,OAAD;CAAK,SAAQ;CAAiB,MAAK;CACjC,UAAA,oBAAC,QAAD,EAAM,GAAE,oGAAqG,CAAA;AAC1G,CAAA;;AAIP,SAAgB,cAAc,UAAmB,SAAkB,SAAkB;CAEnF,OAAO;EAAE,MADI,UAAU,KAAK,YAAY,UAAU,KAAK;EACxC,QAAQ,WAAA,KAAA;CAA8C;AACvE;;;;;;;AAQA,SAAgB,YAAY,EAC1B,SAAS,aAAa,GACtB,MACA,WACA,iBAMC;CACD,OACE,oBAAC,QAAD;EACE,eAAY;EACZ,eAAY;EACZ,aAAU;EACV,WAAW,OAAO,MAAM,EAAE,OAAO,UAAU,CAAC;EAE3C,UAAA,QAAQ,oBAAC,QAAD;GAAM,WAAW,OAAO,KAAK,EAAE,OAAO,cAAc,CAAC;GAAI,UAAA;EAAW,CAAA;CACzE,CAAA;AAEV"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComponentTokenSet } from "../../tokens/component.js";
|
|
2
|
+
import "../../index.js";
|
|
3
|
+
//#region src/components/switch/switch-tokens.d.ts
|
|
4
|
+
/** The tokens of {@link Switch}: `--md-comp-switch-<part>`. */
|
|
5
|
+
export declare const switchTokenSet: ComponentTokenSet<"selected-icon-color" | "unselected-icon-color" | "selected-track-color" | "selected-handle-color" | "unselected-track-color" | "unselected-track-outline-color" | "unselected-handle-color">;
|
|
6
|
+
//#endregion
|
|
7
|
+
//# sourceMappingURL=switch-tokens.d.ts.map
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { color, defineComponentTokens } from "../../tokens/component.js";
|
|
2
|
+
//#region src/components/switch/switch-tokens.ts
|
|
3
|
+
/** The tokens of {@link Switch}: `--md-comp-switch-<part>`. */
|
|
4
|
+
const switchTokenSet = defineComponentTokens({
|
|
5
|
+
name: "md-comp-switch",
|
|
6
|
+
tokens: {
|
|
7
|
+
"selected-track-color": {
|
|
8
|
+
value: color("primary"),
|
|
9
|
+
description: "The track of a switch that is on, and its edge.",
|
|
10
|
+
compose: "SwitchTokens.SelectedTrackColor",
|
|
11
|
+
paints: {
|
|
12
|
+
property: "background-color",
|
|
13
|
+
slot: "track",
|
|
14
|
+
state: "checked"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"selected-handle-color": {
|
|
18
|
+
value: color("on-primary"),
|
|
19
|
+
description: "The handle of a switch that is on.",
|
|
20
|
+
compose: "SwitchTokens.SelectedHandleColor",
|
|
21
|
+
paints: {
|
|
22
|
+
property: "background-color",
|
|
23
|
+
slot: "thumb",
|
|
24
|
+
state: "checked"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"selected-icon-color": {
|
|
28
|
+
value: color("on-primary-container"),
|
|
29
|
+
description: "The icon in the handle of a switch that is on.",
|
|
30
|
+
compose: "SwitchTokens.SelectedIconColor",
|
|
31
|
+
paints: {
|
|
32
|
+
property: "color",
|
|
33
|
+
slot: "thumb",
|
|
34
|
+
state: "checked"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"unselected-track-color": {
|
|
38
|
+
value: color("surface-container-highest"),
|
|
39
|
+
description: "The track of a switch that is off.",
|
|
40
|
+
compose: "SwitchTokens.UnselectedTrackColor",
|
|
41
|
+
paints: {
|
|
42
|
+
property: "background-color",
|
|
43
|
+
slot: "track"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"unselected-track-outline-color": {
|
|
47
|
+
value: color("outline"),
|
|
48
|
+
description: "The 2px edge of the track of a switch that is off.",
|
|
49
|
+
compose: "SwitchTokens.UnselectedTrackOutlineColor",
|
|
50
|
+
paints: {
|
|
51
|
+
property: "border-top-color",
|
|
52
|
+
slot: "track"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"unselected-handle-color": {
|
|
56
|
+
value: color("outline"),
|
|
57
|
+
description: "The handle of a switch that is off.",
|
|
58
|
+
compose: "SwitchTokens.UnselectedHandleColor",
|
|
59
|
+
paints: {
|
|
60
|
+
property: "background-color",
|
|
61
|
+
slot: "thumb"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"unselected-icon-color": {
|
|
65
|
+
value: color("surface-container-highest"),
|
|
66
|
+
description: "The icon in the handle of a switch that is off.",
|
|
67
|
+
compose: "SwitchTokens.UnselectedIconColor",
|
|
68
|
+
paints: {
|
|
69
|
+
property: "color",
|
|
70
|
+
slot: "thumb"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
//#endregion
|
|
76
|
+
export { switchTokenSet };
|
|
77
|
+
|
|
78
|
+
//# sourceMappingURL=switch-tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch-tokens.js","names":[],"sources":["../../../src/components/switch/switch-tokens.ts"],"sourcesContent":["import { color, defineComponentTokens } from '../../tokens/component';\n\n/*\n * The switch's component tokens, M3's `md.comp.switch.*` names (checked against\n * m3.material.io's token tables, 2026-10-14), with Compose's SwitchTokens defaults. The\n * switch's root and the drawn thumb (`switch-thumb.tsx`, which list items that are switches\n * draw too) carry `data-tokens`. Hover, focus, pressed and disabled values stay classes.\n */\n\n/** The tokens of {@link Switch}: `--md-comp-switch-<part>`. */\nexport const switchTokenSet = defineComponentTokens({\n name: 'md-comp-switch',\n tokens: {\n 'selected-track-color': {\n value: color('primary'),\n description: 'The track of a switch that is on, and its edge.',\n compose: 'SwitchTokens.SelectedTrackColor',\n paints: { property: 'background-color', slot: 'track', state: 'checked' },\n },\n 'selected-handle-color': {\n value: color('on-primary'),\n description: 'The handle of a switch that is on.',\n compose: 'SwitchTokens.SelectedHandleColor',\n paints: { property: 'background-color', slot: 'thumb', state: 'checked' },\n },\n 'selected-icon-color': {\n value: color('on-primary-container'),\n description: 'The icon in the handle of a switch that is on.',\n compose: 'SwitchTokens.SelectedIconColor',\n paints: { property: 'color', slot: 'thumb', state: 'checked' },\n },\n 'unselected-track-color': {\n value: color('surface-container-highest'),\n description: 'The track of a switch that is off.',\n compose: 'SwitchTokens.UnselectedTrackColor',\n paints: { property: 'background-color', slot: 'track' },\n },\n 'unselected-track-outline-color': {\n value: color('outline'),\n description: 'The 2px edge of the track of a switch that is off.',\n compose: 'SwitchTokens.UnselectedTrackOutlineColor',\n paints: { property: 'border-top-color', slot: 'track' },\n },\n 'unselected-handle-color': {\n value: color('outline'),\n description: 'The handle of a switch that is off.',\n compose: 'SwitchTokens.UnselectedHandleColor',\n paints: { property: 'background-color', slot: 'thumb' },\n },\n 'unselected-icon-color': {\n value: color('surface-container-highest'),\n description: 'The icon in the handle of a switch that is off.',\n compose: 'SwitchTokens.UnselectedIconColor',\n paints: { property: 'color', slot: 'thumb' },\n },\n },\n});\n"],"mappings":";;;AAUA,MAAa,iBAAiB,sBAAsB;CAClD,MAAM;CACN,QAAQ;EACN,wBAAwB;GACtB,OAAO,MAAM,SAAS;GACtB,aAAa;GACb,SAAS;GACT,QAAQ;IAAE,UAAU;IAAoB,MAAM;IAAS,OAAO;GAAU;EAC1E;EACA,yBAAyB;GACvB,OAAO,MAAM,YAAY;GACzB,aAAa;GACb,SAAS;GACT,QAAQ;IAAE,UAAU;IAAoB,MAAM;IAAS,OAAO;GAAU;EAC1E;EACA,uBAAuB;GACrB,OAAO,MAAM,sBAAsB;GACnC,aAAa;GACb,SAAS;GACT,QAAQ;IAAE,UAAU;IAAS,MAAM;IAAS,OAAO;GAAU;EAC/D;EACA,0BAA0B;GACxB,OAAO,MAAM,2BAA2B;GACxC,aAAa;GACb,SAAS;GACT,QAAQ;IAAE,UAAU;IAAoB,MAAM;GAAQ;EACxD;EACA,kCAAkC;GAChC,OAAO,MAAM,SAAS;GACtB,aAAa;GACb,SAAS;GACT,QAAQ;IAAE,UAAU;IAAoB,MAAM;GAAQ;EACxD;EACA,2BAA2B;GACzB,OAAO,MAAM,SAAS;GACtB,aAAa;GACb,SAAS;GACT,QAAQ;IAAE,UAAU;IAAoB,MAAM;GAAQ;EACxD;EACA,yBAAyB;GACvB,OAAO,MAAM,2BAA2B;GACxC,aAAa;GACb,SAAS;GACT,QAAQ;IAAE,UAAU;IAAS,MAAM;GAAQ;EAC7C;CACF;AACF,CAAC"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { Density } from "../../tokens/density.js";
|
|
2
|
+
import { WrapperRootDOMProps } from "../../utils/root-props.js";
|
|
3
|
+
import { BadgeProps } from "../badge/Badge.js";
|
|
4
|
+
import { TabsVariant } from "./tabs-styles.js";
|
|
5
|
+
import { CSSProperties, JSX, ReactElement, ReactNode } from "react";
|
|
6
|
+
import { AriaTabListProps } from "react-aria";
|
|
7
|
+
import { Key as Key$1 } from "react-stately";
|
|
8
|
+
//#region src/components/tabs/Tabs.d.ts
|
|
9
|
+
/** Props of a {@link Tab}; the React `key` identifies it for selection. */
|
|
10
|
+
export interface TabProps {
|
|
11
|
+
/** The tab's label. Optional for icon-only tabs, which then need `aria-label`. */
|
|
12
|
+
title?: ReactNode;
|
|
13
|
+
/** Icon above (or before) the label. Hidden from assistive tech. */
|
|
14
|
+
icon?: ReactNode;
|
|
15
|
+
/** The panel shown while this tab is selected. Leave it out for tabs that only navigate. */
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
/** Plain-text label when `title` is not a string. */
|
|
18
|
+
textValue?: string;
|
|
19
|
+
/**
|
|
20
|
+
* A {@link Badge} for news in this tab (at most four characters, "+" included). It sits on
|
|
21
|
+
* a stacked icon, otherwise 4px after the label, and describes the tab to assistive tech.
|
|
22
|
+
*/
|
|
23
|
+
badge?: ReactElement<BadgeProps>;
|
|
24
|
+
/** Accessible name for the tab. Required for icon-only tabs, which have no `title`. */
|
|
25
|
+
'aria-label'?: string;
|
|
26
|
+
}
|
|
27
|
+
/** A tab in {@link Tabs} (a React Stately collection item: identify it with `key`). */
|
|
28
|
+
export declare const Tab: (props: TabProps) => JSX.Element;
|
|
29
|
+
export interface TabsClassNames {
|
|
30
|
+
/** The outer container, merged with `className`. */
|
|
31
|
+
root?: string;
|
|
32
|
+
/** The row's scrolling box around `list` (it carries the row's surface when aligned). */
|
|
33
|
+
scroller?: string;
|
|
34
|
+
/** The row of tabs (`role="tablist"`). */
|
|
35
|
+
list?: string;
|
|
36
|
+
/** Every tab. */
|
|
37
|
+
tab?: string;
|
|
38
|
+
/** Each tab's icon. */
|
|
39
|
+
icon?: string;
|
|
40
|
+
/** Each tab's label. */
|
|
41
|
+
label?: string;
|
|
42
|
+
/** The active indicator under the selected tab. */
|
|
43
|
+
indicator?: string;
|
|
44
|
+
/** The selected tab's panel. */
|
|
45
|
+
panel?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface TabsProps extends Omit<AriaTabListProps<object>, 'children' | 'orientation' | 'items' | 'isDisabled' | 'selectedKey' | 'defaultSelectedKey' | 'onSelectionChange'>, Omit<WrapperRootDOMProps, keyof AriaTabListProps<object>> {
|
|
48
|
+
/** `Tab` elements. */
|
|
49
|
+
children: ReactNode;
|
|
50
|
+
/** The selected tab's `key` (controlled). */
|
|
51
|
+
value?: Key$1 | null;
|
|
52
|
+
/** The tab selected at first, when uncontrolled. @default the first enabled tab */
|
|
53
|
+
defaultValue?: Key$1;
|
|
54
|
+
/** Called with the newly selected tab's `key`. */
|
|
55
|
+
onChange?: (key: Key$1) => void;
|
|
56
|
+
/** Disables every tab (`disabledKeys` disables some). @default false */
|
|
57
|
+
disabled?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* The keys of tabs that can't be selected. They stay focusable, so keyboard and screen reader
|
|
60
|
+
* users find them (WAI-ARIA APG).
|
|
61
|
+
*/
|
|
62
|
+
disabledKeys?: Iterable<Key$1>;
|
|
63
|
+
/**
|
|
64
|
+
* `primary` tabs sit below the top app bar and switch the page's main content;
|
|
65
|
+
* `secondary` tabs switch content within one section. @default "primary"
|
|
66
|
+
*/
|
|
67
|
+
variant?: TabsVariant;
|
|
68
|
+
/** Tabs keep their natural width (at least 90px) and the row scrolls. @default false */
|
|
69
|
+
scrollable?: boolean;
|
|
70
|
+
/** Icons above the label (64px tabs) or before it (48px). @default "top" */
|
|
71
|
+
iconPlacement?: 'top' | 'start';
|
|
72
|
+
/**
|
|
73
|
+
* Web density, `0` to `-3`, for the tab row (not the panels): each step takes 4px off the
|
|
74
|
+
* tabs (48px at 0, 36px at -3; 64px to 52px with icons above). Left out, the tabs take the
|
|
75
|
+
* density of the nearest `ThemeProvider` or `ThemeScope`. M3 asks for density to be the
|
|
76
|
+
* reader's choice rather than a default, so prefer setting it there, from a setting.
|
|
77
|
+
* @default 0
|
|
78
|
+
*/
|
|
79
|
+
density?: Density;
|
|
80
|
+
/**
|
|
81
|
+
* Fixed tabs: `stretch` fills the row; `start` and `center` make every tab as wide as
|
|
82
|
+
* the widest and place the group at the leading edge or the centre (M3's layout for wide
|
|
83
|
+
* windows). Ignored when `scrollable`. @default "stretch"
|
|
84
|
+
*/
|
|
85
|
+
align?: 'stretch' | 'start' | 'center';
|
|
86
|
+
/**
|
|
87
|
+
* A horizontal swipe on the panel selects the next or previous tab (mirrored in RTL), as
|
|
88
|
+
* M3 tabs do. Vertical gestures still scroll. Avoid it when the panel holds swipeable
|
|
89
|
+
* content such as a map or a carousel. @default false
|
|
90
|
+
*/
|
|
91
|
+
swipeable?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* `manual`: the arrow keys move focus and Space / Enter selects the focused tab, the M3
|
|
94
|
+
* keyboard pattern. `automatic` selects on focus. @default "manual"
|
|
95
|
+
*/
|
|
96
|
+
keyboardActivation?: 'manual' | 'automatic';
|
|
97
|
+
/** Classes for the root element, merged with `classNames.root`; consumer classes win. */
|
|
98
|
+
className?: string;
|
|
99
|
+
/** Inline styles for the root element. */
|
|
100
|
+
style?: CSSProperties;
|
|
101
|
+
/** Classes for each part, by slot. */
|
|
102
|
+
classNames?: TabsClassNames;
|
|
103
|
+
/** Ref to the root `<div>` element. */
|
|
104
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* M3 tabs: a row of tabs with an indicator that slides to the selection, and the selected
|
|
108
|
+
* tab's panel. Primary tabs mark the selection with a content-width indicator and
|
|
109
|
+
* `primary` label; secondary tabs with a full-width indicator. Arrow keys move focus
|
|
110
|
+
* between tabs (mirrored in RTL), Home / End jump to the ends, and Space / Enter selects.
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* <Tabs aria-label="Trip">
|
|
114
|
+
* <Tab key="flights" title="Flights" icon={<FlightIcon />}>Flight details…</Tab>
|
|
115
|
+
* <Tab key="hotels" title="Hotels" icon={<HotelIcon />}>Hotel details…</Tab>
|
|
116
|
+
* </Tabs>
|
|
117
|
+
*/
|
|
118
|
+
export declare function Tabs(props: TabsProps): JSX.Element;
|
|
119
|
+
//#endregion
|
|
120
|
+
//# sourceMappingURL=Tabs.d.ts.map
|