@react-md/core 1.0.0-next.1 → 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 -12
- package/.turbo/turbo-test.log +5512 -166
- package/.turbo/turbo-typecheck.log +4 -4
- package/CHANGELOG.md +177 -0
- package/README.md +39 -24
- package/coverage/clover.xml +2 -2
- package/coverage/lcov-report/AutoComplete.tsx.html +283 -0
- package/coverage/lcov-report/Avatar.tsx.html +472 -0
- package/coverage/lcov-report/DefaultToastRenderer.tsx.html +166 -112
- package/coverage/lcov-report/IconRotator.tsx.html +322 -0
- package/coverage/lcov-report/ListItem.tsx.html +892 -0
- package/coverage/lcov-report/ListItemLink.tsx.html +616 -0
- package/coverage/lcov-report/MenuItemCheckbox.tsx.html +223 -0
- package/coverage/lcov-report/MenuItemInputToggle.tsx.html +178 -232
- package/coverage/lcov-report/MenuItemRadio.tsx.html +436 -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/Tab.tsx.html +261 -147
- 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/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 +162 -99
- package/coverage/lcov-report/avatar/index.html +19 -34
- package/coverage/lcov-report/avatar/styles.ts.html +1 -1
- package/coverage/lcov-report/button/Button.tsx.html +85 -85
- package/coverage/lcov-report/button/TooltippedButton.tsx.html +445 -0
- package/coverage/lcov-report/button/index.html +12 -12
- 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/cssUtils.ts.html +86 -59
- package/coverage/lcov-report/dialog/DialogFooter.tsx.html +36 -36
- package/coverage/lcov-report/dialog/DialogHeader.tsx.html +26 -26
- package/coverage/lcov-report/dialog/index.html +34 -19
- 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 +2 -2
- 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/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 +111 -21
- package/coverage/lcov-report/form/selectUtils.ts.html +188 -221
- 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/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/icon/FontIcon.tsx.html +64 -64
- package/coverage/lcov-report/icon/MaterialIcon.tsx.html +235 -0
- package/coverage/lcov-report/icon/index.html +19 -19
- package/coverage/lcov-report/index.html +1 -1
- 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/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 +5 -5
- package/coverage/lcov-report/list/index.html +81 -6
- package/coverage/lcov-report/list/listItemStyles.ts.html +703 -0
- package/coverage/lcov-report/media-queries/appSize.ts.html +1 -1
- package/coverage/lcov-report/media-queries/index.html +1 -1
- package/coverage/lcov-report/menu/DropdownMenu.tsx.html +188 -188
- package/coverage/lcov-report/menu/Menu.tsx.html +276 -252
- 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/MenuVisibilityProvider.tsx.html +48 -33
- package/coverage/lcov-report/menu/index.html +14 -44
- 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 +184 -184
- package/coverage/lcov-report/progress/index.html +19 -34
- 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 +143 -23
- package/coverage/lcov-report/src/app-bar/AppBarTitle.tsx.html +1 -1
- package/coverage/lcov-report/src/app-bar/index.html +5 -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 +2 -2
- package/coverage/lcov-report/src/avatar/index.html +1 -1
- package/coverage/lcov-report/src/avatar/styles.ts.html +1 -1
- 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 +23 -8
- package/coverage/lcov-report/src/box/styles.ts.html +46 -46
- package/coverage/lcov-report/src/button/AsyncButton.tsx.html +1 -1
- package/coverage/lcov-report/src/button/Button.tsx.html +87 -87
- package/coverage/lcov-report/src/button/ButtonUnstyled.tsx.html +1 -1
- package/coverage/lcov-report/src/button/FloatingActionButton.tsx.html +11 -11
- package/coverage/lcov-report/src/button/TooltippedButton.tsx.html +445 -0
- package/coverage/lcov-report/src/button/buttonStyles.ts.html +52 -52
- package/coverage/lcov-report/src/button/buttonUnstyledStyles.ts.html +1 -1
- package/coverage/lcov-report/src/button/index.html +8 -23
- 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 +24 -9
- 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 +53 -53
- package/coverage/lcov-report/src/delegateEvent.ts.html +109 -109
- package/coverage/lcov-report/src/dialog/Dialog.tsx.html +1 -1
- package/coverage/lcov-report/src/dialog/DialogContainer.tsx.html +1 -1
- package/coverage/lcov-report/src/dialog/DialogContent.tsx.html +1 -1
- package/coverage/lcov-report/src/dialog/DialogFooter.tsx.html +1 -1
- package/coverage/lcov-report/src/dialog/DialogHeader.tsx.html +1 -1
- package/coverage/lcov-report/src/dialog/DialogTitle.tsx.html +1 -1
- package/coverage/lcov-report/src/dialog/FixedDialog.tsx.html +1 -1
- package/coverage/lcov-report/src/dialog/NestedDialogProvider.ts.html +1 -1
- package/coverage/lcov-report/src/dialog/index.html +129 -9
- package/coverage/lcov-report/src/dialog/styles.ts.html +1 -1
- package/coverage/lcov-report/src/divider/Divider.tsx.html +4 -7
- package/coverage/lcov-report/src/divider/index.html +5 -5
- package/coverage/lcov-report/src/divider/styles.ts.html +1 -1
- package/coverage/lcov-report/src/draggable/index.html +27 -27
- package/coverage/lcov-report/src/draggable/useDraggable.ts.html +47 -44
- package/coverage/lcov-report/src/draggable/utils.ts.html +29 -131
- 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 +1 -1
- package/coverage/lcov-report/src/expansion-panel/index.html +8 -8
- 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 +1 -1
- package/coverage/lcov-report/src/focus/useFocusContainer.ts.html +1 -1
- package/coverage/lcov-report/src/focus/utils.ts.html +1 -1
- 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 +1 -1
- package/coverage/lcov-report/src/form/Form.tsx.html +11 -8
- package/coverage/lcov-report/src/form/FormMessage.tsx.html +1 -1
- package/coverage/lcov-report/src/form/FormMessageContainer.tsx.html +5 -5
- package/coverage/lcov-report/src/form/FormMessageCounter.tsx.html +1 -1
- package/coverage/lcov-report/src/form/InputToggle.tsx.html +110 -110
- package/coverage/lcov-report/src/form/InputToggleIcon.tsx.html +63 -63
- package/coverage/lcov-report/src/form/Label.tsx.html +98 -98
- package/coverage/lcov-report/src/form/Legend.tsx.html +1 -1
- package/coverage/lcov-report/src/form/MenuItemCheckbox.tsx.html +3 -3
- package/coverage/lcov-report/src/form/MenuItemFileInput.tsx.html +1 -1
- package/coverage/lcov-report/src/form/MenuItemInputToggle.tsx.html +178 -232
- package/coverage/lcov-report/src/form/MenuItemRadio.tsx.html +3 -3
- package/coverage/lcov-report/src/form/MenuItemSwitch.tsx.html +1 -1
- package/coverage/lcov-report/src/form/MenuItemTextField.tsx.html +1 -1
- package/coverage/lcov-report/src/form/NativeSelect.tsx.html +1 -1
- package/coverage/lcov-report/src/form/OptGroup.tsx.html +1 -1
- package/coverage/lcov-report/src/form/Option.tsx.html +1 -1
- package/coverage/lcov-report/src/form/Password.tsx.html +1 -1
- 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 +1 -1
- 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 +1 -1
- package/coverage/lcov-report/src/form/SliderTrack.tsx.html +1 -1
- package/coverage/lcov-report/src/form/SliderValueMarks.tsx.html +1 -1
- package/coverage/lcov-report/src/form/SliderValueTooltip.tsx.html +1 -1
- package/coverage/lcov-report/src/form/Switch.tsx.html +1 -1
- package/coverage/lcov-report/src/form/SwitchTrack.tsx.html +1 -1
- package/coverage/lcov-report/src/form/TextArea.tsx.html +646 -580
- 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 +3 -3
- package/coverage/lcov-report/src/form/TextFieldAddon.tsx.html +1 -1
- package/coverage/lcov-report/src/form/TextFieldContainer.tsx.html +1 -1
- package/coverage/lcov-report/src/form/TextFieldContainerStyles.ts.html +8 -8
- package/coverage/lcov-report/src/form/fileUtils.ts.html +1 -1
- package/coverage/lcov-report/src/form/formConfig.ts.html +1 -1
- package/coverage/lcov-report/src/form/formMessageStyles.ts.html +1 -1
- package/coverage/lcov-report/src/form/index.html +81 -21
- 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 +1 -1
- 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 +1 -1
- package/coverage/lcov-report/src/form/sliderUtils.ts.html +1 -1
- package/coverage/lcov-report/src/form/switchStyles.ts.html +1 -1
- package/coverage/lcov-report/src/form/textAreaStyles.ts.html +3 -3
- 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 +1 -1
- 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 +1 -1
- package/coverage/lcov-report/src/form/useInlineAutoComplete.ts.html +109 -0
- package/coverage/lcov-report/src/form/useListboxProvider.ts.html +1 -1
- package/coverage/lcov-report/src/form/useNumberField.ts.html +1 -1
- package/coverage/lcov-report/src/form/useRadioGroup.ts.html +47 -47
- package/coverage/lcov-report/src/form/useRangeSlider.ts.html +1 -1
- package/coverage/lcov-report/src/form/useResizingTextArea.ts.html +405 -294
- package/coverage/lcov-report/src/form/useSelectCombobox.ts.html +295 -0
- package/coverage/lcov-report/src/form/useSlider.ts.html +1 -1
- package/coverage/lcov-report/src/form/useTextField.ts.html +1 -1
- package/coverage/lcov-report/src/form/utils.ts.html +200 -170
- package/coverage/lcov-report/src/form/validation.ts.html +1 -1
- package/coverage/lcov-report/src/hoverMode/index.html +1 -1
- package/coverage/lcov-report/src/hoverMode/useHoverMode.ts.html +98 -98
- package/coverage/lcov-report/src/hoverMode/useHoverModeProvider.ts.html +19 -19
- package/coverage/lcov-report/src/icon/FontIcon.tsx.html +28 -28
- package/coverage/lcov-report/src/icon/IconRotator.tsx.html +5 -8
- package/coverage/lcov-report/src/icon/MaterialIcon.tsx.html +1 -1
- package/coverage/lcov-report/src/icon/MaterialSymbol.tsx.html +1 -1
- 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 +10 -10
- package/coverage/lcov-report/src/icon/index.html +10 -145
- package/coverage/lcov-report/src/icon/material.ts.html +1 -1
- package/coverage/lcov-report/src/icon/materialConfig.ts.html +1 -1
- package/coverage/lcov-report/src/icon/styles.ts.html +38 -38
- package/coverage/lcov-report/src/index.html +10 -10
- package/coverage/lcov-report/src/interaction/Ripple.tsx.html +1 -1
- package/coverage/lcov-report/src/interaction/RippleContainer.tsx.html +1 -1
- package/coverage/lcov-report/src/interaction/UserInteractionModeProvider.tsx.html +87 -87
- package/coverage/lcov-report/src/interaction/config.ts.html +7 -7
- package/coverage/lcov-report/src/interaction/index.html +1 -1
- package/coverage/lcov-report/src/interaction/useElementInteraction.tsx.html +123 -123
- package/coverage/lcov-report/src/interaction/useHigherContrastChildren.tsx.html +19 -19
- package/coverage/lcov-report/src/interaction/utils.ts.html +1 -1
- package/coverage/lcov-report/src/layout/LayoutAppBar.tsx.html +1 -1
- package/coverage/lcov-report/src/layout/LayoutNav.tsx.html +60 -60
- 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 +15 -15
- package/coverage/lcov-report/src/layout/layoutNavStyles.ts.html +5 -5
- 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 +1 -1
- package/coverage/lcov-report/src/link/Link.tsx.html +1 -1
- package/coverage/lcov-report/src/link/SkipToMainContent.tsx.html +1 -1
- package/coverage/lcov-report/src/link/index.html +1 -1
- package/coverage/lcov-report/src/link/styles.ts.html +1 -1
- package/coverage/lcov-report/src/list/List.tsx.html +1 -1
- package/coverage/lcov-report/src/list/ListItem.tsx.html +158 -137
- 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 +5 -5
- 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 +44 -47
- package/coverage/lcov-report/src/list/index.html +13 -13
- package/coverage/lcov-report/src/list/listItemStyles.ts.html +102 -72
- package/coverage/lcov-report/src/media-queries/AppSizeProvider.tsx.html +54 -54
- package/coverage/lcov-report/src/media-queries/appSize.ts.html +1 -1
- package/coverage/lcov-report/src/media-queries/index.html +1 -1
- package/coverage/lcov-report/src/media-queries/useMediaQuery.ts.html +28 -28
- package/coverage/lcov-report/src/menu/DropdownMenu.tsx.html +1 -1
- package/coverage/lcov-report/src/menu/Menu.tsx.html +4 -4
- package/coverage/lcov-report/src/menu/MenuBar.tsx.html +1 -1
- package/coverage/lcov-report/src/menu/MenuButton.tsx.html +1 -1
- 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 +1 -1
- 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 +1 -1
- package/coverage/lcov-report/src/menu/MenuSheet.tsx.html +1 -1
- 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 -238
- 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 +1 -1
- 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 +17 -62
- package/coverage/lcov-report/src/movement/useKeyboardMovementProvider.ts.html +3 -3
- package/coverage/lcov-report/src/movement/utils.ts.html +143 -119
- package/coverage/lcov-report/src/overlay/Overlay.tsx.html +1 -1
- package/coverage/lcov-report/src/overlay/index.html +1 -1
- package/coverage/lcov-report/src/overlay/overlayStyles.ts.html +1 -1
- package/coverage/lcov-report/src/portal/Portal.tsx.html +7 -7
- package/coverage/lcov-report/src/portal/PortalContainerProvider.tsx.html +59 -35
- package/coverage/lcov-report/src/portal/index.html +7 -7
- package/coverage/lcov-report/src/positioning/constants.ts.html +1 -1
- package/coverage/lcov-report/src/positioning/createHorizontalPosition.ts.html +47 -47
- package/coverage/lcov-report/src/positioning/createVerticalPosition.ts.html +55 -55
- package/coverage/lcov-report/src/positioning/getFixedPosition.ts.html +89 -89
- package/coverage/lcov-report/src/positioning/index.html +1 -1
- package/coverage/lcov-report/src/positioning/useFixedPositioning.ts.html +193 -193
- package/coverage/lcov-report/src/positioning/utils.ts.html +59 -59
- package/coverage/lcov-report/src/progress/CircularProgress.tsx.html +83 -83
- package/coverage/lcov-report/src/progress/LinearProgress.tsx.html +3 -3
- package/coverage/lcov-report/src/progress/getProgressA11y.ts.html +1 -1
- package/coverage/lcov-report/src/progress/index.html +20 -5
- 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 +1 -1
- 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 +1 -1
- package/coverage/lcov-report/src/scroll/index.html +1 -1
- package/coverage/lcov-report/src/scroll/useScrollLock.ts.html +1 -1
- package/coverage/lcov-report/src/segmented-button/SegmentedButton.tsx.html +1 -1
- package/coverage/lcov-report/src/segmented-button/SegmentedButtonContainer.tsx.html +1 -1
- package/coverage/lcov-report/src/segmented-button/index.html +1 -1
- package/coverage/lcov-report/src/segmented-button/segmentedButtonContainerStyles.ts.html +1 -1
- 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 +5 -5
- package/coverage/lcov-report/src/sheet/styles.ts.html +45 -48
- package/coverage/lcov-report/src/snackbar/DefaultToastRenderer.tsx.html +80 -80
- package/coverage/lcov-report/src/snackbar/Snackbar.tsx.html +21 -45
- package/coverage/lcov-report/src/snackbar/Toast.tsx.html +108 -93
- package/coverage/lcov-report/src/snackbar/ToastActionButton.tsx.html +1 -1
- package/coverage/lcov-report/src/snackbar/ToastCloseButton.tsx.html +1 -1
- package/coverage/lcov-report/src/snackbar/ToastContent.tsx.html +48 -48
- package/coverage/lcov-report/src/snackbar/ToastManager.tsx.html +278 -275
- package/coverage/lcov-report/src/snackbar/ToastManagerProvider.tsx.html +6 -6
- package/coverage/lcov-report/src/snackbar/index.html +19 -19
- package/coverage/lcov-report/src/snackbar/snackbarStyles.ts.html +15 -15
- package/coverage/lcov-report/src/snackbar/toastContentStyles.ts.html +14 -14
- 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 +142 -142
- package/coverage/lcov-report/src/suspense/NullSuspense.tsx.html +88 -88
- package/coverage/lcov-report/src/suspense/index.html +36 -21
- 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 +109 -298
- package/coverage/lcov-report/src/table/TableCellContent.tsx.html +81 -27
- package/coverage/lcov-report/src/table/TableCheckbox.tsx.html +16 -10
- package/coverage/lcov-report/src/table/TableConfigurationProvider.tsx.html +20 -20
- 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 +151 -46
- 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 +1 -1
- package/coverage/lcov-report/src/tabs/TabListScrollButton.tsx.html +1 -1
- package/coverage/lcov-report/src/tabs/index.html +25 -25
- package/coverage/lcov-report/src/tabs/tabIndicatorStyles.ts.html +37 -7
- package/coverage/lcov-report/src/tabs/tabListScrollButtonStyles.ts.html +1 -1
- package/coverage/lcov-report/src/tabs/tabListStyles.ts.html +2 -2
- package/coverage/lcov-report/src/tabs/tabStyles.ts.html +64 -28
- package/coverage/lcov-report/src/tabs/useTabList.ts.html +44 -38
- package/coverage/lcov-report/src/tabs/useTabs.ts.html +1 -1
- 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 +18 -6
- package/coverage/lcov-report/src/test-utils/drag.ts.html +1 -1
- package/coverage/lcov-report/src/test-utils/index.html +12 -117
- package/coverage/lcov-report/src/test-utils/jest-setup.ts.html +9 -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 +1 -1
- 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 +1 -1
- 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 +1 -1
- package/coverage/lcov-report/src/tooltip/Tooltip.tsx.html +62 -62
- package/coverage/lcov-report/src/tooltip/TooltipHoverModeProvider.tsx.html +3 -3
- package/coverage/lcov-report/src/tooltip/constants.ts.html +1 -1
- package/coverage/lcov-report/src/tooltip/index.html +9 -9
- package/coverage/lcov-report/src/tooltip/tooltipStyles.ts.html +12 -12
- package/coverage/lcov-report/src/tooltip/useTooltip.ts.html +243 -222
- package/coverage/lcov-report/src/tooltip/useTooltipPosition.ts.html +27 -27
- package/coverage/lcov-report/src/tooltip/utils.ts.html +22 -22
- 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 +1 -1
- package/coverage/lcov-report/src/transition/SlideContainer.tsx.html +1 -1
- package/coverage/lcov-report/src/transition/collapseStyles.ts.html +1 -1
- package/coverage/lcov-report/src/transition/config.ts.html +5 -5
- package/coverage/lcov-report/src/transition/index.html +49 -34
- 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 +68 -68
- package/coverage/lcov-report/src/transition/useCarousel.ts.html +1 -1
- package/coverage/lcov-report/src/transition/useCollapseTransition.ts.html +10 -64
- 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 +1 -1
- package/coverage/lcov-report/src/transition/useTransition.ts.html +232 -232
- package/coverage/lcov-report/src/transition/utils.ts.html +45 -45
- package/coverage/lcov-report/src/tree/DefaultTreeItemRenderer.tsx.html +18 -6
- package/coverage/lcov-report/src/tree/Tree.tsx.html +20 -8
- package/coverage/lcov-report/src/tree/TreeGroup.tsx.html +1 -1
- package/coverage/lcov-report/src/tree/TreeItem.tsx.html +7 -10
- package/coverage/lcov-report/src/tree/TreeItemExpander.tsx.html +1 -1
- package/coverage/lcov-report/src/tree/TreeProvider.tsx.html +1 -1
- package/coverage/lcov-report/src/tree/index.html +16 -196
- 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 +1 -1
- 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 +12 -12
- 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 +1 -1
- package/coverage/lcov-report/src/typography/index.html +1 -1
- package/coverage/lcov-report/src/useAsyncAction.ts.html +1 -1
- 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 +14 -14
- package/coverage/lcov-report/src/useEnsuredState.ts.html +16 -16
- package/coverage/lcov-report/src/useHtmlClassName.ts.html +1 -1
- package/coverage/lcov-report/src/useIntersectionObserver.ts.html +1 -1
- package/coverage/lcov-report/src/useIsomorphicLayoutEffect.ts.html +1 -1
- package/coverage/lcov-report/src/useLocalStorage.ts.html +1 -1
- package/coverage/lcov-report/src/useOrientation.ts.html +30 -30
- 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 +1 -1
- package/coverage/lcov-report/src/useUnmounted.ts.html +1 -1
- 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 +9 -9
- 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 +13 -253
- package/coverage/lcov-report/src/utils/isElementVisible.ts.html +1 -1
- 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 +18 -18
- 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/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/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/tabs/Tab.tsx.html +233 -143
- package/coverage/lcov-report/tabs/TabList.tsx.html +85 -85
- package/coverage/lcov-report/tabs/index.html +56 -11
- 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 +1 -1
- package/coverage/lcov-report/tabs/utils.ts.html +1 -1
- package/coverage/lcov-report/test-utils/index.html +21 -21
- package/coverage/lcov-report/test-utils/use.ts.html +187 -0
- package/coverage/lcov-report/tooltip/Tooltip.tsx.html +62 -62
- package/coverage/lcov-report/tooltip/index.html +10 -70
- package/coverage/lcov-report/tooltip/useTooltip.ts.html +243 -222
- package/coverage/lcov-report/transition/SkeletonPlaceholder.tsx.html +595 -0
- package/coverage/lcov-report/transition/config.ts.html +5 -5
- package/coverage/lcov-report/transition/index.html +1 -1
- 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/tree/TreeItem.tsx.html +7 -10
- package/coverage/lcov-report/tree/index.html +17 -47
- 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 +75 -75
- 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/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 +15 -30
- package/coverage/lcov-report/utils/isElementVisible.ts.html +14 -14
- 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/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 +207 -253
- 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 +15 -1
- package/dist/avatar/Avatar.js +5 -2
- package/dist/avatar/Avatar.js.map +1 -1
- package/dist/avatar/_avatar.scss +74 -81
- package/dist/badge/_badge.scss +97 -59
- package/dist/box/_box.scss +72 -81
- 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 +137 -148
- 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/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 +26 -37
- package/dist/form/MenuItemInputToggle.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/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 +1336 -1260
- 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/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/icon/IconRotator.js +2 -3
- package/dist/icon/IconRotator.js.map +1 -1
- package/dist/icon/_icon.scss +105 -112
- package/dist/index.d.ts +22 -1
- package/dist/index.js +22 -1
- 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.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.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/Menu.d.ts +1 -1
- package/dist/menu/Menu.js +12 -1
- 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/_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/_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 +86 -92
- 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/table/TableCheckbox.d.ts +3 -2
- package/dist/table/TableCheckbox.js +4 -2
- package/dist/table/TableCheckbox.js.map +1 -1
- package/dist/table/TableRadio.d.ts +3 -2
- package/dist/table/TableRadio.js +4 -2
- package/dist/table/TableRadio.js.map +1 -1
- package/dist/table/_table.scss +214 -227
- package/dist/table/tableCellStyles.d.ts +1 -1
- package/dist/table/tableCellStyles.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 +62 -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 +1 -0
- package/dist/test-utils/data-testid.js.map +1 -1
- 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/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/_theme.scss +243 -133
- package/dist/tooltip/_tooltip.scss +76 -83
- package/dist/tooltip/useTooltip.d.ts +14 -14
- 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/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/utils.js +7 -2
- package/dist/transition/utils.js.map +1 -1
- package/dist/tree/DefaultTreeItemRenderer.d.ts +2 -2
- package/dist/tree/DefaultTreeItemRenderer.js.map +1 -1
- package/dist/tree/Tree.d.ts +8 -4
- package/dist/tree/Tree.js.map +1 -1
- package/dist/tree/TreeItem.js +3 -4
- package/dist/tree/TreeItem.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 +35 -40
- package/scripts/{copySassFiles.js → copySassFiles.ts} +5 -5
- package/scripts/tsconfig.json +18 -0
- package/src/RootHtml.tsx +95 -0
- package/src/__tests__/RootHtml.node.tsx +46 -0
- package/src/__tests__/__snapshots__/RootHtml.node.tsx.snap +19 -0
- package/src/__tests__/useDebouncedFunction.tsx +65 -24
- package/src/__tests__/useElementSize.tsx +181 -0
- package/src/__tests__/useThrottledFunction.tsx +54 -0
- 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 +207 -253
- package/src/_utils.scss +89 -0
- package/src/app-bar/AppBar.tsx +59 -19
- 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 +25 -4
- package/src/avatar/__tests__/Avatar.tsx +1 -1
- package/src/avatar/__tests__/__snapshots__/Avatar.tsx.snap +6 -6
- package/src/avatar/_avatar.scss +74 -81
- package/src/badge/_badge.scss +97 -59
- package/src/box/_box.scss +72 -81
- package/src/button/TooltippedButton.tsx +120 -0
- package/src/button/__tests__/TooltippedButton.tsx +60 -0
- 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__/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/_chip.scss +137 -148
- package/src/dialog/FixedDialog.tsx +5 -4
- package/src/dialog/_dialog.scss +179 -162
- package/src/divider/Divider.tsx +0 -1
- package/src/divider/_divider.scss +61 -70
- 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 +2 -2
- package/src/expansion-panel/_expansion-panel.scss +76 -50
- package/src/expansion-panel/useExpansionPanels.ts +20 -16
- package/src/form/Form.tsx +2 -1
- package/src/form/Label.tsx +5 -5
- package/src/form/MenuItemInputToggle.tsx +46 -64
- 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/TextArea.tsx +40 -32
- package/src/form/TextField.tsx +19 -19
- package/src/form/TextFieldContainerStyles.ts +7 -7
- package/src/form/__tests__/MenuItemCheckbox.tsx +53 -0
- package/src/form/__tests__/MenuItemRadio.tsx +53 -0
- package/src/form/__tests__/Select.tsx +439 -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__/TextArea.tsx.snap +548 -0
- package/src/form/__tests__/__snapshots__/TextField.tsx.snap +279 -0
- package/src/form/__tests__/useFormReset.tsx +195 -0
- package/src/form/_form.scss +1336 -1260
- package/src/form/menuItemInputToggleStyles.ts +78 -0
- package/src/form/selectUtils.ts +3 -14
- 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/icon/IconRotator.tsx +1 -2
- package/src/icon/_icon.scss +105 -112
- package/src/index.ts +22 -1
- 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/_layout.scss +82 -86
- package/src/layout/useLayoutAppBarHeight.ts +5 -9
- 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 +4 -4
- package/src/list/__tests__/ListItem.tsx +1 -1
- 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/Menu.tsx +10 -2
- package/src/menu/MenuItemCircularProgress.tsx +116 -0
- package/src/menu/__tests__/MenuItemCircularProgress.tsx +39 -0
- 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/_overlay.scss +39 -42
- package/src/portal/PortalContainerProvider.tsx +10 -2
- package/src/portal/__tests__/PortalContainerProvider.tsx +23 -0
- package/src/positioning/__tests__/__snapshots__/useFixedPositioning.tsx.snap +0 -32
- package/src/positioning/__tests__/useFixedPositioning.tsx +0 -14
- package/src/positioning/useFixedPositioning.ts +0 -6
- 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 +86 -92
- 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 +12 -11
- package/src/snackbar/__tests__/ToastManagerProvider.tsx +20 -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/__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/TableCheckbox.tsx +4 -2
- package/src/table/TableRadio.tsx +4 -2
- package/src/table/_table.scss +214 -227
- package/src/table/tableCellStyles.ts +1 -1
- package/src/tabs/Tab.tsx +110 -70
- package/src/tabs/__tests__/Tab.tsx +25 -2
- package/src/tabs/__tests__/TabList.tsx +4 -4
- package/src/tabs/__tests__/__snapshots__/TabList.tsx.snap +2 -2
- package/src/tabs/_tabs.scss +62 -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 +5 -1
- 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/_theme.scss +243 -133
- package/src/tooltip/_tooltip.scss +76 -83
- package/src/tooltip/useTooltip.ts +23 -16
- package/src/transition/SkeletonPlaceholder.tsx +18 -6
- package/src/transition/__tests__/SkeletonPlaceholder.tsx +72 -0
- package/src/transition/__tests__/__snapshots__/SkeletonPlaceholder.tsx.snap +24 -0
- package/src/transition/__tests__/utils.ts +25 -0
- package/src/transition/_transition.scss +89 -78
- package/src/transition/skeletonPlaceholderUtils.ts +105 -0
- package/src/transition/useCollapseTransition.ts +6 -24
- package/src/transition/useSkeletonPlaceholder.ts +62 -47
- package/src/transition/utils.ts +10 -5
- package/src/tree/DefaultTreeItemRenderer.tsx +6 -2
- package/src/tree/Tree.tsx +8 -4
- package/src/tree/TreeItem.tsx +3 -4
- package/src/tree/__tests__/Tree.tsx +1 -1
- 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__/__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/useVerticalDividerHeight.d.ts +0 -37
- 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.d.ts +0 -145
- 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/menu/menuConfig.d.ts +0 -60
- package/dist/tooltip/useOverflowTooltip.d.ts +0 -61
- 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/form/SelectValue.tsx +0 -39
- package/src/utils/__tests__/filters.ts +0 -279
- package/src/utils/filters.ts +0 -320
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/snackbar/ToastManager.tsx"],"sourcesContent":["import { nanoid } from \"nanoid\";\nimport { type ConfigurableToastProps } from \"./Toast.js\";\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport const DEFAULT_TOAST_VISIBLE_TIME = 5000;\n\n/**\n * - `\"normal\"` - the toast will be added to the end of the queue\n * - `\"next\"` - the toast will be inserted next-in-line in the queue, waiting\n * for the current visible toast to exit before being shown. If the toast does\n * not support duplicates, the existing toast will be moved instead and merged\n * with the toast.\n * - `\"replace\"` - if there is a currently visible toast, it will start the\n * leave transition and display the newly added toast instead.\n * - `\"immediate\"` - the same behavior as `\"replace\"` except that if there was a\n * currently visible toast, it will be shown once the newly added toast again.\n *\n * @remarks \\@since 6.0.0 Renamed from `MessagePriority` to `ToastPriority`\n */\nexport type ToastPriority = \"normal\" | \"next\" | \"replace\" | \"immediate\";\n\n/**\n * - `\"allow\"` - toasts with the same `toastId` can be added into the queue, but\n * the leave timeout behavior might not work if multiple toasts can be shown\n * at the same time.\n * - `\"restart\"` - (default) toasts that have the same `toastId` as a toast\n * being shown will restart the exit timeout and update the toast with any\n * differences in the toast. If the toast is not currently being shown, a new\n * toast will not be added.\n * - `\"update\"` - toasts that have the same `toastId` will just update the toast\n * with the latest content while maintaining any existing timeouts\n *\n * @remarks \\@since 6.0.0 Renamed from `DuplicateBehavior`\n */\nexport type ToastDuplicateBehavior = \"allow\" | \"restart\" | \"update\";\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface ToastMeta {\n /**\n * This will be `true` if the exit timeout has been paused either by hovering\n * the toast or the page has become inactive through blur or minimizing.\n */\n paused: boolean;\n\n /**\n * This will be `true` when the toast should be visible and `false` during the\n * exit animation.\n */\n visible: boolean;\n\n /**\n * The current toast's id which can be used with the:\n * - {@link ToastManager.removeToast}\n * - {@link ToastManager.startRemoveTimeout}\n * - {@link ToastManager.pauseRemoveTimeout}\n * - {@link ToastManager.resumeRemoveTimeout}\n */\n toastId: string;\n priority: ToastPriority;\n duplicates: ToastDuplicateBehavior;\n visibleTime: number | null;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface CreateToastOptions extends ConfigurableToastProps {\n /**\n * @defaultValue `nanoid()`\n */\n toastId?: string;\n\n /**\n * @see {@link ToastDuplicateBehavior}\n * @defaultValue `\"restart\"`\n */\n duplicates?: ToastDuplicateBehavior;\n\n /**\n * @see {@link ToastPriority}\n * @defaultValue `\"normal\"`\n */\n priority?: ToastPriority;\n\n /**\n * Set this to `null` to prevent the toast from automatically hiding,\n * otherwise set this to the number of milliseconds to remain visible.\n *\n * @see {@link DEFAULT_TOAST_VISIBLE_TIME}\n * @defaultValue `DEFAULT_TOAST_VISIBLE_TIME`\n */\n visibleTime?: number | null;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface QueuedToast extends ConfigurableToastProps, ToastMeta {}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport type ToastQueue = readonly Readonly<QueuedToast>[];\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport type ToastCallback = (queue: ToastQueue) => void;\n\n/**\n * @internal\n * @remarks \\@since 6.0.0\n */\nexport interface ToastVisibilityTimers {\n inactive: boolean;\n startTime: number;\n elapsedTime: number;\n exitTimeout?: number;\n}\n\n/**\n * @see {@link ToastManagerProvider}\n *\n * @remarks \\@since 6.0.0\n */\nexport class ToastManager {\n #queue: QueuedToast[];\n #timers: Map<string, ToastVisibilityTimers>;\n #listeners: ToastCallback[];\n\n constructor() {\n this.#queue = [];\n this.#timers = new Map();\n this.#listeners = [];\n\n // All of the class methods must be arrow functions to preserve the correct\n // `this` value. If they aren't arrow functions, I'd have to wrap each call\n // in an arrow function to work.\n //\n // i.e.\n // useSyncExternalStore(\n // (cb) => manager.subscribe(cb),\n // () => manager.getQueue(),\n // () => manager.getQueue(),\n // );\n }\n\n #emit = (): void => {\n // shallow clone to ensure react updates\n this.#queue = [...this.#queue];\n this.#listeners.forEach((callback) => {\n callback(this.#queue);\n });\n };\n\n #getToastIndex = (toastId: string | undefined): number => {\n if (!toastId) {\n return -1;\n }\n\n return this.#queue.findIndex((toast) => toast.toastId === toastId);\n };\n\n #getToast = (toastId: string | undefined): QueuedToast | undefined => {\n return this.#queue[this.#getToastIndex(toastId)];\n };\n\n /**\n * Starts the exit transition for the currently shown toast and adds the next\n * toast into the queue. This requires a manual call to `this.#emit()`\n * afterwards.\n */\n #addToastImmediately = (nextToast: QueuedToast): void => {\n const [current] = this.#queue;\n this.clearTimer(current.toastId);\n this.#queue[0] = {\n ...current,\n visible: false,\n };\n if (nextToast.priority === \"immediate\") {\n this.#queue.splice(1, 0, nextToast, current);\n } else {\n this.#queue.splice(1, 0, nextToast);\n }\n };\n\n /**\n * This calls `this.#emit()` if the toast was updated\n */\n #updateToast = (\n toastIdOrIndex: string | number,\n patch: Partial<QueuedToast>\n ): void => {\n const index =\n typeof toastIdOrIndex === \"number\"\n ? toastIdOrIndex\n : this.#getToastIndex(toastIdOrIndex);\n\n if (index === -1) {\n return;\n }\n\n this.#queue[index] = {\n ...this.#queue[index],\n ...patch,\n };\n this.#emit();\n };\n\n /**\n * This is just used to subscribe to changes in the {@link useToastQueue}.\n *\n * ```tsx\n * useSyncExternalStore(\n * toastManager.subscribe,\n * toastManager.getQueue,\n * toastManager.getQueue,\n * );\n * ```\n *\n * @internal\n */\n subscribe = (callback: ToastCallback): (() => void) => {\n this.#listeners.push(callback);\n\n return () => {\n this.#listeners = this.#listeners.filter((cb) => cb !== callback);\n };\n };\n\n /**\n * @see {@link subscribe}\n * @internal\n */\n getQueue = (): ToastQueue => {\n return this.#queue;\n };\n\n /**\n * Either adds the toast to the queue or updates an existing toast when using\n * an existing `toastId`.\n *\n * @example\n * Adding toasts\n * ```tsx\n * // create a toast when the user is offline that will not disappear\n * addToast({ toastId: \"offline\", visibleTime: null });\n *\n * // add a new toast that displays `\"Toast\"` to the queue\n * addToast({ children: \"Toast!\" });\n *\n * // add an online toast notification. since these three use the same toast\n * // id, the hide timer will be reset each time\n * addToast({ toastId: \"online\" });\n * addToast({ toastId: \"online\" });\n * addToast({ toastId: \"online\" });\n *\n * // add a server error toast to the queue where the second one will be\n * // ignored\n * addToast({\n * toastId: \"ServerError\",\n * theme: \"error\",\n * duplicates: \"prevent\",\n * });\n * addToast({\n * toastId: \"ServerError\",\n * theme: \"error\",\n * duplicates: \"prevent\",\n * });\n *\n * // add a toast to the queue that has an action button that says \"Goodbye\"\n * addToast({\n * children: \"Hello, world!\",\n * action: \"Goodbye\",\n * });\n *\n * // add a toast to the queue that has an action button that says \"Goodbye\"\n * // and a custom click handler\n * addToast({\n * children: \"Hello, world!\",\n * action: {\n * onClick: () => {\n * logout();\n * },\n * children: \"Goodbye\",\n * },\n * });\n *\n * // add a toast to the queue that renders a react component in the content,\n * // a custom action button implementation (using `ToastActionButton`), and a\n * // close button\n * addToast({\n * children: <SomeCustomComponent />,\n * actionButton: <SomeCustomActionButton />,\n * closeButton: true,\n * });\n * ```\n */\n addToast = (toast: CreateToastOptions): void => {\n const {\n toastId = nanoid(),\n visibleTime = DEFAULT_TOAST_VISIBLE_TIME,\n role = visibleTime === null ? \"alert\" : undefined,\n priority = \"normal\",\n duplicates = \"restart\",\n } = toast;\n\n const existingIndex = this.#getToastIndex(toast.toastId);\n if (existingIndex !== -1 && duplicates !== \"allow\") {\n const existingToast = this.#queue[existingIndex];\n\n // reorder/move the existing toast to be the next item in the queue by:\n // - removing the toast from the queue\n // - inserting it into the next position with the updates\n if (priority === \"next\" && existingIndex > 1) {\n this.#queue.splice(existingIndex, 1);\n this.#queue.splice(1, 0, { ...existingToast, ...toast });\n this.#emit();\n return;\n }\n\n // only need to reorder the queue if it is not being shown\n if (\n (priority === \"replace\" || priority === \"immediate\") &&\n existingIndex !== 0\n ) {\n this.#queue.splice(existingIndex, 1);\n this.#addToastImmediately({\n ...existingToast,\n ...toast,\n });\n this.#emit();\n return;\n }\n\n const timers = this.#timers.get(toastId);\n if (existingToast.visible && duplicates === \"restart\" && timers) {\n this.#timers.set(toastId, { ...timers, elapsedTime: 0 });\n this.startRemoveTimeout(toastId);\n }\n\n this.#updateToast(existingIndex, toast);\n return;\n }\n\n const nextToast: QueuedToast = {\n ...toast,\n role,\n paused: false,\n visible: true,\n toastId,\n priority,\n duplicates,\n visibleTime,\n };\n\n const queueSize = this.#queue.length;\n if (priority === \"next\" && queueSize > 1) {\n this.#queue.splice(1, 0, nextToast);\n } else if (\n (priority === \"replace\" || priority === \"immediate\") &&\n queueSize > 0\n ) {\n this.#addToastImmediately(nextToast);\n } else {\n this.#queue.push(nextToast);\n }\n\n this.#emit();\n };\n\n /**\n * Attempts to start the timeout for removing the toast when the `visibleTime`\n * is not null for a toast.\n *\n * @param toastId - The specific toastId to update\n */\n startRemoveTimeout = (toastId: string): void => {\n const toast = this.#getToast(toastId);\n if (!toast) {\n return;\n }\n\n const { visibleTime } = toast;\n if (visibleTime === null) {\n // Must manually be closed\n return;\n }\n\n const cached = this.#timers.get(toastId);\n const timers = (cached && { ...cached }) || {\n inactive: false,\n startTime: Date.now(),\n elapsedTime: 0,\n };\n window.clearTimeout(timers.exitTimeout);\n\n let duration = visibleTime;\n if (timers.elapsedTime) {\n duration -= timers.elapsedTime;\n }\n\n timers.inactive = false;\n timers.exitTimeout = window.setTimeout(() => {\n this.removeToast(toastId, true);\n }, duration);\n this.#timers.set(toastId, timers);\n };\n\n /**\n * Pauses the remove timeout for a specific toast normally with hover events\n * or the browser becoming inactive.\n *\n * @param toastId - The specific toastId to pause\n */\n pauseRemoveTimeout = (toastId: string): void => {\n const toast = this.#getToast(toastId);\n const cached = this.#timers.get(toastId);\n if (!toast || !cached || cached.inactive) {\n return;\n }\n\n window.clearTimeout(cached.exitTimeout);\n const timers = { ...cached };\n timers.inactive = true;\n timers.elapsedTime = Date.now() - timers.startTime + timers.elapsedTime;\n this.#timers.set(toastId, timers);\n this.#updateToast(toastId, { paused: true });\n };\n\n /**\n * Resumes the current remove timeout if it was paused by\n * {@link pauseRemoveTimeout}.\n *\n * @param toastId - The specific toastId to resume\n */\n resumeRemoveTimeout = (toastId: string): void => {\n const toastIndex = this.#getToastIndex(toastId);\n const timers = this.#timers.get(toastId);\n if (toastIndex === -1 || !timers?.startTime) {\n return;\n }\n\n this.#updateToast(toastIndex, { paused: false });\n this.startRemoveTimeout(toastId);\n };\n\n /**\n * Removes a toast by id from the queue without any exit animation.\n *\n * @param toastId - The specific {@link QueuedToast.toastId}\n * @param transition - Set this to `true` to remove the toast by the exit\n * transition instead of immediately.\n */\n removeToast = (toastId: string, transition: boolean): void => {\n const toastIndex = this.#getToastIndex(toastId);\n if (toastIndex === -1) {\n return;\n }\n\n if (transition) {\n this.clearTimer(toastId);\n this.#updateToast(toastIndex, { visible: false });\n return;\n }\n\n this.#queue.splice(toastIndex, 1);\n this.#emit();\n };\n\n /**\n * Clears any pending timers for the provided toast id. This should generally\n * be used in the `useEffect` cleanup effect for any custom toast renderer\n * implementations.\n *\n * @example\n * ```tsx\n * const { toastId } = toast;\n * const toastManager = useToastManager();\n *\n * useEffect(() => {\n * return () => {\n * toastManager.clearTimer(toastId):\n * }\n * }, [toastManager, toastId]);\n * ```\n */\n clearTimer = (toastId: string): void => {\n const timer = this.#timers.get(toastId);\n window.clearTimeout(timer?.exitTimeout);\n this.#timers.delete(toastId);\n };\n\n /**\n * Removes first toast from the queue without any exit animation. You most\n * likely want to use {@link removeToast} instead.\n */\n popToast = (): void => {\n this.#queue.pop();\n this.#emit();\n };\n\n /**\n * Removes all toasts from the queue. There will be no exit animation.\n *\n * @param disableEmit - Set this to `true` to disable emitting the empty queue.\n * Mostly used for tests.\n */\n clearToasts = (disableEmit = false): void => {\n this.#queue = [];\n this.#timers.forEach((meta) => {\n window.clearTimeout(meta.exitTimeout);\n });\n this.#timers.clear();\n if (!disableEmit) {\n this.#emit();\n }\n };\n}\n\n/**\n * The default toast manager for react-md apps that will allow toasts to be\n * added without setting up the {@link ToastManagerProvider}.\n *\n * @internal\n * @remarks \\@since 6.0.0\n */\nexport const toastManager = new ToastManager();\n\n/**\n * @see {@link ToastManager.addToast}\n * @remarks \\@since 6.0.0\n */\nexport const addToast: ToastManager[\"addToast\"] = (toast) =>\n toastManager.addToast(toast);\n\n/**\n * @see {@link ToastManager.startRemoveTimeout}\n * @remarks \\@since 6.0.0\n */\nexport const startRemoveToastTimeout: ToastManager[\"startRemoveTimeout\"] = (\n toastId\n) => toastManager.startRemoveTimeout(toastId);\n\n/**\n * @see {@link ToastManager.popToast}\n * @remarks \\@since 6.0.0\n */\nexport const popToast: ToastManager[\"popToast\"] = () => toastManager.popToast();\n\n/**\n * @see {@link ToastManager.removeToast}\n * @remarks \\@since 6.0.0\n */\nexport const removeToast: ToastManager[\"removeToast\"] = (toastId, transition) =>\n toastManager.removeToast(toastId, transition);\n\n/**\n * @see {@link ToastManager.clearToasts}\n * @remarks \\@since 6.0.0\n */\nexport const clearToasts = (): void => toastManager.clearToasts();\n"],"names":["nanoid","DEFAULT_TOAST_VISIBLE_TIME","ToastManager","constructor","queue","listeners","forEach","callback","toastId","findIndex","toast","getToastIndex","nextToast","current","clearTimer","visible","priority","splice","toastIdOrIndex","patch","index","emit","subscribe","push","filter","cb","getQueue","addToast","visibleTime","role","undefined","duplicates","existingIndex","existingToast","addToastImmediately","timers","get","set","elapsedTime","startRemoveTimeout","updateToast","paused","queueSize","length","getToast","cached","inactive","startTime","Date","now","window","clearTimeout","exitTimeout","duration","setTimeout","removeToast","pauseRemoveTimeout","resumeRemoveTimeout","toastIndex","transition","timer","delete","popToast","pop","clearToasts","disableEmit","meta","clear","Map","toastManager","startRemoveToastTimeout"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAASA,MAAM,QAAQ,SAAS;AAGhC;;CAEC,GACD,OAAO,MAAMC,6BAA6B,KAAK;IA4H7C,sCACA,uCACA,0CAmBA,qCAQA,8CAQA,yCAIA;;;;GAIC,GACD,oDAcA;;GAEC,GACD;AArEF;;;;CAIC,GACD,OAAO,MAAMC;IAKXC,aAAc;QAJd,gCAAA;;mBAAA,KAAA;;QACA,gCAAA;;mBAAA,KAAA;;QACA,gCAAA;;mBAAA,KAAA;;QAmBA,gCAAA;;mBAAQ;gBACN,wCAAwC;+CAClCC,QAAQ;gDAAI,IAAI,EAAEA;iBAAM;gBAC9B,yBAAA,IAAI,EAAEC,Y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EAAE;IACF,OAAO;IACP,wBAAwB;IACxB,mCAAmC;IACnC,8BAA8B;IAC9B,8BAA8B;IAC9B,KAAK;IACP;AAqXF;AAEA;;;;;;CAMC,GACD,OAAO,MAAMgE,eAAe,IAAInE,eAAe;AAE/C;;;CAGC,GACD,OAAO,MAAMyB,WAAqC,CAACjB,QACjD2D,aAAa1C,QAAQ,CAACjB,OAAO;AAE/B;;;CAGC,GACD,OAAO,MAAM4D,0BAA8D,CACzE9D,UACG6D,aAAa9B,kBAAkB,CAAC/B,SAAS;AAE9C;;;CAGC,GACD,OAAO,MAAMsD,WAAqC,IAAMO,aAAaP,QAAQ,GAAG;AAEhF;;;CAGC,GACD,OAAO,MAAMP,cAA2C,CAAC/C,SAASmD,aAChEU,aAAad,WAAW,CAAC/C,SAASmD,YAAY;AAEhD;;;CAGC,GACD,OAAO,MAAMK,cAAc,IAAYK,aAAaL,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"sources":["../../src/snackbar/ToastManager.tsx"],"sourcesContent":["import { nanoid } from \"nanoid\";\nimport { type ConfigurableToastProps } from \"./Toast.js\";\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport const DEFAULT_TOAST_VISIBLE_TIME = 5000;\n\n/**\n * - `\"normal\"` - the toast will be added to the end of the queue\n * - `\"next\"` - the toast will be inserted next-in-line in the queue, waiting\n * for the current visible toast to exit before being shown. If the toast does\n * not support duplicates, the existing toast will be moved instead and merged\n * with the toast.\n * - `\"replace\"` - if there is a currently visible toast, it will start the\n * leave transition and display the newly added toast instead.\n * - `\"immediate\"` - the same behavior as `\"replace\"` except that if there was a\n * currently visible toast, the toast will be shown again once the `\"immediate\"`\n * toast is hidden.\n *\n * @remarks \\@since 6.0.0 Renamed from `MessagePriority` to `ToastPriority`\n */\nexport type ToastPriority = \"normal\" | \"next\" | \"replace\" | \"immediate\";\n\n/**\n * - `\"allow\"` - toasts with the same `toastId` can be added into the queue, but\n * the leave timeout behavior might not work if multiple toasts can be shown\n * at the same time.\n * - `\"restart\"` - (default) toasts that have the same `toastId` as a toast\n * being shown will restart the exit timeout and update the toast with any\n * differences in the toast. If the toast is not currently being shown, a new\n * toast will not be added.\n * - `\"update\"` - toasts that have the same `toastId` will just update the toast\n * with the latest content while maintaining any existing timeouts\n *\n * @remarks \\@since 6.0.0 Renamed from `DuplicateBehavior`\n */\nexport type ToastDuplicateBehavior = \"allow\" | \"restart\" | \"update\";\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface ToastMeta {\n /**\n * This will be `true` if the exit timeout has been paused either by hovering\n * the toast or the page has become inactive through blur or minimizing.\n */\n paused: boolean;\n\n /**\n * This will be `true` when the toast should be visible and `false` during the\n * exit animation.\n */\n visible: boolean;\n\n /**\n * The current toast's id which can be used with the:\n * - {@link ToastManager.removeToast}\n * - {@link ToastManager.startRemoveTimeout}\n * - {@link ToastManager.pauseRemoveTimeout}\n * - {@link ToastManager.resumeRemoveTimeout}\n */\n toastId: string;\n priority: ToastPriority;\n duplicates: ToastDuplicateBehavior;\n visibleTime: number | null;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface CreateToastOptions extends ConfigurableToastProps {\n /**\n * @defaultValue `nanoid()`\n */\n toastId?: string;\n\n /**\n * @see {@link ToastDuplicateBehavior}\n * @defaultValue `\"restart\"`\n */\n duplicates?: ToastDuplicateBehavior;\n\n /**\n * @see {@link ToastPriority}\n * @defaultValue `\"normal\"`\n */\n priority?: ToastPriority;\n\n /**\n * Set this to `null` to prevent the toast from automatically hiding,\n * otherwise set this to the number of milliseconds to remain visible.\n *\n * @see {@link DEFAULT_TOAST_VISIBLE_TIME}\n * @defaultValue `DEFAULT_TOAST_VISIBLE_TIME`\n */\n visibleTime?: number | null;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface QueuedToast extends ConfigurableToastProps, ToastMeta {}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport type ToastQueue = readonly Readonly<QueuedToast>[];\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport type ToastCallback = (queue: ToastQueue) => void;\n\n/**\n * @internal\n * @remarks \\@since 6.0.0\n */\nexport interface ToastVisibilityTimers {\n inactive: boolean;\n startTime: number;\n elapsedTime: number;\n exitTimeout?: number;\n}\n\n/**\n * @see {@link ToastManagerProvider}\n *\n * @remarks \\@since 6.0.0\n */\nexport class ToastManager {\n #queue: QueuedToast[];\n #timers: Map<string, ToastVisibilityTimers>;\n #listeners: ToastCallback[];\n\n constructor() {\n this.#queue = [];\n this.#timers = new Map();\n this.#listeners = [];\n\n // All of the class methods must be arrow functions to preserve the correct\n // `this` value. If they aren't arrow functions, I'd have to wrap each call\n // in an arrow function to work.\n //\n // i.e.\n // useSyncExternalStore(\n // (cb) => manager.subscribe(cb),\n // () => manager.getQueue(),\n // () => manager.getQueue(),\n // );\n }\n\n #emit = (): void => {\n // shallow clone to ensure react updates\n this.#queue = [...this.#queue];\n this.#listeners.forEach((callback) => {\n callback(this.#queue);\n });\n };\n\n #getToastIndex = (toastId: string | undefined): number => {\n if (!toastId) {\n return -1;\n }\n\n return this.#queue.findIndex((toast) => toast.toastId === toastId);\n };\n\n #getToast = (toastId: string | undefined): QueuedToast | undefined => {\n return this.#queue[this.#getToastIndex(toastId)];\n };\n\n /**\n * Starts the exit transition for the currently shown toast and adds the next\n * toast into the queue. This requires a manual call to `this.#emit()`\n * afterwards.\n */\n #addToastImmediately = (nextToast: QueuedToast): void => {\n const [current] = this.#queue;\n this.clearTimer(current.toastId);\n this.#queue[0] = {\n ...current,\n visible: false,\n };\n if (nextToast.priority === \"immediate\") {\n this.#queue.splice(1, 0, nextToast, current);\n } else {\n this.#queue.splice(1, 0, nextToast);\n }\n };\n\n /**\n * This calls `this.#emit()` if the toast was updated\n */\n #updateToast = (\n toastIdOrIndex: string | number,\n patch: Partial<QueuedToast>\n ): void => {\n const index =\n typeof toastIdOrIndex === \"number\"\n ? toastIdOrIndex\n : this.#getToastIndex(toastIdOrIndex);\n\n if (index === -1) {\n return;\n }\n\n this.#queue[index] = {\n ...this.#queue[index],\n ...patch,\n };\n this.#emit();\n };\n\n /**\n * This is just used to subscribe to changes in the {@link useToastQueue}.\n *\n * ```tsx\n * useSyncExternalStore(\n * toastManager.subscribe,\n * toastManager.getQueue,\n * toastManager.getQueue,\n * );\n * ```\n *\n * @internal\n */\n subscribe = (callback: ToastCallback): (() => void) => {\n this.#listeners.push(callback);\n\n return () => {\n this.#listeners = this.#listeners.filter((cb) => cb !== callback);\n };\n };\n\n /**\n * @see {@link subscribe}\n * @internal\n */\n getQueue = (): ToastQueue => {\n return this.#queue;\n };\n\n /**\n * Either adds the toast to the queue or updates an existing toast when using\n * an existing `toastId`.\n *\n * @example\n * Adding toasts\n * ```tsx\n * // create a toast when the user is offline that will not disappear\n * addToast({ toastId: \"offline\", visibleTime: null });\n *\n * // add a new toast that displays `\"Toast\"` to the queue\n * addToast({ children: \"Toast!\" });\n *\n * // add an online toast notification. since these three use the same toast\n * // id, the hide timer will be reset each time\n * addToast({ toastId: \"online\" });\n * addToast({ toastId: \"online\" });\n * addToast({ toastId: \"online\" });\n *\n * // add a server error toast to the queue where the second one will be\n * // ignored\n * addToast({\n * toastId: \"ServerError\",\n * theme: \"error\",\n * duplicates: \"prevent\",\n * });\n * addToast({\n * toastId: \"ServerError\",\n * theme: \"error\",\n * duplicates: \"prevent\",\n * });\n *\n * // add a toast to the queue that has an action button that says \"Goodbye\"\n * addToast({\n * children: \"Hello, world!\",\n * action: \"Goodbye\",\n * });\n *\n * // add a toast to the queue that has an action button that says \"Goodbye\"\n * // and a custom click handler\n * addToast({\n * children: \"Hello, world!\",\n * action: {\n * onClick: () => {\n * logout();\n * },\n * children: \"Goodbye\",\n * },\n * });\n *\n * // add a toast to the queue that renders a react component in the content,\n * // a custom action button implementation (using `ToastActionButton`), and a\n * // close button\n * addToast({\n * children: <SomeCustomComponent />,\n * actionButton: <SomeCustomActionButton />,\n * closeButton: true,\n * });\n * ```\n */\n addToast = (toast: CreateToastOptions): void => {\n const {\n toastId = nanoid(),\n visibleTime = DEFAULT_TOAST_VISIBLE_TIME,\n role = visibleTime === null ? \"alert\" : \"status\",\n priority = \"normal\",\n duplicates = \"restart\",\n } = toast;\n\n const existingIndex = this.#getToastIndex(toast.toastId);\n if (existingIndex !== -1 && duplicates !== \"allow\") {\n const existingToast = this.#queue[existingIndex];\n\n // reorder/move the existing toast to be the next item in the queue by:\n // - removing the toast from the queue\n // - inserting it into the next position with the updates\n if (priority === \"next\" && existingIndex > 1) {\n this.#queue.splice(existingIndex, 1);\n this.#queue.splice(1, 0, { ...existingToast, ...toast });\n this.#emit();\n return;\n }\n\n // only need to reorder the queue if it is not being shown\n if (\n (priority === \"replace\" || priority === \"immediate\") &&\n existingIndex !== 0\n ) {\n this.#queue.splice(existingIndex, 1);\n this.#addToastImmediately({\n ...existingToast,\n ...toast,\n });\n this.#emit();\n return;\n }\n\n const timers = this.#timers.get(toastId);\n if (existingToast.visible && duplicates === \"restart\" && timers) {\n this.#timers.set(toastId, { ...timers, elapsedTime: 0 });\n this.startRemoveTimeout(toastId);\n }\n\n this.#updateToast(existingIndex, toast);\n return;\n }\n\n const nextToast: QueuedToast = {\n ...toast,\n role,\n paused: false,\n visible: true,\n toastId,\n priority,\n duplicates,\n visibleTime,\n };\n\n const queueSize = this.#queue.length;\n if (priority === \"next\" && queueSize > 1) {\n this.#queue.splice(1, 0, nextToast);\n } else if (\n (priority === \"replace\" || priority === \"immediate\") &&\n queueSize > 0\n ) {\n this.#addToastImmediately(nextToast);\n } else {\n this.#queue.push(nextToast);\n }\n\n this.#emit();\n };\n\n /**\n * Attempts to start the timeout for removing the toast when the `visibleTime`\n * is not null for a toast.\n *\n * @param toastId - The specific toastId to update\n */\n startRemoveTimeout = (toastId: string): void => {\n const toast = this.#getToast(toastId);\n if (!toast) {\n return;\n }\n\n const { visibleTime } = toast;\n if (visibleTime === null) {\n // Must manually be closed\n return;\n }\n\n const cached = this.#timers.get(toastId);\n const timers = (cached && { ...cached }) || {\n inactive: false,\n startTime: Date.now(),\n elapsedTime: 0,\n };\n window.clearTimeout(timers.exitTimeout);\n\n let duration = visibleTime;\n if (timers.elapsedTime) {\n duration -= timers.elapsedTime;\n }\n\n timers.inactive = false;\n timers.exitTimeout = window.setTimeout(() => {\n this.removeToast(toastId, true);\n }, duration);\n this.#timers.set(toastId, timers);\n };\n\n /**\n * Pauses the remove timeout for a specific toast normally with hover events\n * or the browser becoming inactive.\n *\n * @param toastId - The specific toastId to pause\n */\n pauseRemoveTimeout = (toastId: string): void => {\n const toast = this.#getToast(toastId);\n const cached = this.#timers.get(toastId);\n if (!toast || !cached || cached.inactive) {\n return;\n }\n\n window.clearTimeout(cached.exitTimeout);\n const timers = { ...cached };\n timers.inactive = true;\n timers.elapsedTime = Date.now() - timers.startTime + timers.elapsedTime;\n this.#timers.set(toastId, timers);\n this.#updateToast(toastId, { paused: true });\n };\n\n /**\n * Resumes the current remove timeout if it was paused by\n * {@link pauseRemoveTimeout}.\n *\n * @param toastId - The specific toastId to resume\n */\n resumeRemoveTimeout = (toastId: string): void => {\n const toastIndex = this.#getToastIndex(toastId);\n const timers = this.#timers.get(toastId);\n if (toastIndex === -1 || !timers?.startTime) {\n return;\n }\n\n this.#updateToast(toastIndex, { paused: false });\n this.startRemoveTimeout(toastId);\n };\n\n /**\n * Removes a toast by id from the queue without any exit animation.\n *\n * @param toastId - The specific {@link QueuedToast.toastId}\n * @param transition - Set this to `true` to remove the toast by the exit\n * transition instead of immediately.\n */\n removeToast = (toastId: string, transition: boolean): void => {\n const toastIndex = this.#getToastIndex(toastId);\n if (toastIndex === -1) {\n return;\n }\n\n if (transition) {\n this.clearTimer(toastId);\n this.#updateToast(toastIndex, { visible: false });\n return;\n }\n\n this.#queue.splice(toastIndex, 1);\n this.#emit();\n };\n\n /**\n * Clears any pending timers for the provided toast id. This should generally\n * be used in the `useEffect` cleanup effect for any custom toast renderer\n * implementations.\n *\n * @example\n * ```tsx\n * const { toastId } = toast;\n * const toastManager = useToastManager();\n *\n * useEffect(() => {\n * return () => {\n * toastManager.clearTimer(toastId):\n * }\n * }, [toastManager, toastId]);\n * ```\n */\n clearTimer = (toastId: string): void => {\n const timer = this.#timers.get(toastId);\n window.clearTimeout(timer?.exitTimeout);\n this.#timers.delete(toastId);\n };\n\n /**\n * Removes first toast from the queue without any exit animation. You most\n * likely want to use {@link removeToast} instead.\n */\n popToast = (): void => {\n this.#queue.pop();\n this.#emit();\n };\n\n /**\n * Removes all toasts from the queue. There will be no exit animation.\n *\n * @param disableEmit - Set this to `true` to disable emitting the empty queue.\n * Mostly used for tests.\n */\n clearToasts = (disableEmit = false): void => {\n this.#queue = [];\n this.#timers.forEach((meta) => {\n window.clearTimeout(meta.exitTimeout);\n });\n this.#timers.clear();\n if (!disableEmit) {\n this.#emit();\n }\n };\n}\n\n/**\n * The default toast manager for react-md apps that will allow toasts to be\n * added without setting up the {@link ToastManagerProvider}.\n *\n * @internal\n * @remarks \\@since 6.0.0\n */\nexport const toastManager = new ToastManager();\n\n/**\n * @see {@link ToastManager.addToast}\n * @remarks \\@since 6.0.0\n */\nexport const addToast: ToastManager[\"addToast\"] = (toast) =>\n toastManager.addToast(toast);\n\n/**\n * @see {@link ToastManager.startRemoveTimeout}\n * @remarks \\@since 6.0.0\n */\nexport const startRemoveToastTimeout: ToastManager[\"startRemoveTimeout\"] = (\n toastId\n) => toastManager.startRemoveTimeout(toastId);\n\n/**\n * @see {@link ToastManager.popToast}\n * @remarks \\@since 6.0.0\n */\nexport const popToast: ToastManager[\"popToast\"] = () => toastManager.popToast();\n\n/**\n * @see {@link ToastManager.removeToast}\n * @remarks \\@since 6.0.0\n */\nexport const removeToast: ToastManager[\"removeToast\"] = (toastId, transition) =>\n toastManager.removeToast(toastId, transition);\n\n/**\n * @see {@link ToastManager.clearToasts}\n * @remarks \\@since 6.0.0\n */\nexport const clearToasts = (): void => toastManager.clearToasts();\n"],"names":["nanoid","DEFAULT_TOAST_VISIBLE_TIME","ToastManager","constructor","queue","listeners","forEach","callback","toastId","findIndex","toast","getToastIndex","nextToast","current","clearTimer","visible","priority","splice","toastIdOrIndex","patch","index","emit","subscribe","push","filter","cb","getQueue","addToast","visibleTime","role","duplicates","existingIndex","existingToast","addToastImmediately","timers","get","set","elapsedTime","startRemoveTimeout","updateToast","paused","queueSize","length","getToast","cached","inactive","startTime","Date","now","window","clearTimeout","exitTimeout","duration","setTimeout","removeToast","pauseRemoveTimeout","resumeRemoveTimeout","toastIndex","transition","timer","delete","popToast","pop","clearToasts","disableEmit","meta","clear","Map","toastManager","startRemoveToastTimeout"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAASA,MAAM,QAAQ,SAAS;AAGhC;;CAEC,GACD,OAAO,MAAMC,6BAA6B,KAAK;IA6H7C,sCACA,uCACA,0CAmBA,qCAQA,8CAQA,yCAIA;;;;GAIC,GACD,oDAcA;;GAEC,GACD;AArEF;;;;CAIC,GACD,OAAO,MAAMC;IAKXC,aAAc;QAJd,gCAAA;;mBAAA,KAAA;;QACA,gCAAA;;mBAAA,KAAA;;QACA,gCAAA;;mBAAA,KAAA;;QAmBA,gCAAA;;mBAAQ;gBACN,wCAAwC;+CAClCC,QAAQ;gDAAI,IAAI,EAAEA;iBAAM;gBAC9B,yBAAA,IAAI,EAAEC,YAAUC,OAAO,CAAC,CAACC;oBACvBA,kCAAS,IAAI,EAAEH;gBACjB;YACF;;QAEA,gCAAA;;mBAAiB,CAACI;gBAChB,IAAI,CAACA,SAAS;oBACZ,OAAO,CAAC;gBACV;gBAEA,OAAO,yBAAA,IAAI,EAAEJ,QAAMK,SAAS,CAAC,CAACC,QAAUA,MAAMF,OAAO,KAAKA;YAC5D;;QAEA,gCAAA;;mBAAY,CAACA;gBACX,OAAO,yBAAA,IAAI,EAAEJ,OAAK,CAAC,yBAAA,IAAI,EAAEO,qBAAN,IAAI,EAAgBH,SAAS;YAClD;;QAOA,gCAAA;;mBAAuB,CAACI;gBACtB,MAAM,C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GC,GACD,OAAO,MAAMP,cAA2C,CAAC9C,SAASkD,aAChEU,aAAad,WAAW,CAAC9C,SAASkD,YAAY;AAEhD;;;CAGC,GACD,OAAO,MAAMK,cAAc,IAAYK,aAAaL,WAAW,GAAG"}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
@use "../transition/transition";
|
|
12
12
|
|
|
13
13
|
$disable-everything: false !default;
|
|
14
|
+
$disable-absolute: false !default;
|
|
14
15
|
$disable-top: false !default;
|
|
15
16
|
$disable-bottom: false !default;
|
|
16
17
|
$disable-top-right: $disable-top !default;
|
|
@@ -60,201 +61,204 @@ $background-color: theme.get-default-color(
|
|
|
60
61
|
) !default;
|
|
61
62
|
$color: theme.get-default-color($light-theme-color, $dark-theme-color) !default;
|
|
62
63
|
|
|
63
|
-
$
|
|
64
|
-
color: (
|
|
65
|
-
var: --rmd-toast-color,
|
|
66
|
-
value: $color,
|
|
67
|
-
),
|
|
68
|
-
background-color: (
|
|
69
|
-
var: --rmd-toast-background-color,
|
|
70
|
-
value: $background-color,
|
|
71
|
-
),
|
|
72
|
-
offset: (
|
|
73
|
-
var: --rmd-snackbar-offset,
|
|
74
|
-
value: 0,
|
|
75
|
-
),
|
|
76
|
-
);
|
|
64
|
+
$variables: (background-color, color, offset);
|
|
77
65
|
|
|
78
66
|
@function get-var($name, $fallback: null) {
|
|
79
|
-
$
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
@if $value {
|
|
84
|
-
@return var(#{$var}, #{$value});
|
|
67
|
+
$var: utils.get-var-name($variables, $name, "snackbar");
|
|
68
|
+
@if $fallback {
|
|
69
|
+
@return var(#{$var}, #{$fallback});
|
|
85
70
|
}
|
|
86
71
|
|
|
87
72
|
@return var(#{$var});
|
|
88
73
|
}
|
|
89
74
|
|
|
90
75
|
@mixin set-var($name, $value) {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
76
|
+
@if $value {
|
|
77
|
+
#{utils.get-var-name($variables, $name, "snackbar")}: #{$value};
|
|
78
|
+
}
|
|
94
79
|
}
|
|
95
80
|
|
|
96
81
|
@mixin use-var($property, $name: $property, $fallback: null) {
|
|
97
82
|
#{$property}: get-var($name, $fallback);
|
|
98
83
|
}
|
|
99
84
|
|
|
100
|
-
@mixin
|
|
85
|
+
@mixin variables {
|
|
101
86
|
@if not $disable-everything {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
left: 0;
|
|
108
|
-
margin: $margin;
|
|
109
|
-
pointer-events: none;
|
|
110
|
-
position: fixed;
|
|
111
|
-
right: 0;
|
|
112
|
-
z-index: $z-index;
|
|
113
|
-
|
|
114
|
-
@if not $disable-top or not $disable-top-left or not $disable-bottom-left
|
|
115
|
-
{
|
|
116
|
-
&--top {
|
|
117
|
-
@include use-var(top, offset);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
87
|
+
@include set-var(background-color, $background-color);
|
|
88
|
+
@include set-var(color, $color);
|
|
89
|
+
@include set-var(offset, 0);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
120
92
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
93
|
+
@mixin styles($disable-layer: false) {
|
|
94
|
+
@if not $disable-everything {
|
|
95
|
+
@include utils.optional-layer(snackbar, $disable-layer) {
|
|
96
|
+
.rmd-snackbar {
|
|
97
|
+
align-items: $default-align-items;
|
|
98
|
+
display: flex;
|
|
99
|
+
flex-direction: column;
|
|
100
|
+
gap: $gap;
|
|
101
|
+
left: 0;
|
|
102
|
+
margin: $margin;
|
|
103
|
+
pointer-events: none;
|
|
104
|
+
position: fixed;
|
|
105
|
+
right: 0;
|
|
106
|
+
z-index: $z-index;
|
|
107
|
+
|
|
108
|
+
@if not $disable-absolute {
|
|
109
|
+
&--absolute {
|
|
110
|
+
position: absolute;
|
|
111
|
+
}
|
|
128
112
|
}
|
|
129
|
-
}
|
|
130
113
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
114
|
+
@if not
|
|
115
|
+
$disable-top or not
|
|
116
|
+
$disable-top-left or not
|
|
117
|
+
$disable-bottom-left
|
|
118
|
+
{
|
|
119
|
+
&--top {
|
|
120
|
+
@include use-var(top, offset);
|
|
121
|
+
}
|
|
134
122
|
}
|
|
135
|
-
}
|
|
136
123
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
124
|
+
@if not
|
|
125
|
+
$disable-bottom or not
|
|
126
|
+
$disable-bottom-left or not
|
|
127
|
+
$disable-bottom-right
|
|
128
|
+
{
|
|
129
|
+
&--bottom {
|
|
130
|
+
@include use-var(bottom, offset);
|
|
131
|
+
}
|
|
140
132
|
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
133
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
align-items: center;
|
|
151
|
-
border-radius: $border-radius;
|
|
152
|
-
display: flex;
|
|
153
|
-
gap: $toast-gap;
|
|
154
|
-
justify-content: space-between;
|
|
155
|
-
max-width: $max-width;
|
|
156
|
-
min-height: $min-height;
|
|
157
|
-
padding-left: $horizontal-padding;
|
|
158
|
-
padding-right: $horizontal-padding;
|
|
159
|
-
pointer-events: auto;
|
|
160
|
-
width: 100%;
|
|
161
|
-
|
|
162
|
-
@include media-queries.tablet-media {
|
|
163
|
-
min-width: $min-width;
|
|
164
|
-
width: auto;
|
|
165
|
-
}
|
|
134
|
+
@if not $disable-top-left or not $disable-bottom-left {
|
|
135
|
+
&--start {
|
|
136
|
+
align-items: flex-start;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
166
139
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
$action-horizontal-padding,
|
|
172
|
-
$horizontal-padding
|
|
173
|
-
);
|
|
140
|
+
@if not $disable-top-right or not $disable-bottom-right {
|
|
141
|
+
&--end {
|
|
142
|
+
align-items: flex-end;
|
|
143
|
+
}
|
|
174
144
|
}
|
|
175
145
|
}
|
|
176
146
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
147
|
+
.rmd-toast {
|
|
148
|
+
@include box-shadows.box-shadow($box-shadow, $disable-colors: true);
|
|
149
|
+
@include utils.map-to-styles($typography);
|
|
150
|
+
@include use-var(background-color);
|
|
151
|
+
@include use-var(color);
|
|
152
|
+
|
|
153
|
+
align-items: center;
|
|
154
|
+
border-radius: $border-radius;
|
|
155
|
+
display: flex;
|
|
156
|
+
gap: $toast-gap;
|
|
157
|
+
justify-content: space-between;
|
|
158
|
+
max-width: $max-width;
|
|
159
|
+
min-height: $min-height;
|
|
160
|
+
padding-left: $horizontal-padding;
|
|
161
|
+
padding-right: $horizontal-padding;
|
|
162
|
+
pointer-events: auto;
|
|
163
|
+
width: 100%;
|
|
164
|
+
|
|
165
|
+
@include media-queries.tablet-media {
|
|
166
|
+
min-width: $min-width;
|
|
167
|
+
width: auto;
|
|
184
168
|
}
|
|
185
169
|
|
|
186
170
|
@if not $disable-action-button {
|
|
187
|
-
&--
|
|
188
|
-
|
|
171
|
+
&--action {
|
|
172
|
+
@include utils.auto-rtl(
|
|
173
|
+
padding-right,
|
|
174
|
+
$action-horizontal-padding,
|
|
175
|
+
$horizontal-padding
|
|
176
|
+
);
|
|
189
177
|
}
|
|
190
178
|
}
|
|
191
|
-
}
|
|
192
179
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
180
|
+
@if not $disable-close-button {
|
|
181
|
+
&--x {
|
|
182
|
+
@include utils.auto-rtl(
|
|
183
|
+
padding-right,
|
|
184
|
+
$close-button-horizontal-padding,
|
|
185
|
+
$horizontal-padding
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
@if not $disable-action-button {
|
|
190
|
+
&--small-gap {
|
|
191
|
+
gap: $toast-gap-both-buttons;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
200
194
|
}
|
|
201
195
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
196
|
+
@if not $disable-stacked {
|
|
197
|
+
&--stacked {
|
|
198
|
+
display: grid;
|
|
199
|
+
gap: $toast-gap-stacked;
|
|
200
|
+
grid-template-columns: 1fr;
|
|
201
|
+
padding-bottom: $vertical-padding;
|
|
202
|
+
padding-top: $vertical-padding;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
&--reordered {
|
|
206
|
+
grid-template-columns: 1fr min-content;
|
|
207
|
+
padding-top: 0;
|
|
208
|
+
}
|
|
205
209
|
}
|
|
206
210
|
}
|
|
207
|
-
}
|
|
208
211
|
|
|
209
|
-
|
|
210
|
-
|
|
212
|
+
.rmd-toast-content {
|
|
213
|
+
flex: 1 1 auto;
|
|
211
214
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
+
p {
|
|
216
|
+
margin: 0;
|
|
217
|
+
}
|
|
215
218
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
+
&--v-padding {
|
|
220
|
+
padding: $vertical-padding 0;
|
|
221
|
+
}
|
|
219
222
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
+
&--t-padding {
|
|
224
|
+
padding-bottom: 0;
|
|
225
|
+
}
|
|
223
226
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
227
|
+
@if not $disable-action-button {
|
|
228
|
+
&--action {
|
|
229
|
+
@include utils.auto-rtl(
|
|
230
|
+
padding-right,
|
|
231
|
+
button.$text-horizontal-padding
|
|
232
|
+
);
|
|
233
|
+
}
|
|
230
234
|
}
|
|
231
|
-
}
|
|
232
235
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
+
@if not $disable-close-button and not $disable-action-button {
|
|
237
|
+
&--gap {
|
|
238
|
+
@include utils.auto-rtl(margin-right, $toast-gap);
|
|
239
|
+
}
|
|
236
240
|
}
|
|
237
241
|
}
|
|
238
|
-
}
|
|
239
242
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
243
|
+
@if not $disable-close-button {
|
|
244
|
+
.rmd-toast-x {
|
|
245
|
+
&--reordered {
|
|
246
|
+
align-self: flex-start;
|
|
247
|
+
order: 2;
|
|
248
|
+
}
|
|
245
249
|
}
|
|
246
250
|
}
|
|
247
|
-
}
|
|
248
251
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
+
@if not $disable-action-button {
|
|
253
|
+
.rmd-toast-action {
|
|
254
|
+
justify-self: flex-end;
|
|
252
255
|
|
|
253
|
-
|
|
254
|
-
|
|
256
|
+
&--reordered {
|
|
257
|
+
@include utils.auto-rtl(margin-right, $action-horizontal-padding);
|
|
255
258
|
|
|
256
|
-
|
|
257
|
-
|
|
259
|
+
grid-column-end: span 2;
|
|
260
|
+
order: 3;
|
|
261
|
+
}
|
|
258
262
|
}
|
|
259
263
|
}
|
|
260
264
|
}
|
|
@@ -4,9 +4,10 @@ const styles = bem("rmd-snackbar");
|
|
|
4
4
|
/**
|
|
5
5
|
* @remarks \@since 6.0.0
|
|
6
6
|
*/ export function snackbar(options) {
|
|
7
|
-
const { className, position } = options;
|
|
7
|
+
const { className, absolute, position } = options;
|
|
8
8
|
const top = position === "top" || position === "top-left" || position === "top-right";
|
|
9
9
|
return cnb(styles({
|
|
10
|
+
absolute,
|
|
10
11
|
top,
|
|
11
12
|
bottom: !top,
|
|
12
13
|
start: position === "top-left" || position === "bottom-left",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/snackbar/snackbarStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-snackbar\");\n\n/**\n * @remarks\n * \\@since 2.0.0\n * \\@since 6.0.0 Added the `\"top-left\"`, `\"top-right\"`, `\"bottom-left\"`, and\n * `\"bottom-right\"` positions\n */\nexport type SnackbarPosition =\n | \"bottom\"\n | \"bottom-left\"\n | \"bottom-right\"\n | \"top\"\n | \"top-left\"\n | \"top-right\";\n\n/** @remarks \\@since 6.0.0 */\nexport interface SnackbarClassNameOptions {\n className?: string;\n position: SnackbarPosition;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function snackbar(options: SnackbarClassNameOptions): string {\n const { className, position } = options;\n const top =\n position === \"top\" || position === \"top-left\" || position === \"top-right\";\n\n return cnb(\n styles({\n top,\n bottom: !top,\n start: position === \"top-left\" || position === \"bottom-left\",\n end: position === \"top-right\" || position === \"bottom-right\",\n }),\n className\n );\n}\n"],"names":["cnb","bem","styles","snackbar","options","className","position","top","bottom","start","end"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;
|
|
1
|
+
{"version":3,"sources":["../../src/snackbar/snackbarStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-snackbar\");\n\n/**\n * @remarks\n * \\@since 2.0.0\n * \\@since 6.0.0 Added the `\"top-left\"`, `\"top-right\"`, `\"bottom-left\"`, and\n * `\"bottom-right\"` positions\n */\nexport type SnackbarPosition =\n | \"bottom\"\n | \"bottom-left\"\n | \"bottom-right\"\n | \"top\"\n | \"top-left\"\n | \"top-right\";\n\n/** @remarks \\@since 6.0.0 */\nexport interface SnackbarClassNameOptions {\n className?: string;\n absolute?: boolean;\n position: SnackbarPosition;\n}\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport function snackbar(options: SnackbarClassNameOptions): string {\n const { className, absolute, position } = options;\n const top =\n position === \"top\" || position === \"top-left\" || position === \"top-right\";\n\n return cnb(\n styles({\n absolute,\n top,\n bottom: !top,\n start: position === \"top-left\" || position === \"bottom-left\",\n end: position === \"top-right\" || position === \"bottom-right\",\n }),\n className\n );\n}\n"],"names":["cnb","bem","styles","snackbar","options","className","absolute","position","top","bottom","start","end"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAuBnB;;CAEC,GACD,OAAO,SAASE,SAASC,OAAiC;IACxD,MAAM,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,QAAQ,EAAE,GAAGH;IAC1C,MAAMI,MACJD,aAAa,SAASA,aAAa,cAAcA,aAAa;IAEhE,OAAOP,IACLE,OAAO;QACLI;QACAE;QACAC,QAAQ,CAACD;QACTE,OAAOH,aAAa,cAAcA,aAAa;QAC/CI,KAAKJ,aAAa,eAAeA,aAAa;IAChD,IACAF;AAEJ"}
|
|
@@ -44,8 +44,9 @@ export interface TableCheckboxProps extends TableCheckboxTdHTMLAttributes, Table
|
|
|
44
44
|
checkboxProps?: PropsWithRef<CheckboxProps, HTMLInputElement>;
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
|
-
* **
|
|
48
|
-
*
|
|
47
|
+
* **Client Component**
|
|
48
|
+
* The `TableCheckbox` is used to render a `Checkbox` within a `TableCell` by applying
|
|
49
|
+
* some minimal styles.
|
|
49
50
|
*
|
|
50
51
|
* @example
|
|
51
52
|
* Simple Example
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
import { forwardRef } from "react";
|
|
3
4
|
import { Checkbox } from "../form/Checkbox.js";
|
|
@@ -6,8 +7,9 @@ const noop = ()=>{
|
|
|
6
7
|
// do nothing
|
|
7
8
|
};
|
|
8
9
|
/**
|
|
9
|
-
* **
|
|
10
|
-
*
|
|
10
|
+
* **Client Component**
|
|
11
|
+
* The `TableCheckbox` is used to render a `Checkbox` within a `TableCell` by applying
|
|
12
|
+
* some minimal styles.
|
|
11
13
|
*
|
|
12
14
|
* @example
|
|
13
15
|
* Simple Example
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/table/TableCheckbox.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../src/table/TableCheckbox.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, type TdHTMLAttributes } from \"react\";\nimport { Checkbox } from \"../form/Checkbox.js\";\nimport { type CheckboxProps } from \"../form/InputToggle.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { TableCell } from \"./TableCell.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport type TableCheckboxTdHTMLAttributes = Omit<\n TdHTMLAttributes<HTMLTableCellElement>,\n \"aria-sort\" | \"scope\" | \"onChange\"\n>;\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport type TableCheckboxSupportedCheckboxProps = Pick<\n CheckboxProps,\n | \"name\"\n | \"value\"\n | \"icon\"\n | \"iconStyle\"\n | \"iconClassName\"\n | \"iconProps\"\n | \"checkedIcon\"\n | \"indeterminateIcon\"\n | \"checked\"\n | \"onChange\"\n | \"defaultChecked\"\n | \"indeterminate\"\n | \"aria-controls\"\n>;\n\n/**\n * @remarks\n * \\@since 6.0.0 The `id` prop is no longer required since the checkbox's id\n * will automatically be generated as `\"checkbox\" + useId()`. Use the {@link checkboxProps}\n * to set an `id` manually for the checkbox.\n * \\@since 6.0.0 The `cellId` prop was removed. Use the `id` prop instead.\n * \\@since 6,0.0 The default `aria-label` was changed from\n * `\"Toggle Row Selection\"` to `\"Select Row\"`.\n */\nexport interface TableCheckboxProps\n extends TableCheckboxTdHTMLAttributes,\n TableCheckboxSupportedCheckboxProps {\n /**\n * @defaultValue `!props[\"aria-labelledby\"] ? \"Select Row\" : undefined`\n */\n \"aria-label\"?: string;\n\n /** @defaultValue `false` */\n sticky?: boolean;\n\n /**\n * This allows you to override any props for the checkbox that are not\n * configurable as top-level props.\n *\n * @example\n * Simple Example\n * ```tsx\n * checkboxProps={{\n * id: \"some-custom-id\",\n * ref: checkboxRef,\n * }}\n * ```\n *\n * @see {@link TableCheckboxSupportedCheckboxProps}\n * @remarks \\@since 6.0.0\n */\n checkboxProps?: PropsWithRef<CheckboxProps, HTMLInputElement>;\n}\n\n/**\n * **Client Component**\n * The `TableCheckbox` is used to render a `Checkbox` within a `TableCell` by applying\n * some minimal styles.\n *\n * @example\n * Simple Example\n * ```tsx\n * import {\n * Table,\n * TableBody,\n * TableCell,\n * TableCheckbox,\n * TableContainer,\n * TableHeader,\n * TableRow,\n * useCheckboxGroup\n * } from \"@react-md/core\";\n * import { type ReactElement } from \"react\";\n *\n * const rows = [\n * { name: \"Frozen Yogurt\", type: \"Ice Cream\" },\n * { name: \"Ice cream sandwich\", type: \"Ice Cream\" },\n * { name: \"Eclair\", type: \"Pastry\" },\n * // ...other content\n * ] as const;\n *\n * function Example(): ReactElement {\n * const { getCheckboxProps, getIndeterminateProps } = useCheckboxGroup({\n * values: rows.map(({ name }) => name),\n * name: \"selected\",\n * });\n * return (\n * <TableContainer>\n * <Table>\n * <TableHeader>\n * <TableRow>\n * <TableCheckbox {...getIndeterminateProps()} />\n * <TableCell>Name</TableCell>\n * <TableCell>Type</TableCell>\n * </TableRow>\n * </TableHeader>\n * <TableBody>\n * {rows.map(({ name, type }) => {\n * const checkboxProps = getCheckboxProps(name);\n * const { checked, onChange } = checkboxProps;\n *\n * return (\n * <TableRow\n * key={name}\n * onClick={onChange}\n * clickable\n * selected={checked}\n * >\n * <TableCheckbox {...checkboxProps} />\n * <TableCell>{name}</TableCell>\n * <TableCell hAlign=\"right\">{type}</TableCell>\n * </TableRow>\n * );\n * })}\n * </TableBody>\n * </Table>\n * </TableContainer>\n * );\n * }\n * ```\n *\n * @remarks\n * \\@since 6.0.0 The `id` prop is no longer required since the checkbox's id\n * will automatically be generated as `\"checkbox\" + useId()`. Use the {@link checkboxProps}\n * to set an `id` manually for the checkbox.\n * \\@since 6.0.0 The `cellId` prop was removed. Use the `id` prop instead.\n * \\@since 6,0.0 The default `aria-label` was changed from\n * `\"Toggle Row Selection\"` to `\"Select Row\"`.\n */\nexport const TableCheckbox = forwardRef<\n HTMLTableCellElement,\n TableCheckboxProps\n>(function TableCheckbox(props, ref) {\n const {\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-label\": ariaLabel = !ariaLabelledBy ? \"Select Row\" : undefined,\n \"aria-controls\": ariaControls,\n name,\n icon,\n iconProps,\n iconStyle,\n iconClassName,\n checkedIcon,\n indeterminateIcon,\n value,\n checked,\n onChange,\n defaultChecked,\n indeterminate,\n checkboxProps,\n onClick = noop,\n ...remaining\n } = props;\n\n return (\n <TableCell\n {...remaining}\n ref={ref}\n header={false}\n inputToggle\n onClick={(event) => {\n event.stopPropagation();\n onClick(event);\n }}\n >\n <Checkbox\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-controls={ariaControls}\n name={name}\n icon={icon}\n iconProps={iconProps}\n iconStyle={iconStyle}\n iconClassName={iconClassName}\n checkedIcon={checkedIcon}\n indeterminateIcon={indeterminateIcon}\n value={value}\n checked={checked}\n defaultChecked={defaultChecked}\n onChange={onChange}\n indeterminate={indeterminate}\n {...checkboxProps}\n />\n </TableCell>\n );\n});\n"],"names":["forwardRef","Checkbox","TableCell","noop","TableCheckbox","props","ref","ariaLabelledBy","ariaLabel","undefined","ariaControls","name","icon","iconProps","iconStyle","iconClassName","checkedIcon","indeterminateIcon","value","checked","onChange","defaultChecked","indeterminate","checkboxProps","onClick","remaining","header","inputToggle","event","stopPropagation","aria-label","aria-labelledby","aria-controls"],"mappings":"AAAA;;AACA,SAASA,UAAU,QAA+B,QAAQ;AAC1D,SAASC,QAAQ,QAAQ,sBAAsB;AAG/C,SAASC,SAAS,QAAQ,iBAAiB;AAE3C,MAAMC,OAAO;AACX,aAAa;AACf;AAqEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0EC,GACD,OAAO,MAAMC,8BAAgBJ,WAG3B,SAASI,cAAcC,KAAK,EAAEC,GAAG;IACjC,MAAM,EACJ,mBAAmBC,cAAc,EACjC,cAAcC,YAAY,CAACD,iBAAiB,eAAeE,SAAS,EACpE,iBAAiBC,YAAY,EAC7BC,IAAI,EACJC,IAAI,EACJC,SAAS,EACTC,SAAS,EACTC,aAAa,EACbC,WAAW,EACXC,iBAAiB,EACjBC,KAAK,EACLC,OAAO,EACPC,QAAQ,EACRC,cAAc,EACdC,aAAa,EACbC,aAAa,EACbC,UAAUrB,IAAI,EACd,GAAGsB,WACJ,GAAGpB;IAEJ,qBACE,KAACH;QACE,GAAGuB,SAAS;QACbnB,KAAKA;QACLoB,QAAQ;QACRC,WAAW;QACXH,SAAS,CAACI;YACRA,MAAMC,eAAe;YACrBL,QAAQI;QACV;kBAEA,cAAA,KAAC3B;YACC6B,cAAYtB;YACZuB,mBAAiBxB;YACjByB,iBAAetB;YACfC,MAAMA;YACNC,MAAMA;YACNC,WAAWA;YACXC,WAAWA;YACXC,eAAeA;YACfC,aAAaA;YACbC,mBAAmBA;YACnBC,OAAOA;YACPC,SAASA;YACTE,gBAAgBA;YAChBD,UAAUA;YACVE,eAAeA;YACd,GAAGC,aAAa;;;AAIzB,GAAG"}
|
|
@@ -38,8 +38,9 @@ export interface TableRadioProps extends TableRadioTdHTMLAttributes, TableRadioS
|
|
|
38
38
|
radioProps?: PropsWithRef<RadioProps, HTMLInputElement>;
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
|
-
* **
|
|
42
|
-
*
|
|
41
|
+
* **Client Component**
|
|
42
|
+
* The `TableRadio` is used to render a `Radio` within a `TableCell` by applying
|
|
43
|
+
* some minimal styles.
|
|
43
44
|
*
|
|
44
45
|
* @example
|
|
45
46
|
* Simple Example
|
package/dist/table/TableRadio.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
import { forwardRef } from "react";
|
|
3
4
|
import { Radio } from "../form/Radio.js";
|
|
@@ -6,8 +7,9 @@ const noop = ()=>{
|
|
|
6
7
|
// do nothing
|
|
7
8
|
};
|
|
8
9
|
/**
|
|
9
|
-
* **
|
|
10
|
-
*
|
|
10
|
+
* **Client Component**
|
|
11
|
+
* The `TableRadio` is used to render a `Radio` within a `TableCell` by applying
|
|
12
|
+
* some minimal styles.
|
|
11
13
|
*
|
|
12
14
|
* @example
|
|
13
15
|
* Simple Example
|