@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,521 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../utils/cn.js";
|
|
3
|
+
import { TriggerContext, useTriggerProps } from "../../primitives/TriggerContext.js";
|
|
4
|
+
import { mergeDataTokens } from "../../utils/merge-data-tokens.js";
|
|
5
|
+
import { usePresence } from "../../primitives/use-presence.js";
|
|
6
|
+
import { useWarnOnce } from "../../utils/warn-once.js";
|
|
7
|
+
import { IconButton } from "../icon-button/IconButton.js";
|
|
8
|
+
import { focusFirstInteractive, tabbables } from "../../utils/focus.js";
|
|
9
|
+
import { Overlay as Overlay$1 } from "../../primitives/Overlay.js";
|
|
10
|
+
import { DensityZeroButtons } from "../button/DensityZeroButtons.js";
|
|
11
|
+
import { closedByOverlayOptions } from "../../utils/closed-by.js";
|
|
12
|
+
import { DIALOG_ROOT_STYLE, dialogStyles } from "./dialog-styles.js";
|
|
13
|
+
import { Children, Fragment, createContext, isValidElement, useContext, useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
14
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
+
import { mergeProps, useDialog, useFocusRing, useModalOverlay, useObjectRef, useOverlayTrigger } from "react-aria";
|
|
16
|
+
import { useOverlayTriggerState } from "react-stately";
|
|
17
|
+
//#region src/components/dialog/Dialog.tsx
|
|
18
|
+
/** Material Symbols "close" (Apache-2.0). */
|
|
19
|
+
function CloseIcon() {
|
|
20
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
21
|
+
viewBox: "0 -960 960 960",
|
|
22
|
+
fill: "currentColor",
|
|
23
|
+
children: /* @__PURE__ */ jsx("path", { d: "m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z" })
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
/** How browsers serialise a computed `transparent`. */
|
|
27
|
+
const TRANSPARENT = "rgba(0, 0, 0, 0)";
|
|
28
|
+
/** A corner radius in px; a percentage resolves against the origin's shorter side. */
|
|
29
|
+
function cornerRadius(value, rect) {
|
|
30
|
+
if (!value.endsWith("%")) return value || "0px";
|
|
31
|
+
return `${parseFloat(value) / 100 * Math.min(rect.width, rect.height)}px`;
|
|
32
|
+
}
|
|
33
|
+
/** The origin's box as insets from the window (the full-screen dialog's box). */
|
|
34
|
+
function measureOrigin(origin) {
|
|
35
|
+
const isElement = origin instanceof Element;
|
|
36
|
+
const rect = isElement ? origin.getBoundingClientRect() : origin;
|
|
37
|
+
const style = isElement ? getComputedStyle(origin) : null;
|
|
38
|
+
const radius = cornerRadius(style?.borderTopLeftRadius ?? "0px", rect);
|
|
39
|
+
const top = rect.top;
|
|
40
|
+
const left = rect.left;
|
|
41
|
+
const right = window.innerWidth - rect.right;
|
|
42
|
+
const bottom = window.innerHeight - rect.bottom;
|
|
43
|
+
const background = style?.backgroundColor ?? TRANSPARENT;
|
|
44
|
+
return {
|
|
45
|
+
clip: `inset(${top}px ${right}px ${bottom}px ${left}px round ${radius})`,
|
|
46
|
+
color: background === TRANSPARENT ? "var(--md-sys-color-surface-container-high)" : background
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
const DialogTriggerContext = createContext(null);
|
|
50
|
+
/**
|
|
51
|
+
* Calls `onOpened` once the enter motion has finished: every CSS transition running on the
|
|
52
|
+
* scrim, the motion wrapper, the panel and the panel's parts when they first render. Styles
|
|
53
|
+
* are read on the first frame, so the `@starting-style` transitions have begun. A transition
|
|
54
|
+
* cut short (the dialog closes while entering) never finishes, so a dialog that closes early
|
|
55
|
+
* doesn't report opening.
|
|
56
|
+
*/
|
|
57
|
+
function useOpened(scrimRef, motionRef, panelRef, onOpened) {
|
|
58
|
+
const latest = useRef(onOpened);
|
|
59
|
+
useLayoutEffect(() => {
|
|
60
|
+
latest.current = onOpened;
|
|
61
|
+
});
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
let active = true;
|
|
64
|
+
const frame = requestAnimationFrame(() => {
|
|
65
|
+
const panel = panelRef.current;
|
|
66
|
+
const transitions = [
|
|
67
|
+
scrimRef.current,
|
|
68
|
+
motionRef.current,
|
|
69
|
+
panel,
|
|
70
|
+
...panel?.children ?? []
|
|
71
|
+
].flatMap((element) => {
|
|
72
|
+
if (!element || typeof element.getAnimations !== "function") return [];
|
|
73
|
+
getComputedStyle(element).opacity;
|
|
74
|
+
return element.getAnimations().filter((animation) => "transitionProperty" in animation);
|
|
75
|
+
});
|
|
76
|
+
Promise.all(transitions.map((transition) => transition.finished)).then(() => {
|
|
77
|
+
if (active) latest.current?.();
|
|
78
|
+
}, () => void 0);
|
|
79
|
+
});
|
|
80
|
+
return () => {
|
|
81
|
+
active = false;
|
|
82
|
+
cancelAnimationFrame(frame);
|
|
83
|
+
};
|
|
84
|
+
}, [
|
|
85
|
+
scrimRef,
|
|
86
|
+
motionRef,
|
|
87
|
+
panelRef
|
|
88
|
+
]);
|
|
89
|
+
}
|
|
90
|
+
const DialogPartsContext = createContext({
|
|
91
|
+
titleProps: {},
|
|
92
|
+
contentProps: {},
|
|
93
|
+
hasIcon: false,
|
|
94
|
+
fullScreen: "never",
|
|
95
|
+
close: () => void 0,
|
|
96
|
+
setHasContent: () => void 0,
|
|
97
|
+
setHeaderAction: () => void 0,
|
|
98
|
+
bottomBar: false
|
|
99
|
+
});
|
|
100
|
+
/**
|
|
101
|
+
* Opens a `Dialog` from a button. The first child is the trigger (any button-like
|
|
102
|
+
* component); the rest is the dialog.
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* <DialogTrigger>
|
|
106
|
+
* <Button>Delete</Button>
|
|
107
|
+
* <Dialog>…</Dialog>
|
|
108
|
+
* </DialogTrigger>
|
|
109
|
+
*/
|
|
110
|
+
function DialogTrigger({ children, open, defaultOpen, onOpenChange }) {
|
|
111
|
+
const state = useOverlayTriggerState({
|
|
112
|
+
isOpen: open,
|
|
113
|
+
defaultOpen,
|
|
114
|
+
onOpenChange
|
|
115
|
+
});
|
|
116
|
+
const triggerRef = useRef(null);
|
|
117
|
+
const { triggerProps, overlayProps } = useOverlayTrigger({ type: "dialog" }, state, triggerRef);
|
|
118
|
+
const triggerValue = useTriggerProps({
|
|
119
|
+
...triggerProps,
|
|
120
|
+
ref: triggerRef
|
|
121
|
+
});
|
|
122
|
+
const [trigger, ...dialog] = Children.toArray(children);
|
|
123
|
+
return /* @__PURE__ */ jsxs(DialogTriggerContext, {
|
|
124
|
+
value: {
|
|
125
|
+
state,
|
|
126
|
+
overlayProps,
|
|
127
|
+
triggerRef
|
|
128
|
+
},
|
|
129
|
+
children: [/* @__PURE__ */ jsx(TriggerContext, {
|
|
130
|
+
value: triggerValue,
|
|
131
|
+
children: trigger
|
|
132
|
+
}), dialog]
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* M3 basic dialog: a modal panel over a scrim, rendered in a portal that keeps the
|
|
137
|
+
* surrounding theme. It's an alert dialog (described by its `DialogContent`). Focus moves
|
|
138
|
+
* to its first interactive element (or one marked `autoFocus`), is contained, and is
|
|
139
|
+
* restored on close; Escape closes it; the page behind does not scroll and is hidden from
|
|
140
|
+
* assistive tech. Name it with a `DialogTitle` (or `aria-label`).
|
|
141
|
+
*
|
|
142
|
+
* It enters with the M3 dialog motion: it slides 50px away from the window edge it sits
|
|
143
|
+
* against while its container grows from that edge, then its headline and content fade in,
|
|
144
|
+
* then its actions; it leaves by fading its parts, sliding back and shrinking, then fading.
|
|
145
|
+
* Any children take part: the actions phase is for `DialogActions` (or any child with
|
|
146
|
+
* `data-slot="actions"`), and every other child fades in with the content. `onOpened` and
|
|
147
|
+
* `onClosed` report the end of each motion; `instant` turns it off.
|
|
148
|
+
*
|
|
149
|
+
* `className` and `style` go on the outermost element, a full-window layer around the
|
|
150
|
+
* positioner whose inline placement they can't move, so a layout class (`static`,
|
|
151
|
+
* `overflow-hidden`, a transform) never hides, clips or stretches the dialog; style the
|
|
152
|
+
* surface with `classNames.panel`. `ref` and other attributes go on the dialog panel.
|
|
153
|
+
*
|
|
154
|
+
* @example
|
|
155
|
+
* <Dialog icon={<DeleteIcon />}>
|
|
156
|
+
* {({ close }) => (
|
|
157
|
+
* <>
|
|
158
|
+
* <DialogTitle>Delete 3 files?</DialogTitle>
|
|
159
|
+
* <DialogContent>They will be removed from all devices.</DialogContent>
|
|
160
|
+
* <DialogActions>
|
|
161
|
+
* <Button variant="text" onPress={close}>Cancel</Button>
|
|
162
|
+
* <Button variant="text" onPress={remove}>Delete</Button>
|
|
163
|
+
* </DialogActions>
|
|
164
|
+
* </>
|
|
165
|
+
* )}
|
|
166
|
+
* </Dialog>
|
|
167
|
+
*/
|
|
168
|
+
function Dialog({ open, defaultOpen, onOpenChange, origin, onClosed, ...props }) {
|
|
169
|
+
const trigger = useContext(DialogTriggerContext);
|
|
170
|
+
const ownState = useOverlayTriggerState({
|
|
171
|
+
isOpen: open,
|
|
172
|
+
defaultOpen,
|
|
173
|
+
onOpenChange
|
|
174
|
+
});
|
|
175
|
+
const state = trigger?.state ?? ownState;
|
|
176
|
+
const { isPresent, isExiting, exitProps } = usePresence(state.isOpen, "opacity", !props.instant);
|
|
177
|
+
const onClosedRef = useRef(onClosed);
|
|
178
|
+
useLayoutEffect(() => {
|
|
179
|
+
onClosedRef.current = onClosed;
|
|
180
|
+
});
|
|
181
|
+
const wasPresent = useRef(isPresent);
|
|
182
|
+
useEffect(() => {
|
|
183
|
+
if (wasPresent.current && !isPresent) onClosedRef.current?.();
|
|
184
|
+
wasPresent.current = isPresent;
|
|
185
|
+
}, [isPresent]);
|
|
186
|
+
const usesOrigin = origin !== void 0 && (props.fullScreen ?? "never") !== "never";
|
|
187
|
+
const [measured, setMeasured] = useState(null);
|
|
188
|
+
if (!isPresent && measured !== null) setMeasured(null);
|
|
189
|
+
const triggerRef = trigger?.triggerRef;
|
|
190
|
+
const isOpen = state.isOpen;
|
|
191
|
+
useLayoutEffect(() => {
|
|
192
|
+
if (!usesOrigin || !isPresent) return;
|
|
193
|
+
const target = origin === "trigger" ? triggerRef?.current : origin;
|
|
194
|
+
setMeasured({ box: target ? measureOrigin(target) : null });
|
|
195
|
+
}, [
|
|
196
|
+
usesOrigin,
|
|
197
|
+
origin,
|
|
198
|
+
triggerRef,
|
|
199
|
+
isOpen,
|
|
200
|
+
isPresent
|
|
201
|
+
]);
|
|
202
|
+
if (!isPresent || usesOrigin && measured === null) return null;
|
|
203
|
+
return /* @__PURE__ */ jsx(Overlay$1, {
|
|
204
|
+
exiting: isExiting,
|
|
205
|
+
children: /* @__PURE__ */ jsx(DialogModal, {
|
|
206
|
+
...props,
|
|
207
|
+
state,
|
|
208
|
+
isExiting,
|
|
209
|
+
exitProps,
|
|
210
|
+
triggerOverlayProps: trigger?.overlayProps,
|
|
211
|
+
originBox: usesOrigin ? measured?.box ?? null : null
|
|
212
|
+
})
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
function DialogModal({ state, isExiting, exitProps, triggerOverlayProps, originBox, role: roleProp, closedBy, icon, fullScreen = "never", placement = "center", instant = false, transition = "reveal", onOpened, children, className, classNames, style, ref, ...rest }) {
|
|
216
|
+
const role = roleProp ?? (fullScreen === "never" ? "alertdialog" : "dialog");
|
|
217
|
+
const panelRef = useObjectRef(ref);
|
|
218
|
+
const motionRef = useRef(null);
|
|
219
|
+
const scrimRef = useRef(null);
|
|
220
|
+
useOpened(scrimRef, motionRef, panelRef, onOpened);
|
|
221
|
+
const [hasContent, setHasContent] = useState(false);
|
|
222
|
+
const [headerAction, setHeaderAction] = useState(false);
|
|
223
|
+
const { modalProps, underlayProps } = useModalOverlay(closedByOverlayOptions(closedBy ?? (role === "alertdialog" ? "closerequest" : "any"), isExiting), state, panelRef);
|
|
224
|
+
const { dialogProps, titleProps, contentProps } = useDialog({
|
|
225
|
+
...rest,
|
|
226
|
+
role
|
|
227
|
+
}, panelRef);
|
|
228
|
+
const describedBy = rest["aria-describedby"] ?? (hasContent ? dialogProps["aria-describedby"] : void 0);
|
|
229
|
+
useEffect(() => focusFirstInteractive(panelRef.current, leastDestructiveAction), [panelRef]);
|
|
230
|
+
const hasIcon = fullScreen !== "always" && icon !== void 0 && icon !== null;
|
|
231
|
+
const bottomBar = fullScreen !== "never" && !headerAction;
|
|
232
|
+
const origin = originBox !== null;
|
|
233
|
+
const styles = dialogStyles({
|
|
234
|
+
hasIcon,
|
|
235
|
+
fullScreen,
|
|
236
|
+
placement,
|
|
237
|
+
bottomBar,
|
|
238
|
+
origin,
|
|
239
|
+
instant,
|
|
240
|
+
transition
|
|
241
|
+
});
|
|
242
|
+
const exiting = isExiting || void 0;
|
|
243
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", {
|
|
244
|
+
ref: scrimRef,
|
|
245
|
+
"aria-hidden": "true",
|
|
246
|
+
"data-exiting": exiting,
|
|
247
|
+
className: styles.scrim({ class: classNames?.scrim })
|
|
248
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
249
|
+
style: {
|
|
250
|
+
...style,
|
|
251
|
+
...DIALOG_ROOT_STYLE
|
|
252
|
+
},
|
|
253
|
+
className: styles.root({ class: className }),
|
|
254
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
255
|
+
...underlayProps,
|
|
256
|
+
className: styles.positioner({ class: classNames?.positioner }),
|
|
257
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
258
|
+
...exitProps,
|
|
259
|
+
ref: motionRef,
|
|
260
|
+
"data-exiting": exiting,
|
|
261
|
+
style: originBox ? {
|
|
262
|
+
"--m3-dialog-origin": originBox.clip,
|
|
263
|
+
"--m3-dialog-origin-color": originBox.color
|
|
264
|
+
} : void 0,
|
|
265
|
+
className: styles.motion(),
|
|
266
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
267
|
+
...mergeProps(rest, triggerOverlayProps ?? {}, modalProps, dialogProps),
|
|
268
|
+
"aria-describedby": describedBy,
|
|
269
|
+
ref: panelRef,
|
|
270
|
+
"data-exiting": exiting,
|
|
271
|
+
"data-tokens": mergeDataTokens("md-comp-dialog", rest),
|
|
272
|
+
"data-full-screen": fullScreen === "never" ? void 0 : fullScreen,
|
|
273
|
+
"data-origin": origin || void 0,
|
|
274
|
+
className: styles.panel({ class: [transition === "reveal" && styles.parts(), classNames?.panel] }),
|
|
275
|
+
children: /* @__PURE__ */ jsx(TriggerContext, {
|
|
276
|
+
value: null,
|
|
277
|
+
children: /* @__PURE__ */ jsxs(DialogPartsContext, {
|
|
278
|
+
value: {
|
|
279
|
+
titleProps,
|
|
280
|
+
contentProps,
|
|
281
|
+
hasIcon,
|
|
282
|
+
fullScreen,
|
|
283
|
+
close: state.close,
|
|
284
|
+
setHasContent,
|
|
285
|
+
setHeaderAction,
|
|
286
|
+
bottomBar
|
|
287
|
+
},
|
|
288
|
+
children: [hasIcon && /* @__PURE__ */ jsx("span", {
|
|
289
|
+
"aria-hidden": "true",
|
|
290
|
+
"data-slot": "icon",
|
|
291
|
+
className: styles.icon({ class: cn(fullScreen === "compact" && "max-medium:hidden", classNames?.icon) }),
|
|
292
|
+
children: icon
|
|
293
|
+
}), typeof children === "function" ? children({ close: state.close }) : children]
|
|
294
|
+
})
|
|
295
|
+
})
|
|
296
|
+
})
|
|
297
|
+
})
|
|
298
|
+
})
|
|
299
|
+
})] });
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* The dialog's headline; it also names the dialog for assistive tech. In a dialog that can
|
|
303
|
+
* be full screen, use `DialogHeader` instead.
|
|
304
|
+
*/
|
|
305
|
+
function DialogTitle({ className, ...props }) {
|
|
306
|
+
const { titleProps, hasIcon } = useContext(DialogPartsContext);
|
|
307
|
+
return /* @__PURE__ */ jsx("h2", {
|
|
308
|
+
...mergeProps(titleProps, props),
|
|
309
|
+
"data-slot": "title",
|
|
310
|
+
className: dialogStyles({ hasIcon }).title({ class: className })
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
const DEFAULT_HEADER_LABELS = { close: "Close" };
|
|
314
|
+
/**
|
|
315
|
+
* The headline of a dialog that can be full screen. In full screen it is the M3 full-screen
|
|
316
|
+
* dialog's header: a close icon button, the headline and the confirming action. Otherwise
|
|
317
|
+
* it is a plain `DialogTitle`, and the dialog's `DialogActions` carry the actions.
|
|
318
|
+
*
|
|
319
|
+
* @example
|
|
320
|
+
* <Dialog fullScreen="compact">
|
|
321
|
+
* <DialogHeader action={<Button variant="text" onPress={save}>Save</Button>}>
|
|
322
|
+
* Edit name
|
|
323
|
+
* </DialogHeader>
|
|
324
|
+
* <DialogContent>…</DialogContent>
|
|
325
|
+
* <DialogActions>…</DialogActions>
|
|
326
|
+
* </Dialog>
|
|
327
|
+
*/
|
|
328
|
+
function DialogHeader({ children, labels, action, divider = false, closeDisabled = false, className, classNames, ...props }) {
|
|
329
|
+
const { titleProps, hasIcon, fullScreen, close, setHeaderAction } = useContext(DialogPartsContext);
|
|
330
|
+
const hasAction = action !== void 0;
|
|
331
|
+
useLayoutEffect(() => {
|
|
332
|
+
setHeaderAction(hasAction);
|
|
333
|
+
return () => setHeaderAction(false);
|
|
334
|
+
}, [hasAction, setHeaderAction]);
|
|
335
|
+
const styles = dialogStyles({
|
|
336
|
+
hasIcon,
|
|
337
|
+
fullScreen,
|
|
338
|
+
divider
|
|
339
|
+
});
|
|
340
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
341
|
+
...props,
|
|
342
|
+
className: styles.header({ class: cn(classNames?.root, className) }),
|
|
343
|
+
children: [
|
|
344
|
+
fullScreen !== "never" && /* @__PURE__ */ jsx(IconButton, {
|
|
345
|
+
variant: "standard",
|
|
346
|
+
density: 0,
|
|
347
|
+
icon: /* @__PURE__ */ jsx(CloseIcon, {}),
|
|
348
|
+
"aria-label": labels?.close ?? DEFAULT_HEADER_LABELS.close,
|
|
349
|
+
disabled: closeDisabled,
|
|
350
|
+
onPress: close,
|
|
351
|
+
className: styles.headerButton({ class: cn(styles.close(), classNames?.close) })
|
|
352
|
+
}),
|
|
353
|
+
/* @__PURE__ */ jsx("h2", {
|
|
354
|
+
...titleProps,
|
|
355
|
+
"data-slot": "title",
|
|
356
|
+
className: styles.title({ class: classNames?.title }),
|
|
357
|
+
children
|
|
358
|
+
}),
|
|
359
|
+
fullScreen !== "never" && action !== void 0 && /* @__PURE__ */ jsx("div", {
|
|
360
|
+
className: styles.headerButton(),
|
|
361
|
+
children: /* @__PURE__ */ jsx(DensityZeroButtons, { children: action })
|
|
362
|
+
})
|
|
363
|
+
]
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Whether an element's content is taller than its box, from a `ResizeObserver` on it and
|
|
368
|
+
* its children (so it is measured only when a size changes).
|
|
369
|
+
*/
|
|
370
|
+
function useOverflows(ref) {
|
|
371
|
+
const [overflows, setOverflows] = useState(false);
|
|
372
|
+
useLayoutEffect(() => {
|
|
373
|
+
const element = ref.current;
|
|
374
|
+
if (!element || typeof ResizeObserver === "undefined") return;
|
|
375
|
+
const observer = new ResizeObserver(() => setOverflows(element.scrollHeight > element.clientHeight + 1));
|
|
376
|
+
observer.observe(element);
|
|
377
|
+
for (const child of element.children) observer.observe(child);
|
|
378
|
+
return () => observer.disconnect();
|
|
379
|
+
}, [ref]);
|
|
380
|
+
return overflows;
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* The dialog's supporting text or content; scrolls when the dialog is too tall. It describes
|
|
384
|
+
* an alert dialog. While it scrolls it is focusable (with a focus ring), so the keyboard can
|
|
385
|
+
* scroll it (`data-scrollable`); the dialog's initial focus still goes to its first control.
|
|
386
|
+
*/
|
|
387
|
+
function DialogContent({ className, dividers = false, ref, ...props }) {
|
|
388
|
+
const { fullScreen, contentProps, setHasContent } = useContext(DialogPartsContext);
|
|
389
|
+
const contentRef = useObjectRef(ref);
|
|
390
|
+
const overflows = useOverflows(contentRef);
|
|
391
|
+
const { isFocusVisible, focusProps } = useFocusRing();
|
|
392
|
+
useLayoutEffect(() => {
|
|
393
|
+
setHasContent(true);
|
|
394
|
+
return () => setHasContent(false);
|
|
395
|
+
}, [setHasContent]);
|
|
396
|
+
return /* @__PURE__ */ jsx("div", {
|
|
397
|
+
...mergeProps(contentProps, overflows ? focusProps : {}, props),
|
|
398
|
+
ref: contentRef,
|
|
399
|
+
tabIndex: props.tabIndex ?? (overflows ? 0 : void 0),
|
|
400
|
+
"data-scrollable": overflows || void 0,
|
|
401
|
+
"data-focus-visible": overflows && isFocusVisible || void 0,
|
|
402
|
+
"data-slot": "content",
|
|
403
|
+
className: dialogStyles({
|
|
404
|
+
fullScreen,
|
|
405
|
+
dividers
|
|
406
|
+
}).content({ class: className })
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
/** The elements among `children`, counting a fragment's children rather than the fragment. */
|
|
410
|
+
function countActions(children) {
|
|
411
|
+
let count = 0;
|
|
412
|
+
Children.forEach(children, (child) => {
|
|
413
|
+
if (!isValidElement(child)) return;
|
|
414
|
+
count += child.type === Fragment ? countActions(child.props.children) : 1;
|
|
415
|
+
});
|
|
416
|
+
return count;
|
|
417
|
+
}
|
|
418
|
+
/** `children` as a flat list, with fragments' children in place of the fragments. */
|
|
419
|
+
function flatChildren(children) {
|
|
420
|
+
return Children.toArray(children).flatMap((child) => isValidElement(child) && child.type === Fragment ? flatChildren(child.props.children) : [child]);
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* Where a dialog's initial focus goes when its first interactive element is one of its
|
|
424
|
+
* actions: the dismissive, least destructive action (the WAI-ARIA alert dialog pattern:
|
|
425
|
+
* "focus the least destructive action"). That's the first action in source order, which is
|
|
426
|
+
* the row's first button on one line and its last when stacked, since stacked actions are
|
|
427
|
+
* rendered with the confirming action on top. The row says which (`data-stacked`) in the
|
|
428
|
+
* same render that reorders it, so the rule holds whenever the dialog takes focus, before
|
|
429
|
+
* or after the actions stack.
|
|
430
|
+
*/
|
|
431
|
+
function leastDestructiveAction(first) {
|
|
432
|
+
const row = first.closest("[data-slot=\"actions\"]");
|
|
433
|
+
if (!row) return first;
|
|
434
|
+
const actions = tabbables(row);
|
|
435
|
+
return (row.hasAttribute("data-stacked") ? actions.at(-1) : actions[0]) ?? first;
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* Whether the actions are stacked: they don't fit on one line, and the layout lets them
|
|
439
|
+
* stack (`--m3-dialog-actions-stack`, off in the full-screen bottom bar). Measured on mount
|
|
440
|
+
* and on every resize of the row or a button. Switching reorders the buttons, and moving
|
|
441
|
+
* the focused one drops focus to the page, so it's focused again.
|
|
442
|
+
*/
|
|
443
|
+
function useStackedActions(ref) {
|
|
444
|
+
const [stacked, setStacked] = useState(false);
|
|
445
|
+
const current = useRef(false);
|
|
446
|
+
const focused = useRef(null);
|
|
447
|
+
useLayoutEffect(() => {
|
|
448
|
+
const row = ref.current;
|
|
449
|
+
if (!row) return;
|
|
450
|
+
const measure = () => {
|
|
451
|
+
if (row.clientWidth === 0) return;
|
|
452
|
+
const style = getComputedStyle(row);
|
|
453
|
+
const items = [...row.children];
|
|
454
|
+
const gap = parseFloat(style.columnGap) || 0;
|
|
455
|
+
const room = row.clientWidth - (parseFloat(style.paddingLeft) || 0) - (parseFloat(style.paddingRight) || 0);
|
|
456
|
+
const needed = items.reduce((sum, item) => sum + item.offsetWidth, 0) + gap * (items.length - 1);
|
|
457
|
+
const next = style.getPropertyValue("--m3-dialog-actions-stack").trim() === "1" && items.length > 1 && needed > room + .5;
|
|
458
|
+
if (next === current.current) return;
|
|
459
|
+
current.current = next;
|
|
460
|
+
setStacked(next);
|
|
461
|
+
};
|
|
462
|
+
const onFocusIn = (event) => {
|
|
463
|
+
if (event.target instanceof HTMLElement) focused.current = event.target;
|
|
464
|
+
};
|
|
465
|
+
const onFocusOut = (event) => {
|
|
466
|
+
if (event.relatedTarget !== null) focused.current = null;
|
|
467
|
+
};
|
|
468
|
+
row.addEventListener("focusin", onFocusIn);
|
|
469
|
+
row.addEventListener("focusout", onFocusOut);
|
|
470
|
+
const observer = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(measure);
|
|
471
|
+
observer?.observe(row);
|
|
472
|
+
for (const item of row.children) observer?.observe(item);
|
|
473
|
+
measure();
|
|
474
|
+
return () => {
|
|
475
|
+
row.removeEventListener("focusin", onFocusIn);
|
|
476
|
+
row.removeEventListener("focusout", onFocusOut);
|
|
477
|
+
observer?.disconnect();
|
|
478
|
+
};
|
|
479
|
+
}, [ref]);
|
|
480
|
+
useLayoutEffect(() => {
|
|
481
|
+
const element = focused.current;
|
|
482
|
+
const active = element?.ownerDocument.activeElement;
|
|
483
|
+
if (element?.isConnected && (!active || active === element.ownerDocument.body)) element.focus();
|
|
484
|
+
}, [stacked]);
|
|
485
|
+
return stacked;
|
|
486
|
+
}
|
|
487
|
+
/**
|
|
488
|
+
* Row of actions at the end of the dialog, 8px apart. Put the confirming action last:
|
|
489
|
+
* when the actions do not fit on one line they stack with it on top (M3: "Confirming
|
|
490
|
+
* actions appear above dismissive actions"). Stacked, the buttons are rendered in that
|
|
491
|
+
* visual order, so Tab and screen readers reach the confirming action first, top to bottom,
|
|
492
|
+
* as they reach the dismissive one first in a row. When the actions are the dialog's first
|
|
493
|
+
* controls, its initial focus goes to the dismissive action, stacked (the bottom one) or
|
|
494
|
+
* not: the least destructive choice, as the WAI-ARIA alert dialog pattern asks; a stack
|
|
495
|
+
* that forms or unforms later keeps focus where it is. While the dialog is full screen they're
|
|
496
|
+
* hidden when `DialogHeader` carries the confirming action, and otherwise form the spec's
|
|
497
|
+
* 56px bottom action bar. Use at most two actions (the spec); in development it warns once
|
|
498
|
+
* when it holds more.
|
|
499
|
+
*/
|
|
500
|
+
function DialogActions({ className, children, ref, ...props }) {
|
|
501
|
+
const { fullScreen, bottomBar } = useContext(DialogPartsContext);
|
|
502
|
+
const actionCount = countActions(children);
|
|
503
|
+
useWarnOnce(actionCount > 2, `[@windmorph/react] DialogActions holds ${actionCount} actions; M3 dialogs have at most two (no third such as "Learn more"). Show more inline, or before the dialog opens.`);
|
|
504
|
+
const rowRef = useObjectRef(ref);
|
|
505
|
+
const stacked = useStackedActions(rowRef);
|
|
506
|
+
return /* @__PURE__ */ jsx("div", {
|
|
507
|
+
...props,
|
|
508
|
+
ref: rowRef,
|
|
509
|
+
"data-slot": "actions",
|
|
510
|
+
"data-stacked": stacked || void 0,
|
|
511
|
+
className: dialogStyles({
|
|
512
|
+
fullScreen,
|
|
513
|
+
bottomBar
|
|
514
|
+
}).actions({ class: className }),
|
|
515
|
+
children: stacked ? flatChildren(children).reverse() : flatChildren(children)
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
//#endregion
|
|
519
|
+
export { Dialog, DialogActions, DialogContent, DialogHeader, DialogTitle, DialogTrigger, leastDestructiveAction };
|
|
520
|
+
|
|
521
|
+
//# sourceMappingURL=Dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dialog.js","names":["Overlay"],"sources":["../../../src/components/dialog/Dialog.tsx"],"sourcesContent":["'use client';\n\nimport {\n Children,\n Fragment,\n createContext,\n isValidElement,\n useContext,\n useEffect,\n useLayoutEffect,\n useRef,\n useState,\n type ComponentPropsWithRef,\n type RefObject,\n type CSSProperties,\n type DOMAttributes,\n type ReactNode,\n type Ref,\n} from 'react';\nimport {\n mergeProps,\n useDialog,\n useFocusRing,\n useModalOverlay,\n useObjectRef,\n useOverlayTrigger,\n type AriaDialogProps,\n} from 'react-aria';\nimport { useOverlayTriggerState, type OverlayTriggerState } from 'react-stately';\nimport { Overlay } from '../../primitives/Overlay';\nimport {\n TriggerContext,\n useTriggerProps,\n type TriggerContextValue,\n} from '../../primitives/TriggerContext';\nimport { usePresence } from '../../primitives/use-presence';\nimport { closedByOverlayOptions, type ClosedBy } from '../../utils/closed-by';\nimport { cn } from '../../utils/cn';\nimport { focusFirstInteractive, tabbables } from '../../utils/focus';\nimport { useWarnOnce } from '../../utils/warn-once';\nimport { DensityZeroButtons } from '../button/DensityZeroButtons';\nimport { IconButton } from '../icon-button/IconButton';\nimport { DIALOG_ROOT_STYLE, dialogStyles } from './dialog-styles';\nimport { mergeDataTokens } from '../../utils/merge-data-tokens';\n\n/** Material Symbols \"close\" (Apache-2.0). */\nfunction CloseIcon() {\n return (\n <svg viewBox=\"0 -960 960 960\" fill=\"currentColor\">\n <path d=\"m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z\" />\n </svg>\n );\n}\n\n/**\n * When a dialog fills the window (the M3 full-screen dialog): `never`, `always`, or\n * `compact` for windows narrower than 600px only, the M3 recommendation.\n */\nexport type DialogFullScreen = 'never' | 'always' | 'compact';\n\n/**\n * How a basic dialog enters and leaves: `reveal`, the M3 dialog motion, or `scale`, the\n * original pop (a fade with a scale from 90%).\n */\nexport type DialogTransition = 'reveal' | 'scale';\n\n/** Where a basic dialog sits in the window, keeping the spec's 56px margin on wider windows. */\nexport type DialogPlacement = 'center' | 'top' | 'bottom' | 'start' | 'end';\n\n/**\n * What a full-screen dialog grows out of (a container transform): `\"trigger\"` for the\n * `DialogTrigger`'s button, an element such as a FAB, or a box in window coordinates.\n */\nexport type DialogOrigin = 'trigger' | Element | DOMRectReadOnly;\n\ninterface DialogTriggerContextValue {\n state: OverlayTriggerState;\n /** Links the dialog to its trigger (`aria-controls`). */\n overlayProps: { id?: string };\n /** The trigger, for `origin=\"trigger\"`. */\n triggerRef: RefObject<HTMLElement | null>;\n}\n\n/** Where a container transform starts, measured from its origin. */\ninterface OriginBox {\n /** The origin's box and corners as a `clip-path` of the window. */\n clip: string;\n /** The origin's container colour, or the dialog's own when it has none. */\n color: string;\n}\n\n/** How browsers serialise a computed `transparent`. */\nconst TRANSPARENT = 'rgba(0, 0, 0, 0)';\n\n/** A corner radius in px; a percentage resolves against the origin's shorter side. */\nfunction cornerRadius(value: string, rect: DOMRectReadOnly): string {\n if (!value.endsWith('%')) return value || '0px';\n return `${(parseFloat(value) / 100) * Math.min(rect.width, rect.height)}px`;\n}\n\n/** The origin's box as insets from the window (the full-screen dialog's box). */\nfunction measureOrigin(origin: Element | DOMRectReadOnly): OriginBox {\n const isElement = origin instanceof Element;\n const rect = isElement ? origin.getBoundingClientRect() : origin;\n const style = isElement ? getComputedStyle(origin) : null;\n const radius = cornerRadius(style?.borderTopLeftRadius ?? '0px', rect);\n const top = rect.top;\n const left = rect.left;\n const right = window.innerWidth - rect.right;\n const bottom = window.innerHeight - rect.bottom;\n const background = style?.backgroundColor ?? TRANSPARENT;\n return {\n clip: `inset(${top}px ${right}px ${bottom}px ${left}px round ${radius})`,\n color: background === TRANSPARENT ? 'var(--md-sys-color-surface-container-high)' : background,\n };\n}\n\nconst DialogTriggerContext = createContext<DialogTriggerContextValue | null>(null);\n\n/**\n * Calls `onOpened` once the enter motion has finished: every CSS transition running on the\n * scrim, the motion wrapper, the panel and the panel's parts when they first render. Styles\n * are read on the first frame, so the `@starting-style` transitions have begun. A transition\n * cut short (the dialog closes while entering) never finishes, so a dialog that closes early\n * doesn't report opening.\n */\nfunction useOpened(\n scrimRef: RefObject<HTMLElement | null>,\n motionRef: RefObject<HTMLElement | null>,\n panelRef: RefObject<HTMLElement | null>,\n onOpened: (() => void) | undefined,\n) {\n const latest = useRef(onOpened);\n useLayoutEffect(() => {\n latest.current = onOpened;\n });\n useEffect(() => {\n let active = true;\n const frame = requestAnimationFrame(() => {\n const panel = panelRef.current;\n const elements = [scrimRef.current, motionRef.current, panel, ...(panel?.children ?? [])];\n const transitions = elements.flatMap((element) => {\n if (!element || typeof element.getAnimations !== 'function') return [];\n // Reading a style starts the transitions that haven't started yet.\n void getComputedStyle(element).opacity;\n return element.getAnimations().filter((animation) => 'transitionProperty' in animation);\n });\n Promise.all(transitions.map((transition) => transition.finished)).then(\n () => {\n if (active) latest.current?.();\n },\n () => undefined,\n );\n });\n return () => {\n active = false;\n cancelAnimationFrame(frame);\n };\n }, [scrimRef, motionRef, panelRef]);\n}\n\ninterface DialogPartsContextValue {\n titleProps: DOMAttributes<HTMLElement>;\n /** The id an alert dialog's description (`DialogContent`) takes. */\n contentProps: DOMAttributes<HTMLElement>;\n hasIcon: boolean;\n fullScreen: DialogFullScreen;\n close: () => void;\n /** `DialogContent` reports that it's there, so the dialog is described by it. */\n setHasContent: (has: boolean) => void;\n /** `DialogHeader` reports whether it holds the confirming action. */\n setHeaderAction: (has: boolean) => void;\n /** Full screen without a header action: `DialogActions` become a bottom bar. */\n bottomBar: boolean;\n}\n\nconst DialogPartsContext = createContext<DialogPartsContextValue>({\n titleProps: {},\n contentProps: {},\n hasIcon: false,\n fullScreen: 'never',\n close: () => undefined,\n setHasContent: () => undefined,\n setHeaderAction: () => undefined,\n bottomBar: false,\n});\n\nexport interface DialogTriggerProps {\n /** The trigger (a Button, IconButton, …) followed by the `Dialog`. */\n children: ReactNode;\n /** Controlled open state. */\n open?: boolean;\n /** Initial open state when uncontrolled. @default false */\n defaultOpen?: boolean;\n /** Called when the dialog opens or closes. */\n onOpenChange?: (open: boolean) => void;\n}\n\n/**\n * Opens a `Dialog` from a button. The first child is the trigger (any button-like\n * component); the rest is the dialog.\n *\n * @example\n * <DialogTrigger>\n * <Button>Delete</Button>\n * <Dialog>…</Dialog>\n * </DialogTrigger>\n */\nexport function DialogTrigger({ children, open, defaultOpen, onOpenChange }: DialogTriggerProps) {\n const state = useOverlayTriggerState({ isOpen: open, defaultOpen, onOpenChange });\n const triggerRef = useRef<HTMLElement>(null);\n const { triggerProps, overlayProps } = useOverlayTrigger({ type: 'dialog' }, state, triggerRef);\n const triggerValue = useTriggerProps({\n ...(triggerProps as TriggerContextValue),\n ref: triggerRef,\n });\n const [trigger, ...dialog] = Children.toArray(children);\n return (\n <DialogTriggerContext value={{ state, overlayProps, triggerRef }}>\n <TriggerContext value={triggerValue}>{trigger}</TriggerContext>\n {dialog}\n </DialogTriggerContext>\n );\n}\n\nexport interface DialogClassNames {\n /** The dimmed layer behind the dialog. */\n scrim?: string;\n /**\n * The fixed, full-window flex box that places the dialog. It pads 24px on compact windows\n * and 56px from the medium breakpoint, and `placement` sets its alignment, so alignment\n * classes here (`items-*`, `justify-*`) position the dialog anywhere within the spec's\n * margin, and padding classes change that margin.\n */\n positioner?: string;\n /** The dialog's surface: its colour, corners, padding, size and shadow. */\n panel?: string;\n /** The icon above the title. */\n icon?: string;\n}\n\nexport interface DialogRenderProps {\n /** Closes the dialog. */\n close: () => void;\n}\n\nexport interface DialogProps\n extends Omit<ComponentPropsWithRef<'div'>, 'children' | 'role'>, Omit<AriaDialogProps, 'role'> {\n /** Controlled open state, when not inside a `DialogTrigger`. */\n open?: boolean;\n /** Initial open state when uncontrolled, when not inside a `DialogTrigger`. @default false */\n defaultOpen?: boolean;\n /** Called when the dialog opens or closes. */\n onOpenChange?: (open: boolean) => void;\n /**\n * Basic dialogs are alert dialogs on the web (the spec): they need a decision, are\n * described by their `DialogContent`, and aren't dismissed by pressing outside. A dialog\n * that can be full screen is a `dialog`.\n * @default \"alertdialog\", or \"dialog\" when fullScreen isn't \"never\"\n */\n role?: 'dialog' | 'alertdialog';\n /**\n * How the user can close the dialog, as HTML's `<dialog closedby>`: `any` (Escape or a\n * press outside), `closerequest` (Escape only) or `none` (only its own buttons or the app).\n * @default \"closerequest\" for an alertdialog, \"any\" otherwise\n */\n closedBy?: ClosedBy;\n /** Icon above the title (which is then centred). Decorative. Not shown in full screen. */\n icon?: ReactNode;\n /**\n * Fills the window, with a `DialogHeader` holding the close button, title and confirming\n * action instead of `DialogActions` (or with them as a bottom bar when the header has no\n * action). `compact`, the spec's recommendation, does so only below 600px; `always` fills\n * every window. @default \"never\"\n */\n fullScreen?: DialogFullScreen;\n /**\n * Grows the full-screen dialog out of this origin and shrinks it back into it on close,\n * the spec's container transform from a FAB: `\"trigger\"` (the `DialogTrigger`'s button),\n * an element, or a box in window coordinates. The clip, corners and container colour\n * move from the origin to the window on the slow spatial spring and the content fades\n * in; reduced motion keeps only the fades. Used only while the dialog is full screen.\n */\n origin?: DialogOrigin;\n /**\n * Where a basic dialog sits: centred (the spec's default) or against one side of the\n * window, keeping 24px from its edges on compact windows and 56px on wider ones. For any\n * other position, align it with `classNames.positioner` (for example\n * `\"items-start justify-end\"` for the top end corner). It also sets the motion's\n * direction: centred or at the top the dialog slides down and grows downward as it\n * enters, at the bottom up, and at the start or end along the x axis (mirrored in\n * right-to-left layouts).\n * @default \"center\"\n */\n placement?: DialogPlacement;\n children?: ReactNode | ((props: DialogRenderProps) => ReactNode);\n /**\n * Classes for the dialog's parts, merged over the library's: `scrim`, `positioner` (the\n * full-window box that places the dialog; align it anywhere with `items-*` and\n * `justify-*`), `panel` (the surface) and `icon`.\n */\n classNames?: DialogClassNames;\n /** Goes on the outermost element, with `className`. */\n style?: CSSProperties;\n /**\n * How a basic dialog enters and leaves. `reveal` is the M3 dialog motion: it slides 50px\n * away from the edge it sits against while its container grows from that edge, and its\n * headline and content, then its actions, fade in. `scale` is the library's original pop,\n * an extension beyond the M3 motion: the dialog fades in while it scales up from 90%, and\n * fades out while it scales to 95%, from the centre (`placement=\"center\"`) or from the edge\n * it sits against. Either way reduced motion keeps only the fades and `instant` turns the\n * motion off. A full-screen dialog keeps its own motion and ignores it.\n * @default \"reveal\"\n */\n transition?: DialogTransition;\n /**\n * Skips the enter and exit motion: the dialog, its parts and the scrim appear and leave at\n * once, and the dialog leaves the document as soon as it closes. Reduced motion already\n * keeps only the fades. @default false\n */\n instant?: boolean;\n /**\n * Called when the dialog has finished opening: once its enter motion (the slide, the\n * container's growth and every part's fade) has ended, or right after it opens with\n * `instant`. Not called when it closes before then.\n */\n onOpened?: () => void;\n /**\n * Called when the dialog has finished closing: once its exit motion has ended and it has\n * left the document, or right after it closes with `instant`.\n */\n onClosed?: () => void;\n}\n\n/**\n * M3 basic dialog: a modal panel over a scrim, rendered in a portal that keeps the\n * surrounding theme. It's an alert dialog (described by its `DialogContent`). Focus moves\n * to its first interactive element (or one marked `autoFocus`), is contained, and is\n * restored on close; Escape closes it; the page behind does not scroll and is hidden from\n * assistive tech. Name it with a `DialogTitle` (or `aria-label`).\n *\n * It enters with the M3 dialog motion: it slides 50px away from the window edge it sits\n * against while its container grows from that edge, then its headline and content fade in,\n * then its actions; it leaves by fading its parts, sliding back and shrinking, then fading.\n * Any children take part: the actions phase is for `DialogActions` (or any child with\n * `data-slot=\"actions\"`), and every other child fades in with the content. `onOpened` and\n * `onClosed` report the end of each motion; `instant` turns it off.\n *\n * `className` and `style` go on the outermost element, a full-window layer around the\n * positioner whose inline placement they can't move, so a layout class (`static`,\n * `overflow-hidden`, a transform) never hides, clips or stretches the dialog; style the\n * surface with `classNames.panel`. `ref` and other attributes go on the dialog panel.\n *\n * @example\n * <Dialog icon={<DeleteIcon />}>\n * {({ close }) => (\n * <>\n * <DialogTitle>Delete 3 files?</DialogTitle>\n * <DialogContent>They will be removed from all devices.</DialogContent>\n * <DialogActions>\n * <Button variant=\"text\" onPress={close}>Cancel</Button>\n * <Button variant=\"text\" onPress={remove}>Delete</Button>\n * </DialogActions>\n * </>\n * )}\n * </Dialog>\n */\nexport function Dialog({\n open,\n defaultOpen,\n onOpenChange,\n origin,\n onClosed,\n ...props\n}: DialogProps) {\n const trigger = useContext(DialogTriggerContext);\n const ownState = useOverlayTriggerState({ isOpen: open, defaultOpen, onOpenChange });\n const state = trigger?.state ?? ownState;\n const { isPresent, isExiting, exitProps } = usePresence(state.isOpen, 'opacity', !props.instant);\n const onClosedRef = useRef(onClosed);\n useLayoutEffect(() => {\n onClosedRef.current = onClosed;\n });\n const wasPresent = useRef(isPresent);\n useEffect(() => {\n if (wasPresent.current && !isPresent) onClosedRef.current?.();\n wasPresent.current = isPresent;\n }, [isPresent]);\n const usesOrigin = origin !== undefined && (props.fullScreen ?? 'never') !== 'never';\n // The origin is measured before the dialog is in the document (a layout effect, then a\n // synchronous re-render before paint), so the dialog's first style already starts on the\n // origin; and again as it closes, in case the origin moved. `box` is null when there's\n // nothing to measure (`\"trigger\"` outside a `DialogTrigger`).\n const [measured, setMeasured] = useState<{ box: OriginBox | null } | null>(null);\n if (!isPresent && measured !== null) setMeasured(null);\n const triggerRef = trigger?.triggerRef;\n const isOpen = state.isOpen;\n useLayoutEffect(() => {\n if (!usesOrigin || !isPresent) return;\n const target = origin === 'trigger' ? triggerRef?.current : origin;\n setMeasured({ box: target ? measureOrigin(target) : null });\n }, [usesOrigin, origin, triggerRef, isOpen, isPresent]);\n if (!isPresent || (usesOrigin && measured === null)) return null;\n return (\n <Overlay exiting={isExiting}>\n <DialogModal\n {...props}\n state={state}\n isExiting={isExiting}\n exitProps={exitProps}\n triggerOverlayProps={trigger?.overlayProps}\n originBox={usesOrigin ? (measured?.box ?? null) : null}\n />\n </Overlay>\n );\n}\n\nfunction DialogModal({\n state,\n isExiting,\n exitProps,\n triggerOverlayProps,\n originBox,\n role: roleProp,\n closedBy,\n icon,\n fullScreen = 'never',\n placement = 'center',\n instant = false,\n transition = 'reveal',\n onOpened,\n children,\n className,\n classNames,\n style,\n ref,\n ...rest\n}: Omit<DialogProps, 'open' | 'defaultOpen' | 'onOpenChange' | 'onClosed'> & {\n state: OverlayTriggerState;\n isExiting: boolean;\n exitProps: ReturnType<typeof usePresence>['exitProps'];\n triggerOverlayProps?: { id?: string };\n originBox: OriginBox | null;\n}) {\n const role = roleProp ?? (fullScreen === 'never' ? 'alertdialog' : 'dialog');\n const panelRef = useObjectRef(ref as Ref<HTMLDivElement>);\n const motionRef = useRef<HTMLDivElement>(null);\n const scrimRef = useRef<HTMLDivElement>(null);\n useOpened(scrimRef, motionRef, panelRef, onOpened);\n const [hasContent, setHasContent] = useState(false);\n const [headerAction, setHeaderAction] = useState(false);\n const { modalProps, underlayProps } = useModalOverlay(\n closedByOverlayOptions(\n closedBy ?? (role === 'alertdialog' ? 'closerequest' : 'any'),\n isExiting,\n ),\n state,\n panelRef,\n );\n const { dialogProps, titleProps, contentProps } = useDialog({ ...rest, role }, panelRef);\n // An alert dialog is described by its content; leave the reference out when there's none.\n const describedBy =\n rest['aria-describedby'] ?? (hasContent ? dialogProps['aria-describedby'] : undefined);\n\n // The spec: \"focus should automatically land on the first interactive element within the\n // dialog\", not on the panel `useDialog` focuses. A scrolling `DialogContent` is focusable\n // (so the keyboard can scroll it) but isn't a control. When that element is one of the\n // actions, focus goes to the least destructive one (`leastDestructiveAction`).\n useEffect(() => focusFirstInteractive(panelRef.current, leastDestructiveAction), [panelRef]);\n\n const hasIcon = fullScreen !== 'always' && icon !== undefined && icon !== null;\n const bottomBar = fullScreen !== 'never' && !headerAction;\n const origin = originBox !== null;\n const styles = dialogStyles({\n hasIcon,\n fullScreen,\n placement,\n bottomBar,\n origin,\n instant,\n transition,\n });\n const exiting = isExiting || undefined;\n\n return (\n <>\n <div\n ref={scrimRef}\n aria-hidden=\"true\"\n data-exiting={exiting}\n className={styles.scrim({ class: classNames?.scrim })}\n />\n <div style={{ ...style, ...DIALOG_ROOT_STYLE }} className={styles.root({ class: className })}>\n <div {...underlayProps} className={styles.positioner({ class: classNames?.positioner })}>\n <div\n {...exitProps}\n ref={motionRef}\n data-exiting={exiting}\n style={\n originBox\n ? ({\n '--m3-dialog-origin': originBox.clip,\n '--m3-dialog-origin-color': originBox.color,\n } as CSSProperties)\n : undefined\n }\n className={styles.motion()}\n >\n <div\n {...mergeProps(rest, triggerOverlayProps ?? {}, modalProps, dialogProps)}\n aria-describedby={describedBy}\n ref={panelRef}\n data-exiting={exiting}\n // The component tokens' hook (dialog-tokens.ts).\n data-tokens={mergeDataTokens('md-comp-dialog', rest)}\n data-full-screen={fullScreen === 'never' ? undefined : fullScreen}\n data-origin={origin || undefined}\n className={styles.panel({\n class: [transition === 'reveal' && styles.parts(), classNames?.panel],\n })}\n >\n <TriggerContext value={null}>\n <DialogPartsContext\n value={{\n titleProps,\n contentProps,\n hasIcon,\n fullScreen,\n close: state.close,\n setHasContent,\n setHeaderAction,\n bottomBar,\n }}\n >\n {hasIcon && (\n <span\n aria-hidden=\"true\"\n data-slot=\"icon\"\n className={styles.icon({\n class: cn(\n fullScreen === 'compact' && 'max-medium:hidden',\n classNames?.icon,\n ),\n })}\n >\n {icon}\n </span>\n )}\n {typeof children === 'function' ? children({ close: state.close }) : children}\n </DialogPartsContext>\n </TriggerContext>\n </div>\n </div>\n </div>\n </div>\n </>\n );\n}\n\nexport type DialogTitleProps = ComponentPropsWithRef<'h2'>;\n\n/**\n * The dialog's headline; it also names the dialog for assistive tech. In a dialog that can\n * be full screen, use `DialogHeader` instead.\n */\nexport function DialogTitle({ className, ...props }: DialogTitleProps) {\n const { titleProps, hasIcon } = useContext(DialogPartsContext);\n return (\n <h2\n {...mergeProps(titleProps, props)}\n data-slot=\"title\"\n className={dialogStyles({ hasIcon }).title({ class: className })}\n />\n );\n}\n\nexport interface DialogHeaderClassNames {\n /** The header row; `className` is merged here too. */\n root?: string;\n /** The close button. */\n close?: string;\n /** The headline. */\n title?: string;\n}\n\n/** Words a {@link DialogHeader} announces. */\nexport interface DialogHeaderLabels {\n /** The full-screen close button's name. @default \"Close\" */\n close: string;\n}\n\nconst DEFAULT_HEADER_LABELS: DialogHeaderLabels = { close: 'Close' };\n\nexport interface DialogHeaderProps extends Omit<ComponentPropsWithRef<'div'>, 'title'> {\n /** The headline; it names the dialog. */\n children: ReactNode;\n /** Words the header announces, with English defaults. */\n labels?: Partial<DialogHeaderLabels>;\n /**\n * The confirming action, usually a text `Button` (\"Save\"). Shown in full screen only;\n * without it, a full-screen dialog shows its `DialogActions` as a bottom bar.\n */\n action?: ReactNode;\n /** A 1px `outline-variant` divider under the full-screen header. @default false */\n divider?: boolean;\n /**\n * Disables the full-screen close button, e.g. while the confirming action is saving, so the\n * dialog can't be left halfway. Pair it with the `Dialog`'s `closedBy=\"none\"` to keep Escape\n * from closing it too. @default false\n */\n closeDisabled?: boolean;\n /** Classes for each part, by slot. */\n classNames?: DialogHeaderClassNames;\n}\n\n/**\n * The headline of a dialog that can be full screen. In full screen it is the M3 full-screen\n * dialog's header: a close icon button, the headline and the confirming action. Otherwise\n * it is a plain `DialogTitle`, and the dialog's `DialogActions` carry the actions.\n *\n * @example\n * <Dialog fullScreen=\"compact\">\n * <DialogHeader action={<Button variant=\"text\" onPress={save}>Save</Button>}>\n * Edit name\n * </DialogHeader>\n * <DialogContent>…</DialogContent>\n * <DialogActions>…</DialogActions>\n * </Dialog>\n */\nexport function DialogHeader({\n children,\n labels,\n action,\n divider = false,\n closeDisabled = false,\n className,\n classNames,\n ...props\n}: DialogHeaderProps) {\n const { titleProps, hasIcon, fullScreen, close, setHeaderAction } =\n useContext(DialogPartsContext);\n const hasAction = action !== undefined;\n useLayoutEffect(() => {\n setHeaderAction(hasAction);\n return () => setHeaderAction(false);\n }, [hasAction, setHeaderAction]);\n const styles = dialogStyles({ hasIcon, fullScreen, divider });\n return (\n <div {...props} className={styles.header({ class: cn(classNames?.root, className) })}>\n {fullScreen !== 'never' && (\n <IconButton\n variant=\"standard\"\n density={0}\n icon={<CloseIcon />}\n aria-label={labels?.close ?? DEFAULT_HEADER_LABELS.close}\n disabled={closeDisabled}\n onPress={close}\n className={styles.headerButton({ class: cn(styles.close(), classNames?.close) })}\n />\n )}\n <h2 {...titleProps} data-slot=\"title\" className={styles.title({ class: classNames?.title })}>\n {children}\n </h2>\n {fullScreen !== 'never' && action !== undefined && (\n <div className={styles.headerButton()}>\n <DensityZeroButtons>{action}</DensityZeroButtons>\n </div>\n )}\n </div>\n );\n}\n\nexport interface DialogContentProps extends ComponentPropsWithRef<'div'> {\n /**\n * The basic dialog's optional dividers: 1px `outline-variant` lines across the panel\n * above and below the content, e.g. around a scrolling list. Not drawn in full screen.\n * @default false\n */\n dividers?: boolean;\n}\n\n/**\n * Whether an element's content is taller than its box, from a `ResizeObserver` on it and\n * its children (so it is measured only when a size changes).\n */\nfunction useOverflows(ref: RefObject<HTMLElement | null>) {\n const [overflows, setOverflows] = useState(false);\n useLayoutEffect(() => {\n const element = ref.current;\n if (!element || typeof ResizeObserver === 'undefined') return;\n const observer = new ResizeObserver(() =>\n setOverflows(element.scrollHeight > element.clientHeight + 1),\n );\n observer.observe(element);\n for (const child of element.children) observer.observe(child);\n return () => observer.disconnect();\n }, [ref]);\n return overflows;\n}\n\n/**\n * The dialog's supporting text or content; scrolls when the dialog is too tall. It describes\n * an alert dialog. While it scrolls it is focusable (with a focus ring), so the keyboard can\n * scroll it (`data-scrollable`); the dialog's initial focus still goes to its first control.\n */\nexport function DialogContent({ className, dividers = false, ref, ...props }: DialogContentProps) {\n const { fullScreen, contentProps, setHasContent } = useContext(DialogPartsContext);\n const contentRef = useObjectRef(ref as Ref<HTMLDivElement>);\n const overflows = useOverflows(contentRef);\n const { isFocusVisible, focusProps } = useFocusRing();\n useLayoutEffect(() => {\n setHasContent(true);\n return () => setHasContent(false);\n }, [setHasContent]);\n return (\n <div\n {...mergeProps(contentProps, overflows ? focusProps : {}, props)}\n ref={contentRef}\n tabIndex={props.tabIndex ?? (overflows ? 0 : undefined)}\n data-scrollable={overflows || undefined}\n data-focus-visible={(overflows && isFocusVisible) || undefined}\n data-slot=\"content\"\n className={dialogStyles({ fullScreen, dividers }).content({ class: className })}\n />\n );\n}\n\nexport type DialogActionsProps = ComponentPropsWithRef<'div'>;\n\n/** The elements among `children`, counting a fragment's children rather than the fragment. */\nfunction countActions(children: ReactNode): number {\n let count = 0;\n Children.forEach(children, (child) => {\n if (!isValidElement<{ children?: ReactNode }>(child)) return;\n count += child.type === Fragment ? countActions(child.props.children) : 1;\n });\n return count;\n}\n\n/** `children` as a flat list, with fragments' children in place of the fragments. */\nfunction flatChildren(children: ReactNode): ReactNode[] {\n return Children.toArray(children).flatMap((child) =>\n isValidElement<{ children?: ReactNode }>(child) && child.type === Fragment\n ? flatChildren(child.props.children)\n : [child],\n );\n}\n\n/**\n * Where a dialog's initial focus goes when its first interactive element is one of its\n * actions: the dismissive, least destructive action (the WAI-ARIA alert dialog pattern:\n * \"focus the least destructive action\"). That's the first action in source order, which is\n * the row's first button on one line and its last when stacked, since stacked actions are\n * rendered with the confirming action on top. The row says which (`data-stacked`) in the\n * same render that reorders it, so the rule holds whenever the dialog takes focus, before\n * or after the actions stack.\n */\nexport function leastDestructiveAction(first: HTMLElement): HTMLElement {\n const row = first.closest<HTMLElement>('[data-slot=\"actions\"]');\n if (!row) return first;\n const actions = tabbables(row);\n return (row.hasAttribute('data-stacked') ? actions.at(-1) : actions[0]) ?? first;\n}\n\n/**\n * Whether the actions are stacked: they don't fit on one line, and the layout lets them\n * stack (`--m3-dialog-actions-stack`, off in the full-screen bottom bar). Measured on mount\n * and on every resize of the row or a button. Switching reorders the buttons, and moving\n * the focused one drops focus to the page, so it's focused again.\n */\nfunction useStackedActions(ref: RefObject<HTMLDivElement | null>) {\n const [stacked, setStacked] = useState(false);\n const current = useRef(false);\n // The button with focus, kept until focus moves somewhere else.\n const focused = useRef<HTMLElement | null>(null);\n useLayoutEffect(() => {\n const row = ref.current;\n if (!row) return;\n const measure = () => {\n // A hidden row (the header carries the confirming action) keeps its order.\n if (row.clientWidth === 0) return;\n const style = getComputedStyle(row);\n const items = [...row.children] as HTMLElement[];\n const gap = parseFloat(style.columnGap) || 0;\n const room =\n row.clientWidth -\n (parseFloat(style.paddingLeft) || 0) -\n (parseFloat(style.paddingRight) || 0);\n const needed =\n items.reduce((sum, item) => sum + item.offsetWidth, 0) + gap * (items.length - 1);\n const next =\n style.getPropertyValue('--m3-dialog-actions-stack').trim() === '1' &&\n items.length > 1 &&\n needed > room + 0.5;\n if (next === current.current) return;\n current.current = next;\n setStacked(next);\n };\n const onFocusIn = (event: FocusEvent) => {\n if (event.target instanceof HTMLElement) focused.current = event.target;\n };\n const onFocusOut = (event: FocusEvent) => {\n if (event.relatedTarget !== null) focused.current = null;\n };\n row.addEventListener('focusin', onFocusIn);\n row.addEventListener('focusout', onFocusOut);\n const observer = typeof ResizeObserver === 'undefined' ? null : new ResizeObserver(measure);\n observer?.observe(row);\n for (const item of row.children) observer?.observe(item);\n measure();\n return () => {\n row.removeEventListener('focusin', onFocusIn);\n row.removeEventListener('focusout', onFocusOut);\n observer?.disconnect();\n };\n }, [ref]);\n useLayoutEffect(() => {\n const element = focused.current;\n const active = element?.ownerDocument.activeElement;\n if (element?.isConnected && (!active || active === element.ownerDocument.body)) element.focus();\n }, [stacked]);\n return stacked;\n}\n\n/**\n * Row of actions at the end of the dialog, 8px apart. Put the confirming action last:\n * when the actions do not fit on one line they stack with it on top (M3: \"Confirming\n * actions appear above dismissive actions\"). Stacked, the buttons are rendered in that\n * visual order, so Tab and screen readers reach the confirming action first, top to bottom,\n * as they reach the dismissive one first in a row. When the actions are the dialog's first\n * controls, its initial focus goes to the dismissive action, stacked (the bottom one) or\n * not: the least destructive choice, as the WAI-ARIA alert dialog pattern asks; a stack\n * that forms or unforms later keeps focus where it is. While the dialog is full screen they're\n * hidden when `DialogHeader` carries the confirming action, and otherwise form the spec's\n * 56px bottom action bar. Use at most two actions (the spec); in development it warns once\n * when it holds more.\n */\nexport function DialogActions({ className, children, ref, ...props }: DialogActionsProps) {\n const { fullScreen, bottomBar } = useContext(DialogPartsContext);\n const actionCount = countActions(children);\n useWarnOnce(\n actionCount > 2,\n `[@windmorph/react] DialogActions holds ${actionCount} actions; M3 dialogs have at most two ` +\n '(no third such as \"Learn more\"). Show more inline, or before the dialog opens.',\n );\n const rowRef = useObjectRef(ref);\n const stacked = useStackedActions(rowRef);\n return (\n <div\n {...props}\n ref={rowRef}\n data-slot=\"actions\"\n data-stacked={stacked || undefined}\n className={dialogStyles({ fullScreen, bottomBar }).actions({ class: className })}\n >\n {/* The same keys either way, so switching moves the buttons rather than remounting them. */}\n {stacked ? flatChildren(children).reverse() : flatChildren(children)}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AA8C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