@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,165 @@
|
|
|
1
|
+
import { Density } from "../../tokens/density.js";
|
|
2
|
+
import { DescriptionAria, WrapperRootDOMProps } from "../../utils/root-props.js";
|
|
3
|
+
import { DateInputLabels } from "./DateInput.js";
|
|
4
|
+
import { CSSProperties, Ref } from "react";
|
|
5
|
+
import { CalendarDate, DateValue } from "@internationalized/date";
|
|
6
|
+
//#region src/components/date-picker/DatePicker.d.ts
|
|
7
|
+
/** The picker's labels, for localisation. */
|
|
8
|
+
export interface DatePickerLabels extends DateInputLabels {
|
|
9
|
+
/** The header's title in calendar mode. @default "Select date", or "Select dates" for a range */
|
|
10
|
+
title: string;
|
|
11
|
+
/**
|
|
12
|
+
* The title in text input mode (the M3 modal date input's "Enter date").
|
|
13
|
+
* @default "Enter date", or "Enter dates" for a range
|
|
14
|
+
*/
|
|
15
|
+
inputTitle: string;
|
|
16
|
+
/** Headline when nothing is selected. @default "Selected date" / "Start date – End date" */
|
|
17
|
+
noSelection: string;
|
|
18
|
+
/** The previous month button. @default "Previous month" */
|
|
19
|
+
previousMonth: string;
|
|
20
|
+
/** The next month button. @default "Next month" */
|
|
21
|
+
nextMonth: string;
|
|
22
|
+
/** Tooltip of the previous-month button, naming its shortcut. @default "Previous month (Page Up)" */
|
|
23
|
+
previousMonthTooltip: string;
|
|
24
|
+
/** Tooltip of the next-month button, naming its shortcut. @default "Next month (Page Down)" */
|
|
25
|
+
nextMonthTooltip: string;
|
|
26
|
+
/** The month and year button while the days show. @default "Switch to selecting a year" */
|
|
27
|
+
showYears: string;
|
|
28
|
+
/** The month and year button while the years show. @default "Switch to selecting a day" */
|
|
29
|
+
showDays: string;
|
|
30
|
+
/** Tooltip of the month and year button, naming its shortcut. @default "Choose a year (Shift+Y)" */
|
|
31
|
+
yearsTooltip: string;
|
|
32
|
+
/** Name of the year list. @default "Year" */
|
|
33
|
+
yearList: string;
|
|
34
|
+
/** The mode toggle in calendar mode. @default "Switch to text input mode" */
|
|
35
|
+
inputMode: string;
|
|
36
|
+
/** The mode toggle in text input mode. @default "Switch to calendar input mode" */
|
|
37
|
+
calendarMode: string;
|
|
38
|
+
/** Label of the input mode's field. @default "Date" */
|
|
39
|
+
dateLabel: string;
|
|
40
|
+
/** Label of a range's start field in input mode. @default "Start date" */
|
|
41
|
+
startDateLabel: string;
|
|
42
|
+
/**
|
|
43
|
+
* Label of a range's end field in input mode, and the headline's end while a range is
|
|
44
|
+
* being picked ("Mar 20 – End date"). @default "End date"
|
|
45
|
+
*/
|
|
46
|
+
endDateLabel: string;
|
|
47
|
+
}
|
|
48
|
+
export interface DatePickerClassNames {
|
|
49
|
+
/** The picker's root; `className` is merged here too. */
|
|
50
|
+
root?: string;
|
|
51
|
+
/** The header: title, headline and mode toggle. */
|
|
52
|
+
header?: string;
|
|
53
|
+
/** The header's title ("Select date"). */
|
|
54
|
+
title?: string;
|
|
55
|
+
/** The header's headline: the chosen date or range. */
|
|
56
|
+
headline?: string;
|
|
57
|
+
/** The calendar or the text input below the header. */
|
|
58
|
+
body?: string;
|
|
59
|
+
/** The weekday names above the days. */
|
|
60
|
+
weekday?: string;
|
|
61
|
+
/** Each day of the calendar. */
|
|
62
|
+
day?: string;
|
|
63
|
+
/** Each year of the year list. */
|
|
64
|
+
year?: string;
|
|
65
|
+
/** The month and year button above the days, which shows the year list. */
|
|
66
|
+
yearButton?: string;
|
|
67
|
+
/** Each month's subhead in the range picker's scrolling month list. */
|
|
68
|
+
monthSubhead?: string;
|
|
69
|
+
}
|
|
70
|
+
export interface DateRangePickerClassNames extends DatePickerClassNames {
|
|
71
|
+
/**
|
|
72
|
+
* The band behind a range's days: each calendar cell it spans (`data-range` is `start`,
|
|
73
|
+
* `middle` or `end`), whose background paints it.
|
|
74
|
+
*/
|
|
75
|
+
rangeBand?: string;
|
|
76
|
+
}
|
|
77
|
+
interface DatePickerCommonProps extends Omit<WrapperRootDOMProps, DescriptionAria> {
|
|
78
|
+
/** Earliest date allowed; earlier days are disabled. */
|
|
79
|
+
min?: DateValue;
|
|
80
|
+
/** Latest date allowed; later days are disabled. */
|
|
81
|
+
max?: DateValue;
|
|
82
|
+
/** Returns `true` for a day that can't be picked (it shows disabled). */
|
|
83
|
+
isDateUnavailable?: (date: DateValue) => boolean;
|
|
84
|
+
/** Show the header (title, headline and mode toggle). @default true */
|
|
85
|
+
header?: boolean;
|
|
86
|
+
/** Show the calendar ↔ text input toggle. @default true */
|
|
87
|
+
modeToggle?: boolean;
|
|
88
|
+
/** Start in calendar or text input mode. @default "calendar" */
|
|
89
|
+
defaultMode?: 'calendar' | 'input';
|
|
90
|
+
/**
|
|
91
|
+
* First and last years of the year list (and of a range's month list). Years outside
|
|
92
|
+
* `min` / `max` are shown disabled. @default [1900, 2100]
|
|
93
|
+
*/
|
|
94
|
+
yearRange?: [number, number];
|
|
95
|
+
/** Words the picker shows and announces, with English defaults. */
|
|
96
|
+
labels?: Partial<DatePickerLabels>;
|
|
97
|
+
/**
|
|
98
|
+
* Web density of the input mode's text fields, `0` to `-3`: each step takes 4px off them
|
|
99
|
+
* (56px at 0, 44px at -3). The calendar keeps its size: M3 doesn't make date pickers denser,
|
|
100
|
+
* since their 48px day targets are part of their accessibility. Left out, the fields take
|
|
101
|
+
* the density of the nearest `ThemeProvider` or `ThemeScope`.
|
|
102
|
+
* @default 0
|
|
103
|
+
*/
|
|
104
|
+
density?: Density;
|
|
105
|
+
/** The root `<div>`'s id. */
|
|
106
|
+
id?: string;
|
|
107
|
+
/** Ref to the root `<div>` element. */
|
|
108
|
+
ref?: Ref<HTMLDivElement>;
|
|
109
|
+
/** Classes for the root element, merged with `classNames.root`; consumer classes win. */
|
|
110
|
+
className?: string;
|
|
111
|
+
/** Inline styles for the root element. */
|
|
112
|
+
style?: CSSProperties;
|
|
113
|
+
/** Classes for each part, by slot. */
|
|
114
|
+
classNames?: DatePickerClassNames;
|
|
115
|
+
/** `data-*` attributes go to the root. */
|
|
116
|
+
[data: `data-${string}`]: string | number | boolean | undefined;
|
|
117
|
+
}
|
|
118
|
+
export type DatePickerProps = DatePickerCommonProps & {
|
|
119
|
+
/** The selected date (controlled); `null` for none. */
|
|
120
|
+
value?: CalendarDate | null;
|
|
121
|
+
/** Initial date when uncontrolled. @default null */
|
|
122
|
+
defaultValue?: CalendarDate | null;
|
|
123
|
+
/** Called with the date the user picks or types. */
|
|
124
|
+
onChange?: (value: CalendarDate) => void;
|
|
125
|
+
};
|
|
126
|
+
export interface DateRange {
|
|
127
|
+
start: CalendarDate;
|
|
128
|
+
end: CalendarDate;
|
|
129
|
+
}
|
|
130
|
+
export type DateRangePickerProps = Omit<DatePickerCommonProps, 'classNames'> & {
|
|
131
|
+
/** Classes for each part, by slot. */
|
|
132
|
+
classNames?: DateRangePickerClassNames;
|
|
133
|
+
/** The selected range (controlled); `null` for none. */
|
|
134
|
+
value?: DateRange | null;
|
|
135
|
+
/** Initial range when uncontrolled. @default null */
|
|
136
|
+
defaultValue?: DateRange | null;
|
|
137
|
+
/** Called with the range once both its start and end are picked or typed. */
|
|
138
|
+
onChange?: (value: DateRange) => void;
|
|
139
|
+
/**
|
|
140
|
+
* `scroll` lists the months one under another and scrolls vertically, as the M3 modal
|
|
141
|
+
* range picker does; `paged` shows one month at a time with previous / next buttons and
|
|
142
|
+
* a year list, like the date picker. @default "scroll"
|
|
143
|
+
*/
|
|
144
|
+
monthLayout?: 'scroll' | 'paged';
|
|
145
|
+
};
|
|
146
|
+
/**
|
|
147
|
+
* M3 modal date picker (Compose's `DatePicker`): a header with the selected date, a month
|
|
148
|
+
* grid you page with the arrows, a horizontal swipe or Page Up / Down, a year list, and a
|
|
149
|
+
* text input mode. Put it in a {@link PickerDialog} for the modal form; {@link DateField}
|
|
150
|
+
* is the docked form. Values are `@internationalized/date` dates.
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* <DatePicker value={date} onChange={setDate} />
|
|
154
|
+
*/
|
|
155
|
+
export declare function DatePicker(props: DatePickerProps): import("react").JSX.Element;
|
|
156
|
+
/**
|
|
157
|
+
* M3 date range picker (Compose's `DateRangePicker`): select a start and an end date on a
|
|
158
|
+
* vertically scrolling list of months, or type them in input mode.
|
|
159
|
+
*
|
|
160
|
+
* @example
|
|
161
|
+
* <DateRangePicker value={range} onChange={setRange} />
|
|
162
|
+
*/
|
|
163
|
+
export declare function DateRangePicker(props: DateRangePickerProps): import("react").JSX.Element;
|
|
164
|
+
//#endregion
|
|
165
|
+
//# sourceMappingURL=DatePicker.d.ts.map
|
|
@@ -0,0 +1,492 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../utils/cn.js";
|
|
3
|
+
import { mergeDataTokens } from "../../utils/merge-data-tokens.js";
|
|
4
|
+
import { usePresence } from "../../primitives/use-presence.js";
|
|
5
|
+
import { Button } from "../button/Button.js";
|
|
6
|
+
import { TooltipTrigger } from "../tooltip/tooltip-trigger.js";
|
|
7
|
+
import { LazyTooltip } from "../tooltip/lazy-tooltip.js";
|
|
8
|
+
import { IconButton } from "../icon-button/IconButton.js";
|
|
9
|
+
import { DomDirectionLocale } from "../../primitives/DomDirectionLocale.js";
|
|
10
|
+
import { splitRootProps } from "../../utils/root-props.js";
|
|
11
|
+
import { useSizeTransform } from "./use-size-transform.js";
|
|
12
|
+
import { useViewExit } from "./use-view-exit.js";
|
|
13
|
+
import { CalendarGrid } from "./CalendarGrid.js";
|
|
14
|
+
import { ChoiceButton, ShortcutIconButton, useMonthSwipe, usePickerKeys } from "./calendar-parts.js";
|
|
15
|
+
import { DateInput } from "./DateInput.js";
|
|
16
|
+
import { datePickerStyles } from "./date-picker-styles.js";
|
|
17
|
+
import { PickerDialogContext } from "./picker-dialog-context.js";
|
|
18
|
+
import { ArrowDropDownIcon, CalendarIcon, ChevronLeftIcon, ChevronRightIcon, EditIcon } from "./picker-icons.js";
|
|
19
|
+
import { useContext, useLayoutEffect, useRef, useState } from "react";
|
|
20
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
21
|
+
import { mergeProps, useCalendar, useDateFormatter, useLocale, useRangeCalendar } from "react-aria";
|
|
22
|
+
import { useCalendarState, useRangeCalendarState } from "react-stately";
|
|
23
|
+
import { useControlledState } from "react-stately/useControlledState";
|
|
24
|
+
import { CalendarDate, createCalendar, getLocalTimeZone, maxDate, minDate, startOfWeek, toCalendarDate, today } from "@internationalized/date";
|
|
25
|
+
//#region src/components/date-picker/DatePicker.tsx
|
|
26
|
+
/**
|
|
27
|
+
* M3 modal date picker (Compose's `DatePicker`): a header with the selected date, a month
|
|
28
|
+
* grid you page with the arrows, a horizontal swipe or Page Up / Down, a year list, and a
|
|
29
|
+
* text input mode. Put it in a {@link PickerDialog} for the modal form; {@link DateField}
|
|
30
|
+
* is the docked form. Values are `@internationalized/date` dates.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* <DatePicker value={date} onChange={setDate} />
|
|
34
|
+
*/
|
|
35
|
+
function DatePicker(props) {
|
|
36
|
+
return /* @__PURE__ */ jsx(DomDirectionLocale, { children: (directionRef) => /* @__PURE__ */ jsx(SingleDatePicker, {
|
|
37
|
+
...props,
|
|
38
|
+
directionRef
|
|
39
|
+
}) });
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* M3 date range picker (Compose's `DateRangePicker`): select a start and an end date on a
|
|
43
|
+
* vertically scrolling list of months, or type them in input mode.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* <DateRangePicker value={range} onChange={setRange} />
|
|
47
|
+
*/
|
|
48
|
+
function DateRangePicker(props) {
|
|
49
|
+
return /* @__PURE__ */ jsx(DomDirectionLocale, { children: (directionRef) => /* @__PURE__ */ jsx(RangeDatePicker, {
|
|
50
|
+
...props,
|
|
51
|
+
directionRef
|
|
52
|
+
}) });
|
|
53
|
+
}
|
|
54
|
+
function SingleDatePicker(props) {
|
|
55
|
+
const { locale } = useLocale();
|
|
56
|
+
const confirm = useContext(PickerDialogContext);
|
|
57
|
+
const [value, setValue] = useControlledState(props.value, props.defaultValue ?? null, props.onChange);
|
|
58
|
+
const state = useCalendarState({
|
|
59
|
+
value,
|
|
60
|
+
onChange: (date) => setValue(date),
|
|
61
|
+
minValue: props.min,
|
|
62
|
+
maxValue: props.max,
|
|
63
|
+
isDateUnavailable: props.isDateUnavailable,
|
|
64
|
+
locale,
|
|
65
|
+
createCalendar
|
|
66
|
+
});
|
|
67
|
+
const formatter = useDateFormatter({ dateStyle: "medium" });
|
|
68
|
+
const labels = props.labels ?? {};
|
|
69
|
+
const headline = value ? formatter.format(value.toDate(getLocalTimeZone())) : labels.noSelection ?? "Selected date";
|
|
70
|
+
return /* @__PURE__ */ jsx(PickerFrame, {
|
|
71
|
+
...props,
|
|
72
|
+
range: false,
|
|
73
|
+
state,
|
|
74
|
+
headline,
|
|
75
|
+
input: /* @__PURE__ */ jsx(DateInput, {
|
|
76
|
+
label: labels.dateLabel ?? "Date",
|
|
77
|
+
value,
|
|
78
|
+
onCommit: (date) => date && setValue(date),
|
|
79
|
+
onEnter: (date) => date && confirm?.requestConfirm(),
|
|
80
|
+
min: props.min,
|
|
81
|
+
max: props.max,
|
|
82
|
+
isDateUnavailable: props.isDateUnavailable,
|
|
83
|
+
labels,
|
|
84
|
+
density: props.density,
|
|
85
|
+
className: "w-full"
|
|
86
|
+
})
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
/** Whole months from `from` to `to`. */
|
|
90
|
+
const monthsBetween = (from, to) => (to.year - from.year) * 12 + (to.month - from.month);
|
|
91
|
+
function RangeDatePicker({ monthLayout = "scroll", ...props }) {
|
|
92
|
+
const { locale } = useLocale();
|
|
93
|
+
const confirm = useContext(PickerDialogContext);
|
|
94
|
+
const [value, setValue] = useControlledState(props.value, props.defaultValue ?? null, props.onChange);
|
|
95
|
+
const [firstYear, lastYear] = props.yearRange ?? [1900, 2100];
|
|
96
|
+
const scroll = monthLayout === "scroll";
|
|
97
|
+
const listStart = maxDate(new CalendarDate(firstYear, 1, 1), props.min ? toCalendarDate(props.min) : null);
|
|
98
|
+
const listEnd = minDate(new CalendarDate(lastYear, 12, 31), props.max ? toCalendarDate(props.max) : null);
|
|
99
|
+
const state = useRangeCalendarState({
|
|
100
|
+
value,
|
|
101
|
+
onChange: (range) => setValue(range),
|
|
102
|
+
minValue: scroll ? listStart : props.min,
|
|
103
|
+
maxValue: scroll ? listEnd : props.max,
|
|
104
|
+
isDateUnavailable: props.isDateUnavailable,
|
|
105
|
+
visibleDuration: scroll ? { months: monthsBetween(listStart, listEnd) + 1 } : void 0,
|
|
106
|
+
locale,
|
|
107
|
+
createCalendar
|
|
108
|
+
});
|
|
109
|
+
const formatter = useDateFormatter({
|
|
110
|
+
month: "short",
|
|
111
|
+
day: "numeric"
|
|
112
|
+
});
|
|
113
|
+
const labels = props.labels ?? {};
|
|
114
|
+
const format = (date) => formatter.format(date.toDate(getLocalTimeZone()));
|
|
115
|
+
const anchor = state.anchorDate;
|
|
116
|
+
const headline = anchor ? `${format(anchor)} – ${labels.endDateLabel ?? "End date"}` : value ? `${format(value.start)} – ${format(value.end)}` : labels.noSelection ?? "Start date – End date";
|
|
117
|
+
const common = {
|
|
118
|
+
min: props.min,
|
|
119
|
+
max: props.max,
|
|
120
|
+
isDateUnavailable: props.isDateUnavailable,
|
|
121
|
+
labels,
|
|
122
|
+
density: props.density,
|
|
123
|
+
className: "w-full"
|
|
124
|
+
};
|
|
125
|
+
return /* @__PURE__ */ jsx(PickerFrame, {
|
|
126
|
+
...props,
|
|
127
|
+
range: true,
|
|
128
|
+
scroll,
|
|
129
|
+
state,
|
|
130
|
+
headline,
|
|
131
|
+
input: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(DateInput, {
|
|
132
|
+
...common,
|
|
133
|
+
label: labels.startDateLabel ?? "Start date",
|
|
134
|
+
value: value?.start ?? null,
|
|
135
|
+
onCommit: (start) => start && setValue({
|
|
136
|
+
start,
|
|
137
|
+
end: value && value.end >= start ? value.end : start
|
|
138
|
+
})
|
|
139
|
+
}), /* @__PURE__ */ jsx(DateInput, {
|
|
140
|
+
...common,
|
|
141
|
+
label: labels.endDateLabel ?? "End date",
|
|
142
|
+
value: value?.end ?? null,
|
|
143
|
+
onCommit: (end) => end && setValue({
|
|
144
|
+
start: value && value.start <= end ? value.start : end,
|
|
145
|
+
end
|
|
146
|
+
}),
|
|
147
|
+
onEnter: (end) => end && value && confirm?.requestConfirm()
|
|
148
|
+
})] })
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
function PickerFrame({ range, scroll = false, state, headline, input, header = true, modeToggle = true, defaultMode = "calendar", yearRange = [1900, 2100], labels = {}, id, ref, className, style, classNames, directionRef, ...rest }) {
|
|
152
|
+
const { root: data } = splitRootProps(rest, { wrapper: true });
|
|
153
|
+
const [mode, setMode] = useState(defaultMode);
|
|
154
|
+
const [switched, setSwitched] = useState(false);
|
|
155
|
+
const [years, setYears] = useState(false);
|
|
156
|
+
const { attach: attachSize, capture: captureSize } = useSizeTransform(mode);
|
|
157
|
+
const { attachView: attachExitView, attachSlot: attachExitSlot, capture: captureExit } = useViewExit(mode);
|
|
158
|
+
const styles = datePickerStyles({ range });
|
|
159
|
+
const title = mode === "input" ? labels.inputTitle ?? (range ? "Enter dates" : "Enter date") : labels.title ?? (range ? "Select dates" : "Select date");
|
|
160
|
+
const bodyProps = {
|
|
161
|
+
styles,
|
|
162
|
+
years,
|
|
163
|
+
setYears,
|
|
164
|
+
yearRange,
|
|
165
|
+
labels,
|
|
166
|
+
className: classNames?.body,
|
|
167
|
+
classNames
|
|
168
|
+
};
|
|
169
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
170
|
+
...data,
|
|
171
|
+
id,
|
|
172
|
+
ref: (element) => {
|
|
173
|
+
attachSize(element);
|
|
174
|
+
directionRef(element);
|
|
175
|
+
if (typeof ref === "function") ref(element);
|
|
176
|
+
else if (ref) ref.current = element;
|
|
177
|
+
},
|
|
178
|
+
style,
|
|
179
|
+
"data-tokens": mergeDataTokens("md-comp-date-picker-modal", data),
|
|
180
|
+
"data-years": years || void 0,
|
|
181
|
+
"data-mode": mode,
|
|
182
|
+
className: styles.root({ class: cn(classNames?.root, className) }),
|
|
183
|
+
children: [header && /* @__PURE__ */ jsxs("div", {
|
|
184
|
+
className: styles.header({ class: classNames?.header }),
|
|
185
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
186
|
+
className: styles.title({ class: classNames?.title }),
|
|
187
|
+
children: title
|
|
188
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
189
|
+
className: styles.headlineRow(),
|
|
190
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
191
|
+
"aria-live": "polite",
|
|
192
|
+
"data-slot": "headline",
|
|
193
|
+
className: styles.headline({ class: classNames?.headline }),
|
|
194
|
+
children: headline
|
|
195
|
+
}), modeToggle && /* @__PURE__ */ jsx(IconButton, {
|
|
196
|
+
variant: "standard",
|
|
197
|
+
density: 0,
|
|
198
|
+
icon: mode === "calendar" ? /* @__PURE__ */ jsx(EditIcon, {}) : /* @__PURE__ */ jsx(CalendarIcon, {}),
|
|
199
|
+
"aria-label": mode === "calendar" ? labels.inputMode ?? "Switch to text input mode" : labels.calendarMode ?? "Switch to calendar input mode",
|
|
200
|
+
onPress: () => {
|
|
201
|
+
captureSize();
|
|
202
|
+
captureExit(mode === "calendar" ? "-48px" : "100%");
|
|
203
|
+
setSwitched(true);
|
|
204
|
+
setMode(mode === "calendar" ? "input" : "calendar");
|
|
205
|
+
}
|
|
206
|
+
})]
|
|
207
|
+
})]
|
|
208
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
209
|
+
className: styles.modeStack(),
|
|
210
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
211
|
+
ref: attachExitView,
|
|
212
|
+
"data-enter": switched ? mode : void 0,
|
|
213
|
+
className: styles.modeView(),
|
|
214
|
+
children: mode === "input" ? /* @__PURE__ */ jsx("div", {
|
|
215
|
+
className: styles.input({ class: classNames?.body }),
|
|
216
|
+
children: input
|
|
217
|
+
}) : range && scroll ? /* @__PURE__ */ jsx(RangeMonthList, {
|
|
218
|
+
state,
|
|
219
|
+
...bodyProps
|
|
220
|
+
}) : range ? /* @__PURE__ */ jsx(RangeCalendarBody, {
|
|
221
|
+
state,
|
|
222
|
+
...bodyProps
|
|
223
|
+
}) : /* @__PURE__ */ jsx(SingleCalendarBody, {
|
|
224
|
+
state,
|
|
225
|
+
...bodyProps
|
|
226
|
+
})
|
|
227
|
+
}, mode), /* @__PURE__ */ jsx("div", {
|
|
228
|
+
ref: attachExitSlot,
|
|
229
|
+
"aria-hidden": "true",
|
|
230
|
+
inert: true,
|
|
231
|
+
className: styles.modeExit()
|
|
232
|
+
})]
|
|
233
|
+
})]
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
function SingleCalendarBody({ state, ...props }) {
|
|
237
|
+
const { calendarProps, prevButtonProps, nextButtonProps } = useCalendar({}, state);
|
|
238
|
+
return /* @__PURE__ */ jsx(CalendarBody, {
|
|
239
|
+
...props,
|
|
240
|
+
state,
|
|
241
|
+
calendarProps,
|
|
242
|
+
prevButtonProps,
|
|
243
|
+
nextButtonProps
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
function RangeCalendarBody({ state, ...props }) {
|
|
247
|
+
const ref = useRef(null);
|
|
248
|
+
const { calendarProps, prevButtonProps, nextButtonProps } = useRangeCalendar({}, state, ref);
|
|
249
|
+
return /* @__PURE__ */ jsx(CalendarBody, {
|
|
250
|
+
...props,
|
|
251
|
+
bodyRef: ref,
|
|
252
|
+
state,
|
|
253
|
+
calendarProps,
|
|
254
|
+
prevButtonProps,
|
|
255
|
+
nextButtonProps
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
function CalendarBody({ state, calendarProps, prevButtonProps, nextButtonProps, styles, years, setYears, yearRange, labels, className, classNames, bodyRef }) {
|
|
259
|
+
const confirm = useContext(PickerDialogContext);
|
|
260
|
+
const monthLabel = useDateFormatter({
|
|
261
|
+
month: "long",
|
|
262
|
+
year: "numeric"
|
|
263
|
+
}).format(state.visibleRange.start.toDate(getLocalTimeZone()));
|
|
264
|
+
const menuRef = useRef(null);
|
|
265
|
+
const [focusYears, setFocusYears] = useState(false);
|
|
266
|
+
const yearsPresence = usePresence(years, ["clip-path", "opacity"]);
|
|
267
|
+
const { swipeProps, slideKey, slideDirection } = useMonthSwipe(state);
|
|
268
|
+
const onKeyDownCapture = usePickerKeys(state, {
|
|
269
|
+
onConfirm: confirm?.requestConfirm,
|
|
270
|
+
onMonthMenu: () => menuRef.current?.focus(),
|
|
271
|
+
onYearMenu: () => {
|
|
272
|
+
setFocusYears(true);
|
|
273
|
+
setYears(true);
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
277
|
+
...calendarProps,
|
|
278
|
+
ref: bodyRef,
|
|
279
|
+
onKeyDownCapture,
|
|
280
|
+
className: styles.body({ class: className }),
|
|
281
|
+
children: [
|
|
282
|
+
/* @__PURE__ */ jsxs("div", {
|
|
283
|
+
className: styles.nav(),
|
|
284
|
+
children: [/* @__PURE__ */ jsxs(TooltipTrigger, { children: [/* @__PURE__ */ jsx(Button, {
|
|
285
|
+
ref: menuRef,
|
|
286
|
+
variant: "text",
|
|
287
|
+
className: cn("text-on-surface-variant", classNames?.yearButton),
|
|
288
|
+
"aria-label": `${monthLabel}, ${years ? labels.showDays ?? "Switch to selecting a day" : labels.showYears ?? "Switch to selecting a year"}`,
|
|
289
|
+
onPress: () => {
|
|
290
|
+
setFocusYears(false);
|
|
291
|
+
setYears(!years);
|
|
292
|
+
},
|
|
293
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
294
|
+
className: "inline-flex items-center gap-[8px]",
|
|
295
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
296
|
+
"aria-live": "polite",
|
|
297
|
+
children: monthLabel
|
|
298
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
299
|
+
"aria-hidden": "true",
|
|
300
|
+
className: "inline-flex size-[20px] items-center justify-center",
|
|
301
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
302
|
+
className: styles.yearButtonIcon(),
|
|
303
|
+
children: /* @__PURE__ */ jsx(ArrowDropDownIcon, {})
|
|
304
|
+
})
|
|
305
|
+
})]
|
|
306
|
+
})
|
|
307
|
+
}), /* @__PURE__ */ jsx(LazyTooltip, { children: labels.yearsTooltip ?? "Choose a year (Shift+Y)" })] }), !years && /* @__PURE__ */ jsxs("div", {
|
|
308
|
+
className: styles.navButtons(),
|
|
309
|
+
children: [/* @__PURE__ */ jsx(ShortcutIconButton, {
|
|
310
|
+
icon: /* @__PURE__ */ jsx(ChevronLeftIcon, {}),
|
|
311
|
+
label: labels.previousMonth ?? "Previous month",
|
|
312
|
+
tooltip: labels.previousMonthTooltip ?? "Previous month (Page Up)",
|
|
313
|
+
onPress: prevButtonProps.onPress,
|
|
314
|
+
disabled: prevButtonProps.isDisabled
|
|
315
|
+
}), /* @__PURE__ */ jsx(ShortcutIconButton, {
|
|
316
|
+
icon: /* @__PURE__ */ jsx(ChevronRightIcon, {}),
|
|
317
|
+
label: labels.nextMonth ?? "Next month",
|
|
318
|
+
tooltip: labels.nextMonthTooltip ?? "Next month (Page Down)",
|
|
319
|
+
onPress: nextButtonProps.onPress,
|
|
320
|
+
disabled: nextButtonProps.isDisabled
|
|
321
|
+
})]
|
|
322
|
+
})]
|
|
323
|
+
}),
|
|
324
|
+
!years && /* @__PURE__ */ jsx("div", {
|
|
325
|
+
...swipeProps,
|
|
326
|
+
className: styles.swipe(),
|
|
327
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
328
|
+
"data-direction": slideDirection,
|
|
329
|
+
className: styles.slide(),
|
|
330
|
+
children: /* @__PURE__ */ jsx(CalendarGrid, {
|
|
331
|
+
state,
|
|
332
|
+
styles,
|
|
333
|
+
classNames
|
|
334
|
+
})
|
|
335
|
+
}, slideKey)
|
|
336
|
+
}),
|
|
337
|
+
yearsPresence.isPresent && /* @__PURE__ */ jsx(YearList, {
|
|
338
|
+
state,
|
|
339
|
+
styles,
|
|
340
|
+
yearRange,
|
|
341
|
+
className: classNames?.year,
|
|
342
|
+
label: labels.yearList ?? "Year",
|
|
343
|
+
autoFocus: focusYears,
|
|
344
|
+
exiting: yearsPresence.isExiting,
|
|
345
|
+
exitProps: yearsPresence.exitProps,
|
|
346
|
+
onPick: () => setYears(false)
|
|
347
|
+
})
|
|
348
|
+
]
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* The range picker's months, one under another in a vertical scroll (M3: "To navigate
|
|
353
|
+
* across months, scroll vertically"), under a single weekday row. Only the months in view
|
|
354
|
+
* (and the focused one) are rendered; the rest are spacers of the same fixed height.
|
|
355
|
+
*/
|
|
356
|
+
function RangeMonthList({ state, styles, className, classNames }) {
|
|
357
|
+
const confirm = useContext(PickerDialogContext);
|
|
358
|
+
const ref = useRef(null);
|
|
359
|
+
const listRef = useRef(null);
|
|
360
|
+
const { calendarProps } = useRangeCalendar({}, state, ref);
|
|
361
|
+
const { locale } = useLocale();
|
|
362
|
+
const first = state.visibleRange.start;
|
|
363
|
+
const count = monthsBetween(first, state.visibleRange.end) + 1;
|
|
364
|
+
const focusedIndex = monthsBetween(first, state.focusedDate);
|
|
365
|
+
const [view, setView] = useState(() => ({
|
|
366
|
+
top: focusedIndex * MONTH_HEIGHT,
|
|
367
|
+
height: 0
|
|
368
|
+
}));
|
|
369
|
+
const weekdays = useDateFormatter({ weekday: "narrow" });
|
|
370
|
+
const longWeekdays = useDateFormatter({ weekday: "long" });
|
|
371
|
+
const subhead = useDateFormatter({
|
|
372
|
+
month: "long",
|
|
373
|
+
year: "numeric"
|
|
374
|
+
});
|
|
375
|
+
const onKeyDownCapture = usePickerKeys(state, {
|
|
376
|
+
onConfirm: confirm?.requestConfirm,
|
|
377
|
+
onMonthMenu: () => void 0,
|
|
378
|
+
onYearMenu: () => void 0
|
|
379
|
+
});
|
|
380
|
+
const initialTop = useRef(view.top);
|
|
381
|
+
useLayoutEffect(() => {
|
|
382
|
+
const list = listRef.current;
|
|
383
|
+
if (!list) return;
|
|
384
|
+
list.scrollTop = initialTop.current;
|
|
385
|
+
const measure = () => setView({
|
|
386
|
+
top: list.scrollTop,
|
|
387
|
+
height: list.clientHeight
|
|
388
|
+
});
|
|
389
|
+
measure();
|
|
390
|
+
const observer = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(measure);
|
|
391
|
+
observer?.observe(list);
|
|
392
|
+
list.addEventListener("scroll", measure, { passive: true });
|
|
393
|
+
return () => {
|
|
394
|
+
observer?.disconnect();
|
|
395
|
+
list.removeEventListener("scroll", measure);
|
|
396
|
+
};
|
|
397
|
+
}, []);
|
|
398
|
+
const height = view.height || MONTH_HEIGHT;
|
|
399
|
+
let from = Math.max(0, Math.floor(view.top / MONTH_HEIGHT) - 1);
|
|
400
|
+
let to = Math.min(count - 1, Math.floor((view.top + height) / MONTH_HEIGHT) + 1);
|
|
401
|
+
if (state.isFocused) {
|
|
402
|
+
from = Math.min(from, focusedIndex);
|
|
403
|
+
to = Math.max(to, focusedIndex);
|
|
404
|
+
}
|
|
405
|
+
const weekStart = startOfWeek(today(getLocalTimeZone()), locale);
|
|
406
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
407
|
+
...mergeProps(calendarProps, { onKeyDownCapture }),
|
|
408
|
+
ref,
|
|
409
|
+
className: styles.body({ class: cn("min-h-0 flex-1", className) }),
|
|
410
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
411
|
+
"aria-hidden": "true",
|
|
412
|
+
className: styles.weekdayRow(),
|
|
413
|
+
children: Array.from({ length: 7 }, (_, index) => {
|
|
414
|
+
const day = weekStart.add({ days: index }).toDate(getLocalTimeZone());
|
|
415
|
+
return /* @__PURE__ */ jsx("span", {
|
|
416
|
+
title: longWeekdays.format(day),
|
|
417
|
+
className: styles.weekdayCell({ class: classNames?.weekday }),
|
|
418
|
+
children: weekdays.format(day)
|
|
419
|
+
}, index);
|
|
420
|
+
})
|
|
421
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
422
|
+
ref: listRef,
|
|
423
|
+
className: styles.months(),
|
|
424
|
+
children: [
|
|
425
|
+
/* @__PURE__ */ jsx("div", { style: { height: from * MONTH_HEIGHT } }),
|
|
426
|
+
Array.from({ length: to - from + 1 }, (_, i) => {
|
|
427
|
+
const month = first.add({ months: from + i });
|
|
428
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
429
|
+
className: "h-[336px]",
|
|
430
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
431
|
+
"aria-hidden": "true",
|
|
432
|
+
className: styles.monthSubhead({ class: classNames?.monthSubhead }),
|
|
433
|
+
children: subhead.format(month.toDate(getLocalTimeZone()))
|
|
434
|
+
}), /* @__PURE__ */ jsx(CalendarGrid, {
|
|
435
|
+
state,
|
|
436
|
+
styles,
|
|
437
|
+
month,
|
|
438
|
+
classNames
|
|
439
|
+
})]
|
|
440
|
+
}, month.toString());
|
|
441
|
+
}),
|
|
442
|
+
/* @__PURE__ */ jsx("div", { style: { height: (count - 1 - to) * MONTH_HEIGHT } })
|
|
443
|
+
]
|
|
444
|
+
})]
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
/** A month in the scrolling list: its 48px subhead and six 48px weeks. */
|
|
448
|
+
const MONTH_HEIGHT = 336;
|
|
449
|
+
function YearList({ state, styles, yearRange, className, label, autoFocus, exiting, exitProps, onPick }) {
|
|
450
|
+
const current = today(getLocalTimeZone()).year;
|
|
451
|
+
const focusedYear = state.focusedDate.year;
|
|
452
|
+
const minYear = state.minValue?.year ?? -Infinity;
|
|
453
|
+
const maxYear = state.maxValue?.year ?? Infinity;
|
|
454
|
+
return /* @__PURE__ */ jsx("div", {
|
|
455
|
+
...exitProps,
|
|
456
|
+
role: "radiogroup",
|
|
457
|
+
"aria-label": label,
|
|
458
|
+
"aria-hidden": exiting || void 0,
|
|
459
|
+
inert: exiting || void 0,
|
|
460
|
+
"data-exiting": exiting || void 0,
|
|
461
|
+
className: styles.years(),
|
|
462
|
+
ref: (element) => {
|
|
463
|
+
if (exiting) return;
|
|
464
|
+
const selected = element?.querySelector("[aria-checked=\"true\"]");
|
|
465
|
+
selected?.scrollIntoView?.({ block: "center" });
|
|
466
|
+
if (autoFocus) selected?.focus({ preventScroll: true });
|
|
467
|
+
},
|
|
468
|
+
children: Array.from({ length: yearRange[1] - yearRange[0] + 1 }, (_, i) => yearRange[0] + i).map((year) => /* @__PURE__ */ jsx(ChoiceButton, {
|
|
469
|
+
selected: year === focusedYear,
|
|
470
|
+
disabled: year < minYear || year > maxYear,
|
|
471
|
+
"data-current": year === current || void 0,
|
|
472
|
+
steps: YEAR_STEPS,
|
|
473
|
+
className: styles.year({ class: className }),
|
|
474
|
+
onPick: () => {
|
|
475
|
+
state.setFocusedDate(state.focusedDate.set({ year }));
|
|
476
|
+
onPick();
|
|
477
|
+
},
|
|
478
|
+
children: year
|
|
479
|
+
}, year))
|
|
480
|
+
});
|
|
481
|
+
}
|
|
482
|
+
/** Three years to a row. */
|
|
483
|
+
const YEAR_STEPS = {
|
|
484
|
+
ArrowLeft: -1,
|
|
485
|
+
ArrowRight: 1,
|
|
486
|
+
ArrowUp: -3,
|
|
487
|
+
ArrowDown: 3
|
|
488
|
+
};
|
|
489
|
+
//#endregion
|
|
490
|
+
export { DatePicker, DateRangePicker };
|
|
491
|
+
|
|
492
|
+
//# sourceMappingURL=DatePicker.js.map
|