@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,209 @@
|
|
|
1
|
+
import { tv } from "../../utils/tv.js";
|
|
2
|
+
//#region src/components/text-field/text-field-styles.ts
|
|
3
|
+
const geometryTransition = "[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-spatial-fast-duration),var(--md-sys-motion-spring-effects-fast-duration),var(--md-sys-motion-spring-effects-fast-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-spatial-fast-easing),var(--md-sys-motion-spring-effects-fast-easing),var(--md-sys-motion-spring-effects-fast-easing)]";
|
|
4
|
+
const colourAndSizeTransition = "[transition-duration:var(--md-sys-motion-spring-effects-fast-duration),var(--md-sys-motion-spring-spatial-fast-duration)] [transition-timing-function:var(--md-sys-motion-spring-effects-fast-easing),var(--md-sys-motion-spring-spatial-fast-easing)]";
|
|
5
|
+
const spatialTransition = "[transition-duration:var(--md-sys-motion-spring-spatial-fast-duration)] [transition-timing-function:var(--md-sys-motion-spring-spatial-fast-easing)]";
|
|
6
|
+
const effectsTransition = "[transition-duration:var(--md-sys-motion-spring-effects-fast-duration)] [transition-timing-function:var(--md-sys-motion-spring-effects-fast-easing)]";
|
|
7
|
+
/** Variant definitions for {@link TextField}. */
|
|
8
|
+
const textFieldStyles = tv({
|
|
9
|
+
slots: {
|
|
10
|
+
root: "group/field inline-flex w-[280px] max-w-full flex-col align-top text-start",
|
|
11
|
+
container: [
|
|
12
|
+
"relative flex min-h-[calc(56px+var(--md-sys-density,0)*4px)] cursor-text items-stretch",
|
|
13
|
+
"before:absolute before:inset-x-0 before:bottom-full before:h-[max(0px,calc(-4px-var(--md-sys-density,0)*2px))] before:content-['']",
|
|
14
|
+
"after:absolute after:inset-x-0 after:top-full after:h-[max(0px,calc(-4px-var(--md-sys-density,0)*2px))] after:content-['']",
|
|
15
|
+
"bg-[var(--_md-comp-text-field-container-color)]"
|
|
16
|
+
],
|
|
17
|
+
outline: [
|
|
18
|
+
"pointer-events-none absolute inset-x-0 bottom-0 m-0 min-w-0 px-[12px]",
|
|
19
|
+
"rounded-[var(--_md-comp-text-field-container-shape)] border border-solid",
|
|
20
|
+
"border-[color:var(--_md-comp-text-field-outline-color)]",
|
|
21
|
+
"[transition-property:border-color,border-width]",
|
|
22
|
+
effectsTransition,
|
|
23
|
+
"group-data-[field-state=hover]/field:border-[color:var(--_md-comp-text-field-hover-outline-color)]",
|
|
24
|
+
"group-data-[field-state=focus]/field:border-2",
|
|
25
|
+
"group-data-[field-state=focus]/field:border-[color:var(--_md-comp-text-field-focus-outline-color)]",
|
|
26
|
+
"group-data-[field-state=error]/field:border-error",
|
|
27
|
+
"group-data-[field-state=error-hover]/field:border-on-error-container",
|
|
28
|
+
"group-data-[field-state=error-focus]/field:border-2 group-data-[field-state=error-focus]/field:border-error",
|
|
29
|
+
"group-data-[field-state=disabled]/field:border-on-surface/12"
|
|
30
|
+
],
|
|
31
|
+
notch: [
|
|
32
|
+
"invisible grid h-[16px] grid-cols-[0fr] p-0 text-body-small whitespace-nowrap",
|
|
33
|
+
"transition-[grid-template-columns]",
|
|
34
|
+
spatialTransition,
|
|
35
|
+
"group-data-floated/field:grid-cols-[1fr] group-has-[:autofill]/field:grid-cols-[1fr]"
|
|
36
|
+
],
|
|
37
|
+
notchClip: "min-w-0 overflow-hidden",
|
|
38
|
+
notchText: "inline-block px-[4px]",
|
|
39
|
+
indicator: [
|
|
40
|
+
"pointer-events-none absolute inset-x-0 bottom-0 h-px",
|
|
41
|
+
"bg-[var(--_md-comp-text-field-active-indicator-color)]",
|
|
42
|
+
"[transition-property:background-color,height]",
|
|
43
|
+
colourAndSizeTransition,
|
|
44
|
+
"group-data-[field-state=hover]/field:bg-on-surface",
|
|
45
|
+
"group-data-[field-state=focus]/field:h-[2px]",
|
|
46
|
+
"group-data-[field-state=focus]/field:bg-[var(--_md-comp-text-field-focus-active-indicator-color)]",
|
|
47
|
+
"group-data-[field-state=error]/field:bg-error",
|
|
48
|
+
"group-data-[field-state=error-hover]/field:bg-on-error-container",
|
|
49
|
+
"group-data-[field-state=error-focus]/field:h-[2px] group-data-[field-state=error-focus]/field:bg-error",
|
|
50
|
+
"group-data-[field-state=disabled]/field:bg-on-surface/38",
|
|
51
|
+
"forced-colors:bg-[CanvasText]! forced-colors:forced-color-adjust-none",
|
|
52
|
+
"forced-colors:group-data-[field-state=focus]/field:bg-[Highlight]! forced-colors:group-data-[field-state=error-focus]/field:bg-[Highlight]!",
|
|
53
|
+
"forced-colors:group-data-[field-state=disabled]/field:bg-[GrayText]!"
|
|
54
|
+
],
|
|
55
|
+
label: [
|
|
56
|
+
"pointer-events-none absolute top-[calc(16px+var(--md-sys-density,0)*2px)] max-w-[calc(100%-32px)] truncate",
|
|
57
|
+
"text-body-large text-[color:var(--_md-comp-text-field-label-text-color)]",
|
|
58
|
+
"[transition-property:top,inset-inline-start,font-size,line-height,letter-spacing,color,opacity]",
|
|
59
|
+
geometryTransition,
|
|
60
|
+
"group-data-[field-state=focus]/field:text-[color:var(--_md-comp-text-field-focus-label-text-color)]",
|
|
61
|
+
"group-data-[field-state=error]/field:text-error",
|
|
62
|
+
"group-data-[field-state=error-hover]/field:text-on-error-container",
|
|
63
|
+
"group-data-[field-state=error-focus]/field:text-error",
|
|
64
|
+
"group-data-[field-state=disabled]/field:text-on-surface/38"
|
|
65
|
+
],
|
|
66
|
+
icon: [
|
|
67
|
+
"flex h-[min(48px,calc(56px+var(--md-sys-density,0)*4px))] w-[48px] shrink-0 items-center justify-center self-center",
|
|
68
|
+
"[&_:not([data-density])]:[--md-sys-density:0]",
|
|
69
|
+
"[&>svg]:size-[24px]",
|
|
70
|
+
"group-data-[field-state=disabled]/field:text-on-surface/38"
|
|
71
|
+
],
|
|
72
|
+
leadingIcon: "text-[color:var(--_md-comp-text-field-leading-icon-color)]",
|
|
73
|
+
trailingIcon: [
|
|
74
|
+
"text-[color:var(--_md-comp-text-field-trailing-icon-color)]",
|
|
75
|
+
"group-data-[field-state=error]/field:text-error",
|
|
76
|
+
"group-data-[field-state=error-focus]/field:text-error",
|
|
77
|
+
"group-data-[field-state=error-hover]/field:text-on-error-container"
|
|
78
|
+
],
|
|
79
|
+
field: "flex min-w-0 flex-1 items-center",
|
|
80
|
+
input: [
|
|
81
|
+
"min-w-0 flex-1 bg-transparent p-0 text-body-large outline-none",
|
|
82
|
+
"text-[color:var(--_md-comp-text-field-input-text-color)] caret-[color:var(--_md-comp-text-field-caret-color)]",
|
|
83
|
+
"placeholder:text-on-surface-variant placeholder:opacity-100",
|
|
84
|
+
"disabled:cursor-default group-data-[field-state=disabled]/field:text-on-surface/38",
|
|
85
|
+
"group-data-invalid/field:caret-error",
|
|
86
|
+
"resize-none"
|
|
87
|
+
],
|
|
88
|
+
affix: ["text-body-large text-on-surface-variant whitespace-nowrap", "group-data-[field-state=disabled]/field:text-on-surface/38"],
|
|
89
|
+
prefix: "pe-[2px]",
|
|
90
|
+
suffix: "ps-[2px]",
|
|
91
|
+
supporting: "flex gap-[16px] px-[16px] pt-[4px]",
|
|
92
|
+
supportingTextColor: "text-[color:var(--_md-comp-text-field-supporting-text-color)]",
|
|
93
|
+
supportingText: [
|
|
94
|
+
"min-w-0 flex-1",
|
|
95
|
+
"group-data-[field-state=error]/field:text-error",
|
|
96
|
+
"group-data-[field-state=error-hover]/field:text-error",
|
|
97
|
+
"group-data-[field-state=error-focus]/field:text-error",
|
|
98
|
+
"group-data-[field-state=disabled]/field:text-on-surface/38"
|
|
99
|
+
],
|
|
100
|
+
counter: [
|
|
101
|
+
"ms-auto",
|
|
102
|
+
"group-data-[field-state=error]/field:text-error",
|
|
103
|
+
"group-data-[field-state=error-hover]/field:text-error",
|
|
104
|
+
"group-data-[field-state=error-focus]/field:text-error",
|
|
105
|
+
"group-data-[field-state=disabled]/field:text-on-surface/38"
|
|
106
|
+
],
|
|
107
|
+
errorIcon: "[&>svg]:size-[24px]",
|
|
108
|
+
required: "text-inherit"
|
|
109
|
+
},
|
|
110
|
+
variants: {
|
|
111
|
+
variant: {
|
|
112
|
+
filled: {
|
|
113
|
+
container: ["rounded-t-[var(--_md-comp-text-field-container-shape)]", "group-data-[field-state=disabled]/field:bg-on-surface/4"],
|
|
114
|
+
outline: "hidden"
|
|
115
|
+
},
|
|
116
|
+
outlined: {
|
|
117
|
+
container: "rounded-[var(--_md-comp-text-field-container-shape)]",
|
|
118
|
+
indicator: "hidden",
|
|
119
|
+
label: "group-data-[field-state=hover]/field:text-on-surface"
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
hasLabel: {
|
|
123
|
+
true: { outline: "-top-[8px]" },
|
|
124
|
+
false: { outline: "top-0" }
|
|
125
|
+
},
|
|
126
|
+
hasLeadingIcon: {
|
|
127
|
+
true: {
|
|
128
|
+
field: "ps-[4px]",
|
|
129
|
+
label: "start-[52px]"
|
|
130
|
+
},
|
|
131
|
+
false: {
|
|
132
|
+
field: "ps-[16px]",
|
|
133
|
+
label: "start-[16px]"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
hasTrailingIcon: {
|
|
137
|
+
true: { field: "pe-[4px]" },
|
|
138
|
+
false: { field: "pe-[16px]" }
|
|
139
|
+
},
|
|
140
|
+
multiline: {
|
|
141
|
+
true: {
|
|
142
|
+
field: "items-start",
|
|
143
|
+
input: "block"
|
|
144
|
+
},
|
|
145
|
+
false: {}
|
|
146
|
+
},
|
|
147
|
+
fixedHeight: {
|
|
148
|
+
true: { input: "overflow-y-auto" },
|
|
149
|
+
false: {}
|
|
150
|
+
},
|
|
151
|
+
supportingTextOnFocus: {
|
|
152
|
+
true: { supportingText: ["opacity-0 transition-opacity group-data-focused/field:opacity-100", effectsTransition] },
|
|
153
|
+
false: {}
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
compoundVariants: [
|
|
157
|
+
{
|
|
158
|
+
variant: "filled",
|
|
159
|
+
hasLabel: true,
|
|
160
|
+
class: {
|
|
161
|
+
container: "[--m3-field-label-room:clamp(0,calc((var(--md-sys-density,0)+1.5)*100),1)]",
|
|
162
|
+
field: ["pt-[calc(16px+var(--md-sys-density,0)*2px+8px*var(--m3-field-label-room))]", "pb-[calc(16px+var(--md-sys-density,0)*2px-8px*var(--m3-field-label-room))]"]
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
variant: "filled",
|
|
167
|
+
hasLabel: false,
|
|
168
|
+
class: { field: "py-[calc(16px+var(--md-sys-density,0)*2px)]" }
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
variant: "outlined",
|
|
172
|
+
class: { field: "py-[calc(16px+var(--md-sys-density,0)*2px)]" }
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
variant: "filled",
|
|
176
|
+
hasLabel: true,
|
|
177
|
+
class: { label: [
|
|
178
|
+
"group-data-floated/field:top-[calc(8px+var(--md-sys-density,0)*2px)] group-data-floated/field:text-body-small",
|
|
179
|
+
"group-has-[:autofill]/field:top-[calc(8px+var(--md-sys-density,0)*2px)] group-has-[:autofill]/field:text-body-small",
|
|
180
|
+
"group-data-floated/field:opacity-[var(--m3-field-label-room)] group-has-[:autofill]/field:opacity-[var(--m3-field-label-room)]"
|
|
181
|
+
] }
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
variant: "outlined",
|
|
185
|
+
hasLabel: true,
|
|
186
|
+
class: { label: ["group-data-floated/field:top-[-8px] group-data-floated/field:start-[16px] group-data-floated/field:text-body-small", "group-has-[:autofill]/field:top-[-8px] group-has-[:autofill]/field:start-[16px] group-has-[:autofill]/field:text-body-small"] }
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
hasLabel: true,
|
|
190
|
+
class: {
|
|
191
|
+
input: ["placeholder:opacity-0 group-data-floated/field:placeholder:opacity-100", "placeholder:transition-opacity placeholder:[transition-duration:var(--md-sys-motion-spring-effects-fast-duration)] placeholder:[transition-timing-function:var(--md-sys-motion-spring-effects-fast-easing)]"],
|
|
192
|
+
affix: ["opacity-0 transition-opacity group-data-floated/field:opacity-100 group-has-[:autofill]/field:opacity-100", effectsTransition]
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
],
|
|
196
|
+
defaultVariants: {
|
|
197
|
+
variant: "filled",
|
|
198
|
+
hasLabel: true,
|
|
199
|
+
hasLeadingIcon: false,
|
|
200
|
+
hasTrailingIcon: false,
|
|
201
|
+
multiline: false,
|
|
202
|
+
fixedHeight: false,
|
|
203
|
+
supportingTextOnFocus: false
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
//#endregion
|
|
207
|
+
export { textFieldStyles };
|
|
208
|
+
|
|
209
|
+
//# sourceMappingURL=text-field-styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-field-styles.js","names":[],"sources":["../../../src/components/text-field/text-field-styles.ts"],"sourcesContent":["import { tv, type VariantProps } from '../../utils/tv';\n\n/*\n * Values follow Compose Material 3 (TextField.kt, OutlinedTextField.kt,\n * internal/TextFieldImpl.kt and the Filled/OutlinedTextFieldTokens files):\n * 56px minimum height, 16px horizontal padding (4px next to a 48px icon box), 8px\n * vertical padding with a label, 4px above supporting text, 2px around prefix/suffix,\n * a 4px gap around the outlined label notch, label float on the fast spatial spring.\n *\n * Web density (`--md-sys-density`, 0 to -3; M3: \"decreases the top and bottom padding\"): each\n * step takes 4px off the container (56 → 52 → 48 → 44px), 2px from the padding above and below\n * the value, and moves the resting and the filled field's floated label up 2px, so they stay\n * centred and clear of the value. The icon boxes are at most as tall as the container (the\n * 48px touch targets of icon buttons in them extend past it), and at -3 the container's\n * `::before` / `::after` add 2px of hit area above and below, so pressing within 48px of its\n * centre still focuses the field.\n *\n * Colours depend on one mutually exclusive `data-field-state` on the root\n * (disabled > error-focus > error-hover > error > focus > hover > rest), so part styles\n * never compete.\n *\n * The resting container colour and shape, outline and indicator colours, the focused and\n * hovered outline, the focused indicator and label, and the label, input, caret, supporting\n * text and icon colours come from the text field's component tokens (`text-field-tokens.ts`,\n * `--md-comp-<variant>-text-field-*`); the root carries `data-tokens=\"md-comp-text-field\"`\n * and `data-variant`. A consumer class (`classNames.label`, …) still wins in `cn()`. Every\n * class is written out in full so Tailwind can find it.\n */\n\n// The label's top, start, font size, line height and letter spacing on the fast spatial\n// spring; its colour and opacity on the fast effects spring.\nconst geometryTransition =\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-spatial-fast-duration),var(--md-sys-motion-spring-effects-fast-duration),var(--md-sys-motion-spring-effects-fast-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-spatial-fast-easing),var(--md-sys-motion-spring-effects-fast-easing),var(--md-sys-motion-spring-effects-fast-easing)]';\n\n/*\n * Colour on the fast effects spring, size on the fast spatial spring (Compose animates the\n * indicator thickness on FastSpatial and its colour on FastEffects).\n */\nconst colourAndSizeTransition =\n '[transition-duration:var(--md-sys-motion-spring-effects-fast-duration),var(--md-sys-motion-spring-spatial-fast-duration)] [transition-timing-function:var(--md-sys-motion-spring-effects-fast-easing),var(--md-sys-motion-spring-spatial-fast-easing)]';\n\nconst spatialTransition =\n '[transition-duration:var(--md-sys-motion-spring-spatial-fast-duration)] [transition-timing-function:var(--md-sys-motion-spring-spatial-fast-easing)]';\n\nconst effectsTransition =\n '[transition-duration:var(--md-sys-motion-spring-effects-fast-duration)] [transition-timing-function:var(--md-sys-motion-spring-effects-fast-easing)]';\n\n/** Variant definitions for {@link TextField}. */\nexport const textFieldStyles = tv({\n slots: {\n root: 'group/field inline-flex w-[280px] max-w-full flex-col align-top text-start',\n // Library-owned inner wrapper: positions the label, outline and indicator.\n container: [\n 'relative flex min-h-[calc(56px+var(--md-sys-density,0)*4px)] cursor-text items-stretch',\n // Dense fields keep a 48px hit area: at -3 (44px) 2px more above and below.\n \"before:absolute before:inset-x-0 before:bottom-full before:h-[max(0px,calc(-4px-var(--md-sys-density,0)*2px))] before:content-['']\",\n \"after:absolute after:inset-x-0 after:top-full after:h-[max(0px,calc(-4px-var(--md-sys-density,0)*2px))] after:content-['']\",\n 'bg-[var(--_md-comp-text-field-container-color)]',\n ],\n outline: [\n 'pointer-events-none absolute inset-x-0 bottom-0 m-0 min-w-0 px-[12px]',\n 'rounded-[var(--_md-comp-text-field-container-shape)] border border-solid',\n 'border-[color:var(--_md-comp-text-field-outline-color)]',\n // Colour and width both on the fast effects spring. Compose animates the width on\n // FastSpatial, but a browser draws a border in whole device pixels, so a width that\n // overshoots 2px and settles back draws 2 → 1 → 2px. The effects spring never\n // overshoots, so the width only grows (and never dips below 1px on the way back).\n // The filled indicator keeps the spatial spring: its `height` draws fractions.\n '[transition-property:border-color,border-width]',\n effectsTransition,\n 'group-data-[field-state=hover]/field:border-[color:var(--_md-comp-text-field-hover-outline-color)]',\n 'group-data-[field-state=focus]/field:border-2',\n 'group-data-[field-state=focus]/field:border-[color:var(--_md-comp-text-field-focus-outline-color)]',\n 'group-data-[field-state=error]/field:border-error',\n 'group-data-[field-state=error-hover]/field:border-on-error-container',\n 'group-data-[field-state=error-focus]/field:border-2 group-data-[field-state=error-focus]/field:border-error',\n 'group-data-[field-state=disabled]/field:border-on-surface/12',\n ],\n // Hidden text the width of the floated label: cuts the notch in the outline. It opens\n // from 0fr to 1fr of the label's own width on the label's spring, so the gap keeps pace\n // with the label as it moves up.\n notch: [\n 'invisible grid h-[16px] grid-cols-[0fr] p-0 text-body-small whitespace-nowrap',\n 'transition-[grid-template-columns]',\n spatialTransition,\n 'group-data-floated/field:grid-cols-[1fr] group-has-[:autofill]/field:grid-cols-[1fr]',\n ],\n notchClip: 'min-w-0 overflow-hidden',\n notchText: 'inline-block px-[4px]',\n indicator: [\n 'pointer-events-none absolute inset-x-0 bottom-0 h-px',\n 'bg-[var(--_md-comp-text-field-active-indicator-color)]',\n '[transition-property:background-color,height]',\n colourAndSizeTransition,\n 'group-data-[field-state=hover]/field:bg-on-surface',\n 'group-data-[field-state=focus]/field:h-[2px]',\n 'group-data-[field-state=focus]/field:bg-[var(--_md-comp-text-field-focus-active-indicator-color)]',\n 'group-data-[field-state=error]/field:bg-error',\n 'group-data-[field-state=error-hover]/field:bg-on-error-container',\n 'group-data-[field-state=error-focus]/field:h-[2px] group-data-[field-state=error-focus]/field:bg-error',\n 'group-data-[field-state=disabled]/field:bg-on-surface/38',\n // Forced colours paint backgrounds as Canvas, which hid the filled field's only edge:\n // the line takes system colours instead (2026-10-15).\n 'forced-colors:bg-[CanvasText]! forced-colors:forced-color-adjust-none',\n 'forced-colors:group-data-[field-state=focus]/field:bg-[Highlight]! forced-colors:group-data-[field-state=error-focus]/field:bg-[Highlight]!',\n 'forced-colors:group-data-[field-state=disabled]/field:bg-[GrayText]!',\n ],\n label: [\n 'pointer-events-none absolute top-[calc(16px+var(--md-sys-density,0)*2px)] max-w-[calc(100%-32px)] truncate',\n 'text-body-large text-[color:var(--_md-comp-text-field-label-text-color)]',\n '[transition-property:top,inset-inline-start,font-size,line-height,letter-spacing,color,opacity]',\n geometryTransition,\n 'group-data-[field-state=focus]/field:text-[color:var(--_md-comp-text-field-focus-label-text-color)]',\n 'group-data-[field-state=error]/field:text-error',\n 'group-data-[field-state=error-hover]/field:text-on-error-container',\n 'group-data-[field-state=error-focus]/field:text-error',\n 'group-data-[field-state=disabled]/field:text-on-surface/38',\n ],\n icon: [\n 'flex h-[min(48px,calc(56px+var(--md-sys-density,0)*4px))] w-[48px] shrink-0 items-center justify-center self-center',\n // Icon buttons here keep their size at every density: the box is a fixed 48px column\n // that density only shortens. One with its own `density` still follows it.\n '[&_:not([data-density])]:[--md-sys-density:0]',\n '[&>svg]:size-[24px]',\n 'group-data-[field-state=disabled]/field:text-on-surface/38',\n ],\n leadingIcon: 'text-[color:var(--_md-comp-text-field-leading-icon-color)]',\n trailingIcon: [\n 'text-[color:var(--_md-comp-text-field-trailing-icon-color)]',\n 'group-data-[field-state=error]/field:text-error',\n 'group-data-[field-state=error-focus]/field:text-error',\n 'group-data-[field-state=error-hover]/field:text-on-error-container',\n ],\n field: 'flex min-w-0 flex-1 items-center',\n input: [\n 'min-w-0 flex-1 bg-transparent p-0 text-body-large outline-none',\n 'text-[color:var(--_md-comp-text-field-input-text-color)] caret-[color:var(--_md-comp-text-field-caret-color)]',\n 'placeholder:text-on-surface-variant placeholder:opacity-100',\n 'disabled:cursor-default group-data-[field-state=disabled]/field:text-on-surface/38',\n 'group-data-invalid/field:caret-error',\n 'resize-none',\n ],\n affix: [\n 'text-body-large text-on-surface-variant whitespace-nowrap',\n 'group-data-[field-state=disabled]/field:text-on-surface/38',\n ],\n prefix: 'pe-[2px]',\n suffix: 'ps-[2px]',\n supporting: 'flex gap-[16px] px-[16px] pt-[4px]',\n // The supporting text's resting colour; the error message keeps its own.\n supportingTextColor: 'text-[color:var(--_md-comp-text-field-supporting-text-color)]',\n // Error colour whenever the field is invalid, with or without a message (Compose's\n // `ErrorSupportingColor`), so the supporting text reads as the error's explanation.\n supportingText: [\n 'min-w-0 flex-1',\n 'group-data-[field-state=error]/field:text-error',\n 'group-data-[field-state=error-hover]/field:text-error',\n 'group-data-[field-state=error-focus]/field:text-error',\n 'group-data-[field-state=disabled]/field:text-on-surface/38',\n ],\n counter: [\n 'ms-auto',\n 'group-data-[field-state=error]/field:text-error',\n 'group-data-[field-state=error-hover]/field:text-error',\n 'group-data-[field-state=error-focus]/field:text-error',\n 'group-data-[field-state=disabled]/field:text-on-surface/38',\n ],\n // The built-in error icon's own box; the trailing slot colours it.\n errorIcon: '[&>svg]:size-[24px]',\n required: 'text-inherit',\n },\n variants: {\n variant: {\n filled: {\n container: [\n 'rounded-t-[var(--_md-comp-text-field-container-shape)]',\n 'group-data-[field-state=disabled]/field:bg-on-surface/4',\n ],\n outline: 'hidden',\n },\n outlined: {\n container: 'rounded-[var(--_md-comp-text-field-container-shape)]',\n indicator: 'hidden',\n // OutlinedTextFieldTokens.HoverLabelColor (filled keeps on-surface-variant).\n label: 'group-data-[field-state=hover]/field:text-on-surface',\n },\n },\n // With a label the outline starts 8px higher, so its border runs through the middle of\n // the 16px notch legend and lands on the container's top edge.\n hasLabel: { true: { outline: '-top-[8px]' }, false: { outline: 'top-0' } },\n hasLeadingIcon: {\n true: { field: 'ps-[4px]', label: 'start-[52px]' },\n false: { field: 'ps-[16px]', label: 'start-[16px]' },\n },\n hasTrailingIcon: {\n true: { field: 'pe-[4px]' },\n false: { field: 'pe-[16px]' },\n },\n multiline: {\n true: { field: 'items-start', input: 'block' },\n false: {},\n },\n // A text area keeps its height and scrolls (M3: \"a fixed height and scroll vertically\").\n fixedHeight: {\n true: { input: 'overflow-y-auto' },\n false: {},\n },\n // M3: supporting text can be \"visible only on focus\". It keeps its space, so nothing\n // jumps, and stays in the accessible description.\n supportingTextOnFocus: {\n true: {\n supportingText: [\n 'opacity-0 transition-opacity group-data-focused/field:opacity-100',\n effectsTransition,\n ],\n },\n false: {},\n },\n },\n compoundVariants: [\n /*\n * Input padding: filled fields with a label leave room above for the floated label.\n * Below 52px (density -2 and -3) there is no room for it: as MDC's text field\n * (`$minimum-height-for-filled-label: 52px`), the floated label is hidden and the value\n * is centred like a field without a label. The resting label still shows in the empty\n * field, and still names the input. `--m3-field-label-room` is 1 down to density -1\n * and 0 from -2 (a clamped step of the density, so CSS alone switches the layout).\n */\n {\n variant: 'filled',\n hasLabel: true,\n class: {\n container: '[--m3-field-label-room:clamp(0,calc((var(--md-sys-density,0)+1.5)*100),1)]',\n field: [\n 'pt-[calc(16px+var(--md-sys-density,0)*2px+8px*var(--m3-field-label-room))]',\n 'pb-[calc(16px+var(--md-sys-density,0)*2px-8px*var(--m3-field-label-room))]',\n ],\n },\n },\n {\n variant: 'filled',\n hasLabel: false,\n class: { field: 'py-[calc(16px+var(--md-sys-density,0)*2px)]' },\n },\n { variant: 'outlined', class: { field: 'py-[calc(16px+var(--md-sys-density,0)*2px)]' } },\n // Floated label: filled → 8px from the top (less 2px per density step); outlined → centred on the border, at 16px.\n {\n variant: 'filled',\n hasLabel: true,\n class: {\n label: [\n 'group-data-floated/field:top-[calc(8px+var(--md-sys-density,0)*2px)] group-data-floated/field:text-body-small',\n 'group-has-[:autofill]/field:top-[calc(8px+var(--md-sys-density,0)*2px)] group-has-[:autofill]/field:text-body-small',\n // Hidden once floated below 52px (see the padding above).\n 'group-data-floated/field:opacity-[var(--m3-field-label-room)] group-has-[:autofill]/field:opacity-[var(--m3-field-label-room)]',\n ],\n },\n },\n {\n variant: 'outlined',\n hasLabel: true,\n class: {\n label: [\n 'group-data-floated/field:top-[-8px] group-data-floated/field:start-[16px] group-data-floated/field:text-body-small',\n 'group-has-[:autofill]/field:top-[-8px] group-has-[:autofill]/field:start-[16px] group-has-[:autofill]/field:text-body-small',\n ],\n },\n },\n // With a label, the placeholder and prefix/suffix only show once the label floats.\n {\n hasLabel: true,\n class: {\n // The placeholder fades in as the label floats (Compose fades it on FastEffects).\n input: [\n 'placeholder:opacity-0 group-data-floated/field:placeholder:opacity-100',\n 'placeholder:transition-opacity placeholder:[transition-duration:var(--md-sys-motion-spring-effects-fast-duration)] placeholder:[transition-timing-function:var(--md-sys-motion-spring-effects-fast-easing)]',\n ],\n affix: [\n 'opacity-0 transition-opacity group-data-floated/field:opacity-100 group-has-[:autofill]/field:opacity-100',\n effectsTransition,\n ],\n },\n },\n ],\n defaultVariants: {\n variant: 'filled',\n hasLabel: true,\n hasLeadingIcon: false,\n hasTrailingIcon: false,\n multiline: false,\n fixedHeight: false,\n supportingTextOnFocus: false,\n },\n});\n\n/**\n * The variants of {@link textFieldStyles}, 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 TextFieldStyleProps = VariantProps<typeof textFieldStyles>;\nexport type TextFieldVariant = NonNullable<TextFieldStyleProps['variant']>;\n"],"mappings":";;AA+BA,MAAM,qBACJ;AAMF,MAAM,0BACJ;AAEF,MAAM,oBACJ;AAEF,MAAM,oBACJ;;AAGF,MAAa,kBAAkB,GAAG;CAChC,OAAO;EACL,MAAM;EAEN,WAAW;GACT;GAEA;GACA;GACA;EACF;EACA,SAAS;GACP;GACA;GACA;GAMA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EAIA,OAAO;GACL;GACA;GACA;GACA;EACF;EACA,WAAW;EACX,WAAW;EACX,WAAW;GACT;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GAGA;GACA;GACA;EACF;EACA,OAAO;GACL;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EACA,MAAM;GACJ;GAGA;GACA;GACA;EACF;EACA,aAAa;EACb,cAAc;GACZ;GACA;GACA;GACA;EACF;EACA,OAAO;EACP,OAAO;GACL;GACA;GACA;GACA;GACA;GACA;EACF;EACA,OAAO,CACL,6DACA,4DACF;EACA,QAAQ;EACR,QAAQ;EACR,YAAY;EAEZ,qBAAqB;EAGrB,gBAAgB;GACd;GACA;GACA;GACA;GACA;EACF;EACA,SAAS;GACP;GACA;GACA;GACA;GACA;EACF;EAEA,WAAW;EACX,UAAU;CACZ;CACA,UAAU;EACR,SAAS;GACP,QAAQ;IACN,WAAW,CACT,0DACA,yDACF;IACA,SAAS;GACX;GACA,UAAU;IACR,WAAW;IACX,WAAW;IAEX,OAAO;GACT;EACF;EAGA,UAAU;GAAE,MAAM,EAAE,SAAS,aAAa;GAAG,OAAO,EAAE,SAAS,QAAQ;EAAE;EACzE,gBAAgB;GACd,MAAM;IAAE,OAAO;IAAY,OAAO;GAAe;GACjD,OAAO;IAAE,OAAO;IAAa,OAAO;GAAe;EACrD;EACA,iBAAiB;GACf,MAAM,EAAE,OAAO,WAAW;GAC1B,OAAO,EAAE,OAAO,YAAY;EAC9B;EACA,WAAW;GACT,MAAM;IAAE,OAAO;IAAe,OAAO;GAAQ;GAC7C,OAAO,CAAC;EACV;EAEA,aAAa;GACX,MAAM,EAAE,OAAO,kBAAkB;GACjC,OAAO,CAAC;EACV;EAGA,uBAAuB;GACrB,MAAM,EACJ,gBAAgB,CACd,qEACA,iBACF,EACF;GACA,OAAO,CAAC;EACV;CACF;CACA,kBAAkB;EAShB;GACE,SAAS;GACT,UAAU;GACV,OAAO;IACL,WAAW;IACX,OAAO,CACL,8EACA,4EACF;GACF;EACF;EACA;GACE,SAAS;GACT,UAAU;GACV,OAAO,EAAE,OAAO,8CAA8C;EAChE;EACA;GAAE,SAAS;GAAY,OAAO,EAAE,OAAO,8CAA8C;EAAE;EAEvF;GACE,SAAS;GACT,UAAU;GACV,OAAO,EACL,OAAO;IACL;IACA;IAEA;GACF,EACF;EACF;EACA;GACE,SAAS;GACT,UAAU;GACV,OAAO,EACL,OAAO,CACL,sHACA,6HACF,EACF;EACF;EAEA;GACE,UAAU;GACV,OAAO;IAEL,OAAO,CACL,0EACA,6MACF;IACA,OAAO,CACL,6GACA,iBACF;GACF;EACF;CACF;CACA,iBAAiB;EACf,SAAS;EACT,UAAU;EACV,gBAAgB;EAChB,iBAAiB;EACjB,WAAW;EACX,aAAa;EACb,uBAAuB;CACzB;AACF,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComponentTokenSet } from "../../tokens/component.js";
|
|
2
|
+
import "../../index.js";
|
|
3
|
+
//#region src/components/text-field/text-field-tokens.d.ts
|
|
4
|
+
/** The tokens of {@link TextField}, Select and Autocomplete: `--md-comp-<variant>-text-field-<part>`. */
|
|
5
|
+
export declare const textFieldTokenSet: ComponentTokenSet<never>;
|
|
6
|
+
//#endregion
|
|
7
|
+
//# sourceMappingURL=text-field-tokens.d.ts.map
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { color, corner, defineComponentTokens } from "../../tokens/component.js";
|
|
2
|
+
//#region src/components/text-field/text-field-tokens.ts
|
|
3
|
+
/** The tokens both variants share, written for one variant's Compose object. */
|
|
4
|
+
const contentTokens = (compose) => ({
|
|
5
|
+
"label-text-color": {
|
|
6
|
+
value: color("on-surface-variant"),
|
|
7
|
+
description: "The label.",
|
|
8
|
+
compose: `${compose}.LabelColor`,
|
|
9
|
+
paints: {
|
|
10
|
+
property: "color",
|
|
11
|
+
slot: "label"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"focus-label-text-color": {
|
|
15
|
+
value: color("primary"),
|
|
16
|
+
description: "The label while the field has focus.",
|
|
17
|
+
compose: `${compose}.FocusLabelColor`,
|
|
18
|
+
paints: {
|
|
19
|
+
property: "color",
|
|
20
|
+
slot: "label",
|
|
21
|
+
state: "focused"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"input-text-color": {
|
|
25
|
+
value: color("on-surface"),
|
|
26
|
+
description: "The text the user types.",
|
|
27
|
+
compose: `${compose}.InputColor`,
|
|
28
|
+
paints: {
|
|
29
|
+
property: "color",
|
|
30
|
+
slot: "input"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"caret-color": {
|
|
34
|
+
value: color("primary"),
|
|
35
|
+
description: "The text cursor.",
|
|
36
|
+
compose: `${compose}.CaretColor`,
|
|
37
|
+
paints: {
|
|
38
|
+
property: "caret-color",
|
|
39
|
+
slot: "input"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"supporting-text-color": {
|
|
43
|
+
value: color("on-surface-variant"),
|
|
44
|
+
description: "The supporting text below the field.",
|
|
45
|
+
compose: `${compose}.SupportingColor`,
|
|
46
|
+
paints: {
|
|
47
|
+
property: "color",
|
|
48
|
+
slot: "supporting-text"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"leading-icon-color": {
|
|
52
|
+
value: color("on-surface-variant"),
|
|
53
|
+
description: "The leading icon.",
|
|
54
|
+
compose: `${compose}.LeadingIconColor`,
|
|
55
|
+
paints: {
|
|
56
|
+
property: "color",
|
|
57
|
+
slot: "leading-icon"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"trailing-icon-color": {
|
|
61
|
+
value: color("on-surface-variant"),
|
|
62
|
+
description: "The trailing icon.",
|
|
63
|
+
compose: `${compose}.TrailingIconColor`,
|
|
64
|
+
paints: {
|
|
65
|
+
property: "color",
|
|
66
|
+
slot: "trailing-icon"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
/** The tokens of {@link TextField}, Select and Autocomplete: `--md-comp-<variant>-text-field-<part>`. */
|
|
71
|
+
const textFieldTokenSet = defineComponentTokens({
|
|
72
|
+
name: "md-comp-text-field",
|
|
73
|
+
tokens: {},
|
|
74
|
+
scopes: { variant: {
|
|
75
|
+
filled: {
|
|
76
|
+
prefix: "md-comp-filled-text-field",
|
|
77
|
+
tokens: {
|
|
78
|
+
"container-color": {
|
|
79
|
+
value: color("surface-container-highest"),
|
|
80
|
+
description: "The container.",
|
|
81
|
+
compose: "FilledTextFieldTokens.ContainerColor",
|
|
82
|
+
paints: {
|
|
83
|
+
property: "background-color",
|
|
84
|
+
slot: "container"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"container-shape": {
|
|
88
|
+
value: corner("extra-small"),
|
|
89
|
+
description: "The top corners.",
|
|
90
|
+
compose: "FilledTextFieldTokens.ContainerShape",
|
|
91
|
+
paints: {
|
|
92
|
+
property: "border-top-left-radius",
|
|
93
|
+
slot: "container"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"active-indicator-color": {
|
|
97
|
+
value: color("on-surface-variant"),
|
|
98
|
+
description: "The line along the bottom of the container.",
|
|
99
|
+
compose: "FilledTextFieldTokens.ActiveIndicatorColor",
|
|
100
|
+
paints: {
|
|
101
|
+
property: "background-color",
|
|
102
|
+
slot: "active-indicator"
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"focus-active-indicator-color": {
|
|
106
|
+
value: color("primary"),
|
|
107
|
+
description: "The bottom line while the field has focus.",
|
|
108
|
+
compose: "FilledTextFieldTokens.FocusActiveIndicatorColor",
|
|
109
|
+
paints: {
|
|
110
|
+
property: "background-color",
|
|
111
|
+
slot: "active-indicator",
|
|
112
|
+
state: "focused"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
...contentTokens("FilledTextFieldTokens")
|
|
116
|
+
},
|
|
117
|
+
fixed: {
|
|
118
|
+
"outline-color": "transparent",
|
|
119
|
+
"hover-outline-color": "transparent",
|
|
120
|
+
"focus-outline-color": "transparent"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
outlined: {
|
|
124
|
+
prefix: "md-comp-outlined-text-field",
|
|
125
|
+
tokens: {
|
|
126
|
+
"container-shape": {
|
|
127
|
+
value: corner("extra-small"),
|
|
128
|
+
description: "The corners.",
|
|
129
|
+
compose: "OutlinedTextFieldTokens.ContainerShape",
|
|
130
|
+
paints: {
|
|
131
|
+
property: "border-top-left-radius",
|
|
132
|
+
slot: "outline"
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"outline-color": {
|
|
136
|
+
value: color("outline"),
|
|
137
|
+
description: "The 1px outline.",
|
|
138
|
+
compose: "OutlinedTextFieldTokens.OutlineColor",
|
|
139
|
+
paints: {
|
|
140
|
+
property: "border-top-color",
|
|
141
|
+
slot: "outline"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"hover-outline-color": {
|
|
145
|
+
value: color("on-surface"),
|
|
146
|
+
description: "The outline under the pointer.",
|
|
147
|
+
compose: "OutlinedTextFieldTokens.HoverOutlineColor",
|
|
148
|
+
paints: {
|
|
149
|
+
property: "border-top-color",
|
|
150
|
+
slot: "outline",
|
|
151
|
+
state: "hovered"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"focus-outline-color": {
|
|
155
|
+
value: color("primary"),
|
|
156
|
+
description: "The 2px outline while the field has focus.",
|
|
157
|
+
compose: "OutlinedTextFieldTokens.FocusOutlineColor",
|
|
158
|
+
paints: {
|
|
159
|
+
property: "border-top-color",
|
|
160
|
+
slot: "outline",
|
|
161
|
+
state: "focused"
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
...contentTokens("OutlinedTextFieldTokens")
|
|
165
|
+
},
|
|
166
|
+
fixed: {
|
|
167
|
+
"container-color": "transparent",
|
|
168
|
+
"active-indicator-color": color("on-surface-variant"),
|
|
169
|
+
"focus-active-indicator-color": color("primary")
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
} }
|
|
173
|
+
});
|
|
174
|
+
//#endregion
|
|
175
|
+
export { textFieldTokenSet };
|
|
176
|
+
|
|
177
|
+
//# sourceMappingURL=text-field-tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-field-tokens.js","names":[],"sources":["../../../src/components/text-field/text-field-tokens.ts"],"sourcesContent":["import { color, corner, defineComponentTokens, type ComponentToken } from '../../tokens/component';\n\n/*\n * The text field's component tokens, M3's `md.comp.{filled,outlined}-text-field.*` names\n * (checked against m3.material.io's token tables, 2026-10-14), with Compose's\n * Filled/OutlinedTextFieldTokens defaults. Select and Autocomplete draw the same field\n * (`select/field-shell.tsx`), so they read these tokens too. The field's `data-variant` picks\n * the public names. Error, disabled and hover colours other than the outline stay classes.\n */\n\n/** The tokens both variants share, written for one variant's Compose object. */\nconst contentTokens = (compose: 'FilledTextFieldTokens' | 'OutlinedTextFieldTokens') =>\n ({\n 'label-text-color': {\n value: color('on-surface-variant'),\n description: 'The label.',\n compose: `${compose}.LabelColor`,\n paints: { property: 'color', slot: 'label' },\n },\n 'focus-label-text-color': {\n value: color('primary'),\n description: 'The label while the field has focus.',\n compose: `${compose}.FocusLabelColor`,\n paints: { property: 'color', slot: 'label', state: 'focused' },\n },\n 'input-text-color': {\n value: color('on-surface'),\n description: 'The text the user types.',\n compose: `${compose}.InputColor`,\n paints: { property: 'color', slot: 'input' },\n },\n 'caret-color': {\n value: color('primary'),\n description: 'The text cursor.',\n compose: `${compose}.CaretColor`,\n paints: { property: 'caret-color', slot: 'input' },\n },\n 'supporting-text-color': {\n value: color('on-surface-variant'),\n description: 'The supporting text below the field.',\n compose: `${compose}.SupportingColor`,\n paints: { property: 'color', slot: 'supporting-text' },\n },\n 'leading-icon-color': {\n value: color('on-surface-variant'),\n description: 'The leading icon.',\n compose: `${compose}.LeadingIconColor`,\n paints: { property: 'color', slot: 'leading-icon' },\n },\n 'trailing-icon-color': {\n value: color('on-surface-variant'),\n description: 'The trailing icon.',\n compose: `${compose}.TrailingIconColor`,\n paints: { property: 'color', slot: 'trailing-icon' },\n },\n }) satisfies Record<string, ComponentToken>;\n\n/** The tokens of {@link TextField}, Select and Autocomplete: `--md-comp-<variant>-text-field-<part>`. */\nexport const textFieldTokenSet = defineComponentTokens({\n name: 'md-comp-text-field',\n tokens: {},\n scopes: {\n variant: {\n filled: {\n prefix: 'md-comp-filled-text-field',\n tokens: {\n 'container-color': {\n value: color('surface-container-highest'),\n description: 'The container.',\n compose: 'FilledTextFieldTokens.ContainerColor',\n paints: { property: 'background-color', slot: 'container' },\n },\n 'container-shape': {\n value: corner('extra-small'),\n description: 'The top corners.',\n compose: 'FilledTextFieldTokens.ContainerShape',\n paints: { property: 'border-top-left-radius', slot: 'container' },\n },\n 'active-indicator-color': {\n value: color('on-surface-variant'),\n description: 'The line along the bottom of the container.',\n compose: 'FilledTextFieldTokens.ActiveIndicatorColor',\n paints: { property: 'background-color', slot: 'active-indicator' },\n },\n 'focus-active-indicator-color': {\n value: color('primary'),\n description: 'The bottom line while the field has focus.',\n compose: 'FilledTextFieldTokens.FocusActiveIndicatorColor',\n paints: { property: 'background-color', slot: 'active-indicator', state: 'focused' },\n },\n ...contentTokens('FilledTextFieldTokens'),\n },\n // A filled field draws no outline.\n fixed: {\n 'outline-color': 'transparent',\n 'hover-outline-color': 'transparent',\n 'focus-outline-color': 'transparent',\n },\n },\n outlined: {\n prefix: 'md-comp-outlined-text-field',\n tokens: {\n 'container-shape': {\n value: corner('extra-small'),\n description: 'The corners.',\n compose: 'OutlinedTextFieldTokens.ContainerShape',\n paints: { property: 'border-top-left-radius', slot: 'outline' },\n },\n 'outline-color': {\n value: color('outline'),\n description: 'The 1px outline.',\n compose: 'OutlinedTextFieldTokens.OutlineColor',\n paints: { property: 'border-top-color', slot: 'outline' },\n },\n 'hover-outline-color': {\n value: color('on-surface'),\n description: 'The outline under the pointer.',\n compose: 'OutlinedTextFieldTokens.HoverOutlineColor',\n paints: { property: 'border-top-color', slot: 'outline', state: 'hovered' },\n },\n 'focus-outline-color': {\n value: color('primary'),\n description: 'The 2px outline while the field has focus.',\n compose: 'OutlinedTextFieldTokens.FocusOutlineColor',\n paints: { property: 'border-top-color', slot: 'outline', state: 'focused' },\n },\n ...contentTokens('OutlinedTextFieldTokens'),\n },\n // An outlined field has no container fill, and hides the active indicator.\n fixed: {\n 'container-color': 'transparent',\n 'active-indicator-color': color('on-surface-variant'),\n 'focus-active-indicator-color': color('primary'),\n },\n },\n },\n },\n});\n"],"mappings":";;;AAWA,MAAM,iBAAiB,aACpB;CACC,oBAAoB;EAClB,OAAO,MAAM,oBAAoB;EACjC,aAAa;EACb,SAAS,GAAG,QAAQ;EACpB,QAAQ;GAAE,UAAU;GAAS,MAAM;EAAQ;CAC7C;CACA,0BAA0B;EACxB,OAAO,MAAM,SAAS;EACtB,aAAa;EACb,SAAS,GAAG,QAAQ;EACpB,QAAQ;GAAE,UAAU;GAAS,MAAM;GAAS,OAAO;EAAU;CAC/D;CACA,oBAAoB;EAClB,OAAO,MAAM,YAAY;EACzB,aAAa;EACb,SAAS,GAAG,QAAQ;EACpB,QAAQ;GAAE,UAAU;GAAS,MAAM;EAAQ;CAC7C;CACA,eAAe;EACb,OAAO,MAAM,SAAS;EACtB,aAAa;EACb,SAAS,GAAG,QAAQ;EACpB,QAAQ;GAAE,UAAU;GAAe,MAAM;EAAQ;CACnD;CACA,yBAAyB;EACvB,OAAO,MAAM,oBAAoB;EACjC,aAAa;EACb,SAAS,GAAG,QAAQ;EACpB,QAAQ;GAAE,UAAU;GAAS,MAAM;EAAkB;CACvD;CACA,sBAAsB;EACpB,OAAO,MAAM,oBAAoB;EACjC,aAAa;EACb,SAAS,GAAG,QAAQ;EACpB,QAAQ;GAAE,UAAU;GAAS,MAAM;EAAe;CACpD;CACA,uBAAuB;EACrB,OAAO,MAAM,oBAAoB;EACjC,aAAa;EACb,SAAS,GAAG,QAAQ;EACpB,QAAQ;GAAE,UAAU;GAAS,MAAM;EAAgB;CACrD;AACF;;AAGF,MAAa,oBAAoB,sBAAsB;CACrD,MAAM;CACN,QAAQ,CAAC;CACT,QAAQ,EACN,SAAS;EACP,QAAQ;GACN,QAAQ;GACR,QAAQ;IACN,mBAAmB;KACjB,OAAO,MAAM,2BAA2B;KACxC,aAAa;KACb,SAAS;KACT,QAAQ;MAAE,UAAU;MAAoB,MAAM;KAAY;IAC5D;IACA,mBAAmB;KACjB,OAAO,OAAO,aAAa;KAC3B,aAAa;KACb,SAAS;KACT,QAAQ;MAAE,UAAU;MAA0B,MAAM;KAAY;IAClE;IACA,0BAA0B;KACxB,OAAO,MAAM,oBAAoB;KACjC,aAAa;KACb,SAAS;KACT,QAAQ;MAAE,UAAU;MAAoB,MAAM;KAAmB;IACnE;IACA,gCAAgC;KAC9B,OAAO,MAAM,SAAS;KACtB,aAAa;KACb,SAAS;KACT,QAAQ;MAAE,UAAU;MAAoB,MAAM;MAAoB,OAAO;KAAU;IACrF;IACA,GAAG,cAAc,uBAAuB;GAC1C;GAEA,OAAO;IACL,iBAAiB;IACjB,uBAAuB;IACvB,uBAAuB;GACzB;EACF;EACA,UAAU;GACR,QAAQ;GACR,QAAQ;IACN,mBAAmB;KACjB,OAAO,OAAO,aAAa;KAC3B,aAAa;KACb,SAAS;KACT,QAAQ;MAAE,UAAU;MAA0B,MAAM;KAAU;IAChE;IACA,iBAAiB;KACf,OAAO,MAAM,SAAS;KACtB,aAAa;KACb,SAAS;KACT,QAAQ;MAAE,UAAU;MAAoB,MAAM;KAAU;IAC1D;IACA,uBAAuB;KACrB,OAAO,MAAM,YAAY;KACzB,aAAa;KACb,SAAS;KACT,QAAQ;MAAE,UAAU;MAAoB,MAAM;MAAW,OAAO;KAAU;IAC5E;IACA,uBAAuB;KACrB,OAAO,MAAM,SAAS;KACtB,aAAa;KACb,SAAS;KACT,QAAQ;MAAE,UAAU;MAAoB,MAAM;MAAW,OAAO;KAAU;IAC5E;IACA,GAAG,cAAc,yBAAyB;GAC5C;GAEA,OAAO;IACL,mBAAmB;IACnB,0BAA0B,MAAM,oBAAoB;IACpD,gCAAgC,MAAM,SAAS;GACjD;EACF;CACF,EACF;AACF,CAAC"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { Density } from "../../tokens/density.js";
|
|
2
|
+
import { DescriptionAria, RootDOMProps, WrapperRootDOMProps } from "../../utils/root-props.js";
|
|
3
|
+
import { CSSProperties, ReactElement, Ref } from "react";
|
|
4
|
+
import { Time } from "@internationalized/date";
|
|
5
|
+
//#region src/components/time-picker/TimePicker.d.ts
|
|
6
|
+
export interface TimePickerLabels {
|
|
7
|
+
/** Name of the hour selector and field. @default "Hour" */
|
|
8
|
+
hour: string;
|
|
9
|
+
/** Name of the minute selector and field. @default "Minute" */
|
|
10
|
+
minute: string;
|
|
11
|
+
/** The AM option. @default "AM" */
|
|
12
|
+
am: string;
|
|
13
|
+
/** The PM option. @default "PM" */
|
|
14
|
+
pm: string;
|
|
15
|
+
/** Name of the AM / PM selector. @default "AM or PM" */
|
|
16
|
+
period: string;
|
|
17
|
+
/** Name of the dial. @default "Clock" */
|
|
18
|
+
dial: string;
|
|
19
|
+
/** {@link TimePickerModeToggle}'s name in dial mode. @default "Toggle input picker" */
|
|
20
|
+
inputMode: string;
|
|
21
|
+
/** {@link TimePickerModeToggle}'s name in input mode. @default "Toggle dial picker" */
|
|
22
|
+
dialMode: string;
|
|
23
|
+
/**
|
|
24
|
+
* Name of a number on the dial (M3: "{Value} Hours or minutes of {Total}"), e.g.
|
|
25
|
+
* "7 hours of 12" or "35 minutes of 60".
|
|
26
|
+
* @default `${value} ${unit} of ${total}`
|
|
27
|
+
*/
|
|
28
|
+
dialValue: (value: string, total: number, unit: 'hours' | 'minutes') => string;
|
|
29
|
+
}
|
|
30
|
+
export interface TimePickerClassNames {
|
|
31
|
+
/** The picker's root; `className` is merged here too. */
|
|
32
|
+
root?: string;
|
|
33
|
+
/** The hour and minute: selectors in dial mode, text fields in input mode. */
|
|
34
|
+
field?: string;
|
|
35
|
+
/** The labels under the input mode's fields ("Hour", "Minute"). */
|
|
36
|
+
fieldLabel?: string;
|
|
37
|
+
/** The colon between the hour and the minute. */
|
|
38
|
+
separator?: string;
|
|
39
|
+
/** The AM / PM selector. */
|
|
40
|
+
period?: string;
|
|
41
|
+
/** Each of the AM / PM selector's options. */
|
|
42
|
+
periodOption?: string;
|
|
43
|
+
/** The clock dial (dial mode): its face, numbers and hand are drawn inside it. */
|
|
44
|
+
dial?: string;
|
|
45
|
+
}
|
|
46
|
+
export type TimePickerMode = 'dial' | 'input';
|
|
47
|
+
export interface TimePickerProps extends Omit<WrapperRootDOMProps, DescriptionAria> {
|
|
48
|
+
/** Controlled time (`@internationalized/date` `Time`). */
|
|
49
|
+
value?: Time;
|
|
50
|
+
/** Initial time when uncontrolled. @default 12:00 */
|
|
51
|
+
defaultValue?: Time;
|
|
52
|
+
/** Called with the new time when the user changes it. */
|
|
53
|
+
onChange?: (value: Time) => void;
|
|
54
|
+
/** 12- or 24-hour clock. Left out, the locale's hour cycle (12 in en-US, 24 in en-GB). */
|
|
55
|
+
hourCycle?: 12 | 24;
|
|
56
|
+
/** The clock dial, or typed hour and minute fields (controlled). */
|
|
57
|
+
mode?: TimePickerMode;
|
|
58
|
+
/** Initial mode when uncontrolled. @default "dial" */
|
|
59
|
+
defaultMode?: TimePickerMode;
|
|
60
|
+
/** Called when the user switches between the dial and the typed input. */
|
|
61
|
+
onModeChange?: (mode: TimePickerMode) => void;
|
|
62
|
+
/**
|
|
63
|
+
* `vertical` stacks the time over the dial; `horizontal` (landscape) puts them side by
|
|
64
|
+
* side. `auto` picks vertical when the window is tall enough, horizontal when it is only
|
|
65
|
+
* wide enough, and the typed input when neither fits, so the picker never scrolls (M3
|
|
66
|
+
* time picker placement and adaptive design). @default "auto"
|
|
67
|
+
*/
|
|
68
|
+
layout?: 'vertical' | 'horizontal' | 'auto';
|
|
69
|
+
/** Words the picker shows and announces, with English defaults. */
|
|
70
|
+
labels?: Partial<TimePickerLabels>;
|
|
71
|
+
/**
|
|
72
|
+
* Web density of the input mode, `0` to `-3`: each step takes 4px off the typed hour and
|
|
73
|
+
* minute fields (72px at 0, 60px at -3). The dial keeps its size: M3 doesn't make time
|
|
74
|
+
* pickers denser, since its 48px number targets are part of their accessibility. Left out,
|
|
75
|
+
* the picker takes the density of the nearest `ThemeProvider` or `ThemeScope`.
|
|
76
|
+
* @default 0
|
|
77
|
+
*/
|
|
78
|
+
density?: Density;
|
|
79
|
+
/** The root `<div>`'s id. */
|
|
80
|
+
id?: string;
|
|
81
|
+
/** Ref to the root `<div>` element. */
|
|
82
|
+
ref?: Ref<HTMLDivElement>;
|
|
83
|
+
/** Classes for the root element, merged with `classNames.root`; consumer classes win. */
|
|
84
|
+
className?: string;
|
|
85
|
+
/** Inline styles for the root element. */
|
|
86
|
+
style?: CSSProperties;
|
|
87
|
+
/** Classes for each part, by slot. */
|
|
88
|
+
classNames?: TimePickerClassNames;
|
|
89
|
+
/** `data-*` attributes go to the root. */
|
|
90
|
+
[data: `data-${string}`]: string | number | boolean | undefined;
|
|
91
|
+
}
|
|
92
|
+
/** Where an `auto` time picker's dial fits: `vertical`, `horizontal` or `none`. */
|
|
93
|
+
export declare function useTimePickerRoom(): 'vertical' | 'horizontal' | 'none';
|
|
94
|
+
/**
|
|
95
|
+
* M3 time picker (Compose's `TimePicker` and `TimeInput`): hour and minute selectors you
|
|
96
|
+
* can type in, with an AM / PM selector, and a clock dial whose numbers are buttons (press,
|
|
97
|
+
* drag, or Tab to one and press Enter; the hour moves on to the minutes); or typed fields
|
|
98
|
+
* in input mode. It turns to a horizontal layout, or the input mode, when the window has
|
|
99
|
+
* no room for the dial. Put it in a {@link PickerDialog} for the modal form, with a
|
|
100
|
+
* {@link TimePickerModeToggle}.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* <TimePicker value={time} onChange={setTime} />
|
|
104
|
+
*/
|
|
105
|
+
export declare function TimePicker({ value, defaultValue, onChange, hourCycle: hourCycleProp, mode: modeProp, defaultMode, onModeChange, layout, labels, density, id, ref, className, style, classNames, ...rest }: TimePickerProps): import("react").JSX.Element;
|
|
106
|
+
export interface TimePickerModeToggleProps extends RootDOMProps<HTMLButtonElement> {
|
|
107
|
+
/** The time picker's mode; the toggle switches to the other one. */
|
|
108
|
+
mode: TimePickerMode;
|
|
109
|
+
/** Called with the other mode when the toggle is pressed. */
|
|
110
|
+
onModeChange: (mode: TimePickerMode) => void;
|
|
111
|
+
/**
|
|
112
|
+
* Words the toggle announces (`inputMode`, `dialMode`), with English defaults. Takes the
|
|
113
|
+
* same object as the time picker's `labels`, so one set of words covers both.
|
|
114
|
+
*/
|
|
115
|
+
labels?: Partial<TimePickerLabels>;
|
|
116
|
+
/** Shown in dial mode. Defaults to Material Symbols' keyboard. */
|
|
117
|
+
keyboardIcon?: ReactElement;
|
|
118
|
+
/** Shown in input mode. Defaults to Material Symbols' schedule (a clock). */
|
|
119
|
+
clockIcon?: ReactElement;
|
|
120
|
+
/** Classes for the icon button; consumer classes win. */
|
|
121
|
+
className?: string;
|
|
122
|
+
/** Inline styles for the icon button. */
|
|
123
|
+
style?: CSSProperties;
|
|
124
|
+
/** The icon button's id. */
|
|
125
|
+
id?: string;
|
|
126
|
+
/** Ref to the icon button. */
|
|
127
|
+
ref?: Ref<HTMLButtonElement>;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* The time picker's keyboard / clock icon button (M3: "The input selector should be
|
|
131
|
+
* accessible from the dial selector via the keyboard icon"), for `PickerDialog`'s
|
|
132
|
+
* `modeToggleButton`. Hidden when the window has no room for the dial, where an `auto`
|
|
133
|
+
* time picker shows only the input.
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* <PickerDialog variant="time" modeToggleButton={<TimePickerModeToggle mode={mode} onModeChange={setMode} />} …>
|
|
137
|
+
* <TimePicker mode={mode} onModeChange={setMode} />
|
|
138
|
+
* </PickerDialog>
|
|
139
|
+
*/
|
|
140
|
+
export declare function TimePickerModeToggle({ mode, onModeChange, labels, keyboardIcon, clockIcon, className, style, id, ref, ...dom }: TimePickerModeToggleProps): import("react").JSX.Element | null;
|
|
141
|
+
//#endregion
|
|
142
|
+
//# sourceMappingURL=TimePicker.d.ts.map
|