@italia/stepper 1.0.0-beta.2 → 1.0.0-beta.3
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/custom-elements.json +129 -5
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/it-stepper-step.js +1 -1
- package/dist/src/it-stepper.d.ts +78 -2
- package/dist/src/it-stepper.d.ts.map +1 -1
- package/dist/src/it-stepper.js +157 -8
- package/dist/src/it-stepper.js.map +1 -1
- package/dist/src/types.d.ts +15 -0
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +6 -6
package/custom-elements.json
CHANGED
|
@@ -23,6 +23,14 @@
|
|
|
23
23
|
"module": "./it-stepper-step.js"
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
|
+
{
|
|
27
|
+
"kind": "js",
|
|
28
|
+
"name": "StepperChangeEventDetail",
|
|
29
|
+
"declaration": {
|
|
30
|
+
"name": "StepperChangeEventDetail",
|
|
31
|
+
"module": "./types.js"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
26
34
|
{
|
|
27
35
|
"kind": "js",
|
|
28
36
|
"name": "StepperHeaderVariant",
|
|
@@ -171,8 +179,54 @@
|
|
|
171
179
|
"declarations": [
|
|
172
180
|
{
|
|
173
181
|
"kind": "class",
|
|
174
|
-
"description": "`it-stepper` è il componente contenitore per una procedura a più passi.\n\nGestisce la navigazione tra gli step, il rendering dell'intestazione,\ndell'area contenuto e dei controlli di navigazione.\n\n## Struttura attesa\n\n```html\n<it-stepper header-variant=\"numbers\">\n <it-stepper-step>\n <span slot=\"label\">Primo contenuto</span>\n <p>Contenuto del primo step</p>\n </it-stepper-step>\n <it-stepper-step>\n <span slot=\"label\">Secondo contenuto</span>\n <p>Contenuto del secondo step</p>\n </it-stepper-step>\n <it-stepper-step>\n <span slot=\"label\">Terzo contenuto</span>\n <p>Contenuto del terzo step</p>\n </it-stepper-step>\n</it-stepper>\n```",
|
|
182
|
+
"description": "`it-stepper` è il componente contenitore per una procedura a più passi.\n\nGestisce la navigazione tra gli step, il rendering dell'intestazione,\ndell'area contenuto e dei controlli di navigazione.\n\n## Struttura attesa\n\n```html\n<it-stepper header-variant=\"numbers\">\n <it-stepper-step>\n <span slot=\"label\">Primo contenuto</span>\n <p>Contenuto del primo step</p>\n </it-stepper-step>\n <it-stepper-step>\n <span slot=\"label\">Secondo contenuto</span>\n <p>Contenuto del secondo step</p>\n </it-stepper-step>\n <it-stepper-step>\n <span slot=\"label\">Terzo contenuto</span>\n <p>Contenuto del terzo step</p>\n </it-stepper-step>\n</it-stepper>\n```\n\n## Validazione del form nello step\n\nQuando uno step contiene un form si può impedire l'avanzamento in due modi,\nusabili anche insieme:\n\n1. `next-disabled` disabilita il pulsante \"Avanti\"/\"Conferma\" finché il form\n non è valido;\n2. `it-stepper-change`, se originato dal click su \"Avanti\", è annullabile:\n `preventDefault()` blocca il cambio di step, lasciando al consumer la\n possibilità di mostrare gli errori dei campi.\n\n```js\nconst stepper = document.querySelector('it-stepper');\nconst form = stepper.querySelector('form');\n\n// 1. disabilita finché il form non è valido\nform.addEventListener('it-input', () => {\n stepper.nextDisabled = !form.checkValidity();\n});\n\n// 2. oppure blocca al click e mostra gli errori\nstepper.addEventListener('it-stepper-change', (e) => {\n if (e.detail.step > e.detail.prevStep && !form.checkValidity()) {\n e.preventDefault();\n form.requestSubmit();\n }\n});\n```\n\nI componenti di form del design kit non mostrano i bubble nativi del browser\n(`reportValidity()` restituisce il booleano corretto ma non produce nulla a\nschermo): i messaggi sono renderizzati inline dal singolo controllo e restano\nnascosti finché il form non è stato inviato almeno una volta. `requestSubmit()`\nserve proprio a questo — l'invio viene bloccato dal controller quando il form\nnon è valido, quindi non naviga.",
|
|
175
183
|
"name": "ItStepper",
|
|
184
|
+
"cssParts": [
|
|
185
|
+
{
|
|
186
|
+
"description": "The stepper's root container.",
|
|
187
|
+
"name": "stepper"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"description": "The header holding the list of steps.",
|
|
191
|
+
"name": "header"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"description": "The steps `ul` inside the header.",
|
|
195
|
+
"name": "header-list"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"description": "The area hosting the active step's content.",
|
|
199
|
+
"name": "content"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"description": "The navigation bar with the \"back\"/\"next\" buttons.",
|
|
203
|
+
"name": "nav"
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"description": "The textual progress indicator shown on mobile.",
|
|
207
|
+
"name": "progress"
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"description": "The dotted progress indicator shown on mobile.",
|
|
211
|
+
"name": "dots"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"description": "The area holding the \"save\" button.",
|
|
215
|
+
"name": "save"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"description": "The native `button` inside each navigation and save button.",
|
|
219
|
+
"name": "focusable"
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"description": "The arrow inside the \"back\" button.",
|
|
223
|
+
"name": "prev-icon"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"description": "The arrow inside the \"next\" button.",
|
|
227
|
+
"name": "next-icon"
|
|
228
|
+
}
|
|
229
|
+
],
|
|
176
230
|
"slots": [
|
|
177
231
|
{
|
|
178
232
|
"description": "Slot di default per gli elementi `it-stepper-step`.",
|
|
@@ -260,6 +314,17 @@
|
|
|
260
314
|
"description": "Etichetta del pulsante \"Conferma\".",
|
|
261
315
|
"attribute": "confirm-label"
|
|
262
316
|
},
|
|
317
|
+
{
|
|
318
|
+
"kind": "field",
|
|
319
|
+
"name": "nextDisabled",
|
|
320
|
+
"type": {
|
|
321
|
+
"text": "boolean"
|
|
322
|
+
},
|
|
323
|
+
"default": "false",
|
|
324
|
+
"description": "Disabilita il pulsante \"Avanti\" (o \"Conferma\", quando `show-confirm` è attivo).\nDa usare quando lo step corrente contiene un form non valido o con campi\nobbligatori mancanti. Viene combinato in OR con la disabilitazione\nautomatica ai limiti della sequenza.\n\nIl pulsante \"Indietro\" non è influenzato: è sempre possibile tornare\nal passo precedente anche da uno step non valido.",
|
|
325
|
+
"attribute": "next-disabled",
|
|
326
|
+
"reflects": true
|
|
327
|
+
},
|
|
263
328
|
{
|
|
264
329
|
"kind": "field",
|
|
265
330
|
"name": "showConfirm",
|
|
@@ -358,14 +423,24 @@
|
|
|
358
423
|
"type": {
|
|
359
424
|
"text": "number"
|
|
360
425
|
}
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
"name": "{ cancelable = false }",
|
|
429
|
+
"default": "{}"
|
|
361
430
|
}
|
|
362
431
|
]
|
|
363
432
|
},
|
|
433
|
+
{
|
|
434
|
+
"kind": "method",
|
|
435
|
+
"name": "_handleNext",
|
|
436
|
+
"privacy": "private",
|
|
437
|
+
"description": "Gestisce il click sul pulsante \"Avanti\": emette `it-stepper-change` in forma\nannullabile, così il consumer può bloccare l'avanzamento (es. form non valido).\nIl metodo pubblico `next()` resta invece sempre incondizionato."
|
|
438
|
+
},
|
|
364
439
|
{
|
|
365
440
|
"kind": "method",
|
|
366
441
|
"name": "next",
|
|
367
442
|
"privacy": "public",
|
|
368
|
-
"description": "Avanza al prossimo step, se disponibile
|
|
443
|
+
"description": "Avanza al prossimo step, se disponibile.\nNon annullabile: l'evento `it-stepper-change` emesso da questo metodo non\npuò essere bloccato con `preventDefault()`."
|
|
369
444
|
},
|
|
370
445
|
{
|
|
371
446
|
"kind": "method",
|
|
@@ -483,14 +558,14 @@
|
|
|
483
558
|
"type": {
|
|
484
559
|
"text": "CustomEvent"
|
|
485
560
|
},
|
|
486
|
-
"description": "Emesso quando lo step attivo cambia. `detail.step` contiene il nuovo indice (0-based), `detail.prevStep` quello precedente."
|
|
561
|
+
"description": "Emesso quando lo step attivo cambia. `detail.step` contiene il nuovo indice (0-based), `detail.prevStep` quello precedente (vedi {@link StepperChangeEventDetail}). È annullabile **solo** quando è originato dal click sul pulsante \"Avanti\": in quel caso `preventDefault()` impedisce il cambio di step. Emesso dai metodi pubblici `next()` / `prev()` non è annullabile e `preventDefault()` non ha effetto. Non viene emesso quando si imposta direttamente la proprietà `current`."
|
|
487
562
|
},
|
|
488
563
|
{
|
|
489
564
|
"name": "it-stepper-confirm",
|
|
490
565
|
"type": {
|
|
491
566
|
"text": "CustomEvent"
|
|
492
567
|
},
|
|
493
|
-
"description": "Emesso quando l'utente clicca il pulsante \"Conferma\"."
|
|
568
|
+
"description": "Emesso quando l'utente clicca il pulsante \"Conferma\". Non annullabile: non ha un comportamento di default da bloccare (non avanza lo step), quindi il consumer controlla già interamente cosa succede alla conferma. Per impedire la conferma usare `next-disabled`."
|
|
494
569
|
},
|
|
495
570
|
{
|
|
496
571
|
"name": "it-stepper-save",
|
|
@@ -570,6 +645,15 @@
|
|
|
570
645
|
"description": "Etichetta del pulsante \"Conferma\".",
|
|
571
646
|
"fieldName": "confirmLabel"
|
|
572
647
|
},
|
|
648
|
+
{
|
|
649
|
+
"name": "next-disabled",
|
|
650
|
+
"type": {
|
|
651
|
+
"text": "boolean"
|
|
652
|
+
},
|
|
653
|
+
"default": "false",
|
|
654
|
+
"description": "Disabilita il pulsante \"Avanti\" (o \"Conferma\", quando `show-confirm` è attivo).\nDa usare quando lo step corrente contiene un form non valido o con campi\nobbligatori mancanti. Viene combinato in OR con la disabilitazione\nautomatica ai limiti della sequenza.\n\nIl pulsante \"Indietro\" non è influenzato: è sempre possibile tornare\nal passo precedente anche da uno step non valido.",
|
|
655
|
+
"fieldName": "nextDisabled"
|
|
656
|
+
},
|
|
573
657
|
{
|
|
574
658
|
"name": "show-confirm",
|
|
575
659
|
"type": {
|
|
@@ -610,6 +694,14 @@
|
|
|
610
694
|
},
|
|
611
695
|
"tagName": "it-stepper",
|
|
612
696
|
"customElement": true
|
|
697
|
+
},
|
|
698
|
+
{
|
|
699
|
+
"kind": "variable",
|
|
700
|
+
"name": "prevStep"
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
"kind": "variable",
|
|
704
|
+
"name": "step"
|
|
613
705
|
}
|
|
614
706
|
],
|
|
615
707
|
"exports": [
|
|
@@ -681,7 +773,7 @@
|
|
|
681
773
|
"type": {
|
|
682
774
|
"text": "Meta<StepperArgs>"
|
|
683
775
|
},
|
|
684
|
-
"default": "{ title: 'Componenti/Stepper', tags: ['web-component', 'a11y-ok'], component: 'it-stepper' as unknown as keyof HTMLElementTagNameMap, args: { current: 1, dark: false, 'header-variant': '', 'mobile-progress': '', 'mobile-progress-on-desktop': false, 'prev-label': '', 'next-label': '', 'confirm-label': '', 'show-confirm': false, 'save-label': '', 'save-title': '', 'save-description': '', }, argTypes: { current: { control: { type: 'number', min: 0, max: 5, step: 1 }, description: 'Indice (0-based) dello step attivo.', name: 'current', table: { defaultValue: { summary: '0' } }, }, dark: { control: 'boolean', description: 'Visualizza lo stepper su sfondo scuro.', name: 'dark', table: { defaultValue: { summary: 'false' } }, }, 'header-variant': { control: 'select', options: STEPPER_HEADER_VARIANTS, description: \"Variante dell'intestazione degli step: solo testo, icone o numeri.\", name: 'header-variant', table: { defaultValue: { summary: 'text' } }, }, 'mobile-progress': { control: 'select', options: STEPPER_MOBILE_PROGRESS, description: 'Indicatore di progresso mostrato su mobile tra i pulsanti di navigazione.', name: 'mobile-progress', table: { defaultValue: { summary: '' } }, }, 'mobile-progress-on-desktop': { control: 'boolean', description: 'Mostra progress bar o pallini anche su viewport desktop.', name: 'mobile-progress-on-desktop', table: { defaultValue: { summary: 'false' } }, }, 'prev-label': { control: 'text', description: 'Etichetta del pulsante \"Indietro\".', name: 'prev-label', table: { defaultValue: { summary: 'Indietro' } }, }, 'next-label': { control: 'text', description: 'Etichetta del pulsante \"Avanti\".', name: 'next-label', table: { defaultValue: { summary: 'Avanti' } }, }, 'confirm-label': { control: 'text', description: 'Etichetta del pulsante \"Conferma\" (visibile quando `show-confirm` è attivo).', name: 'confirm-label', table: { defaultValue: { summary: 'Conferma' } }, }, 'show-confirm': { control: 'boolean', description: 'Mostra il pulsante \"Conferma\" al posto del pulsante \"Avanti\".', name: 'show-confirm', table: { defaultValue: { summary: 'false' } }, }, 'save-label': { control: 'text', description: 'Etichetta del pulsante \"Salva\". Se vuoto, l\\'area di salvataggio non viene mostrata.', name: 'save-label', table: { defaultValue: { summary: '' } }, }, 'save-title': { control: 'text', description: 'Titolo della sezione di salvataggio. Mostrato solamente se viene aggiunto anche `save-label`.', name: 'save-title', table: { defaultValue: { summary: '' } }, }, 'save-description': { control: 'text', description: 'Testo descrittivo della sezione di salvataggio. Mostrato solamente se viene aggiunto anche `save-label`.', name: 'save-description', table: { defaultValue: { summary: '' } }, }, }, parameters: { pageLayout: 'w-100', docs: { source: { excludeDecorators: true, }, }, }, decorators: demoDecorators, }"
|
|
776
|
+
"default": "{ title: 'Componenti/Stepper', tags: ['web-component', 'a11y-ok'], component: 'it-stepper' as unknown as keyof HTMLElementTagNameMap, args: { current: 1, dark: false, 'header-variant': '', 'mobile-progress': '', 'mobile-progress-on-desktop': false, 'prev-label': '', 'next-label': '', 'confirm-label': '', 'show-confirm': false, 'save-label': '', 'save-title': '', 'save-description': '', 'next-disabled': false, }, argTypes: { current: { control: { type: 'number', min: 0, max: 5, step: 1 }, description: 'Indice (0-based) dello step attivo.', name: 'current', table: { defaultValue: { summary: '0' } }, }, dark: { control: 'boolean', description: 'Visualizza lo stepper su sfondo scuro.', name: 'dark', table: { defaultValue: { summary: 'false' } }, }, 'header-variant': { control: 'select', options: STEPPER_HEADER_VARIANTS, description: \"Variante dell'intestazione degli step: solo testo, icone o numeri.\", name: 'header-variant', table: { defaultValue: { summary: 'text' } }, }, 'mobile-progress': { control: 'select', options: STEPPER_MOBILE_PROGRESS, description: 'Indicatore di progresso mostrato su mobile tra i pulsanti di navigazione.', name: 'mobile-progress', table: { defaultValue: { summary: '' } }, }, 'mobile-progress-on-desktop': { control: 'boolean', description: 'Mostra progress bar o pallini anche su viewport desktop.', name: 'mobile-progress-on-desktop', table: { defaultValue: { summary: 'false' } }, }, 'prev-label': { control: 'text', description: 'Etichetta del pulsante \"Indietro\".', name: 'prev-label', table: { defaultValue: { summary: 'Indietro' } }, }, 'next-label': { control: 'text', description: 'Etichetta del pulsante \"Avanti\".', name: 'next-label', table: { defaultValue: { summary: 'Avanti' } }, }, 'confirm-label': { control: 'text', description: 'Etichetta del pulsante \"Conferma\" (visibile quando `show-confirm` è attivo).', name: 'confirm-label', table: { defaultValue: { summary: 'Conferma' } }, }, 'show-confirm': { control: 'boolean', description: 'Mostra il pulsante \"Conferma\" al posto del pulsante \"Avanti\".', name: 'show-confirm', table: { defaultValue: { summary: 'false' } }, }, 'save-label': { control: 'text', description: 'Etichetta del pulsante \"Salva\". Se vuoto, l\\'area di salvataggio non viene mostrata.', name: 'save-label', table: { defaultValue: { summary: '' } }, }, 'save-title': { control: 'text', description: 'Titolo della sezione di salvataggio. Mostrato solamente se viene aggiunto anche `save-label`.', name: 'save-title', table: { defaultValue: { summary: '' } }, }, 'save-description': { control: 'text', description: 'Testo descrittivo della sezione di salvataggio. Mostrato solamente se viene aggiunto anche `save-label`.', name: 'save-description', table: { defaultValue: { summary: '' } }, }, 'next-disabled': { control: 'boolean', description: 'Disabilita il pulsante \"Avanti\" e il pulsante \"Conferma\" (se `show-confirm` è attivo).', name: 'next-disabled', table: { defaultValue: { summary: 'false' } }, }, }, parameters: { pageLayout: 'w-100', docs: { source: { excludeDecorators: true, }, }, }, decorators: demoDecorators, }"
|
|
685
777
|
},
|
|
686
778
|
{
|
|
687
779
|
"kind": "variable",
|
|
@@ -755,6 +847,22 @@
|
|
|
755
847
|
},
|
|
756
848
|
"default": "{ args: { 'show-confirm': true, 'confirm-label': 'Conferma' }, render: (args) => renderStepper(args), }"
|
|
757
849
|
},
|
|
850
|
+
{
|
|
851
|
+
"kind": "variable",
|
|
852
|
+
"name": "FormValidazione",
|
|
853
|
+
"type": {
|
|
854
|
+
"text": "Story"
|
|
855
|
+
},
|
|
856
|
+
"default": "{ name: 'Validazione del form nello step', tags: ['!dev'], parameters: { docs: { canvas: { sourceState: 'shown' }, description: { story: `Il pulsante resta disabilitato finché il campo obbligatorio non è compilato. Lo stepper non riconosce da sé l'ultimo passo: \\`show-confirm\\` viene attivato dallo script, così \"Conferma\" sostituisce \"Avanti\" solo alla fine del flusso.`, }, source: { code: `<it-stepper id=\"validazione\" confirm-label=\"Conferma\" next-disabled> ${validationSourceMarkup('validazione-esito')} <script type=\"module\"> const stepper = document.getElementById('validazione'); const notification = document.getElementById('validazione-esito'); const form = stepper.querySelector('form'); // Il form è nel primo passo: solo lì l'avanzamento va bloccato. const nonValido = (step) => step === 0 && !form.checkValidity(); const aggiornaStato = (step) => { stepper.nextDisabled = nonValido(step); // \"Conferma\" solo sull'ultimo passo. stepper.showConfirm = step >= stepper.querySelectorAll('it-stepper-step').length - 1; }; form.addEventListener('it-input', () => aggiornaStato(stepper.current)); stepper.addEventListener('it-stepper-change', (e) => aggiornaStato(e.detail.step)); stepper.addEventListener('it-stepper-confirm', () => notification.show()); </script>`, }, }, }, render: () => html` <div> <it-stepper confirm-label=\"Conferma\" next-disabled @it-input=${syncNextDisabled} @it-stepper-change=${syncOnStepChange} @it-stepper-confirm=${notifyConfirm} > ${validationSteps()} </it-stepper> ${confirmNotification} </div> `, }"
|
|
857
|
+
},
|
|
858
|
+
{
|
|
859
|
+
"kind": "variable",
|
|
860
|
+
"name": "FormValidazioneEvento",
|
|
861
|
+
"type": {
|
|
862
|
+
"text": "Story"
|
|
863
|
+
},
|
|
864
|
+
"default": "{ name: 'Validazione con evento cancelabile', tags: ['!dev'], parameters: { docs: { canvas: { sourceState: 'shown' }, description: { story: `Il pulsante resta attivo: l'avanzamento viene annullato al click con \\`preventDefault()\\` e \\`requestSubmit()\\` fa comparire i messaggi dei campi non compilati. Come nell'esempio precedente, \\`show-confirm\\` viene attivato dallo script solo sull'ultimo passo.`, }, source: { code: `<it-stepper id=\"validazione-evento\" confirm-label=\"Conferma\"> ${validationSourceMarkup('validazione-evento-esito')} <script type=\"module\"> const stepper = document.getElementById('validazione-evento'); const notification = document.getElementById('validazione-evento-esito'); const form = stepper.querySelector('form'); stepper.addEventListener('it-stepper-change', (e) => { // Solo in avanti, e solo dal passo che contiene il form. if (e.detail.step > e.detail.prevStep && e.detail.prevStep === 0 && !form.checkValidity()) { e.preventDefault(); form.requestSubmit(); // mostra i messaggi dei campi, senza inviare nulla return; } // \"Conferma\" solo sull'ultimo passo. stepper.showConfirm = e.detail.step >= stepper.querySelectorAll('it-stepper-step').length - 1; }); stepper.addEventListener('it-stepper-confirm', () => notification.show()); </script>`, }, }, }, render: () => html` <div> <it-stepper confirm-label=\"Conferma\" @it-stepper-change=${vetoInvalidStep} @it-stepper-confirm=${notifyConfirm}> ${validationSteps(html`<p class=\"mt-3 mb-0 text-muted\">Clicca \"Avanti\" per vedere gli errori del form.</p>`)} </it-stepper> ${confirmNotification} </div> `, }"
|
|
865
|
+
},
|
|
758
866
|
{
|
|
759
867
|
"kind": "variable",
|
|
760
868
|
"name": "SfondoScuro",
|
|
@@ -853,6 +961,22 @@
|
|
|
853
961
|
"module": "stories/it-stepper.stories.ts"
|
|
854
962
|
}
|
|
855
963
|
},
|
|
964
|
+
{
|
|
965
|
+
"kind": "js",
|
|
966
|
+
"name": "FormValidazione",
|
|
967
|
+
"declaration": {
|
|
968
|
+
"name": "FormValidazione",
|
|
969
|
+
"module": "stories/it-stepper.stories.ts"
|
|
970
|
+
}
|
|
971
|
+
},
|
|
972
|
+
{
|
|
973
|
+
"kind": "js",
|
|
974
|
+
"name": "FormValidazioneEvento",
|
|
975
|
+
"declaration": {
|
|
976
|
+
"name": "FormValidazioneEvento",
|
|
977
|
+
"module": "stories/it-stepper.stories.ts"
|
|
978
|
+
}
|
|
979
|
+
},
|
|
856
980
|
{
|
|
857
981
|
"kind": "js",
|
|
858
982
|
"name": "SfondoScuro",
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ItStepper } from './it-stepper.js';
|
|
2
2
|
export { ItStepperStep } from './it-stepper-step.js';
|
|
3
|
-
export type { StepperHeaderVariant, StepperMobileProgress } from './types.js';
|
|
3
|
+
export type { StepperChangeEventDetail, StepperHeaderVariant, StepperMobileProgress } from './types.js';
|
|
4
4
|
export { STEPPER_HEADER_VARIANTS, STEPPER_MOBILE_PROGRESS } from './types.js';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,YAAY,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,YAAY,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACxG,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/src/index.js
CHANGED
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/types.ts"],"sourcesContent":["export const STEPPER_HEADER_VARIANTS = ['text', 'icons', 'numbers'] as const;\nexport type StepperHeaderVariant = (typeof STEPPER_HEADER_VARIANTS)[number];\n\nexport const STEPPER_MOBILE_PROGRESS = ['bar', 'dots', ''] as const;\nexport type StepperMobileProgress = (typeof STEPPER_MOBILE_PROGRESS)[number];\n"],"names":[],"mappings":";;;;;;;;AAAO,MAAM,uBAAuB,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS;AAG3D,MAAM,uBAAuB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/types.ts"],"sourcesContent":["export const STEPPER_HEADER_VARIANTS = ['text', 'icons', 'numbers'] as const;\nexport type StepperHeaderVariant = (typeof STEPPER_HEADER_VARIANTS)[number];\n\nexport const STEPPER_MOBILE_PROGRESS = ['bar', 'dots', ''] as const;\nexport type StepperMobileProgress = (typeof STEPPER_MOBILE_PROGRESS)[number];\n\n/**\n * Payload dell'evento `it-stepper-change`.\n *\n * L'evento è annullabile **solo** quando è originato dal click dell'utente sul\n * pulsante \"Avanti\": in quel caso `preventDefault()` impedisce il cambio di step\n * (utile per bloccare l'avanzamento quando il form dello step non è valido).\n * Quando è emesso dai metodi pubblici `next()` / `prev()` l'evento non è\n * annullabile e `preventDefault()` non ha alcun effetto.\n */\nexport interface StepperChangeEventDetail {\n /** Indice (0-based) dello step di destinazione. */\n step: number;\n /** Indice (0-based) dello step di partenza. */\n prevStep: number;\n}\n"],"names":[],"mappings":";;;;;;;;AAAO,MAAM,uBAAuB,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS;AAG3D,MAAM,uBAAuB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __decorate, a as __metadata, B as BaseComponent } from '../index-
|
|
1
|
+
import { _ as __decorate, a as __metadata, B as BaseComponent } from '../index-BC-pnBUl.js';
|
|
2
2
|
import { css, html } from 'lit';
|
|
3
3
|
import { property, customElement } from 'lit/decorators.js';
|
|
4
4
|
import 'lit/directive.js';
|
package/dist/src/it-stepper.d.ts
CHANGED
|
@@ -26,12 +26,68 @@ import type { StepperHeaderVariant, StepperMobileProgress } from './types.js';
|
|
|
26
26
|
* </it-stepper>
|
|
27
27
|
* ```
|
|
28
28
|
*
|
|
29
|
+
* ## Validazione del form nello step
|
|
30
|
+
*
|
|
31
|
+
* Quando uno step contiene un form si può impedire l'avanzamento in due modi,
|
|
32
|
+
* usabili anche insieme:
|
|
33
|
+
*
|
|
34
|
+
* 1. `next-disabled` disabilita il pulsante "Avanti"/"Conferma" finché il form
|
|
35
|
+
* non è valido;
|
|
36
|
+
* 2. `it-stepper-change`, se originato dal click su "Avanti", è annullabile:
|
|
37
|
+
* `preventDefault()` blocca il cambio di step, lasciando al consumer la
|
|
38
|
+
* possibilità di mostrare gli errori dei campi.
|
|
39
|
+
*
|
|
40
|
+
* ```js
|
|
41
|
+
* const stepper = document.querySelector('it-stepper');
|
|
42
|
+
* const form = stepper.querySelector('form');
|
|
43
|
+
*
|
|
44
|
+
* // 1. disabilita finché il form non è valido
|
|
45
|
+
* form.addEventListener('it-input', () => {
|
|
46
|
+
* stepper.nextDisabled = !form.checkValidity();
|
|
47
|
+
* });
|
|
48
|
+
*
|
|
49
|
+
* // 2. oppure blocca al click e mostra gli errori
|
|
50
|
+
* stepper.addEventListener('it-stepper-change', (e) => {
|
|
51
|
+
* if (e.detail.step > e.detail.prevStep && !form.checkValidity()) {
|
|
52
|
+
* e.preventDefault();
|
|
53
|
+
* form.requestSubmit();
|
|
54
|
+
* }
|
|
55
|
+
* });
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* I componenti di form del design kit non mostrano i bubble nativi del browser
|
|
59
|
+
* (`reportValidity()` restituisce il booleano corretto ma non produce nulla a
|
|
60
|
+
* schermo): i messaggi sono renderizzati inline dal singolo controllo e restano
|
|
61
|
+
* nascosti finché il form non è stato inviato almeno una volta. `requestSubmit()`
|
|
62
|
+
* serve proprio a questo — l'invio viene bloccato dal controller quando il form
|
|
63
|
+
* non è valido, quindi non naviga.
|
|
64
|
+
*
|
|
29
65
|
* @slot - Slot di default per gli elementi `it-stepper-step`.
|
|
30
66
|
*
|
|
31
67
|
* @fires it-stepper-change - Emesso quando lo step attivo cambia.
|
|
32
|
-
* `detail.step` contiene il nuovo indice (0-based), `detail.prevStep` quello precedente
|
|
68
|
+
* `detail.step` contiene il nuovo indice (0-based), `detail.prevStep` quello precedente
|
|
69
|
+
* (vedi {@link StepperChangeEventDetail}).
|
|
70
|
+
* È annullabile **solo** quando è originato dal click sul pulsante "Avanti":
|
|
71
|
+
* in quel caso `preventDefault()` impedisce il cambio di step. Emesso dai metodi
|
|
72
|
+
* pubblici `next()` / `prev()` non è annullabile e `preventDefault()` non ha effetto.
|
|
73
|
+
* Non viene emesso quando si imposta direttamente la proprietà `current`.
|
|
33
74
|
* @fires it-stepper-save - Emesso quando l'utente clicca il pulsante "Salva".
|
|
34
75
|
* @fires it-stepper-confirm - Emesso quando l'utente clicca il pulsante "Conferma".
|
|
76
|
+
* Non annullabile: non ha un comportamento di default da bloccare (non avanza lo
|
|
77
|
+
* step), quindi il consumer controlla già interamente cosa succede alla conferma.
|
|
78
|
+
* Per impedire la conferma usare `next-disabled`.
|
|
79
|
+
*
|
|
80
|
+
* @csspart stepper - The stepper's root container.
|
|
81
|
+
* @csspart header - The header holding the list of steps.
|
|
82
|
+
* @csspart header-list - The steps `ul` inside the header.
|
|
83
|
+
* @csspart content - The area hosting the active step's content.
|
|
84
|
+
* @csspart nav - The navigation bar with the "back"/"next" buttons.
|
|
85
|
+
* @csspart progress - The textual progress indicator shown on mobile.
|
|
86
|
+
* @csspart dots - The dotted progress indicator shown on mobile.
|
|
87
|
+
* @csspart save - The area holding the "save" button.
|
|
88
|
+
* @csspart focusable - The native `button` inside each navigation and save button.
|
|
89
|
+
* @csspart prev-icon - The arrow inside the "back" button.
|
|
90
|
+
* @csspart next-icon - The arrow inside the "next" button.
|
|
35
91
|
*/
|
|
36
92
|
export declare class ItStepper extends BaseLocalizedComponent {
|
|
37
93
|
static styles: import("lit").CSSResultGroup;
|
|
@@ -66,6 +122,16 @@ export declare class ItStepper extends BaseLocalizedComponent {
|
|
|
66
122
|
nextLabel?: string;
|
|
67
123
|
/** Etichetta del pulsante "Conferma". */
|
|
68
124
|
confirmLabel?: string;
|
|
125
|
+
/**
|
|
126
|
+
* Disabilita il pulsante "Avanti" (o "Conferma", quando `show-confirm` è attivo).
|
|
127
|
+
* Da usare quando lo step corrente contiene un form non valido o con campi
|
|
128
|
+
* obbligatori mancanti. Viene combinato in OR con la disabilitazione
|
|
129
|
+
* automatica ai limiti della sequenza.
|
|
130
|
+
*
|
|
131
|
+
* Il pulsante "Indietro" non è influenzato: è sempre possibile tornare
|
|
132
|
+
* al passo precedente anche da uno step non valido.
|
|
133
|
+
*/
|
|
134
|
+
nextDisabled: boolean;
|
|
69
135
|
/**
|
|
70
136
|
* Mostra il pulsante "Conferma" al posto del pulsante "Avanti".
|
|
71
137
|
* Utile per l'ultimo step o per step che richiedono conferma esplicita su mobile.
|
|
@@ -90,7 +156,17 @@ export declare class ItStepper extends BaseLocalizedComponent {
|
|
|
90
156
|
private _clampIndex;
|
|
91
157
|
private _syncSteps;
|
|
92
158
|
private _goToStep;
|
|
93
|
-
/**
|
|
159
|
+
/**
|
|
160
|
+
* Gestisce il click sul pulsante "Avanti": emette `it-stepper-change` in forma
|
|
161
|
+
* annullabile, così il consumer può bloccare l'avanzamento (es. form non valido).
|
|
162
|
+
* Il metodo pubblico `next()` resta invece sempre incondizionato.
|
|
163
|
+
*/
|
|
164
|
+
private _handleNext;
|
|
165
|
+
/**
|
|
166
|
+
* Avanza al prossimo step, se disponibile.
|
|
167
|
+
* Non annullabile: l'evento `it-stepper-change` emesso da questo metodo non
|
|
168
|
+
* può essere bloccato con `preventDefault()`.
|
|
169
|
+
*/
|
|
94
170
|
next(): void;
|
|
95
171
|
/** Torna al passo precedente, se disponibile. */
|
|
96
172
|
prev(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"it-stepper.d.ts","sourceRoot":"","sources":["../../src/it-stepper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAGzD,OAAO,EAAE,sBAAsB,
|
|
1
|
+
{"version":3,"file":"it-stepper.d.ts","sourceRoot":"","sources":["../../src/it-stepper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAGzD,OAAO,EAAE,sBAAsB,EAAsB,MAAM,iBAAiB,CAAC;AAG7E,OAAO,KAAK,EAA4B,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AASxG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuFG;AACH,qBACa,SAAU,SAAQ,sBAAsB;IACnD,MAAM,CAAC,MAAM,+BAAU;IAEvB;;;OAGG;IAEH,OAAO,SAAK;IAEZ,+EAA+E;IAE/E,IAAI,UAAS;IAEb;;;;;OAKG;IAEH,aAAa,EAAE,oBAAoB,CAAU;IAE7C;;;;;;;OAOG;IAEH,cAAc,EAAE,qBAAqB,CAAM;IAE3C,yGAAyG;IAEzG,uBAAuB,UAAS;IAEhC,yCAAyC;IAEzC,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,uCAAuC;IAEvC,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,yCAAyC;IAEzC,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;;;;;OAQG;IAEH,YAAY,UAAS;IAErB;;;OAGG;IAEH,WAAW,UAAS;IAEpB;;;OAGG;IAEH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,6DAA6D;IAE7D,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,kDAAkD;IAElD,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,OAAO,CAAC,UAAU,CAAK;IAEvB,OAAO,KAAK,MAAM,GAEjB;IAEQ,iBAAiB;IAKjB,UAAU,CAAC,OAAO,EAAE,cAAc;cAQxB,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAOzD,OAAO,KAAK,kBAAkB,GAE7B;IAED,OAAO,KAAK,aAAa,GAExB;IAED,OAAO,CAAC,WAAW;IAKnB,OAAO,CAAC,UAAU;IAqBlB,OAAO,CAAC,SAAS;IAwBjB;;;;OAIG;IACH,OAAO,CAAC,WAAW;IASnB;;;;OAIG;IACI,IAAI;IAIX,iDAAiD;IAC1C,IAAI;IAIX,OAAO,CAAC,cAAc;IAQtB,OAAO,CAAC,WAAW;IAInB,OAAO,CAAC,iBAAiB;IAKzB,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,iBAAiB;IAmDzB,OAAO,CAAC,kBAAkB;IAgB1B,OAAO,CAAC,kBAAkB;IAoB1B,OAAO,CAAC,WAAW;IAmBnB,OAAO,CAAC,YAAY;IAMpB,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,eAAe;IAevB,OAAO,CAAC,wBAAwB;IAMhC,MAAM;CAgFP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;CACF"}
|
package/dist/src/it-stepper.js
CHANGED
|
@@ -1,9 +1,52 @@
|
|
|
1
|
-
import { r as registerTranslation, _ as __decorate, a as __metadata, b as BaseLocalizedComponent } from '../index-
|
|
1
|
+
import { r as registerTranslation, _ as __decorate, a as __metadata, b as BaseLocalizedComponent } from '../index-BC-pnBUl.js';
|
|
2
2
|
import { css, html, nothing } from 'lit';
|
|
3
3
|
import { property, customElement } from 'lit/decorators.js';
|
|
4
4
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
5
5
|
import 'lit/directive.js';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Dispatches a cancelable custom event and runs the provided default action
|
|
9
|
+
* only if the consumer did not call `event.preventDefault()`.
|
|
10
|
+
*
|
|
11
|
+
* This is the shared convention used across components (Tabs, Modal, Chip, Alert,
|
|
12
|
+
* Forward, Back) to provide a sensible default JavaScript behavior out of the box
|
|
13
|
+
* while letting consumers intercept and override it. Notification deliberately does
|
|
14
|
+
* NOT use this: its show/close are always caller-initiated (no default markup-driven
|
|
15
|
+
* trigger to override), so there was no real use case for blocking them — see
|
|
16
|
+
* it-notification.ts for the plain (non-cancelable) events it fires instead.
|
|
17
|
+
*
|
|
18
|
+
* ```js
|
|
19
|
+
* el.addEventListener('it-alert-close', (e) => {
|
|
20
|
+
* e.preventDefault(); // block the default removal
|
|
21
|
+
* fetchConfirmation().then((ok) => { // async logic runs after prevention
|
|
22
|
+
* if (ok) e.target.close();
|
|
23
|
+
* });
|
|
24
|
+
* });
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* Note: `preventDefault()` must be called synchronously inside the listener.
|
|
28
|
+
* Async code can run afterward; call the component's public method when ready.
|
|
29
|
+
*
|
|
30
|
+
* @param host the element dispatching the event
|
|
31
|
+
* @param name the event name (kebab-case, `it-` prefixed)
|
|
32
|
+
* @param detail the event `detail` payload
|
|
33
|
+
* @param defaultAction the behavior executed when the event is not prevented
|
|
34
|
+
* @returns the dispatched event (inspect `defaultPrevented` if needed)
|
|
35
|
+
*/
|
|
36
|
+
function dispatchCancelable(host, name, detail, defaultAction) {
|
|
37
|
+
const event = new CustomEvent(name, {
|
|
38
|
+
bubbles: true,
|
|
39
|
+
composed: true,
|
|
40
|
+
cancelable: true,
|
|
41
|
+
detail,
|
|
42
|
+
});
|
|
43
|
+
host.dispatchEvent(event);
|
|
44
|
+
if (!event.defaultPrevented) {
|
|
45
|
+
defaultAction();
|
|
46
|
+
}
|
|
47
|
+
return event;
|
|
48
|
+
}
|
|
49
|
+
|
|
7
50
|
var styles = css`@charset "UTF-8";
|
|
8
51
|
.visually-hidden,
|
|
9
52
|
.visually-hidden-focusable:not(:focus):not(:focus-within) {
|
|
@@ -1273,12 +1316,68 @@ registerTranslation(translation);
|
|
|
1273
1316
|
* </it-stepper>
|
|
1274
1317
|
* ```
|
|
1275
1318
|
*
|
|
1319
|
+
* ## Validazione del form nello step
|
|
1320
|
+
*
|
|
1321
|
+
* Quando uno step contiene un form si può impedire l'avanzamento in due modi,
|
|
1322
|
+
* usabili anche insieme:
|
|
1323
|
+
*
|
|
1324
|
+
* 1. `next-disabled` disabilita il pulsante "Avanti"/"Conferma" finché il form
|
|
1325
|
+
* non è valido;
|
|
1326
|
+
* 2. `it-stepper-change`, se originato dal click su "Avanti", è annullabile:
|
|
1327
|
+
* `preventDefault()` blocca il cambio di step, lasciando al consumer la
|
|
1328
|
+
* possibilità di mostrare gli errori dei campi.
|
|
1329
|
+
*
|
|
1330
|
+
* ```js
|
|
1331
|
+
* const stepper = document.querySelector('it-stepper');
|
|
1332
|
+
* const form = stepper.querySelector('form');
|
|
1333
|
+
*
|
|
1334
|
+
* // 1. disabilita finché il form non è valido
|
|
1335
|
+
* form.addEventListener('it-input', () => {
|
|
1336
|
+
* stepper.nextDisabled = !form.checkValidity();
|
|
1337
|
+
* });
|
|
1338
|
+
*
|
|
1339
|
+
* // 2. oppure blocca al click e mostra gli errori
|
|
1340
|
+
* stepper.addEventListener('it-stepper-change', (e) => {
|
|
1341
|
+
* if (e.detail.step > e.detail.prevStep && !form.checkValidity()) {
|
|
1342
|
+
* e.preventDefault();
|
|
1343
|
+
* form.requestSubmit();
|
|
1344
|
+
* }
|
|
1345
|
+
* });
|
|
1346
|
+
* ```
|
|
1347
|
+
*
|
|
1348
|
+
* I componenti di form del design kit non mostrano i bubble nativi del browser
|
|
1349
|
+
* (`reportValidity()` restituisce il booleano corretto ma non produce nulla a
|
|
1350
|
+
* schermo): i messaggi sono renderizzati inline dal singolo controllo e restano
|
|
1351
|
+
* nascosti finché il form non è stato inviato almeno una volta. `requestSubmit()`
|
|
1352
|
+
* serve proprio a questo — l'invio viene bloccato dal controller quando il form
|
|
1353
|
+
* non è valido, quindi non naviga.
|
|
1354
|
+
*
|
|
1276
1355
|
* @slot - Slot di default per gli elementi `it-stepper-step`.
|
|
1277
1356
|
*
|
|
1278
1357
|
* @fires it-stepper-change - Emesso quando lo step attivo cambia.
|
|
1279
|
-
* `detail.step` contiene il nuovo indice (0-based), `detail.prevStep` quello precedente
|
|
1358
|
+
* `detail.step` contiene il nuovo indice (0-based), `detail.prevStep` quello precedente
|
|
1359
|
+
* (vedi {@link StepperChangeEventDetail}).
|
|
1360
|
+
* È annullabile **solo** quando è originato dal click sul pulsante "Avanti":
|
|
1361
|
+
* in quel caso `preventDefault()` impedisce il cambio di step. Emesso dai metodi
|
|
1362
|
+
* pubblici `next()` / `prev()` non è annullabile e `preventDefault()` non ha effetto.
|
|
1363
|
+
* Non viene emesso quando si imposta direttamente la proprietà `current`.
|
|
1280
1364
|
* @fires it-stepper-save - Emesso quando l'utente clicca il pulsante "Salva".
|
|
1281
1365
|
* @fires it-stepper-confirm - Emesso quando l'utente clicca il pulsante "Conferma".
|
|
1366
|
+
* Non annullabile: non ha un comportamento di default da bloccare (non avanza lo
|
|
1367
|
+
* step), quindi il consumer controlla già interamente cosa succede alla conferma.
|
|
1368
|
+
* Per impedire la conferma usare `next-disabled`.
|
|
1369
|
+
*
|
|
1370
|
+
* @csspart stepper - The stepper's root container.
|
|
1371
|
+
* @csspart header - The header holding the list of steps.
|
|
1372
|
+
* @csspart header-list - The steps `ul` inside the header.
|
|
1373
|
+
* @csspart content - The area hosting the active step's content.
|
|
1374
|
+
* @csspart nav - The navigation bar with the "back"/"next" buttons.
|
|
1375
|
+
* @csspart progress - The textual progress indicator shown on mobile.
|
|
1376
|
+
* @csspart dots - The dotted progress indicator shown on mobile.
|
|
1377
|
+
* @csspart save - The area holding the "save" button.
|
|
1378
|
+
* @csspart focusable - The native `button` inside each navigation and save button.
|
|
1379
|
+
* @csspart prev-icon - The arrow inside the "back" button.
|
|
1380
|
+
* @csspart next-icon - The arrow inside the "next" button.
|
|
1282
1381
|
*/
|
|
1283
1382
|
let ItStepper = class ItStepper extends BaseLocalizedComponent {
|
|
1284
1383
|
constructor() {
|
|
@@ -1308,6 +1407,16 @@ let ItStepper = class ItStepper extends BaseLocalizedComponent {
|
|
|
1308
1407
|
this.mobileProgress = '';
|
|
1309
1408
|
/** Mostra progress bar o pallini anche a desktop, comportamento utile per anteprime e documentazione. */
|
|
1310
1409
|
this.mobileProgressOnDesktop = false;
|
|
1410
|
+
/**
|
|
1411
|
+
* Disabilita il pulsante "Avanti" (o "Conferma", quando `show-confirm` è attivo).
|
|
1412
|
+
* Da usare quando lo step corrente contiene un form non valido o con campi
|
|
1413
|
+
* obbligatori mancanti. Viene combinato in OR con la disabilitazione
|
|
1414
|
+
* automatica ai limiti della sequenza.
|
|
1415
|
+
*
|
|
1416
|
+
* Il pulsante "Indietro" non è influenzato: è sempre possibile tornare
|
|
1417
|
+
* al passo precedente anche da uno step non valido.
|
|
1418
|
+
*/
|
|
1419
|
+
this.nextDisabled = false;
|
|
1311
1420
|
/**
|
|
1312
1421
|
* Mostra il pulsante "Conferma" al posto del pulsante "Avanti".
|
|
1313
1422
|
* Utile per l'ultimo step o per step che richiedono conferma esplicita su mobile.
|
|
@@ -1363,19 +1472,43 @@ let ItStepper = class ItStepper extends BaseLocalizedComponent {
|
|
|
1363
1472
|
this.requestUpdate();
|
|
1364
1473
|
}
|
|
1365
1474
|
}
|
|
1366
|
-
_goToStep(nextStep) {
|
|
1475
|
+
_goToStep(nextStep, { cancelable = false } = {}) {
|
|
1367
1476
|
const prevStep = this._currentIndex;
|
|
1368
1477
|
const step = this._clampIndex(nextStep);
|
|
1369
1478
|
if (step === prevStep)
|
|
1370
1479
|
return;
|
|
1480
|
+
const detail = { step, prevStep };
|
|
1481
|
+
if (cancelable) {
|
|
1482
|
+
dispatchCancelable(this, 'it-stepper-change', detail, () => {
|
|
1483
|
+
this.current = step;
|
|
1484
|
+
});
|
|
1485
|
+
return;
|
|
1486
|
+
}
|
|
1371
1487
|
this.current = step;
|
|
1372
1488
|
this.dispatchEvent(new CustomEvent('it-stepper-change', {
|
|
1373
|
-
detail
|
|
1489
|
+
detail,
|
|
1374
1490
|
bubbles: true,
|
|
1375
1491
|
composed: true,
|
|
1376
1492
|
}));
|
|
1377
1493
|
}
|
|
1378
|
-
/**
|
|
1494
|
+
/**
|
|
1495
|
+
* Gestisce il click sul pulsante "Avanti": emette `it-stepper-change` in forma
|
|
1496
|
+
* annullabile, così il consumer può bloccare l'avanzamento (es. form non valido).
|
|
1497
|
+
* Il metodo pubblico `next()` resta invece sempre incondizionato.
|
|
1498
|
+
*/
|
|
1499
|
+
_handleNext() {
|
|
1500
|
+
// `it-button` con `disabled` non disabilita il `<button>` nativo: applica solo
|
|
1501
|
+
// `pointer-events: none` e `aria-disabled`, quindi il pulsante resta
|
|
1502
|
+
// attivabile da tastiera. Il controllo va rifatto qui.
|
|
1503
|
+
if (this.nextDisabled)
|
|
1504
|
+
return;
|
|
1505
|
+
this._goToStep(this._currentIndex + 1, { cancelable: true });
|
|
1506
|
+
}
|
|
1507
|
+
/**
|
|
1508
|
+
* Avanza al prossimo step, se disponibile.
|
|
1509
|
+
* Non annullabile: l'evento `it-stepper-change` emesso da questo metodo non
|
|
1510
|
+
* può essere bloccato con `preventDefault()`.
|
|
1511
|
+
*/
|
|
1379
1512
|
next() {
|
|
1380
1513
|
this._goToStep(this._currentIndex + 1);
|
|
1381
1514
|
}
|
|
@@ -1384,6 +1517,10 @@ let ItStepper = class ItStepper extends BaseLocalizedComponent {
|
|
|
1384
1517
|
this._goToStep(this._currentIndex - 1);
|
|
1385
1518
|
}
|
|
1386
1519
|
_handleConfirm() {
|
|
1520
|
+
// Vedi la nota in `_handleNext`: il pulsante disabilitato è comunque
|
|
1521
|
+
// attivabile da tastiera, quindi lo stato va verificato anche qui.
|
|
1522
|
+
if (this.nextDisabled)
|
|
1523
|
+
return;
|
|
1387
1524
|
this.dispatchEvent(new CustomEvent('it-stepper-confirm', { bubbles: true, composed: true }));
|
|
1388
1525
|
}
|
|
1389
1526
|
_handleSave() {
|
|
@@ -1527,7 +1664,7 @@ let ItStepper = class ItStepper extends BaseLocalizedComponent {
|
|
|
1527
1664
|
'mobile-progress-on-desktop': this.mobileProgressOnDesktop,
|
|
1528
1665
|
});
|
|
1529
1666
|
const isPrevDisabled = this._currentIndex <= 0;
|
|
1530
|
-
const isNextDisabled = this._currentIndex >= this._maxNavigableIndex;
|
|
1667
|
+
const isNextDisabled = this.nextDisabled || this._currentIndex >= this._maxNavigableIndex;
|
|
1531
1668
|
return html `
|
|
1532
1669
|
<div class=${stepperClasses} part="stepper">
|
|
1533
1670
|
<div class="steppers-header mb-3" part="header">
|
|
@@ -1550,7 +1687,13 @@ let ItStepper = class ItStepper extends BaseLocalizedComponent {
|
|
|
1550
1687
|
?disabled=${isPrevDisabled}
|
|
1551
1688
|
@click=${this.prev}
|
|
1552
1689
|
>
|
|
1553
|
-
<it-icon
|
|
1690
|
+
<it-icon
|
|
1691
|
+
class="icon"
|
|
1692
|
+
name="it-chevron-left"
|
|
1693
|
+
color=${this.dark ? 'inverse' : 'primary'}
|
|
1694
|
+
size="sm"
|
|
1695
|
+
exportparts="icon: prev-icon"
|
|
1696
|
+
></it-icon>
|
|
1554
1697
|
${this.prevLabel || this.$t('back')}
|
|
1555
1698
|
</it-button>
|
|
1556
1699
|
|
|
@@ -1563,6 +1706,7 @@ let ItStepper = class ItStepper extends BaseLocalizedComponent {
|
|
|
1563
1706
|
size="sm"
|
|
1564
1707
|
class="steppers-btn-confirm"
|
|
1565
1708
|
exportparts="focusable"
|
|
1709
|
+
?disabled=${this.nextDisabled}
|
|
1566
1710
|
@click=${this._handleConfirm}
|
|
1567
1711
|
>
|
|
1568
1712
|
${this.confirmLabel || this.$t('confirm')}
|
|
@@ -1576,7 +1720,7 @@ let ItStepper = class ItStepper extends BaseLocalizedComponent {
|
|
|
1576
1720
|
class="steppers-btn-next"
|
|
1577
1721
|
exportparts="focusable"
|
|
1578
1722
|
?disabled=${isNextDisabled}
|
|
1579
|
-
@click=${this.
|
|
1723
|
+
@click=${this._handleNext}
|
|
1580
1724
|
>
|
|
1581
1725
|
${this.nextLabel || this.$t('next')}
|
|
1582
1726
|
<it-icon
|
|
@@ -1584,6 +1728,7 @@ let ItStepper = class ItStepper extends BaseLocalizedComponent {
|
|
|
1584
1728
|
name="it-chevron-right"
|
|
1585
1729
|
color=${this.dark ? 'primary' : 'inverse'}
|
|
1586
1730
|
size="sm"
|
|
1731
|
+
exportparts="icon: next-icon"
|
|
1587
1732
|
></it-icon>
|
|
1588
1733
|
</it-button>
|
|
1589
1734
|
`}
|
|
@@ -1626,6 +1771,10 @@ __decorate([
|
|
|
1626
1771
|
property({ type: String, attribute: 'confirm-label' }),
|
|
1627
1772
|
__metadata("design:type", String)
|
|
1628
1773
|
], ItStepper.prototype, "confirmLabel", void 0);
|
|
1774
|
+
__decorate([
|
|
1775
|
+
property({ type: Boolean, reflect: true, attribute: 'next-disabled' }),
|
|
1776
|
+
__metadata("design:type", Object)
|
|
1777
|
+
], ItStepper.prototype, "nextDisabled", void 0);
|
|
1629
1778
|
__decorate([
|
|
1630
1779
|
property({ type: Boolean, attribute: 'show-confirm' }),
|
|
1631
1780
|
__metadata("design:type", Object)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"it-stepper.js","sources":["../../../src/locales/it.ts","../../../src/locales/en.ts","../../../src/it-stepper.ts"],"sourcesContent":["import type { DefaultTranslation } from '@italia/i18n';\n\nconst translation: DefaultTranslation = {\n $code: 'it',\n $name: 'Italiano',\n $dir: 'ltr',\n back: 'Indietro',\n next: 'Avanti',\n confirm: 'Conferma',\n confirmed: 'Confermato',\n active: 'Attivo',\n step: 'Passo',\n progress: 'Avanzamento dello stepper',\n outOf: 'di',\n navigation: 'Navigazione stepper',\n};\n\nexport default translation;\n","import type { DefaultTranslation } from '@italia/i18n';\n\nconst translation: DefaultTranslation = {\n $code: 'en',\n $name: 'English',\n $dir: 'ltr',\n back: 'Back',\n next: 'Next',\n confirm: 'Confirm',\n confirmed: 'Confermato',\n active: 'Active',\n step: 'Step',\n progress: 'Stepper progress',\n outOf: 'out of',\n navigation: 'Stepper navigation',\n};\n\nexport default translation;\n","import { html, nothing, type PropertyValues } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { BaseLocalizedComponent } from '@italia/globals';\nimport { registerTranslation } from '@italia/i18n';\nimport type { ItStepperStep } from './it-stepper-step.js';\nimport type { StepperHeaderVariant, StepperMobileProgress } from './types.js';\nimport styles from './stepper.scss';\n\nimport it from './locales/it.js';\nimport en from './locales/en.js';\n\nregisterTranslation(it);\nregisterTranslation(en);\n\n/**\n * `it-stepper` è il componente contenitore per una procedura a più passi.\n *\n * Gestisce la navigazione tra gli step, il rendering dell'intestazione,\n * dell'area contenuto e dei controlli di navigazione.\n *\n * ## Struttura attesa\n *\n * ```html\n * <it-stepper header-variant=\"numbers\">\n * <it-stepper-step>\n * <span slot=\"label\">Primo contenuto</span>\n * <p>Contenuto del primo step</p>\n * </it-stepper-step>\n * <it-stepper-step>\n * <span slot=\"label\">Secondo contenuto</span>\n * <p>Contenuto del secondo step</p>\n * </it-stepper-step>\n * <it-stepper-step>\n * <span slot=\"label\">Terzo contenuto</span>\n * <p>Contenuto del terzo step</p>\n * </it-stepper-step>\n * </it-stepper>\n * ```\n *\n * @slot - Slot di default per gli elementi `it-stepper-step`.\n *\n * @fires it-stepper-change - Emesso quando lo step attivo cambia.\n * `detail.step` contiene il nuovo indice (0-based), `detail.prevStep` quello precedente.\n * @fires it-stepper-save - Emesso quando l'utente clicca il pulsante \"Salva\".\n * @fires it-stepper-confirm - Emesso quando l'utente clicca il pulsante \"Conferma\".\n */\n@customElement('it-stepper')\nexport class ItStepper extends BaseLocalizedComponent {\n static styles = styles;\n\n /**\n * Indice (0-based) dello step attivo.\n * Modificando questo attributo si naviga direttamente a un determinato step.\n */\n @property({ type: Number, reflect: true })\n current = 0;\n\n /** Variante con sfondo scuro. Aggiunge la classe `.bg-dark` al contenitore. */\n @property({ type: Boolean, reflect: true })\n dark = false;\n\n /**\n * Variante dell'intestazione degli step.\n * - `text`: solo testo\n * - `icons`: icona + testo (richiede l'attributo `icon` su ogni `it-stepper-step`)\n * - `numbers`: numero ordinale + testo\n */\n @property({ type: String, attribute: 'header-variant' })\n headerVariant: StepperHeaderVariant = 'text';\n\n /**\n * Indicatore di progresso mobile mostrato tra i pulsanti di navigazione.\n * - `bar`: barra di avanzamento\n * - `dots`: pallini\n * - `''` (vuoto): nessun indicatore (default)\n *\n * Su desktop l'indicatore è sempre nascosto (comportamento BSI nativo).\n */\n @property({ type: String, attribute: 'mobile-progress' })\n mobileProgress: StepperMobileProgress = '';\n\n /** Mostra progress bar o pallini anche a desktop, comportamento utile per anteprime e documentazione. */\n @property({ type: Boolean, reflect: true, attribute: 'mobile-progress-on-desktop' })\n mobileProgressOnDesktop = false;\n\n /** Etichetta del pulsante \"Indietro\". */\n @property({ type: String, attribute: 'prev-label' })\n prevLabel?: string;\n\n /** Etichetta del pulsante \"Avanti\". */\n @property({ type: String, attribute: 'next-label' })\n nextLabel?: string;\n\n /** Etichetta del pulsante \"Conferma\". */\n @property({ type: String, attribute: 'confirm-label' })\n confirmLabel?: string;\n\n /**\n * Mostra il pulsante \"Conferma\" al posto del pulsante \"Avanti\".\n * Utile per l'ultimo step o per step che richiedono conferma esplicita su mobile.\n */\n @property({ type: Boolean, attribute: 'show-confirm' })\n showConfirm = false;\n\n /**\n * Etichetta del pulsante \"Salva\".\n * Se vuoto (default), l'area di salvataggio non viene mostrata.\n */\n @property({ type: String, attribute: 'save-label' })\n saveLabel?: string;\n\n /** Titolo del testo descrittivo nell'area di salvataggio. */\n @property({ type: String, attribute: 'save-title' })\n saveTitle?: string;\n\n /** Testo descrittivo nell'area di salvataggio. */\n @property({ type: String, attribute: 'save-description' })\n saveDescription?: string;\n\n private _stepCount = 0;\n\n private get _steps() {\n return Array.from(this.querySelectorAll<ItStepperStep>('it-stepper-step'));\n }\n\n override connectedCallback() {\n super.connectedCallback?.();\n this._syncSteps(true);\n }\n\n override willUpdate(changed: PropertyValues) {\n super.willUpdate?.(changed);\n if (changed.has('current') && this._stepCount > 0) {\n const currentIndex = this._currentIndex;\n if (this.current !== currentIndex) this.current = currentIndex;\n }\n }\n\n protected override updated(changed: PropertyValues): void {\n super.updated?.(changed);\n if (changed.has('current')) {\n this._syncSteps();\n }\n }\n\n private get _maxNavigableIndex() {\n return Math.max(this._stepCount - 1, 0);\n }\n\n private get _currentIndex() {\n return this._clampIndex(this.current);\n }\n\n private _clampIndex(index: number) {\n const numericIndex = Number.isFinite(index) ? Math.trunc(index) : 0;\n return Math.min(Math.max(numericIndex, 0), this._maxNavigableIndex);\n }\n\n private _syncSteps(clampCurrent = false) {\n const steps = this._steps;\n const previousStepCount = this._stepCount;\n this._stepCount = steps.length;\n const currentIndex = this._currentIndex;\n\n if (clampCurrent && this.current !== currentIndex) {\n this.current = currentIndex;\n }\n\n steps.forEach((_, index) => {\n const stepElement = steps[index];\n stepElement.active = index === currentIndex;\n stepElement.confirmed = index < currentIndex;\n });\n\n if (previousStepCount !== this._stepCount && this.hasUpdated) {\n this.requestUpdate();\n }\n }\n\n private _goToStep(nextStep: number) {\n const prevStep = this._currentIndex;\n const step = this._clampIndex(nextStep);\n if (step === prevStep) return;\n\n this.current = step;\n this.dispatchEvent(\n new CustomEvent('it-stepper-change', {\n detail: { step, prevStep },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n /** Avanza al prossimo step, se disponibile. */\n public next() {\n this._goToStep(this._currentIndex + 1);\n }\n\n /** Torna al passo precedente, se disponibile. */\n public prev() {\n this._goToStep(this._currentIndex - 1);\n }\n\n private _handleConfirm() {\n this.dispatchEvent(new CustomEvent('it-stepper-confirm', { bubbles: true, composed: true }));\n }\n\n private _handleSave() {\n this.dispatchEvent(new CustomEvent('it-stepper-save', { bubbles: true, composed: true }));\n }\n\n private _handleSlotChange() {\n this._syncSteps(true);\n }\n\n // eslint-disable-next-line class-methods-use-this\n private _getStepLabel(step: ItStepperStep): Node | '' {\n return step.querySelector(':scope > [slot=\"label\"]')?.cloneNode(true) ?? '';\n }\n\n private _renderHeaderItem(step: ItStepperStep, index: number) {\n const isActive = index === this._currentIndex;\n const isConfirmed = index < this._currentIndex;\n\n const liClasses = this.composeClass({\n active: isActive,\n confirmed: isConfirmed,\n 'no-line': this.headerVariant === 'numbers' && isActive,\n });\n\n const confirmedIcon = html`\n <it-icon class=\"icon steppers-success\" name=\"it-check\" aria-hidden=\"true\"></it-icon>\n <span class=\"visually-hidden\">${this.$t('confirmed')}</span>\n `;\n\n const activeHint = isActive ? html`<span class=\"visually-hidden\">${this.$t('active')}</span>` : '';\n const labelContent = this._getStepLabel(step);\n\n if (this.headerVariant === 'icons') {\n return html`\n <li class=${liClasses} aria-current=${ifDefined(isActive ? 'step' : undefined)}>\n ${step.icon ? html`<it-icon class=\"icon\" name=${step.icon} aria-hidden=\"true\"></it-icon>` : nothing}\n ${labelContent} ${isActive ? activeHint : ''} ${isConfirmed ? confirmedIcon : ''}\n </li>\n `;\n }\n\n if (this.headerVariant === 'numbers') {\n const numberContent = isConfirmed\n ? html`\n <it-icon class=\"icon steppers-success\" name=\"it-check\" aria-hidden=\"true\"></it-icon>\n <span class=\"visually-hidden\">${this.$t('confirmed')} ${this.$t('step')} ${index + 1}</span>\n `\n : html`<span class=\"visually-hidden\">${isActive ? this.$t('active') : ''} ${this.$t('step')} </span>${index + 1}`;\n\n return html`\n <li class=${liClasses} aria-current=${ifDefined(isActive ? 'step' : undefined)}>\n <span class=\"steppers-number\">${numberContent}</span>\n ${labelContent}\n </li>\n `;\n }\n\n // Default: text only\n return html`\n <li class=${liClasses} aria-current=${ifDefined(isActive ? 'step' : undefined)}>\n ${labelContent} ${isActive ? activeHint : ''} ${isConfirmed ? confirmedIcon : ''}\n </li>\n `;\n }\n\n private _renderMobileIndex() {\n const currentIndex = this._currentIndex;\n const total = this._stepCount;\n\n if (this.headerVariant === 'numbers') {\n return html`\n <span class=\"steppers-index\" aria-hidden=\"true\">\n ${Array.from({ length: total }, (_, i) => i).map(\n (i) => html`<span class=${ifDefined(i === currentIndex ? 'active' : undefined)}>${i + 1}</span>`,\n )}\n </span>\n `;\n }\n return html`<span class=\"steppers-index\" aria-hidden=\"true\">${currentIndex + 1}/${total}</span>`;\n }\n\n private _renderProgressBar() {\n const total = this._stepCount;\n const percent = total > 1 ? Math.round((this._currentIndex / (total - 1)) * 100) : 100;\n return html`\n <div class=\"steppers-progress\" part=\"progress\">\n <div class=\"progress\">\n <div\n class=\"progress-bar\"\n role=\"progressbar\"\n style=\"width: ${percent}%\"\n aria-label=${this.$t('progress')}\n aria-valuenow=${percent}\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n ></div>\n </div>\n </div>\n `;\n }\n\n private _renderDots() {\n const currentIndex = this._currentIndex;\n const total = this._stepCount;\n\n return html`\n <ul class=\"steppers-dots\" part=\"dots\">\n ${Array.from({ length: total }, (_, i) => i).map(\n (i) => html`\n <li class=${this._getDotClass(i)} aria-current=${ifDefined(i === currentIndex ? 'step' : undefined)}>\n <span class=\"visually-hidden\"\n >${this.$t('step')} ${i + 1} ${this.$t('outOf')} ${total}${this._getDotStateText(i)}</span\n >\n </li>\n `,\n )}\n </ul>\n `;\n }\n\n private _getDotClass(index: number) {\n if (index < this._currentIndex) return 'done';\n if (index === this._currentIndex) return 'done active';\n return '';\n }\n\n private _getDotStateText(index: number) {\n if (index < this._currentIndex) return ` - ${this.$t('confirmed')}`;\n if (index === this._currentIndex) return ` - ${this.$t('active')}`;\n return '';\n }\n\n private _renderSaveArea() {\n if (!this.saveLabel) return '';\n return html`\n <div class=\"steppers-save d-flex border-top pt-3 mt-2\" part=\"save\">\n <div class=\"text-lg-end mb-2 mb-lg-0 me-lg-3\">\n <p class=\"text-muted mb-0 small\"><strong>${this.saveTitle}</strong></p>\n <p class=\"text-muted mb-0 small\">${this.saveDescription}</p>\n </div>\n <it-button variant=\"secondary\" outline type=\"button\" @click=${this._handleSave} exportparts=\"focusable\">\n ${this.saveLabel}\n </it-button>\n </div>\n `;\n }\n\n private _renderProgressIndicator() {\n if (this.mobileProgress === 'bar') return this._renderProgressBar();\n if (this.mobileProgress === 'dots') return this._renderDots();\n return nothing;\n }\n\n render() {\n const stepperClasses = this.composeClass('steppers', {\n 'bg-dark': this.dark,\n 'mobile-progress-on-desktop': this.mobileProgressOnDesktop,\n });\n const isPrevDisabled = this._currentIndex <= 0;\n const isNextDisabled = this._currentIndex >= this._maxNavigableIndex;\n\n return html`\n <div class=${stepperClasses} part=\"stepper\">\n <div class=\"steppers-header mb-3\" part=\"header\">\n <ul part=\"header-list\">\n ${this._steps.map((step, i) => this._renderHeaderItem(step, i))}\n </ul>\n ${this._renderMobileIndex()}\n </div>\n <div class=\"steppers-content mb-3\" aria-live=\"polite\" part=\"content\">\n <slot @slotchange=${this._handleSlotChange}></slot>\n </div>\n <nav class=\"steppers-nav mb-3\" aria-label=${this.$t('navigation')} part=\"nav\">\n <it-button\n type=\"button\"\n variant=\"primary\"\n outline\n size=\"sm\"\n class=\"steppers-btn-prev\"\n exportparts=\"focusable\"\n ?disabled=${isPrevDisabled}\n @click=${this.prev}\n >\n <it-icon class=\"icon\" name=\"it-chevron-left\" color=${this.dark ? 'inverse' : 'primary'} size=\"sm\"></it-icon>\n ${this.prevLabel || this.$t('back')}\n </it-button>\n\n ${this._renderProgressIndicator()}\n ${this.showConfirm\n ? html`\n <it-button\n type=\"button\"\n variant=\"primary\"\n size=\"sm\"\n class=\"steppers-btn-confirm\"\n exportparts=\"focusable\"\n @click=${this._handleConfirm}\n >\n ${this.confirmLabel || this.$t('confirm')}\n </it-button>\n `\n : html`\n <it-button\n type=\"button\"\n variant=\"primary\"\n size=\"sm\"\n class=\"steppers-btn-next\"\n exportparts=\"focusable\"\n ?disabled=${isNextDisabled}\n @click=${this.next}\n >\n ${this.nextLabel || this.$t('next')}\n <it-icon\n class=\"icon\"\n name=\"it-chevron-right\"\n color=${this.dark ? 'primary' : 'inverse'}\n size=\"sm\"\n ></it-icon>\n </it-button>\n `}\n </nav>\n ${this._renderSaveArea()}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'it-stepper': ItStepper;\n }\n}\n"],"names":["translation","it","en"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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SAAA,EAAA,cAAA,EAAA,MAAA,CAAA;AAOtB,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;;AACnC,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,aAAA,EAAA,MAAA,CAAA;AAOpB,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;;AACjC,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,WAAA,EAAA,MAAA,CAAA;AAInB,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;;AACjC,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,WAAA,EAAA,MAAA,CAAA;AAInB,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;;AACjC,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,iBAAA,EAAA,MAAA,CAAA;AAtEd,SAAS,GAAA,UAAA,CAAA;IADrB,aAAa,CAAC,YAAY;AACd,CAAA,EAAA,SAAS,CAiYrB;;;;"}
|
|
1
|
+
{"version":3,"file":"it-stepper.js","sources":["../../../globals/dist/src/utils/dispatch-cancelable.js","../../../src/locales/it.ts","../../../src/locales/en.ts","../../../src/it-stepper.ts"],"sourcesContent":["/**\n * Dispatches a cancelable custom event and runs the provided default action\n * only if the consumer did not call `event.preventDefault()`.\n *\n * This is the shared convention used across components (Tabs, Modal, Chip, Alert,\n * Forward, Back) to provide a sensible default JavaScript behavior out of the box\n * while letting consumers intercept and override it. Notification deliberately does\n * NOT use this: its show/close are always caller-initiated (no default markup-driven\n * trigger to override), so there was no real use case for blocking them — see\n * it-notification.ts for the plain (non-cancelable) events it fires instead.\n *\n * ```js\n * el.addEventListener('it-alert-close', (e) => {\n * e.preventDefault(); // block the default removal\n * fetchConfirmation().then((ok) => { // async logic runs after prevention\n * if (ok) e.target.close();\n * });\n * });\n * ```\n *\n * Note: `preventDefault()` must be called synchronously inside the listener.\n * Async code can run afterward; call the component's public method when ready.\n *\n * @param host the element dispatching the event\n * @param name the event name (kebab-case, `it-` prefixed)\n * @param detail the event `detail` payload\n * @param defaultAction the behavior executed when the event is not prevented\n * @returns the dispatched event (inspect `defaultPrevented` if needed)\n */\nexport function dispatchCancelable(host, name, detail, defaultAction) {\n const event = new CustomEvent(name, {\n bubbles: true,\n composed: true,\n cancelable: true,\n detail,\n });\n host.dispatchEvent(event);\n if (!event.defaultPrevented) {\n defaultAction();\n }\n return event;\n}\n//# sourceMappingURL=dispatch-cancelable.js.map","import type { DefaultTranslation } from '@italia/i18n';\n\nconst translation: DefaultTranslation = {\n $code: 'it',\n $name: 'Italiano',\n $dir: 'ltr',\n back: 'Indietro',\n next: 'Avanti',\n confirm: 'Conferma',\n confirmed: 'Confermato',\n active: 'Attivo',\n step: 'Passo',\n progress: 'Avanzamento dello stepper',\n outOf: 'di',\n navigation: 'Navigazione stepper',\n};\n\nexport default translation;\n","import type { DefaultTranslation } from '@italia/i18n';\n\nconst translation: DefaultTranslation = {\n $code: 'en',\n $name: 'English',\n $dir: 'ltr',\n back: 'Back',\n next: 'Next',\n confirm: 'Confirm',\n confirmed: 'Confermato',\n active: 'Active',\n step: 'Step',\n progress: 'Stepper progress',\n outOf: 'out of',\n navigation: 'Stepper navigation',\n};\n\nexport default translation;\n","import { html, nothing, type PropertyValues } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { BaseLocalizedComponent, dispatchCancelable } from '@italia/globals';\nimport { registerTranslation } from '@italia/i18n';\nimport type { ItStepperStep } from './it-stepper-step.js';\nimport type { StepperChangeEventDetail, StepperHeaderVariant, StepperMobileProgress } from './types.js';\nimport styles from './stepper.scss';\n\nimport it from './locales/it.js';\nimport en from './locales/en.js';\n\nregisterTranslation(it);\nregisterTranslation(en);\n\n/**\n * `it-stepper` è il componente contenitore per una procedura a più passi.\n *\n * Gestisce la navigazione tra gli step, il rendering dell'intestazione,\n * dell'area contenuto e dei controlli di navigazione.\n *\n * ## Struttura attesa\n *\n * ```html\n * <it-stepper header-variant=\"numbers\">\n * <it-stepper-step>\n * <span slot=\"label\">Primo contenuto</span>\n * <p>Contenuto del primo step</p>\n * </it-stepper-step>\n * <it-stepper-step>\n * <span slot=\"label\">Secondo contenuto</span>\n * <p>Contenuto del secondo step</p>\n * </it-stepper-step>\n * <it-stepper-step>\n * <span slot=\"label\">Terzo contenuto</span>\n * <p>Contenuto del terzo step</p>\n * </it-stepper-step>\n * </it-stepper>\n * ```\n *\n * ## Validazione del form nello step\n *\n * Quando uno step contiene un form si può impedire l'avanzamento in due modi,\n * usabili anche insieme:\n *\n * 1. `next-disabled` disabilita il pulsante \"Avanti\"/\"Conferma\" finché il form\n * non è valido;\n * 2. `it-stepper-change`, se originato dal click su \"Avanti\", è annullabile:\n * `preventDefault()` blocca il cambio di step, lasciando al consumer la\n * possibilità di mostrare gli errori dei campi.\n *\n * ```js\n * const stepper = document.querySelector('it-stepper');\n * const form = stepper.querySelector('form');\n *\n * // 1. disabilita finché il form non è valido\n * form.addEventListener('it-input', () => {\n * stepper.nextDisabled = !form.checkValidity();\n * });\n *\n * // 2. oppure blocca al click e mostra gli errori\n * stepper.addEventListener('it-stepper-change', (e) => {\n * if (e.detail.step > e.detail.prevStep && !form.checkValidity()) {\n * e.preventDefault();\n * form.requestSubmit();\n * }\n * });\n * ```\n *\n * I componenti di form del design kit non mostrano i bubble nativi del browser\n * (`reportValidity()` restituisce il booleano corretto ma non produce nulla a\n * schermo): i messaggi sono renderizzati inline dal singolo controllo e restano\n * nascosti finché il form non è stato inviato almeno una volta. `requestSubmit()`\n * serve proprio a questo — l'invio viene bloccato dal controller quando il form\n * non è valido, quindi non naviga.\n *\n * @slot - Slot di default per gli elementi `it-stepper-step`.\n *\n * @fires it-stepper-change - Emesso quando lo step attivo cambia.\n * `detail.step` contiene il nuovo indice (0-based), `detail.prevStep` quello precedente\n * (vedi {@link StepperChangeEventDetail}).\n * È annullabile **solo** quando è originato dal click sul pulsante \"Avanti\":\n * in quel caso `preventDefault()` impedisce il cambio di step. Emesso dai metodi\n * pubblici `next()` / `prev()` non è annullabile e `preventDefault()` non ha effetto.\n * Non viene emesso quando si imposta direttamente la proprietà `current`.\n * @fires it-stepper-save - Emesso quando l'utente clicca il pulsante \"Salva\".\n * @fires it-stepper-confirm - Emesso quando l'utente clicca il pulsante \"Conferma\".\n * Non annullabile: non ha un comportamento di default da bloccare (non avanza lo\n * step), quindi il consumer controlla già interamente cosa succede alla conferma.\n * Per impedire la conferma usare `next-disabled`.\n *\n * @csspart stepper - The stepper's root container.\n * @csspart header - The header holding the list of steps.\n * @csspart header-list - The steps `ul` inside the header.\n * @csspart content - The area hosting the active step's content.\n * @csspart nav - The navigation bar with the \"back\"/\"next\" buttons.\n * @csspart progress - The textual progress indicator shown on mobile.\n * @csspart dots - The dotted progress indicator shown on mobile.\n * @csspart save - The area holding the \"save\" button.\n * @csspart focusable - The native `button` inside each navigation and save button.\n * @csspart prev-icon - The arrow inside the \"back\" button.\n * @csspart next-icon - The arrow inside the \"next\" button.\n */\n@customElement('it-stepper')\nexport class ItStepper extends BaseLocalizedComponent {\n static styles = styles;\n\n /**\n * Indice (0-based) dello step attivo.\n * Modificando questo attributo si naviga direttamente a un determinato step.\n */\n @property({ type: Number, reflect: true })\n current = 0;\n\n /** Variante con sfondo scuro. Aggiunge la classe `.bg-dark` al contenitore. */\n @property({ type: Boolean, reflect: true })\n dark = false;\n\n /**\n * Variante dell'intestazione degli step.\n * - `text`: solo testo\n * - `icons`: icona + testo (richiede l'attributo `icon` su ogni `it-stepper-step`)\n * - `numbers`: numero ordinale + testo\n */\n @property({ type: String, attribute: 'header-variant' })\n headerVariant: StepperHeaderVariant = 'text';\n\n /**\n * Indicatore di progresso mobile mostrato tra i pulsanti di navigazione.\n * - `bar`: barra di avanzamento\n * - `dots`: pallini\n * - `''` (vuoto): nessun indicatore (default)\n *\n * Su desktop l'indicatore è sempre nascosto (comportamento BSI nativo).\n */\n @property({ type: String, attribute: 'mobile-progress' })\n mobileProgress: StepperMobileProgress = '';\n\n /** Mostra progress bar o pallini anche a desktop, comportamento utile per anteprime e documentazione. */\n @property({ type: Boolean, reflect: true, attribute: 'mobile-progress-on-desktop' })\n mobileProgressOnDesktop = false;\n\n /** Etichetta del pulsante \"Indietro\". */\n @property({ type: String, attribute: 'prev-label' })\n prevLabel?: string;\n\n /** Etichetta del pulsante \"Avanti\". */\n @property({ type: String, attribute: 'next-label' })\n nextLabel?: string;\n\n /** Etichetta del pulsante \"Conferma\". */\n @property({ type: String, attribute: 'confirm-label' })\n confirmLabel?: string;\n\n /**\n * Disabilita il pulsante \"Avanti\" (o \"Conferma\", quando `show-confirm` è attivo).\n * Da usare quando lo step corrente contiene un form non valido o con campi\n * obbligatori mancanti. Viene combinato in OR con la disabilitazione\n * automatica ai limiti della sequenza.\n *\n * Il pulsante \"Indietro\" non è influenzato: è sempre possibile tornare\n * al passo precedente anche da uno step non valido.\n */\n @property({ type: Boolean, reflect: true, attribute: 'next-disabled' })\n nextDisabled = false;\n\n /**\n * Mostra il pulsante \"Conferma\" al posto del pulsante \"Avanti\".\n * Utile per l'ultimo step o per step che richiedono conferma esplicita su mobile.\n */\n @property({ type: Boolean, attribute: 'show-confirm' })\n showConfirm = false;\n\n /**\n * Etichetta del pulsante \"Salva\".\n * Se vuoto (default), l'area di salvataggio non viene mostrata.\n */\n @property({ type: String, attribute: 'save-label' })\n saveLabel?: string;\n\n /** Titolo del testo descrittivo nell'area di salvataggio. */\n @property({ type: String, attribute: 'save-title' })\n saveTitle?: string;\n\n /** Testo descrittivo nell'area di salvataggio. */\n @property({ type: String, attribute: 'save-description' })\n saveDescription?: string;\n\n private _stepCount = 0;\n\n private get _steps() {\n return Array.from(this.querySelectorAll<ItStepperStep>('it-stepper-step'));\n }\n\n override connectedCallback() {\n super.connectedCallback?.();\n this._syncSteps(true);\n }\n\n override willUpdate(changed: PropertyValues) {\n super.willUpdate?.(changed);\n if (changed.has('current') && this._stepCount > 0) {\n const currentIndex = this._currentIndex;\n if (this.current !== currentIndex) this.current = currentIndex;\n }\n }\n\n protected override updated(changed: PropertyValues): void {\n super.updated?.(changed);\n if (changed.has('current')) {\n this._syncSteps();\n }\n }\n\n private get _maxNavigableIndex() {\n return Math.max(this._stepCount - 1, 0);\n }\n\n private get _currentIndex() {\n return this._clampIndex(this.current);\n }\n\n private _clampIndex(index: number) {\n const numericIndex = Number.isFinite(index) ? Math.trunc(index) : 0;\n return Math.min(Math.max(numericIndex, 0), this._maxNavigableIndex);\n }\n\n private _syncSteps(clampCurrent = false) {\n const steps = this._steps;\n const previousStepCount = this._stepCount;\n this._stepCount = steps.length;\n const currentIndex = this._currentIndex;\n\n if (clampCurrent && this.current !== currentIndex) {\n this.current = currentIndex;\n }\n\n steps.forEach((_, index) => {\n const stepElement = steps[index];\n stepElement.active = index === currentIndex;\n stepElement.confirmed = index < currentIndex;\n });\n\n if (previousStepCount !== this._stepCount && this.hasUpdated) {\n this.requestUpdate();\n }\n }\n\n private _goToStep(nextStep: number, { cancelable = false } = {}) {\n const prevStep = this._currentIndex;\n const step = this._clampIndex(nextStep);\n if (step === prevStep) return;\n\n const detail: StepperChangeEventDetail = { step, prevStep };\n\n if (cancelable) {\n dispatchCancelable(this, 'it-stepper-change', detail, () => {\n this.current = step;\n });\n return;\n }\n\n this.current = step;\n this.dispatchEvent(\n new CustomEvent('it-stepper-change', {\n detail,\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n /**\n * Gestisce il click sul pulsante \"Avanti\": emette `it-stepper-change` in forma\n * annullabile, così il consumer può bloccare l'avanzamento (es. form non valido).\n * Il metodo pubblico `next()` resta invece sempre incondizionato.\n */\n private _handleNext() {\n // `it-button` con `disabled` non disabilita il `<button>` nativo: applica solo\n // `pointer-events: none` e `aria-disabled`, quindi il pulsante resta\n // attivabile da tastiera. Il controllo va rifatto qui.\n if (this.nextDisabled) return;\n\n this._goToStep(this._currentIndex + 1, { cancelable: true });\n }\n\n /**\n * Avanza al prossimo step, se disponibile.\n * Non annullabile: l'evento `it-stepper-change` emesso da questo metodo non\n * può essere bloccato con `preventDefault()`.\n */\n public next() {\n this._goToStep(this._currentIndex + 1);\n }\n\n /** Torna al passo precedente, se disponibile. */\n public prev() {\n this._goToStep(this._currentIndex - 1);\n }\n\n private _handleConfirm() {\n // Vedi la nota in `_handleNext`: il pulsante disabilitato è comunque\n // attivabile da tastiera, quindi lo stato va verificato anche qui.\n if (this.nextDisabled) return;\n\n this.dispatchEvent(new CustomEvent('it-stepper-confirm', { bubbles: true, composed: true }));\n }\n\n private _handleSave() {\n this.dispatchEvent(new CustomEvent('it-stepper-save', { bubbles: true, composed: true }));\n }\n\n private _handleSlotChange() {\n this._syncSteps(true);\n }\n\n // eslint-disable-next-line class-methods-use-this\n private _getStepLabel(step: ItStepperStep): Node | '' {\n return step.querySelector(':scope > [slot=\"label\"]')?.cloneNode(true) ?? '';\n }\n\n private _renderHeaderItem(step: ItStepperStep, index: number) {\n const isActive = index === this._currentIndex;\n const isConfirmed = index < this._currentIndex;\n\n const liClasses = this.composeClass({\n active: isActive,\n confirmed: isConfirmed,\n 'no-line': this.headerVariant === 'numbers' && isActive,\n });\n\n const confirmedIcon = html`\n <it-icon class=\"icon steppers-success\" name=\"it-check\" aria-hidden=\"true\"></it-icon>\n <span class=\"visually-hidden\">${this.$t('confirmed')}</span>\n `;\n\n const activeHint = isActive ? html`<span class=\"visually-hidden\">${this.$t('active')}</span>` : '';\n const labelContent = this._getStepLabel(step);\n\n if (this.headerVariant === 'icons') {\n return html`\n <li class=${liClasses} aria-current=${ifDefined(isActive ? 'step' : undefined)}>\n ${step.icon ? html`<it-icon class=\"icon\" name=${step.icon} aria-hidden=\"true\"></it-icon>` : nothing}\n ${labelContent} ${isActive ? activeHint : ''} ${isConfirmed ? confirmedIcon : ''}\n </li>\n `;\n }\n\n if (this.headerVariant === 'numbers') {\n const numberContent = isConfirmed\n ? html`\n <it-icon class=\"icon steppers-success\" name=\"it-check\" aria-hidden=\"true\"></it-icon>\n <span class=\"visually-hidden\">${this.$t('confirmed')} ${this.$t('step')} ${index + 1}</span>\n `\n : html`<span class=\"visually-hidden\">${isActive ? this.$t('active') : ''} ${this.$t('step')} </span>${index + 1}`;\n\n return html`\n <li class=${liClasses} aria-current=${ifDefined(isActive ? 'step' : undefined)}>\n <span class=\"steppers-number\">${numberContent}</span>\n ${labelContent}\n </li>\n `;\n }\n\n // Default: text only\n return html`\n <li class=${liClasses} aria-current=${ifDefined(isActive ? 'step' : undefined)}>\n ${labelContent} ${isActive ? activeHint : ''} ${isConfirmed ? confirmedIcon : ''}\n </li>\n `;\n }\n\n private _renderMobileIndex() {\n const currentIndex = this._currentIndex;\n const total = this._stepCount;\n\n if (this.headerVariant === 'numbers') {\n return html`\n <span class=\"steppers-index\" aria-hidden=\"true\">\n ${Array.from({ length: total }, (_, i) => i).map(\n (i) => html`<span class=${ifDefined(i === currentIndex ? 'active' : undefined)}>${i + 1}</span>`,\n )}\n </span>\n `;\n }\n return html`<span class=\"steppers-index\" aria-hidden=\"true\">${currentIndex + 1}/${total}</span>`;\n }\n\n private _renderProgressBar() {\n const total = this._stepCount;\n const percent = total > 1 ? Math.round((this._currentIndex / (total - 1)) * 100) : 100;\n return html`\n <div class=\"steppers-progress\" part=\"progress\">\n <div class=\"progress\">\n <div\n class=\"progress-bar\"\n role=\"progressbar\"\n style=\"width: ${percent}%\"\n aria-label=${this.$t('progress')}\n aria-valuenow=${percent}\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n ></div>\n </div>\n </div>\n `;\n }\n\n private _renderDots() {\n const currentIndex = this._currentIndex;\n const total = this._stepCount;\n\n return html`\n <ul class=\"steppers-dots\" part=\"dots\">\n ${Array.from({ length: total }, (_, i) => i).map(\n (i) => html`\n <li class=${this._getDotClass(i)} aria-current=${ifDefined(i === currentIndex ? 'step' : undefined)}>\n <span class=\"visually-hidden\"\n >${this.$t('step')} ${i + 1} ${this.$t('outOf')} ${total}${this._getDotStateText(i)}</span\n >\n </li>\n `,\n )}\n </ul>\n `;\n }\n\n private _getDotClass(index: number) {\n if (index < this._currentIndex) return 'done';\n if (index === this._currentIndex) return 'done active';\n return '';\n }\n\n private _getDotStateText(index: number) {\n if (index < this._currentIndex) return ` - ${this.$t('confirmed')}`;\n if (index === this._currentIndex) return ` - ${this.$t('active')}`;\n return '';\n }\n\n private _renderSaveArea() {\n if (!this.saveLabel) return '';\n return html`\n <div class=\"steppers-save d-flex border-top pt-3 mt-2\" part=\"save\">\n <div class=\"text-lg-end mb-2 mb-lg-0 me-lg-3\">\n <p class=\"text-muted mb-0 small\"><strong>${this.saveTitle}</strong></p>\n <p class=\"text-muted mb-0 small\">${this.saveDescription}</p>\n </div>\n <it-button variant=\"secondary\" outline type=\"button\" @click=${this._handleSave} exportparts=\"focusable\">\n ${this.saveLabel}\n </it-button>\n </div>\n `;\n }\n\n private _renderProgressIndicator() {\n if (this.mobileProgress === 'bar') return this._renderProgressBar();\n if (this.mobileProgress === 'dots') return this._renderDots();\n return nothing;\n }\n\n render() {\n const stepperClasses = this.composeClass('steppers', {\n 'bg-dark': this.dark,\n 'mobile-progress-on-desktop': this.mobileProgressOnDesktop,\n });\n const isPrevDisabled = this._currentIndex <= 0;\n const isNextDisabled = this.nextDisabled || this._currentIndex >= this._maxNavigableIndex;\n\n return html`\n <div class=${stepperClasses} part=\"stepper\">\n <div class=\"steppers-header mb-3\" part=\"header\">\n <ul part=\"header-list\">\n ${this._steps.map((step, i) => this._renderHeaderItem(step, i))}\n </ul>\n ${this._renderMobileIndex()}\n </div>\n <div class=\"steppers-content mb-3\" aria-live=\"polite\" part=\"content\">\n <slot @slotchange=${this._handleSlotChange}></slot>\n </div>\n <nav class=\"steppers-nav mb-3\" aria-label=${this.$t('navigation')} part=\"nav\">\n <it-button\n type=\"button\"\n variant=\"primary\"\n outline\n size=\"sm\"\n class=\"steppers-btn-prev\"\n exportparts=\"focusable\"\n ?disabled=${isPrevDisabled}\n @click=${this.prev}\n >\n <it-icon\n class=\"icon\"\n name=\"it-chevron-left\"\n color=${this.dark ? 'inverse' : 'primary'}\n size=\"sm\"\n exportparts=\"icon: prev-icon\"\n ></it-icon>\n ${this.prevLabel || this.$t('back')}\n </it-button>\n\n ${this._renderProgressIndicator()}\n ${this.showConfirm\n ? html`\n <it-button\n type=\"button\"\n variant=\"primary\"\n size=\"sm\"\n class=\"steppers-btn-confirm\"\n exportparts=\"focusable\"\n ?disabled=${this.nextDisabled}\n @click=${this._handleConfirm}\n >\n ${this.confirmLabel || this.$t('confirm')}\n </it-button>\n `\n : html`\n <it-button\n type=\"button\"\n variant=\"primary\"\n size=\"sm\"\n class=\"steppers-btn-next\"\n exportparts=\"focusable\"\n ?disabled=${isNextDisabled}\n @click=${this._handleNext}\n >\n ${this.nextLabel || this.$t('next')}\n <it-icon\n class=\"icon\"\n name=\"it-chevron-right\"\n color=${this.dark ? 'primary' : 'inverse'}\n size=\"sm\"\n exportparts=\"icon: next-icon\"\n ></it-icon>\n </it-button>\n `}\n </nav>\n ${this._renderSaveArea()}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'it-stepper': ItStepper;\n }\n}\n"],"names":["translation","it","en"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE;AACtE,IAAI,MAAM,KAAK,GAAG,IAAI,WAAW,CAAC,IAAI,EAAE;AACxC,QAAQ,OAAO,EAAE,IAAI;AACrB,QAAQ,QAAQ,EAAE,IA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AAA,CAAA;AAInB,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;;AACjC,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,WAAA,EAAA,MAAA,CAAA;AAInB,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;;AACjC,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,iBAAA,EAAA,MAAA,CAAA;AAlFd,SAAS,GAAA,UAAA,CAAA;IADrB,aAAa,CAAC,YAAY;AACd,CAAA,EAAA,SAAS,CAobrB;;;;"}
|
package/dist/src/types.d.ts
CHANGED
|
@@ -2,4 +2,19 @@ export declare const STEPPER_HEADER_VARIANTS: readonly ["text", "icons", "number
|
|
|
2
2
|
export type StepperHeaderVariant = (typeof STEPPER_HEADER_VARIANTS)[number];
|
|
3
3
|
export declare const STEPPER_MOBILE_PROGRESS: readonly ["bar", "dots", ""];
|
|
4
4
|
export type StepperMobileProgress = (typeof STEPPER_MOBILE_PROGRESS)[number];
|
|
5
|
+
/**
|
|
6
|
+
* Payload dell'evento `it-stepper-change`.
|
|
7
|
+
*
|
|
8
|
+
* L'evento è annullabile **solo** quando è originato dal click dell'utente sul
|
|
9
|
+
* pulsante "Avanti": in quel caso `preventDefault()` impedisce il cambio di step
|
|
10
|
+
* (utile per bloccare l'avanzamento quando il form dello step non è valido).
|
|
11
|
+
* Quando è emesso dai metodi pubblici `next()` / `prev()` l'evento non è
|
|
12
|
+
* annullabile e `preventDefault()` non ha alcun effetto.
|
|
13
|
+
*/
|
|
14
|
+
export interface StepperChangeEventDetail {
|
|
15
|
+
/** Indice (0-based) dello step di destinazione. */
|
|
16
|
+
step: number;
|
|
17
|
+
/** Indice (0-based) dello step di partenza. */
|
|
18
|
+
prevStep: number;
|
|
19
|
+
}
|
|
5
20
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/src/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,uCAAwC,CAAC;AAC7E,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5E,eAAO,MAAM,uBAAuB,8BAA+B,CAAC;AACpE,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,uCAAwC,CAAC;AAC7E,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5E,eAAO,MAAM,uBAAuB,8BAA+B,CAAC;AACpE,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7E;;;;;;;;GAQG;AACH,MAAM,WAAW,wBAAwB;IACvC,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,CAAC;CAClB"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@italia/stepper",
|
|
3
3
|
"description": "Web component it-stepper del Design system .italia",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.3",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"bootstrap-italia": "3.0.0-beta.5",
|
|
39
39
|
"lit": "^3.3.0",
|
|
40
|
-
"@italia/globals": "^1.0.0-beta.
|
|
41
|
-
"@italia/i18n": "^1.0.0-beta.
|
|
40
|
+
"@italia/globals": "^1.0.0-beta.3",
|
|
41
|
+
"@italia/i18n": "^1.0.0-beta.3"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@custom-elements-manifest/analyzer": "^0.10.3",
|
|
@@ -53,13 +53,13 @@
|
|
|
53
53
|
"sass": "^1.89.0",
|
|
54
54
|
"tslib": "^2.6.3",
|
|
55
55
|
"typescript": "^5.5.3",
|
|
56
|
-
"@italia/button": "^1.0.0-beta.
|
|
56
|
+
"@italia/button": "^1.0.0-beta.3",
|
|
57
57
|
"@italia/test-config": "^1.0.0-beta.2",
|
|
58
58
|
"@italia/typescript-config": "^1.0.0-beta.1"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
|
-
"@italia/button": "^1.0.0-beta.
|
|
62
|
-
"@italia/icon": "^1.0.0-beta.
|
|
61
|
+
"@italia/button": "^1.0.0-beta.3",
|
|
62
|
+
"@italia/icon": "^1.0.0-beta.3"
|
|
63
63
|
},
|
|
64
64
|
"customElements": "custom-elements.json",
|
|
65
65
|
"scripts": {
|