@italia/stepper 1.0.0-alpha.18
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 +33 -0
- package/custom-elements.json +923 -0
- package/dist/src/index.d.ts +5 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +13 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/it-stepper-step.d.ts +50 -0
- package/dist/src/it-stepper-step.d.ts.map +1 -0
- package/dist/src/it-stepper-step.js +83 -0
- package/dist/src/it-stepper-step.js.map +1 -0
- package/dist/src/it-stepper.d.ts +116 -0
- package/dist/src/it-stepper.d.ts.map +1 -0
- package/dist/src/it-stepper.js +1648 -0
- package/dist/src/it-stepper.js.map +1 -0
- package/dist/src/locales/en.d.ts +4 -0
- package/dist/src/locales/en.d.ts.map +1 -0
- package/dist/src/locales/it.d.ts +4 -0
- package/dist/src/locales/it.d.ts.map +1 -0
- package/dist/src/types.d.ts +5 -0
- package/dist/src/types.d.ts.map +1 -0
- package/package.json +75 -0
- package/styles/globals.scss +20 -0
|
@@ -0,0 +1,1648 @@
|
|
|
1
|
+
import { r as registerTranslation, _ as __decorate, a as __metadata, b as BaseLocalizedComponent } from '../index-DMWjPohx.js';
|
|
2
|
+
import { css, html, nothing } from 'lit';
|
|
3
|
+
import { property, customElement } from 'lit/decorators.js';
|
|
4
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
5
|
+
import 'lit/directive.js';
|
|
6
|
+
|
|
7
|
+
var styles = css`@charset "UTF-8";
|
|
8
|
+
.visually-hidden,
|
|
9
|
+
.visually-hidden-focusable:not(:focus):not(:focus-within) {
|
|
10
|
+
position: absolute !important;
|
|
11
|
+
width: 1px !important;
|
|
12
|
+
height: 1px !important;
|
|
13
|
+
padding: 0 !important;
|
|
14
|
+
margin: -1px !important;
|
|
15
|
+
overflow: hidden !important;
|
|
16
|
+
clip: rect(0, 0, 0, 0) !important;
|
|
17
|
+
white-space: nowrap !important;
|
|
18
|
+
border: 0 !important;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.d-flex {
|
|
22
|
+
display: flex !important;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.bg-dark {
|
|
26
|
+
--bsi-bg-opacity: 1;
|
|
27
|
+
background-color: rgba(var(--bsi-dark-rgb), var(--bsi-bg-opacity)) !important;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.border-top {
|
|
31
|
+
border-top: var(--bsi-border-base) var(--bsi-border-style) var(--bsi-border-color) !important;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.mt-2 {
|
|
35
|
+
margin-top: 0.5rem !important;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.me-3 {
|
|
39
|
+
margin-right: 1rem !important;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.mb-0 {
|
|
43
|
+
margin-bottom: 0 !important;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.mb-2 {
|
|
47
|
+
margin-bottom: 0.5rem !important;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.mb-3 {
|
|
51
|
+
margin-bottom: 1rem !important;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.pt-3 {
|
|
55
|
+
padding-top: 1rem !important;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.text-end {
|
|
59
|
+
text-align: right !important;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.text-muted {
|
|
63
|
+
--bsi-text-opacity: 1;
|
|
64
|
+
color: hsl(210, 17%, 44%) !important;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@media (min-width: 576px) {
|
|
68
|
+
.me-sm-3 {
|
|
69
|
+
margin-right: 1rem !important;
|
|
70
|
+
}
|
|
71
|
+
.mb-sm-0 {
|
|
72
|
+
margin-bottom: 0 !important;
|
|
73
|
+
}
|
|
74
|
+
.mb-sm-2 {
|
|
75
|
+
margin-bottom: 0.5rem !important;
|
|
76
|
+
}
|
|
77
|
+
.mb-sm-3 {
|
|
78
|
+
margin-bottom: 1rem !important;
|
|
79
|
+
}
|
|
80
|
+
.text-sm-end {
|
|
81
|
+
text-align: right !important;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
@media (min-width: 768px) {
|
|
85
|
+
.me-md-3 {
|
|
86
|
+
margin-right: 1rem !important;
|
|
87
|
+
}
|
|
88
|
+
.mb-md-0 {
|
|
89
|
+
margin-bottom: 0 !important;
|
|
90
|
+
}
|
|
91
|
+
.mb-md-2 {
|
|
92
|
+
margin-bottom: 0.5rem !important;
|
|
93
|
+
}
|
|
94
|
+
.mb-md-3 {
|
|
95
|
+
margin-bottom: 1rem !important;
|
|
96
|
+
}
|
|
97
|
+
.text-md-end {
|
|
98
|
+
text-align: right !important;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
@media (min-width: 992px) {
|
|
102
|
+
.me-lg-3 {
|
|
103
|
+
margin-right: 1rem !important;
|
|
104
|
+
}
|
|
105
|
+
.mb-lg-0 {
|
|
106
|
+
margin-bottom: 0 !important;
|
|
107
|
+
}
|
|
108
|
+
.mb-lg-2 {
|
|
109
|
+
margin-bottom: 0.5rem !important;
|
|
110
|
+
}
|
|
111
|
+
.mb-lg-3 {
|
|
112
|
+
margin-bottom: 1rem !important;
|
|
113
|
+
}
|
|
114
|
+
.text-lg-end {
|
|
115
|
+
text-align: right !important;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
@media (min-width: 1200px) {
|
|
119
|
+
.me-xl-3 {
|
|
120
|
+
margin-right: 1rem !important;
|
|
121
|
+
}
|
|
122
|
+
.mb-xl-0 {
|
|
123
|
+
margin-bottom: 0 !important;
|
|
124
|
+
}
|
|
125
|
+
.mb-xl-2 {
|
|
126
|
+
margin-bottom: 0.5rem !important;
|
|
127
|
+
}
|
|
128
|
+
.mb-xl-3 {
|
|
129
|
+
margin-bottom: 1rem !important;
|
|
130
|
+
}
|
|
131
|
+
.text-xl-end {
|
|
132
|
+
text-align: right !important;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
@media (min-width: 1400px) {
|
|
136
|
+
.me-xxl-3 {
|
|
137
|
+
margin-right: 1rem !important;
|
|
138
|
+
}
|
|
139
|
+
.mb-xxl-0 {
|
|
140
|
+
margin-bottom: 0 !important;
|
|
141
|
+
}
|
|
142
|
+
.mb-xxl-2 {
|
|
143
|
+
margin-bottom: 0.5rem !important;
|
|
144
|
+
}
|
|
145
|
+
.mb-xxl-3 {
|
|
146
|
+
margin-bottom: 1rem !important;
|
|
147
|
+
}
|
|
148
|
+
.text-xxl-end {
|
|
149
|
+
text-align: right !important;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
@media print {
|
|
153
|
+
.d-print-flex {
|
|
154
|
+
display: flex !important;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
it-button {
|
|
158
|
+
--it-host-display: inline-block;
|
|
159
|
+
display: var(--it-host-display);
|
|
160
|
+
width: auto;
|
|
161
|
+
cursor: default !important;
|
|
162
|
+
}
|
|
163
|
+
it-button:not(:defined) {
|
|
164
|
+
--it-host-display: inline-flex;
|
|
165
|
+
align-items: center;
|
|
166
|
+
}
|
|
167
|
+
it-button:not(:defined):has(it-progress) {
|
|
168
|
+
position: relative;
|
|
169
|
+
}
|
|
170
|
+
it-button:not(:defined):has(it-progress) it-progress {
|
|
171
|
+
--it-fouc-bg: #ccc;
|
|
172
|
+
}
|
|
173
|
+
it-button it-progress {
|
|
174
|
+
position: absolute;
|
|
175
|
+
bottom: 0;
|
|
176
|
+
left: 0;
|
|
177
|
+
display: block;
|
|
178
|
+
width: 100%;
|
|
179
|
+
}
|
|
180
|
+
it-button it-progress::part(progress) {
|
|
181
|
+
--bsi-progress-border-radius: 0 0 var(--bsi-radius-smooth) var(--bsi-radius-smooth);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.bg-dark it-button::part(link) {
|
|
185
|
+
--bsi-btn-text-color: var(--bsi-color-text-inverse);
|
|
186
|
+
--bsi-color-link-hover: var(--bsi-color-text-inverse);
|
|
187
|
+
}
|
|
188
|
+
.bg-dark it-button::part(primary) {
|
|
189
|
+
--bsi-btn-text-color: var(--bsi-color-text-primary);
|
|
190
|
+
--bsi-btn-background: var(--bsi-color-background-inverse);
|
|
191
|
+
}
|
|
192
|
+
.bg-dark it-button::part(primary):hover {
|
|
193
|
+
--bsi-btn-background: color-mix(in srgb, var(--bsi-color-background-inverse) 85%, black);
|
|
194
|
+
}
|
|
195
|
+
.bg-dark it-button::part(primary):active {
|
|
196
|
+
--bsi-btn-background: color-mix(in srgb, var(--bsi-color-background-inverse) 80%, black);
|
|
197
|
+
}
|
|
198
|
+
.bg-dark it-button[variant=primary][outline]::part(button) {
|
|
199
|
+
--bsi-btn-background: transparent;
|
|
200
|
+
--bsi-btn-outline-border-color: var(--bsi-color-border-inverse);
|
|
201
|
+
--bsi-btn-text-color: var(--bsi-color-text-inverse);
|
|
202
|
+
}
|
|
203
|
+
.bg-dark it-button[variant=primary][outline]::part(button):hover {
|
|
204
|
+
--btn-boxshadow-color-darken: color-mix(in srgb, var(--bsi-color-border-inverse) 80%, black);
|
|
205
|
+
--btn-boxshadow-color-desaturated: color-mix(in srgb, var(--btn-boxshadow-color-darken) 80%, gray);
|
|
206
|
+
--bsi-btn-outline-border-color: var(
|
|
207
|
+
--btn-boxshadow-color-desaturated
|
|
208
|
+
);
|
|
209
|
+
}
|
|
210
|
+
.bg-dark it-button::part(secondary) {
|
|
211
|
+
--bsi-btn-text-color: var(--bsi-color-text-inverse);
|
|
212
|
+
--bsi-btn-background: var(--bsi-color-background-secondary);
|
|
213
|
+
}
|
|
214
|
+
.bg-dark it-button::part(secondary):hover, .bg-dark it-button::part(secondary):active {
|
|
215
|
+
--bsi-btn-background: color-mix(in srgb, var(--bsi-color-background-secondary) 85%, black);
|
|
216
|
+
}
|
|
217
|
+
.bg-dark it-button[variant=secondary][outline]::part(button) {
|
|
218
|
+
--bsi-btn-background: transparent;
|
|
219
|
+
--bsi-btn-text-color: var(--bsi-color-text-inverse);
|
|
220
|
+
}
|
|
221
|
+
.bg-dark it-button[variant=secondary][outline]::part(button):hover, .bg-dark it-button[variant=secondary][outline]::part(button):active {
|
|
222
|
+
--btn-boxshadow-color-darken: color-mix(in srgb, var(--bsi-color-background-secondary) 80%, black);
|
|
223
|
+
--btn-boxshadow-color-desaturated: color-mix(in srgb, var(--btn-boxshadow-color-darken) 80%, gray);
|
|
224
|
+
--bsi-btn-outline-border-color: var(
|
|
225
|
+
--btn-boxshadow-color-desaturated
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
*,
|
|
230
|
+
*::before,
|
|
231
|
+
*::after {
|
|
232
|
+
box-sizing: border-box;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
236
|
+
:root {
|
|
237
|
+
scroll-behavior: smooth;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
body {
|
|
242
|
+
margin: 0;
|
|
243
|
+
-webkit-text-size-adjust: 100%;
|
|
244
|
+
-webkit-tap-highlight-color: hsla(0, 0%, 0%, 0);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
hr {
|
|
248
|
+
margin: 1rem 0;
|
|
249
|
+
color: inherit;
|
|
250
|
+
border: 0;
|
|
251
|
+
border-top: 1px solid;
|
|
252
|
+
opacity: 0.25;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
p {
|
|
256
|
+
margin-top: 0;
|
|
257
|
+
margin-bottom: var(--bsi-paragraph-spacing);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
abbr[title] {
|
|
261
|
+
text-decoration: underline dotted;
|
|
262
|
+
cursor: help;
|
|
263
|
+
text-decoration-skip-ink: none;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
address {
|
|
267
|
+
margin-bottom: var(--bsi-spacing-s);
|
|
268
|
+
font-style: normal;
|
|
269
|
+
line-height: inherit;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
ol,
|
|
273
|
+
ul {
|
|
274
|
+
padding-left: var(--bsi-spacing-l);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
ol,
|
|
278
|
+
ul,
|
|
279
|
+
dl {
|
|
280
|
+
margin-top: 0;
|
|
281
|
+
margin-bottom: var(--bsi-spacing-s);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
ol ol,
|
|
285
|
+
ul ul,
|
|
286
|
+
ol ul,
|
|
287
|
+
ul ol {
|
|
288
|
+
margin-bottom: 0;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
dt {
|
|
292
|
+
font-weight: var(--bsi-font-weight-strong);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
dd {
|
|
296
|
+
margin-bottom: var(--bsi-spacing-xxs);
|
|
297
|
+
margin-left: 0;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
blockquote {
|
|
301
|
+
margin: 0 0 var(--bsi-spacing-s);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
sub,
|
|
305
|
+
sup {
|
|
306
|
+
position: relative;
|
|
307
|
+
font-size: var(--bsi-font-size-1);
|
|
308
|
+
line-height: 0;
|
|
309
|
+
vertical-align: baseline;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
sub {
|
|
313
|
+
bottom: -0.25em;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
sup {
|
|
317
|
+
top: -0.5em;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
a {
|
|
321
|
+
color: var(--bsi-color-link);
|
|
322
|
+
text-decoration: underline;
|
|
323
|
+
text-decoration-skip-ink: auto;
|
|
324
|
+
text-underline-offset: 2px;
|
|
325
|
+
}
|
|
326
|
+
a:hover {
|
|
327
|
+
color: var(--bsi-color-link-hover);
|
|
328
|
+
cursor: pointer;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
pre,
|
|
332
|
+
code,
|
|
333
|
+
kbd,
|
|
334
|
+
samp {
|
|
335
|
+
font-size: 1em;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
pre {
|
|
339
|
+
display: block;
|
|
340
|
+
margin-top: 0;
|
|
341
|
+
margin-bottom: var(--bsi-paragraph-spacing);
|
|
342
|
+
overflow: auto;
|
|
343
|
+
}
|
|
344
|
+
pre code {
|
|
345
|
+
word-break: normal;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
a > code {
|
|
349
|
+
color: inherit;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
figure {
|
|
353
|
+
margin: 0 0 1rem;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
img,
|
|
357
|
+
svg {
|
|
358
|
+
vertical-align: middle;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
table {
|
|
362
|
+
caption-side: bottom;
|
|
363
|
+
border-collapse: collapse;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
caption {
|
|
367
|
+
padding-top: 0.5rem;
|
|
368
|
+
padding-bottom: 0.5rem;
|
|
369
|
+
color: hsl(210, 17%, 44%);
|
|
370
|
+
text-align: left;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
th {
|
|
374
|
+
text-align: inherit;
|
|
375
|
+
text-align: -webkit-match-parent;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
thead,
|
|
379
|
+
tbody,
|
|
380
|
+
tfoot,
|
|
381
|
+
tr,
|
|
382
|
+
td,
|
|
383
|
+
th {
|
|
384
|
+
border-color: inherit;
|
|
385
|
+
border-style: solid;
|
|
386
|
+
border-width: 0;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
label {
|
|
390
|
+
display: inline-block;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
button {
|
|
394
|
+
border-radius: 0;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
button:focus:not(:focus-visible) {
|
|
398
|
+
outline: 0;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
input,
|
|
402
|
+
button,
|
|
403
|
+
select,
|
|
404
|
+
optgroup,
|
|
405
|
+
textarea {
|
|
406
|
+
margin: 0;
|
|
407
|
+
font-family: inherit;
|
|
408
|
+
font-size: inherit;
|
|
409
|
+
line-height: inherit;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
button,
|
|
413
|
+
select {
|
|
414
|
+
text-transform: none;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
[role=button] {
|
|
418
|
+
cursor: pointer;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
select {
|
|
422
|
+
word-wrap: normal;
|
|
423
|
+
}
|
|
424
|
+
select:disabled {
|
|
425
|
+
opacity: 1;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
[list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator {
|
|
429
|
+
display: none !important;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
button,
|
|
433
|
+
[type=button],
|
|
434
|
+
[type=reset],
|
|
435
|
+
[type=submit] {
|
|
436
|
+
-webkit-appearance: button;
|
|
437
|
+
}
|
|
438
|
+
button:not(:disabled),
|
|
439
|
+
[type=button]:not(:disabled),
|
|
440
|
+
[type=reset]:not(:disabled),
|
|
441
|
+
[type=submit]:not(:disabled) {
|
|
442
|
+
cursor: pointer;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
::-moz-focus-inner {
|
|
446
|
+
padding: 0;
|
|
447
|
+
border-style: none;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
textarea {
|
|
451
|
+
resize: vertical;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
fieldset {
|
|
455
|
+
min-width: 0;
|
|
456
|
+
padding: 0;
|
|
457
|
+
margin: 0;
|
|
458
|
+
border: 0;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
::-webkit-datetime-edit-fields-wrapper,
|
|
462
|
+
::-webkit-datetime-edit-text,
|
|
463
|
+
::-webkit-datetime-edit-minute,
|
|
464
|
+
::-webkit-datetime-edit-hour-field,
|
|
465
|
+
::-webkit-datetime-edit-day-field,
|
|
466
|
+
::-webkit-datetime-edit-month-field,
|
|
467
|
+
::-webkit-datetime-edit-year-field {
|
|
468
|
+
padding: 0;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
::-webkit-inner-spin-button {
|
|
472
|
+
height: auto;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
[type=search] {
|
|
476
|
+
outline-offset: -2px;
|
|
477
|
+
-webkit-appearance: textfield;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
/* rtl:raw:
|
|
481
|
+
[type="tel"],
|
|
482
|
+
[type="url"],
|
|
483
|
+
[type="email"],
|
|
484
|
+
[type="number"] {
|
|
485
|
+
direction: ltr;
|
|
486
|
+
}
|
|
487
|
+
*/
|
|
488
|
+
::-webkit-search-decoration {
|
|
489
|
+
-webkit-appearance: none;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
::-webkit-color-swatch-wrapper {
|
|
493
|
+
padding: 0;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
::file-selector-button {
|
|
497
|
+
font: inherit;
|
|
498
|
+
-webkit-appearance: button;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
output {
|
|
502
|
+
display: inline-block;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
iframe {
|
|
506
|
+
border: 0;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
summary {
|
|
510
|
+
display: list-item;
|
|
511
|
+
cursor: pointer;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
progress {
|
|
515
|
+
vertical-align: baseline;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
[hidden] {
|
|
519
|
+
display: none !important;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
body {
|
|
523
|
+
font-family: var(--bsi-font-sans);
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
p,
|
|
527
|
+
ul,
|
|
528
|
+
ol,
|
|
529
|
+
dl {
|
|
530
|
+
font-size: var(--bsi-body-font-size);
|
|
531
|
+
line-height: var(--bsi-body-leading);
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
caption,
|
|
535
|
+
figcaption {
|
|
536
|
+
font-size: var(--bsi-caption-font-size);
|
|
537
|
+
line-height: var(--bsi-caption-leading);
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
b,
|
|
541
|
+
strong {
|
|
542
|
+
font-weight: var(--bsi-font-weight-strong);
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
mark,
|
|
546
|
+
code {
|
|
547
|
+
padding: 0 var(--bsi-spacing-3xs);
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
mark {
|
|
551
|
+
background-color: var(--bsi-highlight-background);
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
pre,
|
|
555
|
+
code,
|
|
556
|
+
kbd,
|
|
557
|
+
samp {
|
|
558
|
+
border-radius: var(--bsi-radius-smooth);
|
|
559
|
+
font-family: var(--bsi-font-mono);
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
ins,
|
|
563
|
+
del {
|
|
564
|
+
position: relative;
|
|
565
|
+
display: flex;
|
|
566
|
+
align-items: center;
|
|
567
|
+
padding: var(--bsi-spacing-3xs) var(--bsi-spacing-m);
|
|
568
|
+
font: var(--bsi-body-font-size);
|
|
569
|
+
text-decoration: none;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
ins {
|
|
573
|
+
background-color: var(--bsi-ins-background);
|
|
574
|
+
text-decoration: none;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
del {
|
|
578
|
+
background-color: var(--bsi-del-background);
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
del::before,
|
|
582
|
+
ins::before {
|
|
583
|
+
position: absolute;
|
|
584
|
+
left: 0.5rem;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
del::before {
|
|
588
|
+
content: "−";
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
ins::before {
|
|
592
|
+
content: "+";
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
kbd {
|
|
596
|
+
margin: 0 2px;
|
|
597
|
+
padding: 2px var(--bsi-spacing-3xs);
|
|
598
|
+
border: var(--bsi-border-base) solid var(--bsi-color-border-subtle);
|
|
599
|
+
background-color: var(--bsi-color-background-secondary-lighter);
|
|
600
|
+
box-shadow: var(--bsi-elevation-low), 0 2px 0 0 hsla(255, 0%, 100%, 0.7) inset;
|
|
601
|
+
color: var(--bsi-color-text-secondary);
|
|
602
|
+
font-size: var(--bsi-font-size-1);
|
|
603
|
+
font-weight: var(--bsi-font-weight-solid);
|
|
604
|
+
white-space: nowrap;
|
|
605
|
+
}
|
|
606
|
+
kbd kbd {
|
|
607
|
+
padding: 0;
|
|
608
|
+
font-size: var(--bsi-code-font-size);
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
small,
|
|
612
|
+
.small {
|
|
613
|
+
font-size: var(--bsi-caption-font-size);
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
.x-small {
|
|
617
|
+
font-size: var(--bsi-font-size-1);
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
h1,
|
|
621
|
+
.h1 {
|
|
622
|
+
font-size: var(--bsi-heading-1-font-size);
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
h2,
|
|
626
|
+
.h2 {
|
|
627
|
+
font-size: var(--bsi-heading-2-font-size);
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
h3,
|
|
631
|
+
.h3 {
|
|
632
|
+
font-size: var(--bsi-heading-3-font-size);
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
h4,
|
|
636
|
+
.h4 {
|
|
637
|
+
font-size: var(--bsi-heading-4-font-size);
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
h5,
|
|
641
|
+
.h5 {
|
|
642
|
+
font-size: var(--bsi-heading-5-font-size);
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
h6,
|
|
646
|
+
.h6 {
|
|
647
|
+
font-size: var(--bsi-heading-6-font-size);
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
h1,
|
|
651
|
+
.h1,
|
|
652
|
+
h2,
|
|
653
|
+
.h2,
|
|
654
|
+
h3,
|
|
655
|
+
.h3,
|
|
656
|
+
h4,
|
|
657
|
+
.h4,
|
|
658
|
+
h5,
|
|
659
|
+
.h5,
|
|
660
|
+
h6,
|
|
661
|
+
.h6 {
|
|
662
|
+
margin-top: 0;
|
|
663
|
+
margin-bottom: var(--bsi-heading-spacing);
|
|
664
|
+
line-height: var(--bsi-heading-leading);
|
|
665
|
+
}
|
|
666
|
+
:is(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) + h1, p + h1,
|
|
667
|
+
:is(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) + .h1,
|
|
668
|
+
p + .h1,
|
|
669
|
+
:is(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) + h2,
|
|
670
|
+
p + h2,
|
|
671
|
+
:is(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) + .h2,
|
|
672
|
+
p + .h2,
|
|
673
|
+
:is(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) + h3,
|
|
674
|
+
p + h3,
|
|
675
|
+
:is(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) + .h3,
|
|
676
|
+
p + .h3,
|
|
677
|
+
:is(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) + h4,
|
|
678
|
+
p + h4,
|
|
679
|
+
:is(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) + .h4,
|
|
680
|
+
p + .h4,
|
|
681
|
+
:is(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) + h5,
|
|
682
|
+
p + h5,
|
|
683
|
+
:is(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) + .h5,
|
|
684
|
+
p + .h5,
|
|
685
|
+
:is(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) + h6,
|
|
686
|
+
p + h6,
|
|
687
|
+
:is(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) + .h6,
|
|
688
|
+
p + .h6 {
|
|
689
|
+
padding-top: var(--bsi-spacing-s);
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
h1,
|
|
693
|
+
h2,
|
|
694
|
+
h3,
|
|
695
|
+
.h1,
|
|
696
|
+
.h2,
|
|
697
|
+
.h3 {
|
|
698
|
+
font-weight: var(--bsi-heading-font-weight);
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
h4,
|
|
702
|
+
h5,
|
|
703
|
+
h6,
|
|
704
|
+
.h4,
|
|
705
|
+
.h5,
|
|
706
|
+
.h6 {
|
|
707
|
+
font-weight: var(--bsi-heading-font-weight-weak);
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
h1,
|
|
711
|
+
.h1,
|
|
712
|
+
.display-1 {
|
|
713
|
+
letter-spacing: -1px;
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
.font-serif {
|
|
717
|
+
font-family: var(--bsi-font-serif) !important;
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
.font-sans-serif {
|
|
721
|
+
font-family: var(--bsi-font-sans) !important;
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
.font-monospace {
|
|
725
|
+
font-family: var(--bsi-font-mono) !important;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
.display-1 {
|
|
729
|
+
font-size: var(--bsi-display-font-size);
|
|
730
|
+
font-weight: var(--bsi-heading-font-weight);
|
|
731
|
+
line-height: var(--bsi-heading-leading);
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
.lead {
|
|
735
|
+
font-size: var(--bsi-lead-font-size);
|
|
736
|
+
font-weight: var(--bsi-lead-font-weight);
|
|
737
|
+
line-height: var(--bsi-lead-leading);
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
blockquote,
|
|
741
|
+
.blockquote {
|
|
742
|
+
margin: var(--bsi-spacing-m) 0;
|
|
743
|
+
margin-left: var(--bsi-spacin-inline-xs);
|
|
744
|
+
padding: var(--bsi-spacing-s);
|
|
745
|
+
border-left: var(--bsi-border-thick) solid var(--bsi-border-color-secondary);
|
|
746
|
+
font-size: var(--bsi-body-font-size);
|
|
747
|
+
line-height: var(--bsi-body-leading);
|
|
748
|
+
}
|
|
749
|
+
blockquote > :last-child,
|
|
750
|
+
.blockquote > :last-child {
|
|
751
|
+
margin-bottom: 0;
|
|
752
|
+
}
|
|
753
|
+
blockquote.text-end,
|
|
754
|
+
.blockquote.text-end {
|
|
755
|
+
margin-right: var(--bsi-spacin-inline-xs);
|
|
756
|
+
border-right: var(--bsi-border-thick) solid var(--bsi-border-color-secondary);
|
|
757
|
+
}
|
|
758
|
+
blockquote.text-center, blockquote.text-end, blockquote.blockquote-simple,
|
|
759
|
+
.blockquote.text-center,
|
|
760
|
+
.blockquote.text-end,
|
|
761
|
+
.blockquote.blockquote-simple {
|
|
762
|
+
margin-left: 0;
|
|
763
|
+
border-right: none;
|
|
764
|
+
border-left: none;
|
|
765
|
+
}
|
|
766
|
+
blockquote.text-center, blockquote.blockquote-simple,
|
|
767
|
+
.blockquote.text-center,
|
|
768
|
+
.blockquote.blockquote-simple {
|
|
769
|
+
padding: 0;
|
|
770
|
+
}
|
|
771
|
+
blockquote.blockquote-simple,
|
|
772
|
+
.blockquote.blockquote-simple {
|
|
773
|
+
font-style: italic;
|
|
774
|
+
}
|
|
775
|
+
blockquote.blockquote-card,
|
|
776
|
+
.blockquote.blockquote-card {
|
|
777
|
+
margin-left: 0;
|
|
778
|
+
padding: var(--bsi-spacing-m);
|
|
779
|
+
background-color: var(--bsi-color-background-inverse);
|
|
780
|
+
box-shadow: var(--bsi-elevation-low);
|
|
781
|
+
}
|
|
782
|
+
blockquote.blockquote-card .blockquote-footer,
|
|
783
|
+
.blockquote.blockquote-card .blockquote-footer {
|
|
784
|
+
font-size: inherit;
|
|
785
|
+
}
|
|
786
|
+
blockquote.blockquote-card .blockquote-footer:before,
|
|
787
|
+
.blockquote.blockquote-card .blockquote-footer:before {
|
|
788
|
+
content: none;
|
|
789
|
+
}
|
|
790
|
+
blockquote.blockquote-card.dark,
|
|
791
|
+
.blockquote.blockquote-card.dark {
|
|
792
|
+
border-left: none;
|
|
793
|
+
background-color: var(--bsi-color-background-primary);
|
|
794
|
+
color: var(--bsi-color-text-inverse);
|
|
795
|
+
}
|
|
796
|
+
blockquote.blockquote-card.dark .blockquote-footer,
|
|
797
|
+
.blockquote.blockquote-card.dark .blockquote-footer {
|
|
798
|
+
color: var(--bsi-color-text-inverse);
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
.blockquote-footer {
|
|
802
|
+
margin-top: 0;
|
|
803
|
+
margin-bottom: var(--bsi-spacing-s);
|
|
804
|
+
color: var(--bsi-color-text-secondary);
|
|
805
|
+
font-size: var(--bsi-label-font-size);
|
|
806
|
+
}
|
|
807
|
+
.blockquote-footer::before {
|
|
808
|
+
content: "— ";
|
|
809
|
+
}
|
|
810
|
+
.bg-dark .blockquote-footer {
|
|
811
|
+
color: var(--bsi-color-text-muted);
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
.initialism {
|
|
815
|
+
font-size: var(--bsi-label-font-size-s);
|
|
816
|
+
text-transform: uppercase;
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
.progress {
|
|
820
|
+
--bsi-progress-bg: var(--bsi-color-background-secondary-lighter);
|
|
821
|
+
--bsi-progress-border-radius: var(--bsi-radius-smooth);
|
|
822
|
+
--bsi-progress-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075);
|
|
823
|
+
--bsi-progress-label-color: var(--bsi-color-text-secondary);
|
|
824
|
+
--bsi-progress-label-font-size: var(--bsi-label-font-size-xs);
|
|
825
|
+
--bsi-progress-bar-transition: width 0.5s ease;
|
|
826
|
+
--bsi-progress-bar-bg: var(--bsi-color-background-secondary);
|
|
827
|
+
--bsi-progress-height: 4px;
|
|
828
|
+
--bsi-progress-bg: var(--bsi-color-background-secondary-lighter);
|
|
829
|
+
--bsi-progress-border-radius: var(--bsi-radius-smooth);
|
|
830
|
+
--bsi-progress-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075);
|
|
831
|
+
--bsi-progress-label-color: var(--bsi-color-text-secondary);
|
|
832
|
+
--bsi-progress-label-font-size: var(--bsi-label-font-size-xs);
|
|
833
|
+
--bsi-progress-bar-transition: width 0.5s ease;
|
|
834
|
+
--bsi-progress-bar-bg: var(--bsi-color-background-secondary);
|
|
835
|
+
--bsi-progress-height: 4px;
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
@keyframes progress-bar-stripes {
|
|
839
|
+
0% {
|
|
840
|
+
background-position-x: 16px;
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
.progress-bar-striped {
|
|
844
|
+
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
|
|
845
|
+
background-size: var(--bsi-progress-height) var(--bsi-progress-height);
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
.progress-bar-animated {
|
|
849
|
+
animation: 1s linear infinite progress-bar-stripes;
|
|
850
|
+
}
|
|
851
|
+
@media (prefers-reduced-motion: reduce) {
|
|
852
|
+
.progress-bar-animated {
|
|
853
|
+
animation: none;
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
@keyframes progressBarIndeterminate {
|
|
858
|
+
0% {
|
|
859
|
+
left: -5%;
|
|
860
|
+
}
|
|
861
|
+
50% {
|
|
862
|
+
width: 66%;
|
|
863
|
+
}
|
|
864
|
+
100% {
|
|
865
|
+
left: 100%;
|
|
866
|
+
width: 33%;
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
/* stylelint-disable-next-line no-duplicate-selectors */
|
|
870
|
+
.progress {
|
|
871
|
+
display: flex;
|
|
872
|
+
overflow: hidden;
|
|
873
|
+
background-color: var(--bsi-progress-bg);
|
|
874
|
+
border-radius: var(--bsi-progress-border-radius);
|
|
875
|
+
height: var(--bsi-progress-height);
|
|
876
|
+
box-shadow: none;
|
|
877
|
+
}
|
|
878
|
+
.progress.progress-color {
|
|
879
|
+
background-color: var(--bsi-color-background-secondary-lighter);
|
|
880
|
+
}
|
|
881
|
+
.progress.progress-indeterminate {
|
|
882
|
+
position: relative;
|
|
883
|
+
}
|
|
884
|
+
.progress.progress-indeterminate .progress-bar {
|
|
885
|
+
width: 0;
|
|
886
|
+
animation: progressBarIndeterminate 1.4s cubic-bezier(0.77, 0, 0.175, 1) infinite forwards;
|
|
887
|
+
position: absolute;
|
|
888
|
+
top: 0;
|
|
889
|
+
bottom: 0;
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
.progress-bar {
|
|
893
|
+
display: flex;
|
|
894
|
+
flex-direction: column;
|
|
895
|
+
justify-content: center;
|
|
896
|
+
overflow: hidden;
|
|
897
|
+
text-align: center;
|
|
898
|
+
white-space: nowrap;
|
|
899
|
+
transition: var(--bsi-progress-bar-transition);
|
|
900
|
+
}
|
|
901
|
+
@media (prefers-reduced-motion: reduce) {
|
|
902
|
+
.progress-bar {
|
|
903
|
+
transition: none;
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
.progress-bar {
|
|
907
|
+
background-color: var(--bsi-progress-bar-bg);
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
.progress-bar-label {
|
|
911
|
+
text-align: right;
|
|
912
|
+
font-size: var(--bsi-progress-label-font-size);
|
|
913
|
+
color: var(--bsi-progress-label-color);
|
|
914
|
+
font-weight: 500;
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
.btn-progress .progress {
|
|
918
|
+
display: block;
|
|
919
|
+
position: absolute;
|
|
920
|
+
bottom: 0;
|
|
921
|
+
width: 100%;
|
|
922
|
+
left: 0;
|
|
923
|
+
border-radius: 0 0 var(--bsi-progress-border-radius) var(--bsi-progress-border-radius);
|
|
924
|
+
}
|
|
925
|
+
.btn-progress .progress-bar {
|
|
926
|
+
height: var(--bsi-progress-height);
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
.steppers {
|
|
930
|
+
--bsi-stepper-active-indicator-height: 2px;
|
|
931
|
+
--bsi-stepper-index-color: var(--bsi-color-text-secondary);
|
|
932
|
+
--bsi-stepper-background: transparent;
|
|
933
|
+
--bsi-stepper-border-color: var(--bsi-color-border-subtle);
|
|
934
|
+
--bsi-stepper-dot-color: var(--bsi-color-background-subtle);
|
|
935
|
+
--bsi-stepper-dot-gap: 8px;
|
|
936
|
+
--bsi-stepper-dot-size: 4px;
|
|
937
|
+
--bsi-stepper-font-size: var(--bsi-label-font-size-l);
|
|
938
|
+
--bsi-stepper-icon-size: var(--bsi-icon-size-m);
|
|
939
|
+
--bsi-stepper-icon-color: var(--bsi-stepper-item-text-color);
|
|
940
|
+
--bsi-stepper-icon-confirmed: var(--bsi-icon-success);
|
|
941
|
+
--bsi-stepper-index-font-size: var(--bsi-label-font-size-s);
|
|
942
|
+
--bsi-stepper-item-background: var(--bsi-stepper-background);
|
|
943
|
+
--bsi-stepper-item-border-color-active: var(--bsi-color-border-primary);
|
|
944
|
+
--bsi-stepper-item-text-color: var(--bsi-color-text-muted);
|
|
945
|
+
--bsi-stepper-nav-height: 64px;
|
|
946
|
+
--bsi-stepper-number-background-active: var(--bsi-color-background-primary);
|
|
947
|
+
--bsi-stepper-number-border-color: var(--bsi-color-border-subtle);
|
|
948
|
+
--bsi-stepper-number-color: var(--bsi-color-text-muted);
|
|
949
|
+
--bsi-stepper-number-size: 2rem;
|
|
950
|
+
--bsi-stepper-progress-height: 2px;
|
|
951
|
+
--bsi-stepper-spacing-x: var(--bsi-spacing-xs);
|
|
952
|
+
--bsi-stepper-spacing-y: var(--bsi-spacing-s);
|
|
953
|
+
}
|
|
954
|
+
@media (min-width: 992px) {
|
|
955
|
+
.steppers {
|
|
956
|
+
--bsi-stepper-background: transparent;
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
.steppers-index {
|
|
961
|
+
flex-shrink: 0;
|
|
962
|
+
margin-left: auto;
|
|
963
|
+
color: var(--bsi-stepper-index-color);
|
|
964
|
+
font-size: var(--bsi-stepper-index-font-size);
|
|
965
|
+
font-weight: var(--bsi-font-weight-solid);
|
|
966
|
+
}
|
|
967
|
+
@media (min-width: 992px) {
|
|
968
|
+
.steppers-index {
|
|
969
|
+
display: none;
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
.steppers-index span {
|
|
973
|
+
margin-left: var(--bsi-spacing-3xs);
|
|
974
|
+
}
|
|
975
|
+
.steppers-index span.active {
|
|
976
|
+
--bsi-stepper-index-color: var(--bsi-color-text-base);
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
.steppers-nav {
|
|
980
|
+
display: flex;
|
|
981
|
+
align-items: center;
|
|
982
|
+
justify-content: space-between;
|
|
983
|
+
background: var(--bsi-stepper-background);
|
|
984
|
+
}
|
|
985
|
+
@media (min-width: 992px) {
|
|
986
|
+
.steppers-nav {
|
|
987
|
+
align-items: center;
|
|
988
|
+
margin-top: var(--bsi-spacing-s);
|
|
989
|
+
background: none;
|
|
990
|
+
box-shadow: none;
|
|
991
|
+
}
|
|
992
|
+
.steppers-nav .steppers-progress,
|
|
993
|
+
.steppers-nav .steppers-dots {
|
|
994
|
+
display: none;
|
|
995
|
+
}
|
|
996
|
+
.steppers-nav .steppers-btn-confirm {
|
|
997
|
+
display: block;
|
|
998
|
+
margin-left: auto;
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
.steppers-nav .steppers-progress,
|
|
1002
|
+
.steppers-nav .steppers-dots {
|
|
1003
|
+
width: 20%;
|
|
1004
|
+
}
|
|
1005
|
+
.steppers-nav .steppers-progress .progress {
|
|
1006
|
+
height: var(--bsi-stepper-progress-height);
|
|
1007
|
+
}
|
|
1008
|
+
.steppers-nav .steppers-dots {
|
|
1009
|
+
display: flex;
|
|
1010
|
+
align-items: center;
|
|
1011
|
+
justify-content: center;
|
|
1012
|
+
margin: 0;
|
|
1013
|
+
padding: 0;
|
|
1014
|
+
}
|
|
1015
|
+
.steppers-nav .steppers-dots li {
|
|
1016
|
+
width: var(--bsi-stepper-dot-size);
|
|
1017
|
+
min-width: var(--bsi-stepper-dot-size);
|
|
1018
|
+
height: var(--bsi-stepper-dot-size);
|
|
1019
|
+
margin-right: var(--bsi-stepper-dot-gap);
|
|
1020
|
+
padding: 0;
|
|
1021
|
+
list-style-type: none;
|
|
1022
|
+
border-radius: 50%;
|
|
1023
|
+
background: var(--bsi-stepper-dot-color);
|
|
1024
|
+
}
|
|
1025
|
+
.steppers-nav .steppers-dots li.done {
|
|
1026
|
+
--bsi-stepper-dot-color: var(--bsi-icon-primary);
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
.steppers-header {
|
|
1030
|
+
display: flex;
|
|
1031
|
+
align-items: center;
|
|
1032
|
+
justify-content: space-between;
|
|
1033
|
+
padding: var(--bsi-stepper-spacing-y) var(--bsi-stepper-spacing-x);
|
|
1034
|
+
background: var(--bsi-stepper-background);
|
|
1035
|
+
}
|
|
1036
|
+
@media (max-width: 991.98px) {
|
|
1037
|
+
.steppers-header {
|
|
1038
|
+
border-bottom: var(--bsi-stepper-active-indicator-height) solid var(--bsi-stepper-border-color);
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
@media (min-width: 992px) {
|
|
1042
|
+
.steppers-header {
|
|
1043
|
+
padding: 0;
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
.steppers-header ul {
|
|
1047
|
+
display: flex;
|
|
1048
|
+
width: 100%;
|
|
1049
|
+
padding: 0;
|
|
1050
|
+
margin-bottom: 0;
|
|
1051
|
+
}
|
|
1052
|
+
.steppers-header ul li {
|
|
1053
|
+
display: flex;
|
|
1054
|
+
align-items: center;
|
|
1055
|
+
list-style-type: none;
|
|
1056
|
+
background-color: var(--bsi-stepper-item-background);
|
|
1057
|
+
color: var(--bsi-stepper-item-text-color);
|
|
1058
|
+
font-size: var(--bsi-stepper-font-size);
|
|
1059
|
+
font-weight: var(--bsi-font-weight-solid);
|
|
1060
|
+
line-height: var(--bsi-label-leading);
|
|
1061
|
+
}
|
|
1062
|
+
@media (min-width: 992px) {
|
|
1063
|
+
.steppers-header ul li {
|
|
1064
|
+
position: relative;
|
|
1065
|
+
flex-grow: 1;
|
|
1066
|
+
padding: var(--bsi-stepper-spacing-y) var(--bsi-stepper-spacing-x);
|
|
1067
|
+
border-left: 1px solid var(--bsi-stepper-border-color);
|
|
1068
|
+
}
|
|
1069
|
+
.steppers-header ul li:nth-last-child(1) {
|
|
1070
|
+
border-right: 1px solid var(--bsi-stepper-border-color);
|
|
1071
|
+
}
|
|
1072
|
+
.steppers-header ul li.steppers-index {
|
|
1073
|
+
display: none;
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
@media (max-width: 991.98px) {
|
|
1077
|
+
.steppers-header ul li:not(.active) {
|
|
1078
|
+
position: absolute;
|
|
1079
|
+
display: block;
|
|
1080
|
+
height: 0;
|
|
1081
|
+
clip: rect(1px, 1px, 1px, 1px);
|
|
1082
|
+
}
|
|
1083
|
+
}
|
|
1084
|
+
.steppers-header ul li.active {
|
|
1085
|
+
--bsi-stepper-item-text-color: var(--bsi-color-text-primary);
|
|
1086
|
+
--bsi-stepper-number-border-color: var(--bsi-color-border-primary);
|
|
1087
|
+
--bsi-stepper-number-background: var(--bsi-color-background-primary);
|
|
1088
|
+
}
|
|
1089
|
+
@media (min-width: 992px) {
|
|
1090
|
+
.steppers-header ul li.active {
|
|
1091
|
+
border-bottom: var(--bsi-stepper-active-indicator-height) solid var(--bsi-stepper-item-border-color-active);
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
.steppers-header ul li.confirmed {
|
|
1095
|
+
--bsi-stepper-item-text-color: var(--bsi-color-text-base);
|
|
1096
|
+
--bsi-stepper-number-border-color: var(--bsi-color-border-success);
|
|
1097
|
+
--bsi-stepper-number-background: var(--bsi-color-background-success);
|
|
1098
|
+
}
|
|
1099
|
+
.steppers-header ul li.active, .steppers-header ul li.confirmed {
|
|
1100
|
+
--bsi-stepper-number-color: var(--bsi-color-text-inverse);
|
|
1101
|
+
}
|
|
1102
|
+
.steppers-header ul li.steppers-index {
|
|
1103
|
+
display: block;
|
|
1104
|
+
}
|
|
1105
|
+
.steppers-header .icon {
|
|
1106
|
+
width: var(--bsi-stepper-icon-size);
|
|
1107
|
+
height: var(--bsi-stepper-icon-size);
|
|
1108
|
+
margin-right: var(--bsi-spacing-xxs);
|
|
1109
|
+
fill: var(--bsi-stepper-icon-color);
|
|
1110
|
+
}
|
|
1111
|
+
.steppers-header .icon.steppers-success {
|
|
1112
|
+
margin-left: auto;
|
|
1113
|
+
fill: var(--bsi-stepper-icon-confirmed);
|
|
1114
|
+
}
|
|
1115
|
+
.steppers-header .steppers-number .icon.steppers-success {
|
|
1116
|
+
--bsi-stepper-icon-confirmed: var(--bsi-icon-inverse);
|
|
1117
|
+
margin: 0;
|
|
1118
|
+
}
|
|
1119
|
+
.steppers-header .steppers-number {
|
|
1120
|
+
display: flex;
|
|
1121
|
+
align-items: center;
|
|
1122
|
+
justify-content: center;
|
|
1123
|
+
width: var(--bsi-stepper-number-size);
|
|
1124
|
+
height: var(--bsi-stepper-number-size);
|
|
1125
|
+
margin-right: var(--bsi-spacing-xxs);
|
|
1126
|
+
border: 1px solid var(--bsi-stepper-number-border-color);
|
|
1127
|
+
border-radius: var(--bsi-radius-rounded);
|
|
1128
|
+
background-color: var(--bsi-stepper-number-background, transparent);
|
|
1129
|
+
color: var(--bsi-stepper-number-color);
|
|
1130
|
+
line-height: var(--bsi-stepper-number-size);
|
|
1131
|
+
}
|
|
1132
|
+
.steppers-header .steppers-number .icon {
|
|
1133
|
+
margin-right: 0;
|
|
1134
|
+
margin-left: 0;
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
.steppers-save {
|
|
1138
|
+
flex-direction: column;
|
|
1139
|
+
justify-content: flex-start;
|
|
1140
|
+
}
|
|
1141
|
+
@media (min-width: 992px) {
|
|
1142
|
+
.steppers-save {
|
|
1143
|
+
flex-direction: row;
|
|
1144
|
+
justify-content: flex-end;
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
.steppers-save > div,
|
|
1148
|
+
.steppers-save > button,
|
|
1149
|
+
.steppers-save > a {
|
|
1150
|
+
flex: 0 0 auto;
|
|
1151
|
+
align-self: flex-start;
|
|
1152
|
+
width: fit-content;
|
|
1153
|
+
max-width: 100%;
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
.steppers.bg-dark,
|
|
1157
|
+
.bg-dark .steppers {
|
|
1158
|
+
--bsi-stepper-border-color: var(--bsi-color-slate-52);
|
|
1159
|
+
--bsi-stepper-icon-color: var(--bsi-color-slate-62);
|
|
1160
|
+
--bsi-stepper-icon-confirmed: var(--bsi-icon-inverse);
|
|
1161
|
+
--bsi-stepper-item-text-color: var(--bsi-color-text-inverse);
|
|
1162
|
+
--bsi-stepper-item-border-color-active: var(--bsi-color-border-inverse);
|
|
1163
|
+
--bsi-stepper-number-border-color: var(--bsi-color-slate-52);
|
|
1164
|
+
--bsi-stepper-number-color: var(--bsi-color-slate-62);
|
|
1165
|
+
}
|
|
1166
|
+
.steppers.bg-dark .steppers-header ul li,
|
|
1167
|
+
.bg-dark .steppers .steppers-header ul li {
|
|
1168
|
+
--bsi-stepper-item-text-color: var(--bsi-color-slate-62);
|
|
1169
|
+
}
|
|
1170
|
+
.steppers.bg-dark .steppers-header ul li.confirmed,
|
|
1171
|
+
.bg-dark .steppers .steppers-header ul li.confirmed {
|
|
1172
|
+
--bsi-stepper-item-text-color: var(--bsi-color-text-inverse);
|
|
1173
|
+
}
|
|
1174
|
+
.steppers.bg-dark .steppers-header ul li.active,
|
|
1175
|
+
.bg-dark .steppers .steppers-header ul li.active {
|
|
1176
|
+
--bsi-stepper-item-text-color: var(--bsi-color-text-inverse);
|
|
1177
|
+
--bsi-stepper-number-color: var(--bsi-color-text-secondary);
|
|
1178
|
+
--bsi-stepper-number-background: var(--bsi-color-background-inverse);
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
:host {
|
|
1182
|
+
display: block;
|
|
1183
|
+
width: 100%;
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
.steppers {
|
|
1187
|
+
width: 100%;
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1190
|
+
.steppers it-icon {
|
|
1191
|
+
--bsi-icon-default: var(--bsi-stepper-icon-color);
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
.steppers-header ul li.confirmed it-icon.steppers-success {
|
|
1195
|
+
--bsi-icon-default: var(--bsi-stepper-icon-confirmed);
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
.steppers.bg-dark .steppers-header ul li.confirmed it-icon.steppers-success {
|
|
1199
|
+
--bsi-icon-default: var(--bsi-stepper-icon-confirmed);
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
:host([mobile-progress-on-desktop]) .steppers-nav .steppers-progress {
|
|
1203
|
+
display: block;
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
:host([mobile-progress-on-desktop]) .steppers-nav .steppers-dots {
|
|
1207
|
+
display: flex;
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
.steppers-number it-icon {
|
|
1211
|
+
display: flex;
|
|
1212
|
+
width: 100%;
|
|
1213
|
+
height: 100%;
|
|
1214
|
+
align-items: center;
|
|
1215
|
+
justify-content: center;
|
|
1216
|
+
margin-right: 0;
|
|
1217
|
+
}`;
|
|
1218
|
+
|
|
1219
|
+
const translation$1 = {
|
|
1220
|
+
$code: 'it',
|
|
1221
|
+
$name: 'Italiano',
|
|
1222
|
+
$dir: 'ltr',
|
|
1223
|
+
back: 'Indietro',
|
|
1224
|
+
next: 'Avanti',
|
|
1225
|
+
confirm: 'Conferma',
|
|
1226
|
+
confirmed: 'Confermato',
|
|
1227
|
+
active: 'Attivo',
|
|
1228
|
+
step: 'Passo',
|
|
1229
|
+
progress: 'Avanzamento dello stepper',
|
|
1230
|
+
outOf: 'di',
|
|
1231
|
+
navigation: 'Navigazione stepper',
|
|
1232
|
+
};
|
|
1233
|
+
|
|
1234
|
+
const translation = {
|
|
1235
|
+
$code: 'en',
|
|
1236
|
+
$name: 'English',
|
|
1237
|
+
$dir: 'ltr',
|
|
1238
|
+
back: 'Back',
|
|
1239
|
+
next: 'Next',
|
|
1240
|
+
confirm: 'Confirm',
|
|
1241
|
+
confirmed: 'Confermato',
|
|
1242
|
+
active: 'Active',
|
|
1243
|
+
step: 'Step',
|
|
1244
|
+
progress: 'Stepper progress',
|
|
1245
|
+
outOf: 'out of',
|
|
1246
|
+
navigation: 'Stepper navigation',
|
|
1247
|
+
};
|
|
1248
|
+
|
|
1249
|
+
registerTranslation(translation$1);
|
|
1250
|
+
registerTranslation(translation);
|
|
1251
|
+
/**
|
|
1252
|
+
* `it-stepper` è il componente contenitore per una procedura a più passi.
|
|
1253
|
+
*
|
|
1254
|
+
* Gestisce la navigazione tra gli step, il rendering dell'intestazione,
|
|
1255
|
+
* dell'area contenuto e dei controlli di navigazione.
|
|
1256
|
+
*
|
|
1257
|
+
* ## Struttura attesa
|
|
1258
|
+
*
|
|
1259
|
+
* ```html
|
|
1260
|
+
* <it-stepper header-variant="numbers">
|
|
1261
|
+
* <it-stepper-step>
|
|
1262
|
+
* <span slot="label">Primo contenuto</span>
|
|
1263
|
+
* <p>Contenuto del primo step</p>
|
|
1264
|
+
* </it-stepper-step>
|
|
1265
|
+
* <it-stepper-step>
|
|
1266
|
+
* <span slot="label">Secondo contenuto</span>
|
|
1267
|
+
* <p>Contenuto del secondo step</p>
|
|
1268
|
+
* </it-stepper-step>
|
|
1269
|
+
* <it-stepper-step>
|
|
1270
|
+
* <span slot="label">Terzo contenuto</span>
|
|
1271
|
+
* <p>Contenuto del terzo step</p>
|
|
1272
|
+
* </it-stepper-step>
|
|
1273
|
+
* </it-stepper>
|
|
1274
|
+
* ```
|
|
1275
|
+
*
|
|
1276
|
+
* @slot - Slot di default per gli elementi `it-stepper-step`.
|
|
1277
|
+
*
|
|
1278
|
+
* @fires it-stepper-change - Emesso quando lo step attivo cambia.
|
|
1279
|
+
* `detail.step` contiene il nuovo indice (0-based), `detail.prevStep` quello precedente.
|
|
1280
|
+
* @fires it-stepper-save - Emesso quando l'utente clicca il pulsante "Salva".
|
|
1281
|
+
* @fires it-stepper-confirm - Emesso quando l'utente clicca il pulsante "Conferma".
|
|
1282
|
+
*/
|
|
1283
|
+
let ItStepper = class ItStepper extends BaseLocalizedComponent {
|
|
1284
|
+
constructor() {
|
|
1285
|
+
super(...arguments);
|
|
1286
|
+
/**
|
|
1287
|
+
* Indice (0-based) dello step attivo.
|
|
1288
|
+
* Modificando questo attributo si naviga direttamente a un determinato step.
|
|
1289
|
+
*/
|
|
1290
|
+
this.current = 0;
|
|
1291
|
+
/** Variante con sfondo scuro. Aggiunge la classe `.bg-dark` al contenitore. */
|
|
1292
|
+
this.dark = false;
|
|
1293
|
+
/**
|
|
1294
|
+
* Variante dell'intestazione degli step.
|
|
1295
|
+
* - `text`: solo testo
|
|
1296
|
+
* - `icons`: icona + testo (richiede l'attributo `icon` su ogni `it-stepper-step`)
|
|
1297
|
+
* - `numbers`: numero ordinale + testo
|
|
1298
|
+
*/
|
|
1299
|
+
this.headerVariant = 'text';
|
|
1300
|
+
/**
|
|
1301
|
+
* Indicatore di progresso mobile mostrato tra i pulsanti di navigazione.
|
|
1302
|
+
* - `bar`: barra di avanzamento
|
|
1303
|
+
* - `dots`: pallini
|
|
1304
|
+
* - `''` (vuoto): nessun indicatore (default)
|
|
1305
|
+
*
|
|
1306
|
+
* Su desktop l'indicatore è sempre nascosto (comportamento BSI nativo).
|
|
1307
|
+
*/
|
|
1308
|
+
this.mobileProgress = '';
|
|
1309
|
+
/** Mostra progress bar o pallini anche a desktop, comportamento utile per anteprime e documentazione. */
|
|
1310
|
+
this.mobileProgressOnDesktop = false;
|
|
1311
|
+
/**
|
|
1312
|
+
* Mostra il pulsante "Conferma" al posto del pulsante "Avanti".
|
|
1313
|
+
* Utile per l'ultimo step o per step che richiedono conferma esplicita su mobile.
|
|
1314
|
+
*/
|
|
1315
|
+
this.showConfirm = false;
|
|
1316
|
+
this._stepCount = 0;
|
|
1317
|
+
}
|
|
1318
|
+
get _steps() {
|
|
1319
|
+
return Array.from(this.querySelectorAll('it-stepper-step'));
|
|
1320
|
+
}
|
|
1321
|
+
connectedCallback() {
|
|
1322
|
+
super.connectedCallback?.();
|
|
1323
|
+
this._syncSteps(true);
|
|
1324
|
+
}
|
|
1325
|
+
willUpdate(changed) {
|
|
1326
|
+
super.willUpdate?.(changed);
|
|
1327
|
+
if (changed.has('current') && this._stepCount > 0) {
|
|
1328
|
+
const currentIndex = this._currentIndex;
|
|
1329
|
+
if (this.current !== currentIndex)
|
|
1330
|
+
this.current = currentIndex;
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
updated(changed) {
|
|
1334
|
+
super.updated?.(changed);
|
|
1335
|
+
if (changed.has('current')) {
|
|
1336
|
+
this._syncSteps();
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
get _maxNavigableIndex() {
|
|
1340
|
+
return Math.max(this._stepCount - 1, 0);
|
|
1341
|
+
}
|
|
1342
|
+
get _currentIndex() {
|
|
1343
|
+
return this._clampIndex(this.current);
|
|
1344
|
+
}
|
|
1345
|
+
_clampIndex(index) {
|
|
1346
|
+
const numericIndex = Number.isFinite(index) ? Math.trunc(index) : 0;
|
|
1347
|
+
return Math.min(Math.max(numericIndex, 0), this._maxNavigableIndex);
|
|
1348
|
+
}
|
|
1349
|
+
_syncSteps(clampCurrent = false) {
|
|
1350
|
+
const steps = this._steps;
|
|
1351
|
+
const previousStepCount = this._stepCount;
|
|
1352
|
+
this._stepCount = steps.length;
|
|
1353
|
+
const currentIndex = this._currentIndex;
|
|
1354
|
+
if (clampCurrent && this.current !== currentIndex) {
|
|
1355
|
+
this.current = currentIndex;
|
|
1356
|
+
}
|
|
1357
|
+
steps.forEach((_, index) => {
|
|
1358
|
+
const stepElement = steps[index];
|
|
1359
|
+
stepElement.active = index === currentIndex;
|
|
1360
|
+
stepElement.confirmed = index < currentIndex;
|
|
1361
|
+
});
|
|
1362
|
+
if (previousStepCount !== this._stepCount && this.hasUpdated) {
|
|
1363
|
+
this.requestUpdate();
|
|
1364
|
+
}
|
|
1365
|
+
}
|
|
1366
|
+
_goToStep(nextStep) {
|
|
1367
|
+
const prevStep = this._currentIndex;
|
|
1368
|
+
const step = this._clampIndex(nextStep);
|
|
1369
|
+
if (step === prevStep)
|
|
1370
|
+
return;
|
|
1371
|
+
this.current = step;
|
|
1372
|
+
this.dispatchEvent(new CustomEvent('it-stepper-change', {
|
|
1373
|
+
detail: { step, prevStep },
|
|
1374
|
+
bubbles: true,
|
|
1375
|
+
composed: true,
|
|
1376
|
+
}));
|
|
1377
|
+
}
|
|
1378
|
+
/** Avanza al prossimo step, se disponibile. */
|
|
1379
|
+
next() {
|
|
1380
|
+
this._goToStep(this._currentIndex + 1);
|
|
1381
|
+
}
|
|
1382
|
+
/** Torna al passo precedente, se disponibile. */
|
|
1383
|
+
prev() {
|
|
1384
|
+
this._goToStep(this._currentIndex - 1);
|
|
1385
|
+
}
|
|
1386
|
+
_handleConfirm() {
|
|
1387
|
+
this.dispatchEvent(new CustomEvent('it-stepper-confirm', { bubbles: true, composed: true }));
|
|
1388
|
+
}
|
|
1389
|
+
_handleSave() {
|
|
1390
|
+
this.dispatchEvent(new CustomEvent('it-stepper-save', { bubbles: true, composed: true }));
|
|
1391
|
+
}
|
|
1392
|
+
_handleSlotChange() {
|
|
1393
|
+
this._syncSteps(true);
|
|
1394
|
+
}
|
|
1395
|
+
// eslint-disable-next-line class-methods-use-this
|
|
1396
|
+
_getStepLabel(step) {
|
|
1397
|
+
return step.querySelector(':scope > [slot="label"]')?.cloneNode(true) ?? '';
|
|
1398
|
+
}
|
|
1399
|
+
_renderHeaderItem(step, index) {
|
|
1400
|
+
const isActive = index === this._currentIndex;
|
|
1401
|
+
const isConfirmed = index < this._currentIndex;
|
|
1402
|
+
const liClasses = this.composeClass({
|
|
1403
|
+
active: isActive,
|
|
1404
|
+
confirmed: isConfirmed,
|
|
1405
|
+
'no-line': this.headerVariant === 'numbers' && isActive,
|
|
1406
|
+
});
|
|
1407
|
+
const confirmedIcon = html `
|
|
1408
|
+
<it-icon class="icon steppers-success" name="it-check" aria-hidden="true"></it-icon>
|
|
1409
|
+
<span class="visually-hidden">${this.$t('confirmed')}</span>
|
|
1410
|
+
`;
|
|
1411
|
+
const activeHint = isActive ? html `<span class="visually-hidden">${this.$t('active')}</span>` : '';
|
|
1412
|
+
const labelContent = this._getStepLabel(step);
|
|
1413
|
+
if (this.headerVariant === 'icons') {
|
|
1414
|
+
return html `
|
|
1415
|
+
<li class=${liClasses} aria-current=${ifDefined(isActive ? 'step' : undefined)}>
|
|
1416
|
+
${step.icon ? html `<it-icon class="icon" name=${step.icon} aria-hidden="true"></it-icon>` : nothing}
|
|
1417
|
+
${labelContent} ${isActive ? activeHint : ''} ${isConfirmed ? confirmedIcon : ''}
|
|
1418
|
+
</li>
|
|
1419
|
+
`;
|
|
1420
|
+
}
|
|
1421
|
+
if (this.headerVariant === 'numbers') {
|
|
1422
|
+
const numberContent = isConfirmed
|
|
1423
|
+
? html `
|
|
1424
|
+
<it-icon class="icon steppers-success" name="it-check" aria-hidden="true"></it-icon>
|
|
1425
|
+
<span class="visually-hidden">${this.$t('confirmed')} ${this.$t('step')} ${index + 1}</span>
|
|
1426
|
+
`
|
|
1427
|
+
: html `<span class="visually-hidden">${isActive ? this.$t('active') : ''} ${this.$t('step')} </span>${index + 1}`;
|
|
1428
|
+
return html `
|
|
1429
|
+
<li class=${liClasses} aria-current=${ifDefined(isActive ? 'step' : undefined)}>
|
|
1430
|
+
<span class="steppers-number">${numberContent}</span>
|
|
1431
|
+
${labelContent}
|
|
1432
|
+
</li>
|
|
1433
|
+
`;
|
|
1434
|
+
}
|
|
1435
|
+
// Default: text only
|
|
1436
|
+
return html `
|
|
1437
|
+
<li class=${liClasses} aria-current=${ifDefined(isActive ? 'step' : undefined)}>
|
|
1438
|
+
${labelContent} ${isActive ? activeHint : ''} ${isConfirmed ? confirmedIcon : ''}
|
|
1439
|
+
</li>
|
|
1440
|
+
`;
|
|
1441
|
+
}
|
|
1442
|
+
_renderMobileIndex() {
|
|
1443
|
+
const currentIndex = this._currentIndex;
|
|
1444
|
+
const total = this._stepCount;
|
|
1445
|
+
if (this.headerVariant === 'numbers') {
|
|
1446
|
+
return html `
|
|
1447
|
+
<span class="steppers-index" aria-hidden="true">
|
|
1448
|
+
${Array.from({ length: total }, (_, i) => i).map((i) => html `<span class=${ifDefined(i === currentIndex ? 'active' : undefined)}>${i + 1}</span>`)}
|
|
1449
|
+
</span>
|
|
1450
|
+
`;
|
|
1451
|
+
}
|
|
1452
|
+
return html `<span class="steppers-index" aria-hidden="true">${currentIndex + 1}/${total}</span>`;
|
|
1453
|
+
}
|
|
1454
|
+
_renderProgressBar() {
|
|
1455
|
+
const total = this._stepCount;
|
|
1456
|
+
const percent = total > 1 ? Math.round((this._currentIndex / (total - 1)) * 100) : 100;
|
|
1457
|
+
return html `
|
|
1458
|
+
<div class="steppers-progress" part="progress">
|
|
1459
|
+
<div class="progress">
|
|
1460
|
+
<div
|
|
1461
|
+
class="progress-bar"
|
|
1462
|
+
role="progressbar"
|
|
1463
|
+
style="width: ${percent}%"
|
|
1464
|
+
aria-label=${this.$t('progress')}
|
|
1465
|
+
aria-valuenow=${percent}
|
|
1466
|
+
aria-valuemin="0"
|
|
1467
|
+
aria-valuemax="100"
|
|
1468
|
+
></div>
|
|
1469
|
+
</div>
|
|
1470
|
+
</div>
|
|
1471
|
+
`;
|
|
1472
|
+
}
|
|
1473
|
+
_renderDots() {
|
|
1474
|
+
const currentIndex = this._currentIndex;
|
|
1475
|
+
const total = this._stepCount;
|
|
1476
|
+
return html `
|
|
1477
|
+
<ul class="steppers-dots" part="dots">
|
|
1478
|
+
${Array.from({ length: total }, (_, i) => i).map((i) => html `
|
|
1479
|
+
<li class=${this._getDotClass(i)} aria-current=${ifDefined(i === currentIndex ? 'step' : undefined)}>
|
|
1480
|
+
<span class="visually-hidden"
|
|
1481
|
+
>${this.$t('step')} ${i + 1} ${this.$t('outOf')} ${total}${this._getDotStateText(i)}</span
|
|
1482
|
+
>
|
|
1483
|
+
</li>
|
|
1484
|
+
`)}
|
|
1485
|
+
</ul>
|
|
1486
|
+
`;
|
|
1487
|
+
}
|
|
1488
|
+
_getDotClass(index) {
|
|
1489
|
+
if (index < this._currentIndex)
|
|
1490
|
+
return 'done';
|
|
1491
|
+
if (index === this._currentIndex)
|
|
1492
|
+
return 'done active';
|
|
1493
|
+
return '';
|
|
1494
|
+
}
|
|
1495
|
+
_getDotStateText(index) {
|
|
1496
|
+
if (index < this._currentIndex)
|
|
1497
|
+
return ` - ${this.$t('confirmed')}`;
|
|
1498
|
+
if (index === this._currentIndex)
|
|
1499
|
+
return ` - ${this.$t('active')}`;
|
|
1500
|
+
return '';
|
|
1501
|
+
}
|
|
1502
|
+
_renderSaveArea() {
|
|
1503
|
+
if (!this.saveLabel)
|
|
1504
|
+
return '';
|
|
1505
|
+
return html `
|
|
1506
|
+
<div class="steppers-save d-flex border-top pt-3 mt-2" part="save">
|
|
1507
|
+
<div class="text-lg-end mb-2 mb-lg-0 me-lg-3">
|
|
1508
|
+
<p class="text-muted mb-0 small"><strong>${this.saveTitle}</strong></p>
|
|
1509
|
+
<p class="text-muted mb-0 small">${this.saveDescription}</p>
|
|
1510
|
+
</div>
|
|
1511
|
+
<it-button variant="secondary" outline type="button" @click=${this._handleSave}>${this.saveLabel}</it-button>
|
|
1512
|
+
</div>
|
|
1513
|
+
`;
|
|
1514
|
+
}
|
|
1515
|
+
_renderProgressIndicator() {
|
|
1516
|
+
if (this.mobileProgress === 'bar')
|
|
1517
|
+
return this._renderProgressBar();
|
|
1518
|
+
if (this.mobileProgress === 'dots')
|
|
1519
|
+
return this._renderDots();
|
|
1520
|
+
return nothing;
|
|
1521
|
+
}
|
|
1522
|
+
render() {
|
|
1523
|
+
const stepperClasses = this.composeClass('steppers', {
|
|
1524
|
+
'bg-dark': this.dark,
|
|
1525
|
+
'mobile-progress-on-desktop': this.mobileProgressOnDesktop,
|
|
1526
|
+
});
|
|
1527
|
+
const isPrevDisabled = this._currentIndex <= 0;
|
|
1528
|
+
const isNextDisabled = this._currentIndex >= this._maxNavigableIndex;
|
|
1529
|
+
return html `
|
|
1530
|
+
<div class=${stepperClasses} part="stepper">
|
|
1531
|
+
<div class="steppers-header mb-3" part="header">
|
|
1532
|
+
<ul part="header-list">
|
|
1533
|
+
${this._steps.map((step, i) => this._renderHeaderItem(step, i))}
|
|
1534
|
+
</ul>
|
|
1535
|
+
${this._renderMobileIndex()}
|
|
1536
|
+
</div>
|
|
1537
|
+
<div class="steppers-content mb-3" aria-live="polite" part="content">
|
|
1538
|
+
<slot @slotchange=${this._handleSlotChange}></slot>
|
|
1539
|
+
</div>
|
|
1540
|
+
<nav class="steppers-nav mb-3" aria-label=${this.$t('navigation')} part="nav">
|
|
1541
|
+
<it-button
|
|
1542
|
+
type="button"
|
|
1543
|
+
variant="primary"
|
|
1544
|
+
outline
|
|
1545
|
+
size="sm"
|
|
1546
|
+
class="steppers-btn-prev"
|
|
1547
|
+
exportparts="focusable"
|
|
1548
|
+
?disabled=${isPrevDisabled}
|
|
1549
|
+
@click=${this.prev}
|
|
1550
|
+
>
|
|
1551
|
+
<it-icon class="icon" name="it-chevron-left" color=${this.dark ? 'inverse' : 'primary'} size="sm"></it-icon>
|
|
1552
|
+
${this.prevLabel || this.$t('back')}
|
|
1553
|
+
</it-button>
|
|
1554
|
+
|
|
1555
|
+
${this._renderProgressIndicator()}
|
|
1556
|
+
${this.showConfirm
|
|
1557
|
+
? html `
|
|
1558
|
+
<it-button
|
|
1559
|
+
type="button"
|
|
1560
|
+
variant="primary"
|
|
1561
|
+
size="sm"
|
|
1562
|
+
class="steppers-btn-confirm"
|
|
1563
|
+
exportparts="focusable"
|
|
1564
|
+
@click=${this._handleConfirm}
|
|
1565
|
+
>
|
|
1566
|
+
${this.confirmLabel || this.$t('confirm')}
|
|
1567
|
+
</it-button>
|
|
1568
|
+
`
|
|
1569
|
+
: html `
|
|
1570
|
+
<it-button
|
|
1571
|
+
type="button"
|
|
1572
|
+
variant="primary"
|
|
1573
|
+
size="sm"
|
|
1574
|
+
class="steppers-btn-next"
|
|
1575
|
+
exportparts="focusable"
|
|
1576
|
+
?disabled=${isNextDisabled}
|
|
1577
|
+
@click=${this.next}
|
|
1578
|
+
>
|
|
1579
|
+
${this.nextLabel || this.$t('next')}
|
|
1580
|
+
<it-icon
|
|
1581
|
+
class="icon"
|
|
1582
|
+
name="it-chevron-right"
|
|
1583
|
+
color=${this.dark ? 'primary' : 'inverse'}
|
|
1584
|
+
size="sm"
|
|
1585
|
+
></it-icon>
|
|
1586
|
+
</it-button>
|
|
1587
|
+
`}
|
|
1588
|
+
</nav>
|
|
1589
|
+
${this._renderSaveArea()}
|
|
1590
|
+
</div>
|
|
1591
|
+
`;
|
|
1592
|
+
}
|
|
1593
|
+
};
|
|
1594
|
+
ItStepper.styles = styles;
|
|
1595
|
+
__decorate([
|
|
1596
|
+
property({ type: Number, reflect: true }),
|
|
1597
|
+
__metadata("design:type", Object)
|
|
1598
|
+
], ItStepper.prototype, "current", void 0);
|
|
1599
|
+
__decorate([
|
|
1600
|
+
property({ type: Boolean, reflect: true }),
|
|
1601
|
+
__metadata("design:type", Object)
|
|
1602
|
+
], ItStepper.prototype, "dark", void 0);
|
|
1603
|
+
__decorate([
|
|
1604
|
+
property({ type: String, attribute: 'header-variant' }),
|
|
1605
|
+
__metadata("design:type", String)
|
|
1606
|
+
], ItStepper.prototype, "headerVariant", void 0);
|
|
1607
|
+
__decorate([
|
|
1608
|
+
property({ type: String, attribute: 'mobile-progress' }),
|
|
1609
|
+
__metadata("design:type", String)
|
|
1610
|
+
], ItStepper.prototype, "mobileProgress", void 0);
|
|
1611
|
+
__decorate([
|
|
1612
|
+
property({ type: Boolean, reflect: true, attribute: 'mobile-progress-on-desktop' }),
|
|
1613
|
+
__metadata("design:type", Object)
|
|
1614
|
+
], ItStepper.prototype, "mobileProgressOnDesktop", void 0);
|
|
1615
|
+
__decorate([
|
|
1616
|
+
property({ type: String, attribute: 'prev-label' }),
|
|
1617
|
+
__metadata("design:type", String)
|
|
1618
|
+
], ItStepper.prototype, "prevLabel", void 0);
|
|
1619
|
+
__decorate([
|
|
1620
|
+
property({ type: String, attribute: 'next-label' }),
|
|
1621
|
+
__metadata("design:type", String)
|
|
1622
|
+
], ItStepper.prototype, "nextLabel", void 0);
|
|
1623
|
+
__decorate([
|
|
1624
|
+
property({ type: String, attribute: 'confirm-label' }),
|
|
1625
|
+
__metadata("design:type", String)
|
|
1626
|
+
], ItStepper.prototype, "confirmLabel", void 0);
|
|
1627
|
+
__decorate([
|
|
1628
|
+
property({ type: Boolean, attribute: 'show-confirm' }),
|
|
1629
|
+
__metadata("design:type", Object)
|
|
1630
|
+
], ItStepper.prototype, "showConfirm", void 0);
|
|
1631
|
+
__decorate([
|
|
1632
|
+
property({ type: String, attribute: 'save-label' }),
|
|
1633
|
+
__metadata("design:type", String)
|
|
1634
|
+
], ItStepper.prototype, "saveLabel", void 0);
|
|
1635
|
+
__decorate([
|
|
1636
|
+
property({ type: String, attribute: 'save-title' }),
|
|
1637
|
+
__metadata("design:type", String)
|
|
1638
|
+
], ItStepper.prototype, "saveTitle", void 0);
|
|
1639
|
+
__decorate([
|
|
1640
|
+
property({ type: String, attribute: 'save-description' }),
|
|
1641
|
+
__metadata("design:type", String)
|
|
1642
|
+
], ItStepper.prototype, "saveDescription", void 0);
|
|
1643
|
+
ItStepper = __decorate([
|
|
1644
|
+
customElement('it-stepper')
|
|
1645
|
+
], ItStepper);
|
|
1646
|
+
|
|
1647
|
+
export { ItStepper };
|
|
1648
|
+
//# sourceMappingURL=it-stepper.js.map
|