@react-md/core 1.0.0-next.0 → 1.0.0-next.10
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/.stylelintrc.json +14 -0
- package/.turbo/turbo-build.log +11 -7
- package/.turbo/turbo-lint.log +12 -0
- package/.turbo/turbo-test.log +5512 -0
- package/.turbo/turbo-typecheck.log +4 -0
- package/CHANGELOG.md +234 -0
- package/README.md +39 -24
- package/coverage/clover.xml +3 -1118
- package/coverage/coverage-final.json +1 -7
- package/coverage/lcov-report/AutoComplete.tsx.html +283 -0
- package/coverage/lcov-report/Avatar.tsx.html +472 -0
- package/coverage/lcov-report/CircularProgress.tsx.html +799 -0
- package/coverage/lcov-report/DefaultToastRenderer.tsx.html +166 -112
- package/coverage/lcov-report/Dialog.tsx.html +1309 -0
- package/coverage/lcov-report/DialogContent.tsx.html +178 -0
- package/coverage/lcov-report/DialogFooter.tsx.html +169 -0
- package/coverage/lcov-report/IconRotator.tsx.html +322 -0
- package/coverage/lcov-report/LinearProgress.tsx.html +658 -0
- package/coverage/lcov-report/ListItem.tsx.html +892 -0
- package/coverage/lcov-report/ListItemLink.tsx.html +616 -0
- package/coverage/lcov-report/MaterialIcon.tsx.html +36 -42
- package/coverage/lcov-report/MaterialSymbol.tsx.html +240 -222
- package/coverage/lcov-report/MenuItemCheckbox.tsx.html +223 -0
- package/coverage/lcov-report/MenuItemInputToggle.tsx.html +925 -0
- package/coverage/lcov-report/MenuItemRadio.tsx.html +436 -0
- package/coverage/lcov-report/MenuItemSeparator.tsx.html +223 -0
- package/coverage/lcov-report/MenuItemTextField.tsx.html +289 -0
- package/coverage/lcov-report/Portal.tsx.html +223 -0
- package/coverage/lcov-report/PortalContainerProvider.tsx.html +367 -0
- package/coverage/lcov-report/RootHtml.tsx.html +370 -0
- package/coverage/lcov-report/Select.tsx.html +1411 -0
- package/coverage/lcov-report/SkeletonPlaceholder.tsx.html +613 -0
- package/coverage/lcov-report/Snackbar.tsx.html +360 -402
- package/coverage/lcov-report/SrOnly.tsx.html +328 -0
- package/coverage/lcov-report/Switch.tsx.html +535 -0
- package/coverage/lcov-report/SwitchTrack.tsx.html +262 -0
- package/coverage/lcov-report/Tab.tsx.html +261 -147
- package/coverage/lcov-report/Table.tsx.html +457 -0
- package/coverage/lcov-report/TableCell.tsx.html +982 -0
- package/coverage/lcov-report/TableCheckbox.tsx.html +709 -0
- package/coverage/lcov-report/TableContainer.tsx.html +220 -0
- package/coverage/lcov-report/TableFooter.tsx.html +502 -0
- package/coverage/lcov-report/TableHeader.tsx.html +541 -0
- package/coverage/lcov-report/TableRadio.tsx.html +670 -0
- package/coverage/lcov-report/TableRow.tsx.html +289 -0
- package/coverage/lcov-report/Toast.tsx.html +868 -0
- package/coverage/lcov-report/ToastManager.tsx.html +1783 -0
- package/coverage/lcov-report/ToastManagerProvider.tsx.html +216 -216
- package/coverage/lcov-report/Tooltip.tsx.html +98 -155
- package/coverage/lcov-report/TreeGroup.tsx.html +313 -0
- package/coverage/lcov-report/Typography.tsx.html +1027 -0
- package/coverage/lcov-report/app-bar/AppBar.tsx.html +178 -28
- package/coverage/lcov-report/app-bar/index.html +7 -7
- package/coverage/lcov-report/autocomplete/AutoComplete.tsx.html +283 -0
- package/coverage/lcov-report/autocomplete/Autocomplete.tsx.html +475 -0
- package/coverage/lcov-report/autocomplete/AutocompleteGeneric.tsx.html +304 -0
- package/coverage/lcov-report/autocomplete/index.html +221 -0
- package/coverage/lcov-report/autocomplete/useAutoComplete.ts.html +775 -0
- package/coverage/lcov-report/autocomplete/useAutocomplete.ts.html +1273 -0
- package/coverage/lcov-report/autocomplete/useAutocompleteAgain.ts.html +829 -0
- package/coverage/lcov-report/autocomplete/useAutocompletev2.ts.html +715 -0
- package/coverage/lcov-report/autocomplete/useInlineAutoComplete.ts.html +340 -0
- package/coverage/lcov-report/autocomplete/useInlineAutocomplete.ts.html +430 -0
- package/coverage/lcov-report/autocomplete/useInlineSelection.ts.html +310 -0
- package/coverage/lcov-report/autocomplete/utils.ts.html +196 -0
- package/coverage/lcov-report/avatar/Avatar.tsx.html +175 -106
- package/coverage/lcov-report/avatar/index.html +19 -19
- package/coverage/lcov-report/avatar/styles.ts.html +268 -0
- package/coverage/lcov-report/button/AsyncButton.tsx.html +217 -10
- package/coverage/lcov-report/button/Button.tsx.html +97 -85
- package/coverage/lcov-report/button/TooltippedButton.tsx.html +445 -0
- package/coverage/lcov-report/button/index.html +10 -10
- package/coverage/lcov-report/card/Card.tsx.html +349 -0
- package/coverage/lcov-report/card/CardContent.tsx.html +223 -0
- package/coverage/lcov-report/card/ClickableCard.tsx.html +400 -0
- package/coverage/lcov-report/card/index.html +21 -21
- package/coverage/lcov-report/card/styles.ts.html +428 -392
- package/coverage/lcov-report/config.ts.html +33 -18
- package/coverage/lcov-report/cssUtils.ts.html +171 -66
- package/coverage/lcov-report/dialog/Dialog.tsx.html +170 -167
- package/coverage/lcov-report/dialog/DialogContent.tsx.html +178 -0
- package/coverage/lcov-report/dialog/DialogFooter.tsx.html +169 -0
- package/coverage/lcov-report/dialog/DialogHeader.tsx.html +148 -0
- package/coverage/lcov-report/dialog/DialogTitle.tsx.html +256 -0
- package/coverage/lcov-report/dialog/index.html +28 -28
- package/coverage/lcov-report/dialog/styles.ts.html +439 -0
- package/coverage/lcov-report/draggable/index.html +21 -36
- package/coverage/lcov-report/draggable/useDraggable.ts.html +377 -368
- package/coverage/lcov-report/draggable/utils.ts.html +96 -195
- package/coverage/lcov-report/expansion-panel/ExpansionList.tsx.html +211 -0
- package/coverage/lcov-report/expansion-panel/ExpansionPanel.tsx.html +12 -15
- package/coverage/lcov-report/expansion-panel/index.html +34 -19
- package/coverage/lcov-report/expansion-panel/useExpansionPanels.ts.html +928 -0
- package/coverage/lcov-report/form/AutoComplete.tsx.html +283 -0
- package/coverage/lcov-report/form/Form.tsx.html +22 -22
- package/coverage/lcov-report/form/Label.tsx.html +442 -0
- package/coverage/lcov-report/form/MenuItemInputToggle.tsx.html +37 -25
- package/coverage/lcov-report/form/MenuItemTextField.tsx.html +12 -9
- package/coverage/lcov-report/form/OptGroup.tsx.html +169 -166
- package/coverage/lcov-report/form/Option.tsx.html +727 -0
- package/coverage/lcov-report/form/ResizingTextArea.tsx.html +442 -0
- package/coverage/lcov-report/form/ResizingTextAreaWrapper.tsx.html +310 -0
- package/coverage/lcov-report/form/Select.tsx.html +1456 -0
- package/coverage/lcov-report/form/SelectOriginal.tsx.html +1630 -0
- package/coverage/lcov-report/form/SelectV2.tsx.html +1024 -0
- package/coverage/lcov-report/form/SelectedOption.tsx.html +250 -0
- package/coverage/lcov-report/form/SimpleTextArea.tsx.html +727 -0
- package/coverage/lcov-report/form/Slider.tsx.html +163 -40
- package/coverage/lcov-report/form/SliderValueTooltip.tsx.html +319 -0
- package/coverage/lcov-report/form/Switch.tsx.html +310 -385
- package/coverage/lcov-report/form/SwitchTrack.tsx.html +98 -71
- package/coverage/lcov-report/form/TextArea.tsx.html +596 -740
- package/coverage/lcov-report/form/TextArea2.tsx.html +985 -0
- package/coverage/lcov-report/form/TextAreaBackup.tsx.html +1006 -0
- package/coverage/lcov-report/form/TextField.tsx.html +156 -234
- package/coverage/lcov-report/form/index.html +34 -169
- package/coverage/lcov-report/form/selectUtils.ts.html +188 -221
- package/coverage/lcov-report/form/switchStyles.ts.html +172 -0
- package/coverage/lcov-report/form/textAreaStyles.ts.html +8 -11
- package/coverage/lcov-report/form/useAutoComplete.ts.html +787 -0
- package/coverage/lcov-report/form/useCombobox.ts.html +454 -460
- package/coverage/lcov-report/form/useComboboxList.ts.html +108 -93
- package/coverage/lcov-report/form/useFormReset.ts.html +229 -0
- package/coverage/lcov-report/form/useInlineAutoComplete.ts.html +379 -0
- package/coverage/lcov-report/form/useRadioGroup.ts.html +79 -79
- package/coverage/lcov-report/form/useResizingTextArea.ts.html +631 -0
- package/coverage/lcov-report/form/useResizingTextArea2.ts.html +631 -0
- package/coverage/lcov-report/form/useSelectCombobox.ts.html +499 -0
- package/coverage/lcov-report/form/utils.ts.html +209 -170
- package/coverage/lcov-report/getListItemHeight.ts.html +298 -0
- package/coverage/lcov-report/hoverMode/index.html +116 -0
- package/coverage/lcov-report/hoverMode/useHoverMode.ts.html +676 -0
- package/coverage/lcov-report/icon/FontIcon.tsx.html +69 -78
- package/coverage/lcov-report/icon/MaterialIcon.tsx.html +235 -0
- package/coverage/lcov-report/icon/index.html +20 -20
- package/coverage/lcov-report/icon/styles.ts.html +41 -104
- package/coverage/lcov-report/iconConfig.tsx.html +973 -0
- package/coverage/lcov-report/index.html +11 -101
- package/coverage/lcov-report/interaction/UserInteractionModeProvider.tsx.html +679 -0
- package/coverage/lcov-report/interaction/config.ts.html +181 -0
- package/coverage/lcov-report/interaction/index.html +33 -18
- package/coverage/lcov-report/link/Link.tsx.html +358 -0
- package/coverage/lcov-report/link/index.html +20 -20
- package/coverage/lcov-report/list/List.tsx.html +490 -0
- package/coverage/lcov-report/list/ListItem.tsx.html +886 -0
- package/coverage/lcov-report/list/ListItemAddon.tsx.html +286 -0
- package/coverage/lcov-report/list/ListItemChildren.tsx.html +445 -0
- package/coverage/lcov-report/list/ListItemLink.tsx.html +32 -38
- package/coverage/lcov-report/list/index.html +64 -19
- package/coverage/lcov-report/list/listItemStyles.ts.html +703 -0
- package/coverage/lcov-report/materialConfig.ts.html +703 -0
- package/coverage/lcov-report/media-queries/appSize.ts.html +1 -1
- package/coverage/lcov-report/media-queries/index.html +10 -10
- package/coverage/lcov-report/menu/DropdownMenu.tsx.html +976 -0
- package/coverage/lcov-report/menu/Menu.tsx.html +357 -282
- package/coverage/lcov-report/menu/MenuConfigurationProvider.tsx.html +637 -0
- package/coverage/lcov-report/menu/MenuItem.tsx.html +292 -0
- package/coverage/lcov-report/menu/MenuItemCircularProgress.tsx.html +433 -0
- package/coverage/lcov-report/menu/MenuSheet.tsx.html +37 -13
- package/coverage/lcov-report/menu/MenuVisibilityProvider.tsx.html +48 -33
- package/coverage/lcov-report/menu/index.html +14 -74
- package/coverage/lcov-report/menu/menuConfig.ts.html +118 -0
- package/coverage/lcov-report/menu/useContextMenu.ts.html +490 -0
- package/coverage/lcov-report/menuItemInputToggleStyles.ts.html +319 -0
- package/coverage/lcov-report/movement/index.html +19 -19
- package/coverage/lcov-report/movement/useKeyboardMovementProvider.ts.html +422 -383
- package/coverage/lcov-report/positioning/constants.ts.html +463 -0
- package/coverage/lcov-report/positioning/index.html +30 -30
- package/coverage/lcov-report/positioning/useFixedPositioning.ts.html +1321 -0
- package/coverage/lcov-report/progress/CircularProgress.tsx.html +799 -0
- package/coverage/lcov-report/progress/LinearProgress.tsx.html +100 -94
- package/coverage/lcov-report/progress/index.html +19 -19
- package/coverage/lcov-report/searching/caseInsensitive.ts.html +685 -0
- package/coverage/lcov-report/searching/fuzzy.ts.html +610 -0
- package/coverage/lcov-report/searching/index.html +146 -0
- package/coverage/lcov-report/searching/toSearchQuery.ts.html +145 -0
- package/coverage/lcov-report/searching/useFuzzyMatch.ts.html +211 -0
- package/coverage/lcov-report/searching/utils.ts.html +244 -0
- package/coverage/lcov-report/sheet/index.html +8 -8
- package/coverage/lcov-report/sheet/styles.ts.html +376 -0
- package/coverage/lcov-report/skeletonPlaceholderUtils.ts.html +400 -0
- package/coverage/lcov-report/snackbar/Snackbar.tsx.html +55 -97
- package/coverage/lcov-report/snackbar/Toast.tsx.html +546 -501
- package/coverage/lcov-report/snackbar/ToastManager.tsx.html +269 -269
- package/coverage/lcov-report/snackbar/ToastManagerProvider.tsx.html +23 -23
- package/coverage/lcov-report/snackbar/index.html +59 -14
- package/coverage/lcov-report/snackbar/snackbarStyles.ts.html +12 -87
- package/coverage/lcov-report/snackbar/toastStyles.ts.html +206 -146
- package/coverage/lcov-report/snackbar/useCurrentToastActions.ts.html +226 -0
- package/coverage/lcov-report/snackbarStyles.ts.html +46 -121
- package/coverage/lcov-report/src/CoreProviders.tsx.html +20 -20
- package/coverage/lcov-report/src/NoSsr.tsx.html +1 -1
- package/coverage/lcov-report/src/RootHtml.tsx.html +370 -0
- package/coverage/lcov-report/src/SsrProvider.tsx.html +10 -10
- package/coverage/lcov-report/src/app-bar/AppBar.tsx.html +207 -87
- package/coverage/lcov-report/src/app-bar/AppBarTitle.tsx.html +1 -1
- package/coverage/lcov-report/src/app-bar/index.html +20 -5
- package/coverage/lcov-report/src/autocomplete/Autocomplete.tsx.html +364 -0
- package/coverage/lcov-report/src/autocomplete/AutocompleteGeneric.tsx.html +304 -0
- package/coverage/lcov-report/src/autocomplete/index.html +221 -0
- package/coverage/lcov-report/src/autocomplete/useAutocomplete.ts.html +637 -0
- package/coverage/lcov-report/src/autocomplete/useAutocompleteAgain.ts.html +829 -0
- package/coverage/lcov-report/src/autocomplete/useAutocompletev2.ts.html +715 -0
- package/coverage/lcov-report/src/autocomplete/useInlineAutocomplete.ts.html +430 -0
- package/coverage/lcov-report/src/autocomplete/useInlineSelection.ts.html +241 -0
- package/coverage/lcov-report/src/autocomplete/utils.ts.html +196 -0
- package/coverage/lcov-report/src/avatar/Avatar.tsx.html +36 -27
- package/coverage/lcov-report/src/avatar/index.html +22 -7
- package/coverage/lcov-report/src/avatar/styles.ts.html +77 -8
- package/coverage/lcov-report/src/badge/Badge.tsx.html +1 -1
- package/coverage/lcov-report/src/badge/index.html +1 -1
- package/coverage/lcov-report/src/box/Box.tsx.html +1 -1
- package/coverage/lcov-report/src/box/index.html +9 -9
- package/coverage/lcov-report/src/box/styles.ts.html +105 -51
- package/coverage/lcov-report/src/button/AsyncButton.tsx.html +833 -284
- package/coverage/lcov-report/src/button/Button.tsx.html +81 -81
- package/coverage/lcov-report/src/button/ButtonUnstyled.tsx.html +1 -1
- package/coverage/lcov-report/src/button/FloatingActionButton.tsx.html +39 -39
- package/coverage/lcov-report/src/button/TooltippedButton.tsx.html +445 -0
- package/coverage/lcov-report/src/button/buttonStyles.ts.html +59 -59
- package/coverage/lcov-report/src/button/buttonUnstyledStyles.ts.html +1 -1
- package/coverage/lcov-report/src/button/index.html +1 -1
- package/coverage/lcov-report/src/card/Card.tsx.html +37 -31
- package/coverage/lcov-report/src/card/CardContent.tsx.html +4 -4
- package/coverage/lcov-report/src/card/CardFooter.tsx.html +1 -1
- package/coverage/lcov-report/src/card/CardHeader.tsx.html +1 -1
- package/coverage/lcov-report/src/card/CardSubtitle.tsx.html +1 -1
- package/coverage/lcov-report/src/card/CardTitle.tsx.html +1 -1
- package/coverage/lcov-report/src/card/ClickableCard.tsx.html +400 -0
- package/coverage/lcov-report/src/card/index.html +112 -7
- package/coverage/lcov-report/src/card/styles.ts.html +58 -31
- package/coverage/lcov-report/src/chip/Chip.tsx.html +1 -1
- package/coverage/lcov-report/src/chip/index.html +7 -7
- package/coverage/lcov-report/src/chip/styles.ts.html +9 -12
- package/coverage/lcov-report/src/cssUtils.ts.html +68 -59
- package/coverage/lcov-report/src/delegateEvent.ts.html +110 -110
- package/coverage/lcov-report/src/dialog/Dialog.tsx.html +158 -155
- package/coverage/lcov-report/src/dialog/DialogContainer.tsx.html +27 -27
- package/coverage/lcov-report/src/dialog/DialogContent.tsx.html +72 -72
- package/coverage/lcov-report/src/dialog/DialogFooter.tsx.html +14 -14
- package/coverage/lcov-report/src/dialog/DialogHeader.tsx.html +9 -9
- package/coverage/lcov-report/src/dialog/DialogTitle.tsx.html +124 -124
- package/coverage/lcov-report/src/dialog/FixedDialog.tsx.html +1 -1
- package/coverage/lcov-report/src/dialog/NestedDialogProvider.ts.html +3 -3
- package/coverage/lcov-report/src/dialog/index.html +133 -13
- package/coverage/lcov-report/src/dialog/styles.ts.html +61 -61
- package/coverage/lcov-report/src/divider/Divider.tsx.html +27 -30
- package/coverage/lcov-report/src/divider/index.html +23 -8
- package/coverage/lcov-report/src/divider/styles.ts.html +11 -11
- package/coverage/lcov-report/src/draggable/index.html +27 -27
- package/coverage/lcov-report/src/draggable/useDraggable.ts.html +365 -362
- package/coverage/lcov-report/src/draggable/utils.ts.html +94 -196
- package/coverage/lcov-report/src/expansion-panel/ExpansionList.tsx.html +1 -1
- package/coverage/lcov-report/src/expansion-panel/ExpansionPanel.tsx.html +1 -1
- package/coverage/lcov-report/src/expansion-panel/ExpansionPanelHeader.tsx.html +11 -20
- package/coverage/lcov-report/src/expansion-panel/index.html +30 -15
- package/coverage/lcov-report/src/expansion-panel/useExpansionList.ts.html +1 -1
- package/coverage/lcov-report/src/expansion-panel/useExpansionPanels.ts.html +36 -24
- package/coverage/lcov-report/src/focus/index.html +23 -23
- package/coverage/lcov-report/src/focus/useFocusContainer.ts.html +142 -121
- package/coverage/lcov-report/src/focus/utils.ts.html +37 -37
- package/coverage/lcov-report/src/form/AutoComplete.tsx.html +283 -0
- package/coverage/lcov-report/src/form/Checkbox.tsx.html +1 -1
- package/coverage/lcov-report/src/form/Fieldset.tsx.html +1 -1
- package/coverage/lcov-report/src/form/FileInput.tsx.html +133 -139
- package/coverage/lcov-report/src/form/Form.tsx.html +11 -8
- package/coverage/lcov-report/src/form/FormMessage.tsx.html +126 -264
- package/coverage/lcov-report/src/form/FormMessageContainer.tsx.html +42 -45
- package/coverage/lcov-report/src/form/FormMessageCounter.tsx.html +1 -1
- package/coverage/lcov-report/src/form/InputToggle.tsx.html +116 -125
- package/coverage/lcov-report/src/form/InputToggleIcon.tsx.html +63 -63
- package/coverage/lcov-report/src/form/Label.tsx.html +107 -107
- package/coverage/lcov-report/src/form/Legend.tsx.html +1 -1
- package/coverage/lcov-report/src/form/MenuItemCheckbox.tsx.html +13 -7
- package/coverage/lcov-report/src/form/MenuItemFileInput.tsx.html +3 -3
- package/coverage/lcov-report/src/form/MenuItemInputToggle.tsx.html +179 -221
- package/coverage/lcov-report/src/form/MenuItemRadio.tsx.html +13 -7
- package/coverage/lcov-report/src/form/MenuItemSwitch.tsx.html +1 -1
- package/coverage/lcov-report/src/form/MenuItemTextField.tsx.html +13 -4
- package/coverage/lcov-report/src/form/NativeSelect.tsx.html +20 -5
- package/coverage/lcov-report/src/form/OptGroup.tsx.html +1 -1
- package/coverage/lcov-report/src/form/Option.tsx.html +4 -4
- package/coverage/lcov-report/src/form/Password.tsx.html +3 -3
- package/coverage/lcov-report/src/form/Radio.tsx.html +3 -3
- package/coverage/lcov-report/src/form/ResizingTextArea.tsx.html +988 -0
- package/coverage/lcov-report/src/form/ResizingTextAreaWrapper.tsx.html +310 -0
- package/coverage/lcov-report/src/form/Select.tsx.html +894 -1122
- package/coverage/lcov-report/src/form/SelectValue.tsx.html +1 -1
- package/coverage/lcov-report/src/form/SimpleTextArea.tsx.html +694 -0
- package/coverage/lcov-report/src/form/Slider.tsx.html +129 -9
- package/coverage/lcov-report/src/form/SliderContainer.tsx.html +1 -1
- package/coverage/lcov-report/src/form/SliderMark.tsx.html +1 -1
- package/coverage/lcov-report/src/form/SliderMarkLabel.tsx.html +1 -1
- package/coverage/lcov-report/src/form/SliderThumb.tsx.html +43 -7
- package/coverage/lcov-report/src/form/SliderTrack.tsx.html +1 -1
- package/coverage/lcov-report/src/form/SliderValueMarks.tsx.html +11 -5
- package/coverage/lcov-report/src/form/SliderValueTooltip.tsx.html +2 -2
- package/coverage/lcov-report/src/form/Switch.tsx.html +310 -373
- package/coverage/lcov-report/src/form/SwitchTrack.tsx.html +99 -69
- package/coverage/lcov-report/src/form/TextArea.tsx.html +650 -572
- package/coverage/lcov-report/src/form/TextArea2.tsx.html +985 -0
- package/coverage/lcov-report/src/form/TextAreaBackup.tsx.html +985 -0
- package/coverage/lcov-report/src/form/TextField.tsx.html +18 -12
- package/coverage/lcov-report/src/form/TextFieldAddon.tsx.html +14 -26
- package/coverage/lcov-report/src/form/TextFieldContainer.tsx.html +28 -10
- package/coverage/lcov-report/src/form/TextFieldContainerStyles.ts.html +24 -15
- package/coverage/lcov-report/src/form/fileUtils.ts.html +3 -3
- package/coverage/lcov-report/src/form/formConfig.ts.html +18 -18
- package/coverage/lcov-report/src/form/formMessageStyles.ts.html +40 -40
- package/coverage/lcov-report/src/form/index.html +37 -127
- package/coverage/lcov-report/src/form/inputToggleStyles.ts.html +30 -30
- package/coverage/lcov-report/src/form/menuItemInputToggleStyles.ts.html +319 -0
- package/coverage/lcov-report/src/form/nativeSelectStyles.ts.html +34 -7
- package/coverage/lcov-report/src/form/optionStyles.ts.html +1 -1
- package/coverage/lcov-report/src/form/passwordStyles.ts.html +1 -1
- package/coverage/lcov-report/src/form/selectStyles.ts.html +1 -1
- package/coverage/lcov-report/src/form/selectUtils.ts.html +6 -9
- package/coverage/lcov-report/src/form/sliderUtils.ts.html +20 -14
- package/coverage/lcov-report/src/form/switchStyles.ts.html +68 -68
- package/coverage/lcov-report/src/form/textAreaStyles.ts.html +5 -5
- package/coverage/lcov-report/src/form/textFieldStyles.ts.html +1 -1
- package/coverage/lcov-report/src/form/useAutoComplete.ts.html +787 -0
- package/coverage/lcov-report/src/form/useCheckboxGroup.ts.html +2 -2
- package/coverage/lcov-report/src/form/useCombobox.ts.html +943 -457
- package/coverage/lcov-report/src/form/useEditableCombobox.ts.html +502 -0
- package/coverage/lcov-report/src/form/useFileUpload.ts.html +28 -19
- package/coverage/lcov-report/src/form/useInlineAutoComplete.ts.html +109 -0
- package/coverage/lcov-report/src/form/useListboxProvider.ts.html +5 -8
- package/coverage/lcov-report/src/form/useNumberField.ts.html +10 -10
- package/coverage/lcov-report/src/form/useRadioGroup.ts.html +68 -53
- package/coverage/lcov-report/src/form/useRangeSlider.ts.html +3 -3
- package/coverage/lcov-report/src/form/useResizingTextArea.ts.html +634 -0
- package/coverage/lcov-report/src/form/useSelectCombobox.ts.html +295 -0
- package/coverage/lcov-report/src/form/useSlider.ts.html +2 -2
- package/coverage/lcov-report/src/form/useTextField.ts.html +32 -26
- package/coverage/lcov-report/src/form/utils.ts.html +200 -170
- package/coverage/lcov-report/src/form/validation.ts.html +2 -2
- package/coverage/lcov-report/src/hoverMode/index.html +1 -1
- package/coverage/lcov-report/src/hoverMode/useHoverMode.ts.html +104 -104
- package/coverage/lcov-report/src/hoverMode/useHoverModeProvider.ts.html +19 -19
- package/coverage/lcov-report/src/icon/FontIcon.tsx.html +34 -43
- package/coverage/lcov-report/src/icon/IconRotator.tsx.html +5 -8
- package/coverage/lcov-report/src/icon/MaterialIcon.tsx.html +36 -42
- package/coverage/lcov-report/src/icon/MaterialSymbol.tsx.html +240 -222
- package/coverage/lcov-report/src/icon/SVGIcon.tsx.html +1 -1
- package/coverage/lcov-report/src/icon/TextIconSpacing.tsx.html +51 -51
- package/coverage/lcov-report/src/icon/iconConfig.tsx.html +973 -0
- package/coverage/lcov-report/src/icon/index.html +12 -12
- package/coverage/lcov-report/src/icon/material.ts.html +748 -58
- package/coverage/lcov-report/src/icon/materialConfig.ts.html +703 -0
- package/coverage/lcov-report/src/icon/styles.ts.html +47 -110
- package/coverage/lcov-report/src/index.html +10 -10
- package/coverage/lcov-report/src/interaction/Ripple.tsx.html +60 -60
- package/coverage/lcov-report/src/interaction/RippleContainer.tsx.html +41 -47
- package/coverage/lcov-report/src/interaction/UserInteractionModeProvider.tsx.html +240 -240
- package/coverage/lcov-report/src/interaction/config.ts.html +7 -7
- package/coverage/lcov-report/src/interaction/index.html +100 -10
- package/coverage/lcov-report/src/interaction/useElementInteraction.tsx.html +146 -146
- package/coverage/lcov-report/src/interaction/useHigherContrastChildren.tsx.html +19 -19
- package/coverage/lcov-report/src/interaction/utils.ts.html +171 -171
- package/coverage/lcov-report/src/layout/LayoutAppBar.tsx.html +1 -1
- package/coverage/lcov-report/src/layout/LayoutNav.tsx.html +1 -1
- package/coverage/lcov-report/src/layout/LayoutWindowSplitter.tsx.html +1 -1
- package/coverage/lcov-report/src/layout/Main.tsx.html +1 -1
- package/coverage/lcov-report/src/layout/index.html +203 -8
- package/coverage/lcov-report/src/layout/layoutNavStyles.ts.html +1 -1
- package/coverage/lcov-report/src/layout/layoutWindowSplitterStyles.ts.html +1 -1
- package/coverage/lcov-report/src/layout/mainStyles.ts.html +1 -1
- package/coverage/lcov-report/src/layout/useExpandableLayout.ts.html +1 -1
- package/coverage/lcov-report/src/layout/useHorizontalLayoutTransition.ts.html +1 -1
- package/coverage/lcov-report/src/layout/useLayoutAppBarHeight.ts.html +20 -32
- package/coverage/lcov-report/src/layout/useLayoutTree.ts.html +1 -1
- package/coverage/lcov-report/src/layout/useLayoutWindowSplitter.ts.html +1 -1
- package/coverage/lcov-report/src/layout/useMainTabIndex.ts.html +1 -1
- package/coverage/lcov-report/src/layout/useResizableLayout.ts.html +1 -1
- package/coverage/lcov-report/src/layout/useTemporaryLayout.ts.html +3 -3
- package/coverage/lcov-report/src/link/Link.tsx.html +39 -9
- package/coverage/lcov-report/src/link/SkipToMainContent.tsx.html +1 -1
- package/coverage/lcov-report/src/link/index.html +16 -16
- package/coverage/lcov-report/src/link/styles.ts.html +1 -1
- package/coverage/lcov-report/src/list/List.tsx.html +33 -33
- package/coverage/lcov-report/src/list/ListItem.tsx.html +555 -534
- package/coverage/lcov-report/src/list/ListItemAddon.tsx.html +45 -39
- package/coverage/lcov-report/src/list/ListItemChildren.tsx.html +88 -82
- package/coverage/lcov-report/src/list/ListItemLink.tsx.html +6 -6
- package/coverage/lcov-report/src/list/ListItemText.tsx.html +35 -35
- package/coverage/lcov-report/src/list/ListSubheader.tsx.html +1 -1
- package/coverage/lcov-report/src/list/getListItemHeight.ts.html +43 -46
- package/coverage/lcov-report/src/list/index.html +128 -8
- package/coverage/lcov-report/src/list/listItemStyles.ts.html +102 -72
- package/coverage/lcov-report/src/media-queries/AppSizeProvider.tsx.html +59 -59
- package/coverage/lcov-report/src/media-queries/appSize.ts.html +1 -1
- package/coverage/lcov-report/src/media-queries/index.html +20 -5
- package/coverage/lcov-report/src/media-queries/useMediaQuery.ts.html +28 -28
- package/coverage/lcov-report/src/menu/DropdownMenu.tsx.html +73 -16
- package/coverage/lcov-report/src/menu/Menu.tsx.html +66 -33
- package/coverage/lcov-report/src/menu/MenuBar.tsx.html +1 -1
- package/coverage/lcov-report/src/menu/MenuButton.tsx.html +3 -3
- package/coverage/lcov-report/src/menu/MenuConfigurationProvider.tsx.html +1 -1
- package/coverage/lcov-report/src/menu/MenuItem.tsx.html +1 -1
- package/coverage/lcov-report/src/menu/MenuItemButton.tsx.html +3 -3
- package/coverage/lcov-report/src/menu/MenuItemCircularProgress.tsx.html +433 -0
- package/coverage/lcov-report/src/menu/MenuItemGroup.tsx.html +1 -1
- package/coverage/lcov-report/src/menu/MenuItemSeparator.tsx.html +6 -36
- package/coverage/lcov-report/src/menu/MenuSheet.tsx.html +34 -7
- package/coverage/lcov-report/src/menu/MenuVisibilityProvider.tsx.html +1 -1
- package/coverage/lcov-report/src/menu/MenuWidget.tsx.html +1 -1
- package/coverage/lcov-report/src/menu/MenuWidgetKeyboardProvider.tsx.html +1 -1
- package/coverage/lcov-report/src/menu/index.html +13 -193
- package/coverage/lcov-report/src/menu/useContextMenu.ts.html +1 -1
- package/coverage/lcov-report/src/menu/useMenuBarProvider.ts.html +1 -1
- package/coverage/lcov-report/src/menu/utils.ts.html +10 -10
- package/coverage/lcov-report/src/movement/constants.ts.html +1 -1
- package/coverage/lcov-report/src/movement/findMatchIndex.ts.html +1 -1
- package/coverage/lcov-report/src/movement/index.html +20 -20
- package/coverage/lcov-report/src/movement/useKeyboardMovementProvider.ts.html +92 -92
- package/coverage/lcov-report/src/movement/utils.ts.html +143 -119
- package/coverage/lcov-report/src/overlay/Overlay.tsx.html +64 -64
- package/coverage/lcov-report/src/overlay/index.html +1 -1
- package/coverage/lcov-report/src/overlay/overlayStyles.ts.html +28 -28
- package/coverage/lcov-report/src/portal/Portal.tsx.html +9 -9
- package/coverage/lcov-report/src/portal/PortalContainerProvider.tsx.html +59 -35
- package/coverage/lcov-report/src/portal/index.html +23 -8
- package/coverage/lcov-report/src/positioning/constants.ts.html +1 -1
- package/coverage/lcov-report/src/positioning/createHorizontalPosition.ts.html +63 -63
- package/coverage/lcov-report/src/positioning/createVerticalPosition.ts.html +65 -65
- package/coverage/lcov-report/src/positioning/getFixedPosition.ts.html +94 -94
- package/coverage/lcov-report/src/positioning/index.html +70 -10
- package/coverage/lcov-report/src/positioning/useFixedPositioning.ts.html +200 -200
- package/coverage/lcov-report/src/positioning/utils.ts.html +111 -111
- package/coverage/lcov-report/src/progress/CircularProgress.tsx.html +501 -456
- package/coverage/lcov-report/src/progress/LinearProgress.tsx.html +419 -338
- package/coverage/lcov-report/src/progress/getProgressA11y.ts.html +1 -1
- package/coverage/lcov-report/src/progress/index.html +47 -32
- package/coverage/lcov-report/src/responsive-item/ResponsiveItemContainer.tsx.html +1 -1
- package/coverage/lcov-report/src/responsive-item/ResponsiveItemOverlay.tsx.html +1 -1
- package/coverage/lcov-report/src/responsive-item/index.html +20 -5
- package/coverage/lcov-report/src/responsive-item/styles.ts.html +1 -1
- package/coverage/lcov-report/src/scroll/ScrollLock.tsx.html +1 -1
- package/coverage/lcov-report/src/scroll/getScrollbarWidth.ts.html +25 -25
- package/coverage/lcov-report/src/scroll/index.html +5 -5
- package/coverage/lcov-report/src/scroll/useScrollLock.ts.html +27 -27
- package/coverage/lcov-report/src/segmented-button/SegmentedButton.tsx.html +4 -4
- package/coverage/lcov-report/src/segmented-button/SegmentedButtonContainer.tsx.html +29 -8
- package/coverage/lcov-report/src/segmented-button/index.html +50 -5
- package/coverage/lcov-report/src/segmented-button/segmentedButtonContainerStyles.ts.html +15 -6
- package/coverage/lcov-report/src/segmented-button/segmentedButtonStyles.ts.html +1 -1
- package/coverage/lcov-report/src/sheet/Sheet.tsx.html +1 -1
- package/coverage/lcov-report/src/sheet/index.html +20 -5
- package/coverage/lcov-report/src/sheet/styles.ts.html +18 -21
- package/coverage/lcov-report/src/snackbar/DefaultToastRenderer.tsx.html +87 -84
- package/coverage/lcov-report/src/snackbar/Snackbar.tsx.html +24 -174
- package/coverage/lcov-report/src/snackbar/Toast.tsx.html +109 -94
- package/coverage/lcov-report/src/snackbar/ToastActionButton.tsx.html +1 -1
- package/coverage/lcov-report/src/snackbar/ToastCloseButton.tsx.html +3 -3
- package/coverage/lcov-report/src/snackbar/ToastContent.tsx.html +54 -162
- package/coverage/lcov-report/src/snackbar/ToastManager.tsx.html +1786 -0
- package/coverage/lcov-report/src/snackbar/ToastManagerProvider.tsx.html +21 -1701
- package/coverage/lcov-report/src/snackbar/index.html +163 -13
- package/coverage/lcov-report/src/snackbar/snackbarStyles.ts.html +214 -0
- package/coverage/lcov-report/src/snackbar/toastContentStyles.ts.html +196 -0
- package/coverage/lcov-report/src/snackbar/toastStyles.ts.html +27 -27
- package/coverage/lcov-report/src/snackbar/useCurrentToastActions.ts.html +1 -1
- package/coverage/lcov-report/src/suspense/CircularProgressSuspense.tsx.html +159 -108
- package/coverage/lcov-report/src/suspense/NullSuspense.tsx.html +88 -88
- package/coverage/lcov-report/src/suspense/index.html +32 -32
- package/coverage/lcov-report/src/table/Table.tsx.html +45 -114
- package/coverage/lcov-report/src/table/TableBody.tsx.html +43 -43
- package/coverage/lcov-report/src/table/TableCell.tsx.html +115 -319
- package/coverage/lcov-report/src/table/TableCellContent.tsx.html +82 -28
- package/coverage/lcov-report/src/table/TableCheckbox.tsx.html +16 -10
- package/coverage/lcov-report/src/table/TableConfigurationProvider.tsx.html +25 -31
- package/coverage/lcov-report/src/table/TableContainer.tsx.html +7 -28
- package/coverage/lcov-report/src/table/TableContainerProvider.tsx.html +1 -1
- package/coverage/lcov-report/src/table/TableFooter.tsx.html +64 -43
- package/coverage/lcov-report/src/table/TableHeader.tsx.html +41 -92
- package/coverage/lcov-report/src/table/TableRadio.tsx.html +676 -0
- package/coverage/lcov-report/src/table/TableRow.tsx.html +38 -119
- package/coverage/lcov-report/src/table/index.html +226 -16
- package/coverage/lcov-report/src/table/tableCellStyles.ts.html +334 -0
- package/coverage/lcov-report/src/table/tableContainerStyles.ts.html +142 -0
- package/coverage/lcov-report/src/table/tableFooterStyles.ts.html +166 -0
- package/coverage/lcov-report/src/table/tableHeaderStyles.ts.html +172 -0
- package/coverage/lcov-report/src/table/tableRowStyles.ts.html +169 -0
- package/coverage/lcov-report/src/table/tableStyles.ts.html +157 -0
- package/coverage/lcov-report/src/tabs/Tab.tsx.html +263 -143
- package/coverage/lcov-report/src/tabs/TabList.tsx.html +92 -92
- package/coverage/lcov-report/src/tabs/TabListScrollButton.tsx.html +61 -61
- package/coverage/lcov-report/src/tabs/index.html +148 -13
- package/coverage/lcov-report/src/tabs/tabIndicatorStyles.ts.html +187 -0
- package/coverage/lcov-report/src/tabs/tabListScrollButtonStyles.ts.html +226 -0
- package/coverage/lcov-report/src/tabs/tabListStyles.ts.html +241 -0
- package/coverage/lcov-report/src/tabs/tabStyles.ts.html +64 -28
- package/coverage/lcov-report/src/tabs/useTabList.ts.html +115 -109
- package/coverage/lcov-report/src/tabs/useTabs.ts.html +54 -54
- package/coverage/lcov-report/src/tabs/utils.ts.html +3 -3
- package/coverage/lcov-report/src/test-utils/IntersectionObserver.ts.html +1 -1
- package/coverage/lcov-report/src/test-utils/ResizeObserver.ts.html +402 -261
- package/coverage/lcov-report/src/test-utils/data-testid.ts.html +112 -0
- package/coverage/lcov-report/src/test-utils/drag.ts.html +1 -1
- package/coverage/lcov-report/src/test-utils/index.html +7 -7
- package/coverage/lcov-report/src/test-utils/jest-setup.ts.html +21 -9
- package/coverage/lcov-report/src/test-utils/matchMedia.ts.html +55 -55
- package/coverage/lcov-report/src/test-utils/polyfills/IntersectionObserver.ts.html +4 -4
- package/coverage/lcov-report/src/test-utils/polyfills/ResizeObserver.ts.html +3 -3
- package/coverage/lcov-report/src/test-utils/polyfills/TextDecoder.ts.html +106 -0
- package/coverage/lcov-report/src/test-utils/polyfills/TextEncoder.ts.html +100 -0
- package/coverage/lcov-report/src/test-utils/polyfills/index.html +1 -1
- package/coverage/lcov-report/src/test-utils/polyfills/matchMedia.ts.html +6 -6
- package/coverage/lcov-report/src/test-utils/polyfills/offsetParent.ts.html +14 -14
- package/coverage/lcov-report/src/test-utils/polyfills/scrollIntoView.ts.html +5 -5
- package/coverage/lcov-report/src/test-utils/render.tsx.html +21 -21
- package/coverage/lcov-report/src/test-utils/root-html-environment.ts.html +85 -0
- package/coverage/lcov-report/src/test-utils/timers.ts.html +1 -1
- package/coverage/lcov-report/src/theme/LocalStorageColorSchemeProvider.tsx.html +1 -1
- package/coverage/lcov-report/src/theme/ThemeProvider.tsx.html +22 -4
- package/coverage/lcov-report/src/theme/colors.ts.html +1 -1
- package/coverage/lcov-report/src/theme/cssVars.ts.html +1 -1
- package/coverage/lcov-report/src/theme/index.html +71 -11
- package/coverage/lcov-report/src/theme/useCSSVariables.ts.html +25 -25
- package/coverage/lcov-report/src/theme/useColorScheme.ts.html +1 -1
- package/coverage/lcov-report/src/theme/useColorSchemeMetaTag.ts.html +1 -1
- package/coverage/lcov-report/src/theme/useColorSchemeProvider.ts.html +1 -1
- package/coverage/lcov-report/src/theme/usePrefersColorScheme.ts.html +1 -1
- package/coverage/lcov-report/src/theme/utils.ts.html +58 -58
- package/coverage/lcov-report/src/tooltip/Tooltip.tsx.html +98 -74
- package/coverage/lcov-report/src/tooltip/TooltipHoverModeProvider.tsx.html +60 -6
- package/coverage/lcov-report/src/tooltip/constants.ts.html +1 -1
- package/coverage/lcov-report/src/tooltip/index.html +72 -27
- package/coverage/lcov-report/src/tooltip/tooltipStyles.ts.html +18 -18
- package/coverage/lcov-report/src/tooltip/useOverflowTooltip.ts.html +196 -196
- package/coverage/lcov-report/src/tooltip/useTooltip.ts.html +555 -234
- package/coverage/lcov-report/src/tooltip/useTooltipPosition.ts.html +29 -29
- package/coverage/lcov-report/src/tooltip/utils.ts.html +24 -24
- package/coverage/lcov-report/src/transition/CSSTransition.tsx.html +1 -1
- package/coverage/lcov-report/src/transition/Collapse.tsx.html +1 -1
- package/coverage/lcov-report/src/transition/CrossFade.tsx.html +1 -1
- package/coverage/lcov-report/src/transition/ScaleTransition.tsx.html +1 -1
- package/coverage/lcov-report/src/transition/SkeletonPlaceholder.tsx.html +374 -338
- package/coverage/lcov-report/src/transition/Slide.tsx.html +46 -46
- package/coverage/lcov-report/src/transition/SlideContainer.tsx.html +1 -1
- package/coverage/lcov-report/src/transition/collapseStyles.ts.html +13 -13
- package/coverage/lcov-report/src/transition/config.ts.html +187 -0
- package/coverage/lcov-report/src/transition/index.html +311 -11
- package/coverage/lcov-report/src/transition/maxWidthTransition.ts.html +1 -1
- package/coverage/lcov-report/src/transition/skeletonPlaceholderUtils.ts.html +400 -0
- package/coverage/lcov-report/src/transition/useCSSTransition.ts.html +69 -69
- package/coverage/lcov-report/src/transition/useCarousel.ts.html +1 -1
- package/coverage/lcov-report/src/transition/useCollapseTransition.ts.html +108 -162
- package/coverage/lcov-report/src/transition/useCrossFadeTransition.ts.html +1 -1
- package/coverage/lcov-report/src/transition/useMaxWidthTransition.ts.html +1 -1
- package/coverage/lcov-report/src/transition/useScaleTransition.ts.html +18 -18
- package/coverage/lcov-report/src/transition/useSkeletonPlaceholder.ts.html +607 -562
- package/coverage/lcov-report/src/transition/useSlideTransition.ts.html +20 -20
- package/coverage/lcov-report/src/transition/useTransition.ts.html +277 -250
- package/coverage/lcov-report/src/transition/utils.ts.html +70 -70
- package/coverage/lcov-report/src/tree/DefaultTreeItemRenderer.tsx.html +19 -7
- package/coverage/lcov-report/src/tree/Tree.tsx.html +30 -30
- package/coverage/lcov-report/src/tree/TreeGroup.tsx.html +45 -45
- package/coverage/lcov-report/src/tree/TreeItem.tsx.html +215 -221
- package/coverage/lcov-report/src/tree/TreeItemExpander.tsx.html +3 -3
- package/coverage/lcov-report/src/tree/TreeProvider.tsx.html +29 -11
- package/coverage/lcov-report/src/tree/index.html +19 -94
- package/coverage/lcov-report/src/tree/styles.ts.html +4 -31
- package/coverage/lcov-report/src/tree/useTree.ts.html +1 -1
- package/coverage/lcov-report/src/tree/useTreeExpansion.ts.html +1 -1
- package/coverage/lcov-report/src/tree/useTreeItems.ts.html +10 -13
- package/coverage/lcov-report/src/tree/useTreeMovement.ts.html +87 -87
- package/coverage/lcov-report/src/tree/useTreeSelection.ts.html +1 -1
- package/coverage/lcov-report/src/tree/utils.ts.html +1 -1
- package/coverage/lcov-report/src/typography/SrOnly.tsx.html +38 -38
- package/coverage/lcov-report/src/typography/TextContainer.tsx.html +1 -1
- package/coverage/lcov-report/src/typography/Typography.tsx.html +94 -94
- package/coverage/lcov-report/src/typography/WritingDirectionProvider.tsx.html +75 -75
- package/coverage/lcov-report/src/typography/index.html +64 -19
- package/coverage/lcov-report/src/useAsyncAction.ts.html +25 -25
- package/coverage/lcov-report/src/useDebouncedFunction.ts.html +246 -240
- package/coverage/lcov-report/src/useDropzone.ts.html +1 -1
- package/coverage/lcov-report/src/useElementSize.ts.html +334 -0
- package/coverage/lcov-report/src/useEnsuredId.ts.html +8 -8
- package/coverage/lcov-report/src/useEnsuredRef.ts.html +22 -19
- package/coverage/lcov-report/src/useEnsuredState.ts.html +19 -19
- package/coverage/lcov-report/src/useHtmlClassName.ts.html +1 -1
- package/coverage/lcov-report/src/useIntersectionObserver.ts.html +32 -32
- package/coverage/lcov-report/src/useIsomorphicLayoutEffect.ts.html +1 -1
- package/coverage/lcov-report/src/useLocalStorage.ts.html +225 -225
- package/coverage/lcov-report/src/useOrientation.ts.html +32 -32
- package/coverage/lcov-report/src/usePageInactive.ts.html +30 -30
- package/coverage/lcov-report/src/useResizeListener.ts.html +38 -32
- package/coverage/lcov-report/src/useResizeObserver.ts.html +133 -244
- package/coverage/lcov-report/src/useThrottledFunction.ts.html +57 -51
- package/coverage/lcov-report/src/useToggle.ts.html +18 -18
- package/coverage/lcov-report/src/useUnmounted.ts.html +11 -11
- package/coverage/lcov-report/src/useWindowSize.ts.html +124 -94
- package/coverage/lcov-report/src/utils/RenderRecursively.tsx.html +1 -1
- package/coverage/lcov-report/src/utils/alphaNumericSort.ts.html +1 -1
- package/coverage/lcov-report/src/utils/applyRef.ts.html +11 -11
- package/coverage/lcov-report/src/utils/bem.ts.html +50 -50
- package/coverage/lcov-report/src/utils/filters.ts.html +357 -84
- package/coverage/lcov-report/src/utils/getClientPosition.ts.html +1 -1
- package/coverage/lcov-report/src/utils/getMiddleOfRange.ts.html +163 -0
- package/coverage/lcov-report/src/utils/getPercentage.ts.html +36 -36
- package/coverage/lcov-report/src/utils/getRangeDefaultValue.ts.html +66 -87
- package/coverage/lcov-report/src/utils/getRangeSteps.ts.html +7 -7
- package/coverage/lcov-report/src/utils/identity.ts.html +1 -1
- package/coverage/lcov-report/src/utils/index.html +14 -59
- package/coverage/lcov-report/src/utils/isElementVisible.ts.html +14 -14
- package/coverage/lcov-report/src/utils/isValidNumber.ts.html +118 -0
- package/coverage/lcov-report/src/utils/loop.ts.html +1 -1
- package/coverage/lcov-report/src/utils/nearest.ts.html +21 -21
- package/coverage/lcov-report/src/utils/parseCssLengthUnit.ts.html +41 -41
- package/coverage/lcov-report/src/utils/randomInt.ts.html +52 -52
- package/coverage/lcov-report/src/utils/wait.ts.html +1 -1
- package/coverage/lcov-report/src/utils/withinRange.ts.html +1 -1
- package/coverage/lcov-report/src/window-splitter/WindowSplitter.tsx.html +1 -1
- package/coverage/lcov-report/src/window-splitter/index.html +14 -14
- package/coverage/lcov-report/src/window-splitter/useWindowSplitter.ts.html +19 -67
- package/coverage/lcov-report/src/window-splitter/useWindowSplitterMaxValue.ts.html +256 -0
- package/coverage/lcov-report/styles.ts.html +134 -320
- package/coverage/lcov-report/suspense/CircularProgressSuspense.tsx.html +283 -0
- package/coverage/lcov-report/suspense/NullSuspense.tsx.html +202 -0
- package/coverage/lcov-report/suspense/index.html +131 -0
- package/coverage/lcov-report/switchStyles.ts.html +172 -0
- package/coverage/lcov-report/tabIndicatorStyles.ts.html +43 -13
- package/coverage/lcov-report/tabListStyles.ts.html +35 -26
- package/coverage/lcov-report/tabStyles.ts.html +68 -26
- package/coverage/lcov-report/table/Table.tsx.html +526 -0
- package/coverage/lcov-report/table/TableBody.tsx.html +280 -0
- package/coverage/lcov-report/table/TableCell.tsx.html +159 -168
- package/coverage/lcov-report/table/TableCheckbox.tsx.html +10 -13
- package/coverage/lcov-report/table/TableRadio.tsx.html +670 -0
- package/coverage/lcov-report/table/TableRow.tsx.html +370 -0
- package/coverage/lcov-report/table/index.html +62 -32
- package/coverage/lcov-report/tableCellStyles.ts.html +334 -0
- package/coverage/lcov-report/tableContainerStyles.ts.html +142 -0
- package/coverage/lcov-report/tableFooterStyles.ts.html +157 -0
- package/coverage/lcov-report/tableHeaderStyles.ts.html +163 -0
- package/coverage/lcov-report/tableRowStyles.ts.html +169 -0
- package/coverage/lcov-report/tableStyles.ts.html +157 -0
- package/coverage/lcov-report/tabs/Tab.tsx.html +592 -0
- package/coverage/lcov-report/tabs/TabList.tsx.html +796 -0
- package/coverage/lcov-report/tabs/index.html +107 -17
- package/coverage/lcov-report/tabs/tabIndicatorStyles.ts.html +187 -0
- package/coverage/lcov-report/tabs/tabListStyles.ts.html +241 -0
- package/coverage/lcov-report/tabs/tabStyles.ts.html +253 -0
- package/coverage/lcov-report/tabs/useTabList.ts.html +736 -0
- package/coverage/lcov-report/tabs/useTabs.ts.html +1567 -0
- package/coverage/lcov-report/tabs/utils.ts.html +337 -0
- package/coverage/lcov-report/test-utils/index.html +21 -21
- package/coverage/lcov-report/test-utils/jest-setup.ts.html +124 -0
- package/coverage/lcov-report/test-utils/use.ts.html +187 -0
- package/coverage/lcov-report/tooltip/Tooltip.tsx.html +98 -74
- package/coverage/lcov-report/tooltip/TooltipHoverModeProvider.tsx.html +167 -11
- package/coverage/lcov-report/tooltip/constants.ts.html +1 -1
- package/coverage/lcov-report/tooltip/index.html +11 -56
- package/coverage/lcov-report/tooltip/tooltipStyles.ts.html +181 -0
- package/coverage/lcov-report/tooltip/useTooltip.ts.html +555 -234
- package/coverage/lcov-report/tooltipStyles.ts.html +181 -0
- package/coverage/lcov-report/transition/SkeletonPlaceholder.tsx.html +595 -0
- package/coverage/lcov-report/transition/config.ts.html +187 -0
- package/coverage/lcov-report/transition/index.html +9 -24
- package/coverage/lcov-report/transition/skeletonPlaceholderUtils.ts.html +400 -0
- package/coverage/lcov-report/transition/useScaleTransition.ts.html +535 -0
- package/coverage/lcov-report/transition/useSkeletonPlaceholder.ts.html +952 -0
- package/coverage/lcov-report/transition/useTransition.ts.html +943 -0
- package/coverage/lcov-report/tree/Tree.tsx.html +24 -36
- package/coverage/lcov-report/tree/TreeItem.tsx.html +215 -221
- package/coverage/lcov-report/tree/TreeProvider.tsx.html +55 -10
- package/coverage/lcov-report/tree/index.html +19 -94
- package/coverage/lcov-report/tree/styles.ts.html +538 -0
- package/coverage/lcov-report/tree/useTreeMovement.ts.html +140 -143
- package/coverage/lcov-report/typography/Typography.tsx.html +138 -432
- package/coverage/lcov-report/typography/WritingDirectionProvider.tsx.html +781 -0
- package/coverage/lcov-report/typography/index.html +18 -18
- package/coverage/lcov-report/useAutoComplete.ts.html +787 -0
- package/coverage/lcov-report/useCollapseTransition.ts.html +166 -211
- package/coverage/lcov-report/useCombobox.ts.html +1513 -0
- package/coverage/lcov-report/useInlineAutoComplete.ts.html +379 -0
- package/coverage/lcov-report/useSelectCombobox.ts.html +295 -0
- package/coverage/lcov-report/useSkeletonPlaceholder.ts.html +952 -0
- package/coverage/lcov-report/useTabList.ts.html +142 -136
- package/coverage/lcov-report/useTooltip.ts.html +651 -375
- package/coverage/lcov-report/useTransition.ts.html +934 -0
- package/coverage/lcov-report/useWindowSplitter.ts.html +640 -0
- package/coverage/lcov-report/useWindowSplitterMaxValue.ts.html +256 -0
- package/coverage/lcov-report/utils/alphaNumericSort.ts.html +11 -50
- package/coverage/lcov-report/utils/filters.ts.html +1056 -201
- package/coverage/lcov-report/utils/index.html +13 -43
- package/coverage/lcov-report/utils/isElementVisible.ts.html +12 -12
- package/coverage/lcov-report/utils/parseCssLengthUnit.ts.html +19 -19
- package/coverage/lcov-report/utils/randomInt.ts.html +148 -0
- package/coverage/lcov-report/utils/searching.ts.html +85 -0
- package/coverage/lcov-report/utils/wait.ts.html +1 -1
- package/coverage/lcov-report/utils.ts.html +109 -277
- package/coverage/lcov-report/window-splitter/index.html +21 -36
- package/coverage/lcov-report/window-splitter/useWindowSplitter.ts.html +406 -328
- package/coverage/lcov.info +0 -1176
- package/dist/RootHtml.d.ts +62 -0
- package/dist/RootHtml.js +49 -0
- package/dist/RootHtml.js.map +1 -0
- package/dist/_box-shadows.scss +12 -2
- package/dist/_core.scss +208 -250
- package/dist/_utils.scss +89 -0
- package/dist/app-bar/AppBar.d.ts +4 -9
- package/dist/app-bar/AppBar.js +29 -7
- package/dist/app-bar/AppBar.js.map +1 -1
- package/dist/app-bar/_app-bar.scss +114 -122
- package/dist/avatar/Avatar.d.ts +16 -15
- package/dist/avatar/Avatar.js +7 -3
- package/dist/avatar/Avatar.js.map +1 -1
- package/dist/avatar/_avatar.scss +79 -84
- package/dist/avatar/styles.d.ts +20 -2
- package/dist/avatar/styles.js +4 -1
- package/dist/avatar/styles.js.map +1 -1
- package/dist/badge/_badge.scss +97 -59
- package/dist/box/_box.scss +72 -81
- package/dist/button/AsyncButton.d.ts +29 -0
- package/dist/button/AsyncButton.js +14 -1
- package/dist/button/AsyncButton.js.map +1 -1
- package/dist/button/TooltippedButton.d.ts +62 -0
- package/dist/button/TooltippedButton.js +62 -0
- package/dist/button/TooltippedButton.js.map +1 -0
- package/dist/button/_button.scss +170 -180
- package/dist/card/Card.js +3 -2
- package/dist/card/Card.js.map +1 -1
- package/dist/card/CardContent.js +1 -1
- package/dist/card/CardContent.js.map +1 -1
- package/dist/card/ClickableCard.d.ts +42 -0
- package/dist/card/ClickableCard.js +73 -0
- package/dist/card/ClickableCard.js.map +1 -0
- package/dist/card/_card.scss +81 -82
- package/dist/card/styles.d.ts +8 -0
- package/dist/card/styles.js +6 -3
- package/dist/card/styles.js.map +1 -1
- package/dist/chip/_chip.scss +136 -163
- package/dist/chip/styles.d.ts +1 -1
- package/dist/chip/styles.js +3 -4
- package/dist/chip/styles.js.map +1 -1
- package/dist/cssUtils.d.ts +1 -0
- package/dist/cssUtils.js +1 -1
- package/dist/cssUtils.js.map +1 -1
- package/dist/dialog/Dialog.d.ts +1 -1
- package/dist/dialog/Dialog.js +2 -1
- package/dist/dialog/Dialog.js.map +1 -1
- package/dist/dialog/FixedDialog.d.ts +5 -4
- package/dist/dialog/FixedDialog.js +5 -4
- package/dist/dialog/FixedDialog.js.map +1 -1
- package/dist/dialog/_dialog.scss +179 -162
- package/dist/divider/Divider.d.ts +0 -1
- package/dist/divider/Divider.js.map +1 -1
- package/dist/divider/_divider.scss +61 -70
- package/dist/draggable/_draggable.scss +16 -12
- package/dist/draggable/useDraggable.d.ts +12 -23
- package/dist/draggable/useDraggable.js +15 -6
- package/dist/draggable/useDraggable.js.map +1 -1
- package/dist/draggable/utils.d.ts +4 -17
- package/dist/draggable/utils.js +9 -25
- package/dist/draggable/utils.js.map +1 -1
- package/dist/expansion-panel/_expansion-panel.scss +76 -50
- package/dist/expansion-panel/useExpansionPanels.d.ts +5 -3
- package/dist/expansion-panel/useExpansionPanels.js +16 -9
- package/dist/expansion-panel/useExpansionPanels.js.map +1 -1
- package/dist/focus/useFocusContainer.d.ts +8 -8
- package/dist/focus/useFocusContainer.js +11 -10
- package/dist/focus/useFocusContainer.js.map +1 -1
- package/dist/form/Form.d.ts +1 -1
- package/dist/form/Form.js +2 -1
- package/dist/form/Form.js.map +1 -1
- package/dist/form/Label.d.ts +5 -5
- package/dist/form/Label.js.map +1 -1
- package/dist/form/MenuItemInputToggle.d.ts +2 -15
- package/dist/form/MenuItemInputToggle.js +27 -38
- package/dist/form/MenuItemInputToggle.js.map +1 -1
- package/dist/form/MenuItemTextField.d.ts +2 -0
- package/dist/form/MenuItemTextField.js.map +1 -1
- package/dist/form/NativeSelect.d.ts +5 -2
- package/dist/form/NativeSelect.js.map +1 -1
- package/dist/form/Option.js +3 -2
- package/dist/form/Option.js.map +1 -1
- package/dist/form/ResizingTextAreaWrapper.d.ts +19 -0
- package/dist/form/ResizingTextAreaWrapper.js +35 -0
- package/dist/form/ResizingTextAreaWrapper.js.map +1 -0
- package/dist/form/Select.d.ts +105 -15
- package/dist/form/Select.js +160 -244
- package/dist/form/Select.js.map +1 -1
- package/dist/form/SelectedOption.d.ts +21 -0
- package/dist/form/SelectedOption.js +37 -0
- package/dist/form/SelectedOption.js.map +1 -0
- package/dist/form/Slider.d.ts +41 -5
- package/dist/form/Slider.js +2 -1
- package/dist/form/Slider.js.map +1 -1
- package/dist/form/SliderThumb.d.ts +7 -2
- package/dist/form/SliderThumb.js +4 -2
- package/dist/form/SliderThumb.js.map +1 -1
- package/dist/form/SliderValueMarks.js +1 -1
- package/dist/form/SliderValueMarks.js.map +1 -1
- package/dist/form/SliderValueTooltip.js +1 -1
- package/dist/form/SliderValueTooltip.js.map +1 -1
- package/dist/form/Switch.d.ts +3 -2
- package/dist/form/Switch.js +7 -26
- package/dist/form/Switch.js.map +1 -1
- package/dist/form/SwitchTrack.d.ts +2 -1
- package/dist/form/SwitchTrack.js +8 -4
- package/dist/form/SwitchTrack.js.map +1 -1
- package/dist/form/TextArea.d.ts +11 -0
- package/dist/form/TextArea.js +19 -29
- package/dist/form/TextArea.js.map +1 -1
- package/dist/form/TextField.d.ts +2 -2
- package/dist/form/TextField.js +7 -6
- package/dist/form/TextField.js.map +1 -1
- package/dist/form/TextFieldContainerStyles.d.ts +7 -7
- package/dist/form/TextFieldContainerStyles.js.map +1 -1
- package/dist/form/_form.scss +1339 -1256
- package/dist/form/menuItemInputToggleStyles.d.ts +39 -0
- package/dist/form/menuItemInputToggleStyles.js +31 -0
- package/dist/form/menuItemInputToggleStyles.js.map +1 -0
- package/dist/form/selectUtils.d.ts +1 -3
- package/dist/form/selectUtils.js +2 -10
- package/dist/form/selectUtils.js.map +1 -1
- package/dist/form/switchStyles.d.ts +1 -0
- package/dist/form/switchStyles.js +2 -1
- package/dist/form/switchStyles.js.map +1 -1
- package/dist/form/textAreaStyles.d.ts +2 -2
- package/dist/form/textAreaStyles.js.map +1 -1
- package/dist/form/types.d.ts +6 -8
- package/dist/form/types.js.map +1 -1
- package/dist/form/useCombobox.d.ts +157 -0
- package/dist/form/useCombobox.js +206 -0
- package/dist/form/useCombobox.js.map +1 -0
- package/dist/form/useEditableCombobox.d.ts +15 -0
- package/dist/form/useEditableCombobox.js +101 -0
- package/dist/form/useEditableCombobox.js.map +1 -0
- package/dist/form/useFormReset.d.ts +16 -0
- package/dist/form/useFormReset.js +32 -0
- package/dist/form/useFormReset.js.map +1 -0
- package/dist/form/useListboxProvider.d.ts +4 -2
- package/dist/form/useListboxProvider.js +6 -8
- package/dist/form/useListboxProvider.js.map +1 -1
- package/dist/form/useResizingTextArea.d.ts +5 -2
- package/dist/form/useResizingTextArea.js +52 -21
- package/dist/form/useResizingTextArea.js.map +1 -1
- package/dist/form/useSelectCombobox.d.ts +17 -0
- package/dist/form/useSelectCombobox.js +36 -0
- package/dist/form/useSelectCombobox.js.map +1 -0
- package/dist/form/utils.d.ts +11 -1
- package/dist/form/utils.js +6 -0
- package/dist/form/utils.js.map +1 -1
- package/dist/hoverMode/useHoverMode.d.ts +2 -2
- package/dist/hoverMode/useHoverMode.js +1 -1
- package/dist/hoverMode/useHoverMode.js.map +1 -1
- package/dist/icon/FontIcon.d.ts +2 -1
- package/dist/icon/FontIcon.js +4 -5
- package/dist/icon/FontIcon.js.map +1 -1
- package/dist/icon/IconRotator.js +2 -3
- package/dist/icon/IconRotator.js.map +1 -1
- package/dist/icon/MaterialIcon.d.ts +2 -2
- package/dist/icon/MaterialIcon.js +3 -6
- package/dist/icon/MaterialIcon.js.map +1 -1
- package/dist/icon/MaterialSymbol.d.ts +15 -8
- package/dist/icon/MaterialSymbol.js +15 -11
- package/dist/icon/MaterialSymbol.js.map +1 -1
- package/dist/icon/_icon.scss +105 -112
- package/dist/icon/iconConfig.js.map +1 -1
- package/dist/icon/material.d.ts +1 -1
- package/dist/icon/material.js.map +1 -1
- package/dist/icon/{MaterialSymbolsProvider.d.ts → materialConfig.d.ts} +25 -14
- package/dist/icon/materialConfig.js +29 -0
- package/dist/icon/materialConfig.js.map +1 -0
- package/dist/icon/styles.d.ts +0 -15
- package/dist/icon/styles.js +2 -4
- package/dist/icon/styles.js.map +1 -1
- package/dist/index.d.ts +30 -7
- package/dist/index.js +30 -7
- package/dist/index.js.map +1 -1
- package/dist/interaction/_interaction.scss +144 -135
- package/dist/layout/_layout.scss +82 -86
- package/dist/layout/useLayoutAppBarHeight.js +5 -9
- package/dist/layout/useLayoutAppBarHeight.js.map +1 -1
- package/dist/link/Link.d.ts +12 -6
- package/dist/link/Link.js +1 -2
- package/dist/link/Link.js.map +1 -1
- package/dist/link/_link.scss +74 -66
- package/dist/list/ListItem.d.ts +8 -3
- package/dist/list/ListItem.js +4 -3
- package/dist/list/ListItem.js.map +1 -1
- package/dist/list/ListItemAddon.js +2 -1
- package/dist/list/ListItemAddon.js.map +1 -1
- package/dist/list/ListItemChildren.js +3 -2
- package/dist/list/ListItemChildren.js.map +1 -1
- package/dist/list/ListItemLink.d.ts +1 -1
- package/dist/list/ListItemLink.js +3 -3
- package/dist/list/ListItemLink.js.map +1 -1
- package/dist/list/_list.scss +187 -184
- package/dist/list/getListItemHeight.d.ts +0 -1
- package/dist/list/getListItemHeight.js +2 -2
- package/dist/list/getListItemHeight.js.map +1 -1
- package/dist/list/listItemStyles.d.ts +9 -1
- package/dist/list/listItemStyles.js +5 -5
- package/dist/list/listItemStyles.js.map +1 -1
- package/dist/list/types.d.ts +25 -6
- package/dist/list/types.js.map +1 -1
- package/dist/menu/DropdownMenu.d.ts +12 -1
- package/dist/menu/DropdownMenu.js +13 -4
- package/dist/menu/DropdownMenu.js.map +1 -1
- package/dist/menu/Menu.d.ts +8 -0
- package/dist/menu/Menu.js +14 -2
- package/dist/menu/Menu.js.map +1 -1
- package/dist/menu/MenuItemCircularProgress.d.ts +60 -0
- package/dist/menu/MenuItemCircularProgress.js +74 -0
- package/dist/menu/MenuItemCircularProgress.js.map +1 -0
- package/dist/menu/MenuItemSeparator.d.ts +1 -2
- package/dist/menu/MenuItemSeparator.js +2 -8
- package/dist/menu/MenuItemSeparator.js.map +1 -1
- package/dist/menu/MenuSheet.d.ts +6 -1
- package/dist/menu/MenuSheet.js.map +1 -1
- package/dist/menu/_menu.scss +29 -50
- package/dist/menu/useContextMenu.d.ts +3 -3
- package/dist/menu/useContextMenu.js +3 -3
- package/dist/menu/useContextMenu.js.map +1 -1
- package/dist/movement/types.d.ts +40 -21
- package/dist/movement/types.js.map +1 -1
- package/dist/movement/useKeyboardMovementProvider.js +15 -4
- package/dist/movement/useKeyboardMovementProvider.js.map +1 -1
- package/dist/movement/utils.d.ts +7 -2
- package/dist/movement/utils.js +10 -0
- package/dist/movement/utils.js.map +1 -1
- package/dist/overlay/_overlay.scss +39 -42
- package/dist/portal/PortalContainerProvider.d.ts +2 -2
- package/dist/portal/PortalContainerProvider.js +6 -1
- package/dist/portal/PortalContainerProvider.js.map +1 -1
- package/dist/positioning/useFixedPositioning.js +0 -8
- package/dist/positioning/useFixedPositioning.js.map +1 -1
- package/dist/progress/CircularProgress.d.ts +5 -4
- package/dist/progress/CircularProgress.js +3 -3
- package/dist/progress/CircularProgress.js.map +1 -1
- package/dist/progress/LinearProgress.d.ts +7 -5
- package/dist/progress/LinearProgress.js +4 -3
- package/dist/progress/LinearProgress.js.map +1 -1
- package/dist/progress/_progress.scss +33 -33
- package/dist/responsive-item/_responsive-item.scss +91 -89
- package/dist/searching/caseInsensitive.d.ts +150 -0
- package/dist/searching/caseInsensitive.js +30 -0
- package/dist/searching/caseInsensitive.js.map +1 -0
- package/dist/searching/fuzzy.d.ts +128 -0
- package/dist/searching/fuzzy.js +54 -0
- package/dist/searching/fuzzy.js.map +1 -0
- package/dist/searching/toSearchQuery.d.ts +7 -0
- package/dist/searching/toSearchQuery.js +15 -0
- package/dist/searching/toSearchQuery.js.map +1 -0
- package/dist/searching/types.d.ts +28 -0
- package/dist/searching/types.js +5 -0
- package/dist/searching/types.js.map +1 -0
- package/dist/searching/useFuzzyMatch.d.ts +19 -0
- package/dist/searching/useFuzzyMatch.js +26 -0
- package/dist/searching/useFuzzyMatch.js.map +1 -0
- package/dist/searching/utils.d.ts +21 -0
- package/dist/searching/utils.js +28 -0
- package/dist/searching/utils.js.map +1 -0
- package/dist/segmented-button/_segmented-button.scss +89 -90
- package/dist/sheet/_sheet.scss +107 -123
- package/dist/sheet/styles.d.ts +14 -15
- package/dist/sheet/styles.js.map +1 -1
- package/dist/snackbar/DefaultToastRenderer.js +1 -1
- package/dist/snackbar/DefaultToastRenderer.js.map +1 -1
- package/dist/snackbar/Snackbar.d.ts +10 -10
- package/dist/snackbar/Snackbar.js +3 -3
- package/dist/snackbar/Snackbar.js.map +1 -1
- package/dist/snackbar/Toast.d.ts +1 -1
- package/dist/snackbar/Toast.js +5 -1
- package/dist/snackbar/Toast.js.map +1 -1
- package/dist/snackbar/ToastManager.d.ts +2 -1
- package/dist/snackbar/ToastManager.js +1 -1
- package/dist/snackbar/ToastManager.js.map +1 -1
- package/dist/snackbar/_snackbar.scss +148 -144
- package/dist/snackbar/snackbarStyles.d.ts +1 -0
- package/dist/snackbar/snackbarStyles.js +2 -1
- package/dist/snackbar/snackbarStyles.js.map +1 -1
- package/dist/suspense/CircularProgressSuspense.d.ts +4 -0
- package/dist/suspense/CircularProgressSuspense.js +3 -1
- package/dist/suspense/CircularProgressSuspense.js.map +1 -1
- package/dist/table/Table.d.ts +0 -12
- package/dist/table/Table.js +1 -12
- package/dist/table/Table.js.map +1 -1
- package/dist/table/TableCell.d.ts +13 -38
- package/dist/table/TableCell.js +7 -15
- package/dist/table/TableCell.js.map +1 -1
- package/dist/table/TableCellContent.d.ts +9 -0
- package/dist/table/TableCellContent.js +2 -1
- package/dist/table/TableCellContent.js.map +1 -1
- package/dist/table/TableCheckbox.d.ts +5 -4
- package/dist/table/TableCheckbox.js +7 -5
- package/dist/table/TableCheckbox.js.map +1 -1
- package/dist/table/TableContainer.d.ts +0 -6
- package/dist/table/TableContainer.js +1 -6
- package/dist/table/TableContainer.js.map +1 -1
- package/dist/table/TableFooter.d.ts +7 -1
- package/dist/table/TableFooter.js +17 -16
- package/dist/table/TableFooter.js.map +1 -1
- package/dist/table/TableHeader.d.ts +7 -14
- package/dist/table/TableHeader.js +6 -14
- package/dist/table/TableHeader.js.map +1 -1
- package/dist/table/TableRadio.d.ts +107 -0
- package/dist/table/TableRadio.js +108 -0
- package/dist/table/TableRadio.js.map +1 -0
- package/dist/table/TableRow.d.ts +0 -10
- package/dist/table/TableRow.js +1 -12
- package/dist/table/TableRow.js.map +1 -1
- package/dist/table/_table.scss +217 -232
- package/dist/table/tableCellStyles.d.ts +33 -0
- package/dist/table/tableCellStyles.js +15 -0
- package/dist/table/tableCellStyles.js.map +1 -0
- package/dist/table/tableContainerStyles.d.ts +10 -0
- package/dist/table/tableContainerStyles.js +9 -0
- package/dist/table/tableContainerStyles.js.map +1 -0
- package/dist/table/tableFooterStyles.d.ts +10 -0
- package/dist/table/tableFooterStyles.js +12 -0
- package/dist/table/tableFooterStyles.js.map +1 -0
- package/dist/table/tableHeaderStyles.d.ts +10 -0
- package/dist/table/tableHeaderStyles.js +13 -0
- package/dist/table/tableHeaderStyles.js.map +1 -0
- package/dist/table/tableRowStyles.d.ts +10 -0
- package/dist/table/tableRowStyles.js +14 -0
- package/dist/table/tableRowStyles.js.map +1 -0
- package/dist/table/tableStyles.d.ts +12 -0
- package/dist/table/tableStyles.js +14 -0
- package/dist/table/tableStyles.js.map +1 -0
- package/dist/table/types.d.ts +28 -15
- package/dist/table/types.js.map +1 -1
- package/dist/tabs/Tab.d.ts +24 -3
- package/dist/tabs/Tab.js +15 -8
- package/dist/tabs/Tab.js.map +1 -1
- package/dist/tabs/_tabs.scss +64 -53
- package/dist/tabs/tabIndicatorStyles.d.ts +2 -1
- package/dist/tabs/tabIndicatorStyles.js +6 -3
- package/dist/tabs/tabIndicatorStyles.js.map +1 -1
- package/dist/tabs/tabListStyles.js +2 -1
- package/dist/tabs/tabListStyles.js.map +1 -1
- package/dist/tabs/tabStyles.d.ts +2 -0
- package/dist/tabs/tabStyles.js +6 -3
- package/dist/tabs/tabStyles.js.map +1 -1
- package/dist/tabs/useTabList.d.ts +3 -3
- package/dist/tabs/useTabList.js +9 -6
- package/dist/tabs/useTabList.js.map +1 -1
- package/dist/test-utils/IntersectionObserver.d.ts +12 -0
- package/dist/test-utils/ResizeObserver.d.ts +214 -0
- package/dist/test-utils/ResizeObserver.js +69 -49
- package/dist/test-utils/ResizeObserver.js.map +1 -1
- package/dist/test-utils/data-testid.d.ts +7 -0
- package/dist/test-utils/data-testid.js +3 -0
- package/dist/test-utils/data-testid.js.map +1 -0
- package/dist/test-utils/drag.d.ts +26 -0
- package/dist/test-utils/index.d.ts +7 -0
- package/dist/test-utils/jest-setup.d.ts +1 -0
- package/dist/test-utils/jest-setup.js +3 -0
- package/dist/test-utils/jest-setup.js.map +1 -1
- package/dist/test-utils/matchMedia.d.ts +101 -0
- package/dist/test-utils/matchMedia.js +2 -2
- package/dist/test-utils/matchMedia.js.map +1 -1
- package/dist/test-utils/polyfills/IntersectionObserver.d.ts +1 -0
- package/dist/test-utils/polyfills/ResizeObserver.d.ts +1 -0
- package/dist/test-utils/polyfills/TextDecoder.d.ts +1 -0
- package/dist/test-utils/polyfills/TextDecoder.js +8 -0
- package/dist/test-utils/polyfills/TextDecoder.js.map +1 -0
- package/dist/test-utils/polyfills/TextEncoder.d.ts +1 -0
- package/dist/test-utils/polyfills/TextEncoder.js +6 -0
- package/dist/test-utils/polyfills/TextEncoder.js.map +1 -0
- package/dist/test-utils/polyfills/index.d.ts +7 -0
- package/dist/test-utils/polyfills/index.js +2 -0
- package/dist/test-utils/polyfills/index.js.map +1 -1
- package/dist/test-utils/polyfills/matchMedia.d.ts +1 -0
- package/dist/test-utils/polyfills/offsetParent.d.ts +1 -0
- package/dist/test-utils/polyfills/scrollIntoView.d.ts +1 -0
- package/dist/test-utils/render.d.ts +13 -0
- package/dist/test-utils/timers.d.ts +39 -0
- package/dist/theme/ThemeProvider.d.ts +5 -0
- package/dist/theme/ThemeProvider.js.map +1 -1
- package/dist/theme/_theme.scss +243 -133
- package/dist/tooltip/Tooltip.d.ts +13 -6
- package/dist/tooltip/Tooltip.js +2 -2
- package/dist/tooltip/Tooltip.js.map +1 -1
- package/dist/tooltip/TooltipHoverModeProvider.d.ts +15 -0
- package/dist/tooltip/TooltipHoverModeProvider.js.map +1 -1
- package/dist/tooltip/_tooltip.scss +76 -82
- package/dist/tooltip/tooltipStyles.d.ts +2 -1
- package/dist/tooltip/tooltipStyles.js +2 -2
- package/dist/tooltip/tooltipStyles.js.map +1 -1
- package/dist/tooltip/useTooltip.d.ts +83 -20
- package/dist/tooltip/useTooltip.js +68 -7
- package/dist/tooltip/useTooltip.js.map +1 -1
- package/dist/transition/SkeletonPlaceholder.d.ts +2 -2
- package/dist/transition/SkeletonPlaceholder.js +8 -3
- package/dist/transition/SkeletonPlaceholder.js.map +1 -1
- package/dist/transition/_transition.scss +89 -78
- package/dist/transition/config.d.ts +22 -0
- package/dist/transition/config.js +16 -0
- package/dist/transition/config.js.map +1 -0
- package/dist/transition/skeletonPlaceholderUtils.d.ts +77 -0
- package/dist/transition/skeletonPlaceholderUtils.js +38 -0
- package/dist/transition/skeletonPlaceholderUtils.js.map +1 -0
- package/dist/transition/useCollapseTransition.d.ts +3 -18
- package/dist/transition/useCollapseTransition.js +1 -10
- package/dist/transition/useCollapseTransition.js.map +1 -1
- package/dist/transition/useSkeletonPlaceholder.d.ts +12 -7
- package/dist/transition/useSkeletonPlaceholder.js +38 -37
- package/dist/transition/useSkeletonPlaceholder.js.map +1 -1
- package/dist/transition/useTransition.js +15 -6
- package/dist/transition/useTransition.js.map +1 -1
- package/dist/transition/utils.js +7 -2
- package/dist/transition/utils.js.map +1 -1
- package/dist/tree/DefaultTreeItemRenderer.d.ts +3 -3
- package/dist/tree/DefaultTreeItemRenderer.js.map +1 -1
- package/dist/tree/Tree.d.ts +9 -5
- package/dist/tree/Tree.js +18 -21
- package/dist/tree/Tree.js.map +1 -1
- package/dist/tree/TreeItem.js +4 -7
- package/dist/tree/TreeItem.js.map +1 -1
- package/dist/tree/TreeProvider.d.ts +2 -0
- package/dist/tree/TreeProvider.js +3 -1
- package/dist/tree/TreeProvider.js.map +1 -1
- package/dist/tree/_tree.scss +111 -109
- package/dist/tree/styles.d.ts +0 -6
- package/dist/tree/styles.js +1 -2
- package/dist/tree/styles.js.map +1 -1
- package/dist/tree/useTreeMovement.js +1 -1
- package/dist/tree/useTreeMovement.js.map +1 -1
- package/dist/types.d.ts +13 -0
- package/dist/types.js +1 -2
- package/dist/types.js.map +1 -1
- package/dist/typography/SrOnly.d.ts +3 -3
- package/dist/typography/SrOnly.js +4 -4
- package/dist/typography/SrOnly.js.map +1 -1
- package/dist/typography/Typography.d.ts +19 -19
- package/dist/typography/Typography.js +19 -19
- package/dist/typography/Typography.js.map +1 -1
- package/dist/typography/WritingDirectionProvider.d.ts +2 -2
- package/dist/typography/WritingDirectionProvider.js +2 -2
- package/dist/typography/WritingDirectionProvider.js.map +1 -1
- package/dist/typography/_typography.scss +141 -87
- package/dist/useDebouncedFunction.d.ts +2 -2
- package/dist/useDebouncedFunction.js +10 -6
- package/dist/useDebouncedFunction.js.map +1 -1
- package/dist/useElementSize.d.ts +40 -0
- package/dist/useElementSize.js +53 -0
- package/dist/useElementSize.js.map +1 -0
- package/dist/useEnsuredState.d.ts +1 -1
- package/dist/useEnsuredState.js.map +1 -1
- package/dist/useResizeListener.d.ts +1 -1
- package/dist/useResizeListener.js +1 -0
- package/dist/useResizeListener.js.map +1 -1
- package/dist/useResizeObserver.d.ts +4 -43
- package/dist/useResizeObserver.js +4 -43
- package/dist/useResizeObserver.js.map +1 -1
- package/dist/useThrottledFunction.d.ts +2 -2
- package/dist/useThrottledFunction.js +20 -16
- package/dist/useThrottledFunction.js.map +1 -1
- package/dist/useWindowSize.d.ts +14 -11
- package/dist/useWindowSize.js +12 -7
- package/dist/useWindowSize.js.map +1 -1
- package/dist/utils/alphaNumericSort.d.ts +1 -1
- package/dist/utils/alphaNumericSort.js +2 -10
- package/dist/utils/alphaNumericSort.js.map +1 -1
- package/dist/utils/getMiddleOfRange.d.ts +13 -0
- package/dist/utils/getMiddleOfRange.js +20 -0
- package/dist/utils/getMiddleOfRange.js.map +1 -0
- package/dist/utils/getRangeDefaultValue.d.ts +3 -5
- package/dist/utils/getRangeDefaultValue.js +3 -13
- package/dist/utils/getRangeDefaultValue.js.map +1 -1
- package/dist/utils/getRangeSteps.d.ts +1 -1
- package/dist/utils/getRangeSteps.js +2 -2
- package/dist/utils/getRangeSteps.js.map +1 -1
- package/dist/utils/nearest.js +1 -1
- package/dist/utils/nearest.js.map +1 -1
- package/dist/window-splitter/_window-splitter.scss +83 -112
- package/dist/window-splitter/useWindowSplitter.d.ts +3 -5
- package/dist/window-splitter/useWindowSplitter.js +3 -11
- package/dist/window-splitter/useWindowSplitter.js.map +1 -1
- package/jest.config.ts +4 -0
- package/package.json +38 -40
- package/scripts/{copySassFiles.js → copySassFiles.ts} +5 -5
- package/scripts/tsconfig.json +18 -0
- package/src/RootHtml.tsx +95 -0
- package/src/__tests__/NoSsr.tsx +5 -5
- package/src/__tests__/RootHtml.node.tsx +46 -0
- package/src/__tests__/__snapshots__/RootHtml.node.tsx.snap +19 -0
- package/src/__tests__/useAsyncAction.tsx +14 -6
- package/src/__tests__/useDebouncedFunction.tsx +68 -24
- package/src/__tests__/useDropzone.tsx +10 -10
- package/src/__tests__/useElementSize.tsx +181 -0
- package/src/__tests__/useEnsuredId.tsx +5 -5
- package/src/__tests__/useEnsuredState.tsx +1 -2
- package/src/__tests__/useLocalStorage.tsx +21 -21
- package/src/__tests__/useResizeObserver.tsx +2 -0
- package/src/__tests__/useThrottledFunction.tsx +63 -8
- package/src/__tests__/useToggle.tsx +10 -10
- package/src/__tests__/useWindowSize.node.tsx +56 -0
- package/src/__tests__/useWindowSize.tsx +156 -0
- package/src/_box-shadows.scss +12 -2
- package/src/_core.scss +208 -250
- package/src/_utils.scss +89 -0
- package/src/app-bar/AppBar.tsx +59 -19
- package/src/app-bar/__tests__/AppBar.tsx +15 -15
- package/src/app-bar/__tests__/AppBarTitle.tsx +3 -5
- package/src/app-bar/__tests__/__snapshots__/AppBar.tsx.snap +21 -21
- package/src/app-bar/_app-bar.scss +114 -122
- package/src/avatar/Avatar.tsx +36 -23
- package/src/avatar/__tests__/Avatar.tsx +6 -6
- package/src/avatar/__tests__/__snapshots__/Avatar.tsx.snap +6 -6
- package/src/avatar/_avatar.scss +79 -84
- package/src/avatar/styles.ts +27 -4
- package/src/badge/__tests__/Badge.tsx +3 -3
- package/src/badge/_badge.scss +97 -59
- package/src/box/_box.scss +72 -81
- package/src/button/AsyncButton.tsx +71 -4
- package/src/button/TooltippedButton.tsx +120 -0
- package/src/button/__tests__/AsyncButton.tsx +2 -0
- package/src/button/__tests__/Button.tsx +12 -12
- package/src/button/__tests__/ButtonUnstyled.tsx +3 -3
- package/src/button/__tests__/TooltippedButton.tsx +60 -0
- package/src/button/__tests__/__snapshots__/AsyncButton.tsx.snap +31 -8
- package/src/button/__tests__/__snapshots__/Button.tsx.snap +1 -1
- package/src/button/__tests__/__snapshots__/TooltippedButton.tsx.snap +26 -0
- package/src/button/_button.scss +170 -180
- package/src/card/Card.tsx +5 -3
- package/src/card/CardContent.tsx +3 -3
- package/src/card/ClickableCard.tsx +105 -0
- package/src/card/__tests__/Card.tsx +3 -3
- package/src/card/__tests__/CardContent.tsx +3 -3
- package/src/card/__tests__/CardFooter.tsx +3 -3
- package/src/card/__tests__/CardHeader.tsx +5 -5
- package/src/card/__tests__/CardSubtitle.tsx +3 -3
- package/src/card/__tests__/CardTitle.tsx +3 -3
- package/src/card/__tests__/ClickableCard.tsx +66 -0
- package/src/card/__tests__/__snapshots__/CardHeader.tsx.snap +1 -1
- package/src/card/__tests__/__snapshots__/CardSubtitle.tsx.snap +2 -2
- package/src/card/__tests__/__snapshots__/ClickableCard.tsx.snap +20 -0
- package/src/card/__tests__/__snapshots__/styles.ts.snap +1 -1
- package/src/card/_card.scss +81 -82
- package/src/card/styles.ts +19 -10
- package/src/chip/__tests__/Chip.tsx +20 -22
- package/src/chip/__tests__/__snapshots__/Chip.tsx.snap +3 -3
- package/src/chip/__tests__/__snapshots__/styles.ts.snap +1 -1
- package/src/chip/_chip.scss +136 -163
- package/src/chip/styles.ts +4 -5
- package/src/cssUtils.ts +4 -1
- package/src/dialog/Dialog.tsx +5 -4
- package/src/dialog/FixedDialog.tsx +5 -4
- package/src/dialog/__tests__/Dialog.tsx +316 -0
- package/src/dialog/__tests__/DialogContent.tsx +53 -0
- package/src/dialog/__tests__/DialogFooter.tsx +70 -0
- package/src/dialog/__tests__/DialogHeader.tsx +37 -0
- package/src/dialog/__tests__/DialogTitle.tsx +41 -0
- package/src/dialog/__tests__/__snapshots__/Dialog.tsx.snap +84 -0
- package/src/dialog/__tests__/__snapshots__/DialogContent.tsx.snap +36 -0
- package/src/dialog/__tests__/__snapshots__/DialogFooter.tsx.snap +186 -0
- package/src/dialog/__tests__/__snapshots__/DialogHeader.tsx.snap +18 -0
- package/src/dialog/__tests__/__snapshots__/DialogTitle.tsx.snap +26 -0
- package/src/dialog/_dialog.scss +179 -162
- package/src/divider/Divider.tsx +0 -1
- package/src/divider/__tests__/Divider.tsx +3 -3
- package/src/divider/_divider.scss +61 -70
- package/src/draggable/__tests__/useDraggable.tsx +35 -39
- package/src/draggable/_draggable.scss +16 -12
- package/src/draggable/useDraggable.ts +26 -25
- package/src/draggable/utils.ts +16 -50
- package/src/expansion-panel/__tests__/ExpansionPanel.tsx +30 -25
- package/src/expansion-panel/_expansion-panel.scss +76 -50
- package/src/expansion-panel/useExpansionPanels.ts +20 -16
- package/src/focus/__tests__/useFocusContainer.tsx +280 -0
- package/src/focus/useFocusContainer.ts +17 -10
- package/src/form/Form.tsx +2 -1
- package/src/form/Label.tsx +5 -5
- package/src/form/MenuItemInputToggle.tsx +47 -61
- package/src/form/MenuItemTextField.tsx +3 -0
- package/src/form/NativeSelect.tsx +6 -3
- package/src/form/Option.tsx +8 -2
- package/src/form/ResizingTextAreaWrapper.tsx +75 -0
- package/src/form/Select.tsx +251 -327
- package/src/form/SelectedOption.tsx +55 -0
- package/src/form/Slider.tsx +45 -5
- package/src/form/SliderThumb.tsx +15 -3
- package/src/form/SliderValueMarks.tsx +3 -1
- package/src/form/SliderValueTooltip.tsx +1 -1
- package/src/form/Switch.tsx +6 -27
- package/src/form/SwitchTrack.tsx +12 -2
- package/src/form/TextArea.tsx +40 -32
- package/src/form/TextField.tsx +19 -19
- package/src/form/TextFieldContainerStyles.ts +7 -7
- package/src/form/__tests__/Checkbox.tsx +5 -5
- package/src/form/__tests__/Fieldset.tsx +3 -3
- package/src/form/__tests__/FileInput.tsx +2 -2
- package/src/form/__tests__/Label.tsx +3 -3
- package/src/form/__tests__/Legend.tsx +3 -3
- package/src/form/__tests__/MenuItemCheckbox.tsx +53 -0
- package/src/form/__tests__/MenuItemRadio.tsx +53 -0
- package/src/form/__tests__/Radio.tsx +3 -3
- package/src/form/__tests__/Select.tsx +439 -0
- package/src/form/__tests__/Switch.tsx +152 -0
- package/src/form/__tests__/TextArea.tsx +433 -0
- package/src/form/__tests__/TextField.tsx +195 -0
- package/src/form/__tests__/__snapshots__/FileInput.tsx.snap +23 -23
- package/src/form/__tests__/__snapshots__/MenuItemCheckbox.tsx.snap +96 -0
- package/src/form/__tests__/__snapshots__/MenuItemRadio.tsx.snap +96 -0
- package/src/form/__tests__/__snapshots__/Select.tsx.snap +492 -0
- package/src/form/__tests__/__snapshots__/Switch.tsx.snap +428 -0
- package/src/form/__tests__/__snapshots__/TextArea.tsx.snap +548 -0
- package/src/form/__tests__/__snapshots__/TextField.tsx.snap +279 -0
- package/src/form/__tests__/__snapshots__/useCheckboxGroup.tsx.snap +1 -1
- package/src/form/__tests__/__snapshots__/useRadioGroup.tsx.snap +1 -1
- package/src/form/__tests__/useCheckboxGroup.tsx +33 -33
- package/src/form/__tests__/useFileUpload.tsx +41 -33
- package/src/form/__tests__/useFormReset.tsx +195 -0
- package/src/form/__tests__/useRadioGroup.tsx +25 -25
- package/src/form/_form.scss +1339 -1256
- package/src/form/menuItemInputToggleStyles.ts +78 -0
- package/src/form/selectUtils.ts +3 -14
- package/src/form/switchStyles.ts +3 -3
- package/src/form/textAreaStyles.ts +2 -2
- package/src/form/types.ts +6 -8
- package/src/form/useCombobox.ts +523 -0
- package/src/form/useEditableCombobox.ts +139 -0
- package/src/form/useFormReset.ts +48 -0
- package/src/form/useListboxProvider.ts +9 -7
- package/src/form/useResizingTextArea.ts +66 -25
- package/src/form/useSelectCombobox.ts +70 -0
- package/src/form/utils.ts +17 -4
- package/src/hoverMode/useHoverMode.ts +4 -4
- package/src/icon/FontIcon.tsx +2 -5
- package/src/icon/IconRotator.tsx +1 -2
- package/src/icon/MaterialIcon.tsx +4 -6
- package/src/icon/MaterialSymbol.tsx +18 -12
- package/src/icon/__tests__/FontIcon.tsx +7 -11
- package/src/icon/__tests__/IconRotator.tsx +4 -4
- package/src/icon/__tests__/MaterialIcon.tsx +79 -0
- package/src/icon/__tests__/MaterialSymbol.tsx +100 -0
- package/src/icon/__tests__/SVGIcon.tsx +6 -5
- package/src/icon/__tests__/TextIconSpacing.tsx +15 -17
- package/src/icon/__tests__/__snapshots__/IconRotator.tsx.snap +6 -6
- package/src/icon/__tests__/__snapshots__/MaterialIcon.tsx.snap +82 -0
- package/src/icon/__tests__/__snapshots__/MaterialSymbol.tsx.snap +42 -0
- package/src/icon/_icon.scss +105 -112
- package/src/icon/iconConfig.tsx +1 -0
- package/src/icon/material.ts +284 -54
- package/src/icon/{MaterialSymbolsProvider.tsx → materialConfig.ts} +49 -67
- package/src/icon/styles.ts +0 -21
- package/src/index.ts +30 -7
- package/src/interaction/__tests__/UserInteractionModeProvider.tsx +3 -3
- package/src/interaction/_interaction.scss +144 -135
- package/src/layout/__tests__/__snapshots__/LayoutAppBar.tsx.snap +4 -4
- package/src/layout/__tests__/__snapshots__/useExpandableLayout.tsx.snap +1 -1
- package/src/layout/__tests__/__snapshots__/useLayoutTree.tsx.snap +18 -18
- package/src/layout/__tests__/__snapshots__/useResizableLayout.tsx.snap +1 -1
- package/src/layout/__tests__/__snapshots__/useTemporaryLayout.tsx.snap +1 -1
- package/src/layout/__tests__/useExpandableLayout.tsx +12 -1
- package/src/layout/__tests__/useLayoutTree.tsx +6 -1
- package/src/layout/__tests__/useResizableLayout.tsx +13 -1
- package/src/layout/__tests__/useTemporaryLayout.tsx +6 -1
- package/src/layout/_layout.scss +82 -86
- package/src/layout/useLayoutAppBarHeight.ts +5 -9
- package/src/link/Link.tsx +15 -5
- package/src/link/__tests__/Link.tsx +3 -3
- package/src/link/__tests__/SkipToMainContent.tsx +11 -14
- package/src/link/_link.scss +74 -66
- package/src/list/ListItem.tsx +20 -13
- package/src/list/ListItemAddon.tsx +5 -3
- package/src/list/ListItemChildren.tsx +4 -2
- package/src/list/ListItemLink.tsx +5 -5
- package/src/list/__tests__/List.tsx +7 -7
- package/src/list/__tests__/ListItem.tsx +18 -17
- package/src/list/__tests__/ListItemLink.tsx +7 -7
- package/src/list/__tests__/ListSubheader.tsx +5 -5
- package/src/list/__tests__/__snapshots__/ListItem.tsx.snap +1 -1
- package/src/list/__tests__/getListItemHeight.ts +2 -2
- package/src/list/_list.scss +187 -184
- package/src/list/getListItemHeight.ts +2 -3
- package/src/list/listItemStyles.ts +15 -5
- package/src/list/types.ts +28 -6
- package/src/menu/DropdownMenu.tsx +23 -4
- package/src/menu/Menu.tsx +20 -1
- package/src/menu/MenuItemCircularProgress.tsx +116 -0
- package/src/menu/MenuItemSeparator.tsx +2 -12
- package/src/menu/MenuSheet.tsx +10 -1
- package/src/menu/__tests__/DropdownMenu.tsx +74 -65
- package/src/menu/__tests__/MenuBar.tsx +57 -48
- package/src/menu/__tests__/MenuItemCircularProgress.tsx +39 -0
- package/src/menu/__tests__/MenuVisibilityProvider.tsx +3 -3
- package/src/menu/__tests__/__snapshots__/MenuItemCircularProgress.tsx.snap +68 -0
- package/src/menu/__tests__/__snapshots__/useContextMenu.tsx.snap +54 -0
- package/src/menu/__tests__/useContextMenu.tsx +41 -0
- package/src/menu/_menu.scss +29 -50
- package/src/menu/useContextMenu.ts +3 -3
- package/src/movement/types.ts +50 -25
- package/src/movement/useKeyboardMovementProvider.ts +21 -8
- package/src/movement/utils.ts +12 -2
- package/src/overlay/__tests__/Overlay.tsx +37 -35
- package/src/overlay/_overlay.scss +39 -42
- package/src/portal/PortalContainerProvider.tsx +10 -2
- package/src/portal/__tests__/PortalContainerProvider.node.tsx +1 -0
- package/src/portal/__tests__/PortalContainerProvider.tsx +32 -9
- package/src/positioning/__tests__/__snapshots__/useFixedPositioning.tsx.snap +0 -32
- package/src/positioning/__tests__/useFixedPositioning.tsx +18 -26
- package/src/positioning/useFixedPositioning.ts +0 -6
- package/src/progress/CircularProgress.tsx +5 -4
- package/src/progress/LinearProgress.tsx +88 -86
- package/src/progress/__tests__/CircularProgress.tsx +49 -27
- package/src/progress/__tests__/LinearProgress.tsx +40 -25
- package/src/progress/__tests__/__snapshots__/CircularProgress.tsx.snap +21 -0
- package/src/progress/__tests__/__snapshots__/LinearProgress.tsx.snap +20 -0
- package/src/progress/_progress.scss +33 -33
- package/src/responsive-item/_responsive-item.scss +91 -89
- package/src/searching/__tests__/caseInsensitive.ts +165 -0
- package/src/searching/__tests__/fuzzy.ts +169 -0
- package/src/searching/__tests__/toSearchQuery.ts +21 -0
- package/src/searching/__tests__/useFuzzyMatch.tsx +200 -0
- package/src/searching/caseInsensitive.ts +200 -0
- package/src/searching/fuzzy.ts +175 -0
- package/src/searching/toSearchQuery.ts +20 -0
- package/src/searching/types.ts +34 -0
- package/src/searching/useFuzzyMatch.ts +42 -0
- package/src/searching/utils.ts +53 -0
- package/src/segmented-button/_segmented-button.scss +89 -90
- package/src/sheet/_sheet.scss +107 -123
- package/src/sheet/styles.ts +14 -15
- package/src/snackbar/DefaultToastRenderer.tsx +1 -1
- package/src/snackbar/Snackbar.tsx +28 -32
- package/src/snackbar/Toast.tsx +7 -2
- package/src/snackbar/ToastManager.tsx +3 -2
- package/src/snackbar/__tests__/Snackbar.tsx +13 -12
- package/src/snackbar/__tests__/Toast.tsx +8 -3
- package/src/snackbar/__tests__/ToastActionButton.tsx +2 -2
- package/src/snackbar/__tests__/ToastCloseButton.tsx +2 -2
- package/src/snackbar/__tests__/ToastManagerProvider.tsx +28 -42
- package/src/snackbar/__tests__/__snapshots__/Snackbar.tsx.snap +127 -27
- package/src/snackbar/__tests__/__snapshots__/ToastManagerProvider.tsx.snap +23 -8
- package/src/snackbar/_snackbar.scss +148 -144
- package/src/snackbar/snackbarStyles.ts +3 -1
- package/src/suspense/CircularProgressSuspense.tsx +19 -2
- package/src/suspense/__tests__/CircularProgressSuspense.tsx +90 -0
- package/src/suspense/__tests__/NullSuspense.tsx +46 -0
- package/src/suspense/__tests__/__snapshots__/CircularProgressSuspense.tsx.snap +24 -0
- package/src/table/Table.tsx +1 -24
- package/src/table/TableCell.tsx +22 -85
- package/src/table/TableCellContent.tsx +20 -2
- package/src/table/TableCheckbox.tsx +7 -5
- package/src/table/TableContainer.tsx +1 -8
- package/src/table/TableFooter.tsx +30 -23
- package/src/table/TableHeader.tsx +23 -40
- package/src/table/TableRadio.tsx +197 -0
- package/src/table/TableRow.tsx +1 -28
- package/src/table/__tests__/Table.tsx +4 -10
- package/src/table/__tests__/TableBody.tsx +3 -3
- package/src/table/__tests__/TableCheckbox.tsx +10 -11
- package/src/table/__tests__/TableContainer.tsx +3 -3
- package/src/table/__tests__/TableRadio.tsx +112 -0
- package/src/table/__tests__/TableRow.tsx +4 -10
- package/src/table/__tests__/__snapshots__/Table.tsx.snap +249 -251
- package/src/table/__tests__/__snapshots__/TableBody.tsx.snap +3 -3
- package/src/table/__tests__/__snapshots__/TableCheckbox.tsx.snap +4 -4
- package/src/table/__tests__/__snapshots__/TableRadio.tsx.snap +138 -0
- package/src/table/__tests__/__snapshots__/TableRow.tsx.snap +4 -6
- package/src/table/__tests__/__snapshots__/tableContainerStyles.ts.snap +3 -0
- package/src/table/__tests__/__snapshots__/tableRowStyles.ts.snap +3 -0
- package/src/table/__tests__/__snapshots__/tableStyles.ts.snap +3 -0
- package/src/table/__tests__/tableContainerStyles.ts +8 -0
- package/src/table/__tests__/tableRowStyles.ts +8 -0
- package/src/table/__tests__/tableStyles.ts +8 -0
- package/src/table/_table.scss +217 -232
- package/src/table/tableCellStyles.ts +83 -0
- package/src/table/tableContainerStyles.ts +19 -0
- package/src/table/tableFooterStyles.ts +27 -0
- package/src/table/tableHeaderStyles.ts +29 -0
- package/src/table/tableRowStyles.ts +28 -0
- package/src/table/tableStyles.ts +24 -0
- package/src/table/types.ts +33 -15
- package/src/tabs/Tab.tsx +110 -70
- package/src/tabs/__tests__/Tab.tsx +27 -4
- package/src/tabs/__tests__/TabList.tsx +54 -44
- package/src/tabs/__tests__/__snapshots__/TabList.tsx.snap +2 -2
- package/src/tabs/__tests__/useTabs.tsx +27 -24
- package/src/tabs/_tabs.scss +64 -53
- package/src/tabs/tabIndicatorStyles.ts +13 -3
- package/src/tabs/tabListStyles.ts +1 -1
- package/src/tabs/tabStyles.ts +16 -4
- package/src/tabs/useTabList.ts +10 -8
- package/src/test-utils/ResizeObserver.ts +100 -53
- package/src/test-utils/__tests__/ResizeObserver.ts +1 -1
- package/src/test-utils/data-testid.ts +9 -0
- package/src/test-utils/jest-setup.ts +4 -0
- package/src/test-utils/matchMedia.ts +2 -2
- package/src/test-utils/polyfills/TextDecoder.ts +7 -0
- package/src/test-utils/polyfills/TextEncoder.ts +5 -0
- package/src/test-utils/polyfills/index.ts +2 -0
- package/src/theme/ThemeProvider.tsx +6 -0
- package/src/theme/__tests__/LocalStorageColorSchemeProvider.tsx +4 -4
- package/src/theme/__tests__/useCSSVariables.tsx +4 -4
- package/src/theme/_theme.scss +243 -133
- package/src/tooltip/Tooltip.tsx +17 -9
- package/src/tooltip/TooltipHoverModeProvider.tsx +18 -0
- package/src/tooltip/__tests__/Tooltip.tsx +147 -104
- package/src/tooltip/__tests__/TooltipHoverModeProvider.tsx +8 -3
- package/src/tooltip/__tests__/__snapshots__/Tooltip.tsx.snap +0 -33
- package/src/tooltip/_tooltip.scss +76 -82
- package/src/tooltip/tooltipStyles.ts +4 -4
- package/src/tooltip/useTooltip.ts +141 -34
- package/src/transition/SkeletonPlaceholder.tsx +18 -6
- package/src/transition/__tests__/CSSTransition.tsx +12 -6
- package/src/transition/__tests__/Collapse.tsx +19 -17
- package/src/transition/__tests__/CrossFade.tsx +20 -17
- package/src/transition/__tests__/ScaleTransition.tsx +18 -14
- package/src/transition/__tests__/SkeletonPlaceholder.tsx +72 -0
- package/src/transition/__tests__/__snapshots__/SkeletonPlaceholder.tsx.snap +24 -0
- package/src/transition/__tests__/useCSSTransition.tsx +18 -14
- package/src/transition/__tests__/useCollapseTransition.tsx +25 -21
- package/src/transition/__tests__/useCrossFadeTransition.tsx +20 -16
- package/src/transition/__tests__/useScaleTransition.tsx +18 -12
- package/src/transition/__tests__/useTransition.tsx +165 -68
- package/src/transition/__tests__/utils.ts +25 -0
- package/src/transition/_transition.scss +89 -78
- package/src/transition/config.ts +34 -0
- package/src/transition/skeletonPlaceholderUtils.ts +105 -0
- package/src/transition/useCollapseTransition.ts +6 -24
- package/src/transition/useSkeletonPlaceholder.ts +62 -47
- package/src/transition/useTransition.ts +15 -6
- package/src/transition/utils.ts +10 -5
- package/src/tree/DefaultTreeItemRenderer.tsx +7 -3
- package/src/tree/Tree.tsx +28 -28
- package/src/tree/TreeItem.tsx +5 -7
- package/src/tree/TreeProvider.tsx +6 -0
- package/src/tree/__tests__/Tree.tsx +8 -3
- package/src/tree/__tests__/TreeGroup.tsx +1 -0
- package/src/tree/__tests__/TreeItemExpander.tsx +1 -0
- package/src/tree/__tests__/__snapshots__/Tree.tsx.snap +124 -124
- package/src/tree/_tree.scss +111 -109
- package/src/tree/styles.ts +0 -9
- package/src/tree/useTreeMovement.ts +1 -1
- package/src/types.ts +13 -0
- package/src/typography/SrOnly.tsx +9 -9
- package/src/typography/Typography.tsx +19 -19
- package/src/typography/WritingDirectionProvider.tsx +4 -2
- package/src/typography/__tests__/TextContainer.tsx +3 -3
- package/src/typography/__tests__/Typography.tsx +10 -12
- package/src/typography/__tests__/WritingDirectionProvider.tsx +7 -7
- package/src/typography/__tests__/__snapshots__/SrOnly.tsx.snap +5 -5
- package/src/typography/_typography.scss +141 -87
- package/src/useDebouncedFunction.ts +12 -10
- package/src/useElementSize.ts +83 -0
- package/src/useEnsuredState.ts +1 -1
- package/src/useResizeListener.ts +3 -1
- package/src/useResizeObserver.ts +8 -45
- package/src/useThrottledFunction.ts +12 -10
- package/src/useWindowSize.ts +29 -19
- package/src/utils/__tests__/getMiddleOfRange.ts +12 -0
- package/src/utils/__tests__/getRangeDefaultValue.ts +47 -0
- package/src/utils/alphaNumericSort.ts +3 -16
- package/src/utils/getMiddleOfRange.ts +26 -0
- package/src/utils/getRangeDefaultValue.ts +8 -15
- package/src/utils/getRangeSteps.ts +2 -2
- package/src/utils/nearest.ts +1 -1
- package/src/window-splitter/_window-splitter.scss +83 -112
- package/src/window-splitter/useWindowSplitter.ts +12 -28
- package/tsconfig.types.json +1 -1
- package/dist/divider/VerticalDivider.d.ts +0 -32
- package/dist/divider/VerticalDivider.js +0 -40
- package/dist/divider/VerticalDivider.js.map +0 -1
- package/dist/divider/useVerticalDividerHeight.d.ts +0 -37
- package/dist/divider/useVerticalDividerHeight.js +0 -40
- package/dist/divider/useVerticalDividerHeight.js.map +0 -1
- package/dist/form/SelectValue.d.ts +0 -17
- package/dist/form/SelectValue.js +0 -32
- package/dist/form/SelectValue.js.map +0 -1
- package/dist/icon/MaterialIconsProvider.d.ts +0 -12
- package/dist/icon/MaterialIconsProvider.js +0 -17
- package/dist/icon/MaterialIconsProvider.js.map +0 -1
- package/dist/icon/MaterialSymbolsProvider.js +0 -60
- package/dist/icon/MaterialSymbolsProvider.js.map +0 -1
- package/dist/link/LinkProvider.d.ts +0 -29
- package/dist/link/LinkProvider.js +0 -26
- package/dist/link/LinkProvider.js.map +0 -1
- package/dist/tooltip/useOverflowTooltip.d.ts +0 -61
- package/dist/tooltip/useOverflowTooltip.js +0 -71
- package/dist/tooltip/useOverflowTooltip.js.map +0 -1
- package/dist/utils/filters.d.ts +0 -196
- package/dist/utils/filters.js +0 -67
- package/dist/utils/filters.js.map +0 -1
- package/src/divider/VerticalDivider.tsx +0 -50
- package/src/divider/__tests__/VerticalDivider.tsx +0 -35
- package/src/divider/__tests__/__snapshots__/VerticalDivider.tsx.snap +0 -41
- package/src/divider/useVerticalDividerHeight.ts +0 -72
- package/src/form/SelectValue.tsx +0 -39
- package/src/icon/MaterialIconsProvider.ts +0 -23
- package/src/link/LinkProvider.tsx +0 -51
- package/src/tooltip/__tests__/useOverflowTooltip.tsx +0 -77
- package/src/tooltip/useOverflowTooltip.ts +0 -93
- package/src/utils/__tests__/filters.ts +0 -279
- package/src/utils/filters.ts +0 -320
package/dist/list/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/list/types.ts"],"sourcesContent":["import type
|
|
1
|
+
{"version":3,"sources":["../../src/list/types.ts"],"sourcesContent":["import { type HTMLAttributes, type ReactNode } from \"react\";\nimport { type PropsWithRef } from \"../types.js\";\n\n/**\n * The height to apply to the list item.\n *\n * Conversions:\n *\n * - height !== undefined && height !== \"auto\" -> height\n * - secondaryText or left/right addon is media/media-large -> \"extra-large\"\n * - left/right addon is avatar -> \"large\"\n * - left/right addon is icon -> \"medium\"\n * - no addons and no secondary text -> \"normal\"\n */\nexport type ListItemHeight =\n | \"auto\"\n | \"normal\"\n | \"medium\"\n | \"large\"\n | \"extra-large\";\n\nexport type ListItemAddonPosition = \"top\" | \"middle\" | \"bottom\";\nexport type ListItemAddonType = \"icon\" | \"avatar\" | \"media\" | \"large-media\";\n\n/** @remarks \\@since 6.0.0 */\nexport interface ListItemChildrenAddonProps {\n /**\n * An optional addon to display to the left of the `primaryText` or\n * `children` and should be used with the `leftAddonType` prop to adjust\n * spacing.\n */\n leftAddon?: ReactNode;\n\n /**\n * The type of the addon that appears to the left of the `primaryText` or\n * `children`.\n *\n * @defaultValue `\"icon\"`\n */\n leftAddonType?: ListItemAddonType;\n\n /**\n * The vertical position the left icon, avatar, media, or large media\n * should be placed.\n *\n * @defaultValue `\"middle\"`\n */\n leftAddonPosition?: ListItemAddonPosition;\n\n /**\n * @remarks \\@since 6.0.0\n */\n leftAddonClassName?: string;\n\n /**\n * Set this to `true` if your addon does not accept a `className` prop to\n * apply the correct styling.\n *\n * @defaultValue `leftAddonType === \"media\" || leftAddonType === \"large-media\"`\n * @remarks \\@since 6.0.0\n */\n leftAddonForceWrap?: boolean;\n\n /**\n * Set this to `true` to disable the additional spacing applied to the addons\n * that appear before the `children` and the normal `--rmd-text-icon-spacing`\n * value is used instead.\n *\n * @defaultValue `false`\n */\n disableLeftAddonSpacing?: boolean;\n\n /**\n * An optional addon to display to the right of the `primaryText` or\n * `children` and should be used with the `rightAddonType` prop to adjust\n * spacing.\n */\n rightAddon?: ReactNode;\n\n /**\n * The type of the addon that appears to the right of the `primaryText` or\n * `children`.\n *\n * @defaultValue `\"icon\"`\n */\n rightAddonType?: ListItemAddonType;\n\n /**\n * The vertical position the right icon, avatar, media, or large media\n * should be placed.\n *\n * @defaultValue `\"middle\"`\n */\n rightAddonPosition?: ListItemAddonPosition;\n\n /**\n * @remarks \\@since 6.0.0\n */\n rightAddonClassName?: string;\n\n /**\n * Set this to `true` if your addon does not accept a `className` prop to\n * apply the correct styling.\n *\n * @defaultValue `rightAddonType === \"media\" || rightAddonType === \"large-media\"`\n * @remarks \\@since 6.0.0\n */\n rightAddonForceWrap?: boolean;\n\n /**\n * The media items are centered by default using:\n * ```scss\n * align-items: center;\n * display: flex;\n * justify-content: center;\n * ```\n *\n * When this is set to `true`, the flex styles will not be applied.\n *\n * @defaultValue `false`\n * @remarks \\@since 6.0.0\n */\n disableLeftAddonCenteredMedia?: boolean;\n\n /**\n * The media items are centered by default using:\n * ```scss\n * align-items: center;\n * display: flex;\n * justify-content: center;\n * ```\n *\n * When this is set to `true`, the flex styles will not be applied.\n *\n * @defaultValue `false`\n * @remarks \\@since 6.0.0\n */\n disableRightAddonCenteredMedia?: boolean;\n}\n\n/**\n * Note: This interface was added since there are components that replace the\n * {@link ListItemChildrenAddonProps} with renamed versions but should still\n * support everything for rendering text.\n *\n * @remarks \\@since 6.0.0\n */\nexport interface ListItemChildrenTextProps {\n /**\n * The main content to display. When the `textChildren` prop is enabled and\n * there is child content, it will be treated as primary text and update the\n * styles automatically.\n */\n children?: ReactNode;\n\n /**\n * Any additional props that should be passed to the `<span>` surrounding\n * the {@link children}, {@link primaryText}, and {@link secondaryText}.\n *\n * @remarks \\@since 6.0.0\n */\n textProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;\n\n /**\n * An optional className to apply to the `<span>` that surrounds the\n * `primaryText` and optionally `secondaryText` within the list item.\n */\n textClassName?: string;\n\n /**\n * An optional className to apply to the `<span>` that surrounds the\n * `secondaryText` within the list item.\n */\n secondaryTextClassName?: string;\n\n /**\n * Set this to `true` if the {@link children} should not automatically be\n * wrapped in the `ListItemText` component.\n *\n * @remarks \\@since 6.0.0 Renamed from `textChildren` since it was defaulted on.\n * @defaultValue `false`\n */\n disableTextChildren?: boolean;\n\n /**\n * An optional element that should be rendered as the `primaryText` within the\n * list item. It is most likely easier to use the `children` prop instead, but\n * this allows you to create more complex components with the `ListItem` since\n * you can provided `children` and have the styles for the `primaryText` still\n * applied. By default, this will only allow one line of text and add ellipsis\n * for any text overflow.\n */\n primaryText?: ReactNode;\n\n /**\n * An optional element that should be rendered as the `secondaryText` within\n * the list item. By default, this will only span one line and add ellipsis\n * for overflow.\n */\n secondaryText?: ReactNode;\n\n /**\n * Any additional props that should be passed to the `<span>` surrounding\n * the {@link secondaryText}.\n *\n * @remarks \\@since 6.0.0\n */\n secondaryTextProps?: PropsWithRef<\n HTMLAttributes<HTMLSpanElement>,\n HTMLSpanElement\n >;\n\n /**\n * Set this to `true` to allow the {@link secondaryText} to span multiple\n * lines and use the CSS clamp after two lines of text are visible. The number\n * of lines can be configured by `core.$list-item-multiline-clamp` or\n * `@include core.list-set-var(item-multiline-clamp, $new-value)`.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-line-clamp}\n * @defaultValue `false`\n */\n multiline?: boolean;\n}\n\nexport interface ListItemChildrenProps\n extends ListItemChildrenTextProps,\n ListItemChildrenAddonProps {}\n"],"names":[],"mappings":"AAgOA,WAEiC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ReactElement, type ReactNode } from "react";
|
|
2
|
+
import { type UseStateSetter } from "../types.js";
|
|
2
3
|
import { type MenuConvenienceProps, type MenuListConvenienceProps } from "./Menu.js";
|
|
3
4
|
import { type MenuButtonProps } from "./MenuButton.js";
|
|
4
5
|
import { type MenuConfiguration } from "./MenuConfigurationProvider.js";
|
|
@@ -11,6 +12,13 @@ export interface DropdownMenuButtonProps extends MenuButtonProps, BaseDropdownMe
|
|
|
11
12
|
}
|
|
12
13
|
export interface DropdownMenuItemButtonProps extends MenuItemButtonProps, BaseDropdownMenuProps {
|
|
13
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* @remarks \@since 6.0.0
|
|
17
|
+
*/
|
|
18
|
+
export interface DropdownMenuStateProps {
|
|
19
|
+
visible: boolean;
|
|
20
|
+
setVisible: UseStateSetter<boolean>;
|
|
21
|
+
}
|
|
14
22
|
/**
|
|
15
23
|
* @remarks
|
|
16
24
|
* \@since 5.0.0
|
|
@@ -18,7 +26,10 @@ export interface DropdownMenuItemButtonProps extends MenuItemButtonProps, BaseDr
|
|
|
18
26
|
* work better by default. It's up to the user to make sure they don't provide
|
|
19
27
|
* incorrect props.
|
|
20
28
|
*/
|
|
21
|
-
export type DropdownMenuProps = DropdownMenuButtonProps & DropdownMenuItemButtonProps
|
|
29
|
+
export type DropdownMenuProps = DropdownMenuButtonProps & DropdownMenuItemButtonProps & (DropdownMenuStateProps | {
|
|
30
|
+
visible?: never;
|
|
31
|
+
setVisible?: never;
|
|
32
|
+
});
|
|
22
33
|
/**
|
|
23
34
|
* **Client Component**
|
|
24
35
|
*
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useCallback, useRef
|
|
3
|
+
import { useCallback, useRef } from "react";
|
|
4
4
|
import { useUserInteractionMode } from "../interaction/UserInteractionModeProvider.js";
|
|
5
5
|
import { getLastFocusableIndex } from "../movement/utils.js";
|
|
6
6
|
import { useEnsuredId } from "../useEnsuredId.js";
|
|
7
|
+
import { useEnsuredState } from "../useEnsuredState.js";
|
|
7
8
|
import { Menu } from "./Menu.js";
|
|
8
9
|
import { MenuButton } from "./MenuButton.js";
|
|
9
10
|
import { MenuConfigurationProvider } from "./MenuConfigurationProvider.js";
|
|
@@ -65,10 +66,14 @@ import { useMenuBarContext } from "./useMenuBarProvider.js";
|
|
|
65
66
|
* \@since 5.0.0
|
|
66
67
|
* \@since 6.0.0 Updated to use the latest menu API.
|
|
67
68
|
*/ export function DropdownMenu(props) {
|
|
68
|
-
const { id: propId, horizontal, sheetHeader, sheetFooter, renderAsSheet, sheetPosition, sheetVerticalSize, buttonChildren, iconRotatorProps: propIconRotatorProps, disableTransition: propDisableTransition, anchor, vwMargin, vhMargin, xMargin, yMargin, initialX, initialY, width, transformOrigin, preventOverlap, disableSwapping, disableVHBounds, preventScroll, closeOnResize, closeOnScroll, getFixedPositionOptions, children, temporary, disablePortal, disableElevation, menuProps, menuStyle, menuClassName, sheetProps, sheetStyle, sheetClassName, ...remaining } = props;
|
|
69
|
+
const { id: propId, horizontal, sheetHeader, sheetFooter, renderAsSheet, sheetPosition, sheetVerticalSize, buttonChildren, iconRotatorProps: propIconRotatorProps, disableTransition: propDisableTransition, floating, anchor, vwMargin, vhMargin, xMargin, yMargin, initialX, initialY, width, transformOrigin, preventOverlap, disableSwapping, disableVHBounds, preventScroll, closeOnResize, closeOnScroll, getFixedPositionOptions, children, temporary, disablePortal, disableElevation, menuProps, menuStyle, menuClassName, sheetProps, sheetStyle, sheetClassName, visible: propVisible, setVisible: propSetVisible, ...remaining } = props;
|
|
69
70
|
const fixedTo = useRef(null);
|
|
70
71
|
const defaultFocusIndex = useRef(0);
|
|
71
|
-
const [visible, setVisible] =
|
|
72
|
+
const [visible, setVisible] = useEnsuredState({
|
|
73
|
+
value: propVisible,
|
|
74
|
+
setValue: propSetVisible,
|
|
75
|
+
defaultValue: false
|
|
76
|
+
});
|
|
72
77
|
const { menubar, menuitem, activeIdRef, animatedOnceRef } = useMenuBarContext();
|
|
73
78
|
const id = useEnsuredId(propId, `menu${menuitem ? "item" : "button"}`);
|
|
74
79
|
const mode = useUserInteractionMode();
|
|
@@ -77,7 +82,9 @@ import { useMenuBarContext } from "./useMenuBarProvider.js";
|
|
|
77
82
|
const disableTransition = propDisableTransition ?? (animatedOnceRef.current && menubar && !!activeIdRef.current && (mouse || keyboard));
|
|
78
83
|
const onRequestClose = useCallback(()=>{
|
|
79
84
|
setVisible(false);
|
|
80
|
-
}, [
|
|
85
|
+
}, [
|
|
86
|
+
setVisible
|
|
87
|
+
]);
|
|
81
88
|
let iconRotatorProps = propIconRotatorProps;
|
|
82
89
|
if (disableTransition) {
|
|
83
90
|
iconRotatorProps = {
|
|
@@ -99,6 +106,7 @@ import { useMenuBarContext } from "./useMenuBarProvider.js";
|
|
|
99
106
|
...remaining,
|
|
100
107
|
id: id,
|
|
101
108
|
ref: fixedTo,
|
|
109
|
+
floating: floating,
|
|
102
110
|
iconRotatorProps: iconRotatorProps,
|
|
103
111
|
children: buttonChildren
|
|
104
112
|
});
|
|
@@ -128,6 +136,7 @@ import { useMenuBarContext } from "./useMenuBarProvider.js";
|
|
|
128
136
|
disablePortal: disablePortal,
|
|
129
137
|
disableElevation: disableElevation,
|
|
130
138
|
disableTransition: disableTransition,
|
|
139
|
+
floating: floating,
|
|
131
140
|
anchor: anchor,
|
|
132
141
|
vwMargin: vwMargin,
|
|
133
142
|
vhMargin: vhMargin,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/menu/DropdownMenu.tsx"],"sourcesContent":["\"use client\";\nimport {\n useCallback,\n useRef,\n useState,\n type ReactElement,\n type ReactNode,\n type RefObject,\n} from \"react\";\nimport { useUserInteractionMode } from \"../interaction/UserInteractionModeProvider.js\";\nimport { getLastFocusableIndex } from \"../movement/utils.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport {\n Menu,\n type MenuConvenienceProps,\n type MenuListConvenienceProps,\n} from \"./Menu.js\";\nimport { MenuButton, type MenuButtonProps } from \"./MenuButton.js\";\nimport {\n MenuConfigurationProvider,\n type MenuConfiguration,\n} from \"./MenuConfigurationProvider.js\";\nimport { MenuItemButton, type MenuItemButtonProps } from \"./MenuItemButton.js\";\nimport { type MenuSheetConvenienceProps } from \"./MenuSheet.js\";\nimport { MenuVisibilityProvider } from \"./MenuVisibilityProvider.js\";\nimport { useMenuBarContext } from \"./useMenuBarProvider.js\";\n\nexport interface BaseDropdownMenuProps\n extends MenuConfiguration,\n MenuListConvenienceProps,\n MenuSheetConvenienceProps,\n MenuConvenienceProps {\n buttonChildren: ReactNode;\n}\n\nexport interface DropdownMenuButtonProps\n extends MenuButtonProps,\n BaseDropdownMenuProps {}\n\nexport interface DropdownMenuItemButtonProps\n extends MenuItemButtonProps,\n BaseDropdownMenuProps {}\n\n/**\n * @remarks\n * \\@since 5.0.0\n * \\@since 6.0.0 Updated to use an `&` instead of `|` to allow autocompletion to\n * work better by default. It's up to the user to make sure they don't provide\n * incorrect props.\n */\nexport type DropdownMenuProps = DropdownMenuButtonProps &\n DropdownMenuItemButtonProps;\n\n/**\n * **Client Component**\n *\n * @example\n * Simple Example\n * ```tsx\n * import type { ReactElement } from \"react\";\n * import { DropdownMenu, MenuItem } from \"@react-md/core\";\n *\n * function Example() {\n * return (\n * <DropdownMenu buttonChildren=\"Dropdown\">\n * <MenuItem onClick={() => console.log('Clicked Item 1')}>\n * Item 1\n * </MenuItem>\n * <MenuItem onClick={() => console.log('Clicked Item 2')}>\n * Item 2\n * </MenuItem>\n * </DropdownMenu>\n * );\n * }\n * ```\n *\n * @example\n * Nested Dropdown Menus\n * ```tsx\n * import type { ReactElement } from \"react\";\n * import { DropdownMenu, MenuItem } from \"@react-md/core\";\n *\n * function Example() {\n * return (\n * <DropdownMenu buttonChildren=\"Dropdown\">\n * <MenuItem onClick={() => console.log('Clicked Item 1')}>\n * Item 1\n * </MenuItem>\n * <MenuItem onClick={() => console.log('Clicked Item 2')}>\n * Item 2\n * </MenuItem>\n * <DropdownMenu buttonChildren=\"Nested Dropdown\">\n * <MenuItem onClick={() => console.log('Clicked Item 1')}>\n * Nested Item 1\n * </MenuItem>\n * <MenuItem onClick={() => console.log('Clicked Item 2')}>\n * Nested Item 2\n * </MenuItem>\n * </DropdownMenu>\n * </DropdownMenu>\n * );\n * }\n * ```\n *\n * @remarks\n * \\@since 5.0.0\n * \\@since 6.0.0 Updated to use the latest menu API.\n */\nexport function DropdownMenu(props: DropdownMenuProps): ReactElement {\n const {\n id: propId,\n horizontal,\n sheetHeader,\n sheetFooter,\n renderAsSheet,\n sheetPosition,\n sheetVerticalSize,\n buttonChildren,\n iconRotatorProps: propIconRotatorProps,\n disableTransition: propDisableTransition,\n anchor,\n vwMargin,\n vhMargin,\n xMargin,\n yMargin,\n initialX,\n initialY,\n width,\n transformOrigin,\n preventOverlap,\n disableSwapping,\n disableVHBounds,\n preventScroll,\n closeOnResize,\n closeOnScroll,\n getFixedPositionOptions,\n children,\n temporary,\n disablePortal,\n disableElevation,\n menuProps,\n menuStyle,\n menuClassName,\n sheetProps,\n sheetStyle,\n sheetClassName,\n ...remaining\n } = props;\n\n const fixedTo = useRef<HTMLElement | HTMLButtonElement>(null);\n const defaultFocusIndex = useRef(0);\n const [visible, setVisible] = useState(false);\n const { menubar, menuitem, activeIdRef, animatedOnceRef } =\n useMenuBarContext();\n const id = useEnsuredId(propId, `menu${menuitem ? \"item\" : \"button\"}`);\n const mode = useUserInteractionMode();\n const mouse = mode === \"mouse\";\n const keyboard = mode === \"keyboard\";\n const disableTransition =\n propDisableTransition ??\n (animatedOnceRef.current &&\n menubar &&\n !!activeIdRef.current &&\n (mouse || keyboard));\n\n const onRequestClose = useCallback(() => {\n setVisible(false);\n }, []);\n\n let iconRotatorProps = propIconRotatorProps;\n if (disableTransition) {\n iconRotatorProps = {\n disableTransition,\n ...propIconRotatorProps,\n };\n }\n\n let toggle: ReactElement;\n if (menuitem) {\n toggle = (\n <MenuItemButton\n {...(remaining as DropdownMenuItemButtonProps)}\n id={id}\n ref={fixedTo as RefObject<HTMLLIElement>}\n iconRotatorProps={iconRotatorProps}\n >\n {buttonChildren}\n </MenuItemButton>\n );\n } else {\n toggle = (\n <MenuButton\n {...(remaining as DropdownMenuButtonProps)}\n id={id}\n ref={fixedTo as RefObject<HTMLButtonElement>}\n iconRotatorProps={iconRotatorProps}\n >\n {buttonChildren}\n </MenuButton>\n );\n }\n\n return (\n <MenuVisibilityProvider\n visible={visible}\n setVisible={setVisible}\n defaultFocusIndex={defaultFocusIndex}\n >\n <MenuConfigurationProvider\n horizontal={horizontal}\n renderAsSheet={renderAsSheet}\n sheetFooter={sheetFooter}\n sheetHeader={sheetHeader}\n sheetPosition={sheetPosition}\n sheetVerticalSize={sheetVerticalSize}\n >\n {toggle}\n </MenuConfigurationProvider>\n <Menu\n aria-labelledby={(menuProps?.[\"aria-label\"] ? undefined : id) as string}\n style={menuStyle}\n className={menuClassName}\n sheetProps={sheetProps}\n sheetStyle={sheetStyle}\n sheetClassName={sheetClassName}\n temporary={temporary}\n disablePortal={disablePortal}\n disableElevation={disableElevation}\n disableTransition={disableTransition}\n anchor={anchor}\n vwMargin={vwMargin}\n vhMargin={vhMargin}\n xMargin={xMargin}\n yMargin={yMargin}\n initialX={initialX}\n initialY={initialY}\n width={width}\n transformOrigin={transformOrigin}\n preventOverlap={preventOverlap}\n disableSwapping={disableSwapping}\n disableVHBounds={disableVHBounds}\n preventScroll={preventScroll}\n closeOnResize={closeOnResize}\n closeOnScroll={closeOnScroll}\n getFixedPositionOptions={getFixedPositionOptions}\n horizontal={horizontal}\n sheetHeader={sheetHeader}\n sheetFooter={sheetFooter}\n renderAsSheet={renderAsSheet}\n sheetPosition={sheetPosition}\n sheetVerticalSize={sheetVerticalSize}\n {...menuProps}\n fixedTo={fixedTo}\n visible={visible}\n getDefaultFocusedIndex={(options) => {\n const defaultIndex = defaultFocusIndex.current;\n if (defaultIndex < 0) {\n return getLastFocusableIndex(options);\n }\n\n return defaultIndex;\n }}\n onRequestClose={onRequestClose}\n onEntered={(appearing) => {\n menuProps?.onEntered?.(appearing);\n // this will be called before `getDefaultFocusedIndex`\n if (disableTransition) {\n return;\n }\n\n defaultFocusIndex.current = 0;\n }}\n >\n {children}\n </Menu>\n </MenuVisibilityProvider>\n );\n}\n"],"names":["useCallback","useRef","useState","useUserInteractionMode","getLastFocusableIndex","useEnsuredId","Menu","MenuButton","MenuConfigurationProvider","MenuItemButton","MenuVisibilityProvider","useMenuBarContext","DropdownMenu","props","id","propId","horizontal","sheetHeader","sheetFooter","renderAsSheet","sheetPosition","sheetVerticalSize","buttonChildren","iconRotatorProps","propIconRotatorProps","disableTransition","propDisableTransition","anchor","vwMargin","vhMargin","xMargin","yMargin","initialX","initialY","width","transformOrigin","preventOverlap","disableSwapping","disableVHBounds","preventScroll","closeOnResize","closeOnScroll","getFixedPositionOptions","children","temporary","disablePortal","disableElevation","menuProps","menuStyle","menuClassName","sheetProps","sheetStyle","sheetClassName","remaining","fixedTo","defaultFocusIndex","visible","setVisible","menubar","menuitem","activeIdRef","animatedOnceRef","mode","mouse","keyboard","current","onRequestClose","toggle","ref","aria-labelledby","undefined","style","className","getDefaultFocusedIndex","options","defaultIndex","onEntered","appearing"],"mappings":"AAAA;;AACA,SACEA,WAAW,EACXC,MAAM,EACNC,QAAQ,QAIH,QAAQ;AACf,SAASC,sBAAsB,QAAQ,gDAAgD;AACvF,SAASC,qBAAqB,QAAQ,uBAAuB;AAC7D,SAASC,YAAY,QAA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AClB,GAAG0B,SAAS;gBACbO,SAASA;gBACTE,SAASA;gBACTiB,wBAAwB,CAACC;oBACvB,MAAMC,eAAepB,kBAAkBU,OAAO;oBAC9C,IAAIU,eAAe,GAAG;wBACpB,OAAOvE,sBAAsBsE;oBAC/B;oBAEA,OAAOC;gBACT;gBACAT,gBAAgBA;gBAChBU,WAAW,CAACC;oBACV9B,WAAW6B,YAAYC;oBACvB,sDAAsD;oBACtD,IAAIpD,mBAAmB;wBACrB;oBACF;oBAEA8B,kBAAkBU,OAAO,GAAG;gBAC9B;0BAECtB;;;;AAIT"}
|
|
1
|
+
{"version":3,"sources":["../../src/menu/DropdownMenu.tsx"],"sourcesContent":["\"use client\";\nimport {\n useCallback,\n useRef,\n type ReactElement,\n type ReactNode,\n type RefObject,\n} from \"react\";\nimport { useUserInteractionMode } from \"../interaction/UserInteractionModeProvider.js\";\nimport { getLastFocusableIndex } from \"../movement/utils.js\";\nimport { type UseStateSetter } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { useEnsuredState } from \"../useEnsuredState.js\";\nimport {\n Menu,\n type MenuConvenienceProps,\n type MenuListConvenienceProps,\n} from \"./Menu.js\";\nimport { MenuButton, type MenuButtonProps } from \"./MenuButton.js\";\nimport {\n MenuConfigurationProvider,\n type MenuConfiguration,\n} from \"./MenuConfigurationProvider.js\";\nimport { MenuItemButton, type MenuItemButtonProps } from \"./MenuItemButton.js\";\nimport { type MenuSheetConvenienceProps } from \"./MenuSheet.js\";\nimport { MenuVisibilityProvider } from \"./MenuVisibilityProvider.js\";\nimport { useMenuBarContext } from \"./useMenuBarProvider.js\";\n\nexport interface BaseDropdownMenuProps\n extends MenuConfiguration,\n MenuListConvenienceProps,\n MenuSheetConvenienceProps,\n MenuConvenienceProps {\n buttonChildren: ReactNode;\n}\n\nexport interface DropdownMenuButtonProps\n extends MenuButtonProps,\n BaseDropdownMenuProps {}\n\nexport interface DropdownMenuItemButtonProps\n extends MenuItemButtonProps,\n BaseDropdownMenuProps {}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface DropdownMenuStateProps {\n visible: boolean;\n setVisible: UseStateSetter<boolean>;\n}\n\n/**\n * @remarks\n * \\@since 5.0.0\n * \\@since 6.0.0 Updated to use an `&` instead of `|` to allow autocompletion to\n * work better by default. It's up to the user to make sure they don't provide\n * incorrect props.\n */\nexport type DropdownMenuProps = DropdownMenuButtonProps &\n DropdownMenuItemButtonProps &\n (DropdownMenuStateProps | { visible?: never; setVisible?: never });\n\n/**\n * **Client Component**\n *\n * @example\n * Simple Example\n * ```tsx\n * import type { ReactElement } from \"react\";\n * import { DropdownMenu, MenuItem } from \"@react-md/core\";\n *\n * function Example() {\n * return (\n * <DropdownMenu buttonChildren=\"Dropdown\">\n * <MenuItem onClick={() => console.log('Clicked Item 1')}>\n * Item 1\n * </MenuItem>\n * <MenuItem onClick={() => console.log('Clicked Item 2')}>\n * Item 2\n * </MenuItem>\n * </DropdownMenu>\n * );\n * }\n * ```\n *\n * @example\n * Nested Dropdown Menus\n * ```tsx\n * import type { ReactElement } from \"react\";\n * import { DropdownMenu, MenuItem } from \"@react-md/core\";\n *\n * function Example() {\n * return (\n * <DropdownMenu buttonChildren=\"Dropdown\">\n * <MenuItem onClick={() => console.log('Clicked Item 1')}>\n * Item 1\n * </MenuItem>\n * <MenuItem onClick={() => console.log('Clicked Item 2')}>\n * Item 2\n * </MenuItem>\n * <DropdownMenu buttonChildren=\"Nested Dropdown\">\n * <MenuItem onClick={() => console.log('Clicked Item 1')}>\n * Nested Item 1\n * </MenuItem>\n * <MenuItem onClick={() => console.log('Clicked Item 2')}>\n * Nested Item 2\n * </MenuItem>\n * </DropdownMenu>\n * </DropdownMenu>\n * );\n * }\n * ```\n *\n * @remarks\n * \\@since 5.0.0\n * \\@since 6.0.0 Updated to use the latest menu API.\n */\nexport function DropdownMenu(props: DropdownMenuProps): ReactElement {\n const {\n id: propId,\n horizontal,\n sheetHeader,\n sheetFooter,\n renderAsSheet,\n sheetPosition,\n sheetVerticalSize,\n buttonChildren,\n iconRotatorProps: propIconRotatorProps,\n disableTransition: propDisableTransition,\n floating,\n anchor,\n vwMargin,\n vhMargin,\n xMargin,\n yMargin,\n initialX,\n initialY,\n width,\n transformOrigin,\n preventOverlap,\n disableSwapping,\n disableVHBounds,\n preventScroll,\n closeOnResize,\n closeOnScroll,\n getFixedPositionOptions,\n children,\n temporary,\n disablePortal,\n disableElevation,\n menuProps,\n menuStyle,\n menuClassName,\n sheetProps,\n sheetStyle,\n sheetClassName,\n visible: propVisible,\n setVisible: propSetVisible,\n ...remaining\n } = props;\n\n const fixedTo = useRef<HTMLElement | HTMLButtonElement>(null);\n const defaultFocusIndex = useRef(0);\n const [visible, setVisible] = useEnsuredState({\n value: propVisible,\n setValue: propSetVisible,\n defaultValue: false,\n });\n const { menubar, menuitem, activeIdRef, animatedOnceRef } =\n useMenuBarContext();\n const id = useEnsuredId(propId, `menu${menuitem ? \"item\" : \"button\"}`);\n const mode = useUserInteractionMode();\n const mouse = mode === \"mouse\";\n const keyboard = mode === \"keyboard\";\n const disableTransition =\n propDisableTransition ??\n (animatedOnceRef.current &&\n menubar &&\n !!activeIdRef.current &&\n (mouse || keyboard));\n\n const onRequestClose = useCallback(() => {\n setVisible(false);\n }, [setVisible]);\n\n let iconRotatorProps = propIconRotatorProps;\n if (disableTransition) {\n iconRotatorProps = {\n disableTransition,\n ...propIconRotatorProps,\n };\n }\n\n let toggle: ReactElement;\n if (menuitem) {\n toggle = (\n <MenuItemButton\n {...(remaining as DropdownMenuItemButtonProps)}\n id={id}\n ref={fixedTo as RefObject<HTMLLIElement>}\n iconRotatorProps={iconRotatorProps}\n >\n {buttonChildren}\n </MenuItemButton>\n );\n } else {\n toggle = (\n <MenuButton\n {...(remaining as DropdownMenuButtonProps)}\n id={id}\n ref={fixedTo as RefObject<HTMLButtonElement>}\n floating={floating}\n iconRotatorProps={iconRotatorProps}\n >\n {buttonChildren}\n </MenuButton>\n );\n }\n\n return (\n <MenuVisibilityProvider\n visible={visible}\n setVisible={setVisible}\n defaultFocusIndex={defaultFocusIndex}\n >\n <MenuConfigurationProvider\n horizontal={horizontal}\n renderAsSheet={renderAsSheet}\n sheetFooter={sheetFooter}\n sheetHeader={sheetHeader}\n sheetPosition={sheetPosition}\n sheetVerticalSize={sheetVerticalSize}\n >\n {toggle}\n </MenuConfigurationProvider>\n <Menu\n aria-labelledby={(menuProps?.[\"aria-label\"] ? undefined : id) as string}\n style={menuStyle}\n className={menuClassName}\n sheetProps={sheetProps}\n sheetStyle={sheetStyle}\n sheetClassName={sheetClassName}\n temporary={temporary}\n disablePortal={disablePortal}\n disableElevation={disableElevation}\n disableTransition={disableTransition}\n floating={floating}\n anchor={anchor}\n vwMargin={vwMargin}\n vhMargin={vhMargin}\n xMargin={xMargin}\n yMargin={yMargin}\n initialX={initialX}\n initialY={initialY}\n width={width}\n transformOrigin={transformOrigin}\n preventOverlap={preventOverlap}\n disableSwapping={disableSwapping}\n disableVHBounds={disableVHBounds}\n preventScroll={preventScroll}\n closeOnResize={closeOnResize}\n closeOnScroll={closeOnScroll}\n getFixedPositionOptions={getFixedPositionOptions}\n horizontal={horizontal}\n sheetHeader={sheetHeader}\n sheetFooter={sheetFooter}\n renderAsSheet={renderAsSheet}\n sheetPosition={sheetPosition}\n sheetVerticalSize={sheetVerticalSize}\n {...menuProps}\n fixedTo={fixedTo}\n visible={visible}\n getDefaultFocusedIndex={(options) => {\n const defaultIndex = defaultFocusIndex.current;\n if (defaultIndex < 0) {\n return getLastFocusableIndex(options);\n }\n\n return defaultIndex;\n }}\n onRequestClose={onRequestClose}\n onEntered={(appearing) => {\n menuProps?.onEntered?.(appearing);\n // this will be called before `getDefaultFocusedIndex`\n if (disableTransition) {\n return;\n }\n\n defaultFocusIndex.current = 0;\n }}\n >\n {children}\n </Menu>\n </MenuVisibilityProvider>\n );\n}\n"],"names":["useCallback","useRef","useUserInteractionMode","getLastFocusableIndex","useEnsuredId","useEnsuredState","Menu","MenuButton","MenuConfigurationProvider","MenuItemButton","MenuVisibilityProvider","useMenuBarContext","DropdownMenu","props","id","propId","horizontal","sheetHeader","sheetFooter","renderAsSheet","sheetPosition","sheetVerticalSize","buttonChildren","iconRotatorProps","propIconRotatorProps","disableTransition","propDisableTransition","floating","anchor","vwMargin","vhMargin","xMargin","yMargin","initialX","initialY","width","transformOrigin","preventOverlap","disableSwapping","disableVHBounds","preventScroll","closeOnResize","closeOnScroll","getFixedPositionOptions","children","temporary","disablePortal","disableElevation","menuProps","menuStyle","menuClassName","sheetProps","sheetStyle","sheetClassName","visible","propVisible","setVisible","propSetVisible","remaining","fixedTo","defaultFocusIndex","value","setValue","defaultValue","menubar","menuitem","activeIdRef","animatedOnceRef","mode","mouse","keyboard","current","onRequestClose","toggle","ref","aria-labelledby","undefined","style","className","getDefaultFocusedIndex","options","defaultIndex","onEntered","appearing"],"mappings":"AAAA;;AACA,SACEA,WAAW,EACXC,MAAM,QAID,QAAQ;AACf,SAASC,sBAAsB,QAAQ,gDAAgD;AACvF,SAASC,qBAAqB,QAAQ,uBAAuB;AAE7D,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,eAAe,QAAQ,wBAAwB;AACxD,SACEC,IAAI,QAGC,YAAY;AACnB,SAASC,UAAU,QAA8B,kBAAkB;AACnE,SACEC,yBAAyB,QAEpB,iCAAiC;AACxC,SAASC,cAAc,QAAkC,sBAAsB;AAE/E,SAASC,sBAAsB,QAAQ,8BAA8B;AACrE,SAASC,iBAAiB,QAAQ,0BAA0B;AAqC5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsDC,GACD,OAAO,SAASC,aAAaC,KAAwB;IACnD,MAAM,EACJC,IAAIC,MAAM,EACVC,UAAU,EACVC,WAAW,EACXC,WAAW,EACXC,aAAa,EACbC,aAAa,EACbC,iBAAiB,EACjBC,cAAc,EACdC,kBAAkBC,oBAAoB,EACtCC,mBAAmBC,qBAAqB,EACxCC,QAA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Menu.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type CSSProperties, type HTMLAttributes } from "react";
|
|
2
|
+
import { type FloatingActionButtonPosition } from "../button/FloatingActionButton.js";
|
|
2
3
|
import { type ListElement, type ListProps } from "../list/List.js";
|
|
3
4
|
import { type GetDefaultFocusedIndex } from "../movement/types.js";
|
|
4
5
|
import { type CalculateFixedPositionOptions } from "../positioning/types.js";
|
|
@@ -161,6 +162,13 @@ export interface MenuProps extends HTMLAttributes<HTMLDivElement>, MenuConfigura
|
|
|
161
162
|
* sheet.
|
|
162
163
|
*/
|
|
163
164
|
menuClassName?: string;
|
|
165
|
+
/**
|
|
166
|
+
* @internal
|
|
167
|
+
*
|
|
168
|
+
* This is only used to update the default anchor when the DropdownMenu's
|
|
169
|
+
* toggle is a floating action button.
|
|
170
|
+
*/
|
|
171
|
+
floating?: FloatingActionButtonPosition;
|
|
164
172
|
}
|
|
165
173
|
/**
|
|
166
174
|
* **Client Component**
|
package/dist/menu/Menu.js
CHANGED
|
@@ -10,6 +10,7 @@ import { useFixedPositioning } from "../positioning/useFixedPositioning.js";
|
|
|
10
10
|
import { useScrollLock } from "../scroll/useScrollLock.js";
|
|
11
11
|
import { useScaleTransition } from "../transition/useScaleTransition.js";
|
|
12
12
|
import { useEnsuredId } from "../useEnsuredId.js";
|
|
13
|
+
import { useIsomorphicLayoutEffect } from "../useIsomorphicLayoutEffect.js";
|
|
13
14
|
import { MenuConfigurationProvider, useMenuConfiguration } from "./MenuConfigurationProvider.js";
|
|
14
15
|
import { MenuSheet } from "./MenuSheet.js";
|
|
15
16
|
import { MenuWidget } from "./MenuWidget.js";
|
|
@@ -35,7 +36,7 @@ const noop = ()=>{
|
|
|
35
36
|
* implementation so that the `MenuRenderer` is no longer required and context
|
|
36
37
|
* menus can appear as a `Sheet`.
|
|
37
38
|
*/ export const Menu = /*#__PURE__*/ forwardRef(function Menu(props, propRef) {
|
|
38
|
-
const { id: propId, style: propStyle, role = "menu", children, horizontal: _horizontal, sheetHeader: _sheetHeader, sheetFooter: _sheetFooter, renderAsSheet: _renderAsSheet, sheetPosition: _sheetPosition, sheetVerticalSize: _sheetVerticalSize, sheetProps, sheetStyle, sheetClassName, menuStyle, menuClassName, disableElevation = false, temporary = true, tabIndex = -1, fixedTo, className, classNames, timeout, appear, enter, exit, onEnter, onEntering = noop, onEntered = noop, onExit, onExiting, onExited = noop, onKeyDown = noop, listProps, listStyle, listClassName, visible, onRequestClose, anchor, closeOnResize = false, closeOnScroll = false, preventScroll = false, vwMargin, vhMargin, xMargin, yMargin, width, transformOrigin = true, preventOverlap, disableSwapping, disableVHBounds, initialX, initialY, getFixedPositionOptions, disablePortal: propDisablePortal, disableTransition, ...remaining } = props;
|
|
39
|
+
const { id: propId, style: propStyle, role = "menu", children, horizontal: _horizontal, sheetHeader: _sheetHeader, sheetFooter: _sheetFooter, renderAsSheet: _renderAsSheet, sheetPosition: _sheetPosition, sheetVerticalSize: _sheetVerticalSize, sheetProps, sheetStyle, sheetClassName, menuStyle, menuClassName, disableElevation = false, temporary = true, tabIndex = -1, fixedTo, className, classNames, timeout, appear, enter, exit, onEnter, onEntering = noop, onEntered = noop, onExit, onExiting, onExited = noop, onKeyDown = noop, listProps, listStyle, listClassName, visible, onRequestClose, floating, anchor, closeOnResize = false, closeOnScroll = false, preventScroll = false, vwMargin, vhMargin, xMargin, yMargin, width, transformOrigin = true, preventOverlap, disableSwapping, disableVHBounds, initialX, initialY, getFixedPositionOptions, disablePortal: propDisablePortal, disableTransition, ...remaining } = props;
|
|
39
40
|
const { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy } = props;
|
|
40
41
|
const id = useEnsuredId(propId, "menu");
|
|
41
42
|
const { root, menubar, menuitem, activeId, animatedOnceRef, hoverTimeoutRef, disableHoverMode } = useMenuBarContext();
|
|
@@ -125,7 +126,7 @@ const noop = ()=>{
|
|
|
125
126
|
return isHoverDisabled || cancelUnmountFocus.current || root && !!activeId && id !== activeId;
|
|
126
127
|
}
|
|
127
128
|
});
|
|
128
|
-
const { ref, style, callbacks } = useFixedPositioning({
|
|
129
|
+
const { ref, style, callbacks, updateStyle } = useFixedPositioning({
|
|
129
130
|
...transitionOptions,
|
|
130
131
|
onEnter,
|
|
131
132
|
style: isSheet ? propStyle : menuStyle,
|
|
@@ -133,6 +134,7 @@ const noop = ()=>{
|
|
|
133
134
|
anchor: getDefaultAnchor({
|
|
134
135
|
anchor,
|
|
135
136
|
menubar,
|
|
137
|
+
floating,
|
|
136
138
|
menuitem: !root && menuitem,
|
|
137
139
|
horizontal
|
|
138
140
|
}),
|
|
@@ -210,6 +212,16 @@ const noop = ()=>{
|
|
|
210
212
|
role,
|
|
211
213
|
visible
|
|
212
214
|
]);
|
|
215
|
+
useIsomorphicLayoutEffect(()=>{
|
|
216
|
+
if (!visible) {
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
updateStyle();
|
|
220
|
+
}, [
|
|
221
|
+
updateStyle,
|
|
222
|
+
children,
|
|
223
|
+
visible
|
|
224
|
+
]);
|
|
213
225
|
return /*#__PURE__*/ _jsx(MenuConfigurationProvider, {
|
|
214
226
|
horizontal: horizontal,
|
|
215
227
|
renderAsSheet: renderAsSheet,
|
package/dist/menu/Menu.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/menu/Menu.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport {\n forwardRef,\n useEffect,\n useRef,\n type CSSProperties,\n type HTMLAttributes,\n} from \"react\";\nimport { useFocusContainer } from \"../focus/useFocusContainer.js\";\nimport { useUserInteractionMode } from \"../interaction/UserInteractionModeProvider.js\";\nimport { type ListElement, type ListProps } from \"../list/List.js\";\nimport { useAppSize } from \"../media-queries/AppSizeProvider.js\";\nimport { type GetDefaultFocusedIndex } from \"../movement/types.js\";\nimport { Portal } from \"../portal/Portal.js\";\nimport { type CalculateFixedPositionOptions } from \"../positioning/types.js\";\nimport {\n useFixedPositioning,\n type FixedPositioningOptions,\n} from \"../positioning/useFixedPositioning.js\";\nimport { useScrollLock } from \"../scroll/useScrollLock.js\";\nimport {\n useScaleTransition,\n type ScaleTransitionHookOptions,\n} from \"../transition/useScaleTransition.js\";\nimport { type LabelRequiredForA11y, type PropsWithRef } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport {\n MenuConfigurationProvider,\n useMenuConfiguration,\n type MenuConfiguration,\n type MenuOrientationProps,\n} from \"./MenuConfigurationProvider.js\";\nimport { MenuSheet, type MenuSheetConvenienceProps } from \"./MenuSheet.js\";\nimport { MenuWidget } from \"./MenuWidget.js\";\nimport { useMenuBarContext } from \"./useMenuBarProvider.js\";\nimport { getDefaultAnchor } from \"./utils.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-menu-background-color\"?: string;\n \"--rmd-menu-color\"?: string;\n \"--rmd-menu-min-width\"?: string | number;\n \"--rmd-menu-spacing\"?: string | number;\n }\n}\n\nconst noop = (): void => {\n // do nothing\n};\n\n/** @remarks \\@since 5.0.0 */\nexport type MenuTransitionProps = Omit<\n ScaleTransitionHookOptions<HTMLDivElement>,\n \"transitionIn\" | \"vertical\" | \"nodeRef\"\n>;\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface MenuConfigurationProps extends CalculateFixedPositionOptions {\n /**\n * @see {@link ScaleTransitionHookOptions.temporary}\n * @defaultValue `true`\n */\n temporary?: boolean;\n\n /**\n * @defaultValue `false`\n */\n disablePortal?: boolean;\n\n /**\n * Boolean if the menu should not gain the elevation styles and should only be\n * set to `true` when rendering within a `Sheet`.\n *\n * @defaultValue `false`\n */\n disableElevation?: boolean;\n\n /**\n * @defaultValue `false`\n */\n disableTransition?: boolean;\n\n /**\n * @see {@link FixedPositioningOptions.transformOrigin}\n * @defaultValue `true`\n */\n transformOrigin?: boolean;\n\n /**\n * Boolean if the menu should close if the page is scrolled. The default\n * behavior is to just update the position of the menu relative to the menu\n * button until it can no longer be visible within the viewport.\n *\n * @defaultValue `false`\n */\n closeOnScroll?: boolean;\n\n /**\n * Boolean if the page should no longer be scrollable while the menu is\n * visible.\n *\n * @defaultValue `false`\n */\n preventScroll?: boolean;\n\n /**\n * Boolean if the menu should close instead of repositioning itself if the\n * browser window is resized.\n *\n * @defaultValue `false`\n */\n closeOnResize?: boolean;\n\n /** @see {@link FixedPositioningOptions.getFixedPositionOptions} */\n getFixedPositionOptions?(): CalculateFixedPositionOptions;\n}\n\n/**\n * @remarks\n * \\@since 5.1.0\n * \\@since 6.0.0 Renamed from `MenuListProps` to `MenuListConvenienceProps`\n */\nexport interface MenuListConvenienceProps {\n /**\n * An optional style to provide to the `List` component that surrounds the\n * `MenuItem` within a `Menu`.\n */\n listStyle?: CSSProperties;\n\n /**\n * An optional className to provide to the `List` component that surrounds the\n * `MenuItem` within a `Menu`.\n */\n listClassName?: string;\n\n /**\n * Any additional props to pass to the `List` component that surrounds the\n * `Menu`'s `MenuItem`s.\n */\n listProps?: PropsWithRef<Omit<ListProps, \"horizontal\">, ListElement>;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface MenuConvenienceProps extends MenuConfigurationProps {\n /**\n * This can be used to apply additional props to the `Menu` component.\n *\n * Note: You can override the `style` and `className` using\n * {@link menuStyle} and {@link menuClassName} instead for convenience.\n *\n * @example\n * ```tsx\n * <DropdownMenu\n * {...props}\n * menuProps={{\n * style: {\n * // custom inline style\n * },\n * className: \"come-class-name\",\n * getFixedPositionOptions: () => ({\n * preventOverlap: true,\n * }),\n * }}\n * />\n * ```\n */\n menuProps?: PropsWithRef<\n Omit<\n MenuProps,\n | \"children\"\n | \"fixedTo\"\n | \"visible\"\n | \"onRequestClose\"\n | \"getDefaultFocusedIndex\"\n >,\n HTMLDivElement\n >;\n\n /**\n * Convenience prop to apply custom style to the `Menu` component.\n */\n menuStyle?: CSSProperties;\n\n /**\n * Convenience prop to apply custom class name to the `Menu` component.\n */\n menuClassName?: string;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport type MenuFixedPositioningOptions = Omit<\n FixedPositioningOptions<HTMLElement, HTMLDivElement>,\n \"onScroll\" | \"onResize\"\n>;\n\n/**\n * @remarks\n * \\@since 5.0.0\n * \\@since 6.0.0 Updated to use the latest Menu, Transition, and Portal API.\n */\nexport interface MenuProps\n extends HTMLAttributes<HTMLDivElement>,\n MenuConfiguration,\n MenuConfigurationProps,\n MenuFixedPositioningOptions,\n MenuOrientationProps,\n MenuTransitionProps,\n MenuListConvenienceProps,\n MenuSheetConvenienceProps {\n visible: boolean;\n onRequestClose(): void;\n\n /**\n * @defaultValue `\"menu-\" + useId()`\n */\n id?: string;\n\n /**\n * This is used to set the default focus index when the menu is visible.\n *\n * @internal\n */\n getDefaultFocusedIndex?: GetDefaultFocusedIndex;\n\n /**\n * Custom style that should be applied to the menu only while not rendered\n * within a sheet since the {@link style} would be applied to both versions.\n */\n menuStyle?: CSSProperties;\n\n /**\n * Custom class name that should be applied only while not rendered within a\n * sheet.\n */\n menuClassName?: string;\n}\n\n/**\n * **Client Component**\n *\n * This component should generally only be used to implement context menus with\n * the `useContextMenu` hook. Otherwise, the `DropdownMenu` component should be\n * used.\n *\n * @see The `useContextMenu` hook for an example.\n *\n * @remarks\n * \\@since 5.0.0\n * \\@since 6.0.0 Updated this component to implement all the `Menu`\n * functionality instead of requiring the `useMenu` hook and `MenuWidget`\n * component. In addition, the `renderAsSheet` behavior has been moved into this\n * implementation so that the `MenuRenderer` is no longer required and context\n * menus can appear as a `Sheet`.\n */\nexport const Menu = forwardRef<HTMLDivElement, LabelRequiredForA11y<MenuProps>>(\n function Menu(props, propRef) {\n const {\n id: propId,\n style: propStyle,\n role = \"menu\",\n children,\n horizontal: _horizontal,\n sheetHeader: _sheetHeader,\n sheetFooter: _sheetFooter,\n renderAsSheet: _renderAsSheet,\n sheetPosition: _sheetPosition,\n sheetVerticalSize: _sheetVerticalSize,\n sheetProps,\n sheetStyle,\n sheetClassName,\n menuStyle,\n menuClassName,\n disableElevation = false,\n temporary = true,\n tabIndex = -1,\n fixedTo,\n className,\n classNames,\n timeout,\n appear,\n enter,\n exit,\n onEnter,\n onEntering = noop,\n onEntered = noop,\n onExit,\n onExiting,\n onExited = noop,\n onKeyDown = noop,\n listProps,\n listStyle,\n listClassName,\n visible,\n onRequestClose,\n anchor,\n closeOnResize = false,\n closeOnScroll = false,\n preventScroll = false,\n vwMargin,\n vhMargin,\n xMargin,\n yMargin,\n width,\n transformOrigin = true,\n preventOverlap,\n disableSwapping,\n disableVHBounds,\n initialX,\n initialY,\n getFixedPositionOptions,\n disablePortal: propDisablePortal,\n disableTransition,\n ...remaining\n } = props;\n const { \"aria-label\": ariaLabel, \"aria-labelledby\": ariaLabelledBy } =\n props;\n\n const id = useEnsuredId(propId, \"menu\");\n const {\n root,\n menubar,\n menuitem,\n activeId,\n animatedOnceRef,\n hoverTimeoutRef,\n disableHoverMode,\n } = useMenuBarContext();\n const {\n horizontal,\n sheetHeader,\n sheetFooter,\n renderAsSheet,\n sheetPosition,\n sheetVerticalSize,\n } = useMenuConfiguration(props);\n const { isPhone } = useAppSize();\n const isSheet =\n renderAsSheet === true || (renderAsSheet === \"phone\" && isPhone);\n\n const entered = useRef(false);\n const cancelUnmountFocus = useRef(false);\n const hideWithoutRefocus = (): void => {\n cancelUnmountFocus.current = true;\n onRequestClose();\n };\n const mode = useUserInteractionMode();\n const mouse = mode === \"mouse\";\n\n const { eventHandlers, transitionOptions } = useFocusContainer({\n nodeRef: propRef,\n activate: visible,\n onKeyDown(event) {\n onKeyDown(event);\n\n // when a menu is within a sheet, it should not trigger the custom\n // keyboard behavior\n if (isSheet) {\n return;\n }\n\n switch (event.key) {\n case \"Escape\":\n // prevent parent components that have an \"Escape\" keypress event\n // from being triggered as well\n event.stopPropagation();\n disableHoverMode();\n onRequestClose();\n break;\n case \"Tab\":\n // since menus are portalled, tab index is kinda broke so just close\n // the menu instead of doing default tab behavior\n event.preventDefault();\n\n if (!menuitem) {\n // pressing the tab key should still cascade close all menus\n event.stopPropagation();\n }\n disableHoverMode();\n onRequestClose();\n break;\n case \"ArrowUp\":\n if (!root && menuitem && horizontal) {\n event.stopPropagation();\n event.preventDefault();\n onRequestClose();\n }\n break;\n case \"ArrowLeft\":\n if (!root && menuitem && !horizontal) {\n event.stopPropagation();\n event.preventDefault();\n onRequestClose();\n }\n break;\n }\n },\n onEntering(appearing) {\n onEntering(appearing);\n entered.current = true;\n },\n onEntered(appearing) {\n onEntered(appearing);\n entered.current = true;\n cancelUnmountFocus.current = false;\n animatedOnceRef.current = true;\n },\n onExited() {\n onExited();\n entered.current = false;\n },\n onExiting,\n disableTransition,\n isFocusTypeDisabled(type) {\n if (role === \"listbox\") {\n return !isSheet;\n }\n\n if (type === \"keyboard\") {\n return isSheet;\n }\n\n const isHoverDisabled = mouse && hoverTimeoutRef.current === 0;\n if (type === \"mount\") {\n return isHoverDisabled;\n }\n\n return (\n isHoverDisabled ||\n cancelUnmountFocus.current ||\n (root && !!activeId && id !== activeId)\n );\n },\n });\n\n const { ref, style, callbacks } = useFixedPositioning({\n ...transitionOptions,\n onEnter,\n style: isSheet ? propStyle : menuStyle,\n fixedTo,\n anchor: getDefaultAnchor({\n anchor,\n menubar,\n menuitem: !root && menuitem,\n horizontal,\n }),\n vwMargin,\n vhMargin,\n xMargin,\n yMargin,\n width,\n transformOrigin,\n preventOverlap,\n disableSwapping,\n disableVHBounds,\n initialX,\n initialY,\n getFixedPositionOptions,\n onResize: closeOnResize ? hideWithoutRefocus : undefined,\n onScroll(_event, data) {\n if (!data.visible || closeOnScroll) {\n hideWithoutRefocus();\n }\n },\n });\n const { rendered, disablePortal, elementProps } = useScaleTransition({\n nodeRef: ref,\n className: cnb(!isSheet && menuClassName, className),\n transitionIn: visible,\n vertical: !horizontal,\n temporary,\n timeout: isSheet || disableTransition ? 0 : timeout,\n classNames,\n appear,\n enter,\n exit,\n onExit,\n onExiting: transitionOptions.onExiting,\n exitedHidden: true,\n ...callbacks,\n });\n useScrollLock(visible && preventScroll);\n\n // need to make sure that the useEffect does not refire for hiding on click\n // events because of the `window.requestAnimationFrame`. It'll make it so\n // that menu items that update state are unable to close when clicked\n const hide = useRef(onRequestClose);\n useEffect(() => {\n hide.current = onRequestClose;\n });\n useEffect(() => {\n if (!visible) {\n return;\n }\n\n const callback = (event: globalThis.MouseEvent): void => {\n // this is required for when the transition is disabled\n if (!entered.current) {\n return;\n }\n\n // if the user clicks outside of the menu to close it, the toggle button\n // should not be focused. instead the nearest focusable element from the\n // click event should be focused when Tab or Shift + tab is pressed\n cancelUnmountFocus.current =\n !(event.target instanceof HTMLElement) ||\n !event.target.closest(`[role=\"${role}\"]`);\n\n // this won't be called if `event.stopPropagation()` is called\n hide.current();\n disableHoverMode();\n };\n\n // wait an animation frame so the initial click event that caused the menu\n // to become visible does not immediately close the menu\n const frame = window.requestAnimationFrame(() => {\n window.addEventListener(\"click\", callback);\n });\n\n return () => {\n window.cancelAnimationFrame(frame);\n window.removeEventListener(\"click\", callback);\n };\n }, [disableHoverMode, role, visible]);\n\n return (\n <MenuConfigurationProvider\n horizontal={horizontal}\n renderAsSheet={renderAsSheet}\n sheetFooter={sheetFooter}\n sheetHeader={sheetHeader}\n sheetPosition={sheetPosition}\n sheetVerticalSize={sheetVerticalSize}\n >\n <MenuSheet\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy as string}\n header={sheetHeader}\n footer={sheetFooter}\n position={sheetPosition}\n verticalSize={sheetVerticalSize}\n visible={visible}\n enabled={isSheet}\n onRequestClose={onRequestClose}\n style={sheetStyle}\n className={sheetClassName}\n disablePortal={propDisablePortal}\n temporary={temporary}\n disableTransition={disableTransition}\n {...sheetProps}\n >\n <Portal disabled={isSheet || (propDisablePortal ?? disablePortal)}>\n {(rendered || isSheet) && (\n <MenuWidget\n {...remaining}\n {...elementProps}\n {...eventHandlers}\n id={id}\n role={role}\n style={isSheet ? propStyle : style}\n isSheet={isSheet}\n tabIndex={tabIndex}\n horizontal={horizontal}\n listProps={listProps}\n listStyle={listStyle}\n listClassName={listClassName}\n disableElevation={disableElevation}\n cancelUnmountFocus={cancelUnmountFocus}\n >\n {children}\n </MenuWidget>\n )}\n </Portal>\n </MenuSheet>\n </MenuConfigurationProvider>\n );\n }\n);\n"],"names":["cnb","forwardRef","useEffect","useRef","useFocusContainer","useUserInteractionMode","useAppSize","Portal","useFixedPositioning","useScrollLock","useScaleTransition","useEnsuredId","MenuConfigurationProvider","useMenuConfiguration","MenuSheet","MenuWidget","useMenuBarContext","getDefaultAnchor","noop","Menu","props","propRef","id","propId","style","propStyle","role","children","horizontal","_horizontal","sheetHeader","_sheetHeader","sheetFooter","_sheetFooter","renderAsSheet","_renderAsSheet","sheetPosition","_sheetPosition","sheetVerticalSize","_sheetVerticalSize","sheetProps","sheetStyle","sheetClassName","menuStyle","menuClassName","disableElevation","temporary","tabIndex","fixedTo","className","classNames","timeout","appear","enter","exit","onEnter","onEntering","onEntered","onExit","onExiting","onExited","onKeyDown","listProps","listStyle","listClassName","visible","onRequestClose","anchor","closeOnResize","closeOnScroll","preventScroll","vwMargin","vhMargin","xMargin","yMargin","width","transformOrigin","preventOverlap","disableSwapping","disableVHBounds","initialX","initialY","getFixedPositionOptions","disablePortal","propDisablePortal","disableTransition","remaining","ariaLabel","ariaLabelledBy","root","menubar","menuitem","activeId","animatedOnceRef","hoverTimeoutRef","disableHoverMode","isPhone","isSheet","entered","cancelUnmountFocus","hideWithoutRefocus","current","mode","mouse","eventHandlers","transitionOptions","nodeRef","activate","event","key","stopPropagation","preventDefault","appearing","isFocusTypeDisabled","type","isHoverDisabled","ref","callbacks","onResize","undefined","onScroll","_event","data","rendered","elementProps","transitionIn","vertical","exitedHidden","hide","callback","target","HTMLElement","closest","frame","window","requestAnimationFrame","addEventListener","cancelAnimationFrame","removeEventListener","aria-label","aria-labelledby","header","footer","position","verticalSize","enabled","disabled"],"mappings":"AAAA;;AACA,SAASA,GAAG,QAAQ,YAAY;AAChC,SACEC,UAAU,EACVC,S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C,SAAST;QACtC;IACF,GAAG;QAAClC;QAAkBrE;QAAMuC;KAAQ;IAEpC,qBACE,KAACrD;QACCgB,YAAYA;QACZM,eAAeA;QACfF,aAAaA;QACbF,aAAaA;QACbM,eAAeA;QACfE,mBAAmBA;kBAEnB,cAAA,KAACxB;YACC6H,cAAYpD;YACZqD,mBAAiBpD;YACjBqD,QAAQ/G;YACRgH,QAAQ9G;YACR+G,UAAU3G;YACV4G,cAAc1G;YACd2B,SAASA;YACTgF,SAAShD;YACT/B,gBAAgBA;YAChB1C,OAAOiB;YACPQ,WAAWP;YACXyC,eAAeC;YACftC,WAAWA;YACXuC,mBAAmBA;YAClB,GAAG7C,UAAU;sBAEd,cAAA,KAACjC;gBAAO2I,UAAUjD,WAAYb,CAAAA,qBAAqBD,aAAY;0BAC5D,AAACwC,CAAAA,YAAY1B,OAAM,mBAClB,KAAClF;oBACE,GAAGuE,SAAS;oBACZ,GAAGsC,YAAY;oBACf,GAAGpB,aAAa;oBACjBlF,IAAIA;oBACJI,MAAMA;oBACNF,OAAOyE,UAAUxE,YAAYD;oBAC7ByE,SAASA;oBACTlD,UAAUA;oBACVnB,YAAYA;oBACZkC,WAAWA;oBACXC,WAAWA;oBACXC,eAAeA;oBACfnB,kBAAkBA;oBAClBsD,oBAAoBA;8BAEnBxE;;;;;AAOf,GACA"}
|
|
1
|
+
{"version":3,"sources":["../../src/menu/Menu.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport {\n forwardRef,\n useEffect,\n useRef,\n type CSSProperties,\n type HTMLAttributes,\n} from \"react\";\nimport { type FloatingActionButtonPosition } from \"../button/FloatingActionButton.js\";\nimport { useFocusContainer } from \"../focus/useFocusContainer.js\";\nimport { useUserInteractionMode } from \"../interaction/UserInteractionModeProvider.js\";\nimport { type ListElement, type ListProps } from \"../list/List.js\";\nimport { useAppSize } from \"../media-queries/AppSizeProvider.js\";\nimport { type GetDefaultFocusedIndex } from \"../movement/types.js\";\nimport { Portal } from \"../portal/Portal.js\";\nimport { type CalculateFixedPositionOptions } from \"../positioning/types.js\";\nimport {\n useFixedPositioning,\n type FixedPositioningOptions,\n} from \"../positioning/useFixedPositioning.js\";\nimport { useScrollLock } from \"../scroll/useScrollLock.js\";\nimport {\n useScaleTransition,\n type ScaleTransitionHookOptions,\n} from \"../transition/useScaleTransition.js\";\nimport { type LabelRequiredForA11y, type PropsWithRef } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { useIsomorphicLayoutEffect } from \"../useIsomorphicLayoutEffect.js\";\nimport {\n MenuConfigurationProvider,\n useMenuConfiguration,\n type MenuConfiguration,\n type MenuOrientationProps,\n} from \"./MenuConfigurationProvider.js\";\nimport { MenuSheet, type MenuSheetConvenienceProps } from \"./MenuSheet.js\";\nimport { MenuWidget } from \"./MenuWidget.js\";\nimport { useMenuBarContext } from \"./useMenuBarProvider.js\";\nimport { getDefaultAnchor } from \"./utils.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-menu-background-color\"?: string;\n \"--rmd-menu-color\"?: string;\n \"--rmd-menu-min-width\"?: string | number;\n \"--rmd-menu-spacing\"?: string | number;\n }\n}\n\nconst noop = (): void => {\n // do nothing\n};\n\n/** @remarks \\@since 5.0.0 */\nexport type MenuTransitionProps = Omit<\n ScaleTransitionHookOptions<HTMLDivElement>,\n \"transitionIn\" | \"vertical\" | \"nodeRef\"\n>;\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface MenuConfigurationProps extends CalculateFixedPositionOptions {\n /**\n * @see {@link ScaleTransitionHookOptions.temporary}\n * @defaultValue `true`\n */\n temporary?: boolean;\n\n /**\n * @defaultValue `false`\n */\n disablePortal?: boolean;\n\n /**\n * Boolean if the menu should not gain the elevation styles and should only be\n * set to `true` when rendering within a `Sheet`.\n *\n * @defaultValue `false`\n */\n disableElevation?: boolean;\n\n /**\n * @defaultValue `false`\n */\n disableTransition?: boolean;\n\n /**\n * @see {@link FixedPositioningOptions.transformOrigin}\n * @defaultValue `true`\n */\n transformOrigin?: boolean;\n\n /**\n * Boolean if the menu should close if the page is scrolled. The default\n * behavior is to just update the position of the menu relative to the menu\n * button until it can no longer be visible within the viewport.\n *\n * @defaultValue `false`\n */\n closeOnScroll?: boolean;\n\n /**\n * Boolean if the page should no longer be scrollable while the menu is\n * visible.\n *\n * @defaultValue `false`\n */\n preventScroll?: boolean;\n\n /**\n * Boolean if the menu should close instead of repositioning itself if the\n * browser window is resized.\n *\n * @defaultValue `false`\n */\n closeOnResize?: boolean;\n\n /** @see {@link FixedPositioningOptions.getFixedPositionOptions} */\n getFixedPositionOptions?(): CalculateFixedPositionOptions;\n}\n\n/**\n * @remarks\n * \\@since 5.1.0\n * \\@since 6.0.0 Renamed from `MenuListProps` to `MenuListConvenienceProps`\n */\nexport interface MenuListConvenienceProps {\n /**\n * An optional style to provide to the `List` component that surrounds the\n * `MenuItem` within a `Menu`.\n */\n listStyle?: CSSProperties;\n\n /**\n * An optional className to provide to the `List` component that surrounds the\n * `MenuItem` within a `Menu`.\n */\n listClassName?: string;\n\n /**\n * Any additional props to pass to the `List` component that surrounds the\n * `Menu`'s `MenuItem`s.\n */\n listProps?: PropsWithRef<Omit<ListProps, \"horizontal\">, ListElement>;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface MenuConvenienceProps extends MenuConfigurationProps {\n /**\n * This can be used to apply additional props to the `Menu` component.\n *\n * Note: You can override the `style` and `className` using\n * {@link menuStyle} and {@link menuClassName} instead for convenience.\n *\n * @example\n * ```tsx\n * <DropdownMenu\n * {...props}\n * menuProps={{\n * style: {\n * // custom inline style\n * },\n * className: \"come-class-name\",\n * getFixedPositionOptions: () => ({\n * preventOverlap: true,\n * }),\n * }}\n * />\n * ```\n */\n menuProps?: PropsWithRef<\n Omit<\n MenuProps,\n | \"children\"\n | \"fixedTo\"\n | \"visible\"\n | \"onRequestClose\"\n | \"getDefaultFocusedIndex\"\n >,\n HTMLDivElement\n >;\n\n /**\n * Convenience prop to apply custom style to the `Menu` component.\n */\n menuStyle?: CSSProperties;\n\n /**\n * Convenience prop to apply custom class name to the `Menu` component.\n */\n menuClassName?: string;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport type MenuFixedPositioningOptions = Omit<\n FixedPositioningOptions<HTMLElement, HTMLDivElement>,\n \"onScroll\" | \"onResize\"\n>;\n\n/**\n * @remarks\n * \\@since 5.0.0\n * \\@since 6.0.0 Updated to use the latest Menu, Transition, and Portal API.\n */\nexport interface MenuProps\n extends HTMLAttributes<HTMLDivElement>,\n MenuConfiguration,\n MenuConfigurationProps,\n MenuFixedPositioningOptions,\n MenuOrientationProps,\n MenuTransitionProps,\n MenuListConvenienceProps,\n MenuSheetConvenienceProps {\n visible: boolean;\n onRequestClose(): void;\n\n /**\n * @defaultValue `\"menu-\" + useId()`\n */\n id?: string;\n\n /**\n * This is used to set the default focus index when the menu is visible.\n *\n * @internal\n */\n getDefaultFocusedIndex?: GetDefaultFocusedIndex;\n\n /**\n * Custom style that should be applied to the menu only while not rendered\n * within a sheet since the {@link style} would be applied to both versions.\n */\n menuStyle?: CSSProperties;\n\n /**\n * Custom class name that should be applied only while not rendered within a\n * sheet.\n */\n menuClassName?: string;\n\n /**\n * @internal\n *\n * This is only used to update the default anchor when the DropdownMenu's\n * toggle is a floating action button.\n */\n floating?: FloatingActionButtonPosition;\n}\n\n/**\n * **Client Component**\n *\n * This component should generally only be used to implement context menus with\n * the `useContextMenu` hook. Otherwise, the `DropdownMenu` component should be\n * used.\n *\n * @see The `useContextMenu` hook for an example.\n *\n * @remarks\n * \\@since 5.0.0\n * \\@since 6.0.0 Updated this component to implement all the `Menu`\n * functionality instead of requiring the `useMenu` hook and `MenuWidget`\n * component. In addition, the `renderAsSheet` behavior has been moved into this\n * implementation so that the `MenuRenderer` is no longer required and context\n * menus can appear as a `Sheet`.\n */\nexport const Menu = forwardRef<HTMLDivElement, LabelRequiredForA11y<MenuProps>>(\n function Menu(props, propRef) {\n const {\n id: propId,\n style: propStyle,\n role = \"menu\",\n children,\n horizontal: _horizontal,\n sheetHeader: _sheetHeader,\n sheetFooter: _sheetFooter,\n renderAsSheet: _renderAsSheet,\n sheetPosition: _sheetPosition,\n sheetVerticalSize: _sheetVerticalSize,\n sheetProps,\n sheetStyle,\n sheetClassName,\n menuStyle,\n menuClassName,\n disableElevation = false,\n temporary = true,\n tabIndex = -1,\n fixedTo,\n className,\n classNames,\n timeout,\n appear,\n enter,\n exit,\n onEnter,\n onEntering = noop,\n onEntered = noop,\n onExit,\n onExiting,\n onExited = noop,\n onKeyDown = noop,\n listProps,\n listStyle,\n listClassName,\n visible,\n onRequestClose,\n floating,\n anchor,\n closeOnResize = false,\n closeOnScroll = false,\n preventScroll = false,\n vwMargin,\n vhMargin,\n xMargin,\n yMargin,\n width,\n transformOrigin = true,\n preventOverlap,\n disableSwapping,\n disableVHBounds,\n initialX,\n initialY,\n getFixedPositionOptions,\n disablePortal: propDisablePortal,\n disableTransition,\n ...remaining\n } = props;\n const { \"aria-label\": ariaLabel, \"aria-labelledby\": ariaLabelledBy } =\n props;\n\n const id = useEnsuredId(propId, \"menu\");\n const {\n root,\n menubar,\n menuitem,\n activeId,\n animatedOnceRef,\n hoverTimeoutRef,\n disableHoverMode,\n } = useMenuBarContext();\n const {\n horizontal,\n sheetHeader,\n sheetFooter,\n renderAsSheet,\n sheetPosition,\n sheetVerticalSize,\n } = useMenuConfiguration(props);\n const { isPhone } = useAppSize();\n const isSheet =\n renderAsSheet === true || (renderAsSheet === \"phone\" && isPhone);\n\n const entered = useRef(false);\n const cancelUnmountFocus = useRef(false);\n const hideWithoutRefocus = (): void => {\n cancelUnmountFocus.current = true;\n onRequestClose();\n };\n const mode = useUserInteractionMode();\n const mouse = mode === \"mouse\";\n\n const { eventHandlers, transitionOptions } = useFocusContainer({\n nodeRef: propRef,\n activate: visible,\n onKeyDown(event) {\n onKeyDown(event);\n\n // when a menu is within a sheet, it should not trigger the custom\n // keyboard behavior\n if (isSheet) {\n return;\n }\n\n switch (event.key) {\n case \"Escape\":\n // prevent parent components that have an \"Escape\" keypress event\n // from being triggered as well\n event.stopPropagation();\n disableHoverMode();\n onRequestClose();\n break;\n case \"Tab\":\n // since menus are portalled, tab index is kinda broke so just close\n // the menu instead of doing default tab behavior\n event.preventDefault();\n\n if (!menuitem) {\n // pressing the tab key should still cascade close all menus\n event.stopPropagation();\n }\n disableHoverMode();\n onRequestClose();\n break;\n case \"ArrowUp\":\n if (!root && menuitem && horizontal) {\n event.stopPropagation();\n event.preventDefault();\n onRequestClose();\n }\n break;\n case \"ArrowLeft\":\n if (!root && menuitem && !horizontal) {\n event.stopPropagation();\n event.preventDefault();\n onRequestClose();\n }\n break;\n }\n },\n onEntering(appearing) {\n onEntering(appearing);\n entered.current = true;\n },\n onEntered(appearing) {\n onEntered(appearing);\n entered.current = true;\n cancelUnmountFocus.current = false;\n animatedOnceRef.current = true;\n },\n onExited() {\n onExited();\n entered.current = false;\n },\n onExiting,\n disableTransition,\n isFocusTypeDisabled(type) {\n if (role === \"listbox\") {\n return !isSheet;\n }\n\n if (type === \"keyboard\") {\n return isSheet;\n }\n\n const isHoverDisabled = mouse && hoverTimeoutRef.current === 0;\n if (type === \"mount\") {\n return isHoverDisabled;\n }\n\n return (\n isHoverDisabled ||\n cancelUnmountFocus.current ||\n (root && !!activeId && id !== activeId)\n );\n },\n });\n\n const { ref, style, callbacks, updateStyle } = useFixedPositioning({\n ...transitionOptions,\n onEnter,\n style: isSheet ? propStyle : menuStyle,\n fixedTo,\n anchor: getDefaultAnchor({\n anchor,\n menubar,\n floating,\n menuitem: !root && menuitem,\n horizontal,\n }),\n vwMargin,\n vhMargin,\n xMargin,\n yMargin,\n width,\n transformOrigin,\n preventOverlap,\n disableSwapping,\n disableVHBounds,\n initialX,\n initialY,\n getFixedPositionOptions,\n onResize: closeOnResize ? hideWithoutRefocus : undefined,\n onScroll(_event, data) {\n if (!data.visible || closeOnScroll) {\n hideWithoutRefocus();\n }\n },\n });\n const { rendered, disablePortal, elementProps } = useScaleTransition({\n nodeRef: ref,\n className: cnb(!isSheet && menuClassName, className),\n transitionIn: visible,\n vertical: !horizontal,\n temporary,\n timeout: isSheet || disableTransition ? 0 : timeout,\n classNames,\n appear,\n enter,\n exit,\n onExit,\n onExiting: transitionOptions.onExiting,\n exitedHidden: true,\n ...callbacks,\n });\n useScrollLock(visible && preventScroll);\n\n // need to make sure that the useEffect does not refire for hiding on click\n // events because of the `window.requestAnimationFrame`. It'll make it so\n // that menu items that update state are unable to close when clicked\n const hide = useRef(onRequestClose);\n useEffect(() => {\n hide.current = onRequestClose;\n });\n useEffect(() => {\n if (!visible) {\n return;\n }\n\n const callback = (event: globalThis.MouseEvent): void => {\n // this is required for when the transition is disabled\n if (!entered.current) {\n return;\n }\n\n // if the user clicks outside of the menu to close it, the toggle button\n // should not be focused. instead the nearest focusable element from the\n // click event should be focused when Tab or Shift + tab is pressed\n cancelUnmountFocus.current =\n !(event.target instanceof HTMLElement) ||\n !event.target.closest(`[role=\"${role}\"]`);\n\n // this won't be called if `event.stopPropagation()` is called\n hide.current();\n disableHoverMode();\n };\n\n // wait an animation frame so the initial click event that caused the menu\n // to become visible does not immediately close the menu\n const frame = window.requestAnimationFrame(() => {\n window.addEventListener(\"click\", callback);\n });\n\n return () => {\n window.cancelAnimationFrame(frame);\n window.removeEventListener(\"click\", callback);\n };\n }, [disableHoverMode, role, visible]);\n useIsomorphicLayoutEffect(() => {\n if (!visible) {\n return;\n }\n\n updateStyle();\n }, [updateStyle, children, visible]);\n\n return (\n <MenuConfigurationProvider\n horizontal={horizontal}\n renderAsSheet={renderAsSheet}\n sheetFooter={sheetFooter}\n sheetHeader={sheetHeader}\n sheetPosition={sheetPosition}\n sheetVerticalSize={sheetVerticalSize}\n >\n <MenuSheet\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy as string}\n header={sheetHeader}\n footer={sheetFooter}\n position={sheetPosition}\n verticalSize={sheetVerticalSize}\n visible={visible}\n enabled={isSheet}\n onRequestClose={onRequestClose}\n style={sheetStyle}\n className={sheetClassName}\n disablePortal={propDisablePortal}\n temporary={temporary}\n disableTransition={disableTransition}\n {...sheetProps}\n >\n <Portal disabled={isSheet || (propDisablePortal ?? disablePortal)}>\n {(rendered || isSheet) && (\n <MenuWidget\n {...remaining}\n {...elementProps}\n {...eventHandlers}\n id={id}\n role={role}\n style={isSheet ? propStyle : style}\n isSheet={isSheet}\n tabIndex={tabIndex}\n horizontal={horizontal}\n listProps={listProps}\n listStyle={listStyle}\n listClassName={listClassName}\n disableElevation={disableElevation}\n cancelUnmountFocus={cancelUnmountFocus}\n >\n {children}\n </MenuWidget>\n )}\n </Portal>\n </MenuSheet>\n </MenuConfigurationProvider>\n );\n }\n);\n"],"names":["cnb","forwardRef","useEffect","useRef","useFocusContainer","useUserInteractionMode","useAppSize","Portal","useFixedPositioning","useScrollLock","useScaleTransition","useEnsuredId","useIsomorphicLayoutEffect","MenuConfigurationProvider","useMenuConfiguration","MenuSheet","MenuWidget","useMenuBarContext","getDefaultAnchor","noop","Menu","props","propRef","id","propId","style","propStyle","role","children","horizontal","_horizontal","sheetHeader","_sheetHeader","sheetFooter","_sheetFooter","renderAsSheet","_renderAsSheet","sheetPosition","_sheetPosition","sheetVerticalSize","_sheetVerticalSize","sheetProps","sheetStyle","sheetClassName","menuStyle","menuClassName","disableElevation","temporary","tabIndex","fixedTo","className","classNames","timeout","appear","enter","exit","onEnter","onEntering","onEntered","onExit","onExiting","onExited","onKeyDown","listProps","listStyle","listClassName","visible","onRequestClose","floating","anchor","closeOnResize","closeOnScroll","preventScroll","vwMargin","vhMargin","xMargin","yMargin","width","transformOrigin","preventOverlap","disableSwapping","disableVHBounds","initialX","initialY","getFixedPositionOptions","disablePortal","propDisablePortal","disableTransition","remaining","ariaLabel","ariaLabelledBy","root","menubar","menuitem","activeId","animatedOnceRef","hoverTimeoutRef","disableHoverMode","isPhone","isSheet","entered","cancelUnmountFocus","hideWithoutRefocus","current","mode","mouse","eventHandlers","transitionOptions","nodeRef","activate","event","key","stopPropagation","preventDefault","appearing","isFocusTypeDisabled","type","isHoverDisabled","ref","callbacks","updateStyle","onResize","undefined","onScroll","_event","data","rendered","elementProps","transitionIn","vertical","exitedHidden","hide","callback","target","HTMLElement","closest","frame","window","requestAnimationFrame","addEventListener","cancelAnimationFrame","removeEventListener","aria-label","aria-labelledby","header","footer","position","verticalSize","enabled","disabled"],"mappings":"AAAA;;AACA,SAASA,GAAG,QAAQ,YAAY;AAChC,SACEC,UAAU,EACVC,SAAS,EACTC,MAAM,QAGD,QAAQ;AAEf,SAASC,iBAAiB,QAAQ,gCAAgC;AAClE,SAASC,sBAAsB,QAAQ,gDAAgD;AAEvF,SAASC,UAAU,QAAQ,sCAAsC;AAEjE,SAASC,MAAM,QAAQ,sBAAsB;AAE7C,SACEC,mBAAmB,QAEd,wCAAwC;AAC/C,SAASC,aAAa,QAAQ,6BAA6B;AAC3D,SACEC,kBAAkB,QAEb,sCAAsC;AAE7C,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,yBAAyB,QAAQ,kCAAkC;AAC5E,SACEC,yBAAyB,EACzBC,oBAAoB,QAGf,iCAAiC;AACxC,SAASC,SAAS,QAAwC,iBAAiB;AAC3E,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,SAASC,iBAAiB,QAAQ,0BAA0B;AAC5D,SAASC,gBAAgB,QAAQ,aAAa;AAW9C,MAAMC,OAAO;AACX,aAAa;AACf;AA2MA;;;;;;;;;;;;;;;;CAgBC,GACD,OAAO,MAAMC,qBAAOnB,WAClB,SAASmB,KAAKC,KAAK,EAAEC,OAAO;IAC1B,MAAM,EACJC,IAAIC,MAAM,EACVC,OAAOC,SAAS,EAChBC,OAAO,MAAM,EACbC,QAAQ,EACRC,YAAYC,WAAW,EACvBC,aAAaC,YAAY,EACzBC,aAAaC,YAAY,EACzBC,eAAeC,cAAc,EAC7BC,eAAeC,cAAc,EAC7BC,mBAAmBC,kBAAkB,EACrCC,UAAU,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BACXC,WAAWA;oBACXC,eAAeA;oBACfnB,kBAAkBA;oBAClBuD,oBAAoBA;8BAEnBzE;;;;;AAOf,GACA"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactNode } from "react";
|
|
2
|
+
import { type ListItemChildrenProps, type ListItemHeight } from "../list/types.js";
|
|
3
|
+
import { type CircularProgressProps } from "../progress/CircularProgress.js";
|
|
4
|
+
/**
|
|
5
|
+
* @remarks \@since 6.0.0
|
|
6
|
+
*/
|
|
7
|
+
export interface MenuItemCircularProgressProps extends CircularProgressProps {
|
|
8
|
+
/** @defaultValue `"Loading"` */
|
|
9
|
+
"aria-label"?: string;
|
|
10
|
+
/** @defaultValue `"none"` */
|
|
11
|
+
role?: string;
|
|
12
|
+
/** @defaultValue `true` */
|
|
13
|
+
dense?: boolean;
|
|
14
|
+
liProps?: HTMLAttributes<HTMLLIElement>;
|
|
15
|
+
height?: ListItemHeight;
|
|
16
|
+
leftAddon?: ReactNode;
|
|
17
|
+
rightAddon?: ReactNode;
|
|
18
|
+
listItemChildrenProps?: ListItemChildrenProps;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* @example
|
|
22
|
+
* Simple Example
|
|
23
|
+
* ```tsx
|
|
24
|
+
* "use client";
|
|
25
|
+
* import {
|
|
26
|
+
* DropdownMenu,
|
|
27
|
+
* MenuItem,
|
|
28
|
+
* MenuItemCircularProgress,
|
|
29
|
+
* useAsyncAction,
|
|
30
|
+
* } from "@react-md/core";
|
|
31
|
+
*
|
|
32
|
+
* function Example() {
|
|
33
|
+
* const { handleAsync, pending } = useAsyncAction();
|
|
34
|
+
* const [visible, setVisible] = useState(false);
|
|
35
|
+
*
|
|
36
|
+
* return (
|
|
37
|
+
* <DropdownMenu buttonChildren="Options" visible={visible} setVisible={setVisible}>
|
|
38
|
+
* {pending && <MenuItemCircularProgress />}
|
|
39
|
+
* <MenuItem
|
|
40
|
+
* onClick={handleAsync(async (event) => {
|
|
41
|
+
* // prevent menu from closing until action completes
|
|
42
|
+
* event.stopPropagation()
|
|
43
|
+
*
|
|
44
|
+
* // do something async
|
|
45
|
+
* await ...
|
|
46
|
+
*
|
|
47
|
+
* // close menu once completed
|
|
48
|
+
* setVisible(false)
|
|
49
|
+
* })}
|
|
50
|
+
* >
|
|
51
|
+
* Some Action
|
|
52
|
+
* </MenuItem>
|
|
53
|
+
* </DropdownMenu>
|
|
54
|
+
* )
|
|
55
|
+
* }
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* @remarks \@since 6.0.0
|
|
59
|
+
*/
|
|
60
|
+
export declare const MenuItemCircularProgress: import("react").ForwardRefExoticComponent<MenuItemCircularProgressProps & import("react").RefAttributes<HTMLLIElement>>;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cnb } from "cnbuilder";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import { ListItemChildren } from "../list/ListItemChildren.js";
|
|
5
|
+
import { listItem } from "../list/listItemStyles.js";
|
|
6
|
+
import { CircularProgress } from "../progress/CircularProgress.js";
|
|
7
|
+
/**
|
|
8
|
+
* @example
|
|
9
|
+
* Simple Example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* "use client";
|
|
12
|
+
* import {
|
|
13
|
+
* DropdownMenu,
|
|
14
|
+
* MenuItem,
|
|
15
|
+
* MenuItemCircularProgress,
|
|
16
|
+
* useAsyncAction,
|
|
17
|
+
* } from "@react-md/core";
|
|
18
|
+
*
|
|
19
|
+
* function Example() {
|
|
20
|
+
* const { handleAsync, pending } = useAsyncAction();
|
|
21
|
+
* const [visible, setVisible] = useState(false);
|
|
22
|
+
*
|
|
23
|
+
* return (
|
|
24
|
+
* <DropdownMenu buttonChildren="Options" visible={visible} setVisible={setVisible}>
|
|
25
|
+
* {pending && <MenuItemCircularProgress />}
|
|
26
|
+
* <MenuItem
|
|
27
|
+
* onClick={handleAsync(async (event) => {
|
|
28
|
+
* // prevent menu from closing until action completes
|
|
29
|
+
* event.stopPropagation()
|
|
30
|
+
*
|
|
31
|
+
* // do something async
|
|
32
|
+
* await ...
|
|
33
|
+
*
|
|
34
|
+
* // close menu once completed
|
|
35
|
+
* setVisible(false)
|
|
36
|
+
* })}
|
|
37
|
+
* >
|
|
38
|
+
* Some Action
|
|
39
|
+
* </MenuItem>
|
|
40
|
+
* </DropdownMenu>
|
|
41
|
+
* )
|
|
42
|
+
* }
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* @remarks \@since 6.0.0
|
|
46
|
+
*/ export const MenuItemCircularProgress = /*#__PURE__*/ forwardRef(function MenuItemCircularProgress(props, ref) {
|
|
47
|
+
const { "aria-label": propAriaLabel, "aria-labelledby": ariaLabelledBy, role = "none", className, height, leftAddon, rightAddon, liProps, listItemChildrenProps, ...remaining } = props;
|
|
48
|
+
let ariaLabel = propAriaLabel;
|
|
49
|
+
if (!ariaLabel && !ariaLabelledBy) {
|
|
50
|
+
ariaLabel = "Loading";
|
|
51
|
+
}
|
|
52
|
+
return /*#__PURE__*/ _jsx("li", {
|
|
53
|
+
...liProps,
|
|
54
|
+
ref: ref,
|
|
55
|
+
role: role,
|
|
56
|
+
className: cnb(listItem({
|
|
57
|
+
height,
|
|
58
|
+
className
|
|
59
|
+
}), liProps?.className),
|
|
60
|
+
children: /*#__PURE__*/ _jsx(ListItemChildren, {
|
|
61
|
+
...listItemChildrenProps,
|
|
62
|
+
leftAddon: leftAddon,
|
|
63
|
+
rightAddon: rightAddon,
|
|
64
|
+
children: /*#__PURE__*/ _jsx(CircularProgress, {
|
|
65
|
+
"aria-label": ariaLabel,
|
|
66
|
+
"aria-labelledby": ariaLabelledBy,
|
|
67
|
+
dense: true,
|
|
68
|
+
...remaining
|
|
69
|
+
})
|
|
70
|
+
})
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
//# sourceMappingURL=MenuItemCircularProgress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/menu/MenuItemCircularProgress.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport { ListItemChildren } from \"../list/ListItemChildren.js\";\nimport { listItem } from \"../list/listItemStyles.js\";\nimport {\n type ListItemChildrenProps,\n type ListItemHeight,\n} from \"../list/types.js\";\nimport {\n CircularProgress,\n type CircularProgressProps,\n} from \"../progress/CircularProgress.js\";\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface MenuItemCircularProgressProps extends CircularProgressProps {\n /** @defaultValue `\"Loading\"` */\n \"aria-label\"?: string;\n\n /** @defaultValue `\"none\"` */\n role?: string;\n\n /** @defaultValue `true` */\n dense?: boolean;\n\n liProps?: HTMLAttributes<HTMLLIElement>;\n height?: ListItemHeight;\n leftAddon?: ReactNode;\n rightAddon?: ReactNode;\n listItemChildrenProps?: ListItemChildrenProps;\n}\n\n/**\n * @example\n * Simple Example\n * ```tsx\n * \"use client\";\n * import {\n * DropdownMenu,\n * MenuItem,\n * MenuItemCircularProgress,\n * useAsyncAction,\n * } from \"@react-md/core\";\n *\n * function Example() {\n * const { handleAsync, pending } = useAsyncAction();\n * const [visible, setVisible] = useState(false);\n *\n * return (\n * <DropdownMenu buttonChildren=\"Options\" visible={visible} setVisible={setVisible}>\n * {pending && <MenuItemCircularProgress />}\n * <MenuItem\n * onClick={handleAsync(async (event) => {\n * // prevent menu from closing until action completes\n * event.stopPropagation()\n *\n * // do something async\n * await ...\n *\n * // close menu once completed\n * setVisible(false)\n * })}\n * >\n * Some Action\n * </MenuItem>\n * </DropdownMenu>\n * )\n * }\n * ```\n *\n * @remarks \\@since 6.0.0\n */\nexport const MenuItemCircularProgress = forwardRef<\n HTMLLIElement,\n MenuItemCircularProgressProps\n>(function MenuItemCircularProgress(props, ref) {\n const {\n \"aria-label\": propAriaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n role = \"none\",\n className,\n height,\n leftAddon,\n rightAddon,\n liProps,\n listItemChildrenProps,\n ...remaining\n } = props;\n let ariaLabel = propAriaLabel;\n if (!ariaLabel && !ariaLabelledBy) {\n ariaLabel = \"Loading\";\n }\n\n return (\n <li\n {...liProps}\n ref={ref}\n role={role}\n className={cnb(listItem({ height, className }), liProps?.className)}\n >\n <ListItemChildren\n {...listItemChildrenProps}\n leftAddon={leftAddon}\n rightAddon={rightAddon}\n >\n <CircularProgress\n aria-label={ariaLabel as string}\n aria-labelledby={ariaLabelledBy}\n dense\n {...remaining}\n />\n </ListItemChildren>\n </li>\n );\n});\n"],"names":["cnb","forwardRef","ListItemChildren","listItem","CircularProgress","MenuItemCircularProgress","props","ref","propAriaLabel","ariaLabelledBy","role","className","height","leftAddon","rightAddon","liProps","listItemChildrenProps","remaining","ariaLabel","li","aria-label","aria-labelledby","dense"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAA6C,QAAQ;AACxE,SAASC,gBAAgB,QAAQ,8BAA8B;AAC/D,SAASC,QAAQ,QAAQ,4BAA4B;AAKrD,SACEC,gBAAgB,QAEX,kCAAkC;AAsBzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuCC,GACD,OAAO,MAAMC,yCAA2BJ,WAGtC,SAASI,yBAAyBC,KAAK,EAAEC,GAAG;IAC5C,MAAM,EACJ,cAAcC,aAAa,EAC3B,mBAAmBC,cAAc,EACjCC,OAAO,MAAM,EACbC,SAAS,EACTC,MAAM,EACNC,SAAS,EACTC,UAAU,EACVC,OAAO,EACPC,qBAAqB,EACrB,GAAGC,WACJ,GAAGX;IACJ,IAAIY,YAAYV;IAChB,IAAI,CAACU,aAAa,CAACT,gBAAgB;QACjCS,YAAY;IACd;IAEA,qBACE,KAACC;QACE,GAAGJ,OAAO;QACXR,KAAKA;QACLG,MAAMA;QACNC,WAAWX,IAAIG,SAAS;YAAES;YAAQD;QAAU,IAAII,SAASJ;kBAEzD,cAAA,KAACT;YACE,GAAGc,qBAAqB;YACzBH,WAAWA;YACXC,YAAYA;sBAEZ,cAAA,KAACV;gBACCgB,cAAYF;gBACZG,mBAAiBZ;gBACjBa,KAAK;gBACJ,GAAGL,SAAS;;;;AAKvB,GAAG"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { type HTMLAttributes } from "react";
|
|
2
2
|
import { type DividerProps } from "../divider/Divider.js";
|
|
3
|
-
import { type VerticalDividerProps } from "../divider/VerticalDivider.js";
|
|
4
3
|
/** @remarks \@since 5.0.0 */
|
|
5
|
-
export interface MenuItemSeparatorProps extends HTMLAttributes<HTMLLIElement>, Pick<DividerProps, "inset" | "vertical"
|
|
4
|
+
export interface MenuItemSeparatorProps extends HTMLAttributes<HTMLLIElement>, Pick<DividerProps, "inset" | "vertical"> {
|
|
6
5
|
}
|
|
7
6
|
/**
|
|
8
7
|
* **Client Component**
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
import { divider } from "../divider/styles.js";
|
|
5
|
-
import { useVerticalDividerHeight } from "../divider/useVerticalDividerHeight.js";
|
|
6
5
|
import { useMenuConfiguration } from "./MenuConfigurationProvider.js";
|
|
7
6
|
/**
|
|
8
7
|
* **Client Component**
|
|
@@ -13,18 +12,13 @@ import { useMenuConfiguration } from "./MenuConfigurationProvider.js";
|
|
|
13
12
|
*
|
|
14
13
|
* @remarks \@since 5.0.0 Renders as an `<li>` instead of a `<div>` or `<hr />`.
|
|
15
14
|
*/ export const MenuItemSeparator = /*#__PURE__*/ forwardRef(function MenuItemSeparator(props, ref) {
|
|
16
|
-
const {
|
|
15
|
+
const { className, inset, vertical: propVertical, children, ...remaining } = props;
|
|
17
16
|
const horizontal = useMenuConfiguration().horizontal;
|
|
18
17
|
const vertical = propVertical ?? horizontal;
|
|
19
|
-
const heightProps = useVerticalDividerHeight({
|
|
20
|
-
ref,
|
|
21
|
-
style,
|
|
22
|
-
maxHeight: vertical ? maxHeight ?? 1 : 0
|
|
23
|
-
});
|
|
24
18
|
return /*#__PURE__*/ _jsx("li", {
|
|
25
19
|
...remaining,
|
|
26
|
-
...heightProps,
|
|
27
20
|
"aria-orientation": vertical ? "vertical" : undefined,
|
|
21
|
+
ref: ref,
|
|
28
22
|
role: "separator",
|
|
29
23
|
className: divider({
|
|
30
24
|
inset: inset && !vertical,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/menu/MenuItemSeparator.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, type HTMLAttributes } from \"react\";\nimport { type DividerProps } from \"../divider/Divider.js\";\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/menu/MenuItemSeparator.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, type HTMLAttributes } from \"react\";\nimport { type DividerProps } from \"../divider/Divider.js\";\nimport { divider } from \"../divider/styles.js\";\nimport { useMenuConfiguration } from \"./MenuConfigurationProvider.js\";\n\n/** @remarks \\@since 5.0.0 */\nexport interface MenuItemSeparatorProps\n extends HTMLAttributes<HTMLLIElement>,\n Pick<DividerProps, \"inset\" | \"vertical\"> {}\n\n/**\n * **Client Component**\n *\n * This component renders a `<li role=\"separator\">` with the divider styles. It\n * will also automatically render itself vertically instead of horizontally if\n * the menu is rendering horizontally.\n *\n * @remarks \\@since 5.0.0 Renders as an `<li>` instead of a `<div>` or `<hr />`.\n */\nexport const MenuItemSeparator = forwardRef<\n HTMLLIElement,\n MenuItemSeparatorProps\n>(function MenuItemSeparator(props, ref) {\n const {\n className,\n inset,\n vertical: propVertical,\n children,\n ...remaining\n } = props;\n\n const horizontal = useMenuConfiguration().horizontal;\n const vertical = propVertical ?? horizontal;\n\n return (\n <li\n {...remaining}\n aria-orientation={vertical ? \"vertical\" : undefined}\n ref={ref}\n role=\"separator\"\n className={divider({ inset: inset && !vertical, vertical, className })}\n >\n {children}\n </li>\n );\n});\n"],"names":["forwardRef","divider","useMenuConfiguration","MenuItemSeparator","props","ref","className","inset","vertical","propVertical","children","remaining","horizontal","li","aria-orientation","undefined","role"],"mappings":"AAAA;;AACA,SAASA,UAAU,QAA6B,QAAQ;AAExD,SAASC,OAAO,QAAQ,uBAAuB;AAC/C,SAASC,oBAAoB,QAAQ,iCAAiC;AAOtE;;;;;;;;CAQC,GACD,OAAO,MAAMC,kCAAoBH,WAG/B,SAASG,kBAAkBC,KAAK,EAAEC,GAAG;IACrC,MAAM,EACJC,SAAS,EACTC,KAAK,EACLC,UAAUC,YAAY,EACtBC,QAAQ,EACR,GAAGC,WACJ,GAAGP;IAEJ,MAAMQ,aAAaV,uBAAuBU,UAAU;IACpD,MAAMJ,WAAWC,gBAAgBG;IAEjC,qBACE,KAACC;QACE,GAAGF,SAAS;QACbG,oBAAkBN,WAAW,aAAaO;QAC1CV,KAAKA;QACLW,MAAK;QACLV,WAAWL,QAAQ;YAAEM,OAAOA,SAAS,CAACC;YAAUA;YAAUF;QAAU;kBAEnEI;;AAGP,GAAG"}
|
package/dist/menu/MenuSheet.d.ts
CHANGED
|
@@ -2,6 +2,10 @@ import { type CSSProperties, type ReactElement, type ReactNode } from "react";
|
|
|
2
2
|
import { type BaseSheetProps } from "../sheet/Sheet.js";
|
|
3
3
|
import { type LabelRequiredForA11y, type PropsWithRef } from "../types.js";
|
|
4
4
|
import { type RenderMenuAsSheet } from "./MenuConfigurationProvider.js";
|
|
5
|
+
/**
|
|
6
|
+
* @remarks \@since 6.0.0
|
|
7
|
+
*/
|
|
8
|
+
export type MenuSheetConfigurableProps = Omit<BaseSheetProps, "visible" | "onRequestClose">;
|
|
5
9
|
/**
|
|
6
10
|
* @remarks \@since 6.0.0
|
|
7
11
|
*/
|
|
@@ -22,11 +26,12 @@ export interface MenuSheetConvenienceProps {
|
|
|
22
26
|
* // custom inline style
|
|
23
27
|
* },
|
|
24
28
|
* className: "come-class-name",
|
|
29
|
+
* horizontalSize: "touch",
|
|
25
30
|
* }}
|
|
26
31
|
* />
|
|
27
32
|
* ```
|
|
28
33
|
*/
|
|
29
|
-
sheetProps?: PropsWithRef<
|
|
34
|
+
sheetProps?: PropsWithRef<MenuSheetConfigurableProps, HTMLDivElement>;
|
|
30
35
|
/**
|
|
31
36
|
* Convenience prop to apply custom style to the `Sheet` component when the
|
|
32
37
|
* `Menu` is being rendered as a `Sheet`.
|