@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
@@ -0,0 +1,89 @@
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 { create } from "../../helpers/bem.js";
5
+ import styles from "./Checkbox.module.scss.js";
6
+ import { Icon } from "../icon/Icon.js";
7
+ const bem = create(styles, "Checkbox");
8
+ function CheckboxView({
9
+ className,
10
+ name,
11
+ value,
12
+ title,
13
+ description,
14
+ icon,
15
+ iconLabel,
16
+ required,
17
+ showRequiredMark,
18
+ disabled,
19
+ variant = "plain",
20
+ isChecked,
21
+ onChangeInternal
22
+ }) {
23
+ const shouldShowRequiredMark = showRequiredMark ?? Boolean(required);
24
+ return /* @__PURE__ */ jsxs(
25
+ "label",
26
+ {
27
+ className: bem(
28
+ void 0,
29
+ {
30
+ checked: isChecked,
31
+ disabled: Boolean(disabled),
32
+ [variant]: true
33
+ },
34
+ className
35
+ ),
36
+ children: [
37
+ /* @__PURE__ */ jsxs("span", { className: bem("left"), children: [
38
+ /* @__PURE__ */ jsx(
39
+ "input",
40
+ {
41
+ "aria-checked": isChecked,
42
+ checked: isChecked,
43
+ className: bem("input"),
44
+ disabled,
45
+ name,
46
+ readOnly: typeof onChangeInternal !== "function",
47
+ required,
48
+ type: "checkbox",
49
+ value,
50
+ onChange: onChangeInternal
51
+ }
52
+ ),
53
+ /* @__PURE__ */ jsx(
54
+ "span",
55
+ {
56
+ "aria-hidden": "true",
57
+ className: bem("control", {
58
+ checked: isChecked,
59
+ [variant]: true
60
+ })
61
+ }
62
+ )
63
+ ] }),
64
+ /* @__PURE__ */ jsxs("span", { className: bem("body"), children: [
65
+ /* @__PURE__ */ jsxs("span", { className: bem("row"), children: [
66
+ /* @__PURE__ */ jsx("span", { className: bem("title"), children: title }),
67
+ shouldShowRequiredMark ? /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: bem("requiredMark"), children: "*" }) : null
68
+ ] }),
69
+ description ? /* @__PURE__ */ jsx("span", { className: bem("desc"), children: description }) : null
70
+ ] }),
71
+ /* @__PURE__ */ jsx("span", { className: bem("right"), children: (icon == null ? void 0 : icon.name) ? /* @__PURE__ */ jsx(
72
+ Icon,
73
+ {
74
+ ...icon,
75
+ className: bem("rightIcon", void 0, icon.className),
76
+ label: (
77
+ /* istanbul ignore next */
78
+ iconLabel ?? void 0
79
+ )
80
+ }
81
+ ) : null })
82
+ ]
83
+ }
84
+ );
85
+ }
86
+ __name(CheckboxView, "CheckboxView");
87
+ export {
88
+ CheckboxView
89
+ };
@@ -0,0 +1,4 @@
1
+ import { Checkbox } from "./Checkbox.js";
2
+ export {
3
+ Checkbox
4
+ };
@@ -0,0 +1,57 @@
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, useMemo, useCallback } from "react";
6
+ import { CheckboxGroupView } from "./CheckboxGroup.view.js";
7
+ function toUniqueArray(values) {
8
+ if (!Array.isArray(values) || values.length === 0) return [];
9
+ return Array.from(new Set(values));
10
+ }
11
+ __name(toUniqueArray, "toUniqueArray");
12
+ function CheckboxGroupClient(props) {
13
+ const { values, defaultValues, onChange } = props;
14
+ const [selectedValues, setSelectedValues] = useState(
15
+ () => toUniqueArray(values ?? defaultValues)
16
+ );
17
+ useEffect(() => {
18
+ if (Array.isArray(values)) {
19
+ setSelectedValues(toUniqueArray(values));
20
+ }
21
+ }, [values]);
22
+ const selectedSet = useMemo(
23
+ () => new Set(selectedValues),
24
+ [selectedValues]
25
+ );
26
+ const isChecked = useCallback(
27
+ (value) => selectedSet.has(value),
28
+ [selectedSet]
29
+ );
30
+ const onToggle = useCallback(
31
+ (value) => {
32
+ setSelectedValues((prev) => {
33
+ const nextSet = new Set(prev);
34
+ if (nextSet.has(value)) nextSet.delete(value);
35
+ else nextSet.add(value);
36
+ const next = Array.from(nextSet);
37
+ onChange == null ? void 0 : onChange(next);
38
+ return next;
39
+ });
40
+ },
41
+ [onChange]
42
+ );
43
+ return /* @__PURE__ */ jsx(
44
+ CheckboxGroupView,
45
+ {
46
+ ...props,
47
+ isChecked,
48
+ selectedValues,
49
+ onToggle
50
+ }
51
+ );
52
+ }
53
+ __name(CheckboxGroupClient, "CheckboxGroupClient");
54
+ const CheckboxGroupClient$1 = memo(CheckboxGroupClient);
55
+ export {
56
+ CheckboxGroupClient$1 as default
57
+ };
@@ -0,0 +1,238 @@
1
+ /* stylelint-disable */
2
+ /**
3
+ * Calculates a rem-based value by a given pixel size.
4
+ */
5
+ /* stylelint-disable */
6
+ /**
7
+ * Applies flex-column and gap.
8
+ */
9
+ /*
10
+ As example (light, primary)
11
+ See defined modes in designsystem/config/gradients
12
+ */
13
+ /**
14
+ * Mixin that renders a media query that target screens that are larger than the
15
+ * given size.
16
+ */
17
+ /**
18
+ * Mixin that renders a media query that target screens that are smaller than the
19
+ * given size.
20
+ */
21
+ /**
22
+ * Mixin that renders a media query that target screens in between the given range.
23
+ */
24
+ /**
25
+ * Mixin that renders a media query that target screens that have height larger than the
26
+ * given size.
27
+ */
28
+ /**
29
+ * Mixin that renders a media query that target screens that have height smaller than the
30
+ * given size.
31
+ */
32
+ /* stylelint-disable */
33
+ /* M3/Elevation Light/1 */
34
+ /* M3/Elevation Light/2 */
35
+ /* M3/Elevation/5 */
36
+ /* M3/Elevation/1 Text */
37
+ /* Inner elevations */
38
+ /* stylelint-disable */
39
+ /**
40
+ * Visually hides an element but not removes them for screen readers.
41
+ */
42
+ /**
43
+ * The inverse of the `hidden` helper to reset a previously hidden element to be
44
+ * visible for users.
45
+ */
46
+ /**
47
+ * Creates a selector for :hover effects depending on the current user input
48
+ * device. If the input device is a mouse, this hover effect will appear.
49
+ * Keyboard and touch inputs are ignored.
50
+ *
51
+ * Example usage:
52
+ * .link {
53
+ * color: blue;
54
+ *
55
+ * @include when-hovered() {
56
+ * color: green;
57
+ * }
58
+ * }
59
+ */
60
+ /**
61
+ * Creates a selector for :active effects depending on the current user input
62
+ * device. The state applies when the input device is a mouse or keyboard. Touch
63
+ * devices will not show a pressed state.
64
+ *
65
+ * Example usage:
66
+ * .link {
67
+ * box-shadow: none;
68
+ *
69
+ * @include when-pressed() {
70
+ * box-shadow: inset 0 2px 4px grey;
71
+ * }
72
+ * }
73
+ */
74
+ /**
75
+ * Creates a selector for :focus effects depending on the current user input
76
+ * device. When the user navigates using a keyboard, the focus effect defined in
77
+ * here is applied. For other input devices they don't show up.
78
+ *
79
+ * Example usage:
80
+ * .link {
81
+ * text-decoration: none;
82
+ *
83
+ * @include when-focused() {
84
+ * text-decoration: underline;
85
+ * }
86
+ * }
87
+ */
88
+ /**
89
+ * Creates a selector for :focus-within effects depending on the current user
90
+ * input device. When the user navigates using a keyboard, the focus effect
91
+ * defined in here is applied. For other input devices they don't show up.
92
+ *
93
+ * Example usage:
94
+ * .link {
95
+ * img {
96
+ * opacity: 0.75;
97
+ *
98
+ * @include when-focused-within() {
99
+ * opacity: 1;
100
+ * }
101
+ * }
102
+ * }
103
+ */
104
+ /**
105
+ * Wrapper for media query "prefers-reduced-motion".
106
+ */
107
+ /**
108
+ * This helper hides the outline but still makes it visible for
109
+ * Windows high-contrast users. Use this instead of `outline: 0;`.
110
+ */
111
+ /**
112
+ * This helper hides the outline but still makes it visible for
113
+ * Windows high-contrast users. Use this instead of `outline: 0;`.
114
+ */
115
+ /**
116
+ * Renders an alternative, but application consistent focus-ring.
117
+ */
118
+ /**
119
+ * Specifies the outer layout for all contents across breakpoints. Apply this
120
+ * mixin to the container element, to center the contents on the screen within
121
+ * the layout offsets.
122
+ */
123
+ /**
124
+ * This mixin specifies basic text-styles for components that render a richtext
125
+ * content.
126
+ */
127
+ .prokodo-CheckboxGroup {
128
+ margin: 0;
129
+ padding: 0;
130
+ border: 0;
131
+ min-width: 0;
132
+ }
133
+ .prokodo-CheckboxGroup__legend {
134
+ margin: 0 0 0.5rem 0;
135
+ padding: 0;
136
+ opacity: 0.82;
137
+ display: inline-flex;
138
+ align-items: center;
139
+ gap: 0.25rem;
140
+ font-weight: 400;
141
+ font-size: 1rem;
142
+ font-family: var(--font-secondary), -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
143
+ font-style: normal;
144
+ line-height: 1.45;
145
+ letter-spacing: 0.03em;
146
+ text-transform: none;
147
+ text-align: left;
148
+ text-decoration: none;
149
+ }
150
+ @media screen and (min-width: 480px) {
151
+ .prokodo-CheckboxGroup__legend {
152
+ font-size: 0.875rem;
153
+ line-height: 1.4;
154
+ }
155
+ }
156
+ @media screen and (min-width: 960px) {
157
+ .prokodo-CheckboxGroup__legend {
158
+ font-size: 0.875rem;
159
+ line-height: 1.4;
160
+ }
161
+ }
162
+ .prokodo-CheckboxGroup__legend--is-hidden {
163
+ position: absolute;
164
+ top: auto;
165
+ left: -99999px;
166
+ width: 0;
167
+ height: 0;
168
+ text-indent: -99999px;
169
+ }
170
+ .prokodo-CheckboxGroup__legendLabel {
171
+ color: var(--color-grey-900);
172
+ font-weight: 400;
173
+ font-size: 1rem;
174
+ font-family: var(--font-secondary), -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
175
+ font-style: normal;
176
+ line-height: 1.45;
177
+ letter-spacing: 0.03em;
178
+ text-transform: none;
179
+ text-align: left;
180
+ text-decoration: none;
181
+ }
182
+ @media screen and (min-width: 480px) {
183
+ .prokodo-CheckboxGroup__legendLabel {
184
+ font-size: 0.875rem;
185
+ line-height: 1.4;
186
+ }
187
+ }
188
+ @media screen and (min-width: 960px) {
189
+ .prokodo-CheckboxGroup__legendLabel {
190
+ font-size: 0.875rem;
191
+ line-height: 1.4;
192
+ }
193
+ }
194
+ .prokodo-CheckboxGroup__legendRequiredMark {
195
+ color: var(--color-error);
196
+ line-height: 1;
197
+ font-weight: 400;
198
+ font-size: 1rem;
199
+ font-family: var(--font-secondary), -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
200
+ font-style: normal;
201
+ line-height: 1.45;
202
+ letter-spacing: 0.03em;
203
+ text-transform: none;
204
+ text-align: left;
205
+ text-decoration: none;
206
+ }
207
+ @media screen and (min-width: 480px) {
208
+ .prokodo-CheckboxGroup__legendRequiredMark {
209
+ font-size: 0.875rem;
210
+ line-height: 1.4;
211
+ }
212
+ }
213
+ @media screen and (min-width: 960px) {
214
+ .prokodo-CheckboxGroup__legendRequiredMark {
215
+ font-size: 0.875rem;
216
+ line-height: 1.4;
217
+ }
218
+ }
219
+ .prokodo-CheckboxGroup__list {
220
+ display: flex;
221
+ flex-direction: column;
222
+ gap: 0.5rem;
223
+ min-width: 0;
224
+ }
225
+ .prokodo-CheckboxGroup__list--plain {
226
+ gap: 0;
227
+ }
228
+ .prokodo-CheckboxGroup__list--grid {
229
+ display: grid;
230
+ grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
231
+ }
232
+ .prokodo-CheckboxGroup__item {
233
+ min-width: 0;
234
+ }
235
+ .prokodo-CheckboxGroup__item--disabled {
236
+ opacity: 0.55;
237
+ cursor: not-allowed;
238
+ }
@@ -0,0 +1,16 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+ import { createIsland } from "../../helpers/createIsland.js";
4
+ import CheckboxGroupServer from "./CheckboxGroup.server.js";
5
+ const CheckboxGroup = createIsland({
6
+ name: "CheckboxGroup",
7
+ Server: CheckboxGroupServer,
8
+ /* istanbul ignore next */
9
+ loadLazy: (
10
+ /* istanbul ignore next */
11
+ /* @__PURE__ */ __name(() => import("./CheckboxGroup.lazy.js"), "loadLazy")
12
+ )
13
+ });
14
+ export {
15
+ CheckboxGroup
16
+ };
@@ -0,0 +1,12 @@
1
+ "use client";
2
+ import { createLazyWrapper } from "../../helpers/createLazyWrapper.js";
3
+ import CheckboxGroupClient from "./CheckboxGroup.client.js";
4
+ import CheckboxGroupServer from "./CheckboxGroup.server.js";
5
+ const CheckboxGroup_lazy = createLazyWrapper({
6
+ name: "CheckboxGroup",
7
+ Client: CheckboxGroupClient,
8
+ Server: CheckboxGroupServer
9
+ });
10
+ export {
11
+ CheckboxGroup_lazy as default
12
+ };
@@ -0,0 +1,238 @@
1
+ /* stylelint-disable */
2
+ /**
3
+ * Calculates a rem-based value by a given pixel size.
4
+ */
5
+ /* stylelint-disable */
6
+ /**
7
+ * Applies flex-column and gap.
8
+ */
9
+ /*
10
+ As example (light, primary)
11
+ See defined modes in designsystem/config/gradients
12
+ */
13
+ /**
14
+ * Mixin that renders a media query that target screens that are larger than the
15
+ * given size.
16
+ */
17
+ /**
18
+ * Mixin that renders a media query that target screens that are smaller than the
19
+ * given size.
20
+ */
21
+ /**
22
+ * Mixin that renders a media query that target screens in between the given range.
23
+ */
24
+ /**
25
+ * Mixin that renders a media query that target screens that have height larger than the
26
+ * given size.
27
+ */
28
+ /**
29
+ * Mixin that renders a media query that target screens that have height smaller than the
30
+ * given size.
31
+ */
32
+ /* stylelint-disable */
33
+ /* M3/Elevation Light/1 */
34
+ /* M3/Elevation Light/2 */
35
+ /* M3/Elevation/5 */
36
+ /* M3/Elevation/1 Text */
37
+ /* Inner elevations */
38
+ /* stylelint-disable */
39
+ /**
40
+ * Visually hides an element but not removes them for screen readers.
41
+ */
42
+ /**
43
+ * The inverse of the `hidden` helper to reset a previously hidden element to be
44
+ * visible for users.
45
+ */
46
+ /**
47
+ * Creates a selector for :hover effects depending on the current user input
48
+ * device. If the input device is a mouse, this hover effect will appear.
49
+ * Keyboard and touch inputs are ignored.
50
+ *
51
+ * Example usage:
52
+ * .link {
53
+ * color: blue;
54
+ *
55
+ * @include when-hovered() {
56
+ * color: green;
57
+ * }
58
+ * }
59
+ */
60
+ /**
61
+ * Creates a selector for :active effects depending on the current user input
62
+ * device. The state applies when the input device is a mouse or keyboard. Touch
63
+ * devices will not show a pressed state.
64
+ *
65
+ * Example usage:
66
+ * .link {
67
+ * box-shadow: none;
68
+ *
69
+ * @include when-pressed() {
70
+ * box-shadow: inset 0 2px 4px grey;
71
+ * }
72
+ * }
73
+ */
74
+ /**
75
+ * Creates a selector for :focus effects depending on the current user input
76
+ * device. When the user navigates using a keyboard, the focus effect defined in
77
+ * here is applied. For other input devices they don't show up.
78
+ *
79
+ * Example usage:
80
+ * .link {
81
+ * text-decoration: none;
82
+ *
83
+ * @include when-focused() {
84
+ * text-decoration: underline;
85
+ * }
86
+ * }
87
+ */
88
+ /**
89
+ * Creates a selector for :focus-within effects depending on the current user
90
+ * input device. When the user navigates using a keyboard, the focus effect
91
+ * defined in here is applied. For other input devices they don't show up.
92
+ *
93
+ * Example usage:
94
+ * .link {
95
+ * img {
96
+ * opacity: 0.75;
97
+ *
98
+ * @include when-focused-within() {
99
+ * opacity: 1;
100
+ * }
101
+ * }
102
+ * }
103
+ */
104
+ /**
105
+ * Wrapper for media query "prefers-reduced-motion".
106
+ */
107
+ /**
108
+ * This helper hides the outline but still makes it visible for
109
+ * Windows high-contrast users. Use this instead of `outline: 0;`.
110
+ */
111
+ /**
112
+ * This helper hides the outline but still makes it visible for
113
+ * Windows high-contrast users. Use this instead of `outline: 0;`.
114
+ */
115
+ /**
116
+ * Renders an alternative, but application consistent focus-ring.
117
+ */
118
+ /**
119
+ * Specifies the outer layout for all contents across breakpoints. Apply this
120
+ * mixin to the container element, to center the contents on the screen within
121
+ * the layout offsets.
122
+ */
123
+ /**
124
+ * This mixin specifies basic text-styles for components that render a richtext
125
+ * content.
126
+ */
127
+ .prokodo-CheckboxGroup {
128
+ margin: 0;
129
+ padding: 0;
130
+ border: 0;
131
+ min-width: 0;
132
+ }
133
+ .prokodo-CheckboxGroup__legend {
134
+ margin: 0 0 0.5rem 0;
135
+ padding: 0;
136
+ opacity: 0.82;
137
+ display: inline-flex;
138
+ align-items: center;
139
+ gap: 0.25rem;
140
+ font-weight: 400;
141
+ font-size: 1rem;
142
+ font-family: var(--font-secondary), -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
143
+ font-style: normal;
144
+ line-height: 1.45;
145
+ letter-spacing: 0.03em;
146
+ text-transform: none;
147
+ text-align: left;
148
+ text-decoration: none;
149
+ }
150
+ @media screen and (min-width: 480px) {
151
+ .prokodo-CheckboxGroup__legend {
152
+ font-size: 0.875rem;
153
+ line-height: 1.4;
154
+ }
155
+ }
156
+ @media screen and (min-width: 960px) {
157
+ .prokodo-CheckboxGroup__legend {
158
+ font-size: 0.875rem;
159
+ line-height: 1.4;
160
+ }
161
+ }
162
+ .prokodo-CheckboxGroup__legend--is-hidden {
163
+ position: absolute;
164
+ top: auto;
165
+ left: -99999px;
166
+ width: 0;
167
+ height: 0;
168
+ text-indent: -99999px;
169
+ }
170
+ .prokodo-CheckboxGroup__legendLabel {
171
+ color: var(--color-grey-900);
172
+ font-weight: 400;
173
+ font-size: 1rem;
174
+ font-family: var(--font-secondary), -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
175
+ font-style: normal;
176
+ line-height: 1.45;
177
+ letter-spacing: 0.03em;
178
+ text-transform: none;
179
+ text-align: left;
180
+ text-decoration: none;
181
+ }
182
+ @media screen and (min-width: 480px) {
183
+ .prokodo-CheckboxGroup__legendLabel {
184
+ font-size: 0.875rem;
185
+ line-height: 1.4;
186
+ }
187
+ }
188
+ @media screen and (min-width: 960px) {
189
+ .prokodo-CheckboxGroup__legendLabel {
190
+ font-size: 0.875rem;
191
+ line-height: 1.4;
192
+ }
193
+ }
194
+ .prokodo-CheckboxGroup__legendRequiredMark {
195
+ color: var(--color-error);
196
+ line-height: 1;
197
+ font-weight: 400;
198
+ font-size: 1rem;
199
+ font-family: var(--font-secondary), -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
200
+ font-style: normal;
201
+ line-height: 1.45;
202
+ letter-spacing: 0.03em;
203
+ text-transform: none;
204
+ text-align: left;
205
+ text-decoration: none;
206
+ }
207
+ @media screen and (min-width: 480px) {
208
+ .prokodo-CheckboxGroup__legendRequiredMark {
209
+ font-size: 0.875rem;
210
+ line-height: 1.4;
211
+ }
212
+ }
213
+ @media screen and (min-width: 960px) {
214
+ .prokodo-CheckboxGroup__legendRequiredMark {
215
+ font-size: 0.875rem;
216
+ line-height: 1.4;
217
+ }
218
+ }
219
+ .prokodo-CheckboxGroup__list {
220
+ display: flex;
221
+ flex-direction: column;
222
+ gap: 0.5rem;
223
+ min-width: 0;
224
+ }
225
+ .prokodo-CheckboxGroup__list--plain {
226
+ gap: 0;
227
+ }
228
+ .prokodo-CheckboxGroup__list--grid {
229
+ display: grid;
230
+ grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
231
+ }
232
+ .prokodo-CheckboxGroup__item {
233
+ min-width: 0;
234
+ }
235
+ .prokodo-CheckboxGroup__item--disabled {
236
+ opacity: 0.55;
237
+ cursor: not-allowed;
238
+ }
@@ -0,0 +1,15 @@
1
+ const styles = {
2
+ "prokodo-CheckboxGroup": "prokodo-CheckboxGroup",
3
+ "prokodo-CheckboxGroup__legend": "prokodo-CheckboxGroup__legend",
4
+ "prokodo-CheckboxGroup__legend--is-hidden": "prokodo-CheckboxGroup__legend--is-hidden",
5
+ "prokodo-CheckboxGroup__legendLabel": "prokodo-CheckboxGroup__legendLabel",
6
+ "prokodo-CheckboxGroup__legendRequiredMark": "prokodo-CheckboxGroup__legendRequiredMark",
7
+ "prokodo-CheckboxGroup__list": "prokodo-CheckboxGroup__list",
8
+ "prokodo-CheckboxGroup__list--plain": "prokodo-CheckboxGroup__list--plain",
9
+ "prokodo-CheckboxGroup__list--grid": "prokodo-CheckboxGroup__list--grid",
10
+ "prokodo-CheckboxGroup__item": "prokodo-CheckboxGroup__item",
11
+ "prokodo-CheckboxGroup__item--disabled": "prokodo-CheckboxGroup__item--disabled"
12
+ };
13
+ export {
14
+ styles as default
15
+ };
@@ -0,0 +1,25 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { CheckboxGroupView } from "./CheckboxGroup.view.js";
5
+ function toUniqueArray(values) {
6
+ if (!Array.isArray(values) || values.length === 0) return [];
7
+ return Array.from(new Set(values));
8
+ }
9
+ __name(toUniqueArray, "toUniqueArray");
10
+ function CheckboxGroupServer(props) {
11
+ const selectedValues = toUniqueArray(props.values ?? props.defaultValues);
12
+ const selectedSet = new Set(selectedValues);
13
+ return /* @__PURE__ */ jsx(
14
+ CheckboxGroupView,
15
+ {
16
+ ...props,
17
+ isChecked: /* @__PURE__ */ __name((value) => selectedSet.has(value), "isChecked"),
18
+ selectedValues
19
+ }
20
+ );
21
+ }
22
+ __name(CheckboxGroupServer, "CheckboxGroupServer");
23
+ export {
24
+ CheckboxGroupServer as default
25
+ };