@italia/upload 1.0.0-alpha.10

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.
@@ -0,0 +1,2614 @@
1
+ import { r as registerTranslation, t as translation, a as translation$1, _ as __decorate, b as __metadata, F as FormControl, c as FormControlController } from '../en-C97ZNr-2.js';
2
+ import { css, html, nothing } from 'lit';
3
+ import { query, queryAssignedElements, property, state, customElement } from 'lit/decorators.js';
4
+ import { ifDefined } from 'lit/directives/if-defined.js';
5
+ import { when } from 'lit/directives/when.js';
6
+ import { f as formatSize } from '../utils-xlxkOHqp.js';
7
+ import 'lit/directive.js';
8
+
9
+ var styles = css`@charset "UTF-8";
10
+ /***************************** 1 ****************************************/
11
+ /***************************** 2 ****************************************/
12
+ /***************************** 1 ****************************************/
13
+ /***************************** 2 ****************************************/
14
+ /***************************** 1 ****************************************/
15
+ /***************************** 2 ****************************************/
16
+ /***************************** 3 ****************************************/
17
+ /***************************** 1 ****************************************/
18
+ /***************************** 2 ****************************************/
19
+ /***************************** 3 ****************************************/
20
+ /***************************** NEUTRAL 1 ****************************************/
21
+ /***************************** NEUTRAL 2 ****************************************/
22
+ /***************************** NEUTRAL 2 / 3 ****************************************/
23
+ .form-check [type=checkbox]:focus + label,
24
+ .form-check [type=radio]:focus + label {
25
+ border-color: hsl(0, 0%, 0%) !important;
26
+ box-shadow: 0 0 0 2px var(--bsi-color-border-inverse), 0 0 0 5px var(--bsi-color-outline-focus) !important;
27
+ outline: 3px solid transparent !important;
28
+ outline-offset: 3px !important;
29
+ }
30
+
31
+ .form-check [type=checkbox]:focus[data-focus-mouse=true] + label,
32
+ .form-check [type=radio]:focus[data-focus-mouse=true] + label {
33
+ border-color: inherit !important;
34
+ box-shadow: none !important;
35
+ outline: none !important;
36
+ }
37
+
38
+ *,
39
+ *::before,
40
+ *::after {
41
+ box-sizing: border-box;
42
+ }
43
+
44
+ @media (prefers-reduced-motion: no-preference) {
45
+ :root {
46
+ scroll-behavior: smooth;
47
+ }
48
+ }
49
+
50
+ body {
51
+ margin: 0;
52
+ -webkit-text-size-adjust: 100%;
53
+ -webkit-tap-highlight-color: hsla(0, 0%, 0%, 0);
54
+ }
55
+
56
+ hr {
57
+ margin: 1rem 0;
58
+ color: inherit;
59
+ border: 0;
60
+ border-top: 1px solid;
61
+ opacity: 0.25;
62
+ }
63
+
64
+ p {
65
+ margin-top: 0;
66
+ margin-bottom: var(--bsi-paragraph-spacing);
67
+ }
68
+
69
+ abbr[title] {
70
+ text-decoration: underline dotted;
71
+ cursor: help;
72
+ text-decoration-skip-ink: none;
73
+ }
74
+
75
+ address {
76
+ margin-bottom: var(--bsi-spacing-s);
77
+ font-style: normal;
78
+ line-height: inherit;
79
+ }
80
+
81
+ ol,
82
+ ul {
83
+ padding-left: var(--bsi-spacing-l);
84
+ }
85
+
86
+ ol,
87
+ ul,
88
+ dl {
89
+ margin-top: 0;
90
+ margin-bottom: var(--bsi-spacing-s);
91
+ }
92
+
93
+ ol ol,
94
+ ul ul,
95
+ ol ul,
96
+ ul ol {
97
+ margin-bottom: 0;
98
+ }
99
+
100
+ dt {
101
+ font-weight: var(--bsi-font-weight-strong);
102
+ }
103
+
104
+ dd {
105
+ margin-bottom: var(--bsi-spacing-xxs);
106
+ margin-left: 0;
107
+ }
108
+
109
+ blockquote {
110
+ margin: 0 0 var(--bsi-spacing-s);
111
+ }
112
+
113
+ sub,
114
+ sup {
115
+ position: relative;
116
+ font-size: var(--bsi-font-size-1);
117
+ line-height: 0;
118
+ vertical-align: baseline;
119
+ }
120
+
121
+ sub {
122
+ bottom: -0.25em;
123
+ }
124
+
125
+ sup {
126
+ top: -0.5em;
127
+ }
128
+
129
+ a {
130
+ color: var(--bsi-color-link);
131
+ text-decoration: underline;
132
+ text-decoration-skip-ink: auto;
133
+ text-underline-offset: 2px;
134
+ }
135
+ a:hover {
136
+ color: var(--bsi-color-link-hover);
137
+ cursor: pointer;
138
+ }
139
+
140
+ pre,
141
+ code,
142
+ kbd,
143
+ samp {
144
+ font-size: 1em;
145
+ }
146
+
147
+ pre {
148
+ display: block;
149
+ margin-top: 0;
150
+ margin-bottom: var(--bsi-paragraph-spacing);
151
+ overflow: auto;
152
+ }
153
+ pre code {
154
+ word-break: normal;
155
+ }
156
+
157
+ a > code {
158
+ color: inherit;
159
+ }
160
+
161
+ figure {
162
+ margin: 0 0 1rem;
163
+ }
164
+
165
+ img,
166
+ svg {
167
+ vertical-align: middle;
168
+ }
169
+
170
+ table {
171
+ caption-side: bottom;
172
+ border-collapse: collapse;
173
+ }
174
+
175
+ caption {
176
+ padding-top: 0.5rem;
177
+ padding-bottom: 0.5rem;
178
+ color: hsl(210, 17%, 44%);
179
+ text-align: left;
180
+ }
181
+
182
+ th {
183
+ text-align: inherit;
184
+ text-align: -webkit-match-parent;
185
+ }
186
+
187
+ thead,
188
+ tbody,
189
+ tfoot,
190
+ tr,
191
+ td,
192
+ th {
193
+ border-color: inherit;
194
+ border-style: solid;
195
+ border-width: 0;
196
+ }
197
+
198
+ label {
199
+ display: inline-block;
200
+ }
201
+
202
+ button {
203
+ border-radius: 0;
204
+ }
205
+
206
+ button:focus:not(:focus-visible) {
207
+ outline: 0;
208
+ }
209
+
210
+ input,
211
+ button,
212
+ select,
213
+ optgroup,
214
+ textarea {
215
+ margin: 0;
216
+ font-family: inherit;
217
+ font-size: inherit;
218
+ line-height: inherit;
219
+ }
220
+
221
+ button,
222
+ select {
223
+ text-transform: none;
224
+ }
225
+
226
+ [role=button] {
227
+ cursor: pointer;
228
+ }
229
+
230
+ select {
231
+ word-wrap: normal;
232
+ }
233
+ select:disabled {
234
+ opacity: 1;
235
+ }
236
+
237
+ [list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator {
238
+ display: none !important;
239
+ }
240
+
241
+ button,
242
+ [type=button],
243
+ [type=reset],
244
+ [type=submit] {
245
+ -webkit-appearance: button;
246
+ }
247
+ button:not(:disabled),
248
+ [type=button]:not(:disabled),
249
+ [type=reset]:not(:disabled),
250
+ [type=submit]:not(:disabled) {
251
+ cursor: pointer;
252
+ }
253
+
254
+ ::-moz-focus-inner {
255
+ padding: 0;
256
+ border-style: none;
257
+ }
258
+
259
+ textarea {
260
+ resize: vertical;
261
+ }
262
+
263
+ fieldset {
264
+ min-width: 0;
265
+ padding: 0;
266
+ margin: 0;
267
+ border: 0;
268
+ }
269
+
270
+ ::-webkit-datetime-edit-fields-wrapper,
271
+ ::-webkit-datetime-edit-text,
272
+ ::-webkit-datetime-edit-minute,
273
+ ::-webkit-datetime-edit-hour-field,
274
+ ::-webkit-datetime-edit-day-field,
275
+ ::-webkit-datetime-edit-month-field,
276
+ ::-webkit-datetime-edit-year-field {
277
+ padding: 0;
278
+ }
279
+
280
+ ::-webkit-inner-spin-button {
281
+ height: auto;
282
+ }
283
+
284
+ [type=search] {
285
+ outline-offset: -2px;
286
+ -webkit-appearance: textfield;
287
+ }
288
+
289
+ /* rtl:raw:
290
+ [type="tel"],
291
+ [type="url"],
292
+ [type="email"],
293
+ [type="number"] {
294
+ direction: ltr;
295
+ }
296
+ */
297
+ ::-webkit-search-decoration {
298
+ -webkit-appearance: none;
299
+ }
300
+
301
+ ::-webkit-color-swatch-wrapper {
302
+ padding: 0;
303
+ }
304
+
305
+ ::file-selector-button {
306
+ font: inherit;
307
+ -webkit-appearance: button;
308
+ }
309
+
310
+ output {
311
+ display: inline-block;
312
+ }
313
+
314
+ iframe {
315
+ border: 0;
316
+ }
317
+
318
+ summary {
319
+ display: list-item;
320
+ cursor: pointer;
321
+ }
322
+
323
+ progress {
324
+ vertical-align: baseline;
325
+ }
326
+
327
+ [hidden] {
328
+ display: none !important;
329
+ }
330
+
331
+ .visually-hidden,
332
+ .visually-hidden-focusable:not(:focus):not(:focus-within) {
333
+ position: absolute !important;
334
+ width: 1px !important;
335
+ height: 1px !important;
336
+ padding: 0 !important;
337
+ margin: -1px !important;
338
+ overflow: hidden !important;
339
+ clip: rect(0, 0, 0, 0) !important;
340
+ white-space: nowrap !important;
341
+ border: 0 !important;
342
+ }
343
+
344
+ .btn {
345
+ --bsi-btn-background: transparent;
346
+ --bsi-btn-border-color: transparent;
347
+ --bsi-btn-border-radius: var(--bsi-radius-smooth);
348
+ --bsi-btn-border-size: 0;
349
+ --bsi-btn-disabled-opacity: 0.5;
350
+ --bsi-btn-font-family: var(--bsi-font-sans);
351
+ --bsi-btn-font-size: var(--bsi-label-font-size);
352
+ --bsi-btn-font-weight: var(--bsi-font-weight-solid);
353
+ --bsi-btn-line-height: var(--bsi-font-leading-3);
354
+ --bsi-btn-outline-border-color: transparent;
355
+ --bsi-btn-outline-border-size: 2px;
356
+ --bsi-btn-padding-x: var(--bsi-spacing-s);
357
+ --bsi-btn-padding-y: var(--bsi-spacing-xs);
358
+ --bsi-btn-text-color: var(--bsi-color-text-primary);
359
+ }
360
+
361
+ /* stylelint-disable-next-line no-duplicate-selectors */
362
+ .btn {
363
+ display: inline-block;
364
+ padding: var(--bsi-btn-padding-y) var(--bsi-btn-padding-x);
365
+ border: var(--bsi-btn-border-width) solid var(--bsi-btn-border-color);
366
+ border-radius: var(--bsi-btn-border-radius);
367
+ background: var(--bsi-btn-background);
368
+ box-shadow: var(--bsi-btn-box-shadow, none);
369
+ color: var(--bsi-btn-text-color);
370
+ font-family: var(--bsi-btn-font-family);
371
+ font-size: var(--bsi-btn-font-size);
372
+ font-weight: var(--bsi-btn-font-weight);
373
+ line-height: var(--bsi-btn-line-height);
374
+ text-align: center;
375
+ text-decoration: none;
376
+ vertical-align: middle;
377
+ white-space: initial;
378
+ width: auto;
379
+ transition: all var(--bsi-transition-instant) ease-in-out;
380
+ user-select: none;
381
+ }
382
+ .btn:hover {
383
+ color: var(--bsi-btn-text-color);
384
+ }
385
+ .btn:disabled, .btn.disabled {
386
+ opacity: var(--bsi-btn-disabled-opacity);
387
+ cursor: not-allowed;
388
+ pointer-events: none;
389
+ }
390
+ .btn:focus-visible {
391
+ border-color: var(--bsi-btn-hover-border-color);
392
+ outline: 0;
393
+ }
394
+ .btn-check:focus-visible + .btn {
395
+ border-color: var(--bsi-btn-hover-border-color);
396
+ outline: 0;
397
+ }
398
+
399
+ .btn-link {
400
+ --bsi-btn-background: transparent;
401
+ --bsi-btn-border-color: transparent;
402
+ text-decoration: underline;
403
+ }
404
+ .btn-link:hover {
405
+ color: var(--bsi-color-link-hover);
406
+ }
407
+
408
+ .btn-xs {
409
+ --bsi-btn-padding-x: var(--bsi-spacing-xs);
410
+ --bsi-btn-padding-y: var(--bsi-spacing-xs);
411
+ --bsi-btn-font-size: var(--bsi-label-font-size-s);
412
+ --bsi-btn-line-height: var(--bsi-font-leading-1);
413
+ --bsi-rounded-icon-size: 20px;
414
+ }
415
+
416
+ .btn-lg {
417
+ --bsi-btn-padding-x: var(--bsi-spacing-m);
418
+ --bsi-btn-padding-y: var(--bsi-spacing-s);
419
+ --bsi-btn-font-size: var(--bsi-label-font-size-l);
420
+ --bsi-btn-line-height: var(--bsi-font-leading-5);
421
+ }
422
+
423
+ .btn-progress {
424
+ position: relative;
425
+ }
426
+
427
+ .btn-icon {
428
+ display: inline-flex;
429
+ flex-direction: row;
430
+ align-items: center;
431
+ justify-content: center;
432
+ gap: var(--bsi-icon-spacing);
433
+ }
434
+
435
+ .btn-full {
436
+ align-self: stretch;
437
+ width: inherit;
438
+ border: none;
439
+ box-shadow: none;
440
+ }
441
+ @media (min-width: 992px) {
442
+ .btn-full {
443
+ display: flex;
444
+ flex: 1;
445
+ flex-direction: row;
446
+ align-items: center;
447
+ justify-content: center;
448
+ margin: 0;
449
+ }
450
+ }
451
+
452
+ .btn:disabled:hover,
453
+ .btn.disabled:hover {
454
+ cursor: not-allowed;
455
+ }
456
+
457
+ .btn-primary,
458
+ a.btn-primary {
459
+ --bsi-btn-text-color: var(--bsi-color-text-inverse);
460
+ --bsi-btn-background: var(--bsi-color-background-primary);
461
+ }
462
+ .btn-primary:hover,
463
+ a.btn-primary:hover {
464
+ --bsi-btn-background: var(--bsi-color-background-primary-hover);
465
+ }
466
+ .btn-primary:active,
467
+ a.btn-primary:active {
468
+ --bsi-btn-background: var(--bsi-color-background-primary-active);
469
+ }
470
+ .btn-primary.btn-progress,
471
+ a.btn-primary.btn-progress {
472
+ border-color: hsl(210, 76%, 67%);
473
+ opacity: 1;
474
+ background-color: hsl(210, 76%, 67%);
475
+ }
476
+
477
+ .btn-secondary,
478
+ a.btn-secondary {
479
+ --bsi-btn-text-color: var(--bsi-color-text-inverse);
480
+ --bsi-btn-background: var(--bsi-color-background-secondary);
481
+ }
482
+ .btn-secondary:hover,
483
+ a.btn-secondary:hover {
484
+ --bsi-btn-background: var(--bsi-color-background-secondary-hover);
485
+ }
486
+ .btn-secondary:active,
487
+ a.btn-secondary:active {
488
+ --bsi-btn-background: var(--bsi-color-background-secondary-active);
489
+ }
490
+ .btn-secondary:disabled.btn-progress, .btn-secondary.disabled.btn-progress,
491
+ a.btn-secondary:disabled.btn-progress,
492
+ a.btn-secondary.disabled.btn-progress {
493
+ border-color: hsl(210, 12%, 52%);
494
+ opacity: 1;
495
+ background-color: hsl(210, 12%, 52%);
496
+ }
497
+
498
+ .btn-success,
499
+ a.btn-success {
500
+ --bsi-btn-text-color: var(--bsi-color-text-inverse);
501
+ --bsi-btn-background: var(--bsi-color-background-success);
502
+ }
503
+ .btn-success:hover,
504
+ a.btn-success:hover {
505
+ --bsi-btn-background: var(--bsi-color-background-success-hover);
506
+ }
507
+ .btn-success:active,
508
+ a.btn-success:active {
509
+ --bsi-btn-background: var(--bsi-color-background-success-active);
510
+ }
511
+
512
+ .btn-warning,
513
+ a.btn-warning {
514
+ --bsi-btn-text-color: var(--bsi-color-text-inverse);
515
+ --bsi-btn-background: var(--bsi-color-background-warning);
516
+ }
517
+ .btn-warning:hover,
518
+ a.btn-warning:hover {
519
+ --bsi-btn-background: var(--bsi-color-background-warning-hover);
520
+ }
521
+ .btn-warning:active,
522
+ a.btn-warning:active {
523
+ --bsi-btn-background: var(--bsi-color-background-warning-active);
524
+ }
525
+
526
+ .btn-danger,
527
+ a.btn-danger {
528
+ --bsi-btn-text-color: var(--bsi-color-text-inverse);
529
+ --bsi-btn-background: var(--bsi-color-background-danger);
530
+ }
531
+ .btn-danger:hover,
532
+ a.btn-danger:hover {
533
+ --bsi-btn-background: var(--bsi-color-background-danger-hover);
534
+ }
535
+ .btn-danger:active,
536
+ a.btn-danger:active {
537
+ --bsi-btn-background: var(--bsi-color-background-danger-active);
538
+ }
539
+
540
+ .btn[class*=btn-outline-] {
541
+ --bsi-btn-box-shadow: inset 0 0 0 var(--bsi-btn-outline-border-size) var(--bsi-btn-outline-border-color);
542
+ }
543
+
544
+ .btn-outline-primary,
545
+ a.btn-outline-primary {
546
+ --bsi-btn-outline-border-color: var(--bsi-color-border-primary);
547
+ --bsi-btn-text-color: var(--bsi-color-text-primary);
548
+ }
549
+ .btn-outline-primary:hover,
550
+ a.btn-outline-primary:hover {
551
+ --bsi-btn-outline-border-color: color-mix(in srgb, var(--bsi-color-border-primary-hover) 70%, black);
552
+ --bsi-btn-text-color: var(--bsi-color-link-hover);
553
+ }
554
+ .btn-outline-primary:active,
555
+ a.btn-outline-primary:active {
556
+ --bsi-btn-outline-border-color: var(--bsi-color-border-primary-active);
557
+ --bsi-btn-text-color: var(--bsi-color-link-active);
558
+ }
559
+ .btn-outline-secondary,
560
+ a.btn-outline-secondary {
561
+ --bsi-btn-outline-border-color: var(--bsi-color-border-secondary);
562
+ --bsi-btn-text-color: var(--bsi-color-text-secondary);
563
+ }
564
+ .btn-outline-secondary:hover,
565
+ a.btn-outline-secondary:hover {
566
+ --bsi-btn-outline-border-color: var(--bsi-color-border-secondary-hover);
567
+ --bsi-btn-text-color: var(--bsi-color-link-secondary-hover);
568
+ }
569
+ .btn-outline-secondary:active,
570
+ a.btn-outline-secondary:active {
571
+ --bsi-btn-outline-border-color: var(--bsi-color-border-secondary-active);
572
+ --bsi-btn-text-color: var(--bsi-color-link-secondary-active);
573
+ }
574
+ .btn-outline-success,
575
+ a.btn-outline-success {
576
+ --bsi-btn-outline-border-color: var(--bsi-color-border-success);
577
+ --bsi-btn-text-color: var(--bsi-color-text-success);
578
+ }
579
+ .btn-outline-success:hover,
580
+ a.btn-outline-success:hover {
581
+ /* aumenta contrasto scurendo il bordo rispetto al token base */
582
+ --bsi-btn-outline-border-color: color-mix(in srgb, var(--bsi-color-border-success-hover) 70%, black);
583
+ --bsi-btn-text-color: var(--bsi-color-text-success-hover);
584
+ }
585
+ .btn-outline-success:active,
586
+ a.btn-outline-success:active {
587
+ --bsi-btn-outline-border-color: var(--bsi-color-border-success-active);
588
+ --bsi-btn-text-color: var(--bsi-color-text-success-active);
589
+ }
590
+ .btn-outline-warning,
591
+ a.btn-outline-warning {
592
+ --bsi-btn-outline-border-color: var(--bsi-color-border-warning);
593
+ --bsi-btn-text-color: var(--bsi-color-text-warning);
594
+ }
595
+ .btn-outline-warning:hover,
596
+ a.btn-outline-warning:hover {
597
+ --bsi-btn-outline-border-color: color-mix(in srgb, var(--bsi-color-border-warning-hover) 70%, black);
598
+ --bsi-btn-text-color: var(--bsi-color-text-warning-hover);
599
+ }
600
+ .btn-outline-warning:active,
601
+ a.btn-outline-warning:active {
602
+ --bsi-btn-outline-border-color: var(--bsi-color-border-warning-active);
603
+ --bsi-btn-text-color: var(--bsi-color-text-warning-active);
604
+ }
605
+ .btn-outline-danger,
606
+ a.btn-outline-danger {
607
+ --bsi-btn-outline-border-color: var(--bsi-color-border-danger);
608
+ --bsi-btn-text-color: var(--bsi-color-text-danger);
609
+ }
610
+ .btn-outline-danger:hover,
611
+ a.btn-outline-danger:hover {
612
+ --bsi-btn-outline-border-color: color-mix(in srgb, var(--bsi-color-border-danger-hover) 70%, black);
613
+ --bsi-btn-text-color: var(--bsi-color-text-danger-hover);
614
+ }
615
+ .btn-outline-danger:active,
616
+ a.btn-outline-danger:active {
617
+ --bsi-btn-outline-border-color: var(--bsi-color-border-danger-active);
618
+ --bsi-btn-text-color: var(--bsi-color-text-danger-active);
619
+ }
620
+
621
+ .bg-dark .btn-link {
622
+ --bsi-btn-text-color: var(--bsi-color-text-inverse);
623
+ }
624
+ .bg-dark a.btn-primary,
625
+ .bg-dark .btn-primary {
626
+ --bsi-btn-text-color: var(--bsi-color-text-primary);
627
+ --bsi-btn-background: var(--bsi-color-background-inverse);
628
+ }
629
+ .bg-dark a.btn-primary:hover,
630
+ .bg-dark .btn-primary:hover {
631
+ --bsi-btn-background: color-mix(in srgb, var(--bsi-color-background-inverse) 85%, black);
632
+ }
633
+ .bg-dark a.btn-primary:active,
634
+ .bg-dark .btn-primary:active {
635
+ --bsi-btn-background: color-mix(in srgb, var(--bsi-color-background-inverse) 80%, black);
636
+ }
637
+ .bg-dark a.btn-secondary,
638
+ .bg-dark .btn-secondary {
639
+ --bsi-btn-text-color: var(--bsi-color-text-inverse);
640
+ --bsi-btn-background: var(--bsi-color-background-secondary);
641
+ }
642
+ .bg-dark a.btn-secondary:hover, .bg-dark a.btn-secondary:active,
643
+ .bg-dark .btn-secondary:hover,
644
+ .bg-dark .btn-secondary:active {
645
+ --bsi-btn-background: color-mix(in srgb, var(--bsi-color-background-secondary) 85%, black);
646
+ }
647
+ .bg-dark .btn-outline-primary,
648
+ .bg-dark a.btn-outline-primary {
649
+ --bsi-btn-outline-border-color: var(--bsi-color-border-inverse);
650
+ --bsi-btn-text-color: var(--bsi-color-text-inverse);
651
+ }
652
+ .bg-dark .btn-outline-primary:hover,
653
+ .bg-dark a.btn-outline-primary:hover {
654
+ --bsi-btn-boxshadow-color-darken: color-mix(in srgb, var(--bsi-color-border-inverse) 80%, black);
655
+ --bsi-btn-boxshadow-color-desaturated: color-mix(in srgb, var(--bsi-btn-boxshadow-color-darken) 80%, gray);
656
+ --bsi-btn-outline-border-color: var(--bsi-btn-boxshadow-color-desaturated);
657
+ }
658
+ .bg-dark .btn-outline-secondary,
659
+ .bg-dark a.btn-outline-secondary {
660
+ --bsi-btn-text-color: var(--bsi-color-text-inverse);
661
+ }
662
+ .bg-dark .btn-outline-secondary:hover, .bg-dark .btn-outline-secondary:active,
663
+ .bg-dark a.btn-outline-secondary:hover,
664
+ .bg-dark a.btn-outline-secondary:active {
665
+ --bsi-btn-boxshadow-color-darken: color-mix(in srgb, var(--bsi-color-background-secondary) 80%, black);
666
+ --bsi-btn-boxshadow-color-desaturated: color-mix(in srgb, var(--bsi-btn-boxshadow-color-darken) 80%, gray);
667
+ --bsi-btn-outline-border-color: var(--bsi-btn-boxshadow-color-desaturated);
668
+ }
669
+
670
+ .btn-close {
671
+ position: relative;
672
+ box-sizing: content-box;
673
+ width: 2.5rem;
674
+ height: 2.5rem;
675
+ padding: 0;
676
+ border: 0;
677
+ background-color: transparent;
678
+ }
679
+ .btn-close .icon {
680
+ position: absolute;
681
+ top: 50%;
682
+ left: 50%;
683
+ transform: translate(-50%, -50%);
684
+ fill: var(--bsi-icon-secondary);
685
+ }
686
+ .btn-close .icon:hover {
687
+ fill: var(--bsi-icon-default);
688
+ text-decoration: none;
689
+ }
690
+ .btn-close:focus {
691
+ opacity: 1;
692
+ }
693
+ .btn-close:disabled, .btn-close.disabled {
694
+ opacity: var(--bsi-btn-disabled-opacity);
695
+ pointer-events: none;
696
+ user-select: none;
697
+ }
698
+
699
+ .btn-close-white {
700
+ filter: invert(1) grayscale(100%) brightness(200%);
701
+ }
702
+
703
+ :root {
704
+ --bsi-form-control-height: 2.5rem;
705
+ --bsi-form-control-spacing: var(--bsi-spacing-xxs);
706
+ --bsi-form-control-background-color: var(--bsi-color-background-inverse);
707
+ --bsi-form-control-border-color: var(--bsi-color-border-secondary);
708
+ --bsi-form-control-border-radius: var(--bsi-radius-smooth);
709
+ --bsi-form-control-placeholder-color: var(--bsi-color-text-muted);
710
+ --bsi-form-control-label-color: var(--bsi-color-text-base);
711
+ --bsi-form-control-text-color: var(--bsi-color-text-secondary);
712
+ --bsi-form-control-font-size: var(--bsi-body-font-size);
713
+ --bsi-form-group-spacing-y: var(--bsi-spacing-m);
714
+ --bsi-form-checkbox-border-color: var(--bsi-color-border-secondary);
715
+ --bsi-form-checkbox-border-radius: var(--bsi-radius-smooth);
716
+ --bsi-form-checked-color: var(--bsi-color-background-primary);
717
+ }
718
+
719
+ input[readonly],
720
+ textarea[readonly],
721
+ select[readonly] {
722
+ --bsi-form-control-border-color: var(--bsi-color-border-subtle);
723
+ --bsi-form-control-background-color: var(--bsi-color-background-muted);
724
+ cursor: not-allowed;
725
+ }
726
+
727
+ input,
728
+ textarea,
729
+ select {
730
+ display: block;
731
+ width: 100%;
732
+ padding: var(--bsi-form-control-spacing);
733
+ border: 1px solid var(--bsi-form-control-border-color);
734
+ border-radius: var(--bsi-form-control-border-radius);
735
+ background-color: var(--bsi-form-control-background-color);
736
+ color: var(--bsi-form-control-text-color);
737
+ font-size: var(--bsi-form-control-font-size);
738
+ }
739
+ input.disabled, input:disabled,
740
+ textarea.disabled,
741
+ textarea:disabled,
742
+ select.disabled,
743
+ select:disabled {
744
+ border-color: var(--bsi-color-border-disabled);
745
+ opacity: 1;
746
+ background-color: var(--bsi-color-background-disabled);
747
+ color: var(--bsi-color-text-disabled);
748
+ }
749
+
750
+ /* stylelint-disable-next-line no-duplicate-selectors */
751
+ input:focus,
752
+ textarea:focus {
753
+ outline: 3px solid transparent;
754
+ outline-offset: 3px;
755
+ box-shadow: 0 0 0 2px var(--bsi-color-border-inverse), 0 0 0 5px var(--bsi-color-outline-focus) !important;
756
+ }
757
+
758
+ input::file-selector-button {
759
+ margin: -0.375rem -0.75rem;
760
+ padding: 0.375rem 0.75rem;
761
+ border-width: 0;
762
+ border-style: solid;
763
+ border-radius: 0;
764
+ border-color: inherit;
765
+ color: hsl(0, 0%, 10%);
766
+ pointer-events: none;
767
+ margin-inline-end: 0.75rem;
768
+ border-inline-end-width: 0;
769
+ background-color: hsl(0, 0%, 100%);
770
+ 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;
771
+ }
772
+ @media (prefers-reduced-motion: reduce) {
773
+ input::file-selector-button {
774
+ transition: none;
775
+ }
776
+ }
777
+ input:hover:not(:disabled):not([readonly])::file-selector-button {
778
+ background-color: rgb(242.25, 242.25, 242.25);
779
+ }
780
+ input[type=file] {
781
+ overflow: hidden;
782
+ }
783
+ input[type=file]:not(:disabled):not([readonly]) {
784
+ cursor: pointer;
785
+ }
786
+ input::-webkit-date-and-time-value {
787
+ height: 1.5em;
788
+ }
789
+
790
+ select {
791
+ 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");
792
+ background-repeat: no-repeat;
793
+ background-position: right var(--bsi-form-control-spacing) center;
794
+ background-size: 16px 12px;
795
+ appearance: none;
796
+ }
797
+ select:focus {
798
+ border-color: hsl(210, 17%, 44%);
799
+ outline: 0;
800
+ box-shadow: 0 0 0 0.25rem rgba(0, 102, 204, 0.25);
801
+ }
802
+ select[multiple], select[size]:not([size="1"]) {
803
+ padding-right: 0.75rem;
804
+ background-image: none;
805
+ }
806
+ select:disabled {
807
+ background-color: hsl(0, 0%, 90%);
808
+ }
809
+ select:disabled:hover {
810
+ cursor: not-allowed;
811
+ }
812
+ select:-moz-focusring {
813
+ color: transparent;
814
+ text-shadow: 0 0 0 hsl(0, 0%, 10%);
815
+ }
816
+ select option {
817
+ font-weight: normal;
818
+ }
819
+ select {
820
+ /* stylelint-disable-next-line no-duplicate-selectors */ /* TO DO check these styles */
821
+ }
822
+ select:disabled {
823
+ opacity: 1;
824
+ background-color: hsl(210, 3%, 85%);
825
+ }
826
+
827
+ textarea {
828
+ height: auto;
829
+ font-size: var(--bsi-body-font-size);
830
+ line-height: 1.5;
831
+ }
832
+
833
+ label {
834
+ display: inline-block;
835
+ width: auto;
836
+ max-width: 100%;
837
+ margin-bottom: var(--bsi-spacing-xxs);
838
+ color: var(--bsi-form-control-label-color);
839
+ font-size: var(--bsi-label-font-size-s);
840
+ font-weight: var(--bsi-font-weight-solid);
841
+ line-height: var(--bsi-label-leading);
842
+ }
843
+
844
+ /* stylelint-disable-next-line no-duplicate-selectors */
845
+ input,
846
+ textarea {
847
+ outline: 0;
848
+ box-shadow: none;
849
+ transition: none;
850
+ appearance: none;
851
+ }
852
+
853
+ input[type=date],
854
+ input[type=datetime-local],
855
+ input[type=time] {
856
+ display: flex;
857
+ }
858
+
859
+ fieldset legend {
860
+ margin-bottom: var(--bsi-spacing-s);
861
+ padding: 0 var(--bsi-form-input-spacing-x);
862
+ background-color: transparent;
863
+ color: var(--bsi-form-control-text-color);
864
+ font-size: var(--bsi-label-font-size-s);
865
+ font-weight: var(--bsi-font-weight-solid);
866
+ }
867
+
868
+ ::placeholder {
869
+ color: var(--bsi-form-control-placeholder-color);
870
+ }
871
+
872
+ input::-webkit-datetime-edit {
873
+ background-color: var(--bsi-color-background-primary-lighter);
874
+ color: var(--bsi-form-contro-text-color);
875
+ }
876
+
877
+ .form-group {
878
+ position: relative;
879
+ margin-bottom: var(--bsi-form-group-spacing-y);
880
+ }
881
+ .form-group label.input-symbol-label:not(.active) {
882
+ left: 2.25rem;
883
+ }
884
+ .form-group small.form-text {
885
+ margin: 0;
886
+ font-size: 0.875rem;
887
+ }
888
+ .form-group input[type=time] ~ label {
889
+ font-size: 0.875rem;
890
+ }
891
+
892
+ .form-text {
893
+ margin: var(--bsi-spacing-xxs) 0;
894
+ color: var(--bsi-color-text-secondary);
895
+ }
896
+
897
+ .form-group.active .form-file-name {
898
+ padding-bottom: 1.95rem;
899
+ }
900
+
901
+ .warning-feedback {
902
+ display: none;
903
+ width: 100%;
904
+ margin-top: 0.25rem;
905
+ color: var(--bsi-color-text-warning);
906
+ font-size: 0.75rem;
907
+ }
908
+
909
+ .valid-feedback,
910
+ .invalid-feedback,
911
+ .warning-feedback {
912
+ margin-left: 0.5rem;
913
+ }
914
+
915
+ .input-group .input-group-text .btn {
916
+ border-radius: var(--bsi-form-control-border-radius) 0 0 var(--bsi-form-control-border-radius);
917
+ }
918
+ .input-group .input-group-append {
919
+ margin-left: 0;
920
+ }
921
+ .input-group .input-group-append .btn {
922
+ height: 100%;
923
+ padding-top: 0;
924
+ padding-bottom: 0;
925
+ border-bottom: 1px solid hsl(210, 17%, 44%);
926
+ border-radius: 0 var(--bsi-form-control-border-radius) var(--bsi-form-control-border-radius) 0;
927
+ }
928
+
929
+ .form-check {
930
+ position: relative;
931
+ }
932
+ .form-check + .form-check {
933
+ margin-top: var(--bsi-spacing-s);
934
+ }
935
+ .form-check [type=checkbox],
936
+ .form-check [type=radio] {
937
+ position: absolute;
938
+ top: 9px;
939
+ left: 9px;
940
+ width: auto;
941
+ margin-top: 0;
942
+ margin-left: 0;
943
+ opacity: 0;
944
+ }
945
+ .form-check [type=checkbox] + label,
946
+ .form-check [type=radio] + label {
947
+ position: relative;
948
+ margin-bottom: 0;
949
+ padding-left: 28px;
950
+ font-size: var(--bsi-label-font-size);
951
+ font-weight: var(--bsi-font-weight-solid);
952
+ cursor: pointer;
953
+ user-select: none;
954
+ }
955
+ @media (min-width: 576px) {
956
+ .form-check [type=checkbox] + label,
957
+ .form-check [type=radio] + label {
958
+ font-size: var(--bsi-label-font-size-l);
959
+ }
960
+ }
961
+ .form-check input[type=checkbox] + label::after,
962
+ .form-check input[type=checkbox] + label::before {
963
+ position: absolute;
964
+ left: 0;
965
+ z-index: 1;
966
+ content: "";
967
+ border-width: 2px;
968
+ border-style: solid;
969
+ transition: all var(--bsi-transition-instant) ease-out;
970
+ }
971
+ .form-check input[type=checkbox] + label::after {
972
+ top: 0;
973
+ width: 20px;
974
+ height: 20px;
975
+ border-radius: var(--bsi-form-control-border-radius);
976
+ }
977
+ .form-check input[type=checkbox]:checked + label::before {
978
+ top: 3px;
979
+ left: 3px;
980
+ width: 6px;
981
+ height: 12px;
982
+ border-width: 2px;
983
+ border-style: solid;
984
+ border-color: transparent var(--bsi-color-border-inverse) var(--bsi-color-border-inverse) transparent;
985
+ opacity: 1;
986
+ transform: rotate(40deg);
987
+ transform-origin: 100% 100%;
988
+ backface-visibility: hidden;
989
+ }
990
+ .form-check input[type=checkbox]:checked + label::after {
991
+ z-index: 0;
992
+ border-color: var(--bsi-form-checked-color);
993
+ background-color: var(--bsi-form-checked-color);
994
+ }
995
+ .form-check input[type=checkbox]:not(:checked) + label::after {
996
+ z-index: 0;
997
+ border-color: var(--bsi-form-checkbox-border-color);
998
+ background-color: transparent;
999
+ }
1000
+ .form-check input[type=checkbox]:not(:checked) + label::before {
1001
+ top: 10px;
1002
+ left: 6px;
1003
+ width: 0;
1004
+ height: 0;
1005
+ border-color: transparent;
1006
+ }
1007
+ .form-check input[type=checkbox]:disabled + label {
1008
+ opacity: 1;
1009
+ cursor: not-allowed;
1010
+ }
1011
+ .form-check input[type=checkbox]:disabled:not(:checked) + label::after {
1012
+ border-color: var(--bsi-color-border-disabled);
1013
+ background-color: transparent;
1014
+ }
1015
+ .form-check input[type=checkbox]:disabled:checked + label::after {
1016
+ border-color: var(--bsi-color-border-disabled);
1017
+ background-color: var(--bsi-color-border-disabled);
1018
+ }
1019
+ .form-check input[type=radio] + label::after, .form-check input[type=radio] + label::before {
1020
+ position: absolute;
1021
+ top: 0;
1022
+ left: 0;
1023
+ z-index: 0;
1024
+ content: "";
1025
+ width: 20px;
1026
+ height: 20px;
1027
+ border-width: 2px;
1028
+ border-style: solid;
1029
+ border-radius: var(--bsi-radius-rounded);
1030
+ transition: all var(--bsi-transition-instant) ease-out;
1031
+ }
1032
+ .form-check input[type=radio]:not(:checked) + label::after, .form-check input[type=radio]:not(:checked) + label::before {
1033
+ border-color: var(--bsi-form-checkbox-border-color);
1034
+ }
1035
+ .form-check input[type=radio]:not(:checked) + label:after {
1036
+ z-index: -1;
1037
+ transform: scale(0);
1038
+ }
1039
+ .form-check input[type=radio]:checked + label::after {
1040
+ z-index: 0;
1041
+ border-color: var(--bsi-form-checked-color);
1042
+ background-color: var(--bsi-form-checked-color);
1043
+ transform: scale(0.64);
1044
+ }
1045
+ .form-check input[type=radio]:checked + label::before {
1046
+ border-color: var(--bsi-form-checked-color);
1047
+ }
1048
+ .form-check input[type=radio]:disabled + label {
1049
+ cursor: not-allowed;
1050
+ }
1051
+ .form-check input[type=radio]:disabled:not(:checked) + label::after, .form-check input[type=radio]:disabled:not(:checked) + label::before {
1052
+ border-color: var(--bsi-color-border-disabled);
1053
+ }
1054
+ .form-check input[type=radio]:disabled:checked + label::after {
1055
+ border-color: var(--bsi-color-border-disabled);
1056
+ background-color: var(--bsi-color-border-disabled);
1057
+ }
1058
+ .form-check input[type=radio]:disabled:checked + label::before {
1059
+ border-color: var(--bsi-color-border-disabled);
1060
+ }
1061
+ .form-check .form-text {
1062
+ display: block;
1063
+ margin-bottom: 0.5rem;
1064
+ padding-right: 3.25rem;
1065
+ }
1066
+ .form-check.form-check-group {
1067
+ margin-bottom: 1rem;
1068
+ padding: 0 0 1rem 0;
1069
+ box-shadow: inset 0 -1px 0 0 rgba(1, 1, 1, 0.1);
1070
+ }
1071
+ .form-check.form-check-group input[type=checkbox] + label,
1072
+ .form-check.form-check-group input[type=radio] + label {
1073
+ position: static;
1074
+ padding-right: 3.25rem;
1075
+ padding-left: 0;
1076
+ }
1077
+ .form-check.form-check-group input[type=checkbox] + label::after, .form-check.form-check-group input[type=checkbox] + label::before,
1078
+ .form-check.form-check-group input[type=radio] + label::after,
1079
+ .form-check.form-check-group input[type=radio] + label::before {
1080
+ right: 0;
1081
+ left: auto;
1082
+ }
1083
+ .form-check.form-check-group input[type=checkbox]:checked + label::before {
1084
+ right: 11px;
1085
+ }
1086
+ .form-check.form-check-group input[type=radio]:checked + label::before {
1087
+ right: 0;
1088
+ }
1089
+ .form-check.form-check-group input.semi-checked:not(:checked) + label::before {
1090
+ right: 4px;
1091
+ left: auto;
1092
+ }
1093
+ .form-check input.semi-checked:not(:checked) + label::before {
1094
+ top: 12px;
1095
+ left: 4px;
1096
+ width: 12px;
1097
+ height: 2px;
1098
+ border-width: 0;
1099
+ border-style: none;
1100
+ border-color: transparent;
1101
+ opacity: 1;
1102
+ background: var(--bsi-color-background-inverse);
1103
+ transform: none;
1104
+ backface-visibility: hidden;
1105
+ }
1106
+ .form-check input.semi-checked:not(:checked) + label::after {
1107
+ z-index: 0;
1108
+ border-color: var(--bsi-form-checked-color);
1109
+ background-color: var(--bsi-form-checked-color);
1110
+ }
1111
+
1112
+ .form-check-inline {
1113
+ display: inline-block;
1114
+ }
1115
+ .form-check-inline:not(:last-child) {
1116
+ margin-right: var(--bsi-spacing-m);
1117
+ }
1118
+
1119
+ @media (prefers-reduced-motion: reduce) {
1120
+ fieldset legend,
1121
+ .form-group label,
1122
+ textarea,
1123
+ .form-check [type=checkbox],
1124
+ .form-check [type=radio],
1125
+ .form-check [type=checkbox] + label::after,
1126
+ .form-check [type=checkbox] + label::before,
1127
+ .form-check [type=radio] + label::after,
1128
+ .form-check [type=radio] + label::before,
1129
+ .toggles label input[type=checkbox] + .lever::before,
1130
+ .toggles label input[type=checkbox] + .lever::after {
1131
+ transition: none !important;
1132
+ }
1133
+ }
1134
+ .form-check [type=checkbox]:focus + label,
1135
+ .form-check [type=radio]:focus + label {
1136
+ border-color: hsl(0, 0%, 0%) !important;
1137
+ box-shadow: 0 0 0 2px var(--bsi-color-border-inverse), 0 0 0 5px var(--bsi-color-outline-focus) !important;
1138
+ outline: 3px solid transparent !important;
1139
+ outline-offset: 3px !important;
1140
+ }
1141
+
1142
+ .form-check [type=checkbox]:focus[data-focus-mouse=true] + label,
1143
+ .form-check [type=radio]:focus[data-focus-mouse=true] + label {
1144
+ border-color: inherit !important;
1145
+ box-shadow: none !important;
1146
+ outline: none !important;
1147
+ }
1148
+
1149
+ .form-control-plaintext {
1150
+ border: 0;
1151
+ --bsi-form-control-border-color: transparent;
1152
+ --bsi-form-control-border-radius: 0;
1153
+ --bsi-form-control-background-color: transparent;
1154
+ --bsi-form-control-spacing: 0;
1155
+ }
1156
+ .form-control-plaintext:focus {
1157
+ outline: 0;
1158
+ box-shadow: none !important;
1159
+ }
1160
+ .form-control-plaintext + label {
1161
+ cursor: text;
1162
+ }
1163
+
1164
+ .form-control {
1165
+ background-repeat: no-repeat;
1166
+ background-position: center right;
1167
+ background-size: 45px 30%;
1168
+ }
1169
+ .form-control:disabled {
1170
+ cursor: not-allowed;
1171
+ background: var(--bsi-color-background-disabled);
1172
+ border: 0;
1173
+ color: var(--bsi-color-text-disabled);
1174
+ }
1175
+ .was-validated .form-control:valid, .form-control.is-valid {
1176
+ 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");
1177
+ }
1178
+ .was-validated .form-control:invalid, .form-control.is-invalid {
1179
+ 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");
1180
+ border-color: var(--bsi-color-border-danger);
1181
+ }
1182
+ .form-control.warning {
1183
+ 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;
1184
+ border-color: var(--bsi-color-border-warning);
1185
+ }
1186
+ .form-control.is-valid ~ .warning-feedback {
1187
+ display: block;
1188
+ }
1189
+
1190
+ .form-control-sm {
1191
+ --bsi-form-control-spacing: var(--bsi-spacing-xxs) var(--bsi-spacing-3xs);
1192
+ --bsi-form-control-font-size: var(--bsi-label-font-size);
1193
+ }
1194
+ .form-control-sm::file-selector-button {
1195
+ padding: 0.25rem 0.5rem;
1196
+ margin: -0.25rem -0.5rem;
1197
+ margin-inline-end: 0.5rem;
1198
+ }
1199
+
1200
+ .form-control-lg {
1201
+ --bsi-form-control-font-size: var(--bsi-lead-font-size);
1202
+ }
1203
+ .form-control-lg::file-selector-button {
1204
+ padding: 0.5rem 1rem;
1205
+ margin: -0.5rem -1rem;
1206
+ margin-inline-end: 1rem;
1207
+ }
1208
+
1209
+ textarea.form-control {
1210
+ min-height: 2.5rem;
1211
+ border: 1px solid hsl(210, 17%, 44%);
1212
+ }
1213
+ textarea.form-control-sm {
1214
+ min-height: calc(1.5em + 0.5rem);
1215
+ }
1216
+ textarea.form-control-lg {
1217
+ min-height: calc(1.5em + 1rem);
1218
+ }
1219
+
1220
+ .form-control-color {
1221
+ width: 3rem;
1222
+ height: 2.5rem;
1223
+ padding: 0.375rem;
1224
+ }
1225
+ .form-control-color:not(:disabled):not([readonly]) {
1226
+ cursor: pointer;
1227
+ }
1228
+ .form-control-color::-moz-color-swatch {
1229
+ border: 0 !important;
1230
+ border-radius: 0;
1231
+ }
1232
+ .form-control-color::-webkit-color-swatch {
1233
+ border-radius: 0;
1234
+ }
1235
+ .form-control-color.form-control-sm {
1236
+ height: calc(1.5em + 0.5rem);
1237
+ }
1238
+ .form-control-color.form-control-lg {
1239
+ height: calc(1.5em + 1rem);
1240
+ }
1241
+
1242
+ .upload,
1243
+ .upload-avatar {
1244
+ position: absolute;
1245
+ z-index: -1;
1246
+ width: 0.1px;
1247
+ height: 0.1px;
1248
+ overflow: hidden;
1249
+ opacity: 0;
1250
+ }
1251
+
1252
+ .upload[type=file] + label {
1253
+ display: inline-block;
1254
+ margin-bottom: 0;
1255
+ max-width: 80%;
1256
+ padding: var(--bsi-spacing-xs) var(--bsi-spacing-m);
1257
+ overflow: hidden;
1258
+ border-radius: var(--bsi-form-control-border-radius);
1259
+ background-color: var(--bsi-color-background-primary);
1260
+ color: var(--bsi-color-text-inverse);
1261
+ font-size: 1rem;
1262
+ font-weight: 700;
1263
+ transition: background-color var(--bsi-transition-instant);
1264
+ cursor: pointer;
1265
+ }
1266
+ .upload[type=file] + label:hover {
1267
+ background-color: var(--bsi-color-background-primary-hover);
1268
+ }
1269
+ .upload[type=file] + label svg {
1270
+ margin-right: var(--bsi-spacing-xxs);
1271
+ fill: var(--bsi-icon-inverse);
1272
+ }
1273
+
1274
+ .upload-pictures-wall {
1275
+ display: flex;
1276
+ flex-wrap: wrap;
1277
+ padding: 0;
1278
+ }
1279
+ .upload-pictures-wall > li {
1280
+ margin-right: var(--bsi-spacing-xxs);
1281
+ margin-bottom: var(--bsi-spacing-xxs);
1282
+ list-style-type: none;
1283
+ }
1284
+ .upload-pictures-wall > li:last-child {
1285
+ margin-right: 0;
1286
+ }
1287
+ .upload-pictures-wall .upload[type=file] + label {
1288
+ display: table-cell;
1289
+ width: 128px;
1290
+ height: 128px;
1291
+ padding: 0;
1292
+ border: 2px dashed var(--bsi-color-border-primary);
1293
+ border-radius: 0;
1294
+ background-color: var(--bsi-color-border-primary-lighter);
1295
+ color: var(--bsi-color-text-primary);
1296
+ font-weight: 600;
1297
+ text-align: center;
1298
+ vertical-align: middle;
1299
+ transition: border-color var(--bsi-transition-instant);
1300
+ }
1301
+ .upload-pictures-wall .upload[type=file] + label .icon {
1302
+ display: block;
1303
+ flex-shrink: 0;
1304
+ width: 48px;
1305
+ height: 48px;
1306
+ margin: 0 auto;
1307
+ fill: var(--bsi-icon-primary);
1308
+ }
1309
+ .upload-pictures-wall .upload[type=file] + label:hover {
1310
+ border: 2px dashed var(--bsi-color-border-primary-hover);
1311
+ }
1312
+ .upload-pictures-wall .upload-image {
1313
+ flex-shrink: 0;
1314
+ width: 128px;
1315
+ height: 128px;
1316
+ }
1317
+ .upload-pictures-wall .upload-image img {
1318
+ width: 100%;
1319
+ height: 100%;
1320
+ object-fit: cover;
1321
+ }
1322
+
1323
+ .upload-file-list {
1324
+ margin-top: 5px;
1325
+ padding: 0;
1326
+ }
1327
+ .upload-file-list.upload-file-list-image .progress {
1328
+ left: 52px;
1329
+ }
1330
+ .upload-file-list .upload-file {
1331
+ position: relative;
1332
+ display: flex;
1333
+ align-items: center;
1334
+ max-width: 375px;
1335
+ margin-bottom: var(--bsi-spacing-s);
1336
+ list-style-type: none;
1337
+ }
1338
+ .upload-file-list .upload-file.uploading .icon {
1339
+ fill: var(--bsi-icon-secondary);
1340
+ }
1341
+ .upload-file-list .upload-file.uploading p {
1342
+ color: var(--bsi-color-text-secondary);
1343
+ }
1344
+ .upload-file-list .upload-file.success svg {
1345
+ fill: var(--bsi-icon-success);
1346
+ }
1347
+ .upload-file-list .upload-file.success p {
1348
+ color: var(--bsi-color-text-success);
1349
+ }
1350
+ .upload-file-list .upload-file.success p .upload-file-weight {
1351
+ display: inline-block;
1352
+ }
1353
+ .upload-file-list .upload-file.error svg {
1354
+ fill: var(--bsi-icon-danger);
1355
+ }
1356
+ .upload-file-list .upload-file.error p {
1357
+ color: var(--bsi-color-text-danger);
1358
+ }
1359
+ .upload-file-list .upload-file svg {
1360
+ flex-shrink: 0;
1361
+ }
1362
+ .upload-file-list .upload-file .upload-image {
1363
+ flex-shrink: 0;
1364
+ width: 40px;
1365
+ height: 40px;
1366
+ }
1367
+ .upload-file-list .upload-file .upload-image img {
1368
+ width: 100%;
1369
+ height: 100%;
1370
+ object-fit: cover;
1371
+ }
1372
+ .upload-file-list .upload-file p {
1373
+ margin: 0;
1374
+ margin-left: 12px;
1375
+ overflow: hidden;
1376
+ font-size: 0.875rem;
1377
+ font-weight: 600;
1378
+ text-overflow: ellipsis;
1379
+ white-space: nowrap;
1380
+ }
1381
+ .upload-file-list .upload-file p .upload-file-weight {
1382
+ display: none;
1383
+ margin-left: 10px;
1384
+ color: var(--bsi-color-text-secondary);
1385
+ }
1386
+ .upload-file-list .upload-file button {
1387
+ margin-left: auto;
1388
+ padding: 0;
1389
+ border: 0;
1390
+ background: transparent;
1391
+ }
1392
+ .upload-file-list .upload-file button:hover {
1393
+ cursor: pointer;
1394
+ }
1395
+ .upload-file-list .upload-file button:hover svg {
1396
+ fill: var(--bsi-icon-primary);
1397
+ }
1398
+ .upload-file-list .progress {
1399
+ position: absolute;
1400
+ bottom: -4px;
1401
+ left: 36px;
1402
+ width: calc(100% - 45px);
1403
+ height: 4px;
1404
+ background-color: hsl(210, 3%, 85%);
1405
+ box-shadow: none;
1406
+ }
1407
+ .upload-file-list .progress.progress-image {
1408
+ width: calc(100% - 60px);
1409
+ }
1410
+
1411
+ .upload-avatar-container {
1412
+ position: absolute;
1413
+ top: 0;
1414
+ left: 0;
1415
+ width: 100%;
1416
+ height: 100%;
1417
+ }
1418
+ .upload-avatar-container .upload-avatar[type=file] + label {
1419
+ position: absolute;
1420
+ top: 0;
1421
+ left: 0;
1422
+ width: 100%;
1423
+ height: 100%;
1424
+ }
1425
+ .upload-avatar-container .upload-avatar[type=file] + label svg {
1426
+ display: none;
1427
+ }
1428
+ .upload-avatar-container .upload-avatar[type=file] + label span {
1429
+ display: none;
1430
+ }
1431
+
1432
+ .avatar-upload {
1433
+ overflow: hidden;
1434
+ }
1435
+
1436
+ .avatar-upload-wrapper .avatar-upload-icon {
1437
+ position: absolute;
1438
+ right: 4px;
1439
+ bottom: 16px;
1440
+ display: flex;
1441
+ align-items: center;
1442
+ justify-content: center;
1443
+ width: 26px;
1444
+ height: 26px;
1445
+ border: 2px solid var(--bsi-color-border-inverse);
1446
+ border-radius: 50%;
1447
+ background: hsl(210, 6.2290689886%, 92.535%);
1448
+ pointer-events: none;
1449
+ }
1450
+ .avatar-upload-wrapper .avatar-upload-icon > svg {
1451
+ width: 16px;
1452
+ height: 16px;
1453
+ }
1454
+ .avatar-upload-wrapper.size-sm .avatar {
1455
+ width: 80px;
1456
+ height: 80px;
1457
+ }
1458
+ .avatar-upload-wrapper.size-sm .avatar-upload-icon {
1459
+ right: 4px;
1460
+ bottom: 6px;
1461
+ width: 18px;
1462
+ height: 18px;
1463
+ }
1464
+ .avatar-upload-wrapper.size-sm .avatar-upload-icon > svg {
1465
+ width: 12px;
1466
+ height: 12px;
1467
+ }
1468
+
1469
+ .upload-dragdrop {
1470
+ display: inline-flex;
1471
+ align-items: center;
1472
+ }
1473
+ .upload-dragdrop.dragover .upload-dragdrop-image img, .upload-dragdrop.loading .upload-dragdrop-image img {
1474
+ transform: translateX(-50%) translateY(-50%) scale(0.85);
1475
+ }
1476
+ .upload-dragdrop.loading p:not(.upload-dragdrop-weight) {
1477
+ font-style: italic;
1478
+ }
1479
+ .upload-dragdrop.loading .upload-dragdrop-loading {
1480
+ opacity: 1;
1481
+ }
1482
+ .upload-dragdrop.loading .upload-dragdrop-text .upload-dragdrop-weight, .upload-dragdrop.success .upload-dragdrop-text .upload-dragdrop-weight {
1483
+ visibility: visible;
1484
+ }
1485
+ .upload-dragdrop.success .upload-dragdrop-success {
1486
+ opacity: 1;
1487
+ transform: scale(1);
1488
+ }
1489
+
1490
+ .upload-dragdrop-text p {
1491
+ margin: 0;
1492
+ color: var(--bsi-color-text-secondary);
1493
+ font-size: 0.875rem;
1494
+ }
1495
+ .upload-dragdrop-text p.upload-dragdrop-weight {
1496
+ visibility: hidden;
1497
+ color: var(--bsi-color-text-secondary);
1498
+ font-size: 0.75rem;
1499
+ }
1500
+ .upload-dragdrop-text p.upload-dragdrop-weight svg {
1501
+ fill: var(--bsi-icon-secondary);
1502
+ }
1503
+ .upload-dragdrop-text h5 {
1504
+ margin: 0;
1505
+ color: var(--bsi-color-text-base);
1506
+ }
1507
+
1508
+ .upload-dragdrop-input {
1509
+ position: absolute;
1510
+ z-index: -1;
1511
+ width: 0.1px;
1512
+ height: 0.1px;
1513
+ overflow: hidden;
1514
+ opacity: 0;
1515
+ }
1516
+ .upload-dragdrop-input[type=file] + label {
1517
+ color: var(--bsi-color-text-primary);
1518
+ text-decoration: underline;
1519
+ cursor: pointer;
1520
+ }
1521
+ .upload-dragdrop-input:focus[type=file] + label {
1522
+ outline: auto 5px -webkit-focus-ring-color;
1523
+ }
1524
+
1525
+ .upload-dragdrop-loading {
1526
+ position: absolute;
1527
+ top: 0;
1528
+ right: 0;
1529
+ bottom: 0;
1530
+ left: 0;
1531
+ width: 128px;
1532
+ height: 128px;
1533
+ overflow: hidden;
1534
+ border-radius: 50%;
1535
+ opacity: 0;
1536
+ transition: opacity 0.2s;
1537
+ }
1538
+ .upload-dragdrop-loading .progress-donut {
1539
+ position: relative;
1540
+ }
1541
+ .upload-dragdrop-loading .progress-donut .progressbar-text {
1542
+ color: #000 !important;
1543
+ font-weight: 700;
1544
+ }
1545
+ .upload-dragdrop-loading .progress-donut svg {
1546
+ position: relative;
1547
+ }
1548
+ .upload-dragdrop-loading .progress-donut svg path:first-child {
1549
+ display: none;
1550
+ }
1551
+ .upload-dragdrop-loading .progress-donut:before {
1552
+ position: absolute;
1553
+ top: 50%;
1554
+ left: 50%;
1555
+ z-index: 0;
1556
+ content: "";
1557
+ width: 67px;
1558
+ height: 67px;
1559
+ border-radius: 50%;
1560
+ background: #fff;
1561
+ transform: translateX(-50%) translateY(-50%);
1562
+ }
1563
+
1564
+ .upload-dragdrop-image {
1565
+ position: relative;
1566
+ flex-shrink: 0;
1567
+ width: 128px;
1568
+ height: 128px;
1569
+ margin-right: var(--bsi-spacing-s);
1570
+ }
1571
+ .upload-dragdrop-image img {
1572
+ position: absolute;
1573
+ top: 50%;
1574
+ left: 50%;
1575
+ display: block;
1576
+ width: 100%;
1577
+ height: 100%;
1578
+ overflow: hidden;
1579
+ border-radius: 50%;
1580
+ transform: translateX(-50%) translateY(-50%);
1581
+ transform-origin: center center;
1582
+ transition: transform 0.4s cubic-bezier(0.33, 1.07, 0.54, 1);
1583
+ }
1584
+ .upload-dragdrop-image .upload-dragdrop-success {
1585
+ position: absolute;
1586
+ top: calc(50% - 18px);
1587
+ left: 20px;
1588
+ display: flex;
1589
+ align-items: center;
1590
+ justify-content: center;
1591
+ width: 36px;
1592
+ height: 36px;
1593
+ border-radius: 50%;
1594
+ opacity: 0;
1595
+ background: var(--bsi-color-background-success);
1596
+ transform: scale(0.6);
1597
+ transition: opacity 0.2s, transform 0.5s cubic-bezier(0.75, -0.5, 0, 1.75);
1598
+ }
1599
+ .upload-dragdrop-image .upload-dragdrop-success svg {
1600
+ width: 30px;
1601
+ height: 30px;
1602
+ fill: var(--bsi-icon-inverse);
1603
+ }
1604
+ .upload-dragdrop-image .upload-dragdrop-success .upload-dragdrop-text h5 + p {
1605
+ color: var(--bsi-color-text-success);
1606
+ font-weight: var(--bsi-font-weight-solid);
1607
+ }
1608
+
1609
+ @media (min-width: 576px) {
1610
+ .upload[type=file] + label {
1611
+ font-size: var(--bsi-label-font-size-s);
1612
+ }
1613
+ }
1614
+ @media (min-width: 768px) {
1615
+ .upload-dragdrop-image {
1616
+ width: 180px;
1617
+ height: 180px;
1618
+ margin-right: 32px;
1619
+ }
1620
+ .upload-dragdrop-image .upload-dragdrop-success {
1621
+ left: 28px;
1622
+ }
1623
+ .upload-dragdrop-loading {
1624
+ width: 180px;
1625
+ height: 180px;
1626
+ }
1627
+ .upload-dragdrop-loading .progress-donut:before {
1628
+ content: "";
1629
+ width: 94px;
1630
+ height: 94px;
1631
+ }
1632
+ }
1633
+ @media (min-width: 1200px) {
1634
+ .avatar-upload:hover .upload-avatar-container,
1635
+ .avatar-upload:focus-within .upload-avatar-container {
1636
+ opacity: 1;
1637
+ }
1638
+ .upload-avatar-container {
1639
+ top: auto;
1640
+ right: 0;
1641
+ bottom: -10%;
1642
+ left: 0;
1643
+ width: 100%;
1644
+ height: 60%;
1645
+ opacity: 0;
1646
+ background-color: var(--bsi-overlay-background-primary-muted);
1647
+ transition: opacity var(--bsi-transition-instant);
1648
+ }
1649
+ .upload-avatar-container .upload-avatar[type=file] + label {
1650
+ display: flex;
1651
+ flex-direction: column;
1652
+ align-items: center;
1653
+ justify-content: flex-start;
1654
+ width: 100%;
1655
+ height: 100%;
1656
+ margin: 0;
1657
+ padding-top: var(--bsi-spacing-xxs);
1658
+ color: var(--bsi-color-text-inverse);
1659
+ font-size: 0.75rem;
1660
+ text-align: center;
1661
+ cursor: pointer;
1662
+ }
1663
+ .upload-avatar-container .upload-avatar[type=file] + label span {
1664
+ display: block;
1665
+ }
1666
+ .upload-avatar-container .upload-avatar[type=file] + label svg {
1667
+ display: block;
1668
+ width: 20px;
1669
+ height: 20px;
1670
+ fill: var(--bsi-icon-inverse);
1671
+ }
1672
+ .upload-avatar-container .upload-avatar:focus:not([data-focus-mouse=true])[type=file] + label {
1673
+ outline: auto 5px -webkit-focus-ring-color;
1674
+ }
1675
+ .avatar-upload-wrapper .avatar-upload-icon {
1676
+ display: none;
1677
+ }
1678
+ .avatar-upload-wrapper.size-sm .upload-avatar[type=file] + label span {
1679
+ display: none;
1680
+ }
1681
+ }
1682
+ .form-feedback {
1683
+ width: 100%;
1684
+ margin-top: 0.25rem;
1685
+ font-size: 0.75rem;
1686
+ }
1687
+ .form-feedback.just-validate-error-label {
1688
+ color: var(--bsi-color-text-danger);
1689
+ }
1690
+
1691
+ .input-group-text:has(~ [data-focus-mouse=true]:not(.btn)),
1692
+ [data-focus-mouse=true]:not(.btn) ~ .input-group-text,
1693
+ button:has(~ [data-focus-mouse=true]:not(.btn)),
1694
+ [data-focus-mouse=true]:not(.btn) + button {
1695
+ border-color: inherit !important;
1696
+ box-shadow: none !important;
1697
+ outline: none !important;
1698
+ }
1699
+
1700
+ .input-group-text:has(~ .is-invalid),
1701
+ .is-invalid ~ .input-group-text,
1702
+ button:has(~ .is-invalid),
1703
+ .is-invalid + button {
1704
+ border-color: var(--bsi-color-border-danger) !important;
1705
+ }
1706
+
1707
+ .sr-only-justvalidate-bi {
1708
+ display: none;
1709
+ }
1710
+
1711
+ .just-validate-success-field {
1712
+ border-color: var(--bsi-color-border-success) !important;
1713
+ padding-right: calc(1.5em + 0.75rem) !important;
1714
+ 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");
1715
+ }
1716
+
1717
+ .input-group-text:has(~ .just-validate-success-field),
1718
+ .just-validate-success-field ~ .input-group-text,
1719
+ button:has(~ .just-validate-success-field),
1720
+ .just-validate-success-field + button {
1721
+ border-color: var(--bsi-color-border-success);
1722
+ }
1723
+
1724
+ .just-validate-success-field + .input-group-text.align-buttons,
1725
+ .is-invalid + .input-group-text.align-buttons {
1726
+ right: 30px;
1727
+ }
1728
+
1729
+ .is-invalid + .input-group-text.align-buttons {
1730
+ bottom: 22px;
1731
+ }
1732
+
1733
+ .autocomplete__wrapper .form-feedback.just-validate-error-label {
1734
+ position: absolute;
1735
+ }
1736
+
1737
+ textarea.form-control {
1738
+ background-position: top 0.3em right 0.3em !important;
1739
+ background-size: 37px 30% !important;
1740
+ }
1741
+ textarea.is-invalid {
1742
+ border-bottom-style: solid;
1743
+ border-bottom-width: 1px;
1744
+ }
1745
+ textarea.just-validate-success-field {
1746
+ border-bottom-style: solid;
1747
+ border-bottom-width: 1px;
1748
+ }
1749
+
1750
+ input[type=checkbox].is-invalid,
1751
+ input[type=radio].is-invalid {
1752
+ --bsi-form-checkbox-border-color: var(--bsi-color-border-danger);
1753
+ }
1754
+
1755
+ select.is-invalid {
1756
+ border: 1px solid var(--bsi-color-border-danger);
1757
+ }
1758
+ select.just-validate-success-field {
1759
+ border: 1px solid var(--bsi-color-border-success);
1760
+ }
1761
+
1762
+ body {
1763
+ font-family: var(--bsi-font-sans);
1764
+ }
1765
+
1766
+ p,
1767
+ ul,
1768
+ ol,
1769
+ dl {
1770
+ font-size: var(--bsi-body-font-size);
1771
+ line-height: var(--bsi-body-leading);
1772
+ }
1773
+
1774
+ caption,
1775
+ figcaption {
1776
+ font-size: var(--bsi-caption-font-size);
1777
+ line-height: var(--bsi-caption-leading);
1778
+ }
1779
+
1780
+ b,
1781
+ strong {
1782
+ font-weight: var(--bsi-font-weight-strong);
1783
+ }
1784
+
1785
+ mark,
1786
+ code {
1787
+ padding: 0 var(--bsi-spacing-3xs);
1788
+ }
1789
+
1790
+ mark {
1791
+ background-color: var(--bsi-highlight-background);
1792
+ }
1793
+
1794
+ pre,
1795
+ code,
1796
+ kbd,
1797
+ samp {
1798
+ border-radius: var(--bsi-radius-smooth);
1799
+ font-family: var(--bsi-font-mono);
1800
+ }
1801
+
1802
+ ins,
1803
+ del {
1804
+ position: relative;
1805
+ display: flex;
1806
+ align-items: center;
1807
+ padding: var(--bsi-spacing-3xs) var(--bsi-spacing-m);
1808
+ font: var(--bsi-body-font-size);
1809
+ text-decoration: none;
1810
+ }
1811
+
1812
+ ins {
1813
+ background-color: var(--bsi-ins-background);
1814
+ text-decoration: none;
1815
+ }
1816
+
1817
+ del {
1818
+ background-color: var(--bsi-del-background);
1819
+ }
1820
+
1821
+ del::before,
1822
+ ins::before {
1823
+ position: absolute;
1824
+ left: 0.5rem;
1825
+ }
1826
+
1827
+ del::before {
1828
+ content: "−";
1829
+ }
1830
+
1831
+ ins::before {
1832
+ content: "+";
1833
+ }
1834
+
1835
+ kbd {
1836
+ margin: 0 2px;
1837
+ padding: 2px var(--bsi-spacing-3xs);
1838
+ border: var(--bsi-border-base) solid var(--bsi-color-border-subtle);
1839
+ background-color: var(--bsi-color-background-secondary-lighter);
1840
+ box-shadow: var(--bsi-elevation-low), 0 2px 0 0 hsla(255, 0%, 100%, 0.7) inset;
1841
+ color: var(--bsi-color-text-secondary);
1842
+ font-size: var(--bsi-font-size-1);
1843
+ font-weight: var(--bsi-font-weight-solid);
1844
+ white-space: nowrap;
1845
+ }
1846
+ kbd kbd {
1847
+ padding: 0;
1848
+ font-size: var(--bsi-code-font-size);
1849
+ }
1850
+
1851
+ small,
1852
+ .small {
1853
+ font-size: var(--bsi-caption-font-size);
1854
+ }
1855
+
1856
+ .x-small {
1857
+ font-size: var(--bsi-font-size-1);
1858
+ }
1859
+
1860
+ h1,
1861
+ .h1 {
1862
+ font-size: var(--bsi-heading-1-font-size);
1863
+ }
1864
+
1865
+ h2,
1866
+ .h2 {
1867
+ font-size: var(--bsi-heading-2-font-size);
1868
+ }
1869
+
1870
+ h3,
1871
+ .h3 {
1872
+ font-size: var(--bsi-heading-3-font-size);
1873
+ }
1874
+
1875
+ h4,
1876
+ .h4 {
1877
+ font-size: var(--bsi-heading-4-font-size);
1878
+ }
1879
+
1880
+ h5,
1881
+ .h5 {
1882
+ font-size: var(--bsi-heading-5-font-size);
1883
+ }
1884
+
1885
+ h6,
1886
+ .h6 {
1887
+ font-size: var(--bsi-heading-6-font-size);
1888
+ }
1889
+
1890
+ h1,
1891
+ .h1,
1892
+ h2,
1893
+ .h2,
1894
+ h3,
1895
+ .h3,
1896
+ h4,
1897
+ .h4,
1898
+ h5,
1899
+ .h5,
1900
+ h6,
1901
+ .h6 {
1902
+ margin-top: 0;
1903
+ margin-bottom: var(--bsi-heading-spacing);
1904
+ line-height: var(--bsi-heading-leading);
1905
+ }
1906
+ :is(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) + h1, p + h1,
1907
+ :is(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) + .h1,
1908
+ p + .h1,
1909
+ :is(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) + h2,
1910
+ p + h2,
1911
+ :is(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) + .h2,
1912
+ p + .h2,
1913
+ :is(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) + h3,
1914
+ p + h3,
1915
+ :is(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) + .h3,
1916
+ p + .h3,
1917
+ :is(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) + h4,
1918
+ p + h4,
1919
+ :is(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) + .h4,
1920
+ p + .h4,
1921
+ :is(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) + h5,
1922
+ p + h5,
1923
+ :is(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) + .h5,
1924
+ p + .h5,
1925
+ :is(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) + h6,
1926
+ p + h6,
1927
+ :is(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) + .h6,
1928
+ p + .h6 {
1929
+ padding-top: var(--bsi-spacing-s);
1930
+ }
1931
+
1932
+ h1,
1933
+ h2,
1934
+ h3,
1935
+ .h1,
1936
+ .h2,
1937
+ .h3 {
1938
+ font-weight: var(--bsi-heading-font-weight);
1939
+ }
1940
+
1941
+ h4,
1942
+ h5,
1943
+ h6,
1944
+ .h4,
1945
+ .h5,
1946
+ .h6 {
1947
+ font-weight: var(--bsi-heading-font-weight-weak);
1948
+ }
1949
+
1950
+ h1,
1951
+ .h1,
1952
+ .display-1 {
1953
+ letter-spacing: -1px;
1954
+ }
1955
+
1956
+ .font-serif {
1957
+ font-family: var(--bsi-font-serif) !important;
1958
+ }
1959
+
1960
+ .font-sans-serif {
1961
+ font-family: var(--bsi-font-sans) !important;
1962
+ }
1963
+
1964
+ .font-monospace {
1965
+ font-family: var(--bsi-font-mono) !important;
1966
+ }
1967
+
1968
+ .display-1 {
1969
+ font-size: var(--bsi-display-font-size);
1970
+ font-weight: var(--bsi-heading-font-weight);
1971
+ line-height: var(--bsi-heading-leading);
1972
+ }
1973
+
1974
+ .lead {
1975
+ font-size: var(--bsi-lead-font-size);
1976
+ font-weight: var(--bsi-lead-font-weight);
1977
+ line-height: var(--bsi-lead-leading);
1978
+ }
1979
+
1980
+ blockquote,
1981
+ .blockquote {
1982
+ margin: var(--bsi-spacing-m) 0;
1983
+ margin-left: var(--bsi-spacin-inline-xs);
1984
+ padding: var(--bsi-spacing-s);
1985
+ border-left: var(--bsi-border-thick) solid var(--bsi-border-color-secondary);
1986
+ font-size: var(--bsi-body-font-size);
1987
+ line-height: var(--bsi-body-leading);
1988
+ }
1989
+ blockquote > :last-child,
1990
+ .blockquote > :last-child {
1991
+ margin-bottom: 0;
1992
+ }
1993
+ blockquote.text-end,
1994
+ .blockquote.text-end {
1995
+ margin-right: var(--bsi-spacin-inline-xs);
1996
+ border-right: var(--bsi-border-thick) solid var(--bsi-border-color-secondary);
1997
+ }
1998
+ blockquote.text-center, blockquote.text-end, blockquote.blockquote-simple,
1999
+ .blockquote.text-center,
2000
+ .blockquote.text-end,
2001
+ .blockquote.blockquote-simple {
2002
+ margin-left: 0;
2003
+ border-right: none;
2004
+ border-left: none;
2005
+ }
2006
+ blockquote.text-center, blockquote.blockquote-simple,
2007
+ .blockquote.text-center,
2008
+ .blockquote.blockquote-simple {
2009
+ padding: 0;
2010
+ }
2011
+ blockquote.blockquote-simple,
2012
+ .blockquote.blockquote-simple {
2013
+ font-style: italic;
2014
+ }
2015
+ blockquote.blockquote-card,
2016
+ .blockquote.blockquote-card {
2017
+ margin-left: 0;
2018
+ padding: var(--bsi-spacing-m);
2019
+ background-color: var(--bsi-color-background-inverse);
2020
+ box-shadow: var(--bsi-elevation-low);
2021
+ }
2022
+ blockquote.blockquote-card .blockquote-footer,
2023
+ .blockquote.blockquote-card .blockquote-footer {
2024
+ font-size: inherit;
2025
+ }
2026
+ blockquote.blockquote-card .blockquote-footer:before,
2027
+ .blockquote.blockquote-card .blockquote-footer:before {
2028
+ content: none;
2029
+ }
2030
+ blockquote.blockquote-card.dark,
2031
+ .blockquote.blockquote-card.dark {
2032
+ border-left: none;
2033
+ background-color: var(--bsi-color-background-primary);
2034
+ color: var(--bsi-color-text-inverse);
2035
+ }
2036
+ blockquote.blockquote-card.dark .blockquote-footer,
2037
+ .blockquote.blockquote-card.dark .blockquote-footer {
2038
+ color: var(--bsi-color-text-inverse);
2039
+ }
2040
+
2041
+ .blockquote-footer {
2042
+ margin-top: 0;
2043
+ margin-bottom: var(--bsi-spacing-s);
2044
+ color: var(--bsi-color-text-secondary);
2045
+ font-size: var(--bsi-label-font-size);
2046
+ }
2047
+ .blockquote-footer::before {
2048
+ content: "— ";
2049
+ }
2050
+ .bg-dark .blockquote-footer {
2051
+ color: var(--bsi-color-text-muted);
2052
+ }
2053
+
2054
+ .initialism {
2055
+ font-size: var(--bsi-label-font-size-s);
2056
+ text-transform: uppercase;
2057
+ }
2058
+
2059
+ .d-none {
2060
+ display: none !important;
2061
+ }
2062
+
2063
+ .d-inline-block {
2064
+ display: inline-block !important;
2065
+ }
2066
+
2067
+ .d-flex {
2068
+ display: flex !important;
2069
+ }
2070
+
2071
+ .m-0 {
2072
+ margin: 0 !important;
2073
+ }
2074
+
2075
+ @media (min-width: 576px) {
2076
+ .d-sm-none {
2077
+ display: none !important;
2078
+ }
2079
+ .d-sm-inline-block {
2080
+ display: inline-block !important;
2081
+ }
2082
+ .d-sm-flex {
2083
+ display: flex !important;
2084
+ }
2085
+ .m-sm-0 {
2086
+ margin: 0 !important;
2087
+ }
2088
+ }
2089
+ @media (min-width: 768px) {
2090
+ .d-md-none {
2091
+ display: none !important;
2092
+ }
2093
+ .d-md-inline-block {
2094
+ display: inline-block !important;
2095
+ }
2096
+ .d-md-flex {
2097
+ display: flex !important;
2098
+ }
2099
+ .m-md-0 {
2100
+ margin: 0 !important;
2101
+ }
2102
+ }
2103
+ @media (min-width: 992px) {
2104
+ .d-lg-none {
2105
+ display: none !important;
2106
+ }
2107
+ .d-lg-inline-block {
2108
+ display: inline-block !important;
2109
+ }
2110
+ .d-lg-flex {
2111
+ display: flex !important;
2112
+ }
2113
+ .m-lg-0 {
2114
+ margin: 0 !important;
2115
+ }
2116
+ }
2117
+ @media (min-width: 1200px) {
2118
+ .d-xl-none {
2119
+ display: none !important;
2120
+ }
2121
+ .d-xl-inline-block {
2122
+ display: inline-block !important;
2123
+ }
2124
+ .d-xl-flex {
2125
+ display: flex !important;
2126
+ }
2127
+ .m-xl-0 {
2128
+ margin: 0 !important;
2129
+ }
2130
+ }
2131
+ @media (min-width: 1400px) {
2132
+ .d-xxl-none {
2133
+ display: none !important;
2134
+ }
2135
+ .d-xxl-inline-block {
2136
+ display: inline-block !important;
2137
+ }
2138
+ .d-xxl-flex {
2139
+ display: flex !important;
2140
+ }
2141
+ .m-xxl-0 {
2142
+ margin: 0 !important;
2143
+ }
2144
+ }
2145
+ @media print {
2146
+ .d-print-none {
2147
+ display: none !important;
2148
+ }
2149
+ .d-print-inline-block {
2150
+ display: inline-block !important;
2151
+ }
2152
+ .d-print-flex {
2153
+ display: flex !important;
2154
+ }
2155
+ }
2156
+ .upload[type=file] + label {
2157
+ display: flex;
2158
+ width: fit-content;
2159
+ max-width: unset !important;
2160
+ align-items: center;
2161
+ gap: var(--bsi-spacing-xxs, 8px);
2162
+ }
2163
+
2164
+ :host([required]) .upload-required-feedback {
2165
+ display: block;
2166
+ }
2167
+
2168
+ .upload-file it-progress {
2169
+ position: absolute;
2170
+ bottom: -4px;
2171
+ left: 36px;
2172
+ width: calc(100% - 45px);
2173
+ }
2174
+
2175
+ .upload-file-list-image .upload-file it-progress {
2176
+ left: 52px;
2177
+ width: calc(100% - 60px);
2178
+ }
2179
+
2180
+ :focus-visible,
2181
+ .upload:focus-visible + label,
2182
+ .upload-dragdrop-input:focus-visible[type=file] + label,
2183
+ .avatar-upload:focus-within:focus-visible {
2184
+ border-color: #000 !important;
2185
+ box-shadow: 0 0 0 2px hsl(0, 0%, 100%), 0 0 0 5px hsl(0, 0%, 0%) !important;
2186
+ outline: 3px solid rgba(0, 0, 0, 0) !important;
2187
+ outline-offset: 3px !important;
2188
+ }
2189
+
2190
+ .upload-file-actions {
2191
+ display: flex;
2192
+ align-items: center;
2193
+ padding-left: var(--bsi-spacing-xs, 12px);
2194
+ margin-left: auto;
2195
+ gap: calc(var(--bsi-spacing-xxs, 8px) / 2);
2196
+ }
2197
+ .upload-file-actions .upload-file-success {
2198
+ margin-bottom: calc(var(--bsi-spacing-xxs, 8px) / 2);
2199
+ }
2200
+
2201
+ .upload-image {
2202
+ position: relative;
2203
+ }
2204
+ .upload-image .upload-image-remove {
2205
+ position: absolute;
2206
+ top: 4px;
2207
+ right: 4px;
2208
+ width: 24px;
2209
+ height: 24px;
2210
+ padding: 0;
2211
+ border-radius: 50%;
2212
+ line-height: 1;
2213
+ }
2214
+
2215
+ .upload-pictures-wall .upload[type=file] + label {
2216
+ display: flex;
2217
+ flex-direction: column;
2218
+ align-items: center;
2219
+ justify-content: center;
2220
+ }`;
2221
+
2222
+ registerTranslation(translation);
2223
+ registerTranslation(translation$1);
2224
+ let ItUpload = class ItUpload extends FormControl {
2225
+ constructor() {
2226
+ super(...arguments);
2227
+ // Override the base FormControlController to submit File[] instead of strings.
2228
+ // The base class field is declared as `protected readonly` but re-declaring here
2229
+ // shadows it cleanly via class field initialization order.
2230
+ this.formControlController = new FormControlController(this, {
2231
+ value: (el) => el._files.map((f) => f._raw),
2232
+ assumeInteractionOn: ['it-change'],
2233
+ });
2234
+ /** Allow multiple file selection */
2235
+ this.multiple = false;
2236
+ /** Show image thumbnails in the file list */
2237
+ this.imagePreview = false;
2238
+ /** Layout variant: 'default' shows a vertical file list, 'gallery' shows a pictures-wall grid */
2239
+ this.variant = 'default';
2240
+ /** Support text displayed below the upload button */
2241
+ this.supportText = '';
2242
+ /**
2243
+ * If true, files transition to 'success' automatically as soon as they are added
2244
+ * (useful for purely client-side scenarios).
2245
+ * Leave false (default) when you need to call setFileStatus() after a real HTTP upload.
2246
+ */
2247
+ this.autoSuccess = false;
2248
+ this._files = [];
2249
+ }
2250
+ get label() {
2251
+ if (this.labelElements.length > 0) {
2252
+ return this.labelElements[0].innerText.trim();
2253
+ }
2254
+ return '';
2255
+ }
2256
+ /** Returns a copy of the current file list */
2257
+ get files() {
2258
+ return this._files.map(({ _raw: _, ...rest }) => rest);
2259
+ }
2260
+ /**
2261
+ * Programmatically add a file to the list with an initial status of 'loading'.
2262
+ * Returns the generated id for use with setFileStatus / removeFile.
2263
+ */
2264
+ addFile(file) {
2265
+ const id = `upload-file-${Math.random().toString(36).slice(2)}`;
2266
+ const entry = {
2267
+ id,
2268
+ name: file.name,
2269
+ size: file.size,
2270
+ status: 'loading',
2271
+ _raw: file,
2272
+ };
2273
+ this._files = [...this._files, entry];
2274
+ return id;
2275
+ }
2276
+ /** Update the status (and optional progress 0–100) of a file by id. No-op for unknown ids. */
2277
+ setFileStatus(id, status, progress) {
2278
+ this._files = this._files.map((f) => (f.id === id ? { ...f, status, progress: progress ?? f.progress } : f));
2279
+ }
2280
+ /** Set a thumbnail data URL for a file entry by id. No-op for unknown ids. */
2281
+ setFileThumbnail(id, dataUrl) {
2282
+ this._files = this._files.map((f) => (f.id === id ? { ...f, thumbnail: dataUrl } : f));
2283
+ }
2284
+ /** Remove a file entry by id. No-op for unknown ids. */
2285
+ removeFile(id) {
2286
+ this._files = this._files.filter((f) => f.id !== id);
2287
+ this._validateFiles();
2288
+ }
2289
+ connectedCallback() {
2290
+ super.connectedCallback?.();
2291
+ this._handleReady();
2292
+ }
2293
+ updated(changedProperties) {
2294
+ super.updated?.(changedProperties);
2295
+ if (!this.label && this.label?.length === 0) {
2296
+ this.logger.warn(`Label is required for accessibility. Define a <span slot="label"> inside <it-upload name="${this.name}">.`);
2297
+ }
2298
+ }
2299
+ // Override FormControl.checkValidity — the native hidden input manages required state
2300
+ checkValidity() {
2301
+ return this.inputElement?.checkValidity() ?? true;
2302
+ }
2303
+ /** Override to prevent string-level validation messages from FormControl base */
2304
+ handleValidationMessages() {
2305
+ this._validateFiles();
2306
+ }
2307
+ _validateFiles() {
2308
+ if (this.required && this._files.length === 0) {
2309
+ this.inputElement?.setCustomValidity(this.$t('validityRequired'));
2310
+ this.validationMessage = this.$t('validityRequired');
2311
+ }
2312
+ else {
2313
+ this.inputElement?.setCustomValidity('');
2314
+ this.validationMessage = '';
2315
+ }
2316
+ this.formControlController.updateValidity();
2317
+ }
2318
+ get validity() {
2319
+ return this.inputElement?.validity;
2320
+ }
2321
+ _handleFileChange(e) {
2322
+ const input = e.target;
2323
+ const fileList = input.files;
2324
+ if (!fileList || fileList.length === 0)
2325
+ return;
2326
+ const newFiles = Array.from(fileList);
2327
+ newFiles.forEach((file) => {
2328
+ const id = this.addFile(file);
2329
+ if (file.type.startsWith('image/') && (this.imagePreview || this.variant === 'gallery')) {
2330
+ const reader = new FileReader();
2331
+ reader.onload = (ev) => {
2332
+ this.setFileThumbnail(id, ev.target?.result);
2333
+ if (this.autoSuccess)
2334
+ this.setFileStatus(id, 'success');
2335
+ };
2336
+ reader.readAsDataURL(file);
2337
+ }
2338
+ else if (this.autoSuccess) {
2339
+ this.setFileStatus(id, 'success');
2340
+ }
2341
+ });
2342
+ // Reset the native input so the same file can be re-selected
2343
+ input.value = '';
2344
+ this._validateFiles();
2345
+ this.dispatchEvent(new CustomEvent('it-upload-add', {
2346
+ detail: { files: newFiles, name: this.name, id: this.id },
2347
+ bubbles: true,
2348
+ composed: true,
2349
+ }));
2350
+ this.dispatchEvent(new CustomEvent('it-change', {
2351
+ detail: { files: this._files.map((f) => f._raw), name: this.name, id: this.id },
2352
+ bubbles: true,
2353
+ composed: true,
2354
+ }));
2355
+ }
2356
+ _handleRemove(id, name) {
2357
+ this.removeFile(id);
2358
+ this.dispatchEvent(new CustomEvent('it-upload-remove', {
2359
+ detail: { id, name, componentName: this.name, componentId: this.id },
2360
+ bubbles: true,
2361
+ composed: true,
2362
+ }));
2363
+ this.dispatchEvent(new CustomEvent('it-change', {
2364
+ detail: { files: this._files.map((f) => f._raw), name: this.name, id: this.id },
2365
+ bubbles: true,
2366
+ composed: true,
2367
+ }));
2368
+ }
2369
+ _getStatusLabel(status) {
2370
+ switch (status) {
2371
+ case 'loading':
2372
+ return this.$t('upload_status_loading');
2373
+ case 'success':
2374
+ return this.$t('upload_status_success');
2375
+ case 'error':
2376
+ default:
2377
+ return this.$t('upload_status_error');
2378
+ }
2379
+ }
2380
+ _getRemoveLabel(f) {
2381
+ let key;
2382
+ switch (f.status) {
2383
+ case 'loading':
2384
+ key = 'upload_remove_loading';
2385
+ break;
2386
+ case 'error':
2387
+ key = 'upload_remove_error';
2388
+ break;
2389
+ case 'success':
2390
+ default:
2391
+ key = 'upload_remove_done';
2392
+ break;
2393
+ }
2394
+ const template = this.$t(key);
2395
+ return template.replace('{name}', f.name);
2396
+ }
2397
+ // eslint-disable-next-line class-methods-use-this
2398
+ _iconForStatus(status) {
2399
+ switch (status) {
2400
+ case 'loading':
2401
+ case 'success':
2402
+ return 'it-file';
2403
+ case 'error':
2404
+ default:
2405
+ return 'it-close-circle';
2406
+ }
2407
+ }
2408
+ // eslint-disable-next-line class-methods-use-this
2409
+ _colorForStatus(status) {
2410
+ switch (status) {
2411
+ case 'success':
2412
+ return 'success';
2413
+ case 'error':
2414
+ return 'danger';
2415
+ default:
2416
+ return 'secondary';
2417
+ }
2418
+ }
2419
+ // eslint-disable-next-line class-methods-use-this
2420
+ _actionIconForStatus(status) {
2421
+ return status === 'success' ? 'it-check' : 'it-close';
2422
+ }
2423
+ _renderFileItem(f) {
2424
+ const liClass = this.composeClass('upload-file', f.status === 'loading' ? 'uploading' : f.status);
2425
+ const statusLabel = this._getStatusLabel(f.status);
2426
+ const removeLabel = this._getRemoveLabel(f);
2427
+ return html `
2428
+ <li class="${liClass}" role="listitem">
2429
+ ${when(this.imagePreview && f.thumbnail, () => html `
2430
+ <div class="upload-image">
2431
+ <img src="${f.thumbnail}" alt="${f.name}" />
2432
+ </div>
2433
+ `, () => html `<it-icon
2434
+ name="${this._iconForStatus(f.status)}"
2435
+ size="sm"
2436
+ color="${this._colorForStatus(f.status)}"
2437
+ aria-hidden="true"
2438
+ ></it-icon>`)}
2439
+ <p>
2440
+ <span class="visually-hidden">${statusLabel}</span>${f.name}${when(f.status === 'success', () => html `<span class="upload-file-weight">${formatSize(f.size)}</span>`)}
2441
+ </p>
2442
+
2443
+ ${when(f.status === 'success', () => html `
2444
+ <div class="upload-file-actions" part="file-status-indicator">
2445
+ <it-icon
2446
+ name="it-check"
2447
+ size="xs"
2448
+ color="success"
2449
+ aria-hidden="true"
2450
+ class="upload-file-success"
2451
+ ></it-icon>
2452
+ <button
2453
+ part="file-remove-button"
2454
+ type="button"
2455
+ @click="${() => this._handleRemove(f.id, f.name)}"
2456
+ ?disabled="${this.disabled}"
2457
+ >
2458
+ <span class="visually-hidden">${removeLabel}</span>
2459
+ <it-icon name="it-close" aria-hidden="true" color="secondary"></it-icon>
2460
+ </button>
2461
+ </div>
2462
+ `, () => html `
2463
+ <button
2464
+ part="file-remove-button"
2465
+ type="button"
2466
+ @click="${() => this._handleRemove(f.id, f.name)}"
2467
+ ?disabled="${this.disabled}"
2468
+ >
2469
+ <span class="visually-hidden">${removeLabel}</span>
2470
+ <it-icon
2471
+ name="${this._actionIconForStatus(f.status)}"
2472
+ color="${this._colorForStatus(f.status)}"
2473
+ aria-hidden="true"
2474
+ ></it-icon>
2475
+ </button>
2476
+ `)}
2477
+ ${when(f.status === 'loading', () => html ` <it-progress type="line" .value="${f.progress ?? 0}" it-aria-label="${f.name}"></it-progress> `)}
2478
+ </li>
2479
+ `;
2480
+ }
2481
+ _renderGalleryItem(f) {
2482
+ // NOTE: BSI reference HTML does not include a remove button for gallery items.
2483
+ // Added here as a critical accessibility addition: without it there is no way
2484
+ // to remove a photo once added (WCAG 2.1 SC 3.3.4 Error Prevention).
2485
+ const removeLabel = this._getRemoveLabel(f);
2486
+ return html `
2487
+ <li class="upload-image" role="listitem">
2488
+ ${when(f.thumbnail, () => html `<img src="${f.thumbnail}" alt="${f.name}" />`)}
2489
+ <button
2490
+ part="gallery-remove-button"
2491
+ type="button"
2492
+ class="btn btn-primary btn-icon btn-xs upload-image-remove"
2493
+ @click="${() => this._handleRemove(f.id, f.name)}"
2494
+ ?disabled="${this.disabled}"
2495
+ >
2496
+ <span class="visually-hidden">${removeLabel}</span>
2497
+ <it-icon name="it-close" size="xs" color="inverse" aria-hidden="true"></it-icon>
2498
+ </button>
2499
+ </li>
2500
+ `;
2501
+ }
2502
+ _renderFileList() {
2503
+ if (this._files.length === 0)
2504
+ return nothing;
2505
+ if (this.variant === 'gallery') {
2506
+ return html ` ${this._files.map((f) => this._renderGalleryItem(f))} `;
2507
+ }
2508
+ const listClass = this.composeClass('upload-file-list', this.imagePreview ? 'upload-file-list-image' : '');
2509
+ return html `
2510
+ <ul class="${listClass}" aria-label="${this.$t('upload_file_list_label')}" role="list">
2511
+ ${this._files.map((f) => this._renderFileItem(f))}
2512
+ </ul>
2513
+ `;
2514
+ }
2515
+ _renderUploadInput() {
2516
+ const inputId = this._id;
2517
+ const labelText = this.variant === 'gallery' ? this.$t('upload_gallery_label') : this.$t('upload_label');
2518
+ const showValidation = this.formControlController.submittedOnce;
2519
+ const isInvalid = showValidation && this.validationMessage.length > 0;
2520
+ return html `
2521
+ <div class="form-group">
2522
+ <input
2523
+ type="file"
2524
+ class="upload it-form__control"
2525
+ id="${inputId}"
2526
+ name="${this.name}"
2527
+ ?multiple="${this.multiple}"
2528
+ accept="${ifDefined(this.accept)}"
2529
+ ?disabled="${this.disabled}"
2530
+ ?required="${this.required && this._files.length === 0}"
2531
+ aria-invalid="${isInvalid ? 'true' : 'false'}"
2532
+ aria-describedby="${ifDefined(isInvalid ? `invalid-feedback-${inputId}` : undefined)}"
2533
+ @change="${this._handleFileChange}"
2534
+ />
2535
+ <label part="input-label" for="${inputId}">
2536
+ <slot name="icon">
2537
+ <it-icon
2538
+ name="${this.variant === 'gallery' ? 'it-plus' : 'it-upload'}"
2539
+ size="${this.variant === 'gallery' ? 'lg' : 'sm'}"
2540
+ aria-hidden="true"
2541
+ color="${this.variant === 'gallery' ? 'primary' : 'inverse'}"
2542
+ ></it-icon>
2543
+ </slot>
2544
+ <slot name="label">${labelText}</slot>
2545
+ </label>
2546
+
2547
+ ${when(this.supportText, () => html `<small class="form-text">${this.supportText}</small>`)}
2548
+
2549
+ <div
2550
+ role="alert"
2551
+ id="invalid-feedback-${inputId}"
2552
+ class="invalid-feedback form-feedback form-text just-validate-error-label"
2553
+ ?hidden=${!isInvalid}
2554
+ >
2555
+ ${isInvalid ? html `<span class="visually-hidden">${this.label}: </span>${this.validationMessage}` : nothing}
2556
+ </div>
2557
+ </div>
2558
+ `;
2559
+ }
2560
+ render() {
2561
+ if (this.variant === 'gallery') {
2562
+ return html `
2563
+ <ul class="upload-pictures-wall" role="list">
2564
+ ${this._renderFileList()}
2565
+ <li>${this._renderUploadInput()}</li>
2566
+ </ul>
2567
+ `;
2568
+ }
2569
+ return html ` ${this._renderUploadInput()} ${this._renderFileList()} `;
2570
+ }
2571
+ };
2572
+ ItUpload.styles = styles;
2573
+ __decorate([
2574
+ query('.it-form__control'),
2575
+ __metadata("design:type", HTMLInputElement)
2576
+ ], ItUpload.prototype, "inputElement", void 0);
2577
+ __decorate([
2578
+ queryAssignedElements({ slot: 'label' }),
2579
+ __metadata("design:type", Array)
2580
+ ], ItUpload.prototype, "labelElements", void 0);
2581
+ __decorate([
2582
+ property({ type: Boolean, reflect: true }),
2583
+ __metadata("design:type", Object)
2584
+ ], ItUpload.prototype, "multiple", void 0);
2585
+ __decorate([
2586
+ property({ type: String }),
2587
+ __metadata("design:type", String)
2588
+ ], ItUpload.prototype, "accept", void 0);
2589
+ __decorate([
2590
+ property({ type: Boolean, attribute: 'image-preview' }),
2591
+ __metadata("design:type", Object)
2592
+ ], ItUpload.prototype, "imagePreview", void 0);
2593
+ __decorate([
2594
+ property({ type: String, reflect: true }),
2595
+ __metadata("design:type", String)
2596
+ ], ItUpload.prototype, "variant", void 0);
2597
+ __decorate([
2598
+ property({ type: String, attribute: 'support-text' }),
2599
+ __metadata("design:type", Object)
2600
+ ], ItUpload.prototype, "supportText", void 0);
2601
+ __decorate([
2602
+ property({ type: Boolean, attribute: 'auto-success' }),
2603
+ __metadata("design:type", Object)
2604
+ ], ItUpload.prototype, "autoSuccess", void 0);
2605
+ __decorate([
2606
+ state(),
2607
+ __metadata("design:type", Array)
2608
+ ], ItUpload.prototype, "_files", void 0);
2609
+ ItUpload = __decorate([
2610
+ customElement('it-upload')
2611
+ ], ItUpload);
2612
+
2613
+ export { ItUpload };
2614
+ //# sourceMappingURL=it-upload.js.map