@prokodo/ui 0.0.26 → 0.0.28
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/README.md +89 -45
- package/dist/_virtual/_commonjsHelpers.js +6 -3
- package/dist/_virtual/index.js +5 -5
- package/dist/_virtual/index2.js +2 -2
- package/dist/_virtual/index3.js +2 -2
- package/dist/_virtual/react-is.development.js +2 -2
- package/dist/_virtual/react-is.production.min.js +2 -2
- package/dist/assets/images/card_background_primary_1.webp.js +2 -2
- package/dist/assets/images/card_background_primary_2.webp.js +2 -2
- package/dist/assets/images/card_background_primary_3.webp.js +2 -2
- package/dist/assets/images/card_background_primary_4.webp.js +2 -2
- package/dist/assets/images/card_background_secondary_1.webp.js +2 -2
- package/dist/assets/images/card_background_secondary_2.webp.js +2 -2
- package/dist/assets/images/card_background_secondary_3.webp.js +2 -2
- package/dist/assets/images/card_background_secondary_4.webp.js +2 -2
- package/dist/components/accordion/Accordion.js +82 -74
- package/dist/components/accordion/Accordion.module.scss.js +11 -8
- package/dist/components/accordion/index.js +2 -2
- package/dist/components/animated/Animated.js +61 -40
- package/dist/components/animated/Animated.module.scss.js +8 -6
- package/dist/components/animated/index.js +2 -2
- package/dist/components/animatedText/AnimatedText.js +36 -27
- package/dist/components/animatedText/index.js +2 -2
- package/dist/components/avatar/Avatar.js +62 -54
- package/dist/components/avatar/Avatar.module.scss.js +8 -6
- package/dist/components/avatar/index.js +2 -2
- package/dist/components/base-link/BaseLink.js +39 -27
- package/dist/components/base-link/index.js +2 -2
- package/dist/components/button/Button.client.js +100 -0
- package/dist/components/button/Button.js +15 -82
- package/dist/components/button/Button.lazy.js +20 -0
- package/dist/components/button/Button.module.scss.js +8 -6
- package/dist/components/button/Button.server.js +77 -0
- package/dist/components/button/index.js +2 -2
- package/dist/components/calendly/Calendly.js +99 -60
- package/dist/components/calendly/index.js +2 -2
- package/dist/components/card/Card.js +167 -141
- package/dist/components/card/Card.module.scss.js +11 -8
- package/dist/components/card/index.js +2 -2
- package/dist/components/carousel/Carousel.js +209 -145
- package/dist/components/carousel/Carousel.module.scss.js +8 -6
- package/dist/components/carousel/Carousel.services.js +39 -20
- package/dist/components/carousel/index.js +2 -2
- package/dist/components/chip/Chip.js +44 -36
- package/dist/components/chip/Chip.module.scss.js +8 -6
- package/dist/components/chip/index.js +2 -2
- package/dist/components/datePicker/DatePicker.js +106 -69
- package/dist/components/datePicker/index.js +2 -2
- package/dist/components/dialog/Dialog.js +106 -93
- package/dist/components/dialog/Dialog.module.scss.js +8 -6
- package/dist/components/dialog/index.js +2 -2
- package/dist/components/drawer/Drawer.js +78 -64
- package/dist/components/drawer/Drawer.module.scss.js +20 -14
- package/dist/components/drawer/index.js +4 -4
- package/dist/components/form/Form.js +229 -165
- package/dist/components/form/Form.module.scss.js +8 -6
- package/dist/components/form/FormField.js +63 -60
- package/dist/components/form/FormField.module.scss.js +8 -6
- package/dist/components/form/FormResponse.js +37 -41
- package/dist/components/form/FormResponse.module.scss.js +8 -6
- package/dist/components/form/index.js +4 -4
- package/dist/components/grid/Grid.js +14 -11
- package/dist/components/grid/Grid.module.scss.js +8 -6
- package/dist/components/grid/GridRow.js +20 -17
- package/dist/components/grid/GridRow.module.scss.js +8 -6
- package/dist/components/grid/index.js +4 -4
- package/dist/components/headline/Headline.client.js +85 -0
- package/dist/components/headline/Headline.module.scss.js +8 -6
- package/dist/components/headline/Headline.server.js +73 -0
- package/dist/components/headline/Headline.variants.js +9 -0
- package/dist/components/headline/index.js +4 -3
- package/dist/components/icon/Icon.js +27 -22
- package/dist/components/icon/Icon.module.scss.js +8 -6
- package/dist/components/icon/index.js +3 -3
- package/dist/components/image/Image.js +30 -24
- package/dist/components/image/Image.module.scss.js +8 -6
- package/dist/components/image/index.js +2 -2
- package/dist/components/image-text/ImageText.js +80 -81
- package/dist/components/image-text/ImageText.module.scss.js +8 -6
- package/dist/components/image-text/index.js +2 -2
- package/dist/components/input/Input.js +147 -131
- package/dist/components/input/Input.module.scss.js +11 -8
- package/dist/components/input/InputValidation.js +50 -31
- package/dist/components/input/index.js +2 -2
- package/dist/components/inputOTP/InputOTP.js +90 -57
- package/dist/components/inputOTP/InputOTP.module.scss.js +8 -6
- package/dist/components/inputOTP/index.js +2 -2
- package/dist/components/label/Label.js +64 -63
- package/dist/components/label/Label.module.scss.js +8 -6
- package/dist/components/label/index.js +2 -2
- package/dist/components/link/Link.js +53 -48
- package/dist/components/link/Link.module.scss.js +8 -6
- package/dist/components/link/index.js +2 -2
- package/dist/components/list/List.js +120 -104
- package/dist/components/list/List.module.scss.js +8 -6
- package/dist/components/list/index.js +2 -2
- package/dist/components/loading/Loading.js +21 -20
- package/dist/components/loading/Loading.module.scss.js +11 -8
- package/dist/components/loading/index.js +2 -2
- package/dist/components/lottie/Lottie.js +47 -37
- package/dist/components/lottie/Lottie.module.scss.js +8 -6
- package/dist/components/lottie/LottieAnimations.js +2 -2
- package/dist/components/lottie/index.js +2 -2
- package/dist/components/map/Map.js +59 -42
- package/dist/components/map/index.js +2 -2
- package/dist/components/post-item/PostItem.js +81 -76
- package/dist/components/post-item/PostItem.module.scss.js +8 -6
- package/dist/components/post-item/PostItemAuthor.js +24 -23
- package/dist/components/post-item/PostItemAuthor.module.scss.js +8 -6
- package/dist/components/post-item/index.js +4 -4
- package/dist/components/post-teaser/PostTeaser.js +96 -92
- package/dist/components/post-teaser/PostTeaser.module.scss.js +8 -6
- package/dist/components/post-teaser/index.js +2 -2
- package/dist/components/post-widget/PostWidget.js +81 -80
- package/dist/components/post-widget/PostWidget.module.scss.js +8 -6
- package/dist/components/post-widget/index.js +2 -2
- package/dist/components/post-widget-carousel/PostWidgetCarousel.js +96 -90
- package/dist/components/post-widget-carousel/PostWidgetCarousel.module.scss.js +8 -6
- package/dist/components/post-widget-carousel/index.js +2 -2
- package/dist/components/quote/Quote.js +48 -47
- package/dist/components/quote/Quote.module.scss.js +8 -6
- package/dist/components/quote/index.js +2 -2
- package/dist/components/rich-text/RichText.js +114 -100
- package/dist/components/rich-text/RichText.module.scss.js +8 -6
- package/dist/components/rich-text/index.js +2 -2
- package/dist/components/select/Select.js +148 -127
- package/dist/components/select/Select.module.scss.js +17 -12
- package/dist/components/select/index.js +2 -2
- package/dist/components/skeleton/Skeleton.js +21 -18
- package/dist/components/skeleton/Skeleton.module.scss.js +8 -6
- package/dist/components/skeleton/index.js +2 -2
- package/dist/components/slider/Slider.js +74 -65
- package/dist/components/slider/Slider.module.scss.js +8 -6
- package/dist/components/slider/index.js +2 -2
- package/dist/components/stepper/Stepper.js +85 -69
- package/dist/components/stepper/Stepper.module.scss.js +8 -6
- package/dist/components/stepper/index.js +2 -2
- package/dist/components/switch/Switch.js +69 -63
- package/dist/components/switch/Switch.module.scss.js +8 -6
- package/dist/components/switch/index.js +2 -2
- package/dist/components/table/Table.js +48 -45
- package/dist/components/table/Table.module.scss.js +8 -6
- package/dist/components/table/index.js +2 -2
- package/dist/components/teaser/Teaser.js +66 -65
- package/dist/components/teaser/Teaser.module.scss.js +8 -6
- package/dist/components/teaser/index.js +2 -2
- package/dist/constants/project.js +2 -2
- package/dist/helpers/bem.js +17 -9
- package/dist/helpers/calculation.js +4 -2
- package/dist/helpers/validations.js +12 -6
- package/dist/hooks/useGoogleMaps.js +19 -14
- package/dist/hooks/useHydrationReady.js +26 -0
- package/dist/index.js +84 -84
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.0/node_modules/@floating-ui/core/dist/floating-ui.core.js +354 -251
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +555 -309
- package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.2_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +221 -141
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.9/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +167 -109
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.9/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +130 -88
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/Option/Option.js +91 -77
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/Option/optionClasses.js +10 -7
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/Portal/Portal.js +54 -40
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/Select/Select.js +192 -163
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/Select/selectClasses.js +10 -7
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/Slider/Slider.js +287 -242
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/Slider/sliderClasses.js +10 -7
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/Switch/Switch.js +112 -97
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/Switch/switchClasses.js +10 -7
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/Unstable_Popup/Popup.js +135 -115
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/Unstable_Popup/PopupContext.js +6 -4
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/Unstable_Popup/popupClasses.js +10 -7
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/generateUtilityClass/index.js +15 -10
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/generateUtilityClasses/index.js +11 -7
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useButton/useButton.js +160 -73
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useCompound/useCompoundItem.js +25 -18
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useCompound/useCompoundParent.js +63 -36
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useList/ListContext.js +6 -4
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useList/listActions.types.js +2 -2
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useList/listReducer.js +233 -138
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useList/useList.js +189 -128
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useList/useListItem.js +72 -52
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useOption/useOption.js +72 -53
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useOption/useOptionContextStabilizer.js +30 -22
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useSelect/SelectProvider.js +34 -28
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useSelect/defaultOptionStringifier.js +15 -7
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useSelect/selectReducer.js +49 -40
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useSelect/useSelect.js +341 -222
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useSelect/useSelect.types.js +2 -2
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useSlider/useSlider.js +550 -353
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useSwitch/useSwitch.js +79 -50
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useTransition/TransitionContext.js +6 -4
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useTransition/useTransitionTrigger.js +51 -23
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/utils/ClassNameConfigurator.js +21 -10
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/utils/areArraysEqual.js +6 -3
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/utils/combineHooksSlotProps.js +14 -10
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/utils/isHostComponent.js +6 -3
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/utils/resolveComponentProps.js +9 -3
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/utils/useControllableReducer.js +91 -60
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/utils/useRootElementName.js +20 -12
- package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/utils/useTextNavigation.js +21 -10
- package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/HTMLElementType/HTMLElementType.js +16 -5
- package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/appendOwnerState/appendOwnerState.js +13 -7
- package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/chainPropTypes/chainPropTypes.js +11 -5
- package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/clamp/clamp.js +6 -3
- package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/composeClasses/composeClasses.js +19 -11
- package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/exactProp/exactProp.js +17 -8
- package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/extractEventHandlers/extractEventHandlers.js +12 -7
- package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/generateUtilityClass/generateUtilityClass.js +2 -2
- package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/getReactNodeRef/getReactNodeRef.js +11 -5
- package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/isFocusVisible/isFocusVisible.js +11 -7
- package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/isHostComponent/isHostComponent.js +6 -3
- package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/mergeSlotProps/mergeSlotProps.js +61 -38
- package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/omitEventHandlers/omitEventHandlers.js +12 -7
- package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/ownerDocument/ownerDocument.js +6 -3
- package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/resolveComponentProps/resolveComponentProps.js +9 -3
- package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/setRef/setRef.js +10 -3
- package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/useControlled/useControlled.js +31 -22
- package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/useEnhancedEffect/useEnhancedEffect.js +3 -3
- package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/useEventCallback/useEventCallback.js +13 -9
- package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/useForkRef/useForkRef.js +17 -9
- package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/useId/useId.js +23 -14
- package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/useSlotProps/useSlotProps.js +30 -23
- package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/visuallyHidden/visuallyHidden.js +2 -2
- package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js +17 -13
- package/dist/node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.js +67 -38
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/checkPropTypes.js +55 -37
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithThrowingShims.js +56 -43
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithTypeCheckers.js +404 -243
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js +20 -14
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.js +12 -7
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/has.js +11 -4
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.js +170 -82
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js +91 -58
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +17 -7
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/components/button/Button.client.d.ts +3 -0
- package/dist/types/components/button/Button.d.ts +3 -3
- package/dist/types/components/button/Button.lazy.d.ts +3 -0
- package/dist/types/components/button/Button.server.d.ts +3 -0
- package/dist/types/components/button/index.d.ts +1 -1
- package/dist/types/components/form/FormResponse.d.ts +1 -1
- package/dist/types/components/headline/Headline.client.d.ts +3 -0
- package/dist/types/components/headline/Headline.model.d.ts +1 -0
- package/dist/types/components/headline/Headline.server.d.ts +3 -0
- package/dist/types/components/headline/Headline.variants.d.ts +2 -0
- package/dist/types/components/headline/index.d.ts +2 -1
- package/dist/types/components/label/Label.d.ts +1 -1
- package/dist/types/hooks/useHydrationReady.d.ts +5 -0
- package/dist/ui.css +9592 -1
- package/package.json +1 -1
- package/dist/components/headline/Headline.js +0 -71
- package/dist/types/components/headline/Headline.d.ts +0 -4
|
@@ -1,58 +1,87 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import useControlled from "../../../../../@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/useControlled/useControlled.js";
|
|
5
|
+
import useForkRef from "../../../../../@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/useForkRef/useForkRef.js";
|
|
6
|
+
import isFocusVisible from "../../../../../@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/isFocusVisible/isFocusVisible.js";
|
|
7
|
+
function useSwitch(props) {
|
|
6
8
|
const {
|
|
7
|
-
checked:
|
|
8
|
-
defaultChecked
|
|
9
|
-
disabled
|
|
10
|
-
onBlur
|
|
11
|
-
onChange
|
|
12
|
-
onFocus
|
|
13
|
-
onFocusVisible
|
|
14
|
-
readOnly
|
|
15
|
-
required
|
|
16
|
-
} =
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
checked: checkedProp,
|
|
10
|
+
defaultChecked,
|
|
11
|
+
disabled,
|
|
12
|
+
onBlur,
|
|
13
|
+
onChange,
|
|
14
|
+
onFocus,
|
|
15
|
+
onFocusVisible,
|
|
16
|
+
readOnly,
|
|
17
|
+
required
|
|
18
|
+
} = props;
|
|
19
|
+
const [checked, setCheckedState] = useControlled({
|
|
20
|
+
controlled: checkedProp,
|
|
21
|
+
default: Boolean(defaultChecked),
|
|
19
22
|
name: "Switch",
|
|
20
23
|
state: "checked"
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
});
|
|
25
|
+
const createHandleInputChange = /* @__PURE__ */ __name((otherProps) => (event) => {
|
|
26
|
+
var _a;
|
|
27
|
+
if (event.nativeEvent.defaultPrevented) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
setCheckedState(event.target.checked);
|
|
31
|
+
onChange == null ? void 0 : onChange(event);
|
|
32
|
+
(_a = otherProps.onChange) == null ? void 0 : _a.call(otherProps, event);
|
|
33
|
+
}, "createHandleInputChange");
|
|
34
|
+
const [focusVisible, setFocusVisible] = React.useState(false);
|
|
35
|
+
if (disabled && focusVisible) {
|
|
36
|
+
setFocusVisible(false);
|
|
37
|
+
}
|
|
38
|
+
const inputRef = React.useRef(null);
|
|
39
|
+
const createHandleFocus = /* @__PURE__ */ __name((otherProps) => (event) => {
|
|
40
|
+
var _a;
|
|
41
|
+
if (!inputRef.current) {
|
|
42
|
+
inputRef.current = event.currentTarget;
|
|
43
|
+
}
|
|
44
|
+
if (isFocusVisible(event.target)) {
|
|
45
|
+
setFocusVisible(true);
|
|
46
|
+
onFocusVisible == null ? void 0 : onFocusVisible(event);
|
|
47
|
+
}
|
|
48
|
+
onFocus == null ? void 0 : onFocus(event);
|
|
49
|
+
(_a = otherProps.onFocus) == null ? void 0 : _a.call(otherProps, event);
|
|
50
|
+
}, "createHandleFocus");
|
|
51
|
+
const createHandleBlur = /* @__PURE__ */ __name((otherProps) => (event) => {
|
|
52
|
+
var _a;
|
|
53
|
+
if (!isFocusVisible(event.target)) {
|
|
54
|
+
setFocusVisible(false);
|
|
55
|
+
}
|
|
56
|
+
onBlur == null ? void 0 : onBlur(event);
|
|
57
|
+
(_a = otherProps.onBlur) == null ? void 0 : _a.call(otherProps, event);
|
|
58
|
+
}, "createHandleBlur");
|
|
59
|
+
const handleInputRef = useForkRef(inputRef);
|
|
60
|
+
const getInputProps = /* @__PURE__ */ __name((otherProps = {}) => ({
|
|
61
|
+
checked: checkedProp,
|
|
62
|
+
defaultChecked,
|
|
63
|
+
disabled,
|
|
64
|
+
readOnly,
|
|
65
|
+
ref: handleInputRef,
|
|
66
|
+
required,
|
|
67
|
+
type: "checkbox",
|
|
68
|
+
role: "switch",
|
|
69
|
+
"aria-checked": checkedProp,
|
|
70
|
+
...otherProps,
|
|
71
|
+
onChange: createHandleInputChange(otherProps),
|
|
72
|
+
onFocus: createHandleFocus(otherProps),
|
|
73
|
+
onBlur: createHandleBlur(otherProps)
|
|
74
|
+
}), "getInputProps");
|
|
33
75
|
return {
|
|
34
|
-
checked
|
|
35
|
-
disabled:
|
|
36
|
-
focusVisible
|
|
37
|
-
getInputProps
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
disabled: n,
|
|
41
|
-
readOnly: k,
|
|
42
|
-
ref: m,
|
|
43
|
-
required: B,
|
|
44
|
-
type: "checkbox",
|
|
45
|
-
role: "switch",
|
|
46
|
-
"aria-checked": a,
|
|
47
|
-
...e,
|
|
48
|
-
onChange: I(e),
|
|
49
|
-
onFocus: S(e),
|
|
50
|
-
onBlur: w(e)
|
|
51
|
-
}),
|
|
52
|
-
inputRef: m,
|
|
53
|
-
readOnly: !!k
|
|
76
|
+
checked,
|
|
77
|
+
disabled: Boolean(disabled),
|
|
78
|
+
focusVisible,
|
|
79
|
+
getInputProps,
|
|
80
|
+
inputRef: handleInputRef,
|
|
81
|
+
readOnly: Boolean(readOnly)
|
|
54
82
|
};
|
|
55
83
|
}
|
|
84
|
+
__name(useSwitch, "useSwitch");
|
|
56
85
|
export {
|
|
57
|
-
|
|
86
|
+
useSwitch
|
|
58
87
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
const
|
|
3
|
-
process.env.NODE_ENV !== "production"
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
const TransitionContext = /* @__PURE__ */ React.createContext(null);
|
|
3
|
+
if (process.env.NODE_ENV !== "production") {
|
|
4
|
+
TransitionContext.displayName = "TransitionContext";
|
|
5
|
+
}
|
|
4
6
|
export {
|
|
5
|
-
|
|
7
|
+
TransitionContext
|
|
6
8
|
};
|
|
@@ -1,27 +1,55 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
function useTransitionTrigger(requestEnter) {
|
|
5
|
+
const [exitTransitionFinished, setExitTransitionFinished] = React.useState(true);
|
|
6
|
+
const hasPendingExitTransition = React.useRef(false);
|
|
7
|
+
const registeredTransitions = React.useRef(0);
|
|
8
|
+
const [hasTransition, setHasTransition] = React.useState(false);
|
|
9
|
+
const previousRequestEnter = React.useRef(requestEnter);
|
|
10
|
+
React.useEffect(() => {
|
|
11
|
+
if (!requestEnter && // checking registeredTransitions.current instead of hasTransition to avoid this effect re-firing whenever hasTransition changes
|
|
12
|
+
registeredTransitions.current > 0 && // prevents waiting for a pending transition right after mounting
|
|
13
|
+
previousRequestEnter.current !== requestEnter) {
|
|
14
|
+
hasPendingExitTransition.current = true;
|
|
15
|
+
setExitTransitionFinished(false);
|
|
16
|
+
}
|
|
17
|
+
previousRequestEnter.current = requestEnter;
|
|
18
|
+
}, [requestEnter]);
|
|
19
|
+
const handleExited = React.useCallback(() => {
|
|
20
|
+
hasPendingExitTransition.current = false;
|
|
21
|
+
setExitTransitionFinished(true);
|
|
22
|
+
}, []);
|
|
23
|
+
const registerTransition = React.useCallback(() => {
|
|
24
|
+
registeredTransitions.current += 1;
|
|
25
|
+
setHasTransition(true);
|
|
26
|
+
return () => {
|
|
27
|
+
registeredTransitions.current -= 1;
|
|
28
|
+
if (registeredTransitions.current === 0) {
|
|
29
|
+
setHasTransition(false);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
}, []);
|
|
33
|
+
let hasExited;
|
|
34
|
+
if (!hasTransition) {
|
|
35
|
+
hasExited = !requestEnter;
|
|
36
|
+
} else if (requestEnter) {
|
|
37
|
+
hasExited = false;
|
|
38
|
+
} else {
|
|
39
|
+
hasExited = !hasPendingExitTransition.current && exitTransitionFinished;
|
|
40
|
+
}
|
|
41
|
+
const contextValue = React.useMemo(() => ({
|
|
42
|
+
requestedEnter: requestEnter,
|
|
43
|
+
onExited: handleExited,
|
|
44
|
+
registerTransition,
|
|
45
|
+
hasExited
|
|
46
|
+
}), [handleExited, requestEnter, registerTransition, hasExited]);
|
|
47
|
+
return {
|
|
48
|
+
contextValue,
|
|
49
|
+
hasExited
|
|
23
50
|
};
|
|
24
51
|
}
|
|
52
|
+
__name(useTransitionTrigger, "useTransitionTrigger");
|
|
25
53
|
export {
|
|
26
|
-
|
|
54
|
+
useTransitionTrigger
|
|
27
55
|
};
|
|
@@ -1,14 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
const defaultContextValue = {
|
|
5
|
+
disableDefaultClasses: false
|
|
6
|
+
};
|
|
7
|
+
const ClassNameConfiguratorContext = /* @__PURE__ */ React.createContext(defaultContextValue);
|
|
8
|
+
if (process.env.NODE_ENV !== "production") {
|
|
9
|
+
ClassNameConfiguratorContext.displayName = "ClassNameConfiguratorContext";
|
|
10
|
+
}
|
|
11
|
+
function useClassNamesOverride(generateUtilityClass) {
|
|
7
12
|
const {
|
|
8
|
-
disableDefaultClasses
|
|
9
|
-
} =
|
|
10
|
-
return (
|
|
13
|
+
disableDefaultClasses
|
|
14
|
+
} = React.useContext(ClassNameConfiguratorContext);
|
|
15
|
+
return (slot) => {
|
|
16
|
+
if (disableDefaultClasses) {
|
|
17
|
+
return "";
|
|
18
|
+
}
|
|
19
|
+
return generateUtilityClass(slot);
|
|
20
|
+
};
|
|
11
21
|
}
|
|
22
|
+
__name(useClassNamesOverride, "useClassNamesOverride");
|
|
12
23
|
export {
|
|
13
|
-
|
|
24
|
+
useClassNamesOverride
|
|
14
25
|
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
function areArraysEqual(array1, array2, itemComparer = (a, b) => a === b) {
|
|
4
|
+
return array1.length === array2.length && array1.every((value, index) => itemComparer(value, array2[index]));
|
|
3
5
|
}
|
|
6
|
+
__name(areArraysEqual, "areArraysEqual");
|
|
4
7
|
export {
|
|
5
|
-
|
|
8
|
+
areArraysEqual
|
|
6
9
|
};
|
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
function combineHooksSlotProps(getFirstProps, getSecondProps) {
|
|
4
|
+
return /* @__PURE__ */ __name(function getCombinedProps(external = {}) {
|
|
5
|
+
const firstResult = {
|
|
6
|
+
...external,
|
|
7
|
+
...getFirstProps(external)
|
|
6
8
|
};
|
|
7
|
-
|
|
8
|
-
...
|
|
9
|
-
...
|
|
9
|
+
const result = {
|
|
10
|
+
...firstResult,
|
|
11
|
+
...getSecondProps(firstResult)
|
|
10
12
|
};
|
|
11
|
-
|
|
13
|
+
return result;
|
|
14
|
+
}, "getCombinedProps");
|
|
12
15
|
}
|
|
16
|
+
__name(combineHooksSlotProps, "combineHooksSlotProps");
|
|
13
17
|
export {
|
|
14
|
-
|
|
18
|
+
combineHooksSlotProps
|
|
15
19
|
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
function isHostComponent(element) {
|
|
4
|
+
return typeof element === "string";
|
|
3
5
|
}
|
|
6
|
+
__name(isHostComponent, "isHostComponent");
|
|
4
7
|
export {
|
|
5
|
-
|
|
8
|
+
isHostComponent
|
|
6
9
|
};
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
function resolveComponentProps(componentProps, ownerState, slotState) {
|
|
4
|
+
if (typeof componentProps === "function") {
|
|
5
|
+
return componentProps(ownerState, slotState);
|
|
6
|
+
}
|
|
7
|
+
return componentProps;
|
|
3
8
|
}
|
|
9
|
+
__name(resolveComponentProps, "resolveComponentProps");
|
|
4
10
|
export {
|
|
5
|
-
|
|
11
|
+
resolveComponentProps
|
|
6
12
|
};
|
|
@@ -1,70 +1,101 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
function areEqual(a, b) {
|
|
5
|
+
return a === b;
|
|
4
6
|
}
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
__name(areEqual, "areEqual");
|
|
8
|
+
const EMPTY_OBJECT = {};
|
|
9
|
+
const NOOP = /* @__PURE__ */ __name(() => {
|
|
10
|
+
}, "NOOP");
|
|
11
|
+
function getControlledState(internalState, controlledProps) {
|
|
12
|
+
const augmentedState = {
|
|
13
|
+
...internalState
|
|
10
14
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
15
|
+
Object.keys(controlledProps).forEach((key) => {
|
|
16
|
+
if (controlledProps[key] !== void 0) {
|
|
17
|
+
augmentedState[key] = controlledProps[key];
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
return augmentedState;
|
|
14
21
|
}
|
|
15
|
-
|
|
22
|
+
__name(getControlledState, "getControlledState");
|
|
23
|
+
function useStateChangeDetection(parameters) {
|
|
16
24
|
const {
|
|
17
|
-
nextState
|
|
18
|
-
initialState
|
|
19
|
-
stateComparers
|
|
20
|
-
onStateChange
|
|
21
|
-
controlledProps
|
|
22
|
-
lastActionRef
|
|
23
|
-
} =
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
nextState,
|
|
26
|
+
initialState,
|
|
27
|
+
stateComparers,
|
|
28
|
+
onStateChange,
|
|
29
|
+
controlledProps,
|
|
30
|
+
lastActionRef
|
|
31
|
+
} = parameters;
|
|
32
|
+
const internalPreviousStateRef = React.useRef(initialState);
|
|
33
|
+
React.useEffect(() => {
|
|
34
|
+
if (lastActionRef.current === null) {
|
|
26
35
|
return;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
reducer: l,
|
|
37
|
-
initialState: o,
|
|
38
|
-
controlledProps: t = S,
|
|
39
|
-
stateComparers: p = S,
|
|
40
|
-
onStateChange: s = R,
|
|
41
|
-
actionContext: f,
|
|
42
|
-
componentName: a = ""
|
|
43
|
-
} = u, i = c.useRef(t);
|
|
44
|
-
process.env.NODE_ENV !== "production" && c.useEffect(() => {
|
|
45
|
-
Object.keys(t).forEach((n) => {
|
|
46
|
-
i.current[n] !== void 0 && t[n] === void 0 && console.error(`useControllableReducer: ${a ? `The ${a} component` : "A component"} is changing a controlled prop to be uncontrolled: ${n}`), i.current[n] === void 0 && t[n] !== void 0 && console.error(`useControllableReducer: ${a ? `The ${a} component` : "A component"} is changing an uncontrolled prop to be controlled: ${n}`);
|
|
36
|
+
}
|
|
37
|
+
const previousState = getControlledState(internalPreviousStateRef.current, controlledProps);
|
|
38
|
+
Object.keys(nextState).forEach((key) => {
|
|
39
|
+
const stateComparer = stateComparers[key] ?? areEqual;
|
|
40
|
+
const nextStateItem = nextState[key];
|
|
41
|
+
const previousStateItem = previousState[key];
|
|
42
|
+
if (previousStateItem == null && nextStateItem != null || previousStateItem != null && nextStateItem == null || previousStateItem != null && nextStateItem != null && !stateComparer(nextStateItem, previousStateItem)) {
|
|
43
|
+
onStateChange == null ? void 0 : onStateChange(lastActionRef.current.event ?? null, key, nextStateItem, lastActionRef.current.type ?? "", nextState);
|
|
44
|
+
}
|
|
47
45
|
});
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
46
|
+
internalPreviousStateRef.current = nextState;
|
|
47
|
+
lastActionRef.current = null;
|
|
48
|
+
}, [internalPreviousStateRef, nextState, lastActionRef, onStateChange, stateComparers, controlledProps]);
|
|
49
|
+
}
|
|
50
|
+
__name(useStateChangeDetection, "useStateChangeDetection");
|
|
51
|
+
function useControllableReducer(parameters) {
|
|
52
|
+
const lastActionRef = React.useRef(null);
|
|
53
|
+
const {
|
|
54
|
+
reducer,
|
|
55
|
+
initialState,
|
|
56
|
+
controlledProps = EMPTY_OBJECT,
|
|
57
|
+
stateComparers = EMPTY_OBJECT,
|
|
58
|
+
onStateChange = NOOP,
|
|
59
|
+
actionContext,
|
|
60
|
+
componentName = ""
|
|
61
|
+
} = parameters;
|
|
62
|
+
const controlledPropsRef = React.useRef(controlledProps);
|
|
63
|
+
if (process.env.NODE_ENV !== "production") {
|
|
64
|
+
React.useEffect(() => {
|
|
65
|
+
Object.keys(controlledProps).forEach((key) => {
|
|
66
|
+
if (controlledPropsRef.current[key] !== void 0 && controlledProps[key] === void 0) {
|
|
67
|
+
console.error(`useControllableReducer: ${componentName ? `The ${componentName} component` : "A component"} is changing a controlled prop to be uncontrolled: ${key}`);
|
|
68
|
+
}
|
|
69
|
+
if (controlledPropsRef.current[key] === void 0 && controlledProps[key] !== void 0) {
|
|
70
|
+
console.error(`useControllableReducer: ${componentName ? `The ${componentName} component` : "A component"} is changing an uncontrolled prop to be controlled: ${key}`);
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}, [controlledProps, componentName]);
|
|
74
|
+
}
|
|
75
|
+
const reducerWithControlledState = React.useCallback((state, action) => {
|
|
76
|
+
lastActionRef.current = action;
|
|
77
|
+
const controlledState = getControlledState(state, controlledProps);
|
|
78
|
+
const newState = reducer(controlledState, action);
|
|
79
|
+
return newState;
|
|
80
|
+
}, [controlledProps, reducer]);
|
|
81
|
+
const [nextState, dispatch] = React.useReducer(reducerWithControlledState, initialState);
|
|
82
|
+
const dispatchWithContext = React.useCallback((action) => {
|
|
83
|
+
dispatch({
|
|
84
|
+
...action,
|
|
85
|
+
context: actionContext
|
|
57
86
|
});
|
|
58
|
-
}, [
|
|
59
|
-
|
|
60
|
-
nextState
|
|
61
|
-
initialState
|
|
62
|
-
stateComparers:
|
|
63
|
-
onStateChange:
|
|
64
|
-
controlledProps
|
|
65
|
-
lastActionRef
|
|
66
|
-
})
|
|
87
|
+
}, [actionContext]);
|
|
88
|
+
useStateChangeDetection({
|
|
89
|
+
nextState,
|
|
90
|
+
initialState,
|
|
91
|
+
stateComparers: stateComparers ?? EMPTY_OBJECT,
|
|
92
|
+
onStateChange: onStateChange ?? NOOP,
|
|
93
|
+
controlledProps,
|
|
94
|
+
lastActionRef
|
|
95
|
+
});
|
|
96
|
+
return [getControlledState(nextState, controlledProps), dispatchWithContext];
|
|
67
97
|
}
|
|
98
|
+
__name(useControllableReducer, "useControllableReducer");
|
|
68
99
|
export {
|
|
69
|
-
|
|
100
|
+
useControllableReducer
|
|
70
101
|
};
|
|
@@ -1,17 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
function useRootElementName(parameters) {
|
|
3
5
|
const {
|
|
4
|
-
rootElementName:
|
|
5
|
-
componentName
|
|
6
|
-
} =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
rootElementName: rootElementNameProp = "",
|
|
7
|
+
componentName
|
|
8
|
+
} = parameters;
|
|
9
|
+
const [rootElementName, setRootElementName] = React.useState(rootElementNameProp.toUpperCase());
|
|
10
|
+
if (process.env.NODE_ENV !== "production") {
|
|
11
|
+
React.useEffect(() => {
|
|
12
|
+
if (rootElementNameProp && rootElementName !== rootElementNameProp.toUpperCase()) {
|
|
13
|
+
console.error(`useRootElementName: the \`rootElementName\` prop of ${componentName ? `the ${componentName} component` : "a component"} expected the '${rootElementNameProp}' element, but a '${rootElementName.toLowerCase()}' was rendered instead`, "This may cause hydration issues in an SSR context, for example in a Next.js app");
|
|
14
|
+
}
|
|
15
|
+
}, [rootElementNameProp, rootElementName, componentName]);
|
|
16
|
+
}
|
|
17
|
+
const updateRootElementName = React.useCallback((instance) => {
|
|
18
|
+
setRootElementName((instance == null ? void 0 : instance.tagName) ?? "");
|
|
12
19
|
}, []);
|
|
13
|
-
return [
|
|
20
|
+
return [rootElementName, updateRootElementName];
|
|
14
21
|
}
|
|
22
|
+
__name(useRootElementName, "useRootElementName");
|
|
15
23
|
export {
|
|
16
|
-
|
|
24
|
+
useRootElementName
|
|
17
25
|
};
|
|
@@ -1,17 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
const TEXT_NAVIGATION_RESET_TIMEOUT = 500;
|
|
5
|
+
function useTextNavigation(callback) {
|
|
6
|
+
const textCriteriaRef = React.useRef({
|
|
5
7
|
searchString: "",
|
|
6
8
|
lastTime: null
|
|
7
9
|
});
|
|
8
|
-
return
|
|
9
|
-
if (
|
|
10
|
-
const
|
|
11
|
-
|
|
10
|
+
return React.useCallback((event) => {
|
|
11
|
+
if (event.key.length === 1 && event.key !== " ") {
|
|
12
|
+
const textCriteria = textCriteriaRef.current;
|
|
13
|
+
const lowerKey = event.key.toLowerCase();
|
|
14
|
+
const currentTime = performance.now();
|
|
15
|
+
if (textCriteria.searchString.length > 0 && textCriteria.lastTime && currentTime - textCriteria.lastTime > TEXT_NAVIGATION_RESET_TIMEOUT) {
|
|
16
|
+
textCriteria.searchString = lowerKey;
|
|
17
|
+
} else if (textCriteria.searchString.length !== 1 || lowerKey !== textCriteria.searchString) {
|
|
18
|
+
textCriteria.searchString += lowerKey;
|
|
19
|
+
}
|
|
20
|
+
textCriteria.lastTime = currentTime;
|
|
21
|
+
callback(textCriteria.searchString, event);
|
|
12
22
|
}
|
|
13
|
-
}, [
|
|
23
|
+
}, [callback]);
|
|
14
24
|
}
|
|
25
|
+
__name(useTextNavigation, "useTextNavigation");
|
|
15
26
|
export {
|
|
16
|
-
|
|
27
|
+
useTextNavigation
|
|
17
28
|
};
|
|
@@ -1,9 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
function HTMLElementType(props, propName, componentName, location, propFullName) {
|
|
4
|
+
if (process.env.NODE_ENV === "production") {
|
|
3
5
|
return null;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
+
}
|
|
7
|
+
const propValue = props[propName];
|
|
8
|
+
const safePropName = propFullName || propName;
|
|
9
|
+
if (propValue == null) {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
if (propValue && propValue.nodeType !== 1) {
|
|
13
|
+
return new Error(`Invalid ${location} \`${safePropName}\` supplied to \`${componentName}\`. Expected an HTMLElement.`);
|
|
14
|
+
}
|
|
15
|
+
return null;
|
|
6
16
|
}
|
|
17
|
+
__name(HTMLElementType, "HTMLElementType");
|
|
7
18
|
export {
|
|
8
|
-
|
|
19
|
+
HTMLElementType as default
|
|
9
20
|
};
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import isHostComponent from "../isHostComponent/isHostComponent.js";
|
|
4
|
+
function appendOwnerState(elementType, otherProps, ownerState) {
|
|
5
|
+
if (elementType === void 0 || isHostComponent(elementType)) {
|
|
6
|
+
return otherProps;
|
|
7
|
+
}
|
|
8
|
+
return {
|
|
9
|
+
...otherProps,
|
|
5
10
|
ownerState: {
|
|
6
|
-
...
|
|
7
|
-
...
|
|
11
|
+
...otherProps.ownerState,
|
|
12
|
+
...ownerState
|
|
8
13
|
}
|
|
9
14
|
};
|
|
10
15
|
}
|
|
16
|
+
__name(appendOwnerState, "appendOwnerState");
|
|
11
17
|
export {
|
|
12
|
-
|
|
18
|
+
appendOwnerState as default
|
|
13
19
|
};
|