@prokodo/ui 0.0.49 → 0.0.50
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.module.scss.js → Accordion.base.module.scss.js} +2 -8
- package/dist/components/accordion/Accordion.effects.client.js +16 -0
- package/dist/components/accordion/Accordion.effects.module.scss.js +8 -0
- package/dist/components/accordion/Accordion.view.js +84 -80
- package/dist/components/animated/Animated.module.scss.js +2 -8
- package/dist/components/avatar/Avatar.module.scss.js +2 -8
- package/dist/components/button/Button.module.scss.js +2 -8
- package/dist/components/calendly/Calendly.client.js +98 -22
- package/dist/components/calendly/Calendly.server.js +3 -2
- package/dist/components/calendly/Calendly.view.js +2 -1
- package/dist/components/card/{Card.module.scss.js → Card.base.module.scss.js} +2 -12
- package/dist/components/card/Card.effects.client.js +16 -0
- package/dist/components/card/Card.effects.module.scss.js +14 -0
- package/dist/components/card/Card.view.js +15 -4
- package/dist/components/carousel/Carousel.client.js +44 -20
- package/dist/components/carousel/Carousel.lazy.js +1 -1
- package/dist/components/carousel/Carousel.module.scss.js +2 -8
- package/dist/components/chip/Chip.module.scss.js +2 -8
- package/dist/components/datePicker/DatePicker.client.js +52 -51
- package/dist/components/datePicker/DatePicker.view.js +14 -3
- package/dist/components/dialog/Dialog.module.scss.js +2 -8
- package/dist/components/drawer/{Drawer.module.scss.js → Drawer.base.module.scss.js} +27 -32
- package/dist/components/drawer/Drawer.client.js +19 -2
- package/dist/components/drawer/Drawer.effects.client.js +16 -0
- package/dist/components/drawer/Drawer.effects.module.scss.js +29 -0
- package/dist/components/drawer/Drawer.server.js +0 -1
- package/dist/components/drawer/Drawer.view.js +44 -40
- package/dist/components/dynamic-list/DynamicList.module.scss.js +2 -8
- package/dist/components/form/Form.client.js +131 -54
- package/dist/components/form/Form.module.scss.js +2 -8
- package/dist/components/form/FormField.module.scss.js +2 -8
- package/dist/components/form/FormResponse.module.scss.js +2 -8
- package/dist/components/grid/Grid.module.scss.js +2 -8
- package/dist/components/grid/GridRow.module.scss.js +2 -8
- package/dist/components/headline/{Headline.module.scss.js → Headline.base.module.scss.js} +2 -15
- package/dist/components/headline/Headline.effects.client.js +14 -0
- package/dist/components/headline/Headline.effects.module.scss.js +13 -0
- package/dist/components/headline/Headline.js +28 -18
- package/dist/components/icon/Icon.module.scss.js +2 -8
- package/dist/components/image/Image.module.scss.js +2 -8
- package/dist/components/image-text/ImageText.module.scss.js +2 -8
- package/dist/components/input/Input.client.js +12 -1
- package/dist/components/input/Input.module.scss.js +3 -8
- package/dist/components/input/Input.view.js +10 -2
- package/dist/components/inputOTP/InputOTP.js +124 -41
- package/dist/components/inputOTP/InputOTP.module.scss.js +2 -8
- package/dist/components/label/Label.module.scss.js +2 -8
- package/dist/components/link/Link.module.scss.js +2 -8
- package/dist/components/list/List.module.scss.js +2 -8
- package/dist/components/loading/Loading.client.js +68 -0
- package/dist/components/loading/Loading.js +9 -55
- package/dist/components/loading/Loading.lazy.js +15 -0
- package/dist/components/loading/Loading.server.js +16 -0
- package/dist/components/loading/Loading.view.js +124 -0
- package/dist/components/lottie/Lottie.module.scss.js +2 -8
- package/dist/components/post-item/PostItem.module.scss.js +2 -8
- package/dist/components/post-item/PostItemAuthor.module.scss.js +2 -8
- package/dist/components/post-teaser/PostTeaser.module.scss.js +2 -8
- package/dist/components/post-widget/PostWidget.module.scss.js +2 -8
- package/dist/components/post-widget-carousel/PostWidgetCarousel.module.scss.js +2 -8
- package/dist/components/progressBar/ProgressBar.module.scss.js +1 -7
- package/dist/components/quote/Quote.module.scss.js +2 -8
- package/dist/components/rich-text/RichText.client.js +54 -23
- package/dist/components/rich-text/RichText.js +1 -1
- package/dist/components/rich-text/RichText.lazy.js +1 -1
- package/dist/components/rich-text/RichText.module.scss.js +4 -8
- package/dist/components/rich-text/RichText.server.js +2 -1
- package/dist/components/select/Select.module.scss.js +2 -8
- package/dist/components/sidenav/SideNav.module.scss.js +2 -8
- package/dist/components/skeleton/{Skeleton.module.scss.js → Skeleton.base.module.scss.js} +2 -8
- package/dist/components/skeleton/Skeleton.effects.client.js +16 -0
- package/dist/components/skeleton/Skeleton.effects.module.scss.js +7 -0
- package/dist/components/skeleton/Skeleton.js +21 -18
- package/dist/components/slider/Slider.client.js +70 -30
- package/dist/components/slider/Slider.module.scss.js +2 -8
- package/dist/components/snackbar/Snackbar.module.scss.js +2 -8
- package/dist/components/stepper/Stepper.module.scss.js +2 -8
- package/dist/components/switch/Switch.module.scss.js +2 -8
- package/dist/components/table/Table.module.scss.js +2 -8
- package/dist/components/table/TableCell.module.scss.js +2 -8
- package/dist/components/teaser/Teaser.module.scss.js +2 -8
- package/dist/constants/project.js +1 -1
- package/dist/hooks/useResponsiveValue.js +123 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/components/accordion/Accordion.effects.client.d.ts +5 -0
- package/dist/types/components/calendly/Calendly.server.d.ts +1 -1
- package/dist/types/components/calendly/Calendly.view.d.ts +1 -1
- package/dist/types/components/card/Card.effects.client.d.ts +7 -0
- package/dist/types/components/carousel/Carousel.d.ts +2 -0
- package/dist/types/components/carousel/Carousel.lazy.d.ts +2 -0
- package/dist/types/components/carousel/Carousel.model.d.ts +14 -0
- package/dist/types/components/datePicker/DatePicker.view.d.ts +3 -5
- package/dist/types/components/drawer/Drawer.effects.client.d.ts +5 -0
- package/dist/types/components/headline/Headline.effects.client.d.ts +1 -0
- package/dist/types/components/input/Input.client.d.ts +1 -1
- package/dist/types/components/input/Input.view.d.ts +1 -1
- package/dist/types/components/loading/Loading.client.d.ts +4 -0
- package/dist/types/components/loading/Loading.d.ts +4 -2
- package/dist/types/components/loading/Loading.lazy.d.ts +5 -0
- package/dist/types/components/loading/Loading.model.d.ts +16 -1
- package/dist/types/components/loading/Loading.server.d.ts +4 -0
- package/dist/types/components/loading/Loading.view.d.ts +6 -0
- package/dist/types/components/loading/index.d.ts +2 -2
- package/dist/types/components/rich-text/RichText.d.ts +1 -1
- package/dist/types/components/rich-text/RichText.lazy.d.ts +1 -1
- package/dist/types/components/rich-text/RichText.model.d.ts +3 -3
- package/dist/types/components/skeleton/Skeleton.effects.client.d.ts +5 -0
- package/dist/types/components/slider/Slider.model.d.ts +1 -0
- package/dist/types/hooks/useResponsiveValue.d.ts +21 -0
- package/dist/ui.css +1078 -1543
- package/package.json +1 -1
- package/dist/components/loading/Loading.module.scss.js +0 -22
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
const PX = { xs: 16, sm: 24, md: 32, lg: 48, xl: 64 };
|
|
5
|
+
const SpinnerView = /* @__PURE__ */ __name(({
|
|
6
|
+
className,
|
|
7
|
+
style,
|
|
8
|
+
size = "sm",
|
|
9
|
+
ariaLabel = "Loading",
|
|
10
|
+
reducedMotion
|
|
11
|
+
}) => {
|
|
12
|
+
const s = PX[size];
|
|
13
|
+
const r = s / 2;
|
|
14
|
+
const stroke = Math.max(2, Math.round(s / 12));
|
|
15
|
+
const radius = r - stroke;
|
|
16
|
+
const arcPath = describeArc(0, 0, radius, -20, 270);
|
|
17
|
+
return /* @__PURE__ */ jsxs(
|
|
18
|
+
"svg",
|
|
19
|
+
{
|
|
20
|
+
"aria-label": ariaLabel,
|
|
21
|
+
className,
|
|
22
|
+
height: s,
|
|
23
|
+
role: "status",
|
|
24
|
+
viewBox: `0 0 ${s} ${s}`,
|
|
25
|
+
width: s,
|
|
26
|
+
style: {
|
|
27
|
+
display: "inline-block",
|
|
28
|
+
...style
|
|
29
|
+
},
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("linearGradient", { id: "ui-loading-gradient", x1: "0%", x2: "0%", y1: "0%", y2: "100%", children: [
|
|
32
|
+
/* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: "currentColor", stopOpacity: "1" }),
|
|
33
|
+
/* @__PURE__ */ jsx("stop", { offset: "50%", stopColor: "currentColor", stopOpacity: "0.4" }),
|
|
34
|
+
/* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: "currentColor", stopOpacity: "0.1" })
|
|
35
|
+
] }) }),
|
|
36
|
+
/* @__PURE__ */ jsxs("g", { transform: `translate(${r} ${r})`, children: [
|
|
37
|
+
/* @__PURE__ */ jsx(
|
|
38
|
+
"circle",
|
|
39
|
+
{
|
|
40
|
+
fill: "none",
|
|
41
|
+
r: radius,
|
|
42
|
+
stroke: "currentColor",
|
|
43
|
+
strokeOpacity: "0.15",
|
|
44
|
+
strokeWidth: stroke
|
|
45
|
+
}
|
|
46
|
+
),
|
|
47
|
+
/* @__PURE__ */ jsx(
|
|
48
|
+
"path",
|
|
49
|
+
{
|
|
50
|
+
d: arcPath,
|
|
51
|
+
fill: "none",
|
|
52
|
+
stroke: "url(#ui-loading-gradient)",
|
|
53
|
+
strokeLinecap: "round",
|
|
54
|
+
strokeWidth: stroke,
|
|
55
|
+
children: !Boolean(reducedMotion) && /* @__PURE__ */ jsx(
|
|
56
|
+
"animateTransform",
|
|
57
|
+
{
|
|
58
|
+
attributeName: "transform",
|
|
59
|
+
dur: "0.9s",
|
|
60
|
+
from: "0 0 0",
|
|
61
|
+
repeatCount: "indefinite",
|
|
62
|
+
to: "360 0 0",
|
|
63
|
+
type: "rotate"
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
] })
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
}, "SpinnerView");
|
|
73
|
+
const OverlayView = /* @__PURE__ */ __name(({
|
|
74
|
+
className,
|
|
75
|
+
style,
|
|
76
|
+
size = "xl",
|
|
77
|
+
ariaLabel = "Loading",
|
|
78
|
+
show = true,
|
|
79
|
+
blur = 0,
|
|
80
|
+
zIndex = 9999,
|
|
81
|
+
reducedMotion,
|
|
82
|
+
resolvedBackdrop
|
|
83
|
+
}) => {
|
|
84
|
+
if (!show) return null;
|
|
85
|
+
const bg = resolvedBackdrop === "dark" ? "rgba(0,0,0,0.5)" : "rgba(255,255,255,0.5)";
|
|
86
|
+
return /* @__PURE__ */ jsx(
|
|
87
|
+
"div",
|
|
88
|
+
{
|
|
89
|
+
className,
|
|
90
|
+
role: "presentation",
|
|
91
|
+
style: {
|
|
92
|
+
position: "fixed",
|
|
93
|
+
inset: 0,
|
|
94
|
+
width: "100vw",
|
|
95
|
+
height: "100vh",
|
|
96
|
+
display: "flex",
|
|
97
|
+
alignItems: "center",
|
|
98
|
+
justifyContent: "center",
|
|
99
|
+
backgroundColor: bg,
|
|
100
|
+
backdropFilter: blur ? `blur(${blur}px)` : void 0,
|
|
101
|
+
WebkitBackdropFilter: blur ? `blur(${blur}px)` : void 0,
|
|
102
|
+
zIndex,
|
|
103
|
+
...style
|
|
104
|
+
},
|
|
105
|
+
children: /* @__PURE__ */ jsx(SpinnerView, { ariaLabel, reducedMotion, size })
|
|
106
|
+
}
|
|
107
|
+
);
|
|
108
|
+
}, "OverlayView");
|
|
109
|
+
function polarToCartesian(cx, cy, r, angle) {
|
|
110
|
+
const rad = (angle - 90) * Math.PI / 180;
|
|
111
|
+
return { x: cx + r * Math.cos(rad), y: cy + r * Math.sin(rad) };
|
|
112
|
+
}
|
|
113
|
+
__name(polarToCartesian, "polarToCartesian");
|
|
114
|
+
function describeArc(cx, cy, r, start, end) {
|
|
115
|
+
const startPt = polarToCartesian(cx, cy, r, end);
|
|
116
|
+
const endPt = polarToCartesian(cx, cy, r, start);
|
|
117
|
+
const largeArcFlag = "1";
|
|
118
|
+
return `M ${startPt.x} ${startPt.y} A ${r} ${r} 0 ${largeArcFlag} 0 ${endPt.x} ${endPt.y}`;
|
|
119
|
+
}
|
|
120
|
+
__name(describeArc, "describeArc");
|
|
121
|
+
export {
|
|
122
|
+
OverlayView,
|
|
123
|
+
SpinnerView
|
|
124
|
+
};
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
const gradientMove = "gradientMove";
|
|
2
|
-
const fadeInKeyframe = "fadeInKeyframe";
|
|
3
1
|
const styles = {
|
|
4
|
-
"prokodo-Lottie__container": "prokodo-Lottie__container"
|
|
5
|
-
gradientMove,
|
|
6
|
-
fadeInKeyframe
|
|
2
|
+
"prokodo-Lottie__container": "prokodo-Lottie__container"
|
|
7
3
|
};
|
|
8
4
|
export {
|
|
9
|
-
styles as default
|
|
10
|
-
fadeInKeyframe,
|
|
11
|
-
gradientMove
|
|
5
|
+
styles as default
|
|
12
6
|
};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
const gradientMove = "gradientMove";
|
|
2
|
-
const fadeInKeyframe = "fadeInKeyframe";
|
|
3
1
|
const styles = {
|
|
4
2
|
"prokodo-PostItem__grid": "prokodo-PostItem__grid",
|
|
5
3
|
"prokodo-PostItem__animation": "prokodo-PostItem__animation",
|
|
@@ -13,12 +11,8 @@ const styles = {
|
|
|
13
11
|
"prokodo-PostItem__image__wrapper": "prokodo-PostItem__image__wrapper",
|
|
14
12
|
"prokodo-PostItem__image__content__wrapper": "prokodo-PostItem__image__content__wrapper",
|
|
15
13
|
"prokodo-PostItem__button": "prokodo-PostItem__button",
|
|
16
|
-
"prokodo-PostItem__button__content": "prokodo-PostItem__button__content"
|
|
17
|
-
gradientMove,
|
|
18
|
-
fadeInKeyframe
|
|
14
|
+
"prokodo-PostItem__button__content": "prokodo-PostItem__button__content"
|
|
19
15
|
};
|
|
20
16
|
export {
|
|
21
|
-
styles as default
|
|
22
|
-
fadeInKeyframe,
|
|
23
|
-
gradientMove
|
|
17
|
+
styles as default
|
|
24
18
|
};
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
const gradientMove = "gradientMove";
|
|
2
|
-
const fadeInKeyframe = "fadeInKeyframe";
|
|
3
1
|
const styles = {
|
|
4
2
|
"prokodo-PostItemAuthor": "prokodo-PostItemAuthor",
|
|
5
|
-
"prokodo-PostItemAuthor__name": "prokodo-PostItemAuthor__name"
|
|
6
|
-
gradientMove,
|
|
7
|
-
fadeInKeyframe
|
|
3
|
+
"prokodo-PostItemAuthor__name": "prokodo-PostItemAuthor__name"
|
|
8
4
|
};
|
|
9
5
|
export {
|
|
10
|
-
styles as default
|
|
11
|
-
fadeInKeyframe,
|
|
12
|
-
gradientMove
|
|
6
|
+
styles as default
|
|
13
7
|
};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
const gradientMove = "gradientMove";
|
|
2
|
-
const fadeInKeyframe = "fadeInKeyframe";
|
|
3
1
|
const styles = {
|
|
4
2
|
"prokodo-PostTeaser__card": "prokodo-PostTeaser__card",
|
|
5
3
|
"prokodo-PostTeaser__card__container": "prokodo-PostTeaser__card__container",
|
|
@@ -16,12 +14,8 @@ const styles = {
|
|
|
16
14
|
"prokodo-PostTeaser__content": "prokodo-PostTeaser__content",
|
|
17
15
|
"prokodo-PostTeaser__link": "prokodo-PostTeaser__link",
|
|
18
16
|
"prokodo-PostTeaser__link__icon": "prokodo-PostTeaser__link__icon",
|
|
19
|
-
"prokodo-PostTeaser__link--is-hovered": "prokodo-PostTeaser__link--is-hovered"
|
|
20
|
-
gradientMove,
|
|
21
|
-
fadeInKeyframe
|
|
17
|
+
"prokodo-PostTeaser__link--is-hovered": "prokodo-PostTeaser__link--is-hovered"
|
|
22
18
|
};
|
|
23
19
|
export {
|
|
24
|
-
styles as default
|
|
25
|
-
fadeInKeyframe,
|
|
26
|
-
gradientMove
|
|
20
|
+
styles as default
|
|
27
21
|
};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
const gradientMove = "gradientMove";
|
|
2
|
-
const fadeInKeyframe = "fadeInKeyframe";
|
|
3
1
|
const styles = {
|
|
4
2
|
"prokodo-PostWidget__list": "prokodo-PostWidget__list",
|
|
5
3
|
"prokodo-PostWidget__list--has-fullWidth": "prokodo-PostWidget__list--has-fullWidth",
|
|
@@ -10,12 +8,8 @@ const styles = {
|
|
|
10
8
|
"prokodo-PostWidget__image__link": "prokodo-PostWidget__image__link",
|
|
11
9
|
"prokodo-PostWidget__content": "prokodo-PostWidget__content",
|
|
12
10
|
"prokodo-PostWidget__headline": "prokodo-PostWidget__headline",
|
|
13
|
-
"prokodo-PostWidget__date": "prokodo-PostWidget__date"
|
|
14
|
-
gradientMove,
|
|
15
|
-
fadeInKeyframe
|
|
11
|
+
"prokodo-PostWidget__date": "prokodo-PostWidget__date"
|
|
16
12
|
};
|
|
17
13
|
export {
|
|
18
|
-
styles as default
|
|
19
|
-
fadeInKeyframe,
|
|
20
|
-
gradientMove
|
|
14
|
+
styles as default
|
|
21
15
|
};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
const gradientMove = "gradientMove";
|
|
2
|
-
const fadeInKeyframe = "fadeInKeyframe";
|
|
3
1
|
const styles = {
|
|
4
2
|
"prokodo-PostWidgetCarousel__carousel": "prokodo-PostWidgetCarousel__carousel",
|
|
5
3
|
"prokodo-PostWidgetCarousel__carousel__item__image__link": "prokodo-PostWidgetCarousel__carousel__item__image__link",
|
|
@@ -7,12 +5,8 @@ const styles = {
|
|
|
7
5
|
"prokodo-PostWidgetCarousel__carousel__item__link": "prokodo-PostWidgetCarousel__carousel__item__link",
|
|
8
6
|
"prokodo-PostWidgetCarousel__carousel__dots": "prokodo-PostWidgetCarousel__carousel__dots",
|
|
9
7
|
"prokodo-PostWidgetCarousel__carousel__buttons": "prokodo-PostWidgetCarousel__carousel__buttons",
|
|
10
|
-
"prokodo-PostWidgetCarousel__headline": "prokodo-PostWidgetCarousel__headline"
|
|
11
|
-
gradientMove,
|
|
12
|
-
fadeInKeyframe
|
|
8
|
+
"prokodo-PostWidgetCarousel__headline": "prokodo-PostWidgetCarousel__headline"
|
|
13
9
|
};
|
|
14
10
|
export {
|
|
15
|
-
styles as default
|
|
16
|
-
fadeInKeyframe,
|
|
17
|
-
gradientMove
|
|
11
|
+
styles as default
|
|
18
12
|
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
const gradientShift = "gradientShift";
|
|
2
2
|
const indeterminateMove = "indeterminateMove";
|
|
3
3
|
const ProgressBar__bar = "ProgressBar__bar";
|
|
4
|
-
const gradientMove = "gradientMove";
|
|
5
|
-
const fadeInKeyframe = "fadeInKeyframe";
|
|
6
4
|
const styles = {
|
|
7
5
|
"prokodo-ProgressBar": "prokodo-ProgressBar",
|
|
8
6
|
"prokodo-ProgressBar__track": "prokodo-ProgressBar__track",
|
|
@@ -21,15 +19,11 @@ const styles = {
|
|
|
21
19
|
"prokodo-ProgressBar__label": "prokodo-ProgressBar__label",
|
|
22
20
|
"prokodo-ProgressBar--animated": "prokodo-ProgressBar--animated",
|
|
23
21
|
ProgressBar__bar,
|
|
24
|
-
"ProgressBar__bar--indeterminate": "ProgressBar__bar--indeterminate"
|
|
25
|
-
gradientMove,
|
|
26
|
-
fadeInKeyframe
|
|
22
|
+
"ProgressBar__bar--indeterminate": "ProgressBar__bar--indeterminate"
|
|
27
23
|
};
|
|
28
24
|
export {
|
|
29
25
|
ProgressBar__bar,
|
|
30
26
|
styles as default,
|
|
31
|
-
fadeInKeyframe,
|
|
32
|
-
gradientMove,
|
|
33
27
|
gradientShift,
|
|
34
28
|
indeterminateMove
|
|
35
29
|
};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
const gradientMove = "gradientMove";
|
|
2
|
-
const fadeInKeyframe = "fadeInKeyframe";
|
|
3
1
|
const styles = {
|
|
4
2
|
"prokodo-Quote": "prokodo-Quote",
|
|
5
3
|
"prokodo-Quote__headline": "prokodo-Quote__headline",
|
|
@@ -9,12 +7,8 @@ const styles = {
|
|
|
9
7
|
"prokodo-Quote__caption__avatar": "prokodo-Quote__caption__avatar",
|
|
10
8
|
"prokodo-Quote__caption__author": "prokodo-Quote__caption__author",
|
|
11
9
|
"prokodo-Quote__caption__author__name": "prokodo-Quote__caption__author__name",
|
|
12
|
-
"prokodo-Quote__caption__author__position": "prokodo-Quote__caption__author__position"
|
|
13
|
-
gradientMove,
|
|
14
|
-
fadeInKeyframe
|
|
10
|
+
"prokodo-Quote__caption__author__position": "prokodo-Quote__caption__author__position"
|
|
15
11
|
};
|
|
16
12
|
export {
|
|
17
|
-
styles as default
|
|
18
|
-
fadeInKeyframe,
|
|
19
|
-
gradientMove
|
|
13
|
+
styles as default
|
|
20
14
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
4
|
-
import { jsx
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import { marked } from "../../node_modules/.pnpm/marked@15.0.12/node_modules/marked/lib/marked.esm.js";
|
|
6
|
-
import { useMemo, Fragment,
|
|
6
|
+
import { useMemo, Fragment, Children, isValidElement, createElement } from "react";
|
|
7
7
|
import { l as libExports } from "../../_virtual/index.js";
|
|
8
8
|
import { create } from "../../helpers/bem.js";
|
|
9
9
|
import styles from "./RichText.module.scss.js";
|
|
@@ -12,6 +12,8 @@ import { Link } from "../link/Link.js";
|
|
|
12
12
|
import { Headline } from "../headline/Headline.js";
|
|
13
13
|
import { AnimatedText } from "../animatedText/AnimatedText.js";
|
|
14
14
|
const bem = create(styles, "RichText");
|
|
15
|
+
const normalize = /* @__PURE__ */ __name((nodes) => Children.toArray(nodes), "normalize");
|
|
16
|
+
const withKey = /* @__PURE__ */ __name((el, key) => isValidElement(el) ? el.key == null ? { ...el, key } : el : el, "withKey");
|
|
15
17
|
function RichTextClient({
|
|
16
18
|
children,
|
|
17
19
|
animated,
|
|
@@ -32,13 +34,29 @@ function RichTextClient({
|
|
|
32
34
|
const headlineProps = { animationProps };
|
|
33
35
|
const renderAnimation = /* @__PURE__ */ __name((content) => {
|
|
34
36
|
if (!Boolean(animated)) return content;
|
|
35
|
-
return /* @__PURE__ */ jsx(AnimatedText, { ...animationProps, children: content });
|
|
37
|
+
return typeof content === "string" ? /* @__PURE__ */ jsx(AnimatedText, { ...animationProps, children: content }) : content;
|
|
36
38
|
}, "renderAnimation");
|
|
37
39
|
const safeHtml = useMemo(() => {
|
|
38
40
|
marked.setOptions({ gfm: true, breaks: true });
|
|
39
41
|
return libExports.filterXSS(marked.parse(children ?? ""));
|
|
40
42
|
}, [children]);
|
|
41
|
-
|
|
43
|
+
const VOID_TAGS = /* @__PURE__ */ new Set([
|
|
44
|
+
"area",
|
|
45
|
+
"base",
|
|
46
|
+
"br",
|
|
47
|
+
"col",
|
|
48
|
+
"embed",
|
|
49
|
+
"hr",
|
|
50
|
+
"img",
|
|
51
|
+
"input",
|
|
52
|
+
"link",
|
|
53
|
+
"meta",
|
|
54
|
+
"param",
|
|
55
|
+
"source",
|
|
56
|
+
"track",
|
|
57
|
+
"wbr"
|
|
58
|
+
]);
|
|
59
|
+
function domNodeToReact(node, path = "r") {
|
|
42
60
|
if (node.nodeType === Node.TEXT_NODE) {
|
|
43
61
|
return node.textContent;
|
|
44
62
|
}
|
|
@@ -47,7 +65,12 @@ function RichTextClient({
|
|
|
47
65
|
}
|
|
48
66
|
const elem = node;
|
|
49
67
|
const tagName = elem.tagName.toLowerCase();
|
|
50
|
-
const childReactNodes = Array.from(elem.childNodes).map(
|
|
68
|
+
const childReactNodes = Array.from(elem.childNodes).map(
|
|
69
|
+
(child, i) => domNodeToReact(child, `${path}.${i}`)
|
|
70
|
+
);
|
|
71
|
+
const keyedChildren = normalize(
|
|
72
|
+
childReactNodes.map((c, i) => isValidElement(c) ? withKey(c, `${path}.c${i}`) : c)
|
|
73
|
+
);
|
|
51
74
|
switch (tagName) {
|
|
52
75
|
case "h1":
|
|
53
76
|
case "h2":
|
|
@@ -83,17 +106,17 @@ function RichTextClient({
|
|
|
83
106
|
size = "xs";
|
|
84
107
|
type = "h6";
|
|
85
108
|
}
|
|
86
|
-
return /* @__PURE__ */ jsx(Headline, { ...baseProps, ...headlineProps, size, type, children:
|
|
109
|
+
return /* @__PURE__ */ jsx(Headline, { ...baseProps, ...headlineProps, size, type, children: keyedChildren });
|
|
87
110
|
}
|
|
88
111
|
case "p": {
|
|
89
112
|
const cls = bem("p");
|
|
90
|
-
return /* @__PURE__ */ jsx("p", { className: cls, itemProp, children:
|
|
113
|
+
return /* @__PURE__ */ jsx("p", { className: cls, itemProp, children: normalize(keyedChildren.map(renderAnimation)) });
|
|
91
114
|
}
|
|
92
115
|
case "a": {
|
|
93
116
|
const cls = bem("a");
|
|
94
117
|
const href = elem.getAttribute("href") ?? "#";
|
|
95
118
|
const title = elem.getAttribute("title") ?? void 0;
|
|
96
|
-
const linkText =
|
|
119
|
+
const linkText = normalize(keyedChildren.map(renderAnimation));
|
|
97
120
|
return /* @__PURE__ */ jsx(
|
|
98
121
|
Link,
|
|
99
122
|
{
|
|
@@ -103,25 +126,26 @@ function RichTextClient({
|
|
|
103
126
|
href,
|
|
104
127
|
linkComponent,
|
|
105
128
|
title,
|
|
129
|
+
variant: "primary",
|
|
106
130
|
children: linkText
|
|
107
131
|
}
|
|
108
132
|
);
|
|
109
133
|
}
|
|
110
134
|
case "pre": {
|
|
111
135
|
const cls = bem("pre");
|
|
112
|
-
return /* @__PURE__ */ jsx("pre", { className: cls, children:
|
|
136
|
+
return /* @__PURE__ */ jsx("pre", { className: cls, children: keyedChildren });
|
|
113
137
|
}
|
|
114
138
|
case "ul": {
|
|
115
139
|
const cls = bem("ul");
|
|
116
|
-
return /* @__PURE__ */ jsx("ul", { className: cls, children:
|
|
140
|
+
return /* @__PURE__ */ jsx("ul", { className: cls, children: keyedChildren });
|
|
117
141
|
}
|
|
118
142
|
case "ol": {
|
|
119
143
|
const cls = bem("ol");
|
|
120
|
-
return /* @__PURE__ */ jsx("ol", { className: cls, children:
|
|
144
|
+
return /* @__PURE__ */ jsx("ol", { className: cls, children: keyedChildren });
|
|
121
145
|
}
|
|
122
146
|
case "li": {
|
|
123
147
|
const cls = bem("li");
|
|
124
|
-
return /* @__PURE__ */
|
|
148
|
+
return /* @__PURE__ */ jsx("li", { className: cls, children: normalize([
|
|
125
149
|
/* @__PURE__ */ jsx(
|
|
126
150
|
Icon,
|
|
127
151
|
{
|
|
@@ -129,20 +153,27 @@ function RichTextClient({
|
|
|
129
153
|
color: variant,
|
|
130
154
|
name: "ArrowRight01Icon",
|
|
131
155
|
size: 18
|
|
132
|
-
}
|
|
156
|
+
},
|
|
157
|
+
`${path}.icon`
|
|
133
158
|
),
|
|
134
|
-
|
|
159
|
+
...keyedChildren.map((c, i) => (
|
|
135
160
|
// eslint-disable-next-line react/no-array-index-key
|
|
136
|
-
/* @__PURE__ */ jsx("span", { children: renderAnimation(c) }, i)
|
|
161
|
+
/* @__PURE__ */ jsx("span", { children: renderAnimation(c) }, `${path}.s${i}`)
|
|
137
162
|
))
|
|
138
|
-
] });
|
|
163
|
+
]) });
|
|
164
|
+
}
|
|
165
|
+
default: {
|
|
166
|
+
const props2 = { className: bem(tagName) };
|
|
167
|
+
if (tagName === "img") {
|
|
168
|
+
props2.src = elem.getAttribute("src") ?? "";
|
|
169
|
+
props2.alt = elem.getAttribute("alt") ?? "";
|
|
170
|
+
props2.loading = "lazy";
|
|
171
|
+
}
|
|
172
|
+
if (VOID_TAGS.has(tagName)) {
|
|
173
|
+
return createElement(tagName, { ...props2, key: path });
|
|
174
|
+
}
|
|
175
|
+
return keyedChildren.length ? createElement(tagName, { ...props2, key: path }, keyedChildren) : createElement(tagName, { ...props2, key: path });
|
|
139
176
|
}
|
|
140
|
-
default:
|
|
141
|
-
return createElement(
|
|
142
|
-
tagName,
|
|
143
|
-
{ key: Math.random().toString(), className: bem(tagName) },
|
|
144
|
-
childReactNodes
|
|
145
|
-
);
|
|
146
177
|
}
|
|
147
178
|
}
|
|
148
179
|
__name(domNodeToReact, "domNodeToReact");
|
|
@@ -170,7 +201,7 @@ function RichTextClient({
|
|
|
170
201
|
className: bem(void 0, void 0, className),
|
|
171
202
|
...schema,
|
|
172
203
|
...props,
|
|
173
|
-
children: topLevelChildren.map((n, i) => /* @__PURE__ */ jsx(Fragment, { children: domNodeToReact(n) }, i))
|
|
204
|
+
children: topLevelChildren.map((n, i) => /* @__PURE__ */ jsx(Fragment, { children: domNodeToReact(n) }, `top-level-${i}`))
|
|
174
205
|
}
|
|
175
206
|
);
|
|
176
207
|
}
|
|
@@ -6,7 +6,7 @@ const RichText = createIsland({
|
|
|
6
6
|
name: "RichText",
|
|
7
7
|
Server: RichTextServer,
|
|
8
8
|
loadLazy: /* @__PURE__ */ __name(() => import("./RichText.lazy.js"), "loadLazy"),
|
|
9
|
-
isInteractive: /* @__PURE__ */ __name((
|
|
9
|
+
isInteractive: /* @__PURE__ */ __name(() => true, "isInteractive")
|
|
10
10
|
});
|
|
11
11
|
export {
|
|
12
12
|
RichText
|
|
@@ -11,7 +11,7 @@ const RichText_lazy = createLazyWrapper({
|
|
|
11
11
|
hydrateOnVisible: true,
|
|
12
12
|
// only hydrate when it scrolls into view
|
|
13
13
|
ioOptions: { threshold: 0.1 },
|
|
14
|
-
isInteractive: /* @__PURE__ */ __name((
|
|
14
|
+
isInteractive: /* @__PURE__ */ __name(() => true, "isInteractive")
|
|
15
15
|
});
|
|
16
16
|
export {
|
|
17
17
|
RichText_lazy as default
|
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
const gradientMove = "gradientMove";
|
|
2
|
-
const fadeInKeyframe = "fadeInKeyframe";
|
|
3
1
|
const styles = {
|
|
2
|
+
"prokodo-RichText__a": "prokodo-RichText__a",
|
|
3
|
+
"prokodo-RichText": "prokodo-RichText",
|
|
4
4
|
"prokodo-RichText__p": "prokodo-RichText__p",
|
|
5
5
|
"prokodo-RichText__pre": "prokodo-RichText__pre",
|
|
6
6
|
"prokodo-RichText__ul": "prokodo-RichText__ul",
|
|
7
7
|
"prokodo-RichText__ol": "prokodo-RichText__ol",
|
|
8
8
|
"prokodo-RichText__li": "prokodo-RichText__li",
|
|
9
9
|
"prokodo-RichText__li__icon": "prokodo-RichText__li__icon",
|
|
10
|
-
"prokodo-RichText__ol__decimal": "prokodo-RichText__ol__decimal"
|
|
11
|
-
gradientMove,
|
|
12
|
-
fadeInKeyframe
|
|
10
|
+
"prokodo-RichText__ol__decimal": "prokodo-RichText__ol__decimal"
|
|
13
11
|
};
|
|
14
12
|
export {
|
|
15
|
-
styles as default
|
|
16
|
-
fadeInKeyframe,
|
|
17
|
-
gradientMove
|
|
13
|
+
styles as default
|
|
18
14
|
};
|
|
@@ -16,7 +16,8 @@ function RichTextServer(props) {
|
|
|
16
16
|
itemProp,
|
|
17
17
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
18
18
|
overrideParagraph,
|
|
19
|
-
|
|
19
|
+
linkComponent: _linkComp,
|
|
20
|
+
// omit on server (don’t pass to DOM)
|
|
20
21
|
...restProps
|
|
21
22
|
} = props;
|
|
22
23
|
const rawHtml = md.render(children ?? "");
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
const Select__button__inner = "Select__button__inner";
|
|
2
|
-
const gradientMove = "gradientMove";
|
|
3
|
-
const fadeInKeyframe = "fadeInKeyframe";
|
|
4
2
|
const styles = {
|
|
5
3
|
"prokodo-Select": "prokodo-Select",
|
|
6
4
|
"prokodo-Select--fullWidth": "prokodo-Select--fullWidth",
|
|
@@ -25,13 +23,9 @@ const styles = {
|
|
|
25
23
|
"prokodo-Select__checkbox--checked": "prokodo-Select__checkbox--checked",
|
|
26
24
|
"prokodo-Select__helperText": "prokodo-Select__helperText",
|
|
27
25
|
"prokodo-Select__helperText__content": "prokodo-Select__helperText__content",
|
|
28
|
-
"prokodo-Select__helperText__content--is-error": "prokodo-Select__helperText__content--is-error"
|
|
29
|
-
gradientMove,
|
|
30
|
-
fadeInKeyframe
|
|
26
|
+
"prokodo-Select__helperText__content--is-error": "prokodo-Select__helperText__content--is-error"
|
|
31
27
|
};
|
|
32
28
|
export {
|
|
33
29
|
Select__button__inner,
|
|
34
|
-
styles as default
|
|
35
|
-
fadeInKeyframe,
|
|
36
|
-
gradientMove
|
|
30
|
+
styles as default
|
|
37
31
|
};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
const gradientMove = "gradientMove";
|
|
2
|
-
const fadeInKeyframe = "fadeInKeyframe";
|
|
3
1
|
const styles = {
|
|
4
2
|
"prokodo-SideNav": "prokodo-SideNav",
|
|
5
3
|
"prokodo-SideNav--collapsed": "prokodo-SideNav--collapsed",
|
|
@@ -13,12 +11,8 @@ const styles = {
|
|
|
13
11
|
"prokodo-SideNav__label": "prokodo-SideNav__label",
|
|
14
12
|
"label-in": "label-in",
|
|
15
13
|
"prokodo-SideNav__label--collapsed": "prokodo-SideNav__label--collapsed",
|
|
16
|
-
"label-out": "label-out"
|
|
17
|
-
gradientMove,
|
|
18
|
-
fadeInKeyframe
|
|
14
|
+
"label-out": "label-out"
|
|
19
15
|
};
|
|
20
16
|
export {
|
|
21
|
-
styles as default
|
|
22
|
-
fadeInKeyframe,
|
|
23
|
-
gradientMove
|
|
17
|
+
styles as default
|
|
24
18
|
};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
const gradientMove = "gradientMove";
|
|
2
|
-
const fadeInKeyframe = "fadeInKeyframe";
|
|
3
1
|
const styles = {
|
|
4
2
|
"prokodo-Skeleton": "prokodo-Skeleton",
|
|
5
3
|
"prokodo-Skeleton--text": "prokodo-Skeleton--text",
|
|
@@ -9,12 +7,8 @@ const styles = {
|
|
|
9
7
|
"skeleton-pulse": "skeleton-pulse",
|
|
10
8
|
"prokodo-Skeleton--wave": "prokodo-Skeleton--wave",
|
|
11
9
|
"skeleton-wave": "skeleton-wave",
|
|
12
|
-
"prokodo-Skeleton--none": "prokodo-Skeleton--none"
|
|
13
|
-
gradientMove,
|
|
14
|
-
fadeInKeyframe
|
|
10
|
+
"prokodo-Skeleton--none": "prokodo-Skeleton--none"
|
|
15
11
|
};
|
|
16
12
|
export {
|
|
17
|
-
styles as default
|
|
18
|
-
fadeInKeyframe,
|
|
19
|
-
gradientMove
|
|
13
|
+
styles as default
|
|
20
14
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
4
|
+
import { useEffect } from "react";
|
|
5
|
+
function SkeletonEffectsLoader({ animation }) {
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
if (animation && animation !== "none") {
|
|
8
|
+
void import("./Skeleton.effects.module.scss.js");
|
|
9
|
+
}
|
|
10
|
+
}, [animation]);
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
__name(SkeletonEffectsLoader, "SkeletonEffectsLoader");
|
|
14
|
+
export {
|
|
15
|
+
SkeletonEffectsLoader
|
|
16
|
+
};
|
|
@@ -1,32 +1,35 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
4
4
|
import { create } from "../../helpers/bem.js";
|
|
5
|
-
import styles from "./Skeleton.module.scss.js";
|
|
5
|
+
import styles from "./Skeleton.base.module.scss.js";
|
|
6
|
+
import { SkeletonEffectsLoader } from "./Skeleton.effects.client.js";
|
|
6
7
|
const bem = create(styles, "Skeleton");
|
|
7
8
|
const Skeleton = /* @__PURE__ */ __name(({
|
|
8
9
|
width = "100%",
|
|
9
10
|
height = "16px",
|
|
10
11
|
variant = "rectangular",
|
|
11
12
|
animation = "wave",
|
|
13
|
+
// "wave" | "pulse" | "none"
|
|
12
14
|
className
|
|
13
|
-
}) => /* @__PURE__ */
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
{
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
15
|
+
}) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
16
|
+
/* @__PURE__ */ jsx(SkeletonEffectsLoader, { animation }),
|
|
17
|
+
/* @__PURE__ */ jsx(
|
|
18
|
+
"div",
|
|
19
|
+
{
|
|
20
|
+
style: { width, height },
|
|
21
|
+
className: bem(
|
|
22
|
+
void 0,
|
|
23
|
+
{
|
|
24
|
+
[variant]: true,
|
|
25
|
+
[animation]: true
|
|
26
|
+
// adds --wave / --pulse / --none
|
|
27
|
+
},
|
|
28
|
+
className
|
|
29
|
+
)
|
|
27
30
|
}
|
|
28
|
-
|
|
29
|
-
), "Skeleton");
|
|
31
|
+
)
|
|
32
|
+
] }), "Skeleton");
|
|
30
33
|
export {
|
|
31
34
|
Skeleton
|
|
32
35
|
};
|