mypgs 2.0.0 → 3.0.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 (163) hide show
  1. package/.vscode/tasks.json +39 -0
  2. package/AGENTS.md +22 -21
  3. package/README.md +25 -25
  4. package/assets/javascript/components/_menu.js +2 -1
  5. package/assets/javascript/components/_modals.js +1 -1
  6. package/assets/javascript/components/_notifications.js +2 -1
  7. package/assets/javascript/components/_slides.js +2 -2
  8. package/assets/scss/base/_body.scss +5 -5
  9. package/assets/scss/base/_general.scss +27 -18
  10. package/assets/scss/base/_variables.scss +1 -1
  11. package/assets/scss/components/_accordion.scss +9 -9
  12. package/assets/scss/components/_alerts.scss +71 -0
  13. package/assets/scss/components/_badges.scss +40 -48
  14. package/assets/scss/components/_button.scss +28 -20
  15. package/assets/scss/components/_card.scss +9 -4
  16. package/assets/scss/components/_form.scss +0 -16
  17. package/assets/scss/components/_formAddon.scss +22 -0
  18. package/assets/scss/components/_logo.scss +3 -4
  19. package/assets/scss/components/_menu.scss +26 -3
  20. package/assets/scss/components/_modals.scss +6 -4
  21. package/assets/scss/components/_search.scss +2 -2
  22. package/assets/scss/components/_slides.scss +0 -1
  23. package/assets/scss/components/_stepTabs.scss +2 -1
  24. package/assets/scss/components/_tooltip.scss +0 -1
  25. package/assets/scss/index.scss +3 -3
  26. package/assets/scss/layout/_footer.scss +0 -2
  27. package/assets/scss/layout/_header.scss +10 -2
  28. package/assets/scss/layout/_pageShell.scss +6 -2
  29. package/assets/scss/layout/_responsive.scss +63 -0
  30. package/assets/scss/mixin/_mx-base.scss +4 -8
  31. package/assets/scss/mixin/_mx-button.scss +73 -115
  32. package/assets/scss/mixin/_mx-card.scss +39 -40
  33. package/assets/scss/mixin/_mx-form.scss +13 -10
  34. package/assets/scss/mixin/{_mx-form-addon.scss → _mx-formAddon.scss} +103 -64
  35. package/assets/scss/mixin/_mx-hover.scss +81 -0
  36. package/assets/scss/mixin/_mx-responsive.scss +81 -201
  37. package/assets/scss/mixin/_settings.scss +2 -1
  38. package/assets/scss/mixin/mixin.scss +2 -1
  39. package/demo/demo.css +9 -6
  40. package/demo/demo.html +7 -5
  41. package/demo/demo.js +37 -34
  42. package/dist/css/index.css +2469 -3825
  43. package/dist/css/index.css.map +1 -1
  44. package/dist/css/index.min.css +1 -1
  45. package/dist/javascript/index.js +7 -5
  46. package/dist/javascript/index.js.map +1 -1
  47. package/dist/javascript/index.min.js +1 -1
  48. package/docs/componenti-e-markup.md +9 -8
  49. package/docs/components/accordion.md +23 -23
  50. package/docs/components/alerts.md +67 -0
  51. package/docs/components/badges.md +29 -26
  52. package/docs/components/breadcumbs.md +8 -8
  53. package/docs/components/button.md +18 -18
  54. package/docs/components/card.md +25 -22
  55. package/docs/components/dropdown.md +29 -29
  56. package/docs/components/form.md +65 -41
  57. package/docs/components/formAddon.md +116 -0
  58. package/docs/components/logo.md +11 -11
  59. package/docs/components/menu.md +20 -20
  60. package/docs/components/modal.md +52 -51
  61. package/docs/components/notification.md +34 -34
  62. package/docs/components/search.md +54 -52
  63. package/docs/components/slides.md +41 -42
  64. package/docs/components/stepTabs.md +45 -45
  65. package/docs/components/steps.md +16 -16
  66. package/docs/components/summary.md +20 -20
  67. package/docs/components/table.md +7 -7
  68. package/docs/components/tooltip.md +24 -23
  69. package/docs/convenzioni.md +11 -11
  70. package/docs/export-e-sviluppo.md +4 -4
  71. package/docs/helper-javascript.md +8 -8
  72. package/docs/layout/body.md +11 -11
  73. package/docs/layout/footer.md +28 -24
  74. package/docs/layout/header.md +36 -35
  75. package/docs/layout/pageShell.md +19 -19
  76. package/docs/layout/responsive.md +90 -0
  77. package/docs/layout/section.md +38 -38
  78. package/docs/patterns/cookieConsent.md +42 -39
  79. package/docs/utilizzo-css-scss.md +33 -9
  80. package/package.json +1 -1
  81. package/reference/html/components/accordion.html +52 -0
  82. package/reference/html/components/alerts.html +59 -0
  83. package/reference/html/components/badges.html +62 -0
  84. package/{templates → reference}/html/components/breadcumbs.html +6 -6
  85. package/reference/html/components/button.html +51 -0
  86. package/reference/html/components/card.html +45 -0
  87. package/{templates → reference}/html/components/dropdown.html +25 -25
  88. package/reference/html/components/form.html +128 -0
  89. package/reference/html/components/formAddon.html +109 -0
  90. package/reference/html/components/logo.html +28 -0
  91. package/{templates → reference}/html/components/menu.html +17 -17
  92. package/reference/html/components/modal.html +123 -0
  93. package/reference/html/components/notification.html +71 -0
  94. package/reference/html/components/search.html +109 -0
  95. package/reference/html/components/slides.html +75 -0
  96. package/reference/html/components/stepTabs.html +83 -0
  97. package/reference/html/components/steps.html +49 -0
  98. package/reference/html/components/summary.html +41 -0
  99. package/{templates → reference}/html/components/table.html +5 -5
  100. package/reference/html/components/tooltip.html +44 -0
  101. package/reference/html/layout/body.html +34 -0
  102. package/reference/html/layout/footer.html +67 -0
  103. package/reference/html/layout/header.html +108 -0
  104. package/{templates → reference}/html/layout/pageShell.html +16 -16
  105. package/reference/html/layout/responsive.html +83 -0
  106. package/reference/html/layout/section.html +62 -0
  107. package/reference/html/patterns/cookieConsent.html +84 -0
  108. package/{templates → reference}/react/components/accordion.jsx +5 -5
  109. package/reference/react/components/alerts.jsx +46 -0
  110. package/{templates → reference}/react/components/breadcumbs.jsx +1 -1
  111. package/{templates → reference}/react/components/button.jsx +6 -6
  112. package/{templates → reference}/react/components/card.jsx +6 -6
  113. package/{templates → reference}/react/components/dropdown.jsx +8 -8
  114. package/{templates → reference}/react/components/form.jsx +3 -3
  115. package/{templates → reference}/react/components/modal.jsx +15 -15
  116. package/{templates → reference}/react/components/notification.jsx +3 -3
  117. package/{templates → reference}/react/components/search.jsx +8 -8
  118. package/{templates → reference}/react/components/slides.jsx +4 -4
  119. package/{templates → reference}/react/components/stepTabs.jsx +12 -12
  120. package/reference/react/components/summary.jsx +18 -0
  121. package/{templates → reference}/react/components/table.jsx +2 -2
  122. package/{templates → reference}/react/components/tooltip.jsx +1 -1
  123. package/{templates → reference}/react/layout/pageShell.jsx +2 -2
  124. package/reference/react/layout/responsive.jsx +61 -0
  125. package/reference/react/layout/section.jsx +44 -0
  126. package/{templates → reference}/react/patterns/cookieConsent.jsx +9 -9
  127. package/{templates → reference}/react/patterns/footer.jsx +4 -4
  128. package/{templates → reference}/react/patterns/header.jsx +4 -4
  129. package/scripts/generate-component-docs.js +12 -12
  130. package/assets/scss/layout/_flex.scss +0 -49
  131. package/assets/scss/layout/_gap.scss +0 -21
  132. package/assets/scss/layout/_grid.scss +0 -13
  133. package/docs/layout/flex.md +0 -116
  134. package/docs/layout/grid.md +0 -116
  135. package/templates/html/components/accordion.html +0 -52
  136. package/templates/html/components/badges.html +0 -60
  137. package/templates/html/components/button.html +0 -51
  138. package/templates/html/components/card.html +0 -43
  139. package/templates/html/components/form.html +0 -104
  140. package/templates/html/components/logo.html +0 -28
  141. package/templates/html/components/modal.html +0 -122
  142. package/templates/html/components/notification.html +0 -71
  143. package/templates/html/components/search.html +0 -107
  144. package/templates/html/components/slides.html +0 -76
  145. package/templates/html/components/stepTabs.html +0 -83
  146. package/templates/html/components/steps.html +0 -49
  147. package/templates/html/components/summary.html +0 -41
  148. package/templates/html/components/tooltip.html +0 -43
  149. package/templates/html/layout/body.html +0 -35
  150. package/templates/html/layout/flex.html +0 -109
  151. package/templates/html/layout/footer.html +0 -64
  152. package/templates/html/layout/grid.html +0 -109
  153. package/templates/html/layout/header.html +0 -107
  154. package/templates/html/layout/section.html +0 -62
  155. package/templates/html/patterns/cookieConsent.html +0 -82
  156. package/templates/react/components/summary.jsx +0 -18
  157. package/templates/react/layout/flex.jsx +0 -36
  158. package/templates/react/layout/grid.jsx +0 -36
  159. package/templates/react/layout/section.jsx +0 -44
  160. /package/{templates → reference}/react/components/logo.jsx +0 -0
  161. /package/{templates → reference}/react/components/menu.jsx +0 -0
  162. /package/{templates → reference}/react/components/steps.jsx +0 -0
  163. /package/{templates → reference}/react/layout/body.jsx +0 -0
@@ -1,43 +1,43 @@
1
- <!-- File generato automaticamente da templates/html/components/menu.html. Modificare templates/html/components/menu.html e rieseguire npm run docs:generate. -->
1
+ <!-- Automatically generated from reference/html/components/menu.html. Edit reference/html/components/menu.html and run npm run docs:generate again. -->
2
2
 
3
3
  # Menu
4
4
 
5
- Navigazione orizzontale o verticale che trasforma le voci con sottomenu in dropdown accessibili e inizializzati automaticamente.
5
+ Menu markup, configuration, behavior, and usage example.
6
6
 
7
7
  ## PGS
8
8
 
9
- - `menu`: identifica il contenitore di navigazione elaborato dal modulo menu.
10
- - `menu-buttonIcon`: identifica il controllo creato dinamicamente accanto alle voci con sottomenu.
9
+ - `menu`: identifies the menu element used by Menu.
10
+ - `menu-buttonIcon`: identifies the menu-buttonIcon element used by Menu.
11
11
 
12
12
  ## PGS Options
13
13
 
14
- - `horizontal`: dispone il menu e i suoi elementi in orizzontale.
15
- - `vertical`: dispone il menu e i suoi elementi in verticale.
16
- - `menuHeader`: adatta spaziature e comportamento del menu quando è inserito nell'header.
17
- - `position`: viene impostata come position[bottom right] sui dropdown creati per i sottomenu.
14
+ - `horizontal`: identifies the horizontal element used by Menu.
15
+ - `vertical`: identifies the vertical element used by Menu.
16
+ - `menuHeader`: identifies the menuHeader element used by Menu.
17
+ - `position`: identifies the position element used by Menu.
18
+ - `buttonNohover`: disables hover behavior on menu buttons generated at runtime.
18
19
 
19
20
  ## PGS States
20
21
 
21
- - `open`: indica il sottomenu trasformato in dropdown attualmente aperto.
22
+ - `open`: identifies the open element used by Menu.
22
23
 
23
- ## API JavaScript
24
+ ## JavaScript API
24
25
 
25
- - `pgs.menu.init(root)`: inizializza i menu non ancora registrati dentro Document o Element indicato e prepara i sottomenu.
26
- - `pgs.menu.api(element)`: restituisce l'istanza associata a un root menu inizializzato.
27
- - `instance.refresh()`: riesegue l'inizializzazione nel contenitore del menu e restituisce l'istanza.
26
+ - `pgs.menu.init(root)`: initializes matching elements within the specified root.
27
+ - `pgs.menu.api(element)`: returns the instance associated with the specified initialized element.
28
+ - `instance.refresh()`: refreshes the component and returns its updated instance.
28
29
 
29
- ## Elementi correlati
30
+ ## Related elements
30
31
 
31
- - `dropdown`: viene aggiunto dinamicamente alle voci che contengono una lista annidata.
32
- - `dropdown-button`: identifica il controllo dinamico del sottomenu.
33
- - `buttonNohover`: neutralizza lo stile hover del controllo dinamico.
34
- - `dropdown-content`: identifica la lista annidata mostrata come pannello dropdown.
32
+ - `dropdown`: uses the related dropdown component or utility in this example.
33
+ - `dropdown-button`: uses the related dropdown-button component or utility in this example.
34
+ - `dropdown-content`: uses the related dropdown-content component or utility in this example.
35
35
 
36
36
  ## Output
37
37
 
38
- Due strutture nav complete per le varianti orizzontale e verticale del menu.
38
+ Complete HTML markup and usage example for Menu.
39
39
 
40
- ## Esempio
40
+ ## Example
41
41
 
42
42
  ```html
43
43
  <nav pgs="menu" pgs-option="horizontal" aria-label="Menu orizzontale">
@@ -1,68 +1,69 @@
1
- <!-- File generato automaticamente da templates/html/components/modal.html. Modificare templates/html/components/modal.html e rieseguire npm run docs:generate. -->
1
+ <!-- Automatically generated from reference/html/components/modal.html. Edit reference/html/components/modal.html and run npm run docs:generate again. -->
2
2
 
3
3
  # Modal
4
4
 
5
- Componente che collega un pulsante a un dialog nativo, ne gestisce apertura e chiusura e può spostarlo in un contenitore configurato.
5
+ Modal markup, configuration, behavior, and usage example.
6
6
 
7
7
  ## PGS
8
8
 
9
- - `modal`: identifica il contenitore logico inizializzato dal modulo modal.
10
- - `modal-button`: identifica il controllo di apertura della finestra.
9
+ - `modal`: identifies the modal element used by Modal.
10
+ - `modal-button`: identifies the modal-button element used by Modal.
11
11
  - `dialog`: token aggiunto dinamicamente all'elemento dialog inizializzato.
12
- - `modal-dialog`: identifica il dialog nativo dopo l'inizializzazione JavaScript.
13
- - `modal-dialog-content`: identifica il contenitore visivo della finestra.
14
- - `modal-dialog-content-header`: identifica l'intestazione che può ricevere il pulsante di chiusura automatico.
15
- - `modal-dialog-content-scroll`: identifica l'area interna scorrevole.
16
- - `modal-close`: identifica un controllo che chiude la finestra.
12
+ - `modal-dialog`: identifies the modal-dialog element used by Modal.
13
+ - `modal-dialog-content`: identifies the modal-dialog-content element used by Modal.
14
+ - `modal-dialog-content-header`: identifies the modal-dialog-content-header element used by Modal.
15
+ - `modal-dialog-content-scroll`: identifies the modal-dialog-content-scroll element used by Modal.
16
+ - `modal-close`: identifies the modal-close element used by Modal.
17
17
 
18
18
  ## PGS Options
19
19
 
20
- - `containerID`: sul root usa containerID[id] per spostare il dialog nell'elemento con l'id indicato.
21
- - `containerPGS`: sul root usa containerPGS[token] per spostare il dialog nel primo elemento con quel token pgs.
22
- - `disableBackdropClose`: sul root impedisce la chiusura tramite click sul backdrop.
23
- - `history`: sul root sincronizza l'apertura con il parametro modal nella cronologia del browser e richiede un id sul pulsante.
24
- - `topLevel`: sul dialog mantiene la finestra nel componente e usa showModal per una modale top-level.
25
- - `left`: sul dialog posiziona e anima il contenuto dal lato sinistro.
26
- - `right`: sul dialog posiziona e anima il contenuto dal lato destro.
27
-
28
- ## API JavaScript
29
-
30
- - `pgs.modal.init(root)`: inizializza le modali presenti nel Document o Element indicato; il valore predefinito è document.
31
- - `pgs.modal.api(element)`: restituisce l'istanza associata a un root modal inizializzato.
32
- - `instance.open()`: apre la finestra se non è già aperta.
33
- - `instance.close()`: chiude la finestra se è aperta.
34
- - `instance.toggle()`: apre la finestra oppure la chiude quando è già aperta.
35
- - `instance.refresh()`: rilegge opzioni e collegamenti della modale, sostituisce listener e observer precedenti e restituisce la nuova API.
36
- - `instance.isOpen()`: restituisce true quando l'elemento dialog possiede lo stato nativo open.
37
-
38
- ## Elementi correlati
39
-
40
- - `button`: presenta i controlli di apertura, chiusura e annullamento come pulsanti standard.
41
- - `buttonStrong`: presenta l'azione di conferma con maggiore enfasi.
42
- - `buttonClose`: viene aggiunto automaticamente al controllo di chiusura quando manca nel markup.
43
- - `flexColumnElements`: organizza verticalmente il contenuto della modale di conferma.
44
- - `flexRow`: dispone affiancate le azioni della modale di conferma.
20
+ - `containerID`: identifies the containerID element used by Modal.
21
+ - `containerPGS`: identifies the containerPGS element used by Modal.
22
+ - `disableBackdropClose`: identifies the disableBackdropClose element used by Modal.
23
+ - `history`: identifies the history element used by Modal.
24
+ - `topLevel`: identifies the topLevel element used by Modal.
25
+ - `left`: identifies the left element used by Modal.
26
+ - `right`: identifies the right element used by Modal.
27
+ - `buttonStrong`: applies stronger emphasis to the save action.
28
+ - `buttonClose`: styles the close action generated at runtime.
29
+
30
+ ## JavaScript API
31
+
32
+ - `pgs.modal.init(root)`: initializes matching elements within the specified root.
33
+ - `pgs.modal.api(element)`: returns the instance associated with the specified initialized element.
34
+ - `instance.open()`: opens the component.
35
+ - `instance.close()`: closes the component.
36
+ - `instance.toggle()`: toggles the component state.
37
+ - `instance.refresh()`: refreshes the component and returns its updated instance.
38
+ - `instance.isOpen()`: returns true when the component is open.
39
+
40
+ ## Related elements
41
+
42
+ - `button`: uses the related button component or utility in this example.
43
+ - `flexColumn`: vertically organizes modal content.
44
+ - `gapElements`: applies element spacing to modal content.
45
+ - `flexRow`: uses the related flexRow component or utility in this example.
45
46
 
46
47
  ## Output
47
48
 
48
- Quattro esempi basati su dialog nativo e un contenitore opzionale usato da containerID.
49
+ Complete HTML markup and usage example for Modal.
49
50
 
50
- ## Esempio
51
+ ## Example
51
52
 
52
53
  ```html
53
54
  <div pgs="modal" pgs-option="containerID[modal-container]">
54
55
  <button pgs="modal-button button" type="button">
55
- <i class="fa-solid fa-window-maximize"></i> Apri modale
56
+ <i class="fa-solid fa-window-maximize"></i> Open modal
56
57
  </button>
57
58
 
58
59
  <dialog>
59
60
  <div pgs="modal-dialog-content">
60
61
  <div pgs="modal-dialog-content-header">
61
- <h3>Modale di esempio</h3>
62
+ <h3>Example modal</h3>
62
63
  </div>
63
64
 
64
65
  <div pgs="modal-dialog-content-scroll">
65
- <p>Contenuto della modale. Il bottone di chiusura viene aggiunto automaticamente se non presente.</p>
66
+ <p>Modal content. The close button is added automatically when missing.</p>
66
67
  </div>
67
68
  </div>
68
69
  </dialog>
@@ -70,17 +71,17 @@ Quattro esempi basati su dialog nativo e un contenitore opzionale usato da conta
70
71
 
71
72
  <div pgs="modal" pgs-option="containerID[modal-container]">
72
73
  <button pgs="modal-button button" type="button">
73
- <i class="fa-solid fa-window-maximize"></i> Apri modale right
74
+ <i class="fa-solid fa-window-maximize"></i> Open modal right
74
75
  </button>
75
76
 
76
77
  <dialog pgs-option="right">
77
78
  <div pgs="modal-dialog-content">
78
79
  <div pgs="modal-dialog-content-header">
79
- <h3>Modale laterale</h3>
80
+ <h3>Side modal</h3>
80
81
  </div>
81
82
 
82
83
  <div pgs="modal-dialog-content-scroll">
83
- <p>Contenuto della modale con <code>pgs-option="right"</code>.</p>
84
+ <p>Modal content with <code>pgs-option="right"</code>.</p>
84
85
  </div>
85
86
  </div>
86
87
  </dialog>
@@ -88,17 +89,17 @@ Quattro esempi basati su dialog nativo e un contenitore opzionale usato da conta
88
89
 
89
90
  <div pgs="modal" pgs-option="containerID[modal-container]">
90
91
  <button pgs="modal-button button" type="button">
91
- <i class="fa-solid fa-window-maximize"></i> Apri modale left
92
+ <i class="fa-solid fa-window-maximize"></i> Open modal left
92
93
  </button>
93
94
 
94
95
  <dialog pgs-option="left">
95
96
  <div pgs="modal-dialog-content">
96
97
  <div pgs="modal-dialog-content-header">
97
- <h3>Modale laterale sinistra</h3>
98
+ <h3>Left-side modal</h3>
98
99
  </div>
99
100
 
100
101
  <div pgs="modal-dialog-content-scroll">
101
- <p>Contenuto della modale con <code>pgs-option="left"</code>.</p>
102
+ <p>Modal content with <code>pgs-option="left"</code>.</p>
102
103
  </div>
103
104
  </div>
104
105
  </dialog>
@@ -106,21 +107,21 @@ Quattro esempi basati su dialog nativo e un contenitore opzionale usato da conta
106
107
 
107
108
  <div pgs="modal">
108
109
  <button pgs="modal-button button" type="button">
109
- <i class="fa-solid fa-floppy-disk"></i> Conferma salvataggio
110
+ <i class="fa-solid fa-floppy-disk"></i> Confirmation salvataggio
110
111
  </button>
111
112
 
112
113
  <dialog pgs-option="topLevel">
113
114
  <div pgs="modal-dialog-content">
114
115
  <div pgs="modal-dialog-content-header">
115
- <h3>Salvare le modifiche?</h3>
116
+ <h3>Save changes?</h3>
116
117
  </div>
117
118
 
118
- <div pgs="modal-dialog-content-scroll flexColumnElements">
119
- <p>Hai modifiche non salvate. Conferma per applicarle oppure annulla per tornare alla pagina.</p>
119
+ <div pgs="modal-dialog-content-scroll flexColumn gapElements">
120
+ <p>You have unsaved changes. Confirm to apply them or cancel to return to the page.</p>
120
121
 
121
122
  <div pgs="flexRow">
122
- <button pgs="button modal-close" type="button">Annulla</button>
123
- <button pgs="buttonStrong" type="button">Salva modifiche</button>
123
+ <button pgs="button modal-close" type="button">Cancel</button>
124
+ <button pgs="button" pgs-option="buttonStrong" type="button">Save changes</button>
124
125
  </div>
125
126
  </div>
126
127
  </div>
@@ -1,61 +1,61 @@
1
- <!-- File generato automaticamente da templates/html/components/notification.html. Modificare templates/html/components/notification.html e rieseguire npm run docs:generate. -->
1
+ <!-- Automatically generated from reference/html/components/notification.html. Edit reference/html/components/notification.html and run npm run docs:generate again. -->
2
2
 
3
3
  # Notification
4
4
 
5
- Sistema di notifiche persistenti o toast temporanei, generati dall'API oppure da una configurazione JSON dichiarativa contenuta nell'opzione notification.
5
+ Notification markup, configuration, behavior, and usage example.
6
6
 
7
7
  ## PGS
8
8
 
9
- - `notification`: identifica il contenitore delle notifiche, sia persistenti sia temporanee.
10
- - `notificationTrigger`: identifica una configurazione dichiarativa elaborata e rimossa all'inizializzazione.
11
- - `notification-element`: identifica ogni messaggio creato dinamicamente.
12
- - `notification-element-title`: identifica il titolo generato del messaggio.
13
- - `notification-element-content`: identifica il contenuto generato del messaggio.
9
+ - `notification`: identifies the notification element used by Notification.
10
+ - `notificationTrigger`: identifies the notificationTrigger element used by Notification.
11
+ - `notification-element`: identifies the notification-element element used by Notification.
12
+ - `notification-element-title`: identifies the notification-element-title element used by Notification.
13
+ - `notification-element-content`: identifies the notification-element-content element used by Notification.
14
14
 
15
15
  ## PGS Options
16
16
 
17
- - `toast`: sul contenitore notification abilita il posizionamento centrale e la sostituzione del messaggio temporaneo corrente.
18
- - `notification`: contiene un oggetto JSON con title, message, element, type, icon, duration e link usando la sintassi notification[{...}].
17
+ - `toast`: identifies the toast element used by Notification.
18
+ - `notification`: identifies the notification element used by Notification.
19
+ - `buttonClose`: styles the dismiss action generated at runtime.
19
20
 
20
21
  ## PGS States
21
22
 
22
- - `success`: applica la variante positiva al messaggio generato.
23
- - `error`: applica la variante di errore e il ruolo alert.
24
- - `warning`: applica la variante di avviso.
25
- - `info`: applica la variante informativa predefinita.
23
+ - `success`: identifies the success element used by Notification.
24
+ - `error`: identifies the error element used by Notification.
25
+ - `warning`: identifies the warning element used by Notification.
26
+ - `info`: identifies the info element used by Notification.
26
27
 
27
- ## API JavaScript
28
+ ## JavaScript API
28
29
 
29
- - `pgs.notification.trigger(root)`: elabora e rimuove i notificationTrigger dichiarativi presenti nel contesto indicato.
30
- - `pgs.notification.alert.error(text, link, timeout, icon)`: crea una notifica persistente di errore, opzionalmente cliccabile e temporizzata.
31
- - `pgs.notification.alert.success(text, link, timeout, icon)`: crea una notifica persistente di successo.
32
- - `pgs.notification.alert.info(text, link, timeout, icon)`: crea una notifica persistente informativa.
33
- - `pgs.notification.alert.warning(text, link, timeout, icon)`: crea una notifica persistente di avviso.
34
- - `pgs.notification.alert.deleteAll()`: rimuove tutte le notifiche persistenti.
35
- - `pgs.notification.toast.error(text, timeout, icon)`: crea un toast di errore sostituendo quello eventualmente presente.
36
- - `pgs.notification.toast.success(text, timeout, icon)`: crea un toast di successo.
37
- - `pgs.notification.toast.info(text, timeout, icon)`: crea un toast informativo.
38
- - `pgs.notification.toast.warning(text, timeout, icon)`: crea un toast di avviso.
39
- - `pgs.notification.toast.deleteAll()`: rimuove il toast corrente.
30
+ - `pgs.notification.trigger(root)`: provides the documented operation through the component public API.
31
+ - `pgs.notification.alert.error(text, link, timeout, icon)`: provides the documented operation through the component public API.
32
+ - `pgs.notification.alert.success(text, link, timeout, icon)`: provides the documented operation through the component public API.
33
+ - `pgs.notification.alert.info(text, link, timeout, icon)`: provides the documented operation through the component public API.
34
+ - `pgs.notification.alert.warning(text, link, timeout, icon)`: provides the documented operation through the component public API.
35
+ - `pgs.notification.alert.deleteAll()`: provides the documented operation through the component public API.
36
+ - `pgs.notification.toast.error(text, timeout, icon)`: provides the documented operation through the component public API.
37
+ - `pgs.notification.toast.success(text, timeout, icon)`: provides the documented operation through the component public API.
38
+ - `pgs.notification.toast.info(text, timeout, icon)`: provides the documented operation through the component public API.
39
+ - `pgs.notification.toast.warning(text, timeout, icon)`: provides the documented operation through the component public API.
40
+ - `pgs.notification.toast.deleteAll()`: provides the documented operation through the component public API.
40
41
 
41
- ## Elementi correlati
42
+ ## Related elements
42
43
 
43
- - `hidden`: nasconde i trigger dichiarativi prima che vengano elaborati.
44
- - `buttonClose`: identifica il pulsante di rimozione aggiunto a ogni messaggio.
44
+ - `hidden`: uses the related hidden component or utility in this example.
45
45
 
46
46
  ## Output
47
47
 
48
- Due contenitori notification, uno persistente e uno configurato con l'opzione toast, con trigger dichiarativi configurati tramite pgs-option.
48
+ Complete HTML markup and usage example for Notification.
49
49
 
50
- ## Esempio
50
+ ## Example
51
51
 
52
52
  ```html
53
53
  <div pgs="notification" aria-live="polite"></div>
54
54
  <div pgs="notification" pgs-option="toast" aria-live="polite"></div>
55
55
 
56
56
  <div pgs="hidden notificationTrigger" pgs-option='notification[{
57
- "title": "Titolo",
58
- "message": "Messaggio",
57
+ "title": "Title",
58
+ "message": "Message",
59
59
  "element": "notification",
60
60
  "type": "info",
61
61
  "icon": null,
@@ -65,7 +65,7 @@ Due contenitori notification, uno persistente e uno configurato con l'opzione to
65
65
 
66
66
  <div pgs="hidden notificationTrigger" pgs-option='notification[{
67
67
  "title": "Benvenuto",
68
- "message": "Messaggio",
68
+ "message": "Message",
69
69
  "element": "toast",
70
70
  "type": "info",
71
71
  "icon": null,
@@ -75,7 +75,7 @@ Due contenitori notification, uno persistente e uno configurato con l'opzione to
75
75
  <!--
76
76
  <div
77
77
  pgs="hidden notificationTrigger"
78
- pgs-option='notification[{"title":"Titolo","message":"Messaggio","element":"notification","type":"info","icon":"<i class=\"fa-solid fa-rocket\"></i>","duration":"4000","link":"/pagina/"}]'>
78
+ pgs-option='notification[{"title":"Title","message":"Message","element":"notification","type":"info","icon":"<i class=\"fa-solid fa-rocket\"></i>","duration":"4000","link":"/page/"}]'>
79
79
  </div>
80
80
  -->
81
81
  ```
@@ -1,91 +1,93 @@
1
- <!-- File generato automaticamente da templates/html/components/search.html. Modificare templates/html/components/search.html e rieseguire npm run docs:generate. -->
1
+ <!-- Automatically generated from reference/html/components/search.html. Edit reference/html/components/search.html and run npm run docs:generate again. -->
2
2
 
3
3
  # Search
4
4
 
5
- Ricerca componibile con suggerimenti asincroni o locali, navigazione da tastiera, selezione, annullamento richieste e attributi ARIA gestiti dal modulo search.
5
+ Search markup, configuration, behavior, and usage example.
6
6
 
7
7
  ## PGS
8
8
 
9
- - `search`: identifica il form inizializzato come ricerca con suggerimenti.
10
- - `search-suggestions`: identifica la lista opzionale che riceve i risultati.
11
- - `search-suggestions-item`: identifica ogni risultato creato dinamicamente nella lista.
12
- - `search-modal`: identifica la variante di ricerca inserita in una modale per dispositivi mobili.
13
- - `search-mobile`: identifica il contenitore interno della ricerca mobile.
9
+ - `search`: identifies the search element used by Search.
10
+ - `search-suggestions`: identifies the search-suggestions element used by Search.
11
+ - `search-suggestions-item`: identifies the search-suggestions-item element used by Search.
12
+ - `search-modal`: identifies the search-modal element used by Search.
13
+ - `search-mobile`: identifies the search-mobile element used by Search.
14
14
 
15
15
  ## PGS Options
16
16
 
17
- - `containerPGS`: sul wrapper modal usa containerPGS[header] per spostare il dialog nell'header.
17
+ - `containerPGS`: identifies the containerPGS element used by Search.
18
+ - `buttonNohover`: disables hover behavior on the search container.
19
+ - `buttonIcon`: presents search and close actions as icon buttons.
18
20
 
19
21
  ## PGS States
20
22
 
21
- - `open`: sul root search indica che la lista dei suggerimenti è aperta.
22
- - `loading`: sul root search indica una sorgente dati in caricamento.
23
- - `error`: sul root search indica che il recupero dei suggerimenti è fallito.
24
- - `selected`: sul risultato generato indica l'elemento attivo durante la navigazione.
25
-
26
- ## API JavaScript
27
-
28
- - `pgs.search.init(root)`: inizializza le ricerche non ancora registrate dentro Document o Element indicato.
29
- - `pgs.search.api(element)`: restituisce l'istanza associata a un form search inizializzato.
30
- - `instance.configure(options)`: aggiorna minLength, debounce, limit, submitOnSelect, searchOnFocus, source e onSelect e restituisce l'istanza.
31
- - `instance.setSource(source)`: configura una sorgente array o funzione asincrona per i suggerimenti.
32
- - `instance.search(query)`: esegue subito la ricerca e restituisce una Promise con i suggerimenti normalizzati.
33
- - `instance.open()`: apre la lista quando sono disponibili risultati.
34
- - `instance.close()`: chiude la lista e azzera la selezione attiva.
35
- - `instance.clear()`: rimuove risultati e selezione e chiude la lista.
23
+ - `open`: identifies the open element used by Search.
24
+ - `loading`: identifies the loading element used by Search.
25
+ - `error`: identifies the error element used by Search.
26
+ - `selected`: identifies the selected element used by Search.
27
+
28
+ ## JavaScript API
29
+
30
+ - `pgs.search.init(root)`: initializes matching elements within the specified root.
31
+ - `pgs.search.api(element)`: returns the instance associated with the specified initialized element.
32
+ - `instance.configure(options)`: provides the documented operation through the component public API.
33
+ - `instance.setSource(source)`: provides the documented operation through the component public API.
34
+ - `instance.search(query)`: provides the documented operation through the component public API.
35
+ - `instance.open()`: opens the component.
36
+ - `instance.close()`: closes the component.
37
+ - `instance.clear()`: provides the documented operation through the component public API.
36
38
  - `instance.cancel()`: annulla debounce e richiesta attiva.
37
- - `instance.select(index, submit)`: seleziona un risultato, emette pgs:search:select e può inviare il form.
38
- - `instance.refresh()`: ripete la ricerca usando il valore corrente dell'input.
39
- - `instance.destroy()`: rimuove listener, annulla le operazioni e scollega l'istanza.
40
- - `instance.items()`: restituisce una copia dei suggerimenti correnti.
41
- - `instance.isOpen()`: restituisce true quando la lista dei suggerimenti è aperta.
42
- - `instance.isLoading()`: restituisce true durante il caricamento della sorgente.
43
- - `instance.setActiveIndex(index)`: imposta il suggerimento attivo e aggiorna selezione e attributi ARIA.
44
-
45
- ## Elementi correlati
46
-
47
- - `buttonNohover`: applica al form l'aspetto compatto condiviso con i controlli button.
48
- - `modal`: fornisce il contenitore e il comportamento della variante mobile.
49
- - `modal-button`: apre la ricerca mobile.
50
- - `modal-close`: chiude la ricerca mobile.
51
- - `buttonIcon`: presenta apertura e chiusura come pulsanti a icona.
52
- - `flexRow`: organizza il contenuto della variante mobile e gli elementi dei suggerimenti generati.
53
- - `section`: applica la spaziatura di sezione alla ricerca mobile.
39
+ - `instance.select(index, submit)`: provides the documented operation through the component public API.
40
+ - `instance.refresh()`: refreshes the component and returns its updated instance.
41
+ - `instance.destroy()`: removes listeners and releases the component instance.
42
+ - `instance.items()`: provides the documented operation through the component public API.
43
+ - `instance.isOpen()`: returns true when the component is open.
44
+ - `instance.isLoading()`: returns true while the component is loading.
45
+ - `instance.setActiveIndex(index)`: provides the documented operation through the component public API.
46
+
47
+ ## Related elements
48
+
49
+ - `button`: provides the base styling for search controls.
50
+ - `modal`: uses the related modal component or utility in this example.
51
+ - `modal-button`: uses the related modal-button component or utility in this example.
52
+ - `modal-close`: uses the related modal-close component or utility in this example.
53
+ - `flexRow`: uses the related flexRow component or utility in this example.
54
+ - `section`: uses the related section component or utility in this example.
54
55
 
55
56
  ## Output
56
57
 
57
- Form di ricerca autonomo, variante mobile integrata in una modal e script di esempio con sorgente locale.
58
+ Complete HTML markup and usage example for Search.
58
59
 
59
- ## Esempio
60
+ ## Example
60
61
 
61
62
  ```html
62
- <form pgs="buttonNohover search" autocomplete="off" action="" method="get">
63
- <button type="submit" title="Cerca"><i class="fa-solid fa-search"></i></button>
64
- <input type="search" name="s" placeholder="Cerca" value="">
63
+ <form pgs="button search" pgs-option="buttonNohover" autocomplete="off" action="" method="get">
64
+ <button type="submit" title="Search"><i class="fa-solid fa-search"></i></button>
65
+ <input type="search" name="s" placeholder="Search" value="">
65
66
  <ul pgs="search-suggestions"></ul>
66
67
  </form>
67
68
 
68
69
  <div pgs="modal search-modal" pgs-option="containerPGS[header]">
69
70
 
70
- <button type="button" pgs="modal-button buttonIcon" title="Cerca">
71
+ <button type="button" pgs="modal-button button" pgs-option="buttonIcon" title="Search">
71
72
  <i class="fa-solid fa-search"></i>
72
73
  </button>
73
74
 
74
75
  <dialog>
75
76
  <div pgs="flexRow section search-mobile">
76
77
 
77
- <form pgs="buttonNohover search" autocomplete="off" action="/" method="get">
78
- <button type="submit" title="Cerca">
78
+ <form pgs="button search" pgs-option="buttonNohover" autocomplete="off" action="/" method="get">
79
+ <button type="submit" title="Search">
79
80
  <i class="fa-solid fa-search"></i>
80
81
  </button>
81
82
 
82
- <input type="search" name="s" placeholder="Cerca" value="">
83
+ <input type="search" name="s" placeholder="Search" value="">
83
84
  <ul pgs="search-suggestions"></ul>
85
+
86
+ <button type="button" pgs="modal-close button" pgs-option="buttonIcon">
87
+ <i class="fa-solid fa-close"></i>
88
+ </button>
84
89
  </form>
85
90
 
86
- <button type="button" pgs="modal-close buttonIcon">
87
- <i class="fa-solid fa-close"></i>
88
- </button>
89
91
 
90
92
  </div>
91
93
  </dialog>