@windmorph/react 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/NOTICE +23 -0
- package/README.md +149 -2
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +112 -0
- package/dist/cli.js.map +1 -0
- package/dist/components/app-bar/AppBarItems.js +23 -0
- package/dist/components/app-bar/AppBarItems.js.map +1 -0
- package/dist/components/app-bar/TopAppBar.d.ts +89 -0
- package/dist/components/app-bar/TopAppBar.js +103 -0
- package/dist/components/app-bar/TopAppBar.js.map +1 -0
- package/dist/components/app-bar/app-bar-styles.d.ts +280 -0
- package/dist/components/app-bar/app-bar-styles.js +142 -0
- package/dist/components/app-bar/app-bar-styles.js.map +1 -0
- package/dist/components/app-bar/app-bar-tokens.d.ts +7 -0
- package/dist/components/app-bar/app-bar-tokens.js +64 -0
- package/dist/components/app-bar/app-bar-tokens.js.map +1 -0
- package/dist/components/app-bar/use-app-bar-scroll.d.ts +6 -0
- package/dist/components/app-bar/use-app-bar-scroll.js +139 -0
- package/dist/components/app-bar/use-app-bar-scroll.js.map +1 -0
- package/dist/components/autocomplete/Autocomplete.d.ts +142 -0
- package/dist/components/autocomplete/Autocomplete.js +284 -0
- package/dist/components/autocomplete/Autocomplete.js.map +1 -0
- package/dist/components/badge/Badge.d.ts +71 -0
- package/dist/components/badge/Badge.js +72 -0
- package/dist/components/badge/Badge.js.map +1 -0
- package/dist/components/badge/badge-styles.d.ts +100 -0
- package/dist/components/badge/badge-styles.js +43 -0
- package/dist/components/badge/badge-styles.js.map +1 -0
- package/dist/components/badge/badge-tokens.d.ts +7 -0
- package/dist/components/badge/badge-tokens.js +40 -0
- package/dist/components/badge/badge-tokens.js.map +1 -0
- package/dist/components/button/Button.d.ts +91 -0
- package/dist/components/button/Button.js +96 -0
- package/dist/components/button/Button.js.map +1 -0
- package/dist/components/button/ButtonContext.d.ts +30 -0
- package/dist/components/button/ButtonContext.js +18 -0
- package/dist/components/button/ButtonContext.js.map +1 -0
- package/dist/components/button/DensityZeroButtons.js +25 -0
- package/dist/components/button/DensityZeroButtons.js.map +1 -0
- package/dist/components/button/button-pending.d.ts +10 -0
- package/dist/components/button/button-pending.js +166 -0
- package/dist/components/button/button-pending.js.map +1 -0
- package/dist/components/button/button-styles.d.ts +216 -0
- package/dist/components/button/button-styles.js +199 -0
- package/dist/components/button/button-styles.js.map +1 -0
- package/dist/components/button/button-tokens.d.ts +10 -0
- package/dist/components/button/button-tokens.js +257 -0
- package/dist/components/button/button-tokens.js.map +1 -0
- package/dist/components/button/connected-shapes.js +152 -0
- package/dist/components/button/connected-shapes.js.map +1 -0
- package/dist/components/card/Card.d.ts +60 -0
- package/dist/components/card/Card.js +69 -0
- package/dist/components/card/Card.js.map +1 -0
- package/dist/components/card/card-styles.d.ts +42 -0
- package/dist/components/card/card-styles.js +64 -0
- package/dist/components/card/card-styles.js.map +1 -0
- package/dist/components/card/card-tokens.d.ts +7 -0
- package/dist/components/card/card-tokens.js +84 -0
- package/dist/components/card/card-tokens.js.map +1 -0
- package/dist/components/carousel/Carousel.d.ts +124 -0
- package/dist/components/carousel/Carousel.js +387 -0
- package/dist/components/carousel/Carousel.js.map +1 -0
- package/dist/components/carousel/carousel-keylines.js +486 -0
- package/dist/components/carousel/carousel-keylines.js.map +1 -0
- package/dist/components/carousel/carousel-press-area.js +35 -0
- package/dist/components/carousel/carousel-press-area.js.map +1 -0
- package/dist/components/carousel/carousel-styles.d.ts +188 -0
- package/dist/components/carousel/carousel-styles.js +116 -0
- package/dist/components/carousel/carousel-styles.js.map +1 -0
- package/dist/components/carousel/carousel-tokens.d.ts +7 -0
- package/dist/components/carousel/carousel-tokens.js +18 -0
- package/dist/components/carousel/carousel-tokens.js.map +1 -0
- package/dist/components/checkbox/Checkbox.d.ts +78 -0
- package/dist/components/checkbox/Checkbox.js +77 -0
- package/dist/components/checkbox/Checkbox.js.map +1 -0
- package/dist/components/checkbox/checkbox-box.js +34 -0
- package/dist/components/checkbox/checkbox-box.js.map +1 -0
- package/dist/components/checkbox/checkbox-styles.d.ts +100 -0
- package/dist/components/checkbox/checkbox-styles.js +54 -0
- package/dist/components/checkbox/checkbox-styles.js.map +1 -0
- package/dist/components/checkbox/checkbox-tokens.d.ts +7 -0
- package/dist/components/checkbox/checkbox-tokens.js +41 -0
- package/dist/components/checkbox/checkbox-tokens.js.map +1 -0
- package/dist/components/chip/Chip.d.ts +171 -0
- package/dist/components/chip/Chip.js +348 -0
- package/dist/components/chip/Chip.js.map +1 -0
- package/dist/components/chip/ChipSet.d.ts +70 -0
- package/dist/components/chip/ChipSet.js +198 -0
- package/dist/components/chip/ChipSet.js.map +1 -0
- package/dist/components/chip/chip-styles.d.ts +263 -0
- package/dist/components/chip/chip-styles.js +360 -0
- package/dist/components/chip/chip-styles.js.map +1 -0
- package/dist/components/chip/chip-tokens.d.ts +13 -0
- package/dist/components/chip/chip-tokens.js +185 -0
- package/dist/components/chip/chip-tokens.js.map +1 -0
- package/dist/components/date-picker/CalendarGrid.js +94 -0
- package/dist/components/date-picker/CalendarGrid.js.map +1 -0
- package/dist/components/date-picker/CompactDateDialog.js +63 -0
- package/dist/components/date-picker/CompactDateDialog.js.map +1 -0
- package/dist/components/date-picker/DateField.d.ts +161 -0
- package/dist/components/date-picker/DateField.js +393 -0
- package/dist/components/date-picker/DateField.js.map +1 -0
- package/dist/components/date-picker/DateInput.d.ts +20 -0
- package/dist/components/date-picker/DateInput.js +99 -0
- package/dist/components/date-picker/DateInput.js.map +1 -0
- package/dist/components/date-picker/DatePicker.d.ts +165 -0
- package/dist/components/date-picker/DatePicker.js +492 -0
- package/dist/components/date-picker/DatePicker.js.map +1 -0
- package/dist/components/date-picker/PickerDialog.d.ts +121 -0
- package/dist/components/date-picker/PickerDialog.js +161 -0
- package/dist/components/date-picker/PickerDialog.js.map +1 -0
- package/dist/components/date-picker/calendar-parts.js +141 -0
- package/dist/components/date-picker/calendar-parts.js.map +1 -0
- package/dist/components/date-picker/date-format.js +72 -0
- package/dist/components/date-picker/date-format.js.map +1 -0
- package/dist/components/date-picker/date-picker-styles.d.ts +247 -0
- package/dist/components/date-picker/date-picker-styles.js +163 -0
- package/dist/components/date-picker/date-picker-styles.js.map +1 -0
- package/dist/components/date-picker/date-picker-tokens.d.ts +7 -0
- package/dist/components/date-picker/date-picker-tokens.js +104 -0
- package/dist/components/date-picker/date-picker-tokens.js.map +1 -0
- package/dist/components/date-picker/picker-dialog-context.js +8 -0
- package/dist/components/date-picker/picker-dialog-context.js.map +1 -0
- package/dist/components/date-picker/picker-dialog-styles.d.ts +95 -0
- package/dist/components/date-picker/picker-dialog-styles.js +57 -0
- package/dist/components/date-picker/picker-dialog-styles.js.map +1 -0
- package/dist/components/date-picker/picker-icons.js +24 -0
- package/dist/components/date-picker/picker-icons.js.map +1 -0
- package/dist/components/date-picker/use-media-query.js +21 -0
- package/dist/components/date-picker/use-media-query.js.map +1 -0
- package/dist/components/date-picker/use-size-transform.js +62 -0
- package/dist/components/date-picker/use-size-transform.js.map +1 -0
- package/dist/components/date-picker/use-view-exit.js +68 -0
- package/dist/components/date-picker/use-view-exit.js.map +1 -0
- package/dist/components/dialog/Dialog.d.ts +267 -0
- package/dist/components/dialog/Dialog.js +521 -0
- package/dist/components/dialog/Dialog.js.map +1 -0
- package/dist/components/dialog/dialog-styles.d.ts +335 -0
- package/dist/components/dialog/dialog-styles.js +377 -0
- package/dist/components/dialog/dialog-styles.js.map +1 -0
- package/dist/components/dialog/dialog-tokens.d.ts +7 -0
- package/dist/components/dialog/dialog-tokens.js +57 -0
- package/dist/components/dialog/dialog-tokens.js.map +1 -0
- package/dist/components/divider/Divider.d.ts +59 -0
- package/dist/components/divider/Divider.js +53 -0
- package/dist/components/divider/Divider.js.map +1 -0
- package/dist/components/divider/divider-styles.d.ts +90 -0
- package/dist/components/divider/divider-styles.js +66 -0
- package/dist/components/divider/divider-styles.js.map +1 -0
- package/dist/components/divider/divider-tokens.d.ts +7 -0
- package/dist/components/divider/divider-tokens.js +16 -0
- package/dist/components/divider/divider-tokens.js.map +1 -0
- package/dist/components/fab/Fab.d.ts +130 -0
- package/dist/components/fab/Fab.js +137 -0
- package/dist/components/fab/Fab.js.map +1 -0
- package/dist/components/fab/FabTooltip.js +36 -0
- package/dist/components/fab/FabTooltip.js.map +1 -0
- package/dist/components/fab/fab-styles.d.ts +286 -0
- package/dist/components/fab/fab-styles.js +131 -0
- package/dist/components/fab/fab-styles.js.map +1 -0
- package/dist/components/fab/fab-tokens.d.ts +12 -0
- package/dist/components/fab/fab-tokens.js +105 -0
- package/dist/components/fab/fab-tokens.js.map +1 -0
- package/dist/components/fab-menu/FabMenu.d.ts +156 -0
- package/dist/components/fab-menu/FabMenu.js +291 -0
- package/dist/components/fab-menu/FabMenu.js.map +1 -0
- package/dist/components/fab-menu/fab-menu-stagger.js +51 -0
- package/dist/components/fab-menu/fab-menu-stagger.js.map +1 -0
- package/dist/components/fab-menu/fab-menu-styles.d.ts +166 -0
- package/dist/components/fab-menu/fab-menu-styles.js +107 -0
- package/dist/components/fab-menu/fab-menu-styles.js.map +1 -0
- package/dist/components/fab-menu/fab-menu-tokens.d.ts +7 -0
- package/dist/components/fab-menu/fab-menu-tokens.js +120 -0
- package/dist/components/fab-menu/fab-menu-tokens.js.map +1 -0
- package/dist/components/icon-button/IconButton.d.ts +125 -0
- package/dist/components/icon-button/IconButton.js +112 -0
- package/dist/components/icon-button/IconButton.js.map +1 -0
- package/dist/components/icon-button/icon-button-styles.d.ts +217 -0
- package/dist/components/icon-button/icon-button-styles.js +244 -0
- package/dist/components/icon-button/icon-button-styles.js.map +1 -0
- package/dist/components/icon-button/icon-button-tokens.d.ts +11 -0
- package/dist/components/icon-button/icon-button-tokens.js +215 -0
- package/dist/components/icon-button/icon-button-tokens.js.map +1 -0
- package/dist/components/list/List.d.ts +265 -0
- package/dist/components/list/List.js +1386 -0
- package/dist/components/list/List.js.map +1 -0
- package/dist/components/list/ListMedia.d.ts +88 -0
- package/dist/components/list/ListMedia.js +132 -0
- package/dist/components/list/ListMedia.js.map +1 -0
- package/dist/components/list/list-styles.d.ts +375 -0
- package/dist/components/list/list-styles.js +220 -0
- package/dist/components/list/list-styles.js.map +1 -0
- package/dist/components/list/list-tokens.d.ts +7 -0
- package/dist/components/list/list-tokens.js +92 -0
- package/dist/components/list/list-tokens.js.map +1 -0
- package/dist/components/loading-indicator/LoadingIndicator.d.ts +65 -0
- package/dist/components/loading-indicator/LoadingIndicator.js +92 -0
- package/dist/components/loading-indicator/LoadingIndicator.js.map +1 -0
- package/dist/components/loading-indicator/lazy-loading-indicator.js +25 -0
- package/dist/components/loading-indicator/lazy-loading-indicator.js.map +1 -0
- package/dist/components/loading-indicator/loading-indicator-frames.js +149 -0
- package/dist/components/loading-indicator/loading-indicator-frames.js.map +1 -0
- package/dist/components/loading-indicator/loading-indicator-styles.d.ts +36 -0
- package/dist/components/loading-indicator/loading-indicator-styles.js +22 -0
- package/dist/components/loading-indicator/loading-indicator-styles.js.map +1 -0
- package/dist/components/loading-indicator/loading-indicator-tokens.d.ts +7 -0
- package/dist/components/loading-indicator/loading-indicator-tokens.js +44 -0
- package/dist/components/loading-indicator/loading-indicator-tokens.js.map +1 -0
- package/dist/components/menu/Menu.d.ts +215 -0
- package/dist/components/menu/Menu.js +715 -0
- package/dist/components/menu/Menu.js.map +1 -0
- package/dist/components/menu/menu-styles.d.ts +354 -0
- package/dist/components/menu/menu-styles.js +219 -0
- package/dist/components/menu/menu-styles.js.map +1 -0
- package/dist/components/menu/menu-tokens.d.ts +7 -0
- package/dist/components/menu/menu-tokens.js +93 -0
- package/dist/components/menu/menu-tokens.js.map +1 -0
- package/dist/components/menu/menu-trigger.d.ts +51 -0
- package/dist/components/menu/menu-trigger.js +100 -0
- package/dist/components/menu/menu-trigger.js.map +1 -0
- package/dist/components/menu/use-reveal-entering.js +42 -0
- package/dist/components/menu/use-reveal-entering.js.map +1 -0
- package/dist/components/navigation/NavItem.d.ts +54 -0
- package/dist/components/navigation/NavItem.js +182 -0
- package/dist/components/navigation/NavItem.js.map +1 -0
- package/dist/components/navigation/NavigationBar.d.ts +64 -0
- package/dist/components/navigation/NavigationBar.js +121 -0
- package/dist/components/navigation/NavigationBar.js.map +1 -0
- package/dist/components/navigation/NavigationRail.d.ts +91 -0
- package/dist/components/navigation/NavigationRail.js +285 -0
- package/dist/components/navigation/NavigationRail.js.map +1 -0
- package/dist/components/navigation/nav-item-styles.d.ts +190 -0
- package/dist/components/navigation/nav-item-styles.js +123 -0
- package/dist/components/navigation/nav-item-styles.js.map +1 -0
- package/dist/components/navigation/navigation-styles.d.ts +239 -0
- package/dist/components/navigation/navigation-styles.js +134 -0
- package/dist/components/navigation/navigation-styles.js.map +1 -0
- package/dist/components/navigation/navigation-tokens.d.ts +9 -0
- package/dist/components/navigation/navigation-tokens.js +114 -0
- package/dist/components/navigation/navigation-tokens.js.map +1 -0
- package/dist/components/navigation/use-hide-on-scroll.js +115 -0
- package/dist/components/navigation/use-hide-on-scroll.js.map +1 -0
- package/dist/components/navigation/use-item-arrow-keys.js +37 -0
- package/dist/components/navigation/use-item-arrow-keys.js.map +1 -0
- package/dist/components/navigation/use-rail-item-morph.js +61 -0
- package/dist/components/navigation/use-rail-item-morph.js.map +1 -0
- package/dist/components/progress/ProgressIndicator.d.ts +95 -0
- package/dist/components/progress/ProgressIndicator.js +426 -0
- package/dist/components/progress/ProgressIndicator.js.map +1 -0
- package/dist/components/progress/progress-geometry.js +285 -0
- package/dist/components/progress/progress-geometry.js.map +1 -0
- package/dist/components/progress/progress-styles.d.ts +81 -0
- package/dist/components/progress/progress-styles.js +43 -0
- package/dist/components/progress/progress-styles.js.map +1 -0
- package/dist/components/progress/progress-tokens.d.ts +7 -0
- package/dist/components/progress/progress-tokens.js +39 -0
- package/dist/components/progress/progress-tokens.js.map +1 -0
- package/dist/components/pull-to-refresh/PullToRefresh.d.ts +94 -0
- package/dist/components/pull-to-refresh/PullToRefresh.js +395 -0
- package/dist/components/pull-to-refresh/PullToRefresh.js.map +1 -0
- package/dist/components/pull-to-refresh/pull-to-refresh-math.js +37 -0
- package/dist/components/pull-to-refresh/pull-to-refresh-math.js.map +1 -0
- package/dist/components/pull-to-refresh/pull-to-refresh-styles.d.ts +53 -0
- package/dist/components/pull-to-refresh/pull-to-refresh-styles.js +14 -0
- package/dist/components/pull-to-refresh/pull-to-refresh-styles.js.map +1 -0
- package/dist/components/radio/RadioGroup.d.ts +121 -0
- package/dist/components/radio/RadioGroup.js +163 -0
- package/dist/components/radio/RadioGroup.js.map +1 -0
- package/dist/components/radio/radio-ring.js +21 -0
- package/dist/components/radio/radio-ring.js.map +1 -0
- package/dist/components/radio/radio-styles.d.ts +155 -0
- package/dist/components/radio/radio-styles.js +60 -0
- package/dist/components/radio/radio-styles.js.map +1 -0
- package/dist/components/radio/radio-tokens.d.ts +7 -0
- package/dist/components/radio/radio-tokens.js +31 -0
- package/dist/components/radio/radio-tokens.js.map +1 -0
- package/dist/components/search/SearchAppBar.d.ts +45 -0
- package/dist/components/search/SearchAppBar.js +61 -0
- package/dist/components/search/SearchAppBar.js.map +1 -0
- package/dist/components/search/SearchBar.d.ts +147 -0
- package/dist/components/search/SearchBar.js +412 -0
- package/dist/components/search/SearchBar.js.map +1 -0
- package/dist/components/search/search-styles.d.ts +243 -0
- package/dist/components/search/search-styles.js +143 -0
- package/dist/components/search/search-styles.js.map +1 -0
- package/dist/components/search/search-tokens.d.ts +9 -0
- package/dist/components/search/search-tokens.js +70 -0
- package/dist/components/search/search-tokens.js.map +1 -0
- package/dist/components/select/Select.d.ts +187 -0
- package/dist/components/select/Select.js +319 -0
- package/dist/components/select/Select.js.map +1 -0
- package/dist/components/select/field-shell.d.ts +29 -0
- package/dist/components/select/field-shell.js +135 -0
- package/dist/components/select/field-shell.js.map +1 -0
- package/dist/components/select/option-list.d.ts +81 -0
- package/dist/components/select/option-list.js +291 -0
- package/dist/components/select/option-list.js.map +1 -0
- package/dist/components/select/search-list.js +135 -0
- package/dist/components/select/search-list.js.map +1 -0
- package/dist/components/select/selection-cap.js +30 -0
- package/dist/components/select/selection-cap.js.map +1 -0
- package/dist/components/sheet/BottomSheet.d.ts +154 -0
- package/dist/components/sheet/BottomSheet.js +442 -0
- package/dist/components/sheet/BottomSheet.js.map +1 -0
- package/dist/components/sheet/SheetTrigger.d.ts +25 -0
- package/dist/components/sheet/SheetTrigger.js +46 -0
- package/dist/components/sheet/SheetTrigger.js.map +1 -0
- package/dist/components/sheet/SideSheet.d.ts +139 -0
- package/dist/components/sheet/SideSheet.js +289 -0
- package/dist/components/sheet/SideSheet.js.map +1 -0
- package/dist/components/sheet/bottom-sheet-gesture.js +30 -0
- package/dist/components/sheet/bottom-sheet-gesture.js.map +1 -0
- package/dist/components/sheet/lazy-bottom-sheet.js +33 -0
- package/dist/components/sheet/lazy-bottom-sheet.js.map +1 -0
- package/dist/components/sheet/sheet-gesture.js +48 -0
- package/dist/components/sheet/sheet-gesture.js.map +1 -0
- package/dist/components/sheet/sheet-icons.js +31 -0
- package/dist/components/sheet/sheet-icons.js.map +1 -0
- package/dist/components/sheet/sheet-settle.js +58 -0
- package/dist/components/sheet/sheet-settle.js.map +1 -0
- package/dist/components/sheet/sheet-styles.d.ts +312 -0
- package/dist/components/sheet/sheet-styles.js +229 -0
- package/dist/components/sheet/sheet-styles.js.map +1 -0
- package/dist/components/sheet/sheet-tokens.d.ts +12 -0
- package/dist/components/sheet/sheet-tokens.js +115 -0
- package/dist/components/sheet/sheet-tokens.js.map +1 -0
- package/dist/components/sheet/side-swipe-gesture.js +22 -0
- package/dist/components/sheet/side-swipe-gesture.js.map +1 -0
- package/dist/components/sheet/use-peek-inert.js +32 -0
- package/dist/components/sheet/use-peek-inert.js.map +1 -0
- package/dist/components/sheet/use-side-swipe.js +174 -0
- package/dist/components/sheet/use-side-swipe.js.map +1 -0
- package/dist/components/slider/Slider.d.ts +129 -0
- package/dist/components/slider/Slider.js +295 -0
- package/dist/components/slider/Slider.js.map +1 -0
- package/dist/components/slider/slider-geometry.js +138 -0
- package/dist/components/slider/slider-geometry.js.map +1 -0
- package/dist/components/slider/slider-styles.d.ts +133 -0
- package/dist/components/slider/slider-styles.js +97 -0
- package/dist/components/slider/slider-styles.js.map +1 -0
- package/dist/components/slider/slider-tokens.d.ts +7 -0
- package/dist/components/slider/slider-tokens.js +66 -0
- package/dist/components/slider/slider-tokens.js.map +1 -0
- package/dist/components/slider/use-touch-track.js +138 -0
- package/dist/components/slider/use-touch-track.js.map +1 -0
- package/dist/components/snackbar/Snackbar.d.ts +96 -0
- package/dist/components/snackbar/Snackbar.js +253 -0
- package/dist/components/snackbar/Snackbar.js.map +1 -0
- package/dist/components/snackbar/snackbar-state.d.ts +58 -0
- package/dist/components/snackbar/snackbar-state.js +73 -0
- package/dist/components/snackbar/snackbar-state.js.map +1 -0
- package/dist/components/snackbar/snackbar-styles.d.ts +109 -0
- package/dist/components/snackbar/snackbar-styles.js +67 -0
- package/dist/components/snackbar/snackbar-styles.js.map +1 -0
- package/dist/components/snackbar/snackbar-tokens.d.ts +7 -0
- package/dist/components/snackbar/snackbar-tokens.js +54 -0
- package/dist/components/snackbar/snackbar-tokens.js.map +1 -0
- package/dist/components/split-button/SplitButton.d.ts +109 -0
- package/dist/components/split-button/SplitButton.js +195 -0
- package/dist/components/split-button/SplitButton.js.map +1 -0
- package/dist/components/split-button/split-button-styles.d.ts +214 -0
- package/dist/components/split-button/split-button-styles.js +164 -0
- package/dist/components/split-button/split-button-styles.js.map +1 -0
- package/dist/components/split-button/split-button-tokens.d.ts +7 -0
- package/dist/components/split-button/split-button-tokens.js +36 -0
- package/dist/components/split-button/split-button-tokens.js.map +1 -0
- package/dist/components/switch/Switch.d.ts +82 -0
- package/dist/components/switch/Switch.js +165 -0
- package/dist/components/switch/Switch.js.map +1 -0
- package/dist/components/switch/switch-styles.d.ts +96 -0
- package/dist/components/switch/switch-styles.js +68 -0
- package/dist/components/switch/switch-styles.js.map +1 -0
- package/dist/components/switch/switch-thumb.js +41 -0
- package/dist/components/switch/switch-thumb.js.map +1 -0
- package/dist/components/switch/switch-tokens.d.ts +7 -0
- package/dist/components/switch/switch-tokens.js +78 -0
- package/dist/components/switch/switch-tokens.js.map +1 -0
- package/dist/components/tabs/Tabs.d.ts +120 -0
- package/dist/components/tabs/Tabs.js +346 -0
- package/dist/components/tabs/Tabs.js.map +1 -0
- package/dist/components/tabs/tabs-styles.d.ts +198 -0
- package/dist/components/tabs/tabs-styles.js +99 -0
- package/dist/components/tabs/tabs-styles.js.map +1 -0
- package/dist/components/tabs/tabs-tokens.d.ts +7 -0
- package/dist/components/tabs/tabs-tokens.js +121 -0
- package/dist/components/tabs/tabs-tokens.js.map +1 -0
- package/dist/components/text-field/TextField.d.ts +175 -0
- package/dist/components/text-field/TextField.js +250 -0
- package/dist/components/text-field/TextField.js.map +1 -0
- package/dist/components/text-field/text-field-styles.d.ts +252 -0
- package/dist/components/text-field/text-field-styles.js +209 -0
- package/dist/components/text-field/text-field-styles.js.map +1 -0
- package/dist/components/text-field/text-field-tokens.d.ts +7 -0
- package/dist/components/text-field/text-field-tokens.js +177 -0
- package/dist/components/text-field/text-field-tokens.js.map +1 -0
- package/dist/components/time-picker/TimePicker.d.ts +142 -0
- package/dist/components/time-picker/TimePicker.js +700 -0
- package/dist/components/time-picker/TimePicker.js.map +1 -0
- package/dist/components/time-picker/time-picker-styles.d.ts +175 -0
- package/dist/components/time-picker/time-picker-styles.js +112 -0
- package/dist/components/time-picker/time-picker-styles.js.map +1 -0
- package/dist/components/time-picker/time-picker-tokens.d.ts +7 -0
- package/dist/components/time-picker/time-picker-tokens.js +86 -0
- package/dist/components/time-picker/time-picker-tokens.js.map +1 -0
- package/dist/components/toolbar/Toolbar.d.ts +209 -0
- package/dist/components/toolbar/Toolbar.js +282 -0
- package/dist/components/toolbar/Toolbar.js.map +1 -0
- package/dist/components/toolbar/toolbar-styles.d.ts +403 -0
- package/dist/components/toolbar/toolbar-styles.js +253 -0
- package/dist/components/toolbar/toolbar-styles.js.map +1 -0
- package/dist/components/toolbar/toolbar-tokens.d.ts +27 -0
- package/dist/components/toolbar/toolbar-tokens.js +117 -0
- package/dist/components/toolbar/toolbar-tokens.js.map +1 -0
- package/dist/components/toolbar/use-toolbar-scroll-expansion.d.ts +56 -0
- package/dist/components/toolbar/use-toolbar-scroll-expansion.js +86 -0
- package/dist/components/toolbar/use-toolbar-scroll-expansion.js.map +1 -0
- package/dist/components/tooltip/Tooltip.d.ts +131 -0
- package/dist/components/tooltip/Tooltip.js +388 -0
- package/dist/components/tooltip/Tooltip.js.map +1 -0
- package/dist/components/tooltip/lazy-tooltip.js +35 -0
- package/dist/components/tooltip/lazy-tooltip.js.map +1 -0
- package/dist/components/tooltip/tooltip-placement.d.ts +16 -0
- package/dist/components/tooltip/tooltip-placement.js +14 -0
- package/dist/components/tooltip/tooltip-placement.js.map +1 -0
- package/dist/components/tooltip/tooltip-styles.d.ts +142 -0
- package/dist/components/tooltip/tooltip-styles.js +81 -0
- package/dist/components/tooltip/tooltip-styles.js.map +1 -0
- package/dist/components/tooltip/tooltip-tokens.d.ts +9 -0
- package/dist/components/tooltip/tooltip-tokens.js +72 -0
- package/dist/components/tooltip/tooltip-tokens.js.map +1 -0
- package/dist/components/tooltip/tooltip-trigger.d.ts +42 -0
- package/dist/components/tooltip/tooltip-trigger.js +115 -0
- package/dist/components/tooltip/tooltip-trigger.js.map +1 -0
- package/dist/composites/button-group/ButtonGroup.d.ts +116 -0
- package/dist/composites/button-group/ButtonGroup.js +270 -0
- package/dist/composites/button-group/ButtonGroup.js.map +1 -0
- package/dist/composites/button-group/button-group-styles.d.ts +73 -0
- package/dist/composites/button-group/button-group-styles.js +87 -0
- package/dist/composites/button-group/button-group-styles.js.map +1 -0
- package/dist/composites/button-group/lazy-overflow-menu.js +43 -0
- package/dist/composites/button-group/lazy-overflow-menu.js.map +1 -0
- package/dist/composites/button-group/overflow-menu-list.js +26 -0
- package/dist/composites/button-group/overflow-menu-list.js.map +1 -0
- package/dist/composites/button-group/use-overflow.js +75 -0
- package/dist/composites/button-group/use-overflow.js.map +1 -0
- package/dist/composites/button-group/use-press-expansion.js +155 -0
- package/dist/composites/button-group/use-press-expansion.js.map +1 -0
- package/dist/index.d.ts +142 -0
- package/dist/index.js +136 -0
- package/dist/motion/get-m3-spring.d.ts +6 -0
- package/dist/motion/get-m3-spring.js +10 -0
- package/dist/motion/get-m3-spring.js.map +1 -0
- package/dist/motion/reduced-motion.js +19 -0
- package/dist/motion/reduced-motion.js.map +1 -0
- package/dist/motion/use-m3-spring.d.ts +13 -0
- package/dist/motion/use-m3-spring.js +22 -0
- package/dist/motion/use-m3-spring.js.map +1 -0
- package/dist/next/NextRouterProvider.d.ts +13 -0
- package/dist/next/NextRouterProvider.js +26 -0
- package/dist/next/NextRouterProvider.js.map +1 -0
- package/dist/next/get-theme-from-cookies.d.ts +32 -0
- package/dist/next/get-theme-from-cookies.js +27 -0
- package/dist/next/get-theme-from-cookies.js.map +1 -0
- package/dist/next/navigation-guard.d.ts +30 -0
- package/dist/next/navigation-guard.js +68 -0
- package/dist/next/navigation-guard.js.map +1 -0
- package/dist/next.d.ts +5 -0
- package/dist/next.js +5 -0
- package/dist/primitives/ButtonBase.d.ts +115 -0
- package/dist/primitives/ButtonBase.js +231 -0
- package/dist/primitives/ButtonBase.js.map +1 -0
- package/dist/primitives/DomDirectionLocale.d.ts +18 -0
- package/dist/primitives/DomDirectionLocale.js +28 -0
- package/dist/primitives/DomDirectionLocale.js.map +1 -0
- package/dist/primitives/Field.d.ts +50 -0
- package/dist/primitives/Field.js +74 -0
- package/dist/primitives/Field.js.map +1 -0
- package/dist/primitives/IconFaces.js +23 -0
- package/dist/primitives/IconFaces.js.map +1 -0
- package/dist/primitives/Overlay.d.ts +39 -0
- package/dist/primitives/Overlay.js +86 -0
- package/dist/primitives/Overlay.js.map +1 -0
- package/dist/primitives/SelectionControl.d.ts +55 -0
- package/dist/primitives/SelectionControl.js +58 -0
- package/dist/primitives/SelectionControl.js.map +1 -0
- package/dist/primitives/Surface.d.ts +123 -0
- package/dist/primitives/Surface.js +68 -0
- package/dist/primitives/Surface.js.map +1 -0
- package/dist/primitives/ToolbarContext.js +12 -0
- package/dist/primitives/ToolbarContext.js.map +1 -0
- package/dist/primitives/TouchTarget.d.ts +14 -0
- package/dist/primitives/TouchTarget.js +20 -0
- package/dist/primitives/TouchTarget.js.map +1 -0
- package/dist/primitives/TriggerContext.d.ts +34 -0
- package/dist/primitives/TriggerContext.js +24 -0
- package/dist/primitives/TriggerContext.js.map +1 -0
- package/dist/primitives/hidden-input-focus.js +27 -0
- package/dist/primitives/hidden-input-focus.js.map +1 -0
- package/dist/primitives/icon-faces-styles.d.ts +9 -0
- package/dist/primitives/icon-faces-styles.js +45 -0
- package/dist/primitives/icon-faces-styles.js.map +1 -0
- package/dist/primitives/locale-with-direction.d.ts +9 -0
- package/dist/primitives/locale-with-direction.js +17 -0
- package/dist/primitives/locale-with-direction.js.map +1 -0
- package/dist/primitives/morph-path.d.ts +25 -0
- package/dist/primitives/morph-path.js +38 -0
- package/dist/primitives/morph-path.js.map +1 -0
- package/dist/primitives/selection-control-styles.d.ts +54 -0
- package/dist/primitives/selection-control-styles.js +44 -0
- package/dist/primitives/selection-control-styles.js.map +1 -0
- package/dist/primitives/use-m3-interaction.d.ts +51 -0
- package/dist/primitives/use-m3-interaction.js +149 -0
- package/dist/primitives/use-m3-interaction.js.map +1 -0
- package/dist/primitives/use-m3-morph.d.ts +18 -0
- package/dist/primitives/use-m3-morph.js +36 -0
- package/dist/primitives/use-m3-morph.js.map +1 -0
- package/dist/primitives/use-presence.d.ts +19 -0
- package/dist/primitives/use-presence.js +37 -0
- package/dist/primitives/use-presence.js.map +1 -0
- package/dist/primitives.d.ts +36 -0
- package/dist/primitives.js +34 -0
- package/dist/shapes/corner-rounding.d.ts +13 -0
- package/dist/shapes/corner-rounding.js +18 -0
- package/dist/shapes/corner-rounding.js.map +1 -0
- package/dist/shapes/cubic.d.ts +52 -0
- package/dist/shapes/cubic.js +189 -0
- package/dist/shapes/cubic.js.map +1 -0
- package/dist/shapes/feature-mapping.js +80 -0
- package/dist/shapes/feature-mapping.js.map +1 -0
- package/dist/shapes/features.d.ts +23 -0
- package/dist/shapes/features.js +82 -0
- package/dist/shapes/features.js.map +1 -0
- package/dist/shapes/float-mapping.js +65 -0
- package/dist/shapes/float-mapping.js.map +1 -0
- package/dist/shapes/generated/material-shape-path-record.d.ts +11 -0
- package/dist/shapes/generated/material-shape-path-record.js +48 -0
- package/dist/shapes/generated/material-shape-path-record.js.map +1 -0
- package/dist/shapes/generated/material-shape-paths.d.ts +78 -0
- package/dist/shapes/generated/material-shape-paths.js +218 -0
- package/dist/shapes/generated/material-shape-paths.js.map +1 -0
- package/dist/shapes/mask.d.ts +14 -0
- package/dist/shapes/mask.js +24 -0
- package/dist/shapes/mask.js.map +1 -0
- package/dist/shapes/material-shapes.d.ts +11 -0
- package/dist/shapes/material-shapes.js +250 -0
- package/dist/shapes/material-shapes.js.map +1 -0
- package/dist/shapes/morph.d.ts +25 -0
- package/dist/shapes/morph.js +97 -0
- package/dist/shapes/morph.js.map +1 -0
- package/dist/shapes/path.d.ts +33 -0
- package/dist/shapes/path.js +47 -0
- package/dist/shapes/path.js.map +1 -0
- package/dist/shapes/point.d.ts +28 -0
- package/dist/shapes/point.js +103 -0
- package/dist/shapes/point.js.map +1 -0
- package/dist/shapes/polygon-measure.js +140 -0
- package/dist/shapes/polygon-measure.js.map +1 -0
- package/dist/shapes/rounded-polygon.d.ts +44 -0
- package/dist/shapes/rounded-polygon.js +278 -0
- package/dist/shapes/rounded-polygon.js.map +1 -0
- package/dist/shapes/shape-path.d.ts +15 -0
- package/dist/shapes/shapes.d.ts +53 -0
- package/dist/shapes/shapes.js +171 -0
- package/dist/shapes/shapes.js.map +1 -0
- package/dist/styles/generated/components.css +710 -0
- package/dist/styles/generated/theme.css +247 -0
- package/dist/styles/generated/themes.css +3361 -0
- package/dist/styles/generated/tokens.css +284 -0
- package/dist/styles/styles.css +15 -0
- package/dist/styles/utilities.css +283 -0
- package/dist/styles.compiled.css +2 -0
- package/dist/theme/ThemeProvider.d.ts +72 -0
- package/dist/theme/ThemeProvider.js +144 -0
- package/dist/theme/ThemeProvider.js.map +1 -0
- package/dist/theme/ThemeScope.d.ts +32 -0
- package/dist/theme/ThemeScope.js +67 -0
- package/dist/theme/ThemeScope.js.map +1 -0
- package/dist/theme/ThemeScript.d.ts +26 -0
- package/dist/theme/ThemeScript.js +44 -0
- package/dist/theme/ThemeScript.js.map +1 -0
- package/dist/theme/context.d.ts +32 -0
- package/dist/theme/context.js +47 -0
- package/dist/theme/context.js.map +1 -0
- package/dist/theme/create-theme.d.ts +60 -0
- package/dist/theme/create-theme.js +47 -0
- package/dist/theme/create-theme.js.map +1 -0
- package/dist/theme/css.js +54 -0
- package/dist/theme/css.js.map +1 -0
- package/dist/theme/parse-palettes.js +40 -0
- package/dist/theme/parse-palettes.js.map +1 -0
- package/dist/theme/scheme.d.ts +6 -0
- package/dist/theme/scheme.js +118 -0
- package/dist/theme/scheme.js.map +1 -0
- package/dist/theme/state.d.ts +38 -0
- package/dist/theme/state.js +93 -0
- package/dist/theme/state.js.map +1 -0
- package/dist/theme/storage.js +21 -0
- package/dist/theme/storage.js.map +1 -0
- package/dist/tokens/breakpoints.d.ts +15 -0
- package/dist/tokens/breakpoints.js +16 -0
- package/dist/tokens/breakpoints.js.map +1 -0
- package/dist/tokens/color.d.ts +104 -0
- package/dist/tokens/color.js +147 -0
- package/dist/tokens/color.js.map +1 -0
- package/dist/tokens/component.d.ts +110 -0
- package/dist/tokens/component.js +67 -0
- package/dist/tokens/component.js.map +1 -0
- package/dist/tokens/density.d.ts +20 -0
- package/dist/tokens/density.js +27 -0
- package/dist/tokens/density.js.map +1 -0
- package/dist/tokens/elevation.d.ts +44 -0
- package/dist/tokens/elevation.js +45 -0
- package/dist/tokens/elevation.js.map +1 -0
- package/dist/tokens/motion.d.ts +79 -0
- package/dist/tokens/motion.js +126 -0
- package/dist/tokens/motion.js.map +1 -0
- package/dist/tokens/shape.d.ts +22 -0
- package/dist/tokens/shape.js +22 -0
- package/dist/tokens/shape.js.map +1 -0
- package/dist/tokens/spring-velocity.d.ts +19 -0
- package/dist/tokens/spring-velocity.js +44 -0
- package/dist/tokens/spring-velocity.js.map +1 -0
- package/dist/tokens/state.d.ts +18 -0
- package/dist/tokens/state.js +19 -0
- package/dist/tokens/state.js.map +1 -0
- package/dist/tokens/typography.d.ts +64 -0
- package/dist/tokens/typography.js +60 -0
- package/dist/tokens/typography.js.map +1 -0
- package/dist/tokens/z-index.d.ts +17 -0
- package/dist/tokens/z-index.js +18 -0
- package/dist/tokens/z-index.js.map +1 -0
- package/dist/utils/announce.js +51 -0
- package/dist/utils/announce.js.map +1 -0
- package/dist/utils/assert-collection-children.js +26 -0
- package/dist/utils/assert-collection-children.js.map +1 -0
- package/dist/utils/closed-by.d.ts +9 -0
- package/dist/utils/closed-by.js +12 -0
- package/dist/utils/closed-by.js.map +1 -0
- package/dist/utils/cn.d.ts +31 -0
- package/dist/utils/cn.js +37 -0
- package/dist/utils/cn.js.map +1 -0
- package/dist/utils/composite-keys.js +32 -0
- package/dist/utils/composite-keys.js.map +1 -0
- package/dist/utils/focus-visible.js +14 -0
- package/dist/utils/focus-visible.js.map +1 -0
- package/dist/utils/focus.js +51 -0
- package/dist/utils/focus.js.map +1 -0
- package/dist/utils/focusable-disabled.js +12 -0
- package/dist/utils/focusable-disabled.js.map +1 -0
- package/dist/utils/keep-pressed-in-place.d.ts +60 -0
- package/dist/utils/keep-pressed-in-place.js +127 -0
- package/dist/utils/keep-pressed-in-place.js.map +1 -0
- package/dist/utils/load-on-demand.js +111 -0
- package/dist/utils/load-on-demand.js.map +1 -0
- package/dist/utils/merge-data-tokens.d.ts +9 -0
- package/dist/utils/merge-data-tokens.js +15 -0
- package/dist/utils/merge-data-tokens.js.map +1 -0
- package/dist/utils/natural-size.js +53 -0
- package/dist/utils/natural-size.js.map +1 -0
- package/dist/utils/nearest-reveal.js +28 -0
- package/dist/utils/nearest-reveal.js.map +1 -0
- package/dist/utils/placement.js +14 -0
- package/dist/utils/placement.js.map +1 -0
- package/dist/utils/radio-group-keys.js +74 -0
- package/dist/utils/radio-group-keys.js.map +1 -0
- package/dist/utils/rendered-description.js +17 -0
- package/dist/utils/rendered-description.js.map +1 -0
- package/dist/utils/root-props.d.ts +103 -0
- package/dist/utils/root-props.js +51 -0
- package/dist/utils/root-props.js.map +1 -0
- package/dist/utils/search.d.ts +11 -0
- package/dist/utils/search.js +18 -0
- package/dist/utils/search.js.map +1 -0
- package/dist/utils/shortcut.js +20 -0
- package/dist/utils/shortcut.js.map +1 -0
- package/dist/utils/split-data-attributes.d.ts +12 -0
- package/dist/utils/split-data-attributes.js +20 -0
- package/dist/utils/split-data-attributes.js.map +1 -0
- package/dist/utils/toolbar-keys.js +28 -0
- package/dist/utils/toolbar-keys.js.map +1 -0
- package/dist/utils/tv.d.ts +7 -0
- package/dist/utils/tv.js +9 -0
- package/dist/utils/tv.js.map +1 -0
- package/dist/utils/typeahead.js +64 -0
- package/dist/utils/typeahead.js.map +1 -0
- package/dist/utils/warn-once.js +30 -0
- package/dist/utils/warn-once.js.map +1 -0
- package/dist/vendor/material-color-utilities/blend/blend.js +88 -0
- package/dist/vendor/material-color-utilities/blend/blend.js.map +1 -0
- package/dist/vendor/material-color-utilities/contrast/contrast.js +131 -0
- package/dist/vendor/material-color-utilities/contrast/contrast.js.map +1 -0
- package/dist/vendor/material-color-utilities/dislike/dislike_analyzer.js +58 -0
- package/dist/vendor/material-color-utilities/dislike/dislike_analyzer.js.map +1 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/color_spec_2021.js +620 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/color_spec_2021.js.map +1 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/color_spec_2025.js +786 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/color_spec_2025.js.map +1 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/contrast_curve.js +59 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/contrast_curve.js.map +1 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/dynamic_color.js +420 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/dynamic_color.js.map +1 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/dynamic_scheme.js +701 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/dynamic_scheme.js.map +1 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/material_dynamic_colors.js +374 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/material_dynamic_colors.js.map +1 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/tone_delta_pair.js +65 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/tone_delta_pair.js.map +1 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/variant.js +38 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/variant.js.map +1 -0
- package/dist/vendor/material-color-utilities/hct/cam16.js +309 -0
- package/dist/vendor/material-color-utilities/hct/cam16.js.map +1 -0
- package/dist/vendor/material-color-utilities/hct/hct.js +148 -0
- package/dist/vendor/material-color-utilities/hct/hct.js.map +1 -0
- package/dist/vendor/material-color-utilities/hct/hct_solver.js +660 -0
- package/dist/vendor/material-color-utilities/hct/hct_solver.js.map +1 -0
- package/dist/vendor/material-color-utilities/hct/viewing_conditions.js +117 -0
- package/dist/vendor/material-color-utilities/hct/viewing_conditions.js.map +1 -0
- package/dist/vendor/material-color-utilities/index.js +51 -0
- package/dist/vendor/material-color-utilities/index.js.map +1 -0
- package/dist/vendor/material-color-utilities/palettes/core_palette.js +22 -0
- package/dist/vendor/material-color-utilities/palettes/core_palette.js.map +1 -0
- package/dist/vendor/material-color-utilities/palettes/tonal_palette.js +134 -0
- package/dist/vendor/material-color-utilities/palettes/tonal_palette.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme.js +21 -0
- package/dist/vendor/material-color-utilities/scheme/scheme.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_android.js +21 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_android.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_content.js +22 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_content.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_expressive.js +38 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_expressive.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_fidelity.js +22 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_fidelity.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_fruit_salad.js +22 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_fruit_salad.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_monochrome.js +22 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_monochrome.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_neutral.js +36 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_neutral.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_rainbow.js +22 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_rainbow.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_tonal_spot.js +41 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_tonal_spot.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_vibrant.js +39 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_vibrant.js.map +1 -0
- package/dist/vendor/material-color-utilities/score/score.js +115 -0
- package/dist/vendor/material-color-utilities/score/score.js.map +1 -0
- package/dist/vendor/material-color-utilities/temperature/temperature_cache.js +227 -0
- package/dist/vendor/material-color-utilities/temperature/temperature_cache.js.map +1 -0
- package/dist/vendor/material-color-utilities/utils/color_utils.js +246 -0
- package/dist/vendor/material-color-utilities/utils/color_utils.js.map +1 -0
- package/dist/vendor/material-color-utilities/utils/image_utils.js +21 -0
- package/dist/vendor/material-color-utilities/utils/image_utils.js.map +1 -0
- package/dist/vendor/material-color-utilities/utils/math_utils.js +119 -0
- package/dist/vendor/material-color-utilities/utils/math_utils.js.map +1 -0
- package/dist/vendor/material-color-utilities/utils/string_utils.js +74 -0
- package/dist/vendor/material-color-utilities/utils/string_utils.js.map +1 -0
- package/dist/vendor/material-color-utilities/utils/theme_utils.js +24 -0
- package/dist/vendor/material-color-utilities/utils/theme_utils.js.map +1 -0
- package/package.json +114 -3
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../utils/cn.js";
|
|
3
|
+
import { mergeDataTokens } from "../../utils/merge-data-tokens.js";
|
|
4
|
+
import { searchAppBarStyles } from "./search-styles.js";
|
|
5
|
+
import { AppBarItems } from "../app-bar/AppBarItems.js";
|
|
6
|
+
import { useAppBarScroll } from "../app-bar/use-app-bar-scroll.js";
|
|
7
|
+
import { SearchAppBarContext } from "./SearchBar.js";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { useObjectRef } from "react-aria";
|
|
10
|
+
//#region src/components/search/SearchAppBar.tsx
|
|
11
|
+
/**
|
|
12
|
+
* M3 Expressive app bar with search (Compose's `AppBarWithSearch`): a top bar whose middle
|
|
13
|
+
* is a search bar, with an optional navigation icon and actions.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* <SearchAppBar navigationIcon={<IconButton icon={<MenuIcon />} aria-label="Menu" />}
|
|
17
|
+
* actions={<Avatar />} scrollBehavior="enter-always">
|
|
18
|
+
* <SearchBar aria-label="Search" placeholder="Search" leadingIcon={<SearchIcon />} />
|
|
19
|
+
* </SearchAppBar>
|
|
20
|
+
*/
|
|
21
|
+
function SearchAppBar({ children, navigationIcon, actions, scrollBehavior, scrollRef, classNames, className, ref, ...rest }) {
|
|
22
|
+
const rootRef = useObjectRef(ref);
|
|
23
|
+
const scroll = useAppBarScroll({
|
|
24
|
+
behavior: scrollBehavior,
|
|
25
|
+
rootRef,
|
|
26
|
+
collapsibleRef: rootRef,
|
|
27
|
+
scrollRef,
|
|
28
|
+
twoRows: false
|
|
29
|
+
});
|
|
30
|
+
const styles = searchAppBarStyles({ scrolling: scrollBehavior != null });
|
|
31
|
+
return /* @__PURE__ */ jsx("header", {
|
|
32
|
+
...rest,
|
|
33
|
+
ref: rootRef,
|
|
34
|
+
"data-tokens": mergeDataTokens("md-comp-app-bar", rest),
|
|
35
|
+
"data-scrolled": scroll.scrolled || void 0,
|
|
36
|
+
className: styles.root({ class: cn(classNames?.root, className) }),
|
|
37
|
+
children: /* @__PURE__ */ jsxs(AppBarItems, { children: [
|
|
38
|
+
navigationIcon != null && /* @__PURE__ */ jsx("div", {
|
|
39
|
+
"data-slot": "navigation",
|
|
40
|
+
className: styles.navigation({ class: classNames?.navigation }),
|
|
41
|
+
children: navigationIcon
|
|
42
|
+
}),
|
|
43
|
+
/* @__PURE__ */ jsx("div", {
|
|
44
|
+
className: styles.search({ class: classNames?.search }),
|
|
45
|
+
children: /* @__PURE__ */ jsx(SearchAppBarContext, {
|
|
46
|
+
value: { scrolled: scroll.scrolled },
|
|
47
|
+
children
|
|
48
|
+
})
|
|
49
|
+
}),
|
|
50
|
+
actions != null && /* @__PURE__ */ jsx("div", {
|
|
51
|
+
"data-slot": "actions",
|
|
52
|
+
className: styles.actions({ class: classNames?.actions }),
|
|
53
|
+
children: actions
|
|
54
|
+
})
|
|
55
|
+
] })
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
export { SearchAppBar };
|
|
60
|
+
|
|
61
|
+
//# sourceMappingURL=SearchAppBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchAppBar.js","names":[],"sources":["../../../src/components/search/SearchAppBar.tsx"],"sourcesContent":["'use client';\n\nimport type { ComponentPropsWithRef, ReactNode, RefObject } from 'react';\nimport { useObjectRef } from 'react-aria';\nimport { cn } from '../../utils/cn';\nimport { AppBarItems } from '../app-bar/AppBarItems';\nimport { useAppBarScroll } from '../app-bar/use-app-bar-scroll';\nimport { SearchAppBarContext } from './SearchBar';\nimport { searchAppBarStyles } from './search-styles';\nimport { mergeDataTokens } from '../../utils/merge-data-tokens';\n\nexport interface SearchAppBarClassNames {\n /** The `<header>` container, merged with `className`. */\n root?: string;\n /** The leading slot holding `navigationIcon`. */\n navigation?: string;\n /** The area holding the search bar. */\n search?: string;\n /** The trailing slot holding `actions`. */\n actions?: string;\n}\n\ninterface SearchAppBarOwnProps {\n /** The `SearchBar`. It fills the free space, up to 720px, centred. */\n children: ReactNode;\n /** A leading control, e.g. a menu `IconButton`. */\n navigationIcon?: ReactNode;\n /** Trailing controls, e.g. an avatar or `IconButton`s. */\n actions?: ReactNode;\n /**\n * Respond to content scrolling under the bar: it sticks to the top and turns\n * `surface-container` (its search bar `surface-container-highest`); `enter-always` also\n * hides it on scroll down and brings it back on any scroll up. Leave it out for a static\n * bar positioned by the consumer.\n */\n scrollBehavior?: 'pinned' | 'enter-always';\n /** The scroll container the bar responds to. Defaults to the window. */\n scrollRef?: RefObject<HTMLElement | null>;\n /** Classes for each part, by slot. */\n classNames?: SearchAppBarClassNames;\n}\n\nexport type SearchAppBarProps = SearchAppBarOwnProps &\n Omit<ComponentPropsWithRef<'header'>, keyof SearchAppBarOwnProps>;\n\n/**\n * M3 Expressive app bar with search (Compose's `AppBarWithSearch`): a top bar whose middle\n * is a search bar, with an optional navigation icon and actions.\n *\n * @example\n * <SearchAppBar navigationIcon={<IconButton icon={<MenuIcon />} aria-label=\"Menu\" />}\n * actions={<Avatar />} scrollBehavior=\"enter-always\">\n * <SearchBar aria-label=\"Search\" placeholder=\"Search\" leadingIcon={<SearchIcon />} />\n * </SearchAppBar>\n */\nexport function SearchAppBar({\n children,\n navigationIcon,\n actions,\n scrollBehavior,\n scrollRef,\n classNames,\n className,\n ref,\n ...rest\n}: SearchAppBarProps) {\n const rootRef = useObjectRef(ref);\n const scroll = useAppBarScroll({\n behavior: scrollBehavior,\n rootRef,\n collapsibleRef: rootRef,\n scrollRef,\n twoRows: false,\n });\n const styles = searchAppBarStyles({ scrolling: scrollBehavior != null });\n return (\n <header\n {...rest}\n ref={rootRef}\n // The app bar's component tokens (app-bar-tokens.ts).\n data-tokens={mergeDataTokens('md-comp-app-bar', rest)}\n data-scrolled={scroll.scrolled || undefined}\n className={styles.root({ class: cn(classNames?.root, className) })}\n >\n <AppBarItems>\n {navigationIcon != null && (\n <div\n data-slot=\"navigation\"\n className={styles.navigation({ class: classNames?.navigation })}\n >\n {navigationIcon}\n </div>\n )}\n <div className={styles.search({ class: classNames?.search })}>\n <SearchAppBarContext value={{ scrolled: scroll.scrolled }}>\n {children}\n </SearchAppBarContext>\n </div>\n {actions != null && (\n <div data-slot=\"actions\" className={styles.actions({ class: classNames?.actions })}>\n {actions}\n </div>\n )}\n </AppBarItems>\n </header>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAuDA,SAAgB,aAAa,EAC3B,UACA,gBACA,SACA,gBACA,WACA,YACA,WACA,KACA,GAAG,QACiB;CACpB,MAAM,UAAU,aAAa,GAAG;CAChC,MAAM,SAAS,gBAAgB;EAC7B,UAAU;EACV;EACA,gBAAgB;EAChB;EACA,SAAS;CACX,CAAC;CACD,MAAM,SAAS,mBAAmB,EAAE,WAAW,kBAAkB,KAAK,CAAC;CACvE,OACE,oBAAC,UAAD;EACE,GAAI;EACJ,KAAK;EAEL,eAAa,gBAAgB,mBAAmB,IAAI;EACpD,iBAAe,OAAO,YAAY,KAAA;EAClC,WAAW,OAAO,KAAK,EAAE,OAAO,GAAG,YAAY,MAAM,SAAS,EAAE,CAAC;EAEjE,UAAA,qBAAC,aAAD,EAAA,UAAA;GACG,kBAAkB,QACjB,oBAAC,OAAD;IACE,aAAU;IACV,WAAW,OAAO,WAAW,EAAE,OAAO,YAAY,WAAW,CAAC;IAE7D,UAAA;GACE,CAAA;GAEP,oBAAC,OAAD;IAAK,WAAW,OAAO,OAAO,EAAE,OAAO,YAAY,OAAO,CAAC;IACzD,UAAA,oBAAC,qBAAD;KAAqB,OAAO,EAAE,UAAU,OAAO,SAAS;KACrD;IACkB,CAAA;GAClB,CAAA;GACJ,WAAW,QACV,oBAAC,OAAD;IAAK,aAAU;IAAU,WAAW,OAAO,QAAQ,EAAE,OAAO,YAAY,QAAQ,CAAC;IAC9E,UAAA;GACE,CAAA;EAEI,EAAA,CAAA;CACP,CAAA;AAEZ"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { WrapperRootDOMProps } from "../../utils/root-props.js";
|
|
2
|
+
import { CSSProperties, ComponentProps, ReactNode, Ref } from "react";
|
|
3
|
+
//#region src/components/search/SearchBar.d.ts
|
|
4
|
+
/** What a search bar's icons can depend on. */
|
|
5
|
+
export interface SearchBarIconState {
|
|
6
|
+
expanded: boolean;
|
|
7
|
+
/** Collapses the search view, e.g. from a back button. */
|
|
8
|
+
collapse: () => void;
|
|
9
|
+
/**
|
|
10
|
+
* The view in effect (`auto` resolved for the window), so a back button can show in the
|
|
11
|
+
* full-screen view only.
|
|
12
|
+
*/
|
|
13
|
+
view: 'docked' | 'full-screen';
|
|
14
|
+
}
|
|
15
|
+
type SearchBarIcon = ReactNode | ((state: SearchBarIconState) => ReactNode);
|
|
16
|
+
export interface SearchBarClassNames {
|
|
17
|
+
/** The outer container, merged with `className`. */
|
|
18
|
+
root?: string;
|
|
19
|
+
/** The pill around the icons and the input (collapsed and expanded). */
|
|
20
|
+
field?: string;
|
|
21
|
+
/** The text input (collapsed and expanded). */
|
|
22
|
+
input?: string;
|
|
23
|
+
/** The leading icon slot. */
|
|
24
|
+
leading?: string;
|
|
25
|
+
/** The trailing icon slot. */
|
|
26
|
+
trailing?: string;
|
|
27
|
+
/** The scrim behind the docked view. */
|
|
28
|
+
scrim?: string;
|
|
29
|
+
/** The expanded view: the docked panel or the full-screen surface. */
|
|
30
|
+
view?: string;
|
|
31
|
+
/** The expanded content: the docked dropdown or the full-screen content area. */
|
|
32
|
+
content?: string;
|
|
33
|
+
}
|
|
34
|
+
type Naming = {
|
|
35
|
+
/** Accessible name for the search bar and its input. Required unless `aria-labelledby` is set. */
|
|
36
|
+
'aria-label': string;
|
|
37
|
+
} | {
|
|
38
|
+
/** The id of the element that names the search bar and its input. Required unless `aria-label` is set. */
|
|
39
|
+
'aria-labelledby': string;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Attributes for the search inputs, e.g. `aria-keyshortcuts`, `aria-describedby`,
|
|
43
|
+
* `enterKeyHint`, `autoComplete`, `spellCheck`, `inputMode` or event handlers. The bar owns
|
|
44
|
+
* its value, name, role and popup state, so those keys are left out; an `id` or `name`
|
|
45
|
+
* would be duplicated, since the bar renders a second input while expanded.
|
|
46
|
+
*/
|
|
47
|
+
export type SearchBarInputProps = Omit<ComponentProps<'input'>, 'ref' | 'id' | 'name' | 'type' | 'role' | 'value' | 'defaultValue' | 'onChange' | 'placeholder' | 'className' | 'children' | 'dangerouslySetInnerHTML' | 'inert' | 'aria-label' | 'aria-labelledby' | 'aria-expanded' | 'aria-haspopup' | 'aria-controls' | 'aria-hidden'> & {
|
|
48
|
+
[data: `data-${string}`]: string | number | boolean | undefined;
|
|
49
|
+
};
|
|
50
|
+
interface SearchBarOwnProps extends WrapperRootDOMProps {
|
|
51
|
+
/** The root element's id. */
|
|
52
|
+
id?: string;
|
|
53
|
+
/**
|
|
54
|
+
* The ids of elements that describe the search, for both inputs (the bar's and the open
|
|
55
|
+
* view's), before any `inputProps['aria-describedby']`.
|
|
56
|
+
*/
|
|
57
|
+
'aria-describedby'?: string;
|
|
58
|
+
/** The id of an element with more details about the search, for both inputs. */
|
|
59
|
+
'aria-details'?: string;
|
|
60
|
+
/** Controlled query. */
|
|
61
|
+
value?: string;
|
|
62
|
+
/** Initial query when uncontrolled. @default "" */
|
|
63
|
+
defaultValue?: string;
|
|
64
|
+
/** Called with the query as it changes. */
|
|
65
|
+
onChange?: (value: string) => void;
|
|
66
|
+
/**
|
|
67
|
+
* Called with the query when the user presses Enter (the keyboard's search action) in the
|
|
68
|
+
* open search view. Enter in the collapsed bar opens the view.
|
|
69
|
+
*/
|
|
70
|
+
onSubmit?: (value: string) => void;
|
|
71
|
+
/** Controlled expansion of the search view. */
|
|
72
|
+
expanded?: boolean;
|
|
73
|
+
/** Whether the search view starts expanded (uncontrolled). @default false */
|
|
74
|
+
defaultExpanded?: boolean;
|
|
75
|
+
/** Called when the search view expands or collapses. */
|
|
76
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
77
|
+
/**
|
|
78
|
+
* How the bar expands: `docked`, a dropdown below it over a scrim; `full-screen`, a view
|
|
79
|
+
* that fills the window; `auto`, full screen on compact windows (below 600px wide) and
|
|
80
|
+
* docked on larger ones, as M3 recommends ("Full-screen layout: Default for compact
|
|
81
|
+
* breakpoints"; docked is "Best for medium and expanded windows"). It follows the window
|
|
82
|
+
* as it resizes.
|
|
83
|
+
* @default "auto"
|
|
84
|
+
*/
|
|
85
|
+
view?: SearchBarView;
|
|
86
|
+
/** Hint text shown in the empty input, e.g. "Search mail". */
|
|
87
|
+
placeholder?: string;
|
|
88
|
+
/** Leading icon, e.g. a search icon, or a back button while expanded. */
|
|
89
|
+
leadingIcon?: SearchBarIcon;
|
|
90
|
+
/**
|
|
91
|
+
* Trailing content: one or two icon buttons (e.g. voice search and a clear button), or an
|
|
92
|
+
* avatar (an `img`, drawn at 30px) with up to one icon button (M3).
|
|
93
|
+
*/
|
|
94
|
+
trailingIcon?: SearchBarIcon;
|
|
95
|
+
/**
|
|
96
|
+
* Centre the placeholder and the query while the bar is collapsed (M3's search app bar
|
|
97
|
+
* supports centred text). @default "start"
|
|
98
|
+
*/
|
|
99
|
+
textAlign?: 'start' | 'center';
|
|
100
|
+
/**
|
|
101
|
+
* What screen readers hear when the suggestions or results change while the view is open
|
|
102
|
+
* (M3: "the screen reader must announce the change"), e.g. "5 results". Announced
|
|
103
|
+
* politely whenever it changes.
|
|
104
|
+
*/
|
|
105
|
+
resultsAnnouncement?: string;
|
|
106
|
+
/**
|
|
107
|
+
* The expanded content: suggestions or results, usually a list. ↓ from the input moves
|
|
108
|
+
* focus into it.
|
|
109
|
+
*/
|
|
110
|
+
children?: ReactNode;
|
|
111
|
+
/** The input element (collapsed, or expanded while the view is open). */
|
|
112
|
+
inputRef?: Ref<HTMLInputElement>;
|
|
113
|
+
/**
|
|
114
|
+
* Attributes for both inputs, the collapsed one and the expanded view's. They replace the
|
|
115
|
+
* bar's defaults (`enterKeyHint="search"`, `autoComplete="off"`, `spellCheck={false}`);
|
|
116
|
+
* event handlers run before the bar's own, and the bar's role, name, value and popup state
|
|
117
|
+
* always win.
|
|
118
|
+
*/
|
|
119
|
+
inputProps?: SearchBarInputProps;
|
|
120
|
+
/** Ref to the root `<div>` element. */
|
|
121
|
+
ref?: Ref<HTMLDivElement>;
|
|
122
|
+
/** Classes for the root element, merged with `classNames.root`; consumer classes win. */
|
|
123
|
+
className?: string;
|
|
124
|
+
/** Inline styles for the root element. */
|
|
125
|
+
style?: CSSProperties;
|
|
126
|
+
/** Classes for each part, by slot. */
|
|
127
|
+
classNames?: SearchBarClassNames;
|
|
128
|
+
/** `data-*` attributes, like the other DOM attributes, go to the root. */
|
|
129
|
+
[data: `data-${string}`]: string | number | boolean | undefined;
|
|
130
|
+
}
|
|
131
|
+
export type SearchBarProps = SearchBarOwnProps & Naming;
|
|
132
|
+
/** How a {@link SearchBar} expands. */
|
|
133
|
+
export type SearchBarView = 'auto' | 'docked' | 'full-screen';
|
|
134
|
+
/**
|
|
135
|
+
* M3 Expressive search bar: a 56px pill that expands into a search view, either a dropdown
|
|
136
|
+
* below the bar (docked) or a full-screen view, holding suggestions or results. Pressing
|
|
137
|
+
* the bar, typing into it or ↓ expands it; Escape, a press outside or `collapse()` closes it.
|
|
138
|
+
*
|
|
139
|
+
* @example
|
|
140
|
+
* <SearchBar aria-label="Search mail" placeholder="Search mail" leadingIcon={<SearchIcon />}
|
|
141
|
+
* value={query} onChange={setQuery} onSubmit={search}>
|
|
142
|
+
* <SuggestionList … />
|
|
143
|
+
* </SearchBar>
|
|
144
|
+
*/
|
|
145
|
+
export declare function SearchBar(props: SearchBarProps): import("react").JSX.Element;
|
|
146
|
+
//#endregion
|
|
147
|
+
//# sourceMappingURL=SearchBar.d.ts.map
|
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../utils/cn.js";
|
|
3
|
+
import { ButtonContext, standardIconButtons } from "../button/ButtonContext.js";
|
|
4
|
+
import { usePresence } from "../../primitives/use-presence.js";
|
|
5
|
+
import { Overlay as Overlay$1 } from "../../primitives/Overlay.js";
|
|
6
|
+
import { pickDescriptionAria, splitRootProps } from "../../utils/root-props.js";
|
|
7
|
+
import { COMPACT_WINDOW, useMediaQuery } from "../date-picker/use-media-query.js";
|
|
8
|
+
import { searchBarStyles } from "./search-styles.js";
|
|
9
|
+
import { createContext, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
10
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { useReducedMotion } from "motion/react";
|
|
12
|
+
import { mergeProps, mergeRefs, useDialog, useFocusRing, useModalOverlay, useObjectRef } from "react-aria";
|
|
13
|
+
import { useOverlayTriggerState } from "react-stately";
|
|
14
|
+
import { useControlledState } from "react-stately/useControlledState";
|
|
15
|
+
//#region src/components/search/SearchBar.tsx
|
|
16
|
+
/** Set by `SearchAppBar` for the search bar inside it. */
|
|
17
|
+
const SearchAppBarContext = createContext(null);
|
|
18
|
+
/** The search bar's maximum width (M3). */
|
|
19
|
+
const MAX_WIDTH = 720;
|
|
20
|
+
/** The focused search bar's height (M3: "Search bar container Height 56dp"). */
|
|
21
|
+
const FIELD_HEIGHT = 56;
|
|
22
|
+
const FOCUSABLE = "a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"])";
|
|
23
|
+
/**
|
|
24
|
+
* M3 Expressive search bar: a 56px pill that expands into a search view, either a dropdown
|
|
25
|
+
* below the bar (docked) or a full-screen view, holding suggestions or results. Pressing
|
|
26
|
+
* the bar, typing into it or ↓ expands it; Escape, a press outside or `collapse()` closes it.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* <SearchBar aria-label="Search mail" placeholder="Search mail" leadingIcon={<SearchIcon />}
|
|
30
|
+
* value={query} onChange={setQuery} onSubmit={search}>
|
|
31
|
+
* <SuggestionList … />
|
|
32
|
+
* </SearchBar>
|
|
33
|
+
*/
|
|
34
|
+
function SearchBar(props) {
|
|
35
|
+
const { value, defaultValue, onChange, onSubmit, expanded, defaultExpanded, onExpandedChange, view: requestedView = "auto", placeholder, leadingIcon, trailingIcon, textAlign = "start", resultsAnnouncement, children, inputRef, inputProps: consumerInputProps, ref, className, style, classNames, ...rest } = props;
|
|
36
|
+
const { "aria-label": label, "aria-labelledby": labelledBy } = props;
|
|
37
|
+
const compact = useMediaQuery(COMPACT_WINDOW);
|
|
38
|
+
const view = requestedView === "auto" ? compact ? "full-screen" : "docked" : requestedView;
|
|
39
|
+
const [query, setQuery] = useControlledState(value, defaultValue ?? "", onChange);
|
|
40
|
+
const state = useOverlayTriggerState({
|
|
41
|
+
isOpen: expanded,
|
|
42
|
+
defaultOpen: defaultExpanded,
|
|
43
|
+
onOpenChange: onExpandedChange
|
|
44
|
+
});
|
|
45
|
+
const appBar = useContext(SearchAppBarContext);
|
|
46
|
+
const rootRef = useObjectRef(ref);
|
|
47
|
+
const [rect, setRect] = useState(null);
|
|
48
|
+
const reduceMotion = useReducedMotion();
|
|
49
|
+
const { isPresent, isExiting, exitProps } = usePresence(state.isOpen, reduceMotion ? "opacity" : "--m3-search-progress");
|
|
50
|
+
const collapsedRef = useRef(null);
|
|
51
|
+
const collapsedInputRef = useMemo(() => mergeRefs(collapsedRef, isPresent ? void 0 : inputRef), [isPresent, inputRef]);
|
|
52
|
+
const restoreRef = useRef(null);
|
|
53
|
+
useLayoutEffect(() => {
|
|
54
|
+
const doc = collapsedRef.current?.ownerDocument;
|
|
55
|
+
if (!state.isOpen || !doc) return;
|
|
56
|
+
const active = doc.activeElement;
|
|
57
|
+
restoreRef.current = active instanceof HTMLElement && active !== doc.body ? active : null;
|
|
58
|
+
}, [state.isOpen]);
|
|
59
|
+
useEffect(() => {
|
|
60
|
+
const collapsed = collapsedRef.current;
|
|
61
|
+
if (!isExiting || !collapsed) return;
|
|
62
|
+
if (!collapsed.ownerDocument.activeElement?.closest("[data-exiting]")) return;
|
|
63
|
+
const previous = restoreRef.current;
|
|
64
|
+
(previous?.isConnected && !previous.closest("[data-exiting]") ? previous : collapsed).focus({ preventScroll: true });
|
|
65
|
+
}, [isExiting]);
|
|
66
|
+
useLayoutEffect(() => {
|
|
67
|
+
const root = rootRef.current;
|
|
68
|
+
if (!state.isOpen || !root) return;
|
|
69
|
+
const box = root.getBoundingClientRect();
|
|
70
|
+
setRect({
|
|
71
|
+
top: box.top,
|
|
72
|
+
left: box.left,
|
|
73
|
+
right: box.right,
|
|
74
|
+
bottom: box.bottom,
|
|
75
|
+
width: box.width,
|
|
76
|
+
height: box.height,
|
|
77
|
+
rtl: getComputedStyle(root).direction === "rtl"
|
|
78
|
+
});
|
|
79
|
+
}, [state.isOpen, rootRef]);
|
|
80
|
+
const iconState = {
|
|
81
|
+
expanded: state.isOpen,
|
|
82
|
+
collapse: state.close,
|
|
83
|
+
view
|
|
84
|
+
};
|
|
85
|
+
const leading = typeof leadingIcon === "function" ? leadingIcon(iconState) : leadingIcon;
|
|
86
|
+
const trailing = typeof trailingIcon === "function" ? trailingIcon(iconState) : trailingIcon;
|
|
87
|
+
const styles = searchBarStyles({
|
|
88
|
+
inAppBar: appBar != null,
|
|
89
|
+
hasLeading: leading != null,
|
|
90
|
+
hasTrailing: trailing != null
|
|
91
|
+
});
|
|
92
|
+
const { root: data, rest: own } = splitRootProps(rest, { wrapper: true });
|
|
93
|
+
const { "aria-describedby": describedBy, "aria-details": details } = own;
|
|
94
|
+
const describedByInput = [describedBy, consumerInputProps?.["aria-describedby"]].filter(Boolean).join(" ") || void 0;
|
|
95
|
+
const collapsedTone = appBar ? appBar.scrolled ? "scrolled" : "appBar" : "default";
|
|
96
|
+
const field = (input, tone) => /* @__PURE__ */ jsx(SearchField, {
|
|
97
|
+
className: searchBarStyles({ tone }).field({ class: classNames?.field }),
|
|
98
|
+
leading: leading != null && /* @__PURE__ */ jsx("span", {
|
|
99
|
+
"data-slot": "leading",
|
|
100
|
+
className: styles.leading({ class: classNames?.leading }),
|
|
101
|
+
children: leading
|
|
102
|
+
}),
|
|
103
|
+
trailing: trailing != null && /* @__PURE__ */ jsx("span", {
|
|
104
|
+
"data-slot": "trailing",
|
|
105
|
+
className: styles.trailing({ class: classNames?.trailing }),
|
|
106
|
+
children: trailing
|
|
107
|
+
}),
|
|
108
|
+
children: input
|
|
109
|
+
});
|
|
110
|
+
const sharedInputProps = (handlers) => ({
|
|
111
|
+
...mergeProps({
|
|
112
|
+
enterKeyHint: "search",
|
|
113
|
+
autoComplete: "off",
|
|
114
|
+
spellCheck: false,
|
|
115
|
+
"aria-details": details,
|
|
116
|
+
...pickDescriptionAria(own)
|
|
117
|
+
}, consumerInputProps, { "aria-describedby": describedByInput }, handlers),
|
|
118
|
+
id: void 0,
|
|
119
|
+
name: void 0,
|
|
120
|
+
role: void 0,
|
|
121
|
+
type: "search",
|
|
122
|
+
value: query,
|
|
123
|
+
placeholder,
|
|
124
|
+
"aria-label": label,
|
|
125
|
+
"aria-labelledby": label == null ? labelledBy : void 0
|
|
126
|
+
});
|
|
127
|
+
const inputClass = (align) => searchBarStyles({
|
|
128
|
+
hasLeading: leading != null,
|
|
129
|
+
hasTrailing: trailing != null,
|
|
130
|
+
textAlign: align
|
|
131
|
+
}).input({ class: classNames?.input });
|
|
132
|
+
const submitOnEnter = (event) => {
|
|
133
|
+
if (event.key === "Enter" && !event.nativeEvent.isComposing) {
|
|
134
|
+
event.preventDefault();
|
|
135
|
+
onSubmit?.(query);
|
|
136
|
+
return true;
|
|
137
|
+
}
|
|
138
|
+
return false;
|
|
139
|
+
};
|
|
140
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
141
|
+
...data,
|
|
142
|
+
id: own.id,
|
|
143
|
+
ref: rootRef,
|
|
144
|
+
style,
|
|
145
|
+
"data-expanded": state.isOpen || void 0,
|
|
146
|
+
"data-view": view,
|
|
147
|
+
className: styles.root({ class: cn(classNames?.root, className) }),
|
|
148
|
+
children: [field(/* @__PURE__ */ jsx("input", {
|
|
149
|
+
...sharedInputProps({
|
|
150
|
+
onChange: (event) => {
|
|
151
|
+
const next = event.target.value;
|
|
152
|
+
if (next.length > query.length) state.open();
|
|
153
|
+
setQuery(next);
|
|
154
|
+
},
|
|
155
|
+
onClick: state.open,
|
|
156
|
+
onKeyDown: (event) => {
|
|
157
|
+
if (event.key === "Enter" && !event.nativeEvent.isComposing || event.key === "ArrowDown") {
|
|
158
|
+
event.preventDefault();
|
|
159
|
+
state.open();
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}),
|
|
163
|
+
"data-slot": "input",
|
|
164
|
+
className: inputClass(textAlign),
|
|
165
|
+
ref: collapsedInputRef,
|
|
166
|
+
inert: state.isOpen,
|
|
167
|
+
"aria-hidden": state.isOpen || void 0,
|
|
168
|
+
role: "combobox",
|
|
169
|
+
"aria-expanded": state.isOpen,
|
|
170
|
+
"aria-haspopup": "dialog"
|
|
171
|
+
}), collapsedTone), isPresent && rect && /* @__PURE__ */ jsx(Overlay$1, {
|
|
172
|
+
exiting: isExiting,
|
|
173
|
+
children: /* @__PURE__ */ jsx(SearchView, {
|
|
174
|
+
view,
|
|
175
|
+
state,
|
|
176
|
+
rect,
|
|
177
|
+
animateHeight: !reduceMotion,
|
|
178
|
+
isExiting,
|
|
179
|
+
exitProps,
|
|
180
|
+
label,
|
|
181
|
+
labelledBy,
|
|
182
|
+
classNames,
|
|
183
|
+
styles,
|
|
184
|
+
resultsAnnouncement,
|
|
185
|
+
field: (contentRef) => field(/* @__PURE__ */ jsx(ExpandedInput, {
|
|
186
|
+
...sharedInputProps({
|
|
187
|
+
onChange: (event) => setQuery(event.target.value),
|
|
188
|
+
onKeyDown: (event) => {
|
|
189
|
+
if (submitOnEnter(event)) {
|
|
190
|
+
contentRef.current?.focus();
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
if (event.key === "ArrowDown") {
|
|
194
|
+
const first = contentRef.current?.querySelector(FOCUSABLE);
|
|
195
|
+
if (first) {
|
|
196
|
+
event.preventDefault();
|
|
197
|
+
first.focus();
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}),
|
|
202
|
+
"data-slot": "input",
|
|
203
|
+
className: inputClass("start"),
|
|
204
|
+
inputRef,
|
|
205
|
+
open: state.isOpen
|
|
206
|
+
}), "default"),
|
|
207
|
+
children
|
|
208
|
+
})
|
|
209
|
+
})]
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
function SearchField({ className, leading, trailing, children }) {
|
|
213
|
+
const { isFocusVisible, focusProps } = useFocusRing({
|
|
214
|
+
within: true,
|
|
215
|
+
isTextInput: true
|
|
216
|
+
});
|
|
217
|
+
return /* @__PURE__ */ jsx("div", {
|
|
218
|
+
...focusProps,
|
|
219
|
+
"data-tokens": "md-comp-search-bar",
|
|
220
|
+
"data-focus-visible": isFocusVisible || void 0,
|
|
221
|
+
className,
|
|
222
|
+
children: /* @__PURE__ */ jsxs(ButtonContext, {
|
|
223
|
+
value: standardIconButtons,
|
|
224
|
+
children: [
|
|
225
|
+
leading,
|
|
226
|
+
children,
|
|
227
|
+
trailing
|
|
228
|
+
]
|
|
229
|
+
})
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
function ExpandedInput({ inputRef, open, ...props }) {
|
|
233
|
+
const ref = useObjectRef(inputRef);
|
|
234
|
+
useEffect(() => {
|
|
235
|
+
const input = ref.current;
|
|
236
|
+
if (!input || !open) return;
|
|
237
|
+
input.focus({ preventScroll: true });
|
|
238
|
+
input.setSelectionRange(input.value.length, input.value.length);
|
|
239
|
+
}, [ref, open]);
|
|
240
|
+
return /* @__PURE__ */ jsx("input", {
|
|
241
|
+
...props,
|
|
242
|
+
ref
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
function SearchView({ view, state, rect, animateHeight, isExiting, exitProps, label, labelledBy, classNames, styles, field, resultsAnnouncement, children }) {
|
|
246
|
+
const panelRef = useRef(null);
|
|
247
|
+
const contentRef = useRef(null);
|
|
248
|
+
const contentSizeRef = useRef(null);
|
|
249
|
+
useContentHeight(contentRef, contentSizeRef, view === "docked" && animateHeight && children != null);
|
|
250
|
+
const { modalProps, underlayProps } = useModalOverlay({ isDismissable: !isExiting }, state, panelRef);
|
|
251
|
+
const { dialogProps } = useDialog({
|
|
252
|
+
"aria-label": label,
|
|
253
|
+
"aria-labelledby": label == null ? labelledBy : void 0
|
|
254
|
+
}, panelRef);
|
|
255
|
+
const exiting = isExiting || void 0;
|
|
256
|
+
const panelProps = mergeProps(modalProps, dialogProps, { tabIndex: -1 });
|
|
257
|
+
if (view === "full-screen") {
|
|
258
|
+
const vars = {
|
|
259
|
+
"--m3-search-top": `${rect.top}px`,
|
|
260
|
+
"--m3-search-left": `${rect.left}px`,
|
|
261
|
+
"--m3-search-right": `${window.innerWidth - rect.right}px`,
|
|
262
|
+
"--m3-search-bottom": `${window.innerHeight - rect.bottom}px`,
|
|
263
|
+
"--m3-search-start": `${rect.rtl ? window.innerWidth - rect.right : rect.left}px`,
|
|
264
|
+
"--m3-search-width": `${rect.width}px`,
|
|
265
|
+
"--m3-search-height": `${rect.height}px`
|
|
266
|
+
};
|
|
267
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
268
|
+
...panelProps,
|
|
269
|
+
...exitProps,
|
|
270
|
+
ref: panelRef,
|
|
271
|
+
style: vars,
|
|
272
|
+
"data-tokens": "md-comp-search-view",
|
|
273
|
+
"data-view": "full-screen",
|
|
274
|
+
"data-exiting": exiting,
|
|
275
|
+
className: styles.fullScreenPanel({ class: classNames?.view }),
|
|
276
|
+
children: [
|
|
277
|
+
/* @__PURE__ */ jsx("div", {
|
|
278
|
+
"data-exiting": exiting,
|
|
279
|
+
className: styles.fullScreenHeader(),
|
|
280
|
+
children: field(contentRef)
|
|
281
|
+
}),
|
|
282
|
+
/* @__PURE__ */ jsx("div", {
|
|
283
|
+
ref: contentRef,
|
|
284
|
+
tabIndex: -1,
|
|
285
|
+
"data-exiting": exiting,
|
|
286
|
+
className: styles.fullScreenContent({ class: classNames?.content }),
|
|
287
|
+
children
|
|
288
|
+
}),
|
|
289
|
+
/* @__PURE__ */ jsx(LiveStatus, { message: resultsAnnouncement })
|
|
290
|
+
]
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
const width = Math.min(rect.width + 24, Math.max(rect.width, MAX_WIDTH));
|
|
294
|
+
const grow = (width - rect.width) / 2;
|
|
295
|
+
const left = Math.max(0, Math.min(rect.left - grow, window.innerWidth - width));
|
|
296
|
+
const top = Math.max(0, rect.top + (rect.height - FIELD_HEIGHT) / 2);
|
|
297
|
+
const dockedVars = {
|
|
298
|
+
"--m3-search-top": `${rect.top}px`,
|
|
299
|
+
"--m3-search-left": `${rect.left}px`,
|
|
300
|
+
"--m3-search-width": `${rect.width}px`,
|
|
301
|
+
"--m3-search-height": `${rect.height}px`,
|
|
302
|
+
"--m3-search-dx": `${left - rect.left}px`,
|
|
303
|
+
"--m3-search-dy": `${top - rect.top}px`,
|
|
304
|
+
"--m3-search-dw": `${Math.min(width, window.innerWidth) - rect.width}px`,
|
|
305
|
+
"--m3-search-dh": `${FIELD_HEIGHT - rect.height}px`
|
|
306
|
+
};
|
|
307
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", {
|
|
308
|
+
...exitProps,
|
|
309
|
+
"aria-hidden": "true",
|
|
310
|
+
"data-exiting": exiting,
|
|
311
|
+
className: styles.scrim({ class: classNames?.scrim })
|
|
312
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
313
|
+
...underlayProps,
|
|
314
|
+
"data-exiting": exiting,
|
|
315
|
+
className: styles.underlay(),
|
|
316
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
317
|
+
...panelProps,
|
|
318
|
+
...exitProps,
|
|
319
|
+
ref: panelRef,
|
|
320
|
+
style: dockedVars,
|
|
321
|
+
"data-exiting": exiting,
|
|
322
|
+
className: styles.dockedPanel({ class: classNames?.view }),
|
|
323
|
+
children: [
|
|
324
|
+
/* @__PURE__ */ jsx("div", {
|
|
325
|
+
className: styles.dockedHeader(),
|
|
326
|
+
children: field(contentRef)
|
|
327
|
+
}),
|
|
328
|
+
children != null && /* @__PURE__ */ jsx("div", {
|
|
329
|
+
ref: contentRef,
|
|
330
|
+
tabIndex: -1,
|
|
331
|
+
"data-tokens": "md-comp-search-view",
|
|
332
|
+
"data-view": "docked",
|
|
333
|
+
"data-exiting": exiting,
|
|
334
|
+
className: styles.dropdown({ class: classNames?.content }),
|
|
335
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
336
|
+
ref: contentSizeRef,
|
|
337
|
+
className: "flow-root",
|
|
338
|
+
children
|
|
339
|
+
})
|
|
340
|
+
}),
|
|
341
|
+
/* @__PURE__ */ jsx(LiveStatus, { message: resultsAnnouncement })
|
|
342
|
+
]
|
|
343
|
+
})
|
|
344
|
+
})] });
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Keeps `--m3-search-content-height` on the dropdown at its content's height (plus the
|
|
348
|
+
* dropdown's own padding and borders), so the dropdown's height animates as the results
|
|
349
|
+
* change instead of jumping. While that height animates the dropdown doesn't scroll
|
|
350
|
+
* (`data-resizing`), so a scrollbar never flashes in and rewraps the content.
|
|
351
|
+
*/
|
|
352
|
+
function useContentHeight(dropdownRef, contentRef, enabled) {
|
|
353
|
+
useLayoutEffect(() => {
|
|
354
|
+
const dropdown = dropdownRef.current;
|
|
355
|
+
const content = contentRef.current;
|
|
356
|
+
if (!enabled || !dropdown || !content) return;
|
|
357
|
+
let measured = NaN;
|
|
358
|
+
const measure = () => {
|
|
359
|
+
const style = getComputedStyle(dropdown);
|
|
360
|
+
const frame = parseFloat(style.paddingTop) + parseFloat(style.paddingBottom) + parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);
|
|
361
|
+
const height = content.getBoundingClientRect().height + frame;
|
|
362
|
+
if (Math.abs(height - measured) < .5) return;
|
|
363
|
+
measured = height;
|
|
364
|
+
dropdown.style.setProperty("--m3-search-content-height", `${height}px`);
|
|
365
|
+
};
|
|
366
|
+
const resizing = (on) => (event) => {
|
|
367
|
+
if (event.target !== dropdown || event.propertyName !== "height") return;
|
|
368
|
+
if (on) dropdown.dataset.resizing = "";
|
|
369
|
+
else delete dropdown.dataset.resizing;
|
|
370
|
+
};
|
|
371
|
+
const start = resizing(true);
|
|
372
|
+
const end = resizing(false);
|
|
373
|
+
measure();
|
|
374
|
+
dropdown.addEventListener("transitionrun", start);
|
|
375
|
+
dropdown.addEventListener("transitionend", end);
|
|
376
|
+
dropdown.addEventListener("transitioncancel", end);
|
|
377
|
+
const observer = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(measure);
|
|
378
|
+
observer?.observe(content);
|
|
379
|
+
return () => {
|
|
380
|
+
observer?.disconnect();
|
|
381
|
+
dropdown.removeEventListener("transitionrun", start);
|
|
382
|
+
dropdown.removeEventListener("transitionend", end);
|
|
383
|
+
dropdown.removeEventListener("transitioncancel", end);
|
|
384
|
+
dropdown.style.removeProperty("--m3-search-content-height");
|
|
385
|
+
delete dropdown.dataset.resizing;
|
|
386
|
+
};
|
|
387
|
+
}, [
|
|
388
|
+
dropdownRef,
|
|
389
|
+
contentRef,
|
|
390
|
+
enabled
|
|
391
|
+
]);
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* A polite live region inside the search view. It starts empty and takes the message a
|
|
395
|
+
* moment later, so the first one is announced too, and again whenever it changes.
|
|
396
|
+
*/
|
|
397
|
+
function LiveStatus({ message }) {
|
|
398
|
+
const [text, setText] = useState("");
|
|
399
|
+
useEffect(() => {
|
|
400
|
+
const timer = setTimeout(() => setText(message ?? ""), 150);
|
|
401
|
+
return () => clearTimeout(timer);
|
|
402
|
+
}, [message]);
|
|
403
|
+
return /* @__PURE__ */ jsx("div", {
|
|
404
|
+
role: "status",
|
|
405
|
+
className: "sr-only",
|
|
406
|
+
children: text
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
//#endregion
|
|
410
|
+
export { SearchAppBarContext, SearchBar };
|
|
411
|
+
|
|
412
|
+
//# sourceMappingURL=SearchBar.js.map
|