@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/expansion-panel/ExpansionPanel.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport { forwardRef, type CSSProperties, type ReactNode } from \"react\";\nimport { Card, type CardProps } from \"../card/Card.js\";\nimport { CardContent, type CardContentProps } from \"../card/CardContent.js\";\nimport { useCollapseTransition } from \"../transition/useCollapseTransition.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { bem } from \"../utils/bem.js\";\nimport {\n ExpansionPanelHeader,\n type ExpansionPanelHeaderProps,\n} from \"./ExpansionPanelHeader.js\";\n\nconst styles = bem(\"rmd-expansion-panel\");\n\n/** @since 6.0.0 */\nexport interface ExpansionPanelClassNameOptions {\n className?: string;\n\n /**\n * @defaultValue `false`\n */\n expanded?: boolean;\n\n /**\n * Set this to `true` to disable the `margin-top` transition between multiple\n * panels\n *\n * @defaultValue `false`\n */\n disableTransition?: boolean;\n}\n\n/**\n * @since 6.0.0\n */\nexport function expansionPanel(\n options: ExpansionPanelClassNameOptions = {}\n): string {\n const { className, expanded = false, disableTransition = false } = options;\n\n return cnb(styles({ expanded, animate: !disableTransition }), className);\n}\n\n/**\n * @since 6.0.0 Renamed some card props and updated for the latest\n * API.\n */\nexport interface ExpansionPanelProps extends CardProps {\n /**\n * Set this to `true` if the {@link children} should be visible. This should\n * generally be provided by the `useExpansionPanels` hook.\n */\n expanded: boolean;\n\n /**\n * A function that should toggle the {@link expanded} state. This should\n * generally be provided by the `useExpansionPanels` hook.\n */\n onExpandClick(): void;\n\n /**\n * Set this to `true` to prevent the panel from toggling the {@link expanded}\n * state. This should generally be provided by the `useExpansionPanels` hook.\n *\n * @defaultValue `false`\n */\n disabled?: boolean;\n\n /**\n * @defaultValue `true`\n * @see {@link CardProps.fullWidth}\n */\n fullWidth?: boolean;\n\n /**\n * This can be used to implement a custom header implementation, but it\n * probably shouldn't be needed.\n *\n * @since 6.0.0 This was renamed from `customHeader`\n * @see {@link headerProps}\n */\n header?: ReactNode;\n\n /**\n * This can be used to apply additional props to the header element.\n *\n * Note: You can override the `style` and `className` using\n * {@link headerStyle} and {@link headerClassName} instead for convenience.\n *\n * @example\n * ```tsx\n * <ExpansionPanel\n * {...props}\n * headerProps={{\n * style: {\n * // custom inline style\n * },\n * className: \"come-class-name\",\n * icon: <MyCustomIcon />,\n * iconRotatorProps: {\n * className: \"another-custom-class-name\",\n * },\n * }}\n * />\n * ```\n */\n headerProps?: Omit<\n ExpansionPanelHeaderProps,\n \"id\" | \"aria-disabled\" | \"onClick\" | \"expanded\"\n >;\n\n /**\n * Convenience prop to apply custom style to the `ExpansionPanelHeader`\n * component.\n */\n headerStyle?: CSSProperties;\n\n /**\n * Convenience prop to apply custom class name to the `ExpansionPanelHeader`\n * component.\n */\n headerClassName?: string;\n\n /**\n * Content to display within the header of the expansion panel that toggles\n * the expanded state. This should generally contain some accessible text\n * describing the expansion panel's content.\n *\n * @since 6.0.0 This was renamed from `header`\n */\n headerChildren?: ReactNode;\n\n /**\n * This can be used to apply additional props to the `CardContent` component\n * if needed.\n *\n * Note: The `disableLastChildPadding` defaults to `true` in this\n * implementation.\n *\n * @example\n * ```tsx\n * contentProps={{\n * style: {},\n * className: \"some-class-name\",\n * disablePadding: true,\n * disableSecondaryColor: true,\n * disableLastChildPadding: false,\n * // whatever else\n * }}\n * ```\n *\n * @see {@link contentStyle}\n * @see {@link contentClassName}\n * @see {@link disableContentPadding}\n */\n contentProps?: PropsWithRef<Omit<CardContentProps, \"role\">, HTMLDivElement>;\n\n /**\n * Convenience prop to apply custom style to the `CardContent` component.\n */\n contentStyle?: CSSProperties;\n\n /**\n * Convenience prop to apply custom class name to the `CardContent` component.\n */\n contentClassName?: string;\n\n /**\n * Set to `true` to disable the collapse transition for the card content\n * whenever the {@link expanded} state changes.\n *\n * @defaultValue `false`\n */\n disableTransition?: boolean;\n\n /**\n * @defaultValue `false`\n * @see {@link CardContentProps.disablePadding}\n */\n disableContentPadding?: boolean;\n\n /**\n * Set this to `true` to unmount the {@link children} when the\n * {@link expanded} state is `false`.\n *\n * @defaultValue `false`\n * @since 6.0.0 Renamed from `persistent` to match the\n * `useCollapseTransition` naming convention.\n */\n temporary?: boolean;\n}\n\n/**\n * **Client Component**\n *\n * @see `useExpansionPanels` for examples.\n * @since 6.0.0 The content will be persistent and invisible using `display: none`\n * instead of unmounting and also animate the `margin-top` style.\n */\nexport const ExpansionPanel = forwardRef<\n HTMLHeadingElement,\n ExpansionPanelProps\n>(function ExpansionPanel(props, ref) {\n const {\n id: propId,\n className,\n contentProps,\n contentStyle,\n contentClassName,\n header: propHeader,\n headerProps,\n headerStyle,\n headerClassName,\n headerChildren,\n children,\n expanded,\n onExpandClick,\n disabled = false,\n fullWidth = true,\n temporary = false,\n disableTransition = false,\n disableContentPadding = false,\n ...remaining\n } = props;\n\n const id = useEnsuredId(propId, \"expansion-panel\");\n const { elementProps, rendered } = useCollapseTransition({\n nodeRef: contentProps?.ref,\n style: contentStyle,\n className: contentClassName,\n timeout: disableTransition ? 0 : undefined,\n temporary,\n transitionIn: expanded,\n });\n\n let header = propHeader;\n if (typeof header === \"undefined\") {\n header = (\n <ExpansionPanelHeader\n style={headerStyle}\n className={headerClassName}\n disableTransition={disableTransition}\n {...headerProps}\n aria-disabled={disabled || undefined}\n id={id}\n onClick={onExpandClick}\n expanded={expanded}\n >\n {headerChildren}\n </ExpansionPanelHeader>\n );\n }\n\n return (\n <Card\n {...remaining}\n id={`${id}-container`}\n ref={ref}\n fullWidth={fullWidth}\n className={expansionPanel({\n expanded,\n disableTransition,\n className,\n })}\n >\n {header}\n {rendered && (\n <CardContent\n id={`${id}-content`}\n aria-labelledby={id}\n disablePadding={disableContentPadding}\n disableSecondaryColor\n disableLastChildPadding\n {...contentProps}\n {...elementProps}\n role=\"region\"\n >\n {children}\n </CardContent>\n )}\n </Card>\n );\n});\n"],"names":["cnb","forwardRef","Card","CardContent","useCollapseTransition","useEnsuredId","bem","ExpansionPanelHeader","styles","expansionPanel","options","className","expanded","disableTransition","animate","ExpansionPanel","props","ref","id","propId","contentProps","contentStyle","contentClassName","header","propHeader","headerProps","headerStyle","headerClassName","headerChildren","children","onExpandClick","disabled","fullWidth","temporary","disableContentPadding","remaining","elementProps","rendered","nodeRef","style","timeout","undefined","transitionIn","aria-disabled","onClick","aria-labelledby","disablePadding","disableSecondaryColor","disableLastChildPadding","role"],"
|
|
1
|
+
{"version":3,"sources":["../../src/expansion-panel/ExpansionPanel.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport { forwardRef, type CSSProperties, type ReactNode } from \"react\";\nimport { Card, type CardProps } from \"../card/Card.js\";\nimport { CardContent, type CardContentProps } from \"../card/CardContent.js\";\nimport { useCollapseTransition } from \"../transition/useCollapseTransition.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { bem } from \"../utils/bem.js\";\nimport {\n ExpansionPanelHeader,\n type ExpansionPanelHeaderProps,\n} from \"./ExpansionPanelHeader.js\";\n\nconst styles = bem(\"rmd-expansion-panel\");\n\n/** @since 6.0.0 */\nexport interface ExpansionPanelClassNameOptions {\n className?: string;\n\n /**\n * @defaultValue `false`\n */\n expanded?: boolean;\n\n /**\n * Set this to `true` to disable the `margin-top` transition between multiple\n * panels\n *\n * @defaultValue `false`\n */\n disableTransition?: boolean;\n}\n\n/**\n * @since 6.0.0\n */\nexport function expansionPanel(\n options: ExpansionPanelClassNameOptions = {}\n): string {\n const { className, expanded = false, disableTransition = false } = options;\n\n return cnb(styles({ expanded, animate: !disableTransition }), className);\n}\n\n/**\n * @since 6.0.0 Renamed some card props and updated for the latest\n * API.\n */\nexport interface ExpansionPanelProps extends CardProps {\n /**\n * Set this to `true` if the {@link children} should be visible. This should\n * generally be provided by the `useExpansionPanels` hook.\n */\n expanded: boolean;\n\n /**\n * A function that should toggle the {@link expanded} state. This should\n * generally be provided by the `useExpansionPanels` hook.\n */\n onExpandClick(): void;\n\n /**\n * Set this to `true` to prevent the panel from toggling the {@link expanded}\n * state. This should generally be provided by the `useExpansionPanels` hook.\n *\n * @defaultValue `false`\n */\n disabled?: boolean;\n\n /**\n * @defaultValue `true`\n * @see {@link CardProps.fullWidth}\n */\n fullWidth?: boolean;\n\n /**\n * This can be used to implement a custom header implementation, but it\n * probably shouldn't be needed.\n *\n * @since 6.0.0 This was renamed from `customHeader`\n * @see {@link headerProps}\n */\n header?: ReactNode;\n\n /**\n * This can be used to apply additional props to the header element.\n *\n * Note: You can override the `style` and `className` using\n * {@link headerStyle} and {@link headerClassName} instead for convenience.\n *\n * @example\n * ```tsx\n * <ExpansionPanel\n * {...props}\n * headerProps={{\n * style: {\n * // custom inline style\n * },\n * className: \"come-class-name\",\n * icon: <MyCustomIcon />,\n * iconRotatorProps: {\n * className: \"another-custom-class-name\",\n * },\n * }}\n * />\n * ```\n */\n headerProps?: Omit<\n ExpansionPanelHeaderProps,\n \"id\" | \"aria-disabled\" | \"onClick\" | \"expanded\"\n >;\n\n /**\n * Convenience prop to apply custom style to the `ExpansionPanelHeader`\n * component.\n */\n headerStyle?: CSSProperties;\n\n /**\n * Convenience prop to apply custom class name to the `ExpansionPanelHeader`\n * component.\n */\n headerClassName?: string;\n\n /**\n * Content to display within the header of the expansion panel that toggles\n * the expanded state. This should generally contain some accessible text\n * describing the expansion panel's content.\n *\n * @since 6.0.0 This was renamed from `header`\n */\n headerChildren?: ReactNode;\n\n /**\n * This can be used to apply additional props to the `CardContent` component\n * if needed.\n *\n * Note: The `disableLastChildPadding` defaults to `true` in this\n * implementation.\n *\n * @example\n * ```tsx\n * contentProps={{\n * style: {},\n * className: \"some-class-name\",\n * disablePadding: true,\n * disableSecondaryColor: true,\n * disableLastChildPadding: false,\n * // whatever else\n * }}\n * ```\n *\n * @see {@link contentStyle}\n * @see {@link contentClassName}\n * @see {@link disableContentPadding}\n */\n contentProps?: PropsWithRef<Omit<CardContentProps, \"role\">, HTMLDivElement>;\n\n /**\n * Convenience prop to apply custom style to the `CardContent` component.\n */\n contentStyle?: CSSProperties;\n\n /**\n * Convenience prop to apply custom class name to the `CardContent` component.\n */\n contentClassName?: string;\n\n /**\n * Set to `true` to disable the collapse transition for the card content\n * whenever the {@link expanded} state changes.\n *\n * @defaultValue `false`\n */\n disableTransition?: boolean;\n\n /**\n * @defaultValue `false`\n * @see {@link CardContentProps.disablePadding}\n */\n disableContentPadding?: boolean;\n\n /**\n * Set this to `true` to unmount the {@link children} when the\n * {@link expanded} state is `false`.\n *\n * @defaultValue `false`\n * @since 6.0.0 Renamed from `persistent` to match the\n * `useCollapseTransition` naming convention.\n */\n temporary?: boolean;\n}\n\n/**\n * **Client Component**\n *\n * @see `useExpansionPanels` for examples.\n * @since 6.0.0 The content will be persistent and invisible using `display: none`\n * instead of unmounting and also animate the `margin-top` style.\n */\nexport const ExpansionPanel = forwardRef<\n HTMLHeadingElement,\n ExpansionPanelProps\n>(function ExpansionPanel(props, ref) {\n const {\n id: propId,\n className,\n contentProps,\n contentStyle,\n contentClassName,\n header: propHeader,\n headerProps,\n headerStyle,\n headerClassName,\n headerChildren,\n children,\n expanded,\n onExpandClick,\n disabled = false,\n fullWidth = true,\n temporary = false,\n disableTransition = false,\n disableContentPadding = false,\n ...remaining\n } = props;\n\n const id = useEnsuredId(propId, \"expansion-panel\");\n const { elementProps, rendered } = useCollapseTransition({\n nodeRef: contentProps?.ref,\n style: contentStyle,\n className: contentClassName,\n timeout: disableTransition ? 0 : undefined,\n temporary,\n transitionIn: expanded,\n });\n\n let header = propHeader;\n if (typeof header === \"undefined\") {\n header = (\n <ExpansionPanelHeader\n style={headerStyle}\n className={headerClassName}\n disableTransition={disableTransition}\n {...headerProps}\n aria-disabled={disabled || undefined}\n id={id}\n onClick={onExpandClick}\n expanded={expanded}\n >\n {headerChildren}\n </ExpansionPanelHeader>\n );\n }\n\n return (\n <Card\n {...remaining}\n id={`${id}-container`}\n ref={ref}\n fullWidth={fullWidth}\n className={expansionPanel({\n expanded,\n disableTransition,\n className,\n })}\n >\n {header}\n {rendered && (\n <CardContent\n id={`${id}-content`}\n aria-labelledby={id}\n disablePadding={disableContentPadding}\n disableSecondaryColor\n disableLastChildPadding\n {...contentProps}\n {...elementProps}\n role=\"region\"\n >\n {children}\n </CardContent>\n )}\n </Card>\n );\n});\n"],"names":["cnb","forwardRef","Card","CardContent","useCollapseTransition","useEnsuredId","bem","ExpansionPanelHeader","styles","expansionPanel","options","className","expanded","disableTransition","animate","ExpansionPanel","props","ref","id","propId","contentProps","contentStyle","contentClassName","header","propHeader","headerProps","headerStyle","headerClassName","headerChildren","children","onExpandClick","disabled","fullWidth","temporary","disableContentPadding","remaining","elementProps","rendered","nodeRef","style","timeout","undefined","transitionIn","aria-disabled","onClick","aria-labelledby","disablePadding","disableSecondaryColor","disableLastChildPadding","role"],"mappings":"AAAA;;AACA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAA4C,QAAQ;AACvE,SAASC,IAAI,QAAwB,kBAAkB;AACvD,SAASC,WAAW,QAA+B,yBAAyB;AAC5E,SAASC,qBAAqB,QAAQ,yCAAyC;AAE/E,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,GAAG,QAAQ,kBAAkB;AACtC,SACEC,oBAAoB,QAEf,4BAA4B;AAEnC,MAAMC,SAASF,IAAI;AAoBnB;;CAEC,GACD,OAAO,SAASG,eACdC,UAA0C,CAAC,CAAC;IAE5C,MAAM,EAAEC,SAAS,EAAEC,WAAW,KAAK,EAAEC,oBAAoB,KAAK,EAAE,GAAGH;IAEnE,OAAOV,IAAIQ,OAAO;QAAEI;QAAUE,SAAS,CAACD;IAAkB,IAAIF;AAChE;AAuJA;;;;;;CAMC,GACD,OAAO,MAAMI,+BAAiBd,WAG5B,SAASc,eAAeC,KAAK,EAAEC,GAAG;IAClC,MAAM,EACJC,IAAIC,MAAM,EACVR,SAAS,EACTS,YAAY,EACZC,YAAY,EACZC,gBAAgB,EAChBC,QAAQC,UAAU,EAClBC,WAAW,EACXC,WAAW,EACXC,eAAe,EACfC,cAAc,EACdC,QAAQ,EACRjB,QAAQ,EACRkB,aAAa,EACbC,WAAW,KAAK,EAChBC,YAAY,IAAI,EAChBC,YAAY,KAAK,EACjBpB,oBAAoB,KAAK,EACzBqB,wBAAwB,KAAK,EAC7B,GAAGC,WACJ,GAAGnB;IAEJ,MAAME,KAAKb,aAAac,QAAQ;IAChC,MAAM,EAAEiB,YAAY,EAAEC,QAAQ,EAAE,GAAGjC,sBAAsB;QACvDkC,SAASlB,cAAcH;QACvBsB,OAAOlB;QACPV,WAAWW;QACXkB,SAAS3B,oBAAoB,IAAI4B;QACjCR;QACAS,cAAc9B;IAChB;IAEA,IAAIW,SAASC;IACb,IAAI,OAAOD,WAAW,aAAa;QACjCA,uBACE,KAAChB;YACCgC,OAAOb;YACPf,WAAWgB;YACXd,mBAAmBA;YAClB,GAAGY,WAAW;YACfkB,iBAAeZ,YAAYU;YAC3BvB,IAAIA;YACJ0B,SAASd;YACTlB,UAAUA;sBAETgB;;IAGP;IAEA,qBACE,MAAC1B;QACE,GAAGiC,SAAS;QACbjB,IAAI,CAAC,EAAEA,GAAG,UAAU,CAAC;QACrBD,KAAKA;QACLe,WAAWA;QACXrB,WAAWF,eAAe;YACxBG;YACAC;YACAF;QACF;;YAECY;YACAc,0BACC,KAAClC;gBACCe,IAAI,CAAC,EAAEA,GAAG,QAAQ,CAAC;gBACnB2B,mBAAiB3B;gBACjB4B,gBAAgBZ;gBAChBa,qBAAqB;gBACrBC,uBAAuB;gBACtB,GAAG5B,YAAY;gBACf,GAAGgB,YAAY;gBAChBa,MAAK;0BAEJpB;;;;AAKX,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/expansion-panel/ExpansionPanelHeader.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport {\n forwardRef,\n type ButtonHTMLAttributes,\n type MouseEventHandler,\n type ReactNode,\n} from \"react\";\nimport { ButtonUnstyled } from \"../button/ButtonUnstyled.js\";\nimport { IconRotator, type IconRotatorProps } from \"../icon/IconRotator.js\";\nimport { getIcon } from \"../icon/iconConfig.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { Typography, type TypographyProps } from \"../typography/Typography.js\";\nimport { type TypographyType } from \"../typography/typographyStyles.js\";\n\n/**\n * @since 6.0.0 Updated to include additional heading/Typography\n * props.\n */\nexport interface ExpansionPanelHeaderProps\n extends ButtonHTMLAttributes<HTMLButtonElement> {\n id: string;\n\n /**\n * This should be a function that toggles the expansion state for the parent\n * `ExpansionPanel`.\n */\n onClick: MouseEventHandler<HTMLButtonElement>;\n expanded: boolean;\n\n /**\n * @defaultValue `\"h3\"`\n */\n as?: \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n\n /**\n * @defaultValue `getIcon(\"expander\")`\n */\n icon?: ReactNode;\n\n /**\n * @defaultValue `\"subtitle-1\"`\n */\n headingType?: TypographyType;\n\n /**\n * Any additional props to provide to the heading element that wraps the\n * expansion panel button.\n */\n headingProps?: PropsWithRef<TypographyProps, HTMLHeadingElement>;\n iconRotatorProps?: Omit<IconRotatorProps, \"rotated\" | \"disableTransition\">;\n\n /**\n * Any children to display **before** the button in the heading element. This\n * should really only be used if you need to add additional clickable elements\n * within the header.\n */\n beforeChildren?: ReactNode;\n\n /**\n * Any children to display **after** the button in the heading element.This\n * should really only be used if you need to add additional clickable elements\n * within the header.\n *\n * @example\n * ```tsx\n * afterChildren={\n * <DropdownMenu buttonType=\"icon\" ButtonChildren={<MoreVertSVGIcon />}>\n * <MenuItem>Item 1</MenuItem>\n * <MenuItem>Item 2</MenuItem>\n * <MenuItem>Item 3</MenuItem>\n * </DropdownMenu>\n * }\n * ```\n */\n afterChildren?: ReactNode;\n\n /**\n * @defaultValue `false`\n */\n disableTransition?: boolean;\n}\n\n/**\n * **Server Component**\n * This is mostly an internal component, but can also be used to implement a\n * custom header implementation if needed. This might really be a client\n * component in practice since the `onClick` prop must be provided.\n *\n * @example Custom Header\n * ```tsx\n * import type { ExpansionPanelProps } from \"@react-md/core\";\n * import {\n * ExpansionPanel,\n * ExpansionPanelHeader,\n * } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n * const { useId } from \"react\";\n *\n * export type CustomExpansionPanelProps = ExpansionPanelProps & { id: string; };\n *\n * export function CustomExpansionPanel(props: CustomExpansionPanelProps): ReactElement {\n * const {\n * id,\n * disabled,\n * onExpandClick,\n * expanded,\n * disableTransition,\n * headerChildren,\n * } = props;\n *\n * return (\n * <ExpansionPanel\n * {...props}\n * header={(\n * <ExpansionPanelHeader\n * aria-disabled={disabled || undefined}\n * id={id}\n * onClick={onExpandClick}\n * expanded={expanded}\n * disableTransition={disableTransition}\n * // whatever props and any custom implementation\n * >\n * {headerChildren}\n * </ExpansionPanelHeader>\n * )}\n * />\n * );\n * }\n * ```\n *\n * @since 6.0.0 Updated to be wrapped by the {@link Typography}\n * component and rendered as an `<h6>`.\n */\nexport const ExpansionPanelHeader = forwardRef<\n HTMLHeadingElement,\n ExpansionPanelHeaderProps\n>(function ExpansionPanelHeader(props, ref) {\n const {\n id,\n headingType = \"subtitle-1\",\n headingProps,\n iconRotatorProps,\n icon: propIcon,\n expanded,\n className,\n children,\n beforeChildren,\n afterChildren,\n disableTransition = false,\n ...remaining\n } = props;\n\n const icon = getIcon(\"expander\", propIcon);\n\n return (\n <Typography\n ref={ref}\n type={headingType}\n margin=\"none\"\n {...headingProps}\n className={cnb(\"rmd-expansion-panel__heading\", headingProps?.className)}\n >\n {beforeChildren}\n <ButtonUnstyled\n {...remaining}\n aria-expanded={expanded}\n id={id}\n className={cnb(\"rmd-expansion-panel__button\", className)}\n >\n {children}\n {icon && (\n <IconRotator\n {...iconRotatorProps}\n rotated={expanded}\n disableTransition={disableTransition}\n >\n {icon}\n </IconRotator>\n )}\n </ButtonUnstyled>\n {afterChildren}\n </Typography>\n );\n});\n"],"names":["cnb","forwardRef","ButtonUnstyled","IconRotator","getIcon","Typography","ExpansionPanelHeader","props","ref","id","headingType","headingProps","iconRotatorProps","icon","propIcon","expanded","className","children","beforeChildren","afterChildren","disableTransition","remaining","type","margin","aria-expanded","rotated"],"
|
|
1
|
+
{"version":3,"sources":["../../src/expansion-panel/ExpansionPanelHeader.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport {\n forwardRef,\n type ButtonHTMLAttributes,\n type MouseEventHandler,\n type ReactNode,\n} from \"react\";\nimport { ButtonUnstyled } from \"../button/ButtonUnstyled.js\";\nimport { IconRotator, type IconRotatorProps } from \"../icon/IconRotator.js\";\nimport { getIcon } from \"../icon/iconConfig.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { Typography, type TypographyProps } from \"../typography/Typography.js\";\nimport { type TypographyType } from \"../typography/typographyStyles.js\";\n\n/**\n * @since 6.0.0 Updated to include additional heading/Typography\n * props.\n */\nexport interface ExpansionPanelHeaderProps\n extends ButtonHTMLAttributes<HTMLButtonElement> {\n id: string;\n\n /**\n * This should be a function that toggles the expansion state for the parent\n * `ExpansionPanel`.\n */\n onClick: MouseEventHandler<HTMLButtonElement>;\n expanded: boolean;\n\n /**\n * @defaultValue `\"h3\"`\n */\n as?: \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n\n /**\n * @defaultValue `getIcon(\"expander\")`\n */\n icon?: ReactNode;\n\n /**\n * @defaultValue `\"subtitle-1\"`\n */\n headingType?: TypographyType;\n\n /**\n * Any additional props to provide to the heading element that wraps the\n * expansion panel button.\n */\n headingProps?: PropsWithRef<TypographyProps, HTMLHeadingElement>;\n iconRotatorProps?: Omit<IconRotatorProps, \"rotated\" | \"disableTransition\">;\n\n /**\n * Any children to display **before** the button in the heading element. This\n * should really only be used if you need to add additional clickable elements\n * within the header.\n */\n beforeChildren?: ReactNode;\n\n /**\n * Any children to display **after** the button in the heading element.This\n * should really only be used if you need to add additional clickable elements\n * within the header.\n *\n * @example\n * ```tsx\n * afterChildren={\n * <DropdownMenu buttonType=\"icon\" ButtonChildren={<MoreVertSVGIcon />}>\n * <MenuItem>Item 1</MenuItem>\n * <MenuItem>Item 2</MenuItem>\n * <MenuItem>Item 3</MenuItem>\n * </DropdownMenu>\n * }\n * ```\n */\n afterChildren?: ReactNode;\n\n /**\n * @defaultValue `false`\n */\n disableTransition?: boolean;\n}\n\n/**\n * **Server Component**\n * This is mostly an internal component, but can also be used to implement a\n * custom header implementation if needed. This might really be a client\n * component in practice since the `onClick` prop must be provided.\n *\n * @example Custom Header\n * ```tsx\n * import type { ExpansionPanelProps } from \"@react-md/core\";\n * import {\n * ExpansionPanel,\n * ExpansionPanelHeader,\n * } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n * const { useId } from \"react\";\n *\n * export type CustomExpansionPanelProps = ExpansionPanelProps & { id: string; };\n *\n * export function CustomExpansionPanel(props: CustomExpansionPanelProps): ReactElement {\n * const {\n * id,\n * disabled,\n * onExpandClick,\n * expanded,\n * disableTransition,\n * headerChildren,\n * } = props;\n *\n * return (\n * <ExpansionPanel\n * {...props}\n * header={(\n * <ExpansionPanelHeader\n * aria-disabled={disabled || undefined}\n * id={id}\n * onClick={onExpandClick}\n * expanded={expanded}\n * disableTransition={disableTransition}\n * // whatever props and any custom implementation\n * >\n * {headerChildren}\n * </ExpansionPanelHeader>\n * )}\n * />\n * );\n * }\n * ```\n *\n * @since 6.0.0 Updated to be wrapped by the {@link Typography}\n * component and rendered as an `<h6>`.\n */\nexport const ExpansionPanelHeader = forwardRef<\n HTMLHeadingElement,\n ExpansionPanelHeaderProps\n>(function ExpansionPanelHeader(props, ref) {\n const {\n id,\n headingType = \"subtitle-1\",\n headingProps,\n iconRotatorProps,\n icon: propIcon,\n expanded,\n className,\n children,\n beforeChildren,\n afterChildren,\n disableTransition = false,\n ...remaining\n } = props;\n\n const icon = getIcon(\"expander\", propIcon);\n\n return (\n <Typography\n ref={ref}\n type={headingType}\n margin=\"none\"\n {...headingProps}\n className={cnb(\"rmd-expansion-panel__heading\", headingProps?.className)}\n >\n {beforeChildren}\n <ButtonUnstyled\n {...remaining}\n aria-expanded={expanded}\n id={id}\n className={cnb(\"rmd-expansion-panel__button\", className)}\n >\n {children}\n {icon && (\n <IconRotator\n {...iconRotatorProps}\n rotated={expanded}\n disableTransition={disableTransition}\n >\n {icon}\n </IconRotator>\n )}\n </ButtonUnstyled>\n {afterChildren}\n </Typography>\n );\n});\n"],"names":["cnb","forwardRef","ButtonUnstyled","IconRotator","getIcon","Typography","ExpansionPanelHeader","props","ref","id","headingType","headingProps","iconRotatorProps","icon","propIcon","expanded","className","children","beforeChildren","afterChildren","disableTransition","remaining","type","margin","aria-expanded","rotated"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SACEC,UAAU,QAIL,QAAQ;AACf,SAASC,cAAc,QAAQ,8BAA8B;AAC7D,SAASC,WAAW,QAA+B,yBAAyB;AAC5E,SAASC,OAAO,QAAQ,wBAAwB;AAEhD,SAASC,UAAU,QAA8B,8BAA8B;AAuE/E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkDC,GACD,OAAO,MAAMC,qCAAuBL,WAGlC,SAASK,qBAAqBC,KAAK,EAAEC,GAAG;IACxC,MAAM,EACJC,EAAE,EACFC,cAAc,YAAY,EAC1BC,YAAY,EACZC,gBAAgB,EAChBC,MAAMC,QAAQ,EACdC,QAAQ,EACRC,SAAS,EACTC,QAAQ,EACRC,cAAc,EACdC,aAAa,EACbC,oBAAoB,KAAK,EACzB,GAAGC,WACJ,GAAGd;IAEJ,MAAMM,OAAOT,QAAQ,YAAYU;IAEjC,qBACE,MAACT;QACCG,KAAKA;QACLc,MAAMZ;QACNa,QAAO;QACN,GAAGZ,YAAY;QAChBK,WAAWhB,IAAI,gCAAgCW,cAAcK;;YAE5DE;0BACD,MAAChB;gBACE,GAAGmB,SAAS;gBACbG,iBAAeT;gBACfN,IAAIA;gBACJO,WAAWhB,IAAI,+BAA+BgB;;oBAE7CC;oBACAJ,sBACC,KAACV;wBACE,GAAGS,gBAAgB;wBACpBa,SAASV;wBACTK,mBAAmBA;kCAElBP;;;;YAINM;;;AAGP,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/expansion-panel/useExpansionList.ts"],"sourcesContent":["\"use client\";\nimport type {\n FocusEventHandler,\n KeyboardEventHandler,\n MouseEventHandler,\n} from \"react\";\nimport type { KeyboardMovementProviderImplementation } from \"../movement/types.js\";\nimport { useKeyboardMovementProvider } from \"../movement/useKeyboardMovementProvider.js\";\n\n/**\n * @internal\n * @since 6.0.0\n */\nconst getPanelsOnly = (container: HTMLElement): readonly HTMLElement[] => [\n ...container.querySelectorAll<HTMLElement>(\".rmd-expansion-panel__button\"),\n];\n\n/** @since 6.0.0 */\nexport interface ExpansionListHookOptions<E extends HTMLElement> {\n onClick?: MouseEventHandler<E>;\n onFocus?: FocusEventHandler<E>;\n onKeyDown?: KeyboardEventHandler<E>;\n}\n\n/** @since 6.0.0 */\nexport type ExpansionListImplementation<E extends HTMLElement> =\n KeyboardMovementProviderImplementation<E>;\n\n/**\n * @example Custom Implementation\n * ```tsx\n * import {\n * ExpansionPanel,\n * Form,\n * KeyboardMovementProvider,\n * useExpansionList,\n * useExpansionPanels,\n * } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * import { BillingAddress } from \"./BillingAddress\";\n * import { BillingInformation } from \"./BillingInformation\";\n * import { PersonalInformation } from \"./PersonalInformation\";\n *\n * function Example(): ReactElement {\n * const { movementContext, movementProps } = useExpansionList();\n * const { getPanelProps } = useExpansionPanels();\n *\n * return (\n * <KeyboardMovementProvider value={movementContext}>\n * <Form {...movementProps}>\n * <ExpansionPanel {...getPanelProps(\"personal-information-panel\")}>\n * <PersonalInformation />\n * </ExpansionPanel>\n * <ExpansionPanel {...getPanelProps(\"billing-information-panel\")}>\n * <BillingInformation />\n * </ExpansionPanel>\n * <ExpansionPanel {...getPanelProps(\"billing-address-panel\")}>\n * <BillingAddress />\n * </ExpansionPanel>\n * </Form>\n * </KeyboardMovementProvider>\n * );\n * }\n * ```\n *\n * @since 6.0.0\n */\nexport function useExpansionList<E extends HTMLElement>(\n options: ExpansionListHookOptions<E> = {}\n): ExpansionListImplementation<E> {\n return useKeyboardMovementProvider({\n ...options,\n loopable: true,\n includeDisabled: true,\n getFocusableElements: getPanelsOnly,\n });\n}\n"],"names":["useKeyboardMovementProvider","getPanelsOnly","container","querySelectorAll","useExpansionList","options","loopable","includeDisabled","getFocusableElements"],"
|
|
1
|
+
{"version":3,"sources":["../../src/expansion-panel/useExpansionList.ts"],"sourcesContent":["\"use client\";\nimport type {\n FocusEventHandler,\n KeyboardEventHandler,\n MouseEventHandler,\n} from \"react\";\nimport type { KeyboardMovementProviderImplementation } from \"../movement/types.js\";\nimport { useKeyboardMovementProvider } from \"../movement/useKeyboardMovementProvider.js\";\n\n/**\n * @internal\n * @since 6.0.0\n */\nconst getPanelsOnly = (container: HTMLElement): readonly HTMLElement[] => [\n ...container.querySelectorAll<HTMLElement>(\".rmd-expansion-panel__button\"),\n];\n\n/** @since 6.0.0 */\nexport interface ExpansionListHookOptions<E extends HTMLElement> {\n onClick?: MouseEventHandler<E>;\n onFocus?: FocusEventHandler<E>;\n onKeyDown?: KeyboardEventHandler<E>;\n}\n\n/** @since 6.0.0 */\nexport type ExpansionListImplementation<E extends HTMLElement> =\n KeyboardMovementProviderImplementation<E>;\n\n/**\n * @example Custom Implementation\n * ```tsx\n * import {\n * ExpansionPanel,\n * Form,\n * KeyboardMovementProvider,\n * useExpansionList,\n * useExpansionPanels,\n * } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * import { BillingAddress } from \"./BillingAddress\";\n * import { BillingInformation } from \"./BillingInformation\";\n * import { PersonalInformation } from \"./PersonalInformation\";\n *\n * function Example(): ReactElement {\n * const { movementContext, movementProps } = useExpansionList();\n * const { getPanelProps } = useExpansionPanels();\n *\n * return (\n * <KeyboardMovementProvider value={movementContext}>\n * <Form {...movementProps}>\n * <ExpansionPanel {...getPanelProps(\"personal-information-panel\")}>\n * <PersonalInformation />\n * </ExpansionPanel>\n * <ExpansionPanel {...getPanelProps(\"billing-information-panel\")}>\n * <BillingInformation />\n * </ExpansionPanel>\n * <ExpansionPanel {...getPanelProps(\"billing-address-panel\")}>\n * <BillingAddress />\n * </ExpansionPanel>\n * </Form>\n * </KeyboardMovementProvider>\n * );\n * }\n * ```\n *\n * @since 6.0.0\n */\nexport function useExpansionList<E extends HTMLElement>(\n options: ExpansionListHookOptions<E> = {}\n): ExpansionListImplementation<E> {\n return useKeyboardMovementProvider({\n ...options,\n loopable: true,\n includeDisabled: true,\n getFocusableElements: getPanelsOnly,\n });\n}\n"],"names":["useKeyboardMovementProvider","getPanelsOnly","container","querySelectorAll","useExpansionList","options","loopable","includeDisabled","getFocusableElements"],"mappings":"AAAA;AAOA,SAASA,2BAA2B,QAAQ,6CAA6C;AAEzF;;;CAGC,GACD,MAAMC,gBAAgB,CAACC,YAAmD;WACrEA,UAAUC,gBAAgB,CAAc;KAC5C;AAaD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuCC,GACD,OAAO,SAASC,iBACdC,UAAuC,CAAC,CAAC;IAEzC,OAAOL,4BAA4B;QACjC,GAAGK,OAAO;QACVC,UAAU;QACVC,iBAAiB;QACjBC,sBAAsBP;IACxB;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/expansion-panel/useExpansionPanels.ts"],"sourcesContent":["\"use client\";\nimport { useState } from \"react\";\nimport type { UseStateInitializer, UseStateSetter } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport type { ExpansionPanelProps } from \"./ExpansionPanel.js\";\n\n/** @since 6.0.0 */\nexport interface ExpansionPanelHookOptions {\n /**\n * An optional id to prefix each panel with.\n *\n * @defaultValue `\"expansion-panel-\" + useId()`\n */\n baseId?: string;\n\n /**\n * Set this to `true` if multiple panels can be open at the same time.\n *\n * @defaultValue `false`\n */\n multiple?: boolean;\n\n /**\n * Set this to `true` to enforce that at least one panel must always be\n * expanded.\n *\n * @defaultValue `false`\n */\n preventAllCollapsed?: boolean;\n\n /**\n * This is a convenience option to disable the expansion transition for all\n * panels.\n *\n * @defaultValue `false`\n */\n disableTransition?: boolean;\n\n /**\n * @defaultValue `preventAllCollapsed ? [\"expansion-panel-\" + useId() + \"-1\"] : []`\n */\n defaultExpandedIds?: UseStateInitializer<string[]>;\n\n /**\n * This can only be used if the {@link defaultExpandedIds} was not provided\n * and using index based panels.\n *\n * @example\n * ```tsx\n * const { getPanelProps } = useExpansionPanels({\n * defaultExpandedIndex: 2,\n * });\n *\n * return (\n * <ExpansionPanel {...getPanelProps(0)} />\n * <ExpansionPanel {...getPanelProps(1)} />\n * // expanded on first render\n * <ExpansionPanel {...getPanelProps(2)} />\n * <ExpansionPanel {...getPanelProps(3)} />\n * );\n * ```\n */\n defaultExpandedIndex?: number;\n\n /**\n * @defaultValue `false`\n */\n disableContentPadding?: boolean;\n}\n\n/** @since 6.0.0 */\nexport type ProvidedExpansionPanelProps = Pick<\n Required<ExpansionPanelProps>,\n | \"disabled\"\n | \"expanded\"\n | \"onExpandClick\"\n | \"disableTransition\"\n | \"disableContentPadding\"\n> & { id?: string };\n\n/**\n * @param indexOrPanelId - This should either be a DOM id to use for the panel\n * or the panel's index.\n * @returns Props to pass to an `ExpansionPanel` for it to work correctly.\n * @since 6.0.0\n */\nexport type GetExpansionPanelProps = (\n indexOrPanelId: string | number\n) => ProvidedExpansionPanelProps;\n\n/** @since 6.0.0 */\nexport interface ExpansionPanelImplementation {\n /**\n * The current set of expanded panel ids if you need this for some reason.\n */\n expandedIds: ReadonlySet<string>;\n\n /**\n * This can be used to manually control which panels are expanded if the\n * default behavior does not work for your use case.\n */\n setExpandedIds: UseStateSetter<ReadonlySet<string>>;\n\n /**\n * @example Index Based Panels\n * ```tsx\n * <ExpansionPanel {...getPanelProps(0)} />\n * <ExpansionPanel {...getPanelProps(1)} />\n * <ExpansionPanel {...getPanelProps(2)} />\n * ```\n *\n * @example Custom Panel Ids\n * ```tsx\n * <ExpansionPanel {...getPanelProps(\"address-panel\")} />\n * <ExpansionPanel {...getPanelProps(\"billing-panel\")} />\n * <ExpansionPanel {...getPanelProps(\"confirmation-panel\")} />\n * ```\n */\n getPanelProps: GetExpansionPanelProps;\n}\n\n/**\n * Use this hook to control the expanded state for a group of `ExpansionPanel`.\n *\n * @example Index Based Panels\n * ```tsx\n * import {\n * ExpansionList,\n * ExpansionPanel,\n * useExpansionPanels,\n * } from \"@react-md/core\";\n * import { type ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * const { getPanelProps } = useExpansionPanels();\n *\n * return (\n * <ExpansionList>\n * <ExpansionPanel {...getPanelProps(0)} headerChildren=\"Panel 1\">\n * Panel 1 Contents\n * </ExpansionPanel>\n * <ExpansionPanel {...getPanelProps(1)} headerChildren=\"Panel 2\">\n * Panel 2 Contents\n * </ExpansionPanel>\n * <ExpansionPanel {...getPanelProps(2)} headerChildren=\"Panel 3\">\n * Panel 3 Contents\n * </ExpansionPanel>\n * </ExpansionList>\n * );\n * }\n * ```\n *\n * @example Custom Panel Ids and Expand All Panels by Default\n * ```tsx\n * import {\n * ExpansionList,\n * ExpansionPanel,\n * useExpansionPanels,\n * } from \"@react-md/core\";\n * import { type ReactElement } from \"react\";\n *\n * import { BillingAddress } from \"./BillingAddress\";\n * import { BillingInformation } from \"./BillingInformation\";\n * import { PersonalInformation } from \"./PersonalInformation\";\n *\n * const panel1Id = \"personal-information-panel\";\n * const panel2Id = \"billing-information-panel\";\n * const panel3Id = \"billing-address-panel\";\n *\n * function Example(): ReactElement {\n * const { getPanelProps } = useExpansionPanels({\n * multiple: true,\n * defaultExpandedIds: () => [panel1Id, panel2Id, panel3Id],\n * });\n *\n * return (\n * <ExpansionList>\n * <ExpansionPanel {...getPanelProps(panel1Id)} headerChildren=\"Personal Information\">\n * <PersonalInformation />\n * </ExpansionPanel>\n * <ExpansionPanel {...getPanelProps(panel2Id)} headerChildren=\"Billing Information\">\n * <BillingInformation />\n * </ExpansionPanel>\n * <ExpansionPanel {...getPanelProps(panel3Id)} headerChildren=\"Billing Address\">\n * <BillingAddress />\n * </ExpansionPanel>\n * </ExpansionList>\n * );\n * }\n * ```\n *\n *\n * @since 6.0.0 The hook was renamed from `usePanels` to `useExpansionPanels`,\n * the API changed to return `getPanelProps` instead of a generated list of\n * panel props based on the provided `count`, and the hook no longer supports\n * having all panels expanded by default.\n */\nexport function useExpansionPanels(\n options: ExpansionPanelHookOptions = {}\n): ExpansionPanelImplementation {\n const {\n baseId: propBaseId,\n multiple = false,\n preventAllCollapsed = false,\n disableTransition = false,\n defaultExpandedIds,\n defaultExpandedIndex,\n disableContentPadding = false,\n } = options;\n\n const baseId = useEnsuredId(propBaseId, \"expansion-panel\");\n const createId = (index: number): string => `${baseId}-${index + 1}`;\n const [expandedIds, setExpandedIds] = useState<ReadonlySet<string>>(() => {\n if (typeof defaultExpandedIds === \"undefined\") {\n const initialList: string[] = [];\n if (typeof defaultExpandedIndex === \"number\" || preventAllCollapsed) {\n initialList.push(createId(defaultExpandedIndex ?? 0));\n }\n\n return new Set(initialList);\n }\n\n const ids =\n typeof defaultExpandedIds === \"function\"\n ? defaultExpandedIds()\n : defaultExpandedIds;\n return new Set(ids);\n });\n\n return {\n expandedIds,\n setExpandedIds,\n getPanelProps(indexOrPanelId) {\n let id: string | undefined;\n let panelId: string;\n if (typeof indexOrPanelId === \"number\") {\n id = createId(indexOrPanelId);\n panelId = id;\n } else {\n panelId = indexOrPanelId;\n }\n\n const expanded = expandedIds.has(panelId);\n const disabled =\n expanded && preventAllCollapsed && expandedIds.size === 1;\n return {\n id,\n disabled,\n expanded,\n onExpandClick() {\n if (disabled) {\n return;\n }\n\n setExpandedIds((prevIds) => {\n const expanded = prevIds.has(panelId);\n if (!multiple) {\n return new Set(expanded ? [] : [panelId]);\n }\n\n const nextIds = new Set(prevIds);\n if (expanded) {\n nextIds.delete(panelId);\n } else {\n nextIds.add(panelId);\n }\n\n return nextIds;\n });\n },\n disableTransition,\n disableContentPadding,\n };\n },\n };\n}\n"],"names":["useState","useEnsuredId","useExpansionPanels","options","baseId","propBaseId","multiple","preventAllCollapsed","disableTransition","defaultExpandedIds","defaultExpandedIndex","disableContentPadding","createId","index","expandedIds","setExpandedIds","initialList","push","Set","ids","getPanelProps","indexOrPanelId","id","panelId","expanded","has","disabled","size","onExpandClick","prevIds","nextIds","delete","add"],"
|
|
1
|
+
{"version":3,"sources":["../../src/expansion-panel/useExpansionPanels.ts"],"sourcesContent":["\"use client\";\nimport { useState } from \"react\";\nimport type { UseStateInitializer, UseStateSetter } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport type { ExpansionPanelProps } from \"./ExpansionPanel.js\";\n\n/** @since 6.0.0 */\nexport interface ExpansionPanelHookOptions {\n /**\n * An optional id to prefix each panel with.\n *\n * @defaultValue `\"expansion-panel-\" + useId()`\n */\n baseId?: string;\n\n /**\n * Set this to `true` if multiple panels can be open at the same time.\n *\n * @defaultValue `false`\n */\n multiple?: boolean;\n\n /**\n * Set this to `true` to enforce that at least one panel must always be\n * expanded.\n *\n * @defaultValue `false`\n */\n preventAllCollapsed?: boolean;\n\n /**\n * This is a convenience option to disable the expansion transition for all\n * panels.\n *\n * @defaultValue `false`\n */\n disableTransition?: boolean;\n\n /**\n * @defaultValue `preventAllCollapsed ? [\"expansion-panel-\" + useId() + \"-1\"] : []`\n */\n defaultExpandedIds?: UseStateInitializer<string[]>;\n\n /**\n * This can only be used if the {@link defaultExpandedIds} was not provided\n * and using index based panels.\n *\n * @example\n * ```tsx\n * const { getPanelProps } = useExpansionPanels({\n * defaultExpandedIndex: 2,\n * });\n *\n * return (\n * <ExpansionPanel {...getPanelProps(0)} />\n * <ExpansionPanel {...getPanelProps(1)} />\n * // expanded on first render\n * <ExpansionPanel {...getPanelProps(2)} />\n * <ExpansionPanel {...getPanelProps(3)} />\n * );\n * ```\n */\n defaultExpandedIndex?: number;\n\n /**\n * @defaultValue `false`\n */\n disableContentPadding?: boolean;\n}\n\n/** @since 6.0.0 */\nexport type ProvidedExpansionPanelProps = Pick<\n Required<ExpansionPanelProps>,\n | \"disabled\"\n | \"expanded\"\n | \"onExpandClick\"\n | \"disableTransition\"\n | \"disableContentPadding\"\n> & { id?: string };\n\n/**\n * @param indexOrPanelId - This should either be a DOM id to use for the panel\n * or the panel's index.\n * @returns Props to pass to an `ExpansionPanel` for it to work correctly.\n * @since 6.0.0\n */\nexport type GetExpansionPanelProps = (\n indexOrPanelId: string | number\n) => ProvidedExpansionPanelProps;\n\n/** @since 6.0.0 */\nexport interface ExpansionPanelImplementation {\n /**\n * The current set of expanded panel ids if you need this for some reason.\n */\n expandedIds: ReadonlySet<string>;\n\n /**\n * This can be used to manually control which panels are expanded if the\n * default behavior does not work for your use case.\n */\n setExpandedIds: UseStateSetter<ReadonlySet<string>>;\n\n /**\n * @example Index Based Panels\n * ```tsx\n * <ExpansionPanel {...getPanelProps(0)} />\n * <ExpansionPanel {...getPanelProps(1)} />\n * <ExpansionPanel {...getPanelProps(2)} />\n * ```\n *\n * @example Custom Panel Ids\n * ```tsx\n * <ExpansionPanel {...getPanelProps(\"address-panel\")} />\n * <ExpansionPanel {...getPanelProps(\"billing-panel\")} />\n * <ExpansionPanel {...getPanelProps(\"confirmation-panel\")} />\n * ```\n */\n getPanelProps: GetExpansionPanelProps;\n}\n\n/**\n * Use this hook to control the expanded state for a group of `ExpansionPanel`.\n *\n * @example Index Based Panels\n * ```tsx\n * import {\n * ExpansionList,\n * ExpansionPanel,\n * useExpansionPanels,\n * } from \"@react-md/core\";\n * import { type ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * const { getPanelProps } = useExpansionPanels();\n *\n * return (\n * <ExpansionList>\n * <ExpansionPanel {...getPanelProps(0)} headerChildren=\"Panel 1\">\n * Panel 1 Contents\n * </ExpansionPanel>\n * <ExpansionPanel {...getPanelProps(1)} headerChildren=\"Panel 2\">\n * Panel 2 Contents\n * </ExpansionPanel>\n * <ExpansionPanel {...getPanelProps(2)} headerChildren=\"Panel 3\">\n * Panel 3 Contents\n * </ExpansionPanel>\n * </ExpansionList>\n * );\n * }\n * ```\n *\n * @example Custom Panel Ids and Expand All Panels by Default\n * ```tsx\n * import {\n * ExpansionList,\n * ExpansionPanel,\n * useExpansionPanels,\n * } from \"@react-md/core\";\n * import { type ReactElement } from \"react\";\n *\n * import { BillingAddress } from \"./BillingAddress\";\n * import { BillingInformation } from \"./BillingInformation\";\n * import { PersonalInformation } from \"./PersonalInformation\";\n *\n * const panel1Id = \"personal-information-panel\";\n * const panel2Id = \"billing-information-panel\";\n * const panel3Id = \"billing-address-panel\";\n *\n * function Example(): ReactElement {\n * const { getPanelProps } = useExpansionPanels({\n * multiple: true,\n * defaultExpandedIds: () => [panel1Id, panel2Id, panel3Id],\n * });\n *\n * return (\n * <ExpansionList>\n * <ExpansionPanel {...getPanelProps(panel1Id)} headerChildren=\"Personal Information\">\n * <PersonalInformation />\n * </ExpansionPanel>\n * <ExpansionPanel {...getPanelProps(panel2Id)} headerChildren=\"Billing Information\">\n * <BillingInformation />\n * </ExpansionPanel>\n * <ExpansionPanel {...getPanelProps(panel3Id)} headerChildren=\"Billing Address\">\n * <BillingAddress />\n * </ExpansionPanel>\n * </ExpansionList>\n * );\n * }\n * ```\n *\n *\n * @since 6.0.0 The hook was renamed from `usePanels` to `useExpansionPanels`,\n * the API changed to return `getPanelProps` instead of a generated list of\n * panel props based on the provided `count`, and the hook no longer supports\n * having all panels expanded by default.\n */\nexport function useExpansionPanels(\n options: ExpansionPanelHookOptions = {}\n): ExpansionPanelImplementation {\n const {\n baseId: propBaseId,\n multiple = false,\n preventAllCollapsed = false,\n disableTransition = false,\n defaultExpandedIds,\n defaultExpandedIndex,\n disableContentPadding = false,\n } = options;\n\n const baseId = useEnsuredId(propBaseId, \"expansion-panel\");\n const createId = (index: number): string => `${baseId}-${index + 1}`;\n const [expandedIds, setExpandedIds] = useState<ReadonlySet<string>>(() => {\n if (typeof defaultExpandedIds === \"undefined\") {\n const initialList: string[] = [];\n if (typeof defaultExpandedIndex === \"number\" || preventAllCollapsed) {\n initialList.push(createId(defaultExpandedIndex ?? 0));\n }\n\n return new Set(initialList);\n }\n\n const ids =\n typeof defaultExpandedIds === \"function\"\n ? defaultExpandedIds()\n : defaultExpandedIds;\n return new Set(ids);\n });\n\n return {\n expandedIds,\n setExpandedIds,\n getPanelProps(indexOrPanelId) {\n let id: string | undefined;\n let panelId: string;\n if (typeof indexOrPanelId === \"number\") {\n id = createId(indexOrPanelId);\n panelId = id;\n } else {\n panelId = indexOrPanelId;\n }\n\n const expanded = expandedIds.has(panelId);\n const disabled =\n expanded && preventAllCollapsed && expandedIds.size === 1;\n return {\n id,\n disabled,\n expanded,\n onExpandClick() {\n if (disabled) {\n return;\n }\n\n setExpandedIds((prevIds) => {\n const expanded = prevIds.has(panelId);\n if (!multiple) {\n return new Set(expanded ? [] : [panelId]);\n }\n\n const nextIds = new Set(prevIds);\n if (expanded) {\n nextIds.delete(panelId);\n } else {\n nextIds.add(panelId);\n }\n\n return nextIds;\n });\n },\n disableTransition,\n disableContentPadding,\n };\n },\n };\n}\n"],"names":["useState","useEnsuredId","useExpansionPanels","options","baseId","propBaseId","multiple","preventAllCollapsed","disableTransition","defaultExpandedIds","defaultExpandedIndex","disableContentPadding","createId","index","expandedIds","setExpandedIds","initialList","push","Set","ids","getPanelProps","indexOrPanelId","id","panelId","expanded","has","disabled","size","onExpandClick","prevIds","nextIds","delete","add"],"mappings":"AAAA;AACA,SAASA,QAAQ,QAAQ,QAAQ;AAEjC,SAASC,YAAY,QAAQ,qBAAqB;AAsHlD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2EC,GACD,OAAO,SAASC,mBACdC,UAAqC,CAAC,CAAC;IAEvC,MAAM,EACJC,QAAQC,UAAU,EAClBC,WAAW,KAAK,EAChBC,sBAAsB,KAAK,EAC3BC,oBAAoB,KAAK,EACzBC,kBAAkB,EAClBC,oBAAoB,EACpBC,wBAAwB,KAAK,EAC9B,GAAGR;IAEJ,MAAMC,SAASH,aAAaI,YAAY;IACxC,MAAMO,WAAW,CAACC,QAA0B,CAAC,EAAET,OAAO,CAAC,EAAES,QAAQ,EAAE,CAAC;IACpE,MAAM,CAACC,aAAaC,eAAe,GAAGf,SAA8B;QAClE,IAAI,OAAOS,uBAAuB,aAAa;YAC7C,MAAMO,cAAwB,EAAE;YAChC,IAAI,OAAON,yBAAyB,YAAYH,qBAAqB;gBACnES,YAAYC,IAAI,CAACL,SAASF,wBAAwB;YACpD;YAEA,OAAO,IAAIQ,IAAIF;QACjB;QAEA,MAAMG,MACJ,OAAOV,uBAAuB,aAC1BA,uBACAA;QACN,OAAO,IAAIS,IAAIC;IACjB;IAEA,OAAO;QACLL;QACAC;QACAK,eAAcC,cAAc;YAC1B,IAAIC;YACJ,IAAIC;YACJ,IAAI,OAAOF,mBAAmB,UAAU;gBACtCC,KAAKV,SAASS;gBACdE,UAAUD;YACZ,OAAO;gBACLC,UAAUF;YACZ;YAEA,MAAMG,WAAWV,YAAYW,GAAG,CAACF;YACjC,MAAMG,WACJF,YAAYjB,uBAAuBO,YAAYa,IAAI,KAAK;YAC1D,OAAO;gBACLL;gBACAI;gBACAF;gBACAI;oBACE,IAAIF,UAAU;wBACZ;oBACF;oBAEAX,eAAe,CAACc;wBACd,MAAML,WAAWK,QAAQJ,GAAG,CAACF;wBAC7B,IAAI,CAACjB,UAAU;4BACb,OAAO,IAAIY,IAAIM,WAAW,EAAE,GAAG;gCAACD;6BAAQ;wBAC1C;wBAEA,MAAMO,UAAU,IAAIZ,IAAIW;wBACxB,IAAIL,UAAU;4BACZM,QAAQC,MAAM,CAACR;wBACjB,OAAO;4BACLO,QAAQE,GAAG,CAACT;wBACd;wBAEA,OAAOO;oBACT;gBACF;gBACAtB;gBACAG;YACF;QACF;IACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/focus/useFocusContainer.ts"],"sourcesContent":["\"use client\";\nimport type { KeyboardEventHandler, Ref, RefObject } from \"react\";\nimport { useEffect, useRef } from \"react\";\nimport { TRANSITION_CONFIG } from \"../transition/config.js\";\nimport type {\n TransitionCallbacks,\n TransitionEnterHandler,\n TransitionExitHandler,\n} from \"../transition/types.js\";\nimport { useEnsuredRef } from \"../useEnsuredRef.js\";\nimport type { FocusElementWithinType } from \"./utils.js\";\nimport { focusElementWithin, getFocusableElements } from \"./utils.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * `\"mount\"` - this will attempt to focus the container element if:\n * - there is no `document.activeElement`\n * - the container element does not contain the `document.activeElement`\n *\n * `\"unmount\"` - attempts to re-focus the element that was focused before the\n * focus container became active. The previous focus element is captured\n * whenever the `activate` option on the `useFocusContainer` hook is set to\n * `true`. This is normally when an element becomes `visible`.\n *\n * `\"keyboard\"` - refocuses the first focusable element if pressing `Tab` would\n * move the focus outside of the container element. If `Shift + Tab` was used,\n * the last focusable element will be used instead.\n *\n * @since 6.0.0\n */\nexport type FocusType = \"mount\" | \"unmount\" | \"keyboard\";\n\n/** @since 6.0.0 */\nexport type FocusContainerTransitionCallbacks = Pick<\n TransitionCallbacks,\n \"onEntering\" | \"onEntered\" | \"onExiting\" | \"onExited\"\n>;\n\n/** @since 6.0.0 */\nexport interface FocusContainerTransitionOptions<E extends HTMLElement>\n extends FocusContainerTransitionCallbacks {\n /**\n * An optional ref that will be merged with the\n * {@link FocusContainerImplementation.nodeRef}\n */\n nodeRef?: Ref<E>;\n}\n\n/** @since 6.0.0 */\nexport interface FocusContainerEventHandlers<E extends HTMLElement> {\n onKeyDown?: KeyboardEventHandler<E>;\n}\n\n/**\n * @since 6.0.0\n */\nexport type IsFocusTypeDisabled = (type: FocusType) => boolean;\n\nexport interface FocusContainerComponentProps {\n /**\n * @defaultValue `() => false`\n */\n isFocusTypeDisabled?: IsFocusTypeDisabled;\n\n /**\n * @defaultValue `false`\n */\n disableTransition?: boolean;\n}\n\n/** @since 6.0.0 */\nexport interface FocusContainerOptions<E extends HTMLElement>\n extends FocusContainerTransitionOptions<E>,\n FocusContainerComponentProps {\n onKeyDown?: KeyboardEventHandler<E>;\n /**\n * This to `true` will capture the current focused element as a focus target\n * once the `onExited` hook is fired. This should usually be set to the\n * `transitionIn` prop for `useTransition`.\n */\n activate: boolean;\n\n /**\n * Set this to true if elements that can be programmatically focused should be\n * included. These would be elements with a `tabIndex={-1}`.\n *\n * @defaultValue `false`\n */\n programmatic?: boolean;\n}\n\n/** @since 6.0.0 */\nexport interface FocusContainerImplementation<E extends HTMLElement> {\n nodeRef: RefObject<E>;\n eventHandlers: Required<FocusContainerEventHandlers<E>>;\n transitionOptions: Required<FocusContainerTransitionOptions<E>>;\n}\n\n/**\n * This hook is mostly for internal use only for dialog accessibility behavior\n * to prevent the focus from moving outside of the dialog while it is visible.\n * This API was developed to be used with the `useCSSTransition`/`useTransition`\n * hooks as well.\n *\n * @example Main Usage\n * ```tsx\n * import {\n * Button,\n * useFocusContainer,\n * useScaleTransition,\n * useToggle,\n * } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * const { toggled, enable, disable } = useToggle(false);\n *\n * const { eventHandlers, transitionOptions } = useFocusContainer({\n * activate: toggled,\n * });\n * const { elementProps, rendered } = useScaleTransition({\n * transitionIn: toggled,\n * temporary: true,\n * ...transitionOptions,\n * });\n *\n * return (\n * <>\n * <Button onClick={enable}>Toggle</Button>\n * {rendered && (\n * <div {...eventHandlers} {...elementProps}>\n * <Button onClick={disable}>Button 1</Button>\n * <Button onClick={disable}>Button 2</Button>\n * <Button onClick={disable}>Button 3</Button>\n * <Button onClick={disable}>Button 4</Button>\n * </div>\n * )}\n * </>\n * );\n * }\n * ```\n *\n * @since 6.0.0\n */\nexport function useFocusContainer<E extends HTMLElement>(\n options: FocusContainerOptions<E>\n): FocusContainerImplementation<E> {\n const {\n nodeRef,\n activate,\n onEntering = noop,\n onEntered = noop,\n onExiting = noop,\n onExited = noop,\n onKeyDown = noop,\n programmatic = false,\n disableTransition = false,\n isFocusTypeDisabled = noop,\n } = options;\n\n const [ref, refCallback] = useEnsuredRef(nodeRef);\n const prevFocus = useRef<HTMLElement | null>(null);\n\n useEffect(() => {\n if (!activate || !(document.activeElement instanceof HTMLElement)) {\n return;\n }\n\n prevFocus.current = document.activeElement;\n }, [activate]);\n\n const handleMountFocus =\n (callback: TransitionEnterHandler, skipped: boolean) =>\n (appearing: boolean) => {\n callback(appearing);\n const instance = ref.current;\n if (\n instance &&\n !skipped &&\n !isFocusTypeDisabled(\"mount\") &&\n (!document.activeElement || !instance.contains(document.activeElement))\n ) {\n instance.focus();\n }\n };\n\n const handleUnmountFocus =\n (callback: TransitionExitHandler, skipped: boolean) => (): void => {\n callback();\n if (skipped || isFocusTypeDisabled(\"unmount\")) {\n return;\n }\n\n // For some reason, the `\"Enter\"` keydown event fires at a different timing\n // than the Space keydown event.\n window.requestAnimationFrame(() => {\n prevFocus.current?.focus();\n });\n };\n\n return {\n nodeRef: ref,\n transitionOptions: {\n nodeRef: refCallback,\n onEntering: handleMountFocus(onEntering, false),\n onEntered: handleMountFocus(\n onEntered,\n !disableTransition && !TRANSITION_CONFIG.disabled\n ),\n onExiting: handleUnmountFocus(onExiting, false),\n onExited: handleUnmountFocus(\n onExited,\n !disableTransition && !TRANSITION_CONFIG.disabled\n ),\n },\n eventHandlers: {\n onKeyDown(event) {\n onKeyDown(event);\n if (\n event.isPropagationStopped() ||\n event.key !== \"Tab\" ||\n isFocusTypeDisabled(\"keyboard\")\n ) {\n return;\n }\n\n const { target, shiftKey, currentTarget } = event;\n const elements = getFocusableElements(currentTarget, programmatic);\n const count = elements.length;\n if (count === 0) {\n event.preventDefault();\n return;\n }\n\n // if the container element is the current focus, need to either focus\n // the first or last element so focus doesn't escape\n let type: FocusElementWithinType | undefined;\n if (\n count === 1 ||\n (!shiftKey &&\n (target === currentTarget || target === elements[count - 1]))\n ) {\n type = \"first\";\n } else if (\n shiftKey &&\n (target === currentTarget || target === elements[0])\n ) {\n type = \"last\";\n }\n\n if (type) {\n event.preventDefault();\n focusElementWithin({\n type,\n elements,\n container: currentTarget,\n });\n }\n },\n },\n };\n}\n"],"names":["useEffect","useRef","TRANSITION_CONFIG","useEnsuredRef","focusElementWithin","getFocusableElements","noop","useFocusContainer","options","nodeRef","activate","onEntering","onEntered","onExiting","onExited","onKeyDown","programmatic","disableTransition","isFocusTypeDisabled","ref","refCallback","prevFocus","document","activeElement","HTMLElement","current","handleMountFocus","callback","skipped","appearing","instance","contains","focus","handleUnmountFocus","window","requestAnimationFrame","transitionOptions","disabled","eventHandlers","event","isPropagationStopped","key","target","shiftKey","currentTarget","elements","count","length","preventDefault","type","container"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAEA,SAASA,SAAS,EAAEC,MAAM,QAAQ,QAAQ;AAC1C,SAASC,iBAAiB,QAAQ,0BAA0B;AAM5D,SAASC,aAAa,QAAQ,sBAAsB;AAEpD,SAASC,kBAAkB,EAAEC,oBAAoB,QAAQ,aAAa;AAEtE,MAAMC,OAAO;AACX,aAAa;AACf;AAsFA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6CC,GACD,OAAO,SAASC,kBACdC,OAAiC;IAEjC,MAAM,EACJC,OAAO,EACPC,QAAQ,EACRC,aAAaL,IAAI,EACjBM,YAAYN,IAAI,EAChBO,YAAYP,IAAI,EAChBQ,WAAWR,IAAI,EACfS,YAAYT,IAAI,EAChBU,eAAe,KAAK,EACpBC,oBAAoB,KAAK,EACzBC,sBAAsBZ,IAAI,EAC3B,GAAGE;IAEJ,MAAM,CAACW,KAAKC,YAAY,GAAGjB,cAAcM;IACzC,MAAMY,YAAYpB,OAA2B;IAE7CD,UAAU;QACR,IAAI,CAACU,YAAY,CAAEY,CAAAA,SAASC,aAAa,YAAYC,WAAU,GAAI;YACjE;QACF;QAEAH,UAAUI,OAAO,GAAGH,SAASC,aAAa;IAC5C,GAAG;QAACb;KAAS;IAEb,MAAMgB,mBACJ,CAACC,UAAkCC,UACnC,CAACC;YACCF,SAASE;YACT,MAAMC,WAAWX,IAAIM,OAAO;YAC5B,IACEK,YACA,CAACF,WACD,CAACV,oBAAoB,YACpB,CAAA,CAACI,SAASC,aAAa,IAAI,CAACO,SAASC,QAAQ,CAACT,SAASC,aAAa,CAAA,GACrE;gBACAO,SAASE,KAAK;YAChB;QACF;IAEF,MAAMC,qBACJ,CAACN,UAAiCC,UAAqB;YACrDD;YACA,IAAIC,WAAWV,oBAAoB,YAAY;gBAC7C;YACF;YAEA,2EAA2E;YAC3E,iCAAiC;YACjCgB,OAAOC,qBAAqB,CAAC;gBAC3Bd,UAAUI,OAAO,EAAEO;YACrB;QACF;IAEF,OAAO;QACLvB,SAASU;QACTiB,mBAAmB;YACjB3B,SAASW;YACTT,YAAYe,iBAAiBf,YAAY;YACzCC,WAAWc,iBACTd,WACA,CAACK,qBAAqB,CAACf,kBAAkBmC,QAAQ;YAEnDxB,WAAWoB,mBAAmBpB,WAAW;YACzCC,UAAUmB,mBACRnB,UACA,CAACG,qBAAqB,CAACf,kBAAkBmC,QAAQ;QAErD;QACAC,eAAe;YACbvB,WAAUwB,KAAK;gBACbxB,UAAUwB;gBACV,IACEA,MAAMC,oBAAoB,MAC1BD,MAAME,GAAG,KAAK,SACdvB,oBAAoB,aACpB;oBACA;gBACF;gBAEA,MAAM,EAAEwB,MAAM,EAAEC,QAAQ,EAAEC,aAAa,EAAE,GAAGL;gBAC5C,MAAMM,WAAWxC,qBAAqBuC,eAAe5B;gBACrD,MAAM8B,QAAQD,SAASE,MAAM;gBAC7B,IAAID,UAAU,GAAG;oBACfP,MAAMS,cAAc;oBACpB;gBACF;gBAEA,sEAAsE;gBACtE,oDAAoD;gBACpD,IAAIC;gBACJ,IACEH,UAAU,KACT,CAACH,YACCD,CAAAA,WAAWE,iBAAiBF,WAAWG,QAAQ,CAACC,QAAQ,EAAE,AAAD,GAC5D;oBACAG,OAAO;gBACT,OAAO,IACLN,YACCD,CAAAA,WAAWE,iBAAiBF,WAAWG,QAAQ,CAAC,EAAE,AAAD,GAClD;oBACAI,OAAO;gBACT;gBAEA,IAAIA,MAAM;oBACRV,MAAMS,cAAc;oBACpB5C,mBAAmB;wBACjB6C;wBACAJ;wBACAK,WAAWN;oBACb;gBACF;YACF;QACF;IACF;AACF"}
|
|
1
|
+
{"version":3,"sources":["../../src/focus/useFocusContainer.ts"],"sourcesContent":["\"use client\";\nimport type { KeyboardEventHandler, Ref, RefObject } from \"react\";\nimport { useEffect, useRef } from \"react\";\nimport { TRANSITION_CONFIG } from \"../transition/config.js\";\nimport type {\n TransitionCallbacks,\n TransitionEnterHandler,\n TransitionExitHandler,\n} from \"../transition/types.js\";\nimport { useEnsuredRef } from \"../useEnsuredRef.js\";\nimport type { FocusElementWithinType } from \"./utils.js\";\nimport { focusElementWithin, getFocusableElements } from \"./utils.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * `\"mount\"` - this will attempt to focus the container element if:\n * - there is no `document.activeElement`\n * - the container element does not contain the `document.activeElement`\n *\n * `\"unmount\"` - attempts to re-focus the element that was focused before the\n * focus container became active. The previous focus element is captured\n * whenever the `activate` option on the `useFocusContainer` hook is set to\n * `true`. This is normally when an element becomes `visible`.\n *\n * `\"keyboard\"` - refocuses the first focusable element if pressing `Tab` would\n * move the focus outside of the container element. If `Shift + Tab` was used,\n * the last focusable element will be used instead.\n *\n * @since 6.0.0\n */\nexport type FocusType = \"mount\" | \"unmount\" | \"keyboard\";\n\n/** @since 6.0.0 */\nexport type FocusContainerTransitionCallbacks = Pick<\n TransitionCallbacks,\n \"onEntering\" | \"onEntered\" | \"onExiting\" | \"onExited\"\n>;\n\n/** @since 6.0.0 */\nexport interface FocusContainerTransitionOptions<E extends HTMLElement>\n extends FocusContainerTransitionCallbacks {\n /**\n * An optional ref that will be merged with the\n * {@link FocusContainerImplementation.nodeRef}\n */\n nodeRef?: Ref<E>;\n}\n\n/** @since 6.0.0 */\nexport interface FocusContainerEventHandlers<E extends HTMLElement> {\n onKeyDown?: KeyboardEventHandler<E>;\n}\n\n/**\n * @since 6.0.0\n */\nexport type IsFocusTypeDisabled = (type: FocusType) => boolean;\n\nexport interface FocusContainerComponentProps {\n /**\n * @defaultValue `() => false`\n */\n isFocusTypeDisabled?: IsFocusTypeDisabled;\n\n /**\n * @defaultValue `false`\n */\n disableTransition?: boolean;\n}\n\n/** @since 6.0.0 */\nexport interface FocusContainerOptions<E extends HTMLElement>\n extends FocusContainerTransitionOptions<E>,\n FocusContainerComponentProps {\n onKeyDown?: KeyboardEventHandler<E>;\n /**\n * This to `true` will capture the current focused element as a focus target\n * once the `onExited` hook is fired. This should usually be set to the\n * `transitionIn` prop for `useTransition`.\n */\n activate: boolean;\n\n /**\n * Set this to true if elements that can be programmatically focused should be\n * included. These would be elements with a `tabIndex={-1}`.\n *\n * @defaultValue `false`\n */\n programmatic?: boolean;\n}\n\n/** @since 6.0.0 */\nexport interface FocusContainerImplementation<E extends HTMLElement> {\n nodeRef: RefObject<E>;\n eventHandlers: Required<FocusContainerEventHandlers<E>>;\n transitionOptions: Required<FocusContainerTransitionOptions<E>>;\n}\n\n/**\n * This hook is mostly for internal use only for dialog accessibility behavior\n * to prevent the focus from moving outside of the dialog while it is visible.\n * This API was developed to be used with the `useCSSTransition`/`useTransition`\n * hooks as well.\n *\n * @example Main Usage\n * ```tsx\n * import {\n * Button,\n * useFocusContainer,\n * useScaleTransition,\n * useToggle,\n * } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * const { toggled, enable, disable } = useToggle(false);\n *\n * const { eventHandlers, transitionOptions } = useFocusContainer({\n * activate: toggled,\n * });\n * const { elementProps, rendered } = useScaleTransition({\n * transitionIn: toggled,\n * temporary: true,\n * ...transitionOptions,\n * });\n *\n * return (\n * <>\n * <Button onClick={enable}>Toggle</Button>\n * {rendered && (\n * <div {...eventHandlers} {...elementProps}>\n * <Button onClick={disable}>Button 1</Button>\n * <Button onClick={disable}>Button 2</Button>\n * <Button onClick={disable}>Button 3</Button>\n * <Button onClick={disable}>Button 4</Button>\n * </div>\n * )}\n * </>\n * );\n * }\n * ```\n *\n * @since 6.0.0\n */\nexport function useFocusContainer<E extends HTMLElement>(\n options: FocusContainerOptions<E>\n): FocusContainerImplementation<E> {\n const {\n nodeRef,\n activate,\n onEntering = noop,\n onEntered = noop,\n onExiting = noop,\n onExited = noop,\n onKeyDown = noop,\n programmatic = false,\n disableTransition = false,\n isFocusTypeDisabled = noop,\n } = options;\n\n const [ref, refCallback] = useEnsuredRef(nodeRef);\n const prevFocus = useRef<HTMLElement | null>(null);\n\n useEffect(() => {\n if (!activate || !(document.activeElement instanceof HTMLElement)) {\n return;\n }\n\n prevFocus.current = document.activeElement;\n }, [activate]);\n\n const handleMountFocus =\n (callback: TransitionEnterHandler, skipped: boolean) =>\n (appearing: boolean) => {\n callback(appearing);\n const instance = ref.current;\n if (\n instance &&\n !skipped &&\n !isFocusTypeDisabled(\"mount\") &&\n (!document.activeElement || !instance.contains(document.activeElement))\n ) {\n instance.focus();\n }\n };\n\n const handleUnmountFocus =\n (callback: TransitionExitHandler, skipped: boolean) => (): void => {\n callback();\n if (skipped || isFocusTypeDisabled(\"unmount\")) {\n return;\n }\n\n // For some reason, the `\"Enter\"` keydown event fires at a different timing\n // than the Space keydown event.\n window.requestAnimationFrame(() => {\n prevFocus.current?.focus();\n });\n };\n\n return {\n nodeRef: ref,\n transitionOptions: {\n nodeRef: refCallback,\n onEntering: handleMountFocus(onEntering, false),\n onEntered: handleMountFocus(\n onEntered,\n !disableTransition && !TRANSITION_CONFIG.disabled\n ),\n onExiting: handleUnmountFocus(onExiting, false),\n onExited: handleUnmountFocus(\n onExited,\n !disableTransition && !TRANSITION_CONFIG.disabled\n ),\n },\n eventHandlers: {\n onKeyDown(event) {\n onKeyDown(event);\n if (\n event.isPropagationStopped() ||\n event.key !== \"Tab\" ||\n isFocusTypeDisabled(\"keyboard\")\n ) {\n return;\n }\n\n const { target, shiftKey, currentTarget } = event;\n const elements = getFocusableElements(currentTarget, programmatic);\n const count = elements.length;\n if (count === 0) {\n event.preventDefault();\n return;\n }\n\n // if the container element is the current focus, need to either focus\n // the first or last element so focus doesn't escape\n let type: FocusElementWithinType | undefined;\n if (\n count === 1 ||\n (!shiftKey &&\n (target === currentTarget || target === elements[count - 1]))\n ) {\n type = \"first\";\n } else if (\n shiftKey &&\n (target === currentTarget || target === elements[0])\n ) {\n type = \"last\";\n }\n\n if (type) {\n event.preventDefault();\n focusElementWithin({\n type,\n elements,\n container: currentTarget,\n });\n }\n },\n },\n };\n}\n"],"names":["useEffect","useRef","TRANSITION_CONFIG","useEnsuredRef","focusElementWithin","getFocusableElements","noop","useFocusContainer","options","nodeRef","activate","onEntering","onEntered","onExiting","onExited","onKeyDown","programmatic","disableTransition","isFocusTypeDisabled","ref","refCallback","prevFocus","document","activeElement","HTMLElement","current","handleMountFocus","callback","skipped","appearing","instance","contains","focus","handleUnmountFocus","window","requestAnimationFrame","transitionOptions","disabled","eventHandlers","event","isPropagationStopped","key","target","shiftKey","currentTarget","elements","count","length","preventDefault","type","container"],"mappings":"AAAA;AAEA,SAASA,SAAS,EAAEC,MAAM,QAAQ,QAAQ;AAC1C,SAASC,iBAAiB,QAAQ,0BAA0B;AAM5D,SAASC,aAAa,QAAQ,sBAAsB;AAEpD,SAASC,kBAAkB,EAAEC,oBAAoB,QAAQ,aAAa;AAEtE,MAAMC,OAAO;AACX,aAAa;AACf;AAsFA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6CC,GACD,OAAO,SAASC,kBACdC,OAAiC;IAEjC,MAAM,EACJC,OAAO,EACPC,QAAQ,EACRC,aAAaL,IAAI,EACjBM,YAAYN,IAAI,EAChBO,YAAYP,IAAI,EAChBQ,WAAWR,IAAI,EACfS,YAAYT,IAAI,EAChBU,eAAe,KAAK,EACpBC,oBAAoB,KAAK,EACzBC,sBAAsBZ,IAAI,EAC3B,GAAGE;IAEJ,MAAM,CAACW,KAAKC,YAAY,GAAGjB,cAAcM;IACzC,MAAMY,YAAYpB,OAA2B;IAE7CD,UAAU;QACR,IAAI,CAACU,YAAY,CAAEY,CAAAA,SAASC,aAAa,YAAYC,WAAU,GAAI;YACjE;QACF;QAEAH,UAAUI,OAAO,GAAGH,SAASC,aAAa;IAC5C,GAAG;QAACb;KAAS;IAEb,MAAMgB,mBACJ,CAACC,UAAkCC,UACnC,CAACC;YACCF,SAASE;YACT,MAAMC,WAAWX,IAAIM,OAAO;YAC5B,IACEK,YACA,CAACF,WACD,CAACV,oBAAoB,YACpB,CAAA,CAACI,SAASC,aAAa,IAAI,CAACO,SAASC,QAAQ,CAACT,SAASC,aAAa,CAAA,GACrE;gBACAO,SAASE,KAAK;YAChB;QACF;IAEF,MAAMC,qBACJ,CAACN,UAAiCC,UAAqB;YACrDD;YACA,IAAIC,WAAWV,oBAAoB,YAAY;gBAC7C;YACF;YAEA,2EAA2E;YAC3E,iCAAiC;YACjCgB,OAAOC,qBAAqB,CAAC;gBAC3Bd,UAAUI,OAAO,EAAEO;YACrB;QACF;IAEF,OAAO;QACLvB,SAASU;QACTiB,mBAAmB;YACjB3B,SAASW;YACTT,YAAYe,iBAAiBf,YAAY;YACzCC,WAAWc,iBACTd,WACA,CAACK,qBAAqB,CAACf,kBAAkBmC,QAAQ;YAEnDxB,WAAWoB,mBAAmBpB,WAAW;YACzCC,UAAUmB,mBACRnB,UACA,CAACG,qBAAqB,CAACf,kBAAkBmC,QAAQ;QAErD;QACAC,eAAe;YACbvB,WAAUwB,KAAK;gBACbxB,UAAUwB;gBACV,IACEA,MAAMC,oBAAoB,MAC1BD,MAAME,GAAG,KAAK,SACdvB,oBAAoB,aACpB;oBACA;gBACF;gBAEA,MAAM,EAAEwB,MAAM,EAAEC,QAAQ,EAAEC,aAAa,EAAE,GAAGL;gBAC5C,MAAMM,WAAWxC,qBAAqBuC,eAAe5B;gBACrD,MAAM8B,QAAQD,SAASE,MAAM;gBAC7B,IAAID,UAAU,GAAG;oBACfP,MAAMS,cAAc;oBACpB;gBACF;gBAEA,sEAAsE;gBACtE,oDAAoD;gBACpD,IAAIC;gBACJ,IACEH,UAAU,KACT,CAACH,YACCD,CAAAA,WAAWE,iBAAiBF,WAAWG,QAAQ,CAACC,QAAQ,EAAE,AAAD,GAC5D;oBACAG,OAAO;gBACT,OAAO,IACLN,YACCD,CAAAA,WAAWE,iBAAiBF,WAAWG,QAAQ,CAAC,EAAE,AAAD,GAClD;oBACAI,OAAO;gBACT;gBAEA,IAAIA,MAAM;oBACRV,MAAMS,cAAc;oBACpB5C,mBAAmB;wBACjB6C;wBACAJ;wBACAK,WAAWN;oBACb;gBACF;YACF;QACF;IACF;AACF"}
|
package/dist/focus/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/focus/utils.ts"],"sourcesContent":["const queries = [\n 'input:not([type=\"hidden\"]):not([disabled])',\n \"button:not([disabled])\",\n \"textarea:not([disabled])\",\n \"select:not([disabled])\",\n \"a[href]\",\n \"area[href]\",\n \"[tabindex]\",\n] as const;\n\n/**\n * A query selector to find elements that are programmatically focusable.\n *\n * Example:\n *\n * ```ts\n * const focusableElements = document.querySelectorAll(PROGRAMMATICALLY_FOCUSABLE);\n * // do something with elements\n * ```\n */\nexport const PROGRAMMATICALLY_FOCUSABLE = queries.join(\",\");\n\n/**\n * A query selector to find elements that are focusable only with tab and shift+tab.\n *\n * Example:\n *\n * ```ts\n * const focusableElements = document.querySelectorAll(TAB_FOCUSABLE);\n * // do something with elements\n * ```\n *\n * @since 6.0.0 This was updated to remove ALL elements that have a\n * `tabindex=\"-1\"` applied instead of only elements that had a manual tab index\n * applied.\n */\nexport const TAB_FOCUSABLE = queries.reduce((fullQuery, query) => {\n const prefix = `${fullQuery}${fullQuery ? \",\" : \"\"}`;\n const notProgrammaticQuery = `${query}:not([tabindex=\"-1\"])`;\n\n return `${prefix}${notProgrammaticQuery}`;\n}, \"\");\n\n/**\n * A simple util that will find all the tab focusable elements within a\n * container element. The container should normally be a specific HTMLElement,\n * but it can also be the entire document if you want to find **all** focusable\n * elements within your page.\n *\n * @since 6.0.0 This function will be used for all keyboard focus behavior\n * instead of trying to use refs. I did some performance testing in Firefox and\n * Chrome and the `querySelectorAll` takes 4ms with 5000 elements for my use\n * cases. There is more of a performance issue around rendering all 5000\n * elements and since this is only used for specific keydown events, this is\n * good enough for me.\n *\n * @param container - The container element/document to find focusable elements\n * within.\n * @param programmatic - Boolean if programmatically focusable elements should be\n * included instead of only tab focusable.\n * @returns A list of HTMLElements that are focusable within the container.\n */\nexport function getFocusableElements(\n container: HTMLElement | Document,\n programmatic = false\n): readonly HTMLElement[] {\n // spread operator is faster than Array.from\n return [\n ...container.querySelectorAll<HTMLElement>(\n programmatic ? PROGRAMMATICALLY_FOCUSABLE : TAB_FOCUSABLE\n ),\n ];\n}\n\n/**\n * Attempts to find the first focusable element within a container.\n *\n * @since 6.0.0\n * @param container - The container element/document to find focusable elements\n * within.\n * @param programmatic - Boolean if programmatically focusable elements should be\n * included instead of only tab focusable.\n * @returns A list of HTMLElements that are focusable within the container.\n */\nexport function getFocusableElement(\n container: HTMLElement | Document,\n programmatic = false\n): HTMLElement | null {\n return container.querySelector<HTMLElement>(\n programmatic ? PROGRAMMATICALLY_FOCUSABLE : TAB_FOCUSABLE\n );\n}\n\n/**\n * An element can be tab focused if it is:\n * - an anchor or area with an `href`\n * - a non-disabled `input` element that is not `type=\"hidden\"`\n * - a non-disabled `button`, `textarea`, or `select` element\n * - an element with a `tabIndex >= 0`\n *\n * An element can be noted as \"programmatically focusable only\" has the above\n * rules, but the `tabIndex` will be set to `-1`.\n *\n * @since 2.8.0\n */\nexport type ElementFocusType = \"tab\" | \"programmatic\";\n\nexport function isFocusable(\n element: HTMLElement | Document | Window,\n type: ElementFocusType = \"programmatic\"\n): element is HTMLElement {\n const selector = type === \"tab\" ? TAB_FOCUSABLE : PROGRAMMATICALLY_FOCUSABLE;\n\n return \"matches\" in element && element.matches(selector);\n}\n\nexport type FocusElementWithinType =\n | \"first\"\n | \"last\"\n | \"query\"\n | \"self\"\n | \"none\";\n\nexport interface FocusElementWithinOptions {\n type: FocusElementWithinType;\n query?: string;\n elements: readonly HTMLElement[];\n container: HTMLElement | Document;\n}\n\nexport function focusElementWithin(options: FocusElementWithinOptions): void {\n const { type, query = \"\", container, elements } = options;\n if (type === \"none\") {\n return;\n }\n\n let element: HTMLElement | null = null;\n if (type === \"first\") {\n [element] = elements;\n } else if (type === \"last\") {\n element = elements[elements.length - 1];\n } else if (type === \"query\") {\n element = document.querySelector<HTMLElement>(query);\n }\n\n if (!element && isFocusable(container)) {\n element = container;\n }\n\n // TODO: Why did I add preventScroll?\n element?.focus();\n}\n"],"names":["queries","PROGRAMMATICALLY_FOCUSABLE","join","TAB_FOCUSABLE","reduce","fullQuery","query","prefix","notProgrammaticQuery","getFocusableElements","container","programmatic","querySelectorAll","getFocusableElement","querySelector","isFocusable","element","type","selector","matches","focusElementWithin","options","elements","length","document","focus"],"
|
|
1
|
+
{"version":3,"sources":["../../src/focus/utils.ts"],"sourcesContent":["const queries = [\n 'input:not([type=\"hidden\"]):not([disabled])',\n \"button:not([disabled])\",\n \"textarea:not([disabled])\",\n \"select:not([disabled])\",\n \"a[href]\",\n \"area[href]\",\n \"[tabindex]\",\n] as const;\n\n/**\n * A query selector to find elements that are programmatically focusable.\n *\n * Example:\n *\n * ```ts\n * const focusableElements = document.querySelectorAll(PROGRAMMATICALLY_FOCUSABLE);\n * // do something with elements\n * ```\n */\nexport const PROGRAMMATICALLY_FOCUSABLE = queries.join(\",\");\n\n/**\n * A query selector to find elements that are focusable only with tab and shift+tab.\n *\n * Example:\n *\n * ```ts\n * const focusableElements = document.querySelectorAll(TAB_FOCUSABLE);\n * // do something with elements\n * ```\n *\n * @since 6.0.0 This was updated to remove ALL elements that have a\n * `tabindex=\"-1\"` applied instead of only elements that had a manual tab index\n * applied.\n */\nexport const TAB_FOCUSABLE = queries.reduce((fullQuery, query) => {\n const prefix = `${fullQuery}${fullQuery ? \",\" : \"\"}`;\n const notProgrammaticQuery = `${query}:not([tabindex=\"-1\"])`;\n\n return `${prefix}${notProgrammaticQuery}`;\n}, \"\");\n\n/**\n * A simple util that will find all the tab focusable elements within a\n * container element. The container should normally be a specific HTMLElement,\n * but it can also be the entire document if you want to find **all** focusable\n * elements within your page.\n *\n * @since 6.0.0 This function will be used for all keyboard focus behavior\n * instead of trying to use refs. I did some performance testing in Firefox and\n * Chrome and the `querySelectorAll` takes 4ms with 5000 elements for my use\n * cases. There is more of a performance issue around rendering all 5000\n * elements and since this is only used for specific keydown events, this is\n * good enough for me.\n *\n * @param container - The container element/document to find focusable elements\n * within.\n * @param programmatic - Boolean if programmatically focusable elements should be\n * included instead of only tab focusable.\n * @returns A list of HTMLElements that are focusable within the container.\n */\nexport function getFocusableElements(\n container: HTMLElement | Document,\n programmatic = false\n): readonly HTMLElement[] {\n // spread operator is faster than Array.from\n return [\n ...container.querySelectorAll<HTMLElement>(\n programmatic ? PROGRAMMATICALLY_FOCUSABLE : TAB_FOCUSABLE\n ),\n ];\n}\n\n/**\n * Attempts to find the first focusable element within a container.\n *\n * @since 6.0.0\n * @param container - The container element/document to find focusable elements\n * within.\n * @param programmatic - Boolean if programmatically focusable elements should be\n * included instead of only tab focusable.\n * @returns A list of HTMLElements that are focusable within the container.\n */\nexport function getFocusableElement(\n container: HTMLElement | Document,\n programmatic = false\n): HTMLElement | null {\n return container.querySelector<HTMLElement>(\n programmatic ? PROGRAMMATICALLY_FOCUSABLE : TAB_FOCUSABLE\n );\n}\n\n/**\n * An element can be tab focused if it is:\n * - an anchor or area with an `href`\n * - a non-disabled `input` element that is not `type=\"hidden\"`\n * - a non-disabled `button`, `textarea`, or `select` element\n * - an element with a `tabIndex >= 0`\n *\n * An element can be noted as \"programmatically focusable only\" has the above\n * rules, but the `tabIndex` will be set to `-1`.\n *\n * @since 2.8.0\n */\nexport type ElementFocusType = \"tab\" | \"programmatic\";\n\nexport function isFocusable(\n element: HTMLElement | Document | Window,\n type: ElementFocusType = \"programmatic\"\n): element is HTMLElement {\n const selector = type === \"tab\" ? TAB_FOCUSABLE : PROGRAMMATICALLY_FOCUSABLE;\n\n return \"matches\" in element && element.matches(selector);\n}\n\nexport type FocusElementWithinType =\n | \"first\"\n | \"last\"\n | \"query\"\n | \"self\"\n | \"none\";\n\nexport interface FocusElementWithinOptions {\n type: FocusElementWithinType;\n query?: string;\n elements: readonly HTMLElement[];\n container: HTMLElement | Document;\n}\n\nexport function focusElementWithin(options: FocusElementWithinOptions): void {\n const { type, query = \"\", container, elements } = options;\n if (type === \"none\") {\n return;\n }\n\n let element: HTMLElement | null = null;\n if (type === \"first\") {\n [element] = elements;\n } else if (type === \"last\") {\n element = elements[elements.length - 1];\n } else if (type === \"query\") {\n element = document.querySelector<HTMLElement>(query);\n }\n\n if (!element && isFocusable(container)) {\n element = container;\n }\n\n // TODO: Why did I add preventScroll?\n element?.focus();\n}\n"],"names":["queries","PROGRAMMATICALLY_FOCUSABLE","join","TAB_FOCUSABLE","reduce","fullQuery","query","prefix","notProgrammaticQuery","getFocusableElements","container","programmatic","querySelectorAll","getFocusableElement","querySelector","isFocusable","element","type","selector","matches","focusElementWithin","options","elements","length","document","focus"],"mappings":"AAAA,MAAMA,UAAU;IACd;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAED;;;;;;;;;CASC,GACD,OAAO,MAAMC,6BAA6BD,QAAQE,IAAI,CAAC,KAAK;AAE5D;;;;;;;;;;;;;CAaC,GACD,OAAO,MAAMC,gBAAgBH,QAAQI,MAAM,CAAC,CAACC,WAAWC;IACtD,MAAMC,SAAS,CAAC,EAAEF,UAAU,EAAEA,YAAY,MAAM,GAAG,CAAC;IACpD,MAAMG,uBAAuB,CAAC,EAAEF,MAAM,qBAAqB,CAAC;IAE5D,OAAO,CAAC,EAAEC,OAAO,EAAEC,qBAAqB,CAAC;AAC3C,GAAG,IAAI;AAEP;;;;;;;;;;;;;;;;;;CAkBC,GACD,OAAO,SAASC,qBACdC,SAAiC,EACjCC,eAAe,KAAK;IAEpB,4CAA4C;IAC5C,OAAO;WACFD,UAAUE,gBAAgB,CAC3BD,eAAeV,6BAA6BE;KAE/C;AACH;AAEA;;;;;;;;;CASC,GACD,OAAO,SAASU,oBACdH,SAAiC,EACjCC,eAAe,KAAK;IAEpB,OAAOD,UAAUI,aAAa,CAC5BH,eAAeV,6BAA6BE;AAEhD;AAgBA,OAAO,SAASY,YACdC,OAAwC,EACxCC,OAAyB,cAAc;IAEvC,MAAMC,WAAWD,SAAS,QAAQd,gBAAgBF;IAElD,OAAO,aAAae,WAAWA,QAAQG,OAAO,CAACD;AACjD;AAgBA,OAAO,SAASE,mBAAmBC,OAAkC;IACnE,MAAM,EAAEJ,IAAI,EAAEX,QAAQ,EAAE,EAAEI,SAAS,EAAEY,QAAQ,EAAE,GAAGD;IAClD,IAAIJ,SAAS,QAAQ;QACnB;IACF;IAEA,IAAID,UAA8B;IAClC,IAAIC,SAAS,SAAS;QACpB,CAACD,QAAQ,GAAGM;IACd,OAAO,IAAIL,SAAS,QAAQ;QAC1BD,UAAUM,QAAQ,CAACA,SAASC,MAAM,GAAG,EAAE;IACzC,OAAO,IAAIN,SAAS,SAAS;QAC3BD,UAAUQ,SAASV,aAAa,CAAcR;IAChD;IAEA,IAAI,CAACU,WAAWD,YAAYL,YAAY;QACtCM,UAAUN;IACZ;IAEA,qCAAqC;IACrCM,SAASS;AACX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/form/Checkbox.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport { InputToggle, type CheckboxProps } from \"./InputToggle.js\";\n\n/**\n * **Client Component**\n *\n * You'll generally want to use the `useCheckboxGroup` hook for managing the\n * checked state for groups of checkboxes and indeterminate checkbox behavior.\n *\n * @example Simple Example\n * ```tsx\n * import type { ReactElement } from \"react\";\n * import { Checkbox } from \"@react-md/core\";\n *\n * function Example(): ReactElement {\n * return <Checkbox label=\"Checkbox\" value=\"a\" />;\n * }\n * ```\n */\nexport const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(\n function Checkbox(props, ref) {\n return <InputToggle {...props} ref={ref} type=\"checkbox\" />;\n }\n);\n"],"names":["forwardRef","InputToggle","Checkbox","props","ref","type"],"
|
|
1
|
+
{"version":3,"sources":["../../src/form/Checkbox.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport { InputToggle, type CheckboxProps } from \"./InputToggle.js\";\n\n/**\n * **Client Component**\n *\n * You'll generally want to use the `useCheckboxGroup` hook for managing the\n * checked state for groups of checkboxes and indeterminate checkbox behavior.\n *\n * @example Simple Example\n * ```tsx\n * import type { ReactElement } from \"react\";\n * import { Checkbox } from \"@react-md/core\";\n *\n * function Example(): ReactElement {\n * return <Checkbox label=\"Checkbox\" value=\"a\" />;\n * }\n * ```\n */\nexport const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(\n function Checkbox(props, ref) {\n return <InputToggle {...props} ref={ref} type=\"checkbox\" />;\n }\n);\n"],"names":["forwardRef","InputToggle","Checkbox","props","ref","type"],"mappings":";AAAA,SAASA,UAAU,QAAQ,QAAQ;AACnC,SAASC,WAAW,QAA4B,mBAAmB;AAEnE;;;;;;;;;;;;;;;CAeC,GACD,OAAO,MAAMC,yBAAWF,WACtB,SAASE,SAASC,KAAK,EAAEC,GAAG;IAC1B,qBAAO,KAACH;QAAa,GAAGE,KAAK;QAAEC,KAAKA;QAAKC,MAAK;;AAChD,GACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/form/Fieldset.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { forwardRef, type FieldsetHTMLAttributes } from \"react\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-fieldset\");\n\n/** @since 6.0.0 */\nexport interface FieldsetClassNameOptions {\n className?: string;\n\n /**\n * Set this to `true` to enable the default browser styles for a fieldset.\n *\n * @since 6.0.0 This was renamed from `unstyled`.\n * @defaultValue `false`\n */\n browserStyles?: boolean;\n\n /**\n * @defaultValue `false`\n */\n fullWidth?: boolean;\n}\n\n/**\n * @since 6.0.0\n */\nexport function fieldset(options: FieldsetClassNameOptions = {}): string {\n const { className, fullWidth, browserStyles = false } = options;\n\n return cnb(\n styles({ unstyled: !browserStyles, \"full-width\": fullWidth }),\n className\n );\n}\n\n/**\n * **Server Component**\n *\n * @since 6.0.0 Removed the `legend`, `legendStyle`,\n * `legendClassName`, and `legendSROnly` props. You must provide a `Legend`\n * yourself manually instead of using a prop.\n */\nexport interface FieldsetProps\n extends FieldsetHTMLAttributes<HTMLFieldSetElement>,\n FieldsetClassNameOptions {}\n\n/**\n * @example Simple Example\n * ```tsx\n * import { Form, Fieldset, Legend } from \"@react-md/core\";\n *\n * function Example(): ReactElement {\n * return (\n * <Form>\n * <Fieldset>\n * <Legend>Some Title</Legend>\n * // form components\n * </Fieldset>\n * </Form>\n * );\n * }\n * ```\n */\nexport const Fieldset = forwardRef<HTMLFieldSetElement, FieldsetProps>(\n function Fieldset(props, ref) {\n const {\n className,\n fullWidth = false,\n browserStyles = false,\n children,\n ...remaining\n } = props;\n\n return (\n <fieldset\n {...remaining}\n ref={ref}\n className={fieldset({\n className,\n fullWidth,\n browserStyles,\n })}\n >\n {children}\n </fieldset>\n );\n }\n);\n"],"names":["cnb","forwardRef","bem","styles","fieldset","options","className","fullWidth","browserStyles","unstyled","Fieldset","props","ref","children","remaining"],"
|
|
1
|
+
{"version":3,"sources":["../../src/form/Fieldset.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { forwardRef, type FieldsetHTMLAttributes } from \"react\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-fieldset\");\n\n/** @since 6.0.0 */\nexport interface FieldsetClassNameOptions {\n className?: string;\n\n /**\n * Set this to `true` to enable the default browser styles for a fieldset.\n *\n * @since 6.0.0 This was renamed from `unstyled`.\n * @defaultValue `false`\n */\n browserStyles?: boolean;\n\n /**\n * @defaultValue `false`\n */\n fullWidth?: boolean;\n}\n\n/**\n * @since 6.0.0\n */\nexport function fieldset(options: FieldsetClassNameOptions = {}): string {\n const { className, fullWidth, browserStyles = false } = options;\n\n return cnb(\n styles({ unstyled: !browserStyles, \"full-width\": fullWidth }),\n className\n );\n}\n\n/**\n * **Server Component**\n *\n * @since 6.0.0 Removed the `legend`, `legendStyle`,\n * `legendClassName`, and `legendSROnly` props. You must provide a `Legend`\n * yourself manually instead of using a prop.\n */\nexport interface FieldsetProps\n extends FieldsetHTMLAttributes<HTMLFieldSetElement>,\n FieldsetClassNameOptions {}\n\n/**\n * @example Simple Example\n * ```tsx\n * import { Form, Fieldset, Legend } from \"@react-md/core\";\n *\n * function Example(): ReactElement {\n * return (\n * <Form>\n * <Fieldset>\n * <Legend>Some Title</Legend>\n * // form components\n * </Fieldset>\n * </Form>\n * );\n * }\n * ```\n */\nexport const Fieldset = forwardRef<HTMLFieldSetElement, FieldsetProps>(\n function Fieldset(props, ref) {\n const {\n className,\n fullWidth = false,\n browserStyles = false,\n children,\n ...remaining\n } = props;\n\n return (\n <fieldset\n {...remaining}\n ref={ref}\n className={fieldset({\n className,\n fullWidth,\n browserStyles,\n })}\n >\n {children}\n </fieldset>\n );\n }\n);\n"],"names":["cnb","forwardRef","bem","styles","fieldset","options","className","fullWidth","browserStyles","unstyled","Fieldset","props","ref","children","remaining"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAAqC,QAAQ;AAChE,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAoBnB;;CAEC,GACD,OAAO,SAASE,SAASC,UAAoC,CAAC,CAAC;IAC7D,MAAM,EAAEC,SAAS,EAAEC,SAAS,EAAEC,gBAAgB,KAAK,EAAE,GAAGH;IAExD,OAAOL,IACLG,OAAO;QAAEM,UAAU,CAACD;QAAe,cAAcD;IAAU,IAC3DD;AAEJ;AAaA;;;;;;;;;;;;;;;;CAgBC,GACD,OAAO,MAAMI,yBAAWT,WACtB,SAASS,SAASC,KAAK,EAAEC,GAAG;IAC1B,MAAM,EACJN,SAAS,EACTC,YAAY,KAAK,EACjBC,gBAAgB,KAAK,EACrBK,QAAQ,EACR,GAAGC,WACJ,GAAGH;IAEJ,qBACE,KAACP;QACE,GAAGU,SAAS;QACbF,KAAKA;QACLN,WAAWF,SAAS;YAClBE;YACAC;YACAC;QACF;kBAECK;;AAGP,GACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/form/FileInput.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport {\n forwardRef,\n type InputHTMLAttributes,\n type LabelHTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport {\n button,\n type ButtonClassNameOptions,\n type ButtonClassNameThemeOptions,\n} from \"../button/buttonStyles.js\";\nimport { getIcon } from \"../icon/iconConfig.js\";\nimport { useElementInteraction } from \"../interaction/useElementInteraction.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { SrOnly } from \"../typography/SrOnly.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\n\n/** @since 6.0.0 */\nexport type FileInputClassNameOptions = ButtonClassNameOptions;\n\n/** @since 6.0.0 */\nexport function fileInput(options: FileInputClassNameOptions = {}): string {\n return cnb(\"rmd-file-input\", button(options));\n}\n\n/** @since 6.0.0 */\nexport type FileInputHTMLAttributes = Omit<\n InputHTMLAttributes<HTMLInputElement>,\n \"type\"\n>;\n\n/**\n * @since 6.0.0 Removed the `disableIconSpacing` prop since it is no\n * longer required.\n */\nexport interface FileInputProps\n extends ButtonClassNameThemeOptions,\n FileInputHTMLAttributes {\n /**\n * This is the label text for icon-only file inputs.\n *\n * @defaultValue `\"Upload\"`\n */\n srOnlyLabel?: ReactNode;\n\n /**\n * Any additional props to provide to the container `<label>` element since\n * most props get passed to the `<input type=\"file\">`. So this would be useful\n * for inline style or click handlers.\n */\n labelProps?: PropsWithRef<\n LabelHTMLAttributes<HTMLLabelElement>,\n HTMLLabelElement\n >;\n\n /**\n * An optional icon to display for the file input.\n *\n * @defaultValue `getIcon(\"upload\")`\n */\n icon?: ReactNode;\n\n /**\n * Boolean if the icon should appear after the children in the label.\n *\n * @defaultValue `false`\n */\n iconAfter?: boolean;\n\n /**\n * Boolean if the file input should no longer allow the same file to be\n * selected multiple times and trigger the `onChange` each time it is\n * selected.\n *\n * @defaultValue `false`\n */\n disableRepeatableFiles?: boolean;\n\n /**\n * Children should generally be provided when the {@link buttonType} is\n * set to `\"text\"`. This defaults to a screen-reader only accessible text.\n *\n * @defaultValue `<SrOnly phoneOnly={responsive}>Upload</SrOnly>`\n */\n children?: ReactNode;\n}\n\n/**\n * **Client Component**\n * This might be able to become a server component if I remove the getIcon hook\n *\n * @example Simple Example\n * ```tsx\n * import { FileInput, Form } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * const extensions = [\n * \"svg\",\n * \"jpeg\",\n * \"jpg\",\n * \"png\",\n * \"apng\",\n * \"mkv\",\n * \"mp4\",\n * \"mpeg\",\n * \"mpg\",\n * \"webm\",\n * \"mov\",\n * ] as const;\n *\n * const FOUR_HUNDRED_MB = 400 * 1024 * 1024;\n * const maxFiles = 10;\n *\n * function Example(): ReactElement {\n * const { stats, errors, onChange, clearErrors, reset, remove, accept } =\n * useFileUpload({\n * maxFiles,\n * maxFileSize: FOUR_HUNDRED_MB,\n * extensions,\n * });\n *\n * return (\n * <Form>\n * <FileInput accept={accept} multiple={maxFiles > 1} onChange={onChange} />\n * <Button onClick={reset} disabled={!stats.length}>\n * Remove all files\n * </Button>\n * </Form>\n * );\n * }\n * ```\n *\n * @since 6.0.0 Added additional support for `iconSize` and\n * `responsive`. Also removed the `disableIconSpacing` prop since it is no\n * longer required.\n */\nexport const FileInput = forwardRef<HTMLInputElement, FileInputProps>(\n function FileInput(props, ref) {\n const {\n id: propId,\n className,\n children: propChildren,\n icon: propIcon,\n iconAfter = false,\n srOnlyLabel = \"Upload\",\n disableRepeatableFiles = false,\n labelProps,\n theme = \"primary\",\n themeType = \"contained\",\n buttonType = propChildren ? \"text\" : \"icon\",\n disabled = false,\n iconSize,\n responsive,\n multiple = false,\n ...remaining\n } = props;\n const id = useEnsuredId(propId, \"file-input\");\n const { pressed, pressedClassName, ripples, handlers } =\n useElementInteraction({\n ...labelProps,\n onClick(event) {\n labelProps?.onClick?.(event);\n\n // stop propagation so 2 ripples are not created\n event.stopPropagation();\n },\n disabled,\n });\n\n const icon = getIcon(\"upload\", propIcon);\n let children = propChildren;\n if (\n typeof propChildren === \"undefined\" &&\n !props[\"aria-label\"] &&\n !props[\"aria-labelledby\"]\n ) {\n children = <SrOnly phoneOnly={responsive}>{srOnlyLabel}</SrOnly>;\n }\n\n return (\n <label\n {...labelProps}\n {...handlers}\n className={fileInput({\n theme,\n themeType,\n buttonType,\n disabled,\n iconSize,\n pressed,\n responsive,\n pressedClassName,\n className: className || labelProps?.className,\n })}\n >\n {!iconAfter && icon}\n {children}\n {iconAfter && icon}\n <input\n {...remaining}\n id={id}\n ref={ref}\n value={\n disableRepeatableFiles || !props.onChange ? remaining.value : \"\"\n }\n type=\"file\"\n className=\"rmd-hidden-input\"\n disabled={disabled}\n multiple={multiple}\n />\n {ripples}\n </label>\n );\n }\n);\n"],"names":["cnb","forwardRef","button","getIcon","useElementInteraction","SrOnly","useEnsuredId","fileInput","options","FileInput","props","ref","id","propId","className","children","propChildren","icon","propIcon","iconAfter","srOnlyLabel","disableRepeatableFiles","labelProps","theme","themeType","buttonType","disabled","iconSize","responsive","multiple","remaining","pressed","pressedClassName","ripples","handlers","onClick","event","stopPropagation","phoneOnly","label","input","value","onChange","type"],"
|
|
1
|
+
{"version":3,"sources":["../../src/form/FileInput.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport {\n forwardRef,\n type InputHTMLAttributes,\n type LabelHTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport {\n button,\n type ButtonClassNameOptions,\n type ButtonClassNameThemeOptions,\n} from \"../button/buttonStyles.js\";\nimport { getIcon } from \"../icon/iconConfig.js\";\nimport { useElementInteraction } from \"../interaction/useElementInteraction.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { SrOnly } from \"../typography/SrOnly.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\n\n/** @since 6.0.0 */\nexport type FileInputClassNameOptions = ButtonClassNameOptions;\n\n/** @since 6.0.0 */\nexport function fileInput(options: FileInputClassNameOptions = {}): string {\n return cnb(\"rmd-file-input\", button(options));\n}\n\n/** @since 6.0.0 */\nexport type FileInputHTMLAttributes = Omit<\n InputHTMLAttributes<HTMLInputElement>,\n \"type\"\n>;\n\n/**\n * @since 6.0.0 Removed the `disableIconSpacing` prop since it is no\n * longer required.\n */\nexport interface FileInputProps\n extends ButtonClassNameThemeOptions,\n FileInputHTMLAttributes {\n /**\n * This is the label text for icon-only file inputs.\n *\n * @defaultValue `\"Upload\"`\n */\n srOnlyLabel?: ReactNode;\n\n /**\n * Any additional props to provide to the container `<label>` element since\n * most props get passed to the `<input type=\"file\">`. So this would be useful\n * for inline style or click handlers.\n */\n labelProps?: PropsWithRef<\n LabelHTMLAttributes<HTMLLabelElement>,\n HTMLLabelElement\n >;\n\n /**\n * An optional icon to display for the file input.\n *\n * @defaultValue `getIcon(\"upload\")`\n */\n icon?: ReactNode;\n\n /**\n * Boolean if the icon should appear after the children in the label.\n *\n * @defaultValue `false`\n */\n iconAfter?: boolean;\n\n /**\n * Boolean if the file input should no longer allow the same file to be\n * selected multiple times and trigger the `onChange` each time it is\n * selected.\n *\n * @defaultValue `false`\n */\n disableRepeatableFiles?: boolean;\n\n /**\n * Children should generally be provided when the {@link buttonType} is\n * set to `\"text\"`. This defaults to a screen-reader only accessible text.\n *\n * @defaultValue `<SrOnly phoneOnly={responsive}>Upload</SrOnly>`\n */\n children?: ReactNode;\n}\n\n/**\n * **Client Component**\n * This might be able to become a server component if I remove the getIcon hook\n *\n * @example Simple Example\n * ```tsx\n * import { FileInput, Form } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * const extensions = [\n * \"svg\",\n * \"jpeg\",\n * \"jpg\",\n * \"png\",\n * \"apng\",\n * \"mkv\",\n * \"mp4\",\n * \"mpeg\",\n * \"mpg\",\n * \"webm\",\n * \"mov\",\n * ] as const;\n *\n * const FOUR_HUNDRED_MB = 400 * 1024 * 1024;\n * const maxFiles = 10;\n *\n * function Example(): ReactElement {\n * const { stats, errors, onChange, clearErrors, reset, remove, accept } =\n * useFileUpload({\n * maxFiles,\n * maxFileSize: FOUR_HUNDRED_MB,\n * extensions,\n * });\n *\n * return (\n * <Form>\n * <FileInput accept={accept} multiple={maxFiles > 1} onChange={onChange} />\n * <Button onClick={reset} disabled={!stats.length}>\n * Remove all files\n * </Button>\n * </Form>\n * );\n * }\n * ```\n *\n * @since 6.0.0 Added additional support for `iconSize` and\n * `responsive`. Also removed the `disableIconSpacing` prop since it is no\n * longer required.\n */\nexport const FileInput = forwardRef<HTMLInputElement, FileInputProps>(\n function FileInput(props, ref) {\n const {\n id: propId,\n className,\n children: propChildren,\n icon: propIcon,\n iconAfter = false,\n srOnlyLabel = \"Upload\",\n disableRepeatableFiles = false,\n labelProps,\n theme = \"primary\",\n themeType = \"contained\",\n buttonType = propChildren ? \"text\" : \"icon\",\n disabled = false,\n iconSize,\n responsive,\n multiple = false,\n ...remaining\n } = props;\n const id = useEnsuredId(propId, \"file-input\");\n const { pressed, pressedClassName, ripples, handlers } =\n useElementInteraction({\n ...labelProps,\n onClick(event) {\n labelProps?.onClick?.(event);\n\n // stop propagation so 2 ripples are not created\n event.stopPropagation();\n },\n disabled,\n });\n\n const icon = getIcon(\"upload\", propIcon);\n let children = propChildren;\n if (\n typeof propChildren === \"undefined\" &&\n !props[\"aria-label\"] &&\n !props[\"aria-labelledby\"]\n ) {\n children = <SrOnly phoneOnly={responsive}>{srOnlyLabel}</SrOnly>;\n }\n\n return (\n <label\n {...labelProps}\n {...handlers}\n className={fileInput({\n theme,\n themeType,\n buttonType,\n disabled,\n iconSize,\n pressed,\n responsive,\n pressedClassName,\n className: className || labelProps?.className,\n })}\n >\n {!iconAfter && icon}\n {children}\n {iconAfter && icon}\n <input\n {...remaining}\n id={id}\n ref={ref}\n value={\n disableRepeatableFiles || !props.onChange ? remaining.value : \"\"\n }\n type=\"file\"\n className=\"rmd-hidden-input\"\n disabled={disabled}\n multiple={multiple}\n />\n {ripples}\n </label>\n );\n }\n);\n"],"names":["cnb","forwardRef","button","getIcon","useElementInteraction","SrOnly","useEnsuredId","fileInput","options","FileInput","props","ref","id","propId","className","children","propChildren","icon","propIcon","iconAfter","srOnlyLabel","disableRepeatableFiles","labelProps","theme","themeType","buttonType","disabled","iconSize","responsive","multiple","remaining","pressed","pressedClassName","ripples","handlers","onClick","event","stopPropagation","phoneOnly","label","input","value","onChange","type"],"mappings":"AAAA;;AACA,SAASA,GAAG,QAAQ,YAAY;AAChC,SACEC,UAAU,QAIL,QAAQ;AACf,SACEC,MAAM,QAGD,4BAA4B;AACnC,SAASC,OAAO,QAAQ,wBAAwB;AAChD,SAASC,qBAAqB,QAAQ,0CAA0C;AAEhF,SAASC,MAAM,QAAQ,0BAA0B;AACjD,SAASC,YAAY,QAAQ,qBAAqB;AAKlD,iBAAiB,GACjB,OAAO,SAASC,UAAUC,UAAqC,CAAC,CAAC;IAC/D,OAAOR,IAAI,kBAAkBE,OAAOM;AACtC;AAgEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgDC,GACD,OAAO,MAAMC,0BAAYR,WACvB,SAASQ,UAAUC,KAAK,EAAEC,GAAG;IAC3B,MAAM,EACJC,IAAIC,MAAM,EACVC,SAAS,EACTC,UAAUC,YAAY,EACtBC,MAAMC,QAAQ,EACdC,YAAY,KAAK,EACjBC,cAAc,QAAQ,EACtBC,yBAAyB,KAAK,EAC9BC,UAAU,EACVC,QAAQ,SAAS,EACjBC,YAAY,WAAW,EACvBC,aAAaT,eAAe,SAAS,MAAM,EAC3CU,WAAW,KAAK,EAChBC,QAAQ,EACRC,UAAU,EACVC,WAAW,KAAK,EAChB,GAAGC,WACJ,GAAGpB;IACJ,MAAME,KAAKN,aAAaO,QAAQ;IAChC,MAAM,EAAEkB,OAAO,EAAEC,gBAAgB,EAAEC,OAAO,EAAEC,QAAQ,EAAE,GACpD9B,sBAAsB;QACpB,GAAGkB,UAAU;QACba,SAAQC,KAAK;YACXd,YAAYa,UAAUC;YAEtB,gDAAgD;YAChDA,MAAMC,eAAe;QACvB;QACAX;IACF;IAEF,MAAMT,OAAOd,QAAQ,UAAUe;IAC/B,IAAIH,WAAWC;IACf,IACE,OAAOA,iBAAiB,eACxB,CAACN,KAAK,CAAC,aAAa,IACpB,CAACA,KAAK,CAAC,kBAAkB,EACzB;QACAK,yBAAW,KAACV;YAAOiC,WAAWV;sBAAaR;;IAC7C;IAEA,qBACE,MAACmB;QACE,GAAGjB,UAAU;QACb,GAAGY,QAAQ;QACZpB,WAAWP,UAAU;YACnBgB;YACAC;YACAC;YACAC;YACAC;YACAI;YACAH;YACAI;YACAlB,WAAWA,aAAaQ,YAAYR;QACtC;;YAEC,CAACK,aAAaF;YACdF;YACAI,aAAaF;0BACd,KAACuB;gBACE,GAAGV,SAAS;gBACblB,IAAIA;gBACJD,KAAKA;gBACL8B,OACEpB,0BAA0B,CAACX,MAAMgC,QAAQ,GAAGZ,UAAUW,KAAK,GAAG;gBAEhEE,MAAK;gBACL7B,WAAU;gBACVY,UAAUA;gBACVG,UAAUA;;YAEXI;;;AAGP,GACA"}
|
package/dist/form/Form.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/form/Form.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, type FormHTMLAttributes } from \"react\";\n\nconst noop = (): void => {\n // do nothing\n};\n\nexport interface FormProps extends FormHTMLAttributes<HTMLFormElement> {\n /**\n * Boolean if the form should no longer prevent default submit behavior. If\n * you enable this prop you should honestly just use a `<form>` element\n * instead\n *\n * @defaultValue `false`\n */\n disablePreventDefault?: boolean;\n}\n\n/**\n * **Client Component**\n *\n * This is probably one of the least useful components available as it doesn't\n * do much styling or logic. All this form component will do is add basic flex\n * behavior and prevent the default form submit behavior.\n */\nexport const Form = forwardRef<HTMLFormElement, FormProps>(\n function Form(props, ref) {\n const {\n children,\n onSubmit = noop,\n disablePreventDefault = false,\n ...remaining\n } = props;\n\n return (\n <form\n {...remaining}\n onSubmit={(event) => {\n if (!disablePreventDefault) {\n event.preventDefault();\n }\n\n onSubmit(event);\n }}\n ref={ref}\n >\n {children}\n </form>\n );\n }\n);\n"],"names":["forwardRef","noop","Form","props","ref","children","onSubmit","disablePreventDefault","remaining","form","event","preventDefault"],"
|
|
1
|
+
{"version":3,"sources":["../../src/form/Form.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, type FormHTMLAttributes } from \"react\";\n\nconst noop = (): void => {\n // do nothing\n};\n\nexport interface FormProps extends FormHTMLAttributes<HTMLFormElement> {\n /**\n * Boolean if the form should no longer prevent default submit behavior. If\n * you enable this prop you should honestly just use a `<form>` element\n * instead\n *\n * @defaultValue `false`\n */\n disablePreventDefault?: boolean;\n}\n\n/**\n * **Client Component**\n *\n * This is probably one of the least useful components available as it doesn't\n * do much styling or logic. All this form component will do is add basic flex\n * behavior and prevent the default form submit behavior.\n */\nexport const Form = forwardRef<HTMLFormElement, FormProps>(\n function Form(props, ref) {\n const {\n children,\n onSubmit = noop,\n disablePreventDefault = false,\n ...remaining\n } = props;\n\n return (\n <form\n {...remaining}\n onSubmit={(event) => {\n if (!disablePreventDefault) {\n event.preventDefault();\n }\n\n onSubmit(event);\n }}\n ref={ref}\n >\n {children}\n </form>\n );\n }\n);\n"],"names":["forwardRef","noop","Form","props","ref","children","onSubmit","disablePreventDefault","remaining","form","event","preventDefault"],"mappings":"AAAA;;AACA,SAASA,UAAU,QAAiC,QAAQ;AAE5D,MAAMC,OAAO;AACX,aAAa;AACf;AAaA;;;;;;CAMC,GACD,OAAO,MAAMC,qBAAOF,WAClB,SAASE,KAAKC,KAAK,EAAEC,GAAG;IACtB,MAAM,EACJC,QAAQ,EACRC,WAAWL,IAAI,EACfM,wBAAwB,KAAK,EAC7B,GAAGC,WACJ,GAAGL;IAEJ,qBACE,KAACM;QACE,GAAGD,SAAS;QACbF,UAAU,CAACI;YACT,IAAI,CAACH,uBAAuB;gBAC1BG,MAAMC,cAAc;YACtB;YAEAL,SAASI;QACX;QACAN,KAAKA;kBAEJC;;AAGP,GACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/form/FormMessage.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { FormMessageCounter } from \"./FormMessageCounter.js\";\nimport { getFormConfig } from \"./formConfig.js\";\nimport { formMessage, formMessageText } from \"./formMessageStyles.js\";\nimport {\n type FormMessageInputLengthCounterProps,\n type FormMessageProps,\n} from \"./types.js\";\n\n/**\n * **Server Component**\n *\n * The `FormMessage` component is used to create additional helper messages or\n * error messages and generally placed below the related `TextField`. If a\n * `length` (of the `value`) and `maxLength` are provided, a counter will also\n * be displayed to the right of the `children`.\n *\n * This component can also be used to create form-level validation messages by\n * setting the `role` prop to `\"alert\"`.\n */\nexport const FormMessage = forwardRef<\n HTMLDivElement,\n FormMessageProps & Partial<FormMessageInputLengthCounterProps>\n>(function FormMessage(props, ref) {\n const {\n id: propId,\n role,\n className,\n counterStyle,\n counterClassName,\n messageStyle,\n messageClassName,\n error = false,\n disableWrap = false,\n theme: propTheme,\n children,\n length,\n maxLength,\n ...remaining\n } = props;\n const id = useEnsuredId(propId, \"form-message\");\n const theme = getFormConfig(\"theme\", propTheme);\n\n let message = children;\n if (!disableWrap && children) {\n message = (\n <p\n id={`${id}-message`}\n style={messageStyle}\n className={formMessageText({ className: messageClassName })}\n >\n {children}\n </p>\n );\n }\n\n return (\n <div\n {...remaining}\n id={id}\n ref={ref}\n aria-live={role !== \"alert\" ? \"polite\" : undefined}\n role={role}\n className={formMessage({ error, theme, className })}\n >\n {message}\n {typeof length === \"number\" && typeof maxLength === \"number\" && (\n <FormMessageCounter\n id={`${id}-counter`}\n style={counterStyle}\n className={counterClassName}\n >\n {`${length} / ${maxLength}`}\n </FormMessageCounter>\n )}\n </div>\n );\n});\n"],"names":["forwardRef","useEnsuredId","FormMessageCounter","getFormConfig","formMessage","formMessageText","FormMessage","props","ref","id","propId","role","className","counterStyle","counterClassName","messageStyle","messageClassName","error","disableWrap","theme","propTheme","children","length","maxLength","remaining","message","p","style","div","aria-live","undefined"],"
|
|
1
|
+
{"version":3,"sources":["../../src/form/FormMessage.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { FormMessageCounter } from \"./FormMessageCounter.js\";\nimport { getFormConfig } from \"./formConfig.js\";\nimport { formMessage, formMessageText } from \"./formMessageStyles.js\";\nimport {\n type FormMessageInputLengthCounterProps,\n type FormMessageProps,\n} from \"./types.js\";\n\n/**\n * **Server Component**\n *\n * The `FormMessage` component is used to create additional helper messages or\n * error messages and generally placed below the related `TextField`. If a\n * `length` (of the `value`) and `maxLength` are provided, a counter will also\n * be displayed to the right of the `children`.\n *\n * This component can also be used to create form-level validation messages by\n * setting the `role` prop to `\"alert\"`.\n */\nexport const FormMessage = forwardRef<\n HTMLDivElement,\n FormMessageProps & Partial<FormMessageInputLengthCounterProps>\n>(function FormMessage(props, ref) {\n const {\n id: propId,\n role,\n className,\n counterStyle,\n counterClassName,\n messageStyle,\n messageClassName,\n error = false,\n disableWrap = false,\n theme: propTheme,\n children,\n length,\n maxLength,\n ...remaining\n } = props;\n const id = useEnsuredId(propId, \"form-message\");\n const theme = getFormConfig(\"theme\", propTheme);\n\n let message = children;\n if (!disableWrap && children) {\n message = (\n <p\n id={`${id}-message`}\n style={messageStyle}\n className={formMessageText({ className: messageClassName })}\n >\n {children}\n </p>\n );\n }\n\n return (\n <div\n {...remaining}\n id={id}\n ref={ref}\n aria-live={role !== \"alert\" ? \"polite\" : undefined}\n role={role}\n className={formMessage({ error, theme, className })}\n >\n {message}\n {typeof length === \"number\" && typeof maxLength === \"number\" && (\n <FormMessageCounter\n id={`${id}-counter`}\n style={counterStyle}\n className={counterClassName}\n >\n {`${length} / ${maxLength}`}\n </FormMessageCounter>\n )}\n </div>\n );\n});\n"],"names":["forwardRef","useEnsuredId","FormMessageCounter","getFormConfig","formMessage","formMessageText","FormMessage","props","ref","id","propId","role","className","counterStyle","counterClassName","messageStyle","messageClassName","error","disableWrap","theme","propTheme","children","length","maxLength","remaining","message","p","style","div","aria-live","undefined"],"mappings":";AAAA,SAASA,UAAU,QAAQ,QAAQ;AACnC,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,kBAAkB,QAAQ,0BAA0B;AAC7D,SAASC,aAAa,QAAQ,kBAAkB;AAChD,SAASC,WAAW,EAAEC,eAAe,QAAQ,yBAAyB;AAMtE;;;;;;;;;;CAUC,GACD,OAAO,MAAMC,4BAAcN,WAGzB,SAASM,YAAYC,KAAK,EAAEC,GAAG;IAC/B,MAAM,EACJC,IAAIC,MAAM,EACVC,IAAI,EACJC,SAAS,EACTC,YAAY,EACZC,gBAAgB,EAChBC,YAAY,EACZC,gBAAgB,EAChBC,QAAQ,KAAK,EACbC,cAAc,KAAK,EACnBC,OAAOC,SAAS,EAChBC,QAAQ,EACRC,MAAM,EACNC,SAAS,EACT,GAAGC,WACJ,GAAGjB;IACJ,MAAME,KAAKR,aAAaS,QAAQ;IAChC,MAAMS,QAAQhB,cAAc,SAASiB;IAErC,IAAIK,UAAUJ;IACd,IAAI,CAACH,eAAeG,UAAU;QAC5BI,wBACE,KAACC;YACCjB,IAAI,CAAC,EAAEA,GAAG,QAAQ,CAAC;YACnBkB,OAAOZ;YACPH,WAAWP,gBAAgB;gBAAEO,WAAWI;YAAiB;sBAExDK;;IAGP;IAEA,qBACE,MAACO;QACE,GAAGJ,SAAS;QACbf,IAAIA;QACJD,KAAKA;QACLqB,aAAWlB,SAAS,UAAU,WAAWmB;QACzCnB,MAAMA;QACNC,WAAWR,YAAY;YAAEa;YAAOE;YAAOP;QAAU;;YAEhDa;YACA,OAAOH,WAAW,YAAY,OAAOC,cAAc,0BAClD,KAACrB;gBACCO,IAAI,CAAC,EAAEA,GAAG,QAAQ,CAAC;gBACnBkB,OAAOd;gBACPD,WAAWE;0BAEV,CAAC,EAAEQ,OAAO,GAAG,EAAEC,UAAU,CAAC;;;;AAKrC,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/form/FormMessageContainer.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { forwardRef, type HTMLAttributes } from \"react\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { FormMessage } from \"./FormMessage.js\";\nimport { type FormMessageProps } from \"./types.js\";\n\n/**\n * @since 2.5.0\n */\nexport interface FormMessageContainerProps\n extends HTMLAttributes<HTMLDivElement> {\n /**\n * If the extension doesn't actually want to render the `FormMessage`\n * component, these props are optional. It kind of eliminates the whole\n * purpose of this component though.\n */\n messageProps?: PropsWithRef<FormMessageProps, HTMLDivElement>;\n}\n\n/**\n * **Server Component**\n * Conditionally wraps the `children` in a `.rmd-form-message-container` wrapper\n * and renders the {@link FormMessage} component.\n *\n * @since 2.5.0\n */\nexport const FormMessageContainer = forwardRef<\n HTMLDivElement,\n FormMessageContainerProps\n>(function FormMessageContainer(props, ref) {\n const { className, children, messageProps, ...remaining } = props;\n if (!messageProps) {\n return <>{children}</>;\n }\n\n return (\n <div\n {...remaining}\n ref={ref}\n className={cnb(\"rmd-form-message-container\", className)}\n >\n {children}\n <FormMessage {...messageProps} />\n </div>\n );\n});\n"],"names":["cnb","forwardRef","FormMessage","FormMessageContainer","props","ref","className","children","messageProps","remaining","div"],"
|
|
1
|
+
{"version":3,"sources":["../../src/form/FormMessageContainer.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { forwardRef, type HTMLAttributes } from \"react\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { FormMessage } from \"./FormMessage.js\";\nimport { type FormMessageProps } from \"./types.js\";\n\n/**\n * @since 2.5.0\n */\nexport interface FormMessageContainerProps\n extends HTMLAttributes<HTMLDivElement> {\n /**\n * If the extension doesn't actually want to render the `FormMessage`\n * component, these props are optional. It kind of eliminates the whole\n * purpose of this component though.\n */\n messageProps?: PropsWithRef<FormMessageProps, HTMLDivElement>;\n}\n\n/**\n * **Server Component**\n * Conditionally wraps the `children` in a `.rmd-form-message-container` wrapper\n * and renders the {@link FormMessage} component.\n *\n * @since 2.5.0\n */\nexport const FormMessageContainer = forwardRef<\n HTMLDivElement,\n FormMessageContainerProps\n>(function FormMessageContainer(props, ref) {\n const { className, children, messageProps, ...remaining } = props;\n if (!messageProps) {\n return <>{children}</>;\n }\n\n return (\n <div\n {...remaining}\n ref={ref}\n className={cnb(\"rmd-form-message-container\", className)}\n >\n {children}\n <FormMessage {...messageProps} />\n </div>\n );\n});\n"],"names":["cnb","forwardRef","FormMessage","FormMessageContainer","props","ref","className","children","messageProps","remaining","div"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAA6B,QAAQ;AAExD,SAASC,WAAW,QAAQ,mBAAmB;AAgB/C;;;;;;CAMC,GACD,OAAO,MAAMC,qCAAuBF,WAGlC,SAASE,qBAAqBC,KAAK,EAAEC,GAAG;IACxC,MAAM,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,YAAY,EAAE,GAAGC,WAAW,GAAGL;IAC5D,IAAI,CAACI,cAAc;QACjB,qBAAO;sBAAGD;;IACZ;IAEA,qBACE,MAACG;QACE,GAAGD,SAAS;QACbJ,KAAKA;QACLC,WAAWN,IAAI,8BAA8BM;;YAE5CC;0BACD,KAACL;gBAAa,GAAGM,YAAY;;;;AAGnC,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/form/FormMessageCounter.tsx"],"sourcesContent":["import { type HTMLAttributes, type ReactElement, type ReactNode } from \"react\";\nimport { formMessageCounter } from \"./formMessageStyles.js\";\n\n/** @since 2.9.0 */\nexport interface FormMessageCounterProps\n extends HTMLAttributes<HTMLSpanElement> {\n /**\n * The children to display in the counter. This is normally a string like:\n *\n * @example String Example\n * ```ts\n * `${min} / ${max}`\n * ```\n */\n children: ReactNode;\n}\n\n/**\n * **Server Component**\n *\n * This component can be used to create a \"counter\" within the\n * {@link FormMessage} component.\n *\n * Note: This is really only useful when using the {@link FormMessage} component\n * without a {@link TextField}.\n *\n * @example Example Usage\n * ```ts\n * interface ExampleProps {\n * min: number;\n * max: number;\n * }\n *\n * function Example({ min, max }: ExampleProps) {\n * return (\n * <FormMessage disableWrap>\n * <FormMessageCounter>\n * {`${min} / ${max}`}\n * </FormMessageCounter>\n * </FormMessage>\n * );\n * }\n * ```\n *\n * @since 2.9.0\n */\nexport function FormMessageCounter(\n props: FormMessageCounterProps\n): ReactElement {\n const { children, className, ...remaining } = props;\n\n return (\n <span {...remaining} className={formMessageCounter({ className })}>\n {children}\n </span>\n );\n}\n"],"names":["formMessageCounter","FormMessageCounter","props","children","className","remaining","span"],"
|
|
1
|
+
{"version":3,"sources":["../../src/form/FormMessageCounter.tsx"],"sourcesContent":["import { type HTMLAttributes, type ReactElement, type ReactNode } from \"react\";\nimport { formMessageCounter } from \"./formMessageStyles.js\";\n\n/** @since 2.9.0 */\nexport interface FormMessageCounterProps\n extends HTMLAttributes<HTMLSpanElement> {\n /**\n * The children to display in the counter. This is normally a string like:\n *\n * @example String Example\n * ```ts\n * `${min} / ${max}`\n * ```\n */\n children: ReactNode;\n}\n\n/**\n * **Server Component**\n *\n * This component can be used to create a \"counter\" within the\n * {@link FormMessage} component.\n *\n * Note: This is really only useful when using the {@link FormMessage} component\n * without a {@link TextField}.\n *\n * @example Example Usage\n * ```ts\n * interface ExampleProps {\n * min: number;\n * max: number;\n * }\n *\n * function Example({ min, max }: ExampleProps) {\n * return (\n * <FormMessage disableWrap>\n * <FormMessageCounter>\n * {`${min} / ${max}`}\n * </FormMessageCounter>\n * </FormMessage>\n * );\n * }\n * ```\n *\n * @since 2.9.0\n */\nexport function FormMessageCounter(\n props: FormMessageCounterProps\n): ReactElement {\n const { children, className, ...remaining } = props;\n\n return (\n <span {...remaining} className={formMessageCounter({ className })}>\n {children}\n </span>\n );\n}\n"],"names":["formMessageCounter","FormMessageCounter","props","children","className","remaining","span"],"mappings":";AACA,SAASA,kBAAkB,QAAQ,yBAAyB;AAgB5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BC,GACD,OAAO,SAASC,mBACdC,KAA8B;IAE9B,MAAM,EAAEC,QAAQ,EAAEC,SAAS,EAAE,GAAGC,WAAW,GAAGH;IAE9C,qBACE,KAACI;QAAM,GAAGD,SAAS;QAAED,WAAWJ,mBAAmB;YAAEI;QAAU;kBAC5DD;;AAGP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/form/InputToggle.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport {\n forwardRef,\n type CSSProperties,\n type HTMLAttributes,\n type InputHTMLAttributes,\n type LabelHTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { useElementInteraction } from \"../interaction/useElementInteraction.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { FormMessageContainer } from \"./FormMessageContainer.js\";\nimport { InputToggleIcon } from \"./InputToggleIcon.js\";\nimport { Label } from \"./Label.js\";\nimport { type InputToggleSize } from \"./inputToggleStyles.js\";\nimport {\n type FormComponentStates,\n type FormMessageContainerExtension,\n} from \"./types.js\";\n\n/**\n * @since 6.0.0\n */\nexport interface InputToggleIconProps {\n /**\n * @see {@link InputToggleSize}\n * @defaultValue `\"normal\"`\n */\n size?: InputToggleSize;\n\n /**\n * The icon to use while unchecked. This defaults to the unchecked\n * checkbox/radio icon from the `ICON_CONFIG`.\n *\n * @defaultValue `getIcon(props.type)`\n */\n icon?: ReactNode;\n\n /**\n * The icon to use while unchecked. This defaults to the unchecked\n * checkbox/radio icon from the `ICON_CONFIG`.\n *\n * @defaultValue `getIcon(``${props.type}Checked``)`\n */\n checkedIcon?: ReactNode;\n\n /**\n * Any props that should be passed to the `<span>` that surrounds the current\n * icon element.\n */\n iconProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;\n\n /**\n * Optional style to set on the `<span>` that surrounds the current icon\n * element.\n */\n iconStyle?: CSSProperties;\n\n /**\n * Optional className to set on the `<span>` that surrounds the current icon\n * element.\n */\n iconClassName?: string;\n}\n\n/**\n * @since 6.0.0\n */\nexport interface InputToggleLabelProps {\n /**\n * An optional label to display with the checkbox. If this is omitted, it is\n * recommended to provide an `aria-label` for accessibility.\n */\n label?: ReactNode;\n\n /**\n * Any props that should be passed to the `<Label>` component.\n *\n * Note: If `style` or `className` are provided in this object, they will be\n * ignored. Use the top-level `style` and `className` props instead.\n *\n * @example\n * ```\n * // bad\n * labelProps={{\n * \"aria-label\": \"checkbox\",\n * style: { color: \"red\" },\n * className: \"custom\"\n * }}\n *\n * // good\n * style={{ color: \"red\" }}\n * className=\"custom\"\n * labelProps={{\n * \"aria-label\": \"checkbox\",\n * }}\n * ```\n */\n labelProps?: PropsWithRef<\n LabelHTMLAttributes<HTMLLabelElement>,\n HTMLLabelElement\n >;\n\n /**\n * @see {@link LabelClassNameOptions.gap}\n * @defaultValue `false`\n */\n disableLabelGap?: boolean;\n\n /**\n * Set this to `true` to swap the position of the {@link label} and the current\n * icon. This prop can be used with the {@link stacked} prop to change the\n * position if the icon and label:\n *\n * ____________________________________\n * | stacked | iconAfter | position |\n * ____________________________________\n * | | | icon label |\n * ____________________________________\n * | | X | label icon |\n * ____________________________________\n * | X | | icon |\n * | | | label |\n * ____________________________________\n * | X | X | label |\n * | | | icon |\n * ____________________________________\n *\n *\n * @defaultValue `false`\n */\n iconAfter?: boolean;\n\n /**\n * Set this to `true` if the label should be stacked instead of inline with\n * the current icon.\n *\n * @see {@link iconAfter}\n * @defaultValue `false`\n */\n stacked?: boolean;\n}\n\n/**\n * @since 6.0.0\n */\nexport interface BaseInputToggleProps\n extends Omit<InputHTMLAttributes<HTMLInputElement>, \"size\">,\n FormMessageContainerExtension,\n FormComponentStates,\n InputToggleIconProps,\n InputToggleLabelProps {\n /**\n * @see https://stackoverflow.com/questions/5985839/bug-with-firefox-disabled-attribute-of-input-not-resetting-when-refreshing\n * @defaultValue `type === \"checkbox\" ? \"off\" : undefined`\n */\n autoComplete?: string;\n}\n\n/**\n * @since 2.8.5\n * @since 6.0.0 Removed the `aria-controls` prop and added the\n * `indeterminateIcon` prop.\n */\nexport interface IndeterminateCheckboxProps {\n /**\n * Set this value to `true` if the checkbox is in an \"indeterminate\" state:\n *\n * - this checkbox controls the select all/select none behavior of other\n * checkboxes in a group\n * - at least one of the checkboxes have been checked\n * - the `checked` prop for this Checkbox should also be `true`\n *\n * You should normally use the `useCheckboxGroup` hook to handle this\n * behavior.\n *\n * @defaultValue `false`\n */\n indeterminate?: boolean;\n\n /**\n * The icon to display when the checkbox is checked and the\n * {@link indeterminate} prop is `true`.\n *\n * @defaultValue `getIcon(\"checkboxIndeterminate\")`\n * @since 6.0.0\n */\n indeterminateIcon?: ReactNode;\n}\n\nexport interface CheckboxProps\n extends BaseInputToggleProps,\n IndeterminateCheckboxProps {}\n\n/** @since 6.0.0 */\nexport interface CheckboxInputToggleProps extends CheckboxProps {\n type: \"checkbox\";\n}\n\nexport interface RadioProps extends BaseInputToggleProps {\n /**\n * The value for the radio button.\n *\n * @since 6.0.0 This is now optional and no longer supports\n * `string[]` since there isn't much of a use case for array values.\n */\n value?: string | number;\n}\n\n/** @since 6.0.0 */\nexport interface RadioInputToggleProps extends RadioProps {\n type: \"radio\";\n}\n\n/**\n * @since 6.0.0 Updated to be a union between\n * `CheckboxInputToggleProps` and `RadioInputToggleProps`\n */\nexport type InputToggleProps = CheckboxInputToggleProps | RadioInputToggleProps;\n\n/**\n * **Client Component**\n *\n * @since 6.0.0 Now supports the `FormMessage` behavior and requires\n * different icons for each checked state.\n */\nexport const InputToggle = forwardRef<HTMLInputElement, InputToggleProps>(\n function InputToggle(props, ref) {\n const {\n id: propId,\n type,\n label,\n labelProps,\n style,\n className,\n autoComplete = type === \"checkbox\" ? \"off\" : undefined,\n disableLabelGap = false,\n stacked = false,\n iconAfter = false,\n size = \"normal\",\n error = false,\n active = false,\n indeterminate = false,\n messageProps,\n messageContainerProps,\n icon,\n checkedIcon,\n indeterminateIcon,\n iconProps,\n iconStyle,\n iconClassName,\n onBlur,\n onClick,\n onKeyDown,\n onKeyUp,\n onMouseDown,\n onMouseLeave,\n onDragStart,\n onMouseUp,\n onTouchEnd,\n onTouchMove,\n onTouchStart,\n ...remaining\n } = props as CheckboxInputToggleProps;\n const { disabled = false, checked } = props;\n\n const id = useEnsuredId(propId, type);\n const { pressedClassName, ripples, handlers } = useElementInteraction({\n disabled,\n onBlur,\n onClick,\n onKeyDown,\n onKeyUp,\n onMouseDown,\n onMouseLeave,\n onDragStart,\n onMouseUp,\n onTouchEnd,\n onTouchMove,\n onTouchStart,\n });\n\n // set on the `remaining` object to bypass the eslint rule about\n // aria-checked not being valid for textbox role\n remaining[\"aria-checked\"] =\n remaining[\"aria-checked\"] ?? indeterminate ? \"mixed\" : undefined;\n\n return (\n <FormMessageContainer\n {...messageContainerProps}\n messageProps={messageProps}\n >\n <Label\n {...labelProps}\n gap={!disableLabelGap}\n style={style}\n stacked={stacked}\n reversed={!iconAfter}\n active={active}\n error={error}\n disabled={disabled}\n className={className}\n >\n {label}\n <InputToggleIcon\n style={iconStyle}\n {...iconProps}\n className={cnb(\n pressedClassName,\n iconClassName,\n iconProps?.className\n )}\n error={error}\n checked={checked}\n disabled={disabled}\n size={size}\n type={type}\n icon={icon}\n checkedIcon={checkedIcon}\n indeterminate={indeterminate}\n indeterminateIcon={indeterminateIcon}\n >\n <input\n {...remaining}\n {...handlers}\n autoComplete={autoComplete}\n id={id}\n ref={ref}\n type={type}\n className=\"rmd-hidden-input\"\n />\n {ripples}\n </InputToggleIcon>\n </Label>\n </FormMessageContainer>\n );\n }\n);\n"],"names":["cnb","forwardRef","useElementInteraction","useEnsuredId","FormMessageContainer","InputToggleIcon","Label","InputToggle","props","ref","id","propId","type","label","labelProps","style","className","autoComplete","undefined","disableLabelGap","stacked","iconAfter","size","error","active","indeterminate","messageProps","messageContainerProps","icon","checkedIcon","indeterminateIcon","iconProps","iconStyle","iconClassName","onBlur","onClick","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onDragStart","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","remaining","disabled","checked","pressedClassName","ripples","handlers","gap","reversed","input"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;AACA,SAASA,GAAG,QAAQ,YAAY;AAChC,SACEC,UAAU,QAML,QAAQ;AACf,SAASC,qBAAqB,QAAQ,0CAA0C;AAEhF,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,oBAAoB,QAAQ,4BAA4B;AACjE,SAASC,eAAe,QAAQ,uBAAuB;AACvD,SAASC,KAAK,QAAQ,aAAa;AA+MnC;;;;;CAKC,GACD,OAAO,MAAMC,4BAAcN,WACzB,SAASM,YAAYC,KAAK,EAAEC,GAAG;IAC7B,MAAM,EACJC,IAAIC,MAAM,EACVC,IAAI,EACJC,KAAK,EACLC,UAAU,EACVC,KAAK,EACLC,SAAS,EACTC,eAAeL,SAAS,aAAa,QAAQM,SAAS,EACtDC,kBAAkB,KAAK,EACvBC,UAAU,KAAK,EACfC,YAAY,KAAK,EACjBC,OAAO,QAAQ,EACfC,QAAQ,KAAK,EACbC,SAAS,KAAK,EACdC,gBAAgB,KAAK,EACrBC,YAAY,EACZC,qBAAqB,EACrBC,IAAI,EACJC,WAAW,EACXC,iBAAiB,EACjBC,SAAS,EACTC,SAAS,EACTC,aAAa,EACbC,MAAM,EACNC,OAAO,EACPC,SAAS,EACTC,OAAO,EACPC,WAAW,EACXC,YAAY,EACZC,WAAW,EACXC,SAAS,EACTC,UAAU,EACVC,WAAW,EACXC,YAAY,EACZ,GAAGC,WACJ,GAAGrC;IACJ,MAAM,EAAEsC,WAAW,KAAK,EAAEC,OAAO,EAAE,GAAGvC;IAEtC,MAAME,KAAKP,aAAaQ,QAAQC;IAChC,MAAM,EAAEoC,gBAAgB,EAAEC,OAAO,EAAEC,QAAQ,EAAE,GAAGhD,sBAAsB;QACpE4C;QACAZ;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;IACF;IAEA,gEAAgE;IAChE,gDAAgD;IAChDC,SAAS,CAAC,eAAe,GACvBA,SAAS,CAAC,eAAe,IAAIpB,gBAAgB,UAAUP;IAEzD,qBACE,KAACd;QACE,GAAGuB,qBAAqB;QACzBD,cAAcA;kBAEd,cAAA,MAACpB;YACE,GAAGQ,UAAU;YACdqC,KAAK,CAAChC;YACNJ,OAAOA;YACPK,SAASA;YACTgC,UAAU,CAAC/B;YACXG,QAAQA;YACRD,OAAOA;YACPuB,UAAUA;YACV9B,WAAWA;;gBAEVH;8BACD,MAACR;oBACCU,OAAOiB;oBACN,GAAGD,SAAS;oBACbf,WAAWhB,IACTgD,kBACAf,eACAF,WAAWf;oBAEbO,OAAOA;oBACPwB,SAASA;oBACTD,UAAUA;oBACVxB,MAAMA;oBACNV,MAAMA;oBACNgB,MAAMA;oBACNC,aAAaA;oBACbJ,eAAeA;oBACfK,mBAAmBA;;sCAEnB,KAACuB;4BACE,GAAGR,SAAS;4BACZ,GAAGK,QAAQ;4BACZjC,cAAcA;4BACdP,IAAIA;4BACJD,KAAKA;4BACLG,MAAMA;4BACNI,WAAU;;wBAEXiC;;;;;;AAKX,GACA"}
|
|
1
|
+
{"version":3,"sources":["../../src/form/InputToggle.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport {\n forwardRef,\n type CSSProperties,\n type HTMLAttributes,\n type InputHTMLAttributes,\n type LabelHTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { useElementInteraction } from \"../interaction/useElementInteraction.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { FormMessageContainer } from \"./FormMessageContainer.js\";\nimport { InputToggleIcon } from \"./InputToggleIcon.js\";\nimport { Label } from \"./Label.js\";\nimport { type InputToggleSize } from \"./inputToggleStyles.js\";\nimport {\n type FormComponentStates,\n type FormMessageContainerExtension,\n} from \"./types.js\";\n\n/**\n * @since 6.0.0\n */\nexport interface InputToggleIconProps {\n /**\n * @see {@link InputToggleSize}\n * @defaultValue `\"normal\"`\n */\n size?: InputToggleSize;\n\n /**\n * The icon to use while unchecked. This defaults to the unchecked\n * checkbox/radio icon from the `ICON_CONFIG`.\n *\n * @defaultValue `getIcon(props.type)`\n */\n icon?: ReactNode;\n\n /**\n * The icon to use while unchecked. This defaults to the unchecked\n * checkbox/radio icon from the `ICON_CONFIG`.\n *\n * @defaultValue `getIcon(``${props.type}Checked``)`\n */\n checkedIcon?: ReactNode;\n\n /**\n * Any props that should be passed to the `<span>` that surrounds the current\n * icon element.\n */\n iconProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;\n\n /**\n * Optional style to set on the `<span>` that surrounds the current icon\n * element.\n */\n iconStyle?: CSSProperties;\n\n /**\n * Optional className to set on the `<span>` that surrounds the current icon\n * element.\n */\n iconClassName?: string;\n}\n\n/**\n * @since 6.0.0\n */\nexport interface InputToggleLabelProps {\n /**\n * An optional label to display with the checkbox. If this is omitted, it is\n * recommended to provide an `aria-label` for accessibility.\n */\n label?: ReactNode;\n\n /**\n * Any props that should be passed to the `<Label>` component.\n *\n * Note: If `style` or `className` are provided in this object, they will be\n * ignored. Use the top-level `style` and `className` props instead.\n *\n * @example\n * ```\n * // bad\n * labelProps={{\n * \"aria-label\": \"checkbox\",\n * style: { color: \"red\" },\n * className: \"custom\"\n * }}\n *\n * // good\n * style={{ color: \"red\" }}\n * className=\"custom\"\n * labelProps={{\n * \"aria-label\": \"checkbox\",\n * }}\n * ```\n */\n labelProps?: PropsWithRef<\n LabelHTMLAttributes<HTMLLabelElement>,\n HTMLLabelElement\n >;\n\n /**\n * @see {@link LabelClassNameOptions.gap}\n * @defaultValue `false`\n */\n disableLabelGap?: boolean;\n\n /**\n * Set this to `true` to swap the position of the {@link label} and the current\n * icon. This prop can be used with the {@link stacked} prop to change the\n * position if the icon and label:\n *\n * ____________________________________\n * | stacked | iconAfter | position |\n * ____________________________________\n * | | | icon label |\n * ____________________________________\n * | | X | label icon |\n * ____________________________________\n * | X | | icon |\n * | | | label |\n * ____________________________________\n * | X | X | label |\n * | | | icon |\n * ____________________________________\n *\n *\n * @defaultValue `false`\n */\n iconAfter?: boolean;\n\n /**\n * Set this to `true` if the label should be stacked instead of inline with\n * the current icon.\n *\n * @see {@link iconAfter}\n * @defaultValue `false`\n */\n stacked?: boolean;\n}\n\n/**\n * @since 6.0.0\n */\nexport interface BaseInputToggleProps\n extends Omit<InputHTMLAttributes<HTMLInputElement>, \"size\">,\n FormMessageContainerExtension,\n FormComponentStates,\n InputToggleIconProps,\n InputToggleLabelProps {\n /**\n * @see https://stackoverflow.com/questions/5985839/bug-with-firefox-disabled-attribute-of-input-not-resetting-when-refreshing\n * @defaultValue `type === \"checkbox\" ? \"off\" : undefined`\n */\n autoComplete?: string;\n}\n\n/**\n * @since 2.8.5\n * @since 6.0.0 Removed the `aria-controls` prop and added the\n * `indeterminateIcon` prop.\n */\nexport interface IndeterminateCheckboxProps {\n /**\n * Set this value to `true` if the checkbox is in an \"indeterminate\" state:\n *\n * - this checkbox controls the select all/select none behavior of other\n * checkboxes in a group\n * - at least one of the checkboxes have been checked\n * - the `checked` prop for this Checkbox should also be `true`\n *\n * You should normally use the `useCheckboxGroup` hook to handle this\n * behavior.\n *\n * @defaultValue `false`\n */\n indeterminate?: boolean;\n\n /**\n * The icon to display when the checkbox is checked and the\n * {@link indeterminate} prop is `true`.\n *\n * @defaultValue `getIcon(\"checkboxIndeterminate\")`\n * @since 6.0.0\n */\n indeterminateIcon?: ReactNode;\n}\n\nexport interface CheckboxProps\n extends BaseInputToggleProps,\n IndeterminateCheckboxProps {}\n\n/** @since 6.0.0 */\nexport interface CheckboxInputToggleProps extends CheckboxProps {\n type: \"checkbox\";\n}\n\nexport interface RadioProps extends BaseInputToggleProps {\n /**\n * The value for the radio button.\n *\n * @since 6.0.0 This is now optional and no longer supports\n * `string[]` since there isn't much of a use case for array values.\n */\n value?: string | number;\n}\n\n/** @since 6.0.0 */\nexport interface RadioInputToggleProps extends RadioProps {\n type: \"radio\";\n}\n\n/**\n * @since 6.0.0 Updated to be a union between\n * `CheckboxInputToggleProps` and `RadioInputToggleProps`\n */\nexport type InputToggleProps = CheckboxInputToggleProps | RadioInputToggleProps;\n\n/**\n * **Client Component**\n *\n * @since 6.0.0 Now supports the `FormMessage` behavior and requires\n * different icons for each checked state.\n */\nexport const InputToggle = forwardRef<HTMLInputElement, InputToggleProps>(\n function InputToggle(props, ref) {\n const {\n id: propId,\n type,\n label,\n labelProps,\n style,\n className,\n autoComplete = type === \"checkbox\" ? \"off\" : undefined,\n disableLabelGap = false,\n stacked = false,\n iconAfter = false,\n size = \"normal\",\n error = false,\n active = false,\n indeterminate = false,\n messageProps,\n messageContainerProps,\n icon,\n checkedIcon,\n indeterminateIcon,\n iconProps,\n iconStyle,\n iconClassName,\n onBlur,\n onClick,\n onKeyDown,\n onKeyUp,\n onMouseDown,\n onMouseLeave,\n onDragStart,\n onMouseUp,\n onTouchEnd,\n onTouchMove,\n onTouchStart,\n ...remaining\n } = props as CheckboxInputToggleProps;\n const { disabled = false, checked } = props;\n\n const id = useEnsuredId(propId, type);\n const { pressedClassName, ripples, handlers } = useElementInteraction({\n disabled,\n onBlur,\n onClick,\n onKeyDown,\n onKeyUp,\n onMouseDown,\n onMouseLeave,\n onDragStart,\n onMouseUp,\n onTouchEnd,\n onTouchMove,\n onTouchStart,\n });\n\n // set on the `remaining` object to bypass the eslint rule about\n // aria-checked not being valid for textbox role\n remaining[\"aria-checked\"] =\n remaining[\"aria-checked\"] ?? indeterminate ? \"mixed\" : undefined;\n\n return (\n <FormMessageContainer\n {...messageContainerProps}\n messageProps={messageProps}\n >\n <Label\n {...labelProps}\n gap={!disableLabelGap}\n style={style}\n stacked={stacked}\n reversed={!iconAfter}\n active={active}\n error={error}\n disabled={disabled}\n className={className}\n >\n {label}\n <InputToggleIcon\n style={iconStyle}\n {...iconProps}\n className={cnb(\n pressedClassName,\n iconClassName,\n iconProps?.className\n )}\n error={error}\n checked={checked}\n disabled={disabled}\n size={size}\n type={type}\n icon={icon}\n checkedIcon={checkedIcon}\n indeterminate={indeterminate}\n indeterminateIcon={indeterminateIcon}\n >\n <input\n {...remaining}\n {...handlers}\n autoComplete={autoComplete}\n id={id}\n ref={ref}\n type={type}\n className=\"rmd-hidden-input\"\n />\n {ripples}\n </InputToggleIcon>\n </Label>\n </FormMessageContainer>\n );\n }\n);\n"],"names":["cnb","forwardRef","useElementInteraction","useEnsuredId","FormMessageContainer","InputToggleIcon","Label","InputToggle","props","ref","id","propId","type","label","labelProps","style","className","autoComplete","undefined","disableLabelGap","stacked","iconAfter","size","error","active","indeterminate","messageProps","messageContainerProps","icon","checkedIcon","indeterminateIcon","iconProps","iconStyle","iconClassName","onBlur","onClick","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onDragStart","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","remaining","disabled","checked","pressedClassName","ripples","handlers","gap","reversed","input"],"mappings":"AAAA;;AACA,SAASA,GAAG,QAAQ,YAAY;AAChC,SACEC,UAAU,QAML,QAAQ;AACf,SAASC,qBAAqB,QAAQ,0CAA0C;AAEhF,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,oBAAoB,QAAQ,4BAA4B;AACjE,SAASC,eAAe,QAAQ,uBAAuB;AACvD,SAASC,KAAK,QAAQ,aAAa;AA+MnC;;;;;CAKC,GACD,OAAO,MAAMC,4BAAcN,WACzB,SAASM,YAAYC,KAAK,EAAEC,GAAG;IAC7B,MAAM,EACJC,IAAIC,MAAM,EACVC,IAAI,EACJC,KAAK,EACLC,UAAU,EACVC,KAAK,EACLC,SAAS,EACTC,eAAeL,SAAS,aAAa,QAAQM,SAAS,EACtDC,kBAAkB,KAAK,EACvBC,UAAU,KAAK,EACfC,YAAY,KAAK,EACjBC,OAAO,QAAQ,EACfC,QAAQ,KAAK,EACbC,SAAS,KAAK,EACdC,gBAAgB,KAAK,EACrBC,YAAY,EACZC,qBAAqB,EACrBC,IAAI,EACJC,WAAW,EACXC,iBAAiB,EACjBC,SAAS,EACTC,SAAS,EACTC,aAAa,EACbC,MAAM,EACNC,OAAO,EACPC,SAAS,EACTC,OAAO,EACPC,WAAW,EACXC,YAAY,EACZC,WAAW,EACXC,SAAS,EACTC,UAAU,EACVC,WAAW,EACXC,YAAY,EACZ,GAAGC,WACJ,GAAGrC;IACJ,MAAM,EAAEsC,WAAW,KAAK,EAAEC,OAAO,EAAE,GAAGvC;IAEtC,MAAME,KAAKP,aAAaQ,QAAQC;IAChC,MAAM,EAAEoC,gBAAgB,EAAEC,OAAO,EAAEC,QAAQ,EAAE,GAAGhD,sBAAsB;QACpE4C;QACAZ;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;IACF;IAEA,gEAAgE;IAChE,gDAAgD;IAChDC,SAAS,CAAC,eAAe,GACvBA,SAAS,CAAC,eAAe,IAAIpB,gBAAgB,UAAUP;IAEzD,qBACE,KAACd;QACE,GAAGuB,qBAAqB;QACzBD,cAAcA;kBAEd,cAAA,MAACpB;YACE,GAAGQ,UAAU;YACdqC,KAAK,CAAChC;YACNJ,OAAOA;YACPK,SAASA;YACTgC,UAAU,CAAC/B;YACXG,QAAQA;YACRD,OAAOA;YACPuB,UAAUA;YACV9B,WAAWA;;gBAEVH;8BACD,MAACR;oBACCU,OAAOiB;oBACN,GAAGD,SAAS;oBACbf,WAAWhB,IACTgD,kBACAf,eACAF,WAAWf;oBAEbO,OAAOA;oBACPwB,SAASA;oBACTD,UAAUA;oBACVxB,MAAMA;oBACNV,MAAMA;oBACNgB,MAAMA;oBACNC,aAAaA;oBACbJ,eAAeA;oBACfK,mBAAmBA;;sCAEnB,KAACuB;4BACE,GAAGR,SAAS;4BACZ,GAAGK,QAAQ;4BACZjC,cAAcA;4BACdP,IAAIA;4BACJD,KAAKA;4BACLG,MAAMA;4BACNI,WAAU;;wBAEXiC;;;;;;AAKX,GACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/form/InputToggleIcon.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport { getIcon } from \"../icon/iconConfig.js\";\nimport { FORM_CONFIG } from \"./formConfig.js\";\nimport { inputToggle, type InputToggleSize } from \"./inputToggleStyles.js\";\n\n/**\n * @since 2.8.0\n * @since 6.0.0 Removed the `circle` and `overlay` props since they are no\n * longer needed. Added the `icon`, `disableEm`, `checkedIcon` and\n * `indeterminateIcon` props.\n * @internal\n */\nexport interface InputToggleIconProps extends HTMLAttributes<HTMLSpanElement> {\n type: \"checkbox\" | \"radio\";\n /**\n * Note: If this is `undefined` and the {@link FORM_CONFIG.uncontrolledToggles} is `false`,\n * the icon state won't work.\n */\n checked?: boolean;\n\n /**\n * The icon to display while {@link checked} is `false`.\n */\n icon?: ReactNode;\n\n /**\n * The icon to display while {@link checked} is `true` and\n * {@link indeterminate} is `false`.\n */\n checkedIcon?: ReactNode;\n\n /**\n * The icon to display while both {@link checked} and {@link indeterminate}\n * are `true`.\n */\n indeterminateIcon?: ReactNode;\n\n /** @defaultValue `\"normal\"` */\n size?: InputToggleSize;\n\n /** @defaultValue `false` */\n error?: boolean;\n\n /** @defaultValue `false` */\n disabled?: boolean;\n\n /** @defaultValue `false` */\n disableEm?: boolean;\n\n /** @defaultValue `false` */\n indeterminate?: boolean;\n}\n\n/**\n * **Server Component**\n *\n * @since 2.8.0\n * @since 6.0.0 Updated to use different icons for each checked state instead\n * of a css overlay hack.\n * @internal\n */\nexport const InputToggleIcon = forwardRef<\n HTMLSpanElement,\n InputToggleIconProps\n>(function InputToggleIcon(props, ref) {\n const {\n type,\n size = \"normal\",\n icon: propIcon,\n error,\n checked,\n children,\n disabled,\n indeterminate,\n className,\n disableEm = false,\n checkedIcon: propCheckedIcon,\n indeterminateIcon: propIndeterminateIcon,\n ...remaining\n } = props;\n const uncheckedIcon = getIcon(type, propIcon);\n const checkedIcon = getIcon(`${type}Checked`, propCheckedIcon);\n const indeterminateIcon = getIcon(\n \"checkboxIndeterminate\",\n propIndeterminateIcon\n );\n\n let icon: ReactNode;\n let active = false;\n const uncontrolled = typeof checked !== \"boolean\";\n if (!uncontrolled || !FORM_CONFIG.uncontrolledToggles) {\n active = !!checked && !error;\n icon = checked\n ? indeterminate\n ? indeterminateIcon\n : checkedIcon\n : uncheckedIcon;\n } else {\n icon = (\n <>\n {uncheckedIcon}\n {indeterminate ? indeterminateIcon : checkedIcon}\n </>\n );\n }\n\n return (\n <span\n {...remaining}\n ref={ref}\n className={cnb(\n inputToggle({\n em: !disableEm,\n size,\n type,\n error,\n active,\n disabled,\n uncontrolled,\n className,\n })\n )}\n >\n {children}\n {icon}\n </span>\n );\n});\n"],"names":["cnb","forwardRef","getIcon","FORM_CONFIG","inputToggle","InputToggleIcon","props","ref","type","size","icon","propIcon","error","checked","children","disabled","indeterminate","className","disableEm","checkedIcon","propCheckedIcon","indeterminateIcon","propIndeterminateIcon","remaining","uncheckedIcon","active","uncontrolled","uncontrolledToggles","span","em"],"
|
|
1
|
+
{"version":3,"sources":["../../src/form/InputToggleIcon.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport { getIcon } from \"../icon/iconConfig.js\";\nimport { FORM_CONFIG } from \"./formConfig.js\";\nimport { inputToggle, type InputToggleSize } from \"./inputToggleStyles.js\";\n\n/**\n * @since 2.8.0\n * @since 6.0.0 Removed the `circle` and `overlay` props since they are no\n * longer needed. Added the `icon`, `disableEm`, `checkedIcon` and\n * `indeterminateIcon` props.\n * @internal\n */\nexport interface InputToggleIconProps extends HTMLAttributes<HTMLSpanElement> {\n type: \"checkbox\" | \"radio\";\n /**\n * Note: If this is `undefined` and the {@link FORM_CONFIG.uncontrolledToggles} is `false`,\n * the icon state won't work.\n */\n checked?: boolean;\n\n /**\n * The icon to display while {@link checked} is `false`.\n */\n icon?: ReactNode;\n\n /**\n * The icon to display while {@link checked} is `true` and\n * {@link indeterminate} is `false`.\n */\n checkedIcon?: ReactNode;\n\n /**\n * The icon to display while both {@link checked} and {@link indeterminate}\n * are `true`.\n */\n indeterminateIcon?: ReactNode;\n\n /** @defaultValue `\"normal\"` */\n size?: InputToggleSize;\n\n /** @defaultValue `false` */\n error?: boolean;\n\n /** @defaultValue `false` */\n disabled?: boolean;\n\n /** @defaultValue `false` */\n disableEm?: boolean;\n\n /** @defaultValue `false` */\n indeterminate?: boolean;\n}\n\n/**\n * **Server Component**\n *\n * @since 2.8.0\n * @since 6.0.0 Updated to use different icons for each checked state instead\n * of a css overlay hack.\n * @internal\n */\nexport const InputToggleIcon = forwardRef<\n HTMLSpanElement,\n InputToggleIconProps\n>(function InputToggleIcon(props, ref) {\n const {\n type,\n size = \"normal\",\n icon: propIcon,\n error,\n checked,\n children,\n disabled,\n indeterminate,\n className,\n disableEm = false,\n checkedIcon: propCheckedIcon,\n indeterminateIcon: propIndeterminateIcon,\n ...remaining\n } = props;\n const uncheckedIcon = getIcon(type, propIcon);\n const checkedIcon = getIcon(`${type}Checked`, propCheckedIcon);\n const indeterminateIcon = getIcon(\n \"checkboxIndeterminate\",\n propIndeterminateIcon\n );\n\n let icon: ReactNode;\n let active = false;\n const uncontrolled = typeof checked !== \"boolean\";\n if (!uncontrolled || !FORM_CONFIG.uncontrolledToggles) {\n active = !!checked && !error;\n icon = checked\n ? indeterminate\n ? indeterminateIcon\n : checkedIcon\n : uncheckedIcon;\n } else {\n icon = (\n <>\n {uncheckedIcon}\n {indeterminate ? indeterminateIcon : checkedIcon}\n </>\n );\n }\n\n return (\n <span\n {...remaining}\n ref={ref}\n className={cnb(\n inputToggle({\n em: !disableEm,\n size,\n type,\n error,\n active,\n disabled,\n uncontrolled,\n className,\n })\n )}\n >\n {children}\n {icon}\n </span>\n );\n});\n"],"names":["cnb","forwardRef","getIcon","FORM_CONFIG","inputToggle","InputToggleIcon","props","ref","type","size","icon","propIcon","error","checked","children","disabled","indeterminate","className","disableEm","checkedIcon","propCheckedIcon","indeterminateIcon","propIndeterminateIcon","remaining","uncheckedIcon","active","uncontrolled","uncontrolledToggles","span","em"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAA6C,QAAQ;AACxE,SAASC,OAAO,QAAQ,wBAAwB;AAChD,SAASC,WAAW,QAAQ,kBAAkB;AAC9C,SAASC,WAAW,QAA8B,yBAAyB;AAkD3E;;;;;;;CAOC,GACD,OAAO,MAAMC,gCAAkBJ,WAG7B,SAASI,gBAAgBC,KAAK,EAAEC,GAAG;IACnC,MAAM,EACJC,IAAI,EACJC,OAAO,QAAQ,EACfC,MAAMC,QAAQ,EACdC,KAAK,EACLC,OAAO,EACPC,QAAQ,EACRC,QAAQ,EACRC,aAAa,EACbC,SAAS,EACTC,YAAY,KAAK,EACjBC,aAAaC,eAAe,EAC5BC,mBAAmBC,qBAAqB,EACxC,GAAGC,WACJ,GAAGjB;IACJ,MAAMkB,gBAAgBtB,QAAQM,MAAMG;IACpC,MAAMQ,cAAcjB,QAAQ,CAAC,EAAEM,KAAK,OAAO,CAAC,EAAEY;IAC9C,MAAMC,oBAAoBnB,QACxB,yBACAoB;IAGF,IAAIZ;IACJ,IAAIe,SAAS;IACb,MAAMC,eAAe,OAAOb,YAAY;IACxC,IAAI,CAACa,gBAAgB,CAACvB,YAAYwB,mBAAmB,EAAE;QACrDF,SAAS,CAAC,CAACZ,WAAW,CAACD;QACvBF,OAAOG,UACHG,gBACEK,oBACAF,cACFK;IACN,OAAO;QACLd,qBACE;;gBACGc;gBACAR,gBAAgBK,oBAAoBF;;;IAG3C;IAEA,qBACE,MAACS;QACE,GAAGL,SAAS;QACbhB,KAAKA;QACLU,WAAWjB,IACTI,YAAY;YACVyB,IAAI,CAACX;YACLT;YACAD;YACAI;YACAa;YACAV;YACAW;YACAT;QACF;;YAGDH;YACAJ;;;AAGP,GAAG"}
|
package/dist/form/Label.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/form/Label.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { forwardRef } from \"react\";\nimport { type TextColor, type ThemeColor, cssUtils } from \"../cssUtils.js\";\nimport { bem } from \"../utils/bem.js\";\nimport { type LabelClassNameOptions, type LabelProps } from \"./types.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-label-floating-top\"?: string | number;\n \"--rmd-label-left-offset\"?: string | number;\n \"--rmd-label-top-offset\"?: string | number;\n \"--rmd-label-active-padding\"?: string | number;\n \"--rmd-label-active-background-color\"?: string;\n }\n}\n\nconst labelStyles = bem(\"rmd-label\");\n\n/**\n * @since 6.0.0\n */\nexport function label(options: LabelClassNameOptions): string {\n const {\n className,\n gap = false,\n error = false,\n dense = false,\n active = false,\n stacked = false,\n reversed = false,\n disabled = false,\n floating = false,\n inactive = false,\n floatingActive = active,\n } = options;\n\n let textColor: TextColor | ThemeColor | undefined;\n if (disabled) {\n textColor = \"text-disabled\";\n } else if (error) {\n textColor = \"error\";\n } else if (floating && inactive) {\n textColor = \"text-secondary\";\n }\n\n return cnb(\n labelStyles({\n gap,\n error,\n dense,\n active,\n disabled,\n floating,\n stacked: stacked && !reversed,\n reversed: !stacked && reversed,\n \"stacked-reversed\": stacked && reversed,\n \"floating-dense\": floating && dense,\n \"floating-active\": floating && floatingActive,\n }),\n cssUtils({\n textColor,\n }),\n className\n );\n}\n\n/**\n * **Server Component**\n *\n * Most of the form components already use this `Label` internally when a\n * `label` prop has been provided. You should generally use this component if\n * you need to separate the label from an existing form component or you need to\n * create a custom implementation of a form component.\n *\n * @since 6.0.0 Updated to be usable externally and combines the\n * floating label styles instead of having separate components.\n */\nexport const Label = forwardRef<HTMLLabelElement, LabelProps>(\n function Label(props, ref) {\n const {\n gap = false,\n error = false,\n dense = false,\n active = false,\n stacked = false,\n reversed = false,\n disabled = false,\n floating = false,\n inactive = false,\n floatingActive = active,\n className,\n children,\n ...remaining\n } = props;\n\n return (\n <label\n ref={ref}\n {...remaining}\n className={label({\n gap,\n error,\n dense,\n active,\n stacked,\n reversed,\n disabled,\n floating,\n floatingActive,\n inactive,\n className,\n })}\n >\n {children}\n </label>\n );\n }\n);\n"],"names":["cnb","forwardRef","cssUtils","bem","labelStyles","label","options","className","gap","error","dense","active","stacked","reversed","disabled","floating","inactive","floatingActive","textColor","Label","props","ref","children","remaining"],"
|
|
1
|
+
{"version":3,"sources":["../../src/form/Label.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { forwardRef } from \"react\";\nimport { type TextColor, type ThemeColor, cssUtils } from \"../cssUtils.js\";\nimport { bem } from \"../utils/bem.js\";\nimport { type LabelClassNameOptions, type LabelProps } from \"./types.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-label-floating-top\"?: string | number;\n \"--rmd-label-left-offset\"?: string | number;\n \"--rmd-label-top-offset\"?: string | number;\n \"--rmd-label-active-padding\"?: string | number;\n \"--rmd-label-active-background-color\"?: string;\n }\n}\n\nconst labelStyles = bem(\"rmd-label\");\n\n/**\n * @since 6.0.0\n */\nexport function label(options: LabelClassNameOptions): string {\n const {\n className,\n gap = false,\n error = false,\n dense = false,\n active = false,\n stacked = false,\n reversed = false,\n disabled = false,\n floating = false,\n inactive = false,\n floatingActive = active,\n } = options;\n\n let textColor: TextColor | ThemeColor | undefined;\n if (disabled) {\n textColor = \"text-disabled\";\n } else if (error) {\n textColor = \"error\";\n } else if (floating && inactive) {\n textColor = \"text-secondary\";\n }\n\n return cnb(\n labelStyles({\n gap,\n error,\n dense,\n active,\n disabled,\n floating,\n stacked: stacked && !reversed,\n reversed: !stacked && reversed,\n \"stacked-reversed\": stacked && reversed,\n \"floating-dense\": floating && dense,\n \"floating-active\": floating && floatingActive,\n }),\n cssUtils({\n textColor,\n }),\n className\n );\n}\n\n/**\n * **Server Component**\n *\n * Most of the form components already use this `Label` internally when a\n * `label` prop has been provided. You should generally use this component if\n * you need to separate the label from an existing form component or you need to\n * create a custom implementation of a form component.\n *\n * @since 6.0.0 Updated to be usable externally and combines the\n * floating label styles instead of having separate components.\n */\nexport const Label = forwardRef<HTMLLabelElement, LabelProps>(\n function Label(props, ref) {\n const {\n gap = false,\n error = false,\n dense = false,\n active = false,\n stacked = false,\n reversed = false,\n disabled = false,\n floating = false,\n inactive = false,\n floatingActive = active,\n className,\n children,\n ...remaining\n } = props;\n\n return (\n <label\n ref={ref}\n {...remaining}\n className={label({\n gap,\n error,\n dense,\n active,\n stacked,\n reversed,\n disabled,\n floating,\n floatingActive,\n inactive,\n className,\n })}\n >\n {children}\n </label>\n );\n }\n);\n"],"names":["cnb","forwardRef","cssUtils","bem","labelStyles","label","options","className","gap","error","dense","active","stacked","reversed","disabled","floating","inactive","floatingActive","textColor","Label","props","ref","children","remaining"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAAQ,QAAQ;AACnC,SAA0CC,QAAQ,QAAQ,iBAAiB;AAC3E,SAASC,GAAG,QAAQ,kBAAkB;AAatC,MAAMC,cAAcD,IAAI;AAExB;;CAEC,GACD,OAAO,SAASE,MAAMC,OAA8B;IAClD,MAAM,EACJC,SAAS,EACTC,MAAM,KAAK,EACXC,QAAQ,KAAK,EACbC,QAAQ,KAAK,EACbC,SAAS,KAAK,EACdC,UAAU,KAAK,EACfC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,iBAAiBN,MAAM,EACxB,GAAGL;IAEJ,IAAIY;IACJ,IAAIJ,UAAU;QACZI,YAAY;IACd,OAAO,IAAIT,OAAO;QAChBS,YAAY;IACd,OAAO,IAAIH,YAAYC,UAAU;QAC/BE,YAAY;IACd;IAEA,OAAOlB,IACLI,YAAY;QACVI;QACAC;QACAC;QACAC;QACAG;QACAC;QACAH,SAASA,WAAW,CAACC;QACrBA,UAAU,CAACD,WAAWC;QACtB,oBAAoBD,WAAWC;QAC/B,kBAAkBE,YAAYL;QAC9B,mBAAmBK,YAAYE;IACjC,IACAf,SAAS;QACPgB;IACF,IACAX;AAEJ;AAEA;;;;;;;;;;CAUC,GACD,OAAO,MAAMY,sBAAQlB,WACnB,SAASkB,MAAMC,KAAK,EAAEC,GAAG;IACvB,MAAM,EACJb,MAAM,KAAK,EACXC,QAAQ,KAAK,EACbC,QAAQ,KAAK,EACbC,SAAS,KAAK,EACdC,UAAU,KAAK,EACfC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,iBAAiBN,MAAM,EACvBJ,SAAS,EACTe,QAAQ,EACR,GAAGC,WACJ,GAAGH;IAEJ,qBACE,KAACf;QACCgB,KAAKA;QACJ,GAAGE,SAAS;QACbhB,WAAWF,MAAM;YACfG;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAE;YACAD;YACAT;QACF;kBAECe;;AAGP,GACA"}
|
package/dist/form/Legend.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/form/Legend.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { forwardRef } from \"react\";\nimport { cssUtils } from \"../cssUtils.js\";\nimport { Typography, type TypographyProps } from \"../typography/Typography.js\";\n\n/**\n * @since 6.0.0\n */\nexport interface LegendProps extends TypographyProps {\n /**\n * @defaultValue `false`\n */\n srOnly?: boolean;\n}\n\n/**\n * **Server Component**\n *\n * This should be used within a `Fieldset` to apply a label.\n *\n * @since 6.0.0\n */\nexport const Legend = forwardRef<HTMLLegendElement, LegendProps>(\n function Legend(props, ref) {\n const { srOnly = false, className, children, ...remaining } = props;\n\n return (\n <Typography\n {...remaining}\n as=\"legend\"\n ref={ref}\n className={cnb(\"rmd-legend\", cssUtils({ srOnly }), className)}\n >\n {children}\n </Typography>\n );\n }\n);\n"],"names":["cnb","forwardRef","cssUtils","Typography","Legend","props","ref","srOnly","className","children","remaining","as"],"
|
|
1
|
+
{"version":3,"sources":["../../src/form/Legend.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { forwardRef } from \"react\";\nimport { cssUtils } from \"../cssUtils.js\";\nimport { Typography, type TypographyProps } from \"../typography/Typography.js\";\n\n/**\n * @since 6.0.0\n */\nexport interface LegendProps extends TypographyProps {\n /**\n * @defaultValue `false`\n */\n srOnly?: boolean;\n}\n\n/**\n * **Server Component**\n *\n * This should be used within a `Fieldset` to apply a label.\n *\n * @since 6.0.0\n */\nexport const Legend = forwardRef<HTMLLegendElement, LegendProps>(\n function Legend(props, ref) {\n const { srOnly = false, className, children, ...remaining } = props;\n\n return (\n <Typography\n {...remaining}\n as=\"legend\"\n ref={ref}\n className={cnb(\"rmd-legend\", cssUtils({ srOnly }), className)}\n >\n {children}\n </Typography>\n );\n }\n);\n"],"names":["cnb","forwardRef","cssUtils","Typography","Legend","props","ref","srOnly","className","children","remaining","as"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAAQ,QAAQ;AACnC,SAASC,QAAQ,QAAQ,iBAAiB;AAC1C,SAASC,UAAU,QAA8B,8BAA8B;AAY/E;;;;;;CAMC,GACD,OAAO,MAAMC,uBAASH,WACpB,SAASG,OAAOC,KAAK,EAAEC,GAAG;IACxB,MAAM,EAAEC,SAAS,KAAK,EAAEC,SAAS,EAAEC,QAAQ,EAAE,GAAGC,WAAW,GAAGL;IAE9D,qBACE,KAACF;QACE,GAAGO,SAAS;QACbC,IAAG;QACHL,KAAKA;QACLE,WAAWR,IAAI,cAAcE,SAAS;YAAEK;QAAO,IAAIC;kBAElDC;;AAGP,GACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/form/MenuItemCheckbox.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef } from \"react\";\nimport {\n MenuItemInputToggle,\n type MenuItemCheckboxProps,\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 checkbox and pulling the checkbox icon from the\n * {@link ICON_CONFIG}.\n *\n * @example Simple Example\n * ```tsx\n * import { DropdownMenu, MenuItemCheckbox } from \"@react-md/core\";\n * import { ReactElement, useState } from \"react\";\n *\n * function Example(): ReactElement {\n * const [checked, setChecked] = useState(false);\n *\n * return (\n * <DropdownMenu buttonChildren=\"Button\">\n * <MenuItemCheckbox\n * checked={checked}\n * onCheckedChange={(nextChecked) => setChecked(nextChecked)}\n * >\n * Checkbox\n * </MenuItemCheckbox>\n * </DropdownMenu>\n * );\n * }\n * ```\n *\n * @since 2.8.0\n */\nexport const MenuItemCheckbox = forwardRef<\n HTMLLIElement,\n MenuItemCheckboxProps\n>(function MenuItemCheckbox(props, ref) {\n return <MenuItemInputToggle {...props} ref={ref} type=\"checkbox\" />;\n});\n"],"names":["forwardRef","MenuItemInputToggle","MenuItemCheckbox","props","ref","type"],"
|
|
1
|
+
{"version":3,"sources":["../../src/form/MenuItemCheckbox.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef } from \"react\";\nimport {\n MenuItemInputToggle,\n type MenuItemCheckboxProps,\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 checkbox and pulling the checkbox icon from the\n * {@link ICON_CONFIG}.\n *\n * @example Simple Example\n * ```tsx\n * import { DropdownMenu, MenuItemCheckbox } from \"@react-md/core\";\n * import { ReactElement, useState } from \"react\";\n *\n * function Example(): ReactElement {\n * const [checked, setChecked] = useState(false);\n *\n * return (\n * <DropdownMenu buttonChildren=\"Button\">\n * <MenuItemCheckbox\n * checked={checked}\n * onCheckedChange={(nextChecked) => setChecked(nextChecked)}\n * >\n * Checkbox\n * </MenuItemCheckbox>\n * </DropdownMenu>\n * );\n * }\n * ```\n *\n * @since 2.8.0\n */\nexport const MenuItemCheckbox = forwardRef<\n HTMLLIElement,\n MenuItemCheckboxProps\n>(function MenuItemCheckbox(props, ref) {\n return <MenuItemInputToggle {...props} ref={ref} type=\"checkbox\" />;\n});\n"],"names":["forwardRef","MenuItemInputToggle","MenuItemCheckbox","props","ref","type"],"mappings":"AAAA;;AACA,SAASA,UAAU,QAAQ,QAAQ;AACnC,SACEC,mBAAmB,QAEd,2BAA2B;AAIlC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BC,GACD,OAAO,MAAMC,iCAAmBF,WAG9B,SAASE,iBAAiBC,KAAK,EAAEC,GAAG;IACpC,qBAAO,KAACH;QAAqB,GAAGE,KAAK;QAAEC,KAAKA;QAAKC,MAAK;;AACxD,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/form/MenuItemFileInput.tsx"],"sourcesContent":["\"use client\";\nimport {\n forwardRef,\n type ChangeEventHandler,\n type InputHTMLAttributes,\n} from \"react\";\nimport { getIcon } from \"../icon/iconConfig.js\";\nimport { MenuItem, type MenuItemProps } from \"../menu/MenuItem.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * @since 6.0.0 Removed most of the shared `FileInputProps` from this\n * implementation.\n */\nexport interface MenuItemFileInputProps\n extends Omit<MenuItemProps, \"onChange\"> {\n /**\n * A change event handler that should do something with the selected files.\n * Usually the `onChange` returned by `useFileUpload` or:\n *\n * ```ts\n * onChange={(event) => {\n * const { files } = event.currentTarget;\n * // do something with files\n * }}\n * ```\n *\n * This is actually a native `Event` and not a `SyntheticEvent` because the\n * file input is created through `document.createElement` instead of `React`.\n * You can still access the files through `event.currentTarget.files` like\n * normal.\n */\n onChange: ChangeEventHandler<HTMLInputElement>;\n\n accept?: InputHTMLAttributes<HTMLInputElement>[\"accept\"];\n capture?: InputHTMLAttributes<HTMLInputElement>[\"capture\"];\n multiple?: InputHTMLAttributes<HTMLInputElement>[\"multiple\"];\n\n /**\n * Set this to `true` if the `Menu` should not close when the file input's\n * menu item is clicked.\n *\n * @defaultValue `false`\n */\n preventMenuHideOnClick?: boolean;\n}\n\n/**\n * **Client Component**\n *\n * A wrapper for the `<input type=\"file\">` element that works within menus.\n *\n * @since 5.0.0\n * @since 6.0.0 No longer creates an invisible file input element within the\n * menu item. This allows the menu to be closed immediately when this menu item\n * is clicked.\n */\nexport const MenuItemFileInput = forwardRef<\n HTMLLIElement,\n MenuItemFileInputProps\n>(function MenuItemFileInput(props, ref) {\n const {\n id: propId,\n onClick = noop,\n onChange,\n accept = \"\",\n multiple = false,\n children,\n leftAddon: propLeftAddon,\n preventMenuHideOnClick = false,\n ...remaining\n } = props;\n\n const id = useEnsuredId(propId, \"menu-item\");\n const leftAddon = getIcon(\"upload\", propLeftAddon);\n\n return (\n <MenuItem\n {...remaining}\n id={id}\n ref={ref}\n leftAddon={leftAddon}\n onClick={(event) => {\n onClick(event);\n\n if (preventMenuHideOnClick) {\n event.stopPropagation();\n }\n\n // create a temporary file input element and click it to trigger the\n // file upload behavior.\n let input: HTMLInputElement | null = document.createElement(\"input\");\n input.type = \"file\";\n input.accept = accept;\n input.multiple = multiple;\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n input.onchange = onChange;\n input.click();\n input = null;\n }}\n >\n {children}\n </MenuItem>\n );\n});\n"],"names":["forwardRef","getIcon","MenuItem","useEnsuredId","noop","MenuItemFileInput","props","ref","id","propId","onClick","onChange","accept","multiple","children","leftAddon","propLeftAddon","preventMenuHideOnClick","remaining","event","stopPropagation","input","document","createElement","type","onchange","click"],"
|
|
1
|
+
{"version":3,"sources":["../../src/form/MenuItemFileInput.tsx"],"sourcesContent":["\"use client\";\nimport {\n forwardRef,\n type ChangeEventHandler,\n type InputHTMLAttributes,\n} from \"react\";\nimport { getIcon } from \"../icon/iconConfig.js\";\nimport { MenuItem, type MenuItemProps } from \"../menu/MenuItem.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * @since 6.0.0 Removed most of the shared `FileInputProps` from this\n * implementation.\n */\nexport interface MenuItemFileInputProps\n extends Omit<MenuItemProps, \"onChange\"> {\n /**\n * A change event handler that should do something with the selected files.\n * Usually the `onChange` returned by `useFileUpload` or:\n *\n * ```ts\n * onChange={(event) => {\n * const { files } = event.currentTarget;\n * // do something with files\n * }}\n * ```\n *\n * This is actually a native `Event` and not a `SyntheticEvent` because the\n * file input is created through `document.createElement` instead of `React`.\n * You can still access the files through `event.currentTarget.files` like\n * normal.\n */\n onChange: ChangeEventHandler<HTMLInputElement>;\n\n accept?: InputHTMLAttributes<HTMLInputElement>[\"accept\"];\n capture?: InputHTMLAttributes<HTMLInputElement>[\"capture\"];\n multiple?: InputHTMLAttributes<HTMLInputElement>[\"multiple\"];\n\n /**\n * Set this to `true` if the `Menu` should not close when the file input's\n * menu item is clicked.\n *\n * @defaultValue `false`\n */\n preventMenuHideOnClick?: boolean;\n}\n\n/**\n * **Client Component**\n *\n * A wrapper for the `<input type=\"file\">` element that works within menus.\n *\n * @since 5.0.0\n * @since 6.0.0 No longer creates an invisible file input element within the\n * menu item. This allows the menu to be closed immediately when this menu item\n * is clicked.\n */\nexport const MenuItemFileInput = forwardRef<\n HTMLLIElement,\n MenuItemFileInputProps\n>(function MenuItemFileInput(props, ref) {\n const {\n id: propId,\n onClick = noop,\n onChange,\n accept = \"\",\n multiple = false,\n children,\n leftAddon: propLeftAddon,\n preventMenuHideOnClick = false,\n ...remaining\n } = props;\n\n const id = useEnsuredId(propId, \"menu-item\");\n const leftAddon = getIcon(\"upload\", propLeftAddon);\n\n return (\n <MenuItem\n {...remaining}\n id={id}\n ref={ref}\n leftAddon={leftAddon}\n onClick={(event) => {\n onClick(event);\n\n if (preventMenuHideOnClick) {\n event.stopPropagation();\n }\n\n // create a temporary file input element and click it to trigger the\n // file upload behavior.\n let input: HTMLInputElement | null = document.createElement(\"input\");\n input.type = \"file\";\n input.accept = accept;\n input.multiple = multiple;\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n input.onchange = onChange;\n input.click();\n input = null;\n }}\n >\n {children}\n </MenuItem>\n );\n});\n"],"names":["forwardRef","getIcon","MenuItem","useEnsuredId","noop","MenuItemFileInput","props","ref","id","propId","onClick","onChange","accept","multiple","children","leftAddon","propLeftAddon","preventMenuHideOnClick","remaining","event","stopPropagation","input","document","createElement","type","onchange","click"],"mappings":"AAAA;;AACA,SACEA,UAAU,QAGL,QAAQ;AACf,SAASC,OAAO,QAAQ,wBAAwB;AAChD,SAASC,QAAQ,QAA4B,sBAAsB;AACnE,SAASC,YAAY,QAAQ,qBAAqB;AAElD,MAAMC,OAAO;AACX,aAAa;AACf;AAuCA;;;;;;;;;CASC,GACD,OAAO,MAAMC,kCAAoBL,WAG/B,SAASK,kBAAkBC,KAAK,EAAEC,GAAG;IACrC,MAAM,EACJC,IAAIC,MAAM,EACVC,UAAUN,IAAI,EACdO,QAAQ,EACRC,SAAS,EAAE,EACXC,WAAW,KAAK,EAChBC,QAAQ,EACRC,WAAWC,aAAa,EACxBC,yBAAyB,KAAK,EAC9B,GAAGC,WACJ,GAAGZ;IAEJ,MAAME,KAAKL,aAAaM,QAAQ;IAChC,MAAMM,YAAYd,QAAQ,UAAUe;IAEpC,qBACE,KAACd;QACE,GAAGgB,SAAS;QACbV,IAAIA;QACJD,KAAKA;QACLQ,WAAWA;QACXL,SAAS,CAACS;YACRT,QAAQS;YAER,IAAIF,wBAAwB;gBAC1BE,MAAMC,eAAe;YACvB;YAEA,oEAAoE;YACpE,wBAAwB;YACxB,IAAIC,QAAiCC,SAASC,aAAa,CAAC;YAC5DF,MAAMG,IAAI,GAAG;YACbH,MAAMT,MAAM,GAAGA;YACfS,MAAMR,QAAQ,GAAGA;YAEjB,6DAA6D;YAC7D,mBAAmB;YACnBQ,MAAMI,QAAQ,GAAGd;YACjBU,MAAMK,KAAK;YACXL,QAAQ;QACV;kBAECP;;AAGP,GAAG"}
|