@prokodo/ui 0.1.12 → 0.1.14
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 +6 -1
- package/dist/components/accordion/Accordion.css +46 -0
- package/dist/components/accordion/Accordion.module.css +46 -0
- package/dist/components/accordion/Accordion.module.scss.js +4 -0
- package/dist/components/accordion/Accordion.view.js +25 -5
- package/dist/components/autocomplete/Autocomplete.client.js +132 -0
- package/dist/components/autocomplete/Autocomplete.css +317 -0
- package/dist/components/autocomplete/Autocomplete.js +12 -0
- package/dist/components/autocomplete/Autocomplete.lazy.js +12 -0
- package/dist/components/autocomplete/Autocomplete.module.css +317 -0
- package/dist/components/autocomplete/Autocomplete.module.scss.js +21 -0
- package/dist/components/autocomplete/Autocomplete.server.js +11 -0
- package/dist/components/autocomplete/Autocomplete.view.js +142 -0
- package/dist/components/autocomplete/index.js +4 -0
- package/dist/components/button/Button.css +114 -6
- 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 +1 -0
- package/dist/components/checkbox/Checkbox.client.js +42 -0
- package/dist/components/checkbox/Checkbox.css +312 -0
- package/dist/components/checkbox/Checkbox.js +12 -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 +86 -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 +13 -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 +97 -0
- package/dist/components/checkbox-group/index.js +4 -0
- package/dist/components/dialog/Dialog.view.js +2 -1
- package/dist/components/dynamic-list/DynamicList.view.js +1 -1
- package/dist/components/input/Input.css +2 -2
- package/dist/components/input/Input.module.css +2 -2
- package/dist/components/rich-text/RichText.css +0 -1
- package/dist/components/rich-text/RichText.module.css +0 -1
- package/dist/components/snackbar/Snackbar.css +5 -1
- package/dist/components/snackbar/Snackbar.module.css +5 -1
- package/dist/components/tabs/Tabs.client.js +182 -0
- package/dist/components/tabs/Tabs.css +330 -0
- package/dist/components/tabs/Tabs.js +13 -0
- package/dist/components/tabs/Tabs.lazy.js +15 -0
- package/dist/components/tabs/Tabs.module.css +330 -0
- package/dist/components/tabs/Tabs.module.scss.js +19 -0
- package/dist/components/tabs/Tabs.server.js +11 -0
- package/dist/components/tabs/Tabs.view.js +157 -0
- package/dist/components/tabs/index.js +4 -0
- package/dist/components/tooltip/Tooltip.client.js +10 -1
- package/dist/components/tooltip/Tooltip.css +1 -0
- package/dist/components/tooltip/Tooltip.module.css +1 -0
- package/dist/constants/project.js +1 -1
- package/dist/index.js +8 -0
- package/dist/theme.css +937 -74
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/components/accordion/Accordion.d.ts +3 -0
- package/dist/types/components/accordion/Accordion.lazy.d.ts +3 -0
- package/dist/types/components/accordion/Accordion.model.d.ts +3 -0
- package/dist/types/components/accordion/Accordion.view.d.ts +1 -1
- package/dist/types/components/autocomplete/Autocomplete.client.d.ts +5 -0
- package/dist/types/components/autocomplete/Autocomplete.d.ts +4 -0
- package/dist/types/components/autocomplete/Autocomplete.lazy.d.ts +5 -0
- package/dist/types/components/autocomplete/Autocomplete.model.d.ts +58 -0
- package/dist/types/components/autocomplete/Autocomplete.server.d.ts +3 -0
- package/dist/types/components/autocomplete/Autocomplete.view.d.ts +3 -0
- package/dist/types/components/autocomplete/index.d.ts +2 -0
- 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/tabs/Tabs.client.d.ts +5 -0
- package/dist/types/components/tabs/Tabs.d.ts +4 -0
- package/dist/types/components/tabs/Tabs.lazy.d.ts +5 -0
- package/dist/types/components/tabs/Tabs.model.d.ts +43 -0
- package/dist/types/components/tabs/Tabs.server.d.ts +3 -0
- package/dist/types/components/tabs/Tabs.view.d.ts +3 -0
- package/dist/types/components/tabs/index.d.ts +2 -0
- package/dist/types/index.d.ts +4 -0
- package/package.json +21 -1
|
@@ -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,13 @@
|
|
|
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: /* @__PURE__ */ __name(() => import("./CheckboxGroup.lazy.js"), "loadLazy")
|
|
10
|
+
});
|
|
11
|
+
export {
|
|
12
|
+
CheckboxGroup
|
|
13
|
+
};
|
|
@@ -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
|
+
};
|
|
@@ -0,0 +1,97 @@
|
|
|
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 "./CheckboxGroup.module.scss.js";
|
|
6
|
+
import { Checkbox } from "../checkbox/Checkbox.js";
|
|
7
|
+
const bem = create(styles, "CheckboxGroup");
|
|
8
|
+
function CheckboxGroupView({
|
|
9
|
+
ariaLabel,
|
|
10
|
+
legend,
|
|
11
|
+
hideLegend,
|
|
12
|
+
legendProps,
|
|
13
|
+
name,
|
|
14
|
+
disabled,
|
|
15
|
+
required,
|
|
16
|
+
options,
|
|
17
|
+
selectedValues,
|
|
18
|
+
hiddenInputName,
|
|
19
|
+
layout = "stack",
|
|
20
|
+
variant = "plain",
|
|
21
|
+
translations: t,
|
|
22
|
+
isChecked,
|
|
23
|
+
onToggle
|
|
24
|
+
}) {
|
|
25
|
+
if (!(options == null ? void 0 : options.length)) return null;
|
|
26
|
+
const label = ariaLabel ?? (t == null ? void 0 : t.ariaLabel) ?? "Options";
|
|
27
|
+
const isGroupRequiredActive = Boolean(required) && selectedValues.length === 0;
|
|
28
|
+
return /* @__PURE__ */ jsxs(
|
|
29
|
+
"fieldset",
|
|
30
|
+
{
|
|
31
|
+
"aria-label": label,
|
|
32
|
+
"aria-required": required || void 0,
|
|
33
|
+
className: bem(),
|
|
34
|
+
children: [
|
|
35
|
+
legend ? /* @__PURE__ */ jsxs(
|
|
36
|
+
"legend",
|
|
37
|
+
{
|
|
38
|
+
...legendProps,
|
|
39
|
+
className: bem(
|
|
40
|
+
"legend",
|
|
41
|
+
{
|
|
42
|
+
"is-hidden": Boolean(hideLegend)
|
|
43
|
+
},
|
|
44
|
+
legendProps == null ? void 0 : legendProps.className
|
|
45
|
+
),
|
|
46
|
+
children: [
|
|
47
|
+
/* @__PURE__ */ jsx("span", { className: bem("legendLabel"), children: legend }),
|
|
48
|
+
required ? /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: bem("legendRequiredMark"), children: "*" }) : null
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
) : null,
|
|
52
|
+
hiddenInputName ? /* @__PURE__ */ jsx(
|
|
53
|
+
"input",
|
|
54
|
+
{
|
|
55
|
+
name: hiddenInputName,
|
|
56
|
+
type: "hidden",
|
|
57
|
+
value: selectedValues.join(",")
|
|
58
|
+
}
|
|
59
|
+
) : null,
|
|
60
|
+
/* @__PURE__ */ jsx("div", { className: bem("list", { [layout]: true, [variant]: true }), children: options.map((opt) => {
|
|
61
|
+
const checked = isChecked(opt.value);
|
|
62
|
+
const itemDisabled = Boolean(disabled) || Boolean(opt.disabled);
|
|
63
|
+
return /* @__PURE__ */ jsx(
|
|
64
|
+
"div",
|
|
65
|
+
{
|
|
66
|
+
className: bem("item", {
|
|
67
|
+
disabled: itemDisabled
|
|
68
|
+
}),
|
|
69
|
+
children: /* @__PURE__ */ jsx(
|
|
70
|
+
Checkbox,
|
|
71
|
+
{
|
|
72
|
+
checked,
|
|
73
|
+
description: opt.description,
|
|
74
|
+
disabled: itemDisabled,
|
|
75
|
+
icon: opt.icon,
|
|
76
|
+
iconLabel: opt.iconLabel,
|
|
77
|
+
name,
|
|
78
|
+
required: Boolean(opt.required) || isGroupRequiredActive,
|
|
79
|
+
showRequiredMark: Boolean(opt.required),
|
|
80
|
+
title: opt.title,
|
|
81
|
+
value: opt.value,
|
|
82
|
+
variant,
|
|
83
|
+
onChange: /* @__PURE__ */ __name(() => onToggle == null ? void 0 : onToggle(opt.value), "onChange")
|
|
84
|
+
}
|
|
85
|
+
)
|
|
86
|
+
},
|
|
87
|
+
opt.value
|
|
88
|
+
);
|
|
89
|
+
}) })
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
__name(CheckboxGroupView, "CheckboxGroupView");
|
|
95
|
+
export {
|
|
96
|
+
CheckboxGroupView
|
|
97
|
+
};
|
|
@@ -22,6 +22,7 @@ function DialogView({
|
|
|
22
22
|
containerChildren,
|
|
23
23
|
className,
|
|
24
24
|
classNameHeader,
|
|
25
|
+
actionsClassName,
|
|
25
26
|
height,
|
|
26
27
|
scroll = "paper",
|
|
27
28
|
fullScreen = false,
|
|
@@ -126,7 +127,7 @@ function DialogView({
|
|
|
126
127
|
children
|
|
127
128
|
}
|
|
128
129
|
),
|
|
129
|
-
actions.length > 0 && /* @__PURE__ */ jsxs("div", { className: bem("actions"), children: [
|
|
130
|
+
actions.length > 0 && /* @__PURE__ */ jsxs("div", { className: bem("actions", void 0, actionsClassName), children: [
|
|
130
131
|
/* @__PURE__ */ jsx("div", { "aria-hidden": "true", tabIndex: 0 }),
|
|
131
132
|
actions.map((action) => /* @__PURE__ */ jsx(Button, { ...action, title: (action == null ? void 0 : action.title) ?? "" }, action.id)),
|
|
132
133
|
/* @__PURE__ */ jsx("div", { "aria-hidden": "true", tabIndex: 0 })
|
|
@@ -4,10 +4,10 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
4
4
|
import { create } from "../../helpers/bem.js";
|
|
5
5
|
import { isString } from "../../helpers/validations.js";
|
|
6
6
|
import styles from "./DynamicList.module.scss.js";
|
|
7
|
-
import { Input } from "../input/Input.js";
|
|
8
7
|
import { Select } from "../select/Select.js";
|
|
9
8
|
import { Button } from "../button/Button.js";
|
|
10
9
|
import { Label } from "../label/Label.js";
|
|
10
|
+
import { Input } from "../input/Input.js";
|
|
11
11
|
const bem = create(styles, "DynamicList");
|
|
12
12
|
function DynamicListView({
|
|
13
13
|
id,
|
|
@@ -264,8 +264,8 @@ html[data-theme=dark] .prokodo-Input__input textarea:-moz-autofill {
|
|
|
264
264
|
background: var(--gradient-border-8);
|
|
265
265
|
}
|
|
266
266
|
.prokodo-Input__input__node {
|
|
267
|
-
width: calc(100% -
|
|
268
|
-
padding: 0.875rem
|
|
267
|
+
width: calc(100% - 1rem - 1rem - 0.25rem);
|
|
268
|
+
padding: 0.875rem 1rem;
|
|
269
269
|
margin: 2px;
|
|
270
270
|
border: none;
|
|
271
271
|
outline: none;
|
|
@@ -264,8 +264,8 @@ html[data-theme=dark] .prokodo-Input__input textarea:-moz-autofill {
|
|
|
264
264
|
background: var(--gradient-border-8);
|
|
265
265
|
}
|
|
266
266
|
.prokodo-Input__input__node {
|
|
267
|
-
width: calc(100% -
|
|
268
|
-
padding: 0.875rem
|
|
267
|
+
width: calc(100% - 1rem - 1rem - 0.25rem);
|
|
268
|
+
padding: 0.875rem 1rem;
|
|
269
269
|
margin: 2px;
|
|
270
270
|
border: none;
|
|
271
271
|
outline: none;
|