@prokodo/ui 0.0.24 → 0.0.26
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/dist/components/accordion/Accordion.js +65 -65
- package/dist/components/animated/Animated.js +17 -17
- package/dist/components/animatedText/AnimatedText.js +4 -4
- package/dist/components/avatar/Avatar.js +34 -34
- package/dist/components/base-link/BaseLink.js +12 -12
- package/dist/components/button/Button.js +48 -48
- package/dist/components/calendly/Calendly.js +32 -32
- package/dist/components/card/Card.js +107 -107
- package/dist/components/carousel/Carousel.js +106 -106
- package/dist/components/chip/Chip.js +26 -26
- package/dist/components/datePicker/DatePicker.js +37 -37
- package/dist/components/dialog/Dialog.js +82 -82
- package/dist/components/drawer/Drawer.js +48 -48
- package/dist/components/form/Form.js +94 -94
- package/dist/components/form/FormField.js +41 -41
- package/dist/components/form/FormResponse.js +22 -22
- package/dist/components/grid/Grid.js +8 -8
- package/dist/components/grid/GridRow.js +10 -10
- package/dist/components/headline/Headline.js +28 -28
- package/dist/components/icon/Icon.js +4 -4
- package/dist/components/image/Image.js +15 -15
- package/dist/components/image-text/ImageText.js +48 -48
- package/dist/components/input/Input.js +121 -121
- package/dist/components/inputOTP/InputOTP.js +24 -24
- package/dist/components/label/Label.js +26 -26
- package/dist/components/link/Link.js +27 -27
- package/dist/components/list/List.js +75 -75
- package/dist/components/loading/Loading.js +17 -17
- package/dist/components/lottie/Lottie.js +23 -23
- package/dist/components/map/Map.js +19 -19
- package/dist/components/post-item/PostItem.js +73 -73
- package/dist/components/post-item/PostItemAuthor.js +16 -16
- package/dist/components/post-item/index.js +4 -2
- package/dist/components/post-teaser/PostTeaser.js +76 -76
- package/dist/components/post-widget/PostWidget.js +63 -63
- package/dist/components/post-widget-carousel/PostWidgetCarousel.js +67 -67
- package/dist/components/quote/Quote.js +40 -40
- package/dist/components/rich-text/RichText.js +76 -76
- package/dist/components/select/Select.js +92 -92
- package/dist/components/skeleton/Skeleton.js +8 -8
- package/dist/components/slider/Slider.js +50 -50
- package/dist/components/stepper/Stepper.js +41 -41
- package/dist/components/switch/Switch.js +32 -32
- package/dist/components/table/Table.js +31 -31
- package/dist/components/teaser/Teaser.js +55 -55
- package/dist/constants/project.js +1 -1
- 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 +23 -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/Portal/Portal.js +22 -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/Select/Select.js +46 -46
- 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 +141 -141
- 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 +33 -33
- 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 +31 -31
- 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 +14 -14
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/components/post-item/index.d.ts +1 -0
- package/package.json +7 -3
- package/dist/_virtual/jsx-runtime.js +0 -5
- package/dist/_virtual/jsx-runtime2.js +0 -4
- package/dist/_virtual/react-jsx-runtime.development.js +0 -4
- package/dist/_virtual/react-jsx-runtime.production.js +0 -4
- package/dist/node_modules/.pnpm/react@19.1.0/node_modules/react/cjs/react-jsx-runtime.development.js +0 -247
- package/dist/node_modules/.pnpm/react@19.1.0/node_modules/react/cjs/react-jsx-runtime.production.js +0 -35
- package/dist/node_modules/.pnpm/react@19.1.0/node_modules/react/jsx-runtime.js +0 -10
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useMemo as
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as b, useCallback as p } from "react";
|
|
3
3
|
import I from "react-markdown";
|
|
4
4
|
import $ from "remark-breaks";
|
|
5
5
|
import G from "remark-gfm";
|
|
6
6
|
import { create as L } from "../../helpers/bem.js";
|
|
7
7
|
import w from "./Headline.module.scss.js";
|
|
8
8
|
import { AnimatedText as C } from "../animatedText/AnimatedText.js";
|
|
9
|
-
const
|
|
9
|
+
const k = L(w, "Headline"), M = [
|
|
10
10
|
"inherit",
|
|
11
11
|
"primary",
|
|
12
12
|
"secondary",
|
|
13
13
|
"white"
|
|
14
14
|
], q = ({
|
|
15
|
-
animated:
|
|
16
|
-
animationProps:
|
|
17
|
-
type:
|
|
15
|
+
animated: m,
|
|
16
|
+
animationProps: s = {},
|
|
17
|
+
type: o = "h3",
|
|
18
18
|
size: r = "md",
|
|
19
|
-
highlight:
|
|
19
|
+
highlight: T,
|
|
20
20
|
schema: c = {},
|
|
21
|
-
className:
|
|
21
|
+
className: y,
|
|
22
22
|
align: a,
|
|
23
|
-
isRichtext:
|
|
24
|
-
variant:
|
|
23
|
+
isRichtext: S = !1,
|
|
24
|
+
variant: t = "inherit",
|
|
25
25
|
...n
|
|
26
26
|
}) => {
|
|
27
|
-
const i = !!
|
|
28
|
-
[
|
|
27
|
+
const i = !!T && M.includes(t), x = {
|
|
28
|
+
[t]: !!t,
|
|
29
29
|
"is-highlighted": i,
|
|
30
30
|
highlighted: i,
|
|
31
|
-
[`${
|
|
31
|
+
[`${t}--highlighted`]: i,
|
|
32
32
|
[r]: typeof r == "string" && !!r,
|
|
33
33
|
[`${a}`]: !!a
|
|
34
|
-
}, d =
|
|
34
|
+
}, d = k(void 0, x, y), h = b(() => typeof r == "number" ? {
|
|
35
35
|
fontSize: `${r}em`
|
|
36
|
-
} : {}, [r]), f = typeof n.children == "string" ? n.children : void 0,
|
|
36
|
+
} : {}, [r]), f = typeof n.children == "string" ? n.children : void 0, g = b(
|
|
37
37
|
() => ({
|
|
38
38
|
"aria-label": f,
|
|
39
39
|
className: d,
|
|
@@ -42,30 +42,30 @@ const b = L(w, "Headline"), E = [
|
|
|
42
42
|
...c
|
|
43
43
|
}),
|
|
44
44
|
[f, d, h, c]
|
|
45
|
-
),
|
|
46
|
-
(e) =>
|
|
47
|
-
[
|
|
48
|
-
),
|
|
45
|
+
), u = p(
|
|
46
|
+
(e) => m ? /* @__PURE__ */ l(C, { ...s, children: e }) : e,
|
|
47
|
+
[m, s]
|
|
48
|
+
), H = p(
|
|
49
49
|
(e) => {
|
|
50
|
-
if (!/^h[1-6]$/.test(
|
|
51
|
-
const
|
|
52
|
-
return /* @__PURE__ */
|
|
50
|
+
if (!/^h[1-6]$/.test(o)) return null;
|
|
51
|
+
const B = e.children;
|
|
52
|
+
return /* @__PURE__ */ l(o, { ...e, "aria-level": parseInt(o[1] ?? "", 10), ...g, children: u(B) });
|
|
53
53
|
},
|
|
54
|
-
[
|
|
54
|
+
[o, g, u]
|
|
55
55
|
);
|
|
56
|
-
return
|
|
56
|
+
return S ? /* @__PURE__ */ l(
|
|
57
57
|
I,
|
|
58
58
|
{
|
|
59
|
-
className:
|
|
59
|
+
className: k("headline"),
|
|
60
60
|
remarkPlugins: [G, $],
|
|
61
61
|
components: {
|
|
62
|
-
p: (e) =>
|
|
62
|
+
p: (e) => H(e)
|
|
63
63
|
},
|
|
64
64
|
children: n.children
|
|
65
65
|
}
|
|
66
|
-
) :
|
|
66
|
+
) : H(n);
|
|
67
67
|
};
|
|
68
68
|
export {
|
|
69
69
|
q as Headline,
|
|
70
|
-
|
|
70
|
+
M as POSSIBLE_HIGHLIGHTS
|
|
71
71
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import { PROKODO_UI_VERSION as i } from "../../constants/project.js";
|
|
3
3
|
import { create as a } from "../../helpers/bem.js";
|
|
4
4
|
import m from "./Icon.module.scss.js";
|
|
@@ -17,10 +17,10 @@ const p = a(m, "Icon"), u = (e) => {
|
|
|
17
17
|
default:
|
|
18
18
|
return e ?? 16;
|
|
19
19
|
}
|
|
20
|
-
}, g = (e) => `https://cdn.jsdelivr.net/gh/prokodo-agency/ui@v${i}/assets/icons/${e.replace(/Icon$/, "").replace(/([a-z])([A-Z0-9])/g, "$1_$2").replace(/([0-9])([a-zA-Z])/g, "$1_$2").toLowerCase()}_icon.svg`,
|
|
20
|
+
}, g = (e) => `https://cdn.jsdelivr.net/gh/prokodo-agency/ui@v${i}/assets/icons/${e.replace(/Icon$/, "").replace(/([a-z])([A-Z0-9])/g, "$1_$2").replace(/([0-9])([a-zA-Z])/g, "$1_$2").toLowerCase()}_icon.svg`, $ = ({ name: e, size: o, label: r, className: s = "", ...n }) => {
|
|
21
21
|
if (!e) return null;
|
|
22
22
|
const t = u(o);
|
|
23
|
-
return /* @__PURE__ */ c
|
|
23
|
+
return /* @__PURE__ */ c(
|
|
24
24
|
"img",
|
|
25
25
|
{
|
|
26
26
|
alt: r ?? "",
|
|
@@ -35,6 +35,6 @@ const p = a(m, "Icon"), u = (e) => {
|
|
|
35
35
|
);
|
|
36
36
|
};
|
|
37
37
|
export {
|
|
38
|
-
|
|
38
|
+
$ as Icon,
|
|
39
39
|
u as getIconSize
|
|
40
40
|
};
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { create as
|
|
3
|
-
import { isString as
|
|
4
|
-
import
|
|
5
|
-
const
|
|
1
|
+
import { jsxs as g, jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { create as d } from "../../helpers/bem.js";
|
|
3
|
+
import { isString as f } from "../../helpers/validations.js";
|
|
4
|
+
import l from "./Image.module.scss.js";
|
|
5
|
+
const e = d(l, "Image"), I = ({
|
|
6
6
|
alt: o,
|
|
7
|
-
caption:
|
|
8
|
-
containerClassName:
|
|
9
|
-
captionClassName:
|
|
7
|
+
caption: r,
|
|
8
|
+
containerClassName: t,
|
|
9
|
+
captionClassName: s,
|
|
10
10
|
className: a,
|
|
11
11
|
imageComponent: n = "img",
|
|
12
12
|
...c
|
|
13
13
|
}) => {
|
|
14
|
-
const
|
|
14
|
+
const i = () => /* @__PURE__ */ m(
|
|
15
15
|
n,
|
|
16
16
|
{
|
|
17
17
|
alt: o ?? "",
|
|
18
|
-
className:
|
|
18
|
+
className: e("image", void 0, a),
|
|
19
19
|
...c
|
|
20
20
|
}
|
|
21
21
|
);
|
|
22
|
-
return
|
|
23
|
-
|
|
24
|
-
/* @__PURE__ */
|
|
25
|
-
] }) :
|
|
22
|
+
return f(r) ? /* @__PURE__ */ g("figure", { className: e(void 0, void 0, t), children: [
|
|
23
|
+
i(),
|
|
24
|
+
/* @__PURE__ */ m("figcaption", { className: e("caption", void 0, s), children: r })
|
|
25
|
+
] }) : i();
|
|
26
26
|
};
|
|
27
27
|
export {
|
|
28
|
-
|
|
28
|
+
I as Image
|
|
29
29
|
};
|
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useState as
|
|
3
|
-
import { create as
|
|
4
|
-
import { isString as
|
|
5
|
-
import
|
|
6
|
-
import { RichText as
|
|
7
|
-
import { Grid as
|
|
1
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
2
|
+
import { useState as d } from "react";
|
|
3
|
+
import { create as v } from "../../helpers/bem.js";
|
|
4
|
+
import { isString as y } from "../../helpers/validations.js";
|
|
5
|
+
import I from "./ImageText.module.scss.js";
|
|
6
|
+
import { RichText as j } from "../rich-text/RichText.js";
|
|
7
|
+
import { Grid as w } from "../grid/Grid.js";
|
|
8
8
|
import { GridRow as o } from "../grid/GridRow.js";
|
|
9
9
|
import { Animated as n } from "../animated/Animated.js";
|
|
10
|
-
import { Headline as
|
|
11
|
-
import { Button as
|
|
12
|
-
import { Lottie as
|
|
13
|
-
import { Image as
|
|
14
|
-
const
|
|
10
|
+
import { Headline as N } from "../headline/Headline.js";
|
|
11
|
+
import { Button as z } from "../button/Button.js";
|
|
12
|
+
import { Lottie as A } from "../lottie/Lottie.js";
|
|
13
|
+
import { Image as G } from "../image/Image.js";
|
|
14
|
+
const s = v(I, "ImageText"), J = ({
|
|
15
15
|
animatedBorder: a,
|
|
16
|
-
reverse:
|
|
17
|
-
subTitle:
|
|
18
|
-
title:
|
|
16
|
+
reverse: f,
|
|
17
|
+
subTitle: c,
|
|
18
|
+
title: e,
|
|
19
19
|
content: l,
|
|
20
20
|
animation: p,
|
|
21
21
|
image: i,
|
|
22
|
-
button:
|
|
22
|
+
button: r
|
|
23
23
|
}) => {
|
|
24
|
-
const [
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
|
|
24
|
+
const [t, _] = d(!1), g = i ? a ? 4 : 6 : a ? 10 : 12;
|
|
25
|
+
return /* @__PURE__ */ m("div", { className: s(), children: /* @__PURE__ */ h(
|
|
26
|
+
w,
|
|
27
27
|
{
|
|
28
|
-
className:
|
|
29
|
-
"is-reverse": !!
|
|
28
|
+
className: s("grid", {
|
|
29
|
+
"is-reverse": !!f
|
|
30
30
|
}),
|
|
31
31
|
children: [
|
|
32
|
-
a && /* @__PURE__ */
|
|
32
|
+
a && /* @__PURE__ */ m(o, { className: s("animated__border__wrapper"), sm: 2, xs: 3, children: /* @__PURE__ */ m(
|
|
33
33
|
n,
|
|
34
34
|
{
|
|
35
|
-
className:
|
|
36
|
-
"is-visible":
|
|
35
|
+
className: s("animated__border", {
|
|
36
|
+
"is-visible": t,
|
|
37
37
|
[`${(a == null ? void 0 : a.direction) ?? "top-to-bottom"}`]: !!(a != null && a.direction)
|
|
38
38
|
}),
|
|
39
|
-
onAnimate: (
|
|
39
|
+
onAnimate: (x) => _(x)
|
|
40
40
|
}
|
|
41
41
|
) }),
|
|
42
|
-
/* @__PURE__ */
|
|
42
|
+
/* @__PURE__ */ m(o, { className: s("content"), md: g, xs: 10, children: /* @__PURE__ */ h(
|
|
43
43
|
n,
|
|
44
44
|
{
|
|
45
45
|
children: [
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
c && /* @__PURE__ */ m(
|
|
47
|
+
N,
|
|
48
48
|
{
|
|
49
49
|
highlight: !0,
|
|
50
|
-
className:
|
|
50
|
+
className: s("sub__headline", void 0, c == null ? void 0 : c.className),
|
|
51
51
|
size: "sm",
|
|
52
52
|
type: "h3",
|
|
53
53
|
variant: "primary",
|
|
54
|
-
...
|
|
55
|
-
children:
|
|
54
|
+
...c,
|
|
55
|
+
children: c == null ? void 0 : c.content
|
|
56
56
|
}
|
|
57
57
|
),
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
|
|
58
|
+
/* @__PURE__ */ m(
|
|
59
|
+
N,
|
|
60
60
|
{
|
|
61
|
-
className:
|
|
61
|
+
className: s("headline", void 0, e == null ? void 0 : e.className),
|
|
62
62
|
size: "lg",
|
|
63
63
|
type: "h2",
|
|
64
|
-
...
|
|
65
|
-
children:
|
|
64
|
+
...e,
|
|
65
|
+
children: e.content
|
|
66
66
|
}
|
|
67
67
|
),
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
y(l) && /* @__PURE__ */ m(j, { className: s("content__paragraph"), children: l }),
|
|
69
|
+
r && /* @__PURE__ */ m(
|
|
70
|
+
z,
|
|
71
71
|
{
|
|
72
72
|
variant: "outlined",
|
|
73
|
-
...
|
|
74
|
-
className:
|
|
73
|
+
...r,
|
|
74
|
+
className: s("button", void 0, r == null ? void 0 : r.className)
|
|
75
75
|
}
|
|
76
76
|
)
|
|
77
77
|
]
|
|
78
78
|
}
|
|
79
79
|
) }),
|
|
80
|
-
i && /* @__PURE__ */
|
|
80
|
+
i && /* @__PURE__ */ m(o, { className: s("image"), md: 6, xs: 10, children: /* @__PURE__ */ m(
|
|
81
81
|
n,
|
|
82
82
|
{
|
|
83
|
-
className:
|
|
84
|
-
children: p ? /* @__PURE__ */
|
|
85
|
-
|
|
83
|
+
className: s("animated__container"),
|
|
84
|
+
children: p ? /* @__PURE__ */ m(
|
|
85
|
+
A,
|
|
86
86
|
{
|
|
87
87
|
animationName: p,
|
|
88
|
-
className:
|
|
88
|
+
className: s("animation")
|
|
89
89
|
}
|
|
90
|
-
) : /* @__PURE__ */
|
|
90
|
+
) : /* @__PURE__ */ m(G, { className: s("image__src"), ...i })
|
|
91
91
|
}
|
|
92
92
|
) })
|
|
93
93
|
]
|
|
@@ -95,5 +95,5 @@ const m = g(v, "ImageText"), F = ({
|
|
|
95
95
|
) });
|
|
96
96
|
};
|
|
97
97
|
export {
|
|
98
|
-
|
|
98
|
+
J as ImageText
|
|
99
99
|
};
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Input as
|
|
3
|
-
import { memo as
|
|
4
|
-
import { create as
|
|
5
|
-
import { isNull as se, isString as
|
|
6
|
-
import
|
|
7
|
-
import { handleValidation as
|
|
8
|
-
import { Label as
|
|
9
|
-
const
|
|
1
|
+
import { jsxs as d, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { Input as L } from "@mui/base";
|
|
3
|
+
import { memo as P, useState as x, useEffect as ee, useCallback as re } from "react";
|
|
4
|
+
import { create as ie } from "../../helpers/bem.js";
|
|
5
|
+
import { isNull as se, isString as v } from "../../helpers/validations.js";
|
|
6
|
+
import te from "./Input.module.scss.js";
|
|
7
|
+
import { handleValidation as oe } from "./InputValidation.js";
|
|
8
|
+
import { Label as ae } from "../label/Label.js";
|
|
9
|
+
const e = ie(te, "Input"), le = P(
|
|
10
10
|
({
|
|
11
|
-
fullWidth:
|
|
12
|
-
inputRef:
|
|
13
|
-
hideCounter:
|
|
14
|
-
type:
|
|
15
|
-
color:
|
|
16
|
-
value:
|
|
11
|
+
fullWidth: V,
|
|
12
|
+
inputRef: W,
|
|
13
|
+
hideCounter: _,
|
|
14
|
+
type: t,
|
|
15
|
+
color: f = "primary",
|
|
16
|
+
value: o,
|
|
17
17
|
name: i,
|
|
18
|
-
min:
|
|
19
|
-
max:
|
|
20
|
-
multiline:
|
|
21
|
-
maxRows:
|
|
22
|
-
minRows:
|
|
23
|
-
rows:
|
|
24
|
-
disabled:
|
|
25
|
-
maxLength:
|
|
26
|
-
placeholder:
|
|
27
|
-
label:
|
|
28
|
-
customRegexPattern:
|
|
29
|
-
errorTranslations:
|
|
30
|
-
labelProps:
|
|
31
|
-
className:
|
|
32
|
-
fieldClassName:
|
|
33
|
-
inputContainerClassName:
|
|
34
|
-
inputClassName:
|
|
35
|
-
required:
|
|
36
|
-
hideLegend:
|
|
37
|
-
errorText:
|
|
38
|
-
helperText:
|
|
39
|
-
onFocus:
|
|
40
|
-
onBlur:
|
|
41
|
-
onChange:
|
|
42
|
-
onValidate:
|
|
43
|
-
...
|
|
18
|
+
min: z,
|
|
19
|
+
max: n,
|
|
20
|
+
multiline: c,
|
|
21
|
+
maxRows: A,
|
|
22
|
+
minRows: C,
|
|
23
|
+
rows: D,
|
|
24
|
+
disabled: F,
|
|
25
|
+
maxLength: m,
|
|
26
|
+
placeholder: I,
|
|
27
|
+
label: $,
|
|
28
|
+
customRegexPattern: G,
|
|
29
|
+
errorTranslations: H,
|
|
30
|
+
labelProps: u = {},
|
|
31
|
+
className: J,
|
|
32
|
+
fieldClassName: K,
|
|
33
|
+
inputContainerClassName: M,
|
|
34
|
+
inputClassName: O,
|
|
35
|
+
required: R,
|
|
36
|
+
hideLegend: Q,
|
|
37
|
+
errorText: p,
|
|
38
|
+
helperText: h,
|
|
39
|
+
onFocus: N,
|
|
40
|
+
onBlur: g,
|
|
41
|
+
onChange: S,
|
|
42
|
+
onValidate: T,
|
|
43
|
+
...U
|
|
44
44
|
}) => {
|
|
45
|
-
var
|
|
46
|
-
const [
|
|
47
|
-
|
|
48
|
-
se(
|
|
49
|
-
}, [
|
|
50
|
-
const
|
|
51
|
-
switch (
|
|
45
|
+
var j, E;
|
|
46
|
+
const [a, q] = x(o), [X, B] = x(!1);
|
|
47
|
+
ee(() => {
|
|
48
|
+
se(o) || q(o);
|
|
49
|
+
}, [o]);
|
|
50
|
+
const Y = re(() => {
|
|
51
|
+
switch (t) {
|
|
52
52
|
case "url":
|
|
53
53
|
return "www.example.com";
|
|
54
54
|
case "email":
|
|
@@ -58,132 +58,132 @@ const r = re(ie, "Input"), ae = L(
|
|
|
58
58
|
case "color":
|
|
59
59
|
return "#FFFFFF";
|
|
60
60
|
default:
|
|
61
|
-
return
|
|
61
|
+
return I;
|
|
62
62
|
}
|
|
63
|
-
}, [
|
|
64
|
-
multiline:
|
|
65
|
-
maxRows:
|
|
66
|
-
minRows:
|
|
67
|
-
rows:
|
|
63
|
+
}, [t, I]), s = v(p), w = R === !0, Z = c ? {
|
|
64
|
+
multiline: c,
|
|
65
|
+
maxRows: A,
|
|
66
|
+
minRows: C ?? 3,
|
|
67
|
+
rows: D
|
|
68
68
|
} : {
|
|
69
69
|
multiline: !1,
|
|
70
70
|
maxRows: void 0,
|
|
71
71
|
minRows: void 0,
|
|
72
|
-
type:
|
|
72
|
+
type: t
|
|
73
73
|
};
|
|
74
|
-
return /* @__PURE__ */
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
return /* @__PURE__ */ d("div", { className: e(void 0, { [f]: !!f }, J), children: [
|
|
75
|
+
v($) && /* @__PURE__ */ l(
|
|
76
|
+
ae,
|
|
77
77
|
{
|
|
78
|
-
...
|
|
79
|
-
className:
|
|
80
|
-
error:
|
|
78
|
+
...u,
|
|
79
|
+
className: e("label", void 0, u == null ? void 0 : u.className),
|
|
80
|
+
error: s,
|
|
81
81
|
htmlFor: i,
|
|
82
|
-
label:
|
|
83
|
-
required:
|
|
82
|
+
label: $,
|
|
83
|
+
required: w
|
|
84
84
|
}
|
|
85
85
|
),
|
|
86
|
-
/* @__PURE__ */
|
|
87
|
-
|
|
86
|
+
/* @__PURE__ */ l("div", { className: e("field", void 0, K), children: /* @__PURE__ */ l(
|
|
87
|
+
L,
|
|
88
88
|
{
|
|
89
|
-
"aria-required":
|
|
90
|
-
color:
|
|
89
|
+
"aria-required": w ? "true" : void 0,
|
|
90
|
+
color: f,
|
|
91
91
|
id: i,
|
|
92
|
-
...
|
|
93
|
-
...
|
|
94
|
-
"aria-invalid":
|
|
95
|
-
disabled:
|
|
96
|
-
error:
|
|
92
|
+
...U,
|
|
93
|
+
...Z,
|
|
94
|
+
"aria-invalid": s,
|
|
95
|
+
disabled: F,
|
|
96
|
+
error: s,
|
|
97
97
|
name: i,
|
|
98
|
-
placeholder:
|
|
99
|
-
required:
|
|
100
|
-
value:
|
|
101
|
-
"aria-describedby":
|
|
102
|
-
className:
|
|
98
|
+
placeholder: Y(),
|
|
99
|
+
required: w,
|
|
100
|
+
value: a ?? "",
|
|
101
|
+
"aria-describedby": s ? `${i}-error` : v(h) ? `${i}-helper` : void 0,
|
|
102
|
+
className: e(
|
|
103
103
|
"input",
|
|
104
104
|
{
|
|
105
|
-
focused:
|
|
106
|
-
multiline: !!
|
|
107
|
-
disabled: !!
|
|
108
|
-
fullWidth: !!
|
|
105
|
+
focused: X,
|
|
106
|
+
multiline: !!c,
|
|
107
|
+
disabled: !!F,
|
|
108
|
+
fullWidth: !!V
|
|
109
109
|
},
|
|
110
|
-
|
|
110
|
+
M
|
|
111
111
|
),
|
|
112
112
|
slotProps: {
|
|
113
113
|
input: {
|
|
114
|
-
ref:
|
|
115
|
-
className:
|
|
114
|
+
ref: W,
|
|
115
|
+
className: e(
|
|
116
116
|
"input__node",
|
|
117
117
|
{
|
|
118
|
-
multiline: !!
|
|
118
|
+
multiline: !!c
|
|
119
119
|
},
|
|
120
|
-
|
|
120
|
+
O
|
|
121
121
|
)
|
|
122
122
|
}
|
|
123
123
|
},
|
|
124
|
-
onBlur: (
|
|
125
|
-
|
|
124
|
+
onBlur: (r) => {
|
|
125
|
+
g == null || g(r), B(!1);
|
|
126
126
|
},
|
|
127
|
-
onChange: (
|
|
128
|
-
var
|
|
129
|
-
const { value:
|
|
130
|
-
|
|
131
|
-
|
|
127
|
+
onChange: (r) => {
|
|
128
|
+
var b, k;
|
|
129
|
+
const { value: y } = r.target;
|
|
130
|
+
m !== void 0 && y.length > m || (q(r.target.value), (k = oe) == null || k(
|
|
131
|
+
t === void 0 ? "text" : t,
|
|
132
132
|
i,
|
|
133
|
-
(
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
D,
|
|
133
|
+
(b = r == null ? void 0 : r.target) == null ? void 0 : b.value,
|
|
134
|
+
R,
|
|
135
|
+
z,
|
|
136
|
+
n,
|
|
138
137
|
G,
|
|
139
|
-
|
|
140
|
-
|
|
138
|
+
H,
|
|
139
|
+
T
|
|
140
|
+
), S && S(r));
|
|
141
141
|
},
|
|
142
|
-
onFocus: (
|
|
143
|
-
|
|
142
|
+
onFocus: (r) => {
|
|
143
|
+
N == null || N(r), B(!0);
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
) }),
|
|
147
|
-
/* @__PURE__ */
|
|
148
|
-
|
|
147
|
+
/* @__PURE__ */ d("div", { className: e("footer"), children: [
|
|
148
|
+
s || v(h) || n !== void 0 && a !== void 0 ? /* @__PURE__ */ d(
|
|
149
149
|
"div",
|
|
150
150
|
{
|
|
151
|
-
"aria-live":
|
|
152
|
-
className:
|
|
153
|
-
id:
|
|
154
|
-
role:
|
|
151
|
+
"aria-live": s ? "assertive" : "polite",
|
|
152
|
+
className: e("helperText"),
|
|
153
|
+
id: s ? `${i}-error` : `${i}-helper`,
|
|
154
|
+
role: s ? "alert" : void 0,
|
|
155
155
|
children: [
|
|
156
|
-
/* @__PURE__ */
|
|
156
|
+
/* @__PURE__ */ l(
|
|
157
157
|
"span",
|
|
158
158
|
{
|
|
159
159
|
role: "alert",
|
|
160
|
-
className:
|
|
161
|
-
"is-error": !!
|
|
160
|
+
className: e("helperText__content", {
|
|
161
|
+
"is-error": !!p
|
|
162
162
|
}),
|
|
163
|
-
children:
|
|
163
|
+
children: p ?? h
|
|
164
164
|
}
|
|
165
165
|
),
|
|
166
|
-
|
|
167
|
-
((
|
|
166
|
+
n !== void 0 && a !== void 0 && Q === !1 && /* @__PURE__ */ d("span", { className: e("helperText__legend"), children: [
|
|
167
|
+
((j = a == null ? void 0 : a.toString()) == null ? void 0 : j.length) ?? 0,
|
|
168
168
|
" / ",
|
|
169
|
-
|
|
169
|
+
n
|
|
170
170
|
] })
|
|
171
171
|
]
|
|
172
172
|
}
|
|
173
|
-
) : /* @__PURE__ */
|
|
174
|
-
|
|
173
|
+
) : /* @__PURE__ */ l("div", { className: e("helperText") }),
|
|
174
|
+
m !== void 0 && t !== "number" && (_ === void 0 || _ === !1) && /* @__PURE__ */ l("div", { className: e("counter"), children: /* @__PURE__ */ d("span", { children: [
|
|
175
175
|
"(",
|
|
176
|
-
|
|
176
|
+
o !== void 0 ? ((E = String(o)) == null ? void 0 : E.length) ?? 0 : 0,
|
|
177
177
|
" /",
|
|
178
178
|
" ",
|
|
179
|
-
|
|
179
|
+
m,
|
|
180
180
|
")"
|
|
181
181
|
] }) })
|
|
182
182
|
] })
|
|
183
183
|
] });
|
|
184
184
|
}
|
|
185
185
|
);
|
|
186
|
-
|
|
186
|
+
le.displayName = "Input";
|
|
187
187
|
export {
|
|
188
|
-
|
|
188
|
+
le as Input
|
|
189
189
|
};
|