@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
|
@@ -2,10 +2,11 @@ const styles = {
|
|
|
2
2
|
"prokodo-Button": "prokodo-Button",
|
|
3
3
|
"prokodo-Button--has-bg-primary": "prokodo-Button--has-bg-primary",
|
|
4
4
|
"prokodo-Button--has-bg-secondary": "prokodo-Button--has-bg-secondary",
|
|
5
|
-
"prokodo-Button--has-bg-info": "prokodo-Button--has-bg-info",
|
|
6
|
-
"prokodo-Button--has-bg-error": "prokodo-Button--has-bg-error",
|
|
7
5
|
"prokodo-Button--has-bg-success": "prokodo-Button--has-bg-success",
|
|
8
6
|
"prokodo-Button--has-bg-warning": "prokodo-Button--has-bg-warning",
|
|
7
|
+
"prokodo-Button--has-bg-info": "prokodo-Button--has-bg-info",
|
|
8
|
+
"prokodo-Button--has-bg-error": "prokodo-Button--has-bg-error",
|
|
9
|
+
"prokodo-Button--has-bg-inherit": "prokodo-Button--has-bg-inherit",
|
|
9
10
|
"prokodo-Button--is-disabled": "prokodo-Button--is-disabled",
|
|
10
11
|
"prokodo-Button--has-text-inherit": "prokodo-Button--has-text-inherit",
|
|
11
12
|
"prokodo-Button--has-text-primary": "prokodo-Button--has-text-primary",
|
|
@@ -15,6 +16,13 @@ const styles = {
|
|
|
15
16
|
"prokodo-Button--has-text-warning": "prokodo-Button--has-text-warning",
|
|
16
17
|
"prokodo-Button--has-text-error": "prokodo-Button--has-text-error",
|
|
17
18
|
"prokodo-Button--has-variant-outlined": "prokodo-Button--has-variant-outlined",
|
|
19
|
+
"prokodo-Button--has-variant-outlined--has-outline-inherit": "prokodo-Button--has-variant-outlined--has-outline-inherit",
|
|
20
|
+
"prokodo-Button--has-variant-outlined--has-outline-primary": "prokodo-Button--has-variant-outlined--has-outline-primary",
|
|
21
|
+
"prokodo-Button--has-variant-outlined--has-outline-secondary": "prokodo-Button--has-variant-outlined--has-outline-secondary",
|
|
22
|
+
"prokodo-Button--has-variant-outlined--has-outline-info": "prokodo-Button--has-variant-outlined--has-outline-info",
|
|
23
|
+
"prokodo-Button--has-variant-outlined--has-outline-success": "prokodo-Button--has-variant-outlined--has-outline-success",
|
|
24
|
+
"prokodo-Button--has-variant-outlined--has-outline-warning": "prokodo-Button--has-variant-outlined--has-outline-warning",
|
|
25
|
+
"prokodo-Button--has-variant-outlined--has-outline-error": "prokodo-Button--has-variant-outlined--has-outline-error",
|
|
18
26
|
"prokodo-Button--has-image": "prokodo-Button--has-image",
|
|
19
27
|
"prokodo-Button--has-icon": "prokodo-Button--has-icon",
|
|
20
28
|
"prokodo-Button--icon-only": "prokodo-Button--icon-only",
|
|
@@ -28,7 +28,8 @@ const ButtonView = /* @__PURE__ */ __name(({
|
|
|
28
28
|
const iconMod = { "icon-only": isIconOnly };
|
|
29
29
|
const { title } = rest;
|
|
30
30
|
const inner = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
31
|
-
(image == null ? void 0 : image.src) !== void 0 && /*
|
|
31
|
+
(image == null ? void 0 : image.src) !== void 0 && /* istanbul ignore next */
|
|
32
|
+
/* @__PURE__ */ jsx(
|
|
32
33
|
Image,
|
|
33
34
|
{
|
|
34
35
|
height: 20,
|
|
@@ -48,10 +49,12 @@ const ButtonView = /* @__PURE__ */ __name(({
|
|
|
48
49
|
void 0,
|
|
49
50
|
{
|
|
50
51
|
"has-fullWidth": Boolean(fullWidth),
|
|
52
|
+
/* istanbul ignore next */
|
|
51
53
|
"has-image": (image == null ? void 0 : image.src) !== void 0,
|
|
52
54
|
"has-icon": !Boolean(isIconOnly) && isString(iconProps == null ? void 0 : iconProps.name),
|
|
53
55
|
[`has-variant-${variant}`]: true,
|
|
54
56
|
[`has-bg-${color}`]: variant === "contained",
|
|
57
|
+
[`has-variant-${variant}--has-outline-${color}`]: variant === "outlined",
|
|
55
58
|
[`has-text-${color}`]: variant === "text",
|
|
56
59
|
"is-disabled": Boolean(disabled),
|
|
57
60
|
...iconMod
|
|
@@ -5,8 +5,14 @@ import CalendlyServer from "./Calendly.server.js";
|
|
|
5
5
|
const Calendly = createIsland({
|
|
6
6
|
name: "Calendly",
|
|
7
7
|
Server: CalendlyServer,
|
|
8
|
-
loadLazy:
|
|
9
|
-
|
|
8
|
+
loadLazy: (
|
|
9
|
+
/* istanbul ignore next */
|
|
10
|
+
/* @__PURE__ */ __name(() => import("./Calendly.lazy.js"), "loadLazy")
|
|
11
|
+
),
|
|
12
|
+
isInteractive: (
|
|
13
|
+
/* istanbul ignore next */
|
|
14
|
+
/* @__PURE__ */ __name(() => true, "isInteractive")
|
|
15
|
+
)
|
|
10
16
|
});
|
|
11
17
|
export {
|
|
12
18
|
Calendly
|
|
@@ -5,11 +5,17 @@ import CardServer from "./Card.server.js";
|
|
|
5
5
|
const Card = createIsland({
|
|
6
6
|
name: "Card",
|
|
7
7
|
Server: CardServer,
|
|
8
|
-
loadLazy:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
loadLazy: (
|
|
9
|
+
/* istanbul ignore next */
|
|
10
|
+
/* @__PURE__ */ __name(() => import("./Card.lazy.js"), "loadLazy")
|
|
11
|
+
),
|
|
12
|
+
isInteractive: (
|
|
13
|
+
/* istanbul ignore next */
|
|
14
|
+
/* @__PURE__ */ __name((p) => {
|
|
15
|
+
var _a;
|
|
16
|
+
return !Boolean(p.disabled) && typeof p.onClick === "function" || typeof ((_a = p.redirect) == null ? void 0 : _a.href) === "string";
|
|
17
|
+
}, "isInteractive")
|
|
18
|
+
)
|
|
13
19
|
});
|
|
14
20
|
export {
|
|
15
21
|
Card
|
|
@@ -50,12 +50,24 @@ function CardView({
|
|
|
50
50
|
"div",
|
|
51
51
|
{
|
|
52
52
|
className: bem(void 0, modifiers, className),
|
|
53
|
-
role:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
role: (
|
|
54
|
+
/* istanbul ignore next */
|
|
55
|
+
!redirect && Boolean(isClickable) ? "button" : void 0
|
|
56
|
+
),
|
|
57
|
+
tabIndex: (
|
|
58
|
+
/* istanbul ignore next */
|
|
59
|
+
!redirect && Boolean(isClickable) ? 0 : void 0
|
|
60
|
+
),
|
|
57
61
|
onMouseEnter,
|
|
58
62
|
onMouseLeave,
|
|
63
|
+
onClick: (
|
|
64
|
+
/* istanbul ignore next */
|
|
65
|
+
Boolean(isClickable) && !redirect ? onClick : void 0
|
|
66
|
+
),
|
|
67
|
+
onKeyDown: (
|
|
68
|
+
/* istanbul ignore next */
|
|
69
|
+
Boolean(isClickable) && !redirect ? onKeyDown : void 0
|
|
70
|
+
),
|
|
59
71
|
children: [
|
|
60
72
|
Boolean(loading) && /* @__PURE__ */ jsx(
|
|
61
73
|
Skeleton,
|
|
@@ -90,8 +102,13 @@ function CardView({
|
|
|
90
102
|
Image,
|
|
91
103
|
{
|
|
92
104
|
alt: "card background",
|
|
93
|
-
className: bem("background", void 0, backgroundProps == null ? void 0 : backgroundProps.className),
|
|
94
105
|
src: background,
|
|
106
|
+
className: bem(
|
|
107
|
+
"background",
|
|
108
|
+
void 0,
|
|
109
|
+
/* istanbul ignore next */
|
|
110
|
+
backgroundProps == null ? void 0 : backgroundProps.className
|
|
111
|
+
),
|
|
95
112
|
...backgroundProps
|
|
96
113
|
}
|
|
97
114
|
)
|
|
@@ -119,144 +119,155 @@ function CarouselClient(props) {
|
|
|
119
119
|
}, "getTransformValue");
|
|
120
120
|
if (num === 0)
|
|
121
121
|
return /* @__PURE__ */ jsx(Skeleton, { height: "200px", variant: "rectangular", width: "100%" });
|
|
122
|
-
return
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
onMouseDown == null ? void 0 : onMouseDown(e);
|
|
143
|
-
handleMouseDown(e, mouseStartX);
|
|
144
|
-
setMouse(true);
|
|
145
|
-
}, "onMouseDown"),
|
|
146
|
-
onMouseEnter: /* @__PURE__ */ __name((e) => {
|
|
147
|
-
onMouseEnter == null ? void 0 : onMouseEnter(e);
|
|
148
|
-
setPlaying(false);
|
|
149
|
-
}, "onMouseEnter"),
|
|
150
|
-
onMouseLeave: /* @__PURE__ */ __name((e) => {
|
|
151
|
-
onMouseLeave == null ? void 0 : onMouseLeave(e);
|
|
152
|
-
setPlaying(true);
|
|
153
|
-
}, "onMouseLeave"),
|
|
154
|
-
onMouseUp: /* @__PURE__ */ __name((e) => {
|
|
155
|
-
onMouseUp == null ? void 0 : onMouseUp(e);
|
|
156
|
-
handleMouseUp(e, mouseStartX, mouseEndX, slide);
|
|
157
|
-
setMouse(false);
|
|
158
|
-
}, "onMouseUp"),
|
|
159
|
-
onTouchEnd: /* @__PURE__ */ __name((e) => {
|
|
160
|
-
onTouchEnd == null ? void 0 : onTouchEnd(e);
|
|
161
|
-
handleTouchEnd(touchStartX, touchEndX, slide);
|
|
162
|
-
}, "onTouchEnd"),
|
|
163
|
-
onTouchMove: /* @__PURE__ */ __name((e) => {
|
|
164
|
-
onTouchMove == null ? void 0 : onTouchMove(e);
|
|
165
|
-
handleTouchMove(e, touchEndX);
|
|
166
|
-
}, "onTouchMove"),
|
|
167
|
-
onTouchStart: /* @__PURE__ */ __name((e) => {
|
|
168
|
-
onTouchStart == null ? void 0 : onTouchStart(e);
|
|
169
|
-
handleTouchStart(e, touchStartX);
|
|
170
|
-
}, "onTouchStart"),
|
|
171
|
-
children: [
|
|
172
|
-
/* @__PURE__ */ jsx(
|
|
173
|
-
"div",
|
|
174
|
-
{
|
|
175
|
-
className: bem("wrapper", void 0, classNameWrapper),
|
|
176
|
-
style: {
|
|
177
|
-
transform: getTransformValue(),
|
|
178
|
-
transition: transitioning ? "transform 0.3s ease-in-out" : "none"
|
|
179
|
-
},
|
|
180
|
-
children: items.map((child, i) => /* @__PURE__ */ jsx(
|
|
181
|
-
"div",
|
|
182
|
-
{
|
|
183
|
-
className: bem("item", void 0, classNameItem),
|
|
184
|
-
style: { width: `${100 / effectiveItemsToShow}%` },
|
|
185
|
-
children: child
|
|
186
|
-
},
|
|
187
|
-
`cl-${i}`
|
|
188
|
-
))
|
|
122
|
+
return (
|
|
123
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
124
|
+
/* @__PURE__ */ jsxs(
|
|
125
|
+
"div",
|
|
126
|
+
{
|
|
127
|
+
...rest,
|
|
128
|
+
ref: setHostRef,
|
|
129
|
+
"aria-roledescription": "carousel",
|
|
130
|
+
className: bem(void 0, { "is-active": mouseActive }, className),
|
|
131
|
+
role: "group",
|
|
132
|
+
tabIndex: 0,
|
|
133
|
+
onKeyDown: /* @__PURE__ */ __name((e) => {
|
|
134
|
+
onKeyDown == null ? void 0 : onKeyDown(e);
|
|
135
|
+
switch (e.key) {
|
|
136
|
+
case "ArrowLeft":
|
|
137
|
+
slide("PREV");
|
|
138
|
+
break;
|
|
139
|
+
case "ArrowRight":
|
|
140
|
+
slide("NEXT");
|
|
141
|
+
break;
|
|
189
142
|
}
|
|
190
|
-
),
|
|
191
|
-
/* @__PURE__ */
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
),
|
|
200
|
-
/* @__PURE__ */
|
|
201
|
-
|
|
202
|
-
|
|
143
|
+
}, "onKeyDown"),
|
|
144
|
+
onMouseDown: /* @__PURE__ */ __name((e) => {
|
|
145
|
+
onMouseDown == null ? void 0 : onMouseDown(e);
|
|
146
|
+
handleMouseDown(e, mouseStartX);
|
|
147
|
+
setMouse(true);
|
|
148
|
+
}, "onMouseDown"),
|
|
149
|
+
onMouseEnter: /* @__PURE__ */ __name((e) => {
|
|
150
|
+
onMouseEnter == null ? void 0 : onMouseEnter(e);
|
|
151
|
+
setPlaying(false);
|
|
152
|
+
}, "onMouseEnter"),
|
|
153
|
+
onMouseLeave: /* @__PURE__ */ __name((e) => {
|
|
154
|
+
onMouseLeave == null ? void 0 : onMouseLeave(e);
|
|
155
|
+
setPlaying(true);
|
|
156
|
+
}, "onMouseLeave"),
|
|
157
|
+
onMouseUp: /* @__PURE__ */ __name((e) => {
|
|
158
|
+
onMouseUp == null ? void 0 : onMouseUp(e);
|
|
159
|
+
handleMouseUp(e, mouseStartX, mouseEndX, slide);
|
|
160
|
+
setMouse(false);
|
|
161
|
+
}, "onMouseUp"),
|
|
162
|
+
onTouchEnd: /* @__PURE__ */ __name((e) => {
|
|
163
|
+
onTouchEnd == null ? void 0 : onTouchEnd(e);
|
|
164
|
+
handleTouchEnd(touchStartX, touchEndX, slide);
|
|
165
|
+
}, "onTouchEnd"),
|
|
166
|
+
onTouchMove: /* @__PURE__ */ __name((e) => {
|
|
167
|
+
onTouchMove == null ? void 0 : onTouchMove(e);
|
|
168
|
+
handleTouchMove(e, touchEndX);
|
|
169
|
+
}, "onTouchMove"),
|
|
170
|
+
onTouchStart: /* @__PURE__ */ __name((e) => {
|
|
171
|
+
onTouchStart == null ? void 0 : onTouchStart(e);
|
|
172
|
+
handleTouchStart(e, touchStartX);
|
|
173
|
+
}, "onTouchStart"),
|
|
174
|
+
children: [
|
|
175
|
+
/* @__PURE__ */ jsx(
|
|
176
|
+
"div",
|
|
203
177
|
{
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
"button",
|
|
209
|
-
void 0,
|
|
210
|
-
`${classNameButtons} ${(prevButton == null ? void 0 : prevButton.className) ?? ""}`
|
|
211
|
-
),
|
|
212
|
-
iconProps: {
|
|
213
|
-
name: "ArrowLeft01Icon",
|
|
214
|
-
size: "md",
|
|
215
|
-
color: "white",
|
|
216
|
-
...prevButton == null ? void 0 : prevButton.iconProps
|
|
178
|
+
className: bem("wrapper", void 0, classNameWrapper),
|
|
179
|
+
style: {
|
|
180
|
+
transform: getTransformValue(),
|
|
181
|
+
transition: transitioning ? "transform 0.3s ease-in-out" : "none"
|
|
217
182
|
},
|
|
218
|
-
|
|
183
|
+
children: items.map((child, i) => /* @__PURE__ */ jsx(
|
|
184
|
+
"div",
|
|
185
|
+
{
|
|
186
|
+
className: bem("item", void 0, classNameItem),
|
|
187
|
+
style: { width: `${100 / effectiveItemsToShow}%` },
|
|
188
|
+
children: child
|
|
189
|
+
},
|
|
190
|
+
`cl-${i}`
|
|
191
|
+
))
|
|
192
|
+
}
|
|
193
|
+
),
|
|
194
|
+
/* @__PURE__ */ jsx(
|
|
195
|
+
"div",
|
|
196
|
+
{
|
|
197
|
+
className: bem("mobile__tutorial", {
|
|
198
|
+
"is-hidden": !mobileHint
|
|
199
|
+
}),
|
|
200
|
+
children: /* @__PURE__ */ jsx("div", { className: bem("mobile__tutorial__animation"), children: /* @__PURE__ */ jsx(Lottie, { animation: "https://lottie.host/7da0edc5-d79e-497c-bcce-ab9dd8e9458d/lahjQ7ICxg.lottie" }) })
|
|
219
201
|
}
|
|
220
202
|
),
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
"button",
|
|
203
|
+
/* @__PURE__ */ jsxs("footer", { className: bem("controls", void 0, classNameControls), children: [
|
|
204
|
+
Boolean(enableControl) && /* @__PURE__ */ jsx(
|
|
205
|
+
Button,
|
|
225
206
|
{
|
|
207
|
+
"aria-label": "previous",
|
|
208
|
+
variant: "outlined",
|
|
209
|
+
...prevButton,
|
|
226
210
|
className: bem(
|
|
227
|
-
"
|
|
228
|
-
|
|
229
|
-
|
|
211
|
+
"button",
|
|
212
|
+
void 0,
|
|
213
|
+
/* istanbul ignore next */
|
|
214
|
+
`${classNameButtons} ${(prevButton == null ? void 0 : prevButton.className) ?? ""}`
|
|
230
215
|
),
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
216
|
+
iconProps: {
|
|
217
|
+
name: "ArrowLeft01Icon",
|
|
218
|
+
size: "md",
|
|
219
|
+
color: "white",
|
|
220
|
+
/* istanbul ignore next */
|
|
221
|
+
...prevButton == null ? void 0 : prevButton.iconProps
|
|
222
|
+
},
|
|
223
|
+
onClick: (
|
|
224
|
+
/* istanbul ignore next */
|
|
225
|
+
/* @__PURE__ */ __name(() => slide(PREV), "onClick")
|
|
226
|
+
)
|
|
227
|
+
}
|
|
228
|
+
),
|
|
229
|
+
enableDots && /* @__PURE__ */ jsx("span", { className: bem("dots", void 0, classNameDots), children: childrenArr.map((_, i) => {
|
|
230
|
+
const active = i === (current - effectiveItemsToShow + num) % num;
|
|
231
|
+
return /* @__PURE__ */ jsx(
|
|
244
232
|
"button",
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
233
|
+
{
|
|
234
|
+
className: bem(
|
|
235
|
+
"dots__dot",
|
|
236
|
+
{ "is-active": active },
|
|
237
|
+
`${classNameDot} ${active ? classNameDotActive ?? "" : ""}`
|
|
238
|
+
),
|
|
239
|
+
onClick: /* @__PURE__ */ __name(() => slideTo(i), "onClick"),
|
|
240
|
+
onKeyDown: /* @__PURE__ */ __name((e) => e.key === "Enter" && slideTo(i), "onKeyDown")
|
|
241
|
+
},
|
|
242
|
+
`dot-${i}`
|
|
243
|
+
);
|
|
244
|
+
}) }),
|
|
245
|
+
Boolean(enableControl) && /* @__PURE__ */ jsx(
|
|
246
|
+
Button,
|
|
247
|
+
{
|
|
248
|
+
"aria-label": "next",
|
|
249
|
+
variant: "outlined",
|
|
250
|
+
...nextButton,
|
|
251
|
+
className: bem(
|
|
252
|
+
"button",
|
|
253
|
+
void 0,
|
|
254
|
+
/* istanbul ignore next */
|
|
255
|
+
`${classNameButtons} ${(nextButton == null ? void 0 : nextButton.className) ?? ""}`
|
|
256
|
+
),
|
|
257
|
+
iconProps: {
|
|
258
|
+
name: "ArrowRight01Icon",
|
|
259
|
+
size: "md",
|
|
260
|
+
color: "white",
|
|
261
|
+
/* istanbul ignore next */
|
|
262
|
+
...nextButton == null ? void 0 : nextButton.iconProps
|
|
263
|
+
},
|
|
264
|
+
onClick: /* @__PURE__ */ __name(() => slide(NEXT), "onClick")
|
|
265
|
+
}
|
|
266
|
+
)
|
|
267
|
+
] })
|
|
268
|
+
]
|
|
269
|
+
}
|
|
270
|
+
)
|
|
260
271
|
);
|
|
261
272
|
}
|
|
262
273
|
__name(CarouselClient, "CarouselClient");
|
|
@@ -5,8 +5,14 @@ import CarouselServer from "./Carousel.server.js";
|
|
|
5
5
|
const Carousel = createIsland({
|
|
6
6
|
name: "Carousel",
|
|
7
7
|
Server: CarouselServer,
|
|
8
|
-
loadLazy:
|
|
9
|
-
|
|
8
|
+
loadLazy: (
|
|
9
|
+
/* istanbul ignore next */
|
|
10
|
+
/* @__PURE__ */ __name(() => import("./Carousel.lazy.js"), "loadLazy")
|
|
11
|
+
),
|
|
12
|
+
isInteractive: (
|
|
13
|
+
/* istanbul ignore next */
|
|
14
|
+
/* @__PURE__ */ __name(() => true, "isInteractive")
|
|
15
|
+
)
|
|
10
16
|
});
|
|
11
17
|
export {
|
|
12
18
|
Carousel
|
|
@@ -13,7 +13,17 @@ function CarouselView({
|
|
|
13
13
|
classNameItem,
|
|
14
14
|
classNameDots,
|
|
15
15
|
classNameDot,
|
|
16
|
+
classNameDotActive: _classNameDotActive,
|
|
17
|
+
classNameButtons: _classNameButtons,
|
|
18
|
+
classNameControls: _classNameControls,
|
|
16
19
|
enableControl,
|
|
20
|
+
enableDots: _enableDots,
|
|
21
|
+
autoplay: _autoplay,
|
|
22
|
+
translateX: _translateX,
|
|
23
|
+
itemStyle: _itemStyle,
|
|
24
|
+
responsive: _responsive,
|
|
25
|
+
nextButton: _nextButton,
|
|
26
|
+
prevButton: _prevButton,
|
|
17
27
|
children,
|
|
18
28
|
...rest
|
|
19
29
|
}) {
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { memo, useState, useEffect, useCallback } from "react";
|
|
6
|
+
import { CheckboxView } from "./Checkbox.view.js";
|
|
7
|
+
function CheckboxClient(props) {
|
|
8
|
+
const { checked: controlledChecked, defaultChecked, onChange } = props;
|
|
9
|
+
const [isChecked, setIsChecked] = useState(
|
|
10
|
+
controlledChecked ?? defaultChecked ?? false
|
|
11
|
+
);
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
if (typeof controlledChecked === "boolean") {
|
|
14
|
+
setIsChecked(controlledChecked);
|
|
15
|
+
}
|
|
16
|
+
}, [controlledChecked]);
|
|
17
|
+
const handleChange = useCallback(
|
|
18
|
+
(event) => {
|
|
19
|
+
const nextChecked = event.target.checked;
|
|
20
|
+
if (typeof controlledChecked !== "boolean") {
|
|
21
|
+
setIsChecked(nextChecked);
|
|
22
|
+
}
|
|
23
|
+
onChange == null ? void 0 : onChange(event, nextChecked);
|
|
24
|
+
},
|
|
25
|
+
[controlledChecked, onChange]
|
|
26
|
+
);
|
|
27
|
+
return /* @__PURE__ */ jsx(
|
|
28
|
+
CheckboxView,
|
|
29
|
+
{
|
|
30
|
+
...props,
|
|
31
|
+
checked: void 0,
|
|
32
|
+
defaultChecked: void 0,
|
|
33
|
+
isChecked,
|
|
34
|
+
onChangeInternal: handleChange
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
__name(CheckboxClient, "CheckboxClient");
|
|
39
|
+
const CheckboxClient$1 = memo(CheckboxClient);
|
|
40
|
+
export {
|
|
41
|
+
CheckboxClient$1 as default
|
|
42
|
+
};
|