@prokodo/ui 0.1.13 → 0.1.15
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 +2 -0
- package/dist/components/RTE/RTE.client.js +0 -1
- package/dist/components/RTE/RTE.js +4 -1
- package/dist/components/accordion/Accordion.js +8 -2
- package/dist/components/accordion/Accordion.view.js +1 -1
- package/dist/components/animated/Animated.client.js +13 -5
- package/dist/components/animated/Animated.js +8 -2
- package/dist/components/animatedText/AnimatedText.client.js +10 -2
- package/dist/components/animatedText/AnimatedText.js +8 -2
- package/dist/components/autocomplete/Autocomplete.client.js +5 -1
- package/dist/components/autocomplete/Autocomplete.js +4 -1
- package/dist/components/autocomplete/Autocomplete.view.js +13 -4
- package/dist/components/avatar/Avatar.js +4 -1
- package/dist/components/avatar/Avatar.view.js +19 -12
- package/dist/components/base-link/BaseLink.js +4 -1
- package/dist/components/base-link/BaseLink.view.js +3 -0
- package/dist/components/button/Button.css +114 -6
- package/dist/components/button/Button.js +4 -1
- package/dist/components/button/Button.module.css +114 -6
- package/dist/components/button/Button.module.scss.js +10 -2
- package/dist/components/button/Button.view.js +4 -1
- package/dist/components/calendly/Calendly.js +8 -2
- package/dist/components/card/Card.js +11 -5
- package/dist/components/card/Card.view.js +22 -5
- package/dist/components/carousel/Carousel.client.js +140 -129
- package/dist/components/carousel/Carousel.js +8 -2
- package/dist/components/carousel/Carousel.view.js +10 -0
- package/dist/components/checkbox/Checkbox.client.js +42 -0
- package/dist/components/checkbox/Checkbox.css +312 -0
- package/dist/components/checkbox/Checkbox.js +15 -0
- package/dist/components/checkbox/Checkbox.lazy.js +12 -0
- package/dist/components/checkbox/Checkbox.module.css +312 -0
- package/dist/components/checkbox/Checkbox.module.scss.js +20 -0
- package/dist/components/checkbox/Checkbox.server.js +20 -0
- package/dist/components/checkbox/Checkbox.view.js +89 -0
- package/dist/components/checkbox/index.js +4 -0
- package/dist/components/checkbox-group/CheckboxGroup.client.js +57 -0
- package/dist/components/checkbox-group/CheckboxGroup.css +238 -0
- package/dist/components/checkbox-group/CheckboxGroup.js +16 -0
- package/dist/components/checkbox-group/CheckboxGroup.lazy.js +12 -0
- package/dist/components/checkbox-group/CheckboxGroup.module.css +238 -0
- package/dist/components/checkbox-group/CheckboxGroup.module.scss.js +15 -0
- package/dist/components/checkbox-group/CheckboxGroup.server.js +25 -0
- package/dist/components/checkbox-group/CheckboxGroup.view.js +100 -0
- package/dist/components/checkbox-group/index.js +4 -0
- package/dist/components/chip/Chip.js +4 -1
- package/dist/components/chip/Chip.view.js +4 -0
- package/dist/components/datePicker/DatePicker.js +4 -1
- package/dist/components/dialog/Dialog.js +8 -2
- package/dist/components/dialog/Dialog.view.js +25 -6
- package/dist/components/drawer/Drawer.client.js +0 -1
- package/dist/components/drawer/Drawer.js +4 -1
- package/dist/components/drawer/Drawer.view.js +14 -3
- package/dist/components/dynamic-list/DynamicList.client.js +1 -0
- package/dist/components/dynamic-list/DynamicList.js +4 -1
- package/dist/components/dynamic-list/DynamicList.view.js +18 -5
- package/dist/components/form/Form.client.js +4 -1
- package/dist/components/form/Form.js +4 -1
- package/dist/components/form/Form.view.js +3 -1
- package/dist/components/form/FormField.client.js +8 -2
- package/dist/components/form/FormField.js +4 -1
- package/dist/components/form/FormResponse.js +4 -1
- package/dist/components/headline/Headline.js +8 -2
- package/dist/components/icon/Icon.js +8 -2
- package/dist/components/image/Image.client.js +9 -5
- package/dist/components/image/Image.js +8 -2
- package/dist/components/image/Image.server.js +2 -1
- package/dist/components/image-text/ImageText.js +18 -8
- package/dist/components/input/Input.client.js +15 -2
- package/dist/components/input/Input.js +4 -1
- package/dist/components/input/Input.view.js +15 -6
- package/dist/components/input/InputValidation.js +6 -2
- package/dist/components/inputOTP/InputOTP.js +2 -1
- package/dist/components/link/Link.js +5 -3
- package/dist/components/link/Link.view.js +2 -1
- package/dist/components/list/List.js +52 -23
- package/dist/components/loading/Loading.js +4 -1
- package/dist/components/loading/Loading.view.js +25 -5
- package/dist/components/lottie/Lottie.js +9 -5
- package/dist/components/map/Map.js +62 -44
- package/dist/components/pagination/Pagination.js +4 -1
- package/dist/components/pagination/Pagination.view.js +3 -1
- package/dist/components/post-item/PostItem.js +4 -1
- package/dist/components/post-item/PostItemAuthor.js +4 -1
- package/dist/components/post-teaser/PostTeaser.js +4 -1
- package/dist/components/post-teaser/PostTeaser.view.js +4 -2
- package/dist/components/post-widget/PostWidget.js +5 -3
- package/dist/components/post-widget/PostWidget.view.js +9 -3
- package/dist/components/post-widget-carousel/PostWidgetCarousel.js +8 -2
- package/dist/components/post-widget-carousel/PostWidgetCarousel.view.js +2 -1
- package/dist/components/progressBar/ProgressBar.js +8 -2
- package/dist/components/progressBar/ProgressBar.view.js +4 -1
- package/dist/components/rating/Rating.client.js +6 -1
- package/dist/components/rating/Rating.js +4 -1
- package/dist/components/rich-text/RichText.client.js +52 -17
- package/dist/components/rich-text/RichText.js +8 -2
- package/dist/components/rich-text/RichText.server.js +3 -0
- package/dist/components/select/Select.client.js +149 -101
- package/dist/components/select/Select.js +8 -2
- package/dist/components/select/Select.view.js +35 -11
- package/dist/components/sidenav/SideNav.js +8 -2
- package/dist/components/slider/Slider.client.js +11 -2
- package/dist/components/slider/Slider.js +4 -1
- package/dist/components/slider/Slider.view.js +43 -5
- package/dist/components/snackbar/Snackbar.client.js +5 -1
- package/dist/components/snackbar/Snackbar.css +5 -1
- package/dist/components/snackbar/Snackbar.js +4 -1
- package/dist/components/snackbar/Snackbar.module.css +5 -1
- package/dist/components/snackbar/SnackbarProvider.js +8 -2
- package/dist/components/stepper/Stepper.client.js +6 -3
- package/dist/components/stepper/Stepper.js +4 -1
- package/dist/components/switch/Switch.js +4 -1
- package/dist/components/switch/Switch.view.js +1 -0
- package/dist/components/table/Table.js +1 -0
- package/dist/components/tabs/Tabs.client.js +1 -0
- package/dist/components/tabs/Tabs.js +8 -2
- package/dist/components/tabs/Tabs.view.js +8 -2
- package/dist/components/tooltip/Tooltip.client.js +126 -91
- package/dist/components/tooltip/Tooltip.js +10 -4
- package/dist/components/tooltip/Tooltip.view.js +1 -0
- package/dist/constants/project.js +1 -1
- package/dist/helpers/createIsland.js +1 -0
- package/dist/helpers/createLazyWrapper.js +1 -0
- package/dist/hooks/useGoogleMaps.js +0 -1
- package/dist/index.js +4 -0
- package/dist/theme.css +430 -9
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/components/RTE/RTE.d.ts +1 -1
- package/dist/types/components/RTE/RTE.lazy.d.ts +1 -1
- package/dist/types/components/avatar/Avatar.view.d.ts +1 -1
- package/dist/types/components/carousel/Carousel.view.d.ts +1 -1
- package/dist/types/components/checkbox/Checkbox.client.d.ts +4 -0
- package/dist/types/components/checkbox/Checkbox.d.ts +18 -0
- package/dist/types/components/checkbox/Checkbox.lazy.d.ts +19 -0
- package/dist/types/components/checkbox/Checkbox.model.d.ts +23 -0
- package/dist/types/components/checkbox/Checkbox.server.d.ts +3 -0
- package/dist/types/components/checkbox/Checkbox.view.d.ts +3 -0
- package/dist/types/components/checkbox/index.d.ts +2 -0
- package/dist/types/components/checkbox-group/CheckboxGroup.client.d.ts +4 -0
- package/dist/types/components/checkbox-group/CheckboxGroup.d.ts +4 -0
- package/dist/types/components/checkbox-group/CheckboxGroup.lazy.d.ts +5 -0
- package/dist/types/components/checkbox-group/CheckboxGroup.model.d.ts +38 -0
- package/dist/types/components/checkbox-group/CheckboxGroup.server.d.ts +3 -0
- package/dist/types/components/checkbox-group/CheckboxGroup.view.d.ts +3 -0
- package/dist/types/components/checkbox-group/index.d.ts +2 -0
- package/dist/types/components/dialog/Dialog.model.d.ts +1 -0
- package/dist/types/components/dialog/Dialog.view.d.ts +1 -1
- package/dist/types/components/dynamic-list/DynamicList.model.d.ts +1 -1
- package/dist/types/components/headline/Headline.model.d.ts +1 -1
- package/dist/types/components/input/Input.view.d.ts +1 -1
- package/dist/types/index.d.ts +2 -0
- package/package.json +29 -5
|
@@ -27,6 +27,7 @@ function InputView({
|
|
|
27
27
|
inputClassName,
|
|
28
28
|
hideCounter,
|
|
29
29
|
rows,
|
|
30
|
+
hideLegend: _hideLegend,
|
|
30
31
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
31
32
|
minRows,
|
|
32
33
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -133,7 +134,10 @@ function InputView({
|
|
|
133
134
|
"div",
|
|
134
135
|
{
|
|
135
136
|
className: bem("footer", {
|
|
136
|
-
"counter-only":
|
|
137
|
+
"counter-only": (
|
|
138
|
+
/* istanbul ignore next */
|
|
139
|
+
!isError && !hasHelperText && typeof maxLength === "number"
|
|
140
|
+
)
|
|
137
141
|
}),
|
|
138
142
|
children: [
|
|
139
143
|
(isError || hasHelperText) && /* @__PURE__ */ jsx(
|
|
@@ -154,11 +158,16 @@ function InputView({
|
|
|
154
158
|
)
|
|
155
159
|
}
|
|
156
160
|
),
|
|
157
|
-
!Boolean(hideCounter) && typeof maxLength === "number" && /*
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
161
|
+
!Boolean(hideCounter) && typeof maxLength === "number" && /* istanbul ignore next */
|
|
162
|
+
/* @__PURE__ */ jsx("div", { className: bem("counter"), children: /* @__PURE__ */ jsxs("span", {
|
|
163
|
+
/* istanbul ignore next */
|
|
164
|
+
children: [
|
|
165
|
+
value != null ? String(value).length : 0,
|
|
166
|
+
" ",
|
|
167
|
+
"/ ",
|
|
168
|
+
maxLength
|
|
169
|
+
]
|
|
170
|
+
}) })
|
|
162
171
|
]
|
|
163
172
|
}
|
|
164
173
|
)
|
|
@@ -32,8 +32,12 @@ const buildCustomRegex = /* @__PURE__ */ __name((pattern) => {
|
|
|
32
32
|
var _a;
|
|
33
33
|
const m = pattern.match(/^\/([\s\S]*)\/([gimuy]*)$/);
|
|
34
34
|
const src = m ? m[1] : pattern;
|
|
35
|
-
const flags = m ? (
|
|
36
|
-
|
|
35
|
+
const flags = m ? (
|
|
36
|
+
/* istanbul ignore next */
|
|
37
|
+
(_a = m[2]) == null ? void 0 : _a.replace(/[^gimuy]/g, "")
|
|
38
|
+
) : "";
|
|
39
|
+
return new RegExp(src ?? /* istanbul ignore next */
|
|
40
|
+
"", flags);
|
|
37
41
|
}, "buildCustomRegex");
|
|
38
42
|
const handleValidation = /* @__PURE__ */ __name((type, name, value, required, min, max, customRegexPattern, errorTranslations, onValidate) => {
|
|
39
43
|
if (!onValidate) return;
|
|
@@ -159,7 +159,8 @@ const InputOTP = memo(
|
|
|
159
159
|
role: "group",
|
|
160
160
|
onPaste: handlePaste,
|
|
161
161
|
children: [
|
|
162
|
-
/* @__PURE__ */ jsx("span", { className: bem("label"), id: "otp-group-label", children: groupLabel ??
|
|
162
|
+
/* @__PURE__ */ jsx("span", { className: bem("label"), id: "otp-group-label", children: groupLabel ?? /* istanbul ignore next */
|
|
163
|
+
"Enter your OTP" }),
|
|
163
164
|
/* @__PURE__ */ jsx("span", { className: bem("instruction"), id: "otp-instructions", children: groupInstruction ?? "Use the arrow keys to navigate between digits." }),
|
|
164
165
|
otp.map((value, index) => /* @__PURE__ */ jsx(
|
|
165
166
|
Input,
|
|
@@ -5,9 +5,11 @@ import LinkServer from "./Link.server.js";
|
|
|
5
5
|
const Link = createIsland({
|
|
6
6
|
name: "Link",
|
|
7
7
|
Server: LinkServer,
|
|
8
|
-
loadLazy:
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
loadLazy: (
|
|
9
|
+
/* istanbul ignore next */
|
|
10
|
+
/* @__PURE__ */ __name(() => import("./Link.lazy.js"), "loadLazy")
|
|
11
|
+
)
|
|
12
|
+
// optional: custom predicate (e.g. always interactive if target="_blank") isInteractive: /* istanbul ignore next */ p => typeof p.linkComponent === "function",
|
|
11
13
|
});
|
|
12
14
|
export {
|
|
13
15
|
Link
|
|
@@ -51,6 +51,7 @@ function LinkView({
|
|
|
51
51
|
}
|
|
52
52
|
);
|
|
53
53
|
}
|
|
54
|
+
const clickProps = hasHandlers ? { onClick } : null;
|
|
54
55
|
return /* @__PURE__ */ jsx(
|
|
55
56
|
BaseLinkComponent,
|
|
56
57
|
{
|
|
@@ -59,7 +60,7 @@ function LinkView({
|
|
|
59
60
|
href,
|
|
60
61
|
linkComponent,
|
|
61
62
|
target,
|
|
62
|
-
...
|
|
63
|
+
...clickProps,
|
|
63
64
|
children
|
|
64
65
|
}
|
|
65
66
|
);
|
|
@@ -13,8 +13,16 @@ function List({
|
|
|
13
13
|
type,
|
|
14
14
|
variant = "inherit",
|
|
15
15
|
className,
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
/* istanbul ignore next */
|
|
17
|
+
options = (
|
|
18
|
+
/* istanbul ignore next */
|
|
19
|
+
{}
|
|
20
|
+
),
|
|
21
|
+
/* istanbul ignore next */
|
|
22
|
+
items = (
|
|
23
|
+
/* istanbul ignore next */
|
|
24
|
+
[]
|
|
25
|
+
),
|
|
18
26
|
classNameDesc,
|
|
19
27
|
...props
|
|
20
28
|
}) {
|
|
@@ -93,7 +101,10 @@ function List({
|
|
|
93
101
|
}, "DescParagraph");
|
|
94
102
|
const IconWrapper = /* @__PURE__ */ __name(() => {
|
|
95
103
|
if (icon === void 0 || icon === null) return null;
|
|
96
|
-
return /* @__PURE__ */ jsx("div", { "aria-hidden": "true", className: bem("item__icon__wrapper"), children: isValidElement(icon) ?
|
|
104
|
+
return /* @__PURE__ */ jsx("div", { "aria-hidden": "true", className: bem("item__icon__wrapper"), children: isValidElement(icon) ? (
|
|
105
|
+
/* istanbul ignore next */
|
|
106
|
+
icon
|
|
107
|
+
) : /* @__PURE__ */ jsx(
|
|
97
108
|
Icon,
|
|
98
109
|
{
|
|
99
110
|
color: variant,
|
|
@@ -160,32 +171,50 @@ function List({
|
|
|
160
171
|
}
|
|
161
172
|
)
|
|
162
173
|
},
|
|
163
|
-
`list-item-${
|
|
174
|
+
`list-item-${/* istanbul ignore next */
|
|
175
|
+
id ?? i}`
|
|
164
176
|
);
|
|
165
177
|
}
|
|
166
178
|
if (redirect) {
|
|
167
179
|
const linkProps = redirect;
|
|
168
|
-
return /* @__PURE__ */ jsx(
|
|
169
|
-
|
|
180
|
+
return /* @__PURE__ */ jsx(
|
|
181
|
+
"li",
|
|
170
182
|
{
|
|
171
|
-
className:
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
+
className: liClass,
|
|
184
|
+
children: /* @__PURE__ */ jsxs(
|
|
185
|
+
Link,
|
|
186
|
+
{
|
|
187
|
+
className: bem("item__link", void 0, linkProps.className),
|
|
188
|
+
variant,
|
|
189
|
+
...linkProps,
|
|
190
|
+
children: [
|
|
191
|
+
/* @__PURE__ */ jsxs("div", { className: bem("item__link__header"), children: [
|
|
192
|
+
/* @__PURE__ */ jsx(IconWrapper, {}),
|
|
193
|
+
/* @__PURE__ */ jsx(TitleSpan, {})
|
|
194
|
+
] }),
|
|
195
|
+
/* @__PURE__ */ jsx(DescParagraph, {})
|
|
196
|
+
]
|
|
197
|
+
}
|
|
198
|
+
)
|
|
199
|
+
},
|
|
200
|
+
`list-item-${/* istanbul ignore next */
|
|
201
|
+
id ?? i}`
|
|
202
|
+
);
|
|
183
203
|
}
|
|
184
|
-
return /* @__PURE__ */ jsxs(
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
204
|
+
return /* @__PURE__ */ jsxs(
|
|
205
|
+
"li",
|
|
206
|
+
{
|
|
207
|
+
className: liClass,
|
|
208
|
+
...liHandlers,
|
|
209
|
+
children: [
|
|
210
|
+
/* @__PURE__ */ jsx(IconWrapper, {}),
|
|
211
|
+
/* @__PURE__ */ jsx(TitleSpan, {}),
|
|
212
|
+
/* @__PURE__ */ jsx(DescParagraph, {})
|
|
213
|
+
]
|
|
214
|
+
},
|
|
215
|
+
`list-item-${/* istanbul ignore next */
|
|
216
|
+
id ?? i}`
|
|
217
|
+
);
|
|
189
218
|
})
|
|
190
219
|
}
|
|
191
220
|
);
|
|
@@ -5,7 +5,10 @@ import LoadingServer from "./Loading.server.js";
|
|
|
5
5
|
const Loading = createIsland({
|
|
6
6
|
name: "Loading",
|
|
7
7
|
Server: LoadingServer,
|
|
8
|
-
loadLazy:
|
|
8
|
+
loadLazy: (
|
|
9
|
+
/* istanbul ignore next */
|
|
10
|
+
/* @__PURE__ */ __name(() => import("./Loading.lazy.js"), "loadLazy")
|
|
11
|
+
)
|
|
9
12
|
});
|
|
10
13
|
export {
|
|
11
14
|
Loading,
|
|
@@ -11,8 +11,16 @@ const PX = {
|
|
|
11
11
|
const SpinnerView = /* @__PURE__ */ __name(({
|
|
12
12
|
className,
|
|
13
13
|
style,
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
/* istanbul ignore next */
|
|
15
|
+
size = (
|
|
16
|
+
/* istanbul ignore next */
|
|
17
|
+
"sm"
|
|
18
|
+
),
|
|
19
|
+
/* istanbul ignore next */
|
|
20
|
+
ariaLabel = (
|
|
21
|
+
/* istanbul ignore next */
|
|
22
|
+
"Loading"
|
|
23
|
+
),
|
|
16
24
|
reducedMotion
|
|
17
25
|
}) => {
|
|
18
26
|
const s = PX[size];
|
|
@@ -89,9 +97,21 @@ const SpinnerView = /* @__PURE__ */ __name(({
|
|
|
89
97
|
const OverlayView = /* @__PURE__ */ __name(({
|
|
90
98
|
className,
|
|
91
99
|
style,
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
100
|
+
/* istanbul ignore next */
|
|
101
|
+
size = (
|
|
102
|
+
/* istanbul ignore next */
|
|
103
|
+
"xl"
|
|
104
|
+
),
|
|
105
|
+
/* istanbul ignore next */
|
|
106
|
+
ariaLabel = (
|
|
107
|
+
/* istanbul ignore next */
|
|
108
|
+
"Loading"
|
|
109
|
+
),
|
|
110
|
+
/* istanbul ignore next */
|
|
111
|
+
show = (
|
|
112
|
+
/* istanbul ignore next */
|
|
113
|
+
true
|
|
114
|
+
),
|
|
95
115
|
blur = 0,
|
|
96
116
|
zIndex = 9999,
|
|
97
117
|
reducedMotion,
|
|
@@ -4,6 +4,7 @@ import { create } from "../../helpers/bem.js";
|
|
|
4
4
|
import styles from "./Lottie.module.scss.js";
|
|
5
5
|
const bem = create(styles, "Lottie");
|
|
6
6
|
const DotLottieReact = lazy(
|
|
7
|
+
/* istanbul ignore next */
|
|
7
8
|
() => import("@lottiefiles/dotlottie-react").then((mod) => ({
|
|
8
9
|
default: mod.DotLottieReact
|
|
9
10
|
}))
|
|
@@ -13,12 +14,15 @@ const Lottie = memo(
|
|
|
13
14
|
const [isInView, setIsInView] = useState(false);
|
|
14
15
|
const containerRef = useRef(null);
|
|
15
16
|
useEffect(() => {
|
|
16
|
-
const observer = new IntersectionObserver(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
const observer = new IntersectionObserver(
|
|
18
|
+
/* istanbul ignore next */
|
|
19
|
+
([entry]) => {
|
|
20
|
+
if ((entry == null ? void 0 : entry.isIntersecting) === true) {
|
|
21
|
+
setIsInView(true);
|
|
22
|
+
observer.disconnect();
|
|
23
|
+
}
|
|
20
24
|
}
|
|
21
|
-
|
|
25
|
+
);
|
|
22
26
|
const el = containerRef.current;
|
|
23
27
|
if (el) observer.observe(el);
|
|
24
28
|
return () => observer.disconnect();
|
|
@@ -8,54 +8,72 @@ const Map = memo(
|
|
|
8
8
|
const mapRef = useRef(null);
|
|
9
9
|
const mapInstanceRef = useRef(null);
|
|
10
10
|
const [isDark, setIsDark] = useState(
|
|
11
|
-
typeof document !== "undefined" ? document.documentElement.getAttribute("data-theme") === "dark" :
|
|
11
|
+
typeof document !== "undefined" ? document.documentElement.getAttribute("data-theme") === "dark" : (
|
|
12
|
+
/* istanbul ignore next */
|
|
13
|
+
false
|
|
14
|
+
)
|
|
12
15
|
);
|
|
13
|
-
const initMap = useCallback(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
map
|
|
36
|
-
|
|
37
|
-
|
|
16
|
+
const initMap = useCallback(
|
|
17
|
+
/* istanbul ignore next */
|
|
18
|
+
() => {
|
|
19
|
+
if (!(mapRef == null ? void 0 : mapRef.current)) return;
|
|
20
|
+
const options = {
|
|
21
|
+
center,
|
|
22
|
+
zoom,
|
|
23
|
+
mapId: isString(mapId) ? mapId : isDark === true ? "c3c70a1ea4c4b0b8" : "e5921eca3f70ade2",
|
|
24
|
+
disableDefaultUI: true,
|
|
25
|
+
mapTypeControl: false,
|
|
26
|
+
fullscreenControl: false,
|
|
27
|
+
streetViewControl: false,
|
|
28
|
+
zoomControl: true
|
|
29
|
+
};
|
|
30
|
+
const map = new google.maps.Map(mapRef.current, options);
|
|
31
|
+
mapInstanceRef.current = map;
|
|
32
|
+
if (!isArray(marker)) return;
|
|
33
|
+
marker.forEach((place) => {
|
|
34
|
+
var _a, _b;
|
|
35
|
+
if (typeof ((_a = place == null ? void 0 : place.position) == null ? void 0 : _a.lat) === "number" || typeof ((_b = place == null ? void 0 : place.position) == null ? void 0 : _b.lng) === "number")
|
|
36
|
+
return;
|
|
37
|
+
const content = document.createElement("img");
|
|
38
|
+
content.src = "/images/prokodo-map-marker.webp";
|
|
39
|
+
new google.maps.marker.AdvancedMarkerElement({
|
|
40
|
+
map,
|
|
41
|
+
content,
|
|
42
|
+
...place
|
|
43
|
+
});
|
|
38
44
|
});
|
|
39
|
-
}
|
|
40
|
-
|
|
45
|
+
},
|
|
46
|
+
[isDark, mapId, center, marker, zoom]
|
|
47
|
+
);
|
|
41
48
|
const loaded = useGoogleMaps(apiKey, isDark);
|
|
42
|
-
useEffect(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
useEffect(() => {
|
|
47
|
-
const observer = new MutationObserver(() => {
|
|
48
|
-
const theme = document.documentElement.getAttribute("data-theme");
|
|
49
|
-
setIsDark(theme === "dark");
|
|
50
|
-
mapInstanceRef.current = null;
|
|
49
|
+
useEffect(
|
|
50
|
+
/* istanbul ignore next */
|
|
51
|
+
() => {
|
|
52
|
+
if (!loaded || mapInstanceRef.current) return;
|
|
51
53
|
initMap();
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
},
|
|
55
|
+
[loaded, initMap]
|
|
56
|
+
);
|
|
57
|
+
useEffect(
|
|
58
|
+
/* istanbul ignore next */
|
|
59
|
+
() => {
|
|
60
|
+
const observer = new MutationObserver(
|
|
61
|
+
/* istanbul ignore next */
|
|
62
|
+
() => {
|
|
63
|
+
const theme = document.documentElement.getAttribute("data-theme");
|
|
64
|
+
setIsDark(theme === "dark");
|
|
65
|
+
mapInstanceRef.current = null;
|
|
66
|
+
initMap();
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
observer.observe(document.documentElement, {
|
|
70
|
+
attributes: true,
|
|
71
|
+
attributeFilter: ["data-theme"]
|
|
72
|
+
});
|
|
73
|
+
return () => observer.disconnect();
|
|
74
|
+
},
|
|
75
|
+
[initMap]
|
|
76
|
+
);
|
|
59
77
|
if (!loaded) {
|
|
60
78
|
return /* @__PURE__ */ jsx(Skeleton, { height: "500px", width: "100%" });
|
|
61
79
|
}
|
|
@@ -5,7 +5,10 @@ import PaginationServer from "./Pagination.server.js";
|
|
|
5
5
|
const Pagination = createIsland({
|
|
6
6
|
name: "Pagination",
|
|
7
7
|
Server: PaginationServer,
|
|
8
|
-
loadLazy:
|
|
8
|
+
loadLazy: (
|
|
9
|
+
/* istanbul ignore next */
|
|
10
|
+
/* @__PURE__ */ __name(() => import("./Pagination.lazy.js"), "loadLazy")
|
|
11
|
+
)
|
|
9
12
|
});
|
|
10
13
|
export {
|
|
11
14
|
Pagination
|
|
@@ -70,7 +70,9 @@ function PaginationView({
|
|
|
70
70
|
disabled: isDisabled || isActive,
|
|
71
71
|
title: (_a = it.value) == null ? void 0 : _a.toString(),
|
|
72
72
|
variant: isActive ? "outlined" : "text",
|
|
73
|
-
"aria-label": isActive ? ((_b = t == null ? void 0 : t.pageCurrent) == null ? void 0 : _b.replace("{page}", String(it.value))) ??
|
|
73
|
+
"aria-label": isActive ? ((_b = t == null ? void 0 : t.pageCurrent) == null ? void 0 : _b.replace("{page}", String(it.value))) ?? /* istanbul ignore next */
|
|
74
|
+
`Current page ${it.value}` : ((_c = t == null ? void 0 : t.pageGoTo) == null ? void 0 : _c.replace("{page}", String(it.value))) ?? /* istanbul ignore next */
|
|
75
|
+
`Go to page ${it.value}`,
|
|
74
76
|
onClick: isDisabled ? void 0 : () => onPageChange == null ? void 0 : onPageChange(it.value)
|
|
75
77
|
}
|
|
76
78
|
) }, it.value);
|
|
@@ -5,7 +5,10 @@ import PostItemServer from "./PostItem.server.js";
|
|
|
5
5
|
const PostItem = createIsland({
|
|
6
6
|
name: "PostItem",
|
|
7
7
|
Server: PostItemServer,
|
|
8
|
-
loadLazy:
|
|
8
|
+
loadLazy: (
|
|
9
|
+
/* istanbul ignore next */
|
|
10
|
+
/* @__PURE__ */ __name(() => import("./PostItem.lazy.js"), "loadLazy")
|
|
11
|
+
)
|
|
9
12
|
});
|
|
10
13
|
export {
|
|
11
14
|
PostItem
|
|
@@ -19,7 +19,10 @@ const PostItemAuthor = memo(
|
|
|
19
19
|
/* @__PURE__ */ jsx(
|
|
20
20
|
Avatar,
|
|
21
21
|
{
|
|
22
|
-
image: (
|
|
22
|
+
image: (
|
|
23
|
+
/* istanbul ignore next */
|
|
24
|
+
(avatar == null ? void 0 : avatar.src) !== void 0 && isString(avatar == null ? void 0 : avatar.src) ? { src: avatar == null ? void 0 : avatar.src, alt: (avatar == null ? void 0 : avatar.alt) ?? authorName ?? "" } : void 0
|
|
25
|
+
),
|
|
23
26
|
...avatarProps
|
|
24
27
|
}
|
|
25
28
|
),
|
|
@@ -5,7 +5,10 @@ import PostTeaserServer from "./PostTeaser.server.js";
|
|
|
5
5
|
const PostTeaser = createIsland({
|
|
6
6
|
name: "PostTeaser",
|
|
7
7
|
Server: PostTeaserServer,
|
|
8
|
-
loadLazy:
|
|
8
|
+
loadLazy: (
|
|
9
|
+
/* istanbul ignore next */
|
|
10
|
+
/* @__PURE__ */ __name(() => import("./PostTeaser.lazy.js"), "loadLazy")
|
|
11
|
+
)
|
|
9
12
|
});
|
|
10
13
|
export {
|
|
11
14
|
PostTeaser
|
|
@@ -145,8 +145,10 @@ function PostTeaserView(props) {
|
|
|
145
145
|
Image,
|
|
146
146
|
{
|
|
147
147
|
...imageMerged,
|
|
148
|
-
alt: (imageMerged == null ? void 0 : imageMerged.alt) ??
|
|
149
|
-
|
|
148
|
+
alt: (imageMerged == null ? void 0 : imageMerged.alt) ?? /* istanbul ignore next */
|
|
149
|
+
"",
|
|
150
|
+
src: (imageMerged == null ? void 0 : imageMerged.src) ?? /* istanbul ignore next */
|
|
151
|
+
""
|
|
150
152
|
}
|
|
151
153
|
)
|
|
152
154
|
]
|
|
@@ -5,9 +5,11 @@ import PostWidgetServer from "./PostWidget.server.js";
|
|
|
5
5
|
const PostWidget = createIsland({
|
|
6
6
|
name: "PostWidget",
|
|
7
7
|
Server: PostWidgetServer,
|
|
8
|
-
loadLazy:
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
loadLazy: (
|
|
9
|
+
/* istanbul ignore next */
|
|
10
|
+
/* @__PURE__ */ __name(() => import("./PostWidget.lazy.js"), "loadLazy")
|
|
11
|
+
)
|
|
12
|
+
// Only hydrate if the top-level Card gets interactive handlers isInteractive: /* istanbul ignore next */ p => typeof (p as PostWidgetProps).onClick === "function",
|
|
11
13
|
});
|
|
12
14
|
export {
|
|
13
15
|
PostWidget
|
|
@@ -119,7 +119,8 @@ function PostWidgetView({
|
|
|
119
119
|
size: "sm",
|
|
120
120
|
type: "h3",
|
|
121
121
|
variant: "inherit",
|
|
122
|
-
...item.title ??
|
|
122
|
+
...item.title ?? /* istanbul ignore next */
|
|
123
|
+
{},
|
|
123
124
|
...(componentsProps == null ? void 0 : componentsProps.title) ?? {},
|
|
124
125
|
...((_o = item.componentsProps) == null ? void 0 : _o.headline) ?? {},
|
|
125
126
|
className: bem(
|
|
@@ -134,7 +135,11 @@ function PostWidgetView({
|
|
|
134
135
|
};
|
|
135
136
|
let formattedDate;
|
|
136
137
|
if (isString(item == null ? void 0 : item.date)) {
|
|
137
|
-
formattedDate = localizeDate(
|
|
138
|
+
formattedDate = localizeDate(
|
|
139
|
+
(item == null ? void 0 : item.locale) ?? /* istanbul ignore next */
|
|
140
|
+
"en-GB",
|
|
141
|
+
item == null ? void 0 : item.date
|
|
142
|
+
);
|
|
138
143
|
}
|
|
139
144
|
return /* @__PURE__ */ jsx(
|
|
140
145
|
"li",
|
|
@@ -208,7 +213,8 @@ function PostWidgetView({
|
|
|
208
213
|
}
|
|
209
214
|
)
|
|
210
215
|
},
|
|
211
|
-
`post-widget-item-${((_y = item.title) == null ? void 0 : _y.content) ??
|
|
216
|
+
`post-widget-item-${((_y = item.title) == null ? void 0 : _y.content) ?? /* istanbul ignore next */
|
|
217
|
+
i}`
|
|
212
218
|
);
|
|
213
219
|
})
|
|
214
220
|
}
|
|
@@ -5,9 +5,15 @@ import PostWidgetCarouselServer from "./PostWidgetCarousel.server.js";
|
|
|
5
5
|
const PostWidgetCarousel = createIsland({
|
|
6
6
|
name: "PostWidgetCarousel",
|
|
7
7
|
Server: PostWidgetCarouselServer,
|
|
8
|
-
loadLazy:
|
|
8
|
+
loadLazy: (
|
|
9
|
+
/* istanbul ignore next */
|
|
10
|
+
/* @__PURE__ */ __name(() => import("./PostWidgetCarousel.lazy.js"), "loadLazy")
|
|
11
|
+
),
|
|
9
12
|
// Carousel is interactive; render server first then hydrate when visible
|
|
10
|
-
isInteractive:
|
|
13
|
+
isInteractive: (
|
|
14
|
+
/* istanbul ignore next */
|
|
15
|
+
/* @__PURE__ */ __name(() => true, "isInteractive")
|
|
16
|
+
)
|
|
11
17
|
});
|
|
12
18
|
export {
|
|
13
19
|
PostWidgetCarousel
|
|
@@ -113,7 +113,8 @@ function PostWidgetCarouselView(props) {
|
|
|
113
113
|
},
|
|
114
114
|
children: items.map((item, idx) => {
|
|
115
115
|
var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
116
|
-
const key = `carousel-item-${((_a2 = item.title) == null ? void 0 : _a2.content) ??
|
|
116
|
+
const key = `carousel-item-${((_a2 = item.title) == null ? void 0 : _a2.content) ?? /* istanbul ignore next */
|
|
117
|
+
idx}`;
|
|
117
118
|
const imgBase = item.image;
|
|
118
119
|
const imgMerged = imgBase ? {
|
|
119
120
|
...imgBase,
|
|
@@ -5,8 +5,14 @@ import ProgressBarServer from "./ProgressBar.server.js";
|
|
|
5
5
|
const ProgressBar = createIsland({
|
|
6
6
|
name: "ProgressBar",
|
|
7
7
|
Server: ProgressBarServer,
|
|
8
|
-
loadLazy:
|
|
9
|
-
|
|
8
|
+
loadLazy: (
|
|
9
|
+
/* istanbul ignore next */
|
|
10
|
+
/* @__PURE__ */ __name(() => import("./ProgressBar.lazy.js"), "loadLazy")
|
|
11
|
+
),
|
|
12
|
+
isInteractive: (
|
|
13
|
+
/* istanbul ignore next */
|
|
14
|
+
/* @__PURE__ */ __name(() => true, "isInteractive")
|
|
15
|
+
)
|
|
10
16
|
});
|
|
11
17
|
export {
|
|
12
18
|
ProgressBar
|
|
@@ -18,10 +18,13 @@ function ProgressBarView({
|
|
|
18
18
|
}) {
|
|
19
19
|
const safeValue = typeof value === "number" ? Math.min(100, Math.max(0, value)) : void 0;
|
|
20
20
|
const isIndeterminate = safeValue === void 0;
|
|
21
|
+
const { "aria-label": ariaLabelFromRest, ...restWithoutAriaLabel } = domRest;
|
|
22
|
+
const computedAriaLabel = isString(label) ? label : ariaLabelFromRest;
|
|
21
23
|
return /* @__PURE__ */ jsxs(
|
|
22
24
|
"div",
|
|
23
25
|
{
|
|
24
|
-
...
|
|
26
|
+
...restWithoutAriaLabel,
|
|
27
|
+
"aria-label": computedAriaLabel,
|
|
25
28
|
"aria-valuemax": 100,
|
|
26
29
|
"aria-valuemin": 0,
|
|
27
30
|
"aria-valuenow": safeValue ?? void 0,
|
|
@@ -44,7 +44,12 @@ function RatingClient({
|
|
|
44
44
|
}, [value]);
|
|
45
45
|
const runValidation = useCallback(
|
|
46
46
|
(newVal) => {
|
|
47
|
-
|
|
47
|
+
let numeric;
|
|
48
|
+
if (isNumber(newVal)) {
|
|
49
|
+
numeric = newVal;
|
|
50
|
+
} else {
|
|
51
|
+
numeric = isString(newVal) ? Number(newVal) : void 0;
|
|
52
|
+
}
|
|
48
53
|
handleRatingValidation(
|
|
49
54
|
name,
|
|
50
55
|
numeric,
|
|
@@ -5,7 +5,10 @@ import RatingServer from "./Rating.server.js";
|
|
|
5
5
|
const Rating = createIsland({
|
|
6
6
|
name: "Rating",
|
|
7
7
|
Server: RatingServer,
|
|
8
|
-
loadLazy:
|
|
8
|
+
loadLazy: (
|
|
9
|
+
/* istanbul ignore next */
|
|
10
|
+
/* @__PURE__ */ __name(() => import("./Rating.lazy.js"), "loadLazy")
|
|
11
|
+
)
|
|
9
12
|
});
|
|
10
13
|
export {
|
|
11
14
|
Rating
|