@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,285 @@
|
|
|
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 { Overlay as Overlay$1 } from "../../primitives/Overlay.js";
|
|
6
|
+
import { DensityZeroButtons } from "../button/DensityZeroButtons.js";
|
|
7
|
+
import { NavItem } from "./NavItem.js";
|
|
8
|
+
import { navigationRailStyles } from "./navigation-styles.js";
|
|
9
|
+
import { onItemArrowKeys } from "./use-item-arrow-keys.js";
|
|
10
|
+
import { useRailItemMorph } from "./use-rail-item-morph.js";
|
|
11
|
+
import { createContext, useContext, useLayoutEffect, useRef, useState } from "react";
|
|
12
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { mergeProps, useDialog, useModalOverlay } from "react-aria";
|
|
14
|
+
import { useOverlayTriggerState } from "react-stately";
|
|
15
|
+
import { useControlledState } from "react-stately/useControlledState";
|
|
16
|
+
//#region src/components/navigation/NavigationRail.tsx
|
|
17
|
+
/** Registered in utilities.css (96px); every rail inset is derived from it. */
|
|
18
|
+
const COLLAPSED_WIDTH_VAR = "--m3-rail-collapsed-width";
|
|
19
|
+
const DEFAULT_COLLAPSED_WIDTH = 96;
|
|
20
|
+
const EXPANDED_MIN = 220;
|
|
21
|
+
const EXPANDED_MAX = 360;
|
|
22
|
+
/** Elements that take focus with Tab, for the modal rail's initial focus. */
|
|
23
|
+
const FOCUSABLE = "a[href]:not([aria-disabled=\"true\"]), button:not(:disabled), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])";
|
|
24
|
+
/**
|
|
25
|
+
* The item chrome beside an expanded label: an item inset each side, (collapsed − 56) / 2,
|
|
26
|
+
* plus 16px pill padding each side, the 24px icon and the 8px gap. 104px at 96px.
|
|
27
|
+
*/
|
|
28
|
+
function expandedChrome(el) {
|
|
29
|
+
return (Number.parseFloat(getComputedStyle(el).getPropertyValue(COLLAPSED_WIDTH_VAR)) || DEFAULT_COLLAPSED_WIDTH) - 56 + 64;
|
|
30
|
+
}
|
|
31
|
+
const RailContext = createContext(null);
|
|
32
|
+
/**
|
|
33
|
+
* Expanded width: the widest label on one line plus the item chrome, 220–360px (Compose).
|
|
34
|
+
* Past 360px labels wrap.
|
|
35
|
+
*/
|
|
36
|
+
function useExpandedWidth(ref, active, content) {
|
|
37
|
+
const [width, setWidth] = useState(EXPANDED_MIN);
|
|
38
|
+
useLayoutEffect(() => {
|
|
39
|
+
const el = ref.current;
|
|
40
|
+
if (!active || !el) return;
|
|
41
|
+
const labels = [...el.querySelectorAll("[data-nav-label]")];
|
|
42
|
+
const widest = Math.max(0, ...labels.map((label) => {
|
|
43
|
+
label.style.whiteSpace = "nowrap";
|
|
44
|
+
const natural = label.scrollWidth;
|
|
45
|
+
label.style.whiteSpace = "";
|
|
46
|
+
return natural;
|
|
47
|
+
}));
|
|
48
|
+
const header = el.querySelector("[data-rail-header]");
|
|
49
|
+
const headerWidth = header ? header.scrollWidth : 0;
|
|
50
|
+
const chrome = expandedChrome(el);
|
|
51
|
+
setWidth(Math.min(Math.max(widest + chrome, headerWidth, EXPANDED_MIN), EXPANDED_MAX));
|
|
52
|
+
}, [
|
|
53
|
+
ref,
|
|
54
|
+
active,
|
|
55
|
+
content
|
|
56
|
+
]);
|
|
57
|
+
return width;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Whether `ref` is still widening after it became `expanding` (or mounted expanding, as the
|
|
61
|
+
* modal sheet grows from the collapsed width): from that render until its width transition
|
|
62
|
+
* ends, and false at once when none runs (reduced motion, or a consumer width). Meanwhile the
|
|
63
|
+
* rail keeps its labels on one line, so none wraps letter by letter in a rail that is still
|
|
64
|
+
* narrow and no icon jumps; the rail's clipping hides what doesn't fit yet.
|
|
65
|
+
*/
|
|
66
|
+
function useWidening(ref, expanding) {
|
|
67
|
+
const [widening, setWidening] = useState(expanding);
|
|
68
|
+
const [wasExpanding, setWasExpanding] = useState(expanding);
|
|
69
|
+
if (expanding !== wasExpanding) {
|
|
70
|
+
setWasExpanding(expanding);
|
|
71
|
+
setWidening(expanding);
|
|
72
|
+
}
|
|
73
|
+
useLayoutEffect(() => {
|
|
74
|
+
const el = ref.current;
|
|
75
|
+
if (!widening || !el) return;
|
|
76
|
+
if (!(typeof el.getAnimations === "function" && el.getAnimations().some((animation) => "transitionProperty" in animation && animation.transitionProperty === "width"))) {
|
|
77
|
+
setWidening(false);
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
const done = (event) => {
|
|
81
|
+
if (event.target === el && event.propertyName === "width") setWidening(false);
|
|
82
|
+
};
|
|
83
|
+
el.addEventListener("transitionend", done);
|
|
84
|
+
return () => el.removeEventListener("transitionend", done);
|
|
85
|
+
}, [ref, widening]);
|
|
86
|
+
return widening;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* M3 Expressive navigation rail: destinations along the start edge. Collapsed (96px) items
|
|
90
|
+
* show the icon above the label; expanded (220–360px) they show it beside the label and
|
|
91
|
+
* the rail's width springs open. With `modal`, the expanded rail opens over the page as a
|
|
92
|
+
* sheet with a scrim, focusing its first interactive element. Put a menu button in
|
|
93
|
+
* `header` to toggle `expanded`. Tab or the Up / Down arrows move between items, and
|
|
94
|
+
* labels wrap rather than truncate.
|
|
95
|
+
*
|
|
96
|
+
* Icons stay on one line through the middle of the collapsed rail in both states. For a
|
|
97
|
+
* different collapsed width, set `--m3-rail-collapsed-width` (e.g. the class
|
|
98
|
+
* `[--m3-rail-collapsed-width:80px]`) rather than a `w-*` class; M3's widths are 96px
|
|
99
|
+
* (Expressive) and 80px (baseline).
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* <NavigationRail aria-label="Main" header={({ toggle }) => <IconButton icon={<MenuIcon />} aria-label="Menu" onPress={toggle} />}>
|
|
103
|
+
* <NavigationRailItem href="/inbox" icon={<InboxIcon />} selected>Inbox</NavigationRailItem>
|
|
104
|
+
* </NavigationRail>
|
|
105
|
+
*/
|
|
106
|
+
function NavigationRail({ expanded, defaultExpanded = false, onExpandedChange, modal = false, hideOnCollapse = false, header, itemAlignment = "top", divider = false, indicatorMotion = "expand", children, classNames, className, style, ...rest }) {
|
|
107
|
+
const [isExpanded, setExpanded] = useControlledState(expanded, defaultExpanded, onExpandedChange);
|
|
108
|
+
const toggle = () => setExpanded(!isExpanded);
|
|
109
|
+
const inlineExpanded = isExpanded && !modal;
|
|
110
|
+
const rootRef = useRef(null);
|
|
111
|
+
const lastIndicatorRef = useRef(null);
|
|
112
|
+
const slide = indicatorMotion === "slide";
|
|
113
|
+
const width = useExpandedWidth(rootRef, inlineExpanded, children);
|
|
114
|
+
const widening = useWidening(rootRef, inlineExpanded);
|
|
115
|
+
const [mode, setMode] = useState(inlineExpanded);
|
|
116
|
+
const [modeChanged, setModeChanged] = useState(false);
|
|
117
|
+
const captureItems = useRailItemMorph(rootRef, mode);
|
|
118
|
+
if (mode !== inlineExpanded) {
|
|
119
|
+
captureItems();
|
|
120
|
+
setMode(inlineExpanded);
|
|
121
|
+
setModeChanged(true);
|
|
122
|
+
}
|
|
123
|
+
const styles = navigationRailStyles({
|
|
124
|
+
expanded: inlineExpanded,
|
|
125
|
+
itemAlignment,
|
|
126
|
+
divider,
|
|
127
|
+
slidingIndicator: slide && inlineExpanded
|
|
128
|
+
});
|
|
129
|
+
const headerContent = typeof header === "function" ? header({
|
|
130
|
+
expanded: isExpanded,
|
|
131
|
+
toggle
|
|
132
|
+
}) : header;
|
|
133
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [!(modal && hideOnCollapse) && /* @__PURE__ */ jsx("nav", {
|
|
134
|
+
...rest,
|
|
135
|
+
ref: rootRef,
|
|
136
|
+
style: {
|
|
137
|
+
"--m3-rail-width": inlineExpanded ? `${width}px` : `var(${COLLAPSED_WIDTH_VAR})`,
|
|
138
|
+
...style
|
|
139
|
+
},
|
|
140
|
+
"data-tokens": mergeDataTokens("md-comp-nav-rail", rest),
|
|
141
|
+
"data-expanded": inlineExpanded || void 0,
|
|
142
|
+
"data-widening": widening || void 0,
|
|
143
|
+
className: styles.root({ class: cn(classNames?.root, className) }),
|
|
144
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
145
|
+
className: styles.body({ class: classNames?.body }),
|
|
146
|
+
children: [headerContent != null && /* @__PURE__ */ jsx("div", {
|
|
147
|
+
"data-rail-header": "",
|
|
148
|
+
className: styles.header({ class: classNames?.header }),
|
|
149
|
+
children: /* @__PURE__ */ jsx(DensityZeroButtons, { children: headerContent })
|
|
150
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
151
|
+
"data-item-alignment": itemAlignment,
|
|
152
|
+
onKeyDown: onItemArrowKeys("vertical"),
|
|
153
|
+
className: styles.items({ class: classNames?.items }),
|
|
154
|
+
children: /* @__PURE__ */ jsx(RailContext, {
|
|
155
|
+
value: {
|
|
156
|
+
layout: inlineExpanded ? "rail-start" : "rail-top",
|
|
157
|
+
enterLabel: modeChanged,
|
|
158
|
+
...slide && inlineExpanded && { lastIndicatorRef }
|
|
159
|
+
},
|
|
160
|
+
children
|
|
161
|
+
})
|
|
162
|
+
})]
|
|
163
|
+
})
|
|
164
|
+
}), modal && /* @__PURE__ */ jsx(ModalRail, {
|
|
165
|
+
open: isExpanded,
|
|
166
|
+
onClose: () => setExpanded(false),
|
|
167
|
+
header: headerContent,
|
|
168
|
+
naming: rest,
|
|
169
|
+
slide: hideOnCollapse,
|
|
170
|
+
itemAlignment,
|
|
171
|
+
slidingIndicator: slide,
|
|
172
|
+
railRef: rootRef,
|
|
173
|
+
classNames,
|
|
174
|
+
children
|
|
175
|
+
})] });
|
|
176
|
+
}
|
|
177
|
+
/** The sheet's exit transitions; whichever runs marks the end of its exit. */
|
|
178
|
+
const SHEET_EXIT_PROPERTIES = [
|
|
179
|
+
"width",
|
|
180
|
+
"translate",
|
|
181
|
+
"opacity"
|
|
182
|
+
];
|
|
183
|
+
function ModalRail({ open, onClose, header, naming, slide, itemAlignment, slidingIndicator, railRef, classNames, children }) {
|
|
184
|
+
const state = useOverlayTriggerState({
|
|
185
|
+
isOpen: open,
|
|
186
|
+
onOpenChange: (isOpen) => {
|
|
187
|
+
if (!isOpen) onClose();
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
const { isPresent, isExiting, exitProps } = usePresence(open, SHEET_EXIT_PROPERTIES);
|
|
191
|
+
if (!isPresent) return null;
|
|
192
|
+
return /* @__PURE__ */ jsx(Overlay$1, {
|
|
193
|
+
exiting: isExiting,
|
|
194
|
+
children: /* @__PURE__ */ jsx(ModalSheet, {
|
|
195
|
+
state,
|
|
196
|
+
isExiting,
|
|
197
|
+
exitProps,
|
|
198
|
+
header,
|
|
199
|
+
naming,
|
|
200
|
+
slide,
|
|
201
|
+
itemAlignment,
|
|
202
|
+
slidingIndicator,
|
|
203
|
+
railRef,
|
|
204
|
+
classNames,
|
|
205
|
+
children
|
|
206
|
+
})
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
function ModalSheet({ state, isExiting, exitProps, header, naming, slide, itemAlignment, slidingIndicator, railRef, classNames, children }) {
|
|
210
|
+
const ref = useRef(null);
|
|
211
|
+
const lastIndicatorRef = useRef(null);
|
|
212
|
+
const { modalProps, underlayProps } = useModalOverlay({ isDismissable: !isExiting }, state, ref);
|
|
213
|
+
const { dialogProps } = useDialog(naming, ref);
|
|
214
|
+
useLayoutEffect(() => {
|
|
215
|
+
const rail = railRef.current;
|
|
216
|
+
if (!rail || !ref.current) return;
|
|
217
|
+
ref.current.style.setProperty(COLLAPSED_WIDTH_VAR, getComputedStyle(rail).getPropertyValue(COLLAPSED_WIDTH_VAR));
|
|
218
|
+
}, [railRef]);
|
|
219
|
+
useLayoutEffect(() => {
|
|
220
|
+
(ref.current?.querySelector(FOCUSABLE))?.focus();
|
|
221
|
+
}, []);
|
|
222
|
+
const width = useExpandedWidth(ref, true, children);
|
|
223
|
+
const widening = useWidening(ref, true);
|
|
224
|
+
const styles = navigationRailStyles({
|
|
225
|
+
expanded: true,
|
|
226
|
+
sheetEntry: slide ? "slide" : "grow",
|
|
227
|
+
itemAlignment,
|
|
228
|
+
slidingIndicator
|
|
229
|
+
});
|
|
230
|
+
const exiting = isExiting || void 0;
|
|
231
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", {
|
|
232
|
+
...underlayProps,
|
|
233
|
+
"aria-hidden": "true",
|
|
234
|
+
"data-exiting": exiting,
|
|
235
|
+
className: styles.scrim({ class: classNames?.scrim })
|
|
236
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
237
|
+
...mergeProps(modalProps, dialogProps, exitProps),
|
|
238
|
+
ref,
|
|
239
|
+
"data-tokens": "md-comp-nav-rail",
|
|
240
|
+
"data-modal": "",
|
|
241
|
+
"data-exiting": exiting,
|
|
242
|
+
"data-widening": widening || void 0,
|
|
243
|
+
style: { "--m3-rail-width": `${width}px` },
|
|
244
|
+
className: styles.sheet({ class: classNames?.sheet }),
|
|
245
|
+
children: [header != null && /* @__PURE__ */ jsx("div", {
|
|
246
|
+
"data-rail-header": "",
|
|
247
|
+
className: styles.header({ class: classNames?.header }),
|
|
248
|
+
children: /* @__PURE__ */ jsx(DensityZeroButtons, { children: header })
|
|
249
|
+
}), /* @__PURE__ */ jsx("nav", {
|
|
250
|
+
"aria-label": "aria-label" in naming ? naming["aria-label"] : void 0,
|
|
251
|
+
"aria-labelledby": "aria-labelledby" in naming ? naming["aria-labelledby"] : void 0,
|
|
252
|
+
"data-item-alignment": itemAlignment,
|
|
253
|
+
onKeyDown: onItemArrowKeys("vertical"),
|
|
254
|
+
className: styles.items({ class: classNames?.items }),
|
|
255
|
+
children: /* @__PURE__ */ jsx(RailContext, {
|
|
256
|
+
value: {
|
|
257
|
+
layout: "rail-start",
|
|
258
|
+
enterLabel: false,
|
|
259
|
+
...slidingIndicator && { lastIndicatorRef },
|
|
260
|
+
onNavigate: state.close
|
|
261
|
+
},
|
|
262
|
+
children
|
|
263
|
+
})
|
|
264
|
+
})]
|
|
265
|
+
})] });
|
|
266
|
+
}
|
|
267
|
+
/** A destination in a {@link NavigationRail}: a link (`href`) or a button. */
|
|
268
|
+
function NavigationRailItem({ onPress, ...props }) {
|
|
269
|
+
const rail = useContext(RailContext);
|
|
270
|
+
if (!rail) throw new Error("NavigationRailItem must be rendered inside a NavigationRail");
|
|
271
|
+
return /* @__PURE__ */ jsx(NavItem, {
|
|
272
|
+
...props,
|
|
273
|
+
layout: rail.layout,
|
|
274
|
+
enterLabel: rail.enterLabel,
|
|
275
|
+
...rail.lastIndicatorRef && { lastIndicatorRef: rail.lastIndicatorRef },
|
|
276
|
+
onPress: (event) => {
|
|
277
|
+
onPress?.(event);
|
|
278
|
+
rail.onNavigate?.();
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
//#endregion
|
|
283
|
+
export { NavigationRail, NavigationRailItem };
|
|
284
|
+
|
|
285
|
+
//# sourceMappingURL=NavigationRail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavigationRail.js","names":["Overlay"],"sources":["../../../src/components/navigation/NavigationRail.tsx"],"sourcesContent":["'use client';\n\nimport {\n createContext,\n useContext,\n useLayoutEffect,\n useRef,\n useState,\n type ComponentPropsWithRef,\n type CSSProperties,\n type ReactNode,\n type RefObject,\n} from 'react';\nimport { mergeProps, useDialog, useModalOverlay } from 'react-aria';\nimport { useOverlayTriggerState, type OverlayTriggerState } from 'react-stately';\nimport { useControlledState } from 'react-stately/useControlledState';\nimport { Overlay } from '../../primitives/Overlay';\nimport { usePresence } from '../../primitives/use-presence';\nimport { cn } from '../../utils/cn';\nimport type { NavItemLayout } from './nav-item-styles';\nimport { DensityZeroButtons } from '../button/DensityZeroButtons';\nimport { NavItem, type NavItemProps } from './NavItem';\nimport { navigationRailStyles } from './navigation-styles';\nimport { onItemArrowKeys } from './use-item-arrow-keys';\nimport { useRailItemMorph } from './use-rail-item-morph';\nimport { mergeDataTokens } from '../../utils/merge-data-tokens';\n\n/** Registered in utilities.css (96px); every rail inset is derived from it. */\nconst COLLAPSED_WIDTH_VAR = '--m3-rail-collapsed-width';\nconst DEFAULT_COLLAPSED_WIDTH = 96;\nconst EXPANDED_MIN = 220;\nconst EXPANDED_MAX = 360;\n/** Elements that take focus with Tab, for the modal rail's initial focus. */\nconst FOCUSABLE =\n 'a[href]:not([aria-disabled=\"true\"]), button:not(:disabled), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])';\n\n/**\n * The item chrome beside an expanded label: an item inset each side, (collapsed − 56) / 2,\n * plus 16px pill padding each side, the 24px icon and the 8px gap. 104px at 96px.\n */\nfunction expandedChrome(el: HTMLElement) {\n const collapsed =\n Number.parseFloat(getComputedStyle(el).getPropertyValue(COLLAPSED_WIDTH_VAR)) ||\n DEFAULT_COLLAPSED_WIDTH;\n return collapsed - 56 + 64;\n}\n\ninterface RailContextValue {\n layout: NavItemLayout;\n enterLabel: boolean;\n /** The expanded list's last current pill, which the next current item's pill slides from. */\n lastIndicatorRef?: RefObject<HTMLElement | null>;\n /** The modal rail collapses after an item is chosen. */\n onNavigate?: () => void;\n}\n\nconst RailContext = createContext<RailContextValue | null>(null);\n\ntype Naming =\n | {\n /** Accessible name for the navigation rail. Required unless `aria-labelledby` is set. */\n 'aria-label': string;\n }\n | {\n /** The id of the element that names the navigation rail. Required unless `aria-label` is set. */\n 'aria-labelledby': string;\n };\n\nexport interface NavigationRailClassNames {\n /** The `<nav>` container, merged with `className`. */\n root?: string;\n /** The in-flow rail's scrolling column, which holds the 44px top inset. */\n body?: string;\n /** The content above the items (`header`). */\n header?: string;\n /** The list of items. */\n items?: string;\n /** The expanded modal rail's sheet. */\n sheet?: string;\n /** The scrim behind the expanded modal rail. */\n scrim?: string;\n}\n\ninterface NavigationRailOwnProps {\n /** Whether the rail is expanded (controlled). */\n expanded?: boolean;\n /** Whether the rail starts expanded (uncontrolled). @default false */\n defaultExpanded?: boolean;\n /** Called when the rail expands or collapses. */\n onExpandedChange?: (expanded: boolean) => void;\n /**\n * Expand over the page as a modal sheet with a scrim instead of pushing content.\n * Pressing outside, Escape or choosing an item collapses it.\n * @default false\n */\n modal?: boolean;\n /** With `modal`, show nothing while collapsed (the expanded rail slides in). @default false */\n hideOnCollapse?: boolean;\n /** Content above the items, e.g. a menu button and a FAB; a function receives the state. */\n header?: ReactNode | ((state: { expanded: boolean; toggle: () => void }) => ReactNode);\n /**\n * Align the items as a group to the top, or to the middle of the space below the header\n * (M3 recommends centre on tablets, within easier reach). The header stays at the top.\n * @default \"top\"\n */\n itemAlignment?: 'top' | 'center';\n /** Draw a divider on the edge next to the content. @default false */\n divider?: boolean;\n /**\n * How the current item's pill moves to a newly chosen item. `expand` (M3: \"the active\n * indicator expands from the center of the icon\") grows it in place. `slide` moves it from\n * the previously chosen item on the fast spatial spring while the rail is expanded (in\n * place or modal), as in Google's Expressive showcase; an extension beyond the M3 spec.\n * The collapsed rail always expands, and reduced motion fades the pill in place.\n * @default \"expand\"\n */\n indicatorMotion?: 'expand' | 'slide';\n /** `NavigationRailItem` elements. */\n children: ReactNode;\n /** Classes for each part, by slot. */\n classNames?: NavigationRailClassNames;\n}\n\nexport type NavigationRailProps = NavigationRailOwnProps &\n Naming &\n Omit<\n ComponentPropsWithRef<'nav'>,\n keyof NavigationRailOwnProps | 'aria-label' | 'aria-labelledby'\n >;\n\n/**\n * Expanded width: the widest label on one line plus the item chrome, 220–360px (Compose).\n * Past 360px labels wrap.\n */\nfunction useExpandedWidth(ref: RefObject<HTMLElement | null>, active: boolean, content: ReactNode) {\n const [width, setWidth] = useState(EXPANDED_MIN);\n useLayoutEffect(() => {\n const el = ref.current;\n if (!active || !el) return;\n const labels = [...el.querySelectorAll<HTMLElement>('[data-nav-label]')];\n // Labels wrap in a narrow rail; measure each on one line.\n const widest = Math.max(\n 0,\n ...labels.map((label) => {\n label.style.whiteSpace = 'nowrap';\n const natural = label.scrollWidth;\n label.style.whiteSpace = '';\n return natural;\n }),\n );\n const header = el.querySelector<HTMLElement>('[data-rail-header]');\n const headerWidth = header ? header.scrollWidth : 0;\n const chrome = expandedChrome(el);\n setWidth(Math.min(Math.max(widest + chrome, headerWidth, EXPANDED_MIN), EXPANDED_MAX));\n }, [ref, active, content]);\n return width;\n}\n\n/**\n * Whether `ref` is still widening after it became `expanding` (or mounted expanding, as the\n * modal sheet grows from the collapsed width): from that render until its width transition\n * ends, and false at once when none runs (reduced motion, or a consumer width). Meanwhile the\n * rail keeps its labels on one line, so none wraps letter by letter in a rail that is still\n * narrow and no icon jumps; the rail's clipping hides what doesn't fit yet.\n */\nfunction useWidening(ref: RefObject<HTMLElement | null>, expanding: boolean) {\n const [widening, setWidening] = useState(expanding);\n const [wasExpanding, setWasExpanding] = useState(expanding);\n if (expanding !== wasExpanding) {\n setWasExpanding(expanding);\n setWidening(expanding);\n }\n useLayoutEffect(() => {\n const el = ref.current;\n if (!widening || !el) return;\n // Reading the running transitions resolves this render's styles, starting the spring.\n const running =\n typeof el.getAnimations === 'function' &&\n el\n .getAnimations()\n .some(\n (animation) =>\n 'transitionProperty' in animation && animation.transitionProperty === 'width',\n );\n if (!running) {\n setWidening(false);\n return;\n }\n // A later width (the measured one replacing the minimum) retargets the same spring.\n const done = (event: TransitionEvent) => {\n if (event.target === el && event.propertyName === 'width') setWidening(false);\n };\n el.addEventListener('transitionend', done);\n return () => el.removeEventListener('transitionend', done);\n }, [ref, widening]);\n return widening;\n}\n\n/**\n * M3 Expressive navigation rail: destinations along the start edge. Collapsed (96px) items\n * show the icon above the label; expanded (220–360px) they show it beside the label and\n * the rail's width springs open. With `modal`, the expanded rail opens over the page as a\n * sheet with a scrim, focusing its first interactive element. Put a menu button in\n * `header` to toggle `expanded`. Tab or the Up / Down arrows move between items, and\n * labels wrap rather than truncate.\n *\n * Icons stay on one line through the middle of the collapsed rail in both states. For a\n * different collapsed width, set `--m3-rail-collapsed-width` (e.g. the class\n * `[--m3-rail-collapsed-width:80px]`) rather than a `w-*` class; M3's widths are 96px\n * (Expressive) and 80px (baseline).\n *\n * @example\n * <NavigationRail aria-label=\"Main\" header={({ toggle }) => <IconButton icon={<MenuIcon />} aria-label=\"Menu\" onPress={toggle} />}>\n * <NavigationRailItem href=\"/inbox\" icon={<InboxIcon />} selected>Inbox</NavigationRailItem>\n * </NavigationRail>\n */\nexport function NavigationRail({\n expanded,\n defaultExpanded = false,\n onExpandedChange,\n modal = false,\n hideOnCollapse = false,\n header,\n itemAlignment = 'top',\n divider = false,\n indicatorMotion = 'expand',\n children,\n classNames,\n className,\n style,\n ...rest\n}: NavigationRailProps) {\n const [isExpanded, setExpanded] = useControlledState(expanded, defaultExpanded, onExpandedChange);\n const toggle = () => setExpanded(!isExpanded);\n const inlineExpanded = isExpanded && !modal;\n const rootRef = useRef<HTMLElement>(null);\n const lastIndicatorRef = useRef<HTMLElement>(null);\n const slide = indicatorMotion === 'slide';\n const width = useExpandedWidth(rootRef, inlineExpanded, children);\n const widening = useWidening(rootRef, inlineExpanded);\n // Labels fade in at their new place once the rail has changed mode (not on first render).\n const [mode, setMode] = useState(inlineExpanded);\n const [modeChanged, setModeChanged] = useState(false);\n const captureItems = useRailItemMorph(rootRef, mode);\n if (mode !== inlineExpanded) {\n // The DOM still shows the old layout: note where each item's icon is.\n captureItems();\n setMode(inlineExpanded);\n setModeChanged(true);\n }\n\n const styles = navigationRailStyles({\n expanded: inlineExpanded,\n itemAlignment,\n divider,\n slidingIndicator: slide && inlineExpanded,\n });\n const headerContent =\n typeof header === 'function' ? header({ expanded: isExpanded, toggle }) : header;\n const showInline = !(modal && hideOnCollapse);\n\n return (\n <>\n {showInline && (\n <nav\n {...rest}\n ref={rootRef}\n style={\n {\n '--m3-rail-width': inlineExpanded ? `${width}px` : `var(${COLLAPSED_WIDTH_VAR})`,\n ...style,\n } as CSSProperties\n }\n data-tokens={mergeDataTokens('md-comp-nav-rail', rest)}\n data-expanded={inlineExpanded || undefined}\n data-widening={widening || undefined}\n className={styles.root({ class: cn(classNames?.root, className) })}\n >\n <div className={styles.body({ class: classNames?.body })}>\n {headerContent != null && (\n <div data-rail-header=\"\" className={styles.header({ class: classNames?.header })}>\n <DensityZeroButtons>{headerContent}</DensityZeroButtons>\n </div>\n )}\n <div\n data-item-alignment={itemAlignment}\n onKeyDown={onItemArrowKeys('vertical')}\n className={styles.items({ class: classNames?.items })}\n >\n <RailContext\n value={{\n layout: inlineExpanded ? 'rail-start' : 'rail-top',\n enterLabel: modeChanged,\n ...(slide && inlineExpanded && { lastIndicatorRef }),\n }}\n >\n {children}\n </RailContext>\n </div>\n </div>\n </nav>\n )}\n {modal && (\n <ModalRail\n open={isExpanded}\n onClose={() => setExpanded(false)}\n header={headerContent}\n naming={rest as Naming}\n slide={hideOnCollapse}\n itemAlignment={itemAlignment}\n slidingIndicator={slide}\n railRef={rootRef}\n classNames={classNames}\n >\n {children}\n </ModalRail>\n )}\n </>\n );\n}\n\n/** The sheet's exit transitions; whichever runs marks the end of its exit. */\nconst SHEET_EXIT_PROPERTIES = ['width', 'translate', 'opacity'] as const;\n\nfunction ModalRail({\n open,\n onClose,\n header,\n naming,\n slide,\n itemAlignment,\n slidingIndicator,\n railRef,\n classNames,\n children,\n}: {\n open: boolean;\n onClose: () => void;\n header: ReactNode;\n naming: Naming;\n slide: boolean;\n itemAlignment: 'top' | 'center';\n /** `indicatorMotion=\"slide\"`: the pill slides between items. */\n slidingIndicator: boolean;\n railRef: RefObject<HTMLElement | null>;\n classNames?: NavigationRailClassNames;\n children: ReactNode;\n}) {\n const state = useOverlayTriggerState({\n isOpen: open,\n onOpenChange: (isOpen) => {\n if (!isOpen) onClose();\n },\n });\n // Presence ends with the sheet's own motion, not the scrim's shorter fade, which removed\n // the sheet mid-spring inside the collapsed rail (2026-10-15). Width when it shrinks back,\n // translate when it slides out, opacity under reduced motion.\n const { isPresent, isExiting, exitProps } = usePresence(open, SHEET_EXIT_PROPERTIES);\n if (!isPresent) return null;\n return (\n <Overlay exiting={isExiting}>\n <ModalSheet\n state={state}\n isExiting={isExiting}\n exitProps={exitProps}\n header={header}\n naming={naming}\n slide={slide}\n itemAlignment={itemAlignment}\n slidingIndicator={slidingIndicator}\n railRef={railRef}\n classNames={classNames}\n >\n {children}\n </ModalSheet>\n </Overlay>\n );\n}\n\nfunction ModalSheet({\n state,\n isExiting,\n exitProps,\n header,\n naming,\n slide,\n itemAlignment,\n slidingIndicator,\n railRef,\n classNames,\n children,\n}: {\n state: OverlayTriggerState;\n isExiting: boolean;\n exitProps: ReturnType<typeof usePresence>['exitProps'];\n header: ReactNode;\n naming: Naming;\n slide: boolean;\n itemAlignment: 'top' | 'center';\n /** `indicatorMotion=\"slide\"`: the pill slides between items. */\n slidingIndicator: boolean;\n railRef: RefObject<HTMLElement | null>;\n classNames?: NavigationRailClassNames;\n children: ReactNode;\n}) {\n const ref = useRef<HTMLDivElement>(null);\n const lastIndicatorRef = useRef<HTMLElement>(null);\n const { modalProps, underlayProps } = useModalOverlay({ isDismissable: !isExiting }, state, ref);\n const { dialogProps } = useDialog(naming, ref);\n // The sheet is portalled out of the rail, so it can't inherit a collapsed width set on the\n // rail itself. Copy it before the width is measured and the sheet first paints.\n useLayoutEffect(() => {\n const rail = railRef.current;\n if (!rail || !ref.current) return;\n ref.current.style.setProperty(\n COLLAPSED_WIDTH_VAR,\n getComputedStyle(rail).getPropertyValue(COLLAPSED_WIDTH_VAR),\n );\n }, [railRef]);\n // M3: initial focus lands on the first interactive item, whether it's the menu button,\n // the FAB or the first destination (useDialog would otherwise focus the sheet itself).\n useLayoutEffect(() => {\n const first = ref.current?.querySelector<HTMLElement>(FOCUSABLE);\n first?.focus();\n }, []);\n const width = useExpandedWidth(ref, true, children);\n const widening = useWidening(ref, true);\n const styles = navigationRailStyles({\n expanded: true,\n sheetEntry: slide ? 'slide' : 'grow',\n itemAlignment,\n slidingIndicator,\n });\n const exiting = isExiting || undefined;\n return (\n <>\n <div\n {...underlayProps}\n aria-hidden=\"true\"\n data-exiting={exiting}\n className={styles.scrim({ class: classNames?.scrim })}\n />\n <div\n {...mergeProps(modalProps, dialogProps, exitProps)}\n ref={ref}\n data-tokens=\"md-comp-nav-rail\"\n data-modal=\"\"\n data-exiting={exiting}\n data-widening={widening || undefined}\n style={{ '--m3-rail-width': `${width}px` } as CSSProperties}\n className={styles.sheet({ class: classNames?.sheet })}\n >\n {header != null && (\n <div data-rail-header=\"\" className={styles.header({ class: classNames?.header })}>\n <DensityZeroButtons>{header}</DensityZeroButtons>\n </div>\n )}\n <nav\n aria-label={'aria-label' in naming ? naming['aria-label'] : undefined}\n aria-labelledby={'aria-labelledby' in naming ? naming['aria-labelledby'] : undefined}\n data-item-alignment={itemAlignment}\n onKeyDown={onItemArrowKeys('vertical')}\n className={styles.items({ class: classNames?.items })}\n >\n <RailContext\n value={{\n layout: 'rail-start',\n enterLabel: false,\n ...(slidingIndicator && { lastIndicatorRef }),\n onNavigate: state.close,\n }}\n >\n {children}\n </RailContext>\n </nav>\n </div>\n </>\n );\n}\n\nexport type NavigationRailItemProps = NavItemProps;\n\n/** A destination in a {@link NavigationRail}: a link (`href`) or a button. */\nexport function NavigationRailItem({ onPress, ...props }: NavigationRailItemProps) {\n const rail = useContext(RailContext);\n if (!rail) throw new Error('NavigationRailItem must be rendered inside a NavigationRail');\n return (\n <NavItem\n {...(props as NavItemProps)}\n layout={rail.layout}\n enterLabel={rail.enterLabel}\n {...(rail.lastIndicatorRef && { lastIndicatorRef: rail.lastIndicatorRef })}\n onPress={(event) => {\n onPress?.(event);\n rail.onNavigate?.();\n }}\n />\n );\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { VariantProps } from "../../utils/tv.js";
|
|
2
|
+
//#region src/components/navigation/nav-item-styles.d.ts
|
|
3
|
+
/** Variant definitions for navigation items; extend them to add variants. */
|
|
4
|
+
export declare const navItemStyles: import("tailwind-variants").TVReturnType<{
|
|
5
|
+
layout: {
|
|
6
|
+
'rail-top': {
|
|
7
|
+
root: string;
|
|
8
|
+
pill: string;
|
|
9
|
+
indicator: string;
|
|
10
|
+
icon: string;
|
|
11
|
+
label: string[];
|
|
12
|
+
};
|
|
13
|
+
'rail-start': {
|
|
14
|
+
root: string;
|
|
15
|
+
pill: string;
|
|
16
|
+
indicator: string[];
|
|
17
|
+
content: string;
|
|
18
|
+
icon: string;
|
|
19
|
+
label: string[];
|
|
20
|
+
};
|
|
21
|
+
'bar-top': {
|
|
22
|
+
root: string;
|
|
23
|
+
pill: string;
|
|
24
|
+
indicator: string;
|
|
25
|
+
icon: string;
|
|
26
|
+
label: string[];
|
|
27
|
+
};
|
|
28
|
+
'bar-start': {
|
|
29
|
+
root: string;
|
|
30
|
+
pill: string;
|
|
31
|
+
indicator: string[];
|
|
32
|
+
content: string;
|
|
33
|
+
icon: string[];
|
|
34
|
+
badgedBox: string[];
|
|
35
|
+
label: string[];
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
/** Labels that move when the rail changes width fade in at their new place. */
|
|
39
|
+
enterLabel: {
|
|
40
|
+
true: {
|
|
41
|
+
label: string;
|
|
42
|
+
};
|
|
43
|
+
false: {};
|
|
44
|
+
};
|
|
45
|
+
/** The pill slides between items (Motion moves it) instead of expanding in place. */
|
|
46
|
+
slide: {
|
|
47
|
+
true: {
|
|
48
|
+
indicator: string;
|
|
49
|
+
content: string;
|
|
50
|
+
};
|
|
51
|
+
false: {};
|
|
52
|
+
};
|
|
53
|
+
}, {
|
|
54
|
+
root: string[];
|
|
55
|
+
pill: string[];
|
|
56
|
+
indicator: string[];
|
|
57
|
+
stateLayer: string[];
|
|
58
|
+
content: string;
|
|
59
|
+
icon: string[];
|
|
60
|
+
iconFace: string[];
|
|
61
|
+
iconStack: string;
|
|
62
|
+
badge: string;
|
|
63
|
+
badgedBox: string;
|
|
64
|
+
label: string[];
|
|
65
|
+
}, undefined, {
|
|
66
|
+
layout: {
|
|
67
|
+
'rail-top': {
|
|
68
|
+
root: string;
|
|
69
|
+
pill: string;
|
|
70
|
+
indicator: string;
|
|
71
|
+
icon: string;
|
|
72
|
+
label: string[];
|
|
73
|
+
};
|
|
74
|
+
'rail-start': {
|
|
75
|
+
root: string;
|
|
76
|
+
pill: string;
|
|
77
|
+
indicator: string[];
|
|
78
|
+
content: string;
|
|
79
|
+
icon: string;
|
|
80
|
+
label: string[];
|
|
81
|
+
};
|
|
82
|
+
'bar-top': {
|
|
83
|
+
root: string;
|
|
84
|
+
pill: string;
|
|
85
|
+
indicator: string;
|
|
86
|
+
icon: string;
|
|
87
|
+
label: string[];
|
|
88
|
+
};
|
|
89
|
+
'bar-start': {
|
|
90
|
+
root: string;
|
|
91
|
+
pill: string;
|
|
92
|
+
indicator: string[];
|
|
93
|
+
content: string;
|
|
94
|
+
icon: string[];
|
|
95
|
+
badgedBox: string[];
|
|
96
|
+
label: string[];
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
/** Labels that move when the rail changes width fade in at their new place. */
|
|
100
|
+
enterLabel: {
|
|
101
|
+
true: {
|
|
102
|
+
label: string;
|
|
103
|
+
};
|
|
104
|
+
false: {};
|
|
105
|
+
};
|
|
106
|
+
/** The pill slides between items (Motion moves it) instead of expanding in place. */
|
|
107
|
+
slide: {
|
|
108
|
+
true: {
|
|
109
|
+
indicator: string;
|
|
110
|
+
content: string;
|
|
111
|
+
};
|
|
112
|
+
false: {};
|
|
113
|
+
};
|
|
114
|
+
}, {
|
|
115
|
+
root: string[];
|
|
116
|
+
pill: string[];
|
|
117
|
+
indicator: string[];
|
|
118
|
+
stateLayer: string[];
|
|
119
|
+
content: string;
|
|
120
|
+
icon: string[];
|
|
121
|
+
iconFace: string[];
|
|
122
|
+
iconStack: string;
|
|
123
|
+
badge: string;
|
|
124
|
+
badgedBox: string;
|
|
125
|
+
label: string[];
|
|
126
|
+
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
127
|
+
layout: {
|
|
128
|
+
'rail-top': {
|
|
129
|
+
root: string;
|
|
130
|
+
pill: string;
|
|
131
|
+
indicator: string;
|
|
132
|
+
icon: string;
|
|
133
|
+
label: string[];
|
|
134
|
+
};
|
|
135
|
+
'rail-start': {
|
|
136
|
+
root: string;
|
|
137
|
+
pill: string;
|
|
138
|
+
indicator: string[];
|
|
139
|
+
content: string;
|
|
140
|
+
icon: string;
|
|
141
|
+
label: string[];
|
|
142
|
+
};
|
|
143
|
+
'bar-top': {
|
|
144
|
+
root: string;
|
|
145
|
+
pill: string;
|
|
146
|
+
indicator: string;
|
|
147
|
+
icon: string;
|
|
148
|
+
label: string[];
|
|
149
|
+
};
|
|
150
|
+
'bar-start': {
|
|
151
|
+
root: string;
|
|
152
|
+
pill: string;
|
|
153
|
+
indicator: string[];
|
|
154
|
+
content: string;
|
|
155
|
+
icon: string[];
|
|
156
|
+
badgedBox: string[];
|
|
157
|
+
label: string[];
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
/** Labels that move when the rail changes width fade in at their new place. */
|
|
161
|
+
enterLabel: {
|
|
162
|
+
true: {
|
|
163
|
+
label: string;
|
|
164
|
+
};
|
|
165
|
+
false: {};
|
|
166
|
+
};
|
|
167
|
+
/** The pill slides between items (Motion moves it) instead of expanding in place. */
|
|
168
|
+
slide: {
|
|
169
|
+
true: {
|
|
170
|
+
indicator: string;
|
|
171
|
+
content: string;
|
|
172
|
+
};
|
|
173
|
+
false: {};
|
|
174
|
+
};
|
|
175
|
+
}, {
|
|
176
|
+
root: string[];
|
|
177
|
+
pill: string[];
|
|
178
|
+
indicator: string[];
|
|
179
|
+
stateLayer: string[];
|
|
180
|
+
content: string;
|
|
181
|
+
icon: string[];
|
|
182
|
+
iconFace: string[];
|
|
183
|
+
iconStack: string;
|
|
184
|
+
badge: string;
|
|
185
|
+
badgedBox: string;
|
|
186
|
+
label: string[];
|
|
187
|
+
}>>;
|
|
188
|
+
export type NavItemLayout = NonNullable<VariantProps<typeof navItemStyles>['layout']>;
|
|
189
|
+
//#endregion
|
|
190
|
+
//# sourceMappingURL=nav-item-styles.d.ts.map
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { tv } from "../../utils/tv.js";
|
|
2
|
+
//#region src/components/navigation/nav-item-styles.ts
|
|
3
|
+
/** Variant definitions for navigation items; extend them to add variants. */
|
|
4
|
+
const navItemStyles = tv({
|
|
5
|
+
slots: {
|
|
6
|
+
root: [
|
|
7
|
+
"group/nav grid min-w-0 cursor-pointer justify-items-center outline-none select-none",
|
|
8
|
+
"font-plain text-on-surface-variant",
|
|
9
|
+
"data-disabled:cursor-default"
|
|
10
|
+
],
|
|
11
|
+
pill: ["grid rounded-full outline-offset-(--md-sys-focus-indicator-offset) outline-secondary", "group-data-focus-visible/nav:outline-(length:--md-sys-focus-indicator-thickness) group-data-focus-visible/nav:outline-solid"],
|
|
12
|
+
indicator: [
|
|
13
|
+
"col-start-1 row-start-1 rounded-full opacity-0",
|
|
14
|
+
"group-data-current/nav:opacity-100 group-data-current/nav:[clip-path:inset(0_0_round_9999px)]",
|
|
15
|
+
"forced-colors:bg-[Highlight] forced-colors:forced-color-adjust-none",
|
|
16
|
+
"[transition-property:clip-path,opacity]",
|
|
17
|
+
"[transition-duration:var(--md-sys-motion-spring-spatial-default-duration)]",
|
|
18
|
+
"[transition-timing-function:var(--md-sys-motion-spring-spatial-default-easing)]",
|
|
19
|
+
"motion-reduce:[transition-property:opacity]",
|
|
20
|
+
"motion-reduce:[transition-duration:var(--md-sys-motion-spring-effects-default-duration)]",
|
|
21
|
+
"motion-reduce:[transition-timing-function:var(--md-sys-motion-spring-effects-default-easing)]"
|
|
22
|
+
],
|
|
23
|
+
stateLayer: [
|
|
24
|
+
"col-start-1 row-start-1 rounded-full state-layer",
|
|
25
|
+
"[--m3-state-layer-color:var(--md-sys-color-on-secondary-container)]",
|
|
26
|
+
"group-data-hovered/nav:[--m3-state-opacity:var(--md-sys-state-hover-state-layer-opacity)]",
|
|
27
|
+
"group-data-focus-visible/nav:[--m3-state-opacity:var(--md-sys-state-focus-state-layer-opacity)]"
|
|
28
|
+
],
|
|
29
|
+
content: "relative col-start-1 row-start-1 flex min-w-0 items-center justify-center",
|
|
30
|
+
icon: [
|
|
31
|
+
"inline-grid size-[24px] shrink-0 place-items-center [&>svg]:size-full",
|
|
32
|
+
"group-data-disabled/nav:text-on-surface-variant/38",
|
|
33
|
+
"forced-colors:group-data-current/nav:text-[HighlightText] forced-colors:group-data-current/nav:forced-color-adjust-none",
|
|
34
|
+
"transition-colors duration-(--md-sys-motion-spring-effects-default-duration) ease-(--md-sys-motion-spring-effects-default-easing)"
|
|
35
|
+
],
|
|
36
|
+
iconFace: ["col-start-1 row-start-1 size-full opacity-0 data-shown:opacity-100 [&>svg]:size-full", "[transition-property:opacity] duration-(--md-sys-motion-spring-effects-default-duration) ease-(--md-sys-motion-spring-effects-default-easing)"],
|
|
37
|
+
iconStack: "inline-grid size-[24px] place-items-center [&>svg]:size-full",
|
|
38
|
+
badge: "inline-flex shrink-0 -ms-[4px]",
|
|
39
|
+
badgedBox: "forced-colors:[&>span:last-child]:forced-color-adjust-auto",
|
|
40
|
+
label: ["min-w-0 overflow-hidden text-ellipsis text-balance hyphens-auto wrap-normal group-data-disabled/nav:text-on-surface-variant/38", "[transition-property:color,opacity] duration-(--md-sys-motion-spring-effects-default-duration) ease-(--md-sys-motion-spring-effects-default-easing)"]
|
|
41
|
+
},
|
|
42
|
+
variants: {
|
|
43
|
+
layout: {
|
|
44
|
+
"rail-top": {
|
|
45
|
+
root: "min-h-[64px] w-(--m3-rail-collapsed-width) content-start",
|
|
46
|
+
pill: "h-[32px] w-[56px]",
|
|
47
|
+
indicator: "[clip-path:inset(0_50%_round_9999px)] bg-[var(--_md-comp-nav-rail-item-active-indicator-color)]",
|
|
48
|
+
icon: "text-[color:var(--_md-comp-nav-rail-item-inactive-icon-color)] group-data-current/nav:text-[color:var(--_md-comp-nav-rail-item-active-icon-color)]",
|
|
49
|
+
label: [
|
|
50
|
+
"mt-[4px] max-w-full text-center text-label-medium",
|
|
51
|
+
"text-[color:var(--_md-comp-nav-rail-item-inactive-label-text-color)]",
|
|
52
|
+
"group-data-current/nav:text-label-medium-emphasized group-data-current/nav:text-[color:var(--_md-comp-nav-rail-item-active-label-text-color)]"
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
"rail-start": {
|
|
56
|
+
root: "min-h-[48px] w-full justify-items-start px-(--m3-rail-item-inset)",
|
|
57
|
+
pill: "min-h-[56px] max-w-full",
|
|
58
|
+
indicator: ["[clip-path:inset(0_calc(100%_-_28px)_0_28px_round_9999px)] rtl:[clip-path:inset(0_28px_0_calc(100%_-_28px)_round_9999px)]", "bg-[var(--_md-comp-nav-rail-item-active-indicator-color)]"],
|
|
59
|
+
content: "justify-start gap-[8px] ps-[16px] pe-[16px] py-[8px]",
|
|
60
|
+
icon: "text-[color:var(--_md-comp-nav-rail-item-inactive-icon-color)] group-data-current/nav:text-[color:var(--_md-comp-nav-rail-item-active-icon-color)]",
|
|
61
|
+
label: [
|
|
62
|
+
"forced-colors:group-data-current/nav:text-[HighlightText] forced-colors:group-data-current/nav:forced-color-adjust-none",
|
|
63
|
+
"text-label-large text-[color:var(--_md-comp-nav-rail-item-inactive-label-text-color)]",
|
|
64
|
+
"group-data-current/nav:text-label-large-emphasized group-data-current/nav:text-[color:var(--_md-comp-nav-rail-item-active-label-text-color)]"
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
"bar-top": {
|
|
68
|
+
root: "self-stretch content-start py-[6px]",
|
|
69
|
+
pill: "h-[32px] w-[56px]",
|
|
70
|
+
indicator: "[clip-path:inset(0_50%_round_9999px)] bg-[var(--_md-comp-nav-bar-item-active-indicator-color)]",
|
|
71
|
+
icon: "text-[color:var(--_md-comp-nav-bar-item-inactive-icon-color)] group-data-current/nav:text-[color:var(--_md-comp-nav-bar-item-active-icon-color)]",
|
|
72
|
+
label: [
|
|
73
|
+
"mt-[4px] max-w-full px-[4px] text-center text-label-medium",
|
|
74
|
+
"text-[color:var(--_md-comp-nav-bar-item-inactive-label-text-color)]",
|
|
75
|
+
"group-data-current/nav:text-label-medium-emphasized group-data-current/nav:text-[color:var(--_md-comp-nav-bar-item-active-label-text-color)]"
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
"bar-start": {
|
|
79
|
+
root: "self-stretch content-center px-[4px]",
|
|
80
|
+
pill: "min-h-[40px] max-w-full",
|
|
81
|
+
indicator: ["[clip-path:inset(0_calc(100%_-_28px)_0_28px_round_9999px)] rtl:[clip-path:inset(0_28px_0_calc(100%_-_28px)_round_9999px)]", "bg-[var(--_md-comp-nav-bar-item-active-indicator-color)]"],
|
|
82
|
+
content: "gap-[4px] ps-[16px] pe-[16px] py-[4px]",
|
|
83
|
+
icon: ["text-[color:var(--_md-comp-nav-bar-item-inactive-icon-color)] group-data-current/nav:text-[color:var(--_md-comp-nav-bar-item-active-icon-color)]", "has-[[data-size=large]]:w-auto has-[[data-size=large]]:min-w-[24px] has-[[data-size=large]]:justify-items-start"],
|
|
84
|
+
badgedBox: [
|
|
85
|
+
"has-[[data-size=large]]:grid-cols-[auto]",
|
|
86
|
+
"[&:has([data-size=large])>span:first-child]:w-[24px] [&:has([data-size=large])>span:first-child]:justify-self-start",
|
|
87
|
+
"[&>span:last-child:has([data-size=large])]:w-max [&>span:last-child:has([data-size=large])]:ms-[12px]"
|
|
88
|
+
],
|
|
89
|
+
label: [
|
|
90
|
+
"forced-colors:group-data-current/nav:text-[HighlightText] forced-colors:group-data-current/nav:forced-color-adjust-none",
|
|
91
|
+
"text-label-medium text-[color:var(--_md-comp-nav-bar-item-inactive-label-text-color)]",
|
|
92
|
+
"group-data-current/nav:text-label-medium-emphasized group-data-current/nav:text-[color:var(--_md-comp-nav-bar-item-active-label-text-color)]"
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
/** Labels that move when the rail changes width fade in at their new place. */
|
|
97
|
+
enterLabel: {
|
|
98
|
+
true: { label: "starting:opacity-0" },
|
|
99
|
+
false: {}
|
|
100
|
+
},
|
|
101
|
+
/** The pill slides between items (Motion moves it) instead of expanding in place. */
|
|
102
|
+
slide: {
|
|
103
|
+
true: {
|
|
104
|
+
indicator: "[transition-property:none] motion-reduce:[transition-property:opacity]",
|
|
105
|
+
content: "z-[1]"
|
|
106
|
+
},
|
|
107
|
+
false: {}
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
compoundVariants: [{
|
|
111
|
+
layout: ["rail-top", "rail-start"],
|
|
112
|
+
class: { root: "[transition-property:min-height] [transition-duration:var(--md-sys-motion-spring-spatial-default-duration)] [transition-timing-function:var(--md-sys-motion-spring-spatial-default-easing)]" }
|
|
113
|
+
}],
|
|
114
|
+
defaultVariants: {
|
|
115
|
+
layout: "bar-top",
|
|
116
|
+
enterLabel: false,
|
|
117
|
+
slide: false
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
//#endregion
|
|
121
|
+
export { navItemStyles };
|
|
122
|
+
|
|
123
|
+
//# sourceMappingURL=nav-item-styles.js.map
|