@react-md/core 1.0.0-next.12 → 1.0.0-next.13
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/.turbo/turbo-build.log +22 -22
- package/CHANGELOG.md +30 -0
- package/coverage/clover.xml +255 -3
- package/coverage/coverage-final.json +5 -1
- package/coverage/lcov-report/DefaultNavigationRenderer.tsx.html +298 -0
- package/coverage/lcov-report/Navigation.tsx.html +358 -0
- package/coverage/lcov-report/app-bar/AppBar.tsx.html +125 -134
- package/coverage/lcov-report/app-bar/AppBarTitle.tsx.html +54 -75
- package/coverage/lcov-report/app-bar/index.html +24 -9
- package/coverage/lcov-report/autocomplete/Autocomplete.tsx.html +34 -181
- package/coverage/lcov-report/autocomplete/AutocompleteGeneric.tsx.html +1 -1
- package/coverage/lcov-report/autocomplete/index.html +11 -11
- package/coverage/lcov-report/autocomplete/useAutocomplete.ts.html +102 -336
- package/coverage/lcov-report/autocomplete/useAutocompleteAgain.ts.html +1 -1
- package/coverage/lcov-report/autocomplete/useAutocompletev2.ts.html +1 -1
- package/coverage/lcov-report/autocomplete/useInlineAutocomplete.ts.html +31 -7
- package/coverage/lcov-report/autocomplete/useInlineSelection.ts.html +67 -4
- package/coverage/lcov-report/autocomplete/utils.ts.html +1 -1
- package/coverage/lcov-report/box/Box.tsx.html +115 -103
- package/coverage/lcov-report/box/index.html +22 -7
- package/coverage/lcov-report/box/styles.ts.html +622 -0
- package/coverage/lcov-report/button/Button.tsx.html +93 -105
- package/coverage/lcov-report/button/TooltippedButton.tsx.html +55 -67
- package/coverage/lcov-report/button/index.html +10 -10
- package/coverage/lcov-report/form/Form.tsx.html +18 -18
- package/coverage/lcov-report/form/Radio.tsx.html +8 -14
- package/coverage/lcov-report/form/index.html +35 -95
- package/coverage/lcov-report/form/useRadioGroup.ts.html +68 -80
- package/coverage/lcov-report/getHrefFromParents.ts.html +133 -0
- package/coverage/lcov-report/icon/FontIcon.tsx.html +65 -65
- package/coverage/lcov-report/icon/index.html +19 -19
- package/coverage/lcov-report/index.html +41 -11
- package/coverage/lcov-report/layout/LayoutNav.tsx.html +74 -86
- package/coverage/lcov-report/layout/Main.tsx.html +47 -38
- package/coverage/lcov-report/layout/index.html +54 -9
- package/coverage/lcov-report/layout/useExpandableLayout.ts.html +275 -89
- package/coverage/lcov-report/layout/useHorizontalLayoutTransition.ts.html +18 -18
- package/coverage/lcov-report/media-queries/AppSizeProvider.tsx.html +79 -64
- package/coverage/lcov-report/media-queries/index.html +18 -18
- package/coverage/lcov-report/navigation/CollapsibleNavGroup.tsx.html +334 -0
- package/coverage/lcov-report/navigation/DefaultNavigationRenderer.tsx.html +298 -0
- package/coverage/lcov-report/navigation/NavGroup.tsx.html +193 -0
- package/coverage/lcov-report/navigation/NavItem.tsx.html +160 -0
- package/coverage/lcov-report/navigation/NavItemButton.tsx.html +397 -0
- package/coverage/lcov-report/navigation/NavItemLink.tsx.html +574 -0
- package/coverage/lcov-report/navigation/NavSubheader.tsx.html +184 -0
- package/coverage/lcov-report/navigation/Navigation.tsx.html +358 -0
- package/coverage/lcov-report/navigation/getHrefFromParents.ts.html +130 -0
- package/coverage/lcov-report/navigation/index.html +146 -0
- package/coverage/lcov-report/navigation/navGroupStyles.ts.html +148 -0
- package/coverage/lcov-report/navigation/navItemStyles.ts.html +298 -0
- package/coverage/lcov-report/sheet/Sheet.tsx.html +50 -56
- package/coverage/lcov-report/sheet/index.html +8 -8
- package/coverage/lcov-report/snackbar/DefaultToastRenderer.tsx.html +307 -304
- package/coverage/lcov-report/snackbar/ToastManager.tsx.html +377 -356
- package/coverage/lcov-report/snackbar/index.html +16 -106
- package/coverage/lcov-report/src/autocomplete/Autocomplete.tsx.html +56 -92
- package/coverage/lcov-report/src/autocomplete/AutocompleteGeneric.tsx.html +1 -1
- package/coverage/lcov-report/src/autocomplete/index.html +11 -11
- package/coverage/lcov-report/src/autocomplete/useAutocomplete.ts.html +513 -111
- package/coverage/lcov-report/src/autocomplete/useAutocompleteAgain.ts.html +7 -7
- package/coverage/lcov-report/src/autocomplete/useAutocompletev2.ts.html +1 -1
- package/coverage/lcov-report/src/autocomplete/useInlineAutocomplete.ts.html +32 -8
- package/coverage/lcov-report/src/autocomplete/useInlineSelection.ts.html +146 -14
- package/coverage/lcov-report/src/autocomplete/utils.ts.html +1 -1
- package/coverage/lcov-report/src/divider/Divider.tsx.html +6 -9
- package/coverage/lcov-report/src/divider/index.html +8 -23
- package/coverage/lcov-report/src/icon/FontIcon.tsx.html +29 -29
- package/coverage/lcov-report/src/icon/index.html +1 -1
- package/coverage/lcov-report/src/index.html +21 -21
- package/coverage/lcov-report/src/layout/LayoutAppBar.tsx.html +33 -42
- package/coverage/lcov-report/src/layout/Main.tsx.html +33 -36
- package/coverage/lcov-report/src/layout/index.html +15 -195
- package/coverage/lcov-report/src/layout/useLayoutAppBarHeight.ts.html +37 -46
- package/coverage/lcov-report/src/list/List.tsx.html +39 -42
- package/coverage/lcov-report/src/list/index.html +10 -130
- package/coverage/lcov-report/src/navigation/CollapsibleNavGroup.tsx.html +367 -0
- package/coverage/lcov-report/src/navigation/DefaultNavigationRenderer.tsx.html +325 -0
- package/coverage/lcov-report/src/navigation/NavGroup.tsx.html +202 -0
- package/coverage/lcov-report/src/navigation/NavItem.tsx.html +172 -0
- package/coverage/lcov-report/src/navigation/NavSubheader.tsx.html +193 -0
- package/coverage/lcov-report/src/navigation/Navigation.tsx.html +358 -0
- package/coverage/lcov-report/src/navigation/index.html +191 -0
- package/coverage/lcov-report/src/tree/Tree.tsx.html +12 -24
- package/coverage/lcov-report/src/tree/index.html +18 -18
- package/coverage/lcov-report/src/useElementSize.ts.html +115 -40
- package/coverage/lcov-report/src/useMutationObserver.ts.html +310 -0
- package/coverage/lcov-report/src/utils/RenderRecursively.tsx.html +151 -52
- package/coverage/lcov-report/src/utils/index.html +10 -10
- package/coverage/lcov-report/test-utils/index.html +21 -21
- package/coverage/lcov-report/test-utils/matchMedia.ts.html +98 -95
- package/coverage/lcov-report/transition/config.ts.html +7 -7
- package/coverage/lcov-report/transition/index.html +1 -1
- package/coverage/lcov-report/useExpandableLayout.ts.html +171 -105
- package/coverage/lcov-report/useMutationObserver.ts.html +310 -0
- package/coverage/lcov-report/utils/index.html +16 -16
- package/coverage/lcov-report/utils/isElementVisible.ts.html +21 -24
- package/coverage/lcov.info +302 -0
- package/dist/CoreProviders.d.ts +3 -3
- package/dist/CoreProviders.js +1 -1
- package/dist/CoreProviders.js.map +1 -1
- package/dist/NoSsr.d.ts +3 -4
- package/dist/NoSsr.js +2 -3
- package/dist/NoSsr.js.map +1 -1
- package/dist/RootHtml.d.ts +3 -4
- package/dist/RootHtml.js +2 -3
- package/dist/RootHtml.js.map +1 -1
- package/dist/SsrProvider.d.ts +3 -3
- package/dist/SsrProvider.js +2 -2
- package/dist/SsrProvider.js.map +1 -1
- package/dist/_core.scss +5 -0
- package/dist/app-bar/AppBar.d.ts +11 -14
- package/dist/app-bar/AppBar.js +3 -5
- package/dist/app-bar/AppBar.js.map +1 -1
- package/dist/app-bar/AppBarTitle.d.ts +7 -9
- package/dist/app-bar/AppBarTitle.js +4 -6
- package/dist/app-bar/AppBarTitle.js.map +1 -1
- package/dist/avatar/Avatar.d.ts +5 -6
- package/dist/avatar/Avatar.js +2 -3
- package/dist/avatar/Avatar.js.map +1 -1
- package/dist/avatar/styles.d.ts +4 -4
- package/dist/avatar/styles.js +2 -2
- package/dist/avatar/styles.js.map +1 -1
- package/dist/badge/Badge.d.ts +4 -6
- package/dist/badge/Badge.js +3 -5
- package/dist/badge/Badge.js.map +1 -1
- package/dist/box/Box.d.ts +6 -9
- package/dist/box/Box.js +14 -9
- package/dist/box/Box.js.map +1 -1
- package/dist/box/_box.scss +1 -1
- package/dist/box/styles.d.ts +9 -9
- package/dist/box/styles.js +1 -1
- package/dist/box/styles.js.map +1 -1
- package/dist/button/AsyncButton.d.ts +5 -7
- package/dist/button/AsyncButton.js +3 -5
- package/dist/button/AsyncButton.js.map +1 -1
- package/dist/button/Button.d.ts +4 -8
- package/dist/button/Button.js +4 -8
- package/dist/button/Button.js.map +1 -1
- package/dist/button/ButtonUnstyled.d.ts +2 -2
- package/dist/button/ButtonUnstyled.js +1 -1
- package/dist/button/ButtonUnstyled.js.map +1 -1
- package/dist/button/FloatingActionButton.d.ts +5 -5
- package/dist/button/FloatingActionButton.js +2 -2
- package/dist/button/FloatingActionButton.js.map +1 -1
- package/dist/button/TooltippedButton.d.ts +2 -2
- package/dist/button/TooltippedButton.js +2 -5
- package/dist/button/TooltippedButton.js.map +1 -1
- package/dist/button/buttonStyles.d.ts +3 -3
- package/dist/button/buttonStyles.js +1 -1
- package/dist/button/buttonStyles.js.map +1 -1
- package/dist/button/buttonUnstyledStyles.d.ts +2 -2
- package/dist/button/buttonUnstyledStyles.js +1 -1
- package/dist/button/buttonUnstyledStyles.js.map +1 -1
- package/dist/card/Card.d.ts +3 -4
- package/dist/card/Card.js +2 -3
- package/dist/card/Card.js.map +1 -1
- package/dist/card/CardContent.d.ts +2 -4
- package/dist/card/CardContent.js +1 -2
- package/dist/card/CardContent.js.map +1 -1
- package/dist/card/CardFooter.d.ts +2 -2
- package/dist/card/CardFooter.js +1 -1
- package/dist/card/CardFooter.js.map +1 -1
- package/dist/card/CardHeader.d.ts +10 -12
- package/dist/card/CardHeader.js +6 -7
- package/dist/card/CardHeader.js.map +1 -1
- package/dist/card/CardSubtitle.d.ts +2 -2
- package/dist/card/CardSubtitle.js +1 -1
- package/dist/card/CardSubtitle.js.map +1 -1
- package/dist/card/CardTitle.d.ts +2 -2
- package/dist/card/CardTitle.js +1 -1
- package/dist/card/CardTitle.js.map +1 -1
- package/dist/card/ClickableCard.d.ts +3 -4
- package/dist/card/ClickableCard.js +2 -3
- package/dist/card/ClickableCard.js.map +1 -1
- package/dist/card/styles.d.ts +15 -15
- package/dist/card/styles.js +7 -7
- package/dist/card/styles.js.map +1 -1
- package/dist/chip/Chip.d.ts +10 -14
- package/dist/chip/Chip.js +4 -7
- package/dist/chip/Chip.js.map +1 -1
- package/dist/chip/styles.d.ts +4 -4
- package/dist/chip/styles.js +2 -2
- package/dist/chip/styles.js.map +1 -1
- package/dist/cssUtils.d.ts +10 -10
- package/dist/cssUtils.js +1 -1
- package/dist/cssUtils.js.map +1 -1
- package/dist/dialog/Dialog.d.ts +5 -6
- package/dist/dialog/Dialog.js +4 -5
- package/dist/dialog/Dialog.js.map +1 -1
- package/dist/dialog/DialogContainer.d.ts +2 -2
- package/dist/dialog/DialogContainer.js +1 -1
- package/dist/dialog/DialogContainer.js.map +1 -1
- package/dist/dialog/DialogTitle.d.ts +1 -1
- package/dist/dialog/DialogTitle.js.map +1 -1
- package/dist/dialog/FixedDialog.d.ts +1 -2
- package/dist/dialog/FixedDialog.js +1 -2
- package/dist/dialog/FixedDialog.js.map +1 -1
- package/dist/dialog/styles.d.ts +9 -9
- package/dist/dialog/styles.js +4 -4
- package/dist/dialog/styles.js.map +1 -1
- package/dist/divider/Divider.d.ts +2 -3
- package/dist/divider/Divider.js +1 -2
- package/dist/divider/Divider.js.map +1 -1
- package/dist/divider/styles.d.ts +2 -2
- package/dist/divider/styles.js +1 -1
- package/dist/divider/styles.js.map +1 -1
- package/dist/draggable/useDraggable.d.ts +17 -18
- package/dist/draggable/useDraggable.js +2 -2
- package/dist/draggable/useDraggable.js.map +1 -1
- package/dist/draggable/utils.d.ts +2 -2
- package/dist/draggable/utils.js +1 -1
- package/dist/draggable/utils.js.map +1 -1
- package/dist/expansion-panel/ExpansionList.d.ts +2 -2
- package/dist/expansion-panel/ExpansionList.js +1 -1
- package/dist/expansion-panel/ExpansionList.js.map +1 -1
- package/dist/expansion-panel/ExpansionPanel.d.ts +8 -9
- package/dist/expansion-panel/ExpansionPanel.js +2 -3
- package/dist/expansion-panel/ExpansionPanel.js.map +1 -1
- package/dist/expansion-panel/ExpansionPanelHeader.d.ts +3 -4
- package/dist/expansion-panel/ExpansionPanelHeader.js +2 -3
- package/dist/expansion-panel/ExpansionPanelHeader.js.map +1 -1
- package/dist/expansion-panel/useExpansionList.d.ts +5 -6
- package/dist/expansion-panel/useExpansionList.js +4 -5
- package/dist/expansion-panel/useExpansionList.js.map +1 -1
- package/dist/expansion-panel/useExpansionPanels.d.ts +9 -14
- package/dist/expansion-panel/useExpansionPanels.js +3 -6
- package/dist/expansion-panel/useExpansionPanels.js.map +1 -1
- package/dist/focus/useFocusContainer.d.ts +9 -10
- package/dist/focus/useFocusContainer.js +2 -3
- package/dist/focus/useFocusContainer.js.map +1 -1
- package/dist/focus/utils.d.ts +4 -5
- package/dist/focus/utils.js +3 -4
- package/dist/focus/utils.js.map +1 -1
- package/dist/form/Checkbox.d.ts +1 -2
- package/dist/form/Checkbox.js +1 -2
- package/dist/form/Checkbox.js.map +1 -1
- package/dist/form/Fieldset.d.ts +5 -6
- package/dist/form/Fieldset.js +2 -3
- package/dist/form/Fieldset.js.map +1 -1
- package/dist/form/FileInput.d.ts +6 -7
- package/dist/form/FileInput.js +3 -4
- package/dist/form/FileInput.js.map +1 -1
- package/dist/form/FormMessageContainer.d.ts +2 -2
- package/dist/form/FormMessageContainer.js +1 -1
- package/dist/form/FormMessageContainer.js.map +1 -1
- package/dist/form/FormMessageCounter.d.ts +4 -6
- package/dist/form/FormMessageCounter.js +2 -3
- package/dist/form/FormMessageCounter.js.map +1 -1
- package/dist/form/InputToggle.d.ts +11 -12
- package/dist/form/InputToggle.js +1 -1
- package/dist/form/InputToggle.js.map +1 -1
- package/dist/form/InputToggleIcon.d.ts +4 -6
- package/dist/form/InputToggleIcon.js +2 -3
- package/dist/form/InputToggleIcon.js.map +1 -1
- package/dist/form/Label.d.ts +2 -2
- package/dist/form/Label.js +2 -2
- package/dist/form/Label.js.map +1 -1
- package/dist/form/Legend.d.ts +2 -2
- package/dist/form/Legend.js +1 -1
- package/dist/form/Legend.js.map +1 -1
- package/dist/form/MenuItemCheckbox.d.ts +2 -3
- package/dist/form/MenuItemCheckbox.js +2 -3
- package/dist/form/MenuItemCheckbox.js.map +1 -1
- package/dist/form/MenuItemFileInput.d.ts +3 -5
- package/dist/form/MenuItemFileInput.js +2 -3
- package/dist/form/MenuItemFileInput.js.map +1 -1
- package/dist/form/MenuItemInputToggle.d.ts +7 -9
- package/dist/form/MenuItemInputToggle.js +1 -1
- package/dist/form/MenuItemInputToggle.js.map +1 -1
- package/dist/form/MenuItemRadio.d.ts +3 -5
- package/dist/form/MenuItemRadio.js +3 -5
- package/dist/form/MenuItemRadio.js.map +1 -1
- package/dist/form/MenuItemSwitch.d.ts +2 -3
- package/dist/form/MenuItemSwitch.js +2 -3
- package/dist/form/MenuItemSwitch.js.map +1 -1
- package/dist/form/MenuItemTextField.d.ts +2 -2
- package/dist/form/MenuItemTextField.js +1 -1
- package/dist/form/MenuItemTextField.js.map +1 -1
- package/dist/form/NativeSelect.d.ts +3 -5
- package/dist/form/NativeSelect.js +2 -4
- package/dist/form/NativeSelect.js.map +1 -1
- package/dist/form/OptGroup.d.ts +3 -4
- package/dist/form/OptGroup.js +2 -3
- package/dist/form/OptGroup.js.map +1 -1
- package/dist/form/Option.d.ts +5 -7
- package/dist/form/Option.js +3 -4
- package/dist/form/Option.js.map +1 -1
- package/dist/form/Password.d.ts +7 -13
- package/dist/form/Password.js +1 -2
- package/dist/form/Password.js.map +1 -1
- package/dist/form/Radio.d.ts +1 -2
- package/dist/form/Radio.js +1 -2
- package/dist/form/Radio.js.map +1 -1
- package/dist/form/ResizingTextAreaWrapper.d.ts +2 -2
- package/dist/form/ResizingTextAreaWrapper.js +1 -1
- package/dist/form/ResizingTextAreaWrapper.js.map +1 -1
- package/dist/form/Select.d.ts +6 -9
- package/dist/form/Select.js +3 -5
- package/dist/form/Select.js.map +1 -1
- package/dist/form/SelectedOption.d.ts +2 -2
- package/dist/form/SelectedOption.js +1 -1
- package/dist/form/SelectedOption.js.map +1 -1
- package/dist/form/Slider.d.ts +16 -25
- package/dist/form/Slider.js.map +1 -1
- package/dist/form/SliderContainer.d.ts +6 -9
- package/dist/form/SliderContainer.js +2 -3
- package/dist/form/SliderContainer.js.map +1 -1
- package/dist/form/SliderMark.d.ts +2 -2
- package/dist/form/SliderMark.js +1 -1
- package/dist/form/SliderMark.js.map +1 -1
- package/dist/form/SliderMarkLabel.d.ts +3 -3
- package/dist/form/SliderMarkLabel.js +1 -1
- package/dist/form/SliderMarkLabel.js.map +1 -1
- package/dist/form/SliderThumb.d.ts +6 -8
- package/dist/form/SliderThumb.js +3 -4
- package/dist/form/SliderThumb.js.map +1 -1
- package/dist/form/SliderTrack.d.ts +4 -6
- package/dist/form/SliderTrack.js +2 -3
- package/dist/form/SliderTrack.js.map +1 -1
- package/dist/form/SliderValueMarks.d.ts +7 -9
- package/dist/form/SliderValueMarks.js +1 -1
- package/dist/form/SliderValueMarks.js.map +1 -1
- package/dist/form/SliderValueTooltip.d.ts +4 -6
- package/dist/form/SliderValueTooltip.js +2 -3
- package/dist/form/SliderValueTooltip.js.map +1 -1
- package/dist/form/Switch.d.ts +3 -4
- package/dist/form/Switch.js +2 -3
- package/dist/form/Switch.js.map +1 -1
- package/dist/form/TextArea.d.ts +2 -3
- package/dist/form/TextArea.js +1 -2
- package/dist/form/TextArea.js.map +1 -1
- package/dist/form/TextField.d.ts +7 -10
- package/dist/form/TextField.js +2 -4
- package/dist/form/TextField.js.map +1 -1
- package/dist/form/TextFieldAddon.d.ts +3 -3
- package/dist/form/TextFieldAddon.js +1 -1
- package/dist/form/TextFieldAddon.js.map +1 -1
- package/dist/form/fileUtils.d.ts +33 -36
- package/dist/form/fileUtils.js +14 -14
- package/dist/form/fileUtils.js.map +1 -1
- package/dist/form/formConfig.d.ts +2 -2
- package/dist/form/formConfig.js +2 -2
- package/dist/form/formConfig.js.map +1 -1
- package/dist/form/formMessageStyles.d.ts +5 -5
- package/dist/form/formMessageStyles.js +3 -3
- package/dist/form/formMessageStyles.js.map +1 -1
- package/dist/form/inputToggleStyles.d.ts +3 -3
- package/dist/form/inputToggleStyles.js +1 -1
- package/dist/form/inputToggleStyles.js.map +1 -1
- package/dist/form/menuItemInputToggleStyles.d.ts +8 -8
- package/dist/form/menuItemInputToggleStyles.js +4 -4
- package/dist/form/menuItemInputToggleStyles.js.map +1 -1
- package/dist/form/nativeSelectStyles.d.ts +4 -4
- package/dist/form/nativeSelectStyles.js +2 -2
- package/dist/form/nativeSelectStyles.js.map +1 -1
- package/dist/form/optionStyles.d.ts +2 -2
- package/dist/form/optionStyles.js +1 -1
- package/dist/form/optionStyles.js.map +1 -1
- package/dist/form/passwordStyles.d.ts +4 -4
- package/dist/form/passwordStyles.js +1 -1
- package/dist/form/passwordStyles.js.map +1 -1
- package/dist/form/selectStyles.d.ts +2 -2
- package/dist/form/selectStyles.js +1 -1
- package/dist/form/selectStyles.js.map +1 -1
- package/dist/form/selectUtils.d.ts +3 -3
- package/dist/form/selectUtils.js +2 -2
- package/dist/form/selectUtils.js.map +1 -1
- package/dist/form/sliderUtils.d.ts +9 -9
- package/dist/form/sliderUtils.js +4 -4
- package/dist/form/sliderUtils.js.map +1 -1
- package/dist/form/switchStyles.d.ts +2 -2
- package/dist/form/switchStyles.js +1 -1
- package/dist/form/switchStyles.js.map +1 -1
- package/dist/form/textAreaStyles.d.ts +4 -4
- package/dist/form/textAreaStyles.js +2 -2
- package/dist/form/textAreaStyles.js.map +1 -1
- package/dist/form/textFieldContainerStyles.d.ts +2 -2
- package/dist/form/textFieldContainerStyles.js +1 -1
- package/dist/form/textFieldContainerStyles.js.map +1 -1
- package/dist/form/textFieldStyles.d.ts +2 -2
- package/dist/form/textFieldStyles.js +1 -1
- package/dist/form/textFieldStyles.js.map +1 -1
- package/dist/form/types.d.ts +10 -10
- package/dist/form/types.js.map +1 -1
- package/dist/form/useCheckboxGroup.d.ts +15 -20
- package/dist/form/useCheckboxGroup.js.map +1 -1
- package/dist/form/useCombobox.d.ts +16 -16
- package/dist/form/useCombobox.js +2 -2
- package/dist/form/useCombobox.js.map +1 -1
- package/dist/form/useEditableCombobox.d.ts +3 -3
- package/dist/form/useEditableCombobox.js +1 -1
- package/dist/form/useEditableCombobox.js.map +1 -1
- package/dist/form/useFileUpload.d.ts +7 -8
- package/dist/form/useFileUpload.js +1 -1
- package/dist/form/useFileUpload.js.map +1 -1
- package/dist/form/useFormReset.d.ts +2 -2
- package/dist/form/useFormReset.js +1 -1
- package/dist/form/useFormReset.js.map +1 -1
- package/dist/form/useListboxProvider.d.ts +3 -3
- package/dist/form/useListboxProvider.js +2 -2
- package/dist/form/useListboxProvider.js.map +1 -1
- package/dist/form/useNumberField.d.ts +17 -25
- package/dist/form/useNumberField.js.map +1 -1
- package/dist/form/useRadioGroup.d.ts +12 -15
- package/dist/form/useRadioGroup.js +2 -3
- package/dist/form/useRadioGroup.js.map +1 -1
- package/dist/form/useRangeSlider.d.ts +8 -11
- package/dist/form/useRangeSlider.js +3 -5
- package/dist/form/useRangeSlider.js.map +1 -1
- package/dist/form/useSelectCombobox.d.ts +3 -3
- package/dist/form/useSelectCombobox.js +1 -1
- package/dist/form/useSelectCombobox.js.map +1 -1
- package/dist/form/useSlider.d.ts +7 -9
- package/dist/form/useSlider.js +3 -5
- package/dist/form/useSlider.js.map +1 -1
- package/dist/form/useTextField.d.ts +22 -31
- package/dist/form/useTextField.js.map +1 -1
- package/dist/form/utils.d.ts +7 -8
- package/dist/form/utils.js +5 -6
- package/dist/form/utils.js.map +1 -1
- package/dist/form/validation.d.ts +16 -16
- package/dist/form/validation.js +7 -7
- package/dist/form/validation.js.map +1 -1
- package/dist/hoverMode/useHoverMode.d.ts +9 -10
- package/dist/hoverMode/useHoverMode.js.map +1 -1
- package/dist/hoverMode/useHoverModeProvider.d.ts +11 -15
- package/dist/hoverMode/useHoverModeProvider.js +3 -4
- package/dist/hoverMode/useHoverModeProvider.js.map +1 -1
- package/dist/icon/FontIcon.d.ts +1 -1
- package/dist/icon/FontIcon.js +1 -1
- package/dist/icon/FontIcon.js.map +1 -1
- package/dist/icon/IconRotator.d.ts +1 -1
- package/dist/icon/IconRotator.js.map +1 -1
- package/dist/icon/MaterialIcon.d.ts +2 -2
- package/dist/icon/MaterialIcon.js +1 -1
- package/dist/icon/MaterialIcon.js.map +1 -1
- package/dist/icon/MaterialSymbol.d.ts +3 -4
- package/dist/icon/MaterialSymbol.js +2 -3
- package/dist/icon/MaterialSymbol.js.map +1 -1
- package/dist/icon/SVGIcon.d.ts +0 -1
- package/dist/icon/SVGIcon.js.map +1 -1
- package/dist/icon/TextIconSpacing.d.ts +3 -5
- package/dist/icon/TextIconSpacing.js +2 -4
- package/dist/icon/TextIconSpacing.js.map +1 -1
- package/dist/icon/iconConfig.d.ts +14 -16
- package/dist/icon/iconConfig.js +5 -7
- package/dist/icon/iconConfig.js.map +1 -1
- package/dist/icon/material.d.ts +4 -4
- package/dist/icon/material.js +1 -1
- package/dist/icon/material.js.map +1 -1
- package/dist/icon/materialConfig.d.ts +12 -12
- package/dist/icon/materialConfig.js +2 -2
- package/dist/icon/materialConfig.js.map +1 -1
- package/dist/icon/styles.d.ts +8 -8
- package/dist/icon/styles.js +2 -2
- package/dist/icon/styles.js.map +1 -1
- package/dist/interaction/UserInteractionModeProvider.d.ts +1 -2
- package/dist/interaction/UserInteractionModeProvider.js +1 -2
- package/dist/interaction/UserInteractionModeProvider.js.map +1 -1
- package/dist/interaction/config.d.ts +2 -2
- package/dist/interaction/config.js +1 -1
- package/dist/interaction/config.js.map +1 -1
- package/dist/interaction/types.d.ts +8 -8
- package/dist/interaction/types.js +1 -1
- package/dist/interaction/types.js.map +1 -1
- package/dist/interaction/useElementInteraction.d.ts +6 -7
- package/dist/interaction/useElementInteraction.js +3 -4
- package/dist/interaction/useElementInteraction.js.map +1 -1
- package/dist/interaction/useHigherContrastChildren.d.ts +2 -3
- package/dist/interaction/useHigherContrastChildren.js +2 -3
- package/dist/interaction/useHigherContrastChildren.js.map +1 -1
- package/dist/layout/LayoutAppBar.d.ts +4 -7
- package/dist/layout/LayoutAppBar.js +3 -6
- package/dist/layout/LayoutAppBar.js.map +1 -1
- package/dist/layout/LayoutNav.d.ts +4 -6
- package/dist/layout/LayoutNav.js +3 -5
- package/dist/layout/LayoutNav.js.map +1 -1
- package/dist/layout/LayoutWindowSplitter.d.ts +3 -4
- package/dist/layout/LayoutWindowSplitter.js +2 -3
- package/dist/layout/LayoutWindowSplitter.js.map +1 -1
- package/dist/layout/Main.d.ts +4 -5
- package/dist/layout/Main.js +2 -3
- package/dist/layout/Main.js.map +1 -1
- package/dist/layout/_layout.scss +12 -1
- package/dist/layout/layoutNavStyles.d.ts +2 -2
- package/dist/layout/layoutNavStyles.js +1 -1
- package/dist/layout/layoutNavStyles.js.map +1 -1
- package/dist/layout/layoutWindowSplitterStyles.d.ts +2 -2
- package/dist/layout/layoutWindowSplitterStyles.js +1 -1
- package/dist/layout/layoutWindowSplitterStyles.js.map +1 -1
- package/dist/layout/mainStyles.d.ts +2 -2
- package/dist/layout/mainStyles.js +1 -1
- package/dist/layout/mainStyles.js.map +1 -1
- package/dist/layout/useExpandableLayout.d.ts +66 -14
- package/dist/layout/useExpandableLayout.js +50 -5
- package/dist/layout/useExpandableLayout.js.map +1 -1
- package/dist/layout/useHorizontalLayoutTransition.d.ts +4 -4
- package/dist/layout/useHorizontalLayoutTransition.js +2 -2
- package/dist/layout/useHorizontalLayoutTransition.js.map +1 -1
- package/dist/layout/useLayoutAppBarHeight.d.ts +7 -9
- package/dist/layout/useLayoutAppBarHeight.js +7 -8
- package/dist/layout/useLayoutAppBarHeight.js.map +1 -1
- package/dist/layout/useLayoutTree.d.ts +6 -6
- package/dist/layout/useLayoutTree.js +1 -1
- package/dist/layout/useLayoutTree.js.map +1 -1
- package/dist/layout/useLayoutWindowSplitter.d.ts +5 -6
- package/dist/layout/useLayoutWindowSplitter.js +2 -3
- package/dist/layout/useLayoutWindowSplitter.js.map +1 -1
- package/dist/layout/useMainTabIndex.d.ts +1 -1
- package/dist/layout/useMainTabIndex.js +1 -1
- package/dist/layout/useMainTabIndex.js.map +1 -1
- package/dist/layout/useResizableLayout.d.ts +54 -8
- package/dist/layout/useResizableLayout.js +51 -5
- package/dist/layout/useResizableLayout.js.map +1 -1
- package/dist/layout/useTemporaryLayout.d.ts +12 -12
- package/dist/layout/useTemporaryLayout.js +1 -1
- package/dist/layout/useTemporaryLayout.js.map +1 -1
- package/dist/link/Link.d.ts +10 -13
- package/dist/link/Link.js +5 -7
- package/dist/link/Link.js.map +1 -1
- package/dist/link/SkipToMainContent.d.ts +2 -4
- package/dist/link/SkipToMainContent.js +1 -2
- package/dist/link/SkipToMainContent.js.map +1 -1
- package/dist/link/styles.d.ts +4 -4
- package/dist/link/styles.js +2 -2
- package/dist/link/styles.js.map +1 -1
- package/dist/list/List.d.ts +3 -4
- package/dist/list/List.js +2 -3
- package/dist/list/List.js.map +1 -1
- package/dist/list/ListItem.d.ts +4 -6
- package/dist/list/ListItem.js +2 -4
- package/dist/list/ListItem.js.map +1 -1
- package/dist/list/ListItemChildren.d.ts +1 -2
- package/dist/list/ListItemChildren.js +1 -2
- package/dist/list/ListItemChildren.js.map +1 -1
- package/dist/list/ListSubheader.d.ts +3 -3
- package/dist/list/ListSubheader.js +1 -1
- package/dist/list/ListSubheader.js.map +1 -1
- package/dist/list/getListItemHeight.d.ts +1 -1
- package/dist/list/getListItemHeight.js.map +1 -1
- package/dist/list/listItemStyles.d.ts +9 -9
- package/dist/list/listItemStyles.js +3 -3
- package/dist/list/listItemStyles.js.map +1 -1
- package/dist/list/types.d.ts +11 -11
- package/dist/list/types.js.map +1 -1
- package/dist/media-queries/AppSizeProvider.d.ts +1 -2
- package/dist/media-queries/AppSizeProvider.js +1 -2
- package/dist/media-queries/AppSizeProvider.js.map +1 -1
- package/dist/media-queries/useMediaQuery.d.ts +2 -3
- package/dist/media-queries/useMediaQuery.js +2 -3
- package/dist/media-queries/useMediaQuery.js.map +1 -1
- package/dist/menu/DropdownMenu.d.ts +7 -11
- package/dist/menu/DropdownMenu.js +4 -7
- package/dist/menu/DropdownMenu.js.map +1 -1
- package/dist/menu/Menu.d.ts +10 -13
- package/dist/menu/Menu.js +2 -3
- package/dist/menu/Menu.js.map +1 -1
- package/dist/menu/MenuBar.d.ts +3 -4
- package/dist/menu/MenuBar.js +3 -4
- package/dist/menu/MenuBar.js.map +1 -1
- package/dist/menu/MenuButton.d.ts +8 -8
- package/dist/menu/MenuButton.js +2 -2
- package/dist/menu/MenuButton.js.map +1 -1
- package/dist/menu/MenuConfigurationProvider.d.ts +8 -8
- package/dist/menu/MenuConfigurationProvider.js +5 -5
- package/dist/menu/MenuConfigurationProvider.js.map +1 -1
- package/dist/menu/MenuItem.d.ts +2 -2
- package/dist/menu/MenuItem.js +1 -1
- package/dist/menu/MenuItem.js.map +1 -1
- package/dist/menu/MenuItemButton.d.ts +2 -2
- package/dist/menu/MenuItemButton.js +1 -1
- package/dist/menu/MenuItemButton.js.map +1 -1
- package/dist/menu/MenuItemCircularProgress.d.ts +3 -4
- package/dist/menu/MenuItemCircularProgress.js +2 -3
- package/dist/menu/MenuItemCircularProgress.js.map +1 -1
- package/dist/menu/MenuItemGroup.d.ts +3 -4
- package/dist/menu/MenuItemGroup.js +2 -3
- package/dist/menu/MenuItemGroup.js.map +1 -1
- package/dist/menu/MenuItemSeparator.d.ts +2 -2
- package/dist/menu/MenuItemSeparator.js +1 -1
- package/dist/menu/MenuItemSeparator.js.map +1 -1
- package/dist/menu/MenuSheet.d.ts +7 -9
- package/dist/menu/MenuSheet.js +2 -3
- package/dist/menu/MenuSheet.js.map +1 -1
- package/dist/menu/MenuVisibilityProvider.d.ts +6 -8
- package/dist/menu/MenuVisibilityProvider.js +5 -6
- package/dist/menu/MenuVisibilityProvider.js.map +1 -1
- package/dist/menu/MenuWidget.d.ts +2 -2
- package/dist/menu/MenuWidget.js +1 -1
- package/dist/menu/MenuWidget.js.map +1 -1
- package/dist/menu/MenuWidgetKeyboardProvider.d.ts +2 -2
- package/dist/menu/MenuWidgetKeyboardProvider.js +1 -1
- package/dist/menu/MenuWidgetKeyboardProvider.js.map +1 -1
- package/dist/menu/useContextMenu.d.ts +8 -12
- package/dist/menu/useContextMenu.js +3 -5
- package/dist/menu/useContextMenu.js.map +1 -1
- package/dist/menu/useMenuBarProvider.d.ts +6 -6
- package/dist/menu/useMenuBarProvider.js +3 -3
- package/dist/menu/useMenuBarProvider.js.map +1 -1
- package/dist/menu/utils.d.ts +2 -2
- package/dist/menu/utils.js +1 -1
- package/dist/menu/utils.js.map +1 -1
- package/dist/movement/constants.d.ts +3 -3
- package/dist/movement/constants.js +3 -3
- package/dist/movement/constants.js.map +1 -1
- package/dist/movement/types.d.ts +16 -17
- package/dist/movement/types.js +1 -1
- package/dist/movement/types.js.map +1 -1
- package/dist/movement/useKeyboardMovementProvider.d.ts +5 -8
- package/dist/movement/useKeyboardMovementProvider.js +6 -9
- package/dist/movement/useKeyboardMovementProvider.js.map +1 -1
- package/dist/movement/utils.d.ts +13 -13
- package/dist/movement/utils.js +10 -10
- package/dist/movement/utils.js.map +1 -1
- package/dist/navigation/CollapsibleNavGroup.d.ts +29 -0
- package/dist/navigation/CollapsibleNavGroup.js +49 -0
- package/dist/navigation/CollapsibleNavGroup.js.map +1 -0
- package/dist/navigation/DefaultNavigationRenderer.d.ts +22 -0
- package/dist/navigation/DefaultNavigationRenderer.js +58 -0
- package/dist/navigation/DefaultNavigationRenderer.js.map +1 -0
- package/dist/navigation/NavGroup.d.ts +18 -0
- package/dist/navigation/NavGroup.js +29 -0
- package/dist/navigation/NavGroup.js.map +1 -0
- package/dist/navigation/NavItem.d.ts +17 -0
- package/dist/navigation/NavItem.js +24 -0
- package/dist/navigation/NavItem.js.map +1 -0
- package/dist/navigation/NavItemButton.d.ts +26 -0
- package/dist/navigation/NavItemButton.js +65 -0
- package/dist/navigation/NavItemButton.js.map +1 -0
- package/dist/navigation/NavItemLink.d.ts +40 -0
- package/dist/navigation/NavItemLink.js +88 -0
- package/dist/navigation/NavItemLink.js.map +1 -0
- package/dist/navigation/NavSubheader.d.ts +16 -0
- package/dist/navigation/NavSubheader.js +26 -0
- package/dist/navigation/NavSubheader.js.map +1 -0
- package/dist/navigation/Navigation.d.ts +31 -0
- package/dist/navigation/Navigation.js +46 -0
- package/dist/navigation/Navigation.js.map +1 -0
- package/dist/navigation/_navigation.scss +99 -0
- package/dist/navigation/getHrefFromParents.d.ts +5 -0
- package/dist/navigation/getHrefFromParents.js +13 -0
- package/dist/navigation/getHrefFromParents.js.map +1 -0
- package/dist/navigation/navGroupStyles.d.ts +11 -0
- package/dist/navigation/navGroupStyles.js +13 -0
- package/dist/navigation/navGroupStyles.js.map +1 -0
- package/dist/navigation/navItemStyles.d.ts +33 -0
- package/dist/navigation/navItemStyles.js +31 -0
- package/dist/navigation/navItemStyles.js.map +1 -0
- package/dist/navigation/types.d.ts +137 -0
- package/dist/navigation/types.js +5 -0
- package/dist/navigation/types.js.map +1 -0
- package/dist/navigation/useActiveHeadingId.d.ts +54 -0
- package/dist/navigation/useActiveHeadingId.js +117 -0
- package/dist/navigation/useActiveHeadingId.js.map +1 -0
- package/dist/overlay/Overlay.d.ts +5 -6
- package/dist/overlay/Overlay.js +2 -3
- package/dist/overlay/Overlay.js.map +1 -1
- package/dist/overlay/overlayStyles.d.ts +4 -4
- package/dist/overlay/overlayStyles.js +3 -3
- package/dist/overlay/overlayStyles.js.map +1 -1
- package/dist/portal/Portal.d.ts +1 -2
- package/dist/portal/Portal.js +1 -2
- package/dist/portal/Portal.js.map +1 -1
- package/dist/portal/PortalContainerProvider.d.ts +4 -4
- package/dist/portal/PortalContainerProvider.js +2 -2
- package/dist/portal/PortalContainerProvider.js.map +1 -1
- package/dist/positioning/createVerticalPosition.d.ts +1 -1
- package/dist/positioning/createVerticalPosition.js.map +1 -1
- package/dist/positioning/getFixedPosition.js +1 -1
- package/dist/positioning/getFixedPosition.js.map +1 -1
- package/dist/positioning/types.d.ts +4 -4
- package/dist/positioning/types.js.map +1 -1
- package/dist/positioning/useFixedPositioning.d.ts +8 -9
- package/dist/positioning/useFixedPositioning.js +2 -3
- package/dist/positioning/useFixedPositioning.js.map +1 -1
- package/dist/positioning/utils.d.ts +3 -3
- package/dist/positioning/utils.js +1 -1
- package/dist/positioning/utils.js.map +1 -1
- package/dist/progress/CircularProgress.d.ts +7 -10
- package/dist/progress/CircularProgress.js +3 -5
- package/dist/progress/CircularProgress.js.map +1 -1
- package/dist/progress/LinearProgress.d.ts +4 -6
- package/dist/progress/LinearProgress.js +3 -5
- package/dist/progress/LinearProgress.js.map +1 -1
- package/dist/progress/types.d.ts +5 -5
- package/dist/progress/types.js +1 -1
- package/dist/progress/types.js.map +1 -1
- package/dist/responsive-item/ResponsiveItemContainer.d.ts +10 -15
- package/dist/responsive-item/ResponsiveItemContainer.js +5 -8
- package/dist/responsive-item/ResponsiveItemContainer.js.map +1 -1
- package/dist/responsive-item/ResponsiveItemOverlay.d.ts +6 -7
- package/dist/responsive-item/ResponsiveItemOverlay.js +3 -4
- package/dist/responsive-item/ResponsiveItemOverlay.js.map +1 -1
- package/dist/responsive-item/styles.d.ts +2 -2
- package/dist/responsive-item/styles.js +1 -1
- package/dist/responsive-item/styles.js.map +1 -1
- package/dist/scroll/ScrollLock.d.ts +1 -1
- package/dist/scroll/ScrollLock.js +1 -1
- package/dist/scroll/ScrollLock.js.map +1 -1
- package/dist/scroll/useScrollLock.d.ts +2 -3
- package/dist/scroll/useScrollLock.js +2 -3
- package/dist/scroll/useScrollLock.js.map +1 -1
- package/dist/searching/caseInsensitive.d.ts +9 -13
- package/dist/searching/caseInsensitive.js +1 -1
- package/dist/searching/caseInsensitive.js.map +1 -1
- package/dist/searching/fuzzy.d.ts +4 -5
- package/dist/searching/fuzzy.js +1 -1
- package/dist/searching/fuzzy.js.map +1 -1
- package/dist/searching/toSearchQuery.d.ts +1 -1
- package/dist/searching/toSearchQuery.js +1 -1
- package/dist/searching/toSearchQuery.js.map +1 -1
- package/dist/searching/types.d.ts +2 -2
- package/dist/searching/types.js +1 -1
- package/dist/searching/types.js.map +1 -1
- package/dist/searching/useFuzzyMatch.d.ts +3 -3
- package/dist/searching/useFuzzyMatch.js +1 -1
- package/dist/searching/useFuzzyMatch.js.map +1 -1
- package/dist/searching/utils.d.ts +3 -3
- package/dist/searching/utils.js +2 -2
- package/dist/searching/utils.js.map +1 -1
- package/dist/segmented-button/SegmentedButton.d.ts +3 -4
- package/dist/segmented-button/SegmentedButton.js +2 -3
- package/dist/segmented-button/SegmentedButton.js.map +1 -1
- package/dist/segmented-button/SegmentedButtonContainer.d.ts +3 -4
- package/dist/segmented-button/SegmentedButtonContainer.js +2 -3
- package/dist/segmented-button/SegmentedButtonContainer.js.map +1 -1
- package/dist/segmented-button/segmentedButtonContainerStyles.d.ts +2 -2
- package/dist/segmented-button/segmentedButtonContainerStyles.js +1 -1
- package/dist/segmented-button/segmentedButtonContainerStyles.js.map +1 -1
- package/dist/segmented-button/segmentedButtonStyles.d.ts +2 -2
- package/dist/segmented-button/segmentedButtonStyles.js +1 -1
- package/dist/segmented-button/segmentedButtonStyles.js.map +1 -1
- package/dist/sheet/Sheet.d.ts +1 -1
- package/dist/sheet/Sheet.js.map +1 -1
- package/dist/sheet/styles.d.ts +3 -3
- package/dist/sheet/styles.js +1 -1
- package/dist/sheet/styles.js.map +1 -1
- package/dist/snackbar/DefaultToastRenderer.d.ts +2 -2
- package/dist/snackbar/DefaultToastRenderer.js +1 -1
- package/dist/snackbar/DefaultToastRenderer.js.map +1 -1
- package/dist/snackbar/Snackbar.d.ts +3 -4
- package/dist/snackbar/Snackbar.js +2 -3
- package/dist/snackbar/Snackbar.js.map +1 -1
- package/dist/snackbar/Toast.d.ts +3 -3
- package/dist/snackbar/Toast.js +1 -1
- package/dist/snackbar/Toast.js.map +1 -1
- package/dist/snackbar/ToastActionButton.d.ts +2 -2
- package/dist/snackbar/ToastActionButton.js +1 -1
- package/dist/snackbar/ToastActionButton.js.map +1 -1
- package/dist/snackbar/ToastCloseButton.d.ts +2 -2
- package/dist/snackbar/ToastCloseButton.js +1 -1
- package/dist/snackbar/ToastCloseButton.js.map +1 -1
- package/dist/snackbar/ToastContent.d.ts +2 -2
- package/dist/snackbar/ToastContent.js +1 -1
- package/dist/snackbar/ToastContent.js.map +1 -1
- package/dist/snackbar/ToastManager.d.ts +17 -18
- package/dist/snackbar/ToastManager.js +21 -19
- package/dist/snackbar/ToastManager.js.map +1 -1
- package/dist/snackbar/ToastManagerProvider.d.ts +6 -6
- package/dist/snackbar/ToastManagerProvider.js +5 -5
- package/dist/snackbar/ToastManagerProvider.js.map +1 -1
- package/dist/snackbar/snackbarStyles.d.ts +4 -5
- package/dist/snackbar/snackbarStyles.js +1 -1
- package/dist/snackbar/snackbarStyles.js.map +1 -1
- package/dist/snackbar/toastContentStyles.d.ts +2 -2
- package/dist/snackbar/toastContentStyles.js +1 -1
- package/dist/snackbar/toastContentStyles.js.map +1 -1
- package/dist/snackbar/toastStyles.d.ts +2 -2
- package/dist/snackbar/toastStyles.js +1 -1
- package/dist/snackbar/toastStyles.js.map +1 -1
- package/dist/snackbar/useCurrentToastActions.d.ts +3 -3
- package/dist/snackbar/useCurrentToastActions.js +2 -2
- package/dist/snackbar/useCurrentToastActions.js.map +1 -1
- package/dist/suspense/CircularProgressSuspense.d.ts +3 -4
- package/dist/suspense/CircularProgressSuspense.js +2 -3
- package/dist/suspense/CircularProgressSuspense.js.map +1 -1
- package/dist/suspense/NullSuspense.d.ts +3 -4
- package/dist/suspense/NullSuspense.js +2 -3
- package/dist/suspense/NullSuspense.js.map +1 -1
- package/dist/table/Table.d.ts +1 -2
- package/dist/table/Table.js +1 -2
- package/dist/table/Table.js.map +1 -1
- package/dist/table/TableCell.d.ts +7 -7
- package/dist/table/TableCell.js.map +1 -1
- package/dist/table/TableCellContent.d.ts +3 -3
- package/dist/table/TableCellContent.js.map +1 -1
- package/dist/table/TableCheckbox.d.ts +11 -15
- package/dist/table/TableCheckbox.js +4 -6
- package/dist/table/TableCheckbox.js.map +1 -1
- package/dist/table/TableContainerProvider.d.ts +3 -3
- package/dist/table/TableContainerProvider.js +2 -2
- package/dist/table/TableContainerProvider.js.map +1 -1
- package/dist/table/TableFooter.d.ts +2 -2
- package/dist/table/TableFooter.js +1 -1
- package/dist/table/TableFooter.js.map +1 -1
- package/dist/table/TableHeader.d.ts +2 -2
- package/dist/table/TableHeader.js +1 -1
- package/dist/table/TableHeader.js.map +1 -1
- package/dist/table/TableRadio.d.ts +7 -9
- package/dist/table/TableRadio.js +2 -3
- package/dist/table/TableRadio.js.map +1 -1
- package/dist/table/tableCellStyles.d.ts +2 -2
- package/dist/table/tableCellStyles.js +1 -1
- package/dist/table/tableCellStyles.js.map +1 -1
- package/dist/table/tableContainerStyles.d.ts +2 -2
- package/dist/table/tableContainerStyles.js +1 -1
- package/dist/table/tableContainerStyles.js.map +1 -1
- package/dist/table/tableFooterStyles.d.ts +1 -1
- package/dist/table/tableFooterStyles.js.map +1 -1
- package/dist/table/tableHeaderStyles.d.ts +2 -2
- package/dist/table/tableHeaderStyles.js +1 -1
- package/dist/table/tableHeaderStyles.js.map +1 -1
- package/dist/table/tableRowStyles.d.ts +2 -2
- package/dist/table/tableRowStyles.js +1 -1
- package/dist/table/tableRowStyles.js.map +1 -1
- package/dist/table/tableStyles.d.ts +2 -2
- package/dist/table/tableStyles.js +1 -1
- package/dist/table/tableStyles.js.map +1 -1
- package/dist/table/types.d.ts +7 -9
- package/dist/table/types.js +1 -1
- package/dist/table/types.js.map +1 -1
- package/dist/tabs/Tab.d.ts +4 -4
- package/dist/tabs/Tab.js +1 -1
- package/dist/tabs/Tab.js.map +1 -1
- package/dist/tabs/TabList.d.ts +2 -2
- package/dist/tabs/TabList.js +1 -1
- package/dist/tabs/TabList.js.map +1 -1
- package/dist/tabs/TabListScrollButton.d.ts +3 -3
- package/dist/tabs/TabListScrollButton.js +1 -1
- package/dist/tabs/TabListScrollButton.js.map +1 -1
- package/dist/tabs/tabIndicatorStyles.d.ts +2 -2
- package/dist/tabs/tabIndicatorStyles.js +1 -1
- package/dist/tabs/tabIndicatorStyles.js.map +1 -1
- package/dist/tabs/tabListScrollButtonStyles.d.ts +4 -4
- package/dist/tabs/tabListScrollButtonStyles.js +2 -2
- package/dist/tabs/tabListScrollButtonStyles.js.map +1 -1
- package/dist/tabs/tabListStyles.d.ts +2 -2
- package/dist/tabs/tabListStyles.js +1 -1
- package/dist/tabs/tabListStyles.js.map +1 -1
- package/dist/tabs/tabStyles.d.ts +2 -2
- package/dist/tabs/tabStyles.js +1 -1
- package/dist/tabs/tabStyles.js.map +1 -1
- package/dist/tabs/useTabs.d.ts +15 -20
- package/dist/tabs/useTabs.js +1 -1
- package/dist/tabs/useTabs.js.map +1 -1
- package/dist/tabs/utils.d.ts +3 -3
- package/dist/tabs/utils.js +1 -1
- package/dist/tabs/utils.js.map +1 -1
- package/dist/test-utils/ResizeObserver.d.ts +9 -11
- package/dist/test-utils/ResizeObserver.js +6 -8
- package/dist/test-utils/ResizeObserver.js.map +1 -1
- package/dist/test-utils/matchMedia.d.ts +13 -17
- package/dist/test-utils/matchMedia.js +9 -11
- package/dist/test-utils/matchMedia.js.map +1 -1
- package/dist/test-utils/render.d.ts +2 -2
- package/dist/test-utils/render.js +1 -1
- package/dist/test-utils/render.js.map +1 -1
- package/dist/test-utils/timers.d.ts +2 -3
- package/dist/test-utils/timers.js +2 -3
- package/dist/test-utils/timers.js.map +1 -1
- package/dist/theme/LocalStorageColorSchemeProvider.d.ts +2 -2
- package/dist/theme/LocalStorageColorSchemeProvider.js +1 -1
- package/dist/theme/LocalStorageColorSchemeProvider.js.map +1 -1
- package/dist/theme/ThemeProvider.d.ts +17 -20
- package/dist/theme/ThemeProvider.js +7 -8
- package/dist/theme/ThemeProvider.js.map +1 -1
- package/dist/theme/types.d.ts +3 -3
- package/dist/theme/types.js +1 -1
- package/dist/theme/types.js.map +1 -1
- package/dist/theme/useCSSVariables.d.ts +7 -9
- package/dist/theme/useCSSVariables.js +1 -1
- package/dist/theme/useCSSVariables.js.map +1 -1
- package/dist/theme/useColorScheme.d.ts +6 -7
- package/dist/theme/useColorScheme.js +2 -3
- package/dist/theme/useColorScheme.js.map +1 -1
- package/dist/theme/useColorSchemeMetaTag.d.ts +2 -2
- package/dist/theme/useColorSchemeMetaTag.js +1 -1
- package/dist/theme/useColorSchemeMetaTag.js.map +1 -1
- package/dist/theme/useColorSchemeProvider.d.ts +2 -2
- package/dist/theme/useColorSchemeProvider.js.map +1 -1
- package/dist/theme/usePrefersColorScheme.d.ts +1 -1
- package/dist/theme/usePrefersColorScheme.js +1 -1
- package/dist/theme/usePrefersColorScheme.js.map +1 -1
- package/dist/theme/utils.d.ts +1 -1
- package/dist/theme/utils.js +1 -1
- package/dist/theme/utils.js.map +1 -1
- package/dist/tooltip/Tooltip.d.ts +3 -5
- package/dist/tooltip/Tooltip.js +1 -2
- package/dist/tooltip/Tooltip.js.map +1 -1
- package/dist/tooltip/TooltipHoverModeProvider.d.ts +5 -6
- package/dist/tooltip/TooltipHoverModeProvider.js +3 -4
- package/dist/tooltip/TooltipHoverModeProvider.js.map +1 -1
- package/dist/tooltip/constants.d.ts +9 -9
- package/dist/tooltip/constants.js +9 -9
- package/dist/tooltip/constants.js.map +1 -1
- package/dist/tooltip/tooltipStyles.d.ts +2 -2
- package/dist/tooltip/tooltipStyles.js +1 -1
- package/dist/tooltip/tooltipStyles.js.map +1 -1
- package/dist/tooltip/useTooltip.d.ts +18 -26
- package/dist/tooltip/useTooltip.js +4 -7
- package/dist/tooltip/useTooltip.js.map +1 -1
- package/dist/tooltip/useTooltipPosition.d.ts +4 -4
- package/dist/tooltip/useTooltipPosition.js +1 -1
- package/dist/tooltip/useTooltipPosition.js.map +1 -1
- package/dist/transition/CSSTransition.d.ts +3 -4
- package/dist/transition/CSSTransition.js +2 -3
- package/dist/transition/CSSTransition.js.map +1 -1
- package/dist/transition/Collapse.d.ts +5 -8
- package/dist/transition/Collapse.js +3 -5
- package/dist/transition/Collapse.js.map +1 -1
- package/dist/transition/CrossFade.d.ts +5 -8
- package/dist/transition/CrossFade.js +3 -5
- package/dist/transition/CrossFade.js.map +1 -1
- package/dist/transition/ScaleTransition.d.ts +7 -10
- package/dist/transition/ScaleTransition.js +4 -6
- package/dist/transition/ScaleTransition.js.map +1 -1
- package/dist/transition/SkeletonPlaceholder.d.ts +4 -6
- package/dist/transition/SkeletonPlaceholder.js +3 -5
- package/dist/transition/SkeletonPlaceholder.js.map +1 -1
- package/dist/transition/Slide.d.ts +2 -2
- package/dist/transition/Slide.js +1 -1
- package/dist/transition/Slide.js.map +1 -1
- package/dist/transition/SlideContainer.d.ts +9 -13
- package/dist/transition/SlideContainer.js +4 -6
- package/dist/transition/SlideContainer.js.map +1 -1
- package/dist/transition/collapseStyles.d.ts +2 -2
- package/dist/transition/collapseStyles.js +1 -1
- package/dist/transition/collapseStyles.js.map +1 -1
- package/dist/transition/config.d.ts +2 -2
- package/dist/transition/config.js +2 -2
- package/dist/transition/config.js.map +1 -1
- package/dist/transition/skeletonPlaceholderUtils.d.ts +3 -3
- package/dist/transition/skeletonPlaceholderUtils.js +2 -2
- package/dist/transition/skeletonPlaceholderUtils.js.map +1 -1
- package/dist/transition/types.d.ts +34 -37
- package/dist/transition/types.js +1 -1
- package/dist/transition/types.js.map +1 -1
- package/dist/transition/useCSSTransition.d.ts +4 -7
- package/dist/transition/useCSSTransition.js +4 -7
- package/dist/transition/useCSSTransition.js.map +1 -1
- package/dist/transition/useCarousel.d.ts +6 -7
- package/dist/transition/useCarousel.js +2 -3
- package/dist/transition/useCarousel.js.map +1 -1
- package/dist/transition/useCollapseTransition.d.ts +10 -13
- package/dist/transition/useCollapseTransition.js +4 -6
- package/dist/transition/useCollapseTransition.js.map +1 -1
- package/dist/transition/useCrossFadeTransition.d.ts +5 -6
- package/dist/transition/useCrossFadeTransition.js +4 -5
- package/dist/transition/useCrossFadeTransition.js.map +1 -1
- package/dist/transition/useMaxWidthTransition.d.ts +2 -2
- package/dist/transition/useMaxWidthTransition.js +1 -1
- package/dist/transition/useMaxWidthTransition.js.map +1 -1
- package/dist/transition/useScaleTransition.d.ts +8 -11
- package/dist/transition/useScaleTransition.js +7 -10
- package/dist/transition/useScaleTransition.js.map +1 -1
- package/dist/transition/useSkeletonPlaceholder.d.ts +6 -10
- package/dist/transition/useSkeletonPlaceholder.js.map +1 -1
- package/dist/transition/useSlideTransition.d.ts +5 -6
- package/dist/transition/useSlideTransition.js +4 -5
- package/dist/transition/useSlideTransition.js.map +1 -1
- package/dist/transition/useTransition.d.ts +1 -1
- package/dist/transition/useTransition.js +1 -1
- package/dist/transition/useTransition.js.map +1 -1
- package/dist/transition/utils.d.ts +6 -6
- package/dist/transition/utils.js +3 -3
- package/dist/transition/utils.js.map +1 -1
- package/dist/tree/DefaultTreeItemRenderer.d.ts +1 -1
- package/dist/tree/DefaultTreeItemRenderer.js +1 -1
- package/dist/tree/DefaultTreeItemRenderer.js.map +1 -1
- package/dist/tree/Tree.d.ts +7 -11
- package/dist/tree/Tree.js +4 -6
- package/dist/tree/Tree.js.map +1 -1
- package/dist/tree/TreeGroup.d.ts +3 -3
- package/dist/tree/TreeGroup.js +1 -1
- package/dist/tree/TreeGroup.js.map +1 -1
- package/dist/tree/TreeItem.d.ts +3 -4
- package/dist/tree/TreeItem.js +2 -3
- package/dist/tree/TreeItem.js.map +1 -1
- package/dist/tree/TreeItemExpander.d.ts +2 -2
- package/dist/tree/TreeItemExpander.js +1 -1
- package/dist/tree/TreeItemExpander.js.map +1 -1
- package/dist/tree/TreeProvider.d.ts +6 -6
- package/dist/tree/TreeProvider.js +2 -2
- package/dist/tree/TreeProvider.js.map +1 -1
- package/dist/tree/styles.d.ts +10 -10
- package/dist/tree/styles.js +5 -5
- package/dist/tree/styles.js.map +1 -1
- package/dist/tree/types.d.ts +6 -7
- package/dist/tree/types.js.map +1 -1
- package/dist/tree/useTree.d.ts +4 -5
- package/dist/tree/useTree.js +2 -3
- package/dist/tree/useTree.js.map +1 -1
- package/dist/tree/useTreeExpansion.d.ts +2 -2
- package/dist/tree/useTreeExpansion.js +1 -1
- package/dist/tree/useTreeExpansion.js.map +1 -1
- package/dist/tree/useTreeItems.d.ts +7 -7
- package/dist/tree/useTreeItems.js +2 -2
- package/dist/tree/useTreeItems.js.map +1 -1
- package/dist/tree/useTreeMovement.d.ts +3 -3
- package/dist/tree/useTreeMovement.js +3 -3
- package/dist/tree/useTreeMovement.js.map +1 -1
- package/dist/tree/useTreeSelection.d.ts +2 -2
- package/dist/tree/useTreeSelection.js +1 -1
- package/dist/tree/useTreeSelection.js.map +1 -1
- package/dist/tree/utils.d.ts +2 -2
- package/dist/tree/utils.js +2 -2
- package/dist/tree/utils.js.map +1 -1
- package/dist/types.d.ts +14 -16
- package/dist/types.js +1 -1
- package/dist/types.js.map +1 -1
- package/dist/typography/SrOnly.d.ts +1 -2
- package/dist/typography/SrOnly.js +1 -2
- package/dist/typography/SrOnly.js.map +1 -1
- package/dist/typography/TextContainer.d.ts +3 -4
- package/dist/typography/TextContainer.js +2 -3
- package/dist/typography/TextContainer.js.map +1 -1
- package/dist/typography/Typography.d.ts +3 -4
- package/dist/typography/Typography.js +1 -2
- package/dist/typography/Typography.js.map +1 -1
- package/dist/typography/WritingDirectionProvider.d.ts +10 -13
- package/dist/typography/WritingDirectionProvider.js +6 -9
- package/dist/typography/WritingDirectionProvider.js.map +1 -1
- package/dist/typography/textContainerStyles.d.ts +3 -4
- package/dist/typography/textContainerStyles.js +2 -3
- package/dist/typography/textContainerStyles.js.map +1 -1
- package/dist/typography/typographyStyles.d.ts +6 -8
- package/dist/typography/typographyStyles.js +3 -5
- package/dist/typography/typographyStyles.js.map +1 -1
- package/dist/useAsyncAction.d.ts +7 -9
- package/dist/useAsyncAction.js +3 -5
- package/dist/useAsyncAction.js.map +1 -1
- package/dist/useDebouncedFunction.d.ts +3 -4
- package/dist/useDebouncedFunction.js +2 -3
- package/dist/useDebouncedFunction.js.map +1 -1
- package/dist/useDropzone.d.ts +9 -14
- package/dist/useDropzone.js +4 -7
- package/dist/useDropzone.js.map +1 -1
- package/dist/useElementSize.d.ts +26 -5
- package/dist/useElementSize.js +7 -5
- package/dist/useElementSize.js.map +1 -1
- package/dist/useEnsuredId.d.ts +2 -3
- package/dist/useEnsuredId.js +2 -3
- package/dist/useEnsuredId.js.map +1 -1
- package/dist/useEnsuredRef.d.ts +3 -4
- package/dist/useEnsuredRef.js +2 -3
- package/dist/useEnsuredRef.js.map +1 -1
- package/dist/useEnsuredState.d.ts +2 -2
- package/dist/useEnsuredState.js +1 -1
- package/dist/useEnsuredState.js.map +1 -1
- package/dist/useHtmlClassName.d.ts +1 -1
- package/dist/useHtmlClassName.js +1 -1
- package/dist/useHtmlClassName.js.map +1 -1
- package/dist/useIntersectionObserver.d.ts +13 -20
- package/dist/useIntersectionObserver.js +2 -3
- package/dist/useIntersectionObserver.js.map +1 -1
- package/dist/useLocalStorage.d.ts +17 -22
- package/dist/useLocalStorage.js +9 -13
- package/dist/useLocalStorage.js.map +1 -1
- package/dist/usePageInactive.d.ts +3 -3
- package/dist/usePageInactive.js +1 -1
- package/dist/usePageInactive.js.map +1 -1
- package/dist/useResizeListener.d.ts +3 -4
- package/dist/useResizeListener.js +2 -3
- package/dist/useResizeListener.js.map +1 -1
- package/dist/useResizeObserver.d.ts +8 -10
- package/dist/useResizeObserver.js +4 -5
- package/dist/useResizeObserver.js.map +1 -1
- package/dist/useThrottledFunction.d.ts +3 -4
- package/dist/useThrottledFunction.js +2 -3
- package/dist/useThrottledFunction.js.map +1 -1
- package/dist/useToggle.d.ts +2 -3
- package/dist/useToggle.js +1 -2
- package/dist/useToggle.js.map +1 -1
- package/dist/useUnmounted.d.ts +2 -3
- package/dist/useUnmounted.js +2 -3
- package/dist/useUnmounted.js.map +1 -1
- package/dist/useWindowSize.d.ts +3 -4
- package/dist/useWindowSize.js +2 -3
- package/dist/useWindowSize.js.map +1 -1
- package/dist/utils/RenderRecursively.d.ts +26 -7
- package/dist/utils/RenderRecursively.js +19 -3
- package/dist/utils/RenderRecursively.js.map +1 -1
- package/dist/utils/alphaNumericSort.d.ts +6 -11
- package/dist/utils/alphaNumericSort.js +1 -1
- package/dist/utils/alphaNumericSort.js.map +1 -1
- package/dist/utils/applyRef.d.ts +1 -2
- package/dist/utils/applyRef.js +1 -2
- package/dist/utils/applyRef.js.map +1 -1
- package/dist/utils/bem.d.ts +2 -3
- package/dist/utils/bem.js +2 -3
- package/dist/utils/bem.js.map +1 -1
- package/dist/utils/getClientPosition.d.ts +4 -4
- package/dist/utils/getClientPosition.js +2 -2
- package/dist/utils/getClientPosition.js.map +1 -1
- package/dist/utils/getMiddleOfRange.d.ts +2 -2
- package/dist/utils/getMiddleOfRange.js +1 -1
- package/dist/utils/getMiddleOfRange.js.map +1 -1
- package/dist/utils/getPercentage.d.ts +3 -4
- package/dist/utils/getPercentage.js +3 -4
- package/dist/utils/getPercentage.js.map +1 -1
- package/dist/utils/getRangeDefaultValue.d.ts +2 -2
- package/dist/utils/getRangeDefaultValue.js +1 -1
- package/dist/utils/getRangeDefaultValue.js.map +1 -1
- package/dist/utils/getRangeSteps.d.ts +3 -4
- package/dist/utils/getRangeSteps.js +3 -4
- package/dist/utils/getRangeSteps.js.map +1 -1
- package/dist/utils/identity.d.ts +1 -1
- package/dist/utils/identity.js +1 -1
- package/dist/utils/identity.js.map +1 -1
- package/dist/utils/isElementVisible.d.ts +3 -4
- package/dist/utils/isElementVisible.js +3 -4
- package/dist/utils/isElementVisible.js.map +1 -1
- package/dist/utils/loop.d.ts +2 -2
- package/dist/utils/loop.js +2 -2
- package/dist/utils/loop.js.map +1 -1
- package/dist/utils/nearest.d.ts +3 -4
- package/dist/utils/nearest.js +3 -4
- package/dist/utils/nearest.js.map +1 -1
- package/dist/utils/parseCssLengthUnit.d.ts +2 -4
- package/dist/utils/parseCssLengthUnit.js +2 -4
- package/dist/utils/parseCssLengthUnit.js.map +1 -1
- package/dist/utils/randomInt.d.ts +2 -2
- package/dist/utils/randomInt.js +2 -2
- package/dist/utils/randomInt.js.map +1 -1
- package/dist/utils/wait.d.ts +2 -3
- package/dist/utils/wait.js +2 -3
- package/dist/utils/wait.js.map +1 -1
- package/dist/utils/withinRange.d.ts +3 -4
- package/dist/utils/withinRange.js +3 -4
- package/dist/utils/withinRange.js.map +1 -1
- package/dist/window-splitter/WindowSplitter.d.ts +5 -5
- package/dist/window-splitter/WindowSplitter.js +2 -2
- package/dist/window-splitter/WindowSplitter.js.map +1 -1
- package/dist/window-splitter/useWindowSplitter.d.ts +6 -7
- package/dist/window-splitter/useWindowSplitter.js +2 -3
- package/dist/window-splitter/useWindowSplitter.js.map +1 -1
- package/package.json +19 -13
- package/src/CoreProviders.tsx +3 -3
- package/src/NoSsr.tsx +3 -4
- package/src/RootHtml.tsx +3 -4
- package/src/SsrProvider.tsx +3 -3
- package/src/_core.scss +5 -0
- package/src/app-bar/AppBar.tsx +11 -14
- package/src/app-bar/AppBarTitle.tsx +7 -9
- package/src/avatar/Avatar.tsx +5 -6
- package/src/avatar/__tests__/Avatar.tsx +1 -1
- package/src/avatar/styles.ts +4 -4
- package/src/badge/Badge.tsx +4 -6
- package/src/box/Box.tsx +16 -9
- package/src/box/__tests__/Box.tsx +158 -0
- package/src/box/__tests__/__snapshots__/Box.tsx.snap +544 -0
- package/src/box/_box.scss +1 -1
- package/src/box/styles.ts +9 -9
- package/src/button/AsyncButton.tsx +5 -7
- package/src/button/Button.tsx +4 -8
- package/src/button/ButtonUnstyled.tsx +2 -2
- package/src/button/FloatingActionButton.tsx +5 -5
- package/src/button/TooltippedButton.tsx +9 -13
- package/src/button/buttonStyles.ts +3 -3
- package/src/button/buttonUnstyledStyles.ts +2 -2
- package/src/card/Card.tsx +3 -4
- package/src/card/CardContent.tsx +2 -4
- package/src/card/CardFooter.tsx +2 -2
- package/src/card/CardHeader.tsx +10 -12
- package/src/card/CardSubtitle.tsx +2 -2
- package/src/card/CardTitle.tsx +2 -2
- package/src/card/ClickableCard.tsx +3 -4
- package/src/card/styles.ts +15 -15
- package/src/chip/Chip.tsx +10 -14
- package/src/chip/styles.ts +4 -4
- package/src/cssUtils.ts +10 -10
- package/src/dialog/Dialog.tsx +5 -6
- package/src/dialog/DialogContainer.tsx +2 -2
- package/src/dialog/DialogTitle.tsx +1 -1
- package/src/dialog/FixedDialog.tsx +1 -2
- package/src/dialog/styles.ts +9 -9
- package/src/divider/Divider.tsx +2 -3
- package/src/divider/styles.ts +2 -2
- package/src/draggable/useDraggable.ts +18 -19
- package/src/draggable/utils.ts +2 -2
- package/src/expansion-panel/ExpansionList.tsx +2 -2
- package/src/expansion-panel/ExpansionPanel.tsx +8 -9
- package/src/expansion-panel/ExpansionPanelHeader.tsx +3 -4
- package/src/expansion-panel/useExpansionList.ts +6 -7
- package/src/expansion-panel/useExpansionPanels.ts +9 -14
- package/src/focus/useFocusContainer.ts +9 -10
- package/src/focus/utils.ts +4 -5
- package/src/form/Checkbox.tsx +1 -2
- package/src/form/Fieldset.tsx +5 -6
- package/src/form/FileInput.tsx +6 -7
- package/src/form/FormMessageContainer.tsx +2 -2
- package/src/form/FormMessageCounter.tsx +4 -6
- package/src/form/InputToggle.tsx +11 -12
- package/src/form/InputToggleIcon.tsx +4 -6
- package/src/form/Label.tsx +2 -2
- package/src/form/Legend.tsx +2 -2
- package/src/form/MenuItemCheckbox.tsx +2 -3
- package/src/form/MenuItemFileInput.tsx +3 -5
- package/src/form/MenuItemInputToggle.tsx +7 -9
- package/src/form/MenuItemRadio.tsx +3 -5
- package/src/form/MenuItemSwitch.tsx +2 -3
- package/src/form/MenuItemTextField.tsx +2 -2
- package/src/form/NativeSelect.tsx +3 -5
- package/src/form/OptGroup.tsx +3 -4
- package/src/form/Option.tsx +5 -7
- package/src/form/Password.tsx +7 -13
- package/src/form/Radio.tsx +1 -2
- package/src/form/ResizingTextAreaWrapper.tsx +2 -2
- package/src/form/Select.tsx +6 -9
- package/src/form/SelectedOption.tsx +2 -2
- package/src/form/Slider.tsx +16 -25
- package/src/form/SliderContainer.tsx +6 -9
- package/src/form/SliderMark.tsx +2 -2
- package/src/form/SliderMarkLabel.tsx +3 -3
- package/src/form/SliderThumb.tsx +8 -10
- package/src/form/SliderTrack.tsx +4 -6
- package/src/form/SliderValueMarks.tsx +7 -9
- package/src/form/SliderValueTooltip.tsx +4 -6
- package/src/form/Switch.tsx +3 -4
- package/src/form/TextArea.tsx +2 -3
- package/src/form/TextField.tsx +7 -10
- package/src/form/TextFieldAddon.tsx +3 -3
- package/src/form/fileUtils.ts +33 -36
- package/src/form/formConfig.ts +2 -2
- package/src/form/formMessageStyles.ts +5 -5
- package/src/form/inputToggleStyles.ts +3 -3
- package/src/form/menuItemInputToggleStyles.ts +8 -8
- package/src/form/nativeSelectStyles.ts +4 -4
- package/src/form/optionStyles.ts +2 -2
- package/src/form/passwordStyles.ts +4 -4
- package/src/form/selectStyles.ts +2 -2
- package/src/form/selectUtils.ts +4 -4
- package/src/form/sliderUtils.ts +9 -9
- package/src/form/switchStyles.ts +2 -2
- package/src/form/textAreaStyles.ts +4 -4
- package/src/form/textFieldContainerStyles.ts +2 -2
- package/src/form/textFieldStyles.ts +2 -2
- package/src/form/types.ts +10 -10
- package/src/form/useCheckboxGroup.ts +15 -20
- package/src/form/useCombobox.ts +18 -16
- package/src/form/useEditableCombobox.ts +3 -3
- package/src/form/useFileUpload.ts +7 -8
- package/src/form/useFormReset.ts +2 -2
- package/src/form/useListboxProvider.ts +3 -3
- package/src/form/useNumberField.ts +17 -25
- package/src/form/useRadioGroup.ts +14 -18
- package/src/form/useRangeSlider.ts +8 -11
- package/src/form/useSelectCombobox.ts +3 -3
- package/src/form/useSlider.ts +7 -9
- package/src/form/useTextField.ts +22 -31
- package/src/form/utils.ts +7 -8
- package/src/form/validation.ts +18 -18
- package/src/hoverMode/useHoverMode.ts +9 -10
- package/src/hoverMode/useHoverModeProvider.ts +11 -15
- package/src/icon/FontIcon.tsx +1 -1
- package/src/icon/IconRotator.tsx +1 -1
- package/src/icon/MaterialIcon.tsx +2 -2
- package/src/icon/MaterialSymbol.tsx +3 -4
- package/src/icon/SVGIcon.tsx +0 -1
- package/src/icon/TextIconSpacing.tsx +3 -5
- package/src/icon/iconConfig.tsx +14 -16
- package/src/icon/material.ts +4 -4
- package/src/icon/materialConfig.ts +12 -12
- package/src/icon/styles.ts +8 -8
- package/src/interaction/UserInteractionModeProvider.tsx +1 -2
- package/src/interaction/config.ts +2 -2
- package/src/interaction/types.ts +8 -8
- package/src/interaction/useElementInteraction.tsx +6 -7
- package/src/interaction/useHigherContrastChildren.tsx +2 -3
- package/src/layout/LayoutAppBar.tsx +4 -7
- package/src/layout/LayoutNav.tsx +4 -6
- package/src/layout/LayoutWindowSplitter.tsx +3 -4
- package/src/layout/Main.tsx +4 -5
- package/src/layout/__tests__/LayoutAppBar.tsx +23 -0
- package/src/layout/__tests__/useExpandableLayout.tsx +8 -0
- package/src/layout/_layout.scss +12 -1
- package/src/layout/layoutNavStyles.ts +2 -2
- package/src/layout/layoutWindowSplitterStyles.ts +2 -2
- package/src/layout/mainStyles.ts +2 -2
- package/src/layout/useExpandableLayout.ts +85 -23
- package/src/layout/useHorizontalLayoutTransition.ts +8 -8
- package/src/layout/useLayoutAppBarHeight.ts +10 -13
- package/src/layout/useLayoutTree.ts +10 -10
- package/src/layout/useLayoutWindowSplitter.ts +5 -6
- package/src/layout/useMainTabIndex.ts +1 -1
- package/src/layout/useResizableLayout.ts +54 -8
- package/src/layout/useTemporaryLayout.ts +12 -13
- package/src/link/Link.tsx +10 -13
- package/src/link/SkipToMainContent.tsx +2 -4
- package/src/link/styles.ts +4 -4
- package/src/list/List.tsx +3 -4
- package/src/list/ListItem.tsx +4 -6
- package/src/list/ListItemChildren.tsx +1 -2
- package/src/list/ListSubheader.tsx +3 -3
- package/src/list/getListItemHeight.ts +1 -1
- package/src/list/listItemStyles.ts +9 -9
- package/src/list/types.ts +11 -11
- package/src/media-queries/AppSizeProvider.tsx +1 -2
- package/src/media-queries/useMediaQuery.ts +2 -3
- package/src/menu/DropdownMenu.tsx +7 -11
- package/src/menu/Menu.tsx +10 -13
- package/src/menu/MenuBar.tsx +3 -4
- package/src/menu/MenuButton.tsx +8 -8
- package/src/menu/MenuConfigurationProvider.tsx +10 -10
- package/src/menu/MenuItem.tsx +2 -2
- package/src/menu/MenuItemButton.tsx +2 -2
- package/src/menu/MenuItemCircularProgress.tsx +3 -4
- package/src/menu/MenuItemGroup.tsx +3 -4
- package/src/menu/MenuItemSeparator.tsx +2 -2
- package/src/menu/MenuSheet.tsx +7 -9
- package/src/menu/MenuVisibilityProvider.tsx +8 -10
- package/src/menu/MenuWidget.tsx +2 -2
- package/src/menu/MenuWidgetKeyboardProvider.tsx +2 -2
- package/src/menu/useContextMenu.ts +8 -12
- package/src/menu/useMenuBarProvider.ts +6 -6
- package/src/menu/utils.ts +2 -2
- package/src/movement/constants.ts +3 -3
- package/src/movement/types.ts +16 -17
- package/src/movement/useKeyboardMovementProvider.ts +6 -9
- package/src/movement/utils.ts +13 -13
- package/src/navigation/CollapsibleNavGroup.tsx +94 -0
- package/src/navigation/DefaultNavigationRenderer.tsx +71 -0
- package/src/navigation/NavGroup.tsx +39 -0
- package/src/navigation/NavItem.tsx +29 -0
- package/src/navigation/NavItemButton.tsx +104 -0
- package/src/navigation/NavItemLink.tsx +163 -0
- package/src/navigation/NavSubheader.tsx +36 -0
- package/src/navigation/Navigation.tsx +91 -0
- package/src/navigation/__tests__/Navigation.tsx +97 -0
- package/src/navigation/__tests__/__snapshots__/Navigation.tsx.snap +165 -0
- package/src/navigation/_navigation.scss +99 -0
- package/src/navigation/getHrefFromParents.ts +15 -0
- package/src/navigation/navGroupStyles.ts +21 -0
- package/src/navigation/navItemStyles.ts +71 -0
- package/src/navigation/types.ts +166 -0
- package/src/navigation/useActiveHeadingId.ts +190 -0
- package/src/overlay/Overlay.tsx +5 -6
- package/src/overlay/overlayStyles.ts +4 -4
- package/src/portal/Portal.tsx +1 -2
- package/src/portal/PortalContainerProvider.tsx +4 -4
- package/src/positioning/createVerticalPosition.ts +1 -1
- package/src/positioning/getFixedPosition.ts +1 -1
- package/src/positioning/types.ts +4 -4
- package/src/positioning/useFixedPositioning.ts +8 -9
- package/src/positioning/utils.ts +3 -3
- package/src/progress/CircularProgress.tsx +7 -10
- package/src/progress/LinearProgress.tsx +4 -6
- package/src/progress/types.ts +5 -5
- package/src/responsive-item/ResponsiveItemContainer.tsx +10 -15
- package/src/responsive-item/ResponsiveItemOverlay.tsx +6 -7
- package/src/responsive-item/styles.ts +2 -2
- package/src/scroll/ScrollLock.tsx +1 -1
- package/src/scroll/useScrollLock.ts +2 -3
- package/src/searching/caseInsensitive.ts +9 -13
- package/src/searching/fuzzy.ts +4 -5
- package/src/searching/toSearchQuery.ts +1 -1
- package/src/searching/types.ts +2 -2
- package/src/searching/useFuzzyMatch.ts +3 -3
- package/src/searching/utils.ts +3 -3
- package/src/segmented-button/SegmentedButton.tsx +3 -4
- package/src/segmented-button/SegmentedButtonContainer.tsx +3 -4
- package/src/segmented-button/segmentedButtonContainerStyles.ts +2 -2
- package/src/segmented-button/segmentedButtonStyles.ts +2 -2
- package/src/sheet/Sheet.tsx +1 -1
- package/src/sheet/styles.ts +3 -3
- package/src/snackbar/DefaultToastRenderer.tsx +2 -2
- package/src/snackbar/Snackbar.tsx +3 -4
- package/src/snackbar/Toast.tsx +3 -3
- package/src/snackbar/ToastActionButton.tsx +2 -2
- package/src/snackbar/ToastCloseButton.tsx +2 -2
- package/src/snackbar/ToastContent.tsx +2 -2
- package/src/snackbar/ToastManager.tsx +30 -24
- package/src/snackbar/ToastManagerProvider.tsx +6 -6
- package/src/snackbar/__tests__/ToastManagerProvider.tsx +34 -0
- package/src/snackbar/__tests__/__snapshots__/ToastManagerProvider.tsx.snap +21 -21
- package/src/snackbar/snackbarStyles.ts +4 -5
- package/src/snackbar/toastContentStyles.ts +2 -2
- package/src/snackbar/toastStyles.ts +2 -2
- package/src/snackbar/useCurrentToastActions.ts +3 -3
- package/src/suspense/CircularProgressSuspense.tsx +3 -4
- package/src/suspense/NullSuspense.tsx +3 -4
- package/src/table/Table.tsx +1 -2
- package/src/table/TableCell.tsx +7 -7
- package/src/table/TableCellContent.tsx +3 -3
- package/src/table/TableCheckbox.tsx +11 -15
- package/src/table/TableContainerProvider.tsx +3 -3
- package/src/table/TableFooter.tsx +2 -2
- package/src/table/TableHeader.tsx +2 -2
- package/src/table/TableRadio.tsx +7 -9
- package/src/table/tableCellStyles.ts +2 -2
- package/src/table/tableContainerStyles.ts +2 -2
- package/src/table/tableFooterStyles.ts +1 -1
- package/src/table/tableHeaderStyles.ts +2 -2
- package/src/table/tableRowStyles.ts +2 -2
- package/src/table/tableStyles.ts +2 -2
- package/src/table/types.ts +7 -9
- package/src/tabs/Tab.tsx +4 -4
- package/src/tabs/TabList.tsx +2 -2
- package/src/tabs/TabListScrollButton.tsx +3 -3
- package/src/tabs/tabIndicatorStyles.ts +2 -2
- package/src/tabs/tabListScrollButtonStyles.ts +4 -4
- package/src/tabs/tabListStyles.ts +2 -2
- package/src/tabs/tabStyles.ts +2 -2
- package/src/tabs/useTabs.ts +16 -21
- package/src/tabs/utils.ts +3 -3
- package/src/test-utils/ResizeObserver.ts +9 -11
- package/src/test-utils/matchMedia.ts +13 -17
- package/src/test-utils/render.tsx +2 -2
- package/src/test-utils/timers.ts +2 -3
- package/src/theme/LocalStorageColorSchemeProvider.tsx +2 -2
- package/src/theme/ThemeProvider.tsx +18 -21
- package/src/theme/types.ts +3 -3
- package/src/theme/useCSSVariables.ts +8 -10
- package/src/theme/useColorScheme.ts +6 -7
- package/src/theme/useColorSchemeMetaTag.ts +2 -2
- package/src/theme/useColorSchemeProvider.ts +2 -2
- package/src/theme/usePrefersColorScheme.ts +1 -1
- package/src/theme/utils.ts +1 -1
- package/src/tooltip/Tooltip.tsx +3 -5
- package/src/tooltip/TooltipHoverModeProvider.tsx +5 -6
- package/src/tooltip/constants.ts +9 -9
- package/src/tooltip/tooltipStyles.ts +2 -2
- package/src/tooltip/useTooltip.ts +18 -26
- package/src/tooltip/useTooltipPosition.ts +4 -4
- package/src/transition/CSSTransition.tsx +3 -4
- package/src/transition/Collapse.tsx +5 -8
- package/src/transition/CrossFade.tsx +5 -8
- package/src/transition/ScaleTransition.tsx +7 -10
- package/src/transition/SkeletonPlaceholder.tsx +4 -6
- package/src/transition/Slide.tsx +2 -2
- package/src/transition/SlideContainer.tsx +9 -13
- package/src/transition/collapseStyles.ts +2 -2
- package/src/transition/config.ts +2 -2
- package/src/transition/skeletonPlaceholderUtils.ts +3 -3
- package/src/transition/types.ts +34 -37
- package/src/transition/useCSSTransition.ts +4 -7
- package/src/transition/useCarousel.ts +6 -7
- package/src/transition/useCollapseTransition.ts +10 -13
- package/src/transition/useCrossFadeTransition.ts +5 -6
- package/src/transition/useMaxWidthTransition.ts +2 -2
- package/src/transition/useScaleTransition.ts +8 -11
- package/src/transition/useSkeletonPlaceholder.ts +6 -10
- package/src/transition/useSlideTransition.ts +5 -6
- package/src/transition/useTransition.ts +1 -1
- package/src/transition/utils.ts +6 -6
- package/src/tree/DefaultTreeItemRenderer.tsx +1 -1
- package/src/tree/Tree.tsx +8 -12
- package/src/tree/TreeGroup.tsx +3 -3
- package/src/tree/TreeItem.tsx +3 -4
- package/src/tree/TreeItemExpander.tsx +2 -2
- package/src/tree/TreeProvider.tsx +6 -6
- package/src/tree/styles.ts +10 -10
- package/src/tree/types.ts +6 -7
- package/src/tree/useTree.ts +4 -5
- package/src/tree/useTreeExpansion.ts +2 -2
- package/src/tree/useTreeItems.ts +7 -7
- package/src/tree/useTreeMovement.ts +5 -5
- package/src/tree/useTreeSelection.ts +2 -2
- package/src/tree/utils.ts +2 -2
- package/src/types.ts +14 -16
- package/src/typography/SrOnly.tsx +1 -2
- package/src/typography/TextContainer.tsx +3 -4
- package/src/typography/Typography.tsx +3 -4
- package/src/typography/WritingDirectionProvider.tsx +10 -13
- package/src/typography/textContainerStyles.ts +3 -4
- package/src/typography/typographyStyles.ts +6 -8
- package/src/useAsyncAction.ts +7 -9
- package/src/useDebouncedFunction.ts +3 -4
- package/src/useDropzone.ts +9 -14
- package/src/useElementSize.ts +31 -6
- package/src/useEnsuredId.ts +2 -3
- package/src/useEnsuredRef.ts +3 -4
- package/src/useEnsuredState.ts +2 -2
- package/src/useHtmlClassName.ts +1 -1
- package/src/useIntersectionObserver.ts +13 -20
- package/src/useLocalStorage.ts +17 -22
- package/src/usePageInactive.ts +3 -3
- package/src/useResizeListener.ts +3 -4
- package/src/useResizeObserver.ts +8 -10
- package/src/useThrottledFunction.ts +3 -4
- package/src/useToggle.ts +2 -3
- package/src/useUnmounted.ts +2 -3
- package/src/useWindowSize.ts +3 -4
- package/src/utils/RenderRecursively.tsx +42 -9
- package/src/utils/__tests__/RenderRecursively.tsx +1 -1
- package/src/utils/alphaNumericSort.ts +6 -11
- package/src/utils/applyRef.ts +1 -2
- package/src/utils/bem.ts +2 -3
- package/src/utils/getClientPosition.ts +4 -4
- package/src/utils/getMiddleOfRange.ts +2 -2
- package/src/utils/getPercentage.ts +3 -4
- package/src/utils/getRangeDefaultValue.ts +2 -2
- package/src/utils/getRangeSteps.ts +3 -4
- package/src/utils/identity.ts +1 -1
- package/src/utils/isElementVisible.ts +3 -4
- package/src/utils/loop.ts +2 -2
- package/src/utils/nearest.ts +3 -4
- package/src/utils/parseCssLengthUnit.ts +2 -4
- package/src/utils/randomInt.ts +2 -2
- package/src/utils/wait.ts +2 -3
- package/src/utils/withinRange.ts +3 -4
- package/src/window-splitter/WindowSplitter.tsx +5 -5
- package/src/window-splitter/useWindowSplitter.ts +6 -7
- package/tsdoc.json +14 -0
- package/.turbo/turbo-lint.log +0 -12
- package/.turbo/turbo-typecheck.log +0 -4
- package/dist/index.d.ts +0 -346
- package/dist/index.js +0 -347
- package/dist/index.js.map +0 -1
- package/src/index.ts +0 -349
|
@@ -53,7 +53,7 @@ function _define_property(obj, key, value) {
|
|
|
53
53
|
}
|
|
54
54
|
import { nanoid } from "nanoid";
|
|
55
55
|
/**
|
|
56
|
-
* @
|
|
56
|
+
* @since 6.0.0
|
|
57
57
|
*/ export const DEFAULT_TOAST_VISIBLE_TIME = 5000;
|
|
58
58
|
var _queue = /*#__PURE__*/ new WeakMap(), _timers = /*#__PURE__*/ new WeakMap(), _listeners = /*#__PURE__*/ new WeakMap(), _emit = /*#__PURE__*/ new WeakMap(), _getToastIndex = /*#__PURE__*/ new WeakMap(), _getToast = /*#__PURE__*/ new WeakMap(), /**
|
|
59
59
|
* Starts the exit transition for the currently shown toast and adds the next
|
|
@@ -65,7 +65,7 @@ var _queue = /*#__PURE__*/ new WeakMap(), _timers = /*#__PURE__*/ new WeakMap(),
|
|
|
65
65
|
/**
|
|
66
66
|
* @see {@link ToastManagerProvider}
|
|
67
67
|
*
|
|
68
|
-
* @
|
|
68
|
+
* @since 6.0.0
|
|
69
69
|
*/ export class ToastManager {
|
|
70
70
|
constructor(){
|
|
71
71
|
_class_private_field_init(this, _queue, {
|
|
@@ -165,8 +165,7 @@ var _queue = /*#__PURE__*/ new WeakMap(), _timers = /*#__PURE__*/ new WeakMap(),
|
|
|
165
165
|
* Either adds the toast to the queue or updates an existing toast when using
|
|
166
166
|
* an existing `toastId`.
|
|
167
167
|
*
|
|
168
|
-
* @example
|
|
169
|
-
* Adding toasts
|
|
168
|
+
* @example Adding toasts
|
|
170
169
|
* ```tsx
|
|
171
170
|
* // create a toast when the user is offline that will not disappear
|
|
172
171
|
* addToast({ toastId: "offline", visibleTime: null });
|
|
@@ -225,25 +224,23 @@ var _queue = /*#__PURE__*/ new WeakMap(), _timers = /*#__PURE__*/ new WeakMap(),
|
|
|
225
224
|
const existingIndex = _class_private_field_get(this, _getToastIndex).call(this, toast.toastId);
|
|
226
225
|
if (existingIndex !== -1 && duplicates !== "allow") {
|
|
227
226
|
const existingToast = _class_private_field_get(this, _queue)[existingIndex];
|
|
227
|
+
const nextToast = {
|
|
228
|
+
...existingToast,
|
|
229
|
+
...toast
|
|
230
|
+
};
|
|
228
231
|
// reorder/move the existing toast to be the next item in the queue by:
|
|
229
232
|
// - removing the toast from the queue
|
|
230
233
|
// - inserting it into the next position with the updates
|
|
231
234
|
if (priority === "next" && existingIndex > 1) {
|
|
232
235
|
_class_private_field_get(this, _queue).splice(existingIndex, 1);
|
|
233
|
-
_class_private_field_get(this, _queue).splice(1, 0,
|
|
234
|
-
...existingToast,
|
|
235
|
-
...toast
|
|
236
|
-
});
|
|
236
|
+
_class_private_field_get(this, _queue).splice(1, 0, nextToast);
|
|
237
237
|
_class_private_field_get(this, _emit).call(this);
|
|
238
238
|
return;
|
|
239
239
|
}
|
|
240
240
|
// only need to reorder the queue if it is not being shown
|
|
241
241
|
if ((priority === "replace" || priority === "immediate") && existingIndex !== 0) {
|
|
242
242
|
_class_private_field_get(this, _queue).splice(existingIndex, 1);
|
|
243
|
-
_class_private_field_get(this, _addToastImmediately).call(this,
|
|
244
|
-
...existingToast,
|
|
245
|
-
...toast
|
|
246
|
-
});
|
|
243
|
+
_class_private_field_get(this, _addToastImmediately).call(this, nextToast);
|
|
247
244
|
_class_private_field_get(this, _emit).call(this);
|
|
248
245
|
return;
|
|
249
246
|
}
|
|
@@ -253,7 +250,11 @@ var _queue = /*#__PURE__*/ new WeakMap(), _timers = /*#__PURE__*/ new WeakMap(),
|
|
|
253
250
|
...timers,
|
|
254
251
|
elapsedTime: 0
|
|
255
252
|
});
|
|
256
|
-
this
|
|
253
|
+
// wait for the next resume event instead. this _should_ only happen
|
|
254
|
+
// when hovering a toast and another toast replaces it
|
|
255
|
+
if (!nextToast.paused) {
|
|
256
|
+
this.startRemoveTimeout(toastId);
|
|
257
|
+
}
|
|
257
258
|
}
|
|
258
259
|
_class_private_field_get(this, _updateToast).call(this, existingIndex, toast);
|
|
259
260
|
return;
|
|
@@ -345,6 +346,7 @@ var _queue = /*#__PURE__*/ new WeakMap(), _timers = /*#__PURE__*/ new WeakMap(),
|
|
|
345
346
|
if (toastIndex === -1 || !timers?.startTime) {
|
|
346
347
|
return;
|
|
347
348
|
}
|
|
349
|
+
timers.startTime = Date.now();
|
|
348
350
|
_class_private_field_get(this, _updateToast).call(this, toastIndex, {
|
|
349
351
|
paused: false
|
|
350
352
|
});
|
|
@@ -434,27 +436,27 @@ var _queue = /*#__PURE__*/ new WeakMap(), _timers = /*#__PURE__*/ new WeakMap(),
|
|
|
434
436
|
* added without setting up the {@link ToastManagerProvider}.
|
|
435
437
|
*
|
|
436
438
|
* @internal
|
|
437
|
-
* @
|
|
439
|
+
* @since 6.0.0
|
|
438
440
|
*/ export const toastManager = new ToastManager();
|
|
439
441
|
/**
|
|
440
442
|
* @see {@link ToastManager.addToast}
|
|
441
|
-
* @
|
|
443
|
+
* @since 6.0.0
|
|
442
444
|
*/ export const addToast = (toast)=>toastManager.addToast(toast);
|
|
443
445
|
/**
|
|
444
446
|
* @see {@link ToastManager.startRemoveTimeout}
|
|
445
|
-
* @
|
|
447
|
+
* @since 6.0.0
|
|
446
448
|
*/ export const startRemoveToastTimeout = (toastId)=>toastManager.startRemoveTimeout(toastId);
|
|
447
449
|
/**
|
|
448
450
|
* @see {@link ToastManager.popToast}
|
|
449
|
-
* @
|
|
451
|
+
* @since 6.0.0
|
|
450
452
|
*/ export const popToast = ()=>toastManager.popToast();
|
|
451
453
|
/**
|
|
452
454
|
* @see {@link ToastManager.removeToast}
|
|
453
|
-
* @
|
|
455
|
+
* @since 6.0.0
|
|
454
456
|
*/ export const removeToast = (toastId, transition)=>toastManager.removeToast(toastId, transition);
|
|
455
457
|
/**
|
|
456
458
|
* @see {@link ToastManager.clearToasts}
|
|
457
|
-
* @
|
|
459
|
+
* @since 6.0.0
|
|
458
460
|
*/ export const clearToasts = ()=>toastManager.clearToasts();
|
|
459
461
|
|
|
460
462
|
//# sourceMappingURL=ToastManager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/snackbar/ToastManager.tsx"],"sourcesContent":["import { nanoid } from \"nanoid\";\nimport { type ConfigurableToastProps } from \"./Toast.js\";\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport const DEFAULT_TOAST_VISIBLE_TIME = 5000;\n\n/**\n * - `\"normal\"` - the toast will be added to the end of the queue\n * - `\"next\"` - the toast will be inserted next-in-line in the queue, waiting\n * for the current visible toast to exit before being shown. If the toast does\n * not support duplicates, the existing toast will be moved instead and merged\n * with the toast.\n * - `\"replace\"` - if there is a currently visible toast, it will start the\n * leave transition and display the newly added toast instead.\n * - `\"immediate\"` - the same behavior as `\"replace\"` except that if there was a\n * currently visible toast, the toast will be shown again once the `\"immediate\"`\n * toast is hidden.\n *\n * @remarks \\@since 6.0.0 Renamed from `MessagePriority` to `ToastPriority`\n */\nexport type ToastPriority = \"normal\" | \"next\" | \"replace\" | \"immediate\";\n\n/**\n * - `\"allow\"` - toasts with the same `toastId` can be added into the queue, but\n * the leave timeout behavior might not work if multiple toasts can be shown\n * at the same time.\n * - `\"restart\"` - (default) toasts that have the same `toastId` as a toast\n * being shown will restart the exit timeout and update the toast with any\n * differences in the toast. If the toast is not currently being shown, a new\n * toast will not be added.\n * - `\"update\"` - toasts that have the same `toastId` will just update the toast\n * with the latest content while maintaining any existing timeouts\n *\n * @remarks \\@since 6.0.0 Renamed from `DuplicateBehavior`\n */\nexport type ToastDuplicateBehavior = \"allow\" | \"restart\" | \"update\";\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface ToastMeta {\n /**\n * This will be `true` if the exit timeout has been paused either by hovering\n * the toast or the page has become inactive through blur or minimizing.\n */\n paused: boolean;\n\n /**\n * This will be `true` when the toast should be visible and `false` during the\n * exit animation.\n */\n visible: boolean;\n\n /**\n * The current toast's id which can be used with the:\n * - {@link ToastManager.removeToast}\n * - {@link ToastManager.startRemoveTimeout}\n * - {@link ToastManager.pauseRemoveTimeout}\n * - {@link ToastManager.resumeRemoveTimeout}\n */\n toastId: string;\n priority: ToastPriority;\n duplicates: ToastDuplicateBehavior;\n visibleTime: number | null;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface CreateToastOptions extends ConfigurableToastProps {\n /**\n * @defaultValue `nanoid()`\n */\n toastId?: string;\n\n /**\n * @see {@link ToastDuplicateBehavior}\n * @defaultValue `\"restart\"`\n */\n duplicates?: ToastDuplicateBehavior;\n\n /**\n * @see {@link ToastPriority}\n * @defaultValue `\"normal\"`\n */\n priority?: ToastPriority;\n\n /**\n * Set this to `null` to prevent the toast from automatically hiding,\n * otherwise set this to the number of milliseconds to remain visible.\n *\n * @see {@link DEFAULT_TOAST_VISIBLE_TIME}\n * @defaultValue `DEFAULT_TOAST_VISIBLE_TIME`\n */\n visibleTime?: number | null;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface QueuedToast extends ConfigurableToastProps, ToastMeta {}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport type ToastQueue = readonly Readonly<QueuedToast>[];\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport type ToastCallback = (queue: ToastQueue) => void;\n\n/**\n * @internal\n * @remarks \\@since 6.0.0\n */\nexport interface ToastVisibilityTimers {\n inactive: boolean;\n startTime: number;\n elapsedTime: number;\n exitTimeout?: number;\n}\n\n/**\n * @see {@link ToastManagerProvider}\n *\n * @remarks \\@since 6.0.0\n */\nexport class ToastManager {\n #queue: QueuedToast[];\n #timers: Map<string, ToastVisibilityTimers>;\n #listeners: ToastCallback[];\n\n constructor() {\n this.#queue = [];\n this.#timers = new Map();\n this.#listeners = [];\n\n // All of the class methods must be arrow functions to preserve the correct\n // `this` value. If they aren't arrow functions, I'd have to wrap each call\n // in an arrow function to work.\n //\n // i.e.\n // useSyncExternalStore(\n // (cb) => manager.subscribe(cb),\n // () => manager.getQueue(),\n // () => manager.getQueue(),\n // );\n }\n\n #emit = (): void => {\n // shallow clone to ensure react updates\n this.#queue = [...this.#queue];\n this.#listeners.forEach((callback) => {\n callback(this.#queue);\n });\n };\n\n #getToastIndex = (toastId: string | undefined): number => {\n if (!toastId) {\n return -1;\n }\n\n return this.#queue.findIndex((toast) => toast.toastId === toastId);\n };\n\n #getToast = (toastId: string | undefined): QueuedToast | undefined => {\n return this.#queue[this.#getToastIndex(toastId)];\n };\n\n /**\n * Starts the exit transition for the currently shown toast and adds the next\n * toast into the queue. This requires a manual call to `this.#emit()`\n * afterwards.\n */\n #addToastImmediately = (nextToast: QueuedToast): void => {\n const [current] = this.#queue;\n this.clearTimer(current.toastId);\n this.#queue[0] = {\n ...current,\n visible: false,\n };\n if (nextToast.priority === \"immediate\") {\n this.#queue.splice(1, 0, nextToast, current);\n } else {\n this.#queue.splice(1, 0, nextToast);\n }\n };\n\n /**\n * This calls `this.#emit()` if the toast was updated\n */\n #updateToast = (\n toastIdOrIndex: string | number,\n patch: Partial<QueuedToast>\n ): void => {\n const index =\n typeof toastIdOrIndex === \"number\"\n ? toastIdOrIndex\n : this.#getToastIndex(toastIdOrIndex);\n\n if (index === -1) {\n return;\n }\n\n this.#queue[index] = {\n ...this.#queue[index],\n ...patch,\n };\n this.#emit();\n };\n\n /**\n * This is just used to subscribe to changes in the {@link useToastQueue}.\n *\n * ```tsx\n * useSyncExternalStore(\n * toastManager.subscribe,\n * toastManager.getQueue,\n * toastManager.getQueue,\n * );\n * ```\n *\n * @internal\n */\n subscribe = (callback: ToastCallback): (() => void) => {\n this.#listeners.push(callback);\n\n return () => {\n this.#listeners = this.#listeners.filter((cb) => cb !== callback);\n };\n };\n\n /**\n * @see {@link subscribe}\n * @internal\n */\n getQueue = (): ToastQueue => {\n return this.#queue;\n };\n\n /**\n * Either adds the toast to the queue or updates an existing toast when using\n * an existing `toastId`.\n *\n * @example\n * Adding toasts\n * ```tsx\n * // create a toast when the user is offline that will not disappear\n * addToast({ toastId: \"offline\", visibleTime: null });\n *\n * // add a new toast that displays `\"Toast\"` to the queue\n * addToast({ children: \"Toast!\" });\n *\n * // add an online toast notification. since these three use the same toast\n * // id, the hide timer will be reset each time\n * addToast({ toastId: \"online\" });\n * addToast({ toastId: \"online\" });\n * addToast({ toastId: \"online\" });\n *\n * // add a server error toast to the queue where the second one will be\n * // ignored\n * addToast({\n * toastId: \"ServerError\",\n * theme: \"error\",\n * duplicates: \"prevent\",\n * });\n * addToast({\n * toastId: \"ServerError\",\n * theme: \"error\",\n * duplicates: \"prevent\",\n * });\n *\n * // add a toast to the queue that has an action button that says \"Goodbye\"\n * addToast({\n * children: \"Hello, world!\",\n * action: \"Goodbye\",\n * });\n *\n * // add a toast to the queue that has an action button that says \"Goodbye\"\n * // and a custom click handler\n * addToast({\n * children: \"Hello, world!\",\n * action: {\n * onClick: () => {\n * logout();\n * },\n * children: \"Goodbye\",\n * },\n * });\n *\n * // add a toast to the queue that renders a react component in the content,\n * // a custom action button implementation (using `ToastActionButton`), and a\n * // close button\n * addToast({\n * children: <SomeCustomComponent />,\n * actionButton: <SomeCustomActionButton />,\n * closeButton: true,\n * });\n * ```\n */\n addToast = (toast: CreateToastOptions): void => {\n const {\n toastId = nanoid(),\n visibleTime = DEFAULT_TOAST_VISIBLE_TIME,\n role = visibleTime === null ? \"alert\" : \"status\",\n priority = \"normal\",\n duplicates = \"restart\",\n } = toast;\n\n const existingIndex = this.#getToastIndex(toast.toastId);\n if (existingIndex !== -1 && duplicates !== \"allow\") {\n const existingToast = this.#queue[existingIndex];\n\n // reorder/move the existing toast to be the next item in the queue by:\n // - removing the toast from the queue\n // - inserting it into the next position with the updates\n if (priority === \"next\" && existingIndex > 1) {\n this.#queue.splice(existingIndex, 1);\n this.#queue.splice(1, 0, { ...existingToast, ...toast });\n this.#emit();\n return;\n }\n\n // only need to reorder the queue if it is not being shown\n if (\n (priority === \"replace\" || priority === \"immediate\") &&\n existingIndex !== 0\n ) {\n this.#queue.splice(existingIndex, 1);\n this.#addToastImmediately({\n ...existingToast,\n ...toast,\n });\n this.#emit();\n return;\n }\n\n const timers = this.#timers.get(toastId);\n if (existingToast.visible && duplicates === \"restart\" && timers) {\n this.#timers.set(toastId, { ...timers, elapsedTime: 0 });\n this.startRemoveTimeout(toastId);\n }\n\n this.#updateToast(existingIndex, toast);\n return;\n }\n\n const nextToast: QueuedToast = {\n ...toast,\n role,\n paused: false,\n visible: true,\n toastId,\n priority,\n duplicates,\n visibleTime,\n };\n\n const queueSize = this.#queue.length;\n if (priority === \"next\" && queueSize > 1) {\n this.#queue.splice(1, 0, nextToast);\n } else if (\n (priority === \"replace\" || priority === \"immediate\") &&\n queueSize > 0\n ) {\n this.#addToastImmediately(nextToast);\n } else {\n this.#queue.push(nextToast);\n }\n\n this.#emit();\n };\n\n /**\n * Attempts to start the timeout for removing the toast when the `visibleTime`\n * is not null for a toast.\n *\n * @param toastId - The specific toastId to update\n */\n startRemoveTimeout = (toastId: string): void => {\n const toast = this.#getToast(toastId);\n if (!toast) {\n return;\n }\n\n const { visibleTime } = toast;\n if (visibleTime === null) {\n // Must manually be closed\n return;\n }\n\n const cached = this.#timers.get(toastId);\n const timers = (cached && { ...cached }) || {\n inactive: false,\n startTime: Date.now(),\n elapsedTime: 0,\n };\n window.clearTimeout(timers.exitTimeout);\n\n let duration = visibleTime;\n if (timers.elapsedTime) {\n duration -= timers.elapsedTime;\n }\n\n timers.inactive = false;\n timers.exitTimeout = window.setTimeout(() => {\n this.removeToast(toastId, true);\n }, duration);\n this.#timers.set(toastId, timers);\n };\n\n /**\n * Pauses the remove timeout for a specific toast normally with hover events\n * or the browser becoming inactive.\n *\n * @param toastId - The specific toastId to pause\n */\n pauseRemoveTimeout = (toastId: string): void => {\n const toast = this.#getToast(toastId);\n const cached = this.#timers.get(toastId);\n if (!toast || !cached || cached.inactive) {\n return;\n }\n\n window.clearTimeout(cached.exitTimeout);\n const timers = { ...cached };\n timers.inactive = true;\n timers.elapsedTime = Date.now() - timers.startTime + timers.elapsedTime;\n this.#timers.set(toastId, timers);\n this.#updateToast(toastId, { paused: true });\n };\n\n /**\n * Resumes the current remove timeout if it was paused by\n * {@link pauseRemoveTimeout}.\n *\n * @param toastId - The specific toastId to resume\n */\n resumeRemoveTimeout = (toastId: string): void => {\n const toastIndex = this.#getToastIndex(toastId);\n const timers = this.#timers.get(toastId);\n if (toastIndex === -1 || !timers?.startTime) {\n return;\n }\n\n this.#updateToast(toastIndex, { paused: false });\n this.startRemoveTimeout(toastId);\n };\n\n /**\n * Removes a toast by id from the queue without any exit animation.\n *\n * @param toastId - The specific {@link QueuedToast.toastId}\n * @param transition - Set this to `true` to remove the toast by the exit\n * transition instead of immediately.\n */\n removeToast = (toastId: string, transition: boolean): void => {\n const toastIndex = this.#getToastIndex(toastId);\n if (toastIndex === -1) {\n return;\n }\n\n if (transition) {\n this.clearTimer(toastId);\n this.#updateToast(toastIndex, { visible: false });\n return;\n }\n\n this.#queue.splice(toastIndex, 1);\n this.#emit();\n };\n\n /**\n * Clears any pending timers for the provided toast id. This should generally\n * be used in the `useEffect` cleanup effect for any custom toast renderer\n * implementations.\n *\n * @example\n * ```tsx\n * const { toastId } = toast;\n * const toastManager = useToastManager();\n *\n * useEffect(() => {\n * return () => {\n * toastManager.clearTimer(toastId):\n * }\n * }, [toastManager, toastId]);\n * ```\n */\n clearTimer = (toastId: string): void => {\n const timer = this.#timers.get(toastId);\n window.clearTimeout(timer?.exitTimeout);\n this.#timers.delete(toastId);\n };\n\n /**\n * Removes first toast from the queue without any exit animation. You most\n * likely want to use {@link removeToast} instead.\n */\n popToast = (): void => {\n this.#queue.pop();\n this.#emit();\n };\n\n /**\n * Removes all toasts from the queue. There will be no exit animation.\n *\n * @param disableEmit - Set this to `true` to disable emitting the empty queue.\n * Mostly used for tests.\n */\n clearToasts = (disableEmit = false): void => {\n this.#queue = [];\n this.#timers.forEach((meta) => {\n window.clearTimeout(meta.exitTimeout);\n });\n this.#timers.clear();\n if (!disableEmit) {\n this.#emit();\n }\n };\n}\n\n/**\n * The default toast manager for react-md apps that will allow toasts to be\n * added without setting up the {@link ToastManagerProvider}.\n *\n * @internal\n * @remarks \\@since 6.0.0\n */\nexport const toastManager = new ToastManager();\n\n/**\n * @see {@link ToastManager.addToast}\n * @remarks \\@since 6.0.0\n */\nexport const addToast: ToastManager[\"addToast\"] = (toast) =>\n toastManager.addToast(toast);\n\n/**\n * @see {@link ToastManager.startRemoveTimeout}\n * @remarks \\@since 6.0.0\n */\nexport const startRemoveToastTimeout: ToastManager[\"startRemoveTimeout\"] = (\n toastId\n) => toastManager.startRemoveTimeout(toastId);\n\n/**\n * @see {@link ToastManager.popToast}\n * @remarks \\@since 6.0.0\n */\nexport const popToast: ToastManager[\"popToast\"] = () => toastManager.popToast();\n\n/**\n * @see {@link ToastManager.removeToast}\n * @remarks \\@since 6.0.0\n */\nexport const removeToast: ToastManager[\"removeToast\"] = (toastId, transition) =>\n toastManager.removeToast(toastId, transition);\n\n/**\n * @see {@link ToastManager.clearToasts}\n * @remarks \\@since 6.0.0\n */\nexport const clearToasts = (): void => toastManager.clearToasts();\n"],"names":["nanoid","DEFAULT_TOAST_VISIBLE_TIME","ToastManager","constructor","queue","listeners","forEach","callback","toastId","findIndex","toast","getToastIndex","nextToast","current","clearTimer","visible","priority","splice","toastIdOrIndex","patch","index","emit","subscribe","push","filter","cb","getQueue","addToast","visibleTime","role","duplicates","existingIndex","existingToast","addToastImmediately","timers","get","set","elapsedTime","startRemoveTimeout","updateToast","paused","queueSize","length","getToast","cached","inactive","startTime","Date","now","window","clearTimeout","exitTimeout","duration","setTimeout","removeToast","pauseRemoveTimeout","resumeRemoveTimeout","toastIndex","transition","timer","delete","popToast","pop","clearToasts","disableEmit","meta","clear","Map","toastManager","startRemoveToastTimeout"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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";\nimport { type ConfigurableToastProps } from \"./Toast.js\";\n\n/**\n * @since 6.0.0\n */\nexport const DEFAULT_TOAST_VISIBLE_TIME = 5000;\n\n/**\n * - `\"normal\"` - the toast will be added to the end of the queue\n * - `\"next\"` - the toast will be inserted next-in-line in the queue, waiting\n * for the current visible toast to exit before being shown. If the toast does\n * not support duplicates, the existing toast will be moved instead and merged\n * with the toast.\n * - `\"replace\"` - if there is a currently visible toast, it will start the\n * leave transition and display the newly added toast instead.\n * - `\"immediate\"` - the same behavior as `\"replace\"` except that if there was a\n * currently visible toast, the toast will be shown again once the `\"immediate\"`\n * toast is hidden.\n *\n * @since 6.0.0 Renamed from `MessagePriority` to `ToastPriority`\n */\nexport type ToastPriority = \"normal\" | \"next\" | \"replace\" | \"immediate\";\n\n/**\n * - `\"allow\"` - toasts with the same `toastId` can be added into the queue, but\n * the leave timeout behavior might not work if multiple toasts can be shown\n * at the same time.\n * - `\"restart\"` - (default) toasts that have the same `toastId` as a toast\n * being shown will restart the exit timeout and update the toast with any\n * differences in the toast. If the toast is not currently being shown, a new\n * toast will not be added.\n * - `\"update\"` - toasts that have the same `toastId` will just update the toast\n * with the latest content while maintaining any existing timeouts\n *\n * @since 6.0.0 Renamed from `DuplicateBehavior`\n */\nexport type ToastDuplicateBehavior = \"allow\" | \"restart\" | \"update\";\n\n/**\n * @since 6.0.0\n */\nexport interface ToastMeta {\n /**\n * This will be `true` if the exit timeout has been paused either by hovering\n * the toast or the page has become inactive through blur or minimizing.\n */\n paused: boolean;\n\n /**\n * This will be `true` when the toast should be visible and `false` during the\n * exit animation.\n */\n visible: boolean;\n\n /**\n * The current toast's id which can be used with the:\n * - {@link ToastManager.removeToast}\n * - {@link ToastManager.startRemoveTimeout}\n * - {@link ToastManager.pauseRemoveTimeout}\n * - {@link ToastManager.resumeRemoveTimeout}\n */\n toastId: string;\n priority: ToastPriority;\n duplicates: ToastDuplicateBehavior;\n visibleTime: number | null;\n}\n\n/**\n * @since 6.0.0\n */\nexport interface CreateToastOptions extends ConfigurableToastProps {\n /**\n * @defaultValue `nanoid()`\n */\n toastId?: string;\n\n /**\n * @see {@link ToastDuplicateBehavior}\n * @defaultValue `\"restart\"`\n */\n duplicates?: ToastDuplicateBehavior;\n\n /**\n * @see {@link ToastPriority}\n * @defaultValue `\"normal\"`\n */\n priority?: ToastPriority;\n\n /**\n * Set this to `null` to prevent the toast from automatically hiding,\n * otherwise set this to the number of milliseconds to remain visible.\n *\n * @see {@link DEFAULT_TOAST_VISIBLE_TIME}\n * @defaultValue `DEFAULT_TOAST_VISIBLE_TIME`\n */\n visibleTime?: number | null;\n}\n\n/**\n * @since 6.0.0\n */\nexport interface QueuedToast extends ConfigurableToastProps, ToastMeta {}\n\n/**\n * @since 6.0.0\n */\nexport type ToastQueue = readonly Readonly<QueuedToast>[];\n\n/**\n * @since 6.0.0\n */\nexport type ToastCallback = (queue: ToastQueue) => void;\n\n/**\n * @internal\n * @since 6.0.0\n */\nexport interface ToastVisibilityTimers {\n inactive: boolean;\n startTime: number;\n elapsedTime: number;\n exitTimeout?: number;\n}\n\n/**\n * @see {@link ToastManagerProvider}\n *\n * @since 6.0.0\n */\nexport class ToastManager {\n #queue: QueuedToast[];\n #timers: Map<string, ToastVisibilityTimers>;\n #listeners: ToastCallback[];\n\n constructor() {\n this.#queue = [];\n this.#timers = new Map();\n this.#listeners = [];\n\n // All of the class methods must be arrow functions to preserve the correct\n // `this` value. If they aren't arrow functions, I'd have to wrap each call\n // in an arrow function to work.\n //\n // i.e.\n // useSyncExternalStore(\n // (cb) => manager.subscribe(cb),\n // () => manager.getQueue(),\n // () => manager.getQueue(),\n // );\n }\n\n #emit = (): void => {\n // shallow clone to ensure react updates\n this.#queue = [...this.#queue];\n this.#listeners.forEach((callback) => {\n callback(this.#queue);\n });\n };\n\n #getToastIndex = (toastId: string | undefined): number => {\n if (!toastId) {\n return -1;\n }\n\n return this.#queue.findIndex((toast) => toast.toastId === toastId);\n };\n\n #getToast = (toastId: string | undefined): QueuedToast | undefined => {\n return this.#queue[this.#getToastIndex(toastId)];\n };\n\n /**\n * Starts the exit transition for the currently shown toast and adds the next\n * toast into the queue. This requires a manual call to `this.#emit()`\n * afterwards.\n */\n #addToastImmediately = (nextToast: QueuedToast): void => {\n const [current] = this.#queue;\n this.clearTimer(current.toastId);\n this.#queue[0] = {\n ...current,\n visible: false,\n };\n if (nextToast.priority === \"immediate\") {\n this.#queue.splice(1, 0, nextToast, current);\n } else {\n this.#queue.splice(1, 0, nextToast);\n }\n };\n\n /**\n * This calls `this.#emit()` if the toast was updated\n */\n #updateToast = (\n toastIdOrIndex: string | number,\n patch: Partial<QueuedToast>\n ): void => {\n const index =\n typeof toastIdOrIndex === \"number\"\n ? toastIdOrIndex\n : this.#getToastIndex(toastIdOrIndex);\n\n if (index === -1) {\n return;\n }\n\n this.#queue[index] = {\n ...this.#queue[index],\n ...patch,\n };\n this.#emit();\n };\n\n /**\n * This is just used to subscribe to changes in the {@link useToastQueue}.\n *\n * ```tsx\n * useSyncExternalStore(\n * toastManager.subscribe,\n * toastManager.getQueue,\n * toastManager.getQueue,\n * );\n * ```\n *\n * @internal\n */\n subscribe = (callback: ToastCallback): (() => void) => {\n this.#listeners.push(callback);\n\n return () => {\n this.#listeners = this.#listeners.filter((cb) => cb !== callback);\n };\n };\n\n /**\n * @see {@link subscribe}\n * @internal\n */\n getQueue = (): ToastQueue => {\n return this.#queue;\n };\n\n /**\n * Either adds the toast to the queue or updates an existing toast when using\n * an existing `toastId`.\n *\n * @example Adding toasts\n * ```tsx\n * // create a toast when the user is offline that will not disappear\n * addToast({ toastId: \"offline\", visibleTime: null });\n *\n * // add a new toast that displays `\"Toast\"` to the queue\n * addToast({ children: \"Toast!\" });\n *\n * // add an online toast notification. since these three use the same toast\n * // id, the hide timer will be reset each time\n * addToast({ toastId: \"online\" });\n * addToast({ toastId: \"online\" });\n * addToast({ toastId: \"online\" });\n *\n * // add a server error toast to the queue where the second one will be\n * // ignored\n * addToast({\n * toastId: \"ServerError\",\n * theme: \"error\",\n * duplicates: \"prevent\",\n * });\n * addToast({\n * toastId: \"ServerError\",\n * theme: \"error\",\n * duplicates: \"prevent\",\n * });\n *\n * // add a toast to the queue that has an action button that says \"Goodbye\"\n * addToast({\n * children: \"Hello, world!\",\n * action: \"Goodbye\",\n * });\n *\n * // add a toast to the queue that has an action button that says \"Goodbye\"\n * // and a custom click handler\n * addToast({\n * children: \"Hello, world!\",\n * action: {\n * onClick: () => {\n * logout();\n * },\n * children: \"Goodbye\",\n * },\n * });\n *\n * // add a toast to the queue that renders a react component in the content,\n * // a custom action button implementation (using `ToastActionButton`), and a\n * // close button\n * addToast({\n * children: <SomeCustomComponent />,\n * actionButton: <SomeCustomActionButton />,\n * closeButton: true,\n * });\n * ```\n */\n addToast = (toast: CreateToastOptions): void => {\n const {\n toastId = nanoid(),\n visibleTime = DEFAULT_TOAST_VISIBLE_TIME,\n role = visibleTime === null ? \"alert\" : \"status\",\n priority = \"normal\",\n duplicates = \"restart\",\n } = toast;\n\n const existingIndex = this.#getToastIndex(toast.toastId);\n if (existingIndex !== -1 && duplicates !== \"allow\") {\n const existingToast = this.#queue[existingIndex];\n const nextToast: QueuedToast = {\n ...existingToast,\n ...toast,\n };\n\n // reorder/move the existing toast to be the next item in the queue by:\n // - removing the toast from the queue\n // - inserting it into the next position with the updates\n if (priority === \"next\" && existingIndex > 1) {\n this.#queue.splice(existingIndex, 1);\n this.#queue.splice(1, 0, nextToast);\n this.#emit();\n return;\n }\n\n // only need to reorder the queue if it is not being shown\n if (\n (priority === \"replace\" || priority === \"immediate\") &&\n existingIndex !== 0\n ) {\n this.#queue.splice(existingIndex, 1);\n this.#addToastImmediately(nextToast);\n this.#emit();\n return;\n }\n\n const timers = this.#timers.get(toastId);\n if (existingToast.visible && duplicates === \"restart\" && timers) {\n this.#timers.set(toastId, { ...timers, elapsedTime: 0 });\n\n // wait for the next resume event instead. this _should_ only happen\n // when hovering a toast and another toast replaces it\n if (!nextToast.paused) {\n this.startRemoveTimeout(toastId);\n }\n }\n\n this.#updateToast(existingIndex, toast);\n return;\n }\n\n const nextToast: QueuedToast = {\n ...toast,\n role,\n paused: false,\n visible: true,\n toastId,\n priority,\n duplicates,\n visibleTime,\n };\n\n const queueSize = this.#queue.length;\n if (priority === \"next\" && queueSize > 1) {\n this.#queue.splice(1, 0, nextToast);\n } else if (\n (priority === \"replace\" || priority === \"immediate\") &&\n queueSize > 0\n ) {\n this.#addToastImmediately(nextToast);\n } else {\n this.#queue.push(nextToast);\n }\n\n this.#emit();\n };\n\n /**\n * Attempts to start the timeout for removing the toast when the `visibleTime`\n * is not null for a toast.\n *\n * @param toastId - The specific toastId to update\n */\n startRemoveTimeout = (toastId: string): void => {\n const toast = this.#getToast(toastId);\n if (!toast) {\n return;\n }\n\n const { visibleTime } = toast;\n if (visibleTime === null) {\n // Must manually be closed\n return;\n }\n\n const cached = this.#timers.get(toastId);\n const timers = (cached && { ...cached }) || {\n inactive: false,\n startTime: Date.now(),\n elapsedTime: 0,\n };\n window.clearTimeout(timers.exitTimeout);\n\n let duration = visibleTime;\n if (timers.elapsedTime) {\n duration -= timers.elapsedTime;\n }\n\n timers.inactive = false;\n timers.exitTimeout = window.setTimeout(() => {\n this.removeToast(toastId, true);\n }, duration);\n this.#timers.set(toastId, timers);\n };\n\n /**\n * Pauses the remove timeout for a specific toast normally with hover events\n * or the browser becoming inactive.\n *\n * @param toastId - The specific toastId to pause\n */\n pauseRemoveTimeout = (toastId: string): void => {\n const toast = this.#getToast(toastId);\n const cached = this.#timers.get(toastId);\n if (!toast || !cached || cached.inactive) {\n return;\n }\n\n window.clearTimeout(cached.exitTimeout);\n const timers = { ...cached };\n timers.inactive = true;\n timers.elapsedTime = Date.now() - timers.startTime + timers.elapsedTime;\n this.#timers.set(toastId, timers);\n this.#updateToast(toastId, { paused: true });\n };\n\n /**\n * Resumes the current remove timeout if it was paused by\n * {@link pauseRemoveTimeout}.\n *\n * @param toastId - The specific toastId to resume\n */\n resumeRemoveTimeout = (toastId: string): void => {\n const toastIndex = this.#getToastIndex(toastId);\n const timers = this.#timers.get(toastId);\n if (toastIndex === -1 || !timers?.startTime) {\n return;\n }\n\n timers.startTime = Date.now();\n this.#updateToast(toastIndex, { paused: false });\n this.startRemoveTimeout(toastId);\n };\n\n /**\n * Removes a toast by id from the queue without any exit animation.\n *\n * @param toastId - The specific {@link QueuedToast.toastId}\n * @param transition - Set this to `true` to remove the toast by the exit\n * transition instead of immediately.\n */\n removeToast = (toastId: string, transition: boolean): void => {\n const toastIndex = this.#getToastIndex(toastId);\n if (toastIndex === -1) {\n return;\n }\n\n if (transition) {\n this.clearTimer(toastId);\n this.#updateToast(toastIndex, { visible: false });\n return;\n }\n\n this.#queue.splice(toastIndex, 1);\n this.#emit();\n };\n\n /**\n * Clears any pending timers for the provided toast id. This should generally\n * be used in the `useEffect` cleanup effect for any custom toast renderer\n * implementations.\n *\n * @example\n * ```tsx\n * const { toastId } = toast;\n * const toastManager = useToastManager();\n *\n * useEffect(() => {\n * return () => {\n * toastManager.clearTimer(toastId):\n * }\n * }, [toastManager, toastId]);\n * ```\n */\n clearTimer = (toastId: string): void => {\n const timer = this.#timers.get(toastId);\n window.clearTimeout(timer?.exitTimeout);\n this.#timers.delete(toastId);\n };\n\n /**\n * Removes first toast from the queue without any exit animation. You most\n * likely want to use {@link removeToast} instead.\n */\n popToast = (): void => {\n this.#queue.pop();\n this.#emit();\n };\n\n /**\n * Removes all toasts from the queue. There will be no exit animation.\n *\n * @param disableEmit - Set this to `true` to disable emitting the empty queue.\n * Mostly used for tests.\n */\n clearToasts = (disableEmit = false): void => {\n this.#queue = [];\n this.#timers.forEach((meta) => {\n window.clearTimeout(meta.exitTimeout);\n });\n this.#timers.clear();\n if (!disableEmit) {\n this.#emit();\n }\n };\n}\n\n/**\n * The default toast manager for react-md apps that will allow toasts to be\n * added without setting up the {@link ToastManagerProvider}.\n *\n * @internal\n * @since 6.0.0\n */\nexport const toastManager = new ToastManager();\n\n/**\n * @see {@link ToastManager.addToast}\n * @since 6.0.0\n */\nexport const addToast: ToastManager[\"addToast\"] = (toast) =>\n toastManager.addToast(toast);\n\n/**\n * @see {@link ToastManager.startRemoveTimeout}\n * @since 6.0.0\n */\nexport const startRemoveToastTimeout: ToastManager[\"startRemoveTimeout\"] = (\n toastId\n) => toastManager.startRemoveTimeout(toastId);\n\n/**\n * @see {@link ToastManager.popToast}\n * @since 6.0.0\n */\nexport const popToast: ToastManager[\"popToast\"] = () => toastManager.popToast();\n\n/**\n * @see {@link ToastManager.removeToast}\n * @since 6.0.0\n */\nexport const removeToast: ToastManager[\"removeToast\"] = (toastId, transition) =>\n toastManager.removeToast(toastId, transition);\n\n/**\n * @see {@link ToastManager.clearToasts}\n * @since 6.0.0\n */\nexport const clearToasts = (): void => toastManager.clearToasts();\n"],"names":["nanoid","DEFAULT_TOAST_VISIBLE_TIME","ToastManager","constructor","queue","listeners","forEach","callback","toastId","findIndex","toast","getToastIndex","nextToast","current","clearTimer","visible","priority","splice","toastIdOrIndex","patch","index","emit","subscribe","push","filter","cb","getQueue","addToast","visibleTime","role","duplicates","existingIndex","existingToast","addToastImmediately","timers","get","set","elapsedTime","paused","startRemoveTimeout","updateToast","queueSize","length","getToast","cached","inactive","startTime","Date","now","window","clearTimeout","exitTimeout","duration","setTimeout","removeToast","pauseRemoveTimeout","resumeRemoveTimeout","toastIndex","transition","timer","delete","popToast","pop","clearToasts","disableEmit","meta","clear","Map","toastManager","startRemoveToastTimeout"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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GACD,OAAO,MAAMP,cAA2C,CAAC9C,SAASkD,aAChEU,aAAad,WAAW,CAAC9C,SAASkD,YAAY;AAEhD;;;CAGC,GACD,OAAO,MAAMK,cAAc,IAAYK,aAAaL,WAAW,GAAG"}
|
|
@@ -11,26 +11,26 @@ import { type ToastManager, type ToastQueue } from "./ToastManager.js";
|
|
|
11
11
|
*
|
|
12
12
|
* @returns The current `ToastManager` set in the `ToastManagerProvider`.
|
|
13
13
|
* Defaults to {@link toastManager} if there are no parent providers.
|
|
14
|
-
* @
|
|
14
|
+
* @since 6.0.0
|
|
15
15
|
*/
|
|
16
16
|
export declare function useToastManager(): ToastManager;
|
|
17
17
|
/**
|
|
18
18
|
* @see {@link ToastManager.addToast}
|
|
19
|
-
* @
|
|
19
|
+
* @since 6.0.0
|
|
20
20
|
*/
|
|
21
21
|
export declare function useAddToast(): ToastManager["addToast"];
|
|
22
22
|
/**
|
|
23
23
|
* @see {@link ToastManager.removeToast}
|
|
24
|
-
* @
|
|
24
|
+
* @since 6.0.0
|
|
25
25
|
*/
|
|
26
26
|
export declare function useRemoveToast(): ToastManager["removeToast"];
|
|
27
27
|
/**
|
|
28
28
|
* @param limit - the total number of toasts that can be visible at once.
|
|
29
|
-
* @
|
|
29
|
+
* @since 6.0.0
|
|
30
30
|
*/
|
|
31
31
|
export declare function useToastQueue(limit?: number): ToastQueue;
|
|
32
32
|
/**
|
|
33
|
-
* @
|
|
33
|
+
* @since 6.0.0
|
|
34
34
|
*/
|
|
35
35
|
export interface ToastManagerProviderProps {
|
|
36
36
|
children: ReactNode;
|
|
@@ -48,6 +48,6 @@ export interface ToastManagerProviderProps {
|
|
|
48
48
|
* implementation.
|
|
49
49
|
*
|
|
50
50
|
* @see {@link ToastManager} for example usage.
|
|
51
|
-
* @
|
|
51
|
+
* @since 6.0.0
|
|
52
52
|
*/
|
|
53
53
|
export declare function ToastManagerProvider(props: ToastManagerProviderProps): ReactElement;
|
|
@@ -16,25 +16,25 @@ const { Provider } = context;
|
|
|
16
16
|
*
|
|
17
17
|
* @returns The current `ToastManager` set in the `ToastManagerProvider`.
|
|
18
18
|
* Defaults to {@link toastManager} if there are no parent providers.
|
|
19
|
-
* @
|
|
19
|
+
* @since 6.0.0
|
|
20
20
|
*/ export function useToastManager() {
|
|
21
21
|
return useContext(context);
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* @see {@link ToastManager.addToast}
|
|
25
|
-
* @
|
|
25
|
+
* @since 6.0.0
|
|
26
26
|
*/ export function useAddToast() {
|
|
27
27
|
return useToastManager().addToast;
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* @see {@link ToastManager.removeToast}
|
|
31
|
-
* @
|
|
31
|
+
* @since 6.0.0
|
|
32
32
|
*/ export function useRemoveToast() {
|
|
33
33
|
return useToastManager().removeToast;
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
36
|
* @param limit - the total number of toasts that can be visible at once.
|
|
37
|
-
* @
|
|
37
|
+
* @since 6.0.0
|
|
38
38
|
*/ export function useToastQueue(limit) {
|
|
39
39
|
const toastManager = useToastManager();
|
|
40
40
|
const queue = useSyncExternalStore(toastManager.subscribe, toastManager.getQueue, toastManager.getQueue);
|
|
@@ -57,7 +57,7 @@ const { Provider } = context;
|
|
|
57
57
|
* implementation.
|
|
58
58
|
*
|
|
59
59
|
* @see {@link ToastManager} for example usage.
|
|
60
|
-
* @
|
|
60
|
+
* @since 6.0.0
|
|
61
61
|
*/ export function ToastManagerProvider(props) {
|
|
62
62
|
const { children, manager = toastManager } = props;
|
|
63
63
|
return /*#__PURE__*/ _jsx(Provider, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/snackbar/ToastManagerProvider.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n createContext,\n useContext,\n useMemo,\n useSyncExternalStore,\n type ReactElement,\n type ReactNode,\n} from \"react\";\nimport {\n toastManager,\n type ToastManager,\n type ToastQueue,\n} from \"./ToastManager.js\";\n\nconst context = createContext(toastManager);\ncontext.displayName = \"ToastManager\";\nconst { Provider } = context;\n\n/**\n * This is mostly an internal hook to implement the toast functionality but can\n * be used externally as well for custom toast behavior if the other hooks do\n * not support your needs.\n *\n * @see {@link useAddToast}\n * @see {@link useToastQueue}\n * @see {@link useRemoveToast}\n *\n * @returns The current `ToastManager` set in the `ToastManagerProvider`.\n * Defaults to {@link toastManager} if there are no parent providers.\n * @
|
|
1
|
+
{"version":3,"sources":["../../src/snackbar/ToastManagerProvider.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n createContext,\n useContext,\n useMemo,\n useSyncExternalStore,\n type ReactElement,\n type ReactNode,\n} from \"react\";\nimport {\n toastManager,\n type ToastManager,\n type ToastQueue,\n} from \"./ToastManager.js\";\n\nconst context = createContext(toastManager);\ncontext.displayName = \"ToastManager\";\nconst { Provider } = context;\n\n/**\n * This is mostly an internal hook to implement the toast functionality but can\n * be used externally as well for custom toast behavior if the other hooks do\n * not support your needs.\n *\n * @see {@link useAddToast}\n * @see {@link useToastQueue}\n * @see {@link useRemoveToast}\n *\n * @returns The current `ToastManager` set in the `ToastManagerProvider`.\n * Defaults to {@link toastManager} if there are no parent providers.\n * @since 6.0.0\n */\nexport function useToastManager(): ToastManager {\n return useContext(context);\n}\n\n/**\n * @see {@link ToastManager.addToast}\n * @since 6.0.0\n */\nexport function useAddToast(): ToastManager[\"addToast\"] {\n return useToastManager().addToast;\n}\n\n/**\n * @see {@link ToastManager.removeToast}\n * @since 6.0.0\n */\nexport function useRemoveToast(): ToastManager[\"removeToast\"] {\n return useToastManager().removeToast;\n}\n\n/**\n * @param limit - the total number of toasts that can be visible at once.\n * @since 6.0.0\n */\nexport function useToastQueue(limit?: number): ToastQueue {\n const toastManager = useToastManager();\n\n const queue = useSyncExternalStore(\n toastManager.subscribe,\n toastManager.getQueue,\n toastManager.getQueue\n );\n\n return useMemo(() => {\n if (!limit) {\n return queue;\n }\n\n return queue.slice(0, limit);\n }, [limit, queue]);\n}\n\n/**\n * @since 6.0.0\n */\nexport interface ToastManagerProviderProps {\n children: ReactNode;\n\n /**\n * @defaultValue `toastManager`\n */\n manager?: ToastManager;\n}\n\n/**\n * **Client Component**\n *\n * This component can be used to implement separate instances of toasts if\n * required in your app. This probably shouldn't be required for most apps with\n * the default {@link addToast}, {@link removeToast}, and {@link clearToasts}\n * implementation.\n *\n * @see {@link ToastManager} for example usage.\n * @since 6.0.0\n */\nexport function ToastManagerProvider(\n props: ToastManagerProviderProps\n): ReactElement {\n const { children, manager = toastManager } = props;\n\n return <Provider value={manager}>{children}</Provider>;\n}\n"],"names":["createContext","useContext","useMemo","useSyncExternalStore","toastManager","context","displayName","Provider","useToastManager","useAddToast","addToast","useRemoveToast","removeToast","useToastQueue","limit","queue","subscribe","getQueue","slice","ToastManagerProvider","props","children","manager","value"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;AAEA,SACEA,aAAa,EACbC,UAAU,EACVC,OAAO,EACPC,oBAAoB,QAGf,QAAQ;AACf,SACEC,YAAY,QAGP,oBAAoB;AAE3B,MAAMC,wBAAUL,cAAcI;AAC9BC,QAAQC,WAAW,GAAG;AACtB,MAAM,EAAEC,QAAQ,EAAE,GAAGF;AAErB;;;;;;;;;;;;CAYC,GACD,OAAO,SAASG;IACd,OAAOP,WAAWI;AACpB;AAEA;;;CAGC,GACD,OAAO,SAASI;IACd,OAAOD,kBAAkBE,QAAQ;AACnC;AAEA;;;CAGC,GACD,OAAO,SAASC;IACd,OAAOH,kBAAkBI,WAAW;AACtC;AAEA;;;CAGC,GACD,OAAO,SAASC,cAAcC,KAAc;IAC1C,MAAMV,eAAeI;IAErB,MAAMO,QAAQZ,qBACZC,aAAaY,SAAS,EACtBZ,aAAaa,QAAQ,EACrBb,aAAaa,QAAQ;IAGvB,OAAOf,QAAQ;QACb,IAAI,CAACY,OAAO;YACV,OAAOC;QACT;QAEA,OAAOA,MAAMG,KAAK,CAAC,GAAGJ;IACxB,GAAG;QAACA;QAAOC;KAAM;AACnB;AAcA;;;;;;;;;;CAUC,GACD,OAAO,SAASI,qBACdC,KAAgC;IAEhC,MAAM,EAAEC,QAAQ,EAAEC,UAAUlB,YAAY,EAAE,GAAGgB;IAE7C,qBAAO,KAACb;QAASgB,OAAOD;kBAAUD;;AACpC"}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
3
|
-
*
|
|
4
|
-
* \@since 6.0.0 Added the `"top-left"`, `"top-right"`, `"bottom-left"`, and
|
|
2
|
+
* @since 2.0.0
|
|
3
|
+
* @since 6.0.0 Added the `"top-left"`, `"top-right"`, `"bottom-left"`, and
|
|
5
4
|
* `"bottom-right"` positions
|
|
6
5
|
*/
|
|
7
6
|
export type SnackbarPosition = "bottom" | "bottom-left" | "bottom-right" | "top" | "top-left" | "top-right";
|
|
8
|
-
/** @
|
|
7
|
+
/** @since 6.0.0 */
|
|
9
8
|
export interface SnackbarClassNameOptions {
|
|
10
9
|
className?: string;
|
|
11
10
|
absolute?: boolean;
|
|
12
11
|
position: SnackbarPosition;
|
|
13
12
|
}
|
|
14
13
|
/**
|
|
15
|
-
* @
|
|
14
|
+
* @since 6.0.0
|
|
16
15
|
*/
|
|
17
16
|
export declare function snackbar(options: SnackbarClassNameOptions): string;
|
|
@@ -2,7 +2,7 @@ import { cnb } from "cnbuilder";
|
|
|
2
2
|
import { bem } from "../utils/bem.js";
|
|
3
3
|
const styles = bem("rmd-snackbar");
|
|
4
4
|
/**
|
|
5
|
-
* @
|
|
5
|
+
* @since 6.0.0
|
|
6
6
|
*/ export function snackbar(options) {
|
|
7
7
|
const { className, absolute, position } = options;
|
|
8
8
|
const top = position === "top" || position === "top-left" || position === "top-right";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/snackbar/snackbarStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-snackbar\");\n\n/**\n * @
|
|
1
|
+
{"version":3,"sources":["../../src/snackbar/snackbarStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-snackbar\");\n\n/**\n * @since 2.0.0\n * @since 6.0.0 Added the `\"top-left\"`, `\"top-right\"`, `\"bottom-left\"`, and\n * `\"bottom-right\"` positions\n */\nexport type SnackbarPosition =\n | \"bottom\"\n | \"bottom-left\"\n | \"bottom-right\"\n | \"top\"\n | \"top-left\"\n | \"top-right\";\n\n/** @since 6.0.0 */\nexport interface SnackbarClassNameOptions {\n className?: string;\n absolute?: boolean;\n position: SnackbarPosition;\n}\n\n/**\n * @since 6.0.0\n */\nexport function snackbar(options: SnackbarClassNameOptions): string {\n const { className, absolute, position } = options;\n const top =\n position === \"top\" || position === \"top-left\" || position === \"top-right\";\n\n return cnb(\n styles({\n absolute,\n top,\n bottom: !top,\n start: position === \"top-left\" || position === \"bottom-left\",\n end: position === \"top-right\" || position === \"bottom-right\",\n }),\n className\n );\n}\n"],"names":["cnb","bem","styles","snackbar","options","className","absolute","position","top","bottom","start","end"],"rangeMappings":";;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAsBnB;;CAEC,GACD,OAAO,SAASE,SAASC,OAAiC;IACxD,MAAM,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,QAAQ,EAAE,GAAGH;IAC1C,MAAMI,MACJD,aAAa,SAASA,aAAa,cAAcA,aAAa;IAEhE,OAAOP,IACLE,OAAO;QACLI;QACAE;QACAC,QAAQ,CAACD;QACTE,OAAOH,aAAa,cAAcA,aAAa;QAC/CI,KAAKJ,aAAa,eAAeA,aAAa;IAChD,IACAF;AAEJ"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
2
|
+
* @since 6.0.0
|
|
3
3
|
*/
|
|
4
4
|
export interface ToastContentClassNameOptions {
|
|
5
5
|
className?: string;
|
|
@@ -13,6 +13,6 @@ export interface ToastContentClassNameOptions {
|
|
|
13
13
|
closeButton?: boolean;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
-
* @
|
|
16
|
+
* @since 6.0.0
|
|
17
17
|
*/
|
|
18
18
|
export declare function toastContent(options?: ToastContentClassNameOptions): string;
|
|
@@ -2,7 +2,7 @@ import { cnb } from "cnbuilder";
|
|
|
2
2
|
import { bem } from "../utils/bem.js";
|
|
3
3
|
const styles = bem("rmd-toast-content");
|
|
4
4
|
/**
|
|
5
|
-
* @
|
|
5
|
+
* @since 6.0.0
|
|
6
6
|
*/ export function toastContent(options = {}) {
|
|
7
7
|
const { action, closeButton, multiline, stacked, className } = options;
|
|
8
8
|
return cnb(styles({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/snackbar/toastContentStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-toast-content\");\n\n/**\n * @
|
|
1
|
+
{"version":3,"sources":["../../src/snackbar/toastContentStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-toast-content\");\n\n/**\n * @since 6.0.0\n */\nexport interface ToastContentClassNameOptions {\n className?: string;\n /** @defaultValue `false` */\n action?: boolean;\n /** @defaultValue `false` */\n stacked?: boolean;\n /** @defaultValue `false` */\n multiline?: boolean;\n /** @defaultValue `false` */\n closeButton?: boolean;\n}\n\n/**\n * @since 6.0.0\n */\nexport function toastContent(\n options: ToastContentClassNameOptions = {}\n): string {\n const { action, closeButton, multiline, stacked, className } = options;\n\n return cnb(\n styles({\n gap: action && closeButton,\n \"v-padding\": multiline && (closeButton || !action),\n \"t-padding\": multiline && stacked,\n }),\n className\n );\n}\n"],"names":["cnb","bem","styles","toastContent","options","action","closeButton","multiline","stacked","className","gap"],"rangeMappings":";;;;;;;;;;;;","mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAiBnB;;CAEC,GACD,OAAO,SAASE,aACdC,UAAwC,CAAC,CAAC;IAE1C,MAAM,EAAEC,MAAM,EAAEC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,SAAS,EAAE,GAAGL;IAE/D,OAAOJ,IACLE,OAAO;QACLQ,KAAKL,UAAUC;QACf,aAAaC,aAAcD,CAAAA,eAAe,CAACD,MAAK;QAChD,aAAaE,aAAaC;IAC5B,IACAC;AAEJ"}
|
|
@@ -6,7 +6,7 @@ declare module "react" {
|
|
|
6
6
|
"--rmd-toast-offset"?: string | number;
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
|
-
/** @
|
|
9
|
+
/** @since 6.0.0 */
|
|
10
10
|
export interface ToastClassNameOptions {
|
|
11
11
|
className?: string;
|
|
12
12
|
/** @defaultValue `"surface"` */
|
|
@@ -23,6 +23,6 @@ export interface ToastClassNameOptions {
|
|
|
23
23
|
closeButton?: boolean;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
|
-
* @
|
|
26
|
+
* @since 6.0.0
|
|
27
27
|
*/
|
|
28
28
|
export declare function toast(options?: ToastClassNameOptions): string;
|
|
@@ -3,7 +3,7 @@ import { cssUtils } from "../cssUtils.js";
|
|
|
3
3
|
import { bem } from "../utils/bem.js";
|
|
4
4
|
const styles = bem("rmd-toast");
|
|
5
5
|
/**
|
|
6
|
-
* @
|
|
6
|
+
* @since 6.0.0
|
|
7
7
|
*/ export function toast(options = {}) {
|
|
8
8
|
const { className, theme = "surface", action, paused, stacked, reordered, closeButton } = options;
|
|
9
9
|
return cnb(styles({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/snackbar/toastStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { cssUtils, type BackgroundColor } from \"../cssUtils.js\";\nimport { bem } from \"../utils/bem.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-toast-color\"?: string;\n \"--rmd-toast-background-color\"?: string;\n \"--rmd-toast-offset\"?: string | number;\n }\n}\n\nconst styles = bem(\"rmd-toast\");\n\n/** @
|
|
1
|
+
{"version":3,"sources":["../../src/snackbar/toastStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { cssUtils, type BackgroundColor } from \"../cssUtils.js\";\nimport { bem } from \"../utils/bem.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-toast-color\"?: string;\n \"--rmd-toast-background-color\"?: string;\n \"--rmd-toast-offset\"?: string | number;\n }\n}\n\nconst styles = bem(\"rmd-toast\");\n\n/** @since 6.0.0 */\nexport interface ToastClassNameOptions {\n className?: string;\n /** @defaultValue `\"surface\"` */\n theme?: BackgroundColor;\n /** @defaultValue `false` */\n action?: boolean;\n /** @defaultValue `false` */\n paused?: boolean;\n /** @defaultValue `false` */\n stacked?: boolean;\n /** @defaultValue `false` */\n reordered?: boolean;\n /** @defaultValue `false` */\n closeButton?: boolean;\n}\n\n/**\n * @since 6.0.0\n */\nexport function toast(options: ToastClassNameOptions = {}): string {\n const {\n className,\n theme = \"surface\",\n action,\n paused,\n stacked,\n reordered,\n closeButton,\n } = options;\n\n return cnb(\n styles({\n x: closeButton,\n action,\n paused,\n \"small-gap\": closeButton && action,\n stacked,\n reordered: stacked && reordered,\n }),\n cssUtils({\n backgroundColor:\n theme !== \"surface\" && theme !== \"current-color\" ? theme : undefined,\n }),\n className\n );\n}\n"],"names":["cnb","cssUtils","bem","styles","toast","options","className","theme","action","paused","stacked","reordered","closeButton","x","backgroundColor","undefined"],"rangeMappings":";;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,QAAQ,QAA8B,iBAAiB;AAChE,SAASC,GAAG,QAAQ,kBAAkB;AAUtC,MAAMC,SAASD,IAAI;AAmBnB;;CAEC,GACD,OAAO,SAASE,MAAMC,UAAiC,CAAC,CAAC;IACvD,MAAM,EACJC,SAAS,EACTC,QAAQ,SAAS,EACjBC,MAAM,EACNC,MAAM,EACNC,OAAO,EACPC,SAAS,EACTC,WAAW,EACZ,GAAGP;IAEJ,OAAOL,IACLG,OAAO;QACLU,GAAGD;QACHJ;QACAC;QACA,aAAaG,eAAeJ;QAC5BE;QACAC,WAAWD,WAAWC;IACxB,IACAV,SAAS;QACPa,iBACEP,UAAU,aAAaA,UAAU,kBAAkBA,QAAQQ;IAC/D,IACAT;AAEJ"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* A simplified version of the {@link ToastManager} that has the actions bound
|
|
4
4
|
* to the current {@link QueuedToast.toastId}.
|
|
5
5
|
*
|
|
6
|
-
* @
|
|
6
|
+
* @since 6.0.0
|
|
7
7
|
*/
|
|
8
8
|
export interface CurrentToastActions {
|
|
9
9
|
/** @see {@link ToastManager.clearTimer} */
|
|
@@ -18,7 +18,7 @@ export interface CurrentToastActions {
|
|
|
18
18
|
resumeRemoveTimeout(): void;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
|
-
* @
|
|
21
|
+
* @since 6.0.0
|
|
22
22
|
* @internal
|
|
23
23
|
*/
|
|
24
24
|
export declare const CurrentToastActionsProvider: import("react").Provider<CurrentToastActions | null>;
|
|
@@ -26,6 +26,6 @@ export declare const CurrentToastActionsProvider: import("react").Provider<Curre
|
|
|
26
26
|
* This is only required if you have multiple `Snackbar` implementations in your
|
|
27
27
|
* app.
|
|
28
28
|
*
|
|
29
|
-
* @
|
|
29
|
+
* @since 6.0.0
|
|
30
30
|
*/
|
|
31
31
|
export declare function useCurrentToastActions(): CurrentToastActions;
|
|
@@ -3,14 +3,14 @@ import { createContext, useContext } from "react";
|
|
|
3
3
|
const context = createContext(null);
|
|
4
4
|
context.displayName = "CurrentToastActions";
|
|
5
5
|
/**
|
|
6
|
-
* @
|
|
6
|
+
* @since 6.0.0
|
|
7
7
|
* @internal
|
|
8
8
|
*/ export const { Provider: CurrentToastActionsProvider } = context;
|
|
9
9
|
/**
|
|
10
10
|
* This is only required if you have multiple `Snackbar` implementations in your
|
|
11
11
|
* app.
|
|
12
12
|
*
|
|
13
|
-
* @
|
|
13
|
+
* @since 6.0.0
|
|
14
14
|
*/ export function useCurrentToastActions() {
|
|
15
15
|
const actions = useContext(context);
|
|
16
16
|
if (!actions) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/snackbar/useCurrentToastActions.ts"],"sourcesContent":["\"use client\";\nimport { createContext, useContext } from \"react\";\n\n/**\n * A simplified version of the {@link ToastManager} that has the actions bound\n * to the current {@link QueuedToast.toastId}.\n *\n * @
|
|
1
|
+
{"version":3,"sources":["../../src/snackbar/useCurrentToastActions.ts"],"sourcesContent":["\"use client\";\nimport { createContext, useContext } from \"react\";\n\n/**\n * A simplified version of the {@link ToastManager} that has the actions bound\n * to the current {@link QueuedToast.toastId}.\n *\n * @since 6.0.0\n */\nexport interface CurrentToastActions {\n /** @see {@link ToastManager.clearTimer} */\n clearTimer(): void;\n /** @see {@link ToastManager.removeToast} */\n removeToast(transition: boolean): void;\n /** @see {@link ToastManager.startRemoveTimeout} */\n startRemoveTimeout(): void;\n /** @see {@link ToastManager.pauseRemoveTimeout} */\n pauseRemoveTimeout(): void;\n /** @see {@link ToastManager.resumeRemoveTimeout} */\n resumeRemoveTimeout(): void;\n}\n\nconst context = createContext<CurrentToastActions | null>(null);\ncontext.displayName = \"CurrentToastActions\";\n\n/**\n * @since 6.0.0\n * @internal\n */\nexport const { Provider: CurrentToastActionsProvider } = context;\n\n/**\n * This is only required if you have multiple `Snackbar` implementations in your\n * app.\n *\n * @since 6.0.0\n */\nexport function useCurrentToastActions(): CurrentToastActions {\n const actions = useContext(context);\n if (!actions) {\n throw new Error(\n \"The `CurrentToastActionsProvider` has not been initialized\"\n );\n }\n\n return actions;\n}\n"],"names":["createContext","useContext","context","displayName","Provider","CurrentToastActionsProvider","useCurrentToastActions","actions","Error"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AACA,SAASA,aAAa,EAAEC,UAAU,QAAQ,QAAQ;AAqBlD,MAAMC,UAAUF,cAA0C;AAC1DE,QAAQC,WAAW,GAAG;AAEtB;;;CAGC,GACD,OAAO,MAAM,EAAEC,UAAUC,2BAA2B,EAAE,GAAGH,QAAQ;AAEjE;;;;;CAKC,GACD,OAAO,SAASI;IACd,MAAMC,UAAUN,WAAWC;IAC3B,IAAI,CAACK,SAAS;QACZ,MAAM,IAAIC,MACR;IAEJ;IAEA,OAAOD;AACT"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ReactElement, type ReactNode } from "react";
|
|
2
2
|
import { type CircularProgressProps } from "../progress/CircularProgress.js";
|
|
3
3
|
/**
|
|
4
|
-
* @
|
|
4
|
+
* @since 6.0.0
|
|
5
5
|
*/
|
|
6
6
|
export interface CircularProgressSuspenseProps extends CircularProgressProps {
|
|
7
7
|
/**
|
|
@@ -16,8 +16,7 @@ export interface CircularProgressSuspenseProps extends CircularProgressProps {
|
|
|
16
16
|
* This is just a convenience component to set the `fallback` to the
|
|
17
17
|
* {@link CircularProgress} component.
|
|
18
18
|
*
|
|
19
|
-
* @example
|
|
20
|
-
* Simple Example
|
|
19
|
+
* @example Simple Example
|
|
21
20
|
* ```tsx
|
|
22
21
|
* import { CircularProgressSuspense } from "@react-md/core";
|
|
23
22
|
* import type { ReactElement } from "react";
|
|
@@ -34,6 +33,6 @@ export interface CircularProgressSuspenseProps extends CircularProgressProps {
|
|
|
34
33
|
* }
|
|
35
34
|
* ```
|
|
36
35
|
*
|
|
37
|
-
* @
|
|
36
|
+
* @since 6.0.0
|
|
38
37
|
*/
|
|
39
38
|
export declare function CircularProgressSuspense(props: CircularProgressSuspenseProps): ReactElement;
|
|
@@ -7,8 +7,7 @@ import { CircularProgress } from "../progress/CircularProgress.js";
|
|
|
7
7
|
* This is just a convenience component to set the `fallback` to the
|
|
8
8
|
* {@link CircularProgress} component.
|
|
9
9
|
*
|
|
10
|
-
* @example
|
|
11
|
-
* Simple Example
|
|
10
|
+
* @example Simple Example
|
|
12
11
|
* ```tsx
|
|
13
12
|
* import { CircularProgressSuspense } from "@react-md/core";
|
|
14
13
|
* import type { ReactElement } from "react";
|
|
@@ -25,7 +24,7 @@ import { CircularProgress } from "../progress/CircularProgress.js";
|
|
|
25
24
|
* }
|
|
26
25
|
* ```
|
|
27
26
|
*
|
|
28
|
-
* @
|
|
27
|
+
* @since 6.0.0
|
|
29
28
|
*/ export function CircularProgressSuspense(props) {
|
|
30
29
|
const { children, "aria-labelledby": ariaLabelledBy, "aria-label": ariaLabel = ariaLabelledBy ? undefined : "Loading", ...progressProps } = props;
|
|
31
30
|
return /*#__PURE__*/ _jsx(Suspense, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/suspense/CircularProgressSuspense.tsx"],"sourcesContent":["import { Suspense, type ReactElement, type ReactNode } from \"react\";\nimport {\n CircularProgress,\n type CircularProgressProps,\n} from \"../progress/CircularProgress.js\";\n\n/**\n * @
|
|
1
|
+
{"version":3,"sources":["../../src/suspense/CircularProgressSuspense.tsx"],"sourcesContent":["import { Suspense, type ReactElement, type ReactNode } from \"react\";\nimport {\n CircularProgress,\n type CircularProgressProps,\n} from \"../progress/CircularProgress.js\";\n\n/**\n * @since 6.0.0\n */\nexport interface CircularProgressSuspenseProps extends CircularProgressProps {\n /**\n * @defaultValue `\"Loading\"`\n */\n \"aria-label\"?: string;\n children: ReactNode;\n}\n\n/**\n * **Server Component**\n *\n * This is just a convenience component to set the `fallback` to the\n * {@link CircularProgress} component.\n *\n * @example Simple Example\n * ```tsx\n * import { CircularProgressSuspense } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n * import { lazy } from \"react\";\n *\n * const Component = lazy(() => import('./Some/Path/To/Component'));\n *\n * function Example(): ReactElement {\n * return (\n * <CircularProgressSuspense>\n * <Component />\n * </CircularProgressSuspense>\n * );\n * }\n * ```\n *\n * @since 6.0.0\n */\nexport function CircularProgressSuspense(\n props: CircularProgressSuspenseProps\n): ReactElement {\n const {\n children,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-label\": ariaLabel = ariaLabelledBy ? undefined : \"Loading\",\n ...progressProps\n } = props;\n return (\n <Suspense\n fallback={\n <CircularProgress\n aria-label={ariaLabel as string}\n aria-labelledby={ariaLabelledBy}\n {...progressProps}\n />\n }\n >\n {children}\n </Suspense>\n );\n}\n"],"names":["Suspense","CircularProgress","CircularProgressSuspense","props","children","ariaLabelledBy","ariaLabel","undefined","progressProps","fallback","aria-label","aria-labelledby"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";AAAA,SAASA,QAAQ,QAA2C,QAAQ;AACpE,SACEC,gBAAgB,QAEX,kCAAkC;AAazC;;;;;;;;;;;;;;;;;;;;;;;;CAwBC,GACD,OAAO,SAASC,yBACdC,KAAoC;IAEpC,MAAM,EACJC,QAAQ,EACR,mBAAmBC,cAAc,EACjC,cAAcC,YAAYD,iBAAiBE,YAAY,SAAS,EAChE,GAAGC,eACJ,GAAGL;IACJ,qBACE,KAACH;QACCS,wBACE,KAACR;YACCS,cAAYJ;YACZK,mBAAiBN;YAChB,GAAGG,aAAa;;kBAIpBJ;;AAGP"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ReactElement, type ReactNode } from "react";
|
|
2
2
|
/**
|
|
3
|
-
* @
|
|
3
|
+
* @since 6.0.0
|
|
4
4
|
*/
|
|
5
5
|
export interface NullSuspenseProps {
|
|
6
6
|
children: ReactNode;
|
|
@@ -10,8 +10,7 @@ export interface NullSuspenseProps {
|
|
|
10
10
|
*
|
|
11
11
|
* This is just a convenience component to set the `fallback` to `null`.
|
|
12
12
|
*
|
|
13
|
-
* @example
|
|
14
|
-
* Simple Example
|
|
13
|
+
* @example Simple Example
|
|
15
14
|
* ```tsx
|
|
16
15
|
* import { NullSuspense } from "@react-md/core";
|
|
17
16
|
* import type { ReactElement } from "react";
|
|
@@ -28,6 +27,6 @@ export interface NullSuspenseProps {
|
|
|
28
27
|
* }
|
|
29
28
|
* ```
|
|
30
29
|
*
|
|
31
|
-
* @
|
|
30
|
+
* @since 6.0.0
|
|
32
31
|
*/
|
|
33
32
|
export declare function NullSuspense(props: NullSuspenseProps): ReactElement;
|
|
@@ -5,8 +5,7 @@ import { Suspense } from "react";
|
|
|
5
5
|
*
|
|
6
6
|
* This is just a convenience component to set the `fallback` to `null`.
|
|
7
7
|
*
|
|
8
|
-
* @example
|
|
9
|
-
* Simple Example
|
|
8
|
+
* @example Simple Example
|
|
10
9
|
* ```tsx
|
|
11
10
|
* import { NullSuspense } from "@react-md/core";
|
|
12
11
|
* import type { ReactElement } from "react";
|
|
@@ -23,7 +22,7 @@ import { Suspense } from "react";
|
|
|
23
22
|
* }
|
|
24
23
|
* ```
|
|
25
24
|
*
|
|
26
|
-
* @
|
|
25
|
+
* @since 6.0.0
|
|
27
26
|
*/ export function NullSuspense(props) {
|
|
28
27
|
const { children } = props;
|
|
29
28
|
return /*#__PURE__*/ _jsx(Suspense, {
|