@prokodo/ui 0.0.4 → 0.0.6
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 +99 -12
- package/dist/components/Accordion-V3d_aGvZ.js +130 -0
- package/dist/components/Accordion-o8oKA6Tq.js +1 -0
- package/dist/components/Animated-BBfAgsHL.js +64 -0
- package/dist/components/Animated-CO4IEerF.js +1 -0
- package/dist/components/AnimatedText-BmB5Vkyq.js +31 -0
- package/dist/components/AnimatedText-Sy1jofZl.js +1 -0
- package/dist/components/Avatar-Ci5YNFc5.js +95 -0
- package/dist/components/Avatar-CjlbA5a5.js +1 -0
- package/dist/components/BaseLink-Dd9htNXU.js +1 -0
- package/dist/components/BaseLink-w1q9Qc1U.js +30 -0
- package/dist/components/Button-B8chVgsB.js +111 -0
- package/dist/components/Button-yvFLX-6Q.js +1 -0
- package/dist/components/Calendly-CWCAs02R.js +1 -0
- package/dist/components/Calendly-WBM4oHyC.js +82 -0
- package/dist/components/Card-BPEoLzF1.js +1 -0
- package/dist/components/Card-IW4R7bKr.js +202 -0
- package/dist/components/Carousel-CdS7SVzA.js +1 -0
- package/dist/components/Carousel-DpO4a3lm.js +257 -0
- package/dist/components/Chip-BmBxJH5M.js +80 -0
- package/dist/components/Chip-Q2ttDAQn.js +1 -0
- package/dist/components/ClassNameConfigurator-C6UbdI-d.js +21 -0
- package/dist/components/ClassNameConfigurator-Ce5BUPXc.js +860 -0
- package/dist/components/DatePicker-BTenaDN8.js +1 -0
- package/dist/components/DatePicker-PK173UTy.js +93 -0
- package/dist/components/Dialog-Bq3tfZ0_.js +1 -0
- package/dist/components/Dialog-KlXAOdt_.js +172 -0
- package/dist/components/Drawer-DulO9091.js +1 -0
- package/dist/components/Drawer-i9X07r74.js +120 -0
- package/dist/components/Form-B6963dT5.js +368 -0
- package/dist/components/Form-DVNzITG2.js +1 -0
- package/dist/components/GridRow-1h1JHuDl.js +114 -0
- package/dist/components/GridRow-C5v0sOZZ.js +1 -0
- package/dist/components/Headline-CnyLLQLB.js +1 -0
- package/dist/components/Headline-DzEinaZi.js +98 -0
- package/dist/components/Icon-BMrVlROP.js +4195 -0
- package/dist/components/Icon-eWdA85cf.js +1 -0
- package/dist/components/Image-B-lyA7ym.js +1 -0
- package/dist/components/Image-CVgvVlLE.js +33 -0
- package/dist/components/ImageText-Cqp4xp9y.js +113 -0
- package/dist/components/ImageText-D-06_EGf.js +1 -0
- package/dist/components/Input-BEO9ig1R.js +1 -0
- package/dist/components/Input-CrNLI_OY.js +258 -0
- package/dist/components/InputOTP-Db7DHrhS.js +88 -0
- package/dist/components/InputOTP-MnmjEmPU.js +1 -0
- package/dist/components/Label-BvCzZIGM.js +1 -0
- package/dist/components/Label-DRUCdGoX.js +71 -0
- package/dist/components/Link-DSQ1125B.js +69 -0
- package/dist/components/Link-Dg7XR4uY.js +1 -0
- package/dist/components/List-D_dSwMx5.js +1 -0
- package/dist/components/List-P6xbVrBc.js +196 -0
- package/dist/components/Loading-C7lyHDW7.js +68 -0
- package/dist/components/Loading-U-CrTVTi.js +1 -0
- package/dist/components/Lottie-Br7PmIzX.js +1 -0
- package/dist/components/Lottie-CrvbxK0R.js +87 -0
- package/dist/components/Map-D3xbPS1S.js +1 -0
- package/dist/components/Map-DEIB_y-M.js +64 -0
- package/dist/components/PostItem-B8Vfv_sW.js +183 -0
- package/dist/components/PostItem-BSTn6cHD.js +1 -0
- package/dist/components/PostTeaser-BmZyqFL2.js +186 -0
- package/dist/components/PostTeaser-DLynX43c.js +1 -0
- package/dist/components/PostWidget-Bo4KiSsV.js +170 -0
- package/dist/components/PostWidget-DYWA-B8d.js +1 -0
- package/dist/components/PostWidgetCarousel-CZ6ptOGv.js +168 -0
- package/dist/components/PostWidgetCarousel-D7-p3Pwr.js +1 -0
- package/dist/components/Quote-6aurOanD.js +1 -0
- package/dist/components/Quote-CV_UYE1G.js +101 -0
- package/dist/components/RichText-Cg_XzkUs.js +152 -0
- package/dist/components/RichText-DVg1dwMV.js +1 -0
- package/dist/components/Select-BMyrX8V0.js +3081 -0
- package/dist/components/Select-DbjU6dlH.js +3 -0
- package/dist/components/Skeleton-BuY3bttw.js +1 -0
- package/dist/components/Skeleton-D6olNYTG.js +40 -0
- package/dist/components/Slider-C-lecSwc.js +957 -0
- package/dist/components/Slider-GvO3Xllf.js +1 -0
- package/dist/components/Stepper-BV3PGCr2.js +1 -0
- package/dist/components/Stepper-CA1DOm4D.js +135 -0
- package/dist/components/Switch-C_6EUOIc.js +330 -0
- package/dist/components/Switch-Db3HpOhM.js +1 -0
- package/dist/components/Table-Csc0FIbX.js +1 -0
- package/dist/components/Table-Cy8bIv_C.js +95 -0
- package/dist/components/Teaser-CkisYOs-.js +1 -0
- package/dist/components/Teaser-Cl2oBeh5.js +118 -0
- package/dist/components/accordion.js +1 -0
- package/dist/components/animated.js +1 -0
- package/dist/components/animatedText.js +1 -0
- package/dist/components/areArraysEqual-6R3bBH2E.js +1 -0
- package/dist/components/areArraysEqual-CJkStQkx.js +20 -0
- package/dist/components/avatar.js +1 -0
- package/dist/components/base-link.js +1 -0
- package/dist/components/bem-CYKrPjje.js +11 -0
- package/dist/components/bem-DC5wv0dD.js +1 -0
- package/dist/components/button.js +1 -0
- package/dist/components/calculation-79PhfKvq.js +4 -0
- package/dist/components/calculation-D-p0iqpk.js +1 -0
- package/dist/components/calendly.js +1 -0
- package/dist/components/card.js +1 -0
- package/dist/components/carousel.js +1 -0
- package/dist/components/chip.js +1 -0
- package/dist/components/datePicker.js +1 -0
- package/dist/components/dialog.js +1 -0
- package/dist/components/drawer.js +1 -0
- package/dist/components/form.js +1 -0
- package/dist/components/grid.js +1 -0
- package/dist/components/headline.js +1 -0
- package/dist/components/icon.js +1 -0
- package/dist/components/image-text.js +1 -0
- package/dist/components/image.js +1 -0
- package/dist/components/input.js +1 -0
- package/dist/components/inputOTP.js +1 -0
- package/dist/components/jsx-runtime-C5mzlN2N.js +284 -0
- package/dist/components/jsx-runtime-CITbqOLs.js +22 -0
- package/dist/components/label.js +1 -0
- package/dist/components/link.js +1 -0
- package/dist/components/list.js +1 -0
- package/dist/components/loading.js +1 -0
- package/dist/components/lottie.js +1 -0
- package/dist/components/map.js +1 -0
- package/dist/components/post-item.js +1 -0
- package/dist/components/post-teaser.js +1 -0
- package/dist/components/post-widget-carousel.js +1 -0
- package/dist/components/post-widget.js +1 -0
- package/dist/components/quote.js +1 -0
- package/dist/components/rich-text.js +1 -0
- package/dist/components/select.js +1 -0
- package/dist/components/skeleton.js +1 -0
- package/dist/components/slider.js +1 -0
- package/dist/components/stepper.js +1 -0
- package/dist/components/switch.js +1 -0
- package/dist/components/table.js +1 -0
- package/dist/components/teaser.js +1 -0
- package/dist/components/useControlled-BYdyS7Pn.js +31 -0
- package/dist/components/useControlled-Ysk4KqoX.js +3 -0
- package/dist/components/validations-B_cxltQ_.js +8 -0
- package/dist/components/validations-Cnxtn28y.js +1 -0
- package/dist/index.cjs.js +1 -46
- package/dist/index.es.js +82 -13845
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/types/components/accordion/Accordion.d.ts +3 -0
- package/dist/types/components/accordion/Accordion.model.d.ts +28 -0
- package/dist/types/components/accordion/index.d.ts +2 -0
- package/dist/types/components/animated/Animated.d.ts +3 -0
- package/dist/types/components/animated/Animated.model.d.ts +12 -0
- package/dist/types/components/animated/index.d.ts +2 -0
- package/dist/types/components/animatedText/AnimatedText.d.ts +3 -0
- package/dist/types/components/animatedText/AnimatedText.model.d.ts +7 -0
- package/dist/types/components/animatedText/index.d.ts +2 -0
- package/dist/types/components/avatar/Avatar.d.ts +3 -0
- package/dist/types/components/avatar/Avatar.model.d.ts +11 -0
- package/dist/types/components/avatar/index.d.ts +2 -0
- package/dist/types/components/base-link/BaseLink.d.ts +3 -0
- package/dist/types/components/base-link/BaseLink.model.d.ts +7 -0
- package/dist/types/components/base-link/index.d.ts +2 -0
- package/dist/types/components/button/Button.d.ts +3 -0
- package/dist/types/components/button/Button.model.d.ts +26 -0
- package/dist/types/components/button/index.d.ts +2 -0
- package/dist/types/components/calendly/Calendly.d.ts +22 -0
- package/dist/types/components/calendly/Calendly.model.d.ts +27 -0
- package/dist/types/components/calendly/index.d.ts +2 -0
- package/dist/types/components/card/Card.d.ts +3 -0
- package/dist/types/components/card/Card.model.d.ts +35 -0
- package/dist/types/components/card/index.d.ts +2 -0
- package/dist/types/components/carousel/Carousel.d.ts +3 -0
- package/dist/types/components/carousel/Carousel.model.d.ts +24 -0
- package/dist/types/components/carousel/Carousel.services.d.ts +23 -0
- package/dist/types/components/carousel/index.d.ts +2 -0
- package/dist/types/components/chip/Chip.d.ts +3 -0
- package/dist/types/components/chip/Chip.model.d.ts +14 -0
- package/dist/types/components/chip/index.d.ts +2 -0
- package/dist/types/components/datePicker/DatePicker.d.ts +3 -0
- package/dist/types/components/datePicker/DatePicker.model.d.ts +21 -0
- package/dist/types/components/datePicker/index.d.ts +2 -0
- package/dist/types/components/dialog/Dialog.d.ts +3 -0
- package/dist/types/components/dialog/Dialog.model.d.ts +34 -0
- package/dist/types/components/dialog/index.d.ts +2 -0
- package/dist/types/components/drawer/Drawer.d.ts +5 -0
- package/dist/types/components/drawer/Drawer.model.d.ts +11 -0
- package/dist/types/components/drawer/index.d.ts +2 -0
- package/dist/types/components/form/Form.d.ts +3 -0
- package/dist/types/components/form/Form.model.d.ts +71 -0
- package/dist/types/components/form/FormField.d.ts +9 -0
- package/dist/types/components/form/FormResponse.d.ts +6 -0
- package/dist/types/components/form/index.d.ts +3 -0
- package/dist/types/components/grid/Grid.d.ts +7 -0
- package/dist/types/components/grid/GridRow.d.ts +13 -0
- package/dist/types/components/grid/index.d.ts +2 -0
- package/dist/types/components/headline/Headline.d.ts +4 -0
- package/dist/types/components/headline/Headline.model.d.ts +19 -0
- package/dist/types/components/headline/index.d.ts +2 -0
- package/dist/types/components/icon/Icon.d.ts +4 -0
- package/dist/types/components/icon/Icon.model.d.ts +15 -0
- package/dist/types/components/icon/iconsMap.d.ts +4128 -0
- package/dist/types/components/icon/index.d.ts +2 -0
- package/dist/types/components/image/Image.d.ts +3 -0
- package/dist/types/components/image/Image.model.d.ts +12 -0
- package/dist/types/components/image/index.d.ts +2 -0
- package/dist/types/components/image-text/ImageText.d.ts +3 -0
- package/dist/types/components/image-text/ImageText.model.d.ts +21 -0
- package/dist/types/components/image-text/index.d.ts +2 -0
- package/dist/types/components/input/Input.d.ts +3 -0
- package/dist/types/components/input/Input.model.d.ts +55 -0
- package/dist/types/components/input/InputValidation.d.ts +2 -0
- package/dist/types/components/input/index.d.ts +2 -0
- package/dist/types/components/inputOTP/InputOTP.d.ts +3 -0
- package/dist/types/components/inputOTP/InputOTP.model.d.ts +8 -0
- package/dist/types/components/inputOTP/index.d.ts +2 -0
- package/dist/types/components/label/Label.d.ts +3 -0
- package/dist/types/components/label/Label.model.d.ts +9 -0
- package/dist/types/components/label/index.d.ts +2 -0
- package/dist/types/components/link/Link.d.ts +3 -0
- package/dist/types/components/link/Link.model.d.ts +22 -0
- package/dist/types/components/link/index.d.ts +2 -0
- package/dist/types/components/list/List.d.ts +3 -0
- package/dist/types/components/list/List.model.d.ts +49 -0
- package/dist/types/components/list/index.d.ts +2 -0
- package/dist/types/components/loading/Loading.d.ts +3 -0
- package/dist/types/components/loading/Loading.model.d.ts +5 -0
- package/dist/types/components/loading/index.d.ts +2 -0
- package/dist/types/components/lottie/Lottie.d.ts +3 -0
- package/dist/types/components/lottie/Lottie.model.d.ts +8 -0
- package/dist/types/components/lottie/LottieAnimations.d.ts +32 -0
- package/dist/types/components/lottie/index.d.ts +2 -0
- package/dist/types/components/map/Map.d.ts +3 -0
- package/dist/types/components/map/Map.model.d.ts +20 -0
- package/dist/types/components/map/index.d.ts +2 -0
- package/dist/types/components/post-item/PostItem.d.ts +3 -0
- package/dist/types/components/post-item/PostItem.model.d.ts +21 -0
- package/dist/types/components/post-item/PostItemAuthor.d.ts +3 -0
- package/dist/types/components/post-item/PostItemAuthor.model.d.ts +14 -0
- package/dist/types/components/post-item/index.d.ts +3 -0
- package/dist/types/components/post-teaser/PostTeaser.d.ts +3 -0
- package/dist/types/components/post-teaser/PostTeaser.model.d.ts +25 -0
- package/dist/types/components/post-teaser/index.d.ts +2 -0
- package/dist/types/components/post-widget/PostWidget.d.ts +3 -0
- package/dist/types/components/post-widget/PostWidget.model.d.ts +25 -0
- package/dist/types/components/post-widget/index.d.ts +2 -0
- package/dist/types/components/post-widget-carousel/PostWidgetCarousel.d.ts +3 -0
- package/dist/types/components/post-widget-carousel/PostWidgetCarousel.model.d.ts +20 -0
- package/dist/types/components/post-widget-carousel/index.d.ts +2 -0
- package/dist/types/components/quote/Quote.d.ts +3 -0
- package/dist/types/components/quote/Quote.model.d.ts +19 -0
- package/dist/types/components/quote/index.d.ts +2 -0
- package/dist/types/components/rich-text/RichText.d.ts +3 -0
- package/dist/types/components/rich-text/RichText.model.d.ts +11 -0
- package/dist/types/components/rich-text/index.d.ts +2 -0
- package/dist/types/components/select/Select.d.ts +3 -0
- package/dist/types/components/select/Select.model.d.ts +30 -0
- package/dist/types/components/select/index.d.ts +2 -0
- package/dist/types/components/skeleton/Skeleton.d.ts +3 -0
- package/dist/types/components/skeleton/Skeleton.model.d.ts +7 -0
- package/dist/types/components/skeleton/index.d.ts +2 -0
- package/dist/types/components/slider/Slider.d.ts +3 -0
- package/dist/types/components/slider/Slider.model.d.ts +11 -0
- package/dist/types/components/slider/index.d.ts +2 -0
- package/dist/types/components/stepper/Stepper.d.ts +3 -0
- package/dist/types/components/stepper/Stepper.model.d.ts +24 -0
- package/dist/types/components/stepper/index.d.ts +2 -0
- package/dist/types/components/switch/Switch.d.ts +3 -0
- package/dist/types/components/switch/Switch.model.d.ts +18 -0
- package/dist/types/components/switch/index.d.ts +2 -0
- package/dist/types/components/table/Table.d.ts +3 -0
- package/dist/types/components/table/Table.model.d.ts +32 -0
- package/dist/types/components/table/index.d.ts +2 -0
- package/dist/types/components/teaser/Teaser.d.ts +3 -0
- package/dist/types/components/teaser/Teaser.model.d.ts +29 -0
- package/dist/types/components/teaser/index.d.ts +2 -0
- package/dist/types/helpers/bem.d.ts +8 -0
- package/dist/types/helpers/calculation.d.ts +2 -0
- package/dist/types/helpers/effect.d.ts +1 -0
- package/dist/types/helpers/getTracking.d.ts +5 -0
- package/dist/types/helpers/theme.d.ts +1 -0
- package/dist/types/helpers/validations.d.ts +6 -0
- package/dist/types/hooks/useGoogleMaps.d.ts +1 -0
- package/dist/types/hooks/useThrottleScroll.d.ts +1 -0
- package/dist/types/index.d.ts +80 -0
- package/dist/types/types/colors.d.ts +5 -0
- package/dist/types/types/core.d.ts +5 -0
- package/dist/types/types/schema.d.ts +7 -0
- package/dist/types/types/variants.d.ts +1 -0
- package/dist/ui.css +1 -1
- package/package.json +183 -18
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./jsx-runtime-CITbqOLs.js"),d=require("./bem-DC5wv0dD.js"),g=require("./validations-Cnxtn28y.js"),p="gradientMove",u="fadeInKeyframe",I={"prokodo-Image":"prokodo-Image","prokodo-Image__caption":"prokodo-Image__caption",gradientMove:p,fadeInKeyframe:u},o=d.create(I,"Image"),x=({alt:t,caption:a,containerClassName:n,captionClassName:r,className:i,imageComponent:m="img",...c})=>{const s=()=>e.jsxRuntimeExports.jsx(m,{alt:t??"",className:o("image",void 0,i),...c});return g.isString(a)?e.jsxRuntimeExports.jsxs("figure",{className:o(void 0,void 0,n),children:[s(),e.jsxRuntimeExports.jsx("figcaption",{className:o("caption",void 0,r),children:a})]}):s()};exports.Image=x;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { j as e } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import { c } from "./bem-CYKrPjje.js";
|
|
3
|
+
import { i as g } from "./validations-B_cxltQ_.js";
|
|
4
|
+
const p = "gradientMove", f = "fadeInKeyframe", I = {
|
|
5
|
+
"prokodo-Image": "prokodo-Image",
|
|
6
|
+
"prokodo-Image__caption": "prokodo-Image__caption",
|
|
7
|
+
gradientMove: p,
|
|
8
|
+
fadeInKeyframe: f
|
|
9
|
+
}, o = c(I, "Image"), j = ({
|
|
10
|
+
alt: i,
|
|
11
|
+
caption: a,
|
|
12
|
+
containerClassName: m,
|
|
13
|
+
captionClassName: s,
|
|
14
|
+
className: t,
|
|
15
|
+
imageComponent: n = "img",
|
|
16
|
+
...d
|
|
17
|
+
}) => {
|
|
18
|
+
const r = () => /* @__PURE__ */ e.jsx(
|
|
19
|
+
n,
|
|
20
|
+
{
|
|
21
|
+
alt: i ?? "",
|
|
22
|
+
className: o("image", void 0, t),
|
|
23
|
+
...d
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
return g(a) ? /* @__PURE__ */ e.jsxs("figure", { className: o(void 0, void 0, m), children: [
|
|
27
|
+
r(),
|
|
28
|
+
/* @__PURE__ */ e.jsx("figcaption", { className: o("caption", void 0, s), children: a })
|
|
29
|
+
] }) : r();
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
j as I
|
|
33
|
+
};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { j as e } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import { useState as k } from "react";
|
|
3
|
+
import { c as h } from "./bem-CYKrPjje.js";
|
|
4
|
+
import { i as f } from "./validations-B_cxltQ_.js";
|
|
5
|
+
import { A as t } from "./Animated-BBfAgsHL.js";
|
|
6
|
+
import { B as T } from "./Button-B8chVgsB.js";
|
|
7
|
+
import { G as N, a as i } from "./GridRow-1h1JHuDl.js";
|
|
8
|
+
import { H as p } from "./Headline-DzEinaZi.js";
|
|
9
|
+
import { I as j } from "./Image-CVgvVlLE.js";
|
|
10
|
+
import { L as v } from "./Lottie-CrvbxK0R.js";
|
|
11
|
+
import { R as y } from "./RichText-Cg_XzkUs.js";
|
|
12
|
+
const b = "gradientMove", w = "fadeInKeyframe", M = {
|
|
13
|
+
"prokodo-ImageText__grid": "prokodo-ImageText__grid",
|
|
14
|
+
"prokodo-ImageText__grid--is-reverse": "prokodo-ImageText__grid--is-reverse",
|
|
15
|
+
"prokodo-ImageText__animated__border": "prokodo-ImageText__animated__border",
|
|
16
|
+
"prokodo-ImageText__animated__border--bottom-to-top": "prokodo-ImageText__animated__border--bottom-to-top",
|
|
17
|
+
"prokodo-ImageText__animated__border--is-visible": "prokodo-ImageText__animated__border--is-visible",
|
|
18
|
+
"prokodo-ImageText__animated__border__wrapper": "prokodo-ImageText__animated__border__wrapper",
|
|
19
|
+
"prokodo-ImageText__sub__headline": "prokodo-ImageText__sub__headline",
|
|
20
|
+
"prokodo-ImageText__content": "prokodo-ImageText__content",
|
|
21
|
+
"prokodo-ImageText__content__paragraph": "prokodo-ImageText__content__paragraph",
|
|
22
|
+
"prokodo-ImageText__animated__container": "prokodo-ImageText__animated__container",
|
|
23
|
+
"prokodo-ImageText__animation": "prokodo-ImageText__animation",
|
|
24
|
+
"prokodo-ImageText__image": "prokodo-ImageText__image",
|
|
25
|
+
"prokodo-ImageText__image__src": "prokodo-ImageText__image__src",
|
|
26
|
+
gradientMove: b,
|
|
27
|
+
fadeInKeyframe: w
|
|
28
|
+
}, o = h(M, "ImageText"), $ = ({
|
|
29
|
+
animatedBorder: a,
|
|
30
|
+
reverse: c,
|
|
31
|
+
subTitle: r,
|
|
32
|
+
title: _,
|
|
33
|
+
content: n,
|
|
34
|
+
animation: d,
|
|
35
|
+
image: s,
|
|
36
|
+
button: m
|
|
37
|
+
}) => {
|
|
38
|
+
const [x, g] = k(!1), I = s ? a ? 4 : 6 : a ? 10 : 12;
|
|
39
|
+
return /* @__PURE__ */ e.jsx("div", { className: o(), children: /* @__PURE__ */ e.jsxs(
|
|
40
|
+
N,
|
|
41
|
+
{
|
|
42
|
+
className: o("grid", {
|
|
43
|
+
"is-reverse": !!c
|
|
44
|
+
}),
|
|
45
|
+
children: [
|
|
46
|
+
a && /* @__PURE__ */ e.jsx(i, { className: o("animated__border__wrapper"), sm: 2, xs: 3, children: /* @__PURE__ */ e.jsx(
|
|
47
|
+
t,
|
|
48
|
+
{
|
|
49
|
+
className: o("animated__border", {
|
|
50
|
+
"is-visible": x,
|
|
51
|
+
[`${(a == null ? void 0 : a.direction) ?? "top-to-bottom"}`]: !!(a != null && a.direction)
|
|
52
|
+
}),
|
|
53
|
+
onAnimate: (l) => g(l)
|
|
54
|
+
}
|
|
55
|
+
) }),
|
|
56
|
+
/* @__PURE__ */ e.jsx(i, { className: o("content"), md: I, xs: 10, children: /* @__PURE__ */ e.jsxs(
|
|
57
|
+
t,
|
|
58
|
+
{
|
|
59
|
+
children: [
|
|
60
|
+
r && /* @__PURE__ */ e.jsx(
|
|
61
|
+
p,
|
|
62
|
+
{
|
|
63
|
+
highlight: !0,
|
|
64
|
+
className: o("sub__headline", void 0, r == null ? void 0 : r.className),
|
|
65
|
+
size: "sm",
|
|
66
|
+
type: "h3",
|
|
67
|
+
variant: "primary",
|
|
68
|
+
...r,
|
|
69
|
+
children: r == null ? void 0 : r.content
|
|
70
|
+
}
|
|
71
|
+
),
|
|
72
|
+
/* @__PURE__ */ e.jsx(
|
|
73
|
+
p,
|
|
74
|
+
{
|
|
75
|
+
className: o("headline", void 0, _ == null ? void 0 : _.className),
|
|
76
|
+
size: "lg",
|
|
77
|
+
type: "h2",
|
|
78
|
+
..._,
|
|
79
|
+
children: _.content
|
|
80
|
+
}
|
|
81
|
+
),
|
|
82
|
+
f(n) && /* @__PURE__ */ e.jsx(y, { className: o("content__paragraph"), children: n }),
|
|
83
|
+
m && /* @__PURE__ */ e.jsx(
|
|
84
|
+
T,
|
|
85
|
+
{
|
|
86
|
+
variant: "outlined",
|
|
87
|
+
...m,
|
|
88
|
+
className: o("button", void 0, m == null ? void 0 : m.className)
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
) }),
|
|
94
|
+
s && /* @__PURE__ */ e.jsx(i, { className: o("image"), md: 6, xs: 10, children: /* @__PURE__ */ e.jsx(
|
|
95
|
+
t,
|
|
96
|
+
{
|
|
97
|
+
className: o("animated__container"),
|
|
98
|
+
children: d ? /* @__PURE__ */ e.jsx(
|
|
99
|
+
v,
|
|
100
|
+
{
|
|
101
|
+
animationName: d,
|
|
102
|
+
className: o("animation")
|
|
103
|
+
}
|
|
104
|
+
) : /* @__PURE__ */ e.jsx(j, { className: o("image__src"), ...s })
|
|
105
|
+
}
|
|
106
|
+
) })
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
) });
|
|
110
|
+
};
|
|
111
|
+
export {
|
|
112
|
+
$ as I
|
|
113
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./jsx-runtime-CITbqOLs.js"),j=require("react"),k=require("./bem-DC5wv0dD.js"),h=require("./validations-Cnxtn28y.js"),n=require("./Animated-CO4IEerF.js"),R=require("./Button-yvFLX-6Q.js"),_=require("./GridRow-C5v0sOZZ.js"),d=require("./Headline-CnyLLQLB.js"),u=require("./Image-B-lyA7ym.js"),T=require("./Lottie-Br7PmIzX.js"),N=require("./RichText-DVg1dwMV.js"),v="gradientMove",E="fadeInKeyframe",q={"prokodo-ImageText__grid":"prokodo-ImageText__grid","prokodo-ImageText__grid--is-reverse":"prokodo-ImageText__grid--is-reverse","prokodo-ImageText__animated__border":"prokodo-ImageText__animated__border","prokodo-ImageText__animated__border--bottom-to-top":"prokodo-ImageText__animated__border--bottom-to-top","prokodo-ImageText__animated__border--is-visible":"prokodo-ImageText__animated__border--is-visible","prokodo-ImageText__animated__border__wrapper":"prokodo-ImageText__animated__border__wrapper","prokodo-ImageText__sub__headline":"prokodo-ImageText__sub__headline","prokodo-ImageText__content":"prokodo-ImageText__content","prokodo-ImageText__content__paragraph":"prokodo-ImageText__content__paragraph","prokodo-ImageText__animated__container":"prokodo-ImageText__animated__container","prokodo-ImageText__animation":"prokodo-ImageText__animation","prokodo-ImageText__image":"prokodo-ImageText__image","prokodo-ImageText__image__src":"prokodo-ImageText__image__src",gradientMove:v,fadeInKeyframe:E},o=k.create(q,"ImageText"),f=({animatedBorder:a,reverse:c,subTitle:r,title:s,content:m,animation:x,image:i,button:t})=>{const[p,g]=j.useState(!1),I=i?a?4:6:a?10:12;return e.jsxRuntimeExports.jsx("div",{className:o(),children:e.jsxRuntimeExports.jsxs(_.Grid,{className:o("grid",{"is-reverse":!!c}),children:[a&&e.jsxRuntimeExports.jsx(_.GridRow,{className:o("animated__border__wrapper"),sm:2,xs:3,children:e.jsxRuntimeExports.jsx(n.Animated,{className:o("animated__border",{"is-visible":p,[`${(a==null?void 0:a.direction)??"top-to-bottom"}`]:!!(a!=null&&a.direction)}),onAnimate:l=>g(l)})}),e.jsxRuntimeExports.jsx(_.GridRow,{className:o("content"),md:I,xs:10,children:e.jsxRuntimeExports.jsxs(n.Animated,{children:[r&&e.jsxRuntimeExports.jsx(d.Headline,{highlight:!0,className:o("sub__headline",void 0,r==null?void 0:r.className),size:"sm",type:"h3",variant:"primary",...r,children:r==null?void 0:r.content}),e.jsxRuntimeExports.jsx(d.Headline,{className:o("headline",void 0,s==null?void 0:s.className),size:"lg",type:"h2",...s,children:s.content}),h.isString(m)&&e.jsxRuntimeExports.jsx(N.RichText,{className:o("content__paragraph"),children:m}),t&&e.jsxRuntimeExports.jsx(R.Button,{variant:"outlined",...t,className:o("button",void 0,t==null?void 0:t.className)})]})}),i&&e.jsxRuntimeExports.jsx(_.GridRow,{className:o("image"),md:6,xs:10,children:e.jsxRuntimeExports.jsx(n.Animated,{className:o("animated__container"),children:x?e.jsxRuntimeExports.jsx(T.Lottie,{animationName:x,className:o("animation")}):e.jsxRuntimeExports.jsx(u.Image,{className:o("image__src"),...i})})})]})})};exports.ImageText=f;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i=require("./jsx-runtime-CITbqOLs.js"),V=require("@mui/base"),k=require("react"),T=require("./bem-DC5wv0dD.js"),h=require("./validations-Cnxtn28y.js"),ee=require("./Label-BvCzZIGM.js"),te="Input__field",oe="gradientMove",re="fadeInKeyframe",ne={"prokodo-Input":"prokodo-Input","prokodo-Input__label":"prokodo-Input__label","prokodo-Input--primary":"prokodo-Input--primary",Input__field:te,"prokodo-Input--secondary":"prokodo-Input--secondary","prokodo-Input--error":"prokodo-Input--error","prokodo-Input__field":"prokodo-Input__field","prokodo-Input__input":"prokodo-Input__input","prokodo-Input__input--multiline":"prokodo-Input__input--multiline","prokodo-Input__input--focused":"prokodo-Input__input--focused","prokodo-Input__input--disabled":"prokodo-Input__input--disabled","prokodo-Input__input__node":"prokodo-Input__input__node","prokodo-Input__input__node--multiline":"prokodo-Input__input__node--multiline","prokodo-Input__footer":"prokodo-Input__footer","prokodo-Input__helperText__wrapper":"prokodo-Input__helperText__wrapper","prokodo-Input__helperText":"prokodo-Input__helperText","prokodo-Input__helperText__content":"prokodo-Input__helperText__content","prokodo-Input__helperText__content--is-error":"prokodo-Input__helperText__content--is-error","prokodo-Input__helperText__legend":"prokodo-Input__helperText__legend","prokodo-Input__counter":"prokodo-Input__counter",gradientMove:oe,fadeInKeyframe:re},se=(r,t)=>typeof t>"u"?!1:r.test(String(t)),ie=(r,t,o,e)=>{let u=Number(r);if(typeof r=="string"&&isNaN(u)&&(u=r.length),t!==void 0&&u<t)return`${(e==null?void 0:e.min)??"Value must be greater than or equal to"} ${t}.`;if(o!==void 0&&u>o)return`${(e==null?void 0:e.max)??"Value must be less than or equal to"} ${o}.`},A=(r,t,o,e,u,l,n,_,s)=>{if(!s)return;const c=o==null||o==="";if(c&&e)return s(t,(_==null?void 0:_.required)??"This field is required. Please fill it out.");if(c&&(e===!1||e===void 0))return s(t);const v=ie(o,u,l,_);if(v!==void 0)return s(t,v);let f={text:/^[a-zA-Z\s,.!?'-]+$/,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,tel:/^\+?[1-9]\d{1,14}$/,url:/^(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})$/,number:/^-?\d+(\.\d+)?$/,color:/^#([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})$/,password:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[\W_]).{8,}$/};if(n!==void 0){const x=n.match(/^\/(.*)\/([gimsuy]*)$/);if(x){const[,g="",w]=x,$=new RegExp(g??"",w);f={...f,[String(r)]:RegExp($)}}}const R={text:"Text can only include letters and common punctuation.",email:"Please enter a valid email address (e.g., name@example.com).",tel:"Please enter a valid phone number.",url:"Please enter a valid URL.",number:"Please enter a valid number.",color:"Please enter a valid color code (e.g., #FFFFFF).",password:"Password must be at least 8 characters long and include uppercase, lowercase, numbers, and special characters.",..._},I=f[r];return I&&!se(I,o)?s(t,R[r]):s(t)},p=T.create(ne,"Input"),K=k.memo(({fullWidth:r,inputRef:t,hideCounter:o,type:e,color:u="primary",value:l,name:n,min:_,max:s,multiline:c,maxRows:v,minRows:f,rows:R,disabled:I,maxLength:x,placeholder:g,label:w,customRegexPattern:$,errorTranslations:W,labelProps:j={},className:U,fieldClassName:C,inputContainerClassName:D,inputClassName:G,required:q,hideLegend:H,errorText:b,helperText:z,onFocus:E,onBlur:N,onChange:S,onValidate:J,...L})=>{var M,P;const[m,Z]=k.useState(l),[O,y]=k.useState(!1);k.useEffect(()=>{h.isNull(l)||Z(l)},[l]);const Q=k.useCallback(()=>{switch(e){case"url":return"www.example.com";case"email":return"muster@example.com";case"tel":return"+49123456789";case"color":return"#FFFFFF";default:return g}},[e,g]),a=h.isString(b),F=q===!0,X=c?{multiline:c,maxRows:v,minRows:f??3,rows:R}:{multiline:!1,maxRows:void 0,minRows:void 0,type:e};return i.jsxRuntimeExports.jsxs("div",{className:p(void 0,{[u]:!!u},U),children:[h.isString(w)&&i.jsxRuntimeExports.jsx(ee.Label,{...j,className:p("label",void 0,j==null?void 0:j.className),error:a,htmlFor:n,label:w,required:F}),i.jsxRuntimeExports.jsx("div",{className:p("field",void 0,C),children:i.jsxRuntimeExports.jsx(V.Input,{"aria-required":F?"true":void 0,color:u,id:n,...L,...X,"aria-invalid":a,disabled:I,error:a,name:n,placeholder:Q(),required:F,value:m??"","aria-describedby":a?`${n}-error`:h.isString(z)?`${n}-helper`:void 0,className:p("input",{focused:O,multiline:!!c,disabled:!!I,fullWidth:!!r},D),slotProps:{input:{ref:t,className:p("input__node",{multiline:!!c},G)}},onBlur:d=>{N==null||N(d),y(!1)},onChange:d=>{var B;const{value:Y}=d.target;x!==void 0&&Y.length>x||(Z(d.target.value),A==null||A(e===void 0?"text":e,n,(B=d==null?void 0:d.target)==null?void 0:B.value,q,_,s,$,W,J),S&&S(d))},onFocus:d=>{E==null||E(d),y(!0)}})}),i.jsxRuntimeExports.jsxs("div",{className:p("footer"),children:[a||h.isString(z)||s!==void 0&&m!==void 0?i.jsxRuntimeExports.jsxs("div",{"aria-live":a?"assertive":"polite",className:p("helperText"),id:a?`${n}-error`:`${n}-helper`,role:a?"alert":void 0,children:[i.jsxRuntimeExports.jsx("span",{role:"alert",className:p("helperText__content",{"is-error":!!b}),children:b??z}),s!==void 0&&m!==void 0&&H===!1&&i.jsxRuntimeExports.jsxs("span",{className:p("helperText__legend"),children:[((M=m==null?void 0:m.toString())==null?void 0:M.length)??0," / ",s]})]}):i.jsxRuntimeExports.jsx("div",{className:p("helperText")}),x!==void 0&&e!=="number"&&(o===void 0||o===!1)&&i.jsxRuntimeExports.jsx("div",{className:p("counter"),children:i.jsxRuntimeExports.jsxs("span",{children:["(",l!==void 0?((P=String(l))==null?void 0:P.length)??0:0," /"," ",x,")"]})})]})]})});K.displayName="Input";exports.Input=K;
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import { j as d } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import { Input as Y } from "@mui/base";
|
|
3
|
+
import { memo as V, useState as B, useEffect as T, useCallback as ee } from "react";
|
|
4
|
+
import { c as oe } from "./bem-CYKrPjje.js";
|
|
5
|
+
import { a as te, i as g } from "./validations-B_cxltQ_.js";
|
|
6
|
+
import { L as re } from "./Label-DRUCdGoX.js";
|
|
7
|
+
const ne = "Input__field", pe = "gradientMove", de = "fadeInKeyframe", ie = {
|
|
8
|
+
"prokodo-Input": "prokodo-Input",
|
|
9
|
+
"prokodo-Input__label": "prokodo-Input__label",
|
|
10
|
+
"prokodo-Input--primary": "prokodo-Input--primary",
|
|
11
|
+
Input__field: ne,
|
|
12
|
+
"prokodo-Input--secondary": "prokodo-Input--secondary",
|
|
13
|
+
"prokodo-Input--error": "prokodo-Input--error",
|
|
14
|
+
"prokodo-Input__field": "prokodo-Input__field",
|
|
15
|
+
"prokodo-Input__input": "prokodo-Input__input",
|
|
16
|
+
"prokodo-Input__input--multiline": "prokodo-Input__input--multiline",
|
|
17
|
+
"prokodo-Input__input--focused": "prokodo-Input__input--focused",
|
|
18
|
+
"prokodo-Input__input--disabled": "prokodo-Input__input--disabled",
|
|
19
|
+
"prokodo-Input__input__node": "prokodo-Input__input__node",
|
|
20
|
+
"prokodo-Input__input__node--multiline": "prokodo-Input__input__node--multiline",
|
|
21
|
+
"prokodo-Input__footer": "prokodo-Input__footer",
|
|
22
|
+
"prokodo-Input__helperText__wrapper": "prokodo-Input__helperText__wrapper",
|
|
23
|
+
"prokodo-Input__helperText": "prokodo-Input__helperText",
|
|
24
|
+
"prokodo-Input__helperText__content": "prokodo-Input__helperText__content",
|
|
25
|
+
"prokodo-Input__helperText__content--is-error": "prokodo-Input__helperText__content--is-error",
|
|
26
|
+
"prokodo-Input__helperText__legend": "prokodo-Input__helperText__legend",
|
|
27
|
+
"prokodo-Input__counter": "prokodo-Input__counter",
|
|
28
|
+
gradientMove: pe,
|
|
29
|
+
fadeInKeyframe: de
|
|
30
|
+
}, se = (r, o) => typeof o > "u" ? !1 : r.test(String(o)), ue = (r, o, t, e) => {
|
|
31
|
+
let s = Number(r);
|
|
32
|
+
if (typeof r == "string" && isNaN(s) && (s = r.length), o !== void 0 && s < o)
|
|
33
|
+
return `${(e == null ? void 0 : e.min) ?? "Value must be greater than or equal to"} ${o}.`;
|
|
34
|
+
if (t !== void 0 && s > t)
|
|
35
|
+
return `${(e == null ? void 0 : e.max) ?? "Value must be less than or equal to"} ${t}.`;
|
|
36
|
+
}, Z = (r, o, t, e, s, a, n, _, p) => {
|
|
37
|
+
if (!p) return;
|
|
38
|
+
const c = t == null || t === "";
|
|
39
|
+
if (c && e)
|
|
40
|
+
return p(
|
|
41
|
+
o,
|
|
42
|
+
(_ == null ? void 0 : _.required) ?? "This field is required. Please fill it out."
|
|
43
|
+
);
|
|
44
|
+
if (c && (e === !1 || e === void 0))
|
|
45
|
+
return p(o);
|
|
46
|
+
const k = ue(t, s, a, _);
|
|
47
|
+
if (k !== void 0) return p(o, k);
|
|
48
|
+
let I = {
|
|
49
|
+
text: /^[a-zA-Z\s,.!?'-]+$/,
|
|
50
|
+
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,
|
|
51
|
+
tel: /^\+?[1-9]\d{1,14}$/,
|
|
52
|
+
url: /^(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})$/,
|
|
53
|
+
number: /^-?\d+(\.\d+)?$/,
|
|
54
|
+
color: /^#([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})$/,
|
|
55
|
+
password: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[\W_]).{8,}$/
|
|
56
|
+
};
|
|
57
|
+
if (n !== void 0) {
|
|
58
|
+
const f = n.match(/^\/(.*)\/([gimsuy]*)$/);
|
|
59
|
+
if (f) {
|
|
60
|
+
const [, h = "", v] = f, z = new RegExp(h ?? "", v);
|
|
61
|
+
I = {
|
|
62
|
+
...I,
|
|
63
|
+
[String(r)]: RegExp(z)
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
const $ = {
|
|
68
|
+
text: "Text can only include letters and common punctuation.",
|
|
69
|
+
email: "Please enter a valid email address (e.g., name@example.com).",
|
|
70
|
+
tel: "Please enter a valid phone number.",
|
|
71
|
+
url: "Please enter a valid URL.",
|
|
72
|
+
number: "Please enter a valid number.",
|
|
73
|
+
color: "Please enter a valid color code (e.g., #FFFFFF).",
|
|
74
|
+
password: "Password must be at least 8 characters long and include uppercase, lowercase, numbers, and special characters.",
|
|
75
|
+
..._
|
|
76
|
+
}, x = I[r];
|
|
77
|
+
return x && !se(x, t) ? p(o, $[r]) : p(o);
|
|
78
|
+
}, i = oe(ie, "Input"), ae = V(
|
|
79
|
+
({
|
|
80
|
+
fullWidth: r,
|
|
81
|
+
inputRef: o,
|
|
82
|
+
hideCounter: t,
|
|
83
|
+
type: e,
|
|
84
|
+
color: s = "primary",
|
|
85
|
+
value: a,
|
|
86
|
+
name: n,
|
|
87
|
+
min: _,
|
|
88
|
+
max: p,
|
|
89
|
+
multiline: c,
|
|
90
|
+
maxRows: k,
|
|
91
|
+
minRows: I,
|
|
92
|
+
rows: $,
|
|
93
|
+
disabled: x,
|
|
94
|
+
maxLength: f,
|
|
95
|
+
placeholder: h,
|
|
96
|
+
label: v,
|
|
97
|
+
customRegexPattern: z,
|
|
98
|
+
errorTranslations: K,
|
|
99
|
+
labelProps: w = {},
|
|
100
|
+
className: W,
|
|
101
|
+
fieldClassName: U,
|
|
102
|
+
inputContainerClassName: C,
|
|
103
|
+
inputClassName: D,
|
|
104
|
+
required: y,
|
|
105
|
+
hideLegend: G,
|
|
106
|
+
errorText: N,
|
|
107
|
+
helperText: b,
|
|
108
|
+
onFocus: j,
|
|
109
|
+
onBlur: F,
|
|
110
|
+
onChange: R,
|
|
111
|
+
onValidate: H,
|
|
112
|
+
...J
|
|
113
|
+
}) => {
|
|
114
|
+
var P, S;
|
|
115
|
+
const [m, E] = B(a), [L, M] = B(!1);
|
|
116
|
+
T(() => {
|
|
117
|
+
te(a) || E(a);
|
|
118
|
+
}, [a]);
|
|
119
|
+
const O = ee(() => {
|
|
120
|
+
switch (e) {
|
|
121
|
+
case "url":
|
|
122
|
+
return "www.example.com";
|
|
123
|
+
case "email":
|
|
124
|
+
return "muster@example.com";
|
|
125
|
+
case "tel":
|
|
126
|
+
return "+49123456789";
|
|
127
|
+
case "color":
|
|
128
|
+
return "#FFFFFF";
|
|
129
|
+
default:
|
|
130
|
+
return h;
|
|
131
|
+
}
|
|
132
|
+
}, [e, h]), l = g(N), A = y === !0, Q = c ? {
|
|
133
|
+
multiline: c,
|
|
134
|
+
maxRows: k,
|
|
135
|
+
minRows: I ?? 3,
|
|
136
|
+
rows: $
|
|
137
|
+
} : {
|
|
138
|
+
multiline: !1,
|
|
139
|
+
maxRows: void 0,
|
|
140
|
+
minRows: void 0,
|
|
141
|
+
type: e
|
|
142
|
+
};
|
|
143
|
+
return /* @__PURE__ */ d.jsxs("div", { className: i(void 0, { [s]: !!s }, W), children: [
|
|
144
|
+
g(v) && /* @__PURE__ */ d.jsx(
|
|
145
|
+
re,
|
|
146
|
+
{
|
|
147
|
+
...w,
|
|
148
|
+
className: i("label", void 0, w == null ? void 0 : w.className),
|
|
149
|
+
error: l,
|
|
150
|
+
htmlFor: n,
|
|
151
|
+
label: v,
|
|
152
|
+
required: A
|
|
153
|
+
}
|
|
154
|
+
),
|
|
155
|
+
/* @__PURE__ */ d.jsx("div", { className: i("field", void 0, U), children: /* @__PURE__ */ d.jsx(
|
|
156
|
+
Y,
|
|
157
|
+
{
|
|
158
|
+
"aria-required": A ? "true" : void 0,
|
|
159
|
+
color: s,
|
|
160
|
+
id: n,
|
|
161
|
+
...J,
|
|
162
|
+
...Q,
|
|
163
|
+
"aria-invalid": l,
|
|
164
|
+
disabled: x,
|
|
165
|
+
error: l,
|
|
166
|
+
name: n,
|
|
167
|
+
placeholder: O(),
|
|
168
|
+
required: A,
|
|
169
|
+
value: m ?? "",
|
|
170
|
+
"aria-describedby": l ? `${n}-error` : g(b) ? `${n}-helper` : void 0,
|
|
171
|
+
className: i(
|
|
172
|
+
"input",
|
|
173
|
+
{
|
|
174
|
+
focused: L,
|
|
175
|
+
multiline: !!c,
|
|
176
|
+
disabled: !!x,
|
|
177
|
+
fullWidth: !!r
|
|
178
|
+
},
|
|
179
|
+
C
|
|
180
|
+
),
|
|
181
|
+
slotProps: {
|
|
182
|
+
input: {
|
|
183
|
+
ref: o,
|
|
184
|
+
className: i(
|
|
185
|
+
"input__node",
|
|
186
|
+
{
|
|
187
|
+
multiline: !!c
|
|
188
|
+
},
|
|
189
|
+
D
|
|
190
|
+
)
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
onBlur: (u) => {
|
|
194
|
+
F == null || F(u), M(!1);
|
|
195
|
+
},
|
|
196
|
+
onChange: (u) => {
|
|
197
|
+
var q;
|
|
198
|
+
const { value: X } = u.target;
|
|
199
|
+
f !== void 0 && X.length > f || (E(u.target.value), Z == null || Z(
|
|
200
|
+
e === void 0 ? "text" : e,
|
|
201
|
+
n,
|
|
202
|
+
(q = u == null ? void 0 : u.target) == null ? void 0 : q.value,
|
|
203
|
+
y,
|
|
204
|
+
_,
|
|
205
|
+
p,
|
|
206
|
+
z,
|
|
207
|
+
K,
|
|
208
|
+
H
|
|
209
|
+
), R && R(u));
|
|
210
|
+
},
|
|
211
|
+
onFocus: (u) => {
|
|
212
|
+
j == null || j(u), M(!0);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
) }),
|
|
216
|
+
/* @__PURE__ */ d.jsxs("div", { className: i("footer"), children: [
|
|
217
|
+
l || g(b) || p !== void 0 && m !== void 0 ? /* @__PURE__ */ d.jsxs(
|
|
218
|
+
"div",
|
|
219
|
+
{
|
|
220
|
+
"aria-live": l ? "assertive" : "polite",
|
|
221
|
+
className: i("helperText"),
|
|
222
|
+
id: l ? `${n}-error` : `${n}-helper`,
|
|
223
|
+
role: l ? "alert" : void 0,
|
|
224
|
+
children: [
|
|
225
|
+
/* @__PURE__ */ d.jsx(
|
|
226
|
+
"span",
|
|
227
|
+
{
|
|
228
|
+
role: "alert",
|
|
229
|
+
className: i("helperText__content", {
|
|
230
|
+
"is-error": !!N
|
|
231
|
+
}),
|
|
232
|
+
children: N ?? b
|
|
233
|
+
}
|
|
234
|
+
),
|
|
235
|
+
p !== void 0 && m !== void 0 && G === !1 && /* @__PURE__ */ d.jsxs("span", { className: i("helperText__legend"), children: [
|
|
236
|
+
((P = m == null ? void 0 : m.toString()) == null ? void 0 : P.length) ?? 0,
|
|
237
|
+
" / ",
|
|
238
|
+
p
|
|
239
|
+
] })
|
|
240
|
+
]
|
|
241
|
+
}
|
|
242
|
+
) : /* @__PURE__ */ d.jsx("div", { className: i("helperText") }),
|
|
243
|
+
f !== void 0 && e !== "number" && (t === void 0 || t === !1) && /* @__PURE__ */ d.jsx("div", { className: i("counter"), children: /* @__PURE__ */ d.jsxs("span", { children: [
|
|
244
|
+
"(",
|
|
245
|
+
a !== void 0 ? ((S = String(a)) == null ? void 0 : S.length) ?? 0 : 0,
|
|
246
|
+
" /",
|
|
247
|
+
" ",
|
|
248
|
+
f,
|
|
249
|
+
")"
|
|
250
|
+
] }) })
|
|
251
|
+
] })
|
|
252
|
+
] });
|
|
253
|
+
}
|
|
254
|
+
);
|
|
255
|
+
ae.displayName = "Input";
|
|
256
|
+
export {
|
|
257
|
+
ae as I
|
|
258
|
+
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { j as _ } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import { memo as T, useState as b, useRef as g, createElement as j } from "react";
|
|
3
|
+
import { c as h } from "./bem-CYKrPjje.js";
|
|
4
|
+
import { b as v } from "./validations-B_cxltQ_.js";
|
|
5
|
+
import { I as w } from "./Input-CrNLI_OY.js";
|
|
6
|
+
const N = "gradientMove", K = "fadeInKeyframe", A = {
|
|
7
|
+
"prokodo-InputOTP": "prokodo-InputOTP",
|
|
8
|
+
"prokodo-InputOTP__label": "prokodo-InputOTP__label",
|
|
9
|
+
"prokodo-InputOTP__instruction": "prokodo-InputOTP__instruction",
|
|
10
|
+
"prokodo-InputOTP__field": "prokodo-InputOTP__field",
|
|
11
|
+
"prokodo-InputOTP__input": "prokodo-InputOTP__input",
|
|
12
|
+
"prokodo-InputOTP__input__container": "prokodo-InputOTP__input__container",
|
|
13
|
+
"prokodo-InputOTP__input__node": "prokodo-InputOTP__input__node",
|
|
14
|
+
gradientMove: N,
|
|
15
|
+
fadeInKeyframe: K
|
|
16
|
+
}, i = h(A, "InputOTP"), D = T(
|
|
17
|
+
({
|
|
18
|
+
className: m,
|
|
19
|
+
groupLabel: I,
|
|
20
|
+
groupInstruction: O,
|
|
21
|
+
length: s = 6,
|
|
22
|
+
onComplete: u,
|
|
23
|
+
onChange: c,
|
|
24
|
+
...l
|
|
25
|
+
}) => {
|
|
26
|
+
const [p, d] = b(Array(s).fill("")), n = g([]), P = (e, t) => {
|
|
27
|
+
var a;
|
|
28
|
+
if (e.length > 1) return;
|
|
29
|
+
const o = [...p];
|
|
30
|
+
o[t] = e, d(o), c && c(o.join("")), e && t < s - 1 && ((a = n.current[t + 1]) == null || a.focus()), o.every((r) => r !== "") && u && u(o.join(""));
|
|
31
|
+
}, k = (e, t) => {
|
|
32
|
+
var o, a, r;
|
|
33
|
+
e.key === "Backspace" && t > 0 && v(p) && p[t] !== void 0 && ((o = n.current[t - 1]) == null || o.focus()), e.key === "ArrowLeft" && t > 0 ? (a = n.current[t - 1]) == null || a.focus() : e.key === "ArrowRight" && t < s - 1 && ((r = n.current[t + 1]) == null || r.focus());
|
|
34
|
+
}, y = (e) => {
|
|
35
|
+
var a;
|
|
36
|
+
const t = e.clipboardData.getData("text").slice(0, s).split(""), o = [...p];
|
|
37
|
+
if (t.forEach((r, f) => {
|
|
38
|
+
f < s && (o[f] = r, n.current[f] && (n.current[f].value = r));
|
|
39
|
+
}), d(o), c && c(o.join("")), t.length === s && u)
|
|
40
|
+
u(o.join(""));
|
|
41
|
+
else {
|
|
42
|
+
const r = t.length;
|
|
43
|
+
r < s && ((a = n.current[r]) == null || a.focus());
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
return /* @__PURE__ */ _.jsxs(
|
|
47
|
+
"div",
|
|
48
|
+
{
|
|
49
|
+
"aria-describedby": "otp-instructions",
|
|
50
|
+
"aria-labelledby": "otp-group-label",
|
|
51
|
+
className: i(void 0, void 0, m),
|
|
52
|
+
role: "group",
|
|
53
|
+
onPaste: y,
|
|
54
|
+
children: [
|
|
55
|
+
/* @__PURE__ */ _.jsx("span", { className: i("label"), id: "otp-group-label", children: I ?? "Enter your OTP" }),
|
|
56
|
+
/* @__PURE__ */ _.jsx("span", { className: i("instruction"), id: "otp-instructions", children: O ?? "Use the arrow keys to navigate between digits." }),
|
|
57
|
+
p.map((e, t) => /* @__PURE__ */ j(
|
|
58
|
+
w,
|
|
59
|
+
{
|
|
60
|
+
placeholder: "x",
|
|
61
|
+
...l,
|
|
62
|
+
key: `otp-${t}`,
|
|
63
|
+
hideCounter: !0,
|
|
64
|
+
"aria-label": `${(l == null ? void 0 : l["aria-label"]) ?? "OTP digit"} ${t + 1}`,
|
|
65
|
+
className: i("input"),
|
|
66
|
+
fieldClassName: i("field"),
|
|
67
|
+
inputClassName: i("input__node"),
|
|
68
|
+
inputContainerClassName: i("input__container"),
|
|
69
|
+
maxLength: 1,
|
|
70
|
+
name: `otp-${t}`,
|
|
71
|
+
type: "text",
|
|
72
|
+
value: e,
|
|
73
|
+
inputRef: (o) => {
|
|
74
|
+
n.current[t] = o;
|
|
75
|
+
},
|
|
76
|
+
onChange: (o) => P(o.target.value, t),
|
|
77
|
+
onKeyDown: (o) => k(o, t)
|
|
78
|
+
}
|
|
79
|
+
))
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
D.displayName = "InputOTP";
|
|
86
|
+
export {
|
|
87
|
+
D as I
|
|
88
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const f=require("./jsx-runtime-CITbqOLs.js"),d=require("react"),j=require("./bem-DC5wv0dD.js"),g=require("./validations-Cnxtn28y.js"),v=require("./Input-BEO9ig1R.js"),h="gradientMove",w="fadeInKeyframe",N={"prokodo-InputOTP":"prokodo-InputOTP","prokodo-InputOTP__label":"prokodo-InputOTP__label","prokodo-InputOTP__instruction":"prokodo-InputOTP__instruction","prokodo-InputOTP__field":"prokodo-InputOTP__field","prokodo-InputOTP__input":"prokodo-InputOTP__input","prokodo-InputOTP__input__container":"prokodo-InputOTP__input__container","prokodo-InputOTP__input__node":"prokodo-InputOTP__input__node",gradientMove:h,fadeInKeyframe:w},i=j.create(N,"InputOTP"),O=d.memo(({className:P,groupLabel:k,groupInstruction:m,length:a=6,onComplete:p,onChange:c,...l})=>{const[u,I]=d.useState(Array(a).fill("")),r=d.useRef([]),T=(o,t)=>{var s;if(o.length>1)return;const e=[...u];e[t]=o,I(e),c&&c(e.join("")),o&&t<a-1&&((s=r.current[t+1])==null||s.focus()),e.every(n=>n!=="")&&p&&p(e.join(""))},y=(o,t)=>{var e,s,n;o.key==="Backspace"&&t>0&&g.isArray(u)&&u[t]!==void 0&&((e=r.current[t-1])==null||e.focus()),o.key==="ArrowLeft"&&t>0?(s=r.current[t-1])==null||s.focus():o.key==="ArrowRight"&&t<a-1&&((n=r.current[t+1])==null||n.focus())},b=o=>{var s;const t=o.clipboardData.getData("text").slice(0,a).split(""),e=[...u];if(t.forEach((n,_)=>{_<a&&(e[_]=n,r.current[_]&&(r.current[_].value=n))}),I(e),c&&c(e.join("")),t.length===a&&p)p(e.join(""));else{const n=t.length;n<a&&((s=r.current[n])==null||s.focus())}};return f.jsxRuntimeExports.jsxs("div",{"aria-describedby":"otp-instructions","aria-labelledby":"otp-group-label",className:i(void 0,void 0,P),role:"group",onPaste:b,children:[f.jsxRuntimeExports.jsx("span",{className:i("label"),id:"otp-group-label",children:k??"Enter your OTP"}),f.jsxRuntimeExports.jsx("span",{className:i("instruction"),id:"otp-instructions",children:m??"Use the arrow keys to navigate between digits."}),u.map((o,t)=>d.createElement(v.Input,{placeholder:"x",...l,key:`otp-${t}`,hideCounter:!0,"aria-label":`${(l==null?void 0:l["aria-label"])??"OTP digit"} ${t+1}`,className:i("input"),fieldClassName:i("field"),inputClassName:i("input__node"),inputContainerClassName:i("input__container"),maxLength:1,name:`otp-${t}`,type:"text",value:o,inputRef:e=>{r.current[t]=e},onChange:e=>T(e.target.value,t),onKeyDown:e=>y(e,t)}))]})});O.displayName="InputOTP";exports.InputOTP=O;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i=require("./jsx-runtime-CITbqOLs.js"),g=require("react"),u=require("./bem-DC5wv0dD.js"),j="gradientMove",_="fadeInKeyframe",L={"prokodo-Label":"prokodo-Label","prokodo-Label__highlighted":"prokodo-Label__highlighted","prokodo-Label__highlighted--error":"prokodo-Label__highlighted--error","prokodo-Label__text":"prokodo-Label__text",gradientMove:j,fadeInKeyframe:_},r=u.create(L,"Label"),n=g.memo(({className:d,htmlFor:c,required:h,label:a,contentProps:l,textProps:e,error:m,children:s,...t})=>{const o=a==null?void 0:a.split(" ");return o?i.jsxRuntimeExports.jsxs("label",{...t,className:r(void 0,void 0,d),htmlFor:c,children:[i.jsxRuntimeExports.jsxs("span",{...l,children:[i.jsxRuntimeExports.jsxs("i",{...e,className:r("highlighted",{error:!!m},e==null?void 0:e.className),children:[o==null?void 0:o[0]," "]}),i.jsxRuntimeExports.jsxs("i",{...e,className:r("text",void 0,e==null?void 0:e.className),children:[o==null?void 0:o.slice(1).join(" ")," ",!!h&&i.jsxRuntimeExports.jsx("span",{"aria-hidden":"true",children:"*"})]})]}),s]}):s});n.displayName="Label";exports.Label=n;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { j as a } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import { memo as g } from "react";
|
|
3
|
+
import { c as _ } from "./bem-CYKrPjje.js";
|
|
4
|
+
const f = "gradientMove", L = "fadeInKeyframe", j = {
|
|
5
|
+
"prokodo-Label": "prokodo-Label",
|
|
6
|
+
"prokodo-Label__highlighted": "prokodo-Label__highlighted",
|
|
7
|
+
"prokodo-Label__highlighted--error": "prokodo-Label__highlighted--error",
|
|
8
|
+
"prokodo-Label__text": "prokodo-Label__text",
|
|
9
|
+
gradientMove: f,
|
|
10
|
+
fadeInKeyframe: L
|
|
11
|
+
}, i = _(j, "Label"), k = g(
|
|
12
|
+
({
|
|
13
|
+
className: n,
|
|
14
|
+
htmlFor: s,
|
|
15
|
+
required: h,
|
|
16
|
+
label: r,
|
|
17
|
+
contentProps: l,
|
|
18
|
+
textProps: o,
|
|
19
|
+
error: m,
|
|
20
|
+
children: d,
|
|
21
|
+
...c
|
|
22
|
+
}) => {
|
|
23
|
+
const e = r == null ? void 0 : r.split(" ");
|
|
24
|
+
return e ? /* @__PURE__ */ a.jsxs(
|
|
25
|
+
"label",
|
|
26
|
+
{
|
|
27
|
+
...c,
|
|
28
|
+
className: i(void 0, void 0, n),
|
|
29
|
+
htmlFor: s,
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ a.jsxs("span", { ...l, children: [
|
|
32
|
+
/* @__PURE__ */ a.jsxs(
|
|
33
|
+
"i",
|
|
34
|
+
{
|
|
35
|
+
...o,
|
|
36
|
+
className: i(
|
|
37
|
+
"highlighted",
|
|
38
|
+
{
|
|
39
|
+
error: !!m
|
|
40
|
+
},
|
|
41
|
+
o == null ? void 0 : o.className
|
|
42
|
+
),
|
|
43
|
+
children: [
|
|
44
|
+
e == null ? void 0 : e[0],
|
|
45
|
+
" "
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
),
|
|
49
|
+
/* @__PURE__ */ a.jsxs(
|
|
50
|
+
"i",
|
|
51
|
+
{
|
|
52
|
+
...o,
|
|
53
|
+
className: i("text", void 0, o == null ? void 0 : o.className),
|
|
54
|
+
children: [
|
|
55
|
+
e == null ? void 0 : e.slice(1).join(" "),
|
|
56
|
+
" ",
|
|
57
|
+
!!h && /* @__PURE__ */ a.jsx("span", { "aria-hidden": "true", children: "*" })
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
] }),
|
|
62
|
+
d
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
) : d;
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
k.displayName = "Label";
|
|
69
|
+
export {
|
|
70
|
+
k as L
|
|
71
|
+
};
|