@react-md/core 1.0.0-next.7 → 1.0.0-next.9
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 +6 -6
- package/.turbo/turbo-lint.log +13 -12
- package/CHANGELOG.md +15 -0
- package/README.md +39 -24
- package/coverage/clover.xml +1013 -529
- package/coverage/coverage-final.json +9 -3
- package/coverage/lcov-report/AutoComplete.tsx.html +283 -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/RootHtml.tsx.html +370 -0
- package/coverage/lcov-report/Select.tsx.html +1411 -0
- package/coverage/lcov-report/SrOnly.tsx.html +328 -0
- package/coverage/lcov-report/Typography.tsx.html +1027 -0
- package/coverage/lcov-report/autocomplete/AutoComplete.tsx.html +283 -0
- package/coverage/lcov-report/autocomplete/Autocomplete.tsx.html +283 -0
- package/coverage/lcov-report/autocomplete/index.html +161 -0
- package/coverage/lcov-report/autocomplete/useAutoComplete.ts.html +775 -0
- package/coverage/lcov-report/autocomplete/useAutocomplete.ts.html +775 -0
- package/coverage/lcov-report/autocomplete/useInlineAutoComplete.ts.html +340 -0
- package/coverage/lcov-report/autocomplete/useInlineAutocomplete.ts.html +346 -0
- package/coverage/lcov-report/autocomplete/utils.ts.html +106 -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/index.html +12 -12
- 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/form/AutoComplete.tsx.html +283 -0
- package/coverage/lcov-report/form/Form.tsx.html +22 -22
- 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/Select.tsx.html +962 -1112
- 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/index.html +57 -12
- package/coverage/lcov-report/form/selectUtils.ts.html +188 -221
- 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/useSelectCombobox.ts.html +499 -0
- package/coverage/lcov-report/form/utils.ts.html +209 -170
- package/coverage/lcov-report/icon/FontIcon.tsx.html +28 -28
- package/coverage/lcov-report/icon/MaterialIcon.tsx.html +235 -0
- package/coverage/lcov-report/icon/index.html +1 -1
- package/coverage/lcov-report/index.html +32 -32
- 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 +271 -265
- package/coverage/lcov-report/menu/MenuItem.tsx.html +292 -0
- package/coverage/lcov-report/menu/MenuVisibilityProvider.tsx.html +48 -33
- package/coverage/lcov-report/menu/index.html +45 -15
- 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 +161 -0
- package/coverage/lcov-report/searching/toSearchQuery.ts.html +139 -0
- package/coverage/lcov-report/searching/utils.ts.html +247 -0
- 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 +1 -1
- package/coverage/lcov-report/src/app-bar/AppBarTitle.tsx.html +1 -1
- package/coverage/lcov-report/src/app-bar/index.html +1 -1
- package/coverage/lcov-report/src/avatar/Avatar.tsx.html +1 -1
- 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 +1 -1
- package/coverage/lcov-report/src/box/styles.ts.html +1 -1
- package/coverage/lcov-report/src/button/AsyncButton.tsx.html +1 -1
- package/coverage/lcov-report/src/button/Button.tsx.html +1 -1
- package/coverage/lcov-report/src/button/ButtonUnstyled.tsx.html +1 -1
- package/coverage/lcov-report/src/button/FloatingActionButton.tsx.html +1 -1
- package/coverage/lcov-report/src/button/TooltippedButton.tsx.html +1 -1
- package/coverage/lcov-report/src/button/buttonStyles.ts.html +1 -1
- package/coverage/lcov-report/src/button/buttonUnstyledStyles.ts.html +1 -1
- package/coverage/lcov-report/src/button/index.html +1 -1
- package/coverage/lcov-report/src/card/Card.tsx.html +1 -1
- package/coverage/lcov-report/src/card/CardContent.tsx.html +1 -1
- 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 +1 -1
- package/coverage/lcov-report/src/card/index.html +1 -1
- package/coverage/lcov-report/src/card/styles.ts.html +1 -1
- package/coverage/lcov-report/src/chip/Chip.tsx.html +1 -1
- package/coverage/lcov-report/src/chip/index.html +1 -1
- package/coverage/lcov-report/src/chip/styles.ts.html +1 -1
- package/coverage/lcov-report/src/cssUtils.ts.html +53 -53
- package/coverage/lcov-report/src/delegateEvent.ts.html +1 -1
- 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 +1 -1
- package/coverage/lcov-report/src/dialog/styles.ts.html +1 -1
- package/coverage/lcov-report/src/divider/Divider.tsx.html +1 -1
- package/coverage/lcov-report/src/divider/index.html +1 -1
- package/coverage/lcov-report/src/divider/styles.ts.html +1 -1
- package/coverage/lcov-report/src/draggable/index.html +1 -1
- package/coverage/lcov-report/src/draggable/useDraggable.ts.html +1 -1
- package/coverage/lcov-report/src/draggable/utils.ts.html +1 -1
- 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 +1 -1
- package/coverage/lcov-report/src/expansion-panel/useExpansionList.ts.html +1 -1
- package/coverage/lcov-report/src/expansion-panel/useExpansionPanels.ts.html +1 -1
- 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 +1 -1
- package/coverage/lcov-report/src/form/FormMessageCounter.tsx.html +1 -1
- package/coverage/lcov-report/src/form/InputToggle.tsx.html +1 -1
- package/coverage/lcov-report/src/form/InputToggleIcon.tsx.html +56 -56
- package/coverage/lcov-report/src/form/Label.tsx.html +1 -1
- 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 +1 -1
- package/coverage/lcov-report/src/form/Select.tsx.html +894 -1146
- package/coverage/lcov-report/src/form/SelectValue.tsx.html +1 -1
- 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 +1 -1
- package/coverage/lcov-report/src/form/TextField.tsx.html +1 -1
- 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 +1 -1
- 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 +30 -900
- 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 +1 -1
- 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 +1 -1
- package/coverage/lcov-report/src/form/useRangeSlider.ts.html +1 -1
- package/coverage/lcov-report/src/form/useResizingTextArea.ts.html +1 -1
- 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 +1 -1
- package/coverage/lcov-report/src/hoverMode/useHoverModeProvider.ts.html +1 -1
- package/coverage/lcov-report/src/icon/FontIcon.tsx.html +28 -28
- package/coverage/lcov-report/src/icon/IconRotator.tsx.html +1 -1
- 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 +1 -1
- 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 +9 -354
- 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 +83 -83
- package/coverage/lcov-report/src/interaction/useHigherContrastChildren.tsx.html +7 -7
- 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 +1 -1
- package/coverage/lcov-report/src/layout/LayoutWindowSplitter.tsx.html +1 -1
- package/coverage/lcov-report/src/layout/Main.tsx.html +1 -1
- package/coverage/lcov-report/src/layout/index.html +1 -1
- package/coverage/lcov-report/src/layout/layoutNavStyles.ts.html +1 -1
- package/coverage/lcov-report/src/layout/layoutWindowSplitterStyles.ts.html +1 -1
- package/coverage/lcov-report/src/layout/mainStyles.ts.html +1 -1
- package/coverage/lcov-report/src/layout/useExpandableLayout.ts.html +1 -1
- package/coverage/lcov-report/src/layout/useHorizontalLayoutTransition.ts.html +1 -1
- package/coverage/lcov-report/src/layout/useLayoutAppBarHeight.ts.html +1 -1
- 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 +30 -30
- package/coverage/lcov-report/src/list/ListItem.tsx.html +124 -124
- package/coverage/lcov-report/src/list/ListItemAddon.tsx.html +35 -35
- package/coverage/lcov-report/src/list/ListItemChildren.tsx.html +79 -79
- package/coverage/lcov-report/src/list/ListItemLink.tsx.html +2 -2
- 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 +5 -5
- package/coverage/lcov-report/src/list/listItemStyles.ts.html +65 -65
- package/coverage/lcov-report/src/media-queries/AppSizeProvider.tsx.html +49 -49
- 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 +24 -24
- package/coverage/lcov-report/src/menu/DropdownMenu.tsx.html +1 -1
- package/coverage/lcov-report/src/menu/Menu.tsx.html +3 -3
- 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/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 +1 -1
- 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 +1 -1
- 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 +1 -1
- package/coverage/lcov-report/src/portal/PortalContainerProvider.tsx.html +36 -36
- package/coverage/lcov-report/src/portal/index.html +1 -1
- package/coverage/lcov-report/src/positioning/constants.ts.html +1 -1
- package/coverage/lcov-report/src/positioning/createHorizontalPosition.ts.html +1 -1
- package/coverage/lcov-report/src/positioning/createVerticalPosition.ts.html +1 -1
- package/coverage/lcov-report/src/positioning/getFixedPosition.ts.html +1 -1
- package/coverage/lcov-report/src/positioning/index.html +1 -1
- package/coverage/lcov-report/src/positioning/useFixedPositioning.ts.html +1 -1
- package/coverage/lcov-report/src/positioning/utils.ts.html +1 -1
- package/coverage/lcov-report/src/progress/CircularProgress.tsx.html +81 -81
- package/coverage/lcov-report/src/progress/LinearProgress.tsx.html +1 -1
- package/coverage/lcov-report/src/progress/getProgressA11y.ts.html +1 -1
- package/coverage/lcov-report/src/progress/index.html +1 -1
- 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 +1 -1
- package/coverage/lcov-report/src/sheet/styles.ts.html +1 -1
- package/coverage/lcov-report/src/snackbar/DefaultToastRenderer.tsx.html +1 -1
- package/coverage/lcov-report/src/snackbar/Snackbar.tsx.html +1 -1
- package/coverage/lcov-report/src/snackbar/Toast.tsx.html +1 -1
- 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 +1 -1
- package/coverage/lcov-report/src/snackbar/ToastManager.tsx.html +1 -1
- package/coverage/lcov-report/src/snackbar/ToastManagerProvider.tsx.html +1 -1
- package/coverage/lcov-report/src/snackbar/index.html +1 -1
- package/coverage/lcov-report/src/snackbar/snackbarStyles.ts.html +1 -1
- package/coverage/lcov-report/src/snackbar/toastContentStyles.ts.html +1 -1
- package/coverage/lcov-report/src/snackbar/toastStyles.ts.html +1 -1
- 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 +32 -32
- package/coverage/lcov-report/src/table/Table.tsx.html +1 -1
- package/coverage/lcov-report/src/table/TableBody.tsx.html +1 -1
- package/coverage/lcov-report/src/table/TableCell.tsx.html +1 -1
- package/coverage/lcov-report/src/table/TableCellContent.tsx.html +1 -1
- package/coverage/lcov-report/src/table/TableCheckbox.tsx.html +1 -1
- package/coverage/lcov-report/src/table/TableConfigurationProvider.tsx.html +1 -1
- package/coverage/lcov-report/src/table/TableContainer.tsx.html +1 -1
- package/coverage/lcov-report/src/table/TableContainerProvider.tsx.html +1 -1
- package/coverage/lcov-report/src/table/TableFooter.tsx.html +1 -1
- package/coverage/lcov-report/src/table/TableHeader.tsx.html +1 -1
- package/coverage/lcov-report/src/table/TableRadio.tsx.html +1 -1
- package/coverage/lcov-report/src/table/TableRow.tsx.html +1 -1
- package/coverage/lcov-report/src/table/index.html +1 -1
- package/coverage/lcov-report/src/table/tableCellStyles.ts.html +1 -1
- package/coverage/lcov-report/src/table/tableContainerStyles.ts.html +1 -1
- package/coverage/lcov-report/src/table/tableFooterStyles.ts.html +1 -1
- package/coverage/lcov-report/src/table/tableHeaderStyles.ts.html +1 -1
- package/coverage/lcov-report/src/table/tableRowStyles.ts.html +1 -1
- package/coverage/lcov-report/src/table/tableStyles.ts.html +1 -1
- package/coverage/lcov-report/src/tabs/Tab.tsx.html +1 -1
- 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 +1 -1
- package/coverage/lcov-report/src/tabs/tabIndicatorStyles.ts.html +1 -1
- package/coverage/lcov-report/src/tabs/tabListScrollButtonStyles.ts.html +1 -1
- package/coverage/lcov-report/src/tabs/tabListStyles.ts.html +1 -1
- package/coverage/lcov-report/src/tabs/tabStyles.ts.html +1 -1
- package/coverage/lcov-report/src/tabs/useTabList.ts.html +1 -1
- package/coverage/lcov-report/src/tabs/useTabs.ts.html +1 -1
- package/coverage/lcov-report/src/tabs/utils.ts.html +1 -1
- package/coverage/lcov-report/src/test-utils/IntersectionObserver.ts.html +1 -1
- package/coverage/lcov-report/src/test-utils/ResizeObserver.ts.html +1 -1
- 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 +7 -7
- package/coverage/lcov-report/src/test-utils/jest-setup.ts.html +9 -9
- package/coverage/lcov-report/src/test-utils/matchMedia.ts.html +4 -4
- 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 +1 -1
- 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 +1 -1
- package/coverage/lcov-report/src/tooltip/TooltipHoverModeProvider.tsx.html +1 -1
- package/coverage/lcov-report/src/tooltip/constants.ts.html +1 -1
- package/coverage/lcov-report/src/tooltip/index.html +1 -1
- package/coverage/lcov-report/src/tooltip/tooltipStyles.ts.html +1 -1
- package/coverage/lcov-report/src/tooltip/useTooltip.ts.html +1 -1
- package/coverage/lcov-report/src/tooltip/useTooltipPosition.ts.html +1 -1
- package/coverage/lcov-report/src/tooltip/utils.ts.html +1 -1
- 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 +1 -1
- 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 +13 -13
- package/coverage/lcov-report/src/transition/config.ts.html +3 -3
- package/coverage/lcov-report/src/transition/index.html +7 -7
- package/coverage/lcov-report/src/transition/maxWidthTransition.ts.html +1 -1
- package/coverage/lcov-report/src/transition/skeletonPlaceholderUtils.ts.html +1 -1
- package/coverage/lcov-report/src/transition/useCSSTransition.ts.html +1 -1
- package/coverage/lcov-report/src/transition/useCarousel.ts.html +1 -1
- package/coverage/lcov-report/src/transition/useCollapseTransition.ts.html +96 -150
- 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 +1 -1
- package/coverage/lcov-report/src/transition/useSkeletonPlaceholder.ts.html +1 -1
- package/coverage/lcov-report/src/transition/useSlideTransition.ts.html +1 -1
- package/coverage/lcov-report/src/transition/useTransition.ts.html +152 -152
- package/coverage/lcov-report/src/transition/utils.ts.html +14 -14
- package/coverage/lcov-report/src/tree/DefaultTreeItemRenderer.tsx.html +1 -1
- package/coverage/lcov-report/src/tree/Tree.tsx.html +1 -1
- package/coverage/lcov-report/src/tree/TreeGroup.tsx.html +45 -45
- package/coverage/lcov-report/src/tree/TreeItem.tsx.html +1 -1
- package/coverage/lcov-report/src/tree/TreeItemExpander.tsx.html +1 -1
- package/coverage/lcov-report/src/tree/TreeProvider.tsx.html +8 -8
- package/coverage/lcov-report/src/tree/index.html +1 -1
- package/coverage/lcov-report/src/tree/styles.ts.html +5 -5
- 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 +1 -1
- 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 +1 -1
- package/coverage/lcov-report/src/useDropzone.ts.html +1 -1
- package/coverage/lcov-report/src/useElementSize.ts.html +1 -1
- package/coverage/lcov-report/src/useEnsuredId.ts.html +8 -8
- package/coverage/lcov-report/src/useEnsuredRef.ts.html +11 -11
- 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 +32 -32
- package/coverage/lcov-report/src/usePageInactive.ts.html +1 -1
- package/coverage/lcov-report/src/useResizeListener.ts.html +1 -1
- package/coverage/lcov-report/src/useResizeObserver.ts.html +23 -23
- package/coverage/lcov-report/src/useThrottledFunction.ts.html +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- package/coverage/lcov-report/src/utils/getPercentage.ts.html +1 -1
- package/coverage/lcov-report/src/utils/getRangeDefaultValue.ts.html +1 -1
- package/coverage/lcov-report/src/utils/getRangeSteps.ts.html +1 -1
- package/coverage/lcov-report/src/utils/identity.ts.html +1 -1
- package/coverage/lcov-report/src/utils/index.html +13 -268
- package/coverage/lcov-report/src/utils/isElementVisible.ts.html +1 -1
- package/coverage/lcov-report/src/utils/loop.ts.html +1 -1
- package/coverage/lcov-report/src/utils/nearest.ts.html +1 -1
- package/coverage/lcov-report/src/utils/parseCssLengthUnit.ts.html +1 -1
- package/coverage/lcov-report/src/utils/randomInt.ts.html +1 -1
- 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 +1 -1
- package/coverage/lcov-report/src/window-splitter/useWindowSplitter.ts.html +1 -1
- package/coverage/lcov-report/transition/config.ts.html +5 -5
- package/coverage/lcov-report/transition/index.html +1 -1
- package/coverage/lcov-report/transition/useScaleTransition.ts.html +535 -0
- 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/utils/alphaNumericSort.ts.html +11 -50
- package/coverage/lcov-report/utils/filters.ts.html +1056 -201
- package/coverage/lcov-report/utils/index.html +10 -10
- package/coverage/lcov-report/utils/searching.ts.html +85 -0
- package/coverage/lcov-report/utils.ts.html +109 -277
- package/coverage/lcov.info +900 -363
- package/dist/RootHtml.d.ts +62 -0
- package/dist/RootHtml.js +49 -0
- package/dist/RootHtml.js.map +1 -0
- package/dist/_core.scss +49 -43
- package/dist/avatar/Avatar.d.ts +14 -0
- package/dist/avatar/Avatar.js +5 -2
- package/dist/avatar/Avatar.js.map +1 -1
- package/dist/badge/_badge.scss +23 -19
- 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/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/Select.d.ts +105 -15
- package/dist/form/Select.js +160 -249
- 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/TextField.d.ts +2 -2
- package/dist/form/TextField.js.map +1 -1
- package/dist/form/_form.scss +47 -29
- 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/types.d.ts +6 -6
- 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 +1 -0
- package/dist/form/useListboxProvider.js +1 -0
- package/dist/form/useListboxProvider.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/_icon.scss +7 -5
- package/dist/index.d.ts +15 -1
- package/dist/index.js +15 -1
- package/dist/index.js.map +1 -1
- package/dist/interaction/_interaction.scss +56 -44
- package/dist/list/types.d.ts +10 -1
- package/dist/list/types.js.map +1 -1
- package/dist/menu/Menu.js +12 -1
- package/dist/menu/Menu.js.map +1 -1
- package/dist/menu/_menu.scss +1 -0
- 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/positioning/useFixedPositioning.js +0 -8
- package/dist/positioning/useFixedPositioning.js.map +1 -1
- 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 +5 -0
- package/dist/searching/toSearchQuery.js +13 -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/utils.d.ts +21 -0
- package/dist/searching/utils.js +28 -0
- package/dist/searching/utils.js.map +1 -0
- package/dist/test-utils/IntersectionObserver.d.ts +12 -0
- package/dist/test-utils/ResizeObserver.d.ts +172 -0
- 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/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 +192 -34
- 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/utils.js +7 -2
- package/dist/transition/utils.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/_typography.scss +65 -25
- package/dist/useEnsuredState.d.ts +1 -1
- package/dist/useEnsuredState.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/jest.config.ts +4 -0
- package/package.json +21 -20
- 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/_core.scss +49 -43
- package/src/avatar/Avatar.tsx +24 -3
- package/src/avatar/__tests__/Avatar.tsx +1 -1
- package/src/avatar/__tests__/__snapshots__/Avatar.tsx.snap +6 -6
- package/src/badge/_badge.scss +23 -19
- package/src/button/__tests__/__snapshots__/Button.tsx.snap +1 -1
- package/src/dialog/FixedDialog.tsx +5 -4
- package/src/form/MenuItemInputToggle.tsx +46 -64
- package/src/form/NativeSelect.tsx +6 -3
- package/src/form/Option.tsx +8 -2
- package/src/form/Select.tsx +251 -335
- package/src/form/SelectedOption.tsx +55 -0
- package/src/form/TextField.tsx +2 -2
- 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__/__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__/useFormReset.tsx +195 -0
- package/src/form/_form.scss +47 -29
- package/src/form/menuItemInputToggleStyles.ts +78 -0
- package/src/form/selectUtils.ts +3 -14
- package/src/form/types.ts +6 -6
- 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 +2 -0
- package/src/form/useSelectCombobox.ts +70 -0
- package/src/form/utils.ts +17 -4
- package/src/icon/_icon.scss +7 -5
- package/src/index.ts +15 -1
- package/src/interaction/_interaction.scss +56 -44
- package/src/list/types.ts +12 -1
- package/src/menu/Menu.tsx +9 -1
- package/src/menu/__tests__/__snapshots__/useContextMenu.tsx.snap +54 -0
- package/src/menu/__tests__/useContextMenu.tsx +41 -0
- package/src/menu/_menu.scss +1 -0
- 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/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/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/caseInsensitive.ts +200 -0
- package/src/searching/fuzzy.ts +175 -0
- package/src/searching/toSearchQuery.ts +18 -0
- package/src/searching/types.ts +34 -0
- package/src/searching/utils.ts +54 -0
- package/src/test-utils/data-testid.ts +5 -1
- 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 +192 -34
- package/src/transition/__tests__/utils.ts +25 -0
- package/src/transition/useCollapseTransition.ts +6 -24
- package/src/transition/utils.ts +10 -5
- package/src/typography/SrOnly.tsx +9 -9
- package/src/typography/Typography.tsx +19 -19
- package/src/typography/__tests__/__snapshots__/SrOnly.tsx.snap +5 -5
- package/src/typography/_typography.scss +65 -25
- package/src/useEnsuredState.ts +1 -1
- package/src/utils/alphaNumericSort.ts +3 -16
- package/tsconfig.json +2 -2
- package/tsconfig.types.json +1 -1
- package/dist/form/SelectValue.d.ts +0 -17
- package/dist/form/SelectValue.js +0 -32
- package/dist/form/SelectValue.js.map +0 -1
- package/dist/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/filters.ts +0 -320
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { type HTMLAttributes, type HtmlHTMLAttributes, type ReactElement, type ReactNode } from "react";
|
|
2
|
+
import { type PropsWithRef } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* @remarks \@since 6.0.0
|
|
5
|
+
*/
|
|
6
|
+
export interface RootHtmlProps extends HtmlHTMLAttributes<HTMLHtmlElement> {
|
|
7
|
+
/** @defaultValue `"ltr"` */
|
|
8
|
+
dir?: string;
|
|
9
|
+
/** @defaultValue `"en"` */
|
|
10
|
+
lang?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Any additional props to provide to the `<body>` element and also supports a
|
|
13
|
+
* `ref` if that is required for some reason. Using a `ref` would make your
|
|
14
|
+
* root layout a client component though.
|
|
15
|
+
*/
|
|
16
|
+
bodyProps?: PropsWithRef<HTMLAttributes<HTMLBodyElement>, HTMLBodyElement>;
|
|
17
|
+
/**
|
|
18
|
+
* Convenience prop to replace `bodyProps={{ className: "custom-class-name" }}`.
|
|
19
|
+
*/
|
|
20
|
+
bodyClassName?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Any content to render before the `<body>` tag. This can be useful if you
|
|
23
|
+
* need to render a custom `<head>` element.
|
|
24
|
+
*/
|
|
25
|
+
beforeBodyChildren?: ReactNode;
|
|
26
|
+
/**
|
|
27
|
+
* Any content to render after the `<body>` tag. This can be useful to insert
|
|
28
|
+
* `<script>` tags for analytics or other external libraries.
|
|
29
|
+
*/
|
|
30
|
+
afterBodyChildren?: ReactNode;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* **Server Component**
|
|
34
|
+
*
|
|
35
|
+
* This is mostly for creating the root html for next.js applications that
|
|
36
|
+
* defaults to setting the `dir="ltr"` and `lang="en"`. Additional props can be
|
|
37
|
+
* passed to the root `<html>` and `<body>` elements and children can be
|
|
38
|
+
* rendered before and after the `<body>` if needed.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* Simple Example
|
|
42
|
+
* ```tsx
|
|
43
|
+
* // src/app/layout.tsx
|
|
44
|
+
* import { RootHtml } from "@react-md/core";
|
|
45
|
+
* import { type ReactElement, type PropsWithChildren } from "react";
|
|
46
|
+
* import { Roboto_Flex } from "next/font/google";
|
|
47
|
+
*
|
|
48
|
+
* const roboto = Roboto_Flex({
|
|
49
|
+
* subsets: ["latin"],
|
|
50
|
+
* variable: "--roboto",
|
|
51
|
+
* });
|
|
52
|
+
*
|
|
53
|
+
* export default function RootLayout(props: PropsWithChildren): ReactElement {
|
|
54
|
+
* const { children } = props;
|
|
55
|
+
*
|
|
56
|
+
* return <RootHtml className={roboto.variable}>{children}</RootHtml>;
|
|
57
|
+
* }
|
|
58
|
+
* ```
|
|
59
|
+
*
|
|
60
|
+
* @remarks \@since 6.0.0
|
|
61
|
+
*/
|
|
62
|
+
export declare function RootHtml(props: RootHtmlProps): ReactElement;
|
package/dist/RootHtml.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* **Server Component**
|
|
4
|
+
*
|
|
5
|
+
* This is mostly for creating the root html for next.js applications that
|
|
6
|
+
* defaults to setting the `dir="ltr"` and `lang="en"`. Additional props can be
|
|
7
|
+
* passed to the root `<html>` and `<body>` elements and children can be
|
|
8
|
+
* rendered before and after the `<body>` if needed.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* Simple Example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* // src/app/layout.tsx
|
|
14
|
+
* import { RootHtml } from "@react-md/core";
|
|
15
|
+
* import { type ReactElement, type PropsWithChildren } from "react";
|
|
16
|
+
* import { Roboto_Flex } from "next/font/google";
|
|
17
|
+
*
|
|
18
|
+
* const roboto = Roboto_Flex({
|
|
19
|
+
* subsets: ["latin"],
|
|
20
|
+
* variable: "--roboto",
|
|
21
|
+
* });
|
|
22
|
+
*
|
|
23
|
+
* export default function RootLayout(props: PropsWithChildren): ReactElement {
|
|
24
|
+
* const { children } = props;
|
|
25
|
+
*
|
|
26
|
+
* return <RootHtml className={roboto.variable}>{children}</RootHtml>;
|
|
27
|
+
* }
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* @remarks \@since 6.0.0
|
|
31
|
+
*/ export function RootHtml(props) {
|
|
32
|
+
const { dir = "ltr", lang = "en", children, bodyProps, bodyClassName, beforeBodyChildren, afterBodyChildren, ...remaining } = props;
|
|
33
|
+
return /*#__PURE__*/ _jsxs("html", {
|
|
34
|
+
dir: dir,
|
|
35
|
+
lang: lang,
|
|
36
|
+
...remaining,
|
|
37
|
+
children: [
|
|
38
|
+
beforeBodyChildren,
|
|
39
|
+
/*#__PURE__*/ _jsx("body", {
|
|
40
|
+
...bodyProps,
|
|
41
|
+
className: bodyClassName || bodyProps?.className,
|
|
42
|
+
children: children
|
|
43
|
+
}),
|
|
44
|
+
afterBodyChildren
|
|
45
|
+
]
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
//# sourceMappingURL=RootHtml.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/RootHtml.tsx"],"sourcesContent":["import {\n type HTMLAttributes,\n type HtmlHTMLAttributes,\n type ReactElement,\n type ReactNode,\n} from \"react\";\nimport { type PropsWithRef } from \"./types.js\";\n\n/**\n * @remarks \\@since 6.0.0\n */\nexport interface RootHtmlProps extends HtmlHTMLAttributes<HTMLHtmlElement> {\n /** @defaultValue `\"ltr\"` */\n dir?: string;\n\n /** @defaultValue `\"en\"` */\n lang?: string;\n\n /**\n * Any additional props to provide to the `<body>` element and also supports a\n * `ref` if that is required for some reason. Using a `ref` would make your\n * root layout a client component though.\n */\n bodyProps?: PropsWithRef<HTMLAttributes<HTMLBodyElement>, HTMLBodyElement>;\n\n /**\n * Convenience prop to replace `bodyProps={{ className: \"custom-class-name\" }}`.\n */\n bodyClassName?: string;\n\n /**\n * Any content to render before the `<body>` tag. This can be useful if you\n * need to render a custom `<head>` element.\n */\n beforeBodyChildren?: ReactNode;\n\n /**\n * Any content to render after the `<body>` tag. This can be useful to insert\n * `<script>` tags for analytics or other external libraries.\n */\n afterBodyChildren?: ReactNode;\n}\n\n/**\n * **Server Component**\n *\n * This is mostly for creating the root html for next.js applications that\n * defaults to setting the `dir=\"ltr\"` and `lang=\"en\"`. Additional props can be\n * passed to the root `<html>` and `<body>` elements and children can be\n * rendered before and after the `<body>` if needed.\n *\n * @example\n * Simple Example\n * ```tsx\n * // src/app/layout.tsx\n * import { RootHtml } from \"@react-md/core\";\n * import { type ReactElement, type PropsWithChildren } from \"react\";\n * import { Roboto_Flex } from \"next/font/google\";\n *\n * const roboto = Roboto_Flex({\n * subsets: [\"latin\"],\n * variable: \"--roboto\",\n * });\n *\n * export default function RootLayout(props: PropsWithChildren): ReactElement {\n * const { children } = props;\n *\n * return <RootHtml className={roboto.variable}>{children}</RootHtml>;\n * }\n * ```\n *\n * @remarks \\@since 6.0.0\n */\nexport function RootHtml(props: RootHtmlProps): ReactElement {\n const {\n dir = \"ltr\",\n lang = \"en\",\n children,\n bodyProps,\n bodyClassName,\n beforeBodyChildren,\n afterBodyChildren,\n ...remaining\n } = props;\n\n return (\n <html dir={dir} lang={lang} {...remaining}>\n {beforeBodyChildren}\n <body {...bodyProps} className={bodyClassName || bodyProps?.className}>\n {children}\n </body>\n {afterBodyChildren}\n </html>\n );\n}\n"],"names":["RootHtml","props","dir","lang","children","bodyProps","bodyClassName","beforeBodyChildren","afterBodyChildren","remaining","html","body","className"],"mappings":";AA2CA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BC,GACD,OAAO,SAASA,SAASC,KAAoB;IAC3C,MAAM,EACJC,MAAM,KAAK,EACXC,OAAO,IAAI,EACXC,QAAQ,EACRC,SAAS,EACTC,aAAa,EACbC,kBAAkB,EAClBC,iBAAiB,EACjB,GAAGC,WACJ,GAAGR;IAEJ,qBACE,MAACS;QAAKR,KAAKA;QAAKC,MAAMA;QAAO,GAAGM,SAAS;;YACtCF;0BACD,KAACI;gBAAM,GAAGN,SAAS;gBAAEO,WAAWN,iBAAiBD,WAAWO;0BACzDR;;YAEFI;;;AAGP"}
|
package/dist/_core.scss
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
@forward "icon/icon" as icon-*;
|
|
14
14
|
@forward "divider/divider" as divider-*;
|
|
15
15
|
@forward "progress/progress" as progress-*;
|
|
16
|
+
@forward "overlay/overlay" as overlay-*;
|
|
16
17
|
@forward "button/button" as button-*;
|
|
17
18
|
@forward "badge/badge" as badge-*;
|
|
18
19
|
@forward "tabs/tabs" as tabs-*;
|
|
@@ -21,7 +22,6 @@
|
|
|
21
22
|
@forward "table/table" as table-*;
|
|
22
23
|
@forward "app-bar/app-bar" as app-bar-*;
|
|
23
24
|
@forward "responsive-item/responsive-item" as responsive-item-*;
|
|
24
|
-
@forward "overlay/overlay" as overlay-*;
|
|
25
25
|
@forward "card/card" as card-*;
|
|
26
26
|
@forward "link/link" as link-*;
|
|
27
27
|
@forward "list/list" as list-*;
|
|
@@ -361,53 +361,59 @@ $_layer-order: (
|
|
|
361
361
|
@include typography.typography-variables;
|
|
362
362
|
}
|
|
363
363
|
|
|
364
|
-
@mixin styles
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
@
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
@
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
@
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
@include
|
|
381
|
-
@include
|
|
382
|
-
@include
|
|
383
|
-
@include
|
|
384
|
-
@include
|
|
385
|
-
@include
|
|
386
|
-
@include
|
|
387
|
-
@include
|
|
388
|
-
@include
|
|
389
|
-
@include
|
|
390
|
-
@include
|
|
391
|
-
@include
|
|
392
|
-
@include
|
|
393
|
-
@include
|
|
394
|
-
@include
|
|
395
|
-
@include
|
|
396
|
-
@include
|
|
397
|
-
@include
|
|
398
|
-
@include
|
|
399
|
-
@include
|
|
400
|
-
@include
|
|
364
|
+
@mixin styles(
|
|
365
|
+
$disable-layer: false,
|
|
366
|
+
$disable-layer-order: $disable-layer,
|
|
367
|
+
$disable-reset: false,
|
|
368
|
+
$disable-css-utils: false
|
|
369
|
+
) {
|
|
370
|
+
@if not $disable-layer-order {
|
|
371
|
+
@layer #{$_layer-order};
|
|
372
|
+
}
|
|
373
|
+
@if not $disable-reset {
|
|
374
|
+
@include css-reset;
|
|
375
|
+
}
|
|
376
|
+
@if not $disable-css-utils {
|
|
377
|
+
@include css-utils($disable-layer);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
@include app-bar.styles($disable-layer);
|
|
381
|
+
@include avatar.styles($disable-layer);
|
|
382
|
+
@include badge.styles($disable-layer);
|
|
383
|
+
@include box.styles($disable-layer);
|
|
384
|
+
@include button.styles($disable-layer);
|
|
385
|
+
@include card.styles($disable-layer);
|
|
386
|
+
@include chip.styles($disable-layer);
|
|
387
|
+
@include dialog.styles($disable-layer);
|
|
388
|
+
@include divider.styles($disable-layer);
|
|
389
|
+
@include draggable.styles($disable-layer);
|
|
390
|
+
@include expansion-panel.styles($disable-layer);
|
|
391
|
+
@include form.styles($disable-layer);
|
|
392
|
+
@include icon.styles($disable-layer);
|
|
393
|
+
@include interaction.styles($disable-layer);
|
|
394
|
+
@include layout.styles($disable-layer);
|
|
395
|
+
@include link.styles($disable-layer);
|
|
396
|
+
@include list.styles($disable-layer);
|
|
397
|
+
@include menu.styles($disable-layer);
|
|
398
|
+
@include overlay.styles($disable-layer);
|
|
399
|
+
@include progress.styles($disable-layer);
|
|
400
|
+
@include responsive-item.styles($disable-layer);
|
|
401
|
+
@include segmented-button.styles($disable-layer);
|
|
402
|
+
@include sheet.styles($disable-layer);
|
|
403
|
+
@include snackbar.styles($disable-layer);
|
|
404
|
+
@include table.styles($disable-layer);
|
|
405
|
+
@include tabs.styles($disable-layer);
|
|
406
|
+
@include tooltip.styles($disable-layer);
|
|
407
|
+
@include transition.transition-styles($disable-layer);
|
|
408
|
+
@include tree.styles($disable-layer);
|
|
409
|
+
@include typography.typography-styles($disable-layer);
|
|
410
|
+
@include window-splitter.styles($disable-layer);
|
|
401
411
|
|
|
402
412
|
@if not theme.$disable-default-root-theme {
|
|
403
413
|
:root {
|
|
404
414
|
@include variables;
|
|
405
415
|
|
|
406
|
-
@if
|
|
407
|
-
theme.$disable-default-system-theme and
|
|
408
|
-
theme.$color-scheme ==
|
|
409
|
-
system
|
|
410
|
-
{
|
|
416
|
+
@if theme.$color-scheme == system {
|
|
411
417
|
@media (prefers-color-scheme: dark) {
|
|
412
418
|
@include use-dark-theme;
|
|
413
419
|
}
|
package/dist/avatar/Avatar.d.ts
CHANGED
|
@@ -12,7 +12,18 @@ declare module "react" {
|
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
export type AvatarImgAttributes = ImgHTMLAttributes<HTMLImageElement>;
|
|
15
|
+
/**
|
|
16
|
+
* @remarks \@since 6.0.0 `aria-hidden` is set to `true` by default and removed
|
|
17
|
+
* the `role="presentation"`.
|
|
18
|
+
*/
|
|
15
19
|
export interface AvatarProps extends Omit<HTMLAttributes<HTMLSpanElement>, "color">, AvatarClassNameOptions {
|
|
20
|
+
/**
|
|
21
|
+
* Since avatars are normally presentational data, they are hidden from screen
|
|
22
|
+
* readers by default.
|
|
23
|
+
*
|
|
24
|
+
* @defaultValue `true`
|
|
25
|
+
*/
|
|
26
|
+
"aria-hidden"?: HTMLAttributes<HTMLSpanElement>["aria-hidden"];
|
|
16
27
|
/**
|
|
17
28
|
* This should be an image `src` attribute to create an avatar from. When this
|
|
18
29
|
* prop is defined, you should not add any children to the avatar as the
|
|
@@ -71,5 +82,8 @@ export interface AvatarProps extends Omit<HTMLAttributes<HTMLSpanElement>, "colo
|
|
|
71
82
|
* return <Avatar src="/path-to-img.png" />;
|
|
72
83
|
* }
|
|
73
84
|
* ```
|
|
85
|
+
*
|
|
86
|
+
* @remarks \@since 6.0.0 `aria-hidden` is set to `true` by default and removed
|
|
87
|
+
* the `role="presentation"`.
|
|
74
88
|
*/
|
|
75
89
|
export declare const Avatar: import("react").ForwardRefExoticComponent<AvatarProps & import("react").RefAttributes<HTMLSpanElement>>;
|
package/dist/avatar/Avatar.js
CHANGED
|
@@ -19,8 +19,11 @@ import { avatar, avatarImage } from "./styles.js";
|
|
|
19
19
|
* return <Avatar src="/path-to-img.png" />;
|
|
20
20
|
* }
|
|
21
21
|
* ```
|
|
22
|
+
*
|
|
23
|
+
* @remarks \@since 6.0.0 `aria-hidden` is set to `true` by default and removed
|
|
24
|
+
* the `role="presentation"`.
|
|
22
25
|
*/ export const Avatar = /*#__PURE__*/ forwardRef(function Avatar(props, ref) {
|
|
23
|
-
const { className, children, src, alt = "", size = "avatar", color = "", theme, imgProps, referrerPolicy, ...remaining } = props;
|
|
26
|
+
const { "aria-hidden": ariaHidden = true, className, children, src, alt = "", size = "avatar", color = "", theme, imgProps, referrerPolicy, ...remaining } = props;
|
|
24
27
|
let img;
|
|
25
28
|
if (src || imgProps) {
|
|
26
29
|
img = /*#__PURE__*/ _jsx("img", {
|
|
@@ -35,8 +38,8 @@ import { avatar, avatarImage } from "./styles.js";
|
|
|
35
38
|
}
|
|
36
39
|
return /*#__PURE__*/ _jsxs("span", {
|
|
37
40
|
...remaining,
|
|
41
|
+
"aria-hidden": ariaHidden,
|
|
38
42
|
ref: ref,
|
|
39
|
-
role: "presentation",
|
|
40
43
|
className: avatar({
|
|
41
44
|
size,
|
|
42
45
|
color,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/avatar/Avatar.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../src/avatar/Avatar.tsx"],"sourcesContent":["import {\n forwardRef,\n type HTMLAttributes,\n type ImgHTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { avatar, avatarImage, type AvatarClassNameOptions } from \"./styles.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-avatar-background-color\"?: string;\n \"--rmd-avatar-color\"?: string;\n \"--rmd-avatar-border-color\"?: string;\n \"--rmd-avatar-border-radius\"?: string | number;\n \"--rmd-avatar-size\"?: string | number;\n \"--rmd-avatar-font-size\"?: string | number;\n }\n}\n\nexport type AvatarImgAttributes = ImgHTMLAttributes<HTMLImageElement>;\n\n/**\n * @remarks \\@since 6.0.0 `aria-hidden` is set to `true` by default and removed\n * the `role=\"presentation\"`.\n */\nexport interface AvatarProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, \"color\">,\n AvatarClassNameOptions {\n /**\n * Since avatars are normally presentational data, they are hidden from screen\n * readers by default.\n *\n * @defaultValue `true`\n */\n \"aria-hidden\"?: HTMLAttributes<HTMLSpanElement>[\"aria-hidden\"];\n\n /**\n * This should be an image `src` attribute to create an avatar from. When this\n * prop is defined, you should not add any children to the avatar as the\n * positioning will break.\n */\n src?: string;\n\n /**\n * An optional alt tag to display on the `<img>` when the `src` prop is also\n * applied.\n *\n * For accessibility and screen readers, you normally do not want to actually\n * provide this prop. This should only be used if the `Avatar` is not\n * accompanied by some other component or main content as it will be extra\n * noise for screen readers.\n *\n * @defaultValue `\"\"`\n */\n alt?: string;\n\n /**\n * An optional `referrerPolicy` to provide to the `<img>` element if the `src`\n * or `imgProps` props are provided.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-referrerpolicy|Referrer Policy}\n *\n * @remarks \\@since 2.2.0\n */\n referrerPolicy?: AvatarImgAttributes[\"referrerPolicy\"];\n\n /**\n * An optional object of image props and ref that can be used to create an\n * image within the `Avatar`. This can be useful to add a custom `style`\n * or`className` to the `<img>` element if that additional customization is\n * needed.\n *\n * Note: The values in this object will override the `src`, `alt`, and\n * `referrerPolicy` root level avatar props if they exist on this object.\n *\n * @remarks \\@since 2.2.0\n */\n imgProps?: PropsWithRef<AvatarImgAttributes, HTMLImageElement>;\n}\n\n/**\n * **Server Component**\n *\n * An `Avatar` is generally used to represent objects or people within your app.\n * The avatar can consist of an image, an icon, or some text to display. When\n * the avatar is not an image, different themes can be applied to make the\n * avatar more unique.\n *\n * @example\n * Simple Example\n * ```tsx\n * import { Avatar } from \"@react-md/core\";\n * import { type ReactElement } from \"react\";\n *\n * export function Example(): ReactElement {\n * return <Avatar src=\"/path-to-img.png\" />;\n * }\n * ```\n *\n * @remarks \\@since 6.0.0 `aria-hidden` is set to `true` by default and removed\n * the `role=\"presentation\"`.\n */\nexport const Avatar = forwardRef<HTMLSpanElement, AvatarProps>(\n function Avatar(props, ref) {\n const {\n \"aria-hidden\": ariaHidden = true,\n className,\n children,\n src,\n alt = \"\",\n size = \"avatar\",\n color = \"\",\n theme,\n imgProps,\n referrerPolicy,\n ...remaining\n } = props;\n\n let img: ReactNode;\n if (src || imgProps) {\n img = (\n <img\n src={src}\n alt={alt}\n referrerPolicy={referrerPolicy}\n {...imgProps}\n className={avatarImage({ className: imgProps?.className })}\n />\n );\n }\n\n return (\n <span\n {...remaining}\n aria-hidden={ariaHidden}\n ref={ref}\n className={avatar({\n size,\n color,\n theme,\n className,\n })}\n >\n {img}\n {children}\n </span>\n );\n }\n);\n"],"names":["forwardRef","avatar","avatarImage","Avatar","props","ref","ariaHidden","className","children","src","alt","size","color","theme","imgProps","referrerPolicy","remaining","img","span","aria-hidden"],"mappings":";AAAA,SACEA,UAAU,QAIL,QAAQ;AAEf,SAASC,MAAM,EAAEC,WAAW,QAAqC,cAAc;AA0E/E;;;;;;;;;;;;;;;;;;;;;CAqBC,GACD,OAAO,MAAMC,uBAASH,WACpB,SAASG,OAAOC,KAAK,EAAEC,GAAG;IACxB,MAAM,EACJ,eAAeC,aAAa,IAAI,EAChCC,SAAS,EACTC,QAAQ,EACRC,GAAG,EACHC,MAAM,EAAE,EACRC,OAAO,QAAQ,EACfC,QAAQ,EAAE,EACVC,KAAK,EACLC,QAAQ,EACRC,cAAc,EACd,GAAGC,WACJ,GAAGZ;IAEJ,IAAIa;IACJ,IAAIR,OAAOK,UAAU;QACnBG,oBACE,KAACA;YACCR,KAAKA;YACLC,KAAKA;YACLK,gBAAgBA;YACf,GAAGD,QAAQ;YACZP,WAAWL,YAAY;gBAAEK,WAAWO,UAAUP;YAAU;;IAG9D;IAEA,qBACE,MAACW;QACE,GAAGF,SAAS;QACbG,eAAab;QACbD,KAAKA;QACLE,WAAWN,OAAO;YAChBU;YACAC;YACAC;YACAN;QACF;;YAECU;YACAT;;;AAGP,GACA"}
|
package/dist/badge/_badge.scss
CHANGED
|
@@ -69,31 +69,35 @@ $variables: (
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
@mixin use-light-theme {
|
|
72
|
-
@if $
|
|
73
|
-
$
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
@
|
|
72
|
+
@if not $disable-everything {
|
|
73
|
+
@if $light-theme-greyscale-background-color !=
|
|
74
|
+
$dark-theme-greyscale-background-color
|
|
75
|
+
{
|
|
76
|
+
@include set-var(
|
|
77
|
+
greyscale-background-color,
|
|
78
|
+
$light-theme-greyscale-background-color
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
@if $light-theme-greyscale-color != $dark-theme-greyscale-color {
|
|
82
|
+
@include set-var(greyscale-color, $light-theme-greyscale-color);
|
|
83
|
+
}
|
|
82
84
|
}
|
|
83
85
|
}
|
|
84
86
|
|
|
85
87
|
@mixin use-dark-theme {
|
|
86
|
-
@if $
|
|
87
|
-
$
|
|
88
|
-
{
|
|
89
|
-
@include set-var(
|
|
90
|
-
greyscale-background-color,
|
|
88
|
+
@if not $disable-everything {
|
|
89
|
+
@if $light-theme-greyscale-background-color !=
|
|
91
90
|
$dark-theme-greyscale-background-color
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
{
|
|
92
|
+
@include set-var(
|
|
93
|
+
greyscale-background-color,
|
|
94
|
+
$dark-theme-greyscale-background-color
|
|
95
|
+
);
|
|
96
|
+
}
|
|
94
97
|
|
|
95
|
-
|
|
96
|
-
|
|
98
|
+
@if $light-theme-greyscale-color != $dark-theme-greyscale-color {
|
|
99
|
+
@include set-var(greyscale-color, $dark-theme-greyscale-color);
|
|
100
|
+
}
|
|
97
101
|
}
|
|
98
102
|
}
|
|
99
103
|
|
|
@@ -35,8 +35,7 @@ export declare const DEFAULT_FIXED_DIALOG_CLASSNAMES: Readonly<CSSTransitionClas
|
|
|
35
35
|
* Typography,
|
|
36
36
|
* useToggle,
|
|
37
37
|
* } from "@react-md/core";
|
|
38
|
-
* import { useRef } from "react";
|
|
39
|
-
* import type { ReactElement } from "react";
|
|
38
|
+
* import { useId, useRef, type ReactElement } from "react";
|
|
40
39
|
*
|
|
41
40
|
* function Example(): ReactElement {
|
|
42
41
|
* const {
|
|
@@ -44,18 +43,20 @@ export declare const DEFAULT_FIXED_DIALOG_CLASSNAMES: Readonly<CSSTransitionClas
|
|
|
44
43
|
* disable: onRequestClose,
|
|
45
44
|
* toggled: visible,
|
|
46
45
|
* } = useToggle(false);
|
|
46
|
+
* const titleId = useId();
|
|
47
47
|
* const fixedTo = useRef<HTMLButtonElement>(null)
|
|
48
48
|
*
|
|
49
49
|
* return (
|
|
50
50
|
* <>
|
|
51
51
|
* <Button ref={fixedTo} onClick={toggle}>Toggle</Button>
|
|
52
52
|
* <FixedDialog
|
|
53
|
-
* aria-labelledby=
|
|
53
|
+
* aria-labelledby={titleId}
|
|
54
|
+
* fixedTo={fixedTo}
|
|
54
55
|
* visible={visible}
|
|
55
56
|
* onRequestClose={onRequestClose}
|
|
56
57
|
* >
|
|
57
58
|
* <DialogHeader>
|
|
58
|
-
* <DialogTitle id=
|
|
59
|
+
* <DialogTitle id={titleId}>Simple Dialog</DialogTitle>
|
|
59
60
|
* </DialogHeader>
|
|
60
61
|
* <DialogContent>
|
|
61
62
|
* <Typography margin="none">This is some text in a dialog.</Typography>
|
|
@@ -32,8 +32,7 @@ export const DEFAULT_FIXED_DIALOG_CLASSNAMES = {
|
|
|
32
32
|
* Typography,
|
|
33
33
|
* useToggle,
|
|
34
34
|
* } from "@react-md/core";
|
|
35
|
-
* import { useRef } from "react";
|
|
36
|
-
* import type { ReactElement } from "react";
|
|
35
|
+
* import { useId, useRef, type ReactElement } from "react";
|
|
37
36
|
*
|
|
38
37
|
* function Example(): ReactElement {
|
|
39
38
|
* const {
|
|
@@ -41,18 +40,20 @@ export const DEFAULT_FIXED_DIALOG_CLASSNAMES = {
|
|
|
41
40
|
* disable: onRequestClose,
|
|
42
41
|
* toggled: visible,
|
|
43
42
|
* } = useToggle(false);
|
|
43
|
+
* const titleId = useId();
|
|
44
44
|
* const fixedTo = useRef<HTMLButtonElement>(null)
|
|
45
45
|
*
|
|
46
46
|
* return (
|
|
47
47
|
* <>
|
|
48
48
|
* <Button ref={fixedTo} onClick={toggle}>Toggle</Button>
|
|
49
49
|
* <FixedDialog
|
|
50
|
-
* aria-labelledby=
|
|
50
|
+
* aria-labelledby={titleId}
|
|
51
|
+
* fixedTo={fixedTo}
|
|
51
52
|
* visible={visible}
|
|
52
53
|
* onRequestClose={onRequestClose}
|
|
53
54
|
* >
|
|
54
55
|
* <DialogHeader>
|
|
55
|
-
* <DialogTitle id=
|
|
56
|
+
* <DialogTitle id={titleId}>Simple Dialog</DialogTitle>
|
|
56
57
|
* </DialogHeader>
|
|
57
58
|
* <DialogContent>
|
|
58
59
|
* <Typography margin="none">This is some text in a dialog.</Typography>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/dialog/FixedDialog.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, useRef, type RefObject } from \"react\";\nimport { TOP_INNER_RIGHT_ANCHOR } from \"../positioning/constants.js\";\nimport {\n type CalculateFixedPositionOptions,\n type PositionAnchor,\n} from \"../positioning/types.js\";\nimport { useFixedPositioning } from \"../positioning/useFixedPositioning.js\";\nimport { type CSSTransitionClassNamesObject } from \"../transition/types.js\";\nimport { SCALE_CLASSNAMES } from \"../transition/useScaleTransition.js\";\nimport { type LabelRequiredForA11y } from \"../types.js\";\nimport { Dialog, type BaseDialogProps } from \"./Dialog.js\";\n\nexport interface BaseFixedDialogProps extends Omit<BaseDialogProps, \"type\"> {\n anchor?: PositionAnchor;\n fixedTo: RefObject<HTMLElement>;\n options?: CalculateFixedPositionOptions;\n getFixedPositionOptions?(): CalculateFixedPositionOptions;\n\n /**\n * @defaultValue `true`\n */\n overlayHidden?: boolean;\n\n /**\n * @defaultValue `true`\n */\n disableScrollLock?: boolean;\n}\n\nexport type FixedDialogProps = LabelRequiredForA11y<BaseFixedDialogProps>;\n\nconst noop = (): void => {\n // do nothing\n};\nexport const DEFAULT_FIXED_DIALOG_CLASSNAMES: Readonly<CSSTransitionClassNamesObject> =\n {\n appear: \"rmd-dialog--fixed-enter\",\n appearActive: \"rmd-dialog--fixed-enter-active\",\n enter: \"rmd-dialog--fixed-enter\",\n enterActive: \"rmd-dialog--fixed-enter-active\",\n exit: \"rmd-dialog--fixed-exit\",\n exitActive: \"rmd-dialog--fixed-exit-active\",\n };\n\n/**\n * **Client Component**\n *\n * @example\n * Simple Example\n * ```tsx\n * import {\n * Button,\n * DialogHeader,\n * DialogTitle,\n * DialogContent,\n * DialogFooter,\n * FixedDialog,\n * Typography,\n * useToggle,\n * } from \"@react-md/core\";\n * import { useRef
|
|
1
|
+
{"version":3,"sources":["../../src/dialog/FixedDialog.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, useRef, type RefObject } from \"react\";\nimport { TOP_INNER_RIGHT_ANCHOR } from \"../positioning/constants.js\";\nimport {\n type CalculateFixedPositionOptions,\n type PositionAnchor,\n} from \"../positioning/types.js\";\nimport { useFixedPositioning } from \"../positioning/useFixedPositioning.js\";\nimport { type CSSTransitionClassNamesObject } from \"../transition/types.js\";\nimport { SCALE_CLASSNAMES } from \"../transition/useScaleTransition.js\";\nimport { type LabelRequiredForA11y } from \"../types.js\";\nimport { Dialog, type BaseDialogProps } from \"./Dialog.js\";\n\nexport interface BaseFixedDialogProps extends Omit<BaseDialogProps, \"type\"> {\n anchor?: PositionAnchor;\n fixedTo: RefObject<HTMLElement>;\n options?: CalculateFixedPositionOptions;\n getFixedPositionOptions?(): CalculateFixedPositionOptions;\n\n /**\n * @defaultValue `true`\n */\n overlayHidden?: boolean;\n\n /**\n * @defaultValue `true`\n */\n disableScrollLock?: boolean;\n}\n\nexport type FixedDialogProps = LabelRequiredForA11y<BaseFixedDialogProps>;\n\nconst noop = (): void => {\n // do nothing\n};\nexport const DEFAULT_FIXED_DIALOG_CLASSNAMES: Readonly<CSSTransitionClassNamesObject> =\n {\n appear: \"rmd-dialog--fixed-enter\",\n appearActive: \"rmd-dialog--fixed-enter-active\",\n enter: \"rmd-dialog--fixed-enter\",\n enterActive: \"rmd-dialog--fixed-enter-active\",\n exit: \"rmd-dialog--fixed-exit\",\n exitActive: \"rmd-dialog--fixed-exit-active\",\n };\n\n/**\n * **Client Component**\n *\n * @example\n * Simple Example\n * ```tsx\n * import {\n * Button,\n * DialogHeader,\n * DialogTitle,\n * DialogContent,\n * DialogFooter,\n * FixedDialog,\n * Typography,\n * useToggle,\n * } from \"@react-md/core\";\n * import { useId, useRef, type ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * const {\n * toggle,\n * disable: onRequestClose,\n * toggled: visible,\n * } = useToggle(false);\n * const titleId = useId();\n * const fixedTo = useRef<HTMLButtonElement>(null)\n *\n * return (\n * <>\n * <Button ref={fixedTo} onClick={toggle}>Toggle</Button>\n * <FixedDialog\n * aria-labelledby={titleId}\n * fixedTo={fixedTo}\n * visible={visible}\n * onRequestClose={onRequestClose}\n * >\n * <DialogHeader>\n * <DialogTitle id={titleId}>Simple Dialog</DialogTitle>\n * </DialogHeader>\n * <DialogContent>\n * <Typography margin=\"none\">This is some text in a dialog.</Typography>\n * </DialogContent>\n * <DialogFooter>\n * <Button onClick={onRequestClose}>\n * Close\n * </Button>\n * </DialogFooter>\n * </FixedDialog>\n * </>\n * );\n * }\n * ```\n */\nexport const FixedDialog = forwardRef<HTMLDivElement, FixedDialogProps>(\n function FixedDialog(props, nodeRef) {\n const {\n fixedTo,\n style: propStyle,\n classNames = SCALE_CLASSNAMES,\n children,\n anchor = TOP_INNER_RIGHT_ANCHOR,\n options,\n getFixedPositionOptions,\n onEnter,\n onEntering,\n onEntered,\n onExited = noop,\n onRequestClose,\n overlayHidden = true,\n disableScrollLock = true,\n isFocusTypeDisabled = noop,\n ...remaining\n } = props;\n\n const disableExitFocus = useRef(false);\n const { ref, style, callbacks } = useFixedPositioning({\n nodeRef,\n style: propStyle,\n transformOrigin: true,\n onEnter,\n onEntering,\n onEntered,\n onExited() {\n onExited();\n disableExitFocus.current = false;\n },\n anchor,\n fixedTo,\n onScroll(_event, data) {\n if (!data.visible) {\n disableExitFocus.current = true;\n onRequestClose();\n }\n },\n ...options,\n getFixedPositionOptions,\n });\n\n return (\n <Dialog\n {...remaining}\n {...callbacks}\n ref={ref}\n type=\"custom\"\n fixed\n style={style}\n classNames={classNames}\n onRequestClose={onRequestClose}\n overlayHidden={overlayHidden}\n disableScrollLock={disableScrollLock}\n isFocusTypeDisabled={(type) =>\n isFocusTypeDisabled(type) ||\n (type === \"unmount\" && disableExitFocus.current)\n }\n >\n {children}\n </Dialog>\n );\n }\n);\n"],"names":["forwardRef","useRef","TOP_INNER_RIGHT_ANCHOR","useFixedPositioning","SCALE_CLASSNAMES","Dialog","noop","DEFAULT_FIXED_DIALOG_CLASSNAMES","appear","appearActive","enter","enterActive","exit","exitActive","FixedDialog","props","nodeRef","fixedTo","style","propStyle","classNames","children","anchor","options","getFixedPositionOptions","onEnter","onEntering","onEntered","onExited","onRequestClose","overlayHidden","disableScrollLock","isFocusTypeDisabled","remaining","disableExitFocus","ref","callbacks","transformOrigin","current","onScroll","_event","data","visible","type","fixed"],"mappings":"AAAA;;AACA,SAASA,UAAU,EAAEC,MAAM,QAAwB,QAAQ;AAC3D,SAASC,sBAAsB,QAAQ,8BAA8B;AAKrE,SAASC,mBAAmB,QAAQ,wCAAwC;AAE5E,SAASC,gBAAgB,QAAQ,sCAAsC;AAEvE,SAASC,MAAM,QAA8B,cAAc;AAqB3D,MAAMC,OAAO;AACX,aAAa;AACf;AACA,OAAO,MAAMC,kCACX;IACEC,QAAQ;IACRC,cAAc;IACdC,OAAO;IACPC,aAAa;IACbC,MAAM;IACNC,YAAY;AACd,EAAE;AAEJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDC,GACD,OAAO,MAAMC,4BAAcd,WACzB,SAASc,YAAYC,KAAK,EAAEC,OAAO;IACjC,MAAM,EACJC,OAAO,EACPC,OAAOC,SAAS,EAChBC,aAAahB,gBAAgB,EAC7BiB,QAAQ,EACRC,SAASpB,sBAAsB,EAC/BqB,OAAO,EACPC,uBAAuB,EACvBC,OAAO,EACPC,UAAU,EACVC,SAAS,EACTC,WAAWtB,IAAI,EACfuB,cAAc,EACdC,gBAAgB,IAAI,EACpBC,oBAAoB,IAAI,EACxBC,sBAAsB1B,IAAI,EAC1B,GAAG2B,WACJ,GAAGlB;IAEJ,MAAMmB,mBAAmBjC,OAAO;IAChC,MAAM,EAAEkC,GAAG,EAAEjB,KAAK,EAAEkB,SAAS,EAAE,GAAGjC,oBAAoB;QACpDa;QACAE,OAAOC;QACPkB,iBAAiB;QACjBZ;QACAC;QACAC;QACAC;YACEA;YACAM,iBAAiBI,OAAO,GAAG;QAC7B;QACAhB;QACAL;QACAsB,UAASC,MAAM,EAAEC,IAAI;YACnB,IAAI,CAACA,KAAKC,OAAO,EAAE;gBACjBR,iBAAiBI,OAAO,GAAG;gBAC3BT;YACF;QACF;QACA,GAAGN,OAAO;QACVC;IACF;IAEA,qBACE,KAACnB;QACE,GAAG4B,SAAS;QACZ,GAAGG,SAAS;QACbD,KAAKA;QACLQ,MAAK;QACLC,KAAK;QACL1B,OAAOA;QACPE,YAAYA;QACZS,gBAAgBA;QAChBC,eAAeA;QACfC,mBAAmBA;QACnBC,qBAAqB,CAACW,OACpBX,oBAAoBW,SACnBA,SAAS,aAAaT,iBAAiBI,OAAO;kBAGhDjB;;AAGP,GACA"}
|
|
@@ -1,23 +1,14 @@
|
|
|
1
1
|
import { type CSSProperties, type HTMLAttributes, type MouseEvent, type ReactNode } from "react";
|
|
2
|
-
import { type ListItemAddonPosition, type ListItemAddonType, type ListItemHeight } from "../list/types.js";
|
|
2
|
+
import { type ListItemAddonPosition, type ListItemAddonType, type ListItemChildrenTextProps, type ListItemHeight } from "../list/types.js";
|
|
3
3
|
import { type PropsWithRef } from "../types.js";
|
|
4
4
|
import { type IndeterminateCheckboxProps, type InputToggleIconProps } from "./InputToggle.js";
|
|
5
5
|
import { type InputToggleSize } from "./inputToggleStyles.js";
|
|
6
|
-
/** @remarks \@since 6.0.0 */
|
|
7
|
-
export interface MenuItemInputToggleClassNameOptions {
|
|
8
|
-
className?: string;
|
|
9
|
-
type: "radio" | "checkbox" | "switch";
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* @remarks \@since 6.0.0
|
|
13
|
-
*/
|
|
14
|
-
export declare function menuItemInputToggle(options: MenuItemInputToggleClassNameOptions): string;
|
|
15
6
|
/**
|
|
16
7
|
* @remarks \@since 6.0.0
|
|
17
8
|
*/
|
|
18
9
|
export type MenuItemInputToggleCheckedCallback = (checked: boolean, event: MouseEvent<HTMLLIElement>) => void;
|
|
19
10
|
/** @remarks \@since 2.8.0 */
|
|
20
|
-
export interface BaseMenuItemInputToggleProps extends HTMLAttributes<HTMLLIElement>, InputToggleIconProps {
|
|
11
|
+
export interface BaseMenuItemInputToggleProps extends HTMLAttributes<HTMLLIElement>, InputToggleIconProps, ListItemChildrenTextProps {
|
|
21
12
|
checked: boolean;
|
|
22
13
|
onCheckedChange: MenuItemInputToggleCheckedCallback;
|
|
23
14
|
/**
|
|
@@ -47,10 +38,6 @@ export interface BaseMenuItemInputToggleProps extends HTMLAttributes<HTMLLIEleme
|
|
|
47
38
|
/** @defaultValue `"auto"` */
|
|
48
39
|
height?: ListItemHeight;
|
|
49
40
|
/** @defaultValue `false` */
|
|
50
|
-
multiline?: boolean;
|
|
51
|
-
/** @defaultValue `false` */
|
|
52
|
-
disableTextChildren?: boolean;
|
|
53
|
-
/** @defaultValue `false` */
|
|
54
41
|
iconAfter?: boolean;
|
|
55
42
|
addon?: ReactNode;
|
|
56
43
|
addonType?: ListItemAddonType;
|
|
@@ -4,21 +4,12 @@ import { cnb } from "cnbuilder";
|
|
|
4
4
|
import { forwardRef } from "react";
|
|
5
5
|
import { ListItem } from "../list/ListItem.js";
|
|
6
6
|
import { useEnsuredId } from "../useEnsuredId.js";
|
|
7
|
-
import { bem } from "../utils/bem.js";
|
|
8
7
|
import { InputToggleIcon } from "./InputToggleIcon.js";
|
|
9
8
|
import { SwitchTrack } from "./SwitchTrack.js";
|
|
9
|
+
import { menuItemInputToggle, menuItemInputToggleBall, menuItemInputToggleIcon, menuItemInputToggleTrack } from "./menuItemInputToggleStyles.js";
|
|
10
10
|
const noop = ()=>{
|
|
11
11
|
// do nothing
|
|
12
12
|
};
|
|
13
|
-
const styles = bem("rmd-menu-item-input-toggle");
|
|
14
|
-
/**
|
|
15
|
-
* @remarks \@since 6.0.0
|
|
16
|
-
*/ export function menuItemInputToggle(options) {
|
|
17
|
-
const { className, type } = options;
|
|
18
|
-
return cnb(`rmd-${type}-menu-item`, styles({
|
|
19
|
-
switch: type === "switch"
|
|
20
|
-
}), className);
|
|
21
|
-
}
|
|
22
13
|
/**
|
|
23
14
|
* **Client Component**
|
|
24
15
|
*
|
|
@@ -34,33 +25,31 @@ const styles = bem("rmd-menu-item-input-toggle");
|
|
|
34
25
|
const { id: propId, type, disabled = false, checked, onCheckedChange, preventMenuHideOnClick = false, onClick = noop, className, tabIndex = -1, children, size = "auto", icon: propIcon, iconAfter = false, iconProps, iconStyle, iconClassName, checkedIcon, indeterminate, indeterminateIcon, addon, addonType, addonPosition, addonForceWrap, disableAddonCenteredMedia, ballProps, ballStyle, ballClassName, trackProps, trackStyle, trackClassName, ...remaining } = props;
|
|
35
26
|
const id = useEnsuredId(propId, "menu-item");
|
|
36
27
|
let icon = propIcon;
|
|
37
|
-
if (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
});
|
|
63
|
-
}
|
|
28
|
+
if (type === "switch") {
|
|
29
|
+
icon = /*#__PURE__*/ _jsx(SwitchTrack, {
|
|
30
|
+
style: trackStyle,
|
|
31
|
+
...trackProps,
|
|
32
|
+
className: cnb(menuItemInputToggleTrack(), trackClassName, trackProps?.className),
|
|
33
|
+
active: checked,
|
|
34
|
+
ballProps: ballProps,
|
|
35
|
+
ballStyle: ballStyle,
|
|
36
|
+
ballClassName: cnb(menuItemInputToggleBall(), ballClassName)
|
|
37
|
+
});
|
|
38
|
+
} else {
|
|
39
|
+
icon = /*#__PURE__*/ _jsx(InputToggleIcon, {
|
|
40
|
+
style: iconStyle,
|
|
41
|
+
disableEm: true,
|
|
42
|
+
...iconProps,
|
|
43
|
+
className: cnb(menuItemInputToggleIcon(), iconClassName, iconProps?.className),
|
|
44
|
+
size: size,
|
|
45
|
+
type: type,
|
|
46
|
+
checked: checked,
|
|
47
|
+
disabled: disabled,
|
|
48
|
+
icon: propIcon,
|
|
49
|
+
checkedIcon: checkedIcon,
|
|
50
|
+
indeterminate: indeterminate,
|
|
51
|
+
indeterminateIcon: indeterminateIcon
|
|
52
|
+
});
|
|
64
53
|
}
|
|
65
54
|
let leftAddon;
|
|
66
55
|
let leftAddonType;
|