@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,22 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
const isValidRegex = /* @__PURE__ */ __name((regex, value) => {
|
|
4
|
+
if (typeof value === "undefined") return false;
|
|
5
|
+
return regex.test(String(value));
|
|
6
|
+
}, "isValidRegex");
|
|
7
|
+
const handleValidationMinMax = /* @__PURE__ */ __name((value, min, max, errorTranslations) => {
|
|
8
|
+
let numericValue = Number(value);
|
|
9
|
+
if (typeof value === "string" && isNaN(numericValue)) {
|
|
10
|
+
numericValue = value.length;
|
|
11
|
+
}
|
|
12
|
+
if (min !== void 0 && numericValue < min) {
|
|
13
|
+
return `${(errorTranslations == null ? void 0 : errorTranslations.min) ?? "Value must be greater than or equal to"} ${min}.`;
|
|
14
|
+
}
|
|
15
|
+
if (max !== void 0 && numericValue > max) {
|
|
16
|
+
return `${(errorTranslations == null ? void 0 : errorTranslations.max) ?? "Value must be less than or equal to"} ${max}.`;
|
|
17
|
+
}
|
|
18
|
+
return;
|
|
19
|
+
}, "handleValidationMinMax");
|
|
20
|
+
const handleValidation = /* @__PURE__ */ __name((type, name, value, required, min, max, customRegexPattern, errorTranslations, onValidate) => {
|
|
21
|
+
if (!onValidate) return;
|
|
22
|
+
const valueIsEmpty = value === null || value === void 0 || value === "";
|
|
23
|
+
if (valueIsEmpty && Boolean(required)) {
|
|
24
|
+
return onValidate(
|
|
25
|
+
name,
|
|
26
|
+
(errorTranslations == null ? void 0 : errorTranslations.required) ?? "This field is required. Please fill it out."
|
|
14
27
|
);
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
28
|
+
}
|
|
29
|
+
if (valueIsEmpty && (required === false || required === void 0))
|
|
30
|
+
return onValidate(name);
|
|
31
|
+
const minMaxError = handleValidationMinMax(value, min, max, errorTranslations);
|
|
32
|
+
if (minMaxError !== void 0) return onValidate(name, minMaxError);
|
|
33
|
+
let regexPatterns = {
|
|
20
34
|
text: /^[a-zA-Z\s,.!?'-]+$/,
|
|
21
35
|
email: /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x21\x23-\x5b\x5d-\x7e]|\\[\x21-\x7e])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z]{2,}|(?:\[(?:(?:2(?:5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(?:2(?:5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x21-\x5a\x53-\x7e]|\\[\x21-\x7e])+)])$/i,
|
|
22
36
|
tel: /^\+?[1-9]\d{1,14}$/,
|
|
@@ -25,17 +39,18 @@ const o = (a, e) => typeof e > "u" ? !1 : a.test(String(e)), h = (a, e, u, t) =>
|
|
|
25
39
|
color: /^#([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})$/,
|
|
26
40
|
password: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[\W_]).{8,}$/
|
|
27
41
|
};
|
|
28
|
-
if (
|
|
29
|
-
const
|
|
30
|
-
if (
|
|
31
|
-
const [,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
42
|
+
if (customRegexPattern !== void 0) {
|
|
43
|
+
const regexParts = customRegexPattern.match(/^\/(.*)\/([gimsuy]*)$/);
|
|
44
|
+
if (regexParts) {
|
|
45
|
+
const [, pattern = "", flags] = regexParts;
|
|
46
|
+
const customRegex = new RegExp(pattern ?? "", flags);
|
|
47
|
+
regexPatterns = {
|
|
48
|
+
...regexPatterns,
|
|
49
|
+
[String(type)]: RegExp(customRegex)
|
|
35
50
|
};
|
|
36
51
|
}
|
|
37
52
|
}
|
|
38
|
-
const
|
|
53
|
+
const errorMessages = {
|
|
39
54
|
text: "Text can only include letters and common punctuation.",
|
|
40
55
|
email: "Please enter a valid email address (e.g., name@example.com).",
|
|
41
56
|
tel: "Please enter a valid phone number.",
|
|
@@ -43,10 +58,14 @@ const o = (a, e) => typeof e > "u" ? !1 : a.test(String(e)), h = (a, e, u, t) =>
|
|
|
43
58
|
number: "Please enter a valid number.",
|
|
44
59
|
color: "Please enter a valid color code (e.g., #FFFFFF).",
|
|
45
60
|
password: "Password must be at least 8 characters long and include uppercase, lowercase, numbers, and special characters.",
|
|
46
|
-
...
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
61
|
+
...errorTranslations
|
|
62
|
+
};
|
|
63
|
+
const regex = regexPatterns[type];
|
|
64
|
+
if (regex && !isValidRegex(regex, value)) {
|
|
65
|
+
return onValidate(name, errorMessages[type]);
|
|
66
|
+
}
|
|
67
|
+
return onValidate(name);
|
|
68
|
+
}, "handleValidation");
|
|
50
69
|
export {
|
|
51
|
-
|
|
70
|
+
handleValidation
|
|
52
71
|
};
|
|
@@ -1,71 +1,104 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
4
|
+
import { memo, useState, useRef, createElement } from "react";
|
|
5
|
+
import { create } from "../../helpers/bem.js";
|
|
6
|
+
import { isArray } from "../../helpers/validations.js";
|
|
7
|
+
import styles from "./InputOTP.module.scss.js";
|
|
8
|
+
import { Input } from "../input/Input.js";
|
|
9
|
+
const bem = create(styles, "InputOTP");
|
|
10
|
+
const InputOTP = memo(
|
|
8
11
|
({
|
|
9
|
-
className
|
|
10
|
-
groupLabel
|
|
11
|
-
groupInstruction
|
|
12
|
-
length
|
|
13
|
-
onComplete
|
|
14
|
-
onChange
|
|
15
|
-
...
|
|
12
|
+
className,
|
|
13
|
+
groupLabel,
|
|
14
|
+
groupInstruction,
|
|
15
|
+
length = 6,
|
|
16
|
+
onComplete,
|
|
17
|
+
onChange,
|
|
18
|
+
...props
|
|
16
19
|
}) => {
|
|
17
|
-
const [
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
if (t.forEach((a, p) => {
|
|
29
|
-
p < i && (e[p] = a, s.current[p] && (s.current[p].value = a));
|
|
30
|
-
}), m(e), l && l(e.join("")), t.length === i && u)
|
|
31
|
-
u(e.join(""));
|
|
32
|
-
else {
|
|
33
|
-
const a = t.length;
|
|
34
|
-
a < i && ((o = s.current[a]) == null || o.focus());
|
|
20
|
+
const [otp, setOtp] = useState(Array(length).fill(""));
|
|
21
|
+
const inputs = useRef([]);
|
|
22
|
+
const handleChange = /* @__PURE__ */ __name((value, index) => {
|
|
23
|
+
var _a;
|
|
24
|
+
if (value.length > 1) return;
|
|
25
|
+
const newOtp = [...otp];
|
|
26
|
+
newOtp[index] = value;
|
|
27
|
+
setOtp(newOtp);
|
|
28
|
+
if (onChange) onChange(newOtp.join(""));
|
|
29
|
+
if (value && index < length - 1) {
|
|
30
|
+
(_a = inputs.current[index + 1]) == null ? void 0 : _a.focus();
|
|
35
31
|
}
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
if (newOtp.every((digit) => digit !== "") && onComplete) {
|
|
33
|
+
onComplete(newOtp.join(""));
|
|
34
|
+
}
|
|
35
|
+
}, "handleChange");
|
|
36
|
+
const handleKeyDown = /* @__PURE__ */ __name((e, index) => {
|
|
37
|
+
var _a, _b, _c;
|
|
38
|
+
if (e.key === "Backspace" && index > 0 && isArray(otp) && otp[index] !== void 0) {
|
|
39
|
+
(_a = inputs.current[index - 1]) == null ? void 0 : _a.focus();
|
|
40
|
+
}
|
|
41
|
+
if (e.key === "ArrowLeft" && index > 0) {
|
|
42
|
+
(_b = inputs.current[index - 1]) == null ? void 0 : _b.focus();
|
|
43
|
+
} else if (e.key === "ArrowRight" && index < length - 1) {
|
|
44
|
+
(_c = inputs.current[index + 1]) == null ? void 0 : _c.focus();
|
|
45
|
+
}
|
|
46
|
+
}, "handleKeyDown");
|
|
47
|
+
const handlePaste = /* @__PURE__ */ __name((e) => {
|
|
48
|
+
var _a;
|
|
49
|
+
const paste = e.clipboardData.getData("text").slice(0, length).split("");
|
|
50
|
+
const newOtp = [...otp];
|
|
51
|
+
paste.forEach((value, index) => {
|
|
52
|
+
if (index < length) {
|
|
53
|
+
newOtp[index] = value;
|
|
54
|
+
if (inputs.current[index]) {
|
|
55
|
+
inputs.current[index].value = value;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
setOtp(newOtp);
|
|
60
|
+
if (onChange) onChange(newOtp.join(""));
|
|
61
|
+
if (paste.length === length && onComplete) {
|
|
62
|
+
onComplete(newOtp.join(""));
|
|
63
|
+
} else {
|
|
64
|
+
const nextIndex = paste.length;
|
|
65
|
+
if (nextIndex < length) {
|
|
66
|
+
(_a = inputs.current[nextIndex]) == null ? void 0 : _a.focus();
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}, "handlePaste");
|
|
70
|
+
return /* @__PURE__ */ jsxs(
|
|
38
71
|
"div",
|
|
39
72
|
{
|
|
40
73
|
"aria-describedby": "otp-instructions",
|
|
41
74
|
"aria-labelledby": "otp-group-label",
|
|
42
|
-
className:
|
|
75
|
+
className: bem(void 0, void 0, className),
|
|
43
76
|
role: "group",
|
|
44
|
-
onPaste:
|
|
77
|
+
onPaste: handlePaste,
|
|
45
78
|
children: [
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
|
|
49
|
-
|
|
79
|
+
/* @__PURE__ */ jsx("span", { className: bem("label"), id: "otp-group-label", children: groupLabel ?? "Enter your OTP" }),
|
|
80
|
+
/* @__PURE__ */ jsx("span", { className: bem("instruction"), id: "otp-instructions", children: groupInstruction ?? "Use the arrow keys to navigate between digits." }),
|
|
81
|
+
otp.map((value, index) => /* @__PURE__ */ createElement(
|
|
82
|
+
Input,
|
|
50
83
|
{
|
|
51
84
|
placeholder: "x",
|
|
52
|
-
...
|
|
53
|
-
key: `otp-${
|
|
54
|
-
hideCounter:
|
|
55
|
-
"aria-label": `${(
|
|
56
|
-
className:
|
|
57
|
-
fieldClassName:
|
|
58
|
-
inputClassName:
|
|
59
|
-
inputContainerClassName:
|
|
85
|
+
...props,
|
|
86
|
+
key: `otp-${index}`,
|
|
87
|
+
hideCounter: true,
|
|
88
|
+
"aria-label": `${(props == null ? void 0 : props["aria-label"]) ?? "OTP digit"} ${index + 1}`,
|
|
89
|
+
className: bem("input"),
|
|
90
|
+
fieldClassName: bem("field"),
|
|
91
|
+
inputClassName: bem("input__node"),
|
|
92
|
+
inputContainerClassName: bem("input__container"),
|
|
60
93
|
maxLength: 1,
|
|
61
|
-
name: `otp-${
|
|
94
|
+
name: `otp-${index}`,
|
|
62
95
|
type: "text",
|
|
63
|
-
value
|
|
64
|
-
inputRef: (
|
|
65
|
-
|
|
66
|
-
},
|
|
67
|
-
onChange: (e) =>
|
|
68
|
-
onKeyDown: (e) =>
|
|
96
|
+
value,
|
|
97
|
+
inputRef: /* @__PURE__ */ __name((el) => {
|
|
98
|
+
inputs.current[index] = el;
|
|
99
|
+
}, "inputRef"),
|
|
100
|
+
onChange: /* @__PURE__ */ __name((e) => handleChange(e.target.value, index), "onChange"),
|
|
101
|
+
onKeyDown: /* @__PURE__ */ __name((e) => handleKeyDown(e, index), "onKeyDown")
|
|
69
102
|
}
|
|
70
103
|
))
|
|
71
104
|
]
|
|
@@ -73,7 +106,7 @@ const n = I(A, "InputOTP"), _ = g(
|
|
|
73
106
|
);
|
|
74
107
|
}
|
|
75
108
|
);
|
|
76
|
-
|
|
109
|
+
InputOTP.displayName = "InputOTP";
|
|
77
110
|
export {
|
|
78
|
-
|
|
111
|
+
InputOTP
|
|
79
112
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
const
|
|
1
|
+
const gradientMove = "gradientMove";
|
|
2
|
+
const fadeInKeyframe = "fadeInKeyframe";
|
|
3
|
+
const styles = {
|
|
2
4
|
"prokodo-InputOTP": "prokodo-InputOTP",
|
|
3
5
|
"prokodo-InputOTP__label": "prokodo-InputOTP__label",
|
|
4
6
|
"prokodo-InputOTP__instruction": "prokodo-InputOTP__instruction",
|
|
@@ -6,11 +8,11 @@ const o = "gradientMove", n = "fadeInKeyframe", p = {
|
|
|
6
8
|
"prokodo-InputOTP__input": "prokodo-InputOTP__input",
|
|
7
9
|
"prokodo-InputOTP__input__container": "prokodo-InputOTP__input__container",
|
|
8
10
|
"prokodo-InputOTP__input__node": "prokodo-InputOTP__input__node",
|
|
9
|
-
gradientMove
|
|
10
|
-
fadeInKeyframe
|
|
11
|
+
gradientMove,
|
|
12
|
+
fadeInKeyframe
|
|
11
13
|
};
|
|
12
14
|
export {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
styles as default,
|
|
16
|
+
fadeInKeyframe,
|
|
17
|
+
gradientMove
|
|
16
18
|
};
|
|
@@ -1,65 +1,66 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
]
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
]
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
);
|
|
62
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
4
|
+
import { create } from "../../helpers/bem.js";
|
|
5
|
+
import styles from "./Label.module.scss.js";
|
|
6
|
+
const bem = create(styles, "Label");
|
|
7
|
+
const Label = /* @__PURE__ */ __name(({
|
|
8
|
+
className,
|
|
9
|
+
htmlFor,
|
|
10
|
+
required,
|
|
11
|
+
label,
|
|
12
|
+
contentProps,
|
|
13
|
+
textProps,
|
|
14
|
+
error,
|
|
15
|
+
children,
|
|
16
|
+
...props
|
|
17
|
+
}) => {
|
|
18
|
+
const splittedLabel = label == null ? void 0 : label.split(" ");
|
|
19
|
+
if (!splittedLabel) return children;
|
|
20
|
+
return /* @__PURE__ */ jsxs(
|
|
21
|
+
"label",
|
|
22
|
+
{
|
|
23
|
+
...props,
|
|
24
|
+
className: bem(void 0, void 0, className),
|
|
25
|
+
htmlFor,
|
|
26
|
+
children: [
|
|
27
|
+
/* @__PURE__ */ jsxs("span", { ...contentProps, children: [
|
|
28
|
+
/* @__PURE__ */ jsxs(
|
|
29
|
+
"i",
|
|
30
|
+
{
|
|
31
|
+
...textProps,
|
|
32
|
+
className: bem(
|
|
33
|
+
"highlighted",
|
|
34
|
+
{
|
|
35
|
+
error: Boolean(error)
|
|
36
|
+
},
|
|
37
|
+
textProps == null ? void 0 : textProps.className
|
|
38
|
+
),
|
|
39
|
+
children: [
|
|
40
|
+
splittedLabel == null ? void 0 : splittedLabel[0],
|
|
41
|
+
" "
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
),
|
|
45
|
+
/* @__PURE__ */ jsxs(
|
|
46
|
+
"i",
|
|
47
|
+
{
|
|
48
|
+
...textProps,
|
|
49
|
+
className: bem("text", void 0, textProps == null ? void 0 : textProps.className),
|
|
50
|
+
children: [
|
|
51
|
+
splittedLabel == null ? void 0 : splittedLabel.slice(1).join(" "),
|
|
52
|
+
" ",
|
|
53
|
+
Boolean(required) && /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: "*" })
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
] }),
|
|
58
|
+
children
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
}, "Label");
|
|
63
|
+
Label.displayName = "Label";
|
|
63
64
|
export {
|
|
64
|
-
|
|
65
|
+
Label
|
|
65
66
|
};
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
const
|
|
1
|
+
const gradientMove = "gradientMove";
|
|
2
|
+
const fadeInKeyframe = "fadeInKeyframe";
|
|
3
|
+
const styles = {
|
|
2
4
|
"prokodo-Label": "prokodo-Label",
|
|
3
5
|
"prokodo-Label__highlighted": "prokodo-Label__highlighted",
|
|
4
6
|
"prokodo-Label__highlighted--error": "prokodo-Label__highlighted--error",
|
|
5
7
|
"prokodo-Label__text": "prokodo-Label__text",
|
|
6
|
-
gradientMove
|
|
7
|
-
fadeInKeyframe
|
|
8
|
+
gradientMove,
|
|
9
|
+
fadeInKeyframe
|
|
8
10
|
};
|
|
9
11
|
export {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
styles as default,
|
|
13
|
+
fadeInKeyframe,
|
|
14
|
+
gradientMove
|
|
13
15
|
};
|
|
@@ -1,58 +1,63 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import { memo
|
|
3
|
-
import { create
|
|
4
|
-
import { isString
|
|
5
|
-
import
|
|
6
|
-
import { BaseLink
|
|
7
|
-
const
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { memo } from "react";
|
|
3
|
+
import { create } from "../../helpers/bem.js";
|
|
4
|
+
import { isString } from "../../helpers/validations.js";
|
|
5
|
+
import styles from "./Link.module.scss.js";
|
|
6
|
+
import { BaseLink } from "../base-link/BaseLink.js";
|
|
7
|
+
const bem = create(styles, "Link");
|
|
8
|
+
const Link = memo(
|
|
8
9
|
({
|
|
9
|
-
variant
|
|
10
|
-
href
|
|
11
|
-
children
|
|
12
|
-
className
|
|
13
|
-
style
|
|
14
|
-
target
|
|
15
|
-
itemProp
|
|
16
|
-
hasBackground
|
|
17
|
-
onMouseEnter
|
|
18
|
-
onClick
|
|
19
|
-
onKeyDown
|
|
20
|
-
ariaLabel
|
|
10
|
+
variant = "inherit",
|
|
11
|
+
href,
|
|
12
|
+
children,
|
|
13
|
+
className,
|
|
14
|
+
style,
|
|
15
|
+
target,
|
|
16
|
+
itemProp,
|
|
17
|
+
hasBackground,
|
|
18
|
+
onMouseEnter,
|
|
19
|
+
onClick,
|
|
20
|
+
onKeyDown,
|
|
21
|
+
ariaLabel
|
|
21
22
|
}) => {
|
|
22
|
-
const
|
|
23
|
-
"has-no-background":
|
|
24
|
-
[`has-no-background--${
|
|
25
|
-
}, a = {
|
|
26
|
-
className: v(void 0, u, n),
|
|
27
|
-
style: f,
|
|
28
|
-
onMouseEnter: b
|
|
23
|
+
const linkModifier = {
|
|
24
|
+
"has-no-background": hasBackground === false,
|
|
25
|
+
[`has-no-background--${variant}`]: hasBackground === false
|
|
29
26
|
};
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
27
|
+
const defaultProps = {
|
|
28
|
+
className: bem(void 0, linkModifier, className),
|
|
29
|
+
style,
|
|
30
|
+
onMouseEnter
|
|
31
|
+
};
|
|
32
|
+
if (onClick && !isString(href)) {
|
|
33
|
+
return /* @__PURE__ */ jsx(
|
|
34
|
+
"span",
|
|
35
|
+
{
|
|
36
|
+
"aria-label": ariaLabel,
|
|
37
|
+
role: "button",
|
|
38
|
+
tabIndex: 0,
|
|
39
|
+
onClick,
|
|
40
|
+
onKeyDown,
|
|
41
|
+
...defaultProps,
|
|
42
|
+
children
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
return /* @__PURE__ */ jsx(
|
|
47
|
+
BaseLink,
|
|
43
48
|
{
|
|
44
|
-
...
|
|
45
|
-
"aria-label":
|
|
46
|
-
href
|
|
47
|
-
itemProp
|
|
48
|
-
target:
|
|
49
|
-
onClick
|
|
50
|
-
children
|
|
49
|
+
...defaultProps,
|
|
50
|
+
"aria-label": ariaLabel,
|
|
51
|
+
href,
|
|
52
|
+
itemProp,
|
|
53
|
+
target: target ?? void 0,
|
|
54
|
+
onClick,
|
|
55
|
+
children
|
|
51
56
|
}
|
|
52
57
|
);
|
|
53
58
|
}
|
|
54
59
|
);
|
|
55
|
-
|
|
60
|
+
Link.displayName = "Link";
|
|
56
61
|
export {
|
|
57
|
-
|
|
62
|
+
Link
|
|
58
63
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
const
|
|
1
|
+
const gradientMove = "gradientMove";
|
|
2
|
+
const fadeInKeyframe = "fadeInKeyframe";
|
|
3
|
+
const styles = {
|
|
2
4
|
"prokodo-Link": "prokodo-Link",
|
|
3
5
|
"prokodo-Link--has-no-background": "prokodo-Link--has-no-background",
|
|
4
6
|
"prokodo-Link--has-no-background--primary": "prokodo-Link--has-no-background--primary",
|
|
@@ -8,11 +10,11 @@ const o = "gradientMove", n = "fadeInKeyframe", r = {
|
|
|
8
10
|
"prokodo-Link--has-no-background--warning": "prokodo-Link--has-no-background--warning",
|
|
9
11
|
"prokodo-Link--has-no-background--error": "prokodo-Link--has-no-background--error",
|
|
10
12
|
"prokodo-Link--has-no-background--white": "prokodo-Link--has-no-background--white",
|
|
11
|
-
gradientMove
|
|
12
|
-
fadeInKeyframe
|
|
13
|
+
gradientMove,
|
|
14
|
+
fadeInKeyframe
|
|
13
15
|
};
|
|
14
16
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
styles as default,
|
|
18
|
+
fadeInKeyframe,
|
|
19
|
+
gradientMove
|
|
18
20
|
};
|