@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
package/dist/box/styles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/box/styles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-box\");\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-box-gap\"?: string | number;\n \"--rmd-box-padding\"?: string | number;\n \"--rmd-box-item-min-size\"?: string | number;\n \"--rmd-box-columns\"?: string | number;\n }\n}\n\n/**\n * @since 6.0.0\n */\nexport type BoxAlignItems =\n | \"start\"\n | \"flex-start\"\n | \"center\"\n | \"end\"\n | \"flex-end\"\n | \"stretch\";\n\n/**\n * @since 6.0.0\n */\nexport type BoxJustifyContent =\n | BoxAlignItems\n | \"space-around\"\n | \"space-between\"\n | \"space-evenly\";\n\n/**\n * @since 6.0.0\n */\nexport type BoxFlexDirection = \"row\" | \"column\";\n\n/**\n * @since 6.0.0\n */\nexport interface BoxOptions {\n className?: string;\n\n /**\n * Set this to `true` to use `display: grid` instead of `display: flex`.\n *\n * @defaultValue `false`\n */\n grid?: boolean;\n\n /**\n * Set this to `true` to apply `width: 100%`. This can be useful when using\n * nested box layouts.\n *\n * @defaultValue `false`\n */\n fullWidth?: boolean;\n\n /**\n * Set this to `true` to set `flex-wrap: nowrap`.\n *\n * @defaultValue `false`\n */\n disableWrap?: boolean;\n\n /**\n * Set this to `true` to disable the default padding.\n *\n * @defaultValue `false`\n */\n disablePadding?: boolean;\n\n /**\n * This should match one of the names in the `$box-grids` map. So for example:\n *\n * ```scss\n * @use \"react-md\" with (\n * $box-grids: (\n * small: (\n * min: 5rem\n * ),\n * medium: (\n * min: 7rem,\n * gap: 0.5rem,\n * padding: 2rem,\n * ),\n * ),\n * );\n * ```\n *\n * The `gridName` should be `\"small\" | \"medium\"`.\n *\n * @defaultValue `\"\"`\n */\n gridName?: string;\n\n /**\n * @defaultValue `\"fit\"`\n */\n gridColumns?: \"fit\" | \"fill\" | number;\n\n /**\n * @defaultValue `\"\"`\n */\n align?: BoxAlignItems;\n\n /**\n * The default value is really `center` or whatever the\n * `$box-default-align-items` is set to.\n *\n * @defaultValue `\"\"`\n */\n justify?: BoxJustifyContent;\n\n /**\n * Set this to `true` to set `flex-direction: column` which will stack all\n * items in the box.\n *\n * @defaultValue `false`\n */\n stacked?: boolean;\n\n /**\n * Set this to `true` to reverse the `flex-direction`. i.e.\n * - `flex-direction: row-reverse`\n * - `flex-direction: column-reverse`\n *\n * @defaultValue `false`\n */\n reversed?: boolean;\n}\n\n/**\n * @since 6.0.0\n */\nexport function box(options: BoxOptions = {}): string {\n const {\n className,\n align = \"\",\n grid = false,\n gridName = \"\",\n gridColumns = \"fit\",\n justify = \"\",\n stacked = false,\n reversed,\n fullWidth = false,\n disableWrap = false,\n disablePadding = false,\n } = options;\n\n return cnb(\n styles({\n wrap: !disableWrap,\n padded: !disablePadding,\n column: stacked && !reversed,\n reverse: !stacked && reversed,\n \"column-reverse\": stacked && reversed,\n \"full-width\": fullWidth,\n grid,\n \"grid-fill\": gridColumns === \"fill\",\n \"grid-columns\": typeof gridColumns === \"number\",\n [gridName]: grid && gridName,\n \"align-start\": align === \"start\" || align === \"flex-start\",\n \"align-center\": align === \"center\",\n \"align-end\": align === \"end\" || align === \"flex-end\",\n \"align-stretch\": align === \"stretch\",\n \"justify-center\": justify === \"center\",\n \"justify-start\": justify === \"start\" || justify === \"flex-start\",\n \"justify-end\": justify === \"end\" || justify === \"flex-end\",\n \"justify-stretch\": justify === \"stretch\",\n \"justify-around\": justify === \"space-around\",\n \"justify-between\": justify === \"space-between\",\n \"justify-evenly\": justify === \"space-evenly\",\n }),\n className\n );\n}\n"],"names":["cnb","bem","styles","box","options","className","align","grid","gridName","gridColumns","justify","stacked","reversed","fullWidth","disableWrap","disablePadding","wrap","padded","column","reverse"],"
|
|
1
|
+
{"version":3,"sources":["../../src/box/styles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-box\");\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-box-gap\"?: string | number;\n \"--rmd-box-padding\"?: string | number;\n \"--rmd-box-item-min-size\"?: string | number;\n \"--rmd-box-columns\"?: string | number;\n }\n}\n\n/**\n * @since 6.0.0\n */\nexport type BoxAlignItems =\n | \"start\"\n | \"flex-start\"\n | \"center\"\n | \"end\"\n | \"flex-end\"\n | \"stretch\";\n\n/**\n * @since 6.0.0\n */\nexport type BoxJustifyContent =\n | BoxAlignItems\n | \"space-around\"\n | \"space-between\"\n | \"space-evenly\";\n\n/**\n * @since 6.0.0\n */\nexport type BoxFlexDirection = \"row\" | \"column\";\n\n/**\n * @since 6.0.0\n */\nexport interface BoxOptions {\n className?: string;\n\n /**\n * Set this to `true` to use `display: grid` instead of `display: flex`.\n *\n * @defaultValue `false`\n */\n grid?: boolean;\n\n /**\n * Set this to `true` to apply `width: 100%`. This can be useful when using\n * nested box layouts.\n *\n * @defaultValue `false`\n */\n fullWidth?: boolean;\n\n /**\n * Set this to `true` to set `flex-wrap: nowrap`.\n *\n * @defaultValue `false`\n */\n disableWrap?: boolean;\n\n /**\n * Set this to `true` to disable the default padding.\n *\n * @defaultValue `false`\n */\n disablePadding?: boolean;\n\n /**\n * This should match one of the names in the `$box-grids` map. So for example:\n *\n * ```scss\n * @use \"react-md\" with (\n * $box-grids: (\n * small: (\n * min: 5rem\n * ),\n * medium: (\n * min: 7rem,\n * gap: 0.5rem,\n * padding: 2rem,\n * ),\n * ),\n * );\n * ```\n *\n * The `gridName` should be `\"small\" | \"medium\"`.\n *\n * @defaultValue `\"\"`\n */\n gridName?: string;\n\n /**\n * @defaultValue `\"fit\"`\n */\n gridColumns?: \"fit\" | \"fill\" | number;\n\n /**\n * @defaultValue `\"\"`\n */\n align?: BoxAlignItems;\n\n /**\n * The default value is really `center` or whatever the\n * `$box-default-align-items` is set to.\n *\n * @defaultValue `\"\"`\n */\n justify?: BoxJustifyContent;\n\n /**\n * Set this to `true` to set `flex-direction: column` which will stack all\n * items in the box.\n *\n * @defaultValue `false`\n */\n stacked?: boolean;\n\n /**\n * Set this to `true` to reverse the `flex-direction`. i.e.\n * - `flex-direction: row-reverse`\n * - `flex-direction: column-reverse`\n *\n * @defaultValue `false`\n */\n reversed?: boolean;\n}\n\n/**\n * @since 6.0.0\n */\nexport function box(options: BoxOptions = {}): string {\n const {\n className,\n align = \"\",\n grid = false,\n gridName = \"\",\n gridColumns = \"fit\",\n justify = \"\",\n stacked = false,\n reversed,\n fullWidth = false,\n disableWrap = false,\n disablePadding = false,\n } = options;\n\n return cnb(\n styles({\n wrap: !disableWrap,\n padded: !disablePadding,\n column: stacked && !reversed,\n reverse: !stacked && reversed,\n \"column-reverse\": stacked && reversed,\n \"full-width\": fullWidth,\n grid,\n \"grid-fill\": gridColumns === \"fill\",\n \"grid-columns\": typeof gridColumns === \"number\",\n [gridName]: grid && gridName,\n \"align-start\": align === \"start\" || align === \"flex-start\",\n \"align-center\": align === \"center\",\n \"align-end\": align === \"end\" || align === \"flex-end\",\n \"align-stretch\": align === \"stretch\",\n \"justify-center\": justify === \"center\",\n \"justify-start\": justify === \"start\" || justify === \"flex-start\",\n \"justify-end\": justify === \"end\" || justify === \"flex-end\",\n \"justify-stretch\": justify === \"stretch\",\n \"justify-around\": justify === \"space-around\",\n \"justify-between\": justify === \"space-between\",\n \"justify-evenly\": justify === \"space-evenly\",\n }),\n className\n );\n}\n"],"names":["cnb","bem","styles","box","options","className","align","grid","gridName","gridColumns","justify","stacked","reversed","fullWidth","disableWrap","disablePadding","wrap","padded","column","reverse"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAmInB;;CAEC,GACD,OAAO,SAASE,IAAIC,UAAsB,CAAC,CAAC;IAC1C,MAAM,EACJC,SAAS,EACTC,QAAQ,EAAE,EACVC,OAAO,KAAK,EACZC,WAAW,EAAE,EACbC,cAAc,KAAK,EACnBC,UAAU,EAAE,EACZC,UAAU,KAAK,EACfC,QAAQ,EACRC,YAAY,KAAK,EACjBC,cAAc,KAAK,EACnBC,iBAAiB,KAAK,EACvB,GAAGX;IAEJ,OAAOJ,IACLE,OAAO;QACLc,MAAM,CAACF;QACPG,QAAQ,CAACF;QACTG,QAAQP,WAAW,CAACC;QACpBO,SAAS,CAACR,WAAWC;QACrB,kBAAkBD,WAAWC;QAC7B,cAAcC;QACdN;QACA,aAAaE,gBAAgB;QAC7B,gBAAgB,OAAOA,gBAAgB;QACvC,CAACD,SAAS,EAAED,QAAQC;QACpB,eAAeF,UAAU,WAAWA,UAAU;QAC9C,gBAAgBA,UAAU;QAC1B,aAAaA,UAAU,SAASA,UAAU;QAC1C,iBAAiBA,UAAU;QAC3B,kBAAkBI,YAAY;QAC9B,iBAAiBA,YAAY,WAAWA,YAAY;QACpD,eAAeA,YAAY,SAASA,YAAY;QAChD,mBAAmBA,YAAY;QAC/B,kBAAkBA,YAAY;QAC9B,mBAAmBA,YAAY;QAC/B,kBAAkBA,YAAY;IAChC,IACAL;AAEJ"}
|
|
@@ -5,7 +5,7 @@ import { forwardRef } from "react";
|
|
|
5
5
|
import { overlay } from "../overlay/overlayStyles.js";
|
|
6
6
|
import { CircularProgress } from "../progress/CircularProgress.js";
|
|
7
7
|
import { LinearProgress } from "../progress/LinearProgress.js";
|
|
8
|
-
import {
|
|
8
|
+
import { useAsyncFunction } from "../useAsyncFunction.js";
|
|
9
9
|
import { useEnsuredId } from "../useEnsuredId.js";
|
|
10
10
|
import { Button } from "./Button.js";
|
|
11
11
|
const noop = ()=>{
|
|
@@ -73,7 +73,7 @@ const noop = ()=>{
|
|
|
73
73
|
*/ export const AsyncButton = /*#__PURE__*/ forwardRef(function AsyncButton(props, ref) {
|
|
74
74
|
const { id: propId, onClick = noop, children, floating = null, theme = floating ? "secondary" : "clear", themeType = floating ? "contained" : "flat", buttonType = floating ? "icon" : "text", className, disabled, loading: propLoading = false, loadingType = "circular-overlay", loadingChildren, loadingDisabledTheme = false, afterAddon: propAfterAddon, beforeAddon: propBeforeAddon, linearProgressProps, circularProgressProps, progressAriaLabel, progressAriaLabelledBy: propProgressAriaLabelledBy, ...remaining } = props;
|
|
75
75
|
const id = useEnsuredId(propId, "async-button");
|
|
76
|
-
const { handleAsync, pending } =
|
|
76
|
+
const { handleAsync, pending } = useAsyncFunction({
|
|
77
77
|
disabled
|
|
78
78
|
});
|
|
79
79
|
const loading = pending || propLoading;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/button/AsyncButton.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport { forwardRef, type MouseEvent, type ReactNode } from \"react\";\nimport { type BoxAlignItems } from \"../box/styles.js\";\nimport { overlay } from \"../overlay/overlayStyles.js\";\nimport {\n CircularProgress,\n type CircularProgressProps,\n} from \"../progress/CircularProgress.js\";\nimport {\n LinearProgress,\n type LinearProgressProps,\n} from \"../progress/LinearProgress.js\";\nimport { type ProgressTheme } from \"../progress/types.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { useAsyncAction } from \"../useAsyncAction.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { Button, type ButtonProps } from \"./Button.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * @since 6.0.0\n */\nexport type AsyncButtonLoadingType =\n | \"circular-before\"\n | \"circular-after\"\n | \"circular-overlay\"\n | \"linear-above\"\n | \"linear-below\";\n\n/**\n * @since 6.0.0\n */\nexport interface AsyncButtonProps extends ButtonProps {\n /**\n * @see {@link progressAriaLabelledBy}\n * @defaultValue `\"async-button\" + useId()`\n */\n id?: string;\n\n /**\n * When this is defined and returns a `Promise`, the loading indicator will\n * display until the promise has resolved.\n *\n * @defaultValue `() => {}`\n */\n onClick?(event: MouseEvent<HTMLButtonElement>): Promise<void> | void;\n\n /**\n * Set this to `true` to manually display a loading spinner.\n *\n * @defaultValue `false`\n */\n loading?: boolean;\n\n /**\n * - `\"circular-overlay\"` - Covers and hides the button content with a\n * centered circular progress\n * - `\"circular-before\"` - Renders a circular progress bar before the button\n * content which is useful when rendering an icon before the button text.\n * See {@link beforeAddon} as well.\n * - `\"circular-after\"` - Renders a circular progress bar before the button\n * content which is useful when rendering an icon after the button text.\n * See {@link afterAddon} as well.\n * - `\"linear-above\"` - Renders a linear progress bar at the top of the button\n * while still displaying the button contents. Usually looks good for\n * outlined buttons.\n * - `\"linear-below\"` - Renders a linear progress bar at the bottom of the\n * button while still displaying the button contents. Usually looks good for\n * outlined buttons.\n *\n * @defaultValue `\"circular-overlay\"`\n */\n loadingType?: AsyncButtonLoadingType;\n\n /**\n * Optional content to display instead of the default `children` while\n * loading.\n */\n loadingChildren?: ReactNode;\n\n /**\n * Set this to `true` to use the `disabled` theme while loading.\n *\n * @defaultValue `false`\n */\n loadingDisabledTheme?: boolean;\n\n /**\n * This should be used when the {@link loadingType} is set to\n * `\"circular-before\"`, an icon should appear before the other content in\n * the button, and the loading indicator should replace the icon.\n */\n beforeAddon?: ReactNode;\n\n /**\n * This should be used when the {@link loadingType} is set to\n * `\"circular-after\"`, an icon should appear before the other content in\n * the button, and the loading indicator should replace the icon.\n */\n afterAddon?: ReactNode;\n\n /**\n * An optional label to provide to the progressbar.\n *\n * @see {@link progressAriaLabelledBy}\n */\n progressAriaLabel?: string;\n\n /**\n * @see {@link id}\n * @defaultValue `id`\n */\n progressAriaLabelledBy?: string;\n\n /**\n * Any additional props to pass to the `CircularProgress` bar when the\n * {@link loadingType} is one of the circular types.\n */\n linearProgressProps?: PropsWithRef<LinearProgressProps, HTMLDivElement>;\n\n /**\n * Any additional props to pass to the `LinearProgress` bar when the\n * {@link loadingType} is one of the linear types.\n */\n circularProgressProps?: PropsWithRef<CircularProgressProps, HTMLSpanElement>;\n}\n\n/**\n * **Client Component**\n *\n * The async button can be used to render a loading indicator within a button\n * during an async task. The loading spinner can be shown either by enabling the\n * `loading` prop or returning a promise from the `onClick` event which will\n * continue to show the loading indicator until the promise has been resolved.\n *\n * @example Async onClick\n * ```tsx\n * import { AsyncButton } from \"@react-md/core\";\n * import { useState, type ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * const [data, setData] = useState(null);\n * return (\n * <AsyncButton\n * type=\"submit\"\n * onClick={async () => {\n * const response = await fetch(\"/my-api\");\n * const json = await response.json();\n * setData(json);\n * }}\n * >\n * Submit\n * </AsyncButton>\n * );\n * }\n * ```\n *\n * @example Manual Loading State\n * ```tsx\n * import { AsyncButton } from \"@react-md/core\";\n * import { useMutation } from \"@tanstack/query\";\n * import { useState, type ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * const { isLoading, mutate } = useMutation({\n * mutationFn: (newTodo) => fetch('/todos', {\n * method: \"POST\",\n * body: JSON.stringify(newTodo),\n * }),\n * });\n *\n * return (\n * <AsyncButton\n * type=\"submit\"\n * loading={isLoading}\n * onClick={() => {\n * mutate({ id: Date.now(), title: \"Create example\" });\n * }}\n * >\n * Create Todo\n * </AsyncButton>\n * );\n * }\n * ```\n *\n * @since 6.0.0\n */\nexport const AsyncButton = forwardRef<HTMLButtonElement, AsyncButtonProps>(\n function AsyncButton(props, ref) {\n const {\n id: propId,\n onClick = noop,\n children,\n floating = null,\n theme = floating ? \"secondary\" : \"clear\",\n themeType = floating ? \"contained\" : \"flat\",\n buttonType = floating ? \"icon\" : \"text\",\n className,\n disabled,\n loading: propLoading = false,\n loadingType = \"circular-overlay\",\n loadingChildren,\n loadingDisabledTheme = false,\n afterAddon: propAfterAddon,\n beforeAddon: propBeforeAddon,\n linearProgressProps,\n circularProgressProps,\n progressAriaLabel,\n progressAriaLabelledBy: propProgressAriaLabelledBy,\n ...remaining\n } = props;\n const id = useEnsuredId(propId, \"async-button\");\n const { handleAsync, pending } = useAsyncAction({ disabled });\n const loading = pending || propLoading;\n\n let progressTheme: ProgressTheme = \"current-color\";\n if (theme === \"clear\" || theme === \"disabled\") {\n progressTheme = \"primary\";\n }\n\n let progressAriaLabelledBy = propProgressAriaLabelledBy;\n if (\n !progressAriaLabel &&\n !linearProgressProps?.[\"aria-label\"] &&\n !linearProgressProps?.[\"aria-labelledby\"] &&\n !circularProgressProps?.[\"aria-label\"] &&\n !circularProgressProps?.[\"aria-labelledby\"]\n ) {\n progressAriaLabelledBy = id;\n }\n\n const progress = loadingType.includes(\"linear\") ? (\n <LinearProgress\n aria-label={progressAriaLabel}\n aria-labelledby={progressAriaLabelledBy as string}\n {...linearProgressProps}\n theme={progressTheme}\n />\n ) : (\n <CircularProgress\n aria-label={progressAriaLabel}\n aria-labelledby={progressAriaLabelledBy as string}\n {...circularProgressProps}\n theme={progressTheme}\n />\n );\n\n let afterAddon = propAfterAddon;\n let beforeAddon = propBeforeAddon;\n let overlayElement: ReactNode;\n let isOverlayCover = false;\n switch (loadingType) {\n case \"circular-before\":\n beforeAddon = loading ? progress : propBeforeAddon;\n break;\n case \"circular-after\":\n afterAddon = loading ? progress : propAfterAddon;\n break;\n case \"circular-overlay\":\n case \"linear-above\":\n case \"linear-below\": {\n let alignItems: BoxAlignItems = \"center\";\n if (loadingType === \"linear-above\") {\n alignItems = \"start\";\n } else if (loadingType === \"linear-below\") {\n alignItems = \"end\";\n } else {\n isOverlayCover = true;\n }\n\n overlayElement = loading && (\n <span\n className={overlay({\n active: true,\n visible: true,\n absolute: true,\n align: alignItems,\n })}\n >\n {progress}\n </span>\n );\n break;\n }\n }\n\n return (\n <Button\n {...remaining}\n aria-disabled={loading || undefined}\n id={id}\n ref={ref}\n disabled={disabled}\n floating={floating}\n className={cnb(\n \"rmd-button--async\",\n loading && isOverlayCover && \"rmd-button--async-overlay\",\n className\n )}\n theme={loading && loadingDisabledTheme ? \"disabled\" : theme}\n themeType={themeType}\n buttonType={buttonType}\n onClick={handleAsync((event) => Promise.resolve(onClick(event)))}\n >\n {beforeAddon}\n {loading && typeof loadingChildren !== \"undefined\"\n ? loadingChildren\n : children}\n {afterAddon}\n {overlayElement}\n </Button>\n );\n }\n);\n"],"names":["cnb","forwardRef","overlay","CircularProgress","LinearProgress","useAsyncAction","useEnsuredId","Button","noop","AsyncButton","props","ref","id","propId","onClick","children","floating","theme","themeType","buttonType","className","disabled","loading","propLoading","loadingType","loadingChildren","loadingDisabledTheme","afterAddon","propAfterAddon","beforeAddon","propBeforeAddon","linearProgressProps","circularProgressProps","progressAriaLabel","progressAriaLabelledBy","propProgressAriaLabelledBy","remaining","handleAsync","pending","progressTheme","progress","includes","aria-label","aria-labelledby","overlayElement","isOverlayCover","alignItems","span","active","visible","absolute","align","aria-disabled","undefined","event","Promise","resolve"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;AACA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAAyC,QAAQ;AAEpE,SAASC,OAAO,QAAQ,8BAA8B;AACtD,SACEC,gBAAgB,QAEX,kCAAkC;AACzC,SACEC,cAAc,QAET,gCAAgC;AAGvC,SAASC,cAAc,QAAQ,uBAAuB;AACtD,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,MAAM,QAA0B,cAAc;AAEvD,MAAMC,OAAO;AACX,aAAa;AACf;AA8GA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2DC,GACD,OAAO,MAAMC,4BAAcR,WACzB,SAASQ,YAAYC,KAAK,EAAEC,GAAG;IAC7B,MAAM,EACJC,IAAIC,MAAM,EACVC,UAAUN,IAAI,EACdO,QAAQ,EACRC,WAAW,IAAI,EACfC,QAAQD,WAAW,cAAc,OAAO,EACxCE,YAAYF,WAAW,cAAc,MAAM,EAC3CG,aAAaH,WAAW,SAAS,MAAM,EACvCI,SAAS,EACTC,QAAQ,EACRC,SAASC,cAAc,KAAK,EAC5BC,cAAc,kBAAkB,EAChCC,eAAe,EACfC,uBAAuB,KAAK,EAC5BC,YAAYC,cAAc,EAC1BC,aAAaC,eAAe,EAC5BC,mBAAmB,EACnBC,qBAAqB,EACrBC,iBAAiB,EACjBC,wBAAwBC,0BAA0B,EAClD,GAAGC,WACJ,GAAG1B;IACJ,MAAME,KAAKN,aAAaO,QAAQ;IAChC,MAAM,EAAEwB,WAAW,EAAEC,OAAO,EAAE,GAAGjC,eAAe;QAAEgB;IAAS;IAC3D,MAAMC,UAAUgB,WAAWf;IAE3B,IAAIgB,gBAA+B;IACnC,IAAItB,UAAU,WAAWA,UAAU,YAAY;QAC7CsB,gBAAgB;IAClB;IAEA,IAAIL,yBAAyBC;IAC7B,IACE,CAACF,qBACD,CAACF,qBAAqB,CAAC,aAAa,IACpC,CAACA,qBAAqB,CAAC,kBAAkB,IACzC,CAACC,uBAAuB,CAAC,aAAa,IACtC,CAACA,uBAAuB,CAAC,kBAAkB,EAC3C;QACAE,yBAAyBtB;IAC3B;IAEA,MAAM4B,WAAWhB,YAAYiB,QAAQ,CAAC,0BACpC,KAACrC;QACCsC,cAAYT;QACZU,mBAAiBT;QAChB,GAAGH,mBAAmB;QACvBd,OAAOsB;uBAGT,KAACpC;QACCuC,cAAYT;QACZU,mBAAiBT;QAChB,GAAGF,qBAAqB;QACzBf,OAAOsB;;IAIX,IAAIZ,aAAaC;IACjB,IAAIC,cAAcC;IAClB,IAAIc;IACJ,IAAIC,iBAAiB;IACrB,OAAQrB;QACN,KAAK;YACHK,cAAcP,UAAUkB,WAAWV;YACnC;QACF,KAAK;YACHH,aAAaL,UAAUkB,WAAWZ;YAClC;QACF,KAAK;QACL,KAAK;QACL,KAAK;YAAgB;gBACnB,IAAIkB,aAA4B;gBAChC,IAAItB,gBAAgB,gBAAgB;oBAClCsB,aAAa;gBACf,OAAO,IAAItB,gBAAgB,gBAAgB;oBACzCsB,aAAa;gBACf,OAAO;oBACLD,iBAAiB;gBACnB;gBAEAD,iBAAiBtB,yBACf,KAACyB;oBACC3B,WAAWlB,QAAQ;wBACjB8C,QAAQ;wBACRC,SAAS;wBACTC,UAAU;wBACVC,OAAOL;oBACT;8BAECN;;gBAGL;YACF;IACF;IAEA,qBACE,MAACjC;QACE,GAAG6B,SAAS;QACbgB,iBAAe9B,WAAW+B;QAC1BzC,IAAIA;QACJD,KAAKA;QACLU,UAAUA;QACVL,UAAUA;QACVI,WAAWpB,IACT,qBACAsB,WAAWuB,kBAAkB,6BAC7BzB;QAEFH,OAAOK,WAAWI,uBAAuB,aAAaT;QACtDC,WAAWA;QACXC,YAAYA;QACZL,SAASuB,YAAY,CAACiB,QAAUC,QAAQC,OAAO,CAAC1C,QAAQwC;;YAEvDzB;YACAP,WAAW,OAAOG,oBAAoB,cACnCA,kBACAV;YACHY;YACAiB;;;AAGP,GACA"}
|
|
1
|
+
{"version":3,"sources":["../../src/button/AsyncButton.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport { forwardRef, type MouseEvent, type ReactNode } from \"react\";\nimport { type BoxAlignItems } from \"../box/styles.js\";\nimport { overlay } from \"../overlay/overlayStyles.js\";\nimport {\n CircularProgress,\n type CircularProgressProps,\n} from \"../progress/CircularProgress.js\";\nimport {\n LinearProgress,\n type LinearProgressProps,\n} from \"../progress/LinearProgress.js\";\nimport { type ProgressTheme } from \"../progress/types.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { useAsyncFunction } from \"../useAsyncFunction.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { Button, type ButtonProps } from \"./Button.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * @since 6.0.0\n */\nexport type AsyncButtonLoadingType =\n | \"circular-before\"\n | \"circular-after\"\n | \"circular-overlay\"\n | \"linear-above\"\n | \"linear-below\";\n\n/**\n * @since 6.0.0\n */\nexport interface AsyncButtonProps extends ButtonProps {\n /**\n * @see {@link progressAriaLabelledBy}\n * @defaultValue `\"async-button\" + useId()`\n */\n id?: string;\n\n /**\n * When this is defined and returns a `Promise`, the loading indicator will\n * display until the promise has resolved.\n *\n * @defaultValue `() => {}`\n */\n onClick?(event: MouseEvent<HTMLButtonElement>): Promise<void> | void;\n\n /**\n * Set this to `true` to manually display a loading spinner.\n *\n * @defaultValue `false`\n */\n loading?: boolean;\n\n /**\n * - `\"circular-overlay\"` - Covers and hides the button content with a\n * centered circular progress\n * - `\"circular-before\"` - Renders a circular progress bar before the button\n * content which is useful when rendering an icon before the button text.\n * See {@link beforeAddon} as well.\n * - `\"circular-after\"` - Renders a circular progress bar before the button\n * content which is useful when rendering an icon after the button text.\n * See {@link afterAddon} as well.\n * - `\"linear-above\"` - Renders a linear progress bar at the top of the button\n * while still displaying the button contents. Usually looks good for\n * outlined buttons.\n * - `\"linear-below\"` - Renders a linear progress bar at the bottom of the\n * button while still displaying the button contents. Usually looks good for\n * outlined buttons.\n *\n * @defaultValue `\"circular-overlay\"`\n */\n loadingType?: AsyncButtonLoadingType;\n\n /**\n * Optional content to display instead of the default `children` while\n * loading.\n */\n loadingChildren?: ReactNode;\n\n /**\n * Set this to `true` to use the `disabled` theme while loading.\n *\n * @defaultValue `false`\n */\n loadingDisabledTheme?: boolean;\n\n /**\n * This should be used when the {@link loadingType} is set to\n * `\"circular-before\"`, an icon should appear before the other content in\n * the button, and the loading indicator should replace the icon.\n */\n beforeAddon?: ReactNode;\n\n /**\n * This should be used when the {@link loadingType} is set to\n * `\"circular-after\"`, an icon should appear before the other content in\n * the button, and the loading indicator should replace the icon.\n */\n afterAddon?: ReactNode;\n\n /**\n * An optional label to provide to the progressbar.\n *\n * @see {@link progressAriaLabelledBy}\n */\n progressAriaLabel?: string;\n\n /**\n * @see {@link id}\n * @defaultValue `id`\n */\n progressAriaLabelledBy?: string;\n\n /**\n * Any additional props to pass to the `CircularProgress` bar when the\n * {@link loadingType} is one of the circular types.\n */\n linearProgressProps?: PropsWithRef<LinearProgressProps, HTMLDivElement>;\n\n /**\n * Any additional props to pass to the `LinearProgress` bar when the\n * {@link loadingType} is one of the linear types.\n */\n circularProgressProps?: PropsWithRef<CircularProgressProps, HTMLSpanElement>;\n}\n\n/**\n * **Client Component**\n *\n * The async button can be used to render a loading indicator within a button\n * during an async task. The loading spinner can be shown either by enabling the\n * `loading` prop or returning a promise from the `onClick` event which will\n * continue to show the loading indicator until the promise has been resolved.\n *\n * @example Async onClick\n * ```tsx\n * import { AsyncButton } from \"@react-md/core\";\n * import { useState, type ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * const [data, setData] = useState(null);\n * return (\n * <AsyncButton\n * type=\"submit\"\n * onClick={async () => {\n * const response = await fetch(\"/my-api\");\n * const json = await response.json();\n * setData(json);\n * }}\n * >\n * Submit\n * </AsyncButton>\n * );\n * }\n * ```\n *\n * @example Manual Loading State\n * ```tsx\n * import { AsyncButton } from \"@react-md/core\";\n * import { useMutation } from \"@tanstack/query\";\n * import { useState, type ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * const { isLoading, mutate } = useMutation({\n * mutationFn: (newTodo) => fetch('/todos', {\n * method: \"POST\",\n * body: JSON.stringify(newTodo),\n * }),\n * });\n *\n * return (\n * <AsyncButton\n * type=\"submit\"\n * loading={isLoading}\n * onClick={() => {\n * mutate({ id: Date.now(), title: \"Create example\" });\n * }}\n * >\n * Create Todo\n * </AsyncButton>\n * );\n * }\n * ```\n *\n * @since 6.0.0\n */\nexport const AsyncButton = forwardRef<HTMLButtonElement, AsyncButtonProps>(\n function AsyncButton(props, ref) {\n const {\n id: propId,\n onClick = noop,\n children,\n floating = null,\n theme = floating ? \"secondary\" : \"clear\",\n themeType = floating ? \"contained\" : \"flat\",\n buttonType = floating ? \"icon\" : \"text\",\n className,\n disabled,\n loading: propLoading = false,\n loadingType = \"circular-overlay\",\n loadingChildren,\n loadingDisabledTheme = false,\n afterAddon: propAfterAddon,\n beforeAddon: propBeforeAddon,\n linearProgressProps,\n circularProgressProps,\n progressAriaLabel,\n progressAriaLabelledBy: propProgressAriaLabelledBy,\n ...remaining\n } = props;\n const id = useEnsuredId(propId, \"async-button\");\n const { handleAsync, pending } = useAsyncFunction({ disabled });\n const loading = pending || propLoading;\n\n let progressTheme: ProgressTheme = \"current-color\";\n if (theme === \"clear\" || theme === \"disabled\") {\n progressTheme = \"primary\";\n }\n\n let progressAriaLabelledBy = propProgressAriaLabelledBy;\n if (\n !progressAriaLabel &&\n !linearProgressProps?.[\"aria-label\"] &&\n !linearProgressProps?.[\"aria-labelledby\"] &&\n !circularProgressProps?.[\"aria-label\"] &&\n !circularProgressProps?.[\"aria-labelledby\"]\n ) {\n progressAriaLabelledBy = id;\n }\n\n const progress = loadingType.includes(\"linear\") ? (\n <LinearProgress\n aria-label={progressAriaLabel}\n aria-labelledby={progressAriaLabelledBy as string}\n {...linearProgressProps}\n theme={progressTheme}\n />\n ) : (\n <CircularProgress\n aria-label={progressAriaLabel}\n aria-labelledby={progressAriaLabelledBy as string}\n {...circularProgressProps}\n theme={progressTheme}\n />\n );\n\n let afterAddon = propAfterAddon;\n let beforeAddon = propBeforeAddon;\n let overlayElement: ReactNode;\n let isOverlayCover = false;\n switch (loadingType) {\n case \"circular-before\":\n beforeAddon = loading ? progress : propBeforeAddon;\n break;\n case \"circular-after\":\n afterAddon = loading ? progress : propAfterAddon;\n break;\n case \"circular-overlay\":\n case \"linear-above\":\n case \"linear-below\": {\n let alignItems: BoxAlignItems = \"center\";\n if (loadingType === \"linear-above\") {\n alignItems = \"start\";\n } else if (loadingType === \"linear-below\") {\n alignItems = \"end\";\n } else {\n isOverlayCover = true;\n }\n\n overlayElement = loading && (\n <span\n className={overlay({\n active: true,\n visible: true,\n absolute: true,\n align: alignItems,\n })}\n >\n {progress}\n </span>\n );\n break;\n }\n }\n\n return (\n <Button\n {...remaining}\n aria-disabled={loading || undefined}\n id={id}\n ref={ref}\n disabled={disabled}\n floating={floating}\n className={cnb(\n \"rmd-button--async\",\n loading && isOverlayCover && \"rmd-button--async-overlay\",\n className\n )}\n theme={loading && loadingDisabledTheme ? \"disabled\" : theme}\n themeType={themeType}\n buttonType={buttonType}\n onClick={handleAsync((event) => Promise.resolve(onClick(event)))}\n >\n {beforeAddon}\n {loading && typeof loadingChildren !== \"undefined\"\n ? loadingChildren\n : children}\n {afterAddon}\n {overlayElement}\n </Button>\n );\n }\n);\n"],"names":["cnb","forwardRef","overlay","CircularProgress","LinearProgress","useAsyncFunction","useEnsuredId","Button","noop","AsyncButton","props","ref","id","propId","onClick","children","floating","theme","themeType","buttonType","className","disabled","loading","propLoading","loadingType","loadingChildren","loadingDisabledTheme","afterAddon","propAfterAddon","beforeAddon","propBeforeAddon","linearProgressProps","circularProgressProps","progressAriaLabel","progressAriaLabelledBy","propProgressAriaLabelledBy","remaining","handleAsync","pending","progressTheme","progress","includes","aria-label","aria-labelledby","overlayElement","isOverlayCover","alignItems","span","active","visible","absolute","align","aria-disabled","undefined","event","Promise","resolve"],"mappings":"AAAA;;AACA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAAyC,QAAQ;AAEpE,SAASC,OAAO,QAAQ,8BAA8B;AACtD,SACEC,gBAAgB,QAEX,kCAAkC;AACzC,SACEC,cAAc,QAET,gCAAgC;AAGvC,SAASC,gBAAgB,QAAQ,yBAAyB;AAC1D,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,MAAM,QAA0B,cAAc;AAEvD,MAAMC,OAAO;AACX,aAAa;AACf;AA8GA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2DC,GACD,OAAO,MAAMC,4BAAcR,WACzB,SAASQ,YAAYC,KAAK,EAAEC,GAAG;IAC7B,MAAM,EACJC,IAAIC,MAAM,EACVC,UAAUN,IAAI,EACdO,QAAQ,EACRC,WAAW,IAAI,EACfC,QAAQD,WAAW,cAAc,OAAO,EACxCE,YAAYF,WAAW,cAAc,MAAM,EAC3CG,aAAaH,WAAW,SAAS,MAAM,EACvCI,SAAS,EACTC,QAAQ,EACRC,SAASC,cAAc,KAAK,EAC5BC,cAAc,kBAAkB,EAChCC,eAAe,EACfC,uBAAuB,KAAK,EAC5BC,YAAYC,cAAc,EAC1BC,aAAaC,eAAe,EAC5BC,mBAAmB,EACnBC,qBAAqB,EACrBC,iBAAiB,EACjBC,wBAAwBC,0BAA0B,EAClD,GAAGC,WACJ,GAAG1B;IACJ,MAAME,KAAKN,aAAaO,QAAQ;IAChC,MAAM,EAAEwB,WAAW,EAAEC,OAAO,EAAE,GAAGjC,iBAAiB;QAAEgB;IAAS;IAC7D,MAAMC,UAAUgB,WAAWf;IAE3B,IAAIgB,gBAA+B;IACnC,IAAItB,UAAU,WAAWA,UAAU,YAAY;QAC7CsB,gBAAgB;IAClB;IAEA,IAAIL,yBAAyBC;IAC7B,IACE,CAACF,qBACD,CAACF,qBAAqB,CAAC,aAAa,IACpC,CAACA,qBAAqB,CAAC,kBAAkB,IACzC,CAACC,uBAAuB,CAAC,aAAa,IACtC,CAACA,uBAAuB,CAAC,kBAAkB,EAC3C;QACAE,yBAAyBtB;IAC3B;IAEA,MAAM4B,WAAWhB,YAAYiB,QAAQ,CAAC,0BACpC,KAACrC;QACCsC,cAAYT;QACZU,mBAAiBT;QAChB,GAAGH,mBAAmB;QACvBd,OAAOsB;uBAGT,KAACpC;QACCuC,cAAYT;QACZU,mBAAiBT;QAChB,GAAGF,qBAAqB;QACzBf,OAAOsB;;IAIX,IAAIZ,aAAaC;IACjB,IAAIC,cAAcC;IAClB,IAAIc;IACJ,IAAIC,iBAAiB;IACrB,OAAQrB;QACN,KAAK;YACHK,cAAcP,UAAUkB,WAAWV;YACnC;QACF,KAAK;YACHH,aAAaL,UAAUkB,WAAWZ;YAClC;QACF,KAAK;QACL,KAAK;QACL,KAAK;YAAgB;gBACnB,IAAIkB,aAA4B;gBAChC,IAAItB,gBAAgB,gBAAgB;oBAClCsB,aAAa;gBACf,OAAO,IAAItB,gBAAgB,gBAAgB;oBACzCsB,aAAa;gBACf,OAAO;oBACLD,iBAAiB;gBACnB;gBAEAD,iBAAiBtB,yBACf,KAACyB;oBACC3B,WAAWlB,QAAQ;wBACjB8C,QAAQ;wBACRC,SAAS;wBACTC,UAAU;wBACVC,OAAOL;oBACT;8BAECN;;gBAGL;YACF;IACF;IAEA,qBACE,MAACjC;QACE,GAAG6B,SAAS;QACbgB,iBAAe9B,WAAW+B;QAC1BzC,IAAIA;QACJD,KAAKA;QACLU,UAAUA;QACVL,UAAUA;QACVI,WAAWpB,IACT,qBACAsB,WAAWuB,kBAAkB,6BAC7BzB;QAEFH,OAAOK,WAAWI,uBAAuB,aAAaT;QACtDC,WAAWA;QACXC,YAAYA;QACZL,SAASuB,YAAY,CAACiB,QAAUC,QAAQC,OAAO,CAAC1C,QAAQwC;;YAEvDzB;YACAP,WAAW,OAAOG,oBAAoB,cACnCA,kBACAV;YACHY;YACAiB;;;AAGP,GACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/button/Button.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, type ButtonHTMLAttributes } from \"react\";\nimport { useElementInteraction } from \"../interaction/useElementInteraction.js\";\nimport { useHigherContrastChildren } from \"../interaction/useHigherContrastChildren.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport {\n FloatingActionButton,\n type FloatingActionButtonPosition,\n type FloatingActionButtonProps,\n} from \"./FloatingActionButton.js\";\nimport { button, type ButtonClassNameThemeOptions } from \"./buttonStyles.js\";\n\nexport interface ButtonProps\n extends ButtonHTMLAttributes<HTMLButtonElement>,\n ButtonClassNameThemeOptions {\n /** @defaultValue `\"button\"` */\n type?: \"button\" | \"reset\" | \"submit\";\n\n /**\n * The position within the viewport to display the button as a floating action\n * button.\n */\n floating?: FloatingActionButtonPosition;\n\n /**\n * Any additional props to provide the to `FAB` container element when the\n * `floating` prop is provided\n */\n floatingProps?: PropsWithRef<FloatingActionButtonProps, HTMLSpanElement>;\n}\n\n/**\n * **Client Component**\n *\n * @example Simple Example\n * ```tsx\n * import { Button } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return (\n * <Button\n * onClick={(event) => {\n * // do something\n * }}\n * >\n * Content\n * </Button>\n * );\n * }\n * ```\n *\n * @example Theme Example\n * ```tsx\n * import { Button } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return (\n * <Button\n * theme=\"primary\"\n * themeType=\"contained\"\n * onClick={(event) => {\n * // do something\n * }}\n * >\n * Content\n * </Button>\n * );\n * }\n * ```\n *\n * @example Icon Button Example\n * ```tsx\n * import { Button } from \"@react-md/core\";\n * import { FavoriteSVGIcon } from \"@react-md/material-icons\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return (\n * <Button\n * theme=\"secondary\"\n * themeType=\"outline\"\n * buttonType=\"icon\"\n * onClick={(event) => {\n * // do something\n * }}\n * >\n * <FavoriteSVGIcon />\n * </Button>\n * );\n * }\n * ```\n *\n * @example Text Button with icons\n * ```tsx\n * import { Button } from \"@react-md/core\";\n * import { FavoriteSVGIcon } from \"@react-md/material-icons\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return (\n * <Button\n * onClick={(event) => {\n * // do something\n * }}\n * >\n * <FavoriteSVGIcon />\n * Content\n * </Button>\n * );\n * }\n * ```\n */\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n function Button(props, ref) {\n const {\n type = \"button\",\n disabled = false,\n floating = null,\n floatingProps,\n theme = floating ? \"secondary\" : \"clear\",\n themeType = floating ? \"contained\" : \"flat\",\n iconSize,\n buttonType = floating || iconSize ? \"icon\" : \"text\",\n className,\n responsive,\n children: propChildren,\n onBlur,\n onClick,\n onKeyDown,\n onKeyUp,\n onMouseDown,\n onMouseUp,\n onMouseLeave,\n onDragStart,\n onTouchStart,\n onTouchEnd,\n onTouchMove,\n ...remaining\n } = props;\n const isThemeDisabled = theme === \"disabled\";\n const ariaDisabled = props[\"aria-disabled\"];\n const { pressed, pressedClassName, ripples, handlers } =\n useElementInteraction({\n onBlur,\n onClick,\n onKeyDown,\n onKeyUp,\n onMouseDown,\n onMouseUp,\n onMouseLeave,\n onDragStart,\n onTouchStart,\n onTouchEnd,\n onTouchMove,\n disabled:\n disabled ||\n isThemeDisabled ||\n (ariaDisabled && ariaDisabled !== \"false\"),\n });\n\n const children = useHigherContrastChildren(propChildren);\n\n return (\n <FloatingActionButton position={floating} {...floatingProps}>\n <button\n {...remaining}\n // when the theme is set to `\"disabled\"`, the event handlers should be\n // removed so that it behaves like a disabled button. you do not want to\n // actually set the `disabled` attribute since it will lose keyboard\n // focus. this is mostly for supporting circular progress bars within\n // buttons\n {...(isThemeDisabled ? {} : handlers)}\n aria-disabled={isThemeDisabled || remaining[\"aria-disabled\"]}\n disabled={disabled}\n ref={ref}\n type={type}\n className={button({\n theme,\n themeType,\n buttonType,\n disabled,\n responsive,\n iconSize,\n pressed,\n pressedClassName,\n className,\n })}\n >\n {children}\n {ripples}\n </button>\n </FloatingActionButton>\n );\n }\n);\n"],"names":["forwardRef","useElementInteraction","useHigherContrastChildren","FloatingActionButton","button","Button","props","ref","type","disabled","floating","floatingProps","theme","themeType","iconSize","buttonType","className","responsive","children","propChildren","onBlur","onClick","onKeyDown","onKeyUp","onMouseDown","onMouseUp","onMouseLeave","onDragStart","onTouchStart","onTouchEnd","onTouchMove","remaining","isThemeDisabled","ariaDisabled","pressed","pressedClassName","ripples","handlers","position","aria-disabled"],"
|
|
1
|
+
{"version":3,"sources":["../../src/button/Button.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, type ButtonHTMLAttributes } from \"react\";\nimport { useElementInteraction } from \"../interaction/useElementInteraction.js\";\nimport { useHigherContrastChildren } from \"../interaction/useHigherContrastChildren.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport {\n FloatingActionButton,\n type FloatingActionButtonPosition,\n type FloatingActionButtonProps,\n} from \"./FloatingActionButton.js\";\nimport { button, type ButtonClassNameThemeOptions } from \"./buttonStyles.js\";\n\nexport interface ButtonProps\n extends ButtonHTMLAttributes<HTMLButtonElement>,\n ButtonClassNameThemeOptions {\n /** @defaultValue `\"button\"` */\n type?: \"button\" | \"reset\" | \"submit\";\n\n /**\n * The position within the viewport to display the button as a floating action\n * button.\n */\n floating?: FloatingActionButtonPosition;\n\n /**\n * Any additional props to provide the to `FAB` container element when the\n * `floating` prop is provided\n */\n floatingProps?: PropsWithRef<FloatingActionButtonProps, HTMLSpanElement>;\n}\n\n/**\n * **Client Component**\n *\n * @example Simple Example\n * ```tsx\n * import { Button } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return (\n * <Button\n * onClick={(event) => {\n * // do something\n * }}\n * >\n * Content\n * </Button>\n * );\n * }\n * ```\n *\n * @example Theme Example\n * ```tsx\n * import { Button } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return (\n * <Button\n * theme=\"primary\"\n * themeType=\"contained\"\n * onClick={(event) => {\n * // do something\n * }}\n * >\n * Content\n * </Button>\n * );\n * }\n * ```\n *\n * @example Icon Button Example\n * ```tsx\n * import { Button } from \"@react-md/core\";\n * import { FavoriteSVGIcon } from \"@react-md/material-icons\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return (\n * <Button\n * theme=\"secondary\"\n * themeType=\"outline\"\n * buttonType=\"icon\"\n * onClick={(event) => {\n * // do something\n * }}\n * >\n * <FavoriteSVGIcon />\n * </Button>\n * );\n * }\n * ```\n *\n * @example Text Button with icons\n * ```tsx\n * import { Button } from \"@react-md/core\";\n * import { FavoriteSVGIcon } from \"@react-md/material-icons\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return (\n * <Button\n * onClick={(event) => {\n * // do something\n * }}\n * >\n * <FavoriteSVGIcon />\n * Content\n * </Button>\n * );\n * }\n * ```\n */\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n function Button(props, ref) {\n const {\n type = \"button\",\n disabled = false,\n floating = null,\n floatingProps,\n theme = floating ? \"secondary\" : \"clear\",\n themeType = floating ? \"contained\" : \"flat\",\n iconSize,\n buttonType = floating || iconSize ? \"icon\" : \"text\",\n className,\n responsive,\n children: propChildren,\n onBlur,\n onClick,\n onKeyDown,\n onKeyUp,\n onMouseDown,\n onMouseUp,\n onMouseLeave,\n onDragStart,\n onTouchStart,\n onTouchEnd,\n onTouchMove,\n ...remaining\n } = props;\n const isThemeDisabled = theme === \"disabled\";\n const ariaDisabled = props[\"aria-disabled\"];\n const { pressed, pressedClassName, ripples, handlers } =\n useElementInteraction({\n onBlur,\n onClick,\n onKeyDown,\n onKeyUp,\n onMouseDown,\n onMouseUp,\n onMouseLeave,\n onDragStart,\n onTouchStart,\n onTouchEnd,\n onTouchMove,\n disabled:\n disabled ||\n isThemeDisabled ||\n (ariaDisabled && ariaDisabled !== \"false\"),\n });\n\n const children = useHigherContrastChildren(propChildren);\n\n return (\n <FloatingActionButton position={floating} {...floatingProps}>\n <button\n {...remaining}\n // when the theme is set to `\"disabled\"`, the event handlers should be\n // removed so that it behaves like a disabled button. you do not want to\n // actually set the `disabled` attribute since it will lose keyboard\n // focus. this is mostly for supporting circular progress bars within\n // buttons\n {...(isThemeDisabled ? {} : handlers)}\n aria-disabled={isThemeDisabled || remaining[\"aria-disabled\"]}\n disabled={disabled}\n ref={ref}\n type={type}\n className={button({\n theme,\n themeType,\n buttonType,\n disabled,\n responsive,\n iconSize,\n pressed,\n pressedClassName,\n className,\n })}\n >\n {children}\n {ripples}\n </button>\n </FloatingActionButton>\n );\n }\n);\n"],"names":["forwardRef","useElementInteraction","useHigherContrastChildren","FloatingActionButton","button","Button","props","ref","type","disabled","floating","floatingProps","theme","themeType","iconSize","buttonType","className","responsive","children","propChildren","onBlur","onClick","onKeyDown","onKeyUp","onMouseDown","onMouseUp","onMouseLeave","onDragStart","onTouchStart","onTouchEnd","onTouchMove","remaining","isThemeDisabled","ariaDisabled","pressed","pressedClassName","ripples","handlers","position","aria-disabled"],"mappings":"AAAA;;AACA,SAASA,UAAU,QAAmC,QAAQ;AAC9D,SAASC,qBAAqB,QAAQ,0CAA0C;AAChF,SAASC,yBAAyB,QAAQ,8CAA8C;AAExF,SACEC,oBAAoB,QAGf,4BAA4B;AACnC,SAASC,MAAM,QAA0C,oBAAoB;AAqB7E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkFC,GACD,OAAO,MAAMC,uBAASL,WACpB,SAASK,OAAOC,KAAK,EAAEC,GAAG;IACxB,MAAM,EACJC,OAAO,QAAQ,EACfC,WAAW,KAAK,EAChBC,WAAW,IAAI,EACfC,aAAa,EACbC,QAAQF,WAAW,cAAc,OAAO,EACxCG,YAAYH,WAAW,cAAc,MAAM,EAC3CI,QAAQ,EACRC,aAAaL,YAAYI,WAAW,SAAS,MAAM,EACnDE,SAAS,EACTC,UAAU,EACVC,UAAUC,YAAY,EACtBC,MAAM,EACNC,OAAO,EACPC,SAAS,EACTC,OAAO,EACPC,WAAW,EACXC,SAAS,EACTC,YAAY,EACZC,WAAW,EACXC,YAAY,EACZC,UAAU,EACVC,WAAW,EACX,GAAGC,WACJ,GAAGzB;IACJ,MAAM0B,kBAAkBpB,UAAU;IAClC,MAAMqB,eAAe3B,KAAK,CAAC,gBAAgB;IAC3C,MAAM,EAAE4B,OAAO,EAAEC,gBAAgB,EAAEC,OAAO,EAAEC,QAAQ,EAAE,GACpDpC,sBAAsB;QACpBmB;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACArB,UACEA,YACAuB,mBACCC,gBAAgBA,iBAAiB;IACtC;IAEF,MAAMf,WAAWhB,0BAA0BiB;IAE3C,qBACE,KAAChB;QAAqBmC,UAAU5B;QAAW,GAAGC,aAAa;kBACzD,cAAA,MAACP;YACE,GAAG2B,SAAS;YAMZ,GAAIC,kBAAkB,CAAC,IAAIK,QAAQ;YACpCE,iBAAeP,mBAAmBD,SAAS,CAAC,gBAAgB;YAC5DtB,UAAUA;YACVF,KAAKA;YACLC,MAAMA;YACNQ,WAAWZ,OAAO;gBAChBQ;gBACAC;gBACAE;gBACAN;gBACAQ;gBACAH;gBACAoB;gBACAC;gBACAnB;YACF;;gBAECE;gBACAkB;;;;AAIT,GACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/button/ButtonUnstyled.tsx"],"sourcesContent":["import { forwardRef, type ButtonHTMLAttributes } from \"react\";\nimport { buttonUnstyled } from \"./buttonUnstyledStyles.js\";\n\n/**\n * The props for the unstyled button are just all the normal button html\n * attributes without the `type` since this component forces the `type=\"button\"`\n * value.\n *\n * @since 6.0.0 Renamed from `UnstyledButtonProps`\n */\nexport type ButtonUnstyledProps = Omit<\n ButtonHTMLAttributes<HTMLButtonElement>,\n \"type\"\n>;\n\n/**\n * **Server Component**\n *\n * A simple wrapper for a `<button type=\"button\">` that applies the unstyled\n * utility class.\n *\n * Requires the `$disable-unstyled-utility-class` to be `false` to use.\n *\n * @see {@link buttonUnstyled}\n * @since 6.0.0 Renamed from `UnstyledButton`\n */\nexport const ButtonUnstyled = forwardRef<\n HTMLButtonElement,\n ButtonUnstyledProps\n>(function ButtonUnstyled(props, ref) {\n const { children, className, ...remaining } = props;\n return (\n <button\n {...remaining}\n ref={ref}\n type=\"button\"\n className={buttonUnstyled({ className })}\n >\n {children}\n </button>\n );\n});\n"],"names":["forwardRef","buttonUnstyled","ButtonUnstyled","props","ref","children","className","remaining","button","type"],"
|
|
1
|
+
{"version":3,"sources":["../../src/button/ButtonUnstyled.tsx"],"sourcesContent":["import { forwardRef, type ButtonHTMLAttributes } from \"react\";\nimport { buttonUnstyled } from \"./buttonUnstyledStyles.js\";\n\n/**\n * The props for the unstyled button are just all the normal button html\n * attributes without the `type` since this component forces the `type=\"button\"`\n * value.\n *\n * @since 6.0.0 Renamed from `UnstyledButtonProps`\n */\nexport type ButtonUnstyledProps = Omit<\n ButtonHTMLAttributes<HTMLButtonElement>,\n \"type\"\n>;\n\n/**\n * **Server Component**\n *\n * A simple wrapper for a `<button type=\"button\">` that applies the unstyled\n * utility class.\n *\n * Requires the `$disable-unstyled-utility-class` to be `false` to use.\n *\n * @see {@link buttonUnstyled}\n * @since 6.0.0 Renamed from `UnstyledButton`\n */\nexport const ButtonUnstyled = forwardRef<\n HTMLButtonElement,\n ButtonUnstyledProps\n>(function ButtonUnstyled(props, ref) {\n const { children, className, ...remaining } = props;\n return (\n <button\n {...remaining}\n ref={ref}\n type=\"button\"\n className={buttonUnstyled({ className })}\n >\n {children}\n </button>\n );\n});\n"],"names":["forwardRef","buttonUnstyled","ButtonUnstyled","props","ref","children","className","remaining","button","type"],"mappings":";AAAA,SAASA,UAAU,QAAmC,QAAQ;AAC9D,SAASC,cAAc,QAAQ,4BAA4B;AAc3D;;;;;;;;;;CAUC,GACD,OAAO,MAAMC,+BAAiBF,WAG5B,SAASE,eAAeC,KAAK,EAAEC,GAAG;IAClC,MAAM,EAAEC,QAAQ,EAAEC,SAAS,EAAE,GAAGC,WAAW,GAAGJ;IAC9C,qBACE,KAACK;QACE,GAAGD,SAAS;QACbH,KAAKA;QACLK,MAAK;QACLH,WAAWL,eAAe;YAAEK;QAAU;kBAErCD;;AAGP,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/button/FloatingActionButton.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { forwardRef, type HTMLAttributes } from \"react\";\nimport { bem } from \"../utils/bem.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-fab-offset\"?: string | number;\n }\n}\n\nconst styles = bem(\"rmd-fab\");\n\n/**\n * The position within the viewport for the floating action button.\n *\n * @since 6.0.0 This was renamed from `FABPosition`\n */\nexport type FloatingActionButtonPosition =\n | \"bottom-left\"\n | \"bottom-right\"\n | \"top-left\"\n | \"top-right\"\n | null;\n\n/**\n * @since 6.0.0\n * @internal\n */\nexport interface FloatingActionButtonClassNameOptions {\n className?: string;\n\n /** @defaultValue `null` */\n position?: FloatingActionButtonPosition;\n\n /**\n * @defaultValue `false`\n */\n absolute?: boolean;\n}\n\n/**\n * FAB = Floating Action Button\n *\n * @since 6.0.0\n * @internal\n */\nexport function fab(options: FloatingActionButtonClassNameOptions): string {\n const { className, position = null, absolute = false } = options;\n\n return cnb(\n styles({\n tl: position === \"top-left\",\n tr: position === \"top-right\",\n bl: position === \"bottom-left\",\n br: position === \"bottom-right\",\n absolute,\n }),\n className\n );\n}\n\n/** @since 6.0.0 */\nexport interface FloatingActionButtonProps\n extends HTMLAttributes<HTMLSpanElement>,\n FloatingActionButtonClassNameOptions {}\n\n/**\n * @since 6.0.0\n * @internal\n */\nexport const FloatingActionButton = forwardRef<\n HTMLSpanElement,\n FloatingActionButtonProps\n>(function FloatingActionButton(props, ref) {\n const {\n children,\n className,\n position = null,\n absolute = false,\n ...remaining\n } = props;\n if (!position) {\n return <>{children}</>;\n }\n\n return (\n <span\n {...remaining}\n ref={ref}\n className={fab({\n className,\n position,\n absolute,\n })}\n >\n {children}\n </span>\n );\n});\n"],"names":["cnb","forwardRef","bem","styles","fab","options","className","position","absolute","tl","tr","bl","br","FloatingActionButton","props","ref","children","remaining","span"],"
|
|
1
|
+
{"version":3,"sources":["../../src/button/FloatingActionButton.tsx"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { forwardRef, type HTMLAttributes } from \"react\";\nimport { bem } from \"../utils/bem.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-fab-offset\"?: string | number;\n }\n}\n\nconst styles = bem(\"rmd-fab\");\n\n/**\n * The position within the viewport for the floating action button.\n *\n * @since 6.0.0 This was renamed from `FABPosition`\n */\nexport type FloatingActionButtonPosition =\n | \"bottom-left\"\n | \"bottom-right\"\n | \"top-left\"\n | \"top-right\"\n | null;\n\n/**\n * @since 6.0.0\n * @internal\n */\nexport interface FloatingActionButtonClassNameOptions {\n className?: string;\n\n /** @defaultValue `null` */\n position?: FloatingActionButtonPosition;\n\n /**\n * @defaultValue `false`\n */\n absolute?: boolean;\n}\n\n/**\n * FAB = Floating Action Button\n *\n * @since 6.0.0\n * @internal\n */\nexport function fab(options: FloatingActionButtonClassNameOptions): string {\n const { className, position = null, absolute = false } = options;\n\n return cnb(\n styles({\n tl: position === \"top-left\",\n tr: position === \"top-right\",\n bl: position === \"bottom-left\",\n br: position === \"bottom-right\",\n absolute,\n }),\n className\n );\n}\n\n/** @since 6.0.0 */\nexport interface FloatingActionButtonProps\n extends HTMLAttributes<HTMLSpanElement>,\n FloatingActionButtonClassNameOptions {}\n\n/**\n * @since 6.0.0\n * @internal\n */\nexport const FloatingActionButton = forwardRef<\n HTMLSpanElement,\n FloatingActionButtonProps\n>(function FloatingActionButton(props, ref) {\n const {\n children,\n className,\n position = null,\n absolute = false,\n ...remaining\n } = props;\n if (!position) {\n return <>{children}</>;\n }\n\n return (\n <span\n {...remaining}\n ref={ref}\n className={fab({\n className,\n position,\n absolute,\n })}\n >\n {children}\n </span>\n );\n});\n"],"names":["cnb","forwardRef","bem","styles","fab","options","className","position","absolute","tl","tr","bl","br","FloatingActionButton","props","ref","children","remaining","span"],"mappings":";AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAA6B,QAAQ;AACxD,SAASC,GAAG,QAAQ,kBAAkB;AAQtC,MAAMC,SAASD,IAAI;AA8BnB;;;;;CAKC,GACD,OAAO,SAASE,IAAIC,OAA6C;IAC/D,MAAM,EAAEC,SAAS,EAAEC,WAAW,IAAI,EAAEC,WAAW,KAAK,EAAE,GAAGH;IAEzD,OAAOL,IACLG,OAAO;QACLM,IAAIF,aAAa;QACjBG,IAAIH,aAAa;QACjBI,IAAIJ,aAAa;QACjBK,IAAIL,aAAa;QACjBC;IACF,IACAF;AAEJ;AAOA;;;CAGC,GACD,OAAO,MAAMO,qCAAuBZ,WAGlC,SAASY,qBAAqBC,KAAK,EAAEC,GAAG;IACxC,MAAM,EACJC,QAAQ,EACRV,SAAS,EACTC,WAAW,IAAI,EACfC,WAAW,KAAK,EAChB,GAAGS,WACJ,GAAGH;IACJ,IAAI,CAACP,UAAU;QACb,qBAAO;sBAAGS;;IACZ;IAEA,qBACE,KAACE;QACE,GAAGD,SAAS;QACbF,KAAKA;QACLT,WAAWF,IAAI;YACbE;YACAC;YACAC;QACF;kBAECQ;;AAGP,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/button/TooltippedButton.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, type ReactNode } from \"react\";\nimport { Tooltip, type TooltipProps } from \"../tooltip/Tooltip.js\";\nimport {\n useTooltip,\n type ProvidedTooltipProps,\n type TooltipOptions,\n type TooltippedElementEventHandlers,\n} from \"../tooltip/useTooltip.js\";\nimport { Button, type ButtonProps } from \"./Button.js\";\nimport { type ButtonType } from \"./buttonStyles.js\";\n\n/**\n * @since 6.0.0\n */\nexport interface TooltippedButtonProps extends ButtonProps {\n /** @defaultValue `\"icon\"` */\n buttonType?: ButtonType;\n\n /**\n * The tooltip children to render. When this is falsey, the tooltip event\n * listeners will not be enabled and the tooltip will never display.\n */\n tooltip?: ReactNode;\n\n /**\n * Any additional props to pass to the `Tooltip` component (normally styling\n * props).\n */\n tooltipProps?: Omit<TooltipProps, keyof ProvidedTooltipProps>;\n\n /**\n * Any additional tooltip options to pass to {@link useTooltip}. The most\n * common options would be:\n *\n * ```ts\n * tooltipOptions={{\n * overflowOnly: true,\n *\n * // whatever values you want for these\n * hoverTimeout: 0,\n * leaveTimeout: 150,\n * defaultPosition: \"left\",\n * }}\n * ```\n */\n tooltipOptions?: Omit<TooltipOptions, keyof TooltippedElementEventHandlers>;\n}\n\n/**\n * **Client Component**\n *\n * A simple wrapper around the `Button` and `Tooltip` components to dynamically\n * add tooltips to buttons. The `buttonType` will default to `icon` instead of\n * `text`.\n *\n * @example\n * ```tsx\n * import { TooltippedButton } from \"@react-md/core\";\n * import FavoriteIcon from \"@react-md/material-icons/FavoriteIcon\";\n *\n * export default function Example(): ReactElement {\n * return (\n * <TooltippedButton tooltip=\"I am a tooltip!\" aria-label=\"Favorite\">\n * <FavoriteIcon />\n * </TooltippedButton>\n * );\n * }\n * ```\n *\n * @since 6.0.0\n */\nexport const TooltippedButton = forwardRef<\n HTMLButtonElement,\n TooltippedButtonProps\n>(function TooltippedButton(props, ref) {\n const {\n tooltip,\n tooltipProps,\n tooltipOptions,\n buttonType = \"icon\",\n onBlur,\n onFocus,\n onMouseEnter,\n onMouseLeave,\n onTouchStart,\n onTouchEnd,\n onContextMenu,\n ...remaining\n } = props;\n const { tooltipProps: providedTooltipProps, elementProps } = useTooltip({\n ...tooltipOptions,\n disabled: !tooltip || tooltipOptions?.disabled,\n onBlur,\n onFocus,\n onMouseEnter,\n onMouseLeave,\n onTouchEnd,\n onTouchStart,\n onContextMenu,\n });\n\n return (\n <>\n <Button\n {...elementProps}\n {...remaining}\n ref={ref}\n buttonType={buttonType}\n />\n <Tooltip {...providedTooltipProps} {...tooltipProps}>\n {tooltip}\n </Tooltip>\n </>\n );\n});\n"],"names":["forwardRef","Tooltip","useTooltip","Button","TooltippedButton","props","ref","tooltip","tooltipProps","tooltipOptions","buttonType","onBlur","onFocus","onMouseEnter","onMouseLeave","onTouchStart","onTouchEnd","onContextMenu","remaining","providedTooltipProps","elementProps","disabled"],"
|
|
1
|
+
{"version":3,"sources":["../../src/button/TooltippedButton.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, type ReactNode } from \"react\";\nimport { Tooltip, type TooltipProps } from \"../tooltip/Tooltip.js\";\nimport {\n useTooltip,\n type ProvidedTooltipProps,\n type TooltipOptions,\n type TooltippedElementEventHandlers,\n} from \"../tooltip/useTooltip.js\";\nimport { Button, type ButtonProps } from \"./Button.js\";\nimport { type ButtonType } from \"./buttonStyles.js\";\n\n/**\n * @since 6.0.0\n */\nexport interface TooltippedButtonProps extends ButtonProps {\n /** @defaultValue `\"icon\"` */\n buttonType?: ButtonType;\n\n /**\n * The tooltip children to render. When this is falsey, the tooltip event\n * listeners will not be enabled and the tooltip will never display.\n */\n tooltip?: ReactNode;\n\n /**\n * Any additional props to pass to the `Tooltip` component (normally styling\n * props).\n */\n tooltipProps?: Omit<TooltipProps, keyof ProvidedTooltipProps>;\n\n /**\n * Any additional tooltip options to pass to {@link useTooltip}. The most\n * common options would be:\n *\n * ```ts\n * tooltipOptions={{\n * overflowOnly: true,\n *\n * // whatever values you want for these\n * hoverTimeout: 0,\n * leaveTimeout: 150,\n * defaultPosition: \"left\",\n * }}\n * ```\n */\n tooltipOptions?: Omit<TooltipOptions, keyof TooltippedElementEventHandlers>;\n}\n\n/**\n * **Client Component**\n *\n * A simple wrapper around the `Button` and `Tooltip` components to dynamically\n * add tooltips to buttons. The `buttonType` will default to `icon` instead of\n * `text`.\n *\n * @example\n * ```tsx\n * import { TooltippedButton } from \"@react-md/core\";\n * import FavoriteIcon from \"@react-md/material-icons/FavoriteIcon\";\n *\n * export default function Example(): ReactElement {\n * return (\n * <TooltippedButton tooltip=\"I am a tooltip!\" aria-label=\"Favorite\">\n * <FavoriteIcon />\n * </TooltippedButton>\n * );\n * }\n * ```\n *\n * @since 6.0.0\n */\nexport const TooltippedButton = forwardRef<\n HTMLButtonElement,\n TooltippedButtonProps\n>(function TooltippedButton(props, ref) {\n const {\n tooltip,\n tooltipProps,\n tooltipOptions,\n buttonType = \"icon\",\n onBlur,\n onFocus,\n onMouseEnter,\n onMouseLeave,\n onTouchStart,\n onTouchEnd,\n onContextMenu,\n ...remaining\n } = props;\n const { tooltipProps: providedTooltipProps, elementProps } = useTooltip({\n ...tooltipOptions,\n disabled: !tooltip || tooltipOptions?.disabled,\n onBlur,\n onFocus,\n onMouseEnter,\n onMouseLeave,\n onTouchEnd,\n onTouchStart,\n onContextMenu,\n });\n\n return (\n <>\n <Button\n {...elementProps}\n {...remaining}\n ref={ref}\n buttonType={buttonType}\n />\n <Tooltip {...providedTooltipProps} {...tooltipProps}>\n {tooltip}\n </Tooltip>\n </>\n );\n});\n"],"names":["forwardRef","Tooltip","useTooltip","Button","TooltippedButton","props","ref","tooltip","tooltipProps","tooltipOptions","buttonType","onBlur","onFocus","onMouseEnter","onMouseLeave","onTouchStart","onTouchEnd","onContextMenu","remaining","providedTooltipProps","elementProps","disabled"],"mappings":"AAAA;;AACA,SAASA,UAAU,QAAwB,QAAQ;AACnD,SAASC,OAAO,QAA2B,wBAAwB;AACnE,SACEC,UAAU,QAIL,2BAA2B;AAClC,SAASC,MAAM,QAA0B,cAAc;AAwCvD;;;;;;;;;;;;;;;;;;;;;;CAsBC,GACD,OAAO,MAAMC,iCAAmBJ,WAG9B,SAASI,iBAAiBC,KAAK,EAAEC,GAAG;IACpC,MAAM,EACJC,OAAO,EACPC,YAAY,EACZC,cAAc,EACdC,aAAa,MAAM,EACnBC,MAAM,EACNC,OAAO,EACPC,YAAY,EACZC,YAAY,EACZC,YAAY,EACZC,UAAU,EACVC,aAAa,EACb,GAAGC,WACJ,GAAGb;IACJ,MAAM,EAAEG,cAAcW,oBAAoB,EAAEC,YAAY,EAAE,GAAGlB,WAAW;QACtE,GAAGO,cAAc;QACjBY,UAAU,CAACd,WAAWE,gBAAgBY;QACtCV;QACAC;QACAC;QACAC;QACAE;QACAD;QACAE;IACF;IAEA,qBACE;;0BACE,KAACd;gBACE,GAAGiB,YAAY;gBACf,GAAGF,SAAS;gBACbZ,KAAKA;gBACLI,YAAYA;;0BAEd,KAACT;gBAAS,GAAGkB,oBAAoB;gBAAG,GAAGX,YAAY;0BAChDD;;;;AAIT,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/button/buttonStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport {\n cssUtils,\n type OutlineColor,\n type TextColor,\n type ThemeColor,\n} from \"../cssUtils.js\";\nimport { bem } from \"../utils/bem.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-button-background-color\"?: string;\n \"--rmd-button-color\"?: string;\n \"--rmd-button-border-radius\"?: string | number;\n \"--rmd-button-contained-background-color\"?: string;\n \"--rmd-button-contained-color\"?: string;\n \"--rmd-button-text-horizontal-padding\"?: string | number;\n \"--rmd-button-text-vertical-padding\"?: string | number;\n \"--rmd-button-text-min-height\"?: string | number;\n \"--rmd-button-text-min-width\"?: string | number;\n \"--rmd-button-icon-size\"?: string | number;\n \"--rmd-button-icon-radius\"?: string | number;\n }\n}\n\nconst styles = bem(\"rmd-button\");\n\n/**\n * When this is set to `\"text\"`, the size of the button will be determined by\n * the content and will be more block-like. Icons can still be rendered in\n * `\"text\"` buttons and will have spacing automatically applied between other\n * content in the button.\n *\n * When this is set to `\"icon\"`, the button will be equal height/width and\n * circular.\n */\nexport type ButtonType = \"text\" | \"icon\" | \"icon-square\";\n\n/**\n * One of the valid material design default button themes that can be used. This\n * will update the general look and feel by updating the colors within the\n * button while the `ButtonThemeType` will update the borders or box shadow.\n */\nexport type ButtonTheme = ThemeColor | \"clear\" | \"disabled\";\n\n/**\n * When this is set to `\"flat\"`, the button will have no `background-color`,\n * `border`, and `box-shadow`. It will only set the `color` to the\n * {@link ButtonTheme}.\n *\n * When this is set to `\"outline\"`, the button will have no `background-color`,\n * but gain a `border` and `color` set to the {@link ButtonTheme}.\n *\n * When this is set to `\"contained\"`, the button will set the `background-color`\n * to the {@link ButtonTheme}, add some `box-shadow`, and set the `color` to\n * either `#000` or `#fff`. (The `color` defaults to whichever value has the\n * highest contrast ratio with the `background-color`)\n */\nexport type ButtonThemeType = \"flat\" | \"outline\" | \"contained\";\n\n/** @since 6.0.0 */\nexport interface ButtonClassNameThemeOptions {\n className?: string;\n\n /** @defaultValue `false` */\n disabled?: boolean;\n\n /**\n * @see {@link ButtonTheme} for information about the different types.\n * @defaultValue `\"text\"`\n */\n buttonType?: ButtonType;\n\n /** @defaultValue `\"clear\"` */\n theme?: ButtonTheme;\n\n /**\n * @see {@link ButtonThemeType} for information about the theming behavior.\n * @defaultValue `\"flat\"`\n */\n themeType?: ButtonThemeType;\n\n /**\n * This will display the button as an icon button until the tablet breakpoint\n * which will then display as a button with an icon.\n *\n * @defaultValue `false`\n */\n responsive?: boolean;\n\n /**\n * @defaultValue `\"normal\"`\n */\n iconSize?: \"small\" | \"normal\" | \"large\";\n}\n\n/**\n * @since 6.0.0\n */\nexport interface ButtonClassNameOptions extends ButtonClassNameThemeOptions {\n /** @defaultValue `false` */\n pressed?: boolean;\n pressedClassName?: string;\n}\n\n/**\n * Creates a button theme based on the button theming props. This is really just\n * used so that other elements like clickable `<div>`s or `<input type=\"file\">`\n * can look like buttons.\n *\n * @param options - An object containing the themeable button props to generate a\n * button theme className.\n * @returns a string of class names to create an element with a button theme.\n * @since 6.0.0 This used to be called `buttonThemeClassNames`.\n */\nexport function button(options: ButtonClassNameOptions = {}): string {\n const {\n theme: propTheme = \"clear\",\n themeType = \"flat\",\n iconSize,\n buttonType = \"text\",\n disabled: propDisabled = false,\n responsive,\n pressed = false,\n pressedClassName,\n className,\n } = options;\n\n const theme = propTheme === \"disabled\" ? \"clear\" : propTheme;\n const disabled = propDisabled || propTheme === \"disabled\";\n const text = buttonType === \"text\" && !responsive && !iconSize;\n const icon = !text;\n const outline = themeType === \"outline\";\n const contained = themeType === \"contained\";\n const clear = theme === \"clear\";\n const isThemed = !disabled && !clear;\n\n let textColor: ThemeColor | TextColor | undefined;\n let outlineColor: OutlineColor | undefined;\n let backgroundColor: ThemeColor | undefined;\n if (isThemed && !contained) {\n textColor = theme;\n } else if (disabled) {\n textColor = \"text-disabled\";\n }\n if (isThemed && contained) {\n backgroundColor = theme;\n }\n if (outline) {\n outlineColor = clear ? \"greyscale\" : theme;\n }\n\n return cnb(\n styles({\n text,\n icon,\n \"icon-square\": buttonType === \"icon-square\",\n disabled,\n contained: !disabled && contained,\n pressed: contained && pressed,\n responsive,\n small: icon && iconSize === \"small\",\n large: icon && iconSize === \"large\",\n }),\n pressedClassName,\n cssUtils({\n surface: true,\n textColor,\n outlineColor,\n backgroundColor,\n }),\n className\n );\n}\n"],"names":["cnb","cssUtils","bem","styles","button","options","theme","propTheme","themeType","iconSize","buttonType","disabled","propDisabled","responsive","pressed","pressedClassName","className","text","icon","outline","contained","clear","isThemed","textColor","outlineColor","backgroundColor","small","large","surface"],"
|
|
1
|
+
{"version":3,"sources":["../../src/button/buttonStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport {\n cssUtils,\n type OutlineColor,\n type TextColor,\n type ThemeColor,\n} from \"../cssUtils.js\";\nimport { bem } from \"../utils/bem.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-button-background-color\"?: string;\n \"--rmd-button-color\"?: string;\n \"--rmd-button-border-radius\"?: string | number;\n \"--rmd-button-contained-background-color\"?: string;\n \"--rmd-button-contained-color\"?: string;\n \"--rmd-button-text-horizontal-padding\"?: string | number;\n \"--rmd-button-text-vertical-padding\"?: string | number;\n \"--rmd-button-text-min-height\"?: string | number;\n \"--rmd-button-text-min-width\"?: string | number;\n \"--rmd-button-icon-size\"?: string | number;\n \"--rmd-button-icon-radius\"?: string | number;\n }\n}\n\nconst styles = bem(\"rmd-button\");\n\n/**\n * When this is set to `\"text\"`, the size of the button will be determined by\n * the content and will be more block-like. Icons can still be rendered in\n * `\"text\"` buttons and will have spacing automatically applied between other\n * content in the button.\n *\n * When this is set to `\"icon\"`, the button will be equal height/width and\n * circular.\n */\nexport type ButtonType = \"text\" | \"icon\" | \"icon-square\";\n\n/**\n * One of the valid material design default button themes that can be used. This\n * will update the general look and feel by updating the colors within the\n * button while the `ButtonThemeType` will update the borders or box shadow.\n */\nexport type ButtonTheme = ThemeColor | \"clear\" | \"disabled\";\n\n/**\n * When this is set to `\"flat\"`, the button will have no `background-color`,\n * `border`, and `box-shadow`. It will only set the `color` to the\n * {@link ButtonTheme}.\n *\n * When this is set to `\"outline\"`, the button will have no `background-color`,\n * but gain a `border` and `color` set to the {@link ButtonTheme}.\n *\n * When this is set to `\"contained\"`, the button will set the `background-color`\n * to the {@link ButtonTheme}, add some `box-shadow`, and set the `color` to\n * either `#000` or `#fff`. (The `color` defaults to whichever value has the\n * highest contrast ratio with the `background-color`)\n */\nexport type ButtonThemeType = \"flat\" | \"outline\" | \"contained\";\n\n/** @since 6.0.0 */\nexport interface ButtonClassNameThemeOptions {\n className?: string;\n\n /** @defaultValue `false` */\n disabled?: boolean;\n\n /**\n * @see {@link ButtonTheme} for information about the different types.\n * @defaultValue `\"text\"`\n */\n buttonType?: ButtonType;\n\n /** @defaultValue `\"clear\"` */\n theme?: ButtonTheme;\n\n /**\n * @see {@link ButtonThemeType} for information about the theming behavior.\n * @defaultValue `\"flat\"`\n */\n themeType?: ButtonThemeType;\n\n /**\n * This will display the button as an icon button until the tablet breakpoint\n * which will then display as a button with an icon.\n *\n * @defaultValue `false`\n */\n responsive?: boolean;\n\n /**\n * @defaultValue `\"normal\"`\n */\n iconSize?: \"small\" | \"normal\" | \"large\";\n}\n\n/**\n * @since 6.0.0\n */\nexport interface ButtonClassNameOptions extends ButtonClassNameThemeOptions {\n /** @defaultValue `false` */\n pressed?: boolean;\n pressedClassName?: string;\n}\n\n/**\n * Creates a button theme based on the button theming props. This is really just\n * used so that other elements like clickable `<div>`s or `<input type=\"file\">`\n * can look like buttons.\n *\n * @param options - An object containing the themeable button props to generate a\n * button theme className.\n * @returns a string of class names to create an element with a button theme.\n * @since 6.0.0 This used to be called `buttonThemeClassNames`.\n */\nexport function button(options: ButtonClassNameOptions = {}): string {\n const {\n theme: propTheme = \"clear\",\n themeType = \"flat\",\n iconSize,\n buttonType = \"text\",\n disabled: propDisabled = false,\n responsive,\n pressed = false,\n pressedClassName,\n className,\n } = options;\n\n const theme = propTheme === \"disabled\" ? \"clear\" : propTheme;\n const disabled = propDisabled || propTheme === \"disabled\";\n const text = buttonType === \"text\" && !responsive && !iconSize;\n const icon = !text;\n const outline = themeType === \"outline\";\n const contained = themeType === \"contained\";\n const clear = theme === \"clear\";\n const isThemed = !disabled && !clear;\n\n let textColor: ThemeColor | TextColor | undefined;\n let outlineColor: OutlineColor | undefined;\n let backgroundColor: ThemeColor | undefined;\n if (isThemed && !contained) {\n textColor = theme;\n } else if (disabled) {\n textColor = \"text-disabled\";\n }\n if (isThemed && contained) {\n backgroundColor = theme;\n }\n if (outline) {\n outlineColor = clear ? \"greyscale\" : theme;\n }\n\n return cnb(\n styles({\n text,\n icon,\n \"icon-square\": buttonType === \"icon-square\",\n disabled,\n contained: !disabled && contained,\n pressed: contained && pressed,\n responsive,\n small: icon && iconSize === \"small\",\n large: icon && iconSize === \"large\",\n }),\n pressedClassName,\n cssUtils({\n surface: true,\n textColor,\n outlineColor,\n backgroundColor,\n }),\n className\n );\n}\n"],"names":["cnb","cssUtils","bem","styles","button","options","theme","propTheme","themeType","iconSize","buttonType","disabled","propDisabled","responsive","pressed","pressedClassName","className","text","icon","outline","contained","clear","isThemed","textColor","outlineColor","backgroundColor","small","large","surface"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SACEC,QAAQ,QAIH,iBAAiB;AACxB,SAASC,GAAG,QAAQ,kBAAkB;AAkBtC,MAAMC,SAASD,IAAI;AAgFnB;;;;;;;;;CASC,GACD,OAAO,SAASE,OAAOC,UAAkC,CAAC,CAAC;IACzD,MAAM,EACJC,OAAOC,YAAY,OAAO,EAC1BC,YAAY,MAAM,EAClBC,QAAQ,EACRC,aAAa,MAAM,EACnBC,UAAUC,eAAe,KAAK,EAC9BC,UAAU,EACVC,UAAU,KAAK,EACfC,gBAAgB,EAChBC,SAAS,EACV,GAAGX;IAEJ,MAAMC,QAAQC,cAAc,aAAa,UAAUA;IACnD,MAAMI,WAAWC,gBAAgBL,cAAc;IAC/C,MAAMU,OAAOP,eAAe,UAAU,CAACG,cAAc,CAACJ;IACtD,MAAMS,OAAO,CAACD;IACd,MAAME,UAAUX,cAAc;IAC9B,MAAMY,YAAYZ,cAAc;IAChC,MAAMa,QAAQf,UAAU;IACxB,MAAMgB,WAAW,CAACX,YAAY,CAACU;IAE/B,IAAIE;IACJ,IAAIC;IACJ,IAAIC;IACJ,IAAIH,YAAY,CAACF,WAAW;QAC1BG,YAAYjB;IACd,OAAO,IAAIK,UAAU;QACnBY,YAAY;IACd;IACA,IAAID,YAAYF,WAAW;QACzBK,kBAAkBnB;IACpB;IACA,IAAIa,SAAS;QACXK,eAAeH,QAAQ,cAAcf;IACvC;IAEA,OAAON,IACLG,OAAO;QACLc;QACAC;QACA,eAAeR,eAAe;QAC9BC;QACAS,WAAW,CAACT,YAAYS;QACxBN,SAASM,aAAaN;QACtBD;QACAa,OAAOR,QAAQT,aAAa;QAC5BkB,OAAOT,QAAQT,aAAa;IAC9B,IACAM,kBACAd,SAAS;QACP2B,SAAS;QACTL;QACAC;QACAC;IACF,IACAT;AAEJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/button/buttonUnstyledStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\n\n/** @since 6.0.0 */\nexport interface ButtonUnstyledClassNameOptions {\n className?: string;\n}\n\n/**\n * This requires the `$disable-unstyled-utility-class` to be `false` to use.\n *\n * @since 6.0.0\n */\nexport function buttonUnstyled(\n options: ButtonUnstyledClassNameOptions = {}\n): string {\n const { className } = options;\n\n return cnb(\"rmd-button-unstyled\", className);\n}\n"],"names":["cnb","buttonUnstyled","options","className"],"
|
|
1
|
+
{"version":3,"sources":["../../src/button/buttonUnstyledStyles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\n\n/** @since 6.0.0 */\nexport interface ButtonUnstyledClassNameOptions {\n className?: string;\n}\n\n/**\n * This requires the `$disable-unstyled-utility-class` to be `false` to use.\n *\n * @since 6.0.0\n */\nexport function buttonUnstyled(\n options: ButtonUnstyledClassNameOptions = {}\n): string {\n const { className } = options;\n\n return cnb(\"rmd-button-unstyled\", className);\n}\n"],"names":["cnb","buttonUnstyled","options","className"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAOhC;;;;CAIC,GACD,OAAO,SAASC,eACdC,UAA0C,CAAC,CAAC;IAE5C,MAAM,EAAEC,SAAS,EAAE,GAAGD;IAEtB,OAAOF,IAAI,uBAAuBG;AACpC"}
|
package/dist/card/Card.d.ts
CHANGED
|
@@ -8,7 +8,8 @@ declare module "react" {
|
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
|
-
* @since 6.0.0 Extends the {@link CardClassNameOptions}
|
|
11
|
+
* @since 6.0.0 Extends the {@link CardClassNameOptions} and removed the
|
|
12
|
+
* deprecated `raiseable` prop
|
|
12
13
|
*/
|
|
13
14
|
export interface CardProps extends HTMLAttributes<HTMLDivElement>, CardClassNameOptions {
|
|
14
15
|
}
|
package/dist/card/Card.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/card/Card.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes } from \"react\";\nimport { card, type CardClassNameOptions } from \"./styles.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-card-background-color\"?: string;\n \"--rmd-card-color\"?: string;\n \"--rmd-card-secondary-color\"?: string;\n }\n}\n\n/**\n * @since 6.0.0 Extends the {@link CardClassNameOptions}
|
|
1
|
+
{"version":3,"sources":["../../src/card/Card.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes } from \"react\";\nimport { card, type CardClassNameOptions } from \"./styles.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-card-background-color\"?: string;\n \"--rmd-card-color\"?: string;\n \"--rmd-card-secondary-color\"?: string;\n }\n}\n\n/**\n * @since 6.0.0 Extends the {@link CardClassNameOptions} and removed the\n * deprecated `raiseable` prop\n */\nexport interface CardProps\n extends HTMLAttributes<HTMLDivElement>,\n CardClassNameOptions {}\n\n/**\n * **Server Component**\n *\n * @example Simple Example\n * ```tsx\n * import {\n * Button,\n * Card,\n * CardContent,\n * CardFooter,\n * CardHeader,\n * CardTitle,\n * CardSubtitle,\n * Typography,\n * } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return (\n * <Card>\n * <CardHeader>\n * <CardTitle>Main Title</CardTitle>\n * <CardSubtitle>A subtitle</CardSubtitle>\n * </CardHeader>\n * <CardContent>\n * <Typography margin=\"none\">\n * Some paragraph of text.\n * </Typography>\n * </CardContent>\n * <CardFooter>\n * <Button>Action 1</Button>\n * <Button>Action 2</Button>\n * </CardFooter>\n * </Card>\n * );\n * }\n * ```\n *\n * @since 6.0.0 Removed the deprecated `raiseable` prop\n */\nexport const Card = forwardRef<HTMLDivElement, CardProps>(\n function Card(props, ref) {\n const {\n children,\n className,\n bordered,\n raisable,\n fullWidth,\n interactable,\n ...remaining\n } = props;\n\n return (\n <div\n {...remaining}\n ref={ref}\n className={card({\n className,\n bordered,\n raisable,\n fullWidth,\n interactable,\n })}\n >\n {children}\n </div>\n );\n }\n);\n"],"names":["forwardRef","card","Card","props","ref","children","className","bordered","raisable","fullWidth","interactable","remaining","div"],"mappings":";AAAA,SAASA,UAAU,QAA6B,QAAQ;AACxD,SAASC,IAAI,QAAmC,cAAc;AAkB9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuCC,GACD,OAAO,MAAMC,qBAAOF,WAClB,SAASE,KAAKC,KAAK,EAAEC,GAAG;IACtB,MAAM,EACJC,QAAQ,EACRC,SAAS,EACTC,QAAQ,EACRC,QAAQ,EACRC,SAAS,EACTC,YAAY,EACZ,GAAGC,WACJ,GAAGR;IAEJ,qBACE,KAACS;QACE,GAAGD,SAAS;QACbP,KAAKA;QACLE,WAAWL,KAAK;YACdK;YACAC;YACAC;YACAC;YACAC;QACF;kBAECL;;AAGP,GACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/card/CardContent.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes } from \"react\";\nimport { cardContent, type CardContentClassNameOptions } from \"./styles.js\";\n\n/**\n * @since 6.0.0 Renamed `disableExtraPadding` to `disableLastChildPadding` and\n * removed the `disableParagraphMargin` prop.\n */\nexport interface CardContentProps\n extends HTMLAttributes<HTMLDivElement>,\n CardContentClassNameOptions {}\n\n/**\n * **Server Component**\n *\n * @since 6.0.0 Renamed `disableExtraPadding` to `disableLastChildPadding` and\n * removed the `disableParagraphMargin` prop.\n */\nexport const CardContent = forwardRef<HTMLDivElement, CardContentProps>(\n function CardContent(props, ref) {\n const {\n children,\n className,\n disablePadding,\n disableSecondaryColor,\n disableLastChildPadding,\n ...remaining\n } = props;\n\n return (\n <div\n {...remaining}\n ref={ref}\n className={cardContent({\n className,\n disablePadding,\n disableSecondaryColor,\n disableLastChildPadding,\n })}\n >\n {children}\n </div>\n );\n }\n);\n"],"names":["forwardRef","cardContent","CardContent","props","ref","children","className","disablePadding","disableSecondaryColor","disableLastChildPadding","remaining","div"],"
|
|
1
|
+
{"version":3,"sources":["../../src/card/CardContent.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes } from \"react\";\nimport { cardContent, type CardContentClassNameOptions } from \"./styles.js\";\n\n/**\n * @since 6.0.0 Renamed `disableExtraPadding` to `disableLastChildPadding` and\n * removed the `disableParagraphMargin` prop.\n */\nexport interface CardContentProps\n extends HTMLAttributes<HTMLDivElement>,\n CardContentClassNameOptions {}\n\n/**\n * **Server Component**\n *\n * @since 6.0.0 Renamed `disableExtraPadding` to `disableLastChildPadding` and\n * removed the `disableParagraphMargin` prop.\n */\nexport const CardContent = forwardRef<HTMLDivElement, CardContentProps>(\n function CardContent(props, ref) {\n const {\n children,\n className,\n disablePadding,\n disableSecondaryColor,\n disableLastChildPadding,\n ...remaining\n } = props;\n\n return (\n <div\n {...remaining}\n ref={ref}\n className={cardContent({\n className,\n disablePadding,\n disableSecondaryColor,\n disableLastChildPadding,\n })}\n >\n {children}\n </div>\n );\n }\n);\n"],"names":["forwardRef","cardContent","CardContent","props","ref","children","className","disablePadding","disableSecondaryColor","disableLastChildPadding","remaining","div"],"mappings":";AAAA,SAASA,UAAU,QAA6B,QAAQ;AACxD,SAASC,WAAW,QAA0C,cAAc;AAU5E;;;;;CAKC,GACD,OAAO,MAAMC,4BAAcF,WACzB,SAASE,YAAYC,KAAK,EAAEC,GAAG;IAC7B,MAAM,EACJC,QAAQ,EACRC,SAAS,EACTC,cAAc,EACdC,qBAAqB,EACrBC,uBAAuB,EACvB,GAAGC,WACJ,GAAGP;IAEJ,qBACE,KAACQ;QACE,GAAGD,SAAS;QACbN,KAAKA;QACLE,WAAWL,YAAY;YACrBK;YACAC;YACAC;YACAC;QACF;kBAECJ;;AAGP,GACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/card/CardFooter.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport { Box, type BoxProps } from \"../box/Box.js\";\nimport { type BoxJustifyContent } from \"../box/styles.js\";\nimport { cardFooter } from \"./styles.js\";\n\n/** @since 6.0.0 */\nexport interface CardFooterProps extends BoxProps {\n /**\n * @defaultValue `\"flex-end\"`\n */\n justify?: BoxJustifyContent;\n}\n\n/**\n * **Server Component**\n *\n * A simple wrapper around the {@link Box} component that applies additional\n * padding and applies `justify-content: flex-end;` by default.\n *\n * @since 6.0.0\n */\nexport const CardFooter = forwardRef<HTMLDivElement, CardFooterProps>(\n function CardFooter(props, ref) {\n const { className, children, justify = \"flex-end\", ...remaining } = props;\n\n return (\n <Box\n {...remaining}\n ref={ref}\n className={cardFooter({ className })}\n justify={justify}\n >\n {children}\n </Box>\n );\n }\n);\n"],"names":["forwardRef","Box","cardFooter","CardFooter","props","ref","className","children","justify","remaining"],"
|
|
1
|
+
{"version":3,"sources":["../../src/card/CardFooter.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport { Box, type BoxProps } from \"../box/Box.js\";\nimport { type BoxJustifyContent } from \"../box/styles.js\";\nimport { cardFooter } from \"./styles.js\";\n\n/** @since 6.0.0 */\nexport interface CardFooterProps extends BoxProps {\n /**\n * @defaultValue `\"flex-end\"`\n */\n justify?: BoxJustifyContent;\n}\n\n/**\n * **Server Component**\n *\n * A simple wrapper around the {@link Box} component that applies additional\n * padding and applies `justify-content: flex-end;` by default.\n *\n * @since 6.0.0\n */\nexport const CardFooter = forwardRef<HTMLDivElement, CardFooterProps>(\n function CardFooter(props, ref) {\n const { className, children, justify = \"flex-end\", ...remaining } = props;\n\n return (\n <Box\n {...remaining}\n ref={ref}\n className={cardFooter({ className })}\n justify={justify}\n >\n {children}\n </Box>\n );\n }\n);\n"],"names":["forwardRef","Box","cardFooter","CardFooter","props","ref","className","children","justify","remaining"],"mappings":";AAAA,SAASA,UAAU,QAAQ,QAAQ;AACnC,SAASC,GAAG,QAAuB,gBAAgB;AAEnD,SAASC,UAAU,QAAQ,cAAc;AAUzC;;;;;;;CAOC,GACD,OAAO,MAAMC,2BAAaH,WACxB,SAASG,WAAWC,KAAK,EAAEC,GAAG;IAC5B,MAAM,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,UAAU,UAAU,EAAE,GAAGC,WAAW,GAAGL;IAEpE,qBACE,KAACH;QACE,GAAGQ,SAAS;QACbJ,KAAKA;QACLC,WAAWJ,WAAW;YAAEI;QAAU;QAClCE,SAASA;kBAERD;;AAGP,GACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/card/CardHeader.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { cardHeader, cardHeaderContent } from \"./styles.js\";\n\n/**\n * @since 6.0.0 Removed the `align` prop.\n * @since 6.0.0 Renamed the `beforeChildren` and `afterChildren` props to\n * `beforeAddon` and `afterAddon`.\n * @since 6.0.0 Removed the `contentClassName` prop in favor of the\n * `contentProps`.\n */\nexport interface CardHeaderProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Any content to display after the children in the header. This could be an\n * expander icon button, visual media like an image or video, etc.\n */\n afterAddon?: ReactNode;\n\n /**\n * Any content to display before the children in the header. This could be an\n * expander icon button, visual media like an image or video, etc.\n */\n beforeAddon?: ReactNode;\n\n /**\n * Any props to pass to the `<div>` that surrounds the `children`. This is\n * generally used to apply custom `style` or `className`.\n */\n contentProps?: PropsWithRef<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;\n}\n\n/**\n * **Server Component**\n *\n * @since 6.0.0 Removed the `align` prop.\n * @since 6.0.0 Renamed the `beforeChildren` and `afterChildren` props to\n * `beforeAddon` and `afterAddon`.\n * @since 6.0.0 Removed the `contentClassName` prop in favor of the\n * `contentProps`.\n * @since 6.0.0 No longer uses the `TextIconSpacing` component and instead\n * relies on the CSS `gap` for spacing.\n * @since 6.0.0 Renders as a `<div>` instead of a `<header>`\n */\nexport const CardHeader = forwardRef<HTMLDivElement, CardHeaderProps>(\n function CardHeader(props, ref) {\n const {\n className,\n children,\n beforeAddon,\n afterAddon,\n contentProps,\n ...remaining\n } = props;\n\n return (\n <div\n {...remaining}\n ref={ref}\n className={cardHeader({\n className,\n addonBefore: !!beforeAddon,\n addonAfter: !!afterAddon,\n })}\n >\n {beforeAddon}\n <div\n {...contentProps}\n className={cardHeaderContent({ className: contentProps?.className })}\n >\n {children}\n </div>\n {afterAddon}\n </div>\n );\n }\n);\n"],"names":["forwardRef","cardHeader","cardHeaderContent","CardHeader","props","ref","className","children","beforeAddon","afterAddon","contentProps","remaining","div","addonBefore","addonAfter"],"
|
|
1
|
+
{"version":3,"sources":["../../src/card/CardHeader.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { cardHeader, cardHeaderContent } from \"./styles.js\";\n\n/**\n * @since 6.0.0 Removed the `align` prop.\n * @since 6.0.0 Renamed the `beforeChildren` and `afterChildren` props to\n * `beforeAddon` and `afterAddon`.\n * @since 6.0.0 Removed the `contentClassName` prop in favor of the\n * `contentProps`.\n */\nexport interface CardHeaderProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Any content to display after the children in the header. This could be an\n * expander icon button, visual media like an image or video, etc.\n */\n afterAddon?: ReactNode;\n\n /**\n * Any content to display before the children in the header. This could be an\n * expander icon button, visual media like an image or video, etc.\n */\n beforeAddon?: ReactNode;\n\n /**\n * Any props to pass to the `<div>` that surrounds the `children`. This is\n * generally used to apply custom `style` or `className`.\n */\n contentProps?: PropsWithRef<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;\n}\n\n/**\n * **Server Component**\n *\n * @since 6.0.0 Removed the `align` prop.\n * @since 6.0.0 Renamed the `beforeChildren` and `afterChildren` props to\n * `beforeAddon` and `afterAddon`.\n * @since 6.0.0 Removed the `contentClassName` prop in favor of the\n * `contentProps`.\n * @since 6.0.0 No longer uses the `TextIconSpacing` component and instead\n * relies on the CSS `gap` for spacing.\n * @since 6.0.0 Renders as a `<div>` instead of a `<header>`\n */\nexport const CardHeader = forwardRef<HTMLDivElement, CardHeaderProps>(\n function CardHeader(props, ref) {\n const {\n className,\n children,\n beforeAddon,\n afterAddon,\n contentProps,\n ...remaining\n } = props;\n\n return (\n <div\n {...remaining}\n ref={ref}\n className={cardHeader({\n className,\n addonBefore: !!beforeAddon,\n addonAfter: !!afterAddon,\n })}\n >\n {beforeAddon}\n <div\n {...contentProps}\n className={cardHeaderContent({ className: contentProps?.className })}\n >\n {children}\n </div>\n {afterAddon}\n </div>\n );\n }\n);\n"],"names":["forwardRef","cardHeader","cardHeaderContent","CardHeader","props","ref","className","children","beforeAddon","afterAddon","contentProps","remaining","div","addonBefore","addonAfter"],"mappings":";AAAA,SAASA,UAAU,QAA6C,QAAQ;AAExE,SAASC,UAAU,EAAEC,iBAAiB,QAAQ,cAAc;AA6B5D;;;;;;;;;;;CAWC,GACD,OAAO,MAAMC,2BAAaH,WACxB,SAASG,WAAWC,KAAK,EAAEC,GAAG;IAC5B,MAAM,EACJC,SAAS,EACTC,QAAQ,EACRC,WAAW,EACXC,UAAU,EACVC,YAAY,EACZ,GAAGC,WACJ,GAAGP;IAEJ,qBACE,MAACQ;QACE,GAAGD,SAAS;QACbN,KAAKA;QACLC,WAAWL,WAAW;YACpBK;YACAO,aAAa,CAAC,CAACL;YACfM,YAAY,CAAC,CAACL;QAChB;;YAECD;0BACD,KAACI;gBACE,GAAGF,YAAY;gBAChBJ,WAAWJ,kBAAkB;oBAAEI,WAAWI,cAAcJ;gBAAU;0BAEjEC;;YAEFE;;;AAGP,GACA"}
|
|
@@ -11,6 +11,12 @@ export interface CardSubtitleProps extends TypographyProps {
|
|
|
11
11
|
type?: TypographyProps["type"];
|
|
12
12
|
/** @defaultValue `"none"` */
|
|
13
13
|
margin?: TypographyProps["margin"];
|
|
14
|
+
/**
|
|
15
|
+
* Set this to `null` to inherit the current color.
|
|
16
|
+
*
|
|
17
|
+
* @defaultValue `"text-secondary"`
|
|
18
|
+
*/
|
|
19
|
+
textColor?: TypographyProps["textColor"];
|
|
14
20
|
}
|
|
15
21
|
/**
|
|
16
22
|
* **Server Component**
|
|
@@ -8,13 +8,14 @@ import { cardSubtitle } from "./styles.js";
|
|
|
8
8
|
* @since 6.0.0 Extends the {@link Typography} component and removed the
|
|
9
9
|
* `noWrap`/`disableSecondaryColor` props.
|
|
10
10
|
*/ export const CardSubtitle = /*#__PURE__*/ forwardRef(function CardSubtitle(props, ref) {
|
|
11
|
-
const { children, as = "h6", type = "subtitle-2", margin = "none", className, ...remaining } = props;
|
|
11
|
+
const { children, as = "h6", type = "subtitle-2", margin = "none", textColor = "text-secondary", className, ...remaining } = props;
|
|
12
12
|
return /*#__PURE__*/ _jsx(Typography, {
|
|
13
13
|
...remaining,
|
|
14
14
|
ref: ref,
|
|
15
15
|
as: as,
|
|
16
16
|
type: type,
|
|
17
17
|
margin: margin,
|
|
18
|
+
textColor: textColor,
|
|
18
19
|
className: cardSubtitle({
|
|
19
20
|
className
|
|
20
21
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/card/CardSubtitle.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport {\n Typography,\n type TypographyHTMLElement,\n type TypographyProps,\n} from \"../typography/Typography.js\";\nimport { cardSubtitle } from \"./styles.js\";\n\n/**\n * @since 6.0.0 Extends the {@link TypographyProps} and removed the\n * `noWrap`/`disableSecondaryColor` props.\n */\nexport interface CardSubtitleProps extends TypographyProps {\n /** @defaultValue `\"h6\"` */\n as?: TypographyProps[\"as\"];\n\n /** @defaultValue `\"subtitle-2\"` */\n type?: TypographyProps[\"type\"];\n\n /** @defaultValue `\"none\"` */\n margin?: TypographyProps[\"margin\"];\n}\n\n/**\n * **Server Component**\n *\n * @since 6.0.0 Extends the {@link Typography} component and removed the\n * `noWrap`/`disableSecondaryColor` props.\n */\nexport const CardSubtitle = forwardRef<\n TypographyHTMLElement,\n CardSubtitleProps\n>(function CardSubtitle(props, ref) {\n const {\n children,\n as = \"h6\",\n type = \"subtitle-2\",\n margin = \"none\",\n className,\n ...remaining\n } = props;\n\n return (\n <Typography\n {...remaining}\n ref={ref}\n as={as}\n type={type}\n margin={margin}\n className={cardSubtitle({ className })}\n >\n {children}\n </Typography>\n );\n});\n"],"names":["forwardRef","Typography","cardSubtitle","CardSubtitle","props","ref","children","as","type","margin","className","remaining"],"
|
|
1
|
+
{"version":3,"sources":["../../src/card/CardSubtitle.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport {\n Typography,\n type TypographyHTMLElement,\n type TypographyProps,\n} from \"../typography/Typography.js\";\nimport { cardSubtitle } from \"./styles.js\";\n\n/**\n * @since 6.0.0 Extends the {@link TypographyProps} and removed the\n * `noWrap`/`disableSecondaryColor` props.\n */\nexport interface CardSubtitleProps extends TypographyProps {\n /** @defaultValue `\"h6\"` */\n as?: TypographyProps[\"as\"];\n\n /** @defaultValue `\"subtitle-2\"` */\n type?: TypographyProps[\"type\"];\n\n /** @defaultValue `\"none\"` */\n margin?: TypographyProps[\"margin\"];\n\n /**\n * Set this to `null` to inherit the current color.\n *\n * @defaultValue `\"text-secondary\"`\n */\n textColor?: TypographyProps[\"textColor\"];\n}\n\n/**\n * **Server Component**\n *\n * @since 6.0.0 Extends the {@link Typography} component and removed the\n * `noWrap`/`disableSecondaryColor` props.\n */\nexport const CardSubtitle = forwardRef<\n TypographyHTMLElement,\n CardSubtitleProps\n>(function CardSubtitle(props, ref) {\n const {\n children,\n as = \"h6\",\n type = \"subtitle-2\",\n margin = \"none\",\n textColor = \"text-secondary\",\n className,\n ...remaining\n } = props;\n\n return (\n <Typography\n {...remaining}\n ref={ref}\n as={as}\n type={type}\n margin={margin}\n textColor={textColor}\n className={cardSubtitle({ className })}\n >\n {children}\n </Typography>\n );\n});\n"],"names":["forwardRef","Typography","cardSubtitle","CardSubtitle","props","ref","children","as","type","margin","textColor","className","remaining"],"mappings":";AAAA,SAASA,UAAU,QAAQ,QAAQ;AACnC,SACEC,UAAU,QAGL,8BAA8B;AACrC,SAASC,YAAY,QAAQ,cAAc;AAwB3C;;;;;CAKC,GACD,OAAO,MAAMC,6BAAeH,WAG1B,SAASG,aAAaC,KAAK,EAAEC,GAAG;IAChC,MAAM,EACJC,QAAQ,EACRC,KAAK,IAAI,EACTC,OAAO,YAAY,EACnBC,SAAS,MAAM,EACfC,YAAY,gBAAgB,EAC5BC,SAAS,EACT,GAAGC,WACJ,GAAGR;IAEJ,qBACE,KAACH;QACE,GAAGW,SAAS;QACbP,KAAKA;QACLE,IAAIA;QACJC,MAAMA;QACNC,QAAQA;QACRC,WAAWA;QACXC,WAAWT,aAAa;YAAES;QAAU;kBAEnCL;;AAGP,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/card/CardTitle.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport {\n Typography,\n type TypographyHTMLElement,\n type TypographyProps,\n} from \"../typography/Typography.js\";\nimport { cardTitle } from \"./styles.js\";\n\n/**\n * @since 6,0.0 Extends the {@link TypographyProps} and removed the\n * `small`/`noWrap` props.\n */\nexport interface CardTitleProps extends TypographyProps {\n /** @defaultValue `\"h5\"` */\n as?: TypographyProps[\"as\"];\n\n /** @defaultValue `\"headline-5\"` */\n type?: TypographyProps[\"type\"];\n\n /** @defaultValue \"none\" */\n margin?: TypographyProps[\"margin\"];\n}\n\n/**\n * **Server Component**\n *\n * @since 6.0.0 Extends the {@link Typography} component and removed\n * the `small`/`noWrap` props.\n */\nexport const CardTitle = forwardRef<TypographyHTMLElement, CardTitleProps>(\n function CardTitle(props, ref) {\n const {\n children,\n as = \"h5\",\n type = \"headline-5\",\n margin = \"none\",\n className,\n ...remaining\n } = props;\n\n return (\n <Typography\n {...remaining}\n ref={ref}\n as={as}\n type={type}\n margin={margin}\n className={cardTitle({ className })}\n >\n {children}\n </Typography>\n );\n }\n);\n"],"names":["forwardRef","Typography","cardTitle","CardTitle","props","ref","children","as","type","margin","className","remaining"],"
|
|
1
|
+
{"version":3,"sources":["../../src/card/CardTitle.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport {\n Typography,\n type TypographyHTMLElement,\n type TypographyProps,\n} from \"../typography/Typography.js\";\nimport { cardTitle } from \"./styles.js\";\n\n/**\n * @since 6,0.0 Extends the {@link TypographyProps} and removed the\n * `small`/`noWrap` props.\n */\nexport interface CardTitleProps extends TypographyProps {\n /** @defaultValue `\"h5\"` */\n as?: TypographyProps[\"as\"];\n\n /** @defaultValue `\"headline-5\"` */\n type?: TypographyProps[\"type\"];\n\n /** @defaultValue \"none\" */\n margin?: TypographyProps[\"margin\"];\n}\n\n/**\n * **Server Component**\n *\n * @since 6.0.0 Extends the {@link Typography} component and removed\n * the `small`/`noWrap` props.\n */\nexport const CardTitle = forwardRef<TypographyHTMLElement, CardTitleProps>(\n function CardTitle(props, ref) {\n const {\n children,\n as = \"h5\",\n type = \"headline-5\",\n margin = \"none\",\n className,\n ...remaining\n } = props;\n\n return (\n <Typography\n {...remaining}\n ref={ref}\n as={as}\n type={type}\n margin={margin}\n className={cardTitle({ className })}\n >\n {children}\n </Typography>\n );\n }\n);\n"],"names":["forwardRef","Typography","cardTitle","CardTitle","props","ref","children","as","type","margin","className","remaining"],"mappings":";AAAA,SAASA,UAAU,QAAQ,QAAQ;AACnC,SACEC,UAAU,QAGL,8BAA8B;AACrC,SAASC,SAAS,QAAQ,cAAc;AAiBxC;;;;;CAKC,GACD,OAAO,MAAMC,0BAAYH,WACvB,SAASG,UAAUC,KAAK,EAAEC,GAAG;IAC3B,MAAM,EACJC,QAAQ,EACRC,KAAK,IAAI,EACTC,OAAO,YAAY,EACnBC,SAAS,MAAM,EACfC,SAAS,EACT,GAAGC,WACJ,GAAGP;IAEJ,qBACE,KAACH;QACE,GAAGU,SAAS;QACbN,KAAKA;QACLE,IAAIA;QACJC,MAAMA;QACNC,QAAQA;QACRC,WAAWR,UAAU;YAAEQ;QAAU;kBAEhCJ;;AAGP,GACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/card/ClickableCard.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport { forwardRef, type MouseEventHandler } from \"react\";\nimport { useElementInteraction } from \"../interaction/useElementInteraction.js\";\nimport { useHigherContrastChildren } from \"../interaction/useHigherContrastChildren.js\";\nimport { Card, type CardProps } from \"./Card.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * @since 6.0.0\n */\nexport interface ClickableCardProps extends CardProps {\n onClick: MouseEventHandler<HTMLDivElement>;\n\n /**\n * Set this to `true` to disable all click events.\n *\n * Note: Any disabled styling will need to be manually applied.\n *\n * @defaultValue `false`\n */\n disabled?: boolean;\n}\n\n/**\n * A Small wrapper around the `Card` component that is clickable and has the\n * element interaction enabled (ripples).\n *\n * @example Simple Example\n * ```tsx\n * import { CardContent, ClickableCard } from \"@react-md/core\";\n * import { type ReactElement } from \"react\";\n *\n * export default function ClickableCardExample(): ReactElement {\n * return (\n * <ClickableCard\n * onClick={() => {\n * // do something\n * }}\n * >\n * <CardContent>Wow</CardContent>\n * </ClickableCard>\n * );\n * }\n * ```\n *\n * @since 6.0.0\n */\nexport const ClickableCard = forwardRef<HTMLDivElement, ClickableCardProps>(\n function ClickableCard(props, ref) {\n const {\n role = \"button\",\n disabled,\n tabIndex = disabled ? undefined : 0,\n onClick,\n onKeyDown = noop,\n className,\n children: propChildren,\n ...remaining\n } = props;\n const { handlers, ripples } = useElementInteraction(remaining);\n const children = useHigherContrastChildren(propChildren);\n\n return (\n <Card\n {...remaining}\n {...handlers}\n aria-disabled={disabled || undefined}\n ref={ref}\n role={role}\n tabIndex={tabIndex}\n className={cnb(\"rmd-card--clickable\", className)}\n onClick={(event) => {\n if (disabled) {\n return;\n }\n\n onClick(event);\n }}\n onKeyDown={(event) => {\n onKeyDown(event);\n if (disabled) {\n return;\n }\n\n const isSpace = event.key === \" \";\n if (isSpace || event.key === \"Enter\") {\n if (isSpace) {\n event.preventDefault();\n }\n\n event.currentTarget.click();\n }\n }}\n >\n {children}\n {ripples}\n </Card>\n );\n }\n);\n"],"names":["cnb","forwardRef","useElementInteraction","useHigherContrastChildren","Card","noop","ClickableCard","props","ref","role","disabled","tabIndex","undefined","onClick","onKeyDown","className","children","propChildren","remaining","handlers","ripples","aria-disabled","event","isSpace","key","preventDefault","currentTarget","click"],"
|
|
1
|
+
{"version":3,"sources":["../../src/card/ClickableCard.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport { forwardRef, type MouseEventHandler } from \"react\";\nimport { useElementInteraction } from \"../interaction/useElementInteraction.js\";\nimport { useHigherContrastChildren } from \"../interaction/useHigherContrastChildren.js\";\nimport { Card, type CardProps } from \"./Card.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * @since 6.0.0\n */\nexport interface ClickableCardProps extends CardProps {\n onClick: MouseEventHandler<HTMLDivElement>;\n\n /**\n * Set this to `true` to disable all click events.\n *\n * Note: Any disabled styling will need to be manually applied.\n *\n * @defaultValue `false`\n */\n disabled?: boolean;\n}\n\n/**\n * A Small wrapper around the `Card` component that is clickable and has the\n * element interaction enabled (ripples).\n *\n * @example Simple Example\n * ```tsx\n * import { CardContent, ClickableCard } from \"@react-md/core\";\n * import { type ReactElement } from \"react\";\n *\n * export default function ClickableCardExample(): ReactElement {\n * return (\n * <ClickableCard\n * onClick={() => {\n * // do something\n * }}\n * >\n * <CardContent>Wow</CardContent>\n * </ClickableCard>\n * );\n * }\n * ```\n *\n * @since 6.0.0\n */\nexport const ClickableCard = forwardRef<HTMLDivElement, ClickableCardProps>(\n function ClickableCard(props, ref) {\n const {\n role = \"button\",\n disabled,\n tabIndex = disabled ? undefined : 0,\n onClick,\n onKeyDown = noop,\n className,\n children: propChildren,\n ...remaining\n } = props;\n const { handlers, ripples } = useElementInteraction(remaining);\n const children = useHigherContrastChildren(propChildren);\n\n return (\n <Card\n {...remaining}\n {...handlers}\n aria-disabled={disabled || undefined}\n ref={ref}\n role={role}\n tabIndex={tabIndex}\n className={cnb(\"rmd-card--clickable\", className)}\n onClick={(event) => {\n if (disabled) {\n return;\n }\n\n onClick(event);\n }}\n onKeyDown={(event) => {\n onKeyDown(event);\n if (disabled) {\n return;\n }\n\n const isSpace = event.key === \" \";\n if (isSpace || event.key === \"Enter\") {\n if (isSpace) {\n event.preventDefault();\n }\n\n event.currentTarget.click();\n }\n }}\n >\n {children}\n {ripples}\n </Card>\n );\n }\n);\n"],"names":["cnb","forwardRef","useElementInteraction","useHigherContrastChildren","Card","noop","ClickableCard","props","ref","role","disabled","tabIndex","undefined","onClick","onKeyDown","className","children","propChildren","remaining","handlers","ripples","aria-disabled","event","isSpace","key","preventDefault","currentTarget","click"],"mappings":"AAAA;;AACA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,UAAU,QAAgC,QAAQ;AAC3D,SAASC,qBAAqB,QAAQ,0CAA0C;AAChF,SAASC,yBAAyB,QAAQ,8CAA8C;AACxF,SAASC,IAAI,QAAwB,YAAY;AAEjD,MAAMC,OAAO;AACX,aAAa;AACf;AAkBA;;;;;;;;;;;;;;;;;;;;;;;CAuBC,GACD,OAAO,MAAMC,8BAAgBL,WAC3B,SAASK,cAAcC,KAAK,EAAEC,GAAG;IAC/B,MAAM,EACJC,OAAO,QAAQ,EACfC,QAAQ,EACRC,WAAWD,WAAWE,YAAY,CAAC,EACnCC,OAAO,EACPC,YAAYT,IAAI,EAChBU,SAAS,EACTC,UAAUC,YAAY,EACtB,GAAGC,WACJ,GAAGX;IACJ,MAAM,EAAEY,QAAQ,EAAEC,OAAO,EAAE,GAAGlB,sBAAsBgB;IACpD,MAAMF,WAAWb,0BAA0Bc;IAE3C,qBACE,MAACb;QACE,GAAGc,SAAS;QACZ,GAAGC,QAAQ;QACZE,iBAAeX,YAAYE;QAC3BJ,KAAKA;QACLC,MAAMA;QACNE,UAAUA;QACVI,WAAWf,IAAI,uBAAuBe;QACtCF,SAAS,CAACS;YACR,IAAIZ,UAAU;gBACZ;YACF;YAEAG,QAAQS;QACV;QACAR,WAAW,CAACQ;YACVR,UAAUQ;YACV,IAAIZ,UAAU;gBACZ;YACF;YAEA,MAAMa,UAAUD,MAAME,GAAG,KAAK;YAC9B,IAAID,WAAWD,MAAME,GAAG,KAAK,SAAS;gBACpC,IAAID,SAAS;oBACXD,MAAMG,cAAc;gBACtB;gBAEAH,MAAMI,aAAa,CAACC,KAAK;YAC3B;QACF;;YAECX;YACAI;;;AAGP,GACA"}
|
package/dist/card/styles.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cnb } from "cnbuilder";
|
|
2
|
-
import { bem } from "../utils/bem.js";
|
|
3
2
|
import { cssUtils } from "../cssUtils.js";
|
|
3
|
+
import { bem } from "../utils/bem.js";
|
|
4
4
|
const cardStyles = bem("rmd-card");
|
|
5
5
|
/**
|
|
6
6
|
* @since 6.0.0
|
|
@@ -40,9 +40,7 @@ const cardStyles = bem("rmd-card");
|
|
|
40
40
|
* @since 6.0.0
|
|
41
41
|
*/ export function cardSubtitle(options = {}) {
|
|
42
42
|
const { className } = options;
|
|
43
|
-
return cnb(cardStyles("subtitle"),
|
|
44
|
-
textColor: "text-secondary"
|
|
45
|
-
}), className);
|
|
43
|
+
return cnb(cardStyles("subtitle"), className);
|
|
46
44
|
}
|
|
47
45
|
/**
|
|
48
46
|
* @since 6.0.0
|
package/dist/card/styles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/card/styles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/card/styles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { cssUtils } from \"../cssUtils.js\";\nimport { bem } from \"../utils/bem.js\";\n\nconst cardStyles = bem(\"rmd-card\");\n\n/** @since 6.0.0 */\nexport interface CardClassNameOptions {\n className?: string;\n\n /**\n * Set this to `true` if the card should use apply an inset `border` instead\n * of `box-shadow`.\n *\n * @defaultValue `false`\n */\n bordered?: boolean;\n\n /**\n * Set this to `true` if the card should gain additional box shadow while\n * hovered.\n *\n * @defaultValue `false`\n */\n raisable?: boolean;\n\n /**\n * Update the card to have `display: block` and `width: 100%` instead of\n * `display: inline-block`.\n *\n * @defaultValue `false`\n */\n fullWidth?: boolean;\n\n /**\n * Set this to `true` if the card should gain the pointer cursor while\n * hovering and other interaction styles and not using the `ClickableCard`\n * component.\n *\n * @defaultValue `false`\n */\n interactable?: boolean;\n}\n\n/**\n * @since 6.0.0\n */\nexport function card(options: CardClassNameOptions = {}): string {\n const { className, bordered, raisable, fullWidth, interactable } = options;\n\n return cnb(\n cardStyles({\n bordered,\n shadowed: !bordered,\n raisable: !bordered && raisable,\n interactable,\n \"full-width\": fullWidth,\n }),\n className\n );\n}\n\n/** @since 6.0.0 */\nexport interface CardHeaderClassNameOptions {\n className?: string;\n\n /** @defaultValue `false` */\n addonAfter?: boolean;\n\n /** @defaultValue `false` */\n addonBefore?: boolean;\n}\n\n/**\n * @since 6.0.0\n */\nexport function cardHeader(options: CardHeaderClassNameOptions = {}): string {\n const { className, addonAfter = false, addonBefore = false } = options;\n\n return cnb(\n cardStyles(\"header\", {\n \"addon-after\": addonAfter && !addonBefore,\n \"addon-before\": addonBefore && !addonAfter,\n surrounded: addonAfter && addonBefore,\n }),\n className\n );\n}\n\n/** @since 6.0.0 */\nexport interface CardHeaderContentClassNameOptions {\n className?: string;\n}\n\n/**\n * @since 6.0.0\n */\nexport function cardHeaderContent(\n options: CardHeaderContentClassNameOptions = {}\n): string {\n const { className } = options;\n\n return cnb(cardStyles(\"header-content\"), className);\n}\n\n/** @since 6.0.0 */\nexport interface CardTitleClassNameOptions {\n className?: string;\n}\n\n/**\n * @since 6.0.0\n */\nexport function cardTitle(options: CardTitleClassNameOptions = {}): string {\n const { className } = options;\n\n return cnb(cardStyles(\"title\"), className);\n}\n\n/** @since 6.0.0 */\nexport interface CardSubtitleClassNameOptions {\n className?: string;\n}\n\n/**\n * @since 6.0.0\n */\nexport function cardSubtitle(\n options: CardSubtitleClassNameOptions = {}\n): string {\n const { className } = options;\n\n return cnb(cardStyles(\"subtitle\"), className);\n}\n\n/** @since 6.0.0 */\nexport interface CardContentClassNameOptions {\n className?: string;\n\n /**\n * Set this to `true` to disable the card's padding.\n *\n * @defaultValue `false`\n */\n disablePadding?: boolean;\n\n /**\n * Set this to `true` to disable applying the `text-secondary-color`.\n *\n * @defaultValue `false`\n */\n disableSecondaryColor?: boolean;\n\n /**\n * Set this to `true` to disable applying extra `padding-bottom` if the\n * `CardContent` component is the last child.\n *\n * @defaultValue `false`\n * @since 6.0.0 Renamed from `disableExtraPadding`\n */\n disableLastChildPadding?: boolean;\n}\n\n/**\n * @since 6.0.0\n */\nexport function cardContent(options: CardContentClassNameOptions = {}): string {\n const {\n className,\n disablePadding,\n disableSecondaryColor,\n disableLastChildPadding,\n } = options;\n\n return cnb(\n cardStyles(\"content\", {\n padded: !disablePadding,\n \"padding-bottom\": !disableLastChildPadding,\n }),\n cssUtils({\n textColor: !disableSecondaryColor ? \"text-secondary\" : undefined,\n }),\n className\n );\n}\n\n/** @since 6.0.0 */\nexport interface CardFooterClassNameOptions {\n className?: string;\n}\n\n/**\n * @since 6.0.0\n */\nexport function cardFooter(options: CardFooterClassNameOptions = {}): string {\n const { className } = options;\n\n return cnb(cardStyles(\"footer\"), className);\n}\n"],"names":["cnb","cssUtils","bem","cardStyles","card","options","className","bordered","raisable","fullWidth","interactable","shadowed","cardHeader","addonAfter","addonBefore","surrounded","cardHeaderContent","cardTitle","cardSubtitle","cardContent","disablePadding","disableSecondaryColor","disableLastChildPadding","padded","textColor","undefined","cardFooter"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAASC,QAAQ,QAAQ,iBAAiB;AAC1C,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,aAAaD,IAAI;AAwCvB;;CAEC,GACD,OAAO,SAASE,KAAKC,UAAgC,CAAC,CAAC;IACrD,MAAM,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,YAAY,EAAE,GAAGL;IAEnE,OAAOL,IACLG,WAAW;QACTI;QACAI,UAAU,CAACJ;QACXC,UAAU,CAACD,YAAYC;QACvBE;QACA,cAAcD;IAChB,IACAH;AAEJ;AAaA;;CAEC,GACD,OAAO,SAASM,WAAWP,UAAsC,CAAC,CAAC;IACjE,MAAM,EAAEC,SAAS,EAAEO,aAAa,KAAK,EAAEC,cAAc,KAAK,EAAE,GAAGT;IAE/D,OAAOL,IACLG,WAAW,UAAU;QACnB,eAAeU,cAAc,CAACC;QAC9B,gBAAgBA,eAAe,CAACD;QAChCE,YAAYF,cAAcC;IAC5B,IACAR;AAEJ;AAOA;;CAEC,GACD,OAAO,SAASU,kBACdX,UAA6C,CAAC,CAAC;IAE/C,MAAM,EAAEC,SAAS,EAAE,GAAGD;IAEtB,OAAOL,IAAIG,WAAW,mBAAmBG;AAC3C;AAOA;;CAEC,GACD,OAAO,SAASW,UAAUZ,UAAqC,CAAC,CAAC;IAC/D,MAAM,EAAEC,SAAS,EAAE,GAAGD;IAEtB,OAAOL,IAAIG,WAAW,UAAUG;AAClC;AAOA;;CAEC,GACD,OAAO,SAASY,aACdb,UAAwC,CAAC,CAAC;IAE1C,MAAM,EAAEC,SAAS,EAAE,GAAGD;IAEtB,OAAOL,IAAIG,WAAW,aAAaG;AACrC;AA8BA;;CAEC,GACD,OAAO,SAASa,YAAYd,UAAuC,CAAC,CAAC;IACnE,MAAM,EACJC,SAAS,EACTc,cAAc,EACdC,qBAAqB,EACrBC,uBAAuB,EACxB,GAAGjB;IAEJ,OAAOL,IACLG,WAAW,WAAW;QACpBoB,QAAQ,CAACH;QACT,kBAAkB,CAACE;IACrB,IACArB,SAAS;QACPuB,WAAW,CAACH,wBAAwB,mBAAmBI;IACzD,IACAnB;AAEJ;AAOA;;CAEC,GACD,OAAO,SAASoB,WAAWrB,UAAsC,CAAC,CAAC;IACjE,MAAM,EAAEC,SAAS,EAAE,GAAGD;IAEtB,OAAOL,IAAIG,WAAW,WAAWG;AACnC"}
|
package/dist/chip/Chip.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/chip/Chip.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport {\n forwardRef,\n type ButtonHTMLAttributes,\n type CSSProperties,\n type HTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { type BackgroundColor } from \"../cssUtils.js\";\nimport { getIcon } from \"../icon/iconConfig.js\";\nimport { useElementInteraction } from \"../interaction/useElementInteraction.js\";\nimport { useHigherContrastChildren } from \"../interaction/useHigherContrastChildren.js\";\nimport { useMaxWidthTransition } from \"../transition/useMaxWidthTransition.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { chip, chipContent } from \"./styles.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-chip-solid-background-color\"?: string;\n \"--rmd-chip-solid-disabled-background-color\"?: string;\n \"--rmd-chip-solid-color\"?: string;\n \"--rmd-chip-theme-background-color\"?: string;\n \"--rmd-chip-theme-color\"?: string;\n \"--rmd-chip-outline-background-color\"?: string;\n \"--rmd-chip-outline-color\"?: string;\n }\n}\n\n/**\n * @since 6.0.0 Renamed the `noninteractive` prop to\n * `noninteractable`.\n */\nexport interface ChipProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /**\n * @defaultValue `\"solid\"`\n */\n theme?: \"outline\" | \"solid\";\n\n /**\n * Set this to `true` if the chip should gain additional box shadow while the\n * user is pressing down on the chip.\n *\n * @defaultValue `false`\n */\n raisable?: boolean;\n\n /**\n * @defaultValue `false`\n */\n disabled?: boolean;\n\n /**\n * When this is a boolean, a selected icon will be displayed before the\n * `children` and appear/disappear when `true`/`false`.\n *\n * @see {@link selectedIcon}\n * @see {@link selectedIconAfter}\n * @see {@link selectedThemed}\n */\n selected?: boolean;\n\n /**\n * Set this to `true` if the chip should change background color while\n * {@link selected} instead of displaying an icon. The default background\n * color is a lighter swatch of the theme primary color.\n *\n * @defaultValue `false`\n */\n selectedThemed?: boolean;\n\n /**\n * An optional className to provide only while {@link selected} is `true`.\n */\n selectedClassName?: string;\n\n /**\n * This will be ignored if {@link selected} is `undefined`.\n *\n * @defaultValue `getIcon(\"selected\")`\n */\n selectedIcon?: ReactNode;\n\n /**\n * Set this to `true` if the {@link selectedIcon} should display as the\n * {@link rightAddon} instead of the {@link leftAddon}.\n *\n * @defaultValue `false`\n * @since 6.0.0\n */\n selectedIconAfter?: boolean;\n\n /**\n * Set this to `true` if the {@link selectedIcon} should not animate and\n * instead apply `display: none`\n *\n * @defaultValue `false`\n */\n disableIconTransition?: boolean;\n\n /**\n * Set this to `true` to render the chip as a `<span>` instead of a button.\n *\n * @since 2.6.0\n * @since 6.0.0 Renamed from `noninteractable`\n * @defaultValue `false`\n */\n noninteractive?: boolean;\n\n /**\n * An optional background color theme to use.\n *\n * @since 6.0.0\n */\n backgroundColor?: BackgroundColor;\n\n /**\n * An optional icon, avatar, circular progress, or custom component to render\n * before the `children`. This will remove some of the leading horizontal\n * padding on the chip as well.\n */\n leftAddon?: ReactNode;\n\n /**\n * An optional icon, avatar, circular progress, or custom component to render\n * after the `children`. This will remove some of the trailing horizontal\n * padding on the chip as well.\n */\n rightAddon?: ReactNode;\n\n /**\n * Set this to true if the `children` should not be wrapped in a span to apply\n * the {@link chipContent} styles which allow for shrinking text and\n * truncating text with ellipsis.\n *\n * @defaultValue `false`\n */\n disableContentWrap?: boolean;\n\n /**\n * This will be ignored if {@link disableContentWrap} is `true`.\n *\n * @since 6.0.0\n */\n contentProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;\n\n /**\n * This will be ignored if {@link disableContentWrap} is `true`.\n */\n contentStyle?: CSSProperties;\n\n /**\n * This will be ignored if {@link disableContentWrap} is `true`.\n */\n contentClassName?: string;\n}\n\n/**\n * **Server Component**\n *\n * @example Simple Example\n * ```tsx\n * import { Chip } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return <Chip>Content</Chip>;\n * }\n * ```\n *\n * @example Outlined Example\n * ```tsx\n * import { Chip } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return <Chip theme=\"outline\">Content</Chip>;\n * }\n * ```\n *\n * @example Addons Example\n * ```tsx\n * import { Avatar, Chip } from \"@react-md/core\";\n * import AddCircleIcon from \"@react-md/material-icons/AddCircleIcon\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return (\n * <Chip\n * leftAddon={\n * <Avatar>\n * <img src=\"https://i.pravatar.cc/40?img=3\" alt=\"\" />\n * </Avatar>\n * }\n * rightAddon={<AddCircleIcon />}\n * >\n * Chip\n * </Chip>\n * );\n * }\n * ```\n *\n * @since 6.0.0 Renamed the `noninteractable` prop to\n * `noninteractive`.\n */\nexport const Chip = forwardRef<HTMLButtonElement, ChipProps>(\n function Chip(props, ref) {\n const {\n \"aria-pressed\": ariaPressed,\n theme = \"solid\",\n className,\n raisable = false,\n disabled = false,\n selected,\n selectedThemed = false,\n selectedClassName,\n selectedIcon: propSelectedIcon,\n selectedIconAfter = false,\n backgroundColor,\n noninteractive = false,\n disableIconTransition = false,\n children: propChildren,\n onClick,\n onKeyDown,\n onKeyUp,\n onMouseDown,\n onMouseUp,\n onMouseLeave,\n onDragStart,\n onTouchStart,\n onTouchEnd,\n onTouchMove,\n leftAddon: propLeftAddon,\n rightAddon: propRightAddon,\n contentProps,\n contentStyle,\n contentClassName,\n disableContentWrap = false,\n ...remaining\n } = props;\n\n let buttonProps: ButtonHTMLAttributes<HTMLButtonElement> | undefined;\n if (!noninteractive) {\n buttonProps = {\n \"aria-pressed\": ariaPressed ?? (!!selected || undefined),\n type: \"button\",\n disabled,\n };\n }\n\n let content = propChildren;\n if (!disableContentWrap) {\n content = (\n <span\n style={contentStyle}\n {...contentProps}\n className={cnb(\n chipContent({ className: contentClassName }),\n contentProps?.className\n )}\n >\n {propChildren}\n </span>\n );\n }\n\n let leftAddon = propLeftAddon;\n let rightAddon = propRightAddon;\n const selectedIconNode = getIcon(\"selected\", propSelectedIcon);\n const isTransitionable =\n !selectedThemed &&\n typeof selected === \"boolean\" &&\n typeof (selectedIconAfter ? propRightAddon : propLeftAddon) ===\n \"undefined\";\n const selectedIcon = useMaxWidthTransition({\n element: selectedIconNode,\n transitionIn: !!selected,\n disabled: !isTransitionable,\n disableTransition: disableIconTransition,\n });\n if (isTransitionable) {\n if (selectedIconAfter) {\n rightAddon = selectedIcon;\n } else {\n leftAddon = selectedIcon;\n }\n }\n\n const { pressed, pressedClassName, ripples, handlers } =\n useElementInteraction({\n onClick,\n onKeyDown,\n onKeyUp,\n onMouseDown,\n onMouseUp,\n onMouseLeave,\n onDragStart,\n onTouchStart,\n onTouchEnd,\n onTouchMove,\n disabled: disabled || noninteractive,\n });\n const children = useHigherContrastChildren(content);\n const Component = noninteractive ? \"span\" : \"button\";\n\n return (\n <Component\n {...remaining}\n {...buttonProps}\n {...handlers}\n className={chip({\n className,\n theme,\n pressed: raisable && pressed,\n disabled,\n selected,\n selectedThemed,\n selectedClassName,\n noninteractive,\n backgroundColor,\n pressedClassName,\n leftAddon: !!leftAddon && (selectedIconAfter || selected !== false),\n rightAddon:\n !!rightAddon && (!selectedIconAfter || selected !== false),\n })}\n ref={ref}\n >\n {leftAddon}\n {children}\n {rightAddon}\n {ripples}\n </Component>\n );\n }\n);\n"],"names":["cnb","forwardRef","getIcon","useElementInteraction","useHigherContrastChildren","useMaxWidthTransition","chip","chipContent","Chip","props","ref","ariaPressed","theme","className","raisable","disabled","selected","selectedThemed","selectedClassName","selectedIcon","propSelectedIcon","selectedIconAfter","backgroundColor","noninteractive","disableIconTransition","children","propChildren","onClick","onKeyDown","onKeyUp","onMouseDown","onMouseUp","onMouseLeave","onDragStart","onTouchStart","onTouchEnd","onTouchMove","leftAddon","propLeftAddon","rightAddon","propRightAddon","contentProps","contentStyle","contentClassName","disableContentWrap","remaining","buttonProps","undefined","type","content","span","style","selectedIconNode","isTransitionable","element","transitionIn","disableTransition","pressed","pressedClassName","ripples","handlers","Component"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;AACA,SAASA,GAAG,QAAQ,YAAY;AAChC,SACEC,UAAU,QAKL,QAAQ;AAEf,SAASC,OAAO,QAAQ,wBAAwB;AAChD,SAASC,qBAAqB,QAAQ,0CAA0C;AAChF,SAASC,yBAAyB,QAAQ,8CAA8C;AACxF,SAASC,qBAAqB,QAAQ,yCAAyC;AAE/E,SAASC,IAAI,EAAEC,WAAW,QAAQ,cAAc;AA8IhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+CC,GACD,OAAO,MAAMC,qBAAOP,WAClB,SAASO,KAAKC,KAAK,EAAEC,GAAG;IACtB,MAAM,EACJ,gBAAgBC,WAAW,EAC3BC,QAAQ,OAAO,EACfC,SAAS,EACTC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,QAAQ,EACRC,iBAAiB,KAAK,EACtBC,iBAAiB,EACjBC,cAAcC,gBAAgB,EAC9BC,oBAAoB,KAAK,EACzBC,eAAe,EACfC,iBAAiB,KAAK,EACtBC,wBAAwB,KAAK,EAC7BC,UAAUC,YAAY,EACtBC,OAAO,EACPC,SAAS,EACTC,OAAO,EACPC,WAAW,EACXC,SAAS,EACTC,YAAY,EACZC,WAAW,EACXC,YAAY,EACZC,UAAU,EACVC,WAAW,EACXC,WAAWC,aAAa,EACxBC,YAAYC,cAAc,EAC1BC,YAAY,EACZC,YAAY,EACZC,gBAAgB,EAChBC,qBAAqB,KAAK,EAC1B,GAAGC,WACJ,GAAGpC;IAEJ,IAAIqC;IACJ,IAAI,CAACvB,gBAAgB;QACnBuB,cAAc;YACZ,gBAAgBnC,eAAgB,CAAA,CAAC,CAACK,YAAY+B,SAAQ;YACtDC,MAAM;YACNjC;QACF;IACF;IAEA,IAAIkC,UAAUvB;IACd,IAAI,CAACkB,oBAAoB;QACvBK,wBACE,KAACC;YACCC,OAAOT;YACN,GAAGD,YAAY;YAChB5B,WAAWb,IACTO,YAAY;gBAAEM,WAAW8B;YAAiB,IAC1CF,cAAc5B;sBAGfa;;IAGP;IAEA,IAAIW,YAAYC;IAChB,IAAIC,aAAaC;IACjB,MAAMY,mBAAmBlD,QAAQ,YAAYkB;IAC7C,MAAMiC,mBACJ,CAACpC,kBACD,OAAOD,aAAa,aACpB,OAAQK,CAAAA,oBAAoBmB,iBAAiBF,aAAY,MACvD;IACJ,MAAMnB,eAAed,sBAAsB;QACzCiD,SAASF;QACTG,cAAc,CAAC,CAACvC;QAChBD,UAAU,CAACsC;QACXG,mBAAmBhC;IACrB;IACA,IAAI6B,kBAAkB;QACpB,IAAIhC,mBAAmB;YACrBkB,aAAapB;QACf,OAAO;YACLkB,YAAYlB;QACd;IACF;IAEA,MAAM,EAAEsC,OAAO,EAAEC,gBAAgB,EAAEC,OAAO,EAAEC,QAAQ,EAAE,GACpDzD,sBAAsB;QACpBwB;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACArB,UAAUA,YAAYQ;IACxB;IACF,MAAME,WAAWrB,0BAA0B6C;IAC3C,MAAMY,YAAYtC,iBAAiB,SAAS;IAE5C,qBACE,MAACsC;QACE,GAAGhB,SAAS;QACZ,GAAGC,WAAW;QACd,GAAGc,QAAQ;QACZ/C,WAAWP,KAAK;YACdO;YACAD;YACA6C,SAAS3C,YAAY2C;YACrB1C;YACAC;YACAC;YACAC;YACAK;YACAD;YACAoC;YACArB,WAAW,CAAC,CAACA,aAAchB,CAAAA,qBAAqBL,aAAa,KAAI;YACjEuB,YACE,CAAC,CAACA,cAAe,CAAA,CAAClB,qBAAqBL,aAAa,KAAI;QAC5D;QACAN,KAAKA;;YAEJ2B;YACAZ;YACAc;YACAoB;;;AAGP,GACA"}
|
|
1
|
+
{"version":3,"sources":["../../src/chip/Chip.tsx"],"sourcesContent":["\"use client\";\nimport { cnb } from \"cnbuilder\";\nimport {\n forwardRef,\n type ButtonHTMLAttributes,\n type CSSProperties,\n type HTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { type BackgroundColor } from \"../cssUtils.js\";\nimport { getIcon } from \"../icon/iconConfig.js\";\nimport { useElementInteraction } from \"../interaction/useElementInteraction.js\";\nimport { useHigherContrastChildren } from \"../interaction/useHigherContrastChildren.js\";\nimport { useMaxWidthTransition } from \"../transition/useMaxWidthTransition.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { chip, chipContent } from \"./styles.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-chip-solid-background-color\"?: string;\n \"--rmd-chip-solid-disabled-background-color\"?: string;\n \"--rmd-chip-solid-color\"?: string;\n \"--rmd-chip-theme-background-color\"?: string;\n \"--rmd-chip-theme-color\"?: string;\n \"--rmd-chip-outline-background-color\"?: string;\n \"--rmd-chip-outline-color\"?: string;\n }\n}\n\n/**\n * @since 6.0.0 Renamed the `noninteractive` prop to\n * `noninteractable`.\n */\nexport interface ChipProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /**\n * @defaultValue `\"solid\"`\n */\n theme?: \"outline\" | \"solid\";\n\n /**\n * Set this to `true` if the chip should gain additional box shadow while the\n * user is pressing down on the chip.\n *\n * @defaultValue `false`\n */\n raisable?: boolean;\n\n /**\n * @defaultValue `false`\n */\n disabled?: boolean;\n\n /**\n * When this is a boolean, a selected icon will be displayed before the\n * `children` and appear/disappear when `true`/`false`.\n *\n * @see {@link selectedIcon}\n * @see {@link selectedIconAfter}\n * @see {@link selectedThemed}\n */\n selected?: boolean;\n\n /**\n * Set this to `true` if the chip should change background color while\n * {@link selected} instead of displaying an icon. The default background\n * color is a lighter swatch of the theme primary color.\n *\n * @defaultValue `false`\n */\n selectedThemed?: boolean;\n\n /**\n * An optional className to provide only while {@link selected} is `true`.\n */\n selectedClassName?: string;\n\n /**\n * This will be ignored if {@link selected} is `undefined`.\n *\n * @defaultValue `getIcon(\"selected\")`\n */\n selectedIcon?: ReactNode;\n\n /**\n * Set this to `true` if the {@link selectedIcon} should display as the\n * {@link rightAddon} instead of the {@link leftAddon}.\n *\n * @defaultValue `false`\n * @since 6.0.0\n */\n selectedIconAfter?: boolean;\n\n /**\n * Set this to `true` if the {@link selectedIcon} should not animate and\n * instead apply `display: none`\n *\n * @defaultValue `false`\n */\n disableIconTransition?: boolean;\n\n /**\n * Set this to `true` to render the chip as a `<span>` instead of a button.\n *\n * @since 2.6.0\n * @since 6.0.0 Renamed from `noninteractable`\n * @defaultValue `false`\n */\n noninteractive?: boolean;\n\n /**\n * An optional background color theme to use.\n *\n * @since 6.0.0\n */\n backgroundColor?: BackgroundColor;\n\n /**\n * An optional icon, avatar, circular progress, or custom component to render\n * before the `children`. This will remove some of the leading horizontal\n * padding on the chip as well.\n */\n leftAddon?: ReactNode;\n\n /**\n * An optional icon, avatar, circular progress, or custom component to render\n * after the `children`. This will remove some of the trailing horizontal\n * padding on the chip as well.\n */\n rightAddon?: ReactNode;\n\n /**\n * Set this to true if the `children` should not be wrapped in a span to apply\n * the {@link chipContent} styles which allow for shrinking text and\n * truncating text with ellipsis.\n *\n * @defaultValue `false`\n */\n disableContentWrap?: boolean;\n\n /**\n * This will be ignored if {@link disableContentWrap} is `true`.\n *\n * @since 6.0.0\n */\n contentProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;\n\n /**\n * This will be ignored if {@link disableContentWrap} is `true`.\n */\n contentStyle?: CSSProperties;\n\n /**\n * This will be ignored if {@link disableContentWrap} is `true`.\n */\n contentClassName?: string;\n}\n\n/**\n * **Server Component**\n *\n * @example Simple Example\n * ```tsx\n * import { Chip } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return <Chip>Content</Chip>;\n * }\n * ```\n *\n * @example Outlined Example\n * ```tsx\n * import { Chip } from \"@react-md/core\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return <Chip theme=\"outline\">Content</Chip>;\n * }\n * ```\n *\n * @example Addons Example\n * ```tsx\n * import { Avatar, Chip } from \"@react-md/core\";\n * import AddCircleIcon from \"@react-md/material-icons/AddCircleIcon\";\n * import type { ReactElement } from \"react\";\n *\n * function Example(): ReactElement {\n * return (\n * <Chip\n * leftAddon={\n * <Avatar>\n * <img src=\"https://i.pravatar.cc/40?img=3\" alt=\"\" />\n * </Avatar>\n * }\n * rightAddon={<AddCircleIcon />}\n * >\n * Chip\n * </Chip>\n * );\n * }\n * ```\n *\n * @since 6.0.0 Renamed the `noninteractable` prop to\n * `noninteractive`.\n */\nexport const Chip = forwardRef<HTMLButtonElement, ChipProps>(\n function Chip(props, ref) {\n const {\n \"aria-pressed\": ariaPressed,\n theme = \"solid\",\n className,\n raisable = false,\n disabled = false,\n selected,\n selectedThemed = false,\n selectedClassName,\n selectedIcon: propSelectedIcon,\n selectedIconAfter = false,\n backgroundColor,\n noninteractive = false,\n disableIconTransition = false,\n children: propChildren,\n onClick,\n onKeyDown,\n onKeyUp,\n onMouseDown,\n onMouseUp,\n onMouseLeave,\n onDragStart,\n onTouchStart,\n onTouchEnd,\n onTouchMove,\n leftAddon: propLeftAddon,\n rightAddon: propRightAddon,\n contentProps,\n contentStyle,\n contentClassName,\n disableContentWrap = false,\n ...remaining\n } = props;\n\n let buttonProps: ButtonHTMLAttributes<HTMLButtonElement> | undefined;\n if (!noninteractive) {\n buttonProps = {\n \"aria-pressed\": ariaPressed ?? (!!selected || undefined),\n type: \"button\",\n disabled,\n };\n }\n\n let content = propChildren;\n if (!disableContentWrap) {\n content = (\n <span\n style={contentStyle}\n {...contentProps}\n className={cnb(\n chipContent({ className: contentClassName }),\n contentProps?.className\n )}\n >\n {propChildren}\n </span>\n );\n }\n\n let leftAddon = propLeftAddon;\n let rightAddon = propRightAddon;\n const selectedIconNode = getIcon(\"selected\", propSelectedIcon);\n const isTransitionable =\n !selectedThemed &&\n typeof selected === \"boolean\" &&\n typeof (selectedIconAfter ? propRightAddon : propLeftAddon) ===\n \"undefined\";\n const selectedIcon = useMaxWidthTransition({\n element: selectedIconNode,\n transitionIn: !!selected,\n disabled: !isTransitionable,\n disableTransition: disableIconTransition,\n });\n if (isTransitionable) {\n if (selectedIconAfter) {\n rightAddon = selectedIcon;\n } else {\n leftAddon = selectedIcon;\n }\n }\n\n const { pressed, pressedClassName, ripples, handlers } =\n useElementInteraction({\n onClick,\n onKeyDown,\n onKeyUp,\n onMouseDown,\n onMouseUp,\n onMouseLeave,\n onDragStart,\n onTouchStart,\n onTouchEnd,\n onTouchMove,\n disabled: disabled || noninteractive,\n });\n const children = useHigherContrastChildren(content);\n const Component = noninteractive ? \"span\" : \"button\";\n\n return (\n <Component\n {...remaining}\n {...buttonProps}\n {...handlers}\n className={chip({\n className,\n theme,\n pressed: raisable && pressed,\n disabled,\n selected,\n selectedThemed,\n selectedClassName,\n noninteractive,\n backgroundColor,\n pressedClassName,\n leftAddon: !!leftAddon && (selectedIconAfter || selected !== false),\n rightAddon:\n !!rightAddon && (!selectedIconAfter || selected !== false),\n })}\n ref={ref}\n >\n {leftAddon}\n {children}\n {rightAddon}\n {ripples}\n </Component>\n );\n }\n);\n"],"names":["cnb","forwardRef","getIcon","useElementInteraction","useHigherContrastChildren","useMaxWidthTransition","chip","chipContent","Chip","props","ref","ariaPressed","theme","className","raisable","disabled","selected","selectedThemed","selectedClassName","selectedIcon","propSelectedIcon","selectedIconAfter","backgroundColor","noninteractive","disableIconTransition","children","propChildren","onClick","onKeyDown","onKeyUp","onMouseDown","onMouseUp","onMouseLeave","onDragStart","onTouchStart","onTouchEnd","onTouchMove","leftAddon","propLeftAddon","rightAddon","propRightAddon","contentProps","contentStyle","contentClassName","disableContentWrap","remaining","buttonProps","undefined","type","content","span","style","selectedIconNode","isTransitionable","element","transitionIn","disableTransition","pressed","pressedClassName","ripples","handlers","Component"],"mappings":"AAAA;;AACA,SAASA,GAAG,QAAQ,YAAY;AAChC,SACEC,UAAU,QAKL,QAAQ;AAEf,SAASC,OAAO,QAAQ,wBAAwB;AAChD,SAASC,qBAAqB,QAAQ,0CAA0C;AAChF,SAASC,yBAAyB,QAAQ,8CAA8C;AACxF,SAASC,qBAAqB,QAAQ,yCAAyC;AAE/E,SAASC,IAAI,EAAEC,WAAW,QAAQ,cAAc;AA8IhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+CC,GACD,OAAO,MAAMC,qBAAOP,WAClB,SAASO,KAAKC,KAAK,EAAEC,GAAG;IACtB,MAAM,EACJ,gBAAgBC,WAAW,EAC3BC,QAAQ,OAAO,EACfC,SAAS,EACTC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,QAAQ,EACRC,iBAAiB,KAAK,EACtBC,iBAAiB,EACjBC,cAAcC,gBAAgB,EAC9BC,oBAAoB,KAAK,EACzBC,eAAe,EACfC,iBAAiB,KAAK,EACtBC,wBAAwB,KAAK,EAC7BC,UAAUC,YAAY,EACtBC,OAAO,EACPC,SAAS,EACTC,OAAO,EACPC,WAAW,EACXC,SAAS,EACTC,YAAY,EACZC,WAAW,EACXC,YAAY,EACZC,UAAU,EACVC,WAAW,EACXC,WAAWC,aAAa,EACxBC,YAAYC,cAAc,EAC1BC,YAAY,EACZC,YAAY,EACZC,gBAAgB,EAChBC,qBAAqB,KAAK,EAC1B,GAAGC,WACJ,GAAGpC;IAEJ,IAAIqC;IACJ,IAAI,CAACvB,gBAAgB;QACnBuB,cAAc;YACZ,gBAAgBnC,eAAgB,CAAA,CAAC,CAACK,YAAY+B,SAAQ;YACtDC,MAAM;YACNjC;QACF;IACF;IAEA,IAAIkC,UAAUvB;IACd,IAAI,CAACkB,oBAAoB;QACvBK,wBACE,KAACC;YACCC,OAAOT;YACN,GAAGD,YAAY;YAChB5B,WAAWb,IACTO,YAAY;gBAAEM,WAAW8B;YAAiB,IAC1CF,cAAc5B;sBAGfa;;IAGP;IAEA,IAAIW,YAAYC;IAChB,IAAIC,aAAaC;IACjB,MAAMY,mBAAmBlD,QAAQ,YAAYkB;IAC7C,MAAMiC,mBACJ,CAACpC,kBACD,OAAOD,aAAa,aACpB,OAAQK,CAAAA,oBAAoBmB,iBAAiBF,aAAY,MACvD;IACJ,MAAMnB,eAAed,sBAAsB;QACzCiD,SAASF;QACTG,cAAc,CAAC,CAACvC;QAChBD,UAAU,CAACsC;QACXG,mBAAmBhC;IACrB;IACA,IAAI6B,kBAAkB;QACpB,IAAIhC,mBAAmB;YACrBkB,aAAapB;QACf,OAAO;YACLkB,YAAYlB;QACd;IACF;IAEA,MAAM,EAAEsC,OAAO,EAAEC,gBAAgB,EAAEC,OAAO,EAAEC,QAAQ,EAAE,GACpDzD,sBAAsB;QACpBwB;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACArB,UAAUA,YAAYQ;IACxB;IACF,MAAME,WAAWrB,0BAA0B6C;IAC3C,MAAMY,YAAYtC,iBAAiB,SAAS;IAE5C,qBACE,MAACsC;QACE,GAAGhB,SAAS;QACZ,GAAGC,WAAW;QACd,GAAGc,QAAQ;QACZ/C,WAAWP,KAAK;YACdO;YACAD;YACA6C,SAAS3C,YAAY2C;YACrB1C;YACAC;YACAC;YACAC;YACAK;YACAD;YACAoC;YACArB,WAAW,CAAC,CAACA,aAAchB,CAAAA,qBAAqBL,aAAa,KAAI;YACjEuB,YACE,CAAC,CAACA,cAAe,CAAA,CAAClB,qBAAqBL,aAAa,KAAI;QAC5D;QACAN,KAAKA;;YAEJ2B;YACAZ;YACAc;YACAoB;;;AAGP,GACA"}
|
package/dist/chip/styles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/chip/styles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { type BackgroundColor, cssUtils } from \"../cssUtils.js\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-chip\");\n\n/**\n * @since 6.0.0\n *\n * Note for the future: Once Firefox supports the `:has` selector, the\n * `leftAddon` and `rightAddon` can be removed. The styles would automatically\n * apply the padding instead:\n *\n * ```scss\n * &:has(.rmd-icon:first-child, .rmd-avatar:first-child) {\n * @include core.auto-rtl(\n * padding-left,\n * $addon-left-padding,\n * $horizontal-padding\n * );\n * }\n *\n * $index: if(\n * not core.$interaction-mode or core.$interaction-mode == press,\n * 1,\n * 2 // last child is always the `.rmd-ripple-container`\n * );\n * &:has(.rmd-icon:nth-last-child(#{$index})) {\n * @include core.auto-rtl(\n * padding-right,\n * $addon-right-padding,\n * $horizontal-padding\n * );\n * }\n * ```\n */\nexport interface ChipClassNameOptions {\n className?: string;\n selectedClassName?: string;\n\n /** @defaultValue `\"solid\"` */\n theme?: \"outline\" | \"solid\";\n\n backgroundColor?: BackgroundColor;\n\n /** @defaultValue `false` */\n disabled?: boolean;\n\n /** @defaultValue `false` */\n selected?: boolean;\n\n /** @defaultValue `false` */\n selectedThemed?: boolean;\n\n /** @defaultValue `true` */\n noninteractive?: boolean;\n\n /** @defaultValue `false` */\n leftAddon?: boolean;\n\n /** @defaultValue `false` */\n rightAddon?: boolean;\n\n /** @defaultValue `false` */\n pressed?: boolean;\n pressedClassName?: string;\n}\n\n/**\n * @since 6.0.0\n */\nexport function chip(options: ChipClassNameOptions = {}): string {\n const {\n className,\n theme = \"solid\",\n pressed = false,\n disabled = false,\n selected = false,\n selectedThemed = false,\n selectedClassName,\n noninteractive = true,\n pressedClassName,\n leftAddon = false,\n rightAddon = false,\n backgroundColor,\n } = options;\n\n return cnb(\n styles({\n themed: !disabled && selected && selectedThemed,\n selected: !disabled && selected && !selectedThemed,\n solid: theme === \"solid\",\n outline: theme === \"outline\",\n disabled,\n \"left-addon\": leftAddon,\n \"right-addon\": rightAddon,\n pressed,\n }),\n selected && selectedClassName,\n pressedClassName,\n cssUtils({\n surface: !noninteractive,\n textColor: disabled ? \"text-disabled\" : undefined,\n backgroundColor,\n }),\n className\n );\n}\n\n/**\n * @since 6.0.0\n */\nexport interface ChipContentClassNameOptions {\n className?: string;\n}\n\n/**\n * @since 6.0.0\n */\nexport function chipContent(options: ChipContentClassNameOptions = {}): string {\n const { className } = options;\n\n return cnb(styles(\"content\"), className);\n}\n"],"names":["cnb","cssUtils","bem","styles","chip","options","className","theme","pressed","disabled","selected","selectedThemed","selectedClassName","noninteractive","pressedClassName","leftAddon","rightAddon","backgroundColor","themed","solid","outline","surface","textColor","undefined","chipContent"],"
|
|
1
|
+
{"version":3,"sources":["../../src/chip/styles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\nimport { type BackgroundColor, cssUtils } from \"../cssUtils.js\";\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-chip\");\n\n/**\n * @since 6.0.0\n *\n * Note for the future: Once Firefox supports the `:has` selector, the\n * `leftAddon` and `rightAddon` can be removed. The styles would automatically\n * apply the padding instead:\n *\n * ```scss\n * &:has(.rmd-icon:first-child, .rmd-avatar:first-child) {\n * @include core.auto-rtl(\n * padding-left,\n * $addon-left-padding,\n * $horizontal-padding\n * );\n * }\n *\n * $index: if(\n * not core.$interaction-mode or core.$interaction-mode == press,\n * 1,\n * 2 // last child is always the `.rmd-ripple-container`\n * );\n * &:has(.rmd-icon:nth-last-child(#{$index})) {\n * @include core.auto-rtl(\n * padding-right,\n * $addon-right-padding,\n * $horizontal-padding\n * );\n * }\n * ```\n */\nexport interface ChipClassNameOptions {\n className?: string;\n selectedClassName?: string;\n\n /** @defaultValue `\"solid\"` */\n theme?: \"outline\" | \"solid\";\n\n backgroundColor?: BackgroundColor;\n\n /** @defaultValue `false` */\n disabled?: boolean;\n\n /** @defaultValue `false` */\n selected?: boolean;\n\n /** @defaultValue `false` */\n selectedThemed?: boolean;\n\n /** @defaultValue `true` */\n noninteractive?: boolean;\n\n /** @defaultValue `false` */\n leftAddon?: boolean;\n\n /** @defaultValue `false` */\n rightAddon?: boolean;\n\n /** @defaultValue `false` */\n pressed?: boolean;\n pressedClassName?: string;\n}\n\n/**\n * @since 6.0.0\n */\nexport function chip(options: ChipClassNameOptions = {}): string {\n const {\n className,\n theme = \"solid\",\n pressed = false,\n disabled = false,\n selected = false,\n selectedThemed = false,\n selectedClassName,\n noninteractive = true,\n pressedClassName,\n leftAddon = false,\n rightAddon = false,\n backgroundColor,\n } = options;\n\n return cnb(\n styles({\n themed: !disabled && selected && selectedThemed,\n selected: !disabled && selected && !selectedThemed,\n solid: theme === \"solid\",\n outline: theme === \"outline\",\n disabled,\n \"left-addon\": leftAddon,\n \"right-addon\": rightAddon,\n pressed,\n }),\n selected && selectedClassName,\n pressedClassName,\n cssUtils({\n surface: !noninteractive,\n textColor: disabled ? \"text-disabled\" : undefined,\n backgroundColor,\n }),\n className\n );\n}\n\n/**\n * @since 6.0.0\n */\nexport interface ChipContentClassNameOptions {\n className?: string;\n}\n\n/**\n * @since 6.0.0\n */\nexport function chipContent(options: ChipContentClassNameOptions = {}): string {\n const { className } = options;\n\n return cnb(styles(\"content\"), className);\n}\n"],"names":["cnb","cssUtils","bem","styles","chip","options","className","theme","pressed","disabled","selected","selectedThemed","selectedClassName","noninteractive","pressedClassName","leftAddon","rightAddon","backgroundColor","themed","solid","outline","surface","textColor","undefined","chipContent"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAChC,SAA+BC,QAAQ,QAAQ,iBAAiB;AAChE,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAgEnB;;CAEC,GACD,OAAO,SAASE,KAAKC,UAAgC,CAAC,CAAC;IACrD,MAAM,EACJC,SAAS,EACTC,QAAQ,OAAO,EACfC,UAAU,KAAK,EACfC,WAAW,KAAK,EAChBC,WAAW,KAAK,EAChBC,iBAAiB,KAAK,EACtBC,iBAAiB,EACjBC,iBAAiB,IAAI,EACrBC,gBAAgB,EAChBC,YAAY,KAAK,EACjBC,aAAa,KAAK,EAClBC,eAAe,EAChB,GAAGZ;IAEJ,OAAOL,IACLG,OAAO;QACLe,QAAQ,CAACT,YAAYC,YAAYC;QACjCD,UAAU,CAACD,YAAYC,YAAY,CAACC;QACpCQ,OAAOZ,UAAU;QACjBa,SAASb,UAAU;QACnBE;QACA,cAAcM;QACd,eAAeC;QACfR;IACF,IACAE,YAAYE,mBACZE,kBACAb,SAAS;QACPoB,SAAS,CAACR;QACVS,WAAWb,WAAW,kBAAkBc;QACxCN;IACF,IACAX;AAEJ;AASA;;CAEC,GACD,OAAO,SAASkB,YAAYnB,UAAuC,CAAC,CAAC;IACnE,MAAM,EAAEC,SAAS,EAAE,GAAGD;IAEtB,OAAOL,IAAIG,OAAO,YAAYG;AAChC"}
|
package/dist/cssUtils.d.ts
CHANGED
|
@@ -59,7 +59,7 @@ export type Margin = "none" | "top" | "bottom" | "centered";
|
|
|
59
59
|
export type TextOverflow = "allow" | "nowrap" | "ellipsis";
|
|
60
60
|
/** @since 6.0.0 */
|
|
61
61
|
export interface TextCssUtilsOptions {
|
|
62
|
-
textColor?: ThemeColor | TextColor;
|
|
62
|
+
textColor?: ThemeColor | TextColor | null;
|
|
63
63
|
textAlign?: TextAlign;
|
|
64
64
|
textDecoration?: TextDecoration;
|
|
65
65
|
textTransform?: TextTransform;
|