@react-md/core 1.0.0-next.13 → 1.0.0-next.15
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/.eslintrc.cjs +8 -0
- package/.turbo/turbo-build.log +22 -22
- package/.turbo/turbo-lint.log +12 -0
- package/.turbo/turbo-test.log +5516 -0
- package/.turbo/turbo-typecheck.log +4 -0
- package/CHANGELOG.md +40 -0
- package/coverage/clover.xml +725 -141
- package/coverage/coverage-final.json +5 -4
- package/coverage/lcov-report/autocomplete/Autocomplete.tsx.html +876 -171
- package/coverage/lcov-report/{src/layout/LayoutCloseNavigationButton.tsx.html → autocomplete/AutocompleteClearButton.tsx.html} +54 -57
- package/coverage/lcov-report/{menu/MenuVisibilityProvider.tsx.html → autocomplete/FilterAutocompleteOptions.tsx.html} +147 -153
- package/coverage/lcov-report/autocomplete/index.html +35 -110
- package/coverage/lcov-report/button/Button.tsx.html +84 -84
- package/coverage/lcov-report/button/index.html +10 -10
- package/coverage/lcov-report/card/Card.tsx.html +5 -5
- package/coverage/lcov-report/{dialog/DialogTitle.tsx.html → card/CardSubtitle.tsx.html} +57 -48
- package/coverage/lcov-report/card/index.html +39 -9
- package/coverage/lcov-report/card/styles.ts.html +21 -33
- package/coverage/lcov-report/{src/positioning/createHorizontalPosition.ts.html → createHorizontalPosition.ts.html} +137 -137
- package/coverage/lcov-report/{src/positioning/createVerticalPosition.ts.html → createVerticalPosition.ts.html} +77 -77
- package/coverage/lcov-report/form/Option.tsx.html +141 -141
- package/coverage/lcov-report/form/index.html +28 -43
- package/coverage/lcov-report/form/useListboxProvider.ts.html +135 -96
- package/coverage/lcov-report/index.html +37 -22
- package/coverage/lcov-report/searching/fuzzy.ts.html +80 -83
- package/coverage/lcov-report/searching/index.html +13 -43
- package/coverage/lcov-report/src/card/Card.tsx.html +5 -5
- package/coverage/lcov-report/src/card/CardSubtitle.tsx.html +33 -6
- package/coverage/lcov-report/src/card/index.html +9 -84
- package/coverage/lcov-report/src/card/styles.ts.html +21 -33
- package/coverage/lcov-report/src/cssUtils.ts.html +65 -65
- package/coverage/lcov-report/src/index.html +21 -21
- package/coverage/lcov-report/src/transition/index.html +11 -311
- package/coverage/lcov-report/src/transition/useCSSTransition.ts.html +81 -81
- package/coverage/lcov-report/transition/index.html +12 -12
- package/coverage/lcov-report/{useCSSTransition.ts.html → transition/useCSSTransition.ts.html} +169 -166
- package/coverage/lcov-report/typography/SrOnly.tsx.html +52 -79
- package/coverage/lcov-report/typography/index.html +18 -18
- package/coverage/lcov-report/utils.ts.html +940 -97
- package/coverage/lcov.info +831 -181
- package/dist/CoreProviders.js.map +1 -1
- package/dist/NoSsr.js.map +1 -1
- package/dist/RootHtml.js.map +1 -1
- package/dist/SsrProvider.js.map +1 -1
- package/dist/_box-shadows.scss +7 -4
- package/dist/_core.scss +5 -1
- package/dist/_utils.scss +3 -3
- package/dist/app-bar/AppBar.js.map +1 -1
- package/dist/app-bar/AppBarTitle.d.ts +8 -4
- package/dist/app-bar/AppBarTitle.js +3 -2
- package/dist/app-bar/AppBarTitle.js.map +1 -1
- package/dist/autocomplete/Autocomplete.d.ts +85 -0
- package/dist/autocomplete/Autocomplete.js +138 -0
- package/dist/autocomplete/Autocomplete.js.map +1 -0
- package/dist/autocomplete/AutocompleteCircularProgress.d.ts +16 -0
- package/dist/autocomplete/AutocompleteCircularProgress.js +15 -0
- package/dist/autocomplete/AutocompleteCircularProgress.js.map +1 -0
- package/dist/autocomplete/AutocompleteDropdownButton.d.ts +32 -0
- package/dist/autocomplete/AutocompleteDropdownButton.js +29 -0
- package/dist/autocomplete/AutocompleteDropdownButton.js.map +1 -0
- package/dist/autocomplete/FilterAutocompleteOptions.d.ts +8 -0
- package/dist/autocomplete/FilterAutocompleteOptions.js +57 -0
- package/dist/autocomplete/FilterAutocompleteOptions.js.map +1 -0
- package/dist/autocomplete/_autocomplete.scss +75 -0
- package/dist/autocomplete/autocompleteStyles.d.ts +32 -0
- package/dist/autocomplete/autocompleteStyles.js +34 -0
- package/dist/autocomplete/autocompleteStyles.js.map +1 -0
- package/dist/autocomplete/defaults.d.ts +21 -0
- package/dist/autocomplete/defaults.js +52 -0
- package/dist/autocomplete/defaults.js.map +1 -0
- package/dist/autocomplete/types.d.ts +103 -0
- package/dist/autocomplete/types.js +5 -0
- package/dist/autocomplete/types.js.map +1 -0
- package/dist/avatar/Avatar.d.ts +1 -2
- package/dist/avatar/Avatar.js +1 -2
- package/dist/avatar/Avatar.js.map +1 -1
- package/dist/avatar/_avatar.scss +4 -3
- package/dist/avatar/styles.js.map +1 -1
- package/dist/badge/Badge.js.map +1 -1
- package/dist/box/Box.js.map +1 -1
- package/dist/box/styles.js.map +1 -1
- package/dist/button/AsyncButton.js +2 -2
- package/dist/button/AsyncButton.js.map +1 -1
- package/dist/button/Button.js.map +1 -1
- package/dist/button/ButtonUnstyled.js.map +1 -1
- package/dist/button/FloatingActionButton.js.map +1 -1
- package/dist/button/TooltippedButton.js.map +1 -1
- package/dist/button/buttonStyles.js.map +1 -1
- package/dist/button/buttonUnstyledStyles.js.map +1 -1
- package/dist/card/Card.d.ts +2 -1
- package/dist/card/Card.js.map +1 -1
- package/dist/card/CardContent.js.map +1 -1
- package/dist/card/CardFooter.js.map +1 -1
- package/dist/card/CardHeader.js.map +1 -1
- package/dist/card/CardSubtitle.d.ts +6 -0
- package/dist/card/CardSubtitle.js +2 -1
- package/dist/card/CardSubtitle.js.map +1 -1
- package/dist/card/CardTitle.js.map +1 -1
- package/dist/card/ClickableCard.js.map +1 -1
- package/dist/card/styles.js +2 -4
- package/dist/card/styles.js.map +1 -1
- package/dist/chip/Chip.js.map +1 -1
- package/dist/chip/styles.js.map +1 -1
- package/dist/cssUtils.d.ts +1 -1
- package/dist/cssUtils.js.map +1 -1
- package/dist/delegateEvent.js.map +1 -1
- package/dist/dialog/Dialog.js.map +1 -1
- package/dist/dialog/DialogContainer.js.map +1 -1
- package/dist/dialog/DialogContent.js.map +1 -1
- package/dist/dialog/DialogFooter.js.map +1 -1
- package/dist/dialog/DialogHeader.js.map +1 -1
- package/dist/dialog/DialogTitle.js.map +1 -1
- package/dist/dialog/FixedDialog.js.map +1 -1
- package/dist/dialog/NestedDialogProvider.js.map +1 -1
- package/dist/dialog/styles.js.map +1 -1
- package/dist/divider/Divider.js.map +1 -1
- package/dist/divider/styles.js.map +1 -1
- package/dist/draggable/useDraggable.js +2 -13
- package/dist/draggable/useDraggable.js.map +1 -1
- package/dist/draggable/utils.js.map +1 -1
- package/dist/expansion-panel/ExpansionList.js.map +1 -1
- package/dist/expansion-panel/ExpansionPanel.js.map +1 -1
- package/dist/expansion-panel/ExpansionPanelHeader.js.map +1 -1
- package/dist/expansion-panel/useExpansionList.js.map +1 -1
- package/dist/expansion-panel/useExpansionPanels.js.map +1 -1
- package/dist/focus/useFocusContainer.js.map +1 -1
- package/dist/focus/utils.js.map +1 -1
- package/dist/form/Checkbox.js.map +1 -1
- package/dist/form/Fieldset.js.map +1 -1
- package/dist/form/FileInput.js.map +1 -1
- package/dist/form/Form.js.map +1 -1
- package/dist/form/FormMessage.js.map +1 -1
- package/dist/form/FormMessageContainer.js.map +1 -1
- package/dist/form/FormMessageCounter.js.map +1 -1
- package/dist/form/InputToggle.js.map +1 -1
- package/dist/form/InputToggleIcon.js.map +1 -1
- package/dist/form/Label.js.map +1 -1
- package/dist/form/Legend.js.map +1 -1
- package/dist/form/MenuItemCheckbox.js.map +1 -1
- package/dist/form/MenuItemFileInput.js.map +1 -1
- package/dist/form/MenuItemInputToggle.js.map +1 -1
- package/dist/form/MenuItemRadio.js.map +1 -1
- package/dist/form/MenuItemSwitch.js.map +1 -1
- package/dist/form/MenuItemTextField.js.map +1 -1
- package/dist/form/NativeSelect.js.map +1 -1
- package/dist/form/OptGroup.js.map +1 -1
- package/dist/form/Option.js.map +1 -1
- package/dist/form/Password.js.map +1 -1
- package/dist/form/Radio.js.map +1 -1
- package/dist/form/ResizingTextAreaWrapper.js.map +1 -1
- package/dist/form/Select.js.map +1 -1
- package/dist/form/SelectedOption.js.map +1 -1
- package/dist/form/Slider.js.map +1 -1
- package/dist/form/SliderContainer.js.map +1 -1
- package/dist/form/SliderMark.js.map +1 -1
- package/dist/form/SliderMarkLabel.js.map +1 -1
- package/dist/form/SliderThumb.js.map +1 -1
- package/dist/form/SliderTrack.js.map +1 -1
- package/dist/form/SliderValueMarks.js.map +1 -1
- package/dist/form/SliderValueTooltip.js.map +1 -1
- package/dist/form/Switch.js.map +1 -1
- package/dist/form/SwitchTrack.js.map +1 -1
- package/dist/form/TextArea.js.map +1 -1
- package/dist/form/TextField.d.ts +1 -10
- package/dist/form/TextField.js +1 -2
- package/dist/form/TextField.js.map +1 -1
- package/dist/form/TextFieldAddon.js +5 -2
- package/dist/form/TextFieldAddon.js.map +1 -1
- package/dist/form/TextFieldContainer.js.map +1 -1
- package/dist/form/_form.scss +81 -40
- package/dist/form/fileUtils.js.map +1 -1
- package/dist/form/formConfig.js.map +1 -1
- package/dist/form/formMessageStyles.js.map +1 -1
- package/dist/form/inputToggleStyles.js.map +1 -1
- package/dist/form/menuItemInputToggleStyles.js.map +1 -1
- package/dist/form/nativeSelectStyles.js.map +1 -1
- package/dist/form/optionStyles.js.map +1 -1
- package/dist/form/passwordStyles.js.map +1 -1
- package/dist/form/selectStyles.js.map +1 -1
- package/dist/form/selectUtils.js.map +1 -1
- package/dist/form/sliderUtils.js.map +1 -1
- package/dist/form/switchStyles.js.map +1 -1
- package/dist/form/textAreaStyles.js.map +1 -1
- package/dist/form/textFieldContainerStyles.js.map +1 -1
- package/dist/form/textFieldStyles.js.map +1 -1
- package/dist/form/types.js.map +1 -1
- package/dist/form/useCheckboxGroup.js.map +1 -1
- package/dist/form/useCombobox.d.ts +6 -6
- package/dist/form/useCombobox.js +1 -1
- package/dist/form/useCombobox.js.map +1 -1
- package/dist/form/useEditableCombobox.js +3 -0
- package/dist/form/useEditableCombobox.js.map +1 -1
- package/dist/form/useFileUpload.js.map +1 -1
- package/dist/form/useFormReset.js.map +1 -1
- package/dist/form/useListboxProvider.js.map +1 -1
- package/dist/form/useNumberField.js.map +1 -1
- package/dist/form/useRadioGroup.js.map +1 -1
- package/dist/form/useRangeSlider.js.map +1 -1
- package/dist/form/useResizingTextArea.js.map +1 -1
- package/dist/form/useSelectCombobox.js.map +1 -1
- package/dist/form/useSlider.js.map +1 -1
- package/dist/form/useTextField.js.map +1 -1
- package/dist/form/useTextFieldContainerAddons.d.ts +88 -0
- package/dist/form/useTextFieldContainerAddons.js +85 -0
- package/dist/form/useTextFieldContainerAddons.js.map +1 -0
- package/dist/form/utils.js.map +1 -1
- package/dist/form/validation.js.map +1 -1
- package/dist/hoverMode/useHoverMode.js.map +1 -1
- package/dist/hoverMode/useHoverModeProvider.js.map +1 -1
- package/dist/icon/FontIcon.d.ts +10 -6
- package/dist/icon/FontIcon.js +1 -5
- package/dist/icon/FontIcon.js.map +1 -1
- package/dist/icon/IconRotator.js.map +1 -1
- package/dist/icon/MaterialIcon.d.ts +19 -2
- package/dist/icon/MaterialIcon.js +14 -2
- package/dist/icon/MaterialIcon.js.map +1 -1
- package/dist/icon/MaterialSymbol.js.map +1 -1
- package/dist/icon/SVGIcon.d.ts +3 -0
- package/dist/icon/SVGIcon.js.map +1 -1
- package/dist/icon/TextIconSpacing.js.map +1 -1
- package/dist/icon/iconConfig.d.ts +8 -0
- package/dist/icon/iconConfig.js +4 -0
- package/dist/icon/iconConfig.js.map +1 -1
- package/dist/icon/material.d.ts +1 -1
- package/dist/icon/material.js.map +1 -1
- package/dist/icon/materialConfig.js.map +1 -1
- package/dist/icon/styles.js.map +1 -1
- package/dist/interaction/Ripple.js.map +1 -1
- package/dist/interaction/RippleContainer.js.map +1 -1
- package/dist/interaction/UserInteractionModeProvider.js.map +1 -1
- package/dist/interaction/config.js.map +1 -1
- package/dist/interaction/types.js.map +1 -1
- package/dist/interaction/useElementInteraction.js.map +1 -1
- package/dist/interaction/useHigherContrastChildren.js.map +1 -1
- package/dist/interaction/utils.js.map +1 -1
- package/dist/layout/LayoutAppBar.js.map +1 -1
- package/dist/layout/LayoutNav.js.map +1 -1
- package/dist/layout/LayoutWindowSplitter.js.map +1 -1
- package/dist/layout/Main.js.map +1 -1
- package/dist/layout/layoutNavStyles.js.map +1 -1
- package/dist/layout/layoutWindowSplitterStyles.js.map +1 -1
- package/dist/layout/mainStyles.js.map +1 -1
- package/dist/layout/useExpandableLayout.js.map +1 -1
- package/dist/layout/useHorizontalLayoutTransition.js.map +1 -1
- package/dist/layout/useLayoutAppBarHeight.js.map +1 -1
- package/dist/layout/useLayoutTree.js.map +1 -1
- package/dist/layout/useLayoutWindowSplitter.js.map +1 -1
- package/dist/layout/useMainTabIndex.js.map +1 -1
- package/dist/layout/useResizableLayout.js.map +1 -1
- package/dist/layout/useTemporaryLayout.js.map +1 -1
- package/dist/link/Link.d.ts +2 -4
- package/dist/link/Link.js +1 -2
- package/dist/link/Link.js.map +1 -1
- package/dist/link/SkipToMainContent.d.ts +10 -3
- package/dist/link/SkipToMainContent.js +4 -1
- package/dist/link/SkipToMainContent.js.map +1 -1
- package/dist/link/styles.d.ts +2 -2
- package/dist/link/styles.js.map +1 -1
- package/dist/list/List.js.map +1 -1
- package/dist/list/ListItem.js.map +1 -1
- package/dist/list/ListItemAddon.js.map +1 -1
- package/dist/list/ListItemChildren.js.map +1 -1
- package/dist/list/ListItemLink.js.map +1 -1
- package/dist/list/ListItemText.js.map +1 -1
- package/dist/list/ListSubheader.js.map +1 -1
- package/dist/list/getListItemHeight.js.map +1 -1
- package/dist/list/listItemStyles.js.map +1 -1
- package/dist/list/types.js.map +1 -1
- package/dist/media-queries/AppSizeProvider.js.map +1 -1
- package/dist/media-queries/appSize.js.map +1 -1
- package/dist/media-queries/useMediaQuery.js.map +1 -1
- package/dist/menu/DropdownMenu.js.map +1 -1
- package/dist/menu/Menu.js.map +1 -1
- package/dist/menu/MenuBar.js.map +1 -1
- package/dist/menu/MenuButton.js.map +1 -1
- package/dist/menu/MenuConfigurationProvider.js.map +1 -1
- package/dist/menu/MenuItem.js.map +1 -1
- package/dist/menu/MenuItemButton.js.map +1 -1
- package/dist/menu/MenuItemCircularProgress.d.ts +2 -2
- package/dist/menu/MenuItemCircularProgress.js +2 -2
- package/dist/menu/MenuItemCircularProgress.js.map +1 -1
- package/dist/menu/MenuItemGroup.js.map +1 -1
- package/dist/menu/MenuItemSeparator.js.map +1 -1
- package/dist/menu/MenuSheet.js.map +1 -1
- package/dist/menu/MenuVisibilityProvider.js.map +1 -1
- package/dist/menu/MenuWidget.js.map +1 -1
- package/dist/menu/MenuWidgetKeyboardProvider.js.map +1 -1
- package/dist/menu/useContextMenu.js.map +1 -1
- package/dist/menu/useMenuBarProvider.js.map +1 -1
- package/dist/menu/utils.js.map +1 -1
- package/dist/movement/constants.js.map +1 -1
- package/dist/movement/findMatchIndex.js.map +1 -1
- package/dist/movement/types.js.map +1 -1
- package/dist/movement/useKeyboardMovementProvider.js.map +1 -1
- package/dist/movement/utils.js.map +1 -1
- package/dist/navigation/CollapsibleNavGroup.js.map +1 -1
- package/dist/navigation/DefaultNavigationRenderer.js.map +1 -1
- package/dist/navigation/NavGroup.js.map +1 -1
- package/dist/navigation/NavItem.js.map +1 -1
- package/dist/navigation/NavItemButton.js.map +1 -1
- package/dist/navigation/NavItemLink.js.map +1 -1
- package/dist/navigation/NavSubheader.js.map +1 -1
- package/dist/navigation/Navigation.js.map +1 -1
- package/dist/navigation/getHrefFromParents.js.map +1 -1
- package/dist/navigation/navGroupStyles.js.map +1 -1
- package/dist/navigation/navItemStyles.js.map +1 -1
- package/dist/navigation/types.js.map +1 -1
- package/dist/navigation/useActiveHeadingId.js.map +1 -1
- package/dist/overlay/Overlay.d.ts +1 -0
- package/dist/overlay/Overlay.js.map +1 -1
- package/dist/overlay/overlayStyles.js.map +1 -1
- package/dist/portal/Portal.d.ts +4 -0
- package/dist/portal/Portal.js.map +1 -1
- package/dist/portal/PortalContainerProvider.d.ts +8 -3
- package/dist/portal/PortalContainerProvider.js +1 -0
- package/dist/portal/PortalContainerProvider.js.map +1 -1
- package/dist/positioning/constants.d.ts +1 -1
- package/dist/positioning/constants.js.map +1 -1
- package/dist/positioning/createHorizontalPosition.d.ts +2 -2
- package/dist/positioning/createHorizontalPosition.js.map +1 -1
- package/dist/positioning/createVerticalPosition.d.ts +3 -3
- package/dist/positioning/createVerticalPosition.js.map +1 -1
- package/dist/positioning/getFixedPosition.d.ts +1 -1
- package/dist/positioning/getFixedPosition.js.map +1 -1
- package/dist/positioning/types.d.ts +1 -1
- package/dist/positioning/types.js.map +1 -1
- package/dist/positioning/useFixedPositioning.d.ts +3 -3
- package/dist/positioning/useFixedPositioning.js.map +1 -1
- package/dist/positioning/utils.d.ts +1 -1
- package/dist/positioning/utils.js.map +1 -1
- package/dist/progress/CircularProgress.d.ts +5 -4
- package/dist/progress/CircularProgress.js.map +1 -1
- package/dist/progress/LinearProgress.js.map +1 -1
- package/dist/progress/getProgressA11y.js.map +1 -1
- package/dist/progress/types.js.map +1 -1
- package/dist/responsive-item/ResponsiveItemContainer.js.map +1 -1
- package/dist/responsive-item/ResponsiveItemOverlay.js.map +1 -1
- package/dist/responsive-item/_responsive-item.scss +4 -1
- package/dist/responsive-item/styles.js.map +1 -1
- package/dist/scroll/ScrollLock.js.map +1 -1
- package/dist/scroll/getScrollbarWidth.js.map +1 -1
- package/dist/scroll/useScrollLock.js.map +1 -1
- package/dist/searching/caseInsensitive.js.map +1 -1
- package/dist/searching/fuzzy.js.map +1 -1
- package/dist/searching/toSearchQuery.js.map +1 -1
- package/dist/searching/types.js.map +1 -1
- package/dist/searching/useFuzzyMatch.js.map +1 -1
- package/dist/searching/utils.js.map +1 -1
- package/dist/segmented-button/SegmentedButton.js.map +1 -1
- package/dist/segmented-button/SegmentedButtonContainer.js.map +1 -1
- package/dist/segmented-button/segmentedButtonContainerStyles.js.map +1 -1
- package/dist/segmented-button/segmentedButtonStyles.js.map +1 -1
- package/dist/sheet/Sheet.js.map +1 -1
- package/dist/sheet/styles.js.map +1 -1
- package/dist/snackbar/DefaultToastRenderer.js.map +1 -1
- package/dist/snackbar/Snackbar.js.map +1 -1
- package/dist/snackbar/Toast.js.map +1 -1
- package/dist/snackbar/ToastActionButton.js.map +1 -1
- package/dist/snackbar/ToastCloseButton.js.map +1 -1
- package/dist/snackbar/ToastContent.js.map +1 -1
- package/dist/snackbar/ToastManager.js.map +1 -1
- package/dist/snackbar/ToastManagerProvider.js.map +1 -1
- package/dist/snackbar/snackbarStyles.js.map +1 -1
- package/dist/snackbar/toastContentStyles.js.map +1 -1
- package/dist/snackbar/toastStyles.js.map +1 -1
- package/dist/snackbar/useCurrentToastActions.js.map +1 -1
- package/dist/suspense/CircularProgressSuspense.js.map +1 -1
- package/dist/suspense/NullSuspense.js.map +1 -1
- package/dist/table/StickyTableSection.d.ts +23 -0
- package/dist/table/StickyTableSection.js +56 -0
- package/dist/table/StickyTableSection.js.map +1 -0
- package/dist/table/Table.d.ts +1 -1
- package/dist/table/Table.js.map +1 -1
- package/dist/table/TableBody.d.ts +1 -1
- package/dist/table/TableBody.js.map +1 -1
- package/dist/table/TableCell.d.ts +3 -2
- package/dist/table/TableCell.js.map +1 -1
- package/dist/table/TableCellContent.d.ts +1 -2
- package/dist/table/TableCellContent.js.map +1 -1
- package/dist/table/TableCheckbox.js.map +1 -1
- package/dist/table/TableConfigurationProvider.d.ts +1 -73
- package/dist/table/TableConfigurationProvider.js.map +1 -1
- package/dist/table/TableContainer.js.map +1 -1
- package/dist/table/TableContainerProvider.js.map +1 -1
- package/dist/table/TableFooter.d.ts +8 -17
- package/dist/table/TableFooter.js +17 -80
- package/dist/table/TableFooter.js.map +1 -1
- package/dist/table/TableHeader.d.ts +8 -17
- package/dist/table/TableHeader.js +20 -87
- package/dist/table/TableHeader.js.map +1 -1
- package/dist/table/TableRadio.js.map +1 -1
- package/dist/table/TableRow.d.ts +1 -1
- package/dist/table/TableRow.js.map +1 -1
- package/dist/table/tableCellStyles.d.ts +1 -1
- package/dist/table/tableCellStyles.js.map +1 -1
- package/dist/table/tableContainerStyles.js.map +1 -1
- package/dist/table/tableFooterStyles.js.map +1 -1
- package/dist/table/tableHeaderStyles.js.map +1 -1
- package/dist/table/tableRowStyles.js.map +1 -1
- package/dist/table/tableStyles.js.map +1 -1
- package/dist/table/types.d.ts +89 -9
- package/dist/table/types.js.map +1 -1
- package/dist/table/useStickyTableSection.d.ts +27 -0
- package/dist/table/useStickyTableSection.js +84 -0
- package/dist/table/useStickyTableSection.js.map +1 -0
- package/dist/table/useTableSectionConfig.d.ts +13 -0
- package/dist/table/useTableSectionConfig.js +33 -0
- package/dist/table/useTableSectionConfig.js.map +1 -0
- package/dist/tabs/Tab.js.map +1 -1
- package/dist/tabs/TabList.js.map +1 -1
- package/dist/tabs/TabListScrollButton.js.map +1 -1
- package/dist/tabs/tabIndicatorStyles.js.map +1 -1
- package/dist/tabs/tabListScrollButtonStyles.js.map +1 -1
- package/dist/tabs/tabListStyles.js.map +1 -1
- package/dist/tabs/tabStyles.js.map +1 -1
- package/dist/tabs/useTabList.js.map +1 -1
- package/dist/tabs/useTabs.js.map +1 -1
- package/dist/tabs/utils.js.map +1 -1
- package/dist/test-utils/IntersectionObserver.js.map +1 -1
- package/dist/test-utils/ResizeObserver.js.map +1 -1
- package/dist/test-utils/data-testid.js.map +1 -1
- package/dist/test-utils/index.js.map +1 -1
- package/dist/test-utils/jest-setup.js.map +1 -1
- package/dist/test-utils/matchMedia.js.map +1 -1
- package/dist/test-utils/polyfills/IntersectionObserver.js.map +1 -1
- package/dist/test-utils/polyfills/ResizeObserver.js.map +1 -1
- package/dist/test-utils/polyfills/TextDecoder.js.map +1 -1
- package/dist/test-utils/polyfills/TextEncoder.js.map +1 -1
- package/dist/test-utils/polyfills/index.js.map +1 -1
- package/dist/test-utils/polyfills/matchMedia.js.map +1 -1
- package/dist/test-utils/polyfills/offsetParent.js.map +1 -1
- package/dist/test-utils/polyfills/scrollIntoView.js.map +1 -1
- package/dist/test-utils/render.js.map +1 -1
- package/dist/test-utils/timers.js.map +1 -1
- package/dist/theme/LocalStorageColorSchemeProvider.js.map +1 -1
- package/dist/theme/ThemeProvider.js.map +1 -1
- package/dist/theme/_theme.scss +6 -5
- package/dist/theme/colors.js.map +1 -1
- package/dist/theme/cssVars.js.map +1 -1
- package/dist/theme/types.js.map +1 -1
- package/dist/theme/useCSSVariables.js.map +1 -1
- package/dist/theme/useColorScheme.js.map +1 -1
- package/dist/theme/useColorSchemeMetaTag.js.map +1 -1
- package/dist/theme/useColorSchemeProvider.js.map +1 -1
- package/dist/theme/usePrefersColorScheme.js.map +1 -1
- package/dist/theme/utils.js.map +1 -1
- package/dist/tooltip/Tooltip.d.ts +20 -9
- package/dist/tooltip/Tooltip.js.map +1 -1
- package/dist/tooltip/TooltipHoverModeProvider.js.map +1 -1
- package/dist/tooltip/constants.js.map +1 -1
- package/dist/tooltip/tooltipStyles.js.map +1 -1
- package/dist/tooltip/useTooltip.d.ts +30 -16
- package/dist/tooltip/useTooltip.js.map +1 -1
- package/dist/tooltip/useTooltipPosition.d.ts +2 -4
- package/dist/tooltip/useTooltipPosition.js.map +1 -1
- package/dist/tooltip/utils.js.map +1 -1
- package/dist/transition/CSSTransition.js.map +1 -1
- package/dist/transition/Collapse.js.map +1 -1
- package/dist/transition/CrossFade.js +2 -3
- package/dist/transition/CrossFade.js.map +1 -1
- package/dist/transition/ScaleTransition.js.map +1 -1
- package/dist/transition/SkeletonPlaceholder.js.map +1 -1
- package/dist/transition/Slide.js.map +1 -1
- package/dist/transition/SlideContainer.js.map +1 -1
- package/dist/transition/collapseStyles.js.map +1 -1
- package/dist/transition/config.js.map +1 -1
- package/dist/transition/maxWidthTransition.js.map +1 -1
- package/dist/transition/skeletonPlaceholderUtils.js.map +1 -1
- package/dist/transition/types.d.ts +19 -24
- package/dist/transition/types.js.map +1 -1
- package/dist/transition/useCSSTransition.js.map +1 -1
- package/dist/transition/useCarousel.js.map +1 -1
- package/dist/transition/useCollapseTransition.js.map +1 -1
- package/dist/transition/useCrossFadeTransition.js +2 -1
- package/dist/transition/useCrossFadeTransition.js.map +1 -1
- package/dist/transition/useMaxWidthTransition.js.map +1 -1
- package/dist/transition/useScaleTransition.js +2 -1
- package/dist/transition/useScaleTransition.js.map +1 -1
- package/dist/transition/useSkeletonPlaceholder.js.map +1 -1
- package/dist/transition/useSlideTransition.js.map +1 -1
- package/dist/transition/useTransition.d.ts +1 -0
- package/dist/transition/useTransition.js +1 -0
- package/dist/transition/useTransition.js.map +1 -1
- package/dist/transition/utils.js.map +1 -1
- package/dist/tree/DefaultTreeItemRenderer.js.map +1 -1
- package/dist/tree/Tree.js.map +1 -1
- package/dist/tree/TreeGroup.js.map +1 -1
- package/dist/tree/TreeItem.js.map +1 -1
- package/dist/tree/TreeItemExpander.js.map +1 -1
- package/dist/tree/TreeProvider.js.map +1 -1
- package/dist/tree/styles.js.map +1 -1
- package/dist/tree/types.js.map +1 -1
- package/dist/tree/useTree.d.ts +3 -3
- package/dist/tree/useTree.js.map +1 -1
- package/dist/tree/useTreeExpansion.js.map +1 -1
- package/dist/tree/useTreeItems.js.map +1 -1
- package/dist/tree/useTreeMovement.js.map +1 -1
- package/dist/tree/useTreeSelection.js.map +1 -1
- package/dist/tree/utils.js.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/typography/SrOnly.js.map +1 -1
- package/dist/typography/TextContainer.d.ts +4 -0
- package/dist/typography/TextContainer.js +2 -0
- package/dist/typography/TextContainer.js.map +1 -1
- package/dist/typography/Typography.d.ts +10 -0
- package/dist/typography/Typography.js +3 -0
- package/dist/typography/Typography.js.map +1 -1
- package/dist/typography/WritingDirectionProvider.js.map +1 -1
- package/dist/typography/textContainerStyles.js.map +1 -1
- package/dist/typography/typographyStyles.js.map +1 -1
- package/dist/{useAsyncAction.d.ts → useAsyncFunction.d.ts} +10 -10
- package/dist/{useAsyncAction.js → useAsyncFunction.js} +6 -6
- package/dist/useAsyncFunction.js.map +1 -0
- package/dist/useDebouncedFunction.js.map +1 -1
- package/dist/useDropzone.js.map +1 -1
- package/dist/useElementSize.js.map +1 -1
- package/dist/useEnsuredId.js.map +1 -1
- package/dist/useEnsuredRef.js.map +1 -1
- package/dist/useEnsuredState.js.map +1 -1
- package/dist/useHtmlClassName.js.map +1 -1
- package/dist/useIntersectionObserver.js.map +1 -1
- package/dist/useIsomorphicLayoutEffect.js.map +1 -1
- package/dist/useLocalStorage.js.map +1 -1
- package/dist/useMutationObserver.d.ts +52 -0
- package/dist/useMutationObserver.js +84 -0
- package/dist/useMutationObserver.js.map +1 -0
- package/dist/useOrientation.js.map +1 -1
- package/dist/usePageInactive.js.map +1 -1
- package/dist/useResizeListener.js.map +1 -1
- package/dist/useResizeObserver.js.map +1 -1
- package/dist/useThrottledFunction.js.map +1 -1
- package/dist/useToggle.js.map +1 -1
- package/dist/useUnmounted.js.map +1 -1
- package/dist/useWindowSize.js.map +1 -1
- package/dist/utils/RenderRecursively.js.map +1 -1
- package/dist/utils/alphaNumericSort.js.map +1 -1
- package/dist/utils/applyRef.js.map +1 -1
- package/dist/utils/bem.js.map +1 -1
- package/dist/utils/getClientPosition.js.map +1 -1
- package/dist/utils/getMiddleOfRange.js.map +1 -1
- package/dist/utils/getPercentage.js.map +1 -1
- package/dist/utils/getRangeDefaultValue.js.map +1 -1
- package/dist/utils/getRangeSteps.js.map +1 -1
- package/dist/utils/identity.js.map +1 -1
- package/dist/utils/isElementVisible.js.map +1 -1
- package/dist/utils/loop.js.map +1 -1
- package/dist/utils/nearest.js.map +1 -1
- package/dist/utils/parseCssLengthUnit.js.map +1 -1
- package/dist/utils/randomInt.js.map +1 -1
- package/dist/utils/wait.js.map +1 -1
- package/dist/utils/withinRange.js.map +1 -1
- package/dist/window-splitter/WindowSplitter.js.map +1 -1
- package/dist/window-splitter/useWindowSplitter.js.map +1 -1
- package/package.json +26 -25
- package/scripts/getExportMap.ts +66 -0
- package/scripts/tsconfig.json +1 -1
- package/src/__tests__/{useAsyncAction.tsx → useAsyncFunction.tsx} +3 -3
- package/src/__tests__/useWindowSize.tsx +1 -2
- package/src/_box-shadows.scss +7 -4
- package/src/_core.scss +5 -1
- package/src/_utils.scss +3 -3
- package/src/app-bar/AppBarTitle.tsx +8 -4
- package/src/autocomplete/Autocomplete.tsx +294 -0
- package/src/autocomplete/AutocompleteCircularProgress.tsx +41 -0
- package/src/autocomplete/AutocompleteDropdownButton.tsx +66 -0
- package/src/autocomplete/FilterAutocompleteOptions.tsx +86 -0
- package/src/autocomplete/__tests__/Autocomplete.tsx +458 -0
- package/src/autocomplete/__tests__/__snapshots__/Autocomplete.tsx.snap +144 -0
- package/src/autocomplete/_autocomplete.scss +75 -0
- package/src/autocomplete/autocompleteStyles.ts +78 -0
- package/src/autocomplete/defaults.ts +83 -0
- package/src/autocomplete/types.ts +122 -0
- package/src/avatar/Avatar.tsx +1 -2
- package/src/avatar/_avatar.scss +4 -3
- package/src/button/AsyncButton.tsx +2 -2
- package/src/card/Card.tsx +2 -1
- package/src/card/CardSubtitle.tsx +9 -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__/styles.ts.snap +1 -1
- package/src/card/styles.ts +2 -6
- package/src/cssUtils.ts +1 -1
- package/src/draggable/useDraggable.ts +6 -13
- package/src/form/TextField.tsx +0 -13
- package/src/form/TextFieldAddon.tsx +6 -4
- package/src/form/__tests__/__snapshots__/Select.tsx.snap +2 -2
- package/src/form/__tests__/__snapshots__/TextArea.tsx.snap +2 -2
- package/src/form/__tests__/__snapshots__/TextField.tsx.snap +2 -2
- package/src/form/__tests__/useFormReset.tsx +1 -2
- package/src/form/_form.scss +81 -40
- package/src/form/useCombobox.ts +9 -19
- package/src/form/useEditableCombobox.ts +3 -0
- package/src/form/useTextFieldContainerAddons.ts +195 -0
- package/src/icon/FontIcon.tsx +19 -9
- package/src/icon/MaterialIcon.tsx +23 -4
- package/src/icon/SVGIcon.tsx +3 -0
- package/src/icon/iconConfig.tsx +10 -0
- package/src/icon/material.ts +276 -19
- package/src/link/Link.tsx +2 -4
- package/src/link/SkipToMainContent.tsx +11 -4
- package/src/link/styles.ts +2 -2
- package/src/menu/MenuItemCircularProgress.tsx +2 -2
- package/src/overlay/Overlay.tsx +1 -0
- package/src/portal/Portal.tsx +5 -0
- package/src/portal/PortalContainerProvider.tsx +16 -7
- package/src/positioning/__tests__/createHorizontalPosition.ts +2 -4
- package/src/positioning/constants.ts +1 -1
- package/src/positioning/createHorizontalPosition.ts +2 -2
- package/src/positioning/createVerticalPosition.ts +3 -3
- package/src/positioning/getFixedPosition.ts +1 -1
- package/src/positioning/types.ts +1 -1
- package/src/positioning/useFixedPositioning.ts +12 -4
- package/src/positioning/utils.ts +1 -1
- package/src/progress/CircularProgress.tsx +5 -4
- package/src/responsive-item/_responsive-item.scss +4 -1
- package/src/suspense/__tests__/CircularProgressSuspense.tsx +4 -4
- package/src/table/StickyTableSection.tsx +91 -0
- package/src/table/Table.tsx +2 -5
- package/src/table/TableBody.tsx +1 -2
- package/src/table/TableCell.tsx +3 -5
- package/src/table/TableCellContent.tsx +1 -3
- package/src/table/TableConfigurationProvider.tsx +1 -86
- package/src/table/TableFooter.tsx +19 -116
- package/src/table/TableHeader.tsx +20 -118
- package/src/table/TableRow.tsx +2 -4
- package/src/table/__tests__/Table.tsx +9 -8
- package/src/table/tableCellStyles.ts +1 -1
- package/src/table/types.ts +105 -10
- package/src/table/useStickyTableSection.tsx +126 -0
- package/src/table/useTableSectionConfig.ts +45 -0
- package/src/theme/_theme.scss +6 -5
- package/src/tooltip/Tooltip.tsx +24 -8
- package/src/tooltip/useTooltip.ts +52 -27
- package/src/tooltip/useTooltipPosition.ts +2 -4
- package/src/transition/CrossFade.tsx +1 -8
- package/src/transition/types.ts +23 -27
- package/src/transition/useCrossFadeTransition.ts +2 -0
- package/src/transition/useScaleTransition.ts +2 -0
- package/src/transition/useTransition.ts +1 -0
- package/src/tree/useTree.ts +3 -5
- package/src/typography/TextContainer.tsx +4 -0
- package/src/typography/Typography.tsx +10 -0
- package/src/{useAsyncAction.ts → useAsyncFunction.ts} +15 -15
- package/src/useMutationObserver.ts +118 -0
- package/src/useResizeListener.ts +1 -1
- package/coverage/lcov-report/AppBar.tsx.html +0 -784
- package/coverage/lcov-report/AsyncButton.tsx.html +0 -649
- package/coverage/lcov-report/AutoComplete.tsx.html +0 -283
- package/coverage/lcov-report/Avatar.tsx.html +0 -472
- package/coverage/lcov-report/Badge.tsx.html +0 -253
- package/coverage/lcov-report/CircularProgress.tsx.html +0 -799
- package/coverage/lcov-report/Collapse.tsx.html +0 -340
- package/coverage/lcov-report/CoreProviders.tsx.html +0 -502
- package/coverage/lcov-report/DefaultNavigationRenderer.tsx.html +0 -298
- package/coverage/lcov-report/DefaultToastRenderer.tsx.html +0 -526
- package/coverage/lcov-report/Dialog.tsx.html +0 -1309
- package/coverage/lcov-report/DialogContent.tsx.html +0 -178
- package/coverage/lcov-report/DialogFooter.tsx.html +0 -169
- package/coverage/lcov-report/ExpansionList.tsx.html +0 -205
- package/coverage/lcov-report/ExpansionPanel.tsx.html +0 -934
- package/coverage/lcov-report/ExpansionPanelHeader.tsx.html +0 -622
- package/coverage/lcov-report/FileInput.tsx.html +0 -733
- package/coverage/lcov-report/FontIcon.tsx.html +0 -265
- package/coverage/lcov-report/IconRotator.tsx.html +0 -322
- package/coverage/lcov-report/InputToggle.tsx.html +0 -1117
- package/coverage/lcov-report/InputToggleIcon.tsx.html +0 -478
- package/coverage/lcov-report/LinearProgress.tsx.html +0 -658
- package/coverage/lcov-report/ListItem.tsx.html +0 -892
- package/coverage/lcov-report/ListItemLink.tsx.html +0 -616
- package/coverage/lcov-report/MaterialIcon.tsx.html +0 -235
- package/coverage/lcov-report/MaterialSymbol.tsx.html +0 -421
- package/coverage/lcov-report/MenuItemCheckbox.tsx.html +0 -223
- package/coverage/lcov-report/MenuItemInputToggle.tsx.html +0 -925
- package/coverage/lcov-report/MenuItemRadio.tsx.html +0 -436
- package/coverage/lcov-report/MenuItemSeparator.tsx.html +0 -223
- package/coverage/lcov-report/MenuItemTextField.tsx.html +0 -289
- package/coverage/lcov-report/NativeSelect.tsx.html +0 -763
- package/coverage/lcov-report/Navigation.tsx.html +0 -358
- package/coverage/lcov-report/Portal.tsx.html +0 -223
- package/coverage/lcov-report/PortalContainerProvider.tsx.html +0 -367
- package/coverage/lcov-report/RootHtml.tsx.html +0 -370
- package/coverage/lcov-report/SVGIcon.tsx.html +0 -445
- package/coverage/lcov-report/SegmentedButton.tsx.html +0 -628
- package/coverage/lcov-report/SegmentedButtonContainer.tsx.html +0 -277
- package/coverage/lcov-report/Select.tsx.html +0 -1411
- package/coverage/lcov-report/SkeletonPlaceholder.tsx.html +0 -613
- package/coverage/lcov-report/Snackbar.tsx.html +0 -610
- package/coverage/lcov-report/SrOnly.tsx.html +0 -328
- package/coverage/lcov-report/Switch.tsx.html +0 -535
- package/coverage/lcov-report/SwitchTrack.tsx.html +0 -262
- package/coverage/lcov-report/Tab.tsx.html +0 -622
- package/coverage/lcov-report/TabList.tsx.html +0 -757
- package/coverage/lcov-report/TabListScrollButton.tsx.html +0 -472
- package/coverage/lcov-report/Table.tsx.html +0 -457
- package/coverage/lcov-report/TableCell.tsx.html +0 -982
- package/coverage/lcov-report/TableCheckbox.tsx.html +0 -709
- package/coverage/lcov-report/TableContainer.tsx.html +0 -220
- package/coverage/lcov-report/TableFooter.tsx.html +0 -502
- package/coverage/lcov-report/TableHeader.tsx.html +0 -541
- package/coverage/lcov-report/TableRadio.tsx.html +0 -670
- package/coverage/lcov-report/TableRow.tsx.html +0 -289
- package/coverage/lcov-report/TextArea.tsx.html +0 -940
- package/coverage/lcov-report/TextField.tsx.html +0 -829
- package/coverage/lcov-report/TextFieldAddon.tsx.html +0 -382
- package/coverage/lcov-report/TextFieldContainer.tsx.html +0 -364
- package/coverage/lcov-report/Toast.tsx.html +0 -868
- package/coverage/lcov-report/ToastCloseButton.tsx.html +0 -340
- package/coverage/lcov-report/ToastManager.tsx.html +0 -1783
- package/coverage/lcov-report/ToastManagerProvider.tsx.html +0 -400
- package/coverage/lcov-report/Tooltip.tsx.html +0 -559
- package/coverage/lcov-report/TooltipHoverModeProvider.tsx.html +0 -253
- package/coverage/lcov-report/Tree.tsx.html +0 -1135
- package/coverage/lcov-report/TreeGroup.tsx.html +0 -313
- package/coverage/lcov-report/Typography.tsx.html +0 -1027
- package/coverage/lcov-report/app-bar/AppBar.tsx.html +0 -928
- package/coverage/lcov-report/app-bar/AppBarTitle.tsx.html +0 -430
- package/coverage/lcov-report/app-bar/index.html +0 -131
- package/coverage/lcov-report/autocomplete/AutoComplete.tsx.html +0 -283
- package/coverage/lcov-report/autocomplete/AutocompleteGeneric.tsx.html +0 -304
- package/coverage/lcov-report/autocomplete/useAutoComplete.ts.html +0 -775
- package/coverage/lcov-report/autocomplete/useAutocomplete.ts.html +0 -1039
- package/coverage/lcov-report/autocomplete/useAutocompleteAgain.ts.html +0 -829
- package/coverage/lcov-report/autocomplete/useAutocompletev2.ts.html +0 -715
- package/coverage/lcov-report/autocomplete/useInlineAutoComplete.ts.html +0 -340
- package/coverage/lcov-report/autocomplete/useInlineAutocomplete.ts.html +0 -454
- package/coverage/lcov-report/autocomplete/useInlineSelection.ts.html +0 -373
- package/coverage/lcov-report/autocomplete/utils.ts.html +0 -196
- package/coverage/lcov-report/avatar/Avatar.tsx.html +0 -535
- package/coverage/lcov-report/avatar/index.html +0 -116
- package/coverage/lcov-report/avatar/styles.ts.html +0 -268
- package/coverage/lcov-report/badge/Badge.tsx.html +0 -364
- package/coverage/lcov-report/badge/index.html +0 -116
- package/coverage/lcov-report/box/Box.tsx.html +0 -562
- package/coverage/lcov-report/box/index.html +0 -131
- package/coverage/lcov-report/box/styles.ts.html +0 -622
- package/coverage/lcov-report/button/AsyncButton.tsx.html +0 -1045
- package/coverage/lcov-report/button/ButtonUnstyled.tsx.html +0 -214
- package/coverage/lcov-report/button/FloatingActionButton.tsx.html +0 -427
- package/coverage/lcov-report/button/TooltippedButton.tsx.html +0 -433
- package/coverage/lcov-report/button/buttonStyles.ts.html +0 -607
- package/coverage/lcov-report/button/buttonUnstyledStyles.ts.html +0 -142
- package/coverage/lcov-report/card/CardContent.tsx.html +0 -223
- package/coverage/lcov-report/card/CardHeader.tsx.html +0 -322
- package/coverage/lcov-report/card/ClickableCard.tsx.html +0 -400
- package/coverage/lcov-report/chip/Chip.tsx.html +0 -1072
- package/coverage/lcov-report/chip/index.html +0 -116
- package/coverage/lcov-report/chip/styles.ts.html +0 -436
- package/coverage/lcov-report/collapseStyles.ts.html +0 -184
- package/coverage/lcov-report/config.ts.html +0 -151
- package/coverage/lcov-report/cssUtils.ts.html +0 -814
- package/coverage/lcov-report/dialog/Dialog.tsx.html +0 -1309
- package/coverage/lcov-report/dialog/DialogContent.tsx.html +0 -178
- package/coverage/lcov-report/dialog/DialogFooter.tsx.html +0 -169
- package/coverage/lcov-report/dialog/DialogHeader.tsx.html +0 -148
- package/coverage/lcov-report/dialog/FixedDialog.tsx.html +0 -583
- package/coverage/lcov-report/dialog/index.html +0 -131
- package/coverage/lcov-report/dialog/styles.ts.html +0 -439
- package/coverage/lcov-report/divider/Divider.tsx.html +0 -280
- package/coverage/lcov-report/divider/index.html +0 -116
- package/coverage/lcov-report/draggable/index.html +0 -116
- package/coverage/lcov-report/draggable/useControlledDraggable.ts.html +0 -2131
- package/coverage/lcov-report/draggable/useDraggable.ts.html +0 -2398
- package/coverage/lcov-report/draggable/useDraggableOrig.ts.html +0 -316
- package/coverage/lcov-report/draggable/useLocalStorageDraggable.ts.html +0 -361
- package/coverage/lcov-report/draggable/useLocalStorageDraggableControls.ts.html +0 -487
- package/coverage/lcov-report/draggable/useLocalStorageDraggableLatest.ts.html +0 -334
- package/coverage/lcov-report/draggable/utils.ts.html +0 -808
- package/coverage/lcov-report/expansion-panel/ExpansionList.tsx.html +0 -211
- package/coverage/lcov-report/expansion-panel/ExpansionPanel.tsx.html +0 -943
- package/coverage/lcov-report/expansion-panel/ExpansionPanelHeader.tsx.html +0 -649
- package/coverage/lcov-report/expansion-panel/index.html +0 -146
- package/coverage/lcov-report/expansion-panel/useExpansionPanels.ts.html +0 -928
- package/coverage/lcov-report/filters.ts.html +0 -1045
- package/coverage/lcov-report/findMatchIndex.ts.html +0 -385
- package/coverage/lcov-report/form/AutoComplete.tsx.html +0 -283
- package/coverage/lcov-report/form/FileInput.tsx.html +0 -739
- package/coverage/lcov-report/form/Form.tsx.html +0 -238
- package/coverage/lcov-report/form/FormMessage.tsx.html +0 -322
- package/coverage/lcov-report/form/FormMessageContainer.tsx.html +0 -229
- package/coverage/lcov-report/form/InputToggle.tsx.html +0 -1108
- package/coverage/lcov-report/form/InputToggleIcon.tsx.html +0 -478
- package/coverage/lcov-report/form/Label.tsx.html +0 -442
- package/coverage/lcov-report/form/MenuItemInputToggle.tsx.html +0 -979
- package/coverage/lcov-report/form/MenuItemTextField.tsx.html +0 -289
- package/coverage/lcov-report/form/NativeSelect.tsx.html +0 -826
- package/coverage/lcov-report/form/OptGroup.tsx.html +0 -343
- package/coverage/lcov-report/form/Password.tsx.html +0 -721
- package/coverage/lcov-report/form/Radio.tsx.html +0 -169
- package/coverage/lcov-report/form/ResizingTextArea.tsx.html +0 -442
- package/coverage/lcov-report/form/ResizingTextAreaWrapper.tsx.html +0 -310
- package/coverage/lcov-report/form/Select.tsx.html +0 -1456
- package/coverage/lcov-report/form/SelectOriginal.tsx.html +0 -1630
- package/coverage/lcov-report/form/SelectV2.tsx.html +0 -1024
- package/coverage/lcov-report/form/SelectedOption.tsx.html +0 -250
- package/coverage/lcov-report/form/SimpleTextArea.tsx.html +0 -727
- package/coverage/lcov-report/form/Slider.tsx.html +0 -2014
- package/coverage/lcov-report/form/SliderThumb.tsx.html +0 -1030
- package/coverage/lcov-report/form/SliderValueTooltip.tsx.html +0 -319
- package/coverage/lcov-report/form/Switch.tsx.html +0 -535
- package/coverage/lcov-report/form/SwitchTrack.tsx.html +0 -262
- package/coverage/lcov-report/form/TextArea.tsx.html +0 -964
- package/coverage/lcov-report/form/TextArea2.tsx.html +0 -985
- package/coverage/lcov-report/form/TextAreaBackup.tsx.html +0 -1006
- package/coverage/lcov-report/form/TextField.tsx.html +0 -829
- package/coverage/lcov-report/form/fileUtils.ts.html +0 -2155
- package/coverage/lcov-report/form/formMessageStyles.ts.html +0 -238
- package/coverage/lcov-report/form/inputToggleStyles.ts.html +0 -316
- package/coverage/lcov-report/form/selectUtils.ts.html +0 -397
- package/coverage/lcov-report/form/switchStyles.ts.html +0 -172
- package/coverage/lcov-report/form/textAreaStyles.ts.html +0 -382
- package/coverage/lcov-report/form/useAutoComplete.ts.html +0 -787
- package/coverage/lcov-report/form/useCheckboxGroup.ts.html +0 -1087
- package/coverage/lcov-report/form/useCombobox-6-13.ts.html +0 -1054
- package/coverage/lcov-report/form/useCombobox-6-15.ts.html +0 -1048
- package/coverage/lcov-report/form/useCombobox.ts.html +0 -1045
- package/coverage/lcov-report/form/useComboboxBoth.ts.html +0 -85
- package/coverage/lcov-report/form/useComboboxDialog.ts.html +0 -85
- package/coverage/lcov-report/form/useComboboxList.ts.html +0 -418
- package/coverage/lcov-report/form/useComboboxOrig.ts.html +0 -781
- package/coverage/lcov-report/form/useFileUpload.ts.html +0 -1702
- package/coverage/lcov-report/form/useFormReset.ts.html +0 -229
- package/coverage/lcov-report/form/useInlineAutoComplete.ts.html +0 -379
- package/coverage/lcov-report/form/useNumberField.ts.html +0 -1561
- package/coverage/lcov-report/form/useRadioGroup.ts.html +0 -1009
- package/coverage/lcov-report/form/useRangeSlider.ts.html +0 -355
- package/coverage/lcov-report/form/useResizingTextArea.ts.html +0 -631
- package/coverage/lcov-report/form/useResizingTextArea2.ts.html +0 -631
- package/coverage/lcov-report/form/useSelectCombobox.ts.html +0 -499
- package/coverage/lcov-report/form/useSlider.ts.html +0 -421
- package/coverage/lcov-report/form/useTextField.ts.html +0 -2203
- package/coverage/lcov-report/form/utils.ts.html +0 -382
- package/coverage/lcov-report/form/validation.ts.html +0 -886
- package/coverage/lcov-report/getHrefFromParents.ts.html +0 -133
- package/coverage/lcov-report/getListItemHeight.ts.html +0 -298
- package/coverage/lcov-report/hoverMode/index.html +0 -116
- package/coverage/lcov-report/hoverMode/useHoverMode.ts.html +0 -676
- package/coverage/lcov-report/icon/FontIcon.tsx.html +0 -256
- package/coverage/lcov-report/icon/MaterialIcon.tsx.html +0 -235
- package/coverage/lcov-report/icon/index.html +0 -116
- package/coverage/lcov-report/icon/styles.ts.html +0 -586
- package/coverage/lcov-report/iconConfig.tsx.html +0 -973
- package/coverage/lcov-report/inputToggleStyles.ts.html +0 -316
- package/coverage/lcov-report/interaction/ElementInteractionProvider.tsx.html +0 -253
- package/coverage/lcov-report/interaction/UserInteractionModeProvider.tsx.html +0 -679
- package/coverage/lcov-report/interaction/config.ts.html +0 -181
- package/coverage/lcov-report/interaction/index.html +0 -131
- package/coverage/lcov-report/layout/LayoutAppBar.tsx.html +0 -358
- package/coverage/lcov-report/layout/LayoutNav.tsx.html +0 -682
- package/coverage/lcov-report/layout/LayoutWindowSplitter.tsx.html +0 -460
- package/coverage/lcov-report/layout/Main.tsx.html +0 -364
- package/coverage/lcov-report/layout/NavigationLink.tsx.html +0 -334
- package/coverage/lcov-report/layout/NavigationRail.tsx.html +0 -157
- package/coverage/lcov-report/layout/index.html +0 -161
- package/coverage/lcov-report/layout/layoutNavStyles.ts.html +0 -166
- package/coverage/lcov-report/layout/layoutWindowSplitterStyles.ts.html +0 -220
- package/coverage/lcov-report/layout/navigationLinkStyles.ts.html +0 -250
- package/coverage/lcov-report/layout/navigationRailStyles.ts.html +0 -148
- package/coverage/lcov-report/layout/useExpandableLayout.ts.html +0 -928
- package/coverage/lcov-report/layout/useExpandableLayoutAppBarTransition.ts.html +0 -199
- package/coverage/lcov-report/layout/useHorizontalLayoutTransition.ts.html +0 -349
- package/coverage/lcov-report/layout/useLayoutAppBarHeight.ts.html +0 -343
- package/coverage/lcov-report/layout/useLayoutNavigation.ts.html +0 -544
- package/coverage/lcov-report/layout/useLayoutTree.ts.html +0 -691
- package/coverage/lcov-report/layout/useLayoutWindowSplitter.ts.html +0 -517
- package/coverage/lcov-report/layout/useMainTabIndex.ts.html +0 -136
- package/coverage/lcov-report/layout/useResizableLayout.ts.html +0 -328
- package/coverage/lcov-report/layout/useTemporaryLayout.ts.html +0 -589
- package/coverage/lcov-report/link/Link.tsx.html +0 -358
- package/coverage/lcov-report/link/LinkProvider.tsx.html +0 -214
- package/coverage/lcov-report/link/SkipToMainContent.tsx.html +0 -448
- package/coverage/lcov-report/link/index.html +0 -116
- package/coverage/lcov-report/list/List.tsx.html +0 -490
- package/coverage/lcov-report/list/ListItem.tsx.html +0 -886
- package/coverage/lcov-report/list/ListItemAddon.tsx.html +0 -286
- package/coverage/lcov-report/list/ListItemChildren.tsx.html +0 -445
- package/coverage/lcov-report/list/ListItemLink.tsx.html +0 -616
- package/coverage/lcov-report/list/ListItemText.tsx.html +0 -280
- package/coverage/lcov-report/list/ListSubheader.tsx.html +0 -322
- package/coverage/lcov-report/list/index.html +0 -191
- package/coverage/lcov-report/list/listItemStyles.ts.html +0 -703
- package/coverage/lcov-report/materialConfig.ts.html +0 -703
- package/coverage/lcov-report/media-queries/AppSizeProvider.tsx.html +0 -499
- package/coverage/lcov-report/media-queries/appSize.ts.html +0 -445
- package/coverage/lcov-report/media-queries/index.html +0 -116
- package/coverage/lcov-report/media-queries/useMediaQuery.ts.html +0 -244
- package/coverage/lcov-report/media-queries/useMinWidthMediaQuery.ts.html +0 -115
- package/coverage/lcov-report/menu/DropdownMenu.tsx.html +0 -976
- package/coverage/lcov-report/menu/Menu.tsx.html +0 -1894
- package/coverage/lcov-report/menu/MenuConfigurationProvider.tsx.html +0 -637
- package/coverage/lcov-report/menu/MenuItem.tsx.html +0 -292
- package/coverage/lcov-report/menu/MenuItemCircularProgress.tsx.html +0 -433
- package/coverage/lcov-report/menu/MenuItemGroup.tsx.html +0 -382
- package/coverage/lcov-report/menu/MenuSheet.tsx.html +0 -502
- package/coverage/lcov-report/menu/MenuWidget.tsx.html +0 -634
- package/coverage/lcov-report/menu/index.html +0 -116
- package/coverage/lcov-report/menu/menuConfig.ts.html +0 -118
- package/coverage/lcov-report/menu/useContextMenu.ts.html +0 -490
- package/coverage/lcov-report/menuItemInputToggleStyles.ts.html +0 -319
- package/coverage/lcov-report/movement/index.html +0 -116
- package/coverage/lcov-report/movement/useKeyboardMovementProvider.ts.html +0 -1723
- package/coverage/lcov-report/navigation/CollapsibleNavGroup.tsx.html +0 -334
- package/coverage/lcov-report/navigation/DefaultNavigationRenderer.tsx.html +0 -298
- package/coverage/lcov-report/navigation/NavGroup.tsx.html +0 -193
- package/coverage/lcov-report/navigation/NavItem.tsx.html +0 -160
- package/coverage/lcov-report/navigation/NavItemButton.tsx.html +0 -397
- package/coverage/lcov-report/navigation/NavItemLink.tsx.html +0 -574
- package/coverage/lcov-report/navigation/NavSubheader.tsx.html +0 -184
- package/coverage/lcov-report/navigation/Navigation.tsx.html +0 -358
- package/coverage/lcov-report/navigation/getHrefFromParents.ts.html +0 -130
- package/coverage/lcov-report/navigation/index.html +0 -146
- package/coverage/lcov-report/navigation/navGroupStyles.ts.html +0 -148
- package/coverage/lcov-report/navigation/navItemStyles.ts.html +0 -298
- package/coverage/lcov-report/overlay/Overlay.tsx.html +0 -655
- package/coverage/lcov-report/overlay/index.html +0 -116
- package/coverage/lcov-report/positioning/constants.ts.html +0 -463
- package/coverage/lcov-report/positioning/createVerticalPosition.ts.html +0 -1009
- package/coverage/lcov-report/positioning/getFixedPosition.ts.html +0 -616
- package/coverage/lcov-report/positioning/index.html +0 -131
- package/coverage/lcov-report/positioning/useFixedPositioning.ts.html +0 -1321
- package/coverage/lcov-report/progress/CircularProgress.tsx.html +0 -799
- package/coverage/lcov-report/progress/LinearProgress.tsx.html +0 -658
- package/coverage/lcov-report/progress/index.html +0 -116
- package/coverage/lcov-report/searching/caseInsensitive.ts.html +0 -685
- package/coverage/lcov-report/searching/toSearchQuery.ts.html +0 -145
- package/coverage/lcov-report/searching/useFuzzyMatch.ts.html +0 -211
- package/coverage/lcov-report/searching/utils.ts.html +0 -244
- package/coverage/lcov-report/segmented-button/SegmentedButton.tsx.html +0 -628
- package/coverage/lcov-report/segmented-button/SegmentedButtonContainer.tsx.html +0 -259
- package/coverage/lcov-report/segmented-button/index.html +0 -161
- package/coverage/lcov-report/segmented-button/segmentedButtonContainerStyles.ts.html +0 -151
- package/coverage/lcov-report/segmented-button/segmentedButtonStyles.ts.html +0 -199
- package/coverage/lcov-report/segmentedButtonContainerStyles.ts.html +0 -160
- package/coverage/lcov-report/segmentedButtonStyles.ts.html +0 -199
- package/coverage/lcov-report/sheet/Sheet.tsx.html +0 -397
- package/coverage/lcov-report/sheet/index.html +0 -116
- package/coverage/lcov-report/sheet/styles.ts.html +0 -376
- package/coverage/lcov-report/skeletonPlaceholderUtils.ts.html +0 -400
- package/coverage/lcov-report/snackbar/DefaultToastRenderer.tsx.html +0 -529
- package/coverage/lcov-report/snackbar/Snackbar.tsx.html +0 -610
- package/coverage/lcov-report/snackbar/Toast.tsx.html +0 -868
- package/coverage/lcov-report/snackbar/ToastContent.tsx.html +0 -364
- package/coverage/lcov-report/snackbar/ToastManager.tsx.html +0 -1804
- package/coverage/lcov-report/snackbar/ToastManagerProvider.tsx.html +0 -400
- package/coverage/lcov-report/snackbar/index.html +0 -116
- package/coverage/lcov-report/snackbar/snackbarStyles.ts.html +0 -139
- package/coverage/lcov-report/snackbar/toastContentStyles.ts.html +0 -196
- package/coverage/lcov-report/snackbar/toastStyles.ts.html +0 -349
- package/coverage/lcov-report/snackbar/useCurrentToastActions.ts.html +0 -226
- package/coverage/lcov-report/snackbarStyles.ts.html +0 -139
- package/coverage/lcov-report/src/AppSize.tsx.html +0 -247
- package/coverage/lcov-report/src/AppSizeProvider.tsx.html +0 -787
- package/coverage/lcov-report/src/CoreProviders.tsx.html +0 -412
- package/coverage/lcov-report/src/NoSsr.tsx.html +0 -250
- package/coverage/lcov-report/src/NullSsrSuspense.tsx.html +0 -223
- package/coverage/lcov-report/src/RootHtml.tsx.html +0 -370
- package/coverage/lcov-report/src/SsrProvider.tsx.html +0 -211
- package/coverage/lcov-report/src/app-bar/AppBar.tsx.html +0 -937
- package/coverage/lcov-report/src/app-bar/AppBarTitle.tsx.html +0 -445
- package/coverage/lcov-report/src/app-bar/index.html +0 -131
- package/coverage/lcov-report/src/autocomplete/Autocomplete.tsx.html +0 -328
- package/coverage/lcov-report/src/autocomplete/AutocompleteGeneric.tsx.html +0 -304
- package/coverage/lcov-report/src/autocomplete/index.html +0 -221
- package/coverage/lcov-report/src/autocomplete/useAutocomplete.ts.html +0 -1039
- package/coverage/lcov-report/src/autocomplete/useAutocompleteAgain.ts.html +0 -829
- package/coverage/lcov-report/src/autocomplete/useAutocompletev2.ts.html +0 -715
- package/coverage/lcov-report/src/autocomplete/useInlineAutocomplete.ts.html +0 -454
- package/coverage/lcov-report/src/autocomplete/useInlineSelection.ts.html +0 -373
- package/coverage/lcov-report/src/autocomplete/utils.ts.html +0 -196
- package/coverage/lcov-report/src/avatar/Avatar.tsx.html +0 -472
- package/coverage/lcov-report/src/avatar/index.html +0 -131
- package/coverage/lcov-report/src/avatar/styles.ts.html +0 -268
- package/coverage/lcov-report/src/badge/Badge.tsx.html +0 -382
- package/coverage/lcov-report/src/badge/index.html +0 -116
- package/coverage/lcov-report/src/box/Box.tsx.html +0 -541
- package/coverage/lcov-report/src/box/index.html +0 -131
- package/coverage/lcov-report/src/box/styles.ts.html +0 -622
- package/coverage/lcov-report/src/button/AsyncButton.tsx.html +0 -1045
- package/coverage/lcov-report/src/button/Button.tsx.html +0 -688
- package/coverage/lcov-report/src/button/ButtonUnstyled.tsx.html +0 -211
- package/coverage/lcov-report/src/button/FloatingActionButton.tsx.html +0 -382
- package/coverage/lcov-report/src/button/TooltippedButton.tsx.html +0 -445
- package/coverage/lcov-report/src/button/buttonStyles.ts.html +0 -607
- package/coverage/lcov-report/src/button/buttonUnstyledStyles.ts.html +0 -142
- package/coverage/lcov-report/src/button/index.html +0 -116
- package/coverage/lcov-report/src/card/CardContent.tsx.html +0 -223
- package/coverage/lcov-report/src/card/CardFooter.tsx.html +0 -196
- package/coverage/lcov-report/src/card/CardHeader.tsx.html +0 -319
- package/coverage/lcov-report/src/card/CardTitle.tsx.html +0 -247
- package/coverage/lcov-report/src/card/ClickableCard.tsx.html +0 -400
- package/coverage/lcov-report/src/chip/Chip.tsx.html +0 -1102
- package/coverage/lcov-report/src/chip/index.html +0 -131
- package/coverage/lcov-report/src/chip/styles.ts.html +0 -457
- package/coverage/lcov-report/src/delegateEvent.ts.html +0 -619
- package/coverage/lcov-report/src/dialog/Dialog.tsx.html +0 -1309
- package/coverage/lcov-report/src/dialog/DialogContainer.tsx.html +0 -175
- package/coverage/lcov-report/src/dialog/DialogContent.tsx.html +0 -178
- package/coverage/lcov-report/src/dialog/DialogFooter.tsx.html +0 -169
- package/coverage/lcov-report/src/dialog/DialogHeader.tsx.html +0 -148
- package/coverage/lcov-report/src/dialog/DialogTitle.tsx.html +0 -256
- package/coverage/lcov-report/src/dialog/FixedDialog.tsx.html +0 -577
- package/coverage/lcov-report/src/dialog/NestedDialogProvider.ts.html +0 -127
- package/coverage/lcov-report/src/dialog/index.html +0 -236
- package/coverage/lcov-report/src/dialog/styles.ts.html +0 -439
- package/coverage/lcov-report/src/divider/Divider.tsx.html +0 -274
- package/coverage/lcov-report/src/divider/VerticalDivider.tsx.html +0 -235
- package/coverage/lcov-report/src/divider/index.html +0 -116
- package/coverage/lcov-report/src/divider/styles.ts.html +0 -232
- package/coverage/lcov-report/src/divider/useVerticalDividerHeight.ts.html +0 -301
- package/coverage/lcov-report/src/draggable/index.html +0 -131
- package/coverage/lcov-report/src/draggable/useControlledDraggable.ts.html +0 -2137
- package/coverage/lcov-report/src/draggable/useDraggable.ts.html +0 -2398
- package/coverage/lcov-report/src/draggable/useDraggableOrig.ts.html +0 -316
- package/coverage/lcov-report/src/draggable/useLocalStorageDraggable.ts.html +0 -370
- package/coverage/lcov-report/src/draggable/utils.ts.html +0 -808
- package/coverage/lcov-report/src/expansion-panel/ExpansionList.tsx.html +0 -211
- package/coverage/lcov-report/src/expansion-panel/ExpansionPanel.tsx.html +0 -943
- package/coverage/lcov-report/src/expansion-panel/ExpansionPanelHeader.tsx.html +0 -649
- package/coverage/lcov-report/src/expansion-panel/index.html +0 -176
- package/coverage/lcov-report/src/expansion-panel/useExpansionList.ts.html +0 -322
- package/coverage/lcov-report/src/expansion-panel/useExpansionPanels.ts.html +0 -928
- package/coverage/lcov-report/src/focus/index.html +0 -131
- package/coverage/lcov-report/src/focus/useFocusContainer.ts.html +0 -883
- package/coverage/lcov-report/src/focus/utils.ts.html +0 -544
- package/coverage/lcov-report/src/form/AutoComplete.tsx.html +0 -283
- package/coverage/lcov-report/src/form/Checkbox.tsx.html +0 -160
- package/coverage/lcov-report/src/form/Fieldset.tsx.html +0 -355
- package/coverage/lcov-report/src/form/FileInput.tsx.html +0 -739
- package/coverage/lcov-report/src/form/Form.tsx.html +0 -238
- package/coverage/lcov-report/src/form/FormMessage.tsx.html +0 -322
- package/coverage/lcov-report/src/form/FormMessageContainer.tsx.html +0 -223
- package/coverage/lcov-report/src/form/FormMessageCounter.tsx.html +0 -262
- package/coverage/lcov-report/src/form/FormThemeProvider.tsx.html +0 -313
- package/coverage/lcov-report/src/form/InputToggle.tsx.html +0 -1108
- package/coverage/lcov-report/src/form/InputToggleIcon.tsx.html +0 -478
- package/coverage/lcov-report/src/form/Label.tsx.html +0 -439
- package/coverage/lcov-report/src/form/Legend.tsx.html +0 -199
- package/coverage/lcov-report/src/form/MenuItemCheckbox.tsx.html +0 -223
- package/coverage/lcov-report/src/form/MenuItemFileInput.tsx.html +0 -424
- package/coverage/lcov-report/src/form/MenuItemInputToggle.tsx.html +0 -925
- package/coverage/lcov-report/src/form/MenuItemRadio.tsx.html +0 -436
- package/coverage/lcov-report/src/form/MenuItemSwitch.tsx.html +0 -211
- package/coverage/lcov-report/src/form/MenuItemTextField.tsx.html +0 -289
- package/coverage/lcov-report/src/form/NativeSelect.tsx.html +0 -763
- package/coverage/lcov-report/src/form/OptGroup.tsx.html +0 -343
- package/coverage/lcov-report/src/form/Option.tsx.html +0 -709
- package/coverage/lcov-report/src/form/Password.tsx.html +0 -721
- package/coverage/lcov-report/src/form/Radio.tsx.html +0 -172
- package/coverage/lcov-report/src/form/ResizingTextArea.tsx.html +0 -988
- package/coverage/lcov-report/src/form/ResizingTextAreaWrapper.tsx.html +0 -310
- package/coverage/lcov-report/src/form/Select.tsx.html +0 -1411
- package/coverage/lcov-report/src/form/SelectValue.tsx.html +0 -202
- package/coverage/lcov-report/src/form/SimpleTextArea.tsx.html +0 -694
- package/coverage/lcov-report/src/form/Slider.tsx.html +0 -2008
- package/coverage/lcov-report/src/form/SliderContainer.tsx.html +0 -358
- package/coverage/lcov-report/src/form/SliderMark.tsx.html +0 -208
- package/coverage/lcov-report/src/form/SliderMarkLabel.tsx.html +0 -271
- package/coverage/lcov-report/src/form/SliderThumb.tsx.html +0 -1084
- package/coverage/lcov-report/src/form/SliderTrack.tsx.html +0 -454
- package/coverage/lcov-report/src/form/SliderValueMarks.tsx.html +0 -745
- package/coverage/lcov-report/src/form/SliderValueTooltip.tsx.html +0 -319
- package/coverage/lcov-report/src/form/Switch.tsx.html +0 -535
- package/coverage/lcov-report/src/form/SwitchTrack.tsx.html +0 -262
- package/coverage/lcov-report/src/form/TextArea.tsx.html +0 -1006
- package/coverage/lcov-report/src/form/TextArea2.tsx.html +0 -985
- package/coverage/lcov-report/src/form/TextAreaBackup.tsx.html +0 -985
- package/coverage/lcov-report/src/form/TextField.tsx.html +0 -829
- package/coverage/lcov-report/src/form/TextFieldAddon.tsx.html +0 -382
- package/coverage/lcov-report/src/form/TextFieldContainer.tsx.html +0 -364
- package/coverage/lcov-report/src/form/TextFieldContainerStyles.ts.html +0 -418
- package/coverage/lcov-report/src/form/fileUtils.ts.html +0 -2155
- package/coverage/lcov-report/src/form/formConfig.ts.html +0 -157
- package/coverage/lcov-report/src/form/formMessageStyles.ts.html +0 -238
- package/coverage/lcov-report/src/form/index.html +0 -176
- package/coverage/lcov-report/src/form/inputToggleStyles.ts.html +0 -316
- package/coverage/lcov-report/src/form/menuItemInputToggleStyles.ts.html +0 -319
- package/coverage/lcov-report/src/form/nativeSelectStyles.ts.html +0 -253
- package/coverage/lcov-report/src/form/optionStyles.ts.html +0 -151
- package/coverage/lcov-report/src/form/passwordStyles.ts.html +0 -235
- package/coverage/lcov-report/src/form/selectStyles.ts.html +0 -181
- package/coverage/lcov-report/src/form/selectUtils.ts.html +0 -430
- package/coverage/lcov-report/src/form/sliderUtils.ts.html +0 -790
- package/coverage/lcov-report/src/form/switchStyles.ts.html +0 -172
- package/coverage/lcov-report/src/form/textAreaStyles.ts.html +0 -385
- package/coverage/lcov-report/src/form/textFieldStyles.ts.html +0 -184
- package/coverage/lcov-report/src/form/useAutoComplete.ts.html +0 -787
- package/coverage/lcov-report/src/form/useCheckboxGroup.ts.html +0 -1087
- package/coverage/lcov-report/src/form/useCombobox.ts.html +0 -1540
- package/coverage/lcov-report/src/form/useComboboxBoth.ts.html +0 -85
- package/coverage/lcov-report/src/form/useComboboxDialog.ts.html +0 -85
- package/coverage/lcov-report/src/form/useComboboxList.ts.html +0 -403
- package/coverage/lcov-report/src/form/useComboboxOrig.ts.html +0 -781
- package/coverage/lcov-report/src/form/useEditableCombobox.ts.html +0 -502
- package/coverage/lcov-report/src/form/useFileUpload.ts.html +0 -1702
- package/coverage/lcov-report/src/form/useInlineAutoComplete.ts.html +0 -109
- package/coverage/lcov-report/src/form/useListboxProvider.ts.html +0 -214
- package/coverage/lcov-report/src/form/useNumberField.ts.html +0 -1561
- package/coverage/lcov-report/src/form/useRadioGroup.ts.html +0 -1021
- package/coverage/lcov-report/src/form/useRangeSlider.ts.html +0 -355
- package/coverage/lcov-report/src/form/useResizingTextArea.ts.html +0 -634
- package/coverage/lcov-report/src/form/useResizingTextArea.tsx.html +0 -523
- package/coverage/lcov-report/src/form/useSelectCombobox.ts.html +0 -295
- package/coverage/lcov-report/src/form/useSlider.ts.html +0 -421
- package/coverage/lcov-report/src/form/useTextField.ts.html +0 -2203
- package/coverage/lcov-report/src/form/utils.ts.html +0 -373
- package/coverage/lcov-report/src/form/validation.ts.html +0 -886
- package/coverage/lcov-report/src/hoverMode/index.html +0 -131
- package/coverage/lcov-report/src/hoverMode/useHoverMode.ts.html +0 -676
- package/coverage/lcov-report/src/hoverMode/useHoverModeProvider.ts.html +0 -1018
- package/coverage/lcov-report/src/icon/FontIcon.tsx.html +0 -256
- package/coverage/lcov-report/src/icon/IconProvider.tsx.html +0 -931
- package/coverage/lcov-report/src/icon/IconRotator.tsx.html +0 -322
- package/coverage/lcov-report/src/icon/MaterialIcon.tsx.html +0 -235
- package/coverage/lcov-report/src/icon/MaterialIconsProvider.ts.html +0 -154
- package/coverage/lcov-report/src/icon/MaterialSymbol.tsx.html +0 -421
- package/coverage/lcov-report/src/icon/MaterialSymbolsProvider.tsx.html +0 -757
- package/coverage/lcov-report/src/icon/SVGIcon.tsx.html +0 -445
- package/coverage/lcov-report/src/icon/TextIconSpacing.tsx.html +0 -679
- package/coverage/lcov-report/src/icon/iconConfig.tsx.html +0 -973
- package/coverage/lcov-report/src/icon/index.html +0 -116
- package/coverage/lcov-report/src/icon/material.ts.html +0 -15922
- package/coverage/lcov-report/src/icon/materialConfig.ts.html +0 -703
- package/coverage/lcov-report/src/icon/styles.ts.html +0 -586
- package/coverage/lcov-report/src/interaction/ElementInteractionProvider.tsx.html +0 -277
- package/coverage/lcov-report/src/interaction/LazyRippleContainer.tsx.html +0 -136
- package/coverage/lcov-report/src/interaction/Ripple.tsx.html +0 -283
- package/coverage/lcov-report/src/interaction/RippleContainer.tsx.html +0 -211
- package/coverage/lcov-report/src/interaction/UserInteractionModeProvider.tsx.html +0 -679
- package/coverage/lcov-report/src/interaction/config.ts.html +0 -181
- package/coverage/lcov-report/src/interaction/index.html +0 -206
- package/coverage/lcov-report/src/interaction/useElementInteraction.ts.html +0 -1474
- package/coverage/lcov-report/src/interaction/useElementInteraction.tsx.html +0 -1513
- package/coverage/lcov-report/src/interaction/useHigherContrastChildren.tsx.html +0 -355
- package/coverage/lcov-report/src/interaction/utils.ts.html +0 -496
- package/coverage/lcov-report/src/layout/DefaultLayoutNavigationItemRenderer.tsx.html +0 -169
- package/coverage/lcov-report/src/layout/DefaultLayoutNavigationMiniItemRenderer.tsx.html +0 -160
- package/coverage/lcov-report/src/layout/Layout.tsx.html +0 -235
- package/coverage/lcov-report/src/layout/LayoutAppBar.tsx.html +0 -364
- package/coverage/lcov-report/src/layout/LayoutAppBarTitle.tsx.html +0 -193
- package/coverage/lcov-report/src/layout/LayoutChildren.tsx.html +0 -718
- package/coverage/lcov-report/src/layout/LayoutMain.tsx.html +0 -580
- package/coverage/lcov-report/src/layout/LayoutNav.tsx.html +0 -688
- package/coverage/lcov-report/src/layout/LayoutNavToggle.tsx.html +0 -430
- package/coverage/lcov-report/src/layout/LayoutNavigation.tsx.html +0 -445
- package/coverage/lcov-report/src/layout/LayoutNavigationHeader.tsx.html +0 -274
- package/coverage/lcov-report/src/layout/LayoutProvider.tsx.html +0 -706
- package/coverage/lcov-report/src/layout/LayoutTree.tsx.html +0 -331
- package/coverage/lcov-report/src/layout/LayoutWindowSplitter.tsx.html +0 -472
- package/coverage/lcov-report/src/layout/Main.tsx.html +0 -364
- package/coverage/lcov-report/src/layout/MiniLayoutWrapper.tsx.html +0 -541
- package/coverage/lcov-report/src/layout/NavigationLink.tsx.html +0 -334
- package/coverage/lcov-report/src/layout/NavigationRail.tsx.html +0 -157
- package/coverage/lcov-report/src/layout/TemporaryLayout.tsx.html +0 -85
- package/coverage/lcov-report/src/layout/constants.ts.html +0 -169
- package/coverage/lcov-report/src/layout/index.html +0 -146
- package/coverage/lcov-report/src/layout/layoutNavStyles.ts.html +0 -166
- package/coverage/lcov-report/src/layout/layoutWindowSplitterStyles.ts.html +0 -220
- package/coverage/lcov-report/src/layout/mainStyles.ts.html +0 -217
- package/coverage/lcov-report/src/layout/navigationLinkStyles.ts.html +0 -250
- package/coverage/lcov-report/src/layout/navigationRailStyles.ts.html +0 -148
- package/coverage/lcov-report/src/layout/useExpandableLayout.ts.html +0 -742
- package/coverage/lcov-report/src/layout/useHorizontalLayoutTransition.ts.html +0 -349
- package/coverage/lcov-report/src/layout/useLayoutAppBarHeight.ts.html +0 -358
- package/coverage/lcov-report/src/layout/useLayoutNavigation.ts.html +0 -544
- package/coverage/lcov-report/src/layout/useLayoutTree.ts.html +0 -691
- package/coverage/lcov-report/src/layout/useLayoutWindowSplitter.ts.html +0 -496
- package/coverage/lcov-report/src/layout/useMainTabIndex.ts.html +0 -136
- package/coverage/lcov-report/src/layout/useResizableLayout.ts.html +0 -535
- package/coverage/lcov-report/src/layout/useTemporaryLayout.ts.html +0 -589
- package/coverage/lcov-report/src/layout/utils.ts.html +0 -391
- package/coverage/lcov-report/src/link/Link.tsx.html +0 -358
- package/coverage/lcov-report/src/link/LinkProvider.tsx.html +0 -238
- package/coverage/lcov-report/src/link/SkipToMainContent.tsx.html +0 -448
- package/coverage/lcov-report/src/link/index.html +0 -146
- package/coverage/lcov-report/src/link/styles.ts.html +0 -238
- package/coverage/lcov-report/src/list/List.tsx.html +0 -487
- package/coverage/lcov-report/src/list/ListItem.tsx.html +0 -892
- package/coverage/lcov-report/src/list/ListItemAddon.tsx.html +0 -286
- package/coverage/lcov-report/src/list/ListItemChildren.tsx.html +0 -445
- package/coverage/lcov-report/src/list/ListItemLink.tsx.html +0 -616
- package/coverage/lcov-report/src/list/ListItemText.tsx.html +0 -277
- package/coverage/lcov-report/src/list/ListSubheader.tsx.html +0 -319
- package/coverage/lcov-report/src/list/getListItemHeight.ts.html +0 -298
- package/coverage/lcov-report/src/list/index.html +0 -116
- package/coverage/lcov-report/src/list/listItemStyles.ts.html +0 -703
- package/coverage/lcov-report/src/main-layout/DefaultLayoutNavigationItemRenderer.tsx.html +0 -169
- package/coverage/lcov-report/src/main-layout/DefaultLayoutNavigationMiniItemRenderer.tsx.html +0 -160
- package/coverage/lcov-report/src/main-layout/Main.tsx.html +0 -298
- package/coverage/lcov-report/src/main-layout/MainLayout.tsx.html +0 -619
- package/coverage/lcov-report/src/main-layout/MainLayoutAppBar.tsx.html +0 -448
- package/coverage/lcov-report/src/main-layout/MainLayoutNavigationButton.tsx.html +0 -295
- package/coverage/lcov-report/src/main-layout/MainLayoutTitle.tsx.html +0 -184
- package/coverage/lcov-report/src/main-layout/MainNavWindowSplitter.tsx.html +0 -427
- package/coverage/lcov-report/src/main-layout/MainNavigation.tsx.html +0 -568
- package/coverage/lcov-report/src/main-layout/MainNavigationTree.tsx.html +0 -115
- package/coverage/lcov-report/src/main-layout/index.html +0 -296
- package/coverage/lcov-report/src/main-layout/useLayoutNavigation.ts.html +0 -727
- package/coverage/lcov-report/src/main-layout/useMainLayout.ts.html +0 -523
- package/coverage/lcov-report/src/main-layout/useMainLayoutProvider.ts.html +0 -484
- package/coverage/lcov-report/src/main-layout-current/DefaultLayoutNavigationItemRenderer.tsx.html +0 -169
- package/coverage/lcov-report/src/main-layout-current/DefaultLayoutNavigationMiniItemRenderer.tsx.html +0 -160
- package/coverage/lcov-report/src/main-layout-current/Main.tsx.html +0 -265
- package/coverage/lcov-report/src/main-layout-current/MainLayout.tsx.html +0 -739
- package/coverage/lcov-report/src/main-layout-current/MainLayoutAppBar.tsx.html +0 -352
- package/coverage/lcov-report/src/main-layout-current/MainLayoutProvider.ts.html +0 -991
- package/coverage/lcov-report/src/main-layout-current/MainLayoutTitle.tsx.html +0 -184
- package/coverage/lcov-report/src/main-layout-current/MainNavWindowSplitter.tsx.html +0 -520
- package/coverage/lcov-report/src/main-layout-current/MainNavigation.tsx.html +0 -586
- package/coverage/lcov-report/src/main-layout-current/NavigationButton.tsx.html +0 -283
- package/coverage/lcov-report/src/main-layout-current/index.html +0 -266
- package/coverage/lcov-report/src/main-layout-current/useLayoutNavigation.ts.html +0 -727
- package/coverage/lcov-report/src/media-queries/AppSizeProvider.tsx.html +0 -502
- package/coverage/lcov-report/src/media-queries/appSize.ts.html +0 -445
- package/coverage/lcov-report/src/media-queries/index.html +0 -146
- package/coverage/lcov-report/src/media-queries/useMediaQuery.ts.html +0 -244
- package/coverage/lcov-report/src/media-queries/useMinWidthMediaQuery.ts.html +0 -115
- package/coverage/lcov-report/src/menu/DropdownMenu.tsx.html +0 -976
- package/coverage/lcov-report/src/menu/Menu.tsx.html +0 -1870
- package/coverage/lcov-report/src/menu/MenuBar.tsx.html +0 -442
- package/coverage/lcov-report/src/menu/MenuButton.tsx.html +0 -490
- package/coverage/lcov-report/src/menu/MenuConfigurationProvider.tsx.html +0 -637
- package/coverage/lcov-report/src/menu/MenuItem.tsx.html +0 -292
- package/coverage/lcov-report/src/menu/MenuItemButton.tsx.html +0 -580
- package/coverage/lcov-report/src/menu/MenuItemCircularProgress.tsx.html +0 -433
- package/coverage/lcov-report/src/menu/MenuItemGroup.tsx.html +0 -376
- package/coverage/lcov-report/src/menu/MenuItemSeparator.tsx.html +0 -226
- package/coverage/lcov-report/src/menu/MenuSheet.tsx.html +0 -502
- package/coverage/lcov-report/src/menu/MenuVisibilityProvider.tsx.html +0 -370
- package/coverage/lcov-report/src/menu/MenuWidget.tsx.html +0 -631
- package/coverage/lcov-report/src/menu/MenuWidgetKeyboardProvider.tsx.html +0 -190
- package/coverage/lcov-report/src/menu/index.html +0 -116
- package/coverage/lcov-report/src/menu/useContextMenu.ts.html +0 -490
- package/coverage/lcov-report/src/menu/useMenuBarProvider.ts.html +0 -349
- package/coverage/lcov-report/src/menu/utils.ts.html +0 -271
- package/coverage/lcov-report/src/movement/constants.ts.html +0 -193
- package/coverage/lcov-report/src/movement/findMatchIndex.ts.html +0 -385
- package/coverage/lcov-report/src/movement/index.html +0 -116
- package/coverage/lcov-report/src/movement/useKeyboardMovementProvider.ts.html +0 -1687
- package/coverage/lcov-report/src/movement/utils.ts.html +0 -895
- package/coverage/lcov-report/src/navigation/CollapsibleNavGroup.tsx.html +0 -367
- package/coverage/lcov-report/src/navigation/DefaultNavigationRenderer.tsx.html +0 -325
- package/coverage/lcov-report/src/navigation/NavGroup.tsx.html +0 -202
- package/coverage/lcov-report/src/navigation/NavItem.tsx.html +0 -172
- package/coverage/lcov-report/src/navigation/NavSubheader.tsx.html +0 -193
- package/coverage/lcov-report/src/navigation/Navigation.tsx.html +0 -358
- package/coverage/lcov-report/src/navigation/index.html +0 -191
- package/coverage/lcov-report/src/overlay/Overlay.tsx.html +0 -556
- package/coverage/lcov-report/src/overlay/index.html +0 -131
- package/coverage/lcov-report/src/overlay/overlayStyles.ts.html +0 -340
- package/coverage/lcov-report/src/portal/Portal.tsx.html +0 -223
- package/coverage/lcov-report/src/portal/PortalContainerProvider.tsx.html +0 -367
- package/coverage/lcov-report/src/portal/index.html +0 -131
- package/coverage/lcov-report/src/positioning/constants.ts.html +0 -463
- package/coverage/lcov-report/src/positioning/getFixedPosition.ts.html +0 -610
- package/coverage/lcov-report/src/positioning/index.html +0 -191
- package/coverage/lcov-report/src/positioning/useFixedPositioning.ts.html +0 -1339
- package/coverage/lcov-report/src/positioning/utils.ts.html +0 -1225
- package/coverage/lcov-report/src/progress/CircularProgress.tsx.html +0 -799
- package/coverage/lcov-report/src/progress/LinearProgress.tsx.html +0 -658
- package/coverage/lcov-report/src/progress/getProgressA11y.ts.html +0 -160
- package/coverage/lcov-report/src/progress/index.html +0 -146
- package/coverage/lcov-report/src/responsive-item/ResponsiveItemContainer.tsx.html +0 -628
- package/coverage/lcov-report/src/responsive-item/ResponsiveItemOverlay.tsx.html +0 -385
- package/coverage/lcov-report/src/responsive-item/index.html +0 -146
- package/coverage/lcov-report/src/responsive-item/styles.ts.html +0 -259
- package/coverage/lcov-report/src/scroll/ScrollLock.tsx.html +0 -133
- package/coverage/lcov-report/src/scroll/getScrollbarWidth.ts.html +0 -181
- package/coverage/lcov-report/src/scroll/index.html +0 -146
- package/coverage/lcov-report/src/scroll/useScrollLock.ts.html +0 -241
- package/coverage/lcov-report/src/segmented-button/SegmentedButton.tsx.html +0 -619
- package/coverage/lcov-report/src/segmented-button/SegmentedButtonContainer.tsx.html +0 -277
- package/coverage/lcov-report/src/segmented-button/index.html +0 -161
- package/coverage/lcov-report/src/segmented-button/segmentedButtonContainerStyles.ts.html +0 -160
- package/coverage/lcov-report/src/segmented-button/segmentedButtonStyles.ts.html +0 -205
- package/coverage/lcov-report/src/sheet/Sheet.tsx.html +0 -397
- package/coverage/lcov-report/src/sheet/index.html +0 -131
- package/coverage/lcov-report/src/sheet/styles.ts.html +0 -376
- package/coverage/lcov-report/src/snackbar/DefaultToastRenderer.tsx.html +0 -526
- package/coverage/lcov-report/src/snackbar/Snackbar.tsx.html +0 -628
- package/coverage/lcov-report/src/snackbar/Toast.tsx.html +0 -841
- package/coverage/lcov-report/src/snackbar/ToastActionButton.tsx.html +0 -298
- package/coverage/lcov-report/src/snackbar/ToastCloseButton.tsx.html +0 -349
- package/coverage/lcov-report/src/snackbar/ToastContent.tsx.html +0 -364
- package/coverage/lcov-report/src/snackbar/ToastManager.tsx.html +0 -1786
- package/coverage/lcov-report/src/snackbar/ToastManagerProvider.tsx.html +0 -400
- package/coverage/lcov-report/src/snackbar/index.html +0 -281
- package/coverage/lcov-report/src/snackbar/snackbarStyles.ts.html +0 -214
- package/coverage/lcov-report/src/snackbar/toastContentStyles.ts.html +0 -196
- package/coverage/lcov-report/src/snackbar/toastStyles.ts.html +0 -268
- package/coverage/lcov-report/src/snackbar/useCurrentToastActions.ts.html +0 -226
- package/coverage/lcov-report/src/snackbar/useDefaultToastRenderer.ts.html +0 -85
- package/coverage/lcov-report/src/snackbar/useDefaultToastRenderer.tsx.html +0 -394
- package/coverage/lcov-report/src/snackbar/useRemoveToast.ts.html +0 -169
- package/coverage/lcov-report/src/snackbar/useToast.ts.html +0 -184
- package/coverage/lcov-report/src/snackbar/useToastRenderer.ts.html +0 -85
- package/coverage/lcov-report/src/suspense/CircularProgressSuspense.tsx.html +0 -283
- package/coverage/lcov-report/src/suspense/NullSsrSuspense.tsx.html +0 -151
- package/coverage/lcov-report/src/suspense/NullSuspense.tsx.html +0 -202
- package/coverage/lcov-report/src/suspense/index.html +0 -131
- package/coverage/lcov-report/src/table/Table.tsx.html +0 -457
- package/coverage/lcov-report/src/table/TableBody.tsx.html +0 -280
- package/coverage/lcov-report/src/table/TableCell.tsx.html +0 -982
- package/coverage/lcov-report/src/table/TableCellContent.tsx.html +0 -436
- package/coverage/lcov-report/src/table/TableCheckbox.tsx.html +0 -715
- package/coverage/lcov-report/src/table/TableConfigurationProvider.tsx.html +0 -484
- package/coverage/lcov-report/src/table/TableContainer.tsx.html +0 -220
- package/coverage/lcov-report/src/table/TableContainerProvider.tsx.html +0 -193
- package/coverage/lcov-report/src/table/TableFooter.tsx.html +0 -538
- package/coverage/lcov-report/src/table/TableHeader.tsx.html +0 -565
- package/coverage/lcov-report/src/table/TableRadio.tsx.html +0 -676
- package/coverage/lcov-report/src/table/TableRow.tsx.html +0 -289
- package/coverage/lcov-report/src/table/index.html +0 -371
- package/coverage/lcov-report/src/table/tableCellStyles.ts.html +0 -334
- package/coverage/lcov-report/src/table/tableContainerStyles.ts.html +0 -142
- package/coverage/lcov-report/src/table/tableFooterStyles.ts.html +0 -166
- package/coverage/lcov-report/src/table/tableHeaderStyles.ts.html +0 -172
- package/coverage/lcov-report/src/table/tableRowStyles.ts.html +0 -169
- package/coverage/lcov-report/src/table/tableStyles.ts.html +0 -157
- package/coverage/lcov-report/src/tabs/Tab.tsx.html +0 -622
- package/coverage/lcov-report/src/tabs/TabList.tsx.html +0 -796
- package/coverage/lcov-report/src/tabs/TabListScrollButton.tsx.html +0 -490
- package/coverage/lcov-report/src/tabs/index.html +0 -251
- package/coverage/lcov-report/src/tabs/tabIndicatorStyles.ts.html +0 -187
- package/coverage/lcov-report/src/tabs/tabListScrollButtonStyles.ts.html +0 -226
- package/coverage/lcov-report/src/tabs/tabListStyles.ts.html +0 -241
- package/coverage/lcov-report/src/tabs/tabStyles.ts.html +0 -265
- package/coverage/lcov-report/src/tabs/useTabList.ts.html +0 -736
- package/coverage/lcov-report/src/tabs/useTabs.ts.html +0 -1567
- package/coverage/lcov-report/src/tabs/useTabsOriginal.ts.html +0 -760
- package/coverage/lcov-report/src/tabs/utils.ts.html +0 -337
- package/coverage/lcov-report/src/test-utils/IntersectionObserver.ts.html +0 -235
- package/coverage/lcov-report/src/test-utils/ResizeObserver.ts.html +0 -1045
- package/coverage/lcov-report/src/test-utils/data-testid.ts.html +0 -112
- package/coverage/lcov-report/src/test-utils/drag.ts.html +0 -337
- package/coverage/lcov-report/src/test-utils/index.html +0 -116
- package/coverage/lcov-report/src/test-utils/jest-setup.ts.html +0 -124
- package/coverage/lcov-report/src/test-utils/matchMedia.ts.html +0 -679
- package/coverage/lcov-report/src/test-utils/polyfills/IntersectionObserver.ts.html +0 -109
- package/coverage/lcov-report/src/test-utils/polyfills/ResizeObserver.ts.html +0 -100
- package/coverage/lcov-report/src/test-utils/polyfills/TextDecoder.ts.html +0 -106
- package/coverage/lcov-report/src/test-utils/polyfills/TextEncoder.ts.html +0 -100
- package/coverage/lcov-report/src/test-utils/polyfills/index.html +0 -176
- package/coverage/lcov-report/src/test-utils/polyfills/matchMedia.ts.html +0 -109
- package/coverage/lcov-report/src/test-utils/polyfills/offsetParent.ts.html +0 -202
- package/coverage/lcov-report/src/test-utils/polyfills/scrollIntoView.ts.html +0 -112
- package/coverage/lcov-report/src/test-utils/render.tsx.html +0 -220
- package/coverage/lcov-report/src/test-utils/root-html-environment.ts.html +0 -85
- package/coverage/lcov-report/src/test-utils/timers.ts.html +0 -223
- package/coverage/lcov-report/src/test-utils/utils.ts.html +0 -118
- package/coverage/lcov-report/src/theme/ColorSchemeProvider.tsx.html +0 -811
- package/coverage/lcov-report/src/theme/LocalStorageColorSchemeProvider.tsx.html +0 -475
- package/coverage/lcov-report/src/theme/ThemeProvider.tsx.html +0 -1510
- package/coverage/lcov-report/src/theme/colors.ts.html +0 -910
- package/coverage/lcov-report/src/theme/cssVars.ts.html +0 -130
- package/coverage/lcov-report/src/theme/index.html +0 -251
- package/coverage/lcov-report/src/theme/useCSSVariables.ts.html +0 -622
- package/coverage/lcov-report/src/theme/useColorScheme.ts.html +0 -490
- package/coverage/lcov-report/src/theme/useColorSchemeMetaTag.ts.html +0 -244
- package/coverage/lcov-report/src/theme/useColorSchemeProvider.ts.html +0 -433
- package/coverage/lcov-report/src/theme/usePrefersColorScheme.ts.html +0 -121
- package/coverage/lcov-report/src/theme/utils.ts.html +0 -670
- package/coverage/lcov-report/src/tooltip/Tooltip.tsx.html +0 -559
- package/coverage/lcov-report/src/tooltip/TooltipHoverModeProvider.tsx.html +0 -409
- package/coverage/lcov-report/src/tooltip/constants.ts.html +0 -208
- package/coverage/lcov-report/src/tooltip/index.html +0 -206
- package/coverage/lcov-report/src/tooltip/tooltipStyles.ts.html +0 -181
- package/coverage/lcov-report/src/tooltip/useOverflowTooltip.ts.html +0 -364
- package/coverage/lcov-report/src/tooltip/useTooltip.ts.html +0 -2095
- package/coverage/lcov-report/src/tooltip/useTooltipPosition.ts.html +0 -388
- package/coverage/lcov-report/src/tooltip/utils.ts.html +0 -238
- package/coverage/lcov-report/src/transition/CSSTransition.tsx.html +0 -358
- package/coverage/lcov-report/src/transition/Collapse.tsx.html +0 -337
- package/coverage/lcov-report/src/transition/CrossFade.tsx.html +0 -436
- package/coverage/lcov-report/src/transition/ScaleTransition.tsx.html +0 -328
- package/coverage/lcov-report/src/transition/SkeletonPlaceholder.tsx.html +0 -613
- package/coverage/lcov-report/src/transition/Slide.tsx.html +0 -367
- package/coverage/lcov-report/src/transition/SlideContainer.tsx.html +0 -649
- package/coverage/lcov-report/src/transition/collapseStyles.ts.html +0 -184
- package/coverage/lcov-report/src/transition/config.ts.html +0 -187
- package/coverage/lcov-report/src/transition/constants.ts.html +0 -103
- package/coverage/lcov-report/src/transition/maxWidthTransition.ts.html +0 -157
- package/coverage/lcov-report/src/transition/skeletonPlaceholderUtils.ts.html +0 -400
- package/coverage/lcov-report/src/transition/useCarousel.ts.html +0 -835
- package/coverage/lcov-report/src/transition/useCollapseTransition.ts.html +0 -1384
- package/coverage/lcov-report/src/transition/useCrossFadeTransition.ts.html +0 -469
- package/coverage/lcov-report/src/transition/useMaxWidthTransition.ts.html +0 -205
- package/coverage/lcov-report/src/transition/useScaleTransition.ts.html +0 -535
- package/coverage/lcov-report/src/transition/useSkeletonPlaceholder.ts.html +0 -958
- package/coverage/lcov-report/src/transition/useSlideTransition.ts.html +0 -424
- package/coverage/lcov-report/src/transition/useTransition.ts.html +0 -943
- package/coverage/lcov-report/src/transition/utils.ts.html +0 -529
- package/coverage/lcov-report/src/tree/DefaultTreeItemRenderer.tsx.html +0 -313
- package/coverage/lcov-report/src/tree/Tree.tsx.html +0 -1054
- package/coverage/lcov-report/src/tree/TreeGroup.tsx.html +0 -367
- package/coverage/lcov-report/src/tree/TreeItem.tsx.html +0 -1006
- package/coverage/lcov-report/src/tree/TreeItemExpander.tsx.html +0 -355
- package/coverage/lcov-report/src/tree/TreeProvider.tsx.html +0 -679
- package/coverage/lcov-report/src/tree/index.html +0 -116
- package/coverage/lcov-report/src/tree/styles.ts.html +0 -538
- package/coverage/lcov-report/src/tree/useTree.ts.html +0 -289
- package/coverage/lcov-report/src/tree/useTreeExpansion.ts.html +0 -241
- package/coverage/lcov-report/src/tree/useTreeItems.ts.html +0 -496
- package/coverage/lcov-report/src/tree/useTreeMovement.ts.html +0 -700
- package/coverage/lcov-report/src/tree/useTreeSelection.ts.html +0 -274
- package/coverage/lcov-report/src/tree/utils.ts.html +0 -277
- package/coverage/lcov-report/src/typography/SrOnly.tsx.html +0 -328
- package/coverage/lcov-report/src/typography/TextContainer.tsx.html +0 -403
- package/coverage/lcov-report/src/typography/Typography.tsx.html +0 -1027
- package/coverage/lcov-report/src/typography/WritingDirection.tsx.html +0 -775
- package/coverage/lcov-report/src/typography/WritingDirectionProvider.tsx.html +0 -781
- package/coverage/lcov-report/src/typography/index.html +0 -161
- package/coverage/lcov-report/src/useAsyncAction.ts.html +0 -685
- package/coverage/lcov-report/src/useDebounced.ts.html +0 -190
- package/coverage/lcov-report/src/useDebouncedFunction.ts.html +0 -436
- package/coverage/lcov-report/src/useDropzone.ts.html +0 -766
- package/coverage/lcov-report/src/useElementSize.ts.html +0 -409
- package/coverage/lcov-report/src/useEnsuredId.ts.html +0 -175
- package/coverage/lcov-report/src/useEnsuredRef.ts.html +0 -253
- package/coverage/lcov-report/src/useEnsuredState.ts.html +0 -235
- package/coverage/lcov-report/src/useHtmlClassName.ts.html +0 -142
- package/coverage/lcov-report/src/useIntersectionObserver.ts.html +0 -1075
- package/coverage/lcov-report/src/useIsomorphicLayoutEffect.ts.html +0 -130
- package/coverage/lcov-report/src/useLocalStorage.ts.html +0 -1852
- package/coverage/lcov-report/src/useLocalStorageEvents.ts.html +0 -85
- package/coverage/lcov-report/src/useMediaQuery.ts.html +0 -241
- package/coverage/lcov-report/src/useMinWidthMediaQuery.ts.html +0 -115
- package/coverage/lcov-report/src/useMutationObserver.ts.html +0 -310
- package/coverage/lcov-report/src/useOrientation.ts.html +0 -271
- package/coverage/lcov-report/src/usePageInactive.ts.html +0 -448
- package/coverage/lcov-report/src/useResizeListener.ts.html +0 -391
- package/coverage/lcov-report/src/useResizeObserver.ts.html +0 -790
- package/coverage/lcov-report/src/useThrottledFunction.ts.html +0 -484
- package/coverage/lcov-report/src/useToggle.ts.html +0 -253
- package/coverage/lcov-report/src/useUnmounted.ts.html +0 -217
- package/coverage/lcov-report/src/useWindowSize.ts.html +0 -460
- package/coverage/lcov-report/src/utils/RecursiveRender.tsx.html +0 -253
- package/coverage/lcov-report/src/utils/RenderRecursively.tsx.html +0 -790
- package/coverage/lcov-report/src/utils/alphaNumericSort.ts.html +0 -535
- package/coverage/lcov-report/src/utils/applyRef.ts.html +0 -214
- package/coverage/lcov-report/src/utils/bem.ts.html +0 -412
- package/coverage/lcov-report/src/utils/filters.ts.html +0 -1318
- package/coverage/lcov-report/src/utils/getClientPosition.ts.html +0 -226
- package/coverage/lcov-report/src/utils/getMiddleOfRange.ts.html +0 -163
- package/coverage/lcov-report/src/utils/getPercentage.ts.html +0 -253
- package/coverage/lcov-report/src/utils/getRangeDefaultValue.ts.html +0 -169
- package/coverage/lcov-report/src/utils/getRangeSteps.ts.html +0 -157
- package/coverage/lcov-report/src/utils/getUseStateSetterValue.ts.html +0 -85
- package/coverage/lcov-report/src/utils/identity.ts.html +0 -100
- package/coverage/lcov-report/src/utils/index.html +0 -116
- package/coverage/lcov-report/src/utils/isElementVisible.ts.html +0 -214
- package/coverage/lcov-report/src/utils/isValidNumber.ts.html +0 -118
- package/coverage/lcov-report/src/utils/loop.ts.html +0 -262
- package/coverage/lcov-report/src/utils/nearest.ts.html +0 -220
- package/coverage/lcov-report/src/utils/parseCssLengthUnit.ts.html +0 -280
- package/coverage/lcov-report/src/utils/randomInt.ts.html +0 -148
- package/coverage/lcov-report/src/utils/wait.ts.html +0 -139
- package/coverage/lcov-report/src/utils/withinRange.ts.html +0 -184
- package/coverage/lcov-report/src/window-splitter/WindowSplitter.tsx.html +0 -445
- package/coverage/lcov-report/src/window-splitter/index.html +0 -131
- package/coverage/lcov-report/src/window-splitter/useControlledWindowSplitter.ts.html +0 -562
- package/coverage/lcov-report/src/window-splitter/useLocalStorageWindowSplitter.ts.html +0 -331
- package/coverage/lcov-report/src/window-splitter/useWindowSplitter.ts.html +0 -508
- package/coverage/lcov-report/src/window-splitter/useWindowSplitterDefault.ts.html +0 -466
- package/coverage/lcov-report/src/window-splitter/useWindowSplitterMaxValue.ts.html +0 -256
- package/coverage/lcov-report/styles.ts.html +0 -457
- package/coverage/lcov-report/suspense/CircularProgressSuspense.tsx.html +0 -283
- package/coverage/lcov-report/suspense/NullSuspense.tsx.html +0 -202
- package/coverage/lcov-report/suspense/index.html +0 -131
- package/coverage/lcov-report/switchStyles.ts.html +0 -172
- package/coverage/lcov-report/tabIndicatorStyles.ts.html +0 -187
- package/coverage/lcov-report/tabListScrollButtonStyles.ts.html +0 -226
- package/coverage/lcov-report/tabListStyles.ts.html +0 -241
- package/coverage/lcov-report/tabStyles.ts.html +0 -265
- package/coverage/lcov-report/table/Table.tsx.html +0 -526
- package/coverage/lcov-report/table/TableBody.tsx.html +0 -280
- package/coverage/lcov-report/table/TableCell.tsx.html +0 -1180
- package/coverage/lcov-report/table/TableCheckbox.tsx.html +0 -709
- package/coverage/lcov-report/table/TableFooter.tsx.html +0 -508
- package/coverage/lcov-report/table/TableHeader.tsx.html +0 -607
- package/coverage/lcov-report/table/TableRadio.tsx.html +0 -670
- package/coverage/lcov-report/table/TableRow.tsx.html +0 -370
- package/coverage/lcov-report/table/index.html +0 -191
- package/coverage/lcov-report/tableCellStyles.ts.html +0 -334
- package/coverage/lcov-report/tableContainerStyles.ts.html +0 -142
- package/coverage/lcov-report/tableFooterStyles.ts.html +0 -157
- package/coverage/lcov-report/tableHeaderStyles.ts.html +0 -163
- package/coverage/lcov-report/tableRowStyles.ts.html +0 -169
- package/coverage/lcov-report/tableStyles.ts.html +0 -157
- package/coverage/lcov-report/tabs/Tab.tsx.html +0 -592
- package/coverage/lcov-report/tabs/TabList.tsx.html +0 -796
- package/coverage/lcov-report/tabs/TabListScrollButton.tsx.html +0 -472
- package/coverage/lcov-report/tabs/index.html +0 -206
- package/coverage/lcov-report/tabs/tabIndicatorStyles.ts.html +0 -187
- package/coverage/lcov-report/tabs/tabListStyles.ts.html +0 -241
- package/coverage/lcov-report/tabs/tabStyles.ts.html +0 -253
- package/coverage/lcov-report/tabs/useTabList.ts.html +0 -736
- package/coverage/lcov-report/tabs/useTabs.ts.html +0 -1567
- package/coverage/lcov-report/tabs/utils.ts.html +0 -337
- package/coverage/lcov-report/test-utils/index.html +0 -116
- package/coverage/lcov-report/test-utils/jest-setup.ts.html +0 -124
- package/coverage/lcov-report/test-utils/matchMedia.ts.html +0 -667
- package/coverage/lcov-report/test-utils/polyfills/index.html +0 -116
- package/coverage/lcov-report/test-utils/polyfills/matchMedia.ts.html +0 -109
- package/coverage/lcov-report/test-utils/polyfills/offsetParent.ts.html +0 -202
- package/coverage/lcov-report/test-utils/use.ts.html +0 -187
- package/coverage/lcov-report/theme/ColorSchemeProvider.tsx.html +0 -811
- package/coverage/lcov-report/theme/LocalStorageColorSchemeProvider.tsx.html +0 -268
- package/coverage/lcov-report/theme/ThemeProvider.tsx.html +0 -1453
- package/coverage/lcov-report/theme/cssVars.ts.html +0 -130
- package/coverage/lcov-report/theme/index.html +0 -191
- package/coverage/lcov-report/theme/useColorScheme.ts.html +0 -475
- package/coverage/lcov-report/theme/useColorSchemeMetaTag.ts.html +0 -175
- package/coverage/lcov-report/theme/useColorSchemeProvider.ts.html +0 -244
- package/coverage/lcov-report/theme/usePrefersColorScheme.ts.html +0 -103
- package/coverage/lcov-report/tooltip/Tooltip.tsx.html +0 -559
- package/coverage/lcov-report/tooltip/TooltipHoverModeProvider.tsx.html +0 -409
- package/coverage/lcov-report/tooltip/constants.ts.html +0 -208
- package/coverage/lcov-report/tooltip/index.html +0 -116
- package/coverage/lcov-report/tooltip/tooltipStyles.ts.html +0 -181
- package/coverage/lcov-report/tooltip/useOverflowTooltip.ts.html +0 -364
- package/coverage/lcov-report/tooltip/useTooltip.ts.html +0 -2095
- package/coverage/lcov-report/tooltipStyles.ts.html +0 -181
- package/coverage/lcov-report/transition/SkeletonPlaceholder.tsx.html +0 -595
- package/coverage/lcov-report/transition/config.ts.html +0 -187
- package/coverage/lcov-report/transition/maxWidthTransition.ts.html +0 -157
- package/coverage/lcov-report/transition/skeletonPlaceholderUtils.ts.html +0 -400
- package/coverage/lcov-report/transition/useMaxWidthTransition.ts.html +0 -199
- package/coverage/lcov-report/transition/useScaleTransition.ts.html +0 -535
- package/coverage/lcov-report/transition/useSkeletonPlaceholder.ts.html +0 -952
- package/coverage/lcov-report/transition/useTransition.ts.html +0 -943
- package/coverage/lcov-report/tree/DefaultTreeItemRenderer.tsx.html +0 -301
- package/coverage/lcov-report/tree/Tree.tsx.html +0 -1054
- package/coverage/lcov-report/tree/TreeGroup.tsx.html +0 -370
- package/coverage/lcov-report/tree/TreeItem.tsx.html +0 -1006
- package/coverage/lcov-report/tree/TreeItemExpander.tsx.html +0 -328
- package/coverage/lcov-report/tree/TreeProvider.tsx.html +0 -679
- package/coverage/lcov-report/tree/index.html +0 -116
- package/coverage/lcov-report/tree/styles.ts.html +0 -538
- package/coverage/lcov-report/tree/useTree.ts.html +0 -289
- package/coverage/lcov-report/tree/useTreeExpansion.ts.html +0 -241
- package/coverage/lcov-report/tree/useTreeItems.ts.html +0 -496
- package/coverage/lcov-report/tree/useTreeMovement.ts.html +0 -700
- package/coverage/lcov-report/tree/useTreeSelection.ts.html +0 -274
- package/coverage/lcov-report/tree/utils.ts.html +0 -277
- package/coverage/lcov-report/typography/TextContainer.tsx.html +0 -433
- package/coverage/lcov-report/typography/Typography.tsx.html +0 -1027
- package/coverage/lcov-report/typography/WritingDirection.tsx.html +0 -775
- package/coverage/lcov-report/typography/WritingDirectionProvider.tsx.html +0 -781
- package/coverage/lcov-report/useAutoComplete.ts.html +0 -787
- package/coverage/lcov-report/useCollapseTransition.ts.html +0 -1384
- package/coverage/lcov-report/useCombobox.ts.html +0 -1513
- package/coverage/lcov-report/useDraggable.ts.html +0 -2458
- package/coverage/lcov-report/useDropzone.ts.html +0 -763
- package/coverage/lcov-report/useEnsuredRef.ts.html +0 -250
- package/coverage/lcov-report/useExpandableLayout.ts.html +0 -802
- package/coverage/lcov-report/useExpansionPanels.ts.html +0 -913
- package/coverage/lcov-report/useHigherContrastChildren.tsx.html +0 -355
- package/coverage/lcov-report/useInlineAutoComplete.ts.html +0 -379
- package/coverage/lcov-report/useLayoutTree.ts.html +0 -691
- package/coverage/lcov-report/useLocalStorage.ts.html +0 -1828
- package/coverage/lcov-report/useMinWidthMediaQuery.ts.html +0 -115
- package/coverage/lcov-report/useMutationObserver.ts.html +0 -310
- package/coverage/lcov-report/useRemoveToast.ts.html +0 -160
- package/coverage/lcov-report/useResizeObserver.ts.html +0 -874
- package/coverage/lcov-report/useResizingTextArea.ts.html +0 -523
- package/coverage/lcov-report/useSelectCombobox.ts.html +0 -295
- package/coverage/lcov-report/useSkeletonPlaceholder.ts.html +0 -952
- package/coverage/lcov-report/useTabList.ts.html +0 -736
- package/coverage/lcov-report/useTabs.ts.html +0 -757
- package/coverage/lcov-report/useThrottledFunction.ts.html +0 -475
- package/coverage/lcov-report/useTooltip.ts.html +0 -2041
- package/coverage/lcov-report/useTransition.ts.html +0 -934
- package/coverage/lcov-report/useTree.ts.html +0 -286
- package/coverage/lcov-report/useWindowSplitter.ts.html +0 -640
- package/coverage/lcov-report/useWindowSplitterMaxValue.ts.html +0 -256
- package/coverage/lcov-report/utils/RecursiveRender.tsx.html +0 -253
- package/coverage/lcov-report/utils/RenderRecursively.tsx.html +0 -688
- package/coverage/lcov-report/utils/alphaNumericSort.ts.html +0 -496
- package/coverage/lcov-report/utils/caseInsensitiveFilter.ts.html +0 -397
- package/coverage/lcov-report/utils/filters.ts.html +0 -1318
- package/coverage/lcov-report/utils/fuzzyFilter.ts.html +0 -241
- package/coverage/lcov-report/utils/index.html +0 -116
- package/coverage/lcov-report/utils/isElementVisible.ts.html +0 -211
- package/coverage/lcov-report/utils/parseCssLengthUnit.ts.html +0 -280
- package/coverage/lcov-report/utils/randomInt.ts.html +0 -148
- package/coverage/lcov-report/utils/searching.ts.html +0 -85
- package/coverage/lcov-report/utils/wait.ts.html +0 -139
- package/coverage/lcov-report/wait.ts.html +0 -139
- package/coverage/lcov-report/window-splitter/WindowSplitter.tsx.html +0 -448
- package/coverage/lcov-report/window-splitter/index.html +0 -116
- package/coverage/lcov-report/window-splitter/useControlledWindowSplitter.ts.html +0 -562
- package/coverage/lcov-report/window-splitter/useLocalStorageWindowSplitter.ts.html +0 -331
- package/coverage/lcov-report/window-splitter/useWindowSplitter.ts.html +0 -640
- package/coverage/lcov-report/window-splitter/useWindowSplitterDefault.ts.html +0 -466
- package/coverage/lcov-report/window-splitter/useWindowSplitterOrig.ts.html +0 -598
- package/dist/useAsyncAction.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/form/MenuItemInputToggle.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport {\n forwardRef,\n type CSSProperties,\n type HTMLAttributes,\n type MouseEvent,\n type ReactNode,\n} from \"react\";\nimport { ListItem } from \"../list/ListItem.js\";\nimport {\n type ListItemAddonPosition,\n type ListItemAddonType,\n type ListItemChildrenTextProps,\n type ListItemHeight,\n} from \"../list/types.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport {\n type IndeterminateCheckboxProps,\n type InputToggleIconProps,\n} from \"./InputToggle.js\";\nimport { InputToggleIcon } from \"./InputToggleIcon.js\";\nimport { SwitchTrack } from \"./SwitchTrack.js\";\nimport { type InputToggleSize } from \"./inputToggleStyles.js\";\nimport {\n menuItemInputToggle,\n menuItemInputToggleBall,\n menuItemInputToggleIcon,\n menuItemInputToggleTrack,\n} from \"./menuItemInputToggleStyles.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * @since 6.0.0\n */\nexport type MenuItemInputToggleCheckedCallback = (\n checked: boolean,\n event: MouseEvent<HTMLLIElement>\n) => void;\n\n/** @since 2.8.0 */\nexport interface BaseMenuItemInputToggleProps\n extends HTMLAttributes<HTMLLIElement>,\n InputToggleIconProps,\n ListItemChildrenTextProps {\n checked: boolean;\n onCheckedChange: MenuItemInputToggleCheckedCallback;\n\n /**\n * @defaultValue `\"menu-item-\" + useId()`\n */\n id?: string;\n\n /** @defaultValue `false` */\n disabled?: boolean;\n\n /**\n * Set this to `true` if the `Menu` should not close when the input toggle is\n * clicked. This can be useful when interacting with a checkbox group within a\n * menu or allowing the user to select multiple options before closing the\n * menu.\n *\n * @defaultValue `false`\n */\n preventMenuHideOnClick?: boolean;\n\n /**\n * This is set to `\"auto\"` by default so the icon shrinks back down to the\n * default icon size instead of relative to the current font size. You\n * probably don't want to change this since it'll also modify the height of\n * the menu item\n *\n * @defaultValue `\"auto\"`\n */\n size?: InputToggleSize;\n\n /** @defaultValue `\"auto\"` */\n height?: ListItemHeight;\n\n /** @defaultValue `false` */\n iconAfter?: boolean;\n\n addon?: ReactNode;\n addonType?: ListItemAddonType;\n addonPosition?: ListItemAddonPosition;\n\n /** @defaultValue `false` */\n addonForceWrap?: boolean;\n\n /** @defaultValue `false` */\n disableAddonCenteredMedia?: boolean;\n}\n\nexport interface MenuItemCheckboxProps\n extends BaseMenuItemInputToggleProps,\n IndeterminateCheckboxProps {}\n\nexport type MenuItemRadioProps = BaseMenuItemInputToggleProps;\n\n/**\n * @since 2.8.0\n * @since 6.0.0 Added additional props for styling the track and ball.\n */\nexport interface MenuItemSwitchProps extends BaseMenuItemInputToggleProps {\n trackProps?: PropsWithRef<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;\n trackStyle?: CSSProperties;\n trackClassName?: string;\n ballProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;\n ballStyle?: CSSProperties;\n ballClassName?: string;\n}\n\n/**\n * @since 2.8.0\n * @since 6.0.0 Updated to be a union of the different props to enforce the\n * correct props based on `type`\n */\nexport type MenuItemInputToggleProps =\n | (MenuItemCheckboxProps & { type: \"checkbox\" })\n | (MenuItemRadioProps & { type: \"radio\" })\n | (MenuItemSwitchProps & { type: \"switch\" });\n\n/**\n * **Client Component**\n *\n * This is a low-level component that should probably not be used externally and\n * instead the `MenuItemCheckbox`, `MenuItemRadio`, or `MenuItemSwitch` should\n * be used instead.\n *\n * @see {@link MenuItemCheckbox} for checkbox examples\n * @see {@link MenuItemRadio} for radio examples\n * @see {@link MenuItemSwitch} for switch examples\n * @since 2.8.0\n */\nexport const MenuItemInputToggle = forwardRef<\n HTMLLIElement,\n MenuItemInputToggleProps\n>(function MenuItemInputToggle(props, ref) {\n const {\n id: propId,\n type,\n disabled = false,\n checked,\n onCheckedChange,\n preventMenuHideOnClick = false,\n onClick = noop,\n className,\n tabIndex = -1,\n children,\n size = \"auto\",\n icon: propIcon,\n iconAfter = false,\n iconProps,\n iconStyle,\n iconClassName,\n checkedIcon,\n indeterminate,\n indeterminateIcon,\n addon,\n addonType,\n addonPosition,\n addonForceWrap,\n disableAddonCenteredMedia,\n ballProps,\n ballStyle,\n ballClassName,\n trackProps,\n trackStyle,\n trackClassName,\n ...remaining\n } = props as MenuItemSwitchProps &\n MenuItemCheckboxProps & { type: \"checkbox\" | \"radio\" | \"switch\" };\n const id = useEnsuredId(propId, \"menu-item\");\n\n let icon = propIcon;\n if (type === \"switch\") {\n icon = (\n <SwitchTrack\n style={trackStyle}\n {...trackProps}\n className={cnb(\n menuItemInputToggleTrack(),\n trackClassName,\n trackProps?.className\n )}\n active={checked}\n ballProps={ballProps}\n ballStyle={ballStyle}\n ballClassName={cnb(menuItemInputToggleBall(), ballClassName)}\n />\n );\n } else {\n icon = (\n <InputToggleIcon\n style={iconStyle}\n disableEm\n {...iconProps}\n className={cnb(\n menuItemInputToggleIcon(),\n iconClassName,\n iconProps?.className\n )}\n size={size}\n type={type}\n checked={checked}\n disabled={disabled}\n icon={propIcon}\n checkedIcon={checkedIcon}\n indeterminate={indeterminate}\n indeterminateIcon={indeterminateIcon}\n />\n );\n }\n\n let leftAddon: ReactNode;\n let leftAddonType: ListItemAddonType | undefined;\n let leftAddonPosition: ListItemAddonPosition | undefined;\n let leftAddonForceWrap: boolean | undefined;\n let disableLeftAddonCenteredMedia: boolean | undefined;\n let rightAddon: ReactNode;\n let rightAddonType: ListItemAddonType | undefined;\n let rightAddonPosition: ListItemAddonPosition | undefined;\n let rightAddonForceWrap: boolean | undefined;\n let disableRightAddonCenteredMedia: boolean | undefined;\n if (iconAfter) {\n leftAddon = addon;\n leftAddonType = addonType;\n leftAddonPosition = addonPosition;\n leftAddonForceWrap = addonForceWrap;\n disableLeftAddonCenteredMedia = disableAddonCenteredMedia;\n rightAddon = icon;\n } else {\n leftAddon = icon;\n rightAddon = addon;\n rightAddonType = addonType;\n rightAddonPosition = addonPosition;\n rightAddonForceWrap = addonForceWrap;\n disableRightAddonCenteredMedia = disableAddonCenteredMedia;\n }\n\n return (\n <ListItem\n {...remaining}\n // I'm not actually sure if this is correct\n aria-checked={indeterminate && checked ? \"mixed\" : checked}\n id={id}\n role={type === \"radio\" ? \"menuitemradio\" : \"menuitemcheckbox\"}\n onClick={(event) => {\n onClick(event);\n onCheckedChange(!checked, event);\n\n if (preventMenuHideOnClick) {\n event.stopPropagation();\n }\n }}\n ref={ref}\n className={menuItemInputToggle({ type, className })}\n disabled={disabled}\n tabIndex={tabIndex}\n leftAddon={leftAddon}\n leftAddonType={leftAddonType}\n leftAddonPosition={leftAddonPosition}\n leftAddonForceWrap={leftAddonForceWrap}\n disableLeftAddonCenteredMedia={disableLeftAddonCenteredMedia}\n rightAddon={rightAddon}\n rightAddonType={rightAddonType}\n rightAddonPosition={rightAddonPosition}\n rightAddonForceWrap={rightAddonForceWrap}\n disableRightAddonCenteredMedia={disableRightAddonCenteredMedia}\n >\n {children}\n </ListItem>\n );\n});\n"],"names":["cnb","forwardRef","ListItem","useEnsuredId","InputToggleIcon","SwitchTrack","menuItemInputToggle","menuItemInputToggleBall","menuItemInputToggleIcon","menuItemInputToggleTrack","noop","MenuItemInputToggle","props","ref","id","propId","type","disabled","checked","onCheckedChange","preventMenuHideOnClick","onClick","className","tabIndex","children","size","icon","propIcon","iconAfter","iconProps","iconStyle","iconClassName","checkedIcon","indeterminate","indeterminateIcon","addon","addonType","addonPosition","addonForceWrap","disableAddonCenteredMedia","ballProps","ballStyle","ballClassName","trackProps","trackStyle","trackClassName","remaining","style","active","disableEm","leftAddon","leftAddonType","leftAddonPosition","leftAddonForceWrap","disableLeftAddonCenteredMedia","rightAddon","rightAddonType","rightAddonPosition","rightAddonForceWrap","disableRightAddonCenteredMedia","aria-checked","role","event","stopPropagation"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;AACA,SAASA,GAAG,QAAQ,YAAY;AAChC,SACEC,UAAU,QAKL,QAAQ;AACf,SAASC,QAAQ,QAAQ,sBAAsB;AAQ/C,SAASC,YAAY,QAAQ,qBAAqB;AAKlD,SAASC,eAAe,QAAQ,uBAAuB;AACvD,SAASC,WAAW,QAAQ,mBAAmB;AAE/C,SACEC,mBAAmB,EACnBC,uBAAuB,EACvBC,uBAAuB,EACvBC,wBAAwB,QACnB,iCAAiC;AAExC,MAAMC,OAAO;AACX,aAAa;AACf;AA4FA;;;;;;;;;;;CAWC,GACD,OAAO,MAAMC,oCAAsBV,WAGjC,SAASU,oBAAoBC,KAAK,EAAEC,GAAG;IACvC,MAAM,EACJC,IAAIC,MAAM,EACVC,IAAI,EACJC,WAAW,KAAK,EAChBC,OAAO,EACPC,eAAe,EACfC,yBAAyB,KAAK,EAC9BC,UAAUX,IAAI,EACdY,SAAS,EACTC,WAAW,CAAC,CAAC,EACbC,QAAQ,EACRC,OAAO,MAAM,EACbC,MAAMC,QAAQ,EACdC,YAAY,KAAK,EACjBC,SAAS,EACTC,SAAS,EACTC,aAAa,EACbC,WAAW,EACXC,aAAa,EACbC,iBAAiB,EACjBC,KAAK,EACLC,SAAS,EACTC,aAAa,EACbC,cAAc,EACdC,yBAAyB,EACzBC,SAAS,EACTC,SAAS,EACTC,aAAa,EACbC,UAAU,EACVC,UAAU,EACVC,cAAc,EACd,GAAGC,WACJ,GAAGlC;IAEJ,MAAME,KAAKX,aAAaY,QAAQ;IAEhC,IAAIW,OAAOC;IACX,IAAIX,SAAS,UAAU;QACrBU,qBACE,KAACrB;YACC0C,OAAOH;YACN,GAAGD,UAAU;YACdrB,WAAWtB,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QACrBC,gCAAgCA;kBAE/BnC;;AAGP,GAAG"}
|
|
1
|
+
{"version":3,"sources":["../../src/form/MenuItemInputToggle.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport {\n forwardRef,\n type CSSProperties,\n type HTMLAttributes,\n type MouseEvent,\n type ReactNode,\n} from \"react\";\nimport { ListItem } from \"../list/ListItem.js\";\nimport {\n type ListItemAddonPosition,\n type ListItemAddonType,\n type ListItemChildrenTextProps,\n type ListItemHeight,\n} from \"../list/types.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport {\n type IndeterminateCheckboxProps,\n type InputToggleIconProps,\n} from \"./InputToggle.js\";\nimport { InputToggleIcon } from \"./InputToggleIcon.js\";\nimport { SwitchTrack } from \"./SwitchTrack.js\";\nimport { type InputToggleSize } from \"./inputToggleStyles.js\";\nimport {\n menuItemInputToggle,\n menuItemInputToggleBall,\n menuItemInputToggleIcon,\n menuItemInputToggleTrack,\n} from \"./menuItemInputToggleStyles.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * @since 6.0.0\n */\nexport type MenuItemInputToggleCheckedCallback = (\n checked: boolean,\n event: MouseEvent<HTMLLIElement>\n) => void;\n\n/** @since 2.8.0 */\nexport interface BaseMenuItemInputToggleProps\n extends HTMLAttributes<HTMLLIElement>,\n InputToggleIconProps,\n ListItemChildrenTextProps {\n checked: boolean;\n onCheckedChange: MenuItemInputToggleCheckedCallback;\n\n /**\n * @defaultValue `\"menu-item-\" + useId()`\n */\n id?: string;\n\n /** @defaultValue `false` */\n disabled?: boolean;\n\n /**\n * Set this to `true` if the `Menu` should not close when the input toggle is\n * clicked. This can be useful when interacting with a checkbox group within a\n * menu or allowing the user to select multiple options before closing the\n * menu.\n *\n * @defaultValue `false`\n */\n preventMenuHideOnClick?: boolean;\n\n /**\n * This is set to `\"auto\"` by default so the icon shrinks back down to the\n * default icon size instead of relative to the current font size. You\n * probably don't want to change this since it'll also modify the height of\n * the menu item\n *\n * @defaultValue `\"auto\"`\n */\n size?: InputToggleSize;\n\n /** @defaultValue `\"auto\"` */\n height?: ListItemHeight;\n\n /** @defaultValue `false` */\n iconAfter?: boolean;\n\n addon?: ReactNode;\n addonType?: ListItemAddonType;\n addonPosition?: ListItemAddonPosition;\n\n /** @defaultValue `false` */\n addonForceWrap?: boolean;\n\n /** @defaultValue `false` */\n disableAddonCenteredMedia?: boolean;\n}\n\nexport interface MenuItemCheckboxProps\n extends BaseMenuItemInputToggleProps,\n IndeterminateCheckboxProps {}\n\nexport type MenuItemRadioProps = BaseMenuItemInputToggleProps;\n\n/**\n * @since 2.8.0\n * @since 6.0.0 Added additional props for styling the track and ball.\n */\nexport interface MenuItemSwitchProps extends BaseMenuItemInputToggleProps {\n trackProps?: PropsWithRef<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;\n trackStyle?: CSSProperties;\n trackClassName?: string;\n ballProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;\n ballStyle?: CSSProperties;\n ballClassName?: string;\n}\n\n/**\n * @since 2.8.0\n * @since 6.0.0 Updated to be a union of the different props to enforce the\n * correct props based on `type`\n */\nexport type MenuItemInputToggleProps =\n | (MenuItemCheckboxProps & { type: \"checkbox\" })\n | (MenuItemRadioProps & { type: \"radio\" })\n | (MenuItemSwitchProps & { type: \"switch\" });\n\n/**\n * **Client Component**\n *\n * This is a low-level component that should probably not be used externally and\n * instead the `MenuItemCheckbox`, `MenuItemRadio`, or `MenuItemSwitch` should\n * be used instead.\n *\n * @see {@link MenuItemCheckbox} for checkbox examples\n * @see {@link MenuItemRadio} for radio examples\n * @see {@link MenuItemSwitch} for switch examples\n * @since 2.8.0\n */\nexport const MenuItemInputToggle = forwardRef<\n HTMLLIElement,\n MenuItemInputToggleProps\n>(function MenuItemInputToggle(props, ref) {\n const {\n id: propId,\n type,\n disabled = false,\n checked,\n onCheckedChange,\n preventMenuHideOnClick = false,\n onClick = noop,\n className,\n tabIndex = -1,\n children,\n size = \"auto\",\n icon: propIcon,\n iconAfter = false,\n iconProps,\n iconStyle,\n iconClassName,\n checkedIcon,\n indeterminate,\n indeterminateIcon,\n addon,\n addonType,\n addonPosition,\n addonForceWrap,\n disableAddonCenteredMedia,\n ballProps,\n ballStyle,\n ballClassName,\n trackProps,\n trackStyle,\n trackClassName,\n ...remaining\n } = props as MenuItemSwitchProps &\n MenuItemCheckboxProps & { type: \"checkbox\" | \"radio\" | \"switch\" };\n const id = useEnsuredId(propId, \"menu-item\");\n\n let icon = propIcon;\n if (type === \"switch\") {\n icon = (\n <SwitchTrack\n style={trackStyle}\n {...trackProps}\n className={cnb(\n menuItemInputToggleTrack(),\n trackClassName,\n trackProps?.className\n )}\n active={checked}\n ballProps={ballProps}\n ballStyle={ballStyle}\n ballClassName={cnb(menuItemInputToggleBall(), ballClassName)}\n />\n );\n } else {\n icon = (\n <InputToggleIcon\n style={iconStyle}\n disableEm\n {...iconProps}\n className={cnb(\n menuItemInputToggleIcon(),\n iconClassName,\n iconProps?.className\n )}\n size={size}\n type={type}\n checked={checked}\n disabled={disabled}\n icon={propIcon}\n checkedIcon={checkedIcon}\n indeterminate={indeterminate}\n indeterminateIcon={indeterminateIcon}\n />\n );\n }\n\n let leftAddon: ReactNode;\n let leftAddonType: ListItemAddonType | undefined;\n let leftAddonPosition: ListItemAddonPosition | undefined;\n let leftAddonForceWrap: boolean | undefined;\n let disableLeftAddonCenteredMedia: boolean | undefined;\n let rightAddon: ReactNode;\n let rightAddonType: ListItemAddonType | undefined;\n let rightAddonPosition: ListItemAddonPosition | undefined;\n let rightAddonForceWrap: boolean | undefined;\n let disableRightAddonCenteredMedia: boolean | undefined;\n if (iconAfter) {\n leftAddon = addon;\n leftAddonType = addonType;\n leftAddonPosition = addonPosition;\n leftAddonForceWrap = addonForceWrap;\n disableLeftAddonCenteredMedia = disableAddonCenteredMedia;\n rightAddon = icon;\n } else {\n leftAddon = icon;\n rightAddon = addon;\n rightAddonType = addonType;\n rightAddonPosition = addonPosition;\n rightAddonForceWrap = addonForceWrap;\n disableRightAddonCenteredMedia = disableAddonCenteredMedia;\n }\n\n return (\n <ListItem\n {...remaining}\n // I'm not actually sure if this is correct\n aria-checked={indeterminate && checked ? \"mixed\" : checked}\n id={id}\n role={type === \"radio\" ? \"menuitemradio\" : \"menuitemcheckbox\"}\n onClick={(event) => {\n onClick(event);\n onCheckedChange(!checked, event);\n\n if (preventMenuHideOnClick) {\n event.stopPropagation();\n }\n }}\n ref={ref}\n className={menuItemInputToggle({ type, className })}\n disabled={disabled}\n tabIndex={tabIndex}\n leftAddon={leftAddon}\n leftAddonType={leftAddonType}\n leftAddonPosition={leftAddonPosition}\n leftAddonForceWrap={leftAddonForceWrap}\n disableLeftAddonCenteredMedia={disableLeftAddonCenteredMedia}\n rightAddon={rightAddon}\n rightAddonType={rightAddonType}\n rightAddonPosition={rightAddonPosition}\n rightAddonForceWrap={rightAddonForceWrap}\n disableRightAddonCenteredMedia={disableRightAddonCenteredMedia}\n >\n {children}\n </ListItem>\n );\n});\n"],"names":["cnb","forwardRef","ListItem","useEnsuredId","InputToggleIcon","SwitchTrack","menuItemInputToggle","menuItemInputToggleBall","menuItemInputToggleIcon","menuItemInputToggleTrack","noop","MenuItemInputToggle","props","ref","id","propId","type","disabled","checked","onCheckedChange","preventMenuHideOnClick","onClick","className","tabIndex","children","size","icon","propIcon","iconAfter","iconProps","iconStyle","iconClassName","checkedIcon","indeterminate","indeterminateIcon","addon","addonType","addonPosition","addonForceWrap","disableAddonCenteredMedia","ballProps","ballStyle","ballClassName","trackProps","trackStyle","trackClassName","remaining","style","active","disableEm","leftAddon","leftAddonType","leftAddonPosition","leftAddonForceWrap","disableLeftAddonCenteredMedia","rightAddon","rightAddonType","rightAddonPosition","rightAddonForceWrap","disableRightAddonCenteredMedia","aria-checked","role","event","stopPropagation"],"mappings":"AAAA;;AACA,SAASA,GAAG,QAAQ,YAAY;AAChC,SACEC,UAAU,QAKL,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ACNT,MAAMA;YACNE,SAASA;YACTD,UAAUA;YACVS,MAAMC;YACNK,aAAaA;YACbC,eAAeA;YACfC,mBAAmBA;;IAGzB;IAEA,IAAIgB;IACJ,IAAIC;IACJ,IAAIC;IACJ,IAAIC;IACJ,IAAIC;IACJ,IAAIC;IACJ,IAAIC;IACJ,IAAIC;IACJ,IAAIC;IACJ,IAAIC;IACJ,IAAI/B,WAAW;QACbsB,YAAYf;QACZgB,gBAAgBf;QAChBgB,oBAAoBf;QACpBgB,qBAAqBf;QACrBgB,gCAAgCf;QAChCgB,aAAa7B;IACf,OAAO;QACLwB,YAAYxB;QACZ6B,aAAapB;QACbqB,iBAAiBpB;QACjBqB,qBAAqBpB;QACrBqB,sBAAsBpB;QACtBqB,iCAAiCpB;IACnC;IAEA,qBACE,KAACrC;QACE,GAAG4C,SAAS;QACb,2CAA2C;QAC3Cc,gBAAc3B,iBAAiBf,UAAU,UAAUA;QACnDJ,IAAIA;QACJ+C,MAAM7C,SAAS,UAAU,kBAAkB;QAC3CK,SAAS,CAACyC;YACRzC,QAAQyC;YACR3C,gBAAgB,CAACD,SAAS4C;YAE1B,IAAI1C,wBAAwB;gBAC1B0C,MAAMC,eAAe;YACvB;QACF;QACAlD,KAAKA;QACLS,WAAWhB,oBAAoB;YAAEU;YAAMM;QAAU;QACjDL,UAAUA;QACVM,UAAUA;QACV2B,WAAWA;QACXC,eAAeA;QACfC,mBAAmBA;QACnBC,oBAAoBA;QACpBC,+BAA+BA;QAC/BC,YAAYA;QACZC,gBAAgBA;QAChBC,oBAAoBA;QACpBC,qBAAqBA;QACrBC,gCAAgCA;kBAE/BnC;;AAGP,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/form/MenuItemRadio.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef } from \"react\";\nimport {\n MenuItemInputToggle,\n type MenuItemRadioProps,\n} from \"./MenuItemInputToggle.js\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { type ICON_CONFIG } from \"../icon/iconConfig.js\";\n\n/**\n * **Client Component**\n *\n * This is a simple wrapper for the {@link MenuItemInputToggle} component to\n * render it as a radio and pulling the radio icon from the\n * {@link ICON_CONFIG}.\n *\n * If a menu or menubar contains more than one group of menuitemradio elements,\n * or if the menu contains one group and other, unrelated menu items, authors\n * SHOULD nest each set of related menuitemradio elements in an element using\n * the group role, and authors SHOULD delimit the group from other menu items\n * with an element using the separator role.\n * @see {@link https://www.w3.org/TR/wai-aria-1.1/#menuitemradio}\n *\n * @example Only Radio Items\n * ```tsx\n * import { ReactElement, useState } from \"react\";\n * import { DropdownMenu, MenuItemRadio } from \"@react-md/core\";\n *\n * function Example(): ReactElement {\n * const [value, setValue] = useState(\"value1\");\n *\n * return (\n * <DropdownMenu id=\"dropdown-menu-id\" buttonChildren=\"Button\">\n * <MenuItemRadio\n * id=\"radio-1\"\n * checked={value === \"value1\"}\n * onCheckedChange={() => setValue(\"value1\")}\n * >\n * Radio 1\n * </MenuItemRadio>\n * <MenuItemRadio\n * id=\"radio-2\"\n * checked={value === \"value2\"}\n * onCheckedChange={() => setValue(\"value2\")}\n * >\n * Radio 2\n * </MenuItemRadio>\n * <MenuItemRadio\n * id=\"radio-3\"\n * checked={value === \"value3\"}\n * onCheckedChange={() => setValue(\"value3\")}\n * >\n * Radio 3\n * </MenuItemRadio>\n * </DropdownMenu>\n * );\n * }\n * ```\n *\n * @example With Other Items\n * ```tsx\n * import {\n * DropdownMenu,\n * MenuItemGroup,\n * MenuItemRadio,\n * MenuItemSwitch,\n * MenuItemSeparator,\n * } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n * import { useState } from \"react\";\n *\n * function Example(): ReactElement {\n * const [value, setValue] = useState(\"value1\");\n *\n * return (\n * <DropdownMenu buttonChildren=\"Button\">\n * <MenuItemSwitch\n * checked={checked}\n * onCheckedChange={nextChecked => setChecked(nextChecked)}\n * >\n * Light mode\n * </MenuItemSwitch>\n * <MenuItemSeparator />\n * <MenuItemGroup aria-label=\"My Group Label\">\n * <MenuItemRadio\n * checked={value === \"value1\"}\n * onCheckedChange={() => setValue(\"value1\")}\n * >\n * Radio 1\n * </MenuItemRadio>\n * <MenuItemRadio\n * checked={value === \"value2\"}\n * onCheckedChange={() => setValue(\"value2\")}\n * >\n * Radio 2\n * </MenuItemRadio>\n * <MenuItemRadio\n * checked={value === \"value3\"}\n * onCheckedChange={() => setValue(\"value3\")}\n * >\n * Radio 3\n * </MenuItemRadio>\n * </MenuItemGroup>\n * </DropdownMenu>\n * );\n * }\n * ```\n *\n * @since 2.8.0\n */\nexport const MenuItemRadio = forwardRef<HTMLLIElement, MenuItemRadioProps>(\n function MenuItemRadio(props, ref) {\n return <MenuItemInputToggle {...props} ref={ref} type=\"radio\" />;\n }\n);\n"],"names":["forwardRef","MenuItemInputToggle","MenuItemRadio","props","ref","type"],"
|
|
1
|
+
{"version":3,"sources":["../../src/form/MenuItemRadio.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef } from \"react\";\nimport {\n MenuItemInputToggle,\n type MenuItemRadioProps,\n} from \"./MenuItemInputToggle.js\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { type ICON_CONFIG } from \"../icon/iconConfig.js\";\n\n/**\n * **Client Component**\n *\n * This is a simple wrapper for the {@link MenuItemInputToggle} component to\n * render it as a radio and pulling the radio icon from the\n * {@link ICON_CONFIG}.\n *\n * If a menu or menubar contains more than one group of menuitemradio elements,\n * or if the menu contains one group and other, unrelated menu items, authors\n * SHOULD nest each set of related menuitemradio elements in an element using\n * the group role, and authors SHOULD delimit the group from other menu items\n * with an element using the separator role.\n * @see {@link https://www.w3.org/TR/wai-aria-1.1/#menuitemradio}\n *\n * @example Only Radio Items\n * ```tsx\n * import { ReactElement, useState } from \"react\";\n * import { DropdownMenu, MenuItemRadio } from \"@react-md/core\";\n *\n * function Example(): ReactElement {\n * const [value, setValue] = useState(\"value1\");\n *\n * return (\n * <DropdownMenu id=\"dropdown-menu-id\" buttonChildren=\"Button\">\n * <MenuItemRadio\n * id=\"radio-1\"\n * checked={value === \"value1\"}\n * onCheckedChange={() => setValue(\"value1\")}\n * >\n * Radio 1\n * </MenuItemRadio>\n * <MenuItemRadio\n * id=\"radio-2\"\n * checked={value === \"value2\"}\n * onCheckedChange={() => setValue(\"value2\")}\n * >\n * Radio 2\n * </MenuItemRadio>\n * <MenuItemRadio\n * id=\"radio-3\"\n * checked={value === \"value3\"}\n * onCheckedChange={() => setValue(\"value3\")}\n * >\n * Radio 3\n * </MenuItemRadio>\n * </DropdownMenu>\n * );\n * }\n * ```\n *\n * @example With Other Items\n * ```tsx\n * import {\n * DropdownMenu,\n * MenuItemGroup,\n * MenuItemRadio,\n * MenuItemSwitch,\n * MenuItemSeparator,\n * } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n * import { useState } from \"react\";\n *\n * function Example(): ReactElement {\n * const [value, setValue] = useState(\"value1\");\n *\n * return (\n * <DropdownMenu buttonChildren=\"Button\">\n * <MenuItemSwitch\n * checked={checked}\n * onCheckedChange={nextChecked => setChecked(nextChecked)}\n * >\n * Light mode\n * </MenuItemSwitch>\n * <MenuItemSeparator />\n * <MenuItemGroup aria-label=\"My Group Label\">\n * <MenuItemRadio\n * checked={value === \"value1\"}\n * onCheckedChange={() => setValue(\"value1\")}\n * >\n * Radio 1\n * </MenuItemRadio>\n * <MenuItemRadio\n * checked={value === \"value2\"}\n * onCheckedChange={() => setValue(\"value2\")}\n * >\n * Radio 2\n * </MenuItemRadio>\n * <MenuItemRadio\n * checked={value === \"value3\"}\n * onCheckedChange={() => setValue(\"value3\")}\n * >\n * Radio 3\n * </MenuItemRadio>\n * </MenuItemGroup>\n * </DropdownMenu>\n * );\n * }\n * ```\n *\n * @since 2.8.0\n */\nexport const MenuItemRadio = forwardRef<HTMLLIElement, MenuItemRadioProps>(\n function MenuItemRadio(props, ref) {\n return <MenuItemInputToggle {...props} ref={ref} type=\"radio\" />;\n }\n);\n"],"names":["forwardRef","MenuItemInputToggle","MenuItemRadio","props","ref","type"],"mappings":"AAAA;;AACA,SAASA,UAAU,QAAQ,QAAQ;AACnC,SACEC,mBAAmB,QAEd,2BAA2B;AAIlC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoGC,GACD,OAAO,MAAMC,8BAAgBF,WAC3B,SAASE,cAAcC,KAAK,EAAEC,GAAG;IAC/B,qBAAO,KAACH;QAAqB,GAAGE,KAAK;QAAEC,KAAKA;QAAKC,MAAK;;AACxD,GACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/form/MenuItemSwitch.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef } from \"react\";\nimport {\n MenuItemInputToggle,\n type MenuItemSwitchProps,\n} from \"./MenuItemInputToggle.js\";\n\n/**\n * **Client Component**\n *\n * This is a simple wrapper for the {@link MenuItemInputToggle} component to\n * render it as a switch.\n *\n * @example Simple Example\n * ```tsx\n * import { ReactElement, useState } from \"react\";\n * import { DropdownMenu, MenuItemSwitch } from \"@react-md/core\";\n *\n * function Example(): ReactElement {\n * const [checked, setChecked] = useState(false);\n *\n * return (\n * <DropdownMenu buttonChildren=\"Button\">\n * <MenuItemSwitch\n * checked={checked}\n * onCheckedChange={(nextChecked) => setChecked(nextChecked)}\n * >\n * Switch\n * </MenuItemSwitch>\n * </DropdownMenu>\n * );\n * }\n * ```\n *\n * @since 2.8.0\n */\nexport const MenuItemSwitch = forwardRef<HTMLLIElement, MenuItemSwitchProps>(\n function MenuItemSwitch(props, ref) {\n return <MenuItemInputToggle {...props} ref={ref} type=\"switch\" />;\n }\n);\n"],"names":["forwardRef","MenuItemInputToggle","MenuItemSwitch","props","ref","type"],"
|
|
1
|
+
{"version":3,"sources":["../../src/form/MenuItemSwitch.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef } from \"react\";\nimport {\n MenuItemInputToggle,\n type MenuItemSwitchProps,\n} from \"./MenuItemInputToggle.js\";\n\n/**\n * **Client Component**\n *\n * This is a simple wrapper for the {@link MenuItemInputToggle} component to\n * render it as a switch.\n *\n * @example Simple Example\n * ```tsx\n * import { ReactElement, useState } from \"react\";\n * import { DropdownMenu, MenuItemSwitch } from \"@react-md/core\";\n *\n * function Example(): ReactElement {\n * const [checked, setChecked] = useState(false);\n *\n * return (\n * <DropdownMenu buttonChildren=\"Button\">\n * <MenuItemSwitch\n * checked={checked}\n * onCheckedChange={(nextChecked) => setChecked(nextChecked)}\n * >\n * Switch\n * </MenuItemSwitch>\n * </DropdownMenu>\n * );\n * }\n * ```\n *\n * @since 2.8.0\n */\nexport const MenuItemSwitch = forwardRef<HTMLLIElement, MenuItemSwitchProps>(\n function MenuItemSwitch(props, ref) {\n return <MenuItemInputToggle {...props} ref={ref} type=\"switch\" />;\n }\n);\n"],"names":["forwardRef","MenuItemInputToggle","MenuItemSwitch","props","ref","type"],"mappings":"AAAA;;AACA,SAASA,UAAU,QAAQ,QAAQ;AACnC,SACEC,mBAAmB,QAEd,2BAA2B;AAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BC,GACD,OAAO,MAAMC,+BAAiBF,WAC5B,SAASE,eAAeC,KAAK,EAAEC,GAAG;IAChC,qBAAO,KAACH;QAAqB,GAAGE,KAAK;QAAEC,KAAKA;QAAKC,MAAK;;AACxD,GACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/form/MenuItemTextField.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport { forwardRef, type HTMLAttributes } from \"react\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { TextField, type TextFieldProps } from \"./TextField.js\";\n\n/**\n * @since 5.0.0\n */\nexport interface MenuItemTextFieldProps extends TextFieldProps {\n /**\n * Any additional props or a `ref` to apply to the surrounding `<li>` element.\n */\n liProps?: PropsWithRef<HTMLAttributes<HTMLLIElement>, HTMLLIElement>;\n\n /** @defaultValue `true` */\n stretch?: boolean;\n}\n\n/**\n * **Client Component**\n *\n * This is a wrapper for the `TextField` component that can be used within\n * `Menu`s by updating the `onKeyDown` and `onClick` behavior.\n *\n * Note: This is **not** the `TextFieldWithMessage` since the message part is\n * hard to style nicely within menus. You'd most likely want to use another menu\n * for displaying errors.\n *\n * @since 5.0.0\n */\nexport const MenuItemTextField = forwardRef<\n HTMLInputElement,\n MenuItemTextFieldProps\n>(function MenuItemTextField(props, ref) {\n const { liProps, onKeyDown, stretch = true, ...remaining } = props;\n return (\n <li\n role=\"none\"\n {...liProps}\n onClick={(event) => {\n liProps?.onClick?.(event);\n event.stopPropagation();\n }}\n className={cnb(\"rmd-list-item rmd-menu-item\", liProps?.className)}\n >\n <TextField\n {...remaining}\n ref={ref}\n stretch={stretch}\n onKeyDown={(event) => {\n onKeyDown?.(event);\n switch (event.key) {\n case \"Tab\":\n case \"Escape\":\n case \" \":\n // do default behavior\n break;\n default:\n if (event.key.length === 1 || event.currentTarget.value) {\n event.stopPropagation();\n }\n }\n }}\n />\n </li>\n );\n});\n"],"names":["cnb","forwardRef","TextField","MenuItemTextField","props","ref","liProps","onKeyDown","stretch","remaining","li","role","onClick","event","stopPropagation","className","key","length","currentTarget","value"],"
|
|
1
|
+
{"version":3,"sources":["../../src/form/MenuItemTextField.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport { forwardRef, type HTMLAttributes } from \"react\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { TextField, type TextFieldProps } from \"./TextField.js\";\n\n/**\n * @since 5.0.0\n */\nexport interface MenuItemTextFieldProps extends TextFieldProps {\n /**\n * Any additional props or a `ref` to apply to the surrounding `<li>` element.\n */\n liProps?: PropsWithRef<HTMLAttributes<HTMLLIElement>, HTMLLIElement>;\n\n /** @defaultValue `true` */\n stretch?: boolean;\n}\n\n/**\n * **Client Component**\n *\n * This is a wrapper for the `TextField` component that can be used within\n * `Menu`s by updating the `onKeyDown` and `onClick` behavior.\n *\n * Note: This is **not** the `TextFieldWithMessage` since the message part is\n * hard to style nicely within menus. You'd most likely want to use another menu\n * for displaying errors.\n *\n * @since 5.0.0\n */\nexport const MenuItemTextField = forwardRef<\n HTMLInputElement,\n MenuItemTextFieldProps\n>(function MenuItemTextField(props, ref) {\n const { liProps, onKeyDown, stretch = true, ...remaining } = props;\n return (\n <li\n role=\"none\"\n {...liProps}\n onClick={(event) => {\n liProps?.onClick?.(event);\n event.stopPropagation();\n }}\n className={cnb(\"rmd-list-item rmd-menu-item\", liProps?.className)}\n >\n <TextField\n {...remaining}\n ref={ref}\n stretch={stretch}\n onKeyDown={(event) => {\n onKeyDown?.(event);\n switch (event.key) {\n case \"Tab\":\n case \"Escape\":\n case \" \":\n // do default behavior\n break;\n default:\n if (event.key.length === 1 || event.currentTarget.value) {\n event.stopPropagation();\n }\n }\n }}\n />\n </li>\n );\n});\n"],"names":["cnb","forwardRef","TextField","MenuItemTextField","props","ref","liProps","onKeyDown","stretch","remaining","li","role","onClick","event","stopPropagation","className","key","length","currentTarget","value"],"mappings":"AAAA;;AACA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAA6B,QAAQ;AAExD,SAASC,SAAS,QAA6B,iBAAiB;AAehE;;;;;;;;;;;CAWC,GACD,OAAO,MAAMC,kCAAoBF,WAG/B,SAASE,kBAAkBC,KAAK,EAAEC,GAAG;IACrC,MAAM,EAAEC,OAAO,EAAEC,SAAS,EAAEC,UAAU,IAAI,EAAE,GAAGC,WAAW,GAAGL;IAC7D,qBACE,KAACM;QACCC,MAAK;QACJ,GAAGL,OAAO;QACXM,SAAS,CAACC;YACRP,SAASM,UAAUC;YACnBA,MAAMC,eAAe;QACvB;QACAC,WAAWf,IAAI,+BAA+BM,SAASS;kBAEvD,cAAA,KAACb;YACE,GAAGO,SAAS;YACbJ,KAAKA;YACLG,SAASA;YACTD,WAAW,CAACM;gBACVN,YAAYM;gBACZ,OAAQA,MAAMG,GAAG;oBACf,KAAK;oBACL,KAAK;oBACL,KAAK;wBAEH;oBACF;wBACE,IAAIH,MAAMG,GAAG,CAACC,MAAM,KAAK,KAAKJ,MAAMK,aAAa,CAACC,KAAK,EAAE;4BACvDN,MAAMC,eAAe;wBACvB;gBACJ;YACF;;;AAIR,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/form/NativeSelect.tsx"],"sourcesContent":["import {\n forwardRef,\n type CSSProperties,\n type HTMLAttributes,\n type ReactNode,\n type SelectHTMLAttributes,\n} from \"react\";\nimport { getIcon } from \"../icon/iconConfig.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { FormMessageContainer } from \"./FormMessageContainer.js\";\nimport { Label } from \"./Label.js\";\nimport { TextFieldContainer } from \"./TextFieldContainer.js\";\nimport { getFormConfig } from \"./formConfig.js\";\nimport { nativeSelect, nativeSelectContainer } from \"./nativeSelectStyles.js\";\nimport {\n type FormFieldOptions,\n type UserAgentAutocompleteProps,\n} from \"./types.js\";\n\n/**\n * @since 6.0.0 Added support for {@link UserAgentAutocompleteProps}\n */\nexport interface NativeSelectProps\n extends Omit<SelectHTMLAttributes<HTMLSelectElement>, \"autoComplete\">,\n UserAgentAutocompleteProps,\n FormFieldOptions {\n /**\n * A custom dropdown icon to use instead of the browser's default select\n * dropdown icon.\n *\n * Set this to `null` if the browser's default icon should be used instead.\n *\n * @defaultValue `getIcon(\"dropdown\")`\n */\n icon?: ReactNode;\n\n /**\n * This applies custom inline styles to the `<select>` element since the\n * `style` prop is applied to the container element instead.\n */\n selectStyle?: CSSProperties;\n\n /**\n * This applies custom className to the `<select>` element since the\n * `className` prop is applied to the container element instead.\n */\n selectClassName?: string;\n\n /**\n * This should be a list of `<option>` elements for specific values within the\n * `<select>`.\n *\n * Check out the {@link NativeSelect} for examples around using \"placeholder\"\n * text and requiring a value to be selected.\n */\n children: ReactNode;\n\n /**\n * Optional props to provide to the {@link TextFieldContainer} component.\n * There probably isn't any real use for this prop other than if you need to\n * add a `ref` for some DOM behavior.\n */\n containerProps?: PropsWithRef<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;\n}\n\n/**\n * **Server Component**\n *\n * This component is a wrapper for the native `<select>` field that applies the\n * same theming as `TextField` and `TextArea` components. This component might\n * not be used much since the `Select` offers more styling options.\n *\n * @example Simple Example\n * ```tsx\n * <NativeSelect label=\"Label\">\n * <option value=\"a\">Value 1</option>\n * <option value=\"b\">Value 2</option>\n * <option value=\"c\">Value 3</option>\n * <option value=\"d\">Value 4</option>\n * </NativeSelect>\n * ```\n *\n * @example Required Value Example\n * ```tsx\n * function Example(): ReactElement {\n * // using `defaultValue=\"\"` makes it so the first option selected by default\n * // and considered an \"invalid\" value since it is `disabled`\n * //\n * // a `name` must be set with `required` so that the form validation will\n * // fire if the value is still the empty string when the form is submitted\n * //\n * // the first `<option>` is kind of like placeholder text since it doesn't\n * // have a value and is disabled by default\n *\n * return (\n * <NativeSelect\n * label=\"State\"\n * name=\"state\"\n * required\n * defaultValue=\"\"\n * >\n * <option value=\"\" disabled>Choose a state</option>\n * {states.map(({ name, code }) => (\n * <option key={code} value={code}>{name}</option>\n * ))}\n * </NativeSelect>\n * );\n * }\n * ```\n */\nexport const NativeSelect = forwardRef<HTMLSelectElement, NativeSelectProps>(\n function NativeSelect(props, ref) {\n const {\n id: propId,\n style,\n className,\n icon: propIcon,\n label,\n labelProps,\n labelStyle,\n labelClassName,\n selectStyle,\n selectClassName,\n autoCompleteValue,\n autoComplete = autoCompleteValue,\n name = autoCompleteValue,\n dense = false,\n error = false,\n active = false,\n inline = false,\n stretch = false,\n leftAddon,\n rightAddon: propRightAddon,\n leftAddonProps,\n rightAddonProps,\n disableLeftAddonStyles = false,\n disableRightAddonStyles = false,\n theme: propTheme,\n underlineDirection: propUnderlineDirection,\n messageProps,\n messageContainerProps,\n containerProps,\n children,\n ...remaining\n } = props;\n const { disabled = false, readOnly = false, multiple = false } = props;\n const id = useEnsuredId(propId, \"select\");\n const theme = getFormConfig(\"theme\", propTheme);\n const underlineDirection = getFormConfig(\n \"underlineDirection\",\n propUnderlineDirection\n );\n const icon = getIcon(\"dropdown\", propIcon);\n const underlined = theme === \"underline\" || theme === \"filled\";\n\n let rightAddon = propRightAddon;\n if (typeof propRightAddon === \"undefined\" && !multiple) {\n rightAddon = icon;\n }\n\n return (\n <FormMessageContainer\n {...messageContainerProps}\n messageProps={messageProps}\n >\n <TextFieldContainer\n {...containerProps}\n style={style}\n className={nativeSelectContainer({\n label: !!label,\n multiple,\n underlined,\n className,\n })}\n theme={theme}\n label={!!label}\n error={error}\n dense={dense}\n inline={inline}\n active={active}\n stretch={stretch}\n readOnly={readOnly}\n disabled={disabled}\n leftAddon={leftAddon}\n leftAddonProps={leftAddonProps}\n rightAddon={rightAddon}\n rightAddonProps={rightAddonProps}\n underlineDirection={underlineDirection}\n disableLeftAddonStyles={disableLeftAddonStyles}\n disableRightAddonStyles={disableRightAddonStyles}\n >\n <select\n {...remaining}\n id={id}\n ref={ref}\n autoComplete={autoComplete}\n name={name}\n disabled={disabled}\n style={selectStyle}\n className={nativeSelect({\n icon: !!icon,\n className: selectClassName,\n })}\n >\n {children}\n </select>\n {label && (\n <Label\n {...labelProps}\n htmlFor={id}\n style={labelProps?.style ?? labelStyle}\n className={labelProps?.className ?? labelClassName}\n floating\n dense={dense}\n error={error}\n active={active}\n disabled={disabled}\n >\n {label}\n </Label>\n )}\n </TextFieldContainer>\n </FormMessageContainer>\n );\n }\n);\n"],"names":["forwardRef","getIcon","useEnsuredId","FormMessageContainer","Label","TextFieldContainer","getFormConfig","nativeSelect","nativeSelectContainer","NativeSelect","props","ref","id","propId","style","className","icon","propIcon","label","labelProps","labelStyle","labelClassName","selectStyle","selectClassName","autoCompleteValue","autoComplete","name","dense","error","active","inline","stretch","leftAddon","rightAddon","propRightAddon","leftAddonProps","rightAddonProps","disableLeftAddonStyles","disableRightAddonStyles","theme","propTheme","underlineDirection","propUnderlineDirection","messageProps","messageContainerProps","containerProps","children","remaining","disabled","readOnly","multiple","underlined","select","htmlFor","floating"],"
|
|
1
|
+
{"version":3,"sources":["../../src/form/NativeSelect.tsx"],"sourcesContent":["import {\n forwardRef,\n type CSSProperties,\n type HTMLAttributes,\n type ReactNode,\n type SelectHTMLAttributes,\n} from \"react\";\nimport { getIcon } from \"../icon/iconConfig.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { FormMessageContainer } from \"./FormMessageContainer.js\";\nimport { Label } from \"./Label.js\";\nimport { TextFieldContainer } from \"./TextFieldContainer.js\";\nimport { getFormConfig } from \"./formConfig.js\";\nimport { nativeSelect, nativeSelectContainer } from \"./nativeSelectStyles.js\";\nimport {\n type FormFieldOptions,\n type UserAgentAutocompleteProps,\n} from \"./types.js\";\n\n/**\n * @since 6.0.0 Added support for {@link UserAgentAutocompleteProps}\n */\nexport interface NativeSelectProps\n extends Omit<SelectHTMLAttributes<HTMLSelectElement>, \"autoComplete\">,\n UserAgentAutocompleteProps,\n FormFieldOptions {\n /**\n * A custom dropdown icon to use instead of the browser's default select\n * dropdown icon.\n *\n * Set this to `null` if the browser's default icon should be used instead.\n *\n * @defaultValue `getIcon(\"dropdown\")`\n */\n icon?: ReactNode;\n\n /**\n * This applies custom inline styles to the `<select>` element since the\n * `style` prop is applied to the container element instead.\n */\n selectStyle?: CSSProperties;\n\n /**\n * This applies custom className to the `<select>` element since the\n * `className` prop is applied to the container element instead.\n */\n selectClassName?: string;\n\n /**\n * This should be a list of `<option>` elements for specific values within the\n * `<select>`.\n *\n * Check out the {@link NativeSelect} for examples around using \"placeholder\"\n * text and requiring a value to be selected.\n */\n children: ReactNode;\n\n /**\n * Optional props to provide to the {@link TextFieldContainer} component.\n * There probably isn't any real use for this prop other than if you need to\n * add a `ref` for some DOM behavior.\n */\n containerProps?: PropsWithRef<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;\n}\n\n/**\n * **Server Component**\n *\n * This component is a wrapper for the native `<select>` field that applies the\n * same theming as `TextField` and `TextArea` components. This component might\n * not be used much since the `Select` offers more styling options.\n *\n * @example Simple Example\n * ```tsx\n * <NativeSelect label=\"Label\">\n * <option value=\"a\">Value 1</option>\n * <option value=\"b\">Value 2</option>\n * <option value=\"c\">Value 3</option>\n * <option value=\"d\">Value 4</option>\n * </NativeSelect>\n * ```\n *\n * @example Required Value Example\n * ```tsx\n * function Example(): ReactElement {\n * // using `defaultValue=\"\"` makes it so the first option selected by default\n * // and considered an \"invalid\" value since it is `disabled`\n * //\n * // a `name` must be set with `required` so that the form validation will\n * // fire if the value is still the empty string when the form is submitted\n * //\n * // the first `<option>` is kind of like placeholder text since it doesn't\n * // have a value and is disabled by default\n *\n * return (\n * <NativeSelect\n * label=\"State\"\n * name=\"state\"\n * required\n * defaultValue=\"\"\n * >\n * <option value=\"\" disabled>Choose a state</option>\n * {states.map(({ name, code }) => (\n * <option key={code} value={code}>{name}</option>\n * ))}\n * </NativeSelect>\n * );\n * }\n * ```\n */\nexport const NativeSelect = forwardRef<HTMLSelectElement, NativeSelectProps>(\n function NativeSelect(props, ref) {\n const {\n id: propId,\n style,\n className,\n icon: propIcon,\n label,\n labelProps,\n labelStyle,\n labelClassName,\n selectStyle,\n selectClassName,\n autoCompleteValue,\n autoComplete = autoCompleteValue,\n name = autoCompleteValue,\n dense = false,\n error = false,\n active = false,\n inline = false,\n stretch = false,\n leftAddon,\n rightAddon: propRightAddon,\n leftAddonProps,\n rightAddonProps,\n disableLeftAddonStyles = false,\n disableRightAddonStyles = false,\n theme: propTheme,\n underlineDirection: propUnderlineDirection,\n messageProps,\n messageContainerProps,\n containerProps,\n children,\n ...remaining\n } = props;\n const { disabled = false, readOnly = false, multiple = false } = props;\n const id = useEnsuredId(propId, \"select\");\n const theme = getFormConfig(\"theme\", propTheme);\n const underlineDirection = getFormConfig(\n \"underlineDirection\",\n propUnderlineDirection\n );\n const icon = getIcon(\"dropdown\", propIcon);\n const underlined = theme === \"underline\" || theme === \"filled\";\n\n let rightAddon = propRightAddon;\n if (typeof propRightAddon === \"undefined\" && !multiple) {\n rightAddon = icon;\n }\n\n return (\n <FormMessageContainer\n {...messageContainerProps}\n messageProps={messageProps}\n >\n <TextFieldContainer\n {...containerProps}\n style={style}\n className={nativeSelectContainer({\n label: !!label,\n multiple,\n underlined,\n className,\n })}\n theme={theme}\n label={!!label}\n error={error}\n dense={dense}\n inline={inline}\n active={active}\n stretch={stretch}\n readOnly={readOnly}\n disabled={disabled}\n leftAddon={leftAddon}\n leftAddonProps={leftAddonProps}\n rightAddon={rightAddon}\n rightAddonProps={rightAddonProps}\n underlineDirection={underlineDirection}\n disableLeftAddonStyles={disableLeftAddonStyles}\n disableRightAddonStyles={disableRightAddonStyles}\n >\n <select\n {...remaining}\n id={id}\n ref={ref}\n autoComplete={autoComplete}\n name={name}\n disabled={disabled}\n style={selectStyle}\n className={nativeSelect({\n icon: !!icon,\n className: selectClassName,\n })}\n >\n {children}\n </select>\n {label && (\n <Label\n {...labelProps}\n htmlFor={id}\n style={labelProps?.style ?? labelStyle}\n className={labelProps?.className ?? labelClassName}\n floating\n dense={dense}\n error={error}\n active={active}\n disabled={disabled}\n >\n {label}\n </Label>\n )}\n </TextFieldContainer>\n </FormMessageContainer>\n );\n }\n);\n"],"names":["forwardRef","getIcon","useEnsuredId","FormMessageContainer","Label","TextFieldContainer","getFormConfig","nativeSelect","nativeSelectContainer","NativeSelect","props","ref","id","propId","style","className","icon","propIcon","label","labelProps","labelStyle","labelClassName","selectStyle","selectClassName","autoCompleteValue","autoComplete","name","dense","error","active","inline","stretch","leftAddon","rightAddon","propRightAddon","leftAddonProps","rightAddonProps","disableLeftAddonStyles","disableRightAddonStyles","theme","propTheme","underlineDirection","propUnderlineDirection","messageProps","messageContainerProps","containerProps","children","remaining","disabled","readOnly","multiple","underlined","select","htmlFor","floating"],"mappings":";AAAA,SACEA,UAAU,QAKL,QAAQ;AACf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mBAAmB,eAAe,CAACgB,UAAU;QACtDjB,aAAajB;IACf;IAEA,qBACE,KAACb;QACE,GAAGyC,qBAAqB;QACzBD,cAAcA;kBAEd,cAAA,MAACtC;YACE,GAAGwC,cAAc;YAClB/B,OAAOA;YACPC,WAAWP,sBAAsB;gBAC/BU,OAAO,CAAC,CAACA;gBACTgC;gBACAC;gBACApC;YACF;YACAwB,OAAOA;YACPrB,OAAO,CAAC,CAACA;YACTU,OAAOA;YACPD,OAAOA;YACPG,QAAQA;YACRD,QAAQA;YACRE,SAASA;YACTkB,UAAUA;YACVD,UAAUA;YACVhB,WAAWA;YACXG,gBAAgBA;YAChBF,YAAYA;YACZG,iBAAiBA;YACjBK,oBAAoBA;YACpBJ,wBAAwBA;YACxBC,yBAAyBA;;8BAEzB,KAACc;oBACE,GAAGL,SAAS;oBACbnC,IAAIA;oBACJD,KAAKA;oBACLc,cAAcA;oBACdC,MAAMA;oBACNsB,UAAUA;oBACVlC,OAAOQ;oBACPP,WAAWR,aAAa;wBACtBS,MAAM,CAAC,CAACA;wBACRD,WAAWQ;oBACb;8BAECuB;;gBAEF5B,uBACC,KAACd;oBACE,GAAGe,UAAU;oBACdkC,SAASzC;oBACTE,OAAOK,YAAYL,SAASM;oBAC5BL,WAAWI,YAAYJ,aAAaM;oBACpCiC,QAAQ;oBACR3B,OAAOA;oBACPC,OAAOA;oBACPC,QAAQA;oBACRmB,UAAUA;8BAET9B;;;;;AAMb,GACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/form/OptGroup.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, type ReactNode } from \"react\";\nimport { type ListElement, type ListProps } from \"../list/List.js\";\nimport {\n ListSubheader,\n type ListSubheaderProps,\n} from \"../list/ListSubheader.js\";\nimport { MenuItemGroup } from \"../menu/MenuItemGroup.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\n\n/** @since 6.0.0 */\nexport interface OptGroupProps extends Omit<ListProps, \"role\"> {\n /**\n * This is really the `children` to display in a `ListSubheader` that\n * describes the optgroup. It was named `label` to match the native\n * `<optgroup>` element.\n *\n * @see {@link labelProps} for additional styling and options.\n */\n label: ReactNode;\n\n /**\n * This can be used to apply any additional props to the `ListSubheader` that\n * describes the group of options.\n */\n labelProps?: PropsWithRef<\n Omit<ListSubheaderProps, \"role\" | \"children\">,\n HTMLLIElement\n >;\n\n /**\n * This should be any `Option`s to display within the group.\n */\n children: ReactNode;\n}\n\n/**\n * **Client Component**\n *\n * This component is more of a \"convenience component\" to help enforce the\n * correct accessibility when creating an `<optgroup>` with the `Select`\n * component.\n *\n * @example Simple Example\n * ```tsx\n * import { Select, OptGroup, Option } from \"@react-md/core\";\n * import FavoriteIcon from \"@react-md/material-icons/FavoriteIcon\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return (\n * <Select label=\"Choose an animal\">\n * <OptGroup label=\"Land\" labelProps={{ className: \"custom-class-name\" }}>\n * <Option value={0}>Cat</Option>\n * <Option value={1}>Dog</Option>\n * <Option value={2}>Tiger</Option>\n * </OptGroup>\n * <OptGroup label=\"Water\" labelProps={{ rightAddon: <FavoriteIcon /> }}>\n * <Option value={3}>Dolphin</Option>\n * <Option value={4}>Flounder</Option>\n * </OptGroup>\n * </Select>\n *\n * );\n * }\n * ```\n *\n * @since 6.0.0\n */\nexport const OptGroup = forwardRef<ListElement, OptGroupProps>(\n function OptGroup(props, ref) {\n const { children, label, labelProps, ...remaining } = props;\n const labelId = useEnsuredId(labelProps?.id, \"optgroup\");\n\n return (\n <MenuItemGroup aria-labelledby={labelId} {...remaining} ref={ref}>\n <ListSubheader {...labelProps} id={labelId}>\n {label}\n </ListSubheader>\n {children}\n </MenuItemGroup>\n );\n }\n);\n"],"names":["forwardRef","ListSubheader","MenuItemGroup","useEnsuredId","OptGroup","props","ref","children","label","labelProps","remaining","labelId","id","aria-labelledby"],"
|
|
1
|
+
{"version":3,"sources":["../../src/form/OptGroup.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, type ReactNode } from \"react\";\nimport { type ListElement, type ListProps } from \"../list/List.js\";\nimport {\n ListSubheader,\n type ListSubheaderProps,\n} from \"../list/ListSubheader.js\";\nimport { MenuItemGroup } from \"../menu/MenuItemGroup.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\n\n/** @since 6.0.0 */\nexport interface OptGroupProps extends Omit<ListProps, \"role\"> {\n /**\n * This is really the `children` to display in a `ListSubheader` that\n * describes the optgroup. It was named `label` to match the native\n * `<optgroup>` element.\n *\n * @see {@link labelProps} for additional styling and options.\n */\n label: ReactNode;\n\n /**\n * This can be used to apply any additional props to the `ListSubheader` that\n * describes the group of options.\n */\n labelProps?: PropsWithRef<\n Omit<ListSubheaderProps, \"role\" | \"children\">,\n HTMLLIElement\n >;\n\n /**\n * This should be any `Option`s to display within the group.\n */\n children: ReactNode;\n}\n\n/**\n * **Client Component**\n *\n * This component is more of a \"convenience component\" to help enforce the\n * correct accessibility when creating an `<optgroup>` with the `Select`\n * component.\n *\n * @example Simple Example\n * ```tsx\n * import { Select, OptGroup, Option } from \"@react-md/core\";\n * import FavoriteIcon from \"@react-md/material-icons/FavoriteIcon\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return (\n * <Select label=\"Choose an animal\">\n * <OptGroup label=\"Land\" labelProps={{ className: \"custom-class-name\" }}>\n * <Option value={0}>Cat</Option>\n * <Option value={1}>Dog</Option>\n * <Option value={2}>Tiger</Option>\n * </OptGroup>\n * <OptGroup label=\"Water\" labelProps={{ rightAddon: <FavoriteIcon /> }}>\n * <Option value={3}>Dolphin</Option>\n * <Option value={4}>Flounder</Option>\n * </OptGroup>\n * </Select>\n *\n * );\n * }\n * ```\n *\n * @since 6.0.0\n */\nexport const OptGroup = forwardRef<ListElement, OptGroupProps>(\n function OptGroup(props, ref) {\n const { children, label, labelProps, ...remaining } = props;\n const labelId = useEnsuredId(labelProps?.id, \"optgroup\");\n\n return (\n <MenuItemGroup aria-labelledby={labelId} {...remaining} ref={ref}>\n <ListSubheader {...labelProps} id={labelId}>\n {label}\n </ListSubheader>\n {children}\n </MenuItemGroup>\n );\n }\n);\n"],"names":["forwardRef","ListSubheader","MenuItemGroup","useEnsuredId","OptGroup","props","ref","children","label","labelProps","remaining","labelId","id","aria-labelledby"],"mappings":"AAAA;;AACA,SAASA,UAAU,QAAwB,QAAQ;AAEnD,SACEC,aAAa,QAER,2BAA2B;AAClC,SAASC,aAAa,QAAQ,2BAA2B;AAEzD,SAASC,YAAY,QAAQ,qBAAqB;AA4BlD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCC,GACD,OAAO,MAAMC,yBAAWJ,WACtB,SAASI,SAASC,KAAK,EAAEC,GAAG;IAC1B,MAAM,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,UAAU,EAAE,GAAGC,WAAW,GAAGL;IACtD,MAAMM,UAAUR,aAAaM,YAAYG,IAAI;IAE7C,qBACE,MAACV;QAAcW,mBAAiBF;QAAU,GAAGD,SAAS;QAAEJ,KAAKA;;0BAC3D,KAACL;gBAAe,GAAGQ,UAAU;gBAAEG,IAAID;0BAChCH;;YAEFD;;;AAGP,GACA"}
|
package/dist/form/Option.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/form/Option.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport { forwardRef, Fragment, type ReactNode } from \"react\";\nimport { getIcon } from \"../icon/iconConfig.js\";\nimport { icon } from \"../icon/styles.js\";\nimport {\n TextIconSpacing,\n type TextIconSpacingProps,\n} from \"../icon/TextIconSpacing.js\";\nimport { getListItemHeight } from \"../list/getListItemHeight.js\";\nimport { ListItemText } from \"../list/ListItemText.js\";\nimport { MenuItem, type MenuItemProps } from \"../menu/MenuItem.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { option } from \"./optionStyles.js\";\nimport { useListboxContext } from \"./useListboxProvider.js\";\nimport { triggerManualChangeEvent } from \"./utils.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * This icon is used while the option is unselected so that the selected and\n * unselected options have the same alignment.\n *\n * @since 6.0.0\n */\nexport const DEFAULT_OPTION_UNSELECTED_ICON = (\n <span className={icon({ type: \"svg\" })} />\n);\n\n/**\n * @since 6.0.0 removed the `selected` and `focused` props.\n * @since 6.0.0 Added the `value`, `selectedIcon`, `unselectedIcon`,\n * `selectedIconAfter`, and `iconSpacingProps` props.\n */\nexport interface OptionProps extends MenuItemProps {\n /**\n * @defaultValue `\"option\"`\n */\n role?: string;\n\n value: string | number;\n\n /**\n * @defaultValue `getIcon(\"selected\")`\n */\n selectedIcon?: ReactNode;\n\n /**\n * @see {@link DEFAULT_OPTION_UNSELECTED_ICON}\n * @defaultValue `<span className=\"rmd-icon rmd-icon--svg\" />`\n */\n unselectedIcon?: ReactNode;\n\n /**\n * Set this to `true` of the {@link selectedIcon}/{@link unselectedIcon}\n * should appear as the {@link rightAddon} instead of the {@link leftAddon}.\n *\n * @defaultValue `false`\n */\n selectedIconAfter?: boolean;\n\n /**\n * Since the `selectedIcon`/`unselectedIcon` are rendered as\n * `leftAddon`/`rightAddon`, the provided `leftAddon`/`rightAddon` will be\n * wrapped in the {@link TextIconSpacing} component to maintain the correct\n * spacing. You can use this prop to provide any additional configuration to\n * the spacing.\n *\n * @example\n * ```tsx\n * <Option\n * leftAddon={<Avatar>A</Avatar>}\n * leftAddonType=\"avatar\"\n * value={0}\n * textIconSpacingProps={{\n * beforeClassName: \"my-custom-class-name\",\n * }}\n * >\n * Some Content\n * </Option>\n * ```\n */\n textIconSpacingProps?: Omit<TextIconSpacingProps, \"icon\" | \"children\">;\n}\n\n/**\n * **Client Component**\n *\n * This component is a wrapper around the {@link MenuItem} to implement custom\n * select option behavior.\n *\n * @since 6.0.0 removed the `selected` and `focused` props.\n * @since 6.0.0 Added the `value`, `selectedIcon`, `unselectedIcon`,\n * `selectedIconAfter`, and `iconSpacingProps` props.\n */\nexport const Option = forwardRef<HTMLLIElement, OptionProps>(\n function Option(props, ref) {\n const {\n id: propId,\n role = \"option\",\n value,\n children: propChildren,\n onClick = noop,\n className,\n selectedIcon: propSelectedIcon,\n unselectedIcon: propUnselectedIcon,\n selectedIconAfter: propSelectedIconAfter,\n textIconSpacingProps,\n leftAddon: propLeftAddon,\n leftAddonType,\n leftAddonClassName,\n rightAddon: propRightAddon,\n rightAddonType,\n rightAddonClassName,\n secondaryText,\n height: propHeight,\n disableTextChildren: propDisableTextChildren,\n ...remaining\n } = props;\n\n const id = useEnsuredId(propId, \"option\");\n const {\n inputRef,\n currentValue,\n disableSelectedIcon,\n selectedIconAfter: contextSelectedIconAfter,\n } = useListboxContext();\n const selectedIconAfter = propSelectedIconAfter ?? contextSelectedIconAfter;\n const selected = value === currentValue;\n const selectedIcon = getIcon(\n \"selected\",\n disableSelectedIcon ? null : propSelectedIcon\n );\n const unselectedIcon = disableSelectedIcon\n ? null\n : propUnselectedIcon ?? DEFAULT_OPTION_UNSELECTED_ICON;\n const icon = selected ? selectedIcon : unselectedIcon;\n\n let leftAddon = propLeftAddon;\n let rightAddon = propRightAddon;\n let children = propChildren;\n let disableTextChildren = propDisableTextChildren;\n if (!selectedIconAfter && icon) {\n leftAddon = icon;\n if (propLeftAddon) {\n disableTextChildren = true;\n const Wrapper = propDisableTextChildren ? Fragment : ListItemText;\n\n children = (\n <TextIconSpacing {...textIconSpacingProps} icon={propLeftAddon}>\n <Wrapper>{children}</Wrapper>\n </TextIconSpacing>\n );\n }\n } else if (icon) {\n rightAddon = icon;\n if (propRightAddon) {\n disableTextChildren = true;\n const Wrapper = propDisableTextChildren ? Fragment : ListItemText;\n\n children = (\n <TextIconSpacing {...textIconSpacingProps} icon={propRightAddon}>\n <Wrapper>{children}</Wrapper>\n </TextIconSpacing>\n );\n }\n }\n\n const height = getListItemHeight({\n height: propHeight,\n leftAddon: leftAddon === icon ? null : leftAddon,\n leftAddonType,\n rightAddon: rightAddon === icon ? null : rightAddon,\n rightAddonType,\n secondaryText,\n });\n\n return (\n <MenuItem\n {...remaining}\n aria-selected={selected || undefined}\n id={id}\n ref={ref}\n role={role}\n onClick={(event) => {\n onClick(event);\n triggerManualChangeEvent(inputRef.current, value);\n }}\n className={option({ icon: !!icon, selected, className })}\n secondaryText={secondaryText}\n height={height}\n leftAddon={leftAddon}\n leftAddonType={leftAddonType}\n leftAddonClassName={cnb(\n leftAddon === icon && \"rmd-option__icon\",\n leftAddonClassName\n )}\n rightAddon={rightAddon}\n rightAddonType={rightAddonType}\n rightAddonClassName={cnb(\n rightAddon === icon && \"rmd-option__icon\",\n rightAddonClassName\n )}\n disableTextChildren={disableTextChildren}\n >\n {children}\n </MenuItem>\n );\n }\n);\n"],"names":["cnb","forwardRef","Fragment","getIcon","icon","TextIconSpacing","getListItemHeight","ListItemText","MenuItem","useEnsuredId","option","useListboxContext","triggerManualChangeEvent","noop","DEFAULT_OPTION_UNSELECTED_ICON","span","className","type","Option","props","ref","id","propId","role","value","children","propChildren","onClick","selectedIcon","propSelectedIcon","unselectedIcon","propUnselectedIcon","selectedIconAfter","propSelectedIconAfter","textIconSpacingProps","leftAddon","propLeftAddon","leftAddonType","leftAddonClassName","rightAddon","propRightAddon","rightAddonType","rightAddonClassName","secondaryText","height","propHeight","disableTextChildren","propDisableTextChildren","remaining","inputRef","currentValue","disableSelectedIcon","contextSelectedIconAfter","selected","Wrapper","aria-selected","undefined","event","current"],"
|
|
1
|
+
{"version":3,"sources":["../../src/form/Option.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport { forwardRef, Fragment, type ReactNode } from \"react\";\nimport { getIcon } from \"../icon/iconConfig.js\";\nimport { icon } from \"../icon/styles.js\";\nimport {\n TextIconSpacing,\n type TextIconSpacingProps,\n} from \"../icon/TextIconSpacing.js\";\nimport { getListItemHeight } from \"../list/getListItemHeight.js\";\nimport { ListItemText } from \"../list/ListItemText.js\";\nimport { MenuItem, type MenuItemProps } from \"../menu/MenuItem.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { option } from \"./optionStyles.js\";\nimport { useListboxContext } from \"./useListboxProvider.js\";\nimport { triggerManualChangeEvent } from \"./utils.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * This icon is used while the option is unselected so that the selected and\n * unselected options have the same alignment.\n *\n * @since 6.0.0\n */\nexport const DEFAULT_OPTION_UNSELECTED_ICON = (\n <span className={icon({ type: \"svg\" })} />\n);\n\n/**\n * @since 6.0.0 removed the `selected` and `focused` props.\n * @since 6.0.0 Added the `value`, `selectedIcon`, `unselectedIcon`,\n * `selectedIconAfter`, and `iconSpacingProps` props.\n */\nexport interface OptionProps extends MenuItemProps {\n /**\n * @defaultValue `\"option\"`\n */\n role?: string;\n\n value: string | number;\n\n /**\n * @defaultValue `getIcon(\"selected\")`\n */\n selectedIcon?: ReactNode;\n\n /**\n * @see {@link DEFAULT_OPTION_UNSELECTED_ICON}\n * @defaultValue `<span className=\"rmd-icon rmd-icon--svg\" />`\n */\n unselectedIcon?: ReactNode;\n\n /**\n * Set this to `true` of the {@link selectedIcon}/{@link unselectedIcon}\n * should appear as the {@link rightAddon} instead of the {@link leftAddon}.\n *\n * @defaultValue `false`\n */\n selectedIconAfter?: boolean;\n\n /**\n * Since the `selectedIcon`/`unselectedIcon` are rendered as\n * `leftAddon`/`rightAddon`, the provided `leftAddon`/`rightAddon` will be\n * wrapped in the {@link TextIconSpacing} component to maintain the correct\n * spacing. You can use this prop to provide any additional configuration to\n * the spacing.\n *\n * @example\n * ```tsx\n * <Option\n * leftAddon={<Avatar>A</Avatar>}\n * leftAddonType=\"avatar\"\n * value={0}\n * textIconSpacingProps={{\n * beforeClassName: \"my-custom-class-name\",\n * }}\n * >\n * Some Content\n * </Option>\n * ```\n */\n textIconSpacingProps?: Omit<TextIconSpacingProps, \"icon\" | \"children\">;\n}\n\n/**\n * **Client Component**\n *\n * This component is a wrapper around the {@link MenuItem} to implement custom\n * select option behavior.\n *\n * @since 6.0.0 removed the `selected` and `focused` props.\n * @since 6.0.0 Added the `value`, `selectedIcon`, `unselectedIcon`,\n * `selectedIconAfter`, and `iconSpacingProps` props.\n */\nexport const Option = forwardRef<HTMLLIElement, OptionProps>(\n function Option(props, ref) {\n const {\n id: propId,\n role = \"option\",\n value,\n children: propChildren,\n onClick = noop,\n className,\n selectedIcon: propSelectedIcon,\n unselectedIcon: propUnselectedIcon,\n selectedIconAfter: propSelectedIconAfter,\n textIconSpacingProps,\n leftAddon: propLeftAddon,\n leftAddonType,\n leftAddonClassName,\n rightAddon: propRightAddon,\n rightAddonType,\n rightAddonClassName,\n secondaryText,\n height: propHeight,\n disableTextChildren: propDisableTextChildren,\n ...remaining\n } = props;\n\n const id = useEnsuredId(propId, \"option\");\n const {\n inputRef,\n currentValue,\n disableSelectedIcon,\n selectedIconAfter: contextSelectedIconAfter,\n } = useListboxContext();\n const selectedIconAfter = propSelectedIconAfter ?? contextSelectedIconAfter;\n const selected = value === currentValue;\n const selectedIcon = getIcon(\n \"selected\",\n disableSelectedIcon ? null : propSelectedIcon\n );\n const unselectedIcon = disableSelectedIcon\n ? null\n : propUnselectedIcon ?? DEFAULT_OPTION_UNSELECTED_ICON;\n const icon = selected ? selectedIcon : unselectedIcon;\n\n let leftAddon = propLeftAddon;\n let rightAddon = propRightAddon;\n let children = propChildren;\n let disableTextChildren = propDisableTextChildren;\n if (!selectedIconAfter && icon) {\n leftAddon = icon;\n if (propLeftAddon) {\n disableTextChildren = true;\n const Wrapper = propDisableTextChildren ? Fragment : ListItemText;\n\n children = (\n <TextIconSpacing {...textIconSpacingProps} icon={propLeftAddon}>\n <Wrapper>{children}</Wrapper>\n </TextIconSpacing>\n );\n }\n } else if (icon) {\n rightAddon = icon;\n if (propRightAddon) {\n disableTextChildren = true;\n const Wrapper = propDisableTextChildren ? Fragment : ListItemText;\n\n children = (\n <TextIconSpacing {...textIconSpacingProps} icon={propRightAddon}>\n <Wrapper>{children}</Wrapper>\n </TextIconSpacing>\n );\n }\n }\n\n const height = getListItemHeight({\n height: propHeight,\n leftAddon: leftAddon === icon ? null : leftAddon,\n leftAddonType,\n rightAddon: rightAddon === icon ? null : rightAddon,\n rightAddonType,\n secondaryText,\n });\n\n return (\n <MenuItem\n {...remaining}\n aria-selected={selected || undefined}\n id={id}\n ref={ref}\n role={role}\n onClick={(event) => {\n onClick(event);\n triggerManualChangeEvent(inputRef.current, value);\n }}\n className={option({ icon: !!icon, selected, className })}\n secondaryText={secondaryText}\n height={height}\n leftAddon={leftAddon}\n leftAddonType={leftAddonType}\n leftAddonClassName={cnb(\n leftAddon === icon && \"rmd-option__icon\",\n leftAddonClassName\n )}\n rightAddon={rightAddon}\n rightAddonType={rightAddonType}\n rightAddonClassName={cnb(\n rightAddon === icon && \"rmd-option__icon\",\n rightAddonClassName\n )}\n disableTextChildren={disableTextChildren}\n >\n {children}\n </MenuItem>\n );\n }\n);\n"],"names":["cnb","forwardRef","Fragment","getIcon","icon","TextIconSpacing","getListItemHeight","ListItemText","MenuItem","useEnsuredId","option","useListboxContext","triggerManualChangeEvent","noop","DEFAULT_OPTION_UNSELECTED_ICON","span","className","type","Option","props","ref","id","propId","role","value","children","propChildren","onClick","selectedIcon","propSelectedIcon","unselectedIcon","propUnselectedIcon","selectedIconAfter","propSelectedIconAfter","textIconSpacingProps","leftAddon","propLeftAddon","leftAddonType","leftAddonClassName","rightAddon","propRightAddon","rightAddonType","rightAddonClassName","secondaryText","height","propHeight","disableTextChildren","propDisableTextChildren","remaining","inputRef","currentValue","disableSelectedIcon","contextSelectedIconAfter","selected","Wrapper","aria-selected","undefined","event","current"],"mappings":"AAAA;;AACA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,EAAEC,QAAQ,QAAwB,QAAQ;AAC7D,SAASC,OAAO,QAAQ,wBAAwB;AAChD,SAASC,IAAI,QAAQ,oBAAoB;AACzC,SACE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";\nimport { forwardRef, type ReactNode } from \"react\";\nimport { Button, type ButtonProps } from \"../button/Button.js\";\nimport { getIcon } from \"../icon/iconConfig.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { useToggle } from \"../useToggle.js\";\nimport {\n password,\n passwordInput,\n passwordInputToggle,\n} from \"./passwordStyles.js\";\nimport { TextField, type TextFieldProps } from \"./TextField.js\";\n\n/**\n * @example Simple Example\n * ```tsx\n * const getVisibilityIcon: GetPasswordVisibilityIcon = (isPasswordVisible) => {\n * if (isPasswordVisible) {\n * return <SecurityIcon />;\n * }\n *\n * return <RemoveRedEyeIcon />;\n * };\n * ```\n *\n * @param isPasswordVisible - `true` when the password is visible and in plain\n * text\n * @returns a custom icon to use for the password visibility toggle.\n */\nexport type GetPasswordVisibilityIcon = (\n isPasswordVisible: boolean\n) => ReactNode;\n\n/**\n * @example Simple Example\n * ```tsx\n * const visibilityIcon: ConfigurableVisibilityIcon = {\n * visible: <SecurityIcon />,\n * invisible: <RemoveRedEyeIcon />,\n * };\n * ```\n */\nexport interface ConfigurableVisibilityIcon {\n /**\n * The icon to display while the password is currently visible as plain text.\n */\n visible: ReactNode;\n\n /**\n * The icon to display while the password is currently invisible as the\n * password input.\n */\n invisible: ReactNode;\n}\n\nexport interface PasswordProps\n extends Omit<TextFieldProps, \"type\" | \"rightAddon\"> {\n /**\n * @defaultValue `\"password\"`\n * @since 6.0.0 Defaults to `\"password\"`\n */\n name?: string;\n\n /**\n * @example Configurable Visibility Icon Object\n * ```tsx\n * <Password\n * {...props}\n * visibilityIcon={{\n * visible: <SecurityIcon />,\n * invisible: <RemoveRedEyeIcon />,\n * }}\n * />\n * ```\n *\n * @example Get Password Visibility Icon Function\n * ```tsx\n * <Password\n * {...props}\n * visibilityIcon={(isPasswordVisible) => {\n * if (isPasswordVisible) {\n * return <SecurityIcon />;\n * }\n *\n * return <RemoveRedEyeIcon />;\n * }}\n * />\n * ```\n *\n * @example Custom Icon\n * ```tsx\n * <Password\n * {...props}\n * visibilityIcon={<SomeCustomComponent />}\n * />\n * ```\n */\n visibilityIcon?:\n | ConfigurableVisibilityIcon\n | GetPasswordVisibilityIcon\n | ReactNode;\n\n /**\n * The `aria-label` to use for the password visibility icon button.\n *\n * @defaultValue `\"Show password\"`\n */\n visibilityLabel?: string;\n\n /**\n * Any props that should be passed to the password visibility icon button. If\n * `id`, `buttonType`, `aria-label`, `aria-pressed`, or `children` are\n * provided here, they will override the default implementation.\n */\n visibilityProps?: PropsWithRef<ButtonProps, HTMLButtonElement>;\n}\n\n/**\n * **Client Component**\n *\n * @example Simple Example\n * ```tsx\n * import { Password } from \"@react-md/core\";\n *\n * function Example(): ReactElement {\n * return (\n * <Password\n * label=\"Password\"\n * name=\"password\"\n * required\n * />\n * );\n * }\n * ```\n */\nexport const Password = forwardRef<HTMLInputElement, PasswordProps>(\n function Password(props, ref) {\n const {\n id: propId,\n name = \"password\",\n className,\n inputClassName,\n visibilityIcon: propVisibilityIcon,\n visibilityLabel = \"Show password\",\n visibilityProps,\n ...remaining\n } = props;\n const { toggled: isPasswordVisible, toggle } = useToggle(false);\n\n let currentVisibilityIcon: ReactNode;\n if (\n propVisibilityIcon &&\n typeof propVisibilityIcon === \"object\" &&\n \"visible\" in propVisibilityIcon\n ) {\n currentVisibilityIcon = isPasswordVisible\n ? propVisibilityIcon.visible\n : propVisibilityIcon.invisible;\n } else if (typeof propVisibilityIcon === \"function\") {\n currentVisibilityIcon = propVisibilityIcon(isPasswordVisible);\n } else {\n currentVisibilityIcon = propVisibilityIcon;\n }\n\n const id = useEnsuredId(propId, \"password\");\n const visibilityIcon = getIcon(\"password\", currentVisibilityIcon);\n\n return (\n <TextField\n {...remaining}\n ref={ref}\n name={name}\n type={isPasswordVisible ? \"text\" : \"password\"}\n className={password({ className })}\n inputClassName={passwordInput({ className: inputClassName })}\n rightAddon={\n <Button\n id={`${id}-toggle`}\n buttonType=\"icon\"\n aria-label={visibilityLabel}\n aria-pressed={isPasswordVisible}\n // allow all props except the onClick, className, and aria-pressed to\n // be overridden. onClick can only stop default behavior with\n // `event.stopPropagation()`\n {...visibilityProps}\n className={passwordInputToggle({\n className: visibilityProps?.className,\n })}\n onClick={(event) => {\n visibilityProps?.onClick?.(event);\n if (event.isPropagationStopped()) {\n return;\n }\n\n toggle();\n }}\n >\n {visibilityProps?.children ?? visibilityIcon}\n </Button>\n }\n disableRightAddonStyles\n />\n );\n }\n);\n"],"names":["forwardRef","Button","getIcon","useEnsuredId","useToggle","password","passwordInput","passwordInputToggle","TextField","Password","props","ref","id","propId","name","className","inputClassName","visibilityIcon","propVisibilityIcon","visibilityLabel","visibilityProps","remaining","toggled","isPasswordVisible","toggle","currentVisibilityIcon","visible","invisible","type","rightAddon","buttonType","aria-label","aria-pressed","onClick","event","isPropagationStopped","children","disableRightAddonStyles"],"
|
|
1
|
+
{"version":3,"sources":["../../src/form/Password.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, type ReactNode } from \"react\";\nimport { Button, type ButtonProps } from \"../button/Button.js\";\nimport { getIcon } from \"../icon/iconConfig.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { useToggle } from \"../useToggle.js\";\nimport {\n password,\n passwordInput,\n passwordInputToggle,\n} from \"./passwordStyles.js\";\nimport { TextField, type TextFieldProps } from \"./TextField.js\";\n\n/**\n * @example Simple Example\n * ```tsx\n * const getVisibilityIcon: GetPasswordVisibilityIcon = (isPasswordVisible) => {\n * if (isPasswordVisible) {\n * return <SecurityIcon />;\n * }\n *\n * return <RemoveRedEyeIcon />;\n * };\n * ```\n *\n * @param isPasswordVisible - `true` when the password is visible and in plain\n * text\n * @returns a custom icon to use for the password visibility toggle.\n */\nexport type GetPasswordVisibilityIcon = (\n isPasswordVisible: boolean\n) => ReactNode;\n\n/**\n * @example Simple Example\n * ```tsx\n * const visibilityIcon: ConfigurableVisibilityIcon = {\n * visible: <SecurityIcon />,\n * invisible: <RemoveRedEyeIcon />,\n * };\n * ```\n */\nexport interface ConfigurableVisibilityIcon {\n /**\n * The icon to display while the password is currently visible as plain text.\n */\n visible: ReactNode;\n\n /**\n * The icon to display while the password is currently invisible as the\n * password input.\n */\n invisible: ReactNode;\n}\n\nexport interface PasswordProps\n extends Omit<TextFieldProps, \"type\" | \"rightAddon\"> {\n /**\n * @defaultValue `\"password\"`\n * @since 6.0.0 Defaults to `\"password\"`\n */\n name?: string;\n\n /**\n * @example Configurable Visibility Icon Object\n * ```tsx\n * <Password\n * {...props}\n * visibilityIcon={{\n * visible: <SecurityIcon />,\n * invisible: <RemoveRedEyeIcon />,\n * }}\n * />\n * ```\n *\n * @example Get Password Visibility Icon Function\n * ```tsx\n * <Password\n * {...props}\n * visibilityIcon={(isPasswordVisible) => {\n * if (isPasswordVisible) {\n * return <SecurityIcon />;\n * }\n *\n * return <RemoveRedEyeIcon />;\n * }}\n * />\n * ```\n *\n * @example Custom Icon\n * ```tsx\n * <Password\n * {...props}\n * visibilityIcon={<SomeCustomComponent />}\n * />\n * ```\n */\n visibilityIcon?:\n | ConfigurableVisibilityIcon\n | GetPasswordVisibilityIcon\n | ReactNode;\n\n /**\n * The `aria-label` to use for the password visibility icon button.\n *\n * @defaultValue `\"Show password\"`\n */\n visibilityLabel?: string;\n\n /**\n * Any props that should be passed to the password visibility icon button. If\n * `id`, `buttonType`, `aria-label`, `aria-pressed`, or `children` are\n * provided here, they will override the default implementation.\n */\n visibilityProps?: PropsWithRef<ButtonProps, HTMLButtonElement>;\n}\n\n/**\n * **Client Component**\n *\n * @example Simple Example\n * ```tsx\n * import { Password } from \"@react-md/core\";\n *\n * function Example(): ReactElement {\n * return (\n * <Password\n * label=\"Password\"\n * name=\"password\"\n * required\n * />\n * );\n * }\n * ```\n */\nexport const Password = forwardRef<HTMLInputElement, PasswordProps>(\n function Password(props, ref) {\n const {\n id: propId,\n name = \"password\",\n className,\n inputClassName,\n visibilityIcon: propVisibilityIcon,\n visibilityLabel = \"Show password\",\n visibilityProps,\n ...remaining\n } = props;\n const { toggled: isPasswordVisible, toggle } = useToggle(false);\n\n let currentVisibilityIcon: ReactNode;\n if (\n propVisibilityIcon &&\n typeof propVisibilityIcon === \"object\" &&\n \"visible\" in propVisibilityIcon\n ) {\n currentVisibilityIcon = isPasswordVisible\n ? propVisibilityIcon.visible\n : propVisibilityIcon.invisible;\n } else if (typeof propVisibilityIcon === \"function\") {\n currentVisibilityIcon = propVisibilityIcon(isPasswordVisible);\n } else {\n currentVisibilityIcon = propVisibilityIcon;\n }\n\n const id = useEnsuredId(propId, \"password\");\n const visibilityIcon = getIcon(\"password\", currentVisibilityIcon);\n\n return (\n <TextField\n {...remaining}\n ref={ref}\n name={name}\n type={isPasswordVisible ? \"text\" : \"password\"}\n className={password({ className })}\n inputClassName={passwordInput({ className: inputClassName })}\n rightAddon={\n <Button\n id={`${id}-toggle`}\n buttonType=\"icon\"\n aria-label={visibilityLabel}\n aria-pressed={isPasswordVisible}\n // allow all props except the onClick, className, and aria-pressed to\n // be overridden. onClick can only stop default behavior with\n // `event.stopPropagation()`\n {...visibilityProps}\n className={passwordInputToggle({\n className: visibilityProps?.className,\n })}\n onClick={(event) => {\n visibilityProps?.onClick?.(event);\n if (event.isPropagationStopped()) {\n return;\n }\n\n toggle();\n }}\n >\n {visibilityProps?.children ?? visibilityIcon}\n </Button>\n }\n disableRightAddonStyles\n />\n );\n }\n);\n"],"names":["forwardRef","Button","getIcon","useEnsuredId","useToggle","password","passwordInput","passwordInputToggle","TextField","Password","props","ref","id","propId","name","className","inputClassName","visibilityIcon","propVisibilityIcon","visibilityLabel","visibilityProps","remaining","toggled","isPasswordVisible","toggle","currentVisibilityIcon","visible","invisible","type","rightAddon","buttonType","aria-label","aria-pressed","onClick","event","isPropagationStopped","children","disableRightAddonStyles"],"mappings":"AAAA;;AACA,SAASA,UAAU,QAAwB,QAAQ;AACnD,SAASC,MAAM,QAA0B,sBAAsB;AAC/D,SAASC,OAAO,QAA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oBAAoB,IAAI;oBAChC;gBACF;gBAEAX;YACF;sBAECJ,iBAAiBgB,YAAYnB;;QAGlCoB,uBAAuB;;AAG7B,GACA"}
|
package/dist/form/Radio.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/form/Radio.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef } from \"react\";\nimport { InputToggle, type RadioProps } from \"./InputToggle.js\";\n\n/**\n * **Client Component**\n *\n * You'll generally want to use the `useRadioGroup` hook along with this\n * component.\n *\n * @example Simple Example\n * ```tsx\n * const { value, getRadioProps } = useRadioGroup({ name: \"group\" });\n *\n * return (\n * <>\n * <Radio {...getRadioProps(\"a\")} label=\"First\" />\n * <Radio {...getRadioProps(\"b\")} label=\"Second\" />\n * <Radio {...getRadioProps(\"c\")} label=\"Third\" />\n * </>\n * );\n * ```\n */\nexport const Radio = forwardRef<HTMLInputElement, RadioProps>(\n function Radio(props, ref) {\n return <InputToggle {...props} ref={ref} type=\"radio\" />;\n }\n);\n"],"names":["forwardRef","InputToggle","Radio","props","ref","type"],"
|
|
1
|
+
{"version":3,"sources":["../../src/form/Radio.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef } from \"react\";\nimport { InputToggle, type RadioProps } from \"./InputToggle.js\";\n\n/**\n * **Client Component**\n *\n * You'll generally want to use the `useRadioGroup` hook along with this\n * component.\n *\n * @example Simple Example\n * ```tsx\n * const { value, getRadioProps } = useRadioGroup({ name: \"group\" });\n *\n * return (\n * <>\n * <Radio {...getRadioProps(\"a\")} label=\"First\" />\n * <Radio {...getRadioProps(\"b\")} label=\"Second\" />\n * <Radio {...getRadioProps(\"c\")} label=\"Third\" />\n * </>\n * );\n * ```\n */\nexport const Radio = forwardRef<HTMLInputElement, RadioProps>(\n function Radio(props, ref) {\n return <InputToggle {...props} ref={ref} type=\"radio\" />;\n }\n);\n"],"names":["forwardRef","InputToggle","Radio","props","ref","type"],"mappings":"AAAA;;AACA,SAASA,UAAU,QAAQ,QAAQ;AACnC,SAASC,WAAW,QAAyB,mBAAmB;AAEhE;;;;;;;;;;;;;;;;;;CAkBC,GACD,OAAO,MAAMC,sBAAQF,WACnB,SAASE,MAAMC,KAAK,EAAEC,GAAG;IACvB,qBAAO,KAACH;QAAa,GAAGE,KAAK;QAAEC,KAAKA;QAAKC,MAAK;;AAChD,GACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/form/ResizingTextAreaWrapper.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport {\n forwardRef,\n type CSSProperties,\n type HTMLAttributes,\n type Ref,\n type TextareaHTMLAttributes,\n} from \"react\";\nimport { textArea } from \"./textAreaStyles.js\";\n\n/**\n * @since 6.0.0\n * @internal\n */\nexport interface ResizingTextAreaWrapperProps\n extends HTMLAttributes<HTMLDivElement> {\n maskId: string;\n maskRef: Ref<HTMLTextAreaElement>;\n defaultValue?: TextareaHTMLAttributes<HTMLTextAreaElement>[\"defaultValue\"];\n rows: number;\n areaStyle?: CSSProperties;\n areaClassName?: string;\n disableTransition?: boolean;\n}\n\n/**\n * @since 6.0.0\n * @internal\n */\nexport const ResizingTextAreaWrapper = forwardRef<\n HTMLDivElement,\n ResizingTextAreaWrapperProps\n>(function ResizingTextAreaWrapper(props, ref) {\n const {\n className,\n rows,\n maskId,\n maskRef,\n areaStyle,\n areaClassName,\n defaultValue,\n disableTransition,\n children,\n ...remaining\n } = props;\n\n return (\n <div\n {...remaining}\n ref={ref}\n className={cnb(\n \"rmd-textarea-container__inner\",\n !disableTransition && \"rmd-textarea-container__inner--animate\",\n className\n )}\n >\n {children}\n <textarea\n aria-hidden\n id={maskId}\n ref={maskRef}\n defaultValue={defaultValue}\n readOnly\n tabIndex={-1}\n rows={rows}\n style={areaStyle}\n className={textArea({\n mask: true,\n resize: \"auto\",\n className: areaClassName,\n })}\n />\n </div>\n );\n});\n"],"names":["cnb","forwardRef","textArea","ResizingTextAreaWrapper","props","ref","className","rows","maskId","maskRef","areaStyle","areaClassName","defaultValue","disableTransition","children","remaining","div","textarea","aria-hidden","id","readOnly","tabIndex","style","mask","resize"],"
|
|
1
|
+
{"version":3,"sources":["../../src/form/ResizingTextAreaWrapper.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport {\n forwardRef,\n type CSSProperties,\n type HTMLAttributes,\n type Ref,\n type TextareaHTMLAttributes,\n} from \"react\";\nimport { textArea } from \"./textAreaStyles.js\";\n\n/**\n * @since 6.0.0\n * @internal\n */\nexport interface ResizingTextAreaWrapperProps\n extends HTMLAttributes<HTMLDivElement> {\n maskId: string;\n maskRef: Ref<HTMLTextAreaElement>;\n defaultValue?: TextareaHTMLAttributes<HTMLTextAreaElement>[\"defaultValue\"];\n rows: number;\n areaStyle?: CSSProperties;\n areaClassName?: string;\n disableTransition?: boolean;\n}\n\n/**\n * @since 6.0.0\n * @internal\n */\nexport const ResizingTextAreaWrapper = forwardRef<\n HTMLDivElement,\n ResizingTextAreaWrapperProps\n>(function ResizingTextAreaWrapper(props, ref) {\n const {\n className,\n rows,\n maskId,\n maskRef,\n areaStyle,\n areaClassName,\n defaultValue,\n disableTransition,\n children,\n ...remaining\n } = props;\n\n return (\n <div\n {...remaining}\n ref={ref}\n className={cnb(\n \"rmd-textarea-container__inner\",\n !disableTransition && \"rmd-textarea-container__inner--animate\",\n className\n )}\n >\n {children}\n <textarea\n aria-hidden\n id={maskId}\n ref={maskRef}\n defaultValue={defaultValue}\n readOnly\n tabIndex={-1}\n rows={rows}\n style={areaStyle}\n className={textArea({\n mask: true,\n resize: \"auto\",\n className: areaClassName,\n })}\n />\n </div>\n );\n});\n"],"names":["cnb","forwardRef","textArea","ResizingTextAreaWrapper","props","ref","className","rows","maskId","maskRef","areaStyle","areaClassName","defaultValue","disableTransition","children","remaining","div","textarea","aria-hidden","id","readOnly","tabIndex","style","mask","resize"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SACEC,UAAU,QAKL,QAAQ;AACf,SAASC,QAAQ,QAAQ,sBAAsB;AAiB/C;;;CAGC,GACD,OAAO,MAAMC,wCAA0BF,WAGrC,SAASE,wBAAwBC,KAAK,EAAEC,GAAG;IAC3C,MAAM,EACJC,SAAS,EACTC,IAAI,EACJC,MAAM,EACNC,OAAO,EACPC,SAAS,EACTC,aAAa,EACbC,YAAY,EACZC,iBAAiB,EACjBC,QAAQ,EACR,GAAGC,WACJ,GAAGX;IAEJ,qBACE,MAACY;QACE,GAAGD,SAAS;QACbV,KAAKA;QACLC,WAAWN,IACT,iCACA,CAACa,qBAAqB,0CACtBP;;YAGDQ;0BACD,KAACG;gBACCC,aAAW;gBACXC,IAAIX;gBACJH,KAAKI;gBACLG,cAAcA;gBACdQ,QAAQ;gBACRC,UAAU,CAAC;gBACXd,MAAMA;gBACNe,OAAOZ;gBACPJ,WAAWJ,SAAS;oBAClBqB,MAAM;oBACNC,QAAQ;oBACRlB,WAAWK;gBACb;;;;AAIR,GAAG"}
|
package/dist/form/Select.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/form/Select.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport {\n useMemo,\n useRef,\n useState,\n type ChangeEvent,\n type HTMLAttributes,\n type InputHTMLAttributes,\n type ReactElement,\n type ReactNode,\n type Ref,\n} from \"react\";\nimport { type BoxProps } from \"../box/Box.js\";\nimport { IconRotator } from \"../icon/IconRotator.js\";\nimport { getIcon } from \"../icon/iconConfig.js\";\nimport { Menu, type MenuProps } from \"../menu/Menu.js\";\nimport { KeyboardMovementProvider } from \"../movement/useKeyboardMovementProvider.js\";\nimport {\n type LabelA11y,\n type PropsWithRef,\n type RequireAtLeastOne,\n} from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { useEnsuredRef } from \"../useEnsuredRef.js\";\nimport { label as labelStyles } from \"./Label.js\";\nimport { SelectedOption } from \"./SelectedOption.js\";\nimport {\n TextFieldContainer,\n type TextFieldContainerProps,\n} from \"./TextFieldContainer.js\";\nimport { getFormConfig } from \"./formConfig.js\";\nimport { select } from \"./selectStyles.js\";\nimport { extractOptionsFromChildren } from \"./selectUtils.js\";\nimport { textField } from \"./textFieldStyles.js\";\nimport { type UserAgentAutocompleteProps } from \"./types.js\";\nimport { useFormReset } from \"./useFormReset.js\";\nimport { ListboxProvider, type ListboxContext } from \"./useListboxProvider.js\";\nimport { useSelectCombobox } from \"./useSelectCombobox.js\";\n\nconst EMPTY_STRING = \"\" as const;\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * This is a convenience type for casting the `event.currentTarget.value` of a\n * `Select`'s change event to be union of available values.\n *\n * Note: The change event does not provide any sort of validation on the value\n * so automation tools like Cypress, Playwright, or Selenium might set an\n * invalid value. This also does not work for numbers, so you will need to\n * implement that yourself.\n *\n * @example Simple Usage\n * ```tsx\n * import type { SelectedChangeEvent } from \"@react-md/core\";\n * import { Select, Option } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * type Value = \"\" | \"a\" | \"b\" | \"c\" | \"d\";\n *\n * function Example(): ReactElement {\n * const [value, setValue] = useState<Value>(\"\");\n *\n * const handleChange = (event: SelectChangeEvent<Value>): void => {\n * // No type error!\n * // `event.currentTarget.value`'s type is `Value` instead of a generic `string`\n * setValue(event.currentTarget.value);\n * };\n *\n * return (\n * <Select\n * label=\"Label\"\n * value={value}\n * onChange={handleChange}\n * >\n * <Option value=\"a\">First</Option>\n * <Option value=\"b\">Second</Option>\n * <Option value=\"c\">Third</Option>\n * <Option value=\"d\">Fourth</Option>\n * </Select>\n * );\n * }\n * ```\n * @since 6.0.0\n */\nexport type SelectChangeEvent<Value extends string> =\n ChangeEvent<HTMLInputElement> & { currentTarget: { value: Value } };\n\n/**\n * @since 6.0.0 Rewritten with a new API.\n */\nexport interface SelectProps<Value extends string>\n extends Omit<TextFieldContainerProps, \"label\">,\n Pick<InputHTMLAttributes<HTMLInputElement>, \"form\" | \"required\">,\n UserAgentAutocompleteProps {\n /**\n * @defaultValue `\"select-\" + useId()`\n */\n id?: string;\n\n /**\n * Optional placeholder text or element to render while no options have been\n * selected.\n */\n placeholder?: ReactNode;\n\n /**\n * Set this to a custom dropdown icon or `null` to not render a dropdown icon.\n *\n * @defaultValue `getIcon(\"dropdown\")`\n */\n icon?: ReactNode;\n\n /**\n * Set this value to fully control the value of the select component. The\n * {@link onChange} handler **must** also be provided if this prop exists.\n */\n value?: Value;\n\n /**\n * An optional default value when the value of the select component is\n * uncontrolled.\n *\n * @defaultValue `\"\"`\n */\n defaultValue?: Value;\n\n /** @see {@link SelectChangeEvent} */\n onChange?(event: SelectChangeEvent<Value>): void;\n\n /**\n * An optional floating label to display like other form fields.\n */\n label?: ReactNode;\n\n /**\n * Optional props to pass to the `<span>` that surrounds the {@link label}\n */\n labelProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;\n\n /**\n * An optional ref to pass to the hidden `<input type=\"text\" />` element that\n * stores the current value. This is really only useful if you'd like to keep\n * this component uncontrolled and access the value through\n * `inputRef.current.value`.\n */\n inputRef?: Ref<HTMLInputElement>;\n inputProps?: InputHTMLAttributes<HTMLInputElement>;\n\n /**\n * A ref for the container `<div>` element.\n */\n containerRef?: Ref<HTMLDivElement>;\n\n /**\n * Any additional props to provide to the `Menu` component that renders all\n * the `Option`s.\n *\n * The menu will always have these default values unless explicity\n * overwritten by this prop:\n *\n * - `aria-labelledby={label ? labelId : id}` -- this will be undefined if\n * `aria-label` is provided\n * - `anchor={BELOW_CENTER_ANCHOR}`\n * - `width=\"min\"`\n */\n menuProps?: Omit<MenuProps, \"visible\" | \"onRequestClose\" | \"fixedTo\">;\n\n /**\n * Any additional props to pass to the div that contains the current visible\n * option.\n */\n selectedOptionProps?: BoxProps;\n\n /**\n * Set this to `true` if all the `Option` components should display the\n * selected icon after the children instead of before.\n *\n * @see {@link disableSelectedIcon} to remove the selected icon instead.\n *\n * @defaultValue `false`\n */\n selectedIconAfter?: boolean;\n\n /**\n * Set this to `true` to prevent the current option from rendering the\n * `leftAddon` in the `TextFieldContainer`.\n *\n * @defaultValue `false`\n */\n disableOptionAddon?: boolean;\n\n /**\n * Set this to `true` to update all the `Option` components to no longer\n * render an icon while selected.\n *\n * @defaultValue `false`\n */\n disableSelectedIcon?: boolean;\n\n /**\n * This should be the available `Option`s for the select to choose from. It\n * can also contain `OptGroup` or any other elements but only clicking on an\n * `Option` component will update the value.\n */\n children: ReactNode;\n}\n\n/**\n * **Client Component**\n *\n * @example Simple Example\n * ```tsx\n * import { Select, Option } from \"react-md\";\n * import { useState, type ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * const [value, setValue] = useState(\"\");\n *\n * return (\n * <Select\n * label=\"Select\"\n * value={value}\n * onChange={(event) => setValue(event.currentTarget.value)}\n * placeholder=\"Select a value\"\n * >\n * <Option value=\"a\">Option 1</Option>\n * <Option value=\"b\">Option 2</Option>\n * <Option value=\"c\">Option 3</Option>\n * <Option value=\"d\">Option 4</Option>\n * </Select>\n * );\n * }\n * ```\n *\n * @example Testing\n * ```tsx\n * rmdRender(\n * <Select label=\"Select\" selectedOptionProps={{ \"data-testid\": \"selected\" }}>\n * <Option value=\"a\">Option 1</Option>\n * <Option value=\"b\">Option 2</Option>\n * <Option value=\"c\">Option 3</Option>\n * <Option value=\"d\">Option 4</Option>\n * </Select>\n * );\n *\n * const user = userEvent.setup();\n * const select = screen.getByRole(\"combobox\", { name: \"Select\" });\n * const selected = screen.getByTestId(\"selected\")\n * const selectInput = screen.getByRole(\"textbox\", { hidden: true });\n * expect(selected).toHaveTextContent(\"\");\n * expect(selectInput).toHaveValue(\"\");\n *\n * await user.click(select);\n * await user.click(screen.getByRole(\"option\"), { name: \"Option 2\" });\n *\n * expect(selected).toHaveTextContent(\"Option 2\");\n * expect(selectInput).toHaveValue(\"b\");\n * ```\n *\n * @since 6.0.0 Rewritten with a new API.\n */\nexport function Select<Value extends string>(\n props: RequireAtLeastOne<SelectProps<Value>, \"label\" | keyof LabelA11y>\n): ReactElement {\n const {\n id,\n form,\n autoCompleteValue,\n autoComplete = autoCompleteValue,\n name = autoCompleteValue,\n className,\n onClick,\n onFocus,\n onKeyDown,\n inputRef: propInputRef,\n inputProps,\n containerRef,\n placeholder,\n menuProps = {},\n label,\n labelProps = {},\n selectedOptionProps,\n icon: propIcon,\n value,\n defaultValue,\n theme: propTheme,\n onChange = noop,\n rightAddon: propRightAddon,\n active = false,\n required,\n selectedIconAfter = false,\n disableOptionAddon = false,\n disableSelectedIcon = false,\n children,\n ...remaining\n } = props;\n const { dense, error, disabled } = props;\n\n const comboboxId = useEnsuredId(id, \"select\");\n const inputId = useEnsuredId(inputProps?.id, \"select-value\");\n const selectLabelId = useEnsuredId(labelProps.id, \"select-label\");\n const labelId = label ? selectLabelId : undefined;\n\n const [localValue, setLocalValue] = useState(() => {\n if (typeof defaultValue !== \"undefined\") {\n return defaultValue;\n }\n\n return typeof value !== \"undefined\" ? value : EMPTY_STRING;\n });\n const currentValue = typeof value === \"undefined\" ? localValue : value;\n const initialValue = useRef(currentValue);\n const { options, currentOption } = extractOptionsFromChildren(\n children,\n currentValue\n );\n\n const { visible, comboboxProps, movementContext, getMenuProps } =\n useSelectCombobox({\n form,\n value: currentValue,\n values: options,\n onClick,\n onFocus,\n onKeyDown,\n disabled,\n popupId: menuProps.id,\n popupRef: menuProps.nodeRef,\n comboboxId,\n comboboxRef: containerRef,\n });\n\n const [inputRef, inputRefCallback] = useEnsuredRef(propInputRef);\n useFormReset({\n form,\n elementRef: inputRef,\n defaultValue: initialValue.current,\n });\n const listboxContext = useMemo<ListboxContext>(\n () => ({\n inputRef,\n currentValue,\n selectedIconAfter,\n disableSelectedIcon,\n }),\n [currentValue, disableSelectedIcon, inputRef, selectedIconAfter]\n );\n\n const icon = getIcon(\"dropdown\", propIcon);\n const theme = getFormConfig(\"theme\", propTheme);\n let rightAddon = propRightAddon;\n if (typeof rightAddon === \"undefined\" && icon) {\n rightAddon = <IconRotator rotated={visible}>{icon}</IconRotator>;\n }\n\n let listboxLabelledBy = menuProps[\"aria-labelledby\"];\n const listboxLabel = menuProps[\"aria-label\"];\n if (!listboxLabel && !listboxLabelledBy) {\n listboxLabelledBy = labelId || comboboxId;\n }\n\n return (\n <ListboxProvider value={listboxContext}>\n <KeyboardMovementProvider value={movementContext}>\n <TextFieldContainer\n aria-labelledby={labelId}\n {...remaining}\n {...comboboxProps}\n label={!!label}\n theme={theme}\n active={active || visible}\n className={cnb(\"rmd-select-container\", className)}\n rightAddon={rightAddon}\n >\n <SelectedOption\n option={currentOption}\n placeholder={placeholder}\n disableAddon={disableOptionAddon}\n {...selectedOptionProps}\n />\n <input\n aria-hidden\n id={inputId}\n ref={inputRefCallback}\n type=\"text\"\n autoComplete={autoComplete}\n name={name}\n tabIndex={-1}\n disabled={disabled}\n required={required}\n placeholder=\" \"\n {...inputProps}\n value={value}\n defaultValue={defaultValue}\n className={cnb(select({ theme }), textField())}\n onChange={(event) => {\n onChange(event as SelectChangeEvent<Value>);\n if (typeof value !== \"undefined\") {\n return;\n }\n\n const nextValue = event.currentTarget.value;\n const nextOption = options.find((option) => option === nextValue);\n\n setLocalValue(nextOption ?? initialValue.current);\n }}\n />\n {label && (\n <span\n {...labelProps}\n id={labelId}\n className={labelStyles({\n dense,\n error,\n disabled,\n active: active || visible,\n floating: true,\n floatingActive: !!placeholder || !!currentOption,\n className: labelProps.className,\n })}\n >\n {label}\n </span>\n )}\n </TextFieldContainer>\n <Menu\n {...getMenuProps(menuProps)}\n aria-label={listboxLabel}\n aria-labelledby={listboxLabelledBy as string}\n >\n {children}\n </Menu>\n </KeyboardMovementProvider>\n </ListboxProvider>\n );\n}\n"],"names":["cnb","useMemo","useRef","useState","IconRotator","getIcon","Menu","KeyboardMovementProvider","useEnsuredId","useEnsuredRef","label","labelStyles","SelectedOption","TextFieldContainer","getFormConfig","select","extractOptionsFromChildren","textField","useFormReset","ListboxProvider","useSelectCombobox","EMPTY_STRING","noop","Select","props","id","form","autoCompleteValue","autoComplete","name","className","onClick","onFocus","onKeyDown","inputRef","propInputRef","inputProps","containerRef","placeholder","menuProps","labelProps","selectedOptionProps","icon","propIcon","value","defaultValue","theme","propTheme","onChange","rightAddon","propRightAddon","active","required","selectedIconAfter","disableOptionAddon","disableSelectedIcon","children","remaining","dense","error","disabled","comboboxId","inputId","selectLabelId","labelId","undefined","localValue","setLocalValue","currentValue","initialValue","options","currentOption","visible","comboboxProps","movementContext","getMenuProps","values","popupId","popupRef","nodeRef","comboboxRef","inputRefCallback","elementRef","current","listboxContext","rotated","listboxLabelledBy","listboxLabel","aria-labelledby","option","disableAddon","input","aria-hidden","ref","type","tabIndex","event","nextValue","currentTarget","nextOption","find","span","floating","floatingActive","aria-label"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;AACA,SAASA,GAAG,QAAQ,YAAY;AAChC,SACEC,OAAO,EACPC,MAAM,EACNC,QAAQ,QAOH,QAAQ;AAEf,SAASC,WAAW,QAAQ,yBAAyB;AACrD,SAASC,OAAO,QAAQ,wBAAwB;AAChD,SAASC,IAAI,QAAwB,kBAAkB;AACvD,SAASC,wBAAwB,QAAQ,6CAA6C;AAMtF,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,aAAa,QAAQ,sBAAsB;AACpD,SAASC,SAASC,WAAW,QAAQ,aAAa;AAClD,SAASC,cAAc,QAAQ,sBAAsB;AACrD,SACEC,kBAAkB,QAEb,0BAA0B;AACjC,SAASC,aAAa,QAAQ,kBAAkB;AAChD,SAASC,MAAM,QAAQ,oBAAoB;AAC3C,SAASC,0BAA0B,QAAQ,mBA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B;oBACvCmB,YAAYA;;sCAEZ,KAACrC;4BACC6E,QAAQlB;4BACRjC,aAAaA;4BACboD,cAAcpC;4BACb,GAAGb,mBAAmB;;sCAEzB,KAACkD;4BACCC,aAAW;4BACXnE,IAAIqC;4BACJ+B,KAAKZ;4BACLa,MAAK;4BACLlE,cAAcA;4BACdC,MAAMA;4BACNkE,UAAU,CAAC;4BACXnC,UAAUA;4BACVR,UAAUA;4BACVd,aAAY;4BACX,GAAGF,UAAU;4BACdQ,OAAOA;4BACPC,cAAcA;4BACdf,WAAW9B,IAAIe,OAAO;gCAAE+B;4BAAM,IAAI7B;4BAClC+B,UAAU,CAACgD;gCACThD,SAASgD;gCACT,IAAI,OAAOpD,UAAU,aAAa;oCAChC;gCACF;gCAEA,MAAMqD,YAAYD,MAAME,aAAa,CAACtD,KAAK;gCAC3C,MAAMuD,aAAa7B,QAAQ8B,IAAI,CAAC,CAACX,SAAWA,WAAWQ;gCAEvD9B,cAAcgC,cAAc9B,aAAac,OAAO;4BAClD;;wBAEDzE,uBACC,KAAC2F;4BACE,GAAG7D,UAAU;4BACdf,IAAIuC;4BACJlC,WAAWnB,YAAY;gCACrB+C;gCACAC;gCACAC;gCACAT,QAAQA,UAAUqB;gCAClB8B,UAAU;gCACVC,gBAAgB,CAAC,CAACjE,eAAe,CAAC,CAACiC;gCACnCzC,WAAWU,WAAWV,SAAS;4BACjC;sCAECpB;;;;8BAIP,KAACJ;oBACE,GAAGqE,aAAapC,UAAU;oBAC3BiE,cAAYjB;oBACZC,mBAAiBF;8BAEhB9B;;;;;AAKX"}
|
|
1
|
+
{"version":3,"sources":["../../src/form/Select.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport {\n useMemo,\n useRef,\n useState,\n type ChangeEvent,\n type HTMLAttributes,\n type InputHTMLAttributes,\n type ReactElement,\n type ReactNode,\n type Ref,\n} from \"react\";\nimport { type BoxProps } from \"../box/Box.js\";\nimport { IconRotator } from \"../icon/IconRotator.js\";\nimport { getIcon } from \"../icon/iconConfig.js\";\nimport { Menu, type MenuProps } from \"../menu/Menu.js\";\nimport { KeyboardMovementProvider } from \"../movement/useKeyboardMovementProvider.js\";\nimport {\n type LabelA11y,\n type PropsWithRef,\n type RequireAtLeastOne,\n} from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { useEnsuredRef } from \"../useEnsuredRef.js\";\nimport { label as labelStyles } from \"./Label.js\";\nimport { SelectedOption } from \"./SelectedOption.js\";\nimport {\n TextFieldContainer,\n type TextFieldContainerProps,\n} from \"./TextFieldContainer.js\";\nimport { getFormConfig } from \"./formConfig.js\";\nimport { select } from \"./selectStyles.js\";\nimport { extractOptionsFromChildren } from \"./selectUtils.js\";\nimport { textField } from \"./textFieldStyles.js\";\nimport { type UserAgentAutocompleteProps } from \"./types.js\";\nimport { useFormReset } from \"./useFormReset.js\";\nimport { ListboxProvider, type ListboxContext } from \"./useListboxProvider.js\";\nimport { useSelectCombobox } from \"./useSelectCombobox.js\";\n\nconst EMPTY_STRING = \"\" as const;\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * This is a convenience type for casting the `event.currentTarget.value` of a\n * `Select`'s change event to be union of available values.\n *\n * Note: The change event does not provide any sort of validation on the value\n * so automation tools like Cypress, Playwright, or Selenium might set an\n * invalid value. This also does not work for numbers, so you will need to\n * implement that yourself.\n *\n * @example Simple Usage\n * ```tsx\n * import type { SelectedChangeEvent } from \"@react-md/core\";\n * import { Select, Option } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * type Value = \"\" | \"a\" | \"b\" | \"c\" | \"d\";\n *\n * function Example(): ReactElement {\n * const [value, setValue] = useState<Value>(\"\");\n *\n * const handleChange = (event: SelectChangeEvent<Value>): void => {\n * // No type error!\n * // `event.currentTarget.value`'s type is `Value` instead of a generic `string`\n * setValue(event.currentTarget.value);\n * };\n *\n * return (\n * <Select\n * label=\"Label\"\n * value={value}\n * onChange={handleChange}\n * >\n * <Option value=\"a\">First</Option>\n * <Option value=\"b\">Second</Option>\n * <Option value=\"c\">Third</Option>\n * <Option value=\"d\">Fourth</Option>\n * </Select>\n * );\n * }\n * ```\n * @since 6.0.0\n */\nexport type SelectChangeEvent<Value extends string> =\n ChangeEvent<HTMLInputElement> & { currentTarget: { value: Value } };\n\n/**\n * @since 6.0.0 Rewritten with a new API.\n */\nexport interface SelectProps<Value extends string>\n extends Omit<TextFieldContainerProps, \"label\">,\n Pick<InputHTMLAttributes<HTMLInputElement>, \"form\" | \"required\">,\n UserAgentAutocompleteProps {\n /**\n * @defaultValue `\"select-\" + useId()`\n */\n id?: string;\n\n /**\n * Optional placeholder text or element to render while no options have been\n * selected.\n */\n placeholder?: ReactNode;\n\n /**\n * Set this to a custom dropdown icon or `null` to not render a dropdown icon.\n *\n * @defaultValue `getIcon(\"dropdown\")`\n */\n icon?: ReactNode;\n\n /**\n * Set this value to fully control the value of the select component. The\n * {@link onChange} handler **must** also be provided if this prop exists.\n */\n value?: Value;\n\n /**\n * An optional default value when the value of the select component is\n * uncontrolled.\n *\n * @defaultValue `\"\"`\n */\n defaultValue?: Value;\n\n /** @see {@link SelectChangeEvent} */\n onChange?(event: SelectChangeEvent<Value>): void;\n\n /**\n * An optional floating label to display like other form fields.\n */\n label?: ReactNode;\n\n /**\n * Optional props to pass to the `<span>` that surrounds the {@link label}\n */\n labelProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;\n\n /**\n * An optional ref to pass to the hidden `<input type=\"text\" />` element that\n * stores the current value. This is really only useful if you'd like to keep\n * this component uncontrolled and access the value through\n * `inputRef.current.value`.\n */\n inputRef?: Ref<HTMLInputElement>;\n inputProps?: InputHTMLAttributes<HTMLInputElement>;\n\n /**\n * A ref for the container `<div>` element.\n */\n containerRef?: Ref<HTMLDivElement>;\n\n /**\n * Any additional props to provide to the `Menu` component that renders all\n * the `Option`s.\n *\n * The menu will always have these default values unless explicity\n * overwritten by this prop:\n *\n * - `aria-labelledby={label ? labelId : id}` -- this will be undefined if\n * `aria-label` is provided\n * - `anchor={BELOW_CENTER_ANCHOR}`\n * - `width=\"min\"`\n */\n menuProps?: Omit<MenuProps, \"visible\" | \"onRequestClose\" | \"fixedTo\">;\n\n /**\n * Any additional props to pass to the div that contains the current visible\n * option.\n */\n selectedOptionProps?: BoxProps;\n\n /**\n * Set this to `true` if all the `Option` components should display the\n * selected icon after the children instead of before.\n *\n * @see {@link disableSelectedIcon} to remove the selected icon instead.\n *\n * @defaultValue `false`\n */\n selectedIconAfter?: boolean;\n\n /**\n * Set this to `true` to prevent the current option from rendering the\n * `leftAddon` in the `TextFieldContainer`.\n *\n * @defaultValue `false`\n */\n disableOptionAddon?: boolean;\n\n /**\n * Set this to `true` to update all the `Option` components to no longer\n * render an icon while selected.\n *\n * @defaultValue `false`\n */\n disableSelectedIcon?: boolean;\n\n /**\n * This should be the available `Option`s for the select to choose from. It\n * can also contain `OptGroup` or any other elements but only clicking on an\n * `Option` component will update the value.\n */\n children: ReactNode;\n}\n\n/**\n * **Client Component**\n *\n * @example Simple Example\n * ```tsx\n * import { Select, Option } from \"react-md\";\n * import { useState, type ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * const [value, setValue] = useState(\"\");\n *\n * return (\n * <Select\n * label=\"Select\"\n * value={value}\n * onChange={(event) => setValue(event.currentTarget.value)}\n * placeholder=\"Select a value\"\n * >\n * <Option value=\"a\">Option 1</Option>\n * <Option value=\"b\">Option 2</Option>\n * <Option value=\"c\">Option 3</Option>\n * <Option value=\"d\">Option 4</Option>\n * </Select>\n * );\n * }\n * ```\n *\n * @example Testing\n * ```tsx\n * rmdRender(\n * <Select label=\"Select\" selectedOptionProps={{ \"data-testid\": \"selected\" }}>\n * <Option value=\"a\">Option 1</Option>\n * <Option value=\"b\">Option 2</Option>\n * <Option value=\"c\">Option 3</Option>\n * <Option value=\"d\">Option 4</Option>\n * </Select>\n * );\n *\n * const user = userEvent.setup();\n * const select = screen.getByRole(\"combobox\", { name: \"Select\" });\n * const selected = screen.getByTestId(\"selected\")\n * const selectInput = screen.getByRole(\"textbox\", { hidden: true });\n * expect(selected).toHaveTextContent(\"\");\n * expect(selectInput).toHaveValue(\"\");\n *\n * await user.click(select);\n * await user.click(screen.getByRole(\"option\"), { name: \"Option 2\" });\n *\n * expect(selected).toHaveTextContent(\"Option 2\");\n * expect(selectInput).toHaveValue(\"b\");\n * ```\n *\n * @since 6.0.0 Rewritten with a new API.\n */\nexport function Select<Value extends string>(\n props: RequireAtLeastOne<SelectProps<Value>, \"label\" | keyof LabelA11y>\n): ReactElement {\n const {\n id,\n form,\n autoCompleteValue,\n autoComplete = autoCompleteValue,\n name = autoCompleteValue,\n className,\n onClick,\n onFocus,\n onKeyDown,\n inputRef: propInputRef,\n inputProps,\n containerRef,\n placeholder,\n menuProps = {},\n label,\n labelProps = {},\n selectedOptionProps,\n icon: propIcon,\n value,\n defaultValue,\n theme: propTheme,\n onChange = noop,\n rightAddon: propRightAddon,\n active = false,\n required,\n selectedIconAfter = false,\n disableOptionAddon = false,\n disableSelectedIcon = false,\n children,\n ...remaining\n } = props;\n const { dense, error, disabled } = props;\n\n const comboboxId = useEnsuredId(id, \"select\");\n const inputId = useEnsuredId(inputProps?.id, \"select-value\");\n const selectLabelId = useEnsuredId(labelProps.id, \"select-label\");\n const labelId = label ? selectLabelId : undefined;\n\n const [localValue, setLocalValue] = useState(() => {\n if (typeof defaultValue !== \"undefined\") {\n return defaultValue;\n }\n\n return typeof value !== \"undefined\" ? value : EMPTY_STRING;\n });\n const currentValue = typeof value === \"undefined\" ? localValue : value;\n const initialValue = useRef(currentValue);\n const { options, currentOption } = extractOptionsFromChildren(\n children,\n currentValue\n );\n\n const { visible, comboboxProps, movementContext, getMenuProps } =\n useSelectCombobox({\n form,\n value: currentValue,\n values: options,\n onClick,\n onFocus,\n onKeyDown,\n disabled,\n popupId: menuProps.id,\n popupRef: menuProps.nodeRef,\n comboboxId,\n comboboxRef: containerRef,\n });\n\n const [inputRef, inputRefCallback] = useEnsuredRef(propInputRef);\n useFormReset({\n form,\n elementRef: inputRef,\n defaultValue: initialValue.current,\n });\n const listboxContext = useMemo<ListboxContext>(\n () => ({\n inputRef,\n currentValue,\n selectedIconAfter,\n disableSelectedIcon,\n }),\n [currentValue, disableSelectedIcon, inputRef, selectedIconAfter]\n );\n\n const icon = getIcon(\"dropdown\", propIcon);\n const theme = getFormConfig(\"theme\", propTheme);\n let rightAddon = propRightAddon;\n if (typeof rightAddon === \"undefined\" && icon) {\n rightAddon = <IconRotator rotated={visible}>{icon}</IconRotator>;\n }\n\n let listboxLabelledBy = menuProps[\"aria-labelledby\"];\n const listboxLabel = menuProps[\"aria-label\"];\n if (!listboxLabel && !listboxLabelledBy) {\n listboxLabelledBy = labelId || comboboxId;\n }\n\n return (\n <ListboxProvider value={listboxContext}>\n <KeyboardMovementProvider value={movementContext}>\n <TextFieldContainer\n aria-labelledby={labelId}\n {...remaining}\n {...comboboxProps}\n label={!!label}\n theme={theme}\n active={active || visible}\n className={cnb(\"rmd-select-container\", className)}\n rightAddon={rightAddon}\n >\n <SelectedOption\n option={currentOption}\n placeholder={placeholder}\n disableAddon={disableOptionAddon}\n {...selectedOptionProps}\n />\n <input\n aria-hidden\n id={inputId}\n ref={inputRefCallback}\n type=\"text\"\n autoComplete={autoComplete}\n name={name}\n tabIndex={-1}\n disabled={disabled}\n required={required}\n placeholder=\" \"\n {...inputProps}\n value={value}\n defaultValue={defaultValue}\n className={cnb(select({ theme }), textField())}\n onChange={(event) => {\n onChange(event as SelectChangeEvent<Value>);\n if (typeof value !== \"undefined\") {\n return;\n }\n\n const nextValue = event.currentTarget.value;\n const nextOption = options.find((option) => option === nextValue);\n\n setLocalValue(nextOption ?? initialValue.current);\n }}\n />\n {label && (\n <span\n {...labelProps}\n id={labelId}\n className={labelStyles({\n dense,\n error,\n disabled,\n active: active || visible,\n floating: true,\n floatingActive: !!placeholder || !!currentOption,\n className: labelProps.className,\n })}\n >\n {label}\n </span>\n )}\n </TextFieldContainer>\n <Menu\n {...getMenuProps(menuProps)}\n aria-label={listboxLabel}\n aria-labelledby={listboxLabelledBy as string}\n >\n {children}\n </Menu>\n </KeyboardMovementProvider>\n </ListboxProvider>\n );\n}\n"],"names":["cnb","useMemo","useRef","useState","IconRotator","getIcon","Menu","KeyboardMovementProvider","useEnsuredId","useEnsuredRef","label","labelStyles","SelectedOption","TextFieldContainer","getFormConfig","select","extractOptionsFromChildren","textField","useFormReset","ListboxProvider","useSelectCombobox","EMPTY_STRING","noop","Select","props","id","form","autoCompleteValue","autoComplete","name","className","onClick","onFocus","onKeyDown","inputRef","propInputRef","inputProps","containerRef","placeholder","menuProps","labelProps","selectedOptionProps","icon","propIcon","value","defaultValue","theme","propTheme","onChange","rightAddon","propRightAddon","active","required","selectedIconAfter","disableOptionAddon","disableSelectedIcon","children","remaining","dense","error","disabled","comboboxId","inputId","selectLabelId","labelId","undefined","localValue","setLocalValue","currentValue","initialValue","options","currentOption","visible","comboboxProps","movementContext","getMenuProps","values","popupId","popupRef","nodeRef","comboboxRef","inputRefCallback","elementRef","current","listboxContext","rotated","listboxLabelledBy","listboxLabel","aria-labelledby","option","disableAddon","input","aria-hidden","ref","type","tabIndex","event","nextValue","currentTarget","nextOption","find","span","floating","floatingActive","aria-label"],"mappings":"AAAA;;AACA,SAASA,GAAG,QAAQ,YAAY;AAChC,SACEC,OAAO,EACPC,MAAM,EACNC,QAAQ,QAOH,QAAQ;AAEf,SAASC,WAAW,QAAQ,yBAAyB;AACrD,SAASC,OAAO,QAAQ,wBAAwB;AAChD,SAASC,IAAI,QAAwB,kBAAkB;AACvD,SAASC,wBAAwB,QAAQ,6CAA6C;AAMtF,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,aAAa,QAAQ,sBAAsB;AACpD,SAASC,SAASC,WAAW,QAAQ,aAAa;AAClD,SAASC,cAAc,QAAQ,sBAAsB;AACrD,SACEC,kBAAkB,QAEb,0BAA0B;AACjC,SAASC,aAAa,QAAQ,kBAAkB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ACToC,OAAOA;oBACPK,QAAQA,UAAUqB;oBAClB1C,WAAW9B,IAAI,wBAAwB8B;oBACvCmB,YAAYA;;sCAEZ,KAACrC;4BACC6E,QAAQlB;4BACRjC,aAAaA;4BACboD,cAAcpC;4BACb,GAAGb,mBAAmB;;sCAEzB,KAACkD;4BACCC,aAAW;4BACXnE,IAAIqC;4BACJ+B,KAAKZ;4BACLa,MAAK;4BACLlE,cAAcA;4BACdC,MAAMA;4BACNkE,UAAU,CAAC;4BACXnC,UAAUA;4BACVR,UAAUA;4BACVd,aAAY;4BACX,GAAGF,UAAU;4BACdQ,OAAOA;4BACPC,cAAcA;4BACdf,WAAW9B,IAAIe,OAAO;gCAAE+B;4BAAM,IAAI7B;4BAClC+B,UAAU,CAACgD;gCACThD,SAASgD;gCACT,IAAI,OAAOpD,UAAU,aAAa;oCAChC;gCACF;gCAEA,MAAMqD,YAAYD,MAAME,aAAa,CAACtD,KAAK;gCAC3C,MAAMuD,aAAa7B,QAAQ8B,IAAI,CAAC,CAACX,SAAWA,WAAWQ;gCAEvD9B,cAAcgC,cAAc9B,aAAac,OAAO;4BAClD;;wBAEDzE,uBACC,KAAC2F;4BACE,GAAG7D,UAAU;4BACdf,IAAIuC;4BACJlC,WAAWnB,YAAY;gCACrB+C;gCACAC;gCACAC;gCACAT,QAAQA,UAAUqB;gCAClB8B,UAAU;gCACVC,gBAAgB,CAAC,CAACjE,eAAe,CAAC,CAACiC;gCACnCzC,WAAWU,WAAWV,SAAS;4BACjC;sCAECpB;;;;8BAIP,KAACJ;oBACE,GAAGqE,aAAapC,UAAU;oBAC3BiE,cAAYjB;oBACZC,mBAAiBF;8BAEhB9B;;;;;AAKX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/form/SelectedOption.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { type ReactElement, type ReactNode } from \"react\";\nimport { Box, type BoxProps } from \"../box/Box.js\";\nimport { cssUtils } from \"../cssUtils.js\";\nimport { type OptionProps } from \"./Option.js\";\nimport { textField } from \"./textFieldStyles.js\";\n\n/**\n * @since 6.0.0\n * @internal\n */\nexport interface SelectedOptionProps extends BoxProps {\n option: OptionProps | undefined;\n placeholder?: ReactNode;\n disableAddon: boolean;\n}\n\n/**\n * **Server Component**\n *\n * This component is used to render the current option.\n *\n * @since 6.0.0\n * @internal\n */\nexport function SelectedOption(props: SelectedOptionProps): ReactElement {\n const {\n disableAddon,\n option,\n className,\n disablePadding = true,\n placeholder,\n ...remaining\n } = props;\n\n let children = option?.children || placeholder;\n // when the children are a string or number, wrap it in additional span so\n // that overflow can be ellipsis-ed\n if (typeof children === \"string\" || typeof children === \"number\") {\n children = (\n <span className={cssUtils({ textOverflow: \"ellipsis\" })}>{children}</span>\n );\n }\n\n return (\n <Box\n {...remaining}\n className={cnb(\"rmd-selected-option\", textField(), className)}\n disablePadding={disablePadding}\n >\n {!disableAddon && option?.leftAddon}\n {children}\n </Box>\n );\n}\n"],"names":["cnb","Box","cssUtils","textField","SelectedOption","props","disableAddon","option","className","disablePadding","placeholder","remaining","children","span","textOverflow","leftAddon"],"
|
|
1
|
+
{"version":3,"sources":["../../src/form/SelectedOption.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { type ReactElement, type ReactNode } from \"react\";\nimport { Box, type BoxProps } from \"../box/Box.js\";\nimport { cssUtils } from \"../cssUtils.js\";\nimport { type OptionProps } from \"./Option.js\";\nimport { textField } from \"./textFieldStyles.js\";\n\n/**\n * @since 6.0.0\n * @internal\n */\nexport interface SelectedOptionProps extends BoxProps {\n option: OptionProps | undefined;\n placeholder?: ReactNode;\n disableAddon: boolean;\n}\n\n/**\n * **Server Component**\n *\n * This component is used to render the current option.\n *\n * @since 6.0.0\n * @internal\n */\nexport function SelectedOption(props: SelectedOptionProps): ReactElement {\n const {\n disableAddon,\n option,\n className,\n disablePadding = true,\n placeholder,\n ...remaining\n } = props;\n\n let children = option?.children || placeholder;\n // when the children are a string or number, wrap it in additional span so\n // that overflow can be ellipsis-ed\n if (typeof children === \"string\" || typeof children === \"number\") {\n children = (\n <span className={cssUtils({ textOverflow: \"ellipsis\" })}>{children}</span>\n );\n }\n\n return (\n <Box\n {...remaining}\n className={cnb(\"rmd-selected-option\", textField(), className)}\n disablePadding={disablePadding}\n >\n {!disableAddon && option?.leftAddon}\n {children}\n </Box>\n );\n}\n"],"names":["cnb","Box","cssUtils","textField","SelectedOption","props","disableAddon","option","className","disablePadding","placeholder","remaining","children","span","textOverflow","leftAddon"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAEhC,SAASC,GAAG,QAAuB,gBAAgB;AACnD,SAASC,QAAQ,QAAQ,iBAAiB;AAE1C,SAASC,SAAS,QAAQ,uBAAuB;AAYjD;;;;;;;CAOC,GACD,OAAO,SAASC,eAAeC,KAA0B;IACvD,MAAM,EACJC,YAAY,EACZC,MAAM,EACNC,SAAS,EACTC,iBAAiB,IAAI,EACrBC,WAAW,EACX,GAAGC,WACJ,GAAGN;IAEJ,IAAIO,WAAWL,QAAQK,YAAYF;IACnC,0EAA0E;IAC1E,mCAAmC;IACnC,IAAI,OAAOE,aAAa,YAAY,OAAOA,aAAa,UAAU;QAChEA,yBACE,KAACC;YAAKL,WAAWN,SAAS;gBAAEY,cAAc;YAAW;sBAAKF;;IAE9D;IAEA,qBACE,MAACX;QACE,GAAGU,SAAS;QACbH,WAAWR,IAAI,uBAAuBG,aAAaK;QACnDC,gBAAgBA;;YAEf,CAACH,gBAAgBC,QAAQQ;YACzBH;;;AAGP"}
|
package/dist/form/Slider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/form/Slider.tsx"],"sourcesContent":["\"use client\";\nimport {\n useRef,\n useState,\n type HTMLAttributes,\n type ReactElement,\n type ReactNode,\n type Ref,\n} from \"react\";\nimport { useDraggable } from \"../draggable/useDraggable.js\";\nimport { type TooltipProps } from \"../tooltip/Tooltip.js\";\nimport {\n type LabelRequiredForA11y,\n type PropsWithRef,\n type UseStateSetter,\n} from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { identity } from \"../utils/identity.js\";\nimport { withinRange } from \"../utils/withinRange.js\";\nimport { SliderContainer, type SliderAddonProps } from \"./SliderContainer.js\";\nimport {\n SliderThumb,\n type SliderThumbPresentation,\n type SliderThumbProps,\n} from \"./SliderThumb.js\";\nimport { SliderTrack } from \"./SliderTrack.js\";\nimport {\n SliderValueMarks,\n type SliderMarksOptions,\n} from \"./SliderValueMarks.js\";\nimport { getJumpValue } from \"./sliderUtils.js\";\nimport { type RangeSliderState } from \"./useRangeSlider.js\";\nimport { type SliderState, type SliderValueOptions } from \"./useSlider.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-slider-color\"?: string;\n \"--rmd-slider-active-color\"?: string;\n \"--rmd-slider-inactive-color\"?: string;\n \"--rmd-slider-size\"?: string | number;\n \"--rmd-slider-active-size\"?: string | number;\n \"--rmd-slider-inactive-size\"?: string | number;\n \"--rmd-slider-vertical-size\"?: string | number;\n \"--rmd-slider-offset-1\"?: string;\n \"--rmd-slider-offset-2\"?: string;\n \"--rmd-slider-tooltip-scale\"?: string | number;\n \"--rmd-slider-tooltip-translate\"?: string | number;\n \"--rmd-slider-mark-offset\"?: string;\n }\n}\n\nconst emptyString = (): string => \"\";\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * @since 2.5.0\n */\nexport interface BaseSliderProps\n extends HTMLAttributes<HTMLDivElement>,\n SliderThumbPresentation,\n SliderValueOptions,\n SliderAddonProps,\n SliderMarksOptions {\n /**\n * This can be used to apply a ref to the container element since this\n * component does not use `forwardRef`.\n */\n containerRef?: Ref<HTMLDivElement>;\n\n /**\n * The amount to jump the slider's value when the `PageUp` or `PageDown`\n * key is pressed.\n *\n * The default value is 1/10th of the range.\n *\n * @defaultValue `(numberOfSteps / 10) * step`\n */\n jump?: number;\n\n /** @defaultValue `false` */\n disabled?: boolean;\n\n /** @defaultValue `false` */\n vertical?: boolean;\n\n /**\n * This can be used to apply custom styles or a `ref` to the track element if\n * needed.\n */\n trackProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;\n\n /**\n * This can be used to configure any additional tooltip props like the\n * CSS transition `classNames`, styles, etc.\n *\n * This will only be used when {@link discrete} is `true`.\n *\n * Note: The `position` will always be `\"above\"` for horizontal sliders and\n * `\"left\"` for vertical sliders.\n */\n tooltipProps?: Omit<Partial<TooltipProps>, \"position\">;\n}\n\n/**\n * @since 2.5.0\n * @since 6.0.0 Only requires `value` and `setValue` props instead of all the\n * slider controls.\n * @since 6.0.0 The `thumbLabel` and `thumbLabelledBy` props were removed. Use\n * the `aria-label` or `aria-labelledby` props instead.\n */\nexport interface SliderProps extends BaseSliderProps, SliderState {\n /**\n * Any additional props that should be provided to the thumb element. This can\n * be useful for applying additional styling.\n */\n thumbProps?: HTMLAttributes<HTMLSpanElement>;\n\n /**\n * This can be used to update the discrete slider's tooltip props.\n *\n * @example Custom Styles\n * ```tsx\n * <Slider\n * {...slider}\n * discrete\n * getTooltipProps={(value) => ({\n * className: cssUtils({\n * backgroundColor: value < 30 ? \"warning\" : undefined,\n * }),\n * })}\n * />\n * ```\n */\n getTooltipProps?(value: number): Partial<TooltipProps>;\n\n /**\n * This can be used to update the discrete slider's value tooltip.\n *\n * @example More Value Information\n * ```tsx\n * <Slider\n * {...slider}\n * discrete\n * getTooltipChildren={(value) => (\n * <TextIconSpacing icon={<FavoriteIcon />}>\n * {value}\n * </TextIconSpacing>\n * )}\n * />\n * ```\n *\n * This will only be used when {@link discrete} is `true`.\n *\n * @defaultValue `(value) => value`\n */\n getTooltipChildren?(value: number): ReactNode;\n}\n\n/**\n * @since 2.5.0\n * @since 6.0.0 Only requires `rangeValue` and `setRangeValue` props instead of\n * all the slider controls.\n * @since 6.0.0 The `thumb1Label`, `thumb1LabelledBy`, `thumb1Props`,\n * `thumb2Label`, `thumb2LabelledBy` and `thumb2Props` were renamed to\n * `minThumbLabel`, `minThumbLabelledBy`, `minThumbProps`, `maxThumbLabel`,\n * `maxThumbLabelledBy`, and `maxThumbProps` respectively.\n */\nexport interface RangeSliderProps extends BaseSliderProps, RangeSliderState {\n /**\n * Any additional props that should be provided to the min value thumb\n * element. This can be useful for applying additional styling.\n */\n minThumbProps?: HTMLAttributes<HTMLSpanElement>;\n\n /**\n * Any additional props that should be provided to the max value thumb\n * element. This can be useful for applying additional styling.\n */\n maxThumbProps?: HTMLAttributes<HTMLSpanElement>;\n\n /**\n * The `aria-label` to apply to the min value.\n *\n * Note: Either this prop or the {@link minThumbLabelledBy} are required for\n * accessibility.\n *\n * @defaultValue `\"Min\"`\n */\n minThumbLabel?: string;\n\n /**\n * Set this to an element's id that labels the min value.\n *\n * Note: Either this prop or the {@link minThumbLabel} are required for\n * accessibility.\n */\n minThumbLabelledBy?: string;\n\n /**\n * The `aria-label` to apply to the max value.\n *\n * Note: Either this prop or the {@link maxThumbLabelledBy} are required for\n * accessibility.\n *\n * @defaultValue `\"Max\"`\n */\n maxThumbLabel?: string;\n\n /**\n * Set this to an element's id that labels the max value.\n *\n * Note: Either this prop or the {@link maxThumbLabel} are required for\n * accessibility.\n */\n maxThumbLabelledBy?: string;\n\n /**\n * This can be used to update the discrete slider's tooltip props.\n *\n * @example Custom Styles\n * ```tsx\n * <Slider\n * {...slider}\n * discrete\n * getTooltipProps={(value, isFirstThumb) => ({\n * className: cssUtils({\n * backgroundColor: value < 30 && isFirstThumb ? \"warning\" : undefined,\n * }),\n * })}\n * />\n * ```\n */\n getTooltipProps?(value: number, isFirstThumb: boolean): Partial<TooltipProps>;\n\n /**\n * This can be used to update the discrete slider's value tooltip.\n *\n * @example More Value Information\n * ```tsx\n * <Slider\n * {...rangeSlider}\n * discrete\n * getTooltipChildren={(value, isFirstThumb) => (\n * <TextIconSpacing\n * icon={isFirstThumb ? <FavoriteIcon /> : <CloseIcon /}\n * iconAfter={!isFirstValue}\n * >\n * {value}\n * </TextIconSpacing>\n * )}\n * />\n * ```\n *\n * This will only be used when {@link discrete} is `true`.\n *\n * @defaultValue `(value) => value`\n */\n getTooltipChildren?(value: number, isFirstThumb: boolean): ReactNode;\n}\n\n/**\n * **Client Component**\n *\n * @example Simple Example\n * ```tsx\n * import { Form, Slider, useSlider } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * const slider = useSlider({\n * // these are the defaults and can be changed\n * min: 0,\n * max: 100,\n * step: 1,\n * defaultValue: 50,\n * });\n *\n * // if you need access to the current value or manually change the value\n * // yourself.\n * const { value, setValue } = slider;\n *\n * return (\n * <Form>\n * <Slider {...slider} aria-label=\"Volume\" />\n * </Form>\n * );\n * }\n * ```\n *\n * @example Range Slider Example\n * ```tsx\n * import { Fieldset, Form, Legend, Slider, useRangeSlider } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n * import { useId } from \"react\";\n *\n * function Example(): ReactElement {\n * const slider = useRangeSlider({\n * // these are the defaults and can be changed\n * min: 0,\n * max: 100,\n * step: 1,\n * defaultValue: [0, 100],\n * });\n *\n * // if you need access to the current value or manually change the value\n * // yourself.\n * const { rangeValue, setRangeValue } = slider;\n * const [minPrice, maxPrice] = rangeValue;\n *\n * return (\n * <Form>\n * <Fieldset>\n * <Legend>Price Range</Legend>\n * <Slider {...slider} />\n * </Fieldset>\n * </Form>\n * );\n * }\n * ```\n *\n * @since 2.5.0\n * @since 6.0.0 The `Slider` and `RangeSlider` have been combined into the\n * single `Slider` component and removed the `label` support.\n * @since 6.0.0 Each thumb includes an invisible `<input type=\"range\">` instead\n * of an `<input type=\"hidden\">`.\n */\nexport function Slider(props: LabelRequiredForA11y<SliderProps>): ReactElement;\nexport function Slider(props: RangeSliderProps): ReactElement;\nexport function Slider(\n props: LabelRequiredForA11y<SliderProps> | RangeSliderProps\n): ReactElement {\n const {\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n id: propId,\n min = 0,\n max = 100,\n step = 1,\n jump: propJump,\n vertical = false,\n discrete = false,\n disabled = false,\n getValueText = emptyString,\n children,\n marks = false,\n value,\n setValue,\n rangeValue,\n setRangeValue,\n trackProps,\n thumbProps,\n minThumbProps,\n minThumbLabel,\n minThumbLabelledBy,\n maxThumbProps,\n maxThumbLabel,\n maxThumbLabelledBy,\n tooltipProps,\n containerRef,\n getMarkProps = noop,\n getMarkLabelProps = noop,\n tooltipVisibility = \"auto\",\n getTooltipProps = noop,\n getTooltipChildren = identity,\n disableSmoothDragging = !!marks,\n ...remaining\n } = props as SliderProps & RangeSliderProps;\n\n const jump = getJumpValue({ min, max, step, jump: propJump });\n const isRangeSlider = typeof value !== \"number\";\n\n const thumb1Id = useEnsuredId(propId, \"slider\");\n const thumb2Id = `${thumb1Id}-2`;\n const thumb1Ref = useRef<HTMLSpanElement>(null);\n const thumb2Ref = useRef<HTMLSpanElement>(null);\n\n let thumb1Max = max;\n let thumb2Min = min;\n let thumb1Label: string | undefined;\n let thumb1LabelledBy: string | undefined;\n let thumb2Label: string | undefined;\n let thumb2LabelledBy: string | undefined;\n let thumb1Value: number;\n let thumb2Value: number;\n let setThumb1Value: UseStateSetter<number>;\n let setThumb2Value: UseStateSetter<number>;\n if (!isRangeSlider) {\n thumb1Value = value;\n setThumb1Value = setValue;\n thumb2Value = max;\n setThumb2Value = noop;\n thumb1Label = ariaLabel;\n thumb1LabelledBy = ariaLabelledBy;\n } else {\n thumb1LabelledBy = minThumbLabelledBy;\n thumb1Label = minThumbLabel || (minThumbLabelledBy ? undefined : \"Min\");\n thumb2LabelledBy = maxThumbLabelledBy;\n thumb2Label = maxThumbLabel || (maxThumbLabelledBy ? undefined : \"max\");\n\n [thumb1Value, thumb2Value] = rangeValue;\n\n thumb1Max = thumb2Value - step;\n thumb2Min = thumb1Value + step;\n\n setThumb1Value = (valueOrSetter) => {\n setRangeValue((prevRangeValue) => {\n const value =\n typeof valueOrSetter === \"number\"\n ? valueOrSetter\n : valueOrSetter(prevRangeValue[0]);\n\n return [value, prevRangeValue[1]];\n });\n };\n setThumb2Value = (valueOrSetter) => {\n setRangeValue((prevRangeValue) => {\n const value =\n typeof valueOrSetter === \"number\"\n ? valueOrSetter\n : valueOrSetter(prevRangeValue[1]);\n\n return [prevRangeValue[0], value];\n });\n };\n }\n\n const [thumb1Dragging, setThumb1Dragging] = useState(false);\n const {\n onKeyDown: thumb1OnKeyDown,\n onMouseUp: thumb1OnMouseUp,\n onMouseDown: thumb1OnMouseDown,\n onMouseMove: thumb1OnMouseMove,\n onTouchStart: thumb1OnTouchStart,\n onTouchMove: thumb1OnTouchMove,\n dragPercentage: thumb1DragPercentage,\n draggableRef: thumb1DraggableRef,\n } = useDraggable({\n ref: thumb1Ref,\n min,\n max: thumb1Max,\n rangeMax: max,\n step,\n value: thumb1Value,\n setValue: setThumb1Value,\n dragging: thumb1Dragging,\n setDragging: setThumb1Dragging,\n disabled,\n vertical,\n withinOffsetParent: true,\n disableDraggingCursorClassName: true,\n onKeyDown(event) {\n switch (event.key) {\n case \"PageUp\":\n event.preventDefault();\n event.stopPropagation();\n setThumb1Value((prevValue) =>\n withinRange({\n min,\n max: thumb1Max,\n value: prevValue + jump,\n })\n );\n break;\n case \"PageDown\":\n event.preventDefault();\n event.stopPropagation();\n setThumb1Value((prevValue) =>\n withinRange({\n min,\n max: thumb1Max,\n value: prevValue - jump,\n })\n );\n break;\n }\n },\n });\n\n const [thumb2Dragging, setThumb2Dragging] = useState(false);\n const {\n onKeyDown: thumb2OnKeyDown,\n onMouseUp: thumb2OnMouseUp,\n onMouseDown: thumb2OnMouseDown,\n onMouseMove: thumb2OnMouseMove,\n onTouchStart: thumb2OnTouchStart,\n onTouchMove: thumb2OnTouchMove,\n dragPercentage: thumb2DragPercentage,\n draggableRef: thumb2DraggableRef,\n } = useDraggable({\n ref: thumb2Ref,\n min: thumb2Min,\n max,\n rangeMin: min,\n step,\n value: thumb2Value,\n setValue: setThumb2Value,\n dragging: thumb2Dragging,\n setDragging: setThumb2Dragging,\n vertical,\n disabled,\n withinOffsetParent: true,\n disableDraggingCursorClassName: true,\n onKeyDown(event) {\n switch (event.key) {\n case \"PageUp\":\n event.preventDefault();\n event.stopPropagation();\n setThumb2Value((prevValue) =>\n withinRange({\n min: thumb2Min,\n max,\n value: prevValue + jump,\n })\n );\n break;\n case \"PageDown\":\n event.preventDefault();\n event.stopPropagation();\n setThumb2Value((prevValue) =>\n withinRange({\n min: thumb2Min,\n max,\n value: prevValue - jump,\n })\n );\n break;\n }\n },\n });\n\n const dragging = thumb1Dragging || thumb2Dragging;\n const sharedThumbProps = {\n step,\n animate: !dragging,\n discrete,\n disabled,\n vertical,\n getValueText,\n tooltipProps,\n getTooltipProps,\n getTooltipChildren,\n tooltipVisibility,\n disableSmoothDragging,\n } as const satisfies Partial<SliderThumbProps>;\n\n return (\n <SliderContainer {...remaining} ref={containerRef} vertical={vertical}>\n <SliderTrack\n {...trackProps}\n min={min}\n max={max}\n thumb1Ref={thumb1Ref}\n thumb1Value={thumb1Value}\n thumb1Dragging={!disableSmoothDragging && thumb1Dragging}\n thumb1DragPercentage={thumb1DragPercentage}\n thumb1OnMouseUp={thumb1OnMouseUp}\n thumb1OnMouseDown={thumb1OnMouseDown}\n thumb1OnMouseMove={thumb1OnMouseMove}\n thumb1OnTouchStart={thumb1OnTouchStart}\n thumb1OnTouchMove={thumb1OnTouchMove}\n thumb2Ref={thumb2Ref}\n thumb2Value={thumb2Value}\n thumb2Dragging={!disableSmoothDragging && thumb2Dragging}\n thumb2DragPercentage={thumb2DragPercentage}\n thumb2OnMouseUp={thumb2OnMouseUp}\n thumb2OnMouseDown={thumb2OnMouseDown}\n thumb2OnMouseMove={thumb2OnMouseMove}\n thumb2OnTouchStart={thumb2OnTouchStart}\n thumb2OnTouchMove={thumb2OnTouchMove}\n animate={!disableSmoothDragging && !dragging}\n disabled={disabled}\n vertical={vertical}\n isRangeSlider={isRangeSlider}\n >\n <SliderThumb\n aria-label={thumb1Label as string}\n aria-labelledby={thumb1LabelledBy}\n id={thumb1Id}\n {...thumbProps}\n {...minThumbProps}\n {...sharedThumbProps}\n ref={thumb1DraggableRef}\n min={min}\n max={thumb1Max}\n value={thumb1Value}\n index={1}\n active={thumb1Dragging}\n onChange={(event) =>\n setThumb1Value(event.currentTarget.valueAsNumber)\n }\n onKeyDown={thumb1OnKeyDown}\n />\n {isRangeSlider && (\n <SliderThumb\n aria-label={thumb2Label as string}\n aria-labelledby={thumb2LabelledBy}\n id={thumb2Id}\n {...maxThumbProps}\n {...sharedThumbProps}\n ref={thumb2DraggableRef}\n min={thumb2Min}\n max={max}\n value={thumb2Value}\n index={2}\n active={thumb2Dragging}\n onChange={(event) =>\n setThumb2Value(event.currentTarget.valueAsNumber)\n }\n onKeyDown={thumb2OnKeyDown}\n />\n )}\n {marks && (\n <SliderValueMarks\n min={min}\n max={max}\n step={step}\n marks={marks}\n vertical={vertical}\n thumb1Value={thumb1Value}\n thumb2Value={thumb2Value}\n isRangeSlider={isRangeSlider}\n getMarkProps={getMarkProps}\n getMarkLabelProps={getMarkLabelProps}\n />\n )}\n {children}\n </SliderTrack>\n </SliderContainer>\n );\n}\n"],"names":["useRef","useState","useDraggable","useEnsuredId","identity","withinRange","SliderContainer","SliderThumb","SliderTrack","SliderValueMarks","getJumpValue","emptyString","noop","Slider","props","ariaLabel","ariaLabelledBy","id","propId","min","max","step","jump","propJump","vertical","discrete","disabled","getValueText","children","marks","value","setValue","rangeValue","setRangeValue","trackProps","thumbProps","minThumbProps","minThumbLabel","minThumbLabelledBy","maxThumbProps","maxThumbLabel","maxThumbLabelledBy","tooltipProps","containerRef","getMarkProps","getMarkLabelProps","tooltipVisibility","getTooltipProps","getTooltipChildren","disableSmoothDragging","remaining","isRangeSlider","thumb1Id","thumb2Id","thumb1Ref","thumb2Ref","thumb1Max","thumb2Min","thumb1Label","thumb1LabelledBy","thumb2Label","thumb2LabelledBy","thumb1Value","thumb2Value","setThumb1Value","setThumb2Value","undefined","valueOrSetter","prevRangeValue","thumb1Dragging","setThumb1Dragging","onKeyDown","thumb1OnKeyDown","onMouseUp","thumb1OnMouseUp","onMouseDown","thumb1OnMouseDown","onMouseMove","thumb1OnMouseMove","onTouchStart","thumb1OnTouchStart","onTouchMove","thumb1OnTouchMove","dragPercentage","thumb1DragPercentage","draggableRef","thumb1DraggableRef","ref","rangeMax","dragging","setDragging","withinOffsetParent","disableDraggingCursorClassName","event","key","preventDefault","stopPropagation","prevValue","thumb2Dragging","setThumb2Dragging","thumb2OnKeyDown","thumb2OnMouseUp","thumb2OnMouseDown","thumb2OnMouseMove","thumb2OnTouchStart","thumb2OnTouchMove","thumb2DragPercentage","thumb2DraggableRef","rangeMin","sharedThumbProps","animate","aria-label","aria-labelledby","index","active","onChange","currentTarget","valueAsNumber"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;AACA,SACEA,MAAM,EACNC,QAAQ,QAKH,QAAQ;AACf,SAASC,YAAY,QAAQ,+BAA+B;AAO5D,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,QAAQ,QAAQ,uBAAuB;AAChD,SAASC,WAAW,QAAQ,0BAA0B;AACtD,SAASC,eAAe,QAA+B,uBAAuB;AAC9E,SACEC,WAAW,QAGN,mBAAmB;AAC1B,SAASC,WAAW,QAAQ,mBAAmB;AAC/C,SACEC,gBAAgB,QAEX,wBAAwB;AAC/B,SAASC,YAAY,QAAQ,mBAAmB;AAqBhD,MAAMC,cAAc,IAAc;AAClC,MAAMC,OAAO;AACX,aAAa;AACf;AAoRA,OAAO,SAASC,OACdC,KAA2D;IAE3D,MAA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ources":["../../src/form/Slider.tsx"],"sourcesContent":["\"use client\";\nimport {\n useRef,\n useState,\n type HTMLAttributes,\n type ReactElement,\n type ReactNode,\n type Ref,\n} from \"react\";\nimport { useDraggable } from \"../draggable/useDraggable.js\";\nimport { type TooltipProps } from \"../tooltip/Tooltip.js\";\nimport {\n type LabelRequiredForA11y,\n type PropsWithRef,\n type UseStateSetter,\n} from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { identity } from \"../utils/identity.js\";\nimport { withinRange } from \"../utils/withinRange.js\";\nimport { SliderContainer, type SliderAddonProps } from \"./SliderContainer.js\";\nimport {\n SliderThumb,\n type SliderThumbPresentation,\n type SliderThumbProps,\n} from \"./SliderThumb.js\";\nimport { SliderTrack } from \"./SliderTrack.js\";\nimport {\n SliderValueMarks,\n type SliderMarksOptions,\n} from \"./SliderValueMarks.js\";\nimport { getJumpValue } from \"./sliderUtils.js\";\nimport { type RangeSliderState } from \"./useRangeSlider.js\";\nimport { type SliderState, type SliderValueOptions } from \"./useSlider.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-slider-color\"?: string;\n \"--rmd-slider-active-color\"?: string;\n \"--rmd-slider-inactive-color\"?: string;\n \"--rmd-slider-size\"?: string | number;\n \"--rmd-slider-active-size\"?: string | number;\n \"--rmd-slider-inactive-size\"?: string | number;\n \"--rmd-slider-vertical-size\"?: string | number;\n \"--rmd-slider-offset-1\"?: string;\n \"--rmd-slider-offset-2\"?: string;\n \"--rmd-slider-tooltip-scale\"?: string | number;\n \"--rmd-slider-tooltip-translate\"?: string | number;\n \"--rmd-slider-mark-offset\"?: string;\n }\n}\n\nconst emptyString = (): string => \"\";\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * @since 2.5.0\n */\nexport interface BaseSliderProps\n extends HTMLAttributes<HTMLDivElement>,\n SliderThumbPresentation,\n SliderValueOptions,\n SliderAddonProps,\n SliderMarksOptions {\n /**\n * This can be used to apply a ref to the container element since this\n * component does not use `forwardRef`.\n */\n containerRef?: Ref<HTMLDivElement>;\n\n /**\n * The amount to jump the slider's value when the `PageUp` or `PageDown`\n * key is pressed.\n *\n * The default value is 1/10th of the range.\n *\n * @defaultValue `(numberOfSteps / 10) * step`\n */\n jump?: number;\n\n /** @defaultValue `false` */\n disabled?: boolean;\n\n /** @defaultValue `false` */\n vertical?: boolean;\n\n /**\n * This can be used to apply custom styles or a `ref` to the track element if\n * needed.\n */\n trackProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;\n\n /**\n * This can be used to configure any additional tooltip props like the\n * CSS transition `classNames`, styles, etc.\n *\n * This will only be used when {@link discrete} is `true`.\n *\n * Note: The `position` will always be `\"above\"` for horizontal sliders and\n * `\"left\"` for vertical sliders.\n */\n tooltipProps?: Omit<Partial<TooltipProps>, \"position\">;\n}\n\n/**\n * @since 2.5.0\n * @since 6.0.0 Only requires `value` and `setValue` props instead of all the\n * slider controls.\n * @since 6.0.0 The `thumbLabel` and `thumbLabelledBy` props were removed. Use\n * the `aria-label` or `aria-labelledby` props instead.\n */\nexport interface SliderProps extends BaseSliderProps, SliderState {\n /**\n * Any additional props that should be provided to the thumb element. This can\n * be useful for applying additional styling.\n */\n thumbProps?: HTMLAttributes<HTMLSpanElement>;\n\n /**\n * This can be used to update the discrete slider's tooltip props.\n *\n * @example Custom Styles\n * ```tsx\n * <Slider\n * {...slider}\n * discrete\n * getTooltipProps={(value) => ({\n * className: cssUtils({\n * backgroundColor: value < 30 ? \"warning\" : undefined,\n * }),\n * })}\n * />\n * ```\n */\n getTooltipProps?(value: number): Partial<TooltipProps>;\n\n /**\n * This can be used to update the discrete slider's value tooltip.\n *\n * @example More Value Information\n * ```tsx\n * <Slider\n * {...slider}\n * discrete\n * getTooltipChildren={(value) => (\n * <TextIconSpacing icon={<FavoriteIcon />}>\n * {value}\n * </TextIconSpacing>\n * )}\n * />\n * ```\n *\n * This will only be used when {@link discrete} is `true`.\n *\n * @defaultValue `(value) => value`\n */\n getTooltipChildren?(value: number): ReactNode;\n}\n\n/**\n * @since 2.5.0\n * @since 6.0.0 Only requires `rangeValue` and `setRangeValue` props instead of\n * all the slider controls.\n * @since 6.0.0 The `thumb1Label`, `thumb1LabelledBy`, `thumb1Props`,\n * `thumb2Label`, `thumb2LabelledBy` and `thumb2Props` were renamed to\n * `minThumbLabel`, `minThumbLabelledBy`, `minThumbProps`, `maxThumbLabel`,\n * `maxThumbLabelledBy`, and `maxThumbProps` respectively.\n */\nexport interface RangeSliderProps extends BaseSliderProps, RangeSliderState {\n /**\n * Any additional props that should be provided to the min value thumb\n * element. This can be useful for applying additional styling.\n */\n minThumbProps?: HTMLAttributes<HTMLSpanElement>;\n\n /**\n * Any additional props that should be provided to the max value thumb\n * element. This can be useful for applying additional styling.\n */\n maxThumbProps?: HTMLAttributes<HTMLSpanElement>;\n\n /**\n * The `aria-label` to apply to the min value.\n *\n * Note: Either this prop or the {@link minThumbLabelledBy} are required for\n * accessibility.\n *\n * @defaultValue `\"Min\"`\n */\n minThumbLabel?: string;\n\n /**\n * Set this to an element's id that labels the min value.\n *\n * Note: Either this prop or the {@link minThumbLabel} are required for\n * accessibility.\n */\n minThumbLabelledBy?: string;\n\n /**\n * The `aria-label` to apply to the max value.\n *\n * Note: Either this prop or the {@link maxThumbLabelledBy} are required for\n * accessibility.\n *\n * @defaultValue `\"Max\"`\n */\n maxThumbLabel?: string;\n\n /**\n * Set this to an element's id that labels the max value.\n *\n * Note: Either this prop or the {@link maxThumbLabel} are required for\n * accessibility.\n */\n maxThumbLabelledBy?: string;\n\n /**\n * This can be used to update the discrete slider's tooltip props.\n *\n * @example Custom Styles\n * ```tsx\n * <Slider\n * {...slider}\n * discrete\n * getTooltipProps={(value, isFirstThumb) => ({\n * className: cssUtils({\n * backgroundColor: value < 30 && isFirstThumb ? \"warning\" : undefined,\n * }),\n * })}\n * />\n * ```\n */\n getTooltipProps?(value: number, isFirstThumb: boolean): Partial<TooltipProps>;\n\n /**\n * This can be used to update the discrete slider's value tooltip.\n *\n * @example More Value Information\n * ```tsx\n * <Slider\n * {...rangeSlider}\n * discrete\n * getTooltipChildren={(value, isFirstThumb) => (\n * <TextIconSpacing\n * icon={isFirstThumb ? <FavoriteIcon /> : <CloseIcon /}\n * iconAfter={!isFirstValue}\n * >\n * {value}\n * </TextIconSpacing>\n * )}\n * />\n * ```\n *\n * This will only be used when {@link discrete} is `true`.\n *\n * @defaultValue `(value) => value`\n */\n getTooltipChildren?(value: number, isFirstThumb: boolean): ReactNode;\n}\n\n/**\n * **Client Component**\n *\n * @example Simple Example\n * ```tsx\n * import { Form, Slider, useSlider } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * const slider = useSlider({\n * // these are the defaults and can be changed\n * min: 0,\n * max: 100,\n * step: 1,\n * defaultValue: 50,\n * });\n *\n * // if you need access to the current value or manually change the value\n * // yourself.\n * const { value, setValue } = slider;\n *\n * return (\n * <Form>\n * <Slider {...slider} aria-label=\"Volume\" />\n * </Form>\n * );\n * }\n * ```\n *\n * @example Range Slider Example\n * ```tsx\n * import { Fieldset, Form, Legend, Slider, useRangeSlider } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n * import { useId } from \"react\";\n *\n * function Example(): ReactElement {\n * const slider = useRangeSlider({\n * // these are the defaults and can be changed\n * min: 0,\n * max: 100,\n * step: 1,\n * defaultValue: [0, 100],\n * });\n *\n * // if you need access to the current value or manually change the value\n * // yourself.\n * const { rangeValue, setRangeValue } = slider;\n * const [minPrice, maxPrice] = rangeValue;\n *\n * return (\n * <Form>\n * <Fieldset>\n * <Legend>Price Range</Legend>\n * <Slider {...slider} />\n * </Fieldset>\n * </Form>\n * );\n * }\n * ```\n *\n * @since 2.5.0\n * @since 6.0.0 The `Slider` and `RangeSlider` have been combined into the\n * single `Slider` component and removed the `label` support.\n * @since 6.0.0 Each thumb includes an invisible `<input type=\"range\">` instead\n * of an `<input type=\"hidden\">`.\n */\nexport function Slider(props: LabelRequiredForA11y<SliderProps>): ReactElement;\nexport function Slider(props: RangeSliderProps): ReactElement;\nexport function Slider(\n props: LabelRequiredForA11y<SliderProps> | RangeSliderProps\n): ReactElement {\n const {\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n id: propId,\n min = 0,\n max = 100,\n step = 1,\n jump: propJump,\n vertical = false,\n discrete = false,\n disabled = false,\n getValueText = emptyString,\n children,\n marks = false,\n value,\n setValue,\n rangeValue,\n setRangeValue,\n trackProps,\n thumbProps,\n minThumbProps,\n minThumbLabel,\n minThumbLabelledBy,\n maxThumbProps,\n maxThumbLabel,\n maxThumbLabelledBy,\n tooltipProps,\n containerRef,\n getMarkProps = noop,\n getMarkLabelProps = noop,\n tooltipVisibility = \"auto\",\n getTooltipProps = noop,\n getTooltipChildren = identity,\n disableSmoothDragging = !!marks,\n ...remaining\n } = props as SliderProps & RangeSliderProps;\n\n const jump = getJumpValue({ min, max, step, jump: propJump });\n const isRangeSlider = typeof value !== \"number\";\n\n const thumb1Id = useEnsuredId(propId, \"slider\");\n const thumb2Id = `${thumb1Id}-2`;\n const thumb1Ref = useRef<HTMLSpanElement>(null);\n const thumb2Ref = useRef<HTMLSpanElement>(null);\n\n let thumb1Max = max;\n let thumb2Min = min;\n let thumb1Label: string | undefined;\n let thumb1LabelledBy: string | undefined;\n let thumb2Label: string | undefined;\n let thumb2LabelledBy: string | undefined;\n let thumb1Value: number;\n let thumb2Value: number;\n let setThumb1Value: UseStateSetter<number>;\n let setThumb2Value: UseStateSetter<number>;\n if (!isRangeSlider) {\n thumb1Value = value;\n setThumb1Value = setValue;\n thumb2Value = max;\n setThumb2Value = noop;\n thumb1Label = ariaLabel;\n thumb1LabelledBy = ariaLabelledBy;\n } else {\n thumb1LabelledBy = minThumbLabelledBy;\n thumb1Label = minThumbLabel || (minThumbLabelledBy ? undefined : \"Min\");\n thumb2LabelledBy = maxThumbLabelledBy;\n thumb2Label = maxThumbLabel || (maxThumbLabelledBy ? undefined : \"max\");\n\n [thumb1Value, thumb2Value] = rangeValue;\n\n thumb1Max = thumb2Value - step;\n thumb2Min = thumb1Value + step;\n\n setThumb1Value = (valueOrSetter) => {\n setRangeValue((prevRangeValue) => {\n const value =\n typeof valueOrSetter === \"number\"\n ? valueOrSetter\n : valueOrSetter(prevRangeValue[0]);\n\n return [value, prevRangeValue[1]];\n });\n };\n setThumb2Value = (valueOrSetter) => {\n setRangeValue((prevRangeValue) => {\n const value =\n typeof valueOrSetter === \"number\"\n ? valueOrSetter\n : valueOrSetter(prevRangeValue[1]);\n\n return [prevRangeValue[0], value];\n });\n };\n }\n\n const [thumb1Dragging, setThumb1Dragging] = useState(false);\n const {\n onKeyDown: thumb1OnKeyDown,\n onMouseUp: thumb1OnMouseUp,\n onMouseDown: thumb1OnMouseDown,\n onMouseMove: thumb1OnMouseMove,\n onTouchStart: thumb1OnTouchStart,\n onTouchMove: thumb1OnTouchMove,\n dragPercentage: thumb1DragPercentage,\n draggableRef: thumb1DraggableRef,\n } = useDraggable({\n ref: thumb1Ref,\n min,\n max: thumb1Max,\n rangeMax: max,\n step,\n value: thumb1Value,\n setValue: setThumb1Value,\n dragging: thumb1Dragging,\n setDragging: setThumb1Dragging,\n disabled,\n vertical,\n withinOffsetParent: true,\n disableDraggingCursorClassName: true,\n onKeyDown(event) {\n switch (event.key) {\n case \"PageUp\":\n event.preventDefault();\n event.stopPropagation();\n setThumb1Value((prevValue) =>\n withinRange({\n min,\n max: thumb1Max,\n value: prevValue + jump,\n })\n );\n break;\n case \"PageDown\":\n event.preventDefault();\n event.stopPropagation();\n setThumb1Value((prevValue) =>\n withinRange({\n min,\n max: thumb1Max,\n value: prevValue - jump,\n })\n );\n break;\n }\n },\n });\n\n const [thumb2Dragging, setThumb2Dragging] = useState(false);\n const {\n onKeyDown: thumb2OnKeyDown,\n onMouseUp: thumb2OnMouseUp,\n onMouseDown: thumb2OnMouseDown,\n onMouseMove: thumb2OnMouseMove,\n onTouchStart: thumb2OnTouchStart,\n onTouchMove: thumb2OnTouchMove,\n dragPercentage: thumb2DragPercentage,\n draggableRef: thumb2DraggableRef,\n } = useDraggable({\n ref: thumb2Ref,\n min: thumb2Min,\n max,\n rangeMin: min,\n step,\n value: thumb2Value,\n setValue: setThumb2Value,\n dragging: thumb2Dragging,\n setDragging: setThumb2Dragging,\n vertical,\n disabled,\n withinOffsetParent: true,\n disableDraggingCursorClassName: true,\n onKeyDown(event) {\n switch (event.key) {\n case \"PageUp\":\n event.preventDefault();\n event.stopPropagation();\n setThumb2Value((prevValue) =>\n withinRange({\n min: thumb2Min,\n max,\n value: prevValue + jump,\n })\n );\n break;\n case \"PageDown\":\n event.preventDefault();\n event.stopPropagation();\n setThumb2Value((prevValue) =>\n withinRange({\n min: thumb2Min,\n max,\n value: prevValue - jump,\n })\n );\n break;\n }\n },\n });\n\n const dragging = thumb1Dragging || thumb2Dragging;\n const sharedThumbProps = {\n step,\n animate: !dragging,\n discrete,\n disabled,\n vertical,\n getValueText,\n tooltipProps,\n getTooltipProps,\n getTooltipChildren,\n tooltipVisibility,\n disableSmoothDragging,\n } as const satisfies Partial<SliderThumbProps>;\n\n return (\n <SliderContainer {...remaining} ref={containerRef} vertical={vertical}>\n <SliderTrack\n {...trackProps}\n min={min}\n max={max}\n thumb1Ref={thumb1Ref}\n thumb1Value={thumb1Value}\n thumb1Dragging={!disableSmoothDragging && thumb1Dragging}\n thumb1DragPercentage={thumb1DragPercentage}\n thumb1OnMouseUp={thumb1OnMouseUp}\n thumb1OnMouseDown={thumb1OnMouseDown}\n thumb1OnMouseMove={thumb1OnMouseMove}\n thumb1OnTouchStart={thumb1OnTouchStart}\n thumb1OnTouchMove={thumb1OnTouchMove}\n thumb2Ref={thumb2Ref}\n thumb2Value={thumb2Value}\n thumb2Dragging={!disableSmoothDragging && thumb2Dragging}\n thumb2DragPercentage={thumb2DragPercentage}\n thumb2OnMouseUp={thumb2OnMouseUp}\n thumb2OnMouseDown={thumb2OnMouseDown}\n thumb2OnMouseMove={thumb2OnMouseMove}\n thumb2OnTouchStart={thumb2OnTouchStart}\n thumb2OnTouchMove={thumb2OnTouchMove}\n animate={!disableSmoothDragging && !dragging}\n disabled={disabled}\n vertical={vertical}\n isRangeSlider={isRangeSlider}\n >\n <SliderThumb\n aria-label={thumb1Label as string}\n aria-labelledby={thumb1LabelledBy}\n id={thumb1Id}\n {...thumbProps}\n {...minThumbProps}\n {...sharedThumbProps}\n ref={thumb1DraggableRef}\n min={min}\n max={thumb1Max}\n value={thumb1Value}\n index={1}\n active={thumb1Dragging}\n onChange={(event) =>\n setThumb1Value(event.currentTarget.valueAsNumber)\n }\n onKeyDown={thumb1OnKeyDown}\n />\n {isRangeSlider && (\n <SliderThumb\n aria-label={thumb2Label as string}\n aria-labelledby={thumb2LabelledBy}\n id={thumb2Id}\n {...maxThumbProps}\n {...sharedThumbProps}\n ref={thumb2DraggableRef}\n min={thumb2Min}\n max={max}\n value={thumb2Value}\n index={2}\n active={thumb2Dragging}\n onChange={(event) =>\n setThumb2Value(event.currentTarget.valueAsNumber)\n }\n onKeyDown={thumb2OnKeyDown}\n />\n )}\n {marks && (\n <SliderValueMarks\n min={min}\n max={max}\n step={step}\n marks={marks}\n vertical={vertical}\n thumb1Value={thumb1Value}\n thumb2Value={thumb2Value}\n isRangeSlider={isRangeSlider}\n getMarkProps={getMarkProps}\n getMarkLabelProps={getMarkLabelProps}\n />\n )}\n {children}\n </SliderTrack>\n </SliderContainer>\n );\n}\n"],"names":["useRef","useState","useDraggable","useEnsuredId","identity","withinRange","SliderContainer","SliderThumb","SliderTrack","SliderValueMarks","getJumpValue","emptyString","noop","Slider","props","ariaLabel","ariaLabelledBy","id","propId","min","max","step","jump","propJump","vertical","discrete","disabled","getValueText","children","marks","value","setValue","rangeValue","setRangeValue","trackProps","thumbProps","minThumbProps","minThumbLabel","minThumbLabelledBy","maxThumbProps","maxThumbLabel","maxThumbLabelledBy","tooltipProps","containerRef","getMarkProps","getMarkLabelProps","tooltipVisibility","getTooltipProps","getTooltipChildren","disableSmoothDragging","remaining","isRangeSlider","thumb1Id","thumb2Id","thumb1Ref","thumb2Ref","thumb1Max","thumb2Min","thumb1Label","thumb1LabelledBy","thumb2Label","thumb2LabelledBy","thumb1Value","thumb2Value","setThumb1Value","setThumb2Value","undefined","valueOrSetter","prevRangeValue","thumb1Dragging","setThumb1Dragging","onKeyDown","thumb1OnKeyDown","onMouseUp","thumb1OnMouseUp","onMouseDown","thumb1OnMouseDown","onMouseMove","thumb1OnMouseMove","onTouchStart","thumb1OnTouchStart","onTouchMove","thumb1OnTouchMove","dragPercentage","thumb1DragPercentage","draggableRef","thumb1DraggableRef","ref","rangeMax","dragging","setDragging","withinOffsetParent","disableDraggingCursorClassName","event","key","preventDefault","stopPropagation","prevValue","thumb2Dragging","setThumb2Dragging","thumb2OnKeyDown","thumb2OnMouseUp","thumb2OnMouseDown","thumb2OnMouseMove","thumb2OnTouchStart","thumb2OnTouchMove","thumb2DragPercentage","thumb2DraggableRef","rangeMin","sharedThumbProps","animate","aria-label","aria-labelledby","index","active","onChange","currentTarget","valueAsNumber"],"mappings":"AAAA;;AACA,SACEA,MAAM,EACNC,QAAQ,QAKH,QAAQ;AACf,SAASC,YAAY,QAAQ,+BAA+B;AAO5D,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,QAAQ,QAAQ,uBAAuB;AAChD,SAASC,WAAW,QAAQ,0BAA0B;AACtD,SAASC,eAAe,QAA+B,uBAAuB;AAC9E,SACEC,WAAW,QAGN,mBAAmB;AAC1B,SAASC,WAAW,QAAQ,mBAAmB;AAC/C,SACEC,gBAAgB,QAEX,wBAAwB;AAC/B,SAASC,YAAY,QAAQ,mBAAmB;AAqBhD,MAAMC,cAAc,IAAc;AAClC,MAAMC,OAAO;AACX,aAAa;AACf;AAoRA,OAAO,SAASC,OACdC,KAA2D;IAE3D,MAAM,EACJ,cAAcC,SAAS,EACvB,mBAAmBC,cAAc,EACjCC,IAAIC,MAAM,EACVC,MAAM,CAAC,EACPC,MAAM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