@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,55 @@
|
|
|
1
|
+
import { CSSProperties, HTMLAttributes, InputHTMLAttributes, LabelHTMLAttributes, ReactNode, Ref } from "react";
|
|
2
|
+
//#region src/primitives/SelectionControl.d.ts
|
|
3
|
+
export interface SelectionControlClassNames {
|
|
4
|
+
/** The root `<label>` that holds the control and its label text. */
|
|
5
|
+
root?: string;
|
|
6
|
+
/** The 40px control that carries the state layer and holds the indicator. */
|
|
7
|
+
control?: string;
|
|
8
|
+
/** The label text beside the control. */
|
|
9
|
+
label?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface SelectionControlProps {
|
|
12
|
+
/** Props from the React Aria hook (`labelProps`, merged with hover handling). */
|
|
13
|
+
rootProps: LabelHTMLAttributes<HTMLLabelElement>;
|
|
14
|
+
/** Props from the React Aria hook (`inputProps`, merged with focus handling). */
|
|
15
|
+
inputProps: InputHTMLAttributes<HTMLInputElement>;
|
|
16
|
+
inputRef: Ref<HTMLInputElement>;
|
|
17
|
+
/** State attributes, set on both the root and the control. */
|
|
18
|
+
state: Record<`data-${string}`, true | undefined>;
|
|
19
|
+
/**
|
|
20
|
+
* The consumer's DOM attributes for the root (`data-*`, `aria-*`, `title`, pointer events:
|
|
21
|
+
* `splitRootProps`), merged before `rootProps`, so handlers chain.
|
|
22
|
+
*/
|
|
23
|
+
rootData?: Record<string, unknown>;
|
|
24
|
+
/** The drawn indicator (box, ring, track), hidden from assistive tech. */
|
|
25
|
+
indicator: ReactNode;
|
|
26
|
+
children?: ReactNode;
|
|
27
|
+
ref?: Ref<HTMLLabelElement>;
|
|
28
|
+
className?: string;
|
|
29
|
+
/** The recipe's slots, so its classes and the base classes merge in one place. */
|
|
30
|
+
styles?: {
|
|
31
|
+
root: (props?: {
|
|
32
|
+
class?: string;
|
|
33
|
+
}) => string;
|
|
34
|
+
control: (props?: {
|
|
35
|
+
class?: string;
|
|
36
|
+
}) => string;
|
|
37
|
+
label: (props?: {
|
|
38
|
+
class?: string;
|
|
39
|
+
}) => string;
|
|
40
|
+
};
|
|
41
|
+
classNames?: SelectionControlClassNames;
|
|
42
|
+
style?: CSSProperties;
|
|
43
|
+
/** Inline style for the control (e.g. CSS variables that position a switch thumb). */
|
|
44
|
+
controlStyle?: CSSProperties;
|
|
45
|
+
/** Extra props for the control (e.g. a switch's drag handlers). */
|
|
46
|
+
controlProps?: HTMLAttributes<HTMLSpanElement>;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Shared structure of checkboxes, radio buttons and switches: a root `<label>` holding a
|
|
50
|
+
* visually hidden native input, the 40px state-layer control with a 48px touch target,
|
|
51
|
+
* the indicator and the label text.
|
|
52
|
+
*/
|
|
53
|
+
export declare function SelectionControl({ rootProps, inputProps, inputRef, state, rootData, indicator, children, ref, className, styles, classNames, style, controlStyle, controlProps }: SelectionControlProps): import("react").JSX.Element;
|
|
54
|
+
//#endregion
|
|
55
|
+
//# sourceMappingURL=SelectionControl.d.ts.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../utils/cn.js";
|
|
3
|
+
import { restartRipple } from "./use-m3-interaction.js";
|
|
4
|
+
import { TouchTarget } from "./TouchTarget.js";
|
|
5
|
+
import { preventHiddenInputScroll } from "./hidden-input-focus.js";
|
|
6
|
+
import { selectionControlStyles } from "./selection-control-styles.js";
|
|
7
|
+
import { useMemo } from "react";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { VisuallyHidden, mergeProps, mergeRefs } from "react-aria";
|
|
10
|
+
//#region src/primitives/SelectionControl.tsx
|
|
11
|
+
/**
|
|
12
|
+
* Shared structure of checkboxes, radio buttons and switches: a root `<label>` holding a
|
|
13
|
+
* visually hidden native input, the 40px state-layer control with a 48px touch target,
|
|
14
|
+
* the indicator and the label text.
|
|
15
|
+
*/
|
|
16
|
+
function SelectionControl({ rootProps, inputProps, inputRef, state, rootData, indicator, children, ref, className, styles = selectionControlStyles(), classNames, style, controlStyle, controlProps }) {
|
|
17
|
+
const hiddenInputRef = useMemo(() => mergeRefs(inputRef, preventHiddenInputScroll), [inputRef]);
|
|
18
|
+
const restart = (label) => {
|
|
19
|
+
const control = label.querySelector("[data-selection-control]");
|
|
20
|
+
if (control) restartRipple(control);
|
|
21
|
+
};
|
|
22
|
+
return /* @__PURE__ */ jsxs("label", {
|
|
23
|
+
...mergeProps(rootData, rootProps, {
|
|
24
|
+
onPointerDown: (event) => {
|
|
25
|
+
if (event.button === 0) restart(event.currentTarget);
|
|
26
|
+
},
|
|
27
|
+
onKeyDown: (event) => {
|
|
28
|
+
if (event.key === " ") restart(event.currentTarget);
|
|
29
|
+
}
|
|
30
|
+
}),
|
|
31
|
+
...state,
|
|
32
|
+
ref,
|
|
33
|
+
style,
|
|
34
|
+
className: styles.root({ class: cn(classNames?.root, className) }),
|
|
35
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
36
|
+
...controlProps,
|
|
37
|
+
...state,
|
|
38
|
+
"data-selection-control": "",
|
|
39
|
+
style: controlStyle,
|
|
40
|
+
className: styles.control({ class: classNames?.control }),
|
|
41
|
+
children: [
|
|
42
|
+
/* @__PURE__ */ jsx(VisuallyHidden, { children: /* @__PURE__ */ jsx("input", {
|
|
43
|
+
...inputProps,
|
|
44
|
+
ref: hiddenInputRef
|
|
45
|
+
}) }),
|
|
46
|
+
/* @__PURE__ */ jsx(TouchTarget, {}),
|
|
47
|
+
indicator
|
|
48
|
+
]
|
|
49
|
+
}), children !== void 0 && children !== null && /* @__PURE__ */ jsx("span", {
|
|
50
|
+
className: styles.label({ class: classNames?.label }),
|
|
51
|
+
children
|
|
52
|
+
})]
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
//#endregion
|
|
56
|
+
export { SelectionControl };
|
|
57
|
+
|
|
58
|
+
//# sourceMappingURL=SelectionControl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectionControl.js","names":[],"sources":["../../src/primitives/SelectionControl.tsx"],"sourcesContent":["'use client';\n\nimport {\n type CSSProperties,\n type HTMLAttributes,\n type InputHTMLAttributes,\n type KeyboardEvent,\n type LabelHTMLAttributes,\n type PointerEvent,\n type ReactNode,\n type Ref,\n useMemo,\n} from 'react';\nimport { mergeProps, mergeRefs, VisuallyHidden } from 'react-aria';\nimport { cn } from '../utils/cn';\nimport { preventHiddenInputScroll } from './hidden-input-focus';\nimport { selectionControlStyles } from './selection-control-styles';\nimport { TouchTarget } from './TouchTarget';\nimport { restartRipple } from './use-m3-interaction';\n\nexport interface SelectionControlClassNames {\n /** The root `<label>` that holds the control and its label text. */\n root?: string;\n /** The 40px control that carries the state layer and holds the indicator. */\n control?: string;\n /** The label text beside the control. */\n label?: string;\n}\n\nexport interface SelectionControlProps {\n /** Props from the React Aria hook (`labelProps`, merged with hover handling). */\n rootProps: LabelHTMLAttributes<HTMLLabelElement>;\n /** Props from the React Aria hook (`inputProps`, merged with focus handling). */\n inputProps: InputHTMLAttributes<HTMLInputElement>;\n inputRef: Ref<HTMLInputElement>;\n /** State attributes, set on both the root and the control. */\n state: Record<`data-${string}`, true | undefined>;\n /**\n * The consumer's DOM attributes for the root (`data-*`, `aria-*`, `title`, pointer events:\n * `splitRootProps`), merged before `rootProps`, so handlers chain.\n */\n rootData?: Record<string, unknown>;\n /** The drawn indicator (box, ring, track), hidden from assistive tech. */\n indicator: ReactNode;\n children?: ReactNode;\n ref?: Ref<HTMLLabelElement>;\n className?: string;\n /** The recipe's slots, so its classes and the base classes merge in one place. */\n styles?: {\n root: (props?: { class?: string }) => string;\n control: (props?: { class?: string }) => string;\n label: (props?: { class?: string }) => string;\n };\n classNames?: SelectionControlClassNames;\n style?: CSSProperties;\n /** Inline style for the control (e.g. CSS variables that position a switch thumb). */\n controlStyle?: CSSProperties;\n /** Extra props for the control (e.g. a switch's drag handlers). */\n controlProps?: HTMLAttributes<HTMLSpanElement>;\n}\n\n/**\n * Shared structure of checkboxes, radio buttons and switches: a root `<label>` holding a\n * visually hidden native input, the 40px state-layer control with a 48px touch target,\n * the indicator and the label text.\n */\nexport function SelectionControl({\n rootProps,\n inputProps,\n inputRef,\n state,\n rootData,\n indicator,\n children,\n ref,\n className,\n styles = selectionControlStyles(),\n classNames,\n style,\n controlStyle,\n controlProps,\n}: SelectionControlProps) {\n const hiddenInputRef = useMemo(() => mergeRefs(inputRef, preventHiddenInputScroll), [inputRef]);\n // Every press starts a fresh (centred) ripple on the control, as in Compose.\n const restart = (label: HTMLElement) => {\n const control = label.querySelector<HTMLElement>('[data-selection-control]');\n if (control) restartRipple(control);\n };\n const rippleProps = {\n onPointerDown: (event: PointerEvent<HTMLElement>) => {\n if (event.button === 0) restart(event.currentTarget);\n },\n onKeyDown: (event: KeyboardEvent<HTMLElement>) => {\n if (event.key === ' ') restart(event.currentTarget);\n },\n };\n return (\n <label\n {...mergeProps(rootData, rootProps, rippleProps)}\n {...state}\n ref={ref}\n style={style}\n className={styles.root({ class: cn(classNames?.root, className) })}\n >\n <span\n {...controlProps}\n {...state}\n data-selection-control=\"\"\n style={controlStyle}\n className={styles.control({ class: classNames?.control })}\n >\n <VisuallyHidden>\n <input {...inputProps} ref={hiddenInputRef} />\n </VisuallyHidden>\n <TouchTarget />\n {indicator}\n </span>\n {children !== undefined && children !== null && (\n <span className={styles.label({ class: classNames?.label })}>{children}</span>\n )}\n </label>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AAkEA,SAAgB,iBAAiB,EAC/B,WACA,YACA,UACA,OACA,UACA,WACA,UACA,KACA,WACA,SAAS,uBAAuB,GAChC,YACA,OACA,cACA,gBACwB;CACxB,MAAM,iBAAiB,cAAc,UAAU,UAAU,wBAAwB,GAAG,CAAC,QAAQ,CAAC;CAE9F,MAAM,WAAW,UAAuB;EACtC,MAAM,UAAU,MAAM,cAA2B,0BAA0B;EAC3E,IAAI,SAAS,cAAc,OAAO;CACpC;CASA,OACE,qBAAC,SAAD;EACE,GAAI,WAAW,UAAU,WAAW;GATtC,gBAAgB,UAAqC;IACnD,IAAI,MAAM,WAAW,GAAG,QAAQ,MAAM,aAAa;GACrD;GACA,YAAY,UAAsC;IAChD,IAAI,MAAM,QAAQ,KAAK,QAAQ,MAAM,aAAa;GACpD;EAIgD,CAAC;EAC/C,GAAI;EACC;EACE;EACP,WAAW,OAAO,KAAK,EAAE,OAAO,GAAG,YAAY,MAAM,SAAS,EAAE,CAAC;EALnE,UAAA,CAOE,qBAAC,QAAD;GACE,GAAI;GACJ,GAAI;GACJ,0BAAuB;GACvB,OAAO;GACP,WAAW,OAAO,QAAQ,EAAE,OAAO,YAAY,QAAQ,CAAC;GAL1D,UAAA;IAOE,oBAAC,gBAAD,EAAA,UACE,oBAAC,SAAD;KAAO,GAAI;KAAY,KAAK;IAAiB,CAAA,EAC/B,CAAA;IAChB,oBAAC,aAAD,CAAc,CAAA;IACb;GACG;EACL,CAAA,GAAA,aAAa,KAAA,KAAa,aAAa,QACtC,oBAAC,QAAD;GAAM,WAAW,OAAO,MAAM,EAAE,OAAO,YAAY,MAAM,CAAC;GAAI;EAAe,CAAA,CAE1E;;AAEX"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { VariantProps } from "../utils/tv.js";
|
|
2
|
+
import { ComponentPropsWithRef } from "react";
|
|
3
|
+
//#region src/primitives/Surface.d.ts
|
|
4
|
+
/** Variant definitions for {@link Surface}; extend them to add your own containers. */
|
|
5
|
+
export declare const surfaceStyles: import("tailwind-variants").TVReturnType<{
|
|
6
|
+
container: {
|
|
7
|
+
surface: "bg-surface text-on-surface";
|
|
8
|
+
'surface-dim': "bg-surface-dim text-on-surface";
|
|
9
|
+
'surface-bright': "bg-surface-bright text-on-surface";
|
|
10
|
+
'surface-container-lowest': "bg-surface-container-lowest text-on-surface";
|
|
11
|
+
'surface-container-low': "bg-surface-container-low text-on-surface";
|
|
12
|
+
'surface-container': "bg-surface-container text-on-surface";
|
|
13
|
+
'surface-container-high': "bg-surface-container-high text-on-surface";
|
|
14
|
+
'surface-container-highest': "bg-surface-container-highest text-on-surface";
|
|
15
|
+
'inverse-surface': "bg-inverse-surface text-inverse-on-surface";
|
|
16
|
+
'primary-container': "bg-primary-container text-on-primary-container";
|
|
17
|
+
'secondary-container': "bg-secondary-container text-on-secondary-container";
|
|
18
|
+
'tertiary-container': "bg-tertiary-container text-on-tertiary-container";
|
|
19
|
+
'error-container': "bg-error-container text-on-error-container";
|
|
20
|
+
};
|
|
21
|
+
elevation: {
|
|
22
|
+
0: "shadow-elevation-0";
|
|
23
|
+
1: "shadow-elevation-1";
|
|
24
|
+
2: "shadow-elevation-2";
|
|
25
|
+
3: "shadow-elevation-3";
|
|
26
|
+
4: "shadow-elevation-4";
|
|
27
|
+
5: "shadow-elevation-5";
|
|
28
|
+
};
|
|
29
|
+
shape: {
|
|
30
|
+
none: "rounded-corner-none";
|
|
31
|
+
'extra-small': "rounded-corner-extra-small";
|
|
32
|
+
small: "rounded-corner-small";
|
|
33
|
+
medium: "rounded-corner-medium";
|
|
34
|
+
large: "rounded-corner-large";
|
|
35
|
+
'large-increased': "rounded-corner-large-increased";
|
|
36
|
+
'extra-large': "rounded-corner-extra-large";
|
|
37
|
+
'extra-large-increased': "rounded-corner-extra-large-increased";
|
|
38
|
+
'extra-extra-large': "rounded-corner-extra-extra-large";
|
|
39
|
+
full: "rounded-corner-full";
|
|
40
|
+
};
|
|
41
|
+
}, undefined, undefined, {
|
|
42
|
+
container: {
|
|
43
|
+
surface: "bg-surface text-on-surface";
|
|
44
|
+
'surface-dim': "bg-surface-dim text-on-surface";
|
|
45
|
+
'surface-bright': "bg-surface-bright text-on-surface";
|
|
46
|
+
'surface-container-lowest': "bg-surface-container-lowest text-on-surface";
|
|
47
|
+
'surface-container-low': "bg-surface-container-low text-on-surface";
|
|
48
|
+
'surface-container': "bg-surface-container text-on-surface";
|
|
49
|
+
'surface-container-high': "bg-surface-container-high text-on-surface";
|
|
50
|
+
'surface-container-highest': "bg-surface-container-highest text-on-surface";
|
|
51
|
+
'inverse-surface': "bg-inverse-surface text-inverse-on-surface";
|
|
52
|
+
'primary-container': "bg-primary-container text-on-primary-container";
|
|
53
|
+
'secondary-container': "bg-secondary-container text-on-secondary-container";
|
|
54
|
+
'tertiary-container': "bg-tertiary-container text-on-tertiary-container";
|
|
55
|
+
'error-container': "bg-error-container text-on-error-container";
|
|
56
|
+
};
|
|
57
|
+
elevation: {
|
|
58
|
+
0: "shadow-elevation-0";
|
|
59
|
+
1: "shadow-elevation-1";
|
|
60
|
+
2: "shadow-elevation-2";
|
|
61
|
+
3: "shadow-elevation-3";
|
|
62
|
+
4: "shadow-elevation-4";
|
|
63
|
+
5: "shadow-elevation-5";
|
|
64
|
+
};
|
|
65
|
+
shape: {
|
|
66
|
+
none: "rounded-corner-none";
|
|
67
|
+
'extra-small': "rounded-corner-extra-small";
|
|
68
|
+
small: "rounded-corner-small";
|
|
69
|
+
medium: "rounded-corner-medium";
|
|
70
|
+
large: "rounded-corner-large";
|
|
71
|
+
'large-increased': "rounded-corner-large-increased";
|
|
72
|
+
'extra-large': "rounded-corner-extra-large";
|
|
73
|
+
'extra-large-increased': "rounded-corner-extra-large-increased";
|
|
74
|
+
'extra-extra-large': "rounded-corner-extra-extra-large";
|
|
75
|
+
full: "rounded-corner-full";
|
|
76
|
+
};
|
|
77
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
78
|
+
container: {
|
|
79
|
+
surface: "bg-surface text-on-surface";
|
|
80
|
+
'surface-dim': "bg-surface-dim text-on-surface";
|
|
81
|
+
'surface-bright': "bg-surface-bright text-on-surface";
|
|
82
|
+
'surface-container-lowest': "bg-surface-container-lowest text-on-surface";
|
|
83
|
+
'surface-container-low': "bg-surface-container-low text-on-surface";
|
|
84
|
+
'surface-container': "bg-surface-container text-on-surface";
|
|
85
|
+
'surface-container-high': "bg-surface-container-high text-on-surface";
|
|
86
|
+
'surface-container-highest': "bg-surface-container-highest text-on-surface";
|
|
87
|
+
'inverse-surface': "bg-inverse-surface text-inverse-on-surface";
|
|
88
|
+
'primary-container': "bg-primary-container text-on-primary-container";
|
|
89
|
+
'secondary-container': "bg-secondary-container text-on-secondary-container";
|
|
90
|
+
'tertiary-container': "bg-tertiary-container text-on-tertiary-container";
|
|
91
|
+
'error-container': "bg-error-container text-on-error-container";
|
|
92
|
+
};
|
|
93
|
+
elevation: {
|
|
94
|
+
0: "shadow-elevation-0";
|
|
95
|
+
1: "shadow-elevation-1";
|
|
96
|
+
2: "shadow-elevation-2";
|
|
97
|
+
3: "shadow-elevation-3";
|
|
98
|
+
4: "shadow-elevation-4";
|
|
99
|
+
5: "shadow-elevation-5";
|
|
100
|
+
};
|
|
101
|
+
shape: {
|
|
102
|
+
none: "rounded-corner-none";
|
|
103
|
+
'extra-small': "rounded-corner-extra-small";
|
|
104
|
+
small: "rounded-corner-small";
|
|
105
|
+
medium: "rounded-corner-medium";
|
|
106
|
+
large: "rounded-corner-large";
|
|
107
|
+
'large-increased': "rounded-corner-large-increased";
|
|
108
|
+
'extra-large': "rounded-corner-extra-large";
|
|
109
|
+
'extra-large-increased': "rounded-corner-extra-large-increased";
|
|
110
|
+
'extra-extra-large': "rounded-corner-extra-extra-large";
|
|
111
|
+
full: "rounded-corner-full";
|
|
112
|
+
};
|
|
113
|
+
}, undefined>>;
|
|
114
|
+
export type SurfaceVariants = VariantProps<typeof surfaceStyles>;
|
|
115
|
+
export interface SurfaceProps extends ComponentPropsWithRef<'div'>, SurfaceVariants {}
|
|
116
|
+
/**
|
|
117
|
+
* A themed container: an M3 surface colour role with its matching content colour,
|
|
118
|
+
* an elevation shadow and a corner shape. Layout-neutral; `className` and `style`
|
|
119
|
+
* apply to the element itself.
|
|
120
|
+
*/
|
|
121
|
+
export declare function Surface({ container, elevation, shape, className, ...props }: SurfaceProps): import("react").JSX.Element;
|
|
122
|
+
//#endregion
|
|
123
|
+
//# sourceMappingURL=Surface.d.ts.map
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { cn } from "../utils/cn.js";
|
|
2
|
+
import { tv } from "../utils/tv.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
//#region src/primitives/Surface.tsx
|
|
5
|
+
/** Variant definitions for {@link Surface}; extend them to add your own containers. */
|
|
6
|
+
const surfaceStyles = tv({
|
|
7
|
+
variants: {
|
|
8
|
+
container: {
|
|
9
|
+
surface: "bg-surface text-on-surface",
|
|
10
|
+
"surface-dim": "bg-surface-dim text-on-surface",
|
|
11
|
+
"surface-bright": "bg-surface-bright text-on-surface",
|
|
12
|
+
"surface-container-lowest": "bg-surface-container-lowest text-on-surface",
|
|
13
|
+
"surface-container-low": "bg-surface-container-low text-on-surface",
|
|
14
|
+
"surface-container": "bg-surface-container text-on-surface",
|
|
15
|
+
"surface-container-high": "bg-surface-container-high text-on-surface",
|
|
16
|
+
"surface-container-highest": "bg-surface-container-highest text-on-surface",
|
|
17
|
+
"inverse-surface": "bg-inverse-surface text-inverse-on-surface",
|
|
18
|
+
"primary-container": "bg-primary-container text-on-primary-container",
|
|
19
|
+
"secondary-container": "bg-secondary-container text-on-secondary-container",
|
|
20
|
+
"tertiary-container": "bg-tertiary-container text-on-tertiary-container",
|
|
21
|
+
"error-container": "bg-error-container text-on-error-container"
|
|
22
|
+
},
|
|
23
|
+
elevation: {
|
|
24
|
+
0: "shadow-elevation-0",
|
|
25
|
+
1: "shadow-elevation-1",
|
|
26
|
+
2: "shadow-elevation-2",
|
|
27
|
+
3: "shadow-elevation-3",
|
|
28
|
+
4: "shadow-elevation-4",
|
|
29
|
+
5: "shadow-elevation-5"
|
|
30
|
+
},
|
|
31
|
+
shape: {
|
|
32
|
+
none: "rounded-corner-none",
|
|
33
|
+
"extra-small": "rounded-corner-extra-small",
|
|
34
|
+
small: "rounded-corner-small",
|
|
35
|
+
medium: "rounded-corner-medium",
|
|
36
|
+
large: "rounded-corner-large",
|
|
37
|
+
"large-increased": "rounded-corner-large-increased",
|
|
38
|
+
"extra-large": "rounded-corner-extra-large",
|
|
39
|
+
"extra-large-increased": "rounded-corner-extra-large-increased",
|
|
40
|
+
"extra-extra-large": "rounded-corner-extra-extra-large",
|
|
41
|
+
full: "rounded-corner-full"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
defaultVariants: {
|
|
45
|
+
container: "surface",
|
|
46
|
+
elevation: 0,
|
|
47
|
+
shape: "none"
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
/**
|
|
51
|
+
* A themed container: an M3 surface colour role with its matching content colour,
|
|
52
|
+
* an elevation shadow and a corner shape. Layout-neutral; `className` and `style`
|
|
53
|
+
* apply to the element itself.
|
|
54
|
+
*/
|
|
55
|
+
function Surface({ container, elevation, shape, className, ...props }) {
|
|
56
|
+
return /* @__PURE__ */ jsx("div", {
|
|
57
|
+
...props,
|
|
58
|
+
className: cn(surfaceStyles({
|
|
59
|
+
container,
|
|
60
|
+
elevation,
|
|
61
|
+
shape
|
|
62
|
+
}), className)
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
//#endregion
|
|
66
|
+
export { Surface, surfaceStyles };
|
|
67
|
+
|
|
68
|
+
//# sourceMappingURL=Surface.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Surface.js","names":[],"sources":["../../src/primitives/Surface.tsx"],"sourcesContent":["import type { ComponentPropsWithRef } from 'react';\nimport { cn } from '../utils/cn';\nimport { tv, type VariantProps } from '../utils/tv';\n\n/** Variant definitions for {@link Surface}; extend them to add your own containers. */\nexport const surfaceStyles = tv({\n variants: {\n container: {\n surface: 'bg-surface text-on-surface',\n 'surface-dim': 'bg-surface-dim text-on-surface',\n 'surface-bright': 'bg-surface-bright text-on-surface',\n 'surface-container-lowest': 'bg-surface-container-lowest text-on-surface',\n 'surface-container-low': 'bg-surface-container-low text-on-surface',\n 'surface-container': 'bg-surface-container text-on-surface',\n 'surface-container-high': 'bg-surface-container-high text-on-surface',\n 'surface-container-highest': 'bg-surface-container-highest text-on-surface',\n 'inverse-surface': 'bg-inverse-surface text-inverse-on-surface',\n 'primary-container': 'bg-primary-container text-on-primary-container',\n 'secondary-container': 'bg-secondary-container text-on-secondary-container',\n 'tertiary-container': 'bg-tertiary-container text-on-tertiary-container',\n 'error-container': 'bg-error-container text-on-error-container',\n },\n elevation: {\n 0: 'shadow-elevation-0',\n 1: 'shadow-elevation-1',\n 2: 'shadow-elevation-2',\n 3: 'shadow-elevation-3',\n 4: 'shadow-elevation-4',\n 5: 'shadow-elevation-5',\n },\n shape: {\n none: 'rounded-corner-none',\n 'extra-small': 'rounded-corner-extra-small',\n small: 'rounded-corner-small',\n medium: 'rounded-corner-medium',\n large: 'rounded-corner-large',\n 'large-increased': 'rounded-corner-large-increased',\n 'extra-large': 'rounded-corner-extra-large',\n 'extra-large-increased': 'rounded-corner-extra-large-increased',\n 'extra-extra-large': 'rounded-corner-extra-extra-large',\n full: 'rounded-corner-full',\n },\n },\n defaultVariants: {\n container: 'surface',\n elevation: 0,\n shape: 'none',\n },\n});\n\nexport type SurfaceVariants = VariantProps<typeof surfaceStyles>;\n\nexport interface SurfaceProps extends ComponentPropsWithRef<'div'>, SurfaceVariants {}\n\n/**\n * A themed container: an M3 surface colour role with its matching content colour,\n * an elevation shadow and a corner shape. Layout-neutral; `className` and `style`\n * apply to the element itself.\n */\nexport function Surface({ container, elevation, shape, className, ...props }: SurfaceProps) {\n return (\n <div {...props} className={cn(surfaceStyles({ container, elevation, shape }), className)} />\n );\n}\n"],"mappings":";;;;;AAKA,MAAa,gBAAgB,GAAG;CAC9B,UAAU;EACR,WAAW;GACT,SAAS;GACT,eAAe;GACf,kBAAkB;GAClB,4BAA4B;GAC5B,yBAAyB;GACzB,qBAAqB;GACrB,0BAA0B;GAC1B,6BAA6B;GAC7B,mBAAmB;GACnB,qBAAqB;GACrB,uBAAuB;GACvB,sBAAsB;GACtB,mBAAmB;EACrB;EACA,WAAW;GACT,GAAG;GACH,GAAG;GACH,GAAG;GACH,GAAG;GACH,GAAG;GACH,GAAG;EACL;EACA,OAAO;GACL,MAAM;GACN,eAAe;GACf,OAAO;GACP,QAAQ;GACR,OAAO;GACP,mBAAmB;GACnB,eAAe;GACf,yBAAyB;GACzB,qBAAqB;GACrB,MAAM;EACR;CACF;CACA,iBAAiB;EACf,WAAW;EACX,WAAW;EACX,OAAO;CACT;AACF,CAAC;;;;;;AAWD,SAAgB,QAAQ,EAAE,WAAW,WAAW,OAAO,WAAW,GAAG,SAAuB;CAC1F,OACE,oBAAC,OAAD;EAAK,GAAI;EAAO,WAAW,GAAG,cAAc;GAAE;GAAW;GAAW;EAAM,CAAC,GAAG,SAAS;CAAI,CAAA;AAE/F"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createContext } from "react";
|
|
3
|
+
//#region src/primitives/ToolbarContext.ts
|
|
4
|
+
/**
|
|
5
|
+
* Set by `DockedToolbar` and `FloatingToolbar`; `null` outside a toolbar. Overlays reset
|
|
6
|
+
* it, so a menu or dialog opened from a toolbar keeps its own colours.
|
|
7
|
+
*/
|
|
8
|
+
const ToolbarContext = createContext(null);
|
|
9
|
+
//#endregion
|
|
10
|
+
export { ToolbarContext };
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=ToolbarContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToolbarContext.js","names":[],"sources":["../../src/primitives/ToolbarContext.ts"],"sourcesContent":["'use client';\n\nimport { createContext } from 'react';\n\n/** What a toolbar tells the controls inside it. */\nexport interface ToolbarContextValue {\n kind: 'docked' | 'floating';\n /** The toolbar's colour scheme; vibrant toolbars recolour their icon buttons (M3). */\n color: 'standard' | 'vibrant';\n /**\n * Whether a floating toolbar is expanded; its `ToolbarFab` shows `expandedIcon` while it\n * is. Docked toolbars leave it out.\n */\n expanded?: boolean;\n /** A floating toolbar's orientation; docked toolbars are always horizontal. */\n orientation?: 'horizontal' | 'vertical';\n}\n\n/**\n * Set by `DockedToolbar` and `FloatingToolbar`; `null` outside a toolbar. Overlays reset\n * it, so a menu or dialog opened from a toolbar keeps its own colours.\n */\nexport const ToolbarContext = createContext<ToolbarContextValue | null>(null);\n"],"mappings":";;;;;;;AAsBA,MAAa,iBAAiB,cAA0C,IAAI"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from "react";
|
|
2
|
+
//#region src/primitives/TouchTarget.d.ts
|
|
3
|
+
export interface TouchTargetProps extends Omit<ComponentPropsWithRef<'span'>, 'children'> {
|
|
4
|
+
/** Classes for the hit area, merged after its own; consumer classes win. */
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Extends the hit area of a small control to the 48×48px minimum without changing
|
|
9
|
+
* its layout. Render it inside the component's inner content wrapper (which is
|
|
10
|
+
* `relative`), never on the root, so consumer positioning of the root stays safe.
|
|
11
|
+
*/
|
|
12
|
+
export declare function TouchTarget({ className, ...props }: TouchTargetProps): import("react").JSX.Element;
|
|
13
|
+
//#endregion
|
|
14
|
+
//# sourceMappingURL=TouchTarget.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { cn } from "../utils/cn.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/primitives/TouchTarget.tsx
|
|
4
|
+
/**
|
|
5
|
+
* Extends the hit area of a small control to the 48×48px minimum without changing
|
|
6
|
+
* its layout. Render it inside the component's inner content wrapper (which is
|
|
7
|
+
* `relative`), never on the root, so consumer positioning of the root stays safe.
|
|
8
|
+
*/
|
|
9
|
+
function TouchTarget({ className, ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsx("span", {
|
|
11
|
+
"aria-hidden": "true",
|
|
12
|
+
"data-touch-target": "",
|
|
13
|
+
...props,
|
|
14
|
+
className: cn("absolute top-1/2 left-1/2 h-[48px] w-[max(100%,48px)] -translate-x-1/2 -translate-y-1/2", className)
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { TouchTarget };
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=TouchTarget.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TouchTarget.js","names":[],"sources":["../../src/primitives/TouchTarget.tsx"],"sourcesContent":["import type { ComponentPropsWithRef } from 'react';\nimport { cn } from '../utils/cn';\n\nexport interface TouchTargetProps extends Omit<ComponentPropsWithRef<'span'>, 'children'> {\n /** Classes for the hit area, merged after its own; consumer classes win. */\n className?: string;\n}\n\n/**\n * Extends the hit area of a small control to the 48×48px minimum without changing\n * its layout. Render it inside the component's inner content wrapper (which is\n * `relative`), never on the root, so consumer positioning of the root stays safe.\n */\nexport function TouchTarget({ className, ...props }: TouchTargetProps) {\n return (\n <span\n aria-hidden=\"true\"\n data-touch-target=\"\"\n {...props}\n className={cn(\n 'absolute top-1/2 left-1/2 h-[48px] w-[max(100%,48px)] -translate-x-1/2 -translate-y-1/2',\n className,\n )}\n />\n );\n}\n"],"mappings":";;;;;;;;AAaA,SAAgB,YAAY,EAAE,WAAW,GAAG,SAA2B;CACrE,OACE,oBAAC,QAAD;EACE,eAAY;EACZ,qBAAkB;EAClB,GAAI;EACJ,WAAW,GACT,2FACA,SACF;CACD,CAAA;AAEL"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { DOMAttributes, Ref } from "react";
|
|
2
|
+
import { PressEvent } from "react-aria";
|
|
3
|
+
//#region src/primitives/TriggerContext.d.ts
|
|
4
|
+
/** Props an overlay trigger (dialog, menu) gives the button that opens it. */
|
|
5
|
+
export interface TriggerContextValue extends DOMAttributes<HTMLElement> {
|
|
6
|
+
onPress?: (event: PressEvent) => void;
|
|
7
|
+
/** Menus open on press start. */
|
|
8
|
+
onPressStart?: (event: PressEvent) => void;
|
|
9
|
+
/** Menu triggers keep focus where it is on press (React Aria `useMenuTrigger`). */
|
|
10
|
+
preventFocusOnPress?: boolean;
|
|
11
|
+
'aria-haspopup'?: boolean | 'dialog' | 'menu' | 'listbox' | 'tree' | 'grid' | 'true' | 'false';
|
|
12
|
+
'aria-expanded'?: boolean;
|
|
13
|
+
'aria-controls'?: string;
|
|
14
|
+
/** Set by `MenuTrigger` while its menu is open: the state layer keeps a pressed layer. */
|
|
15
|
+
'data-menu-open'?: true;
|
|
16
|
+
id?: string;
|
|
17
|
+
/** The trigger element, e.g. for positioning a menu next to it. */
|
|
18
|
+
ref?: Ref<HTMLElement>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Lets an overlay trigger wire up whichever button-like child opens it (Button,
|
|
22
|
+
* IconButton, Fab, a pressable Card) without cloning elements: `ButtonBase` merges these
|
|
23
|
+
* props into its own. Overlays reset it to `null` so buttons inside them are unaffected.
|
|
24
|
+
*/
|
|
25
|
+
export declare const TriggerContext: import("react").Context<TriggerContextValue | null>;
|
|
26
|
+
/**
|
|
27
|
+
* The value a trigger gives its button: its own props merged into an enclosing trigger's,
|
|
28
|
+
* so triggers nest (a `TooltipTrigger` around a `MenuTrigger`, or the other way round)
|
|
29
|
+
* and the button gets both. Handlers are chained, refs merged and ids kept in sync (React
|
|
30
|
+
* Aria `mergeProps`); for other props the inner trigger wins.
|
|
31
|
+
*/
|
|
32
|
+
export declare function useTriggerProps(own: TriggerContextValue): TriggerContextValue;
|
|
33
|
+
//#endregion
|
|
34
|
+
//# sourceMappingURL=TriggerContext.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createContext, useContext } from "react";
|
|
3
|
+
import { mergeProps } from "react-aria";
|
|
4
|
+
//#region src/primitives/TriggerContext.ts
|
|
5
|
+
/**
|
|
6
|
+
* Lets an overlay trigger wire up whichever button-like child opens it (Button,
|
|
7
|
+
* IconButton, Fab, a pressable Card) without cloning elements: `ButtonBase` merges these
|
|
8
|
+
* props into its own. Overlays reset it to `null` so buttons inside them are unaffected.
|
|
9
|
+
*/
|
|
10
|
+
const TriggerContext = createContext(null);
|
|
11
|
+
/**
|
|
12
|
+
* The value a trigger gives its button: its own props merged into an enclosing trigger's,
|
|
13
|
+
* so triggers nest (a `TooltipTrigger` around a `MenuTrigger`, or the other way round)
|
|
14
|
+
* and the button gets both. Handlers are chained, refs merged and ids kept in sync (React
|
|
15
|
+
* Aria `mergeProps`); for other props the inner trigger wins.
|
|
16
|
+
*/
|
|
17
|
+
function useTriggerProps(own) {
|
|
18
|
+
const outer = useContext(TriggerContext);
|
|
19
|
+
return outer ? mergeProps(outer, own) : own;
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { TriggerContext, useTriggerProps };
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=TriggerContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TriggerContext.js","names":[],"sources":["../../src/primitives/TriggerContext.ts"],"sourcesContent":["'use client';\n\nimport { createContext, useContext, type DOMAttributes, type Ref } from 'react';\nimport { mergeProps, type PressEvent } from 'react-aria';\n\n/** Props an overlay trigger (dialog, menu) gives the button that opens it. */\nexport interface TriggerContextValue extends DOMAttributes<HTMLElement> {\n onPress?: (event: PressEvent) => void;\n /** Menus open on press start. */\n onPressStart?: (event: PressEvent) => void;\n /** Menu triggers keep focus where it is on press (React Aria `useMenuTrigger`). */\n preventFocusOnPress?: boolean;\n 'aria-haspopup'?: boolean | 'dialog' | 'menu' | 'listbox' | 'tree' | 'grid' | 'true' | 'false';\n 'aria-expanded'?: boolean;\n 'aria-controls'?: string;\n /** Set by `MenuTrigger` while its menu is open: the state layer keeps a pressed layer. */\n 'data-menu-open'?: true;\n id?: string;\n /** The trigger element, e.g. for positioning a menu next to it. */\n ref?: Ref<HTMLElement>;\n}\n\n/**\n * Lets an overlay trigger wire up whichever button-like child opens it (Button,\n * IconButton, Fab, a pressable Card) without cloning elements: `ButtonBase` merges these\n * props into its own. Overlays reset it to `null` so buttons inside them are unaffected.\n */\nexport const TriggerContext = createContext<TriggerContextValue | null>(null);\n\n/**\n * The value a trigger gives its button: its own props merged into an enclosing trigger's,\n * so triggers nest (a `TooltipTrigger` around a `MenuTrigger`, or the other way round)\n * and the button gets both. Handlers are chained, refs merged and ids kept in sync (React\n * Aria `mergeProps`); for other props the inner trigger wins.\n */\nexport function useTriggerProps(own: TriggerContextValue): TriggerContextValue {\n const outer = useContext(TriggerContext);\n return outer ? (mergeProps(outer, own) as TriggerContextValue) : own;\n}\n"],"mappings":";;;;;;;;;AA2BA,MAAa,iBAAiB,cAA0C,IAAI;;;;;;;AAQ5E,SAAgB,gBAAgB,KAA+C;CAC7E,MAAM,QAAQ,WAAW,cAAc;CACvC,OAAO,QAAS,WAAW,OAAO,GAAG,IAA4B;AACnE"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//#region src/primitives/hidden-input-focus.ts
|
|
2
|
+
/**
|
|
3
|
+
* Ref callback for the visually hidden native input of a checkbox, radio button or switch
|
|
4
|
+
* (the controls and the list items that draw them). React Aria focuses that input with a
|
|
5
|
+
* plain `focus()` when its label is pressed, and the browser then scrolls the 1px input
|
|
6
|
+
* into view: when a tap lands on the visible part of a control whose centre is above the
|
|
7
|
+
* window, the page jumped by hundreds of pixels to centre an invisible pixel. The input's
|
|
8
|
+
* `focus()` now defaults to `preventScroll: true` (a caller can still pass
|
|
9
|
+
* `{ preventScroll: false }`); Tab focus is the browser's own and still scrolls into view.
|
|
10
|
+
*/
|
|
11
|
+
function preventHiddenInputScroll(input) {
|
|
12
|
+
if (!input || Object.prototype.hasOwnProperty.call(input, "focus")) return;
|
|
13
|
+
Object.defineProperty(input, "focus", {
|
|
14
|
+
configurable: true,
|
|
15
|
+
writable: true,
|
|
16
|
+
value: (options) => {
|
|
17
|
+
Object.getPrototypeOf(input).focus.call(input, {
|
|
18
|
+
preventScroll: true,
|
|
19
|
+
...options
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { preventHiddenInputScroll };
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=hidden-input-focus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hidden-input-focus.js","names":[],"sources":["../../src/primitives/hidden-input-focus.ts"],"sourcesContent":["/**\n * Ref callback for the visually hidden native input of a checkbox, radio button or switch\n * (the controls and the list items that draw them). React Aria focuses that input with a\n * plain `focus()` when its label is pressed, and the browser then scrolls the 1px input\n * into view: when a tap lands on the visible part of a control whose centre is above the\n * window, the page jumped by hundreds of pixels to centre an invisible pixel. The input's\n * `focus()` now defaults to `preventScroll: true` (a caller can still pass\n * `{ preventScroll: false }`); Tab focus is the browser's own and still scrolls into view.\n */\nexport function preventHiddenInputScroll(input: HTMLInputElement | null): void {\n if (!input || Object.prototype.hasOwnProperty.call(input, 'focus')) return;\n // The element's own property, defined rather than assigned: test tooling can turn the\n // prototype's `focus` into an accessor whose setter would replace it for every element.\n // The prototype's current `focus` is looked up on each call, so wrappers installed later\n // (React Aria's, while an overlay is open) still run.\n Object.defineProperty(input, 'focus', {\n configurable: true,\n writable: true,\n value: (options?: FocusOptions) => {\n const focus = (Object.getPrototypeOf(input) as HTMLElement).focus;\n focus.call(input, { preventScroll: true, ...options });\n },\n });\n}\n"],"mappings":";;;;;;;;;;AASA,SAAgB,yBAAyB,OAAsC;CAC7E,IAAI,CAAC,SAAS,OAAO,UAAU,eAAe,KAAK,OAAO,OAAO,GAAG;CAKpE,OAAO,eAAe,OAAO,SAAS;EACpC,cAAc;EACd,UAAU;EACV,QAAQ,YAA2B;GAEjC,OADsB,eAAe,KAAK,CAAC,CAAiB,MACtD,KAAK,OAAO;IAAE,eAAe;IAAM,GAAG;GAAQ,CAAC;EACvD;CACF,CAAC;AACH"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/primitives/icon-faces-styles.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* How a two-icon button hands over between its icons: `swap` at the midpoint of the morph
|
|
4
|
+
* (the M3 spec), or `rotate`, a rotating crossfade (beyond the M3 spec; Google's Expressive
|
|
5
|
+
* showcase motion).
|
|
6
|
+
*/
|
|
7
|
+
export type IconTransition = 'swap' | 'rotate';
|
|
8
|
+
//#endregion
|
|
9
|
+
//# sourceMappingURL=icon-faces-styles.d.ts.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { tv } from "../utils/tv.js";
|
|
2
|
+
//#region src/primitives/icon-faces-styles.ts
|
|
3
|
+
const iconFacesStyles = tv({
|
|
4
|
+
slots: {
|
|
5
|
+
cell: "inline-grid place-items-center",
|
|
6
|
+
face: "col-start-1 row-start-1 inline-flex size-full items-center justify-center [&>svg]:size-full"
|
|
7
|
+
},
|
|
8
|
+
variants: {
|
|
9
|
+
transition: {
|
|
10
|
+
swap: { face: [
|
|
11
|
+
"invisible data-active:visible",
|
|
12
|
+
"[transition-property:visibility] [transition-duration:0s]",
|
|
13
|
+
"[transition-delay:calc(var(--md-sys-motion-spring-spatial-fast-duration)/2)] motion-reduce:[transition-delay:0s]"
|
|
14
|
+
] },
|
|
15
|
+
rotate: { face: [
|
|
16
|
+
"opacity-0 data-active:opacity-100",
|
|
17
|
+
"[transition-property:rotate,opacity]",
|
|
18
|
+
"[transition-duration:var(--md-sys-motion-spring-spatial-fast-duration),var(--md-sys-motion-spring-effects-fast-duration)]",
|
|
19
|
+
"[transition-timing-function:var(--md-sys-motion-spring-spatial-fast-easing),var(--md-sys-motion-spring-effects-fast-easing)]"
|
|
20
|
+
] }
|
|
21
|
+
},
|
|
22
|
+
/** `primary`: the resting icon; `alternate`: the open (or expanded) icon. */
|
|
23
|
+
face: {
|
|
24
|
+
primary: {},
|
|
25
|
+
alternate: {}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
compoundVariants: [{
|
|
29
|
+
transition: "rotate",
|
|
30
|
+
face: "primary",
|
|
31
|
+
class: { face: "motion-safe:not-data-active:ltr:-rotate-90 motion-safe:not-data-active:rtl:rotate-90" }
|
|
32
|
+
}, {
|
|
33
|
+
transition: "rotate",
|
|
34
|
+
face: "alternate",
|
|
35
|
+
class: { face: "motion-safe:not-data-active:ltr:rotate-90 motion-safe:not-data-active:rtl:-rotate-90" }
|
|
36
|
+
}],
|
|
37
|
+
defaultVariants: {
|
|
38
|
+
transition: "swap",
|
|
39
|
+
face: "primary"
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
//#endregion
|
|
43
|
+
export { iconFacesStyles };
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=icon-faces-styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon-faces-styles.js","names":[],"sources":["../../src/primitives/icon-faces-styles.ts"],"sourcesContent":["import { tv } from '../utils/tv';\n\n/*\n * Two icons sharing one grid cell, one of them shown: a FAB menu's add / close icons, or a\n * toolbar FAB's collapsed / expanded icons. The shown face has `data-active`.\n *\n * - `swap` (the M3 spec and Compose): the faces hand over halfway through the button's fast\n * spatial morph (Compose swaps at progress 0.5), through a `visibility` switch delayed by\n * half that spring; reduced motion swaps at once.\n * - `rotate` (an extension beyond the M3 spec, matching Google's Expressive showcase\n * motion): the outgoing face turns 90° in the direction of the change and fades out while\n * the incoming one turns in from the other side and fades in, counter-clockwise when\n * opening in LTR. Rotation is on the fast spatial spring, opacity on the fast effects\n * spring. It uses the CSS `rotate` property on the faces (never the component's root),\n * so Tailwind transforms still compose; the turn mirrors in RTL, and reduced motion keeps only the crossfade (`motion-safe:`).\n *\n * The cell itself is the component's icon slot; add `cell` to make it a grid. Every class\n * is written out in full so Tailwind can find it.\n */\nexport const iconFacesStyles = tv({\n slots: {\n cell: 'inline-grid place-items-center',\n face: 'col-start-1 row-start-1 inline-flex size-full items-center justify-center [&>svg]:size-full',\n },\n variants: {\n transition: {\n swap: {\n face: [\n 'invisible data-active:visible',\n '[transition-property:visibility] [transition-duration:0s]',\n '[transition-delay:calc(var(--md-sys-motion-spring-spatial-fast-duration)/2)] motion-reduce:[transition-delay:0s]',\n ],\n },\n rotate: {\n face: [\n 'opacity-0 data-active:opacity-100',\n '[transition-property:rotate,opacity]',\n '[transition-duration:var(--md-sys-motion-spring-spatial-fast-duration),var(--md-sys-motion-spring-effects-fast-duration)]',\n '[transition-timing-function:var(--md-sys-motion-spring-spatial-fast-easing),var(--md-sys-motion-spring-effects-fast-easing)]',\n ],\n },\n },\n /** `primary`: the resting icon; `alternate`: the open (or expanded) icon. */\n face: { primary: {}, alternate: {} },\n },\n compoundVariants: [\n // Leaving, the resting icon turns onwards (counter-clockwise in LTR, as the showcase\n // does); the alternate icon waits a quarter turn behind, so both turn the same way on\n // the way in and back on the way out.\n // The shown face has no rotation at all, so reduced motion leaves nothing to animate.\n {\n transition: 'rotate',\n face: 'primary',\n class: {\n face: 'motion-safe:not-data-active:ltr:-rotate-90 motion-safe:not-data-active:rtl:rotate-90',\n },\n },\n {\n transition: 'rotate',\n face: 'alternate',\n class: {\n face: 'motion-safe:not-data-active:ltr:rotate-90 motion-safe:not-data-active:rtl:-rotate-90',\n },\n },\n ],\n defaultVariants: { transition: 'swap', face: 'primary' },\n});\n\n/**\n * How a two-icon button hands over between its icons: `swap` at the midpoint of the morph\n * (the M3 spec), or `rotate`, a rotating crossfade (beyond the M3 spec; Google's Expressive\n * showcase motion).\n */\nexport type IconTransition = 'swap' | 'rotate';\n"],"mappings":";;AAmBA,MAAa,kBAAkB,GAAG;CAChC,OAAO;EACL,MAAM;EACN,MAAM;CACR;CACA,UAAU;EACR,YAAY;GACV,MAAM,EACJ,MAAM;IACJ;IACA;IACA;GACF,EACF;GACA,QAAQ,EACN,MAAM;IACJ;IACA;IACA;IACA;GACF,EACF;EACF;;EAEA,MAAM;GAAE,SAAS,CAAC;GAAG,WAAW,CAAC;EAAE;CACrC;CACA,kBAAkB,CAKhB;EACE,YAAY;EACZ,MAAM;EACN,OAAO,EACL,MAAM,uFACR;CACF,GACA;EACE,YAAY;EACZ,MAAM;EACN,OAAO,EACL,MAAM,uFACR;CACF,CACF;CACA,iBAAiB;EAAE,YAAY;EAAQ,MAAM;CAAU;AACzD,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/primitives/locale-with-direction.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* The locale with the given direction, keeping its language and region so dates and
|
|
4
|
+
* numbers still format the same: only the script changes (`en-US` → `en-Arab-US` for RTL,
|
|
5
|
+
* `ar` → `ar-Latn` for LTR), which React Aria's `isRTL` reads.
|
|
6
|
+
*/
|
|
7
|
+
export declare function localeWithDirection(locale: string, direction: 'ltr' | 'rtl'): string;
|
|
8
|
+
//#endregion
|
|
9
|
+
//# sourceMappingURL=locale-with-direction.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region src/primitives/locale-with-direction.ts
|
|
2
|
+
/**
|
|
3
|
+
* The locale with the given direction, keeping its language and region so dates and
|
|
4
|
+
* numbers still format the same: only the script changes (`en-US` → `en-Arab-US` for RTL,
|
|
5
|
+
* `ar` → `ar-Latn` for LTR), which React Aria's `isRTL` reads.
|
|
6
|
+
*/
|
|
7
|
+
function localeWithDirection(locale, direction) {
|
|
8
|
+
try {
|
|
9
|
+
return new Intl.Locale(locale, { script: direction === "rtl" ? "Arab" : "Latn" }).toString();
|
|
10
|
+
} catch {
|
|
11
|
+
return direction === "rtl" ? "ar" : "en-US";
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { localeWithDirection };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=locale-with-direction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locale-with-direction.js","names":[],"sources":["../../src/primitives/locale-with-direction.ts"],"sourcesContent":["/**\n * The locale with the given direction, keeping its language and region so dates and\n * numbers still format the same: only the script changes (`en-US` → `en-Arab-US` for RTL,\n * `ar` → `ar-Latn` for LTR), which React Aria's `isRTL` reads.\n */\nexport function localeWithDirection(locale: string, direction: 'ltr' | 'rtl'): string {\n try {\n return new Intl.Locale(locale, { script: direction === 'rtl' ? 'Arab' : 'Latn' }).toString();\n } catch {\n return direction === 'rtl' ? 'ar' : 'en-US';\n }\n}\n"],"mappings":";;;;;;AAKA,SAAgB,oBAAoB,QAAgB,WAAkC;CACpF,IAAI;EACF,OAAO,IAAI,KAAK,OAAO,QAAQ,EAAE,QAAQ,cAAc,QAAQ,SAAS,OAAO,CAAC,CAAC,CAAC,SAAS;CAC7F,QAAQ;EACN,OAAO,cAAc,QAAQ,OAAO;CACtC;AACF"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { RoundedPolygon } from "../shapes/rounded-polygon.js";
|
|
2
|
+
import { MaterialShapeName } from "../shapes/generated/material-shape-paths.js";
|
|
3
|
+
import { Morph } from "../shapes/morph.js";
|
|
4
|
+
//#region src/primitives/morph-path.d.ts
|
|
5
|
+
export type MorphShape = RoundedPolygon | MaterialShapeName;
|
|
6
|
+
export interface M3MorphOptions {
|
|
7
|
+
/**
|
|
8
|
+
* Scales the unit-square shapes, e.g. to the SVG `viewBox` size. Default 1. Mid-morph
|
|
9
|
+
* control points can poke up to ~1% outside the square, so give the `<svg>`
|
|
10
|
+
* `overflow="visible"` or a little padding.
|
|
11
|
+
*/
|
|
12
|
+
size?: number;
|
|
13
|
+
/** Rotates each frame so its first point sits at this angle (degrees). Default 0. */
|
|
14
|
+
startAngle?: number;
|
|
15
|
+
}
|
|
16
|
+
/** The (cached) morph between two shapes. */
|
|
17
|
+
export declare function getMorph(from: RoundedPolygon, to: RoundedPolygon): Morph;
|
|
18
|
+
/**
|
|
19
|
+
* SVG path data for `shapes` at `progress`, where 0 is the first shape, 1 the second and so
|
|
20
|
+
* on. Values outside `[0, n - 1]` extrapolate the first or last morph, so springs can
|
|
21
|
+
* overshoot.
|
|
22
|
+
*/
|
|
23
|
+
export declare function morphPathAt(shapes: readonly MorphShape[], progress: number, { size, startAngle }?: M3MorphOptions): string;
|
|
24
|
+
//#endregion
|
|
25
|
+
//# sourceMappingURL=morph-path.d.ts.map
|