@react-md/core 1.0.0-next.11 → 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 +7 -7
- package/CHANGELOG.md +36 -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 +9 -10
- 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/delegateEvent.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/DialogContent.js.map +1 -1
- package/dist/dialog/DialogFooter.js.map +1 -1
- package/dist/dialog/DialogHeader.js.map +1 -1
- package/dist/dialog/DialogTitle.d.ts +3 -2
- 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/NestedDialogProvider.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 +5 -5
- package/dist/expansion-panel/ExpansionPanelHeader.js +3 -4
- 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/Form.js.map +1 -1
- package/dist/form/FormMessage.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 +5 -4
- 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/SwitchTrack.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/TextFieldContainer.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/useResizingTextArea.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/Ripple.js.map +1 -1
- package/dist/interaction/RippleContainer.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/interaction/utils.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/ListItemAddon.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/ListItemLink.js.map +1 -1
- package/dist/list/ListItemText.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/appSize.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/findMatchIndex.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/constants.js.map +1 -1
- package/dist/positioning/createHorizontalPosition.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/getProgressA11y.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/getScrollbarWidth.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/TableBody.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/TableConfigurationProvider.js.map +1 -1
- package/dist/table/TableContainer.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/TableRow.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/useTabList.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/IntersectionObserver.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/data-testid.js.map +1 -1
- package/dist/test-utils/index.js.map +1 -1
- package/dist/test-utils/jest-setup.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/polyfills/IntersectionObserver.js.map +1 -1
- package/dist/test-utils/polyfills/ResizeObserver.js.map +1 -1
- package/dist/test-utils/polyfills/TextDecoder.js.map +1 -1
- package/dist/test-utils/polyfills/TextEncoder.js.map +1 -1
- package/dist/test-utils/polyfills/index.js.map +1 -1
- package/dist/test-utils/polyfills/matchMedia.js.map +1 -1
- package/dist/test-utils/polyfills/offsetParent.js.map +1 -1
- package/dist/test-utils/polyfills/scrollIntoView.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/colors.js.map +1 -1
- package/dist/theme/cssVars.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/tooltip/utils.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/maxWidthTransition.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 +4 -44
- package/dist/typography/TextContainer.js +3 -33
- package/dist/typography/TextContainer.js.map +1 -1
- package/dist/typography/Typography.d.ts +4 -116
- package/dist/typography/Typography.js +2 -91
- 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 +39 -0
- package/dist/typography/textContainerStyles.js +31 -0
- package/dist/typography/textContainerStyles.js.map +1 -0
- package/dist/typography/typographyStyles.d.ts +110 -0
- package/dist/typography/typographyStyles.js +89 -0
- package/dist/typography/typographyStyles.js.map +1 -0
- 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/useIsomorphicLayoutEffect.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/useOrientation.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 +24 -357
- 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 +9 -14
- 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 +2 -2
- 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 +6 -10
- 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 +4 -4
- 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 +7 -57
- package/src/typography/Typography.tsx +8 -149
- package/src/typography/WritingDirectionProvider.tsx +10 -13
- package/src/typography/__tests__/TextContainer.tsx +2 -1
- package/src/typography/__tests__/Typography.tsx +2 -1
- package/src/typography/textContainerStyles.ts +52 -0
- package/src/typography/typographyStyles.ts +143 -0
- 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/tsconfig.types.json +1 -1
- package/tsdoc.json +14 -0
- package/.turbo/turbo-typecheck.log +0 -4
- package/dist/index.d.ts +0 -344
- package/dist/index.js +0 -345
- package/dist/index.js.map +0 -1
- package/src/index.ts +0 -347
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/form/sliderUtils.ts"],"sourcesContent":["import { type RefObject } from \"react\";\nimport {\n type DraggableEventHandlers,\n type DraggableImplementation,\n type DraggableMouseEventHandlers,\n type DraggableTouchEventHandlers,\n} from \"../draggable/useDraggable.js\";\nimport { type RenameKeysWithPrefix } from \"../types.js\";\nimport {\n getClientPosition,\n type ClientPositionEvent,\n} from \"../utils/getClientPosition.js\";\nimport { getPercentage } from \"../utils/getPercentage.js\";\nimport { getRangeSteps } from \"../utils/getRangeSteps.js\";\n\n/**\n * @
|
|
1
|
+
{"version":3,"sources":["../../src/form/sliderUtils.ts"],"sourcesContent":["import { type RefObject } from \"react\";\nimport {\n type DraggableEventHandlers,\n type DraggableImplementation,\n type DraggableMouseEventHandlers,\n type DraggableTouchEventHandlers,\n} from \"../draggable/useDraggable.js\";\nimport { type RenameKeysWithPrefix } from \"../types.js\";\nimport {\n getClientPosition,\n type ClientPositionEvent,\n} from \"../utils/getClientPosition.js\";\nimport { getPercentage } from \"../utils/getPercentage.js\";\nimport { getRangeSteps } from \"../utils/getRangeSteps.js\";\n\n/**\n * @since 6.0.0\n * @internal\n */\ninterface JumpOptions {\n min: number;\n max: number;\n step: number;\n jump: number | undefined;\n}\n\n/**\n * @since 6.0.0\n * @internal\n */\nexport const getJumpValue = (options: JumpOptions): number => {\n const { min, max, step, jump } = options;\n\n const steps = getRangeSteps({ min, max, step });\n const value = jump ?? (steps / 10) * step;\n if (Number.isInteger(step)) {\n return Math.ceil(value);\n }\n\n return value;\n};\n\n/**\n * @since 6.0.0\n * @internal\n */\ntype RequiredThumbProps = Pick<\n DraggableImplementation<HTMLElement>,\n | \"dragging\"\n | keyof DraggableMouseEventHandlers<HTMLElement>\n | keyof DraggableTouchEventHandlers<HTMLElement>\n> & { ref: RefObject<HTMLSpanElement> };\n\n/**\n * @since 6.0.0\n * @internal\n */\nexport type ClosestThumbEventHandlersOptions = RenameKeysWithPrefix<\n RequiredThumbProps,\n \"thumb1\"\n> &\n RenameKeysWithPrefix<RequiredThumbProps, \"thumb2\"> & {\n vertical: boolean;\n isRangeSlider: boolean;\n };\n\n/**\n * NOTE: I do not need the mousemove events for this one to work.\n *\n * @since 6.0.0\n * @internal\n */\nexport const getClosestThumbEventHandlers = (\n options: ClosestThumbEventHandlersOptions\n): DraggableEventHandlers<HTMLElement> => {\n const {\n thumb1Ref,\n thumb1Dragging,\n thumb1OnMouseUp,\n thumb1OnMouseDown,\n thumb1OnTouchStart,\n thumb1OnTouchMove,\n thumb2Ref,\n thumb2Dragging,\n thumb2OnMouseUp,\n thumb2OnMouseDown,\n thumb2OnTouchStart,\n thumb2OnTouchMove,\n isRangeSlider,\n vertical,\n } = options;\n\n if (!isRangeSlider) {\n return {\n onMouseDown: thumb1OnMouseDown,\n onMouseUp: thumb1OnMouseUp,\n onTouchStart: thumb1OnTouchStart,\n onTouchMove: thumb1OnTouchMove,\n };\n }\n\n const isThumbOneClosest = (event: ClientPositionEvent): boolean => {\n if (thumb2Dragging) {\n return false;\n }\n\n const thumb1 = thumb1Ref.current;\n const thumb2 = thumb2Ref.current;\n if (!thumb1Dragging && thumb1 && thumb2) {\n const clientPosition = getClientPosition({ event, vertical });\n const thumb1Rect = thumb1.getBoundingClientRect();\n const thumb2Rect = thumb2.getBoundingClientRect();\n const thumb1Position = vertical ? thumb1Rect.y : thumb1Rect.x;\n const thumb2Position = vertical ? thumb2Rect.y : thumb2Rect.x;\n\n return (\n Math.abs(clientPosition - thumb1Position) <\n Math.abs(clientPosition - thumb2Position)\n );\n }\n\n return true;\n };\n\n return {\n onMouseDown(event) {\n if (isThumbOneClosest(event)) {\n thumb1OnMouseDown(event);\n } else {\n thumb2OnMouseDown(event);\n }\n },\n onMouseUp(event) {\n if (isThumbOneClosest(event)) {\n thumb1OnMouseUp(event);\n } else {\n thumb2OnMouseUp(event);\n }\n },\n onTouchStart(event) {\n if (isThumbOneClosest(event)) {\n thumb1OnTouchStart(event);\n } else {\n thumb2OnTouchStart(event);\n }\n },\n onTouchMove(event) {\n if (isThumbOneClosest(event)) {\n thumb1OnTouchMove(event);\n } else {\n thumb2OnTouchMove(event);\n }\n },\n };\n};\n\n/**\n * @internal\n * @since 6.0.0\n */\nexport function getThumbOffset(\n offset: number | undefined,\n fallback: number\n): string | undefined {\n if (typeof offset !== \"number\") {\n return;\n }\n\n // the `offset` will be NaN when there are no possible steps to take because\n // the first thumb is at the maximum value or the second thumb is at the\n // minimum value\n const value = Number.isNaN(offset) ? fallback : offset;\n return `${value * 100}%`;\n}\n\n/**\n * @since 6.0.0\n * @internal\n */\nexport interface ThumbOffsetsOptions {\n min: number;\n max: number;\n thumb1Value: number;\n thumb1Dragging: boolean;\n thumb1DragPercentage: number;\n thumb2Value: number;\n thumb2Dragging: boolean;\n thumb2DragPercentage: number;\n isRangeSlider: boolean;\n}\n\n/**\n * @since 6.0.0\n * @internal\n */\ninterface ThumbOffsets {\n \"--rmd-slider-offset-1\"?: string;\n \"--rmd-slider-offset-2\"?: string;\n}\n\n/**\n * @since 6.0.0\n * @internal\n */\nexport const getThumbOffsets = (options: ThumbOffsetsOptions): ThumbOffsets => {\n const {\n min,\n max,\n thumb1Value,\n thumb1Dragging,\n thumb1DragPercentage,\n thumb2Value,\n thumb2Dragging,\n thumb2DragPercentage,\n isRangeSlider,\n } = options;\n let thumb1Percentage = thumb1Dragging\n ? thumb1DragPercentage\n : getPercentage({ min, max, value: thumb1Value });\n\n let thumb2Percentage: number | undefined;\n if (isRangeSlider) {\n const percentage = getPercentage({ min, max, value: thumb2Value });\n\n thumb1Percentage = Math.min(thumb1Percentage, percentage);\n thumb2Percentage = thumb2Dragging\n ? Math.max(thumb1Percentage, thumb2DragPercentage)\n : percentage;\n }\n\n return {\n \"--rmd-slider-offset-1\": getThumbOffset(thumb1Percentage, 0),\n \"--rmd-slider-offset-2\": getThumbOffset(thumb2Percentage, 1),\n };\n};\n"],"names":["getClientPosition","getPercentage","getRangeSteps","getJumpValue","options","min","max","step","jump","steps","value","Number","isInteger","Math","ceil","getClosestThumbEventHandlers","thumb1Ref","thumb1Dragging","thumb1OnMouseUp","thumb1OnMouseDown","thumb1OnTouchStart","thumb1OnTouchMove","thumb2Ref","thumb2Dragging","thumb2OnMouseUp","thumb2OnMouseDown","thumb2OnTouchStart","thumb2OnTouchMove","isRangeSlider","vertical","onMouseDown","onMouseUp","onTouchStart","onTouchMove","isThumbOneClosest","event","thumb1","current","thumb2","clientPosition","thumb1Rect","getBoundingClientRect","thumb2Rect","thumb1Position","y","x","thumb2Position","abs","getThumbOffset","offset","fallback","isNaN","getThumbOffsets","thumb1Value","thumb1DragPercentage","thumb2Value","thumb2DragPercentage","thumb1Percentage","thumb2Percentage","percentage"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAQA,SACEA,iBAAiB,QAEZ,gCAAgC;AACvC,SAASC,aAAa,QAAQ,4BAA4B;AAC1D,SAASC,aAAa,QAAQ,4BAA4B;AAa1D;;;CAGC,GACD,OAAO,MAAMC,eAAe,CAACC;IAC3B,MAAM,EAAEC,GAAG,EAAEC,GAAG,EAAEC,IAAI,EAAEC,IAAI,EAAE,GAAGJ;IAEjC,MAAMK,QAAQP,cAAc;QAAEG;QAAKC;QAAKC;IAAK;IAC7C,MAAMG,QAAQF,QAAQ,AAACC,QAAQ,KAAMF;IACrC,IAAII,OAAOC,SAAS,CAACL,OAAO;QAC1B,OAAOM,KAAKC,IAAI,CAACJ;IACnB;IAEA,OAAOA;AACT,EAAE;AA0BF;;;;;CAKC,GACD,OAAO,MAAMK,+BAA+B,CAC1CX;IAEA,MAAM,EACJY,SAAS,EACTC,cAAc,EACdC,eAAe,EACfC,iBAAiB,EACjBC,kBAAkB,EAClBC,iBAAiB,EACjBC,SAAS,EACTC,cAAc,EACdC,eAAe,EACfC,iBAAiB,EACjBC,kBAAkB,EAClBC,iBAAiB,EACjBC,aAAa,EACbC,QAAQ,EACT,GAAGzB;IAEJ,IAAI,CAACwB,eAAe;QAClB,OAAO;YACLE,aAAaX;YACbY,WAAWb;YACXc,cAAcZ;YACda,aAAaZ;QACf;IACF;IAEA,MAAMa,oBAAoB,CAACC;QACzB,IAAIZ,gBAAgB;YAClB,OAAO;QACT;QAEA,MAAMa,SAASpB,UAAUqB,OAAO;QAChC,MAAMC,SAAShB,UAAUe,OAAO;QAChC,IAAI,CAACpB,kBAAkBmB,UAAUE,QAAQ;YACvC,MAAMC,iBAAiBvC,kBAAkB;gBAAEmC;gBAAON;YAAS;YAC3D,MAAMW,aAAaJ,OAAOK,qBAAqB;YAC/C,MAAMC,aAAaJ,OAAOG,qBAAqB;YAC/C,MAAME,iBAAiBd,WAAWW,WAAWI,CAAC,GAAGJ,WAAWK,CAAC;YAC7D,MAAMC,iBAAiBjB,WAAWa,WAAWE,CAAC,GAAGF,WAAWG,CAAC;YAE7D,OACEhC,KAAKkC,GAAG,CAACR,iBAAiBI,kBAC1B9B,KAAKkC,GAAG,CAACR,iBAAiBO;QAE9B;QAEA,OAAO;IACT;IAEA,OAAO;QACLhB,aAAYK,KAAK;YACf,IAAID,kBAAkBC,QAAQ;gBAC5BhB,kBAAkBgB;YACpB,OAAO;gBACLV,kBAAkBU;YACpB;QACF;QACAJ,WAAUI,KAAK;YACb,IAAID,kBAAkBC,QAAQ;gBAC5BjB,gBAAgBiB;YAClB,OAAO;gBACLX,gBAAgBW;YAClB;QACF;QACAH,cAAaG,KAAK;YAChB,IAAID,kBAAkBC,QAAQ;gBAC5Bf,mBAAmBe;YACrB,OAAO;gBACLT,mBAAmBS;YACrB;QACF;QACAF,aAAYE,KAAK;YACf,IAAID,kBAAkBC,QAAQ;gBAC5Bd,kBAAkBc;YACpB,OAAO;gBACLR,kBAAkBQ;YACpB;QACF;IACF;AACF,EAAE;AAEF;;;CAGC,GACD,OAAO,SAASa,eACdC,MAA0B,EAC1BC,QAAgB;IAEhB,IAAI,OAAOD,WAAW,UAAU;QAC9B;IACF;IAEA,4EAA4E;IAC5E,wEAAwE;IACxE,gBAAgB;IAChB,MAAMvC,QAAQC,OAAOwC,KAAK,CAACF,UAAUC,WAAWD;IAChD,OAAO,CAAC,EAAEvC,QAAQ,IAAI,CAAC,CAAC;AAC1B;AA2BA;;;CAGC,GACD,OAAO,MAAM0C,kBAAkB,CAAChD;IAC9B,MAAM,EACJC,GAAG,EACHC,GAAG,EACH+C,WAAW,EACXpC,cAAc,EACdqC,oBAAoB,EACpBC,WAAW,EACXhC,cAAc,EACdiC,oBAAoB,EACpB5B,aAAa,EACd,GAAGxB;IACJ,IAAIqD,mBAAmBxC,iBACnBqC,uBACArD,cAAc;QAAEI;QAAKC;QAAKI,OAAO2C;IAAY;IAEjD,IAAIK;IACJ,IAAI9B,eAAe;QACjB,MAAM+B,aAAa1D,cAAc;YAAEI;YAAKC;YAAKI,OAAO6C;QAAY;QAEhEE,mBAAmB5C,KAAKR,GAAG,CAACoD,kBAAkBE;QAC9CD,mBAAmBnC,iBACfV,KAAKP,GAAG,CAACmD,kBAAkBD,wBAC3BG;IACN;IAEA,OAAO;QACL,yBAAyBX,eAAeS,kBAAkB;QAC1D,yBAAyBT,eAAeU,kBAAkB;IAC5D;AACF,EAAE"}
|
|
@@ -5,7 +5,7 @@ declare module "react" {
|
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
|
-
* @
|
|
8
|
+
* @since 6.0.0
|
|
9
9
|
*/
|
|
10
10
|
export interface SwitchClassNameOptions {
|
|
11
11
|
className?: string;
|
|
@@ -13,6 +13,6 @@ export interface SwitchClassNameOptions {
|
|
|
13
13
|
currentColor?: boolean;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
-
* @
|
|
16
|
+
* @since 6.0.0
|
|
17
17
|
*/
|
|
18
18
|
export declare function switchStyles(options?: SwitchClassNameOptions): string;
|
|
@@ -2,7 +2,7 @@ import { cnb } from "cnbuilder";
|
|
|
2
2
|
import { bem } from "../utils/bem.js";
|
|
3
3
|
const styles = bem("rmd-switch");
|
|
4
4
|
/**
|
|
5
|
-
* @
|
|
5
|
+
* @since 6.0.0
|
|
6
6
|
*/ export function switchStyles(options = {}) {
|
|
7
7
|
const { className, clickable, currentColor } = options;
|
|
8
8
|
return cnb(styles({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/form/switchStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-switch-track-background-color\"?: string;\n \"--rmd-switch-ball-background-color\"?: string;\n }\n}\n\nconst styles = bem(\"rmd-switch\");\n\n/**\n * @
|
|
1
|
+
{"version":3,"sources":["../../src/form/switchStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-switch-track-background-color\"?: string;\n \"--rmd-switch-ball-background-color\"?: string;\n }\n}\n\nconst styles = bem(\"rmd-switch\");\n\n/**\n * @since 6.0.0\n */\nexport interface SwitchClassNameOptions {\n className?: string;\n clickable?: boolean;\n currentColor?: boolean;\n}\n\n/**\n * @since 6.0.0\n */\nexport function switchStyles(options: SwitchClassNameOptions = {}): string {\n const { className, clickable, currentColor } = options;\n\n return cnb(styles({ \"current-color\": currentColor, clickable }), className);\n}\n"],"names":["cnb","bem","styles","switchStyles","options","className","clickable","currentColor"],"rangeMappings":";;;;;;;;;;;","mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,GAAG,QAAQ,kBAAkB;AAStC,MAAMC,SAASD,IAAI;AAWnB;;CAEC,GACD,OAAO,SAASE,aAAaC,UAAkC,CAAC,CAAC;IAC/D,MAAM,EAAEC,SAAS,EAAEC,SAAS,EAAEC,YAAY,EAAE,GAAGH;IAE/C,OAAOJ,IAAIE,OAAO;QAAE,iBAAiBK;QAAcD;IAAU,IAAID;AACnE"}
|
|
@@ -7,7 +7,7 @@ declare module "react" {
|
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
* @
|
|
10
|
+
* @since 6.0.0
|
|
11
11
|
*/
|
|
12
12
|
export interface TextareaClassNameOptions extends TextFieldClassNameOptions {
|
|
13
13
|
className?: string;
|
|
@@ -31,11 +31,11 @@ export interface TextareaClassNameOptions extends TextFieldClassNameOptions {
|
|
|
31
31
|
scrollable?: boolean;
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
|
-
* @
|
|
34
|
+
* @since 6.0.0
|
|
35
35
|
*/
|
|
36
36
|
export declare function textArea(options?: TextareaClassNameOptions): string;
|
|
37
37
|
/**
|
|
38
|
-
* @
|
|
38
|
+
* @since 6.0.0
|
|
39
39
|
*/
|
|
40
40
|
export interface TextareaContainerClassNameOptions {
|
|
41
41
|
className?: string;
|
|
@@ -45,6 +45,6 @@ export interface TextareaContainerClassNameOptions {
|
|
|
45
45
|
underlineLabelled?: boolean;
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
|
-
* @
|
|
48
|
+
* @since 6.0.0
|
|
49
49
|
*/
|
|
50
50
|
export declare function textAreaContainer(options?: TextareaContainerClassNameOptions): string;
|
|
@@ -4,7 +4,7 @@ import { textField } from "./textFieldStyles.js";
|
|
|
4
4
|
const styles = bem("rmd-textarea");
|
|
5
5
|
const containerStyles = bem("rmd-textarea-container");
|
|
6
6
|
/**
|
|
7
|
-
* @
|
|
7
|
+
* @since 6.0.0
|
|
8
8
|
*/ export function textArea(options = {}) {
|
|
9
9
|
const { className, mask, resize = "auto", scrollable, placeholderHidden } = options;
|
|
10
10
|
return cnb(textField({
|
|
@@ -18,7 +18,7 @@ const containerStyles = bem("rmd-textarea-container");
|
|
|
18
18
|
}), className);
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
|
-
* @
|
|
21
|
+
* @since 6.0.0
|
|
22
22
|
*/ export function textAreaContainer(options = {}) {
|
|
23
23
|
const { className, height, animate, disabled, underlineLabelled } = options;
|
|
24
24
|
return cnb(containerStyles({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/form/textAreaStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\nimport {\n textField,\n type TextFieldClassNameOptions,\n} from \"./textFieldStyles.js\";\nimport { type TextAreaResize } from \"./useResizingTextArea.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-textarea-height\"?: string | number;\n \"--rmd-textarea-padding\"?: string | number;\n }\n}\n\nconst styles = bem(\"rmd-textarea\");\nconst containerStyles = bem(\"rmd-textarea-container\");\n\n/**\n * @
|
|
1
|
+
{"version":3,"sources":["../../src/form/textAreaStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\nimport {\n textField,\n type TextFieldClassNameOptions,\n} from \"./textFieldStyles.js\";\nimport { type TextAreaResize } from \"./useResizingTextArea.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-textarea-height\"?: string | number;\n \"--rmd-textarea-padding\"?: string | number;\n }\n}\n\nconst styles = bem(\"rmd-textarea\");\nconst containerStyles = bem(\"rmd-textarea-container\");\n\n/**\n * @since 6.0.0\n */\nexport interface TextareaClassNameOptions extends TextFieldClassNameOptions {\n className?: string;\n\n /**\n * This should not be used externally and is only used for creating the hidden\n * textarea mask for the auto resizing behavior.\n *\n * @defaultValue `false`\n */\n mask?: boolean;\n\n /**\n * @see {@link TextAreaResize}\n * @defaultValue `\"auto\"`\n */\n resize?: TextAreaResize;\n\n /**\n * Set this to `true` if the textarea should display a scrollbar.\n *\n * @defaultValue `false`\n */\n scrollable?: boolean;\n}\n\n/**\n * @since 6.0.0\n */\nexport function textArea(options: TextareaClassNameOptions = {}): string {\n const {\n className,\n mask,\n resize = \"auto\",\n scrollable,\n placeholderHidden,\n } = options;\n\n return cnb(\n textField({ placeholderHidden }),\n styles({\n rh: resize === \"horizontal\",\n rv: resize === \"vertical\",\n rn: resize === \"auto\" || resize === \"none\",\n mask,\n scrollable: scrollable || resize === \"none\",\n }),\n className\n );\n}\n\n/**\n * @since 6.0.0\n */\nexport interface TextareaContainerClassNameOptions {\n className?: string;\n height?: boolean;\n disabled?: boolean;\n animate?: boolean;\n underlineLabelled?: boolean;\n}\n\n/**\n * @since 6.0.0\n */\nexport function textAreaContainer(\n options: TextareaContainerClassNameOptions = {}\n): string {\n const { className, height, animate, disabled, underlineLabelled } = options;\n\n return cnb(\n containerStyles({\n height,\n animate,\n cursor: !disabled,\n \"underline-labelled\": underlineLabelled,\n }),\n className\n );\n}\n"],"names":["cnb","bem","textField","styles","containerStyles","textArea","options","className","mask","resize","scrollable","placeholderHidden","rh","rv","rn","textAreaContainer","height","animate","disabled","underlineLabelled","cursor"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,GAAG,QAAQ,kBAAkB;AACtC,SACEC,SAAS,QAEJ,uBAAuB;AAU9B,MAAMC,SAASF,IAAI;AACnB,MAAMG,kBAAkBH,IAAI;AA8B5B;;CAEC,GACD,OAAO,SAASI,SAASC,UAAoC,CAAC,CAAC;IAC7D,MAAM,EACJC,SAAS,EACTC,IAAI,EACJC,SAAS,MAAM,EACfC,UAAU,EACVC,iBAAiB,EAClB,GAAGL;IAEJ,OAAON,IACLE,UAAU;QAAES;IAAkB,IAC9BR,OAAO;QACLS,IAAIH,WAAW;QACfI,IAAIJ,WAAW;QACfK,IAAIL,WAAW,UAAUA,WAAW;QACpCD;QACAE,YAAYA,cAAcD,WAAW;IACvC,IACAF;AAEJ;AAaA;;CAEC,GACD,OAAO,SAASQ,kBACdT,UAA6C,CAAC,CAAC;IAE/C,MAAM,EAAEC,SAAS,EAAES,MAAM,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,iBAAiB,EAAE,GAAGb;IAEpE,OAAON,IACLI,gBAAgB;QACdY;QACAC;QACAG,QAAQ,CAACF;QACT,sBAAsBC;IACxB,IACAZ;AAEJ"}
|
|
@@ -12,7 +12,7 @@ declare module "react" {
|
|
|
12
12
|
"--rmd-form-addon-margin-top"?: string | number;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
/** @
|
|
15
|
+
/** @since 6.0.0 */
|
|
16
16
|
export interface TextFieldContainerClassNameOptions extends FormThemeOptions, FormComponentStates {
|
|
17
17
|
className?: string;
|
|
18
18
|
/** @defaultValue `false` */
|
|
@@ -29,6 +29,6 @@ export interface TextFieldContainerClassNameOptions extends FormThemeOptions, Fo
|
|
|
29
29
|
rightAddon?: boolean;
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
|
-
* @
|
|
32
|
+
* @since 6.0.0
|
|
33
33
|
*/
|
|
34
34
|
export declare function textFieldContainer(options?: TextFieldContainerClassNameOptions): string;
|
|
@@ -3,7 +3,7 @@ import { cssUtils } from "../cssUtils.js";
|
|
|
3
3
|
import { bem } from "../utils/bem.js";
|
|
4
4
|
const styles = bem("rmd-text-field-container");
|
|
5
5
|
/**
|
|
6
|
-
* @
|
|
6
|
+
* @since 6.0.0
|
|
7
7
|
*/ export function textFieldContainer(options = {}) {
|
|
8
8
|
const { className, theme = "outline", dense = false, error = false, label = false, active = false, inline = false, stretch = false, readOnly = false, disabled = false, leftAddon = false, rightAddon = false, underlineDirection = "left" } = options;
|
|
9
9
|
const underline = theme === "underline";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/form/textFieldContainerStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { cssUtils, type TextColor, type ThemeColor } from \"../cssUtils.js\";\nimport { bem } from \"../utils/bem.js\";\nimport { type FormComponentStates, type FormThemeOptions } from \"./types.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-text-field-height\"?: string | number;\n \"--rmd-text-field-padding-left\"?: string | number;\n \"--rmd-text-field-padding-right\"?: string | number;\n \"--rmd-text-field-padding-top\"?: string | number;\n \"--rmd-text-field-border-color\"?: string;\n \"--rmd-text-field-hover-border-color\"?: string;\n \"--rmd-text-field-filled-color\"?: string;\n \"--rmd-form-addon-top\"?: string | number;\n \"--rmd-form-addon-margin-top\"?: string | number;\n }\n}\n\nconst styles = bem(\"rmd-text-field-container\");\n\n/** @
|
|
1
|
+
{"version":3,"sources":["../../src/form/textFieldContainerStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { cssUtils, type TextColor, type ThemeColor } from \"../cssUtils.js\";\nimport { bem } from \"../utils/bem.js\";\nimport { type FormComponentStates, type FormThemeOptions } from \"./types.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-text-field-height\"?: string | number;\n \"--rmd-text-field-padding-left\"?: string | number;\n \"--rmd-text-field-padding-right\"?: string | number;\n \"--rmd-text-field-padding-top\"?: string | number;\n \"--rmd-text-field-border-color\"?: string;\n \"--rmd-text-field-hover-border-color\"?: string;\n \"--rmd-text-field-filled-color\"?: string;\n \"--rmd-form-addon-top\"?: string | number;\n \"--rmd-form-addon-margin-top\"?: string | number;\n }\n}\n\nconst styles = bem(\"rmd-text-field-container\");\n\n/** @since 6.0.0 */\nexport interface TextFieldContainerClassNameOptions\n extends FormThemeOptions,\n FormComponentStates {\n className?: string;\n\n /** @defaultValue `false` */\n dense?: boolean;\n\n /** @defaultValue `false` */\n inline?: boolean;\n\n /** @defaultValue `false` */\n stretch?: boolean;\n\n /** @defaultValue `false` */\n label?: boolean;\n\n /** @defaultValue `false` */\n leftAddon?: boolean;\n\n /** @defaultValue `false` */\n rightAddon?: boolean;\n}\n\n/**\n * @since 6.0.0\n */\nexport function textFieldContainer(\n options: TextFieldContainerClassNameOptions = {}\n): string {\n const {\n className,\n theme = \"outline\",\n dense = false,\n error = false,\n label = false,\n active = false,\n inline = false,\n stretch = false,\n readOnly = false,\n disabled = false,\n leftAddon = false,\n rightAddon = false,\n underlineDirection = \"left\",\n } = options;\n const underline = theme === \"underline\";\n const outline = theme === \"outline\";\n const filled = theme === \"filled\";\n const isUnderlined = underline || filled;\n const isOutlineActive = outline && active;\n\n let textColor: ThemeColor | TextColor | undefined;\n if (disabled) {\n textColor = \"text-disabled\";\n } else if (error) {\n textColor = \"error\";\n }\n\n return cnb(\n styles({\n error,\n inline,\n stretch,\n filled,\n outline,\n disabled: disabled || readOnly,\n hoverable: !disabled && !isOutlineActive,\n label: label && !dense,\n dense: !label && dense,\n \"dense-label\": label && dense,\n \"dense-placeholder\": !label && dense && isUnderlined,\n \"outline-active\": isOutlineActive,\n \"outline-error\": outline && error,\n \"outline-left\": outline && leftAddon,\n \"outline-right\": outline && rightAddon,\n underline: isUnderlined,\n \"underline-placeholder\": isUnderlined && !label,\n \"underline-placeholder-only\":\n isUnderlined && !label && !leftAddon && !rightAddon,\n \"underline-labelled\": isUnderlined && label,\n \"underline-active\": isUnderlined && active,\n [`underline-${underlineDirection}`]: isUnderlined,\n \"underline-left-addon\": isUnderlined && leftAddon,\n \"underline-right-addon\": isUnderlined && rightAddon,\n }),\n cssUtils({ textColor }),\n className\n );\n}\n"],"names":["cnb","cssUtils","bem","styles","textFieldContainer","options","className","theme","dense","error","label","active","inline","stretch","readOnly","disabled","leftAddon","rightAddon","underlineDirection","underline","outline","filled","isUnderlined","isOutlineActive","textColor","hoverable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,QAAQ,QAAyC,iBAAiB;AAC3E,SAASC,GAAG,QAAQ,kBAAkB;AAiBtC,MAAMC,SAASD,IAAI;AA2BnB;;CAEC,GACD,OAAO,SAASE,mBACdC,UAA8C,CAAC,CAAC;IAEhD,MAAM,EACJC,SAAS,EACTC,QAAQ,SAAS,EACjBC,QAAQ,KAAK,EACbC,QAAQ,KAAK,EACbC,QAAQ,KAAK,EACbC,SAAS,KAAK,EACdC,SAAS,KAAK,EACdC,UAAU,KAAK,EACfC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,YAAY,KAAK,EACjBC,aAAa,KAAK,EAClBC,qBAAqB,MAAM,EAC5B,GAAGb;IACJ,MAAMc,YAAYZ,UAAU;IAC5B,MAAMa,UAAUb,UAAU;IAC1B,MAAMc,SAASd,UAAU;IACzB,MAAMe,eAAeH,aAAaE;IAClC,MAAME,kBAAkBH,WAAWT;IAEnC,IAAIa;IACJ,IAAIT,UAAU;QACZS,YAAY;IACd,OAAO,IAAIf,OAAO;QAChBe,YAAY;IACd;IAEA,OAAOxB,IACLG,OAAO;QACLM;QACAG;QACAC;QACAQ;QACAD;QACAL,UAAUA,YAAYD;QACtBW,WAAW,CAACV,YAAY,CAACQ;QACzBb,OAAOA,SAAS,CAACF;QACjBA,OAAO,CAACE,SAASF;QACjB,eAAeE,SAASF;QACxB,qBAAqB,CAACE,SAASF,SAASc;QACxC,kBAAkBC;QAClB,iBAAiBH,WAAWX;QAC5B,gBAAgBW,WAAWJ;QAC3B,iBAAiBI,WAAWH;QAC5BE,WAAWG;QACX,yBAAyBA,gBAAgB,CAACZ;QAC1C,8BACEY,gBAAgB,CAACZ,SAAS,CAACM,aAAa,CAACC;QAC3C,sBAAsBK,gBAAgBZ;QACtC,oBAAoBY,gBAAgBX;QACpC,CAAC,CAAC,UAAU,EAAEO,mBAAmB,CAAC,CAAC,EAAEI;QACrC,wBAAwBA,gBAAgBN;QACxC,yBAAyBM,gBAAgBL;IAC3C,IACAhB,SAAS;QAAEuB;IAAU,IACrBlB;AAEJ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @
|
|
1
|
+
/** @since 6.0.0 */
|
|
2
2
|
export interface TextFieldClassNameOptions {
|
|
3
3
|
className?: string;
|
|
4
4
|
/**
|
|
@@ -12,6 +12,6 @@ export interface TextFieldClassNameOptions {
|
|
|
12
12
|
placeholderHidden?: boolean;
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
-
* @
|
|
15
|
+
* @since 6.0.0
|
|
16
16
|
*/
|
|
17
17
|
export declare function textField(options?: TextFieldClassNameOptions): string;
|
|
@@ -2,7 +2,7 @@ import { cnb } from "cnbuilder";
|
|
|
2
2
|
import { bem } from "../utils/bem.js";
|
|
3
3
|
const styles = bem("rmd-text-field");
|
|
4
4
|
/**
|
|
5
|
-
* @
|
|
5
|
+
* @since 6.0.0
|
|
6
6
|
*/ export function textField(options = {}) {
|
|
7
7
|
const { className, placeholderHidden = false } = options;
|
|
8
8
|
return cnb(styles({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/form/textFieldStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-text-field\");\n\n/** @
|
|
1
|
+
{"version":3,"sources":["../../src/form/textFieldStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-text-field\");\n\n/** @since 6.0.0 */\nexport interface TextFieldClassNameOptions {\n className?: string;\n\n /**\n * Set this value to `true` when a text field has a floating label the text\n * field is not focused or valued so that the placeholder is hidden by setting\n * the opacity to 0. This makes it so the placeholder and label to not cover\n * each other.\n *\n * @defaultValue `false`\n */\n placeholderHidden?: boolean;\n}\n\n/**\n * @since 6.0.0\n */\nexport function textField(options: TextFieldClassNameOptions = {}): string {\n const { className, placeholderHidden = false } = options;\n\n return cnb(\n styles({\n \"placeholder-hidden\": placeholderHidden,\n }),\n className\n );\n}\n"],"names":["cnb","bem","styles","textField","options","className","placeholderHidden"],"rangeMappings":";;;;;;;;;;","mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAiBnB;;CAEC,GACD,OAAO,SAASE,UAAUC,UAAqC,CAAC,CAAC;IAC/D,MAAM,EAAEC,SAAS,EAAEC,oBAAoB,KAAK,EAAE,GAAGF;IAEjD,OAAOJ,IACLE,OAAO;QACL,sBAAsBI;IACxB,IACAD;AAEJ"}
|
package/dist/form/types.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ export interface FormThemeOptions {
|
|
|
41
41
|
underlineDirection?: FormUnderlineDirection;
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
|
-
* @
|
|
44
|
+
* @since 6.0.0
|
|
45
45
|
*/
|
|
46
46
|
export interface FormConfiguration extends Required<FormThemeOptions> {
|
|
47
47
|
/**
|
|
@@ -69,13 +69,13 @@ export interface FormComponentStates {
|
|
|
69
69
|
readOnly?: boolean;
|
|
70
70
|
}
|
|
71
71
|
/**
|
|
72
|
-
* @
|
|
72
|
+
* @since 6.0.0
|
|
73
73
|
* @see https://html.spec.whatwg.org/multipage/forms.html#autofill
|
|
74
74
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values
|
|
75
75
|
*/
|
|
76
76
|
export type AutocompleteValue = "off" | "on" | "name" | "honorific-prefix" | "given-name" | "additional-name" | "family-name" | "honorific-suffix" | "nickname" | "email" | "username" | "new-password" | "current-password" | "one-time-code" | "organization-title" | "organization" | "street-address" | "address-line1" | "address-line2" | "address-line3" | "address-level1" | "address-level2" | "address-level3" | "address-level4" | "country" | "country-name" | "postal-code" | "cc-name" | "cc-given-name" | "cc-additional-name" | "cc-family-name" | "cc-number" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-csc" | "cc-type" | "transaction-currency" | "transaction-amount" | "language" | "bday" | "bday-day" | "bday-month" | "bday-year" | "sex" | "tel" | "tel-country-code" | "tel-national" | "tek-area-code" | "tel-local" | "tel-extension" | "impp" | "url" | "photo";
|
|
77
77
|
/**
|
|
78
|
-
* @
|
|
78
|
+
* @since 6.0.0
|
|
79
79
|
*/
|
|
80
80
|
export interface UserAgentAutocompleteProps {
|
|
81
81
|
/**
|
|
@@ -200,7 +200,7 @@ export interface FormMessageProps extends Omit<HTMLAttributes<HTMLDivElement>, "
|
|
|
200
200
|
*
|
|
201
201
|
* Note: this should not be used alongside form-level messages.
|
|
202
202
|
*
|
|
203
|
-
* @
|
|
203
|
+
* @since 2.9.0 Renamed from `FormMessageCounterProps` to
|
|
204
204
|
* `FormMessageInputLengthCounterProps` since a `FormMessageCounter` component
|
|
205
205
|
* was added
|
|
206
206
|
*/
|
|
@@ -225,7 +225,7 @@ export interface FormMessageInputLengthCounterProps {
|
|
|
225
225
|
export interface FormMessageWithCounterProps extends FormMessageProps, FormMessageInputLengthCounterProps {
|
|
226
226
|
}
|
|
227
227
|
/**
|
|
228
|
-
* @
|
|
228
|
+
* @since 6.0.0
|
|
229
229
|
*/
|
|
230
230
|
export interface FormMessageWithoutCounterProps extends FormMessageProps {
|
|
231
231
|
length?: never;
|
|
@@ -249,7 +249,7 @@ export interface FormMessageContainerExtension {
|
|
|
249
249
|
*/
|
|
250
250
|
messageContainerProps?: PropsWithRef<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
|
251
251
|
}
|
|
252
|
-
/** @
|
|
252
|
+
/** @since 6.0.0 */
|
|
253
253
|
export interface LabelClassNameOptions {
|
|
254
254
|
className?: string;
|
|
255
255
|
/**
|
|
@@ -325,7 +325,7 @@ export interface LabelClassNameOptions {
|
|
|
325
325
|
export interface LabelProps extends LabelHTMLAttributes<HTMLLabelElement>, LabelClassNameOptions {
|
|
326
326
|
}
|
|
327
327
|
/**
|
|
328
|
-
* @
|
|
328
|
+
* @since 6.0.0
|
|
329
329
|
*/
|
|
330
330
|
export interface ConfigurableTextFieldAddonProps extends HTMLAttributes<HTMLSpanElement> {
|
|
331
331
|
/**
|
|
@@ -337,7 +337,7 @@ export interface ConfigurableTextFieldAddonProps extends HTMLAttributes<HTMLSpan
|
|
|
337
337
|
pointerEvents?: boolean;
|
|
338
338
|
}
|
|
339
339
|
/**
|
|
340
|
-
* @
|
|
340
|
+
* @since 6.0.0 Added support for `leftAddonProps` and
|
|
341
341
|
* `rightAddonProps`.
|
|
342
342
|
*/
|
|
343
343
|
export interface TextFieldContainerOptions extends FormThemeOptions, FormComponentStates {
|
|
@@ -369,7 +369,7 @@ export interface TextFieldContainerOptions extends FormThemeOptions, FormCompone
|
|
|
369
369
|
/**
|
|
370
370
|
* Any additional props to pass to the `<span>` surrounding the {@link leftAddon}.
|
|
371
371
|
*
|
|
372
|
-
* @
|
|
372
|
+
* @since 6.0.0
|
|
373
373
|
*/
|
|
374
374
|
leftAddonProps?: PropsWithRef<ConfigurableTextFieldAddonProps, HTMLSpanElement>;
|
|
375
375
|
/**
|
|
@@ -386,7 +386,7 @@ export interface TextFieldContainerOptions extends FormThemeOptions, FormCompone
|
|
|
386
386
|
/**
|
|
387
387
|
* Any additional props to pass to the `<span>` surrounding the {@link rightAddon}.
|
|
388
388
|
*
|
|
389
|
-
* @
|
|
389
|
+
* @since 6.0.0
|
|
390
390
|
*/
|
|
391
391
|
rightAddonProps?: PropsWithRef<ConfigurableTextFieldAddonProps, HTMLSpanElement>;
|
|
392
392
|
/**
|
package/dist/form/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/form/types.ts"],"sourcesContent":["import {\n type CSSProperties,\n type HTMLAttributes,\n type InputHTMLAttributes,\n type LabelHTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { type PropsWithRef } from \"../types.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-form-active-color\"?: string;\n \"--rmd-form-focus-color\"?: string;\n }\n}\n\n/**\n * The supported themes for the `TextField`, `TextArea`, and `Select`\n * components.\n *\n * - \"none\" - display as an unstyled text field without any border or background\n * colors.\n * - \"underline\" - display with only an underline that gains the form active\n * color and animates from the left or right to the other side when the field\n * is focused.\n * - \"filled\" - an extension of the `\"underline\"` state that will also have a\n * slightly dark background applied.\n * - \"outline\" - outlines the entire text field in a border and applies the\n * active color as box shadow when the field is focused.\n */\nexport type FormTheme = \"none\" | \"underline\" | \"filled\" | \"outline\";\n\n/**\n * The direction that the underline should appear from when the theme is\n * `\"underline\"` or `\"filled\"`.\n */\nexport type FormUnderlineDirection = \"left\" | \"center\" | \"right\";\n\nexport interface FormThemeOptions {\n /**\n * The current theme type.\n *\n * @defaultValue `\"outline\"`\n */\n theme?: FormTheme;\n\n /**\n * The current underline direction.\n *\n * @defaultValue `\"left\"`\n */\n underlineDirection?: FormUnderlineDirection;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface FormConfiguration extends Required<FormThemeOptions> {\n /**\n * Set this to `false` if the `$disable-uncontrolled-input-toggles` variable\n * is set to `true` in the Sass configuration.\n *\n * Since the `checked` state only changes for the radio that has been clicked,\n * the previously checked radio would also be shown as checked with no way of\n * fixing it without controlling the radio component. When this flag is\n * enabled, the checked icons and state are handled through css instead of\n * `useState`.\n *\n * @defaultValue `true`\n */\n uncontrolledToggles: boolean;\n}\n\nexport interface FormComponentStates {\n /** @defaultValue `false` */\n error?: boolean;\n\n /** @defaultValue `false` */\n active?: boolean;\n\n /** @defaultValue `false` */\n disabled?: boolean;\n\n /** @defaultValue `false` */\n readOnly?: boolean;\n}\n\n/**\n * @remarks \\@since 6.0.0\n * @see https://html.spec.whatwg.org/multipage/forms.html#autofill\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values\n */\nexport type AutocompleteValue =\n | \"off\"\n | \"on\"\n | \"name\"\n | \"honorific-prefix\"\n | \"given-name\"\n | \"additional-name\"\n | \"family-name\"\n | \"honorific-suffix\"\n | \"nickname\"\n | \"email\"\n | \"username\"\n | \"new-password\"\n | \"current-password\"\n | \"one-time-code\"\n | \"organization-title\"\n | \"organization\"\n | \"street-address\"\n | \"address-line1\"\n | \"address-line2\"\n | \"address-line3\"\n | \"address-level1\"\n | \"address-level2\"\n | \"address-level3\"\n | \"address-level4\"\n | \"country\"\n | \"country-name\"\n | \"postal-code\"\n | \"cc-name\"\n | \"cc-given-name\"\n | \"cc-additional-name\"\n | \"cc-family-name\"\n | \"cc-number\"\n | \"cc-exp\"\n | \"cc-exp-month\"\n | \"cc-exp-year\"\n | \"cc-csc\"\n | \"cc-type\"\n | \"transaction-currency\"\n | \"transaction-amount\"\n | \"language\"\n | \"bday\"\n | \"bday-day\"\n | \"bday-month\"\n | \"bday-year\"\n | \"sex\"\n | \"tel\"\n | \"tel-country-code\"\n | \"tel-national\"\n | \"tek-area-code\"\n | \"tel-local\"\n | \"tel-extension\"\n | \"impp\"\n | \"url\"\n | \"photo\";\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface UserAgentAutocompleteProps {\n /**\n * Set this to enable additional autocompletion suggestions for a user for\n * different form fields. Using this prop will update the\n * {@link UserAgentAutocompleteProps.name} and {@link autoComplete} to default to\n * this value.\n *\n * @example\n * ```tsx\n * <Form>\n * <TextField\n * label=\"Enter your credit card number\"\n * autoCompleteValue=\"cc-number\"\n * {...creditCardProps}\n * inputMode=\"number\"\n * />\n * <TextField\n * label=\"Name on card\"\n * autoCompleteValue=\"cc-name\"\n * {...creditCardNameProps}\n * />\n * <TextField\n * label=\"Security code\"\n * autoCompleteValue=\"cc-csc\"\n * {...securityCodeProps}\n * inputMode=\"number\"\n * />\n * <Button type=\"submit\">Submit</Button>\n * </Form>\n * ```\n *\n * @see https://html.spec.whatwg.org/multipage/forms.html#autofill\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values\n * @see {@link AutocompleteValue}\n * @see {@link autoComplete}\n * @see {@link UserAgentAutocompleteProps.name}\n */\n autoCompleteValue?: AutocompleteValue;\n\n /**\n * @see {@link autoCompleteValue}\n * @defaultValue `autoCompleteValue`\n */\n autoComplete?: InputHTMLAttributes<HTMLInputElement>[\"autoComplete\"];\n\n /**\n * @see {@link autoCompleteValue}\n * @defaultValue `autoCompleteValue`\n */\n name?: string;\n}\n\nexport interface FormMessageClassNameOptions {\n className?: string;\n\n /**\n * Boolean if the message should gain the error state which changes the text\n * color to `red` by default.\n *\n * @defaultValue `false`\n */\n error?: boolean;\n\n /**\n * The current theme for the related text field. This is really only used to\n * match the current horizontal padding of the text field.\n *\n * @defaultValue `\"outline\"`\n */\n theme?: FormTheme;\n}\n\nexport interface FormMessageProps\n extends Omit<HTMLAttributes<HTMLDivElement>, \"minLength\" | \"maxLength\">,\n FormMessageClassNameOptions {\n /**\n * If this component is acting as a form-level error message handler, the role\n * should be updated to be `\"alert\"` for additional accessibility.\n *\n * Note: when creating a form-level error message handler, the messages should\n * no longer appear as the user types and instead once the user tries to\n * submit the form. Having an alert role disrupts normal screen reader\n * behavior by immediately reading changes in this element.\n *\n * @defaultValue `undefined`\n */\n role?: \"alert\";\n\n /**\n * Boolean if the children should no longer be wrapped in a `<p>` tag. This\n * should normally only be disabled if using a custom error message wrapper or\n * the counter behavior is not being used. To get correct alignments of the\n * message and counter, the `children` must be wrapped in some element and\n * cannot be plain test.\n *\n * Note: this will always be considered `true` if the `role` is set to\n * `\"alert\"`.\n *\n * @defaultValue `false`\n */\n disableWrap?: boolean;\n\n /**\n * An optional style to apply to the `<p>` tag that surrounds the `children`.\n * This will not be used if `role=\"alert\"` or `disableWrap={true}`.\n */\n messageStyle?: CSSProperties;\n\n /**\n * An optional className to apply to the `<p>` tag that surrounds the\n * `children`. This will not be used if `role=\"alert\"` or\n * `disableWrap={true}`.\n */\n messageClassName?: string;\n}\n\n/**\n * Props that are used to automatically add a counter for the remaining letters\n * available for the text field. The counter will always be created to the right\n * of the optional message.\n *\n * The counter is really a simple string of: `${length} / ${maxLength}`.\n *\n * If you need additional customization, it is recommended to create your own\n * implementation such as:\n *\n * ```tsx\n * <FormMessage>\n * {errorMessage}\n * <MyCounter {...props} />\n * </FormMessage>\n * ```\n *\n * Note: this should not be used alongside form-level messages.\n *\n * @remarks \\@since 2.9.0 Renamed from `FormMessageCounterProps` to\n * `FormMessageInputLengthCounterProps` since a `FormMessageCounter` component\n * was added\n */\nexport interface FormMessageInputLengthCounterProps {\n /**\n * The current length of the value in the related text field.\n */\n length: number;\n\n /**\n * The max length allowed for the value in the related text field.\n */\n maxLength: number;\n\n /**\n * An optional style to apply to the counter wrapper element.\n */\n counterStyle?: CSSProperties;\n\n /**\n * An optional className to apply to the counter wrapper element.\n */\n counterClassName?: string;\n}\n\nexport interface FormMessageWithCounterProps\n extends FormMessageProps,\n FormMessageInputLengthCounterProps {}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface FormMessageWithoutCounterProps extends FormMessageProps {\n length?: never;\n maxLength?: never;\n counterStyle?: never;\n counterClassName?: never;\n}\n\nexport interface FormMessageContainerExtension {\n /**\n * If the extension doesn't actually want to render the `FormMessage`\n * component, these props are optional. It kind of eliminates the whole\n * purpose of this component though.\n */\n messageProps?: PropsWithRef<\n FormMessageProps & Partial<FormMessageInputLengthCounterProps>,\n HTMLDivElement\n >;\n\n /**\n * Any props (and an optional ref) to provide to the `<div>` surrounding the\n * children and `FormMessage` component.\n *\n * Note: This will not be used if the `messageProps` are not provided since\n * only the `children` will be returned without the container.\n */\n messageContainerProps?: PropsWithRef<\n HTMLAttributes<HTMLDivElement>,\n HTMLDivElement\n >;\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface LabelClassNameOptions {\n className?: string;\n\n /**\n * Set this to `true` to remove the `gap` style from the label.\n *\n * @see `$label-gap`\n * @defaultValue `false`\n */\n gap?: boolean;\n\n /**\n * Set this to `true` when the parent `TextFieldContainer` has the `dense`\n * spec enabled. This updates the floating styles to match the smaller height.\n *\n * @defaultValue `false`\n */\n dense?: boolean;\n\n /**\n * Set this to `true` to update the label's color to the error color.\n *\n * @see `$error-color`\n * @defaultValue `false`\n */\n error?: boolean;\n\n /**\n * Set this to `true` to update the label's color to the active color.\n *\n * @see `$active-color`\n * @defaultValue `false`\n */\n active?: boolean;\n\n /**\n * Set this to `true` if the label should gain `flex-direction: column`\n * styling.\n *\n * @defaultValue `false`\n */\n stacked?: boolean;\n\n /**\n * Set this to `true` to update the label's color to be the disabled color.\n *\n * @see `$disabled-color`\n * @defaultValue `false`\n */\n disabled?: boolean;\n\n /**\n * Set this to true when label can floating above an input, textarea, or\n * select inside of a `TextFieldContainer`.\n *\n * @defaultValue `false`\n */\n floating?: boolean;\n\n /**\n * Set this to true when label is currently floating above an input,\n * textarea, or selected inside of a `TextFieldContainer`.\n *\n * @see {@link active}\n * @defaultValue `active`\n */\n floatingActive?: boolean;\n\n /**\n * Set this to `true` to gain `flex-direction: row-reversed` styling. If the\n * {@link stacked} prop is also `true`, `flex-direction: column-reversed` will\n * be applied.\n *\n * @defaultValue `false`\n */\n reversed?: boolean;\n\n /**\n * @defaultValue `false`\n */\n inactive?: boolean;\n}\n\nexport interface LabelProps\n extends LabelHTMLAttributes<HTMLLabelElement>,\n LabelClassNameOptions {}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface ConfigurableTextFieldAddonProps\n extends HTMLAttributes<HTMLSpanElement> {\n /**\n * Boolean if the addon should be presentational only and prevent pointer\n * events.\n *\n * @defaultValue `false`\n */\n pointerEvents?: boolean;\n}\n\n/**\n * @remarks \\@since 6.0.0 Added support for `leftAddonProps` and\n * `rightAddonProps`.\n */\nexport interface TextFieldContainerOptions\n extends FormThemeOptions,\n FormComponentStates {\n /**\n * Set this to `true` to enable the dense spec which reduces the height.\n *\n * @defaultValue `false`\n */\n dense?: boolean;\n\n /**\n * Set this to `true` to change the style from `display: flex` to\n * `display: inline-flex`.\n *\n * @defaultValue `false`\n */\n inline?: boolean;\n\n /**\n * Set this to `true` if this component should stretch to fill a flex or grid\n * container using `flex: 1 1 auto`.\n *\n * @defaultValue `false`\n */\n stretch?: boolean;\n\n /**\n * This should generally be an icon or a button that will be placed before the\n * `TextField` or `TextArea`.\n */\n leftAddon?: ReactNode;\n\n /**\n * Any additional props to pass to the `<span>` surrounding the {@link leftAddon}.\n *\n * @remarks \\@since 6.0.0\n */\n leftAddonProps?: PropsWithRef<\n ConfigurableTextFieldAddonProps,\n HTMLSpanElement\n >;\n\n /**\n * @see {@link TextFieldAddonProps.disabled}\n *\n * @defaultValue `false`\n */\n disableLeftAddonStyles?: boolean;\n\n /**\n * This should generally be an icon or a button that will be placed after the\n * `TextField` or `TextArea`.\n */\n rightAddon?: ReactNode;\n\n /**\n * Any additional props to pass to the `<span>` surrounding the {@link rightAddon}.\n *\n * @remarks \\@since 6.0.0\n */\n rightAddonProps?: PropsWithRef<\n ConfigurableTextFieldAddonProps,\n HTMLSpanElement\n >;\n\n /**\n * @see {@link TextFieldAddonProps.disabled}\n *\n * @defaultValue `false`\n */\n disableRightAddonStyles?: boolean;\n}\n\nexport interface FormFieldOptions\n extends TextFieldContainerOptions,\n FormMessageContainerExtension {\n /**\n * An optional floating label to use with the text field. A label is generally\n * recommended for accessibility, but can be omitted if an `aria-label` or\n * `aria-labelledby` is provided.\n */\n label?: ReactNode;\n\n /**\n * Any additional props and/or ref that should be passed to the `<label>`\n * element when a {@link label} is provided.\n *\n * @example\n * ```tsx\n * labelProps={{\n * ref: labelRef,\n * style: {},\n * className: \"some-custom-class-name\",\n * onClick: (event) => {\n * // do something\n * }\n * }}\n * ```\n */\n labelProps?: PropsWithRef<LabelProps, HTMLLabelElement>;\n\n /**\n * A convenience prop to apply a custom style to a label. This is equivalent\n * to:\n *\n * ```ts\n * labelProps={{\n * style: // some style here\n * }}\n * ```\n */\n labelStyle?: CSSProperties;\n\n /**\n * A convenience prop to apply a custom className to a label. This is\n * equivalent to:\n *\n * ```ts\n * labelProps={{\n * className: \"some-class-name\",\n * }}\n * ```\n */\n labelClassName?: string;\n}\n"],"names":[],"mappings":"AAihBA,WAmDC"}
|
|
1
|
+
{"version":3,"sources":["../../src/form/types.ts"],"sourcesContent":["import {\n type CSSProperties,\n type HTMLAttributes,\n type InputHTMLAttributes,\n type LabelHTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { type PropsWithRef } from \"../types.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-form-active-color\"?: string;\n \"--rmd-form-focus-color\"?: string;\n }\n}\n\n/**\n * The supported themes for the `TextField`, `TextArea`, and `Select`\n * components.\n *\n * - \"none\" - display as an unstyled text field without any border or background\n * colors.\n * - \"underline\" - display with only an underline that gains the form active\n * color and animates from the left or right to the other side when the field\n * is focused.\n * - \"filled\" - an extension of the `\"underline\"` state that will also have a\n * slightly dark background applied.\n * - \"outline\" - outlines the entire text field in a border and applies the\n * active color as box shadow when the field is focused.\n */\nexport type FormTheme = \"none\" | \"underline\" | \"filled\" | \"outline\";\n\n/**\n * The direction that the underline should appear from when the theme is\n * `\"underline\"` or `\"filled\"`.\n */\nexport type FormUnderlineDirection = \"left\" | \"center\" | \"right\";\n\nexport interface FormThemeOptions {\n /**\n * The current theme type.\n *\n * @defaultValue `\"outline\"`\n */\n theme?: FormTheme;\n\n /**\n * The current underline direction.\n *\n * @defaultValue `\"left\"`\n */\n underlineDirection?: FormUnderlineDirection;\n}\n\n/**\n * @since 6.0.0\n */\nexport interface FormConfiguration extends Required<FormThemeOptions> {\n /**\n * Set this to `false` if the `$disable-uncontrolled-input-toggles` variable\n * is set to `true` in the Sass configuration.\n *\n * Since the `checked` state only changes for the radio that has been clicked,\n * the previously checked radio would also be shown as checked with no way of\n * fixing it without controlling the radio component. When this flag is\n * enabled, the checked icons and state are handled through css instead of\n * `useState`.\n *\n * @defaultValue `true`\n */\n uncontrolledToggles: boolean;\n}\n\nexport interface FormComponentStates {\n /** @defaultValue `false` */\n error?: boolean;\n\n /** @defaultValue `false` */\n active?: boolean;\n\n /** @defaultValue `false` */\n disabled?: boolean;\n\n /** @defaultValue `false` */\n readOnly?: boolean;\n}\n\n/**\n * @since 6.0.0\n * @see https://html.spec.whatwg.org/multipage/forms.html#autofill\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values\n */\nexport type AutocompleteValue =\n | \"off\"\n | \"on\"\n | \"name\"\n | \"honorific-prefix\"\n | \"given-name\"\n | \"additional-name\"\n | \"family-name\"\n | \"honorific-suffix\"\n | \"nickname\"\n | \"email\"\n | \"username\"\n | \"new-password\"\n | \"current-password\"\n | \"one-time-code\"\n | \"organization-title\"\n | \"organization\"\n | \"street-address\"\n | \"address-line1\"\n | \"address-line2\"\n | \"address-line3\"\n | \"address-level1\"\n | \"address-level2\"\n | \"address-level3\"\n | \"address-level4\"\n | \"country\"\n | \"country-name\"\n | \"postal-code\"\n | \"cc-name\"\n | \"cc-given-name\"\n | \"cc-additional-name\"\n | \"cc-family-name\"\n | \"cc-number\"\n | \"cc-exp\"\n | \"cc-exp-month\"\n | \"cc-exp-year\"\n | \"cc-csc\"\n | \"cc-type\"\n | \"transaction-currency\"\n | \"transaction-amount\"\n | \"language\"\n | \"bday\"\n | \"bday-day\"\n | \"bday-month\"\n | \"bday-year\"\n | \"sex\"\n | \"tel\"\n | \"tel-country-code\"\n | \"tel-national\"\n | \"tek-area-code\"\n | \"tel-local\"\n | \"tel-extension\"\n | \"impp\"\n | \"url\"\n | \"photo\";\n\n/**\n * @since 6.0.0\n */\nexport interface UserAgentAutocompleteProps {\n /**\n * Set this to enable additional autocompletion suggestions for a user for\n * different form fields. Using this prop will update the\n * {@link UserAgentAutocompleteProps.name} and {@link autoComplete} to default to\n * this value.\n *\n * @example\n * ```tsx\n * <Form>\n * <TextField\n * label=\"Enter your credit card number\"\n * autoCompleteValue=\"cc-number\"\n * {...creditCardProps}\n * inputMode=\"number\"\n * />\n * <TextField\n * label=\"Name on card\"\n * autoCompleteValue=\"cc-name\"\n * {...creditCardNameProps}\n * />\n * <TextField\n * label=\"Security code\"\n * autoCompleteValue=\"cc-csc\"\n * {...securityCodeProps}\n * inputMode=\"number\"\n * />\n * <Button type=\"submit\">Submit</Button>\n * </Form>\n * ```\n *\n * @see https://html.spec.whatwg.org/multipage/forms.html#autofill\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values\n * @see {@link AutocompleteValue}\n * @see {@link autoComplete}\n * @see {@link UserAgentAutocompleteProps.name}\n */\n autoCompleteValue?: AutocompleteValue;\n\n /**\n * @see {@link autoCompleteValue}\n * @defaultValue `autoCompleteValue`\n */\n autoComplete?: InputHTMLAttributes<HTMLInputElement>[\"autoComplete\"];\n\n /**\n * @see {@link autoCompleteValue}\n * @defaultValue `autoCompleteValue`\n */\n name?: string;\n}\n\nexport interface FormMessageClassNameOptions {\n className?: string;\n\n /**\n * Boolean if the message should gain the error state which changes the text\n * color to `red` by default.\n *\n * @defaultValue `false`\n */\n error?: boolean;\n\n /**\n * The current theme for the related text field. This is really only used to\n * match the current horizontal padding of the text field.\n *\n * @defaultValue `\"outline\"`\n */\n theme?: FormTheme;\n}\n\nexport interface FormMessageProps\n extends Omit<HTMLAttributes<HTMLDivElement>, \"minLength\" | \"maxLength\">,\n FormMessageClassNameOptions {\n /**\n * If this component is acting as a form-level error message handler, the role\n * should be updated to be `\"alert\"` for additional accessibility.\n *\n * Note: when creating a form-level error message handler, the messages should\n * no longer appear as the user types and instead once the user tries to\n * submit the form. Having an alert role disrupts normal screen reader\n * behavior by immediately reading changes in this element.\n *\n * @defaultValue `undefined`\n */\n role?: \"alert\";\n\n /**\n * Boolean if the children should no longer be wrapped in a `<p>` tag. This\n * should normally only be disabled if using a custom error message wrapper or\n * the counter behavior is not being used. To get correct alignments of the\n * message and counter, the `children` must be wrapped in some element and\n * cannot be plain test.\n *\n * Note: this will always be considered `true` if the `role` is set to\n * `\"alert\"`.\n *\n * @defaultValue `false`\n */\n disableWrap?: boolean;\n\n /**\n * An optional style to apply to the `<p>` tag that surrounds the `children`.\n * This will not be used if `role=\"alert\"` or `disableWrap={true}`.\n */\n messageStyle?: CSSProperties;\n\n /**\n * An optional className to apply to the `<p>` tag that surrounds the\n * `children`. This will not be used if `role=\"alert\"` or\n * `disableWrap={true}`.\n */\n messageClassName?: string;\n}\n\n/**\n * Props that are used to automatically add a counter for the remaining letters\n * available for the text field. The counter will always be created to the right\n * of the optional message.\n *\n * The counter is really a simple string of: `${length} / ${maxLength}`.\n *\n * If you need additional customization, it is recommended to create your own\n * implementation such as:\n *\n * ```tsx\n * <FormMessage>\n * {errorMessage}\n * <MyCounter {...props} />\n * </FormMessage>\n * ```\n *\n * Note: this should not be used alongside form-level messages.\n *\n * @since 2.9.0 Renamed from `FormMessageCounterProps` to\n * `FormMessageInputLengthCounterProps` since a `FormMessageCounter` component\n * was added\n */\nexport interface FormMessageInputLengthCounterProps {\n /**\n * The current length of the value in the related text field.\n */\n length: number;\n\n /**\n * The max length allowed for the value in the related text field.\n */\n maxLength: number;\n\n /**\n * An optional style to apply to the counter wrapper element.\n */\n counterStyle?: CSSProperties;\n\n /**\n * An optional className to apply to the counter wrapper element.\n */\n counterClassName?: string;\n}\n\nexport interface FormMessageWithCounterProps\n extends FormMessageProps,\n FormMessageInputLengthCounterProps {}\n\n/**\n * @since 6.0.0\n */\nexport interface FormMessageWithoutCounterProps extends FormMessageProps {\n length?: never;\n maxLength?: never;\n counterStyle?: never;\n counterClassName?: never;\n}\n\nexport interface FormMessageContainerExtension {\n /**\n * If the extension doesn't actually want to render the `FormMessage`\n * component, these props are optional. It kind of eliminates the whole\n * purpose of this component though.\n */\n messageProps?: PropsWithRef<\n FormMessageProps & Partial<FormMessageInputLengthCounterProps>,\n HTMLDivElement\n >;\n\n /**\n * Any props (and an optional ref) to provide to the `<div>` surrounding the\n * children and `FormMessage` component.\n *\n * Note: This will not be used if the `messageProps` are not provided since\n * only the `children` will be returned without the container.\n */\n messageContainerProps?: PropsWithRef<\n HTMLAttributes<HTMLDivElement>,\n HTMLDivElement\n >;\n}\n\n/** @since 6.0.0 */\nexport interface LabelClassNameOptions {\n className?: string;\n\n /**\n * Set this to `true` to remove the `gap` style from the label.\n *\n * @see `$label-gap`\n * @defaultValue `false`\n */\n gap?: boolean;\n\n /**\n * Set this to `true` when the parent `TextFieldContainer` has the `dense`\n * spec enabled. This updates the floating styles to match the smaller height.\n *\n * @defaultValue `false`\n */\n dense?: boolean;\n\n /**\n * Set this to `true` to update the label's color to the error color.\n *\n * @see `$error-color`\n * @defaultValue `false`\n */\n error?: boolean;\n\n /**\n * Set this to `true` to update the label's color to the active color.\n *\n * @see `$active-color`\n * @defaultValue `false`\n */\n active?: boolean;\n\n /**\n * Set this to `true` if the label should gain `flex-direction: column`\n * styling.\n *\n * @defaultValue `false`\n */\n stacked?: boolean;\n\n /**\n * Set this to `true` to update the label's color to be the disabled color.\n *\n * @see `$disabled-color`\n * @defaultValue `false`\n */\n disabled?: boolean;\n\n /**\n * Set this to true when label can floating above an input, textarea, or\n * select inside of a `TextFieldContainer`.\n *\n * @defaultValue `false`\n */\n floating?: boolean;\n\n /**\n * Set this to true when label is currently floating above an input,\n * textarea, or selected inside of a `TextFieldContainer`.\n *\n * @see {@link active}\n * @defaultValue `active`\n */\n floatingActive?: boolean;\n\n /**\n * Set this to `true` to gain `flex-direction: row-reversed` styling. If the\n * {@link stacked} prop is also `true`, `flex-direction: column-reversed` will\n * be applied.\n *\n * @defaultValue `false`\n */\n reversed?: boolean;\n\n /**\n * @defaultValue `false`\n */\n inactive?: boolean;\n}\n\nexport interface LabelProps\n extends LabelHTMLAttributes<HTMLLabelElement>,\n LabelClassNameOptions {}\n\n/**\n * @since 6.0.0\n */\nexport interface ConfigurableTextFieldAddonProps\n extends HTMLAttributes<HTMLSpanElement> {\n /**\n * Boolean if the addon should be presentational only and prevent pointer\n * events.\n *\n * @defaultValue `false`\n */\n pointerEvents?: boolean;\n}\n\n/**\n * @since 6.0.0 Added support for `leftAddonProps` and\n * `rightAddonProps`.\n */\nexport interface TextFieldContainerOptions\n extends FormThemeOptions,\n FormComponentStates {\n /**\n * Set this to `true` to enable the dense spec which reduces the height.\n *\n * @defaultValue `false`\n */\n dense?: boolean;\n\n /**\n * Set this to `true` to change the style from `display: flex` to\n * `display: inline-flex`.\n *\n * @defaultValue `false`\n */\n inline?: boolean;\n\n /**\n * Set this to `true` if this component should stretch to fill a flex or grid\n * container using `flex: 1 1 auto`.\n *\n * @defaultValue `false`\n */\n stretch?: boolean;\n\n /**\n * This should generally be an icon or a button that will be placed before the\n * `TextField` or `TextArea`.\n */\n leftAddon?: ReactNode;\n\n /**\n * Any additional props to pass to the `<span>` surrounding the {@link leftAddon}.\n *\n * @since 6.0.0\n */\n leftAddonProps?: PropsWithRef<\n ConfigurableTextFieldAddonProps,\n HTMLSpanElement\n >;\n\n /**\n * @see {@link TextFieldAddonProps.disabled}\n *\n * @defaultValue `false`\n */\n disableLeftAddonStyles?: boolean;\n\n /**\n * This should generally be an icon or a button that will be placed after the\n * `TextField` or `TextArea`.\n */\n rightAddon?: ReactNode;\n\n /**\n * Any additional props to pass to the `<span>` surrounding the {@link rightAddon}.\n *\n * @since 6.0.0\n */\n rightAddonProps?: PropsWithRef<\n ConfigurableTextFieldAddonProps,\n HTMLSpanElement\n >;\n\n /**\n * @see {@link TextFieldAddonProps.disabled}\n *\n * @defaultValue `false`\n */\n disableRightAddonStyles?: boolean;\n}\n\nexport interface FormFieldOptions\n extends TextFieldContainerOptions,\n FormMessageContainerExtension {\n /**\n * An optional floating label to use with the text field. A label is generally\n * recommended for accessibility, but can be omitted if an `aria-label` or\n * `aria-labelledby` is provided.\n */\n label?: ReactNode;\n\n /**\n * Any additional props and/or ref that should be passed to the `<label>`\n * element when a {@link label} is provided.\n *\n * @example\n * ```tsx\n * labelProps={{\n * ref: labelRef,\n * style: {},\n * className: \"some-custom-class-name\",\n * onClick: (event) => {\n * // do something\n * }\n * }}\n * ```\n */\n labelProps?: PropsWithRef<LabelProps, HTMLLabelElement>;\n\n /**\n * A convenience prop to apply a custom style to a label. This is equivalent\n * to:\n *\n * ```ts\n * labelProps={{\n * style: // some style here\n * }}\n * ```\n */\n labelStyle?: CSSProperties;\n\n /**\n * A convenience prop to apply a custom className to a label. This is\n * equivalent to:\n *\n * ```ts\n * labelProps={{\n * className: \"some-class-name\",\n * }}\n * ```\n */\n labelClassName?: string;\n}\n"],"names":[],"rangeMappings":"","mappings":"AAihBA,WAmDC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type UseStateInitializer, type UseStateSetter } from "../types.js";
|
|
2
|
-
/** @
|
|
2
|
+
/** @since 6.0.0 */
|
|
3
3
|
export interface CheckboxGroupOptions<V> {
|
|
4
4
|
/**
|
|
5
5
|
* A `name` to apply to all the checkboxes within the group. This is required
|
|
@@ -20,8 +20,7 @@ export interface CheckboxGroupOptions<V> {
|
|
|
20
20
|
* checkbox is checked and determine if all the checkboxes have manually be
|
|
21
21
|
* selected.
|
|
22
22
|
*
|
|
23
|
-
* @example
|
|
24
|
-
* Indeterminate Behavior
|
|
23
|
+
* @example Indeterminate Behavior
|
|
25
24
|
* ```tsx
|
|
26
25
|
* const OPTIONS = [
|
|
27
26
|
* { label: "First", value: "a" },
|
|
@@ -45,7 +44,7 @@ export interface CheckboxGroupOptions<V> {
|
|
|
45
44
|
*/
|
|
46
45
|
defaultCheckedValues?: UseStateInitializer<readonly V[]>;
|
|
47
46
|
}
|
|
48
|
-
/** @
|
|
47
|
+
/** @since 6.0.0 */
|
|
49
48
|
export interface CheckboxGroupImplementation<V extends string> {
|
|
50
49
|
reset(): void;
|
|
51
50
|
checkedValues: ReadonlySet<V>;
|
|
@@ -57,7 +56,7 @@ export interface CheckboxGroupImplementation<V extends string> {
|
|
|
57
56
|
onChange(): void;
|
|
58
57
|
};
|
|
59
58
|
}
|
|
60
|
-
/** @
|
|
59
|
+
/** @since 6.0.0 */
|
|
61
60
|
export interface IndeterminateCheckboxGroupImplementation<V extends string> extends CheckboxGroupImplementation<V> {
|
|
62
61
|
getIndeterminateProps(): {
|
|
63
62
|
"aria-checked": "mixed" | undefined;
|
|
@@ -67,7 +66,7 @@ export interface IndeterminateCheckboxGroupImplementation<V extends string> exte
|
|
|
67
66
|
onChange(): void;
|
|
68
67
|
};
|
|
69
68
|
}
|
|
70
|
-
/** @
|
|
69
|
+
/** @since 6.0.0 */
|
|
71
70
|
export interface MenuItemCheckboxGroupImplementation<V extends string> {
|
|
72
71
|
reset(): void;
|
|
73
72
|
checkedValues: ReadonlySet<V>;
|
|
@@ -77,7 +76,7 @@ export interface MenuItemCheckboxGroupImplementation<V extends string> {
|
|
|
77
76
|
onCheckedChange(): void;
|
|
78
77
|
};
|
|
79
78
|
}
|
|
80
|
-
/** @
|
|
79
|
+
/** @since 6.0.0 */
|
|
81
80
|
export interface IndeterminateMenuItemCheckboxGroupImplementation<V extends string> extends MenuItemCheckboxGroupImplementation<V> {
|
|
82
81
|
getIndeterminateProps(): {
|
|
83
82
|
"aria-checked": "mixed" | undefined;
|
|
@@ -86,7 +85,7 @@ export interface IndeterminateMenuItemCheckboxGroupImplementation<V extends stri
|
|
|
86
85
|
onCheckedChange(): void;
|
|
87
86
|
};
|
|
88
87
|
}
|
|
89
|
-
/** @
|
|
88
|
+
/** @since 6.0.0 */
|
|
90
89
|
export interface CombinedCheckboxGroupReturnValue<V extends string> {
|
|
91
90
|
reset(): void;
|
|
92
91
|
checkedValues: ReadonlySet<V>;
|
|
@@ -108,8 +107,7 @@ export interface CombinedCheckboxGroupReturnValue<V extends string> {
|
|
|
108
107
|
};
|
|
109
108
|
}
|
|
110
109
|
/**
|
|
111
|
-
* @example
|
|
112
|
-
* Checkbox Group
|
|
110
|
+
* @example Checkbox Group
|
|
113
111
|
* ```tsx
|
|
114
112
|
* const { getCheckboxProps, checkedValues } = useCheckboxGroup({ name: "example" });
|
|
115
113
|
*
|
|
@@ -128,7 +126,7 @@ export interface CombinedCheckboxGroupReturnValue<V extends string> {
|
|
|
128
126
|
* );
|
|
129
127
|
* ```
|
|
130
128
|
*
|
|
131
|
-
* @
|
|
129
|
+
* @since 6.0.0
|
|
132
130
|
*/
|
|
133
131
|
export declare function useCheckboxGroup<V extends string>(options: CheckboxGroupOptions<V> & {
|
|
134
132
|
menu?: false;
|
|
@@ -136,8 +134,7 @@ export declare function useCheckboxGroup<V extends string>(options: CheckboxGrou
|
|
|
136
134
|
values?: never;
|
|
137
135
|
}): CheckboxGroupImplementation<V>;
|
|
138
136
|
/**
|
|
139
|
-
* @example
|
|
140
|
-
* Indeterminate Checkbox Group
|
|
137
|
+
* @example Indeterminate Checkbox Group
|
|
141
138
|
* ```tsx
|
|
142
139
|
* const OPTIONS = [
|
|
143
140
|
* { label: "First", value: "a" },
|
|
@@ -165,7 +162,7 @@ export declare function useCheckboxGroup<V extends string>(options: CheckboxGrou
|
|
|
165
162
|
* );
|
|
166
163
|
* ```
|
|
167
164
|
*
|
|
168
|
-
* @
|
|
165
|
+
* @since 6.0.0
|
|
169
166
|
*/
|
|
170
167
|
export declare function useCheckboxGroup<V extends string>(options: CheckboxGroupOptions<V> & {
|
|
171
168
|
menu?: false;
|
|
@@ -173,8 +170,7 @@ export declare function useCheckboxGroup<V extends string>(options: CheckboxGrou
|
|
|
173
170
|
values: readonly V[];
|
|
174
171
|
}): IndeterminateCheckboxGroupImplementation<V>;
|
|
175
172
|
/**
|
|
176
|
-
* @example
|
|
177
|
-
* MenuItemCheckbox Group
|
|
173
|
+
* @example MenuItemCheckbox Group
|
|
178
174
|
* ```tsx
|
|
179
175
|
* const { getCheckboxProps, checkedValues } = useCheckboxGroup({ menu: true });
|
|
180
176
|
*
|
|
@@ -193,7 +189,7 @@ export declare function useCheckboxGroup<V extends string>(options: CheckboxGrou
|
|
|
193
189
|
* );
|
|
194
190
|
* ```
|
|
195
191
|
*
|
|
196
|
-
* @
|
|
192
|
+
* @since 6.0.0
|
|
197
193
|
*/
|
|
198
194
|
export declare function useCheckboxGroup<V extends string>(options: CheckboxGroupOptions<V> & {
|
|
199
195
|
menu: true;
|
|
@@ -201,8 +197,7 @@ export declare function useCheckboxGroup<V extends string>(options: CheckboxGrou
|
|
|
201
197
|
values?: never;
|
|
202
198
|
}): MenuItemCheckboxGroupImplementation<V>;
|
|
203
199
|
/**
|
|
204
|
-
* @example
|
|
205
|
-
* Indeterminate MenuItemCheckbox Group
|
|
200
|
+
* @example Indeterminate MenuItemCheckbox Group
|
|
206
201
|
* ```tsx
|
|
207
202
|
* const OPTIONS = [
|
|
208
203
|
* { label: "First", value: "a" },
|
|
@@ -230,7 +225,7 @@ export declare function useCheckboxGroup<V extends string>(options: CheckboxGrou
|
|
|
230
225
|
* );
|
|
231
226
|
* ```
|
|
232
227
|
*
|
|
233
|
-
* @
|
|
228
|
+
* @since 6.0.0
|
|
234
229
|
*/
|
|
235
230
|
export declare function useCheckboxGroup<V extends string>(options: CheckboxGroupOptions<V> & {
|
|
236
231
|
menu: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/form/useCheckboxGroup.ts"],"sourcesContent":["\"use client\";\nimport { useCallback, useRef, useState } from \"react\";\nimport { type UseStateInitializer, type UseStateSetter } from \"../types.js\";\n\nconst EMPTY_LIST = [] as const;\n\n/** @remarks \\@since 6.0.0 */\nexport interface CheckboxGroupOptions<V> {\n /**\n * A `name` to apply to all the checkboxes within the group. This is required\n * if the {@link menu} option is set to `true`.\n */\n name?: string;\n\n /**\n * Set this to `true` if using the `MenuItemCheckbox` component instead of the\n * `Checkbox` so the correct props can be provided.\n *\n * @defaultValue `false`\n */\n menu?: boolean;\n\n /**\n * This prop **must** be defined to enable the indeterminate checkbox feature\n * from the hook. This should be a list of all the possible checkbox values in\n * the group. This will be used to select all values when the indeterminate\n * checkbox is checked and determine if all the checkboxes have manually be\n * selected.\n *\n * @example\n * Indeterminate Behavior\n * ```tsx\n * const OPTIONS = [\n * { label: \"First\", value: \"a\" },\n * { label: \"Second\", value: \"b\" },\n * { label: \"Third\", value: \"c\" },\n * ] as const:\n * const VALUES = OPTIONS.map(({ value }) => value) as const;\n *\n * const {\n * getCheckboxProps,\n * getIndeterminateProps,\n * checkedValues,\n * } = useCheckboxGroup({ name: \"group\", values: VALUES });\n * ```\n */\n values?: readonly V[];\n\n /**\n * Set this to a list of checkbox values that should be checked by default.\n *\n * @defaultValue `[]`\n */\n defaultCheckedValues?: UseStateInitializer<readonly V[]>;\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface CheckboxGroupImplementation<V extends string> {\n reset(): void;\n checkedValues: ReadonlySet<V>;\n setCheckedValues: UseStateSetter<ReadonlySet<V>>;\n getCheckboxProps(value: V): {\n name: string;\n value: V;\n checked: boolean;\n onChange(): void;\n };\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface IndeterminateCheckboxGroupImplementation<V extends string>\n extends CheckboxGroupImplementation<V> {\n getIndeterminateProps(): {\n \"aria-checked\": \"mixed\" | undefined;\n name: string;\n checked: boolean;\n indeterminate: boolean;\n onChange(): void;\n };\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface MenuItemCheckboxGroupImplementation<V extends string> {\n reset(): void;\n checkedValues: ReadonlySet<V>;\n setCheckedValues: UseStateSetter<ReadonlySet<V>>;\n getCheckboxProps(value: V): {\n checked: boolean;\n onCheckedChange(): void;\n };\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface IndeterminateMenuItemCheckboxGroupImplementation<\n V extends string,\n> extends MenuItemCheckboxGroupImplementation<V> {\n getIndeterminateProps(): {\n \"aria-checked\": \"mixed\" | undefined;\n checked: boolean;\n indeterminate: boolean;\n onCheckedChange(): void;\n };\n}\n\n/** @remarks \\@since 6.0.0 */\nexport interface CombinedCheckboxGroupReturnValue<V extends string> {\n reset(): void;\n checkedValues: ReadonlySet<V>;\n setCheckedValues: UseStateSetter<ReadonlySet<V>>;\n getCheckboxProps(value: V): {\n name?: string;\n value?: V;\n checked: boolean;\n onChange?(): void;\n onCheckedChange?(): void;\n };\n getIndeterminateProps?(): {\n \"aria-checked\": \"mixed\" | undefined;\n name?: string;\n checked: boolean;\n indeterminate: boolean;\n onChange?(): void;\n onCheckedChange?(): void;\n };\n}\n\n/**\n * @example\n * Checkbox Group\n * ```tsx\n * const { getCheckboxProps, checkedValues } = useCheckboxGroup({ name: \"example\" });\n *\n * return (\n * <>\n * <Checkbox {...getCheckboxProps(\"a\")}>\n * First\n * </Checkbox>\n * <Checkbox {...getCheckboxProps(\"b\")}>\n * Second\n * </Checkbox>\n * <Checkbox {...getCheckboxProps(\"c\")}>\n * Third\n * </Checkbox>\n * </>\n * );\n * ```\n *\n * @remarks \\@since 6.0.0\n */\nexport function useCheckboxGroup<V extends string>(\n options: CheckboxGroupOptions<V> & {\n menu?: false;\n name: string;\n values?: never;\n }\n): CheckboxGroupImplementation<V>;\n/**\n * @example\n * Indeterminate Checkbox Group\n * ```tsx\n * const OPTIONS = [\n * { label: \"First\", value: \"a\" },\n * { label: \"Second\", value: \"b\" },\n * { label: \"Third\", value: \"c\" },\n * ] as const:\n * const VALUES = OPTIONS.map(({ value }) => value) as const;\n *\n * const {\n * getCheckboxProps,\n * getIndeterminateProps,\n * checkedValues\n * } = useCheckboxGroup({\n * name: \"example\",\n * values: VALUES,\n * });\n *\n * return (\n * <>\n * <Checkbox {...getIndeterminateProps()} label=\"Select all\" />\n * {VALUES.map(({ label, value }) => (\n * <Checkbox key={value} label={label} {...getCheckboxProps(value)} />\n * ))}\n * </>\n * );\n * ```\n *\n * @remarks \\@since 6.0.0\n */\nexport function useCheckboxGroup<V extends string>(\n options: CheckboxGroupOptions<V> & {\n menu?: false;\n name: string;\n values: readonly V[];\n }\n): IndeterminateCheckboxGroupImplementation<V>;\n/**\n * @example\n * MenuItemCheckbox Group\n * ```tsx\n * const { getCheckboxProps, checkedValues } = useCheckboxGroup({ menu: true });\n *\n * return (\n * <>\n * <MenuItemCheckbox {...getCheckboxProps(\"a\")}>\n * First\n * </MenuItemCheckbox>\n * <MenuItemCheckbox {...getCheckboxProps(\"b\")}>\n * Second\n * </MenuItemCheckbox>\n * <MenuItemCheckbox {...getCheckboxProps(\"c\")}>\n * Third\n * </MenuItemCheckbox>\n * </>\n * );\n * ```\n *\n * @remarks \\@since 6.0.0\n */\nexport function useCheckboxGroup<V extends string>(\n options: CheckboxGroupOptions<V> & {\n menu: true;\n name?: never;\n values?: never;\n }\n): MenuItemCheckboxGroupImplementation<V>;\n/**\n * @example\n * Indeterminate MenuItemCheckbox Group\n * ```tsx\n * const OPTIONS = [\n * { label: \"First\", value: \"a\" },\n * { label: \"Second\", value: \"b\" },\n * { label: \"Third\", value: \"c\" },\n * ] as const:\n * const VALUES = OPTIONS.map(({ value }) => value) as const;\n *\n * const { getCheckboxProps, getIndeterminateProps, checkedValues } = useCheckboxGroup({\n * menu: true,\n * values: VALUES,\n * });\n *\n * return (\n * <>\n * <MenuItemCheckbox {...getIndeterminateProps()}>\n * All\n * <MenuItemCheckbox>\n * {OPTIONS.map(({ label, value }) => (\n * <MenuItemCheckbox key={value} {...getCheckboxProps(value)}>\n * {label}\n * </MenuItemCheckbox>\n * ))}\n * </>\n * );\n * ```\n *\n * @remarks \\@since 6.0.0\n */\nexport function useCheckboxGroup<V extends string>(\n options: CheckboxGroupOptions<V> & {\n menu: true;\n name?: never;\n values: readonly V[];\n }\n): IndeterminateMenuItemCheckboxGroupImplementation<V>;\nexport function useCheckboxGroup<V extends string>(\n options: CheckboxGroupOptions<V>\n): CombinedCheckboxGroupReturnValue<V> {\n const {\n name,\n menu = false,\n values,\n defaultCheckedValues = EMPTY_LIST,\n } = options;\n const [checkedValues, setCheckedValues] = useState<ReadonlySet<V>>(() => {\n if (typeof defaultCheckedValues === \"function\") {\n return new Set(defaultCheckedValues());\n }\n\n return new Set(defaultCheckedValues);\n });\n const initial = useRef(checkedValues);\n\n let getIndeterminateProps: CombinedCheckboxGroupReturnValue<V>[\"getIndeterminateProps\"];\n if (values) {\n getIndeterminateProps = () => {\n const checked = checkedValues.size > 0;\n const indeterminate = checked && checkedValues.size < values.length;\n\n return {\n \"aria-checked\": indeterminate ? \"mixed\" : undefined,\n name,\n checked,\n indeterminate,\n [menu ? \"onCheckedChange\" : \"onChange\"]() {\n setCheckedValues(() => {\n if (checkedValues.size === 0 || indeterminate) {\n return new Set(values);\n }\n\n return new Set();\n });\n },\n };\n };\n }\n\n return {\n reset: useCallback(() => {\n setCheckedValues(initial.current);\n }, []),\n checkedValues,\n setCheckedValues,\n getIndeterminateProps,\n getCheckboxProps(value) {\n return {\n name,\n value: menu ? undefined : value,\n checked: checkedValues.has(value),\n [menu ? \"onCheckedChange\" : \"onChange\"]() {\n setCheckedValues((prevValues) => {\n const nextValues = new Set(prevValues);\n if (prevValues.has(value)) {\n nextValues.delete(value);\n } else {\n nextValues.add(value);\n }\n\n return nextValues;\n });\n },\n };\n },\n };\n}\n"],"names":["useCallback","useRef","useState","EMPTY_LIST","useCheckboxGroup","options","name","menu","values","defaultCheckedValues","checkedValues","setCheckedValues","Set","initial","getIndeterminateProps","checked","size","indeterminate","length","undefined","reset","current","getCheckboxProps","value","has","prevValues","nextValues","delete","add"],"mappings":"AAAA;AACA,SAASA,WAAW,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAQ;AAGtD,MAAMC,aAAa,EAAE;AAoQrB,OAAO,SAASC,iBACdC,OAAgC;IAEhC,MAAM,EACJC,IAAI,EACJC,OAAO,KAAK,EACZC,MAAM,EACNC,uBAAuBN,UAAU,EAClC,GAAGE;IACJ,MAAM,CAACK,eAAeC,iBAAiB,GAAGT,SAAyB;QACjE,IAAI,OAAOO,yBAAyB,YAAY;YAC9C,OAAO,IAAIG,IAAIH;QACjB;QAEA,OAAO,IAAIG,IAAIH;IACjB;IACA,MAAMI,UAAUZ,OAAOS;IAEvB,IAAII;IACJ,IAAIN,QAAQ;QACVM,wBAAwB;YACtB,MAAMC,UAAUL,cAAcM,IAAI,GAAG;YACrC,MAAMC,gBAAgBF,WAAWL,cAAcM,IAAI,GAAGR,OAAOU,MAAM;YAEnE,OAAO;gBACL,gBAAgBD,gBAAgB,UAAUE;gBAC1Cb;gBACAS;gBACAE;gBACA,CAACV,OAAO,oBAAoB,WAAW;oBACrCI,iBAAiB;wBACf,IAAID,cAAcM,IAAI,KAAK,KAAKC,eAAe;4BAC7C,OAAO,IAAIL,IAAIJ;wBACjB;wBAEA,OAAO,IAAII;oBACb;gBACF;YACF;QACF;IACF;IAEA,OAAO;QACLQ,OAAOpB,YAAY;YACjBW,iBAAiBE,QAAQQ,OAAO;QAClC,GAAG,EAAE;QACLX;QACAC;QACAG;QACAQ,kBAAiBC,KAAK;YACpB,OAAO;gBACLjB;gBACAiB,OAAOhB,OAAOY,YAAYI;gBAC1BR,SAASL,cAAcc,GAAG,CAACD;gBAC3B,CAAChB,OAAO,oBAAoB,WAAW;oBACrCI,iBAAiB,CAACc;wBAChB,MAAMC,aAAa,IAAId,IAAIa;wBAC3B,IAAIA,WAAWD,GAAG,CAACD,QAAQ;4BACzBG,WAAWC,MAAM,CAACJ;wBACpB,OAAO;4BACLG,WAAWE,GAAG,CAACL;wBACjB;wBAEA,OAAOG;oBACT;gBACF;YACF;QACF;IACF;AACF"}
|
|
1
|
+
{"version":3,"sources":["../../src/form/useCheckboxGroup.ts"],"sourcesContent":["\"use client\";\nimport { useCallback, useRef, useState } from \"react\";\nimport { type UseStateInitializer, type UseStateSetter } from \"../types.js\";\n\nconst EMPTY_LIST = [] as const;\n\n/** @since 6.0.0 */\nexport interface CheckboxGroupOptions<V> {\n /**\n * A `name` to apply to all the checkboxes within the group. This is required\n * if the {@link menu} option is set to `true`.\n */\n name?: string;\n\n /**\n * Set this to `true` if using the `MenuItemCheckbox` component instead of the\n * `Checkbox` so the correct props can be provided.\n *\n * @defaultValue `false`\n */\n menu?: boolean;\n\n /**\n * This prop **must** be defined to enable the indeterminate checkbox feature\n * from the hook. This should be a list of all the possible checkbox values in\n * the group. This will be used to select all values when the indeterminate\n * checkbox is checked and determine if all the checkboxes have manually be\n * selected.\n *\n * @example Indeterminate Behavior\n * ```tsx\n * const OPTIONS = [\n * { label: \"First\", value: \"a\" },\n * { label: \"Second\", value: \"b\" },\n * { label: \"Third\", value: \"c\" },\n * ] as const:\n * const VALUES = OPTIONS.map(({ value }) => value) as const;\n *\n * const {\n * getCheckboxProps,\n * getIndeterminateProps,\n * checkedValues,\n * } = useCheckboxGroup({ name: \"group\", values: VALUES });\n * ```\n */\n values?: readonly V[];\n\n /**\n * Set this to a list of checkbox values that should be checked by default.\n *\n * @defaultValue `[]`\n */\n defaultCheckedValues?: UseStateInitializer<readonly V[]>;\n}\n\n/** @since 6.0.0 */\nexport interface CheckboxGroupImplementation<V extends string> {\n reset(): void;\n checkedValues: ReadonlySet<V>;\n setCheckedValues: UseStateSetter<ReadonlySet<V>>;\n getCheckboxProps(value: V): {\n name: string;\n value: V;\n checked: boolean;\n onChange(): void;\n };\n}\n\n/** @since 6.0.0 */\nexport interface IndeterminateCheckboxGroupImplementation<V extends string>\n extends CheckboxGroupImplementation<V> {\n getIndeterminateProps(): {\n \"aria-checked\": \"mixed\" | undefined;\n name: string;\n checked: boolean;\n indeterminate: boolean;\n onChange(): void;\n };\n}\n\n/** @since 6.0.0 */\nexport interface MenuItemCheckboxGroupImplementation<V extends string> {\n reset(): void;\n checkedValues: ReadonlySet<V>;\n setCheckedValues: UseStateSetter<ReadonlySet<V>>;\n getCheckboxProps(value: V): {\n checked: boolean;\n onCheckedChange(): void;\n };\n}\n\n/** @since 6.0.0 */\nexport interface IndeterminateMenuItemCheckboxGroupImplementation<\n V extends string,\n> extends MenuItemCheckboxGroupImplementation<V> {\n getIndeterminateProps(): {\n \"aria-checked\": \"mixed\" | undefined;\n checked: boolean;\n indeterminate: boolean;\n onCheckedChange(): void;\n };\n}\n\n/** @since 6.0.0 */\nexport interface CombinedCheckboxGroupReturnValue<V extends string> {\n reset(): void;\n checkedValues: ReadonlySet<V>;\n setCheckedValues: UseStateSetter<ReadonlySet<V>>;\n getCheckboxProps(value: V): {\n name?: string;\n value?: V;\n checked: boolean;\n onChange?(): void;\n onCheckedChange?(): void;\n };\n getIndeterminateProps?(): {\n \"aria-checked\": \"mixed\" | undefined;\n name?: string;\n checked: boolean;\n indeterminate: boolean;\n onChange?(): void;\n onCheckedChange?(): void;\n };\n}\n\n/**\n * @example Checkbox Group\n * ```tsx\n * const { getCheckboxProps, checkedValues } = useCheckboxGroup({ name: \"example\" });\n *\n * return (\n * <>\n * <Checkbox {...getCheckboxProps(\"a\")}>\n * First\n * </Checkbox>\n * <Checkbox {...getCheckboxProps(\"b\")}>\n * Second\n * </Checkbox>\n * <Checkbox {...getCheckboxProps(\"c\")}>\n * Third\n * </Checkbox>\n * </>\n * );\n * ```\n *\n * @since 6.0.0\n */\nexport function useCheckboxGroup<V extends string>(\n options: CheckboxGroupOptions<V> & {\n menu?: false;\n name: string;\n values?: never;\n }\n): CheckboxGroupImplementation<V>;\n/**\n * @example Indeterminate Checkbox Group\n * ```tsx\n * const OPTIONS = [\n * { label: \"First\", value: \"a\" },\n * { label: \"Second\", value: \"b\" },\n * { label: \"Third\", value: \"c\" },\n * ] as const:\n * const VALUES = OPTIONS.map(({ value }) => value) as const;\n *\n * const {\n * getCheckboxProps,\n * getIndeterminateProps,\n * checkedValues\n * } = useCheckboxGroup({\n * name: \"example\",\n * values: VALUES,\n * });\n *\n * return (\n * <>\n * <Checkbox {...getIndeterminateProps()} label=\"Select all\" />\n * {VALUES.map(({ label, value }) => (\n * <Checkbox key={value} label={label} {...getCheckboxProps(value)} />\n * ))}\n * </>\n * );\n * ```\n *\n * @since 6.0.0\n */\nexport function useCheckboxGroup<V extends string>(\n options: CheckboxGroupOptions<V> & {\n menu?: false;\n name: string;\n values: readonly V[];\n }\n): IndeterminateCheckboxGroupImplementation<V>;\n/**\n * @example MenuItemCheckbox Group\n * ```tsx\n * const { getCheckboxProps, checkedValues } = useCheckboxGroup({ menu: true });\n *\n * return (\n * <>\n * <MenuItemCheckbox {...getCheckboxProps(\"a\")}>\n * First\n * </MenuItemCheckbox>\n * <MenuItemCheckbox {...getCheckboxProps(\"b\")}>\n * Second\n * </MenuItemCheckbox>\n * <MenuItemCheckbox {...getCheckboxProps(\"c\")}>\n * Third\n * </MenuItemCheckbox>\n * </>\n * );\n * ```\n *\n * @since 6.0.0\n */\nexport function useCheckboxGroup<V extends string>(\n options: CheckboxGroupOptions<V> & {\n menu: true;\n name?: never;\n values?: never;\n }\n): MenuItemCheckboxGroupImplementation<V>;\n/**\n * @example Indeterminate MenuItemCheckbox Group\n * ```tsx\n * const OPTIONS = [\n * { label: \"First\", value: \"a\" },\n * { label: \"Second\", value: \"b\" },\n * { label: \"Third\", value: \"c\" },\n * ] as const:\n * const VALUES = OPTIONS.map(({ value }) => value) as const;\n *\n * const { getCheckboxProps, getIndeterminateProps, checkedValues } = useCheckboxGroup({\n * menu: true,\n * values: VALUES,\n * });\n *\n * return (\n * <>\n * <MenuItemCheckbox {...getIndeterminateProps()}>\n * All\n * <MenuItemCheckbox>\n * {OPTIONS.map(({ label, value }) => (\n * <MenuItemCheckbox key={value} {...getCheckboxProps(value)}>\n * {label}\n * </MenuItemCheckbox>\n * ))}\n * </>\n * );\n * ```\n *\n * @since 6.0.0\n */\nexport function useCheckboxGroup<V extends string>(\n options: CheckboxGroupOptions<V> & {\n menu: true;\n name?: never;\n values: readonly V[];\n }\n): IndeterminateMenuItemCheckboxGroupImplementation<V>;\nexport function useCheckboxGroup<V extends string>(\n options: CheckboxGroupOptions<V>\n): CombinedCheckboxGroupReturnValue<V> {\n const {\n name,\n menu = false,\n values,\n defaultCheckedValues = EMPTY_LIST,\n } = options;\n const [checkedValues, setCheckedValues] = useState<ReadonlySet<V>>(() => {\n if (typeof defaultCheckedValues === \"function\") {\n return new Set(defaultCheckedValues());\n }\n\n return new Set(defaultCheckedValues);\n });\n const initial = useRef(checkedValues);\n\n let getIndeterminateProps: CombinedCheckboxGroupReturnValue<V>[\"getIndeterminateProps\"];\n if (values) {\n getIndeterminateProps = () => {\n const checked = checkedValues.size > 0;\n const indeterminate = checked && checkedValues.size < values.length;\n\n return {\n \"aria-checked\": indeterminate ? \"mixed\" : undefined,\n name,\n checked,\n indeterminate,\n [menu ? \"onCheckedChange\" : \"onChange\"]() {\n setCheckedValues(() => {\n if (checkedValues.size === 0 || indeterminate) {\n return new Set(values);\n }\n\n return new Set();\n });\n },\n };\n };\n }\n\n return {\n reset: useCallback(() => {\n setCheckedValues(initial.current);\n }, []),\n checkedValues,\n setCheckedValues,\n getIndeterminateProps,\n getCheckboxProps(value) {\n return {\n name,\n value: menu ? undefined : value,\n checked: checkedValues.has(value),\n [menu ? \"onCheckedChange\" : \"onChange\"]() {\n setCheckedValues((prevValues) => {\n const nextValues = new Set(prevValues);\n if (prevValues.has(value)) {\n nextValues.delete(value);\n } else {\n nextValues.add(value);\n }\n\n return nextValues;\n });\n },\n };\n },\n };\n}\n"],"names":["useCallback","useRef","useState","EMPTY_LIST","useCheckboxGroup","options","name","menu","values","defaultCheckedValues","checkedValues","setCheckedValues","Set","initial","getIndeterminateProps","checked","size","indeterminate","length","undefined","reset","current","getCheckboxProps","value","has","prevValues","nextValues","delete","add"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AACA,SAASA,WAAW,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAQ;AAGtD,MAAMC,aAAa,EAAE;AA+PrB,OAAO,SAASC,iBACdC,OAAgC;IAEhC,MAAM,EACJC,IAAI,EACJC,OAAO,KAAK,EACZC,MAAM,EACNC,uBAAuBN,UAAU,EAClC,GAAGE;IACJ,MAAM,CAACK,eAAeC,iBAAiB,GAAGT,SAAyB;QACjE,IAAI,OAAOO,yBAAyB,YAAY;YAC9C,OAAO,IAAIG,IAAIH;QACjB;QAEA,OAAO,IAAIG,IAAIH;IACjB;IACA,MAAMI,UAAUZ,OAAOS;IAEvB,IAAII;IACJ,IAAIN,QAAQ;QACVM,wBAAwB;YACtB,MAAMC,UAAUL,cAAcM,IAAI,GAAG;YACrC,MAAMC,gBAAgBF,WAAWL,cAAcM,IAAI,GAAGR,OAAOU,MAAM;YAEnE,OAAO;gBACL,gBAAgBD,gBAAgB,UAAUE;gBAC1Cb;gBACAS;gBACAE;gBACA,CAACV,OAAO,oBAAoB,WAAW;oBACrCI,iBAAiB;wBACf,IAAID,cAAcM,IAAI,KAAK,KAAKC,eAAe;4BAC7C,OAAO,IAAIL,IAAIJ;wBACjB;wBAEA,OAAO,IAAII;oBACb;gBACF;YACF;QACF;IACF;IAEA,OAAO;QACLQ,OAAOpB,YAAY;YACjBW,iBAAiBE,QAAQQ,OAAO;QAClC,GAAG,EAAE;QACLX;QACAC;QACAG;QACAQ,kBAAiBC,KAAK;YACpB,OAAO;gBACLjB;gBACAiB,OAAOhB,OAAOY,YAAYI;gBAC1BR,SAASL,cAAcc,GAAG,CAACD;gBAC3B,CAAChB,OAAO,oBAAoB,WAAW;oBACrCI,iBAAiB,CAACc;wBAChB,MAAMC,aAAa,IAAId,IAAIa;wBAC3B,IAAIA,WAAWD,GAAG,CAACD,QAAQ;4BACzBG,WAAWC,MAAM,CAACJ;wBACpB,OAAO;4BACLG,WAAWE,GAAG,CAACL;wBACjB;wBAEA,OAAOG;oBACT;gBACF;YACF;QACF;IACF;AACF"}
|