mypgs 2.0.0 → 2.1.0

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.
Files changed (104) hide show
  1. package/README.md +25 -25
  2. package/assets/scss/components/_accordion.scss +0 -2
  3. package/assets/scss/components/_button.scss +1 -1
  4. package/assets/scss/components/_form.scss +0 -16
  5. package/assets/scss/components/_formAddon.scss +18 -0
  6. package/assets/scss/components/_modals.scss +5 -3
  7. package/assets/scss/components/_search.scss +2 -2
  8. package/assets/scss/components/_slides.scss +0 -1
  9. package/assets/scss/components/_tooltip.scss +0 -1
  10. package/assets/scss/index.scss +1 -0
  11. package/assets/scss/layout/_footer.scss +0 -2
  12. package/assets/scss/layout/_header.scss +9 -1
  13. package/assets/scss/layout/_pageShell.scss +6 -2
  14. package/assets/scss/mixin/_mx-button.scss +30 -76
  15. package/assets/scss/mixin/_mx-card.scss +11 -9
  16. package/assets/scss/mixin/_mx-form.scss +3 -5
  17. package/assets/scss/mixin/{_mx-form-addon.scss → _mx-formAddon.scss} +23 -26
  18. package/assets/scss/mixin/_mx-hover.scss +75 -0
  19. package/assets/scss/mixin/_settings.scss +2 -1
  20. package/assets/scss/mixin/mixin.scss +2 -1
  21. package/demo/demo.js +4 -3
  22. package/dist/css/index.css +1166 -1517
  23. package/dist/css/index.css.map +1 -1
  24. package/dist/css/index.min.css +1 -1
  25. package/docs/componenti-e-markup.md +6 -5
  26. package/docs/components/accordion.md +22 -22
  27. package/docs/components/badges.md +19 -19
  28. package/docs/components/breadcumbs.md +8 -8
  29. package/docs/components/button.md +17 -17
  30. package/docs/components/card.md +19 -19
  31. package/docs/components/dropdown.md +29 -29
  32. package/docs/components/form.md +63 -40
  33. package/docs/components/formAddon.md +79 -0
  34. package/docs/components/logo.md +11 -11
  35. package/docs/components/menu.md +20 -20
  36. package/docs/components/modal.md +46 -46
  37. package/docs/components/notification.md +34 -34
  38. package/docs/components/search.md +51 -50
  39. package/docs/components/slides.md +39 -39
  40. package/docs/components/stepTabs.md +41 -41
  41. package/docs/components/steps.md +16 -16
  42. package/docs/components/summary.md +20 -20
  43. package/docs/components/table.md +7 -7
  44. package/docs/components/tooltip.md +22 -22
  45. package/docs/convenzioni.md +11 -11
  46. package/docs/export-e-sviluppo.md +3 -3
  47. package/docs/helper-javascript.md +7 -7
  48. package/docs/layout/body.md +11 -11
  49. package/docs/layout/flex.md +44 -44
  50. package/docs/layout/footer.md +23 -23
  51. package/docs/layout/grid.md +44 -44
  52. package/docs/layout/header.md +34 -34
  53. package/docs/layout/pageShell.md +11 -11
  54. package/docs/layout/section.md +26 -26
  55. package/docs/patterns/cookieConsent.md +38 -38
  56. package/docs/utilizzo-css-scss.md +8 -8
  57. package/package.json +1 -1
  58. package/scripts/generate-component-docs.js +5 -5
  59. package/templates/html/components/accordion.html +19 -19
  60. package/templates/html/components/badges.html +17 -17
  61. package/templates/html/components/breadcumbs.html +6 -6
  62. package/templates/html/components/button.html +15 -15
  63. package/templates/html/components/card.html +17 -17
  64. package/templates/html/components/dropdown.html +25 -25
  65. package/templates/html/components/form.html +58 -35
  66. package/templates/html/components/formAddon.html +72 -0
  67. package/templates/html/components/logo.html +9 -9
  68. package/templates/html/components/menu.html +16 -16
  69. package/templates/html/components/modal.html +42 -42
  70. package/templates/html/components/notification.html +30 -30
  71. package/templates/html/components/search.html +43 -42
  72. package/templates/html/components/slides.html +31 -31
  73. package/templates/html/components/stepTabs.html +37 -37
  74. package/templates/html/components/steps.html +13 -13
  75. package/templates/html/components/summary.html +17 -17
  76. package/templates/html/components/table.html +5 -5
  77. package/templates/html/components/tooltip.html +18 -18
  78. package/templates/html/layout/body.html +9 -10
  79. package/templates/html/layout/flex.html +42 -42
  80. package/templates/html/layout/footer.html +20 -20
  81. package/templates/html/layout/grid.html +42 -42
  82. package/templates/html/layout/header.html +32 -32
  83. package/templates/html/layout/pageShell.html +8 -8
  84. package/templates/html/layout/section.html +24 -24
  85. package/templates/html/patterns/cookieConsent.html +33 -33
  86. package/templates/react/components/accordion.jsx +4 -4
  87. package/templates/react/components/breadcumbs.jsx +1 -1
  88. package/templates/react/components/button.jsx +5 -5
  89. package/templates/react/components/card.jsx +4 -4
  90. package/templates/react/components/dropdown.jsx +8 -8
  91. package/templates/react/components/form.jsx +2 -2
  92. package/templates/react/components/modal.jsx +14 -14
  93. package/templates/react/components/notification.jsx +3 -3
  94. package/templates/react/components/search.jsx +5 -5
  95. package/templates/react/components/slides.jsx +3 -3
  96. package/templates/react/components/stepTabs.jsx +8 -8
  97. package/templates/react/components/summary.jsx +3 -3
  98. package/templates/react/components/table.jsx +2 -2
  99. package/templates/react/layout/flex.jsx +8 -8
  100. package/templates/react/layout/grid.jsx +8 -8
  101. package/templates/react/layout/section.jsx +12 -12
  102. package/templates/react/patterns/cookieConsent.jsx +8 -8
  103. package/templates/react/patterns/footer.jsx +3 -3
  104. package/templates/react/patterns/header.jsx +3 -3
@@ -0,0 +1,72 @@
1
+ <!--
2
+ /**
3
+ * @title Form Add-ons
4
+ * @description Additional form controls for selectable cards, two-state buttons, switches, and compact chip groups.
5
+ *
6
+ * @pgs
7
+ * - checkboxBackground: presents a checkbox as a selectable container with a highlighted checked state.
8
+ * - twoState: presents checkbox or radio labels as buttons whose appearance changes when selected.
9
+ * - toggle: presents a checkbox as a switch with a rail and movable thumb.
10
+ * - chips: groups twoState controls into a compact segmented selector.
11
+ *
12
+ * @related
13
+ * - flexColumnElements: vertically arranges the form add-on examples.
14
+ * - flexColumnTexts: groups each example with its heading and control.
15
+ *
16
+ * @return HTML examples of the checkboxBackground, twoState, toggle, and chips form controls using native checkbox and radio inputs.
17
+ */
18
+ -->
19
+
20
+ <div pgs="flexColumnElements">
21
+ <section pgs="flexColumnTexts">
22
+ <strong>Checkbox with background</strong>
23
+
24
+ <label pgs="checkboxBackground">
25
+ <input type="checkbox" name="notifications" value="enabled">
26
+ <span>
27
+ <strong>Enable notifications</strong><br>
28
+ Receive important account updates.
29
+ </span>
30
+ </label>
31
+ </section>
32
+
33
+ <section pgs="flexColumnTexts">
34
+ <strong>Two-state controls</strong>
35
+
36
+ <label pgs="twoState">
37
+ <input type="checkbox" name="favorite" value="yes">
38
+ <i class="fa-solid fa-star" aria-hidden="true"></i>
39
+ Add to favorites
40
+ </label>
41
+ </section>
42
+
43
+ <section pgs="flexColumnTexts">
44
+ <strong>Toggle</strong>
45
+
46
+ <label pgs="toggle">
47
+ <span>Enable dark mode</span>
48
+ <input type="checkbox" name="darkMode" value="enabled">
49
+ </label>
50
+ </section>
51
+
52
+ <section pgs="flexColumnTexts">
53
+ <strong>Chips</strong>
54
+
55
+ <div pgs="chips" role="group" aria-label="Select a plan">
56
+ <label pgs="twoState">
57
+ <input type="radio" name="plan" value="basic" checked>
58
+ Basic
59
+ </label>
60
+
61
+ <label pgs="twoState">
62
+ <input type="radio" name="plan" value="pro">
63
+ Pro
64
+ </label>
65
+
66
+ <label pgs="twoState">
67
+ <input type="radio" name="plan" value="enterprise">
68
+ Enterprise
69
+ </label>
70
+ </div>
71
+ </section>
72
+ </div>
@@ -1,21 +1,21 @@
1
1
  <!--
2
2
  /**
3
3
  * @title Logo
4
- * @description Componente per mostrare un logo grafico o testuale, con supporto alle varianti dell'immagine legate al tema scuro.
4
+ * @description Component for displaying a graphical or text logo, with image variants that support dark mode.
5
5
  *
6
6
  * @pgs
7
- * - logo: identifica il collegamento contenitore del marchio.
8
- * - logo-image: identifica l'immagine grafica del logo.
9
- * - logo-text: identifica la variante testuale del marchio.
7
+ * - logo: identifies the brand link container.
8
+ * - logo-image: identifies the graphical logo image.
9
+ * - logo-text: identifies the text-based brand variant.
10
10
  *
11
11
  * @pgs-option
12
- * - logoDarkmode: inverte l'immagine del logo quando lo stato globale darkmode è attivo.
13
- * - logoDarkmodeFixed: mantiene applicata l'inversione dell'immagine indipendentemente dal tema corrente.
12
+ * - logoDarkmode: inverts the logo image when the global darkmode state is active.
13
+ * - logoDarkmodeFixed: keeps the image inversion enabled regardless of the current theme.
14
14
  *
15
15
  * @pgs-state
16
- * - darkmode: stato globale applicato al documento che attiva la variante logoDarkmode.
16
+ * - darkmode: global document state that activates the logoDarkmode variant.
17
17
  *
18
- * @return Esempi HTML del logo grafico sensibile al tema e del logo testuale.
18
+ * @return HTML examples of the theme-aware graphical logo and the text logo.
19
19
  */
20
20
  -->
21
21
 
@@ -23,6 +23,6 @@
23
23
  <img pgs="logo-image" src="https://placehold.co/240x80?text=MyPGS" alt="MyPGS">
24
24
  </a>
25
25
 
26
- <a aria-label="Logo testuale" pgs="logo" href="/">
26
+ <a aria-label="Text logo" pgs="logo" href="/">
27
27
  <span pgs="logo-text">MyPGS</span>
28
28
  </a>
@@ -1,33 +1,33 @@
1
1
  <!--
2
2
  /**
3
3
  * @title Menu
4
- * @description Navigazione orizzontale o verticale che trasforma le voci con sottomenu in dropdown accessibili e inizializzati automaticamente.
4
+ * @description Menu markup, configuration, behavior, and usage example.
5
5
  *
6
6
  * @pgs
7
- * - menu: identifica il contenitore di navigazione elaborato dal modulo menu.
8
- * - menu-buttonIcon: identifica il controllo creato dinamicamente accanto alle voci con sottomenu.
7
+ * - menu: identifies the menu element used by Menu.
8
+ * - menu-buttonIcon: identifies the menu-buttonIcon element used by Menu.
9
9
  *
10
10
  * @pgs-option
11
- * - horizontal: dispone il menu e i suoi elementi in orizzontale.
12
- * - vertical: dispone il menu e i suoi elementi in verticale.
13
- * - menuHeader: adatta spaziature e comportamento del menu quando è inserito nell'header.
14
- * - position: viene impostata come position[bottom right] sui dropdown creati per i sottomenu.
11
+ * - horizontal: identifies the horizontal element used by Menu.
12
+ * - vertical: identifies the vertical element used by Menu.
13
+ * - menuHeader: identifies the menuHeader element used by Menu.
14
+ * - position: identifies the position element used by Menu.
15
15
  *
16
16
  * @pgs-state
17
- * - open: indica il sottomenu trasformato in dropdown attualmente aperto.
17
+ * - open: identifies the open element used by Menu.
18
18
  *
19
19
  * @api
20
- * - pgs.menu.init(root): inizializza i menu non ancora registrati dentro Document o Element indicato e prepara i sottomenu.
21
- * - pgs.menu.api(element): restituisce l'istanza associata a un root menu inizializzato.
22
- * - instance.refresh(): riesegue l'inizializzazione nel contenitore del menu e restituisce l'istanza.
20
+ * - pgs.menu.init(root): initializes matching elements within the specified root.
21
+ * - pgs.menu.api(element): returns the instance associated with the specified initialized element.
22
+ * - instance.refresh(): refreshes the component and returns its updated instance.
23
23
  *
24
24
  * @related
25
- * - dropdown: viene aggiunto dinamicamente alle voci che contengono una lista annidata.
26
- * - dropdown-button: identifica il controllo dinamico del sottomenu.
27
- * - buttonNohover: neutralizza lo stile hover del controllo dinamico.
28
- * - dropdown-content: identifica la lista annidata mostrata come pannello dropdown.
25
+ * - dropdown: uses the related dropdown component or utility in this example.
26
+ * - dropdown-button: uses the related dropdown-button component or utility in this example.
27
+ * - buttonNohover: uses the related buttonNohover component or utility in this example.
28
+ * - dropdown-content: uses the related dropdown-content component or utility in this example.
29
29
  *
30
- * @return Due strutture nav complete per le varianti orizzontale e verticale del menu.
30
+ * @return Complete HTML markup and usage example for Menu.
31
31
  */
32
32
  -->
33
33
 
@@ -1,60 +1,60 @@
1
1
  <!--
2
2
  /**
3
3
  * @title Modal
4
- * @description Componente che collega un pulsante a un dialog nativo, ne gestisce apertura e chiusura e può spostarlo in un contenitore configurato.
4
+ * @description Modal markup, configuration, behavior, and usage example.
5
5
  *
6
6
  * @pgs
7
- * - modal: identifica il contenitore logico inizializzato dal modulo modal.
8
- * - modal-button: identifica il controllo di apertura della finestra.
7
+ * - modal: identifies the modal element used by Modal.
8
+ * - modal-button: identifies the modal-button element used by Modal.
9
9
  * - dialog: token aggiunto dinamicamente all'elemento dialog inizializzato.
10
- * - modal-dialog: identifica il dialog nativo dopo l'inizializzazione JavaScript.
11
- * - modal-dialog-content: identifica il contenitore visivo della finestra.
12
- * - modal-dialog-content-header: identifica l'intestazione che può ricevere il pulsante di chiusura automatico.
13
- * - modal-dialog-content-scroll: identifica l'area interna scorrevole.
14
- * - modal-close: identifica un controllo che chiude la finestra.
10
+ * - modal-dialog: identifies the modal-dialog element used by Modal.
11
+ * - modal-dialog-content: identifies the modal-dialog-content element used by Modal.
12
+ * - modal-dialog-content-header: identifies the modal-dialog-content-header element used by Modal.
13
+ * - modal-dialog-content-scroll: identifies the modal-dialog-content-scroll element used by Modal.
14
+ * - modal-close: identifies the modal-close element used by Modal.
15
15
  *
16
16
  * @pgs-option
17
- * - containerID: sul root usa containerID[id] per spostare il dialog nell'elemento con l'id indicato.
18
- * - containerPGS: sul root usa containerPGS[token] per spostare il dialog nel primo elemento con quel token pgs.
19
- * - disableBackdropClose: sul root impedisce la chiusura tramite click sul backdrop.
20
- * - history: sul root sincronizza l'apertura con il parametro modal nella cronologia del browser e richiede un id sul pulsante.
21
- * - topLevel: sul dialog mantiene la finestra nel componente e usa showModal per una modale top-level.
22
- * - left: sul dialog posiziona e anima il contenuto dal lato sinistro.
23
- * - right: sul dialog posiziona e anima il contenuto dal lato destro.
17
+ * - containerID: identifies the containerID element used by Modal.
18
+ * - containerPGS: identifies the containerPGS element used by Modal.
19
+ * - disableBackdropClose: identifies the disableBackdropClose element used by Modal.
20
+ * - history: identifies the history element used by Modal.
21
+ * - topLevel: identifies the topLevel element used by Modal.
22
+ * - left: identifies the left element used by Modal.
23
+ * - right: identifies the right element used by Modal.
24
24
  *
25
25
  * @api
26
- * - pgs.modal.init(root): inizializza le modali presenti nel Document o Element indicato; il valore predefinito è document.
27
- * - pgs.modal.api(element): restituisce l'istanza associata a un root modal inizializzato.
28
- * - instance.open(): apre la finestra se non è già aperta.
29
- * - instance.close(): chiude la finestra se è aperta.
30
- * - instance.toggle(): apre la finestra oppure la chiude quando è già aperta.
31
- * - instance.refresh(): rilegge opzioni e collegamenti della modale, sostituisce listener e observer precedenti e restituisce la nuova API.
32
- * - instance.isOpen(): restituisce true quando l'elemento dialog possiede lo stato nativo open.
26
+ * - pgs.modal.init(root): initializes matching elements within the specified root.
27
+ * - pgs.modal.api(element): returns the instance associated with the specified initialized element.
28
+ * - instance.open(): opens the component.
29
+ * - instance.close(): closes the component.
30
+ * - instance.toggle(): toggles the component state.
31
+ * - instance.refresh(): refreshes the component and returns its updated instance.
32
+ * - instance.isOpen(): returns true when the component is open.
33
33
  *
34
34
  * @related
35
- * - button: presenta i controlli di apertura, chiusura e annullamento come pulsanti standard.
36
- * - buttonStrong: presenta l'azione di conferma con maggiore enfasi.
37
- * - buttonClose: viene aggiunto automaticamente al controllo di chiusura quando manca nel markup.
38
- * - flexColumnElements: organizza verticalmente il contenuto della modale di conferma.
39
- * - flexRow: dispone affiancate le azioni della modale di conferma.
35
+ * - button: uses the related button component or utility in this example.
36
+ * - buttonStrong: uses the related buttonStrong component or utility in this example.
37
+ * - buttonClose: uses the related buttonClose component or utility in this example.
38
+ * - flexColumnElements: uses the related flexColumnElements component or utility in this example.
39
+ * - flexRow: uses the related flexRow component or utility in this example.
40
40
  *
41
- * @return Quattro esempi basati su dialog nativo e un contenitore opzionale usato da containerID.
41
+ * @return Complete HTML markup and usage example for Modal.
42
42
  */
43
43
  -->
44
44
 
45
45
  <div pgs="modal" pgs-option="containerID[modal-container]">
46
46
  <button pgs="modal-button button" type="button">
47
- <i class="fa-solid fa-window-maximize"></i> Apri modale
47
+ <i class="fa-solid fa-window-maximize"></i> Open modal
48
48
  </button>
49
49
 
50
50
  <dialog>
51
51
  <div pgs="modal-dialog-content">
52
52
  <div pgs="modal-dialog-content-header">
53
- <h3>Modale di esempio</h3>
53
+ <h3>Example modal</h3>
54
54
  </div>
55
55
 
56
56
  <div pgs="modal-dialog-content-scroll">
57
- <p>Contenuto della modale. Il bottone di chiusura viene aggiunto automaticamente se non presente.</p>
57
+ <p>Modal content. The close button is added automatically when missing.</p>
58
58
  </div>
59
59
  </div>
60
60
  </dialog>
@@ -62,17 +62,17 @@
62
62
 
63
63
  <div pgs="modal" pgs-option="containerID[modal-container]">
64
64
  <button pgs="modal-button button" type="button">
65
- <i class="fa-solid fa-window-maximize"></i> Apri modale right
65
+ <i class="fa-solid fa-window-maximize"></i> Open modal right
66
66
  </button>
67
67
 
68
68
  <dialog pgs-option="right">
69
69
  <div pgs="modal-dialog-content">
70
70
  <div pgs="modal-dialog-content-header">
71
- <h3>Modale laterale</h3>
71
+ <h3>Side modal</h3>
72
72
  </div>
73
73
 
74
74
  <div pgs="modal-dialog-content-scroll">
75
- <p>Contenuto della modale con <code>pgs-option="right"</code>.</p>
75
+ <p>Modal content with <code>pgs-option="right"</code>.</p>
76
76
  </div>
77
77
  </div>
78
78
  </dialog>
@@ -80,17 +80,17 @@
80
80
 
81
81
  <div pgs="modal" pgs-option="containerID[modal-container]">
82
82
  <button pgs="modal-button button" type="button">
83
- <i class="fa-solid fa-window-maximize"></i> Apri modale left
83
+ <i class="fa-solid fa-window-maximize"></i> Open modal left
84
84
  </button>
85
85
 
86
86
  <dialog pgs-option="left">
87
87
  <div pgs="modal-dialog-content">
88
88
  <div pgs="modal-dialog-content-header">
89
- <h3>Modale laterale sinistra</h3>
89
+ <h3>Left-side modal</h3>
90
90
  </div>
91
91
 
92
92
  <div pgs="modal-dialog-content-scroll">
93
- <p>Contenuto della modale con <code>pgs-option="left"</code>.</p>
93
+ <p>Modal content with <code>pgs-option="left"</code>.</p>
94
94
  </div>
95
95
  </div>
96
96
  </dialog>
@@ -98,21 +98,21 @@
98
98
 
99
99
  <div pgs="modal">
100
100
  <button pgs="modal-button button" type="button">
101
- <i class="fa-solid fa-floppy-disk"></i> Conferma salvataggio
101
+ <i class="fa-solid fa-floppy-disk"></i> Confirmation salvataggio
102
102
  </button>
103
103
 
104
104
  <dialog pgs-option="topLevel">
105
105
  <div pgs="modal-dialog-content">
106
106
  <div pgs="modal-dialog-content-header">
107
- <h3>Salvare le modifiche?</h3>
107
+ <h3>Save changes?</h3>
108
108
  </div>
109
109
 
110
110
  <div pgs="modal-dialog-content-scroll flexColumnElements">
111
- <p>Hai modifiche non salvate. Conferma per applicarle oppure annulla per tornare alla pagina.</p>
111
+ <p>You have unsaved changes. Confirm to apply them or cancel to return to the page.</p>
112
112
 
113
113
  <div pgs="flexRow">
114
- <button pgs="button modal-close" type="button">Annulla</button>
115
- <button pgs="buttonStrong" type="button">Salva modifiche</button>
114
+ <button pgs="button modal-close" type="button">Cancel</button>
115
+ <button pgs="buttonStrong" type="button">Save changes</button>
116
116
  </div>
117
117
  </div>
118
118
  </div>
@@ -1,43 +1,43 @@
1
1
  <!--
2
2
  /**
3
3
  * @title Notification
4
- * @description Sistema di notifiche persistenti o toast temporanei, generati dall'API oppure da una configurazione JSON dichiarativa contenuta nell'opzione notification.
4
+ * @description Notification markup, configuration, behavior, and usage example.
5
5
  *
6
6
  * @pgs
7
- * - notification: identifica il contenitore delle notifiche, sia persistenti sia temporanee.
8
- * - notificationTrigger: identifica una configurazione dichiarativa elaborata e rimossa all'inizializzazione.
9
- * - notification-element: identifica ogni messaggio creato dinamicamente.
10
- * - notification-element-title: identifica il titolo generato del messaggio.
11
- * - notification-element-content: identifica il contenuto generato del messaggio.
7
+ * - notification: identifies the notification element used by Notification.
8
+ * - notificationTrigger: identifies the notificationTrigger element used by Notification.
9
+ * - notification-element: identifies the notification-element element used by Notification.
10
+ * - notification-element-title: identifies the notification-element-title element used by Notification.
11
+ * - notification-element-content: identifies the notification-element-content element used by Notification.
12
12
  *
13
13
  * @pgs-option
14
- * - toast: sul contenitore notification abilita il posizionamento centrale e la sostituzione del messaggio temporaneo corrente.
15
- * - notification: contiene un oggetto JSON con title, message, element, type, icon, duration e link usando la sintassi notification[{...}].
14
+ * - toast: identifies the toast element used by Notification.
15
+ * - notification: identifies the notification element used by Notification.
16
16
  *
17
17
  * @pgs-state
18
- * - success: applica la variante positiva al messaggio generato.
19
- * - error: applica la variante di errore e il ruolo alert.
20
- * - warning: applica la variante di avviso.
21
- * - info: applica la variante informativa predefinita.
18
+ * - success: identifies the success element used by Notification.
19
+ * - error: identifies the error element used by Notification.
20
+ * - warning: identifies the warning element used by Notification.
21
+ * - info: identifies the info element used by Notification.
22
22
  *
23
23
  * @api
24
- * - pgs.notification.trigger(root): elabora e rimuove i notificationTrigger dichiarativi presenti nel contesto indicato.
25
- * - pgs.notification.alert.error(text, link, timeout, icon): crea una notifica persistente di errore, opzionalmente cliccabile e temporizzata.
26
- * - pgs.notification.alert.success(text, link, timeout, icon): crea una notifica persistente di successo.
27
- * - pgs.notification.alert.info(text, link, timeout, icon): crea una notifica persistente informativa.
28
- * - pgs.notification.alert.warning(text, link, timeout, icon): crea una notifica persistente di avviso.
29
- * - pgs.notification.alert.deleteAll(): rimuove tutte le notifiche persistenti.
30
- * - pgs.notification.toast.error(text, timeout, icon): crea un toast di errore sostituendo quello eventualmente presente.
31
- * - pgs.notification.toast.success(text, timeout, icon): crea un toast di successo.
32
- * - pgs.notification.toast.info(text, timeout, icon): crea un toast informativo.
33
- * - pgs.notification.toast.warning(text, timeout, icon): crea un toast di avviso.
34
- * - pgs.notification.toast.deleteAll(): rimuove il toast corrente.
24
+ * - pgs.notification.trigger(root): provides the documented operation through the component public API.
25
+ * - pgs.notification.alert.error(text, link, timeout, icon): provides the documented operation through the component public API.
26
+ * - pgs.notification.alert.success(text, link, timeout, icon): provides the documented operation through the component public API.
27
+ * - pgs.notification.alert.info(text, link, timeout, icon): provides the documented operation through the component public API.
28
+ * - pgs.notification.alert.warning(text, link, timeout, icon): provides the documented operation through the component public API.
29
+ * - pgs.notification.alert.deleteAll(): provides the documented operation through the component public API.
30
+ * - pgs.notification.toast.error(text, timeout, icon): provides the documented operation through the component public API.
31
+ * - pgs.notification.toast.success(text, timeout, icon): provides the documented operation through the component public API.
32
+ * - pgs.notification.toast.info(text, timeout, icon): provides the documented operation through the component public API.
33
+ * - pgs.notification.toast.warning(text, timeout, icon): provides the documented operation through the component public API.
34
+ * - pgs.notification.toast.deleteAll(): provides the documented operation through the component public API.
35
35
  *
36
36
  * @related
37
- * - hidden: nasconde i trigger dichiarativi prima che vengano elaborati.
38
- * - buttonClose: identifica il pulsante di rimozione aggiunto a ogni messaggio.
37
+ * - hidden: uses the related hidden component or utility in this example.
38
+ * - buttonClose: uses the related buttonClose component or utility in this example.
39
39
  *
40
- * @return Due contenitori notification, uno persistente e uno configurato con l'opzione toast, con trigger dichiarativi configurati tramite pgs-option.
40
+ * @return Complete HTML markup and usage example for Notification.
41
41
  */
42
42
  -->
43
43
 
@@ -45,8 +45,8 @@
45
45
  <div pgs="notification" pgs-option="toast" aria-live="polite"></div>
46
46
 
47
47
  <div pgs="hidden notificationTrigger" pgs-option='notification[{
48
- "title": "Titolo",
49
- "message": "Messaggio",
48
+ "title": "Title",
49
+ "message": "Message",
50
50
  "element": "notification",
51
51
  "type": "info",
52
52
  "icon": null,
@@ -56,7 +56,7 @@
56
56
 
57
57
  <div pgs="hidden notificationTrigger" pgs-option='notification[{
58
58
  "title": "Benvenuto",
59
- "message": "Messaggio",
59
+ "message": "Message",
60
60
  "element": "toast",
61
61
  "type": "info",
62
62
  "icon": null,
@@ -66,6 +66,6 @@
66
66
  <!--
67
67
  <div
68
68
  pgs="hidden notificationTrigger"
69
- pgs-option='notification[{"title":"Titolo","message":"Messaggio","element":"notification","type":"info","icon":"<i class=\"fa-solid fa-rocket\"></i>","duration":"4000","link":"/pagina/"}]'>
69
+ pgs-option='notification[{"title":"Title","message":"Message","element":"notification","type":"info","icon":"<i class=\"fa-solid fa-rocket\"></i>","duration":"4000","link":"/page/"}]'>
70
70
  </div>
71
71
  -->
@@ -1,64 +1,64 @@
1
1
  <!--
2
2
  /**
3
3
  * @title Search
4
- * @description Ricerca componibile con suggerimenti asincroni o locali, navigazione da tastiera, selezione, annullamento richieste e attributi ARIA gestiti dal modulo search.
4
+ * @description Search markup, configuration, behavior, and usage example.
5
5
  *
6
6
  * @pgs
7
- * - search: identifica il form inizializzato come ricerca con suggerimenti.
8
- * - search-suggestions: identifica la lista opzionale che riceve i risultati.
9
- * - search-suggestions-item: identifica ogni risultato creato dinamicamente nella lista.
10
- * - search-modal: identifica la variante di ricerca inserita in una modale per dispositivi mobili.
11
- * - search-mobile: identifica il contenitore interno della ricerca mobile.
7
+ * - search: identifies the search element used by Search.
8
+ * - search-suggestions: identifies the search-suggestions element used by Search.
9
+ * - search-suggestions-item: identifies the search-suggestions-item element used by Search.
10
+ * - search-modal: identifies the search-modal element used by Search.
11
+ * - search-mobile: identifies the search-mobile element used by Search.
12
12
  *
13
13
  * @pgs-option
14
- * - containerPGS: sul wrapper modal usa containerPGS[header] per spostare il dialog nell'header.
14
+ * - containerPGS: identifies the containerPGS element used by Search.
15
15
  *
16
16
  * @pgs-state
17
- * - open: sul root search indica che la lista dei suggerimenti è aperta.
18
- * - loading: sul root search indica una sorgente dati in caricamento.
19
- * - error: sul root search indica che il recupero dei suggerimenti è fallito.
20
- * - selected: sul risultato generato indica l'elemento attivo durante la navigazione.
17
+ * - open: identifies the open element used by Search.
18
+ * - loading: identifies the loading element used by Search.
19
+ * - error: identifies the error element used by Search.
20
+ * - selected: identifies the selected element used by Search.
21
21
  *
22
22
  * @api
23
- * - pgs.search.init(root): inizializza le ricerche non ancora registrate dentro Document o Element indicato.
24
- * - pgs.search.api(element): restituisce l'istanza associata a un form search inizializzato.
25
- * - instance.configure(options): aggiorna minLength, debounce, limit, submitOnSelect, searchOnFocus, source e onSelect e restituisce l'istanza.
26
- * - instance.setSource(source): configura una sorgente array o funzione asincrona per i suggerimenti.
27
- * - instance.search(query): esegue subito la ricerca e restituisce una Promise con i suggerimenti normalizzati.
28
- * - instance.open(): apre la lista quando sono disponibili risultati.
29
- * - instance.close(): chiude la lista e azzera la selezione attiva.
30
- * - instance.clear(): rimuove risultati e selezione e chiude la lista.
23
+ * - pgs.search.init(root): initializes matching elements within the specified root.
24
+ * - pgs.search.api(element): returns the instance associated with the specified initialized element.
25
+ * - instance.configure(options): provides the documented operation through the component public API.
26
+ * - instance.setSource(source): provides the documented operation through the component public API.
27
+ * - instance.search(query): provides the documented operation through the component public API.
28
+ * - instance.open(): opens the component.
29
+ * - instance.close(): closes the component.
30
+ * - instance.clear(): provides the documented operation through the component public API.
31
31
  * - instance.cancel(): annulla debounce e richiesta attiva.
32
- * - instance.select(index, submit): seleziona un risultato, emette pgs:search:select e può inviare il form.
33
- * - instance.refresh(): ripete la ricerca usando il valore corrente dell'input.
34
- * - instance.destroy(): rimuove listener, annulla le operazioni e scollega l'istanza.
35
- * - instance.items(): restituisce una copia dei suggerimenti correnti.
36
- * - instance.isOpen(): restituisce true quando la lista dei suggerimenti è aperta.
37
- * - instance.isLoading(): restituisce true durante il caricamento della sorgente.
38
- * - instance.setActiveIndex(index): imposta il suggerimento attivo e aggiorna selezione e attributi ARIA.
32
+ * - instance.select(index, submit): provides the documented operation through the component public API.
33
+ * - instance.refresh(): refreshes the component and returns its updated instance.
34
+ * - instance.destroy(): removes listeners and releases the component instance.
35
+ * - instance.items(): provides the documented operation through the component public API.
36
+ * - instance.isOpen(): returns true when the component is open.
37
+ * - instance.isLoading(): returns true while the component is loading.
38
+ * - instance.setActiveIndex(index): provides the documented operation through the component public API.
39
39
  *
40
40
  * @related
41
- * - buttonNohover: applica al form l'aspetto compatto condiviso con i controlli button.
42
- * - modal: fornisce il contenitore e il comportamento della variante mobile.
43
- * - modal-button: apre la ricerca mobile.
44
- * - modal-close: chiude la ricerca mobile.
45
- * - buttonIcon: presenta apertura e chiusura come pulsanti a icona.
46
- * - flexRow: organizza il contenuto della variante mobile e gli elementi dei suggerimenti generati.
47
- * - section: applica la spaziatura di sezione alla ricerca mobile.
41
+ * - buttonNohover: uses the related buttonNohover component or utility in this example.
42
+ * - modal: uses the related modal component or utility in this example.
43
+ * - modal-button: uses the related modal-button component or utility in this example.
44
+ * - modal-close: uses the related modal-close component or utility in this example.
45
+ * - buttonIcon: uses the related buttonIcon component or utility in this example.
46
+ * - flexRow: uses the related flexRow component or utility in this example.
47
+ * - section: uses the related section component or utility in this example.
48
48
  *
49
- * @return Form di ricerca autonomo, variante mobile integrata in una modal e script di esempio con sorgente locale.
49
+ * @return Complete HTML markup and usage example for Search.
50
50
  */
51
51
  -->
52
52
 
53
53
  <form pgs="buttonNohover search" autocomplete="off" action="" method="get">
54
- <button type="submit" title="Cerca"><i class="fa-solid fa-search"></i></button>
55
- <input type="search" name="s" placeholder="Cerca" value="">
54
+ <button type="submit" title="Search"><i class="fa-solid fa-search"></i></button>
55
+ <input type="search" name="s" placeholder="Search" value="">
56
56
  <ul pgs="search-suggestions"></ul>
57
57
  </form>
58
58
 
59
59
  <div pgs="modal search-modal" pgs-option="containerPGS[header]">
60
60
 
61
- <button type="button" pgs="modal-button buttonIcon" title="Cerca">
61
+ <button type="button" pgs="modal-button buttonIcon" title="Search">
62
62
  <i class="fa-solid fa-search"></i>
63
63
  </button>
64
64
 
@@ -66,17 +66,18 @@
66
66
  <div pgs="flexRow section search-mobile">
67
67
 
68
68
  <form pgs="buttonNohover search" autocomplete="off" action="/" method="get">
69
- <button type="submit" title="Cerca">
69
+ <button type="submit" title="Search">
70
70
  <i class="fa-solid fa-search"></i>
71
71
  </button>
72
72
 
73
- <input type="search" name="s" placeholder="Cerca" value="">
73
+ <input type="search" name="s" placeholder="Search" value="">
74
74
  <ul pgs="search-suggestions"></ul>
75
+
76
+ <button type="button" pgs="modal-close buttonIcon">
77
+ <i class="fa-solid fa-close"></i>
78
+ </button>
75
79
  </form>
76
80
 
77
- <button type="button" pgs="modal-close buttonIcon">
78
- <i class="fa-solid fa-close"></i>
79
- </button>
80
81
 
81
82
  </div>
82
83
  </dialog>