@prokodo/ui 0.0.52 → 0.0.53
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 +81 -81
- package/dist/components/accordion/Accordion.client.js +3 -1
- package/dist/components/accordion/Accordion.view.js +100 -81
- package/dist/components/animated/Animated.server.js +3 -1
- package/dist/components/animatedText/AnimatedText.client.js +1 -7
- package/dist/components/animatedText/AnimatedText.view.js +4 -1
- package/dist/components/avatar/Avatar.view.js +2 -2
- package/dist/components/base-link/BaseLink.view.js +1 -1
- package/dist/components/button/Button.server.js +1 -8
- package/dist/components/calendly/Calendly.client.js +63 -54
- package/dist/components/calendly/Calendly.server.js +3 -1
- package/dist/components/card/Card.client.js +2 -1
- package/dist/components/card/Card.effects.client.js +5 -1
- package/dist/components/card/Card.view.js +19 -2
- package/dist/components/carousel/Carousel.client.js +36 -12
- package/dist/components/chip/Chip.view.js +10 -6
- package/dist/components/datePicker/DatePicker.client.js +53 -37
- package/dist/components/datePicker/DatePicker.view.js +3 -1
- package/dist/components/dialog/Dialog.client.js +22 -14
- package/dist/components/dialog/Dialog.view.js +10 -2
- package/dist/components/drawer/Drawer.client.js +10 -2
- package/dist/components/drawer/Drawer.effects.client.js +7 -2
- package/dist/components/dynamic-list/DynamicList.client.js +8 -7
- package/dist/components/dynamic-list/DynamicList.server.js +10 -4
- package/dist/components/dynamic-list/DynamicList.view.js +1 -1
- package/dist/components/form/Form.client.js +16 -13
- package/dist/components/form/Form.view.js +8 -4
- package/dist/components/form/FormField.client.js +5 -5
- package/dist/components/form/FormField.server.js +3 -23
- package/dist/components/form/FormResponse.js +5 -1
- package/dist/components/grid/Grid.js +7 -2
- package/dist/components/grid/GridRow.js +12 -2
- package/dist/components/headline/Headline.js +3 -1
- package/dist/components/icon/Icon.js +8 -4
- package/dist/components/image-text/ImageText.js +5 -1
- package/dist/components/input/Input.client.js +52 -28
- package/dist/components/input/Input.view.js +92 -68
- package/dist/components/inputOTP/InputOTP.js +107 -90
- package/dist/components/label/Label.js +1 -8
- package/dist/components/link/Link.view.js +3 -1
- package/dist/components/list/List.js +94 -42
- package/dist/components/loading/Loading.client.js +15 -2
- package/dist/components/loading/Loading.server.js +8 -1
- package/dist/components/loading/Loading.view.js +30 -7
- package/dist/components/post-item/PostItem.client.js +18 -0
- package/dist/components/post-item/PostItem.js +7 -136
- package/dist/components/post-item/PostItem.lazy.js +14 -0
- package/dist/components/post-item/PostItem.module.scss.js +3 -1
- package/dist/components/post-item/PostItem.server.js +15 -0
- package/dist/components/post-item/PostItem.view.js +238 -0
- package/dist/components/post-item/PostItemAuthor.js +28 -22
- package/dist/components/post-teaser/PostTeaser.client.js +31 -0
- package/dist/components/post-teaser/PostTeaser.js +9 -169
- package/dist/components/post-teaser/PostTeaser.lazy.js +13 -0
- package/dist/components/post-teaser/PostTeaser.module.scss.js +3 -0
- package/dist/components/post-teaser/PostTeaser.server.js +23 -0
- package/dist/components/post-teaser/PostTeaser.view.js +252 -0
- package/dist/components/post-widget/PostWidget.client.js +9 -0
- package/dist/components/post-widget/PostWidget.js +11 -156
- package/dist/components/post-widget/PostWidget.lazy.js +13 -0
- package/dist/components/post-widget/PostWidget.module.scss.js +1 -0
- package/dist/components/post-widget/PostWidget.server.js +11 -0
- package/dist/components/post-widget/PostWidget.view.js +263 -0
- package/dist/components/post-widget-carousel/PostWidgetCarousel.client.js +9 -0
- package/dist/components/post-widget-carousel/PostWidgetCarousel.js +9 -160
- package/dist/components/post-widget-carousel/PostWidgetCarousel.lazy.js +13 -0
- package/dist/components/post-widget-carousel/PostWidgetCarousel.module.scss.js +3 -0
- package/dist/components/post-widget-carousel/PostWidgetCarousel.server.js +11 -0
- package/dist/components/post-widget-carousel/PostWidgetCarousel.view.js +244 -0
- package/dist/components/rich-text/RichText.client.js +7 -2
- package/dist/components/select/Select.view.js +132 -116
- package/dist/components/sidenav/SideNav.client.js +19 -18
- package/dist/components/sidenav/SideNav.server.js +8 -1
- package/dist/components/sidenav/SideNav.view.js +21 -3
- package/dist/components/skeleton/Skeleton.effects.client.js +3 -1
- package/dist/components/slider/Slider.client.js +56 -38
- package/dist/components/slider/Slider.view.js +1 -7
- package/dist/components/snackbar/SnackbarProvider.client.js +21 -22
- package/dist/components/stepper/Stepper.client.js +1 -8
- package/dist/components/switch/Switch.client.js +1 -6
- package/dist/components/switch/Switch.server.js +1 -3
- package/dist/components/table/Table.js +3 -1
- package/dist/components/table/TableCell.js +13 -1
- package/dist/components/teaser/Teaser.js +1 -5
- package/dist/constants/project.js +1 -1
- package/dist/helpers/createIsland.js +3 -1
- package/dist/helpers/createLazyWrapper.js +3 -1
- package/dist/helpers/date.js +21 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/components/accordion/Accordion.model.d.ts +1 -1
- package/dist/types/components/animated/Animated.client.d.ts +2 -2
- package/dist/types/components/animated/Animated.model.d.ts +1 -1
- package/dist/types/components/button/Button.client.d.ts +1 -1
- package/dist/types/components/button/Button.d.ts +1 -1
- package/dist/types/components/button/Button.lazy.d.ts +1 -1
- package/dist/types/components/button/Button.server.d.ts +1 -1
- package/dist/types/components/button/Button.view.d.ts +1 -1
- package/dist/types/components/card/Card.effects.client.d.ts +1 -1
- package/dist/types/components/card/index.d.ts +1 -1
- package/dist/types/components/carousel/Carousel.d.ts +3 -0
- package/dist/types/components/carousel/Carousel.lazy.d.ts +3 -0
- package/dist/types/components/carousel/Carousel.model.d.ts +4 -0
- package/dist/types/components/dialog/Dialog.client.d.ts +1 -1
- package/dist/types/components/dialog/Dialog.model.d.ts +4 -4
- package/dist/types/components/dialog/Dialog.view.d.ts +2 -2
- package/dist/types/components/drawer/Drawer.client.d.ts +1 -1
- package/dist/types/components/drawer/Drawer.d.ts +1 -1
- package/dist/types/components/drawer/Drawer.effects.client.d.ts +1 -1
- package/dist/types/components/drawer/Drawer.lazy.d.ts +1 -1
- package/dist/types/components/drawer/Drawer.model.d.ts +6 -6
- package/dist/types/components/drawer/Drawer.server.d.ts +1 -1
- package/dist/types/components/drawer/Drawer.view.d.ts +2 -2
- package/dist/types/components/drawer/index.d.ts +1 -1
- package/dist/types/components/icon/IconList.d.ts +1 -1
- package/dist/types/components/icon/index.d.ts +1 -1
- package/dist/types/components/image/Image.model.d.ts +2 -2
- package/dist/types/components/link/Link.d.ts +1 -1
- package/dist/types/components/link/Link.model.d.ts +1 -1
- package/dist/types/components/link/Link.server.d.ts +1 -1
- package/dist/types/components/loading/index.d.ts +1 -1
- package/dist/types/components/post-item/PostItem.client.d.ts +4 -0
- package/dist/types/components/post-item/PostItem.d.ts +3 -2
- package/dist/types/components/post-item/PostItem.lazy.d.ts +5 -0
- package/dist/types/components/post-item/PostItem.model.d.ts +46 -6
- package/dist/types/components/post-item/PostItem.server.d.ts +3 -0
- package/dist/types/components/post-item/PostItem.view.d.ts +3 -0
- package/dist/types/components/post-item/PostItemAuthor.model.d.ts +5 -8
- package/dist/types/components/post-item/index.d.ts +2 -2
- package/dist/types/components/post-teaser/PostTeaser.client.d.ts +4 -0
- package/dist/types/components/post-teaser/PostTeaser.d.ts +3 -2
- package/dist/types/components/post-teaser/PostTeaser.lazy.d.ts +5 -0
- package/dist/types/components/post-teaser/PostTeaser.model.d.ts +49 -3
- package/dist/types/components/post-teaser/PostTeaser.server.d.ts +3 -0
- package/dist/types/components/post-teaser/PostTeaser.view.d.ts +3 -0
- package/dist/types/components/post-teaser/index.d.ts +1 -1
- package/dist/types/components/post-widget/PostWidget.client.d.ts +4 -0
- package/dist/types/components/post-widget/PostWidget.d.ts +13 -3
- package/dist/types/components/post-widget/PostWidget.lazy.d.ts +14 -0
- package/dist/types/components/post-widget/PostWidget.model.d.ts +53 -3
- package/dist/types/components/post-widget/PostWidget.server.d.ts +3 -0
- package/dist/types/components/post-widget/PostWidget.view.d.ts +3 -0
- package/dist/types/components/post-widget/index.d.ts +1 -1
- package/dist/types/components/post-widget-carousel/PostWidgetCarousel.client.d.ts +3 -0
- package/dist/types/components/post-widget-carousel/PostWidgetCarousel.d.ts +11 -3
- package/dist/types/components/post-widget-carousel/PostWidgetCarousel.lazy.d.ts +12 -0
- package/dist/types/components/post-widget-carousel/PostWidgetCarousel.model.d.ts +39 -0
- package/dist/types/components/post-widget-carousel/PostWidgetCarousel.server.d.ts +3 -0
- package/dist/types/components/post-widget-carousel/PostWidgetCarousel.view.d.ts +3 -0
- package/dist/types/components/post-widget-carousel/index.d.ts +1 -1
- package/dist/types/components/sidenav/index.d.ts +1 -1
- package/dist/types/components/skeleton/Skeleton.effects.client.d.ts +2 -2
- package/dist/types/helpers/createIsland.d.ts +1 -1
- package/dist/types/helpers/createLazyWrapper.d.ts +1 -1
- package/dist/types/helpers/date.d.ts +5 -0
- package/dist/ui.css +116 -35
- package/package.json +3 -2
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
4
|
+
import { isValidElement } from "react";
|
|
5
|
+
import { create } from "../../helpers/bem.js";
|
|
6
|
+
import { isString } from "../../helpers/validations.js";
|
|
7
|
+
import styles from "./PostWidgetCarousel.module.scss.js";
|
|
8
|
+
import { Carousel } from "../carousel/Carousel.js";
|
|
9
|
+
import { Card } from "../card/Card.js";
|
|
10
|
+
import { Headline } from "../headline/Headline.js";
|
|
11
|
+
import { Link } from "../link/Link.js";
|
|
12
|
+
import { Image } from "../image/Image.js";
|
|
13
|
+
const bem = create(styles, "PostWidgetCarousel");
|
|
14
|
+
function PostWidgetCarouselView(props) {
|
|
15
|
+
var _a, _b;
|
|
16
|
+
const {
|
|
17
|
+
autoplay = 5e3,
|
|
18
|
+
className,
|
|
19
|
+
title,
|
|
20
|
+
items = [],
|
|
21
|
+
classes,
|
|
22
|
+
componentsProps,
|
|
23
|
+
structuredData = true,
|
|
24
|
+
...rest
|
|
25
|
+
} = props;
|
|
26
|
+
const cardMerged = {
|
|
27
|
+
animated: true,
|
|
28
|
+
enableShadow: true,
|
|
29
|
+
...componentsProps == null ? void 0 : componentsProps.card,
|
|
30
|
+
...rest,
|
|
31
|
+
variant: ((_a = componentsProps == null ? void 0 : componentsProps.card) == null ? void 0 : _a.variant) ?? (rest == null ? void 0 : rest.variant) ?? "white"
|
|
32
|
+
};
|
|
33
|
+
return /* @__PURE__ */ jsxs(
|
|
34
|
+
"section",
|
|
35
|
+
{
|
|
36
|
+
itemScope: true,
|
|
37
|
+
itemType: "https://schema.org/ItemList",
|
|
38
|
+
className: bem(
|
|
39
|
+
void 0,
|
|
40
|
+
void 0,
|
|
41
|
+
[className, classes == null ? void 0 : classes.root].filter(Boolean).join(" ")
|
|
42
|
+
),
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ jsxs(
|
|
45
|
+
Card,
|
|
46
|
+
{
|
|
47
|
+
...cardMerged,
|
|
48
|
+
className: bem("card__container", void 0, classes == null ? void 0 : classes.cardContainer),
|
|
49
|
+
contentClassName: bem("card", void 0, classes == null ? void 0 : classes.card),
|
|
50
|
+
children: [
|
|
51
|
+
title && /* @__PURE__ */ jsx(
|
|
52
|
+
Headline,
|
|
53
|
+
{
|
|
54
|
+
highlight: true,
|
|
55
|
+
size: "md",
|
|
56
|
+
type: "h2",
|
|
57
|
+
...{ ...title, ...(componentsProps == null ? void 0 : componentsProps.title) ?? {} },
|
|
58
|
+
itemProp: "headline",
|
|
59
|
+
className: bem(
|
|
60
|
+
"title",
|
|
61
|
+
void 0,
|
|
62
|
+
[title == null ? void 0 : title.className, classes == null ? void 0 : classes.title].filter(Boolean).join(" ")
|
|
63
|
+
),
|
|
64
|
+
variant: (title == null ? void 0 : title.variant) ?? ((_b = componentsProps == null ? void 0 : componentsProps.title) == null ? void 0 : _b.variant) ?? "secondary",
|
|
65
|
+
children: title == null ? void 0 : title.content
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
items.length > 0 && /* @__PURE__ */ jsx(
|
|
69
|
+
Carousel,
|
|
70
|
+
{
|
|
71
|
+
enableControl: true,
|
|
72
|
+
autoplay,
|
|
73
|
+
className: bem("carousel", void 0, classes == null ? void 0 : classes.carousel),
|
|
74
|
+
enableDots: false,
|
|
75
|
+
itemsToShow: 1,
|
|
76
|
+
classNameButtons: bem(
|
|
77
|
+
"carousel__button",
|
|
78
|
+
void 0,
|
|
79
|
+
classes == null ? void 0 : classes.carouselButton
|
|
80
|
+
),
|
|
81
|
+
classNameControls: bem(
|
|
82
|
+
"carousel__buttons",
|
|
83
|
+
void 0,
|
|
84
|
+
classes == null ? void 0 : classes.carouselButtons
|
|
85
|
+
),
|
|
86
|
+
classNameDots: bem(
|
|
87
|
+
"carousel__dots",
|
|
88
|
+
void 0,
|
|
89
|
+
classes == null ? void 0 : classes.carouselDots
|
|
90
|
+
),
|
|
91
|
+
classNameItem: bem(
|
|
92
|
+
"carousel__item",
|
|
93
|
+
void 0,
|
|
94
|
+
classes == null ? void 0 : classes.carouselItem
|
|
95
|
+
),
|
|
96
|
+
classNameWrapper: bem(
|
|
97
|
+
"carousel__wrapper",
|
|
98
|
+
void 0,
|
|
99
|
+
classes == null ? void 0 : classes.carouselWrapper
|
|
100
|
+
),
|
|
101
|
+
nextButton: {
|
|
102
|
+
variant: "contained",
|
|
103
|
+
color: "primary",
|
|
104
|
+
iconProps: {
|
|
105
|
+
size: "sm"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
prevButton: {
|
|
109
|
+
variant: "contained",
|
|
110
|
+
color: "primary",
|
|
111
|
+
iconProps: {
|
|
112
|
+
size: "sm"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
children: items.map((item, idx) => {
|
|
116
|
+
var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
117
|
+
const key = `carousel-item-${((_a2 = item.title) == null ? void 0 : _a2.content) ?? idx}`;
|
|
118
|
+
const imgBase = item.image;
|
|
119
|
+
const imgMerged = imgBase ? {
|
|
120
|
+
...imgBase,
|
|
121
|
+
...(componentsProps == null ? void 0 : componentsProps.image) ?? {},
|
|
122
|
+
...((_b2 = item.componentsProps) == null ? void 0 : _b2.image) ?? {},
|
|
123
|
+
className: bem(
|
|
124
|
+
"carousel__item__image",
|
|
125
|
+
void 0,
|
|
126
|
+
[
|
|
127
|
+
imgBase.className,
|
|
128
|
+
classes == null ? void 0 : classes.carouselItemImage,
|
|
129
|
+
(_c = item.classes) == null ? void 0 : _c.image
|
|
130
|
+
].filter(Boolean).join(" ")
|
|
131
|
+
),
|
|
132
|
+
containerClassName: bem("carousel__item__image__container"),
|
|
133
|
+
decoding: ((_e = (_d = item.componentsProps) == null ? void 0 : _d.image) == null ? void 0 : _e.decoding) ?? ((_f = componentsProps == null ? void 0 : componentsProps.image) == null ? void 0 : _f.decoding) ?? imgBase.decoding ?? "async",
|
|
134
|
+
loading: ((_h = (_g = item.componentsProps) == null ? void 0 : _g.image) == null ? void 0 : _h.loading) ?? ((_i = componentsProps == null ? void 0 : componentsProps.image) == null ? void 0 : _i.loading) ?? imgBase.loading ?? "lazy",
|
|
135
|
+
sizes: ((_k = (_j = item.componentsProps) == null ? void 0 : _j.image) == null ? void 0 : _k.sizes) ?? ((_l = componentsProps == null ? void 0 : componentsProps.image) == null ? void 0 : _l.sizes) ?? imgBase.sizes ?? "(max-width: 960px) 100vw, 100vw",
|
|
136
|
+
...isValidElement(imgBase == null ? void 0 : imgBase.imageComponent) ? { imageComponent: imgBase.imageComponent } : {}
|
|
137
|
+
} : void 0;
|
|
138
|
+
const linkMerged = {
|
|
139
|
+
...(componentsProps == null ? void 0 : componentsProps.link) ?? {},
|
|
140
|
+
...((_m = item.componentsProps) == null ? void 0 : _m.link) ?? {},
|
|
141
|
+
...item.redirect,
|
|
142
|
+
className: bem(
|
|
143
|
+
"carousel__item__image__link",
|
|
144
|
+
void 0,
|
|
145
|
+
[
|
|
146
|
+
(_n = item.redirect) == null ? void 0 : _n.className,
|
|
147
|
+
classes == null ? void 0 : classes.carouselItemImageLink,
|
|
148
|
+
(_o = item.classes) == null ? void 0 : _o.imageLink
|
|
149
|
+
].filter(Boolean).join(" ")
|
|
150
|
+
),
|
|
151
|
+
"aria-label": `Read more about ${item.title.content}`
|
|
152
|
+
};
|
|
153
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
154
|
+
imgMerged && /* @__PURE__ */ jsx(Link, { ...linkMerged, children: /* @__PURE__ */ jsx(
|
|
155
|
+
Image,
|
|
156
|
+
{
|
|
157
|
+
...imgMerged,
|
|
158
|
+
className: bem(
|
|
159
|
+
"carousel__item__image",
|
|
160
|
+
void 0,
|
|
161
|
+
classes == null ? void 0 : classes.carouselItemImage
|
|
162
|
+
),
|
|
163
|
+
containerClassName: bem(
|
|
164
|
+
"carousel__item__image__container"
|
|
165
|
+
)
|
|
166
|
+
}
|
|
167
|
+
) }),
|
|
168
|
+
/* @__PURE__ */ jsx(
|
|
169
|
+
Link,
|
|
170
|
+
{
|
|
171
|
+
...(componentsProps == null ? void 0 : componentsProps.link) ?? {},
|
|
172
|
+
...((_p = item.componentsProps) == null ? void 0 : _p.link) ?? {},
|
|
173
|
+
...item.redirect,
|
|
174
|
+
"aria-label": `Read more about ${item.title.content}`,
|
|
175
|
+
className: bem(
|
|
176
|
+
"carousel__item__link",
|
|
177
|
+
void 0,
|
|
178
|
+
[classes == null ? void 0 : classes.carouselItemLink, (_q = item.classes) == null ? void 0 : _q.link].filter(Boolean).join(" ")
|
|
179
|
+
),
|
|
180
|
+
children: /* @__PURE__ */ jsx(
|
|
181
|
+
Headline,
|
|
182
|
+
{
|
|
183
|
+
size: "md",
|
|
184
|
+
type: "h3",
|
|
185
|
+
...item.title,
|
|
186
|
+
...(componentsProps == null ? void 0 : componentsProps.title) ?? {},
|
|
187
|
+
...((_r = item.componentsProps) == null ? void 0 : _r.headline) ?? {},
|
|
188
|
+
itemProp: "headline",
|
|
189
|
+
className: bem(
|
|
190
|
+
"headline",
|
|
191
|
+
void 0,
|
|
192
|
+
[
|
|
193
|
+
(_s = item.title) == null ? void 0 : _s.className,
|
|
194
|
+
classes == null ? void 0 : classes.carouselItem,
|
|
195
|
+
(_t = item.classes) == null ? void 0 : _t.headline
|
|
196
|
+
].filter(Boolean).join(" ")
|
|
197
|
+
),
|
|
198
|
+
variant: ((_u = item.title) == null ? void 0 : _u.variant) ?? ((_v = componentsProps == null ? void 0 : componentsProps.title) == null ? void 0 : _v.variant) ?? "inherit",
|
|
199
|
+
children: (_w = item.title) == null ? void 0 : _w.content
|
|
200
|
+
}
|
|
201
|
+
)
|
|
202
|
+
}
|
|
203
|
+
)
|
|
204
|
+
] }, key);
|
|
205
|
+
})
|
|
206
|
+
}
|
|
207
|
+
)
|
|
208
|
+
]
|
|
209
|
+
}
|
|
210
|
+
),
|
|
211
|
+
structuredData && items.length > 0 && /* @__PURE__ */ jsx(
|
|
212
|
+
"script",
|
|
213
|
+
{
|
|
214
|
+
type: "application/ld+json",
|
|
215
|
+
dangerouslySetInnerHTML: {
|
|
216
|
+
__html: JSON.stringify({
|
|
217
|
+
"@context": "https://schema.org",
|
|
218
|
+
"@type": "ItemList",
|
|
219
|
+
itemListElement: items.map((item, index) => {
|
|
220
|
+
var _a2, _b2;
|
|
221
|
+
return {
|
|
222
|
+
"@type": "ListItem",
|
|
223
|
+
position: index + 1,
|
|
224
|
+
item: {
|
|
225
|
+
"@type": "BlogPosting",
|
|
226
|
+
headline: (_a2 = item.title) == null ? void 0 : _a2.content,
|
|
227
|
+
image: isString(
|
|
228
|
+
(_b2 = item.image) == null ? void 0 : _b2.src
|
|
229
|
+
) ? [item.image.src] : void 0
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
})
|
|
233
|
+
})
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
)
|
|
237
|
+
]
|
|
238
|
+
}
|
|
239
|
+
);
|
|
240
|
+
}
|
|
241
|
+
__name(PostWidgetCarouselView, "PostWidgetCarouselView");
|
|
242
|
+
export {
|
|
243
|
+
PostWidgetCarouselView
|
|
244
|
+
};
|
|
@@ -69,7 +69,9 @@ function RichTextClient({
|
|
|
69
69
|
(child, i) => domNodeToReact(child, `${path}.${i}`)
|
|
70
70
|
);
|
|
71
71
|
const keyedChildren = normalize(
|
|
72
|
-
childReactNodes.map(
|
|
72
|
+
childReactNodes.map(
|
|
73
|
+
(c, i) => isValidElement(c) ? withKey(c, `${path}.c${i}`) : c
|
|
74
|
+
)
|
|
73
75
|
);
|
|
74
76
|
switch (tagName) {
|
|
75
77
|
case "h1":
|
|
@@ -198,7 +200,10 @@ function RichTextClient({
|
|
|
198
200
|
className: bem(void 0, void 0, className),
|
|
199
201
|
...schema,
|
|
200
202
|
...props,
|
|
201
|
-
children: topLevelChildren.map((n, i) =>
|
|
203
|
+
children: topLevelChildren.map((n, i) => (
|
|
204
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
205
|
+
/* @__PURE__ */ jsx(Fragment, { children: domNodeToReact(n) }, `top-level-${i}`)
|
|
206
|
+
))
|
|
202
207
|
}
|
|
203
208
|
);
|
|
204
209
|
}
|
|
@@ -36,11 +36,17 @@ function SelectView({
|
|
|
36
36
|
const btnRef = _clientState == null ? void 0 : _clientState.buttonRef;
|
|
37
37
|
const listRef = _clientState == null ? void 0 : _clientState.listRef;
|
|
38
38
|
const selectedItems = Array.isArray(value) ? items.filter((i) => value.includes(i.value)) : items.filter((i) => i.value === value);
|
|
39
|
-
const display = selectedItems.length === 0 ? /* @__PURE__ */ jsx(
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
const display = selectedItems.length === 0 ? /* @__PURE__ */ jsx(
|
|
40
|
+
"span",
|
|
41
|
+
{
|
|
42
|
+
className: bem("button__inner", {
|
|
43
|
+
"is-placeholder": true,
|
|
44
|
+
"is-placeholder--disabled": Boolean(disabled),
|
|
45
|
+
expanded: open
|
|
46
|
+
}),
|
|
47
|
+
children: placeholder
|
|
48
|
+
}
|
|
49
|
+
) : /* @__PURE__ */ jsx("span", { className: bem("button__inner", { expanded: open }), children: selectedItems.map((i, idx) => {
|
|
44
50
|
var _a;
|
|
45
51
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
46
52
|
Boolean(iconVisible) && ((_a = i.icon) == null ? void 0 : _a.call(i)),
|
|
@@ -48,122 +54,132 @@ function SelectView({
|
|
|
48
54
|
idx < selectedItems.length - 1 && ", "
|
|
49
55
|
] }, i == null ? void 0 : i.label);
|
|
50
56
|
}) });
|
|
51
|
-
return /* @__PURE__ */ jsxs(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
{
|
|
57
|
-
...labelProps,
|
|
58
|
-
className: bem("label", void 0, labelProps == null ? void 0 : labelProps.className),
|
|
59
|
-
error: isError,
|
|
60
|
-
htmlFor: id,
|
|
61
|
-
label,
|
|
62
|
-
required,
|
|
63
|
-
type: "label"
|
|
64
|
-
}
|
|
65
|
-
),
|
|
66
|
-
/* @__PURE__ */ jsxs("div", { className: bem("field", void 0, fieldClassName), children: [
|
|
67
|
-
/* @__PURE__ */ jsx(
|
|
68
|
-
"button",
|
|
57
|
+
return /* @__PURE__ */ jsxs(
|
|
58
|
+
"div",
|
|
59
|
+
{
|
|
60
|
+
className: bem(
|
|
61
|
+
void 0,
|
|
69
62
|
{
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
"aria-expanded": open,
|
|
74
|
-
"aria-haspopup": "listbox",
|
|
75
|
-
className: bem("button", { expanded: open }),
|
|
76
|
-
disabled,
|
|
77
|
-
id,
|
|
78
|
-
name,
|
|
79
|
-
type: "button",
|
|
80
|
-
onClick: _clientState == null ? void 0 : _clientState.onButtonClick,
|
|
81
|
-
onKeyDown: _clientState == null ? void 0 : _clientState.onButtonKey,
|
|
82
|
-
children: display
|
|
83
|
-
}
|
|
63
|
+
fullWidth: Boolean(fullWidth)
|
|
64
|
+
},
|
|
65
|
+
className
|
|
84
66
|
),
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
name,
|
|
89
|
-
type: "hidden",
|
|
90
|
-
value: Array.isArray(value) ? value.join(",") : value ?? ""
|
|
91
|
-
}
|
|
92
|
-
),
|
|
93
|
-
/* @__PURE__ */ jsxs(
|
|
94
|
-
"ul",
|
|
95
|
-
{
|
|
96
|
-
ref: listRef,
|
|
97
|
-
className: bem("listbox", { "is-open": open, "is-closed": !open }),
|
|
98
|
-
hidden: !open,
|
|
99
|
-
id: listId,
|
|
100
|
-
role: "listbox",
|
|
101
|
-
tabIndex: -1,
|
|
102
|
-
children: [
|
|
103
|
-
!Boolean(required) && !Boolean(multiple) && /* @__PURE__ */ jsx(
|
|
104
|
-
"li",
|
|
105
|
-
{
|
|
106
|
-
"aria-selected": selectedItems.length === 0,
|
|
107
|
-
className: bem("item", { selected: selectedItems.length === 0 }),
|
|
108
|
-
role: "option",
|
|
109
|
-
onClick: /* @__PURE__ */ __name(() => _clientState == null ? void 0 : _clientState.onOptionClick(null), "onClick"),
|
|
110
|
-
onKeyDown: /* @__PURE__ */ __name(() => _clientState == null ? void 0 : _clientState.onOptionClick(null), "onKeyDown"),
|
|
111
|
-
children: placeholder
|
|
112
|
-
},
|
|
113
|
-
"placeholder"
|
|
114
|
-
),
|
|
115
|
-
items.map((opt) => {
|
|
116
|
-
var _a;
|
|
117
|
-
const selected = Array.isArray(value) ? value.includes(opt.value) : opt.value === value;
|
|
118
|
-
return /* @__PURE__ */ jsxs(
|
|
119
|
-
"li",
|
|
120
|
-
{
|
|
121
|
-
"aria-selected": selected,
|
|
122
|
-
className: bem("item", { selected }),
|
|
123
|
-
role: "option",
|
|
124
|
-
onClick: /* @__PURE__ */ __name(() => _clientState == null ? void 0 : _clientState.onOptionClick(opt.value), "onClick"),
|
|
125
|
-
onKeyDown: /* @__PURE__ */ __name(() => _clientState == null ? void 0 : _clientState.onOptionClick(opt.value), "onKeyDown"),
|
|
126
|
-
children: [
|
|
127
|
-
Boolean(multiple) && /* @__PURE__ */ jsx(
|
|
128
|
-
"input",
|
|
129
|
-
{
|
|
130
|
-
readOnly: true,
|
|
131
|
-
"aria-hidden": "true",
|
|
132
|
-
className: bem("checkbox", { checked: selected }),
|
|
133
|
-
defaultChecked: selected,
|
|
134
|
-
type: "checkbox"
|
|
135
|
-
}
|
|
136
|
-
),
|
|
137
|
-
Boolean(iconVisible) && ((_a = opt.icon) == null ? void 0 : _a.call(opt)),
|
|
138
|
-
opt.label
|
|
139
|
-
]
|
|
140
|
-
},
|
|
141
|
-
`${id}-${opt.value}`
|
|
142
|
-
);
|
|
143
|
-
})
|
|
144
|
-
]
|
|
145
|
-
}
|
|
146
|
-
)
|
|
147
|
-
] }),
|
|
148
|
-
(isError || Boolean(helperText)) && /* @__PURE__ */ jsx(
|
|
149
|
-
"div",
|
|
150
|
-
{
|
|
151
|
-
"aria-live": isError ? "assertive" : "polite",
|
|
152
|
-
className: bem("helperText"),
|
|
153
|
-
id: errorId ?? helperId,
|
|
154
|
-
role: isError ? "alert" : void 0,
|
|
155
|
-
children: /* @__PURE__ */ jsx(
|
|
156
|
-
"span",
|
|
67
|
+
children: [
|
|
68
|
+
!Boolean(hideLabel) && /* @__PURE__ */ jsx(
|
|
69
|
+
Label,
|
|
157
70
|
{
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
71
|
+
...labelProps,
|
|
72
|
+
className: bem("label", void 0, labelProps == null ? void 0 : labelProps.className),
|
|
73
|
+
error: isError,
|
|
74
|
+
htmlFor: id,
|
|
75
|
+
label,
|
|
76
|
+
required,
|
|
77
|
+
type: "label"
|
|
78
|
+
}
|
|
79
|
+
),
|
|
80
|
+
/* @__PURE__ */ jsxs("div", { className: bem("field", void 0, fieldClassName), children: [
|
|
81
|
+
/* @__PURE__ */ jsx(
|
|
82
|
+
"button",
|
|
83
|
+
{
|
|
84
|
+
ref: btnRef,
|
|
85
|
+
"aria-controls": listId,
|
|
86
|
+
"aria-describedby": errorId ?? helperId,
|
|
87
|
+
"aria-expanded": open,
|
|
88
|
+
"aria-haspopup": "listbox",
|
|
89
|
+
className: bem("button", { expanded: open }),
|
|
90
|
+
disabled,
|
|
91
|
+
id,
|
|
92
|
+
name,
|
|
93
|
+
type: "button",
|
|
94
|
+
onClick: _clientState == null ? void 0 : _clientState.onButtonClick,
|
|
95
|
+
onKeyDown: _clientState == null ? void 0 : _clientState.onButtonKey,
|
|
96
|
+
children: display
|
|
97
|
+
}
|
|
98
|
+
),
|
|
99
|
+
/* @__PURE__ */ jsx(
|
|
100
|
+
"input",
|
|
101
|
+
{
|
|
102
|
+
name,
|
|
103
|
+
type: "hidden",
|
|
104
|
+
value: Array.isArray(value) ? value.join(",") : value ?? ""
|
|
105
|
+
}
|
|
106
|
+
),
|
|
107
|
+
/* @__PURE__ */ jsxs(
|
|
108
|
+
"ul",
|
|
109
|
+
{
|
|
110
|
+
ref: listRef,
|
|
111
|
+
className: bem("listbox", { "is-open": open, "is-closed": !open }),
|
|
112
|
+
hidden: !open,
|
|
113
|
+
id: listId,
|
|
114
|
+
role: "listbox",
|
|
115
|
+
tabIndex: -1,
|
|
116
|
+
children: [
|
|
117
|
+
!Boolean(required) && !Boolean(multiple) && /* @__PURE__ */ jsx(
|
|
118
|
+
"li",
|
|
119
|
+
{
|
|
120
|
+
"aria-selected": selectedItems.length === 0,
|
|
121
|
+
className: bem("item", { selected: selectedItems.length === 0 }),
|
|
122
|
+
role: "option",
|
|
123
|
+
onClick: /* @__PURE__ */ __name(() => _clientState == null ? void 0 : _clientState.onOptionClick(null), "onClick"),
|
|
124
|
+
onKeyDown: /* @__PURE__ */ __name(() => _clientState == null ? void 0 : _clientState.onOptionClick(null), "onKeyDown"),
|
|
125
|
+
children: placeholder
|
|
126
|
+
},
|
|
127
|
+
"placeholder"
|
|
128
|
+
),
|
|
129
|
+
items.map((opt) => {
|
|
130
|
+
var _a;
|
|
131
|
+
const selected = Array.isArray(value) ? value.includes(opt.value) : opt.value === value;
|
|
132
|
+
return /* @__PURE__ */ jsxs(
|
|
133
|
+
"li",
|
|
134
|
+
{
|
|
135
|
+
"aria-selected": selected,
|
|
136
|
+
className: bem("item", { selected }),
|
|
137
|
+
role: "option",
|
|
138
|
+
onClick: /* @__PURE__ */ __name(() => _clientState == null ? void 0 : _clientState.onOptionClick(opt.value), "onClick"),
|
|
139
|
+
onKeyDown: /* @__PURE__ */ __name(() => _clientState == null ? void 0 : _clientState.onOptionClick(opt.value), "onKeyDown"),
|
|
140
|
+
children: [
|
|
141
|
+
Boolean(multiple) && /* @__PURE__ */ jsx(
|
|
142
|
+
"input",
|
|
143
|
+
{
|
|
144
|
+
readOnly: true,
|
|
145
|
+
"aria-hidden": "true",
|
|
146
|
+
className: bem("checkbox", { checked: selected }),
|
|
147
|
+
defaultChecked: selected,
|
|
148
|
+
type: "checkbox"
|
|
149
|
+
}
|
|
150
|
+
),
|
|
151
|
+
Boolean(iconVisible) && ((_a = opt.icon) == null ? void 0 : _a.call(opt)),
|
|
152
|
+
opt.label
|
|
153
|
+
]
|
|
154
|
+
},
|
|
155
|
+
`${id}-${opt.value}`
|
|
156
|
+
);
|
|
157
|
+
})
|
|
158
|
+
]
|
|
159
|
+
}
|
|
160
|
+
)
|
|
161
|
+
] }),
|
|
162
|
+
(isError || Boolean(helperText)) && /* @__PURE__ */ jsx(
|
|
163
|
+
"div",
|
|
164
|
+
{
|
|
165
|
+
"aria-live": isError ? "assertive" : "polite",
|
|
166
|
+
className: bem("helperText"),
|
|
167
|
+
id: errorId ?? helperId,
|
|
168
|
+
role: isError ? "alert" : void 0,
|
|
169
|
+
children: /* @__PURE__ */ jsx(
|
|
170
|
+
"span",
|
|
171
|
+
{
|
|
172
|
+
className: bem("helperText__content", {
|
|
173
|
+
"is-error": isError
|
|
174
|
+
}),
|
|
175
|
+
children: errorText ?? helperText
|
|
176
|
+
}
|
|
177
|
+
)
|
|
162
178
|
}
|
|
163
179
|
)
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
180
|
+
]
|
|
181
|
+
}
|
|
182
|
+
);
|
|
167
183
|
}
|
|
168
184
|
__name(SelectView, "SelectView");
|
|
169
185
|
export {
|
|
@@ -10,9 +10,7 @@ function SidebarClient({
|
|
|
10
10
|
onChange,
|
|
11
11
|
...props
|
|
12
12
|
}) {
|
|
13
|
-
const [collapsed, setCollapsed] = useState(
|
|
14
|
-
props.initialCollapsed ?? false
|
|
15
|
-
);
|
|
13
|
+
const [collapsed, setCollapsed] = useState(props.initialCollapsed ?? false);
|
|
16
14
|
useEffect(() => {
|
|
17
15
|
const stored = localStorage.getItem(STORAGE_KEY);
|
|
18
16
|
if (stored !== null) setCollapsed(stored === "1");
|
|
@@ -23,21 +21,24 @@ function SidebarClient({
|
|
|
23
21
|
return !c;
|
|
24
22
|
});
|
|
25
23
|
}, "handleToggle");
|
|
26
|
-
const formatedItems = useMemo(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
24
|
+
const formatedItems = useMemo(
|
|
25
|
+
() => items.map((el) => {
|
|
26
|
+
var _a;
|
|
27
|
+
return {
|
|
28
|
+
...el,
|
|
29
|
+
redirect: (el == null ? void 0 : el.redirect) && {
|
|
30
|
+
...el == null ? void 0 : el.redirect,
|
|
31
|
+
href: ((_a = el == null ? void 0 : el.redirect) == null ? void 0 : _a.href) ?? "",
|
|
32
|
+
onClick: /* @__PURE__ */ __name((e) => {
|
|
33
|
+
var _a2, _b;
|
|
34
|
+
(_b = (_a2 = el == null ? void 0 : el.redirect) == null ? void 0 : _a2.onClick) == null ? void 0 : _b.call(_a2, e);
|
|
35
|
+
onChange == null ? void 0 : onChange(el);
|
|
36
|
+
}, "onClick")
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
}),
|
|
40
|
+
[items, onChange]
|
|
41
|
+
);
|
|
41
42
|
return /* @__PURE__ */ jsx(
|
|
42
43
|
SideNavView,
|
|
43
44
|
{
|
|
@@ -3,7 +3,14 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import SideNavView from "./SideNav.view.js";
|
|
5
5
|
function SideNavServer(props) {
|
|
6
|
-
return /* @__PURE__ */ jsx(
|
|
6
|
+
return /* @__PURE__ */ jsx(
|
|
7
|
+
SideNavView,
|
|
8
|
+
{
|
|
9
|
+
...props,
|
|
10
|
+
collapsed: props.initialCollapsed ?? false,
|
|
11
|
+
interactive: false
|
|
12
|
+
}
|
|
13
|
+
);
|
|
7
14
|
}
|
|
8
15
|
__name(SideNavServer, "SideNavServer");
|
|
9
16
|
export {
|
|
@@ -20,7 +20,14 @@ function SideNavView({
|
|
|
20
20
|
className
|
|
21
21
|
}) {
|
|
22
22
|
const renderItem = /* @__PURE__ */ __name((icon, label) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
23
|
-
/* @__PURE__ */ jsx("div", { className: bem("icon__wrapper"), children: /* @__PURE__ */ jsx(
|
|
23
|
+
/* @__PURE__ */ jsx("div", { className: bem("icon__wrapper"), children: /* @__PURE__ */ jsx(
|
|
24
|
+
Icon,
|
|
25
|
+
{
|
|
26
|
+
size: 25,
|
|
27
|
+
...icon,
|
|
28
|
+
className: bem("icon", void 0, icon == null ? void 0 : icon.className)
|
|
29
|
+
}
|
|
30
|
+
) }),
|
|
24
31
|
!collapsed && /* @__PURE__ */ jsx("span", { className: bem("label", { collapsed }), children: label })
|
|
25
32
|
] }), "renderItem");
|
|
26
33
|
return /* @__PURE__ */ jsxs(
|
|
@@ -38,7 +45,14 @@ function SideNavView({
|
|
|
38
45
|
type: "button",
|
|
39
46
|
onClick: onToggle,
|
|
40
47
|
children: [
|
|
41
|
-
/* @__PURE__ */ jsx(
|
|
48
|
+
/* @__PURE__ */ jsx(
|
|
49
|
+
Icon,
|
|
50
|
+
{
|
|
51
|
+
size: "md",
|
|
52
|
+
...iconProps,
|
|
53
|
+
name: collapsed ? collapsedIcon : unCollapsedIcon
|
|
54
|
+
}
|
|
55
|
+
),
|
|
42
56
|
/* @__PURE__ */ jsx("span", { className: bem("collape__label", { "is-hidden": collapsed }), children: collapsed ? collapsedLabel : unCollapsedLabel })
|
|
43
57
|
]
|
|
44
58
|
}
|
|
@@ -47,8 +61,12 @@ function SideNavView({
|
|
|
47
61
|
Link,
|
|
48
62
|
{
|
|
49
63
|
...redirect,
|
|
50
|
-
className: bem("link", { collapsed, "is-active": Boolean(active) }, redirect == null ? void 0 : redirect.className),
|
|
51
64
|
href: redirect.href,
|
|
65
|
+
className: bem(
|
|
66
|
+
"link",
|
|
67
|
+
{ collapsed, "is-active": Boolean(active) },
|
|
68
|
+
redirect == null ? void 0 : redirect.className
|
|
69
|
+
),
|
|
52
70
|
children: renderItem(icon, label)
|
|
53
71
|
}
|
|
54
72
|
) : /* @__PURE__ */ jsx(Fragment, { children: renderItem(icon, label) }) }, label)) }) })
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
4
4
|
import { useEffect } from "react";
|
|
5
|
-
function SkeletonEffectsLoader({
|
|
5
|
+
function SkeletonEffectsLoader({
|
|
6
|
+
animation
|
|
7
|
+
}) {
|
|
6
8
|
useEffect(() => {
|
|
7
9
|
if (animation && animation !== "none") {
|
|
8
10
|
void import("./Skeleton.effects.module.scss.js");
|