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,6 +1,6 @@
1
1
  const notificationData = {
2
- title: "Titolo",
3
- message: "Messaggio",
2
+ title: "Title",
3
+ message: "Message",
4
4
  element: "notification",
5
5
  type: "info",
6
6
  icon: null,
@@ -10,7 +10,7 @@ const notificationData = {
10
10
 
11
11
  const toastData = {
12
12
  title: "Benvenuto",
13
- message: "Messaggio",
13
+ message: "Message",
14
14
  element: "toast",
15
15
  type: "info",
16
16
  icon: null,
@@ -1,8 +1,8 @@
1
1
  export default function Search() {
2
2
  return (
3
- <form pgs="buttonNohover search" autoComplete="off" action="" method="get">
4
- <button type="submit" title="Cerca"><i className="fa-solid fa-search"></i></button>
5
- <input type="search" name="s" placeholder="Cerca" defaultValue="" />
3
+ <form pgs="button search" pgs-option="buttonNohover" autoComplete="off" action="" method="get">
4
+ <button type="submit" title="Search"><i className="fa-solid fa-search"></i></button>
5
+ <input type="search" name="s" placeholder="Search" defaultValue="" />
6
6
  <ul pgs="search-suggestions"></ul>
7
7
  </form>
8
8
  );
@@ -11,22 +11,22 @@ export default function Search() {
11
11
  export function SearchModal() {
12
12
  return (
13
13
  <div pgs="modal search-modal" pgs-option="containerPGS[header]">
14
- <button type="button" pgs="modal-button buttonIcon" title="Cerca">
14
+ <button type="button" pgs="modal-button button" pgs-option="buttonIcon" title="Search">
15
15
  <i className="fa-solid fa-search"></i>
16
16
  </button>
17
17
 
18
18
  <dialog>
19
19
  <div pgs="flexRow section search-mobile">
20
- <form pgs="buttonNohover search" autoComplete="off" action="/" method="get">
21
- <button type="submit" title="Cerca">
20
+ <form pgs="button search" pgs-option="buttonNohover" autoComplete="off" action="/" method="get">
21
+ <button type="submit" title="Search">
22
22
  <i className="fa-solid fa-search"></i>
23
23
  </button>
24
24
 
25
- <input type="search" name="s" placeholder="Cerca" defaultValue="" />
25
+ <input type="search" name="s" placeholder="Search" defaultValue="" />
26
26
  <ul pgs="search-suggestions"></ul>
27
27
  </form>
28
28
 
29
- <button type="button" pgs="modal-close buttonIcon">
29
+ <button type="button" pgs="modal-close button" pgs-option="buttonIcon">
30
30
  <i className="fa-solid fa-close"></i>
31
31
  </button>
32
32
  </div>
@@ -1,7 +1,7 @@
1
1
  const slides = [
2
- ["Slide uno", "Contenuto della prima slide.", "https://placehold.co/800x500?text=Slide+1", "Slide 1"],
3
- ["Slide due", "Contenuto della seconda slide.", "https://placehold.co/800x500?text=Slide+2", "Slide 2"],
4
- ["Slide tre", "Contenuto della terza slide.", "https://placehold.co/800x500?text=Slide+3", "Slide 3"],
2
+ ["Slide uno", "First slide content.", "https://placehold.co/800x500?text=Slide+1", "Slide 1"],
3
+ ["Slide due", "Second slide content.", "https://placehold.co/800x500?text=Slide+2", "Slide 2"],
4
+ ["Slide tre", "Third slide content.", "https://placehold.co/800x500?text=Slide+3", "Slide 3"],
5
5
  ];
6
6
 
7
7
  export default function Slides() {
@@ -12,7 +12,7 @@ export default function Slides() {
12
12
  <li key={title}>
13
13
  <article pgs="card flexColumn">
14
14
  <img pgs="card-img imgCover" src={src} alt={alt} />
15
- <div pgs="flexColumnTexts">
15
+ <div pgs="flexColumn">
16
16
  <h3>{title}</h3>
17
17
  <p>{text}</p>
18
18
  </div>
@@ -1,29 +1,29 @@
1
1
  export default function StepTabs() {
2
2
  return (
3
- <div pgs="stepTabs flexColumnElements">
3
+ <div pgs="stepTabs flexColumn gapElements">
4
4
  <div pgs="stepTabs-dots" aria-label="Avanzamento"></div>
5
5
 
6
6
  <div pgs="stepTabs-container">
7
- <section pgs="tab flexColumnTexts" tabIndex="-1" pgs-option="tabIcon[fa-user]">
8
- <h3>Dati personali</h3>
9
- <p>Contenuto del primo tab.</p>
7
+ <section pgs="tab flexColumn" tabIndex="-1" pgs-option="tabIcon[fa-user]">
8
+ <h3>Personal details</h3>
9
+ <p>First tab content.</p>
10
10
  </section>
11
11
 
12
- <section pgs="tab flexColumnTexts" tabIndex="-1" pgs-option="tabIcon[fa-list-check]">
13
- <h3>Preferenze</h3>
14
- <p>Contenuto del secondo tab.</p>
12
+ <section pgs="tab flexColumn" tabIndex="-1" pgs-option="tabIcon[fa-list-check]">
13
+ <h3>Preferences</h3>
14
+ <p>Second tab content.</p>
15
15
  </section>
16
16
 
17
- <section pgs="tab flexColumnTexts" tabIndex="-1" pgs-option="tabIcon[fa-check]">
18
- <h3>Conferma</h3>
19
- <p>Contenuto del terzo tab.</p>
17
+ <section pgs="tab flexColumn" tabIndex="-1" pgs-option="tabIcon[fa-check]">
18
+ <h3>Confirmation</h3>
19
+ <p>Third tab content.</p>
20
20
  </section>
21
21
  </div>
22
22
 
23
23
  <div pgs="flexRow">
24
24
  <button pgs="stepTabs-prev button" type="button">
25
25
  <i className="fa-solid fa-arrow-left" aria-hidden="true"></i>
26
- Indietro
26
+ Back
27
27
  </button>
28
28
 
29
29
  <button pgs="stepTabs-restart button" type="button">
@@ -31,7 +31,7 @@ export default function StepTabs() {
31
31
  </button>
32
32
 
33
33
  <button pgs="stepTabs-next button" pgs-option="buttonReverse" type="button">
34
- Avanti
34
+ Next
35
35
  <i className="fa-solid fa-arrow-right" aria-hidden="true"></i>
36
36
  </button>
37
37
  </div>
@@ -0,0 +1,18 @@
1
+ export default function Summary() {
2
+ return (
3
+ <div pgs="summary">
4
+ <div pgs="summary-content">
5
+ <p>
6
+ This demonstration text is long enough to span multiple lines and show the summary component behavior. Content can include text, links, and other inline elements without requiring additional markup.
7
+ </p>
8
+ <p>
9
+ When content exceeds three lines, a button is shown to expand or collapse the visible area.
10
+ </p>
11
+ </div>
12
+
13
+ <button pgs="summary-button" type="button">
14
+ Show more
15
+ </button>
16
+ </div>
17
+ );
18
+ }
@@ -4,7 +4,7 @@ export default function Table() {
4
4
  <table>
5
5
  <thead>
6
6
  <tr>
7
- <th>Nome</th>
7
+ <th>Name</th>
8
8
  <th>Stato</th>
9
9
  <th>Data</th>
10
10
  </tr>
@@ -13,7 +13,7 @@ export default function Table() {
13
13
  <tbody>
14
14
  <tr>
15
15
  <td>Elemento uno</td>
16
- <td>Attivo</td>
16
+ <td>Active</td>
17
17
  <td>2026-01-01</td>
18
18
  </tr>
19
19
  <tr>
@@ -1,7 +1,7 @@
1
1
  export default function Tooltip() {
2
2
  return (
3
3
  <span pgs="dropdown tooltip">
4
- <button pgs="dropdown-button buttonMini tooltip-button" title="open-tooltip" type="button">
4
+ <button pgs="dropdown-button button tooltip-button" pgs-option="buttonMini" title="open-tooltip" type="button">
5
5
  <i className="fa-solid fa-info"></i>
6
6
  </button>
7
7
  <div pgs="dropdown-content tooltip-content">
@@ -4,7 +4,7 @@ function Aside() {
4
4
  return (
5
5
  <aside pgs="pageShell-aside">
6
6
  <div pgs="pageShell-aside-scroll">
7
- <div pgs="flexColumnTexts">
7
+ <div pgs="flexColumn">
8
8
  <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ab modi ut sunt est illum accusantium dolores eum aut cum itaque.</p>
9
9
  </div>
10
10
  </div>
@@ -15,7 +15,7 @@ function Aside() {
15
15
  function MainContent() {
16
16
  return (
17
17
  <main pgs="pageShell-content">
18
- <section pgs="flexColumnElements" id="sezione-uno">
18
+ <section pgs="flexColumn gapElements" id="sezione-uno">
19
19
  <strong>Lorem ipsum</strong>
20
20
  <p>{contentText}</p>
21
21
  </section>
@@ -0,0 +1,61 @@
1
+ const flexColumns = [
2
+ ["Column one", "First flex column."],
3
+ ["Column two", "Second flex column."],
4
+ ["Column three", "Third flex column."],
5
+ ];
6
+
7
+ const gridColumns = [
8
+ ["Column one", "First grid column."],
9
+ ["Column two", "Second grid column."],
10
+ ["Column three", "Third grid column."],
11
+ ["Column four", "Fourth grid column."],
12
+ ];
13
+
14
+ function Column({ title, text }) {
15
+ return (
16
+ <article pgs="box flexColumn">
17
+ <strong>{title}</strong>
18
+ <p>{text}</p>
19
+ </article>
20
+ );
21
+ }
22
+
23
+ export default function Responsive() {
24
+ return (
25
+ <div pgs="flexColumn gapSections">
26
+ <section>
27
+ <strong>Flex</strong>
28
+ <div pgs="flexRow" pgs-option="column-2 m2e">
29
+ {flexColumns.map(([title, text]) => (
30
+ <Column key={title} title={title} text={text} />
31
+ ))}
32
+ </div>
33
+ </section>
34
+
35
+ <section>
36
+ <strong>Grid</strong>
37
+ <div pgs="grid" pgs-option="column-4 m2e">
38
+ {gridColumns.map(([title, text]) => (
39
+ <Column key={title} title={title} text={text} />
40
+ ))}
41
+ </div>
42
+ </section>
43
+
44
+ <section pgs="flexRow">
45
+ <strong>Gap</strong>
46
+ <div pgs="flexRow gapTexts wrap">
47
+ <span pgs="box">Text gap</span>
48
+ <span pgs="box">Text gap</span>
49
+ </div>
50
+ <div pgs="flexRow gapElements wrap">
51
+ <span pgs="box">Element gap</span>
52
+ <span pgs="box">Element gap</span>
53
+ </div>
54
+ <div pgs="flexRow gapSections nowrap">
55
+ <span pgs="box">Section gap</span>
56
+ <span pgs="box">Section gap</span>
57
+ </div>
58
+ </section>
59
+ </div>
60
+ );
61
+ }
@@ -0,0 +1,44 @@
1
+ export default function Section() {
2
+ return (
3
+ <div pgs="flexColumn gapSections">
4
+ <section pgs="section flexColumn gapElements">
5
+ <div pgs="container flexColumn">
6
+ <strong>Standard section</strong>
7
+ <p>Centered content inside a MyPGS section.</p>
8
+ </div>
9
+ </section>
10
+
11
+ <section pgs="sectionFull flexColumn gapElements">
12
+ <div pgs="container flexColumn">
13
+ <strong>Full-width section</strong>
14
+ <p>Centered content inside a MyPGS section.</p>
15
+ </div>
16
+ </section>
17
+
18
+ <section pgs="sectionSpecificity flexColumn gapElements">
19
+ <div pgs="container flexColumn">
20
+ <strong>Specificity section</strong>
21
+ <p>Centered content inside a MyPGS section.</p>
22
+ </div>
23
+ <div pgs="sectionSpecificity-child container flexColumn">
24
+ <strong>Specificity-child section</strong>
25
+ <p>Centered content inside a MyPGS section.</p>
26
+ </div>
27
+ </section>
28
+
29
+ <section pgs="sectionMax flexColumn gapElements" style={{ backgroundColor: "var(--color-primary-soft)" }}>
30
+ <div pgs="container flexColumn">
31
+ <strong>Max-width section</strong>
32
+ <p>Centered content inside a MyPGS section.</p>
33
+ </div>
34
+ </section>
35
+
36
+ <section pgs="sectionNoPadding flexColumn gapElements">
37
+ <div pgs="container flexColumn">
38
+ <strong>No-padding section</strong>
39
+ <p>Centered content inside a MyPGS section.</p>
40
+ </div>
41
+ </section>
42
+ </div>
43
+ );
44
+ }
@@ -8,11 +8,11 @@ export default function CookieConsent({
8
8
 
9
9
  return (
10
10
  <div id="cookieConsent" pgs="cookieConsent" role="dialog" aria-modal="true" data-ga-id={gaMeasurementId} hidden tabIndex="-1">
11
- <p><i className="fa-duotone fa-solid fa-cookie-bite"></i> Cookie e privacy <br /></p>
11
+ <p><i className="fa-duotone fa-solid fa-cookie-bite"></i> Cookies and privacy <br /></p>
12
12
  <h2>La tua privacy prima di tutto</h2>
13
13
 
14
14
  <p>
15
- Utilizziamo cookie tecnici per offrire il servizio e, previo consenso, cookie analitici di
15
+ We use essential cookies to provide the service and, with your consent, analytics cookies from
16
16
  <strong>Google Analytics</strong> per misurare in modo anonimo il traffico e migliorare i contenuti.
17
17
  Puoi modificare la scelta in qualsiasi momento.
18
18
  </p>
@@ -22,17 +22,17 @@ export default function CookieConsent({
22
22
  <a href={cookiePolicyUrl} target="_blank" rel="noopener noreferrer">Cookie Policy</a>
23
23
  </p>
24
24
 
25
- <div pgs="cookieConsent-panel flexColumn" role="group" aria-label="Preferenze cookie">
25
+ <div pgs="cookieConsent-panel flexColumn" role="group" aria-label="Cookie preferences">
26
26
  <div pgs="flexRow nowrap cookieConsent-featureEssential">
27
27
  <div>
28
28
  <p>
29
29
  <strong>Cookie tecnici</strong>
30
30
  <br />
31
- <small>Sempre attivi per garantire il corretto funzionamento del sito.</small>
31
+ <small>Always active to ensure the website works correctly.</small>
32
32
  </p>
33
33
  </div>
34
34
 
35
- <span pgs="cookieConsent-panel-badge">Attivi</span>
35
+ <span pgs="cookieConsent-panel-badge">Active</span>
36
36
  </div>
37
37
 
38
38
  <div pgs="flexRow cookieConsent-featureAnalytics">
@@ -40,7 +40,7 @@ export default function CookieConsent({
40
40
  <p>
41
41
  <strong>Analytics</strong>
42
42
  <br />
43
- <small>Dati di navigazione raccolti in forma aggregata per statistiche anonime.</small>
43
+ <small>Browsing data collected in aggregate form for anonymous statistics.</small>
44
44
  </p>
45
45
 
46
46
  <input type="checkbox" pgs="cookieConsent-toggleAnalytics" aria-label="Abilita Google Analytics" />
@@ -50,11 +50,11 @@ export default function CookieConsent({
50
50
 
51
51
  <div pgs="flexRow">
52
52
  <button type="button" pgs="button cookieConsent-actionReject">
53
- <i className="fa-solid fa-duotone fa-sliders"></i>Solo selezionati
53
+ <i className="fa-solid fa-duotone fa-sliders"></i>Selected only
54
54
  </button>
55
55
 
56
- <button type="button" pgs="buttonStrong cookieConsent-actionAccept">
57
- <i className="fa-solid fa-check"></i> Accetta tutto
56
+ <button type="button" pgs="button cookieConsent-actionAccept" pgs-option="buttonStrong">
57
+ <i className="fa-solid fa-check"></i> Accept all
58
58
  </button>
59
59
  </div>
60
60
  </div>
@@ -1,12 +1,12 @@
1
1
  export default function Footer() {
2
2
  return (
3
3
  <footer pgs="footer">
4
- <button pgs="button toggleDarkmode" type="button" aria-label="Cambia tema">
4
+ <button pgs="button toggleDarkmode" type="button" aria-label="Change theme">
5
5
  <i className="fa-solid fa-moon"></i>
6
6
  </button>
7
7
 
8
8
  <section pgs="footer-top section">
9
- <div pgs="footer-top-content flex-3">
9
+ <div pgs="footer-top-content flexRow" pgs-option="column-3">
10
10
  <div pgs="footer-brand">
11
11
  <a aria-label="Logo" pgs="logo" href="/">
12
12
  <span pgs="logo-text">MyPGS</span>
@@ -28,11 +28,11 @@ export default function Footer() {
28
28
 
29
29
  <section pgs="footer-legal section">
30
30
  <div pgs="footer-legal-content">
31
- <button type="button" pgs="button cookieConsent-actionOpen">Preferenze cookie</button>
31
+ <button type="button" pgs="button cookieConsent-actionOpen">Cookie preferences</button>
32
32
  <p><a href="">Privacy Policy</a></p>
33
33
  <p><a href="">Cookie Policy</a></p>
34
34
  <p><a href="">Termini e Condizioni</a></p>
35
- <p>© 2026 MyPgs. Nessun diritto riservato.</p>
35
+ <p>© 2026 MyPgs. No rights reserved.</p>
36
36
  </div>
37
37
  </section>
38
38
  </footer>
@@ -30,7 +30,7 @@ export default function Header() {
30
30
  </div>
31
31
 
32
32
  <div pgs="header-element-onlyDesktop">
33
- <nav pgs="menu" pgs-option="horizontal menuHeader" aria-label="Menu principale">
33
+ <nav pgs="menu" pgs-option="horizontal menuHeader" aria-label="Main menu">
34
34
  <ul>
35
35
  <li><a href="/">Home</a></li>
36
36
  <li><a href="#componenti">Componenti</a></li>
@@ -42,17 +42,17 @@ export default function Header() {
42
42
  <div pgs="header-element-onlyMobile"></div>
43
43
 
44
44
  <div pgs="header-element-alwaysOnLast">
45
- <button pgs="buttonIcon toggleDarkmode" type="button" aria-label="Cambia tema">
45
+ <button pgs="button toggleDarkmode" pgs-option="buttonIcon" type="button" aria-label="Change theme">
46
46
  <i className="fa-solid fa-moon"></i>
47
47
  </button>
48
48
  </div>
49
49
 
50
50
  <div pgs="header-element-hamburger modal" pgs-option="containerPGS[header] ">
51
- <button pgs="buttonIcon modal-button modal-close header-element-hamburger-button" type="button"></button>
51
+ <button pgs="button modal-button modal-close header-element-hamburger-button" pgs-option="buttonIcon" type="button"></button>
52
52
 
53
53
  <dialog pgs="modal-dialog" pgs-option="right">
54
54
  <div pgs="modal-dialog-content">
55
- <nav pgs="menu" pgs-option="vertical menuHeader" aria-label="Menu mobile">
55
+ <nav pgs="menu" pgs-option="vertical menuHeader" aria-label="Mobile menu">
56
56
  <ul>
57
57
  <li><a href="/">Home</a></li>
58
58
  <li><a href="#componenti">Componenti</a></li>
@@ -6,7 +6,7 @@ const fs = require("fs");
6
6
  const path = require("path");
7
7
 
8
8
  const PROJECT_ROOT = path.resolve(__dirname, "..");
9
- const TEMPLATE_ROOT = path.join(PROJECT_ROOT, "templates", "html");
9
+ const REFERENCE_ROOT = path.join(PROJECT_ROOT, "reference", "html");
10
10
  const DOCS_ROOT = path.join(PROJECT_ROOT, "docs");
11
11
  const MANAGED_DOC_DIRECTORIES = ["components", "layout", "patterns"]
12
12
  .map(directory => path.join(DOCS_ROOT, directory));
@@ -18,7 +18,7 @@ const SOURCE_ROOTS = [
18
18
  const TAG_ORDER = ["title", "description", "pgs", "pgs-option", "pgs-state", "api", "related", "return"];
19
19
  const LIST_TAGS = new Set(["pgs", "pgs-option", "pgs-state", "api", "related"]);
20
20
  const REQUIRED_TAGS = ["title", "description", "pgs"];
21
- const GENERATED_MARKER = /^<!-- File generato automaticamente da (templates\/html\/.+\.html)\. Modificare \1 e rieseguire npm run docs:generate\. -->$/;
21
+ const GENERATED_MARKER = /^<!-- (?:Automatically generated from ((?:reference|templates)\/html\/.+\.html)\. Edit \1 and run npm run docs:generate again\.|File generato automaticamente da ((?:reference|templates)\/html\/.+\.html)\. Modificare \2 e rieseguire npm run docs:generate\.) -->$/;
22
22
 
23
23
  function toPosix(value) {
24
24
  return value.split(path.sep).join("/");
@@ -29,7 +29,7 @@ function relativeToProject(value) {
29
29
  }
30
30
 
31
31
  function getOutputPath(template) {
32
- const relativeTemplate = path.relative(TEMPLATE_ROOT, template);
32
+ const relativeTemplate = path.relative(REFERENCE_ROOT, template);
33
33
  return path.join(DOCS_ROOT, relativeTemplate.replace(/\.html$/i, ".md"));
34
34
  }
35
35
 
@@ -441,14 +441,14 @@ function renderList(items) {
441
441
 
442
442
  function renderMarkdown(template, documentation, markup) {
443
443
  const relativeTemplate = relativeToProject(template);
444
- const marker = `<!-- File generato automaticamente da ${relativeTemplate}. Modificare ${relativeTemplate} e rieseguire npm run docs:generate. -->`;
444
+ const marker = `<!-- Automatically generated from ${relativeTemplate}. Edit ${relativeTemplate} and run npm run docs:generate again. -->`;
445
445
  const sections = [marker, "", `# ${documentation.title}`, "", documentation.description];
446
446
  const sectionMap = [
447
447
  ["PGS", documentation.pgs],
448
448
  ["PGS Options", documentation["pgs-option"]],
449
449
  ["PGS States", documentation["pgs-state"]],
450
- ["API JavaScript", documentation.api],
451
- ["Elementi correlati", documentation.related],
450
+ ["JavaScript API", documentation.api],
451
+ ["Related elements", documentation.related],
452
452
  ];
453
453
 
454
454
  sectionMap.forEach(([title, items]) => {
@@ -460,7 +460,7 @@ function renderMarkdown(template, documentation, markup) {
460
460
 
461
461
  const runs = [...markup.matchAll(/`+/g)].map(match => match[0].length);
462
462
  const fence = "`".repeat(Math.max(3, (runs.length ? Math.max(...runs) : 0) + 1));
463
- sections.push("", "## Esempio", "", `${fence}html`, markup, fence, "");
463
+ sections.push("", "## Example", "", `${fence}html`, markup, fence, "");
464
464
  return sections.join("\n");
465
465
  }
466
466
 
@@ -477,11 +477,11 @@ function printErrors(errors) {
477
477
  }
478
478
 
479
479
  function main() {
480
- const templates = walkFiles(TEMPLATE_ROOT, file => path.extname(file).toLowerCase() === ".html");
480
+ const references = walkFiles(REFERENCE_ROOT, file => path.extname(file).toLowerCase() === ".html");
481
481
  const errors = [];
482
482
  const outputPaths = new Map();
483
483
 
484
- templates.forEach(template => {
484
+ references.forEach(template => {
485
485
  const output = toPosix(path.relative(DOCS_ROOT, getOutputPath(template))).toLowerCase();
486
486
  if (!outputPaths.has(output)) outputPaths.set(output, []);
487
487
  outputPaths.get(output).push(template);
@@ -493,7 +493,7 @@ function main() {
493
493
 
494
494
  const sources = loadSources();
495
495
  const allSourceContent = sources.map(source => source.content).join("\n");
496
- const parsedTemplates = templates.map(template => {
496
+ const parsedReferences = references.map(template => {
497
497
  const source = fs.readFileSync(template, "utf8");
498
498
  const parsed = parseDocumentationBlock(template, source);
499
499
  errors.push(...validateTemplate(template, parsed, sources, allSourceContent));
@@ -509,7 +509,7 @@ function main() {
509
509
  const expected = new Set();
510
510
  const counts = { created: 0, updated: 0, unchanged: 0, removed: 0 };
511
511
 
512
- parsedTemplates.forEach(({ template, parsed }) => {
512
+ parsedReferences.forEach(({ template, parsed }) => {
513
513
  const output = getOutputPath(template);
514
514
  const content = renderMarkdown(template, parsed.data, parsed.markup);
515
515
  expected.add(path.resolve(output));
@@ -546,7 +546,7 @@ function main() {
546
546
  });
547
547
 
548
548
  console.log("");
549
- console.log(`Riepilogo: ${templates.length} template validati; ${counts.created} creati; ${counts.updated} aggiornati; ${counts.unchanged} invariati; ${counts.removed} obsoleti rimossi.`);
549
+ console.log(`Riepilogo: ${references.length} riferimenti HTML validati; ${counts.created} creati; ${counts.updated} aggiornati; ${counts.unchanged} invariati; ${counts.removed} obsoleti rimossi.`);
550
550
  }
551
551
 
552
552
  try {
@@ -1,49 +0,0 @@
1
- @use "../mixin/mixin" as *;
2
-
3
-
4
- //= FLEX
5
-
6
- //== FLEX COLUMN
7
- [pgs~=flexColumn] {
8
- @include flexColumn();
9
- }
10
-
11
- [pgs~=flexColumnTexts] {
12
- @include flexColumn();
13
- }
14
-
15
- [pgs~=flexColumnElements] {
16
- @include flexColumnElements();
17
- }
18
-
19
- [pgs~=flexColumnSections] {
20
- @include flexColumnSections();
21
- }
22
-
23
- //== FLEX ROW
24
- [pgs~=flexRow] {
25
- @include flexRow();
26
- }
27
-
28
- [pgs~=flexRowTexts] {
29
- @include flexRow();
30
- }
31
-
32
- [pgs~=flexRowElements] {
33
- @include flexRowElements();
34
- }
35
-
36
- [pgs~=flexRowSection] {
37
- @include flexRowSection();
38
- }
39
-
40
- //== responsive flex
41
- @for $i from 1 through 10 {
42
- [pgs~=flex-#{$i}] {
43
- @include rFlex($i);
44
- }
45
-
46
- [pgs~=flex-#{$i}-m2e] {
47
- @include rFlex($i, true);
48
- }
49
- }
@@ -1,21 +0,0 @@
1
- //# GAP
2
- [pgs~=gapTexts] {
3
- gap: var(--gap-texts);
4
- }
5
-
6
- [pgs~=gapElements] {
7
- gap: var(--gap-elements);
8
- }
9
-
10
- [pgs~=gapSections] {
11
- gap: var(--gap-sections);
12
- }
13
-
14
- //# wrap
15
- [pgs~=nowrap] {
16
- flex-wrap: nowrap;
17
- }
18
-
19
- [pgs~=wrap] {
20
- flex-wrap: wrap;
21
- }
@@ -1,13 +0,0 @@
1
- @use "../mixin/mixin" as *;
2
-
3
- //== GRID
4
- @for $i from 1 through 10 {
5
- [pgs~=grid-#{$i}] {
6
- @include rGrid($i);
7
- }
8
-
9
- [pgs~=grid-#{$i}-m2e] {
10
- @include rGrid($i, true);
11
- }
12
- }
13
-