@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.
Files changed (152) hide show
  1. package/README.md +2 -0
  2. package/dist/components/RTE/RTE.client.js +0 -1
  3. package/dist/components/RTE/RTE.js +4 -1
  4. package/dist/components/accordion/Accordion.js +8 -2
  5. package/dist/components/accordion/Accordion.view.js +1 -1
  6. package/dist/components/animated/Animated.client.js +13 -5
  7. package/dist/components/animated/Animated.js +8 -2
  8. package/dist/components/animatedText/AnimatedText.client.js +10 -2
  9. package/dist/components/animatedText/AnimatedText.js +8 -2
  10. package/dist/components/autocomplete/Autocomplete.client.js +5 -1
  11. package/dist/components/autocomplete/Autocomplete.js +4 -1
  12. package/dist/components/autocomplete/Autocomplete.view.js +13 -4
  13. package/dist/components/avatar/Avatar.js +4 -1
  14. package/dist/components/avatar/Avatar.view.js +19 -12
  15. package/dist/components/base-link/BaseLink.js +4 -1
  16. package/dist/components/base-link/BaseLink.view.js +3 -0
  17. package/dist/components/button/Button.css +114 -6
  18. package/dist/components/button/Button.js +4 -1
  19. package/dist/components/button/Button.module.css +114 -6
  20. package/dist/components/button/Button.module.scss.js +10 -2
  21. package/dist/components/button/Button.view.js +4 -1
  22. package/dist/components/calendly/Calendly.js +8 -2
  23. package/dist/components/card/Card.js +11 -5
  24. package/dist/components/card/Card.view.js +22 -5
  25. package/dist/components/carousel/Carousel.client.js +140 -129
  26. package/dist/components/carousel/Carousel.js +8 -2
  27. package/dist/components/carousel/Carousel.view.js +10 -0
  28. package/dist/components/checkbox/Checkbox.client.js +42 -0
  29. package/dist/components/checkbox/Checkbox.css +312 -0
  30. package/dist/components/checkbox/Checkbox.js +15 -0
  31. package/dist/components/checkbox/Checkbox.lazy.js +12 -0
  32. package/dist/components/checkbox/Checkbox.module.css +312 -0
  33. package/dist/components/checkbox/Checkbox.module.scss.js +20 -0
  34. package/dist/components/checkbox/Checkbox.server.js +20 -0
  35. package/dist/components/checkbox/Checkbox.view.js +89 -0
  36. package/dist/components/checkbox/index.js +4 -0
  37. package/dist/components/checkbox-group/CheckboxGroup.client.js +57 -0
  38. package/dist/components/checkbox-group/CheckboxGroup.css +238 -0
  39. package/dist/components/checkbox-group/CheckboxGroup.js +16 -0
  40. package/dist/components/checkbox-group/CheckboxGroup.lazy.js +12 -0
  41. package/dist/components/checkbox-group/CheckboxGroup.module.css +238 -0
  42. package/dist/components/checkbox-group/CheckboxGroup.module.scss.js +15 -0
  43. package/dist/components/checkbox-group/CheckboxGroup.server.js +25 -0
  44. package/dist/components/checkbox-group/CheckboxGroup.view.js +100 -0
  45. package/dist/components/checkbox-group/index.js +4 -0
  46. package/dist/components/chip/Chip.js +4 -1
  47. package/dist/components/chip/Chip.view.js +4 -0
  48. package/dist/components/datePicker/DatePicker.js +4 -1
  49. package/dist/components/dialog/Dialog.js +8 -2
  50. package/dist/components/dialog/Dialog.view.js +25 -6
  51. package/dist/components/drawer/Drawer.client.js +0 -1
  52. package/dist/components/drawer/Drawer.js +4 -1
  53. package/dist/components/drawer/Drawer.view.js +14 -3
  54. package/dist/components/dynamic-list/DynamicList.client.js +1 -0
  55. package/dist/components/dynamic-list/DynamicList.js +4 -1
  56. package/dist/components/dynamic-list/DynamicList.view.js +18 -5
  57. package/dist/components/form/Form.client.js +4 -1
  58. package/dist/components/form/Form.js +4 -1
  59. package/dist/components/form/Form.view.js +3 -1
  60. package/dist/components/form/FormField.client.js +8 -2
  61. package/dist/components/form/FormField.js +4 -1
  62. package/dist/components/form/FormResponse.js +4 -1
  63. package/dist/components/headline/Headline.js +8 -2
  64. package/dist/components/icon/Icon.js +8 -2
  65. package/dist/components/image/Image.client.js +9 -5
  66. package/dist/components/image/Image.js +8 -2
  67. package/dist/components/image/Image.server.js +2 -1
  68. package/dist/components/image-text/ImageText.js +18 -8
  69. package/dist/components/input/Input.client.js +15 -2
  70. package/dist/components/input/Input.js +4 -1
  71. package/dist/components/input/Input.view.js +15 -6
  72. package/dist/components/input/InputValidation.js +6 -2
  73. package/dist/components/inputOTP/InputOTP.js +2 -1
  74. package/dist/components/link/Link.js +5 -3
  75. package/dist/components/link/Link.view.js +2 -1
  76. package/dist/components/list/List.js +52 -23
  77. package/dist/components/loading/Loading.js +4 -1
  78. package/dist/components/loading/Loading.view.js +25 -5
  79. package/dist/components/lottie/Lottie.js +9 -5
  80. package/dist/components/map/Map.js +62 -44
  81. package/dist/components/pagination/Pagination.js +4 -1
  82. package/dist/components/pagination/Pagination.view.js +3 -1
  83. package/dist/components/post-item/PostItem.js +4 -1
  84. package/dist/components/post-item/PostItemAuthor.js +4 -1
  85. package/dist/components/post-teaser/PostTeaser.js +4 -1
  86. package/dist/components/post-teaser/PostTeaser.view.js +4 -2
  87. package/dist/components/post-widget/PostWidget.js +5 -3
  88. package/dist/components/post-widget/PostWidget.view.js +9 -3
  89. package/dist/components/post-widget-carousel/PostWidgetCarousel.js +8 -2
  90. package/dist/components/post-widget-carousel/PostWidgetCarousel.view.js +2 -1
  91. package/dist/components/progressBar/ProgressBar.js +8 -2
  92. package/dist/components/progressBar/ProgressBar.view.js +4 -1
  93. package/dist/components/rating/Rating.client.js +6 -1
  94. package/dist/components/rating/Rating.js +4 -1
  95. package/dist/components/rich-text/RichText.client.js +52 -17
  96. package/dist/components/rich-text/RichText.js +8 -2
  97. package/dist/components/rich-text/RichText.server.js +3 -0
  98. package/dist/components/select/Select.client.js +149 -101
  99. package/dist/components/select/Select.js +8 -2
  100. package/dist/components/select/Select.view.js +35 -11
  101. package/dist/components/sidenav/SideNav.js +8 -2
  102. package/dist/components/slider/Slider.client.js +11 -2
  103. package/dist/components/slider/Slider.js +4 -1
  104. package/dist/components/slider/Slider.view.js +43 -5
  105. package/dist/components/snackbar/Snackbar.client.js +5 -1
  106. package/dist/components/snackbar/Snackbar.css +5 -1
  107. package/dist/components/snackbar/Snackbar.js +4 -1
  108. package/dist/components/snackbar/Snackbar.module.css +5 -1
  109. package/dist/components/snackbar/SnackbarProvider.js +8 -2
  110. package/dist/components/stepper/Stepper.client.js +6 -3
  111. package/dist/components/stepper/Stepper.js +4 -1
  112. package/dist/components/switch/Switch.js +4 -1
  113. package/dist/components/switch/Switch.view.js +1 -0
  114. package/dist/components/table/Table.js +1 -0
  115. package/dist/components/tabs/Tabs.client.js +1 -0
  116. package/dist/components/tabs/Tabs.js +8 -2
  117. package/dist/components/tabs/Tabs.view.js +8 -2
  118. package/dist/components/tooltip/Tooltip.client.js +126 -91
  119. package/dist/components/tooltip/Tooltip.js +10 -4
  120. package/dist/components/tooltip/Tooltip.view.js +1 -0
  121. package/dist/constants/project.js +1 -1
  122. package/dist/helpers/createIsland.js +1 -0
  123. package/dist/helpers/createLazyWrapper.js +1 -0
  124. package/dist/hooks/useGoogleMaps.js +0 -1
  125. package/dist/index.js +4 -0
  126. package/dist/theme.css +430 -9
  127. package/dist/tsconfig.build.tsbuildinfo +1 -1
  128. package/dist/types/components/RTE/RTE.d.ts +1 -1
  129. package/dist/types/components/RTE/RTE.lazy.d.ts +1 -1
  130. package/dist/types/components/avatar/Avatar.view.d.ts +1 -1
  131. package/dist/types/components/carousel/Carousel.view.d.ts +1 -1
  132. package/dist/types/components/checkbox/Checkbox.client.d.ts +4 -0
  133. package/dist/types/components/checkbox/Checkbox.d.ts +18 -0
  134. package/dist/types/components/checkbox/Checkbox.lazy.d.ts +19 -0
  135. package/dist/types/components/checkbox/Checkbox.model.d.ts +23 -0
  136. package/dist/types/components/checkbox/Checkbox.server.d.ts +3 -0
  137. package/dist/types/components/checkbox/Checkbox.view.d.ts +3 -0
  138. package/dist/types/components/checkbox/index.d.ts +2 -0
  139. package/dist/types/components/checkbox-group/CheckboxGroup.client.d.ts +4 -0
  140. package/dist/types/components/checkbox-group/CheckboxGroup.d.ts +4 -0
  141. package/dist/types/components/checkbox-group/CheckboxGroup.lazy.d.ts +5 -0
  142. package/dist/types/components/checkbox-group/CheckboxGroup.model.d.ts +38 -0
  143. package/dist/types/components/checkbox-group/CheckboxGroup.server.d.ts +3 -0
  144. package/dist/types/components/checkbox-group/CheckboxGroup.view.d.ts +3 -0
  145. package/dist/types/components/checkbox-group/index.d.ts +2 -0
  146. package/dist/types/components/dialog/Dialog.model.d.ts +1 -0
  147. package/dist/types/components/dialog/Dialog.view.d.ts +1 -1
  148. package/dist/types/components/dynamic-list/DynamicList.model.d.ts +1 -1
  149. package/dist/types/components/headline/Headline.model.d.ts +1 -1
  150. package/dist/types/components/input/Input.view.d.ts +1 -1
  151. package/dist/types/index.d.ts +2 -0
  152. 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 && /* @__PURE__ */ jsx(
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: /* @__PURE__ */ __name(() => import("./Calendly.lazy.js"), "loadLazy"),
9
- isInteractive: /* @__PURE__ */ __name(() => true, "isInteractive")
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: /* @__PURE__ */ __name(() => import("./Card.lazy.js"), "loadLazy"),
9
- isInteractive: /* @__PURE__ */ __name((p) => {
10
- var _a;
11
- return !Boolean(p.disabled) && typeof p.onClick === "function" || typeof ((_a = p.redirect) == null ? void 0 : _a.href) === "string";
12
- }, "isInteractive")
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: !redirect && Boolean(isClickable) ? "button" : void 0,
54
- tabIndex: !redirect && Boolean(isClickable) ? 0 : -1,
55
- onClick: Boolean(isClickable) && !redirect ? onClick : void 0,
56
- onKeyDown: Boolean(isClickable) && !redirect ? onKeyDown : void 0,
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 /* @__PURE__ */ jsxs(
123
- "div",
124
- {
125
- ...rest,
126
- ref: setHostRef,
127
- className: bem(void 0, { "is-active": mouseActive }, className),
128
- role: "button",
129
- tabIndex: 0,
130
- onKeyDown: /* @__PURE__ */ __name((e) => {
131
- onKeyDown == null ? void 0 : onKeyDown(e);
132
- switch (e.key) {
133
- case "ArrowLeft":
134
- slide("PREV");
135
- break;
136
- case "ArrowRight":
137
- slide("NEXT");
138
- break;
139
- }
140
- }, "onKeyDown"),
141
- onMouseDown: /* @__PURE__ */ __name((e) => {
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__ */ jsx(
192
- "div",
193
- {
194
- className: bem("mobile__tutorial", {
195
- "is-hidden": !mobileHint
196
- }),
197
- children: /* @__PURE__ */ jsx("div", { className: bem("mobile__tutorial__animation"), children: /* @__PURE__ */ jsx(Lottie, { animation: "https://lottie.host/7da0edc5-d79e-497c-bcce-ab9dd8e9458d/lahjQ7ICxg.lottie" }) })
198
- }
199
- ),
200
- /* @__PURE__ */ jsxs("footer", { className: bem("controls", void 0, classNameControls), children: [
201
- Boolean(enableControl) && /* @__PURE__ */ jsx(
202
- Button,
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
- "aria-label": "previous",
205
- variant: "outlined",
206
- ...prevButton,
207
- className: bem(
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
- onClick: /* @__PURE__ */ __name(() => slide(PREV), "onClick")
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
- enableDots && /* @__PURE__ */ jsx("span", { className: bem("dots", void 0, classNameDots), children: childrenArr.map((_, i) => {
222
- const active = i === (current - effectiveItemsToShow + num) % num;
223
- return /* @__PURE__ */ jsx(
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
- "dots__dot",
228
- { "is-active": active },
229
- `${classNameDot} ${active ? classNameDotActive ?? "" : ""}`
211
+ "button",
212
+ void 0,
213
+ /* istanbul ignore next */
214
+ `${classNameButtons} ${(prevButton == null ? void 0 : prevButton.className) ?? ""}`
230
215
  ),
231
- onClick: /* @__PURE__ */ __name(() => slideTo(i), "onClick"),
232
- onKeyDown: /* @__PURE__ */ __name((e) => e.key === "Enter" && slideTo(i), "onKeyDown")
233
- },
234
- `dot-${i}`
235
- );
236
- }) }),
237
- Boolean(enableControl) && /* @__PURE__ */ jsx(
238
- Button,
239
- {
240
- "aria-label": "next",
241
- variant: "outlined",
242
- ...nextButton,
243
- className: bem(
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
- void 0,
246
- `${classNameButtons} ${(nextButton == null ? void 0 : nextButton.className) ?? ""}`
247
- ),
248
- iconProps: {
249
- name: "ArrowRight01Icon",
250
- size: "md",
251
- color: "white",
252
- ...nextButton == null ? void 0 : nextButton.iconProps
253
- },
254
- onClick: /* @__PURE__ */ __name(() => slide(NEXT), "onClick")
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: /* @__PURE__ */ __name(() => import("./Carousel.lazy.js"), "loadLazy"),
9
- isInteractive: /* @__PURE__ */ __name(() => true, "isInteractive")
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
+ };