@prokodo/ui 0.1.13 → 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 +2 -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/snackbar/Snackbar.css +5 -1
- package/dist/components/snackbar/Snackbar.module.css +5 -1
- package/dist/constants/project.js +1 -1
- package/dist/index.js +4 -0
- package/dist/theme.css +430 -9
- package/dist/tsconfig.build.tsbuildinfo +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/index.d.ts +2 -0
- package/package.json +11 -1
|
@@ -0,0 +1,312 @@
|
|
|
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-Checkbox {
|
|
128
|
+
display: grid;
|
|
129
|
+
grid-template-columns: auto 1fr auto;
|
|
130
|
+
align-items: center;
|
|
131
|
+
grid-gap: 0.75rem;
|
|
132
|
+
gap: 0.75rem;
|
|
133
|
+
padding: 0.5rem 0;
|
|
134
|
+
border-radius: 12px;
|
|
135
|
+
background: transparent;
|
|
136
|
+
border: 1px solid transparent;
|
|
137
|
+
box-shadow: none;
|
|
138
|
+
cursor: pointer;
|
|
139
|
+
-webkit-user-select: none;
|
|
140
|
+
-moz-user-select: none;
|
|
141
|
+
user-select: none;
|
|
142
|
+
}
|
|
143
|
+
.prokodo-Checkbox--disabled {
|
|
144
|
+
opacity: 0.55;
|
|
145
|
+
cursor: not-allowed;
|
|
146
|
+
}
|
|
147
|
+
.prokodo-Checkbox:focus-within {
|
|
148
|
+
outline: 3px solid #1E90FF;
|
|
149
|
+
outline-offset: 4px;
|
|
150
|
+
border-radius: 1.5rem;
|
|
151
|
+
}
|
|
152
|
+
.prokodo-Checkbox--card {
|
|
153
|
+
padding: 0.5rem 0;
|
|
154
|
+
border-radius: 12px;
|
|
155
|
+
background: transparent;
|
|
156
|
+
border: 1px solid transparent;
|
|
157
|
+
box-shadow: none;
|
|
158
|
+
}
|
|
159
|
+
.prokodo-Checkbox__left {
|
|
160
|
+
display: inline-flex;
|
|
161
|
+
align-items: center;
|
|
162
|
+
}
|
|
163
|
+
.prokodo-Checkbox__input {
|
|
164
|
+
position: absolute;
|
|
165
|
+
opacity: 0;
|
|
166
|
+
width: 1px;
|
|
167
|
+
height: 1px;
|
|
168
|
+
margin: 0;
|
|
169
|
+
padding: 0;
|
|
170
|
+
pointer-events: none;
|
|
171
|
+
}
|
|
172
|
+
.prokodo-Checkbox__control {
|
|
173
|
+
width: 18px;
|
|
174
|
+
height: 18px;
|
|
175
|
+
border-radius: 6px;
|
|
176
|
+
position: relative;
|
|
177
|
+
border: 2px solid rgba(255, 255, 255, 0.18);
|
|
178
|
+
background: rgba(255, 255, 255, 0.02);
|
|
179
|
+
box-shadow: var(--inner-elevation-1);
|
|
180
|
+
display: inline-flex;
|
|
181
|
+
align-items: center;
|
|
182
|
+
justify-content: center;
|
|
183
|
+
transition: border-color 140ms ease, background 140ms ease;
|
|
184
|
+
}
|
|
185
|
+
.prokodo-Checkbox__control::after {
|
|
186
|
+
content: "";
|
|
187
|
+
width: 9px;
|
|
188
|
+
height: 5px;
|
|
189
|
+
border-left: 2px solid var(--color-primary-500, #2f6bff);
|
|
190
|
+
border-bottom: 2px solid var(--color-primary-500, #2f6bff);
|
|
191
|
+
position: absolute;
|
|
192
|
+
top: 50%;
|
|
193
|
+
left: 50%;
|
|
194
|
+
transform: translate(-50%, -50%) rotate(-45deg) scale(0.6);
|
|
195
|
+
opacity: 0;
|
|
196
|
+
transition: transform 140ms ease, opacity 140ms ease;
|
|
197
|
+
}
|
|
198
|
+
.prokodo-Checkbox__control--checked {
|
|
199
|
+
border-color: rgba(255, 255, 255, 0.32);
|
|
200
|
+
}
|
|
201
|
+
.prokodo-Checkbox__control--checked::after {
|
|
202
|
+
opacity: 1;
|
|
203
|
+
transform: translate(-50%, -50%) rotate(-45deg) scale(1);
|
|
204
|
+
}
|
|
205
|
+
.prokodo-Checkbox__control--card {
|
|
206
|
+
box-shadow: var(--inner-elevation-1);
|
|
207
|
+
}
|
|
208
|
+
.prokodo-Checkbox__control--card.prokodo-Checkbox__control--checked {
|
|
209
|
+
background: rgba(255, 255, 255, 0.1);
|
|
210
|
+
}
|
|
211
|
+
.prokodo-Checkbox__body {
|
|
212
|
+
min-width: 0;
|
|
213
|
+
display: flex;
|
|
214
|
+
flex-direction: column;
|
|
215
|
+
gap: 0.25rem;
|
|
216
|
+
}
|
|
217
|
+
.prokodo-Checkbox__row {
|
|
218
|
+
display: inline-flex;
|
|
219
|
+
align-items: center;
|
|
220
|
+
gap: 0.5rem;
|
|
221
|
+
min-width: 0;
|
|
222
|
+
}
|
|
223
|
+
.prokodo-Checkbox__title {
|
|
224
|
+
white-space: nowrap;
|
|
225
|
+
overflow: hidden;
|
|
226
|
+
text-overflow: ellipsis;
|
|
227
|
+
color: var(--color-grey-900);
|
|
228
|
+
margin: 0;
|
|
229
|
+
font-weight: 400;
|
|
230
|
+
font-size: 1.125rem;
|
|
231
|
+
font-family: var(--font-secondary), -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
232
|
+
font-style: normal;
|
|
233
|
+
line-height: 1.55;
|
|
234
|
+
letter-spacing: 0.03em;
|
|
235
|
+
text-transform: none;
|
|
236
|
+
text-align: left;
|
|
237
|
+
text-decoration: none;
|
|
238
|
+
}
|
|
239
|
+
@media screen and (min-width: 480px) {
|
|
240
|
+
.prokodo-Checkbox__title {
|
|
241
|
+
font-size: 1rem;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
@media screen and (min-width: 960px) {
|
|
245
|
+
.prokodo-Checkbox__title {
|
|
246
|
+
font-size: 1rem;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
.prokodo-Checkbox__requiredMark {
|
|
250
|
+
color: var(--color-error);
|
|
251
|
+
line-height: 1;
|
|
252
|
+
font-weight: 400;
|
|
253
|
+
font-size: 1.125rem;
|
|
254
|
+
font-family: var(--font-secondary), -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
255
|
+
font-style: normal;
|
|
256
|
+
line-height: 1.55;
|
|
257
|
+
letter-spacing: 0.03em;
|
|
258
|
+
text-transform: none;
|
|
259
|
+
text-align: left;
|
|
260
|
+
text-decoration: none;
|
|
261
|
+
}
|
|
262
|
+
@media screen and (min-width: 480px) {
|
|
263
|
+
.prokodo-Checkbox__requiredMark {
|
|
264
|
+
font-size: 1rem;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
@media screen and (min-width: 960px) {
|
|
268
|
+
.prokodo-Checkbox__requiredMark {
|
|
269
|
+
font-size: 1rem;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
.prokodo-Checkbox__desc {
|
|
273
|
+
color: var(--color-grey-700);
|
|
274
|
+
opacity: 0.82;
|
|
275
|
+
overflow: hidden;
|
|
276
|
+
text-overflow: ellipsis;
|
|
277
|
+
display: -webkit-box;
|
|
278
|
+
line-clamp: 2;
|
|
279
|
+
-webkit-box-orient: vertical;
|
|
280
|
+
font-weight: 400;
|
|
281
|
+
font-size: 1rem;
|
|
282
|
+
font-family: var(--font-secondary), -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
283
|
+
font-style: normal;
|
|
284
|
+
line-height: 1.45;
|
|
285
|
+
letter-spacing: 0.03em;
|
|
286
|
+
text-transform: none;
|
|
287
|
+
text-align: left;
|
|
288
|
+
text-decoration: none;
|
|
289
|
+
}
|
|
290
|
+
@media screen and (min-width: 480px) {
|
|
291
|
+
.prokodo-Checkbox__desc {
|
|
292
|
+
font-size: 0.875rem;
|
|
293
|
+
line-height: 1.4;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
@media screen and (min-width: 960px) {
|
|
297
|
+
.prokodo-Checkbox__desc {
|
|
298
|
+
font-size: 0.875rem;
|
|
299
|
+
line-height: 1.4;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
.prokodo-Checkbox__right {
|
|
303
|
+
justify-self: end;
|
|
304
|
+
display: inline-flex;
|
|
305
|
+
align-items: center;
|
|
306
|
+
align-self: start;
|
|
307
|
+
margin-top: 2px;
|
|
308
|
+
}
|
|
309
|
+
.prokodo-Checkbox__rightIcon {
|
|
310
|
+
color: var(--color-grey-700);
|
|
311
|
+
opacity: 0.9;
|
|
312
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
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 CheckboxServer from "./Checkbox.server.js";
|
|
5
|
+
const Checkbox = createIsland({
|
|
6
|
+
name: "Checkbox",
|
|
7
|
+
Server: CheckboxServer,
|
|
8
|
+
loadLazy: /* @__PURE__ */ __name(() => import("./Checkbox.lazy.js"), "loadLazy")
|
|
9
|
+
});
|
|
10
|
+
export {
|
|
11
|
+
Checkbox
|
|
12
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createLazyWrapper } from "../../helpers/createLazyWrapper.js";
|
|
3
|
+
import CheckboxClient from "./Checkbox.client.js";
|
|
4
|
+
import CheckboxServer from "./Checkbox.server.js";
|
|
5
|
+
const Checkbox_lazy = createLazyWrapper({
|
|
6
|
+
name: "Checkbox",
|
|
7
|
+
Client: CheckboxClient,
|
|
8
|
+
Server: CheckboxServer
|
|
9
|
+
});
|
|
10
|
+
export {
|
|
11
|
+
Checkbox_lazy as default
|
|
12
|
+
};
|
|
@@ -0,0 +1,312 @@
|
|
|
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-Checkbox {
|
|
128
|
+
display: grid;
|
|
129
|
+
grid-template-columns: auto 1fr auto;
|
|
130
|
+
align-items: center;
|
|
131
|
+
grid-gap: 0.75rem;
|
|
132
|
+
gap: 0.75rem;
|
|
133
|
+
padding: 0.5rem 0;
|
|
134
|
+
border-radius: 12px;
|
|
135
|
+
background: transparent;
|
|
136
|
+
border: 1px solid transparent;
|
|
137
|
+
box-shadow: none;
|
|
138
|
+
cursor: pointer;
|
|
139
|
+
-webkit-user-select: none;
|
|
140
|
+
-moz-user-select: none;
|
|
141
|
+
user-select: none;
|
|
142
|
+
}
|
|
143
|
+
.prokodo-Checkbox--disabled {
|
|
144
|
+
opacity: 0.55;
|
|
145
|
+
cursor: not-allowed;
|
|
146
|
+
}
|
|
147
|
+
.prokodo-Checkbox:focus-within {
|
|
148
|
+
outline: 3px solid #1E90FF;
|
|
149
|
+
outline-offset: 4px;
|
|
150
|
+
border-radius: 1.5rem;
|
|
151
|
+
}
|
|
152
|
+
.prokodo-Checkbox--card {
|
|
153
|
+
padding: 0.5rem 0;
|
|
154
|
+
border-radius: 12px;
|
|
155
|
+
background: transparent;
|
|
156
|
+
border: 1px solid transparent;
|
|
157
|
+
box-shadow: none;
|
|
158
|
+
}
|
|
159
|
+
.prokodo-Checkbox__left {
|
|
160
|
+
display: inline-flex;
|
|
161
|
+
align-items: center;
|
|
162
|
+
}
|
|
163
|
+
.prokodo-Checkbox__input {
|
|
164
|
+
position: absolute;
|
|
165
|
+
opacity: 0;
|
|
166
|
+
width: 1px;
|
|
167
|
+
height: 1px;
|
|
168
|
+
margin: 0;
|
|
169
|
+
padding: 0;
|
|
170
|
+
pointer-events: none;
|
|
171
|
+
}
|
|
172
|
+
.prokodo-Checkbox__control {
|
|
173
|
+
width: 18px;
|
|
174
|
+
height: 18px;
|
|
175
|
+
border-radius: 6px;
|
|
176
|
+
position: relative;
|
|
177
|
+
border: 2px solid rgba(255, 255, 255, 0.18);
|
|
178
|
+
background: rgba(255, 255, 255, 0.02);
|
|
179
|
+
box-shadow: var(--inner-elevation-1);
|
|
180
|
+
display: inline-flex;
|
|
181
|
+
align-items: center;
|
|
182
|
+
justify-content: center;
|
|
183
|
+
transition: border-color 140ms ease, background 140ms ease;
|
|
184
|
+
}
|
|
185
|
+
.prokodo-Checkbox__control::after {
|
|
186
|
+
content: "";
|
|
187
|
+
width: 9px;
|
|
188
|
+
height: 5px;
|
|
189
|
+
border-left: 2px solid var(--color-primary-500, #2f6bff);
|
|
190
|
+
border-bottom: 2px solid var(--color-primary-500, #2f6bff);
|
|
191
|
+
position: absolute;
|
|
192
|
+
top: 50%;
|
|
193
|
+
left: 50%;
|
|
194
|
+
transform: translate(-50%, -50%) rotate(-45deg) scale(0.6);
|
|
195
|
+
opacity: 0;
|
|
196
|
+
transition: transform 140ms ease, opacity 140ms ease;
|
|
197
|
+
}
|
|
198
|
+
.prokodo-Checkbox__control--checked {
|
|
199
|
+
border-color: rgba(255, 255, 255, 0.32);
|
|
200
|
+
}
|
|
201
|
+
.prokodo-Checkbox__control--checked::after {
|
|
202
|
+
opacity: 1;
|
|
203
|
+
transform: translate(-50%, -50%) rotate(-45deg) scale(1);
|
|
204
|
+
}
|
|
205
|
+
.prokodo-Checkbox__control--card {
|
|
206
|
+
box-shadow: var(--inner-elevation-1);
|
|
207
|
+
}
|
|
208
|
+
.prokodo-Checkbox__control--card.prokodo-Checkbox__control--checked {
|
|
209
|
+
background: rgba(255, 255, 255, 0.1);
|
|
210
|
+
}
|
|
211
|
+
.prokodo-Checkbox__body {
|
|
212
|
+
min-width: 0;
|
|
213
|
+
display: flex;
|
|
214
|
+
flex-direction: column;
|
|
215
|
+
gap: 0.25rem;
|
|
216
|
+
}
|
|
217
|
+
.prokodo-Checkbox__row {
|
|
218
|
+
display: inline-flex;
|
|
219
|
+
align-items: center;
|
|
220
|
+
gap: 0.5rem;
|
|
221
|
+
min-width: 0;
|
|
222
|
+
}
|
|
223
|
+
.prokodo-Checkbox__title {
|
|
224
|
+
white-space: nowrap;
|
|
225
|
+
overflow: hidden;
|
|
226
|
+
text-overflow: ellipsis;
|
|
227
|
+
color: var(--color-grey-900);
|
|
228
|
+
margin: 0;
|
|
229
|
+
font-weight: 400;
|
|
230
|
+
font-size: 1.125rem;
|
|
231
|
+
font-family: var(--font-secondary), -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
232
|
+
font-style: normal;
|
|
233
|
+
line-height: 1.55;
|
|
234
|
+
letter-spacing: 0.03em;
|
|
235
|
+
text-transform: none;
|
|
236
|
+
text-align: left;
|
|
237
|
+
text-decoration: none;
|
|
238
|
+
}
|
|
239
|
+
@media screen and (min-width: 480px) {
|
|
240
|
+
.prokodo-Checkbox__title {
|
|
241
|
+
font-size: 1rem;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
@media screen and (min-width: 960px) {
|
|
245
|
+
.prokodo-Checkbox__title {
|
|
246
|
+
font-size: 1rem;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
.prokodo-Checkbox__requiredMark {
|
|
250
|
+
color: var(--color-error);
|
|
251
|
+
line-height: 1;
|
|
252
|
+
font-weight: 400;
|
|
253
|
+
font-size: 1.125rem;
|
|
254
|
+
font-family: var(--font-secondary), -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
255
|
+
font-style: normal;
|
|
256
|
+
line-height: 1.55;
|
|
257
|
+
letter-spacing: 0.03em;
|
|
258
|
+
text-transform: none;
|
|
259
|
+
text-align: left;
|
|
260
|
+
text-decoration: none;
|
|
261
|
+
}
|
|
262
|
+
@media screen and (min-width: 480px) {
|
|
263
|
+
.prokodo-Checkbox__requiredMark {
|
|
264
|
+
font-size: 1rem;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
@media screen and (min-width: 960px) {
|
|
268
|
+
.prokodo-Checkbox__requiredMark {
|
|
269
|
+
font-size: 1rem;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
.prokodo-Checkbox__desc {
|
|
273
|
+
color: var(--color-grey-700);
|
|
274
|
+
opacity: 0.82;
|
|
275
|
+
overflow: hidden;
|
|
276
|
+
text-overflow: ellipsis;
|
|
277
|
+
display: -webkit-box;
|
|
278
|
+
line-clamp: 2;
|
|
279
|
+
-webkit-box-orient: vertical;
|
|
280
|
+
font-weight: 400;
|
|
281
|
+
font-size: 1rem;
|
|
282
|
+
font-family: var(--font-secondary), -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
283
|
+
font-style: normal;
|
|
284
|
+
line-height: 1.45;
|
|
285
|
+
letter-spacing: 0.03em;
|
|
286
|
+
text-transform: none;
|
|
287
|
+
text-align: left;
|
|
288
|
+
text-decoration: none;
|
|
289
|
+
}
|
|
290
|
+
@media screen and (min-width: 480px) {
|
|
291
|
+
.prokodo-Checkbox__desc {
|
|
292
|
+
font-size: 0.875rem;
|
|
293
|
+
line-height: 1.4;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
@media screen and (min-width: 960px) {
|
|
297
|
+
.prokodo-Checkbox__desc {
|
|
298
|
+
font-size: 0.875rem;
|
|
299
|
+
line-height: 1.4;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
.prokodo-Checkbox__right {
|
|
303
|
+
justify-self: end;
|
|
304
|
+
display: inline-flex;
|
|
305
|
+
align-items: center;
|
|
306
|
+
align-self: start;
|
|
307
|
+
margin-top: 2px;
|
|
308
|
+
}
|
|
309
|
+
.prokodo-Checkbox__rightIcon {
|
|
310
|
+
color: var(--color-grey-700);
|
|
311
|
+
opacity: 0.9;
|
|
312
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const styles = {
|
|
2
|
+
"prokodo-Checkbox": "prokodo-Checkbox",
|
|
3
|
+
"prokodo-Checkbox--disabled": "prokodo-Checkbox--disabled",
|
|
4
|
+
"prokodo-Checkbox--card": "prokodo-Checkbox--card",
|
|
5
|
+
"prokodo-Checkbox__left": "prokodo-Checkbox__left",
|
|
6
|
+
"prokodo-Checkbox__input": "prokodo-Checkbox__input",
|
|
7
|
+
"prokodo-Checkbox__control": "prokodo-Checkbox__control",
|
|
8
|
+
"prokodo-Checkbox__control--checked": "prokodo-Checkbox__control--checked",
|
|
9
|
+
"prokodo-Checkbox__control--card": "prokodo-Checkbox__control--card",
|
|
10
|
+
"prokodo-Checkbox__body": "prokodo-Checkbox__body",
|
|
11
|
+
"prokodo-Checkbox__row": "prokodo-Checkbox__row",
|
|
12
|
+
"prokodo-Checkbox__title": "prokodo-Checkbox__title",
|
|
13
|
+
"prokodo-Checkbox__requiredMark": "prokodo-Checkbox__requiredMark",
|
|
14
|
+
"prokodo-Checkbox__desc": "prokodo-Checkbox__desc",
|
|
15
|
+
"prokodo-Checkbox__right": "prokodo-Checkbox__right",
|
|
16
|
+
"prokodo-Checkbox__rightIcon": "prokodo-Checkbox__rightIcon"
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
styles as default
|
|
20
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
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 { CheckboxView } from "./Checkbox.view.js";
|
|
5
|
+
function CheckboxServer(props) {
|
|
6
|
+
const isChecked = typeof props.checked === "boolean" ? props.checked : props.defaultChecked ?? false;
|
|
7
|
+
return /* @__PURE__ */ jsx(
|
|
8
|
+
CheckboxView,
|
|
9
|
+
{
|
|
10
|
+
...props,
|
|
11
|
+
checked: void 0,
|
|
12
|
+
defaultChecked: void 0,
|
|
13
|
+
isChecked
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
__name(CheckboxServer, "CheckboxServer");
|
|
18
|
+
export {
|
|
19
|
+
CheckboxServer as default
|
|
20
|
+
};
|