@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,353 +1,456 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import { evaluate, getSide, getSideAxis, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, getAlignmentSides, clamp, getAlignment, getPaddingObject, rectToClientRect, getOppositeAxis, getAlignmentAxis, getAxisLength } from "../../../../../@floating-ui_utils@0.2.9/node_modules/@floating-ui/utils/dist/floating-ui.utils.js";
|
|
4
|
+
function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
3
5
|
let {
|
|
4
|
-
reference
|
|
5
|
-
floating
|
|
6
|
-
} =
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
reference,
|
|
7
|
+
floating
|
|
8
|
+
} = _ref;
|
|
9
|
+
const sideAxis = getSideAxis(placement);
|
|
10
|
+
const alignmentAxis = getAlignmentAxis(placement);
|
|
11
|
+
const alignLength = getAxisLength(alignmentAxis);
|
|
12
|
+
const side = getSide(placement);
|
|
13
|
+
const isVertical = sideAxis === "y";
|
|
14
|
+
const commonX = reference.x + reference.width / 2 - floating.width / 2;
|
|
15
|
+
const commonY = reference.y + reference.height / 2 - floating.height / 2;
|
|
16
|
+
const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
|
|
17
|
+
let coords;
|
|
18
|
+
switch (side) {
|
|
10
19
|
case "top":
|
|
11
|
-
|
|
12
|
-
x:
|
|
13
|
-
y:
|
|
20
|
+
coords = {
|
|
21
|
+
x: commonX,
|
|
22
|
+
y: reference.y - floating.height
|
|
14
23
|
};
|
|
15
24
|
break;
|
|
16
25
|
case "bottom":
|
|
17
|
-
|
|
18
|
-
x:
|
|
19
|
-
y:
|
|
26
|
+
coords = {
|
|
27
|
+
x: commonX,
|
|
28
|
+
y: reference.y + reference.height
|
|
20
29
|
};
|
|
21
30
|
break;
|
|
22
31
|
case "right":
|
|
23
|
-
|
|
24
|
-
x:
|
|
25
|
-
y:
|
|
32
|
+
coords = {
|
|
33
|
+
x: reference.x + reference.width,
|
|
34
|
+
y: commonY
|
|
26
35
|
};
|
|
27
36
|
break;
|
|
28
37
|
case "left":
|
|
29
|
-
|
|
30
|
-
x:
|
|
31
|
-
y:
|
|
38
|
+
coords = {
|
|
39
|
+
x: reference.x - floating.width,
|
|
40
|
+
y: commonY
|
|
32
41
|
};
|
|
33
42
|
break;
|
|
34
43
|
default:
|
|
35
|
-
|
|
36
|
-
x:
|
|
37
|
-
y:
|
|
44
|
+
coords = {
|
|
45
|
+
x: reference.x,
|
|
46
|
+
y: reference.y
|
|
38
47
|
};
|
|
39
48
|
}
|
|
40
|
-
switch (
|
|
49
|
+
switch (getAlignment(placement)) {
|
|
41
50
|
case "start":
|
|
42
|
-
|
|
51
|
+
coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
|
|
43
52
|
break;
|
|
44
53
|
case "end":
|
|
45
|
-
|
|
54
|
+
coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
|
|
46
55
|
break;
|
|
47
56
|
}
|
|
48
|
-
return
|
|
57
|
+
return coords;
|
|
49
58
|
}
|
|
50
|
-
|
|
59
|
+
__name(computeCoordsFromPlacement, "computeCoordsFromPlacement");
|
|
60
|
+
const computePosition = /* @__PURE__ */ __name(async (reference, floating, config) => {
|
|
51
61
|
const {
|
|
52
|
-
placement
|
|
53
|
-
strategy
|
|
54
|
-
middleware
|
|
55
|
-
platform
|
|
56
|
-
} =
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
placement = "bottom",
|
|
63
|
+
strategy = "absolute",
|
|
64
|
+
middleware = [],
|
|
65
|
+
platform
|
|
66
|
+
} = config;
|
|
67
|
+
const validMiddleware = middleware.filter(Boolean);
|
|
68
|
+
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
|
|
69
|
+
let rects = await platform.getElementRects({
|
|
70
|
+
reference,
|
|
71
|
+
floating,
|
|
72
|
+
strategy
|
|
73
|
+
});
|
|
74
|
+
let {
|
|
75
|
+
x,
|
|
76
|
+
y
|
|
77
|
+
} = computeCoordsFromPlacement(rects, placement, rtl);
|
|
78
|
+
let statefulPlacement = placement;
|
|
79
|
+
let middlewareData = {};
|
|
80
|
+
let resetCount = 0;
|
|
81
|
+
for (let i = 0; i < validMiddleware.length; i++) {
|
|
82
|
+
const {
|
|
83
|
+
name,
|
|
84
|
+
fn
|
|
85
|
+
} = validMiddleware[i];
|
|
66
86
|
const {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
middlewareData: i,
|
|
81
|
-
rects: u,
|
|
82
|
-
platform: c,
|
|
87
|
+
x: nextX,
|
|
88
|
+
y: nextY,
|
|
89
|
+
data,
|
|
90
|
+
reset
|
|
91
|
+
} = await fn({
|
|
92
|
+
x,
|
|
93
|
+
y,
|
|
94
|
+
initialPlacement: placement,
|
|
95
|
+
placement: statefulPlacement,
|
|
96
|
+
strategy,
|
|
97
|
+
middlewareData,
|
|
98
|
+
rects,
|
|
99
|
+
platform,
|
|
83
100
|
elements: {
|
|
84
|
-
reference
|
|
85
|
-
floating
|
|
101
|
+
reference,
|
|
102
|
+
floating
|
|
86
103
|
}
|
|
87
104
|
});
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
105
|
+
x = nextX != null ? nextX : x;
|
|
106
|
+
y = nextY != null ? nextY : y;
|
|
107
|
+
middlewareData = {
|
|
108
|
+
...middlewareData,
|
|
109
|
+
[name]: {
|
|
110
|
+
...middlewareData[name],
|
|
111
|
+
...data
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
if (reset && resetCount <= 50) {
|
|
115
|
+
resetCount++;
|
|
116
|
+
if (typeof reset === "object") {
|
|
117
|
+
if (reset.placement) {
|
|
118
|
+
statefulPlacement = reset.placement;
|
|
119
|
+
}
|
|
120
|
+
if (reset.rects) {
|
|
121
|
+
rects = reset.rects === true ? await platform.getElementRects({
|
|
122
|
+
reference,
|
|
123
|
+
floating,
|
|
124
|
+
strategy
|
|
125
|
+
}) : reset.rects;
|
|
126
|
+
}
|
|
127
|
+
({
|
|
128
|
+
x,
|
|
129
|
+
y
|
|
130
|
+
} = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
|
|
93
131
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
floating: s,
|
|
97
|
-
strategy: a
|
|
98
|
-
}) : g.rects), {
|
|
99
|
-
x: m,
|
|
100
|
-
y: n
|
|
101
|
-
} = $(u, r, x)), y = -1);
|
|
132
|
+
i = -1;
|
|
133
|
+
}
|
|
102
134
|
}
|
|
103
135
|
return {
|
|
104
|
-
x
|
|
105
|
-
y
|
|
106
|
-
placement:
|
|
107
|
-
strategy
|
|
108
|
-
middlewareData
|
|
136
|
+
x,
|
|
137
|
+
y,
|
|
138
|
+
placement: statefulPlacement,
|
|
139
|
+
strategy,
|
|
140
|
+
middlewareData
|
|
109
141
|
};
|
|
110
|
-
};
|
|
111
|
-
async function
|
|
112
|
-
var
|
|
113
|
-
|
|
142
|
+
}, "computePosition");
|
|
143
|
+
async function detectOverflow(state, options) {
|
|
144
|
+
var _await$platform$isEle;
|
|
145
|
+
if (options === void 0) {
|
|
146
|
+
options = {};
|
|
147
|
+
}
|
|
148
|
+
const {
|
|
149
|
+
x,
|
|
150
|
+
y,
|
|
151
|
+
platform,
|
|
152
|
+
rects,
|
|
153
|
+
elements,
|
|
154
|
+
strategy
|
|
155
|
+
} = state;
|
|
114
156
|
const {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
157
|
+
boundary = "clippingAncestors",
|
|
158
|
+
rootBoundary = "viewport",
|
|
159
|
+
elementContext = "floating",
|
|
160
|
+
altBoundary = false,
|
|
161
|
+
padding = 0
|
|
162
|
+
} = evaluate(options, state);
|
|
163
|
+
const paddingObject = getPaddingObject(padding);
|
|
164
|
+
const altContext = elementContext === "floating" ? "reference" : "floating";
|
|
165
|
+
const element = elements[altBoundary ? altContext : elementContext];
|
|
166
|
+
const clippingClientRect = rectToClientRect(await platform.getClippingRect({
|
|
167
|
+
element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating)),
|
|
168
|
+
boundary,
|
|
169
|
+
rootBoundary,
|
|
170
|
+
strategy
|
|
171
|
+
}));
|
|
172
|
+
const rect = elementContext === "floating" ? {
|
|
173
|
+
x,
|
|
174
|
+
y,
|
|
175
|
+
width: rects.floating.width,
|
|
176
|
+
height: rects.floating.height
|
|
177
|
+
} : rects.reference;
|
|
178
|
+
const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
|
|
179
|
+
const offsetScale = await (platform.isElement == null ? void 0 : platform.isElement(offsetParent)) ? await (platform.getScale == null ? void 0 : platform.getScale(offsetParent)) || {
|
|
138
180
|
x: 1,
|
|
139
181
|
y: 1
|
|
140
182
|
} : {
|
|
141
183
|
x: 1,
|
|
142
184
|
y: 1
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
185
|
+
};
|
|
186
|
+
const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
187
|
+
elements,
|
|
188
|
+
rect,
|
|
189
|
+
offsetParent,
|
|
190
|
+
strategy
|
|
191
|
+
}) : rect);
|
|
149
192
|
return {
|
|
150
|
-
top: (
|
|
151
|
-
bottom: (
|
|
152
|
-
left: (
|
|
153
|
-
right: (
|
|
193
|
+
top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
|
|
194
|
+
bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
|
|
195
|
+
left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
|
|
196
|
+
right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
|
|
154
197
|
};
|
|
155
198
|
}
|
|
156
|
-
|
|
157
|
-
|
|
199
|
+
__name(detectOverflow, "detectOverflow");
|
|
200
|
+
const flip = /* @__PURE__ */ __name(function(options) {
|
|
201
|
+
if (options === void 0) {
|
|
202
|
+
options = {};
|
|
203
|
+
}
|
|
204
|
+
return {
|
|
158
205
|
name: "flip",
|
|
159
|
-
options
|
|
160
|
-
async fn(
|
|
161
|
-
var
|
|
206
|
+
options,
|
|
207
|
+
async fn(state) {
|
|
208
|
+
var _middlewareData$arrow, _middlewareData$flip;
|
|
209
|
+
const {
|
|
210
|
+
placement,
|
|
211
|
+
middlewareData,
|
|
212
|
+
rects,
|
|
213
|
+
initialPlacement,
|
|
214
|
+
platform,
|
|
215
|
+
elements
|
|
216
|
+
} = state;
|
|
162
217
|
const {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
fallbackPlacements: r,
|
|
173
|
-
fallbackStrategy: i = "bestFit",
|
|
174
|
-
fallbackAxisSideDirection: d = "none",
|
|
175
|
-
flipAlignment: y = !0,
|
|
176
|
-
...w
|
|
177
|
-
} = D(l, s);
|
|
178
|
-
if ((f = e.arrow) != null && f.alignmentOffset)
|
|
218
|
+
mainAxis: checkMainAxis = true,
|
|
219
|
+
crossAxis: checkCrossAxis = true,
|
|
220
|
+
fallbackPlacements: specifiedFallbackPlacements,
|
|
221
|
+
fallbackStrategy = "bestFit",
|
|
222
|
+
fallbackAxisSideDirection = "none",
|
|
223
|
+
flipAlignment = true,
|
|
224
|
+
...detectOverflowOptions
|
|
225
|
+
} = evaluate(options, state);
|
|
226
|
+
if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
179
227
|
return {};
|
|
180
|
-
const p = E(a), v = C(o), A = E(o) === o, b = await (x.isRTL == null ? void 0 : x.isRTL(u.floating)), g = r || (A || !y ? [H(o)] : J(o)), V = d !== "none";
|
|
181
|
-
!r && V && g.push(...K(o, y, d, b));
|
|
182
|
-
const z = [o, ...g], L = await q(s, w), T = [];
|
|
183
|
-
let O = ((t = e.flip) == null ? void 0 : t.overflows) || [];
|
|
184
|
-
if (m && T.push(L[p]), n) {
|
|
185
|
-
const k = N(a, c, b);
|
|
186
|
-
T.push(L[k[0]], L[k[1]]);
|
|
187
228
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
229
|
+
const side = getSide(placement);
|
|
230
|
+
const initialSideAxis = getSideAxis(initialPlacement);
|
|
231
|
+
const isBasePlacement = getSide(initialPlacement) === initialPlacement;
|
|
232
|
+
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
233
|
+
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
|
|
234
|
+
const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
|
|
235
|
+
if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
|
|
236
|
+
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
237
|
+
}
|
|
238
|
+
const placements = [initialPlacement, ...fallbackPlacements];
|
|
239
|
+
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
240
|
+
const overflows = [];
|
|
241
|
+
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
|
242
|
+
if (checkMainAxis) {
|
|
243
|
+
overflows.push(overflow[side]);
|
|
244
|
+
}
|
|
245
|
+
if (checkCrossAxis) {
|
|
246
|
+
const sides = getAlignmentSides(placement, rects, rtl);
|
|
247
|
+
overflows.push(overflow[sides[0]], overflow[sides[1]]);
|
|
248
|
+
}
|
|
249
|
+
overflowsData = [...overflowsData, {
|
|
250
|
+
placement,
|
|
251
|
+
overflows
|
|
252
|
+
}];
|
|
253
|
+
if (!overflows.every((side2) => side2 <= 0)) {
|
|
254
|
+
var _middlewareData$flip2, _overflowsData$filter;
|
|
255
|
+
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
256
|
+
const nextPlacement = placements[nextIndex];
|
|
257
|
+
if (nextPlacement) {
|
|
258
|
+
var _overflowsData$;
|
|
259
|
+
const ignoreCrossAxisOverflow = checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false;
|
|
260
|
+
const hasInitialMainAxisOverflow = ((_overflowsData$ = overflowsData[0]) == null ? void 0 : _overflowsData$.overflows[0]) > 0;
|
|
261
|
+
if (!ignoreCrossAxisOverflow || hasInitialMainAxisOverflow) {
|
|
198
262
|
return {
|
|
199
263
|
data: {
|
|
200
|
-
index:
|
|
201
|
-
overflows:
|
|
264
|
+
index: nextIndex,
|
|
265
|
+
overflows: overflowsData
|
|
202
266
|
},
|
|
203
267
|
reset: {
|
|
204
|
-
placement:
|
|
268
|
+
placement: nextPlacement
|
|
205
269
|
}
|
|
206
270
|
};
|
|
271
|
+
}
|
|
207
272
|
}
|
|
208
|
-
let
|
|
209
|
-
if (!
|
|
210
|
-
switch (
|
|
273
|
+
let resetPlacement = (_overflowsData$filter = overflowsData.filter((d) => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
|
|
274
|
+
if (!resetPlacement) {
|
|
275
|
+
switch (fallbackStrategy) {
|
|
211
276
|
case "bestFit": {
|
|
212
|
-
var
|
|
213
|
-
const
|
|
214
|
-
if (
|
|
215
|
-
const
|
|
216
|
-
return
|
|
277
|
+
var _overflowsData$filter2;
|
|
278
|
+
const placement2 = (_overflowsData$filter2 = overflowsData.filter((d) => {
|
|
279
|
+
if (hasFallbackAxisSideDirection) {
|
|
280
|
+
const currentSideAxis = getSideAxis(d.placement);
|
|
281
|
+
return currentSideAxis === initialSideAxis || // Create a bias to the `y` side axis due to horizontal
|
|
217
282
|
// reading directions favoring greater width.
|
|
218
|
-
|
|
283
|
+
currentSideAxis === "y";
|
|
219
284
|
}
|
|
220
|
-
return
|
|
221
|
-
}).map((
|
|
222
|
-
|
|
285
|
+
return true;
|
|
286
|
+
}).map((d) => [d.placement, d.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
|
|
287
|
+
if (placement2) {
|
|
288
|
+
resetPlacement = placement2;
|
|
289
|
+
}
|
|
223
290
|
break;
|
|
224
291
|
}
|
|
225
292
|
case "initialPlacement":
|
|
226
|
-
|
|
293
|
+
resetPlacement = initialPlacement;
|
|
227
294
|
break;
|
|
228
295
|
}
|
|
229
|
-
|
|
296
|
+
}
|
|
297
|
+
if (placement !== resetPlacement) {
|
|
230
298
|
return {
|
|
231
299
|
reset: {
|
|
232
|
-
placement:
|
|
300
|
+
placement: resetPlacement
|
|
233
301
|
}
|
|
234
302
|
};
|
|
303
|
+
}
|
|
235
304
|
}
|
|
236
305
|
return {};
|
|
237
306
|
}
|
|
238
307
|
};
|
|
239
|
-
};
|
|
240
|
-
async function
|
|
308
|
+
}, "flip");
|
|
309
|
+
async function convertValueToCoords(state, options) {
|
|
241
310
|
const {
|
|
242
|
-
placement
|
|
243
|
-
platform
|
|
244
|
-
elements
|
|
245
|
-
} =
|
|
311
|
+
placement,
|
|
312
|
+
platform,
|
|
313
|
+
elements
|
|
314
|
+
} = state;
|
|
315
|
+
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
316
|
+
const side = getSide(placement);
|
|
317
|
+
const alignment = getAlignment(placement);
|
|
318
|
+
const isVertical = getSideAxis(placement) === "y";
|
|
319
|
+
const mainAxisMulti = ["left", "top"].includes(side) ? -1 : 1;
|
|
320
|
+
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
321
|
+
const rawValue = evaluate(options, state);
|
|
246
322
|
let {
|
|
247
|
-
mainAxis
|
|
248
|
-
crossAxis
|
|
249
|
-
alignmentAxis
|
|
250
|
-
} = typeof
|
|
251
|
-
mainAxis:
|
|
323
|
+
mainAxis,
|
|
324
|
+
crossAxis,
|
|
325
|
+
alignmentAxis
|
|
326
|
+
} = typeof rawValue === "number" ? {
|
|
327
|
+
mainAxis: rawValue,
|
|
252
328
|
crossAxis: 0,
|
|
253
329
|
alignmentAxis: null
|
|
254
330
|
} : {
|
|
255
|
-
mainAxis:
|
|
256
|
-
crossAxis:
|
|
257
|
-
alignmentAxis:
|
|
331
|
+
mainAxis: rawValue.mainAxis || 0,
|
|
332
|
+
crossAxis: rawValue.crossAxis || 0,
|
|
333
|
+
alignmentAxis: rawValue.alignmentAxis
|
|
258
334
|
};
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
335
|
+
if (alignment && typeof alignmentAxis === "number") {
|
|
336
|
+
crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
|
|
337
|
+
}
|
|
338
|
+
return isVertical ? {
|
|
339
|
+
x: crossAxis * crossAxisMulti,
|
|
340
|
+
y: mainAxis * mainAxisMulti
|
|
262
341
|
} : {
|
|
263
|
-
x:
|
|
264
|
-
y:
|
|
342
|
+
x: mainAxis * mainAxisMulti,
|
|
343
|
+
y: crossAxis * crossAxisMulti
|
|
265
344
|
};
|
|
266
345
|
}
|
|
267
|
-
|
|
268
|
-
|
|
346
|
+
__name(convertValueToCoords, "convertValueToCoords");
|
|
347
|
+
const offset = /* @__PURE__ */ __name(function(options) {
|
|
348
|
+
if (options === void 0) {
|
|
349
|
+
options = 0;
|
|
350
|
+
}
|
|
351
|
+
return {
|
|
269
352
|
name: "offset",
|
|
270
|
-
options
|
|
271
|
-
async fn(
|
|
272
|
-
var
|
|
353
|
+
options,
|
|
354
|
+
async fn(state) {
|
|
355
|
+
var _middlewareData$offse, _middlewareData$arrow;
|
|
273
356
|
const {
|
|
274
|
-
x
|
|
275
|
-
y
|
|
276
|
-
placement
|
|
277
|
-
middlewareData
|
|
278
|
-
} =
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
357
|
+
x,
|
|
358
|
+
y,
|
|
359
|
+
placement,
|
|
360
|
+
middlewareData
|
|
361
|
+
} = state;
|
|
362
|
+
const diffCoords = await convertValueToCoords(state, options);
|
|
363
|
+
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
364
|
+
return {};
|
|
365
|
+
}
|
|
366
|
+
return {
|
|
367
|
+
x: x + diffCoords.x,
|
|
368
|
+
y: y + diffCoords.y,
|
|
282
369
|
data: {
|
|
283
|
-
...
|
|
284
|
-
placement
|
|
370
|
+
...diffCoords,
|
|
371
|
+
placement
|
|
285
372
|
}
|
|
286
373
|
};
|
|
287
374
|
}
|
|
288
375
|
};
|
|
289
|
-
},
|
|
290
|
-
|
|
376
|
+
}, "offset");
|
|
377
|
+
const shift = /* @__PURE__ */ __name(function(options) {
|
|
378
|
+
if (options === void 0) {
|
|
379
|
+
options = {};
|
|
380
|
+
}
|
|
381
|
+
return {
|
|
291
382
|
name: "shift",
|
|
292
|
-
options
|
|
293
|
-
async fn(
|
|
383
|
+
options,
|
|
384
|
+
async fn(state) {
|
|
294
385
|
const {
|
|
295
|
-
x
|
|
296
|
-
y
|
|
297
|
-
placement
|
|
298
|
-
} =
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
386
|
+
x,
|
|
387
|
+
y,
|
|
388
|
+
placement
|
|
389
|
+
} = state;
|
|
390
|
+
const {
|
|
391
|
+
mainAxis: checkMainAxis = true,
|
|
392
|
+
crossAxis: checkCrossAxis = false,
|
|
393
|
+
limiter = {
|
|
394
|
+
fn: /* @__PURE__ */ __name((_ref) => {
|
|
303
395
|
let {
|
|
304
|
-
x:
|
|
305
|
-
y:
|
|
306
|
-
} =
|
|
396
|
+
x: x2,
|
|
397
|
+
y: y2
|
|
398
|
+
} = _ref;
|
|
307
399
|
return {
|
|
308
|
-
x:
|
|
309
|
-
y:
|
|
400
|
+
x: x2,
|
|
401
|
+
y: y2
|
|
310
402
|
};
|
|
311
|
-
}
|
|
403
|
+
}, "fn")
|
|
312
404
|
},
|
|
313
|
-
...
|
|
314
|
-
} =
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
405
|
+
...detectOverflowOptions
|
|
406
|
+
} = evaluate(options, state);
|
|
407
|
+
const coords = {
|
|
408
|
+
x,
|
|
409
|
+
y
|
|
410
|
+
};
|
|
411
|
+
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
412
|
+
const crossAxis = getSideAxis(getSide(placement));
|
|
413
|
+
const mainAxis = getOppositeAxis(crossAxis);
|
|
414
|
+
let mainAxisCoord = coords[mainAxis];
|
|
415
|
+
let crossAxisCoord = coords[crossAxis];
|
|
416
|
+
if (checkMainAxis) {
|
|
417
|
+
const minSide = mainAxis === "y" ? "top" : "left";
|
|
418
|
+
const maxSide = mainAxis === "y" ? "bottom" : "right";
|
|
419
|
+
const min = mainAxisCoord + overflow[minSide];
|
|
420
|
+
const max = mainAxisCoord - overflow[maxSide];
|
|
421
|
+
mainAxisCoord = clamp(min, mainAxisCoord, max);
|
|
322
422
|
}
|
|
323
|
-
if (
|
|
324
|
-
const
|
|
325
|
-
|
|
423
|
+
if (checkCrossAxis) {
|
|
424
|
+
const minSide = crossAxis === "y" ? "top" : "left";
|
|
425
|
+
const maxSide = crossAxis === "y" ? "bottom" : "right";
|
|
426
|
+
const min = crossAxisCoord + overflow[minSide];
|
|
427
|
+
const max = crossAxisCoord - overflow[maxSide];
|
|
428
|
+
crossAxisCoord = clamp(min, crossAxisCoord, max);
|
|
326
429
|
}
|
|
327
|
-
const
|
|
328
|
-
...
|
|
329
|
-
[
|
|
330
|
-
[
|
|
430
|
+
const limitedCoords = limiter.fn({
|
|
431
|
+
...state,
|
|
432
|
+
[mainAxis]: mainAxisCoord,
|
|
433
|
+
[crossAxis]: crossAxisCoord
|
|
331
434
|
});
|
|
332
435
|
return {
|
|
333
|
-
...
|
|
436
|
+
...limitedCoords,
|
|
334
437
|
data: {
|
|
335
|
-
x:
|
|
336
|
-
y:
|
|
438
|
+
x: limitedCoords.x - x,
|
|
439
|
+
y: limitedCoords.y - y,
|
|
337
440
|
enabled: {
|
|
338
|
-
[
|
|
339
|
-
[
|
|
441
|
+
[mainAxis]: checkMainAxis,
|
|
442
|
+
[crossAxis]: checkCrossAxis
|
|
340
443
|
}
|
|
341
444
|
}
|
|
342
445
|
};
|
|
343
446
|
}
|
|
344
447
|
};
|
|
345
|
-
};
|
|
448
|
+
}, "shift");
|
|
346
449
|
export {
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
450
|
+
computePosition,
|
|
451
|
+
detectOverflow,
|
|
452
|
+
flip,
|
|
453
|
+
offset,
|
|
454
|
+
rectToClientRect,
|
|
455
|
+
shift
|
|
353
456
|
};
|