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,68 +1,68 @@
1
- <!-- File generato automaticamente da templates/html/layout/section.html. Modificare templates/html/layout/section.html e rieseguire npm run docs:generate. -->
1
+ <!-- Automatically generated from reference/html/layout/section.html. Edit reference/html/layout/section.html and run npm run docs:generate again. -->
2
2
 
3
3
  # Section
4
4
 
5
- Varianti di sezione che controllano larghezza, padding e trattamento di contenuti specifici mantenendo la spaziatura verticale condivisa.
5
+ Section variants that control width, padding, and specific content treatment while preserving shared vertical spacing.
6
6
 
7
7
  ## PGS
8
8
 
9
- - `section`: identifica la sezione standard con contenuto centrato.
10
- - `sectionFull`: identifica una sezione estesa a tutta la larghezza disponibile.
11
- - `sectionSpecificity`: identifica una sezione che applica una struttura specifica al relativo figlio.
12
- - `sectionSpecificity-child`: identifica il contenuto figlio gestito dalla variante sectionSpecificity.
13
- - `sectionMax`: identifica una sezione con larghezza massima estesa.
14
- - `sectionNoPadding`: identifica una sezione priva del padding standard.
9
+ - `section`: identifies the standard section with centered content.
10
+ - `sectionFull`: identifies a section that spans the full available width.
11
+ - `sectionSpecificity`: identifies a section that applies a specific structure to its child.
12
+ - `sectionSpecificity-child`: identifies child content managed by the sectionSpecificity variant.
13
+ - `sectionMax`: identifies a section with an extended maximum width.
14
+ - `sectionNoPadding`: identifies a section without standard padding.
15
15
 
16
- ## Elementi correlati
16
+ ## Related elements
17
17
 
18
- - `flexColumnSections`: distanzia verticalmente tutte le sezioni dell'esempio.
19
- - `flexColumnElements`: organizza verticalmente gli elementi principali di ogni sezione.
20
- - `flexColumnTexts`: organizza e distanzia i contenuti interni.
21
- - `card-img`: riutilizza il trattamento delle immagini card nelle sezioni dimostrative.
22
- - `imgCover`: adatta le immagini alla larghezza della sezione.
18
+ - `flexColumn`: vertically organizes sections and inner content.
19
+ - `gapSections`: applies section spacing to the outer collection.
20
+ - `gapElements`: applies element spacing inside each section.
21
+ - `card-img`: reuses card image treatment in the demonstration sections.
22
+ - `imgCover`: scales images to the section width.
23
23
 
24
24
  ## Output
25
25
 
26
- Raccolta HTML delle varianti di section disponibili.
26
+ HTML collection of the available section variants.
27
27
 
28
- ## Esempio
28
+ ## Example
29
29
 
30
30
  ```html
31
- <div pgs="flexColumnSections">
32
- <section pgs="section flexColumnElements">
33
- <div pgs="flexColumnTexts">
34
- <strong>Sezione standard</strong>
35
- <p>Contenuto centrato dentro una sezione MyPGS.</p>
31
+ <div pgs="flexColumn gapSections">
32
+ <section pgs="section flexColumn gapElements">
33
+ <div pgs="flexColumn">
34
+ <strong>Standard section</strong>
35
+ <p>Centered content inside a MyPGS section.</p>
36
36
  </div>
37
37
  </section>
38
38
 
39
- <section pgs="sectionFull flexColumnElements">
40
- <div pgs="flexColumnTexts">
41
- <strong>Sezione full-width</strong>
42
- <p>Contenuto centrato dentro una sezione MyPGS.</p>
39
+ <section pgs="sectionFull flexColumn gapElements">
40
+ <div pgs="flexColumn">
41
+ <strong>Full-width section</strong>
42
+ <p>Centered content inside a MyPGS section.</p>
43
43
  </div>
44
44
  </section>
45
45
 
46
- <section pgs="sectionSpecificity flexColumnElements">
47
- <div pgs="flexColumnTexts">
48
- <img pgs="card-img imgCover" src="https://placehold.co/800x200?text=Hero" alt="Immagine segnaposto">
46
+ <section pgs="sectionSpecificity flexColumn gapElements">
47
+ <div pgs="flexColumn">
48
+ <img pgs="card-img imgCover" src="https://placehold.co/800x200?text=Hero" alt="Placeholder image">
49
49
  </div>
50
- <div pgs="sectionSpecificity-child flexColumnTexts">
51
- <strong>Sezione specificità-child</strong>
52
- <p>Contenuto centrato dentro una sezione MyPGS.</p>
50
+ <div pgs="sectionSpecificity-child flexColumn">
51
+ <strong>Specificity-child section</strong>
52
+ <p>Centered content inside a MyPGS section.</p>
53
53
  </div>
54
54
  </section>
55
55
 
56
- <section pgs="sectionMax flexColumnElements" style="background-color: var(--color-primary-soft)">
57
- <div pgs="flexColumnTexts">
58
- <strong>Sezione max-width</strong>
59
- <p>Contenuto centrato dentro una sezione MyPGS.</p>
56
+ <section pgs="sectionMax flexColumn gapElements" style="background-color: var(--color-primary-soft)">
57
+ <div pgs="flexColumn">
58
+ <strong>Max-width section</strong>
59
+ <p>Centered content inside a MyPGS section.</p>
60
60
  </div>
61
61
  </section>
62
62
 
63
- <section pgs="sectionNoPadding flexColumnElements">
64
- <div pgs="flexColumnTexts">
65
- <img pgs="card-img imgCover" src="https://placehold.co/800x500?text=HI!" alt="Immagine segnaposto">
63
+ <section pgs="sectionNoPadding flexColumn gapElements">
64
+ <div pgs="flexColumn">
65
+ <img pgs="card-img imgCover" src="https://placehold.co/800x500?text=HI!" alt="Placeholder image">
66
66
  </div>
67
67
  </section>
68
68
  </div>
@@ -1,48 +1,51 @@
1
- <!-- File generato automaticamente da templates/html/patterns/cookieConsent.html. Modificare templates/html/patterns/cookieConsent.html e rieseguire npm run docs:generate. -->
1
+ <!-- Automatically generated from reference/html/patterns/cookieConsent.html. Edit reference/html/patterns/cookieConsent.html and run npm run docs:generate again. -->
2
2
 
3
3
  # Cookie Consent
4
4
 
5
- Pattern accessibile per raccogliere e memorizzare il consenso ai cookie analitici, applicare le preferenze e caricare Google Analytics solo quando autorizzato.
5
+ Accessible pattern for collecting and storing analytics cookie consent, applying preferences, and loading Google Analytics only when authorized.
6
6
 
7
7
  ## PGS
8
8
 
9
- - `cookieConsent`: identifica il pannello principale inizializzato dal pattern JavaScript.
10
- - `cookieConsent-panel`: identifica il gruppo delle preferenze configurabili.
11
- - `cookieConsent-featureEssential`: identifica la riga dei cookie tecnici sempre attivi.
12
- - `cookieConsent-panel-badge`: identifica l'indicatore dello stato dei cookie tecnici.
13
- - `cookieConsent-featureAnalytics`: identifica la riga dei cookie analitici opzionali.
14
- - `cookieConsent-toggleAnalytics`: identifica il controllo che abilita il consenso analytics.
15
- - `cookieConsent-actionReject`: applica le preferenze selezionate senza accettare automaticamente analytics.
16
- - `cookieConsent-actionAccept`: accetta tutti i cookie disponibili.
17
- - `cookieConsent-actionOpen`: identifica controlli esterni che riaprono il pannello delle preferenze.
18
- - `cookieConsent-gaUnavailable`: token runtime applicato al root quando manca un measurement ID utilizzabile.
19
- - `cookieConsent-accepted`: token runtime applicato al root quando analytics è consentito.
20
- - `cookieConsent-declined`: token runtime applicato al root quando analytics non è consentito.
21
-
22
- ## Elementi correlati
23
-
24
- - `flexColumn`: organizza verticalmente il pannello delle preferenze.
25
- - `flexRow`: dispone righe e azioni del pannello.
26
- - `nowrap`: impedisce il ritorno a capo nella riga dei cookie essenziali.
27
- - `toggle`: presenta il consenso analytics come interruttore.
28
- - `button`: presenta l'azione di selezione con lo stile standard.
29
- - `buttonStrong`: presenta l'accettazione completa come azione primaria.
9
+ - `cookieConsent`: identifies the main panel initialized by the JavaScript pattern.
10
+ - `cookieConsent-panel`: identifies the configurable preference group.
11
+ - `cookieConsent-featureEssential`: identifies the row of always-active essential cookies.
12
+ - `cookieConsent-panel-badge`: identifies the essential-cookie status indicator.
13
+ - `cookieConsent-featureAnalytics`: identifies the optional analytics-cookie row.
14
+ - `cookieConsent-toggleAnalytics`: identifies the control that enables analytics consent.
15
+ - `cookieConsent-actionReject`: applies selected preferences without automatically accepting analytics.
16
+ - `cookieConsent-actionAccept`: accepts all available cookies.
17
+ - `cookieConsent-actionOpen`: identifies external controls that reopen the preference panel.
18
+ - `cookieConsent-gaUnavailable`: runtime token applied to the root when no usable measurement ID is available.
19
+ - `cookieConsent-accepted`: runtime token applied to the root when analytics is allowed.
20
+ - `cookieConsent-declined`: runtime token applied to the root when analytics is not allowed.
21
+
22
+ ## PGS Options
23
+
24
+ - `buttonStrong`: presents full acceptance as the primary action.
25
+
26
+ ## Related elements
27
+
28
+ - `flexColumn`: vertically organizes the preference panel.
29
+ - `flexRow`: arranges panel rows and actions.
30
+ - `nowrap`: prevents wrapping in the essential-cookie row.
31
+ - `toggle`: presents analytics consent as a switch.
32
+ - `button`: presents the selection action with standard styling.
30
33
 
31
34
  ## Output
32
35
 
33
- Pannello HTML di consenso con preferenze tecniche e analytics, azioni e attributi accessibili.
36
+ Consent panel HTML with essential and analytics preferences, actions, and accessible attributes.
34
37
 
35
- ## Esempio
38
+ ## Example
36
39
 
37
40
  ```html
38
41
  <section id="pgs-cookieConsent" pgs="cookieConsent" role="dialog" aria-modal="true" data-ga-id="G-XXXXXXXXXX" hidden tabindex="-1">
39
- <p><i class="fa-duotone fa-solid fa-cookie-bite"></i> Cookie e privacy <br></p>
40
- <h2>La tua privacy prima di tutto</h2>
42
+ <p><i class="fa-duotone fa-solid fa-cookie-bite"></i> Cookies and privacy <br></p>
43
+ <h2>Your privacy comes first</h2>
41
44
 
42
45
  <p>
43
- Utilizziamo cookie tecnici per offrire il servizio e, previo consenso, cookie analitici di
44
- <strong>Google Analytics</strong> per misurare in modo anonimo il traffico e migliorare i contenuti.
45
- Puoi modificare la scelta in qualsiasi momento.
46
+ We use essential cookies to provide the service and, with your consent, analytics cookies from
47
+ <strong>Google Analytics</strong> to measure traffic anonymously and improve our content.
48
+ You can change your choice at any time.
46
49
  </p>
47
50
 
48
51
  <p>
@@ -50,17 +53,17 @@ Pannello HTML di consenso con preferenze tecniche e analytics, azioni e attribut
50
53
  <a href="/cookie-policy/" target="_blank" rel="noopener">Cookie Policy</a>
51
54
  </p>
52
55
 
53
- <div pgs="cookieConsent-panel flexColumn" role="group" aria-label="Preferenze cookie">
56
+ <div pgs="cookieConsent-panel flexColumn" role="group" aria-label="Cookie preferences">
54
57
  <div pgs="flexRow nowrap cookieConsent-featureEssential">
55
58
  <div>
56
59
  <p>
57
- <strong>Cookie tecnici</strong>
60
+ <strong>Essential cookies</strong>
58
61
  <br>
59
- <small>Sempre attivi per garantire il corretto funzionamento del sito.</small>
62
+ <small>Always active to ensure the website works correctly.</small>
60
63
  </p>
61
64
  </div>
62
65
 
63
- <span pgs="cookieConsent-panel-badge">Attivi</span>
66
+ <span pgs="cookieConsent-panel-badge">Active</span>
64
67
  </div>
65
68
 
66
69
  <div pgs="flexRow cookieConsent-featureAnalytics">
@@ -68,21 +71,21 @@ Pannello HTML di consenso con preferenze tecniche e analytics, azioni e attribut
68
71
  <p>
69
72
  <strong>Analytics</strong>
70
73
  <br>
71
- <small>Dati di navigazione raccolti in forma aggregata per statistiche anonime.</small>
74
+ <small>Browsing data collected in aggregate form for anonymous statistics.</small>
72
75
  </p>
73
76
 
74
- <input type="checkbox" pgs="cookieConsent-toggleAnalytics" aria-label="Abilita Google Analytics">
77
+ <input type="checkbox" pgs="cookieConsent-toggleAnalytics" aria-label="Enable Google Analytics">
75
78
  </label>
76
79
  </div>
77
80
  </div>
78
81
 
79
82
  <div pgs="flexRow">
80
83
  <button type="button" pgs="button cookieConsent-actionReject">
81
- <i class="fa-solid fa-duotone fa-sliders"></i>Solo selezionati
84
+ <i class="fa-solid fa-duotone fa-sliders"></i>Selected only
82
85
  </button>
83
86
 
84
- <button type="button" pgs="buttonStrong cookieConsent-actionAccept">
85
- <i class="fa-solid fa-check"></i> Accetta tutto
87
+ <button type="button" pgs="button cookieConsent-actionAccept" pgs-option="buttonStrong">
88
+ <i class="fa-solid fa-check"></i> Accept all
86
89
  </button>
87
90
  </div>
88
91
  </section>
@@ -1,6 +1,6 @@
1
- # Utilizzo CSS/SCSS
1
+ # CSS/SCSS usage
2
2
 
3
- La libreria espone molte custom properties da preferire agli hardcode, per esempio:
3
+ The library exposes many custom properties that should be preferred to hardcoded values, for example:
4
4
 
5
5
  ```scss
6
6
  :root {
@@ -13,7 +13,7 @@ La libreria espone molte custom properties da preferire agli hardcode, per esemp
13
13
  }
14
14
  ```
15
15
 
16
- Override consigliato:
16
+ Recommended override:
17
17
 
18
18
  ```scss
19
19
  #danger-action {
@@ -22,15 +22,39 @@ Override consigliato:
22
22
  }
23
23
  ```
24
24
 
25
- Evita di riscrivere da zero padding, gap, border-radius o colori se esiste gia' una variabile o un token PGS adatto.
25
+ Avoid rewriting padding, gaps, border radii, or colors from scratch when a suitable variable or PGS token already exists.
26
26
 
27
- ## Il sistema `pgs`
27
+ ## Button mixins
28
28
 
29
- Il markup usa token separati da spazio dentro l'attributo `pgs`:
29
+ Button styling is split into small mixins so each consumer can include only the behavior it needs. A standard button is composed explicitly:
30
+
31
+ ```scss
32
+ .action {
33
+ @include buttonBase();
34
+ @include buttonContent();
35
+ @include buttonHover();
36
+ }
37
+ ```
38
+
39
+ Use `buttonIcon` instead of `buttonContent` for icon-only controls, and `buttonNohover` instead of `buttonHover` when pointer interaction must remain neutral:
40
+
41
+ ```scss
42
+ .icon-action {
43
+ @include buttonBase();
44
+ @include buttonIcon();
45
+ @include buttonNohover();
46
+ }
47
+ ```
48
+
49
+ `buttonStrong`, `buttonMini`, `buttonBig`, and `buttonClose` contain only their variant declarations and must be added after the required base, content/icon, and interaction mixins. This explicit composition is also the preferred pattern for components such as menus, accordions, forms, and step tabs.
50
+
51
+ ## The `pgs` system
52
+
53
+ Markup uses space-separated tokens inside the `pgs` attribute:
30
54
 
31
55
  ```html
32
- <button pgs="button buttonStrong" type="button">Salva</button>
33
- <section pgs="section flexColumnElements"></section>
56
+ <button pgs="button" pgs-option="buttonStrong" type="button">Save</button>
57
+ <section pgs="section flexColumn gapElements"></section>
34
58
  ```
35
59
 
36
- Gli stessi token collegano HTML, SCSS e JavaScript.
60
+ The same tokens connect HTML, SCSS, and JavaScript.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mypgs",
3
- "version": "2.0.0",
3
+ "version": "3.0.0",
4
4
  "description": "MyPGS frontend theme and UI behaviors, with bundled JavaScript and CSS assets.",
5
5
  "main": "./dist/javascript/index.js",
6
6
  "module": "./assets/javascript/index.js",
@@ -0,0 +1,52 @@
1
+ <!--
2
+ /**
3
+ * @title Accordion
4
+ * @description Interactive component that expands one panel at a time while synchronizing visibility, ARIA attributes, and keyboard navigation.
5
+ *
6
+ * @pgs
7
+ * - accordion: identifies each expandable element initialized by the JavaScript module.
8
+ * - accordion-button: identifies the control that opens or closes the associated panel.
9
+ * - accordion-content: identifies the content panel managed through the hidden attribute.
10
+ *
11
+ * @pgs-state
12
+ * - open: indicates the accordion element that is currently open and visible.
13
+ *
14
+ * @api
15
+ * - pgs.accordion.init(root): initializes unregistered accordions within the specified Document or Element.
16
+ * - pgs.accordion.api(element): returns the instance associated with an initialized accordion root.
17
+ * - instance.open(): opens the panel and closes any other accordions on the page.
18
+ * - instance.close(): closes the current panel.
19
+ * - instance.toggle(): toggles the panel between its open and closed states.
20
+ * - instance.refresh(): reruns initialization within the accordion container and returns the instance.
21
+ * - instance.isOpen(): returns true when the open state is active.
22
+ *
23
+ * @related
24
+ * - flexColumn: applies text spacing between the list items.
25
+ *
26
+ * @return HTML list of accessible accordion items with an associated button and panel.
27
+ */
28
+ -->
29
+
30
+ <ul pgs="flexColumn">
31
+ <li pgs="accordion">
32
+ <button pgs="accordion-button" type="button">
33
+ <i class="fa-solid fa-circle-question" aria-hidden="true"></i>
34
+ <span>Frequently asked question</span>
35
+ </button>
36
+
37
+ <div pgs="accordion-content" hidden>
38
+ <p>Example answer with reusable text content.</p>
39
+ </div>
40
+ </li>
41
+
42
+ <li pgs="accordion">
43
+ <button pgs="accordion-button" type="button">
44
+ <i class="fa-solid fa-circle-info" aria-hidden="true"></i>
45
+ <span>Second section</span>
46
+ </button>
47
+
48
+ <div pgs="accordion-content" hidden>
49
+ <p>Additional accordion panel content.</p>
50
+ </div>
51
+ </li>
52
+ </ul>
@@ -0,0 +1,59 @@
1
+ <!--
2
+ /**
3
+ * @title Alerts
4
+ * @description Static inline feedback messages for contextual information, successful operations, warnings, and errors. Use the notification API for dynamic floating alerts and toasts.
5
+ *
6
+ * @pgs
7
+ * - alert: identifies the inline alert container.
8
+ * - alert-icon: identifies the decorative status icon.
9
+ * - alert-content: groups the title and descriptive message.
10
+ * - alert-title: identifies the alert heading.
11
+ *
12
+ * @pgs-state
13
+ * - info: presents neutral informational feedback.
14
+ * - success: presents confirmation of a successful operation.
15
+ * - warning: presents a condition that requires attention.
16
+ * - error: presents a failure or blocking problem.
17
+ *
18
+ * @related
19
+ * - flexColumn: vertically arranges the alert examples.
20
+ * - gapElements: applies element spacing between the examples.
21
+ * - notification: provides dynamic floating alerts and toast messages.
22
+ *
23
+ * @return Accessible HTML examples of the four inline alert states.
24
+ */
25
+ -->
26
+
27
+ <div pgs="flexColumn gapElements">
28
+ <div pgs="alert" pgs-state="info" role="status">
29
+ <i pgs="alert-icon" class="fa-solid fa-circle-info" aria-hidden="true"></i>
30
+ <div pgs="alert-content">
31
+ <strong pgs="alert-title">Information</strong>
32
+ <p>Your profile information can be updated at any time.</p>
33
+ </div>
34
+ </div>
35
+
36
+ <div pgs="alert" pgs-state="success" role="status">
37
+ <i pgs="alert-icon" class="fa-solid fa-circle-check" aria-hidden="true"></i>
38
+ <div pgs="alert-content">
39
+ <strong pgs="alert-title">Changes saved</strong>
40
+ <p>Your preferences were updated successfully.</p>
41
+ </div>
42
+ </div>
43
+
44
+ <div pgs="alert" pgs-state="warning" role="alert">
45
+ <i pgs="alert-icon" class="fa-solid fa-triangle-exclamation" aria-hidden="true"></i>
46
+ <div pgs="alert-content">
47
+ <strong pgs="alert-title">Check your information</strong>
48
+ <p>Some fields may require your attention before continuing.</p>
49
+ </div>
50
+ </div>
51
+
52
+ <div pgs="alert" pgs-state="error" role="alert">
53
+ <i pgs="alert-icon" class="fa-solid fa-circle-xmark" aria-hidden="true"></i>
54
+ <div pgs="alert-content">
55
+ <strong pgs="alert-title">Unable to save</strong>
56
+ <p>Correct the reported errors and try again.</p>
57
+ </div>
58
+ </div>
59
+ </div>
@@ -0,0 +1,62 @@
1
+ <!--
2
+ /**
3
+ * @title Badge
4
+ * @description Collection of compact indicators for displaying categories, priorities, and visual states with consistent color variants.
5
+ *
6
+ * @pgs
7
+ * - badge: identifies the base badge variant.
8
+ *
9
+ * @pgs-option
10
+ * - badgePrimary: applies the primary color variant.
11
+ * - badgeStrong: applies the high-contrast variant.
12
+ * - badgeSuccess: represents a successful result.
13
+ * - badgeDot: adds a dot indicator to the badge.
14
+ * - badgeWarning: represents a warning.
15
+ * - badgeError: represents an error.
16
+ * - badgeInfo: represents informational content.
17
+ * - badgeNeutral: applies the neutral variant.
18
+ *
19
+ * @related
20
+ * - flexRow: arranges badges horizontally and allows them to wrap.
21
+ *
22
+ * @return HTML examples of the available badge variants.
23
+ */
24
+ -->
25
+
26
+ <div pgs="flexRow">
27
+ <span pgs="badge">
28
+ Base
29
+ </span>
30
+
31
+ <span pgs="badge" pgs-option="badgePrimary">
32
+ Primary
33
+ </span>
34
+
35
+ <span pgs="badge" pgs-option="badgeStrong">
36
+ Strong
37
+ </span>
38
+
39
+ <span pgs="badge" pgs-option="badgeSuccess badgeDot">
40
+ Active
41
+ </span>
42
+
43
+ <span pgs="badge" pgs-option="badgeWarning">
44
+ <i class="fa-solid fa-triangle-exclamation" aria-hidden="true"></i>
45
+ Warning
46
+ </span>
47
+
48
+ <span pgs="badge" pgs-option="badgeError">
49
+ <i class="fa-solid fa-xmark" aria-hidden="true"></i>
50
+ Error
51
+ </span>
52
+
53
+ <span pgs="badge" pgs-option="badgeInfo">
54
+ <i class="fa-solid fa-circle-info" aria-hidden="true"></i>
55
+ Info
56
+ </span>
57
+
58
+ <span pgs="badge" pgs-option="badgeNeutral">
59
+ Neutral
60
+ </span>
61
+
62
+ </div>
@@ -1,14 +1,14 @@
1
1
  <!--
2
2
  /**
3
3
  * @title Breadcrumb
4
- * @description Navigazione gerarchica che mostra il percorso della pagina corrente con collegamenti, separatori e indicazione semantica dell'elemento attivo.
4
+ * @description Hierarchical navigation that shows the current page path with links, separators, and a semantic indication of the active item.
5
5
  *
6
6
  * @pgs
7
- * - breadcrumb: identifica la lista principale del percorso di navigazione.
8
- * - breadcrumb-item: identifica ogni livello del percorso.
9
- * - breadcrumb-item-separator: identifica il separatore decorativo nascosto alle tecnologie assistive.
7
+ * - breadcrumb: identifies the main navigation path list.
8
+ * - breadcrumb-item: identifies each level in the path.
9
+ * - breadcrumb-item-separator: identifies the decorative separator hidden from assistive technologies.
10
10
  *
11
- * @return Struttura HTML semantica di una breadcrumb racchiusa in un elemento nav.
11
+ * @return Semantic breadcrumb HTML structure wrapped in a nav element.
12
12
  */
13
13
  -->
14
14
 
@@ -30,7 +30,7 @@
30
30
 
31
31
  <li pgs="breadcrumb-item">
32
32
  <span aria-current="page">
33
- Articolo di prova
33
+ Sample article
34
34
  </span>
35
35
  </li>
36
36
  </ul>
@@ -0,0 +1,51 @@
1
+ <!--
2
+ /**
3
+ * @title Button
4
+ * @description Button and action-link variants with sizes, emphasis, and icon-text composition defined by the design system.
5
+ *
6
+ * @pgs
7
+ * - button: identifies the standard button, which can also be used on anchor elements.
8
+ *
9
+ * @pgs-option
10
+ * - buttonReverse: reverses the visual order of the text and icon on the button.
11
+ * - buttonStrong: applies the variant with stronger visual emphasis.
12
+ * - buttonIcon: identifies a compact button composed primarily of an icon.
13
+ * - buttonMini: applies the smallest size variant.
14
+ * - buttonBig: applies the large size variant.
15
+ *
16
+ * @related
17
+ * - flexRow: arranges the button examples in a flexible row.
18
+ *
19
+ * @return HTML collection of the main button variants.
20
+ */
21
+ -->
22
+
23
+ <div pgs="flexRow">
24
+ <a pgs="button" href="#">
25
+ <i class="fa-duotone fa-solid fa-store"></i>
26
+ About
27
+ </a>
28
+
29
+ <button pgs="button" type="button" pgs-option="buttonReverse">
30
+ Next
31
+ <i class="fa-solid fa-arrow-right" aria-hidden="true"></i>
32
+ </button>
33
+
34
+ <button pgs="button" pgs-option="buttonStrong" type="button">
35
+ <i class="fa-solid fa-check" aria-hidden="true"></i>
36
+ Submit
37
+ </button>
38
+
39
+ <button pgs="button" pgs-option="buttonIcon" type="button" aria-label="Settings">
40
+ <i class="fa-solid fa-gear" aria-hidden="true"></i>
41
+ </button>
42
+
43
+ <button pgs="button" pgs-option="buttonMini" type="button" aria-label="Information">
44
+ <i class="fa-solid fa-info" aria-hidden="true"></i>
45
+ </button>
46
+
47
+ <button pgs="button" pgs-option="buttonBig" type="button" aria-label="Large button">
48
+ <i class="fa-solid fa-rocket" aria-hidden="true"></i>
49
+ Large button
50
+ </button>
51
+ </div>
@@ -0,0 +1,45 @@
1
+ <!--
2
+ /**
3
+ * @title Card
4
+ * @description Reusable container for grouping an image, title, text, and actions in responsive previews or collections.
5
+ *
6
+ * @pgs
7
+ * - card: identifies the main card container.
8
+ * - card-img: identifies the main card image.
9
+ *
10
+ * @pgs-option
11
+ * - column-2: configures the related flex layout with two columns.
12
+ *
13
+ * @related
14
+ * - flexRow: arranges the cards in a responsive layout.
15
+ * - flexColumn: organizes the card or link content vertically.
16
+ * - imgCover: scales the image to fill the available area.
17
+ * - button: presents the final link as a standard button.
18
+ *
19
+ * @return Two card HTML structures, one with a separate action and one that is fully clickable.
20
+ */
21
+ -->
22
+
23
+ <div pgs="flexRow" pgs-option="column-2">
24
+
25
+ <article pgs="card flexColumn">
26
+ <img pgs="card-img imgCover" src="https://placehold.co/800x500" alt="Placeholder image">
27
+
28
+ <div pgs="flexColumn">
29
+ <h3>Reusable card</h3>
30
+ <p>Descriptive card content suitable for lists, previews, and grids.</p>
31
+ <a pgs="button" href="#">Read more</a>
32
+ </div>
33
+ </article>
34
+
35
+ <article pgs="card">
36
+ <a pgs="flexColumn" href="">
37
+ <img pgs="card-img imgCover" src="https://placehold.co/800x500" alt="Placeholder image">
38
+
39
+ <div pgs="flexColumn">
40
+ <h3>Reusable card</h3>
41
+ <p>Descriptive card content suitable for lists, previews, and grids.</p>
42
+ </div>
43
+ </a>
44
+ </article>
45
+ </div>