@italia/checkbox 1.0.0-alpha.4
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/AUTHORS +3 -0
- package/LICENSE +11 -0
- package/README.md +75 -0
- package/custom-elements.json +687 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +10 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/it-checkbox-group.d.ts +49 -0
- package/dist/src/it-checkbox-group.d.ts.map +1 -0
- package/dist/src/it-checkbox-group.js +1206 -0
- package/dist/src/it-checkbox-group.js.map +1 -0
- package/dist/src/it-checkbox.d.ts +38 -0
- package/dist/src/it-checkbox.d.ts.map +1 -0
- package/dist/src/it-checkbox.js +1215 -0
- package/dist/src/it-checkbox.js.map +1 -0
- package/package.json +69 -0
- package/styles/globals.scss +21 -0
|
@@ -0,0 +1,1215 @@
|
|
|
1
|
+
import { _ as __decorate, a as __metadata, F as FormControl, b as FormControlController, s as setAttributes } from '../index-BQ40QKAy.js';
|
|
2
|
+
import { css, html } from 'lit';
|
|
3
|
+
import { property, queryAssignedElements, customElement } from 'lit/decorators.js';
|
|
4
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
5
|
+
import { when } from 'lit/directives/when.js';
|
|
6
|
+
import { live } from 'lit/directives/live.js';
|
|
7
|
+
import 'lit/directive.js';
|
|
8
|
+
|
|
9
|
+
var styles = css`/***************************** 1 ****************************************/
|
|
10
|
+
/***************************** 2 ****************************************/
|
|
11
|
+
/***************************** 1 ****************************************/
|
|
12
|
+
/***************************** 2 ****************************************/
|
|
13
|
+
/***************************** 1 ****************************************/
|
|
14
|
+
/***************************** 2 ****************************************/
|
|
15
|
+
/***************************** 3 ****************************************/
|
|
16
|
+
/***************************** 1 ****************************************/
|
|
17
|
+
/***************************** 2 ****************************************/
|
|
18
|
+
/***************************** 3 ****************************************/
|
|
19
|
+
/***************************** NEUTRAL 1 ****************************************/
|
|
20
|
+
/***************************** NEUTRAL 2 ****************************************/
|
|
21
|
+
/***************************** NEUTRAL 2 / 3 ****************************************/
|
|
22
|
+
.form-check [type=checkbox]:focus + label,
|
|
23
|
+
.form-check [type=radio]:focus + label {
|
|
24
|
+
border-color: hsl(0, 0%, 0%) !important;
|
|
25
|
+
box-shadow: 0 0 0 2px var(--bs-color-border-inverse), 0 0 0 5px var(--bs-color-outline-focus) !important;
|
|
26
|
+
outline: 3px solid transparent !important;
|
|
27
|
+
outline-offset: 3px !important;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.form-check [type=checkbox]:focus[data-focus-mouse=true] + label,
|
|
31
|
+
.form-check [type=radio]:focus[data-focus-mouse=true] + label {
|
|
32
|
+
border-color: inherit !important;
|
|
33
|
+
box-shadow: none !important;
|
|
34
|
+
outline: none !important;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
*,
|
|
38
|
+
*::before,
|
|
39
|
+
*::after {
|
|
40
|
+
box-sizing: border-box;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
44
|
+
:root {
|
|
45
|
+
scroll-behavior: smooth;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
body {
|
|
50
|
+
margin: 0;
|
|
51
|
+
-webkit-text-size-adjust: 100%;
|
|
52
|
+
-webkit-tap-highlight-color: hsla(0, 0%, 0%, 0);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
hr {
|
|
56
|
+
margin: 1rem 0;
|
|
57
|
+
color: inherit;
|
|
58
|
+
border: 0;
|
|
59
|
+
border-top: 1px solid;
|
|
60
|
+
opacity: 0.25;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
p {
|
|
64
|
+
margin-top: 0;
|
|
65
|
+
margin-bottom: var(--bs-paragraph-spacing);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
abbr[title] {
|
|
69
|
+
text-decoration: underline dotted;
|
|
70
|
+
cursor: help;
|
|
71
|
+
text-decoration-skip-ink: none;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
address {
|
|
75
|
+
margin-bottom: var(--bs-spacing-s);
|
|
76
|
+
font-style: normal;
|
|
77
|
+
line-height: inherit;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
ol,
|
|
81
|
+
ul {
|
|
82
|
+
padding-left: var(--bs-spacing-l);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
ol,
|
|
86
|
+
ul,
|
|
87
|
+
dl {
|
|
88
|
+
margin-top: 0;
|
|
89
|
+
margin-bottom: var(--bs-spacing-s);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
ol ol,
|
|
93
|
+
ul ul,
|
|
94
|
+
ol ul,
|
|
95
|
+
ul ol {
|
|
96
|
+
margin-bottom: 0;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
dt {
|
|
100
|
+
font-weight: var(--bs-font-weight-strong);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
dd {
|
|
104
|
+
margin-bottom: var(--bs-spacing-xxs);
|
|
105
|
+
margin-left: 0;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
blockquote {
|
|
109
|
+
margin: 0 0 var(--bs-spacing-s);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
sub,
|
|
113
|
+
sup {
|
|
114
|
+
position: relative;
|
|
115
|
+
font-size: var(--bs-font-size-1);
|
|
116
|
+
line-height: 0;
|
|
117
|
+
vertical-align: baseline;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
sub {
|
|
121
|
+
bottom: -0.25em;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
sup {
|
|
125
|
+
top: -0.5em;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
a {
|
|
129
|
+
color: var(--bs-color-link);
|
|
130
|
+
text-decoration: underline;
|
|
131
|
+
text-decoration-skip-ink: auto;
|
|
132
|
+
text-underline-offset: 2px;
|
|
133
|
+
}
|
|
134
|
+
a:hover {
|
|
135
|
+
color: var(--bs-color-link-hover);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
pre,
|
|
139
|
+
code,
|
|
140
|
+
kbd,
|
|
141
|
+
samp {
|
|
142
|
+
font-size: 1em;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
pre {
|
|
146
|
+
display: block;
|
|
147
|
+
margin-top: 0;
|
|
148
|
+
margin-bottom: var(--bs-paragraph-spacing);
|
|
149
|
+
overflow: auto;
|
|
150
|
+
}
|
|
151
|
+
pre code {
|
|
152
|
+
word-break: normal;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
a > code {
|
|
156
|
+
color: inherit;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
figure {
|
|
160
|
+
margin: 0 0 1rem;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
img,
|
|
164
|
+
svg {
|
|
165
|
+
vertical-align: middle;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
table {
|
|
169
|
+
caption-side: bottom;
|
|
170
|
+
border-collapse: collapse;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
caption {
|
|
174
|
+
padding-top: 0.5rem;
|
|
175
|
+
padding-bottom: 0.5rem;
|
|
176
|
+
color: hsl(210, 17%, 44%);
|
|
177
|
+
text-align: left;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
th {
|
|
181
|
+
text-align: inherit;
|
|
182
|
+
text-align: -webkit-match-parent;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
thead,
|
|
186
|
+
tbody,
|
|
187
|
+
tfoot,
|
|
188
|
+
tr,
|
|
189
|
+
td,
|
|
190
|
+
th {
|
|
191
|
+
border-color: inherit;
|
|
192
|
+
border-style: solid;
|
|
193
|
+
border-width: 0;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
label {
|
|
197
|
+
display: inline-block;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
button {
|
|
201
|
+
border-radius: 0;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
button:focus:not(:focus-visible) {
|
|
205
|
+
outline: 0;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
input,
|
|
209
|
+
button,
|
|
210
|
+
select,
|
|
211
|
+
optgroup,
|
|
212
|
+
textarea {
|
|
213
|
+
margin: 0;
|
|
214
|
+
font-family: inherit;
|
|
215
|
+
font-size: inherit;
|
|
216
|
+
line-height: inherit;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
button,
|
|
220
|
+
select {
|
|
221
|
+
text-transform: none;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
[role=button] {
|
|
225
|
+
cursor: pointer;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
select {
|
|
229
|
+
word-wrap: normal;
|
|
230
|
+
}
|
|
231
|
+
select:disabled {
|
|
232
|
+
opacity: 1;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
[list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator {
|
|
236
|
+
display: none !important;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
button,
|
|
240
|
+
[type=button],
|
|
241
|
+
[type=reset],
|
|
242
|
+
[type=submit] {
|
|
243
|
+
-webkit-appearance: button;
|
|
244
|
+
}
|
|
245
|
+
button:not(:disabled),
|
|
246
|
+
[type=button]:not(:disabled),
|
|
247
|
+
[type=reset]:not(:disabled),
|
|
248
|
+
[type=submit]:not(:disabled) {
|
|
249
|
+
cursor: pointer;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
::-moz-focus-inner {
|
|
253
|
+
padding: 0;
|
|
254
|
+
border-style: none;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
textarea {
|
|
258
|
+
resize: vertical;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
fieldset {
|
|
262
|
+
min-width: 0;
|
|
263
|
+
padding: 0;
|
|
264
|
+
margin: 0;
|
|
265
|
+
border: 0;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
::-webkit-datetime-edit-fields-wrapper,
|
|
269
|
+
::-webkit-datetime-edit-text,
|
|
270
|
+
::-webkit-datetime-edit-minute,
|
|
271
|
+
::-webkit-datetime-edit-hour-field,
|
|
272
|
+
::-webkit-datetime-edit-day-field,
|
|
273
|
+
::-webkit-datetime-edit-month-field,
|
|
274
|
+
::-webkit-datetime-edit-year-field {
|
|
275
|
+
padding: 0;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
::-webkit-inner-spin-button {
|
|
279
|
+
height: auto;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
[type=search] {
|
|
283
|
+
outline-offset: -2px;
|
|
284
|
+
-webkit-appearance: textfield;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/* rtl:raw:
|
|
288
|
+
[type="tel"],
|
|
289
|
+
[type="url"],
|
|
290
|
+
[type="email"],
|
|
291
|
+
[type="number"] {
|
|
292
|
+
direction: ltr;
|
|
293
|
+
}
|
|
294
|
+
*/
|
|
295
|
+
::-webkit-search-decoration {
|
|
296
|
+
-webkit-appearance: none;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
::-webkit-color-swatch-wrapper {
|
|
300
|
+
padding: 0;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
::file-selector-button {
|
|
304
|
+
font: inherit;
|
|
305
|
+
-webkit-appearance: button;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
output {
|
|
309
|
+
display: inline-block;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
iframe {
|
|
313
|
+
border: 0;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
summary {
|
|
317
|
+
display: list-item;
|
|
318
|
+
cursor: pointer;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
progress {
|
|
322
|
+
vertical-align: baseline;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
[hidden] {
|
|
326
|
+
display: none !important;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.visually-hidden,
|
|
330
|
+
.visually-hidden-focusable:not(:focus):not(:focus-within) {
|
|
331
|
+
position: absolute !important;
|
|
332
|
+
width: 1px !important;
|
|
333
|
+
height: 1px !important;
|
|
334
|
+
padding: 0 !important;
|
|
335
|
+
margin: -1px !important;
|
|
336
|
+
overflow: hidden !important;
|
|
337
|
+
clip: rect(0, 0, 0, 0) !important;
|
|
338
|
+
white-space: nowrap !important;
|
|
339
|
+
border: 0 !important;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
:root {
|
|
343
|
+
--bs-form-control-height: 2.5rem;
|
|
344
|
+
--bs-form-control-spacing: var(--bs-spacing-xxs);
|
|
345
|
+
--bs-form-control-background-color: var(--bs-color-background-inverse);
|
|
346
|
+
--bs-form-control-border-color: var(--bs-color-border-secondary);
|
|
347
|
+
--bs-form-control-border-radius: var(--bs-radius-smooth);
|
|
348
|
+
--bs-form-control-placeholder-color: var(--bs-color-text-muted);
|
|
349
|
+
--bs-form-control-label-color: var(--bs-color-text-base);
|
|
350
|
+
--bs-form-control-text-color: var(--bs-color-text-secondary);
|
|
351
|
+
--bs-form-control-font-size: var(--bs-body-font-size);
|
|
352
|
+
--bs-form-group-spacing-y: var(--bs-spacing-m);
|
|
353
|
+
--bs-form-checkbox-border-color: var(--bs-color-border-secondary);
|
|
354
|
+
--bs-form-checkbox-border-radius: var(--bs-radius-smooth);
|
|
355
|
+
--bs-form-checked-color: var(--bs-color-background-primary);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
input[readonly],
|
|
359
|
+
textarea[readonly],
|
|
360
|
+
select[readonly] {
|
|
361
|
+
--bs-form-control-border-color: var(--bs-color-border-subtle);
|
|
362
|
+
--bs-form-control-background-color: var(--bs-color-background-muted);
|
|
363
|
+
cursor: not-allowed;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
input,
|
|
367
|
+
textarea,
|
|
368
|
+
select {
|
|
369
|
+
display: block;
|
|
370
|
+
width: 100%;
|
|
371
|
+
padding: var(--bs-form-control-spacing);
|
|
372
|
+
border: 1px solid var(--bs-form-control-border-color);
|
|
373
|
+
border-radius: var(--bs-form-control-border-radius);
|
|
374
|
+
background-color: var(--bs-form-control-background-color);
|
|
375
|
+
color: var(--bs-form-control-text-color);
|
|
376
|
+
font-size: var(--bs-form-control-font-size);
|
|
377
|
+
}
|
|
378
|
+
input.disabled, input:disabled,
|
|
379
|
+
textarea.disabled,
|
|
380
|
+
textarea:disabled,
|
|
381
|
+
select.disabled,
|
|
382
|
+
select:disabled {
|
|
383
|
+
border-color: var(--bs-color-border-disabled);
|
|
384
|
+
opacity: 1;
|
|
385
|
+
background-color: var(--bs-color-background-disabled);
|
|
386
|
+
color: var(--bs-color-text-disabled);
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
input:focus,
|
|
390
|
+
textarea:focus {
|
|
391
|
+
outline: 3px solid transparent;
|
|
392
|
+
outline-offset: 3px;
|
|
393
|
+
box-shadow: 0 0 0 2px var(--bs-color-border-inverse), 0 0 0 5px var(--bs-color-outline-focus) !important;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
input::file-selector-button {
|
|
397
|
+
margin: -0.375rem -0.75rem;
|
|
398
|
+
padding: 0.375rem 0.75rem;
|
|
399
|
+
border-width: 0;
|
|
400
|
+
border-style: solid;
|
|
401
|
+
border-radius: 0;
|
|
402
|
+
border-color: inherit;
|
|
403
|
+
color: hsl(0, 0%, 10%);
|
|
404
|
+
pointer-events: none;
|
|
405
|
+
margin-inline-end: 0.75rem;
|
|
406
|
+
border-inline-end-width: 0;
|
|
407
|
+
background-color: hsl(0, 0%, 100%);
|
|
408
|
+
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
|
|
409
|
+
}
|
|
410
|
+
@media (prefers-reduced-motion: reduce) {
|
|
411
|
+
input::file-selector-button {
|
|
412
|
+
transition: none;
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
input:hover:not(:disabled):not([readonly])::file-selector-button {
|
|
416
|
+
background-color: rgb(242.25, 242.25, 242.25);
|
|
417
|
+
}
|
|
418
|
+
input[type=file] {
|
|
419
|
+
overflow: hidden;
|
|
420
|
+
}
|
|
421
|
+
input[type=file]:not(:disabled):not([readonly]) {
|
|
422
|
+
cursor: pointer;
|
|
423
|
+
}
|
|
424
|
+
input::-webkit-date-and-time-value {
|
|
425
|
+
height: 1.5em;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
select {
|
|
429
|
+
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='hsl%280, 0%, 15%%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
|
|
430
|
+
background-repeat: no-repeat;
|
|
431
|
+
background-position: right var(--bs-form-control-spacing) center;
|
|
432
|
+
background-size: 16px 12px;
|
|
433
|
+
appearance: none;
|
|
434
|
+
}
|
|
435
|
+
select:focus {
|
|
436
|
+
border-color: hsl(210, 17%, 44%);
|
|
437
|
+
outline: 0;
|
|
438
|
+
box-shadow: 0 0 0 0.25rem rgba(0, 102, 204, 0.25);
|
|
439
|
+
}
|
|
440
|
+
select[multiple], select[size]:not([size="1"]) {
|
|
441
|
+
padding-right: 0.75rem;
|
|
442
|
+
background-image: none;
|
|
443
|
+
}
|
|
444
|
+
select:disabled {
|
|
445
|
+
background-color: hsl(0, 0%, 90%);
|
|
446
|
+
}
|
|
447
|
+
select:disabled:hover {
|
|
448
|
+
cursor: not-allowed;
|
|
449
|
+
}
|
|
450
|
+
select:-moz-focusring {
|
|
451
|
+
color: transparent;
|
|
452
|
+
text-shadow: 0 0 0 hsl(0, 0%, 10%);
|
|
453
|
+
}
|
|
454
|
+
select option {
|
|
455
|
+
font-weight: normal;
|
|
456
|
+
}
|
|
457
|
+
select:disabled {
|
|
458
|
+
opacity: 1;
|
|
459
|
+
background-color: hsl(210, 3%, 85%);
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
textarea {
|
|
463
|
+
height: auto;
|
|
464
|
+
font-size: var(--bs-body-font-size);
|
|
465
|
+
line-height: 1.5;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
label {
|
|
469
|
+
display: inline-block;
|
|
470
|
+
width: auto;
|
|
471
|
+
max-width: 100%;
|
|
472
|
+
margin-bottom: var(--bs-spacing-xxs);
|
|
473
|
+
color: var(--bs-form-control-label-color);
|
|
474
|
+
font-size: var(--bs-label-font-size-s);
|
|
475
|
+
font-weight: var(--bs-font-weight-solid);
|
|
476
|
+
line-height: var(--bs-label-line-height);
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
input,
|
|
480
|
+
textarea {
|
|
481
|
+
outline: 0;
|
|
482
|
+
box-shadow: none;
|
|
483
|
+
transition: none;
|
|
484
|
+
appearance: none;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
input[type=date],
|
|
488
|
+
input[type=datetime-local],
|
|
489
|
+
input[type=time] {
|
|
490
|
+
display: flex;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
fieldset legend {
|
|
494
|
+
margin-bottom: var(--bs-spacing-s);
|
|
495
|
+
padding: 0 var(--bs-form-input-spacing-x);
|
|
496
|
+
background-color: transparent;
|
|
497
|
+
color: var(--bs-form-control-text-color);
|
|
498
|
+
font-size: var(--bs-label-sm);
|
|
499
|
+
font-weight: var(--bs-font-weight-solid);
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
::placeholder {
|
|
503
|
+
color: var(--bs-form-control-placeholder-color);
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
input::-webkit-datetime-edit {
|
|
507
|
+
background-color: var(--bs-color-background-primary-lighter);
|
|
508
|
+
color: var(--bs-form-contro-text-color);
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
.form-group {
|
|
512
|
+
position: relative;
|
|
513
|
+
margin-bottom: var(--bs-form-group-spacing-y);
|
|
514
|
+
}
|
|
515
|
+
.form-group label.input-symbol-label:not(.active) {
|
|
516
|
+
left: 2.25rem;
|
|
517
|
+
}
|
|
518
|
+
.form-group small.form-text {
|
|
519
|
+
margin: 0;
|
|
520
|
+
font-size: 0.875rem;
|
|
521
|
+
}
|
|
522
|
+
.form-group input[type=time] ~ label {
|
|
523
|
+
font-size: 0.875rem;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
.form-text {
|
|
527
|
+
margin: var(--bs-spacing-xxs) 0;
|
|
528
|
+
color: var(--bs-color-text-secondary);
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
.form-group.active .form-file-name {
|
|
532
|
+
padding-bottom: 1.95rem;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
.warning-feedback {
|
|
536
|
+
display: none;
|
|
537
|
+
width: 100%;
|
|
538
|
+
margin-top: 0.25rem;
|
|
539
|
+
color: var(--bs-color-text-warning);
|
|
540
|
+
font-size: 0.75rem;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
.valid-feedback,
|
|
544
|
+
.invalid-feedback,
|
|
545
|
+
.warning-feedback {
|
|
546
|
+
margin-left: 0.5rem;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
.input-group .input-group-text .btn {
|
|
550
|
+
border-radius: var(--bs-form-control-border-radius) 0 0 var(--bs-form-control-border-radius);
|
|
551
|
+
}
|
|
552
|
+
.input-group .input-group-append {
|
|
553
|
+
margin-left: 0;
|
|
554
|
+
}
|
|
555
|
+
.input-group .input-group-append .btn {
|
|
556
|
+
height: 100%;
|
|
557
|
+
padding-top: 0;
|
|
558
|
+
padding-bottom: 0;
|
|
559
|
+
border-bottom: 1px solid hsl(210, 17%, 44%);
|
|
560
|
+
border-radius: 0 var(--bs-form-control-border-radius) var(--bs-form-control-border-radius) 0;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
.form-check {
|
|
564
|
+
position: relative;
|
|
565
|
+
padding-left: 0;
|
|
566
|
+
align-items: center;
|
|
567
|
+
}
|
|
568
|
+
.form-check + .form-check {
|
|
569
|
+
margin-top: var(--bs-spacing-s);
|
|
570
|
+
}
|
|
571
|
+
.form-check [type=checkbox],
|
|
572
|
+
.form-check [type=radio] {
|
|
573
|
+
position: absolute;
|
|
574
|
+
height: 100%;
|
|
575
|
+
margin-top: 0;
|
|
576
|
+
margin-left: 0;
|
|
577
|
+
opacity: 0;
|
|
578
|
+
}
|
|
579
|
+
.form-check [type=checkbox] + label,
|
|
580
|
+
.form-check [type=radio] + label {
|
|
581
|
+
position: relative;
|
|
582
|
+
display: flex;
|
|
583
|
+
align-items: center;
|
|
584
|
+
padding-left: 28px;
|
|
585
|
+
font-size: var(--bs-label-font-size);
|
|
586
|
+
font-weight: var(--bs-font-weight-solid);
|
|
587
|
+
cursor: pointer;
|
|
588
|
+
margin-bottom: 0;
|
|
589
|
+
user-select: none;
|
|
590
|
+
}
|
|
591
|
+
@media (min-width: 576px) {
|
|
592
|
+
.form-check [type=checkbox] + label,
|
|
593
|
+
.form-check [type=radio] + label {
|
|
594
|
+
font-size: var(--bs-label-font-size-m);
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
.form-check input[type=checkbox] + label::after,
|
|
598
|
+
.form-check input[type=checkbox] + label::before {
|
|
599
|
+
position: absolute;
|
|
600
|
+
left: 0;
|
|
601
|
+
z-index: 1;
|
|
602
|
+
content: "";
|
|
603
|
+
border-width: 2px;
|
|
604
|
+
border-style: solid;
|
|
605
|
+
transition: all var(--bs-transition-instant) ease-out;
|
|
606
|
+
}
|
|
607
|
+
.form-check input[type=checkbox] + label::after {
|
|
608
|
+
top: 0;
|
|
609
|
+
width: 20px;
|
|
610
|
+
height: 20px;
|
|
611
|
+
border-radius: var(--bs-form-control-border-radius);
|
|
612
|
+
}
|
|
613
|
+
.form-check input[type=checkbox]:checked + label::before {
|
|
614
|
+
top: 3px;
|
|
615
|
+
left: 3px;
|
|
616
|
+
width: 6px;
|
|
617
|
+
height: 12px;
|
|
618
|
+
border-width: 2px;
|
|
619
|
+
border-style: solid;
|
|
620
|
+
border-color: transparent var(--bs-color-border-inverse) var(--bs-color-border-inverse) transparent;
|
|
621
|
+
opacity: 1;
|
|
622
|
+
transform: rotate(40deg);
|
|
623
|
+
transform-origin: 100% 100%;
|
|
624
|
+
backface-visibility: hidden;
|
|
625
|
+
}
|
|
626
|
+
.form-check input[type=checkbox]:checked + label::after {
|
|
627
|
+
z-index: 0;
|
|
628
|
+
border-color: var(--bs-form-checked-color);
|
|
629
|
+
background-color: var(--bs-form-checked-color);
|
|
630
|
+
}
|
|
631
|
+
.form-check input[type=checkbox]:not(:checked) + label::after {
|
|
632
|
+
z-index: 0;
|
|
633
|
+
border-color: var(--bs-form-checkbox-border-color);
|
|
634
|
+
background-color: transparent;
|
|
635
|
+
}
|
|
636
|
+
.form-check input[type=checkbox]:not(:checked) + label::before {
|
|
637
|
+
top: 10px;
|
|
638
|
+
left: 6px;
|
|
639
|
+
width: 0;
|
|
640
|
+
height: 0;
|
|
641
|
+
border-color: transparent;
|
|
642
|
+
}
|
|
643
|
+
.form-check input[type=checkbox]:disabled + label {
|
|
644
|
+
opacity: 1;
|
|
645
|
+
cursor: not-allowed;
|
|
646
|
+
}
|
|
647
|
+
.form-check input[type=checkbox]:disabled:not(:checked) + label::after {
|
|
648
|
+
border-color: var(--bs-color-border-disabled);
|
|
649
|
+
background-color: transparent;
|
|
650
|
+
}
|
|
651
|
+
.form-check input[type=checkbox]:disabled:checked + label::after {
|
|
652
|
+
border-color: var(--bs-color-border-disabled);
|
|
653
|
+
background-color: var(--bs-color-border-disabled);
|
|
654
|
+
}
|
|
655
|
+
.form-check input[type=radio] + label::after, .form-check input[type=radio] + label::before {
|
|
656
|
+
position: absolute;
|
|
657
|
+
top: 0;
|
|
658
|
+
left: 0;
|
|
659
|
+
z-index: 0;
|
|
660
|
+
content: "";
|
|
661
|
+
width: 20px;
|
|
662
|
+
height: 20px;
|
|
663
|
+
border-width: 2px;
|
|
664
|
+
border-style: solid;
|
|
665
|
+
border-radius: var(--bs-radius-rounded);
|
|
666
|
+
transition: all var(--bs-transition-instant) ease-out;
|
|
667
|
+
}
|
|
668
|
+
.form-check input[type=radio]:not(:checked) + label::after, .form-check input[type=radio]:not(:checked) + label::before {
|
|
669
|
+
border-color: var(--bs-form-checkbox-border-color);
|
|
670
|
+
}
|
|
671
|
+
.form-check input[type=radio]:not(:checked) + label:after {
|
|
672
|
+
z-index: -1;
|
|
673
|
+
transform: scale(0);
|
|
674
|
+
}
|
|
675
|
+
.form-check input[type=radio]:checked + label::after {
|
|
676
|
+
z-index: 0;
|
|
677
|
+
border-color: var(--bs-form-checked-color);
|
|
678
|
+
background-color: var(--bs-form-checked-color);
|
|
679
|
+
transform: scale(0.64);
|
|
680
|
+
}
|
|
681
|
+
.form-check input[type=radio]:checked + label::before {
|
|
682
|
+
border-color: var(--bs-form-checked-color);
|
|
683
|
+
}
|
|
684
|
+
.form-check input[type=radio]:disabled + label {
|
|
685
|
+
cursor: not-allowed;
|
|
686
|
+
}
|
|
687
|
+
.form-check input[type=radio]:disabled:not(:checked) + label::after, .form-check input[type=radio]:disabled:not(:checked) + label::before {
|
|
688
|
+
border-color: var(--bs-color-border-disabled);
|
|
689
|
+
}
|
|
690
|
+
.form-check input[type=radio]:disabled:checked + label::after {
|
|
691
|
+
border-color: var(--bs-color-border-disabled);
|
|
692
|
+
background-color: var(--bs-color-border-disabled);
|
|
693
|
+
}
|
|
694
|
+
.form-check input[type=radio]:disabled:checked + label::before {
|
|
695
|
+
border-color: var(--bs-color-border-disabled);
|
|
696
|
+
}
|
|
697
|
+
.form-check.form-check-group {
|
|
698
|
+
margin-bottom: 1rem;
|
|
699
|
+
padding: 0 0 1rem 0;
|
|
700
|
+
box-shadow: inset 0 -1px 0 0 rgba(1, 1, 1, 0.1);
|
|
701
|
+
}
|
|
702
|
+
.form-check.form-check-group input[type=checkbox] + label,
|
|
703
|
+
.form-check.form-check-group input[type=radio] + label {
|
|
704
|
+
padding-right: 3.25rem;
|
|
705
|
+
padding-left: 0;
|
|
706
|
+
}
|
|
707
|
+
.form-check.form-check-group input[type=checkbox] + label::after, .form-check.form-check-group input[type=checkbox] + label::before,
|
|
708
|
+
.form-check.form-check-group input[type=radio] + label::after,
|
|
709
|
+
.form-check.form-check-group input[type=radio] + label::before {
|
|
710
|
+
right: 0;
|
|
711
|
+
left: auto;
|
|
712
|
+
}
|
|
713
|
+
.form-check.form-check-group input[type=checkbox]:checked + label::before {
|
|
714
|
+
right: 11px;
|
|
715
|
+
}
|
|
716
|
+
.form-check.form-check-group input[type=radio]:checked + label::before {
|
|
717
|
+
right: 0;
|
|
718
|
+
}
|
|
719
|
+
.form-check.form-check-group .form-text {
|
|
720
|
+
display: block;
|
|
721
|
+
margin-bottom: 0.5rem;
|
|
722
|
+
padding-right: 3.25rem;
|
|
723
|
+
}
|
|
724
|
+
.form-check.form-check-group input.semi-checked:not(:checked) + label::before {
|
|
725
|
+
right: 4px;
|
|
726
|
+
left: auto;
|
|
727
|
+
}
|
|
728
|
+
.form-check input.semi-checked:not(:checked) + label::before {
|
|
729
|
+
top: 9px;
|
|
730
|
+
left: 4px;
|
|
731
|
+
width: 12px;
|
|
732
|
+
height: 2px;
|
|
733
|
+
border-width: 0;
|
|
734
|
+
border-style: none;
|
|
735
|
+
border-color: transparent;
|
|
736
|
+
opacity: 1;
|
|
737
|
+
background: var(--bs-color-background-inverse);
|
|
738
|
+
transform: none;
|
|
739
|
+
backface-visibility: hidden;
|
|
740
|
+
}
|
|
741
|
+
.form-check input.semi-checked:not(:checked) + label::after {
|
|
742
|
+
z-index: 0;
|
|
743
|
+
border-color: var(--bs-form-checked-color);
|
|
744
|
+
background-color: var(--bs-form-checked-color);
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
.form-check-inline {
|
|
748
|
+
display: inline-block;
|
|
749
|
+
}
|
|
750
|
+
.form-check-inline:not(:last-child) {
|
|
751
|
+
margin-right: var(--bs-spacing-m);
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
@media (prefers-reduced-motion: reduce) {
|
|
755
|
+
fieldset legend,
|
|
756
|
+
.form-group label,
|
|
757
|
+
textarea,
|
|
758
|
+
.form-check [type=checkbox],
|
|
759
|
+
.form-check [type=radio],
|
|
760
|
+
.form-check [type=checkbox] + label::after,
|
|
761
|
+
.form-check [type=checkbox] + label::before,
|
|
762
|
+
.form-check [type=radio] + label::after,
|
|
763
|
+
.form-check [type=radio] + label::before,
|
|
764
|
+
.toggles label input[type=checkbox] + .lever::before,
|
|
765
|
+
.toggles label input[type=checkbox] + .lever::after {
|
|
766
|
+
transition: none !important;
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
.form-check [type=checkbox]:focus + label,
|
|
770
|
+
.form-check [type=radio]:focus + label {
|
|
771
|
+
border-color: hsl(0, 0%, 0%) !important;
|
|
772
|
+
box-shadow: 0 0 0 2px var(--bs-color-border-inverse), 0 0 0 5px var(--bs-color-outline-focus) !important;
|
|
773
|
+
outline: 3px solid transparent !important;
|
|
774
|
+
outline-offset: 3px !important;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
.form-check [type=checkbox]:focus[data-focus-mouse=true] + label,
|
|
778
|
+
.form-check [type=radio]:focus[data-focus-mouse=true] + label {
|
|
779
|
+
border-color: inherit !important;
|
|
780
|
+
box-shadow: none !important;
|
|
781
|
+
outline: none !important;
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
.form-control-plaintext {
|
|
785
|
+
border: 0;
|
|
786
|
+
--bs-form-control-border-color: transparent;
|
|
787
|
+
--bs-form-control-border-radius: 0;
|
|
788
|
+
--bs-form-control-background-color: transparent;
|
|
789
|
+
--bs-form-control-spacing: 0;
|
|
790
|
+
}
|
|
791
|
+
.form-control-plaintext:focus {
|
|
792
|
+
outline: 0;
|
|
793
|
+
box-shadow: none !important;
|
|
794
|
+
}
|
|
795
|
+
.form-control-plaintext + label {
|
|
796
|
+
cursor: text;
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
.form-control {
|
|
800
|
+
background-repeat: no-repeat;
|
|
801
|
+
background-position: center right;
|
|
802
|
+
background-size: 45px 30%;
|
|
803
|
+
}
|
|
804
|
+
.form-control:disabled {
|
|
805
|
+
cursor: not-allowed;
|
|
806
|
+
background: var(--bs-color-background-disabled);
|
|
807
|
+
border: 0;
|
|
808
|
+
color: var(--bs-color-text-disabled);
|
|
809
|
+
}
|
|
810
|
+
.was-validated .form-control:valid, .form-control.is-valid {
|
|
811
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23008055' viewBox='0 0 192 512'%3E%3Cpath d='M435.848 83.466L172.804 346.51l-96.652-96.652c-4.686-4.686-12.284-4.686-16.971 0l-28.284 28.284c-4.686 4.686-4.686 12.284 0 16.971l133.421 133.421c4.686 4.686 12.284 4.686 16.971 0l299.813-299.813c4.686-4.686 4.686-12.284 0-16.971l-28.284-28.284c-4.686-4.686-12.284-4.686-16.97 0z'/%3E%3C/svg%3E");
|
|
812
|
+
}
|
|
813
|
+
.was-validated .form-control:invalid, .form-control.is-invalid {
|
|
814
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23cc334d' viewBox='0 0 384 512'%3E%3Cpath d='M231.6 256l130.1-130.1c4.7-4.7 4.7-12.3 0-17l-22.6-22.6c-4.7-4.7-12.3-4.7-17 0L192 216.4 61.9 86.3c-4.7-4.7-12.3-4.7-17 0l-22.6 22.6c-4.7 4.7-4.7 12.3 0 17L152.4 256 22.3 386.1c-4.7 4.7-4.7 12.3 0 17l22.6 22.6c4.7 4.7 12.3 4.7 17 0L192 295.6l130.1 130.1c4.7 4.7 12.3 4.7 17 0l22.6-22.6c4.7-4.7 4.7-12.3 0-17L231.6 256z'/%3E%3C/svg%3E");
|
|
815
|
+
border-color: var(--bs-color-border-danger);
|
|
816
|
+
}
|
|
817
|
+
.form-control.warning {
|
|
818
|
+
background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M2%2012C2%206.47715%206.47715%202%2012%202C14.6522%202%2017.1957%203.05357%2019.0711%204.92893C20.9464%206.8043%2022%209.34784%2022%2012C22%2017.5228%2017.5228%2022%2012%2022C6.47715%2022%202%2017.5228%202%2012ZM3%2012C3%2016.9706%207.02944%2021%2012%2021C16.9706%2021%2021%2016.9706%2021%2012C21%207.02944%2016.9706%203%2012%203C7.02944%203%203%207.02944%203%2012ZM11.5%2014.2V5.7H12.7V14.2H11.5ZM12.6%2018.3V16.5H11.4V18.3H12.6Z%22/%3E%0A%3C/svg%3E") no-repeat;
|
|
819
|
+
border-color: var(--bs-color-border-warning);
|
|
820
|
+
}
|
|
821
|
+
.form-control.is-valid ~ .warning-feedback {
|
|
822
|
+
display: block;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
.form-control-sm {
|
|
826
|
+
--bs-form-control-spacing: var(--bs-spacing-xxs) var(--bs-spacing-3xs);
|
|
827
|
+
--bs-form-control-font-size: var(--bs-label-font-size);
|
|
828
|
+
}
|
|
829
|
+
.form-control-sm::file-selector-button {
|
|
830
|
+
padding: 0.25rem 0.5rem;
|
|
831
|
+
margin: -0.25rem -0.5rem;
|
|
832
|
+
margin-inline-end: 0.5rem;
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
.form-control-lg {
|
|
836
|
+
--bs-form-control-font-size: var(--bs-lead-font-size);
|
|
837
|
+
}
|
|
838
|
+
.form-control-lg::file-selector-button {
|
|
839
|
+
padding: 0.5rem 1rem;
|
|
840
|
+
margin: -0.5rem -1rem;
|
|
841
|
+
margin-inline-end: 1rem;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
textarea.form-control {
|
|
845
|
+
min-height: 2.5rem;
|
|
846
|
+
border: 1px solid hsl(210, 17%, 44%);
|
|
847
|
+
}
|
|
848
|
+
textarea.form-control-sm {
|
|
849
|
+
min-height: calc(1.5em + 0.5rem);
|
|
850
|
+
}
|
|
851
|
+
textarea.form-control-lg {
|
|
852
|
+
min-height: calc(1.5em + 1rem);
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
.form-control-color {
|
|
856
|
+
width: 3rem;
|
|
857
|
+
height: 2.5rem;
|
|
858
|
+
padding: 0.375rem;
|
|
859
|
+
}
|
|
860
|
+
.form-control-color:not(:disabled):not([readonly]) {
|
|
861
|
+
cursor: pointer;
|
|
862
|
+
}
|
|
863
|
+
.form-control-color::-moz-color-swatch {
|
|
864
|
+
border: 0 !important;
|
|
865
|
+
border-radius: 0;
|
|
866
|
+
}
|
|
867
|
+
.form-control-color::-webkit-color-swatch {
|
|
868
|
+
border-radius: 0;
|
|
869
|
+
}
|
|
870
|
+
.form-control-color.form-control-sm {
|
|
871
|
+
height: calc(1.5em + 0.5rem);
|
|
872
|
+
}
|
|
873
|
+
.form-control-color.form-control-lg {
|
|
874
|
+
height: calc(1.5em + 1rem);
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
.form-check-reverse {
|
|
878
|
+
padding-right: 1.5em;
|
|
879
|
+
padding-left: 0;
|
|
880
|
+
text-align: right;
|
|
881
|
+
}
|
|
882
|
+
.form-check-reverse .form-check-input {
|
|
883
|
+
float: right;
|
|
884
|
+
margin-right: -1.5em;
|
|
885
|
+
margin-left: 0;
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
.form-check-input {
|
|
889
|
+
width: 1em;
|
|
890
|
+
height: 1em;
|
|
891
|
+
margin-top: 0.25em;
|
|
892
|
+
vertical-align: top;
|
|
893
|
+
background-color: hsl(0, 0%, 100%);
|
|
894
|
+
background-repeat: no-repeat;
|
|
895
|
+
background-position: center;
|
|
896
|
+
background-size: contain;
|
|
897
|
+
border: 1px solid rgba(0, 0, 0, 0.25);
|
|
898
|
+
appearance: none;
|
|
899
|
+
print-color-adjust: exact;
|
|
900
|
+
}
|
|
901
|
+
.form-check-input[type=checkbox] {
|
|
902
|
+
border-radius: 0.25em;
|
|
903
|
+
}
|
|
904
|
+
.form-check-input[type=radio] {
|
|
905
|
+
border-radius: 50%;
|
|
906
|
+
}
|
|
907
|
+
.form-check-input:active {
|
|
908
|
+
filter: brightness(90%);
|
|
909
|
+
}
|
|
910
|
+
.form-check-input:focus {
|
|
911
|
+
border-color: hsl(210, 17%, 44%);
|
|
912
|
+
outline: 0;
|
|
913
|
+
box-shadow: 0 0 0 0.25rem rgba(0, 102, 204, 0.25);
|
|
914
|
+
}
|
|
915
|
+
.form-check-input:checked {
|
|
916
|
+
background-color: hsl(210, 100%, 40%);
|
|
917
|
+
border-color: hsl(210, 100%, 40%);
|
|
918
|
+
}
|
|
919
|
+
.form-check-input:checked[type=checkbox] {
|
|
920
|
+
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='hsl%280, 0%, 100%%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
|
|
921
|
+
}
|
|
922
|
+
.form-check-input:checked[type=radio] {
|
|
923
|
+
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='hsl%280, 0%, 100%%29'/%3e%3c/svg%3e");
|
|
924
|
+
}
|
|
925
|
+
.form-check-input[type=checkbox]:indeterminate {
|
|
926
|
+
background-color: hsl(210, 100%, 40%);
|
|
927
|
+
border-color: hsl(210, 100%, 40%);
|
|
928
|
+
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='hsl%280, 0%, 100%%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e");
|
|
929
|
+
}
|
|
930
|
+
.form-check-input:disabled {
|
|
931
|
+
pointer-events: none;
|
|
932
|
+
filter: none;
|
|
933
|
+
opacity: 0.5;
|
|
934
|
+
}
|
|
935
|
+
.form-check-input[disabled] ~ .form-check-label, .form-check-input:disabled ~ .form-check-label {
|
|
936
|
+
cursor: default;
|
|
937
|
+
opacity: 0.5;
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
.form-switch {
|
|
941
|
+
padding-left: 2.5em;
|
|
942
|
+
}
|
|
943
|
+
.form-switch .form-check-input {
|
|
944
|
+
width: 2em;
|
|
945
|
+
margin-left: -2.5em;
|
|
946
|
+
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e");
|
|
947
|
+
background-position: left center;
|
|
948
|
+
border-radius: 2em;
|
|
949
|
+
transition: background-position 0.15s ease-in-out;
|
|
950
|
+
}
|
|
951
|
+
@media (prefers-reduced-motion: reduce) {
|
|
952
|
+
.form-switch .form-check-input {
|
|
953
|
+
transition: none;
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
.form-switch .form-check-input:focus {
|
|
957
|
+
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='hsl%28210, 17%, 44%%29'/%3e%3c/svg%3e");
|
|
958
|
+
}
|
|
959
|
+
.form-switch .form-check-input:checked {
|
|
960
|
+
background-position: right center;
|
|
961
|
+
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='hsl%280, 0%, 100%%29'/%3e%3c/svg%3e");
|
|
962
|
+
}
|
|
963
|
+
.form-switch.form-check-reverse {
|
|
964
|
+
padding-right: 2.5em;
|
|
965
|
+
padding-left: 0;
|
|
966
|
+
}
|
|
967
|
+
.form-switch.form-check-reverse .form-check-input {
|
|
968
|
+
margin-right: -2.5em;
|
|
969
|
+
margin-left: 0;
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
.form-check-inline {
|
|
973
|
+
display: inline-block;
|
|
974
|
+
margin-right: 1rem;
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
.btn-check {
|
|
978
|
+
position: absolute;
|
|
979
|
+
clip: rect(0, 0, 0, 0);
|
|
980
|
+
pointer-events: none;
|
|
981
|
+
}
|
|
982
|
+
.btn-check[disabled] + .btn, .btn-check:disabled + .btn {
|
|
983
|
+
pointer-events: none;
|
|
984
|
+
filter: none;
|
|
985
|
+
opacity: 0.65;
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
.form-feedback {
|
|
989
|
+
width: 100%;
|
|
990
|
+
margin-top: 0.25rem;
|
|
991
|
+
font-size: 0.75rem;
|
|
992
|
+
}
|
|
993
|
+
.form-feedback.just-validate-error-label {
|
|
994
|
+
color: var(--bs-color-text-danger);
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
.input-group-text:has(~ [data-focus-mouse=true]:not(.btn)),
|
|
998
|
+
[data-focus-mouse=true]:not(.btn) ~ .input-group-text,
|
|
999
|
+
button:has(~ [data-focus-mouse=true]:not(.btn)),
|
|
1000
|
+
[data-focus-mouse=true]:not(.btn) + button {
|
|
1001
|
+
border-color: inherit !important;
|
|
1002
|
+
box-shadow: none !important;
|
|
1003
|
+
outline: none !important;
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
.input-group-text:has(~ .is-invalid),
|
|
1007
|
+
.is-invalid ~ .input-group-text,
|
|
1008
|
+
button:has(~ .is-invalid),
|
|
1009
|
+
.is-invalid + button {
|
|
1010
|
+
border-color: var(--bs-color-border-danger) !important;
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
.sr-only-justvalidate-bi {
|
|
1014
|
+
display: none;
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
.just-validate-success-field {
|
|
1018
|
+
border-color: var(--bs-color-border-success) !important;
|
|
1019
|
+
padding-right: calc(1.5em + 0.75rem) !important;
|
|
1020
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23008055' viewBox='0 0 192 512'%3E%3Cpath d='M435.848 83.466L172.804 346.51l-96.652-96.652c-4.686-4.686-12.284-4.686-16.971 0l-28.284 28.284c-4.686 4.686-4.686 12.284 0 16.971l133.421 133.421c4.686 4.686 12.284 4.686 16.971 0l299.813-299.813c4.686-4.686 4.686-12.284 0-16.971l-28.284-28.284c-4.686-4.686-12.284-4.686-16.97 0z'/%3E%3C/svg%3E");
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
.input-group-text:has(~ .just-validate-success-field),
|
|
1024
|
+
.just-validate-success-field ~ .input-group-text,
|
|
1025
|
+
button:has(~ .just-validate-success-field),
|
|
1026
|
+
.just-validate-success-field + button {
|
|
1027
|
+
border-color: var(--bs-color-border-success);
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
.just-validate-success-field + .input-group-text.align-buttons,
|
|
1031
|
+
.is-invalid + .input-group-text.align-buttons {
|
|
1032
|
+
right: 30px;
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
.is-invalid + .input-group-text.align-buttons {
|
|
1036
|
+
bottom: 22px;
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
.autocomplete__wrapper .form-feedback.just-validate-error-label {
|
|
1040
|
+
position: absolute;
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
textarea.form-control {
|
|
1044
|
+
background-position: top 0.3em right 0.3em !important;
|
|
1045
|
+
background-size: 37px 30% !important;
|
|
1046
|
+
}
|
|
1047
|
+
textarea.is-invalid {
|
|
1048
|
+
border-bottom-style: solid;
|
|
1049
|
+
border-bottom-width: 1px;
|
|
1050
|
+
}
|
|
1051
|
+
textarea.just-validate-success-field {
|
|
1052
|
+
border-bottom-style: solid;
|
|
1053
|
+
border-bottom-width: 1px;
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
input[type=checkbox].is-invalid,
|
|
1057
|
+
input[type=radio].is-invalid {
|
|
1058
|
+
--bs-form-checkbox-border-color: var(--bs-color-border-danger);
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
select.is-invalid {
|
|
1062
|
+
border: 1px solid var(--bs-color-border-danger);
|
|
1063
|
+
}
|
|
1064
|
+
select.just-validate-success-field {
|
|
1065
|
+
border: 1px solid var(--bs-color-border-success);
|
|
1066
|
+
}`;
|
|
1067
|
+
|
|
1068
|
+
let ItCheckbox = class ItCheckbox extends FormControl {
|
|
1069
|
+
constructor() {
|
|
1070
|
+
super(...arguments);
|
|
1071
|
+
this.formControlController = new FormControlController(this, {
|
|
1072
|
+
value: (control) => control.checked ? control.value || 'true' : undefined,
|
|
1073
|
+
setValue: (control, value) => {
|
|
1074
|
+
const checkbox = control;
|
|
1075
|
+
checkbox.checked = Boolean(value);
|
|
1076
|
+
},
|
|
1077
|
+
});
|
|
1078
|
+
/**
|
|
1079
|
+
* The type of input. Works the same as a native `<input>` element, but only a subset of types are supported. Defaults
|
|
1080
|
+
* to `text`.
|
|
1081
|
+
*/
|
|
1082
|
+
this.type = 'checkbox';
|
|
1083
|
+
/** Draws the checkbox in a checked state. */
|
|
1084
|
+
this.checked = false;
|
|
1085
|
+
/** Draws checkboxes inline, side by side. */
|
|
1086
|
+
this.inline = false;
|
|
1087
|
+
/** Draws checkboxes in groups. */
|
|
1088
|
+
this.group = false;
|
|
1089
|
+
/**
|
|
1090
|
+
* Draws the checkbox in an indeterminate state. This is usually applied to checkboxes that represents a "select
|
|
1091
|
+
* all/none" behavior when associated checkboxes have a mix of checked and unchecked states.
|
|
1092
|
+
*/
|
|
1093
|
+
this.indeterminate = false;
|
|
1094
|
+
/** The input's help text. */
|
|
1095
|
+
this.supportText = '';
|
|
1096
|
+
}
|
|
1097
|
+
get label() {
|
|
1098
|
+
if (this.labelElements.length > 0) {
|
|
1099
|
+
return this.labelElements[0].innerText.trim();
|
|
1100
|
+
}
|
|
1101
|
+
return '';
|
|
1102
|
+
}
|
|
1103
|
+
/** Simulates a click on the checkbox. */
|
|
1104
|
+
click() {
|
|
1105
|
+
this.inputElement.click();
|
|
1106
|
+
}
|
|
1107
|
+
connectedCallback() {
|
|
1108
|
+
super.connectedCallback?.();
|
|
1109
|
+
this._handleReady();
|
|
1110
|
+
// 🔍 Verifica se il parent è un it-checkbox-group
|
|
1111
|
+
this.isInGroup = !!this.closest('it-checkbox-group');
|
|
1112
|
+
}
|
|
1113
|
+
updated(changedProperties) {
|
|
1114
|
+
super.updated?.(changedProperties);
|
|
1115
|
+
// logger
|
|
1116
|
+
if (!this.label || this.label?.length === 0) {
|
|
1117
|
+
this.logger.warn(`Label is required to ensure accessibility. Please, define a label for <it-checkbox name="${this.name}" ... /> .`);
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
_handleClick(e) {
|
|
1121
|
+
this.checked = !this.checked;
|
|
1122
|
+
this.indeterminate = false;
|
|
1123
|
+
super._handleClick(e);
|
|
1124
|
+
this._handleChange(e);
|
|
1125
|
+
// ✅ Evento standard per compatibilità
|
|
1126
|
+
this.dispatchEvent(new Event('change', { bubbles: true }));
|
|
1127
|
+
}
|
|
1128
|
+
_renderInput(supportTextId, invalid, validityMessage) {
|
|
1129
|
+
const ariaDescribedBy = this.composeClass(this.supportText?.length > 0 ? supportTextId : '', this._ariaAttributes['aria-describedby']?.length > 0 ? this._ariaAttributes['aria-describedby'] : '', validityMessage?.length > 0 ? `invalid-feedback-${this._id}` : '');
|
|
1130
|
+
const inputClasses = this.composeClass('it-form__control', invalid ? 'is-invalid' : '', !invalid && this._touched ? 'just-validate-success-field' : '', this.indeterminate ? 'semi-checked' : '');
|
|
1131
|
+
const inputIsRequired = this.required && !this.isInGroup; // Disabilita il 'required' nativo se siamo in un gruppo
|
|
1132
|
+
const inputRender = html `
|
|
1133
|
+
<input
|
|
1134
|
+
part="checkbox focusable"
|
|
1135
|
+
${setAttributes(this._ariaAttributes)}
|
|
1136
|
+
aria-describedby=${ifDefined(ariaDescribedBy || undefined)}
|
|
1137
|
+
aria-invalid=${ifDefined(invalid ? 'true' : undefined)}
|
|
1138
|
+
@input="${this._handleInput}"
|
|
1139
|
+
@blur=${this._handleBlur}
|
|
1140
|
+
@focus=${this._handleFocus}
|
|
1141
|
+
@click=${this._handleClick}
|
|
1142
|
+
@invalid=${this._handleInvalid}
|
|
1143
|
+
type="${this.type}"
|
|
1144
|
+
id="${this._id}"
|
|
1145
|
+
name="${this.name}"
|
|
1146
|
+
.checked=${live(this.checked)}
|
|
1147
|
+
.indeterminate=${live(this.indeterminate)}
|
|
1148
|
+
.disabled=${this.disabled}
|
|
1149
|
+
.required=${inputIsRequired}
|
|
1150
|
+
?formNoValidate=${this.customValidation}
|
|
1151
|
+
.value="${live(this.value)}"
|
|
1152
|
+
class="${inputClasses}"
|
|
1153
|
+
/>
|
|
1154
|
+
`;
|
|
1155
|
+
return inputRender;
|
|
1156
|
+
}
|
|
1157
|
+
// Render the UI as a function of component state
|
|
1158
|
+
render() {
|
|
1159
|
+
const supportTextId = `${this._id}-support-text`;
|
|
1160
|
+
const supportTextRender = html ` ${when(this.supportText, () => html ` <small class="form-text" id="${supportTextId}">${this.supportText}</small> `)}`;
|
|
1161
|
+
const showValidation = this.formControlController.submittedOnce || this.customValidation; // true; // this._touched || this.customValidation ;
|
|
1162
|
+
const validityMessage = (showValidation ? (this.validationMessage ?? '') : '') ?? '';
|
|
1163
|
+
const invalid = validityMessage?.length > 0 || (!this.customValidation && this.inputElement?.checkValidity() === false);
|
|
1164
|
+
const validityMessageRender = html `<div
|
|
1165
|
+
role="alert"
|
|
1166
|
+
id="invalid-feedback-${this._id}"
|
|
1167
|
+
class="invalid-feedback form-feedback form-text form-feedback just-validate-error-label"
|
|
1168
|
+
?hidden=${!(validityMessage?.length > 0)}
|
|
1169
|
+
>
|
|
1170
|
+
<span class="visually-hidden"><slot name="label"></slot>: </span>${validityMessage}
|
|
1171
|
+
</div>`;
|
|
1172
|
+
const wrapperClasses = this.composeClass('form-check', this.inline ? 'form-check-inline' : '', this.group ? 'form-check-group' : '');
|
|
1173
|
+
const labelClasses = this.composeClass(this.disabled ? 'disabled' : '');
|
|
1174
|
+
return html `
|
|
1175
|
+
<div class="${wrapperClasses}" part="input-wrapper">
|
|
1176
|
+
${this._renderInput(supportTextId, invalid, validityMessage)}
|
|
1177
|
+
<label for="${ifDefined(this._id || undefined)}" part="label" class="${labelClasses}"
|
|
1178
|
+
><slot name="label"></slot
|
|
1179
|
+
></label>
|
|
1180
|
+
${validityMessageRender} ${supportTextRender}
|
|
1181
|
+
</div>
|
|
1182
|
+
`;
|
|
1183
|
+
}
|
|
1184
|
+
};
|
|
1185
|
+
ItCheckbox.styles = styles;
|
|
1186
|
+
__decorate([
|
|
1187
|
+
property({ type: Boolean, reflect: true }),
|
|
1188
|
+
__metadata("design:type", Object)
|
|
1189
|
+
], ItCheckbox.prototype, "checked", void 0);
|
|
1190
|
+
__decorate([
|
|
1191
|
+
property({ type: Boolean, reflect: true }),
|
|
1192
|
+
__metadata("design:type", Object)
|
|
1193
|
+
], ItCheckbox.prototype, "inline", void 0);
|
|
1194
|
+
__decorate([
|
|
1195
|
+
property({ type: Boolean, reflect: true }),
|
|
1196
|
+
__metadata("design:type", Object)
|
|
1197
|
+
], ItCheckbox.prototype, "group", void 0);
|
|
1198
|
+
__decorate([
|
|
1199
|
+
property({ type: Boolean, reflect: true }),
|
|
1200
|
+
__metadata("design:type", Object)
|
|
1201
|
+
], ItCheckbox.prototype, "indeterminate", void 0);
|
|
1202
|
+
__decorate([
|
|
1203
|
+
queryAssignedElements({ slot: 'label' }),
|
|
1204
|
+
__metadata("design:type", Array)
|
|
1205
|
+
], ItCheckbox.prototype, "labelElements", void 0);
|
|
1206
|
+
__decorate([
|
|
1207
|
+
property({ type: String, attribute: 'support-text' }),
|
|
1208
|
+
__metadata("design:type", Object)
|
|
1209
|
+
], ItCheckbox.prototype, "supportText", void 0);
|
|
1210
|
+
ItCheckbox = __decorate([
|
|
1211
|
+
customElement('it-checkbox')
|
|
1212
|
+
], ItCheckbox);
|
|
1213
|
+
|
|
1214
|
+
export { ItCheckbox };
|
|
1215
|
+
//# sourceMappingURL=it-checkbox.js.map
|