mypgs 2.1.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 (135) hide show
  1. package/.vscode/tasks.json +39 -0
  2. package/AGENTS.md +22 -21
  3. package/README.md +2 -2
  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 -7
  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 +27 -19
  15. package/assets/scss/components/_card.scss +9 -4
  16. package/assets/scss/components/_formAddon.scss +5 -1
  17. package/assets/scss/components/_logo.scss +3 -4
  18. package/assets/scss/components/_menu.scss +26 -3
  19. package/assets/scss/components/_modals.scss +2 -2
  20. package/assets/scss/components/_stepTabs.scss +2 -1
  21. package/assets/scss/index.scss +2 -3
  22. package/assets/scss/layout/_header.scss +3 -3
  23. package/assets/scss/layout/_responsive.scss +63 -0
  24. package/assets/scss/mixin/_mx-base.scss +4 -8
  25. package/assets/scss/mixin/_mx-button.scss +74 -70
  26. package/assets/scss/mixin/_mx-card.scss +33 -36
  27. package/assets/scss/mixin/_mx-form.scss +10 -5
  28. package/assets/scss/mixin/_mx-formAddon.scss +100 -58
  29. package/assets/scss/mixin/_mx-hover.scss +21 -15
  30. package/assets/scss/mixin/_mx-responsive.scss +81 -201
  31. package/demo/demo.css +9 -6
  32. package/demo/demo.html +7 -5
  33. package/demo/demo.js +34 -32
  34. package/dist/css/index.css +2502 -3507
  35. package/dist/css/index.css.map +1 -1
  36. package/dist/css/index.min.css +1 -1
  37. package/dist/javascript/index.js +7 -5
  38. package/dist/javascript/index.js.map +1 -1
  39. package/dist/javascript/index.min.js +1 -1
  40. package/docs/componenti-e-markup.md +5 -5
  41. package/docs/components/accordion.md +3 -3
  42. package/docs/components/alerts.md +67 -0
  43. package/docs/components/badges.md +11 -8
  44. package/docs/components/breadcumbs.md +1 -1
  45. package/docs/components/button.md +9 -9
  46. package/docs/components/card.md +9 -6
  47. package/docs/components/dropdown.md +1 -1
  48. package/docs/components/form.md +6 -5
  49. package/docs/components/formAddon.md +56 -19
  50. package/docs/components/logo.md +1 -1
  51. package/docs/components/menu.md +2 -2
  52. package/docs/components/modal.md +7 -6
  53. package/docs/components/notification.md +2 -2
  54. package/docs/components/search.md +8 -7
  55. package/docs/components/slides.md +5 -6
  56. package/docs/components/stepTabs.md +7 -7
  57. package/docs/components/steps.md +1 -1
  58. package/docs/components/summary.md +1 -1
  59. package/docs/components/table.md +1 -1
  60. package/docs/components/tooltip.md +4 -3
  61. package/docs/convenzioni.md +1 -1
  62. package/docs/export-e-sviluppo.md +1 -1
  63. package/docs/helper-javascript.md +1 -1
  64. package/docs/layout/body.md +1 -1
  65. package/docs/layout/footer.md +7 -3
  66. package/docs/layout/header.md +5 -4
  67. package/docs/layout/pageShell.md +11 -11
  68. package/docs/layout/responsive.md +90 -0
  69. package/docs/layout/section.md +16 -16
  70. package/docs/patterns/cookieConsent.md +6 -3
  71. package/docs/utilizzo-css-scss.md +26 -2
  72. package/package.json +1 -1
  73. package/{templates → reference}/html/components/accordion.html +2 -2
  74. package/reference/html/components/alerts.html +59 -0
  75. package/{templates → reference}/html/components/badges.html +9 -7
  76. package/{templates → reference}/html/components/button.html +7 -7
  77. package/{templates → reference}/html/components/card.html +7 -5
  78. package/{templates → reference}/html/components/form.html +5 -4
  79. package/reference/html/components/formAddon.html +109 -0
  80. package/{templates → reference}/html/components/menu.html +2 -2
  81. package/{templates → reference}/html/components/modal.html +6 -5
  82. package/{templates → reference}/html/components/notification.html +2 -2
  83. package/{templates → reference}/html/components/search.html +7 -6
  84. package/{templates → reference}/html/components/slides.html +4 -5
  85. package/{templates → reference}/html/components/stepTabs.html +6 -6
  86. package/{templates → reference}/html/components/tooltip.html +3 -2
  87. package/{templates → reference}/html/layout/footer.html +5 -2
  88. package/{templates → reference}/html/layout/header.html +4 -3
  89. package/{templates → reference}/html/layout/pageShell.html +10 -10
  90. package/reference/html/layout/responsive.html +83 -0
  91. package/{templates → reference}/html/layout/section.html +15 -15
  92. package/{templates → reference}/html/patterns/cookieConsent.html +4 -2
  93. package/{templates → reference}/react/components/accordion.jsx +1 -1
  94. package/reference/react/components/alerts.jsx +46 -0
  95. package/{templates → reference}/react/components/button.jsx +4 -4
  96. package/{templates → reference}/react/components/card.jsx +2 -2
  97. package/{templates → reference}/react/components/form.jsx +1 -1
  98. package/{templates → reference}/react/components/modal.jsx +2 -2
  99. package/{templates → reference}/react/components/search.jsx +4 -4
  100. package/{templates → reference}/react/components/slides.jsx +1 -1
  101. package/{templates → reference}/react/components/stepTabs.jsx +4 -4
  102. package/{templates → reference}/react/components/tooltip.jsx +1 -1
  103. package/{templates → reference}/react/layout/pageShell.jsx +2 -2
  104. package/reference/react/layout/responsive.jsx +61 -0
  105. package/{templates → reference}/react/layout/section.jsx +12 -12
  106. package/{templates → reference}/react/patterns/cookieConsent.jsx +1 -1
  107. package/{templates → reference}/react/patterns/footer.jsx +1 -1
  108. package/{templates → reference}/react/patterns/header.jsx +2 -2
  109. package/scripts/generate-component-docs.js +8 -8
  110. package/assets/scss/layout/_flex.scss +0 -49
  111. package/assets/scss/layout/_gap.scss +0 -21
  112. package/assets/scss/layout/_grid.scss +0 -13
  113. package/docs/layout/flex.md +0 -116
  114. package/docs/layout/grid.md +0 -116
  115. package/templates/html/components/formAddon.html +0 -72
  116. package/templates/html/layout/flex.html +0 -109
  117. package/templates/html/layout/grid.html +0 -109
  118. package/templates/react/layout/flex.jsx +0 -36
  119. package/templates/react/layout/grid.jsx +0 -36
  120. /package/{templates → reference}/html/components/breadcumbs.html +0 -0
  121. /package/{templates → reference}/html/components/dropdown.html +0 -0
  122. /package/{templates → reference}/html/components/logo.html +0 -0
  123. /package/{templates → reference}/html/components/steps.html +0 -0
  124. /package/{templates → reference}/html/components/summary.html +0 -0
  125. /package/{templates → reference}/html/components/table.html +0 -0
  126. /package/{templates → reference}/html/layout/body.html +0 -0
  127. /package/{templates → reference}/react/components/breadcumbs.jsx +0 -0
  128. /package/{templates → reference}/react/components/dropdown.jsx +0 -0
  129. /package/{templates → reference}/react/components/logo.jsx +0 -0
  130. /package/{templates → reference}/react/components/menu.jsx +0 -0
  131. /package/{templates → reference}/react/components/notification.jsx +0 -0
  132. /package/{templates → reference}/react/components/steps.jsx +0 -0
  133. /package/{templates → reference}/react/components/summary.jsx +0 -0
  134. /package/{templates → reference}/react/components/table.jsx +0 -0
  135. /package/{templates → reference}/react/layout/body.jsx +0 -0
@@ -13,6 +13,7 @@
13
13
  * @pgs-option
14
14
  * - toast: identifies the toast element used by Notification.
15
15
  * - notification: identifies the notification element used by Notification.
16
+ * - buttonClose: styles the dismiss action generated at runtime.
16
17
  *
17
18
  * @pgs-state
18
19
  * - success: identifies the success element used by Notification.
@@ -35,7 +36,6 @@
35
36
  *
36
37
  * @related
37
38
  * - hidden: uses the related hidden component or utility in this example.
38
- * - buttonClose: uses the related buttonClose component or utility in this example.
39
39
  *
40
40
  * @return Complete HTML markup and usage example for Notification.
41
41
  */
@@ -68,4 +68,4 @@
68
68
  pgs="hidden notificationTrigger"
69
69
  pgs-option='notification[{"title":"Title","message":"Message","element":"notification","type":"info","icon":"<i class=\"fa-solid fa-rocket\"></i>","duration":"4000","link":"/page/"}]'>
70
70
  </div>
71
- -->
71
+ -->
@@ -12,6 +12,8 @@
12
12
  *
13
13
  * @pgs-option
14
14
  * - containerPGS: identifies the containerPGS element used by Search.
15
+ * - buttonNohover: disables hover behavior on the search container.
16
+ * - buttonIcon: presents search and close actions as icon buttons.
15
17
  *
16
18
  * @pgs-state
17
19
  * - open: identifies the open element used by Search.
@@ -38,11 +40,10 @@
38
40
  * - instance.setActiveIndex(index): provides the documented operation through the component public API.
39
41
  *
40
42
  * @related
41
- * - buttonNohover: uses the related buttonNohover component or utility in this example.
43
+ * - button: provides the base styling for search controls.
42
44
  * - modal: uses the related modal component or utility in this example.
43
45
  * - modal-button: uses the related modal-button component or utility in this example.
44
46
  * - modal-close: uses the related modal-close component or utility in this example.
45
- * - buttonIcon: uses the related buttonIcon component or utility in this example.
46
47
  * - flexRow: uses the related flexRow component or utility in this example.
47
48
  * - section: uses the related section component or utility in this example.
48
49
  *
@@ -50,7 +51,7 @@
50
51
  */
51
52
  -->
52
53
 
53
- <form pgs="buttonNohover search" autocomplete="off" action="" method="get">
54
+ <form pgs="button search" pgs-option="buttonNohover" autocomplete="off" action="" method="get">
54
55
  <button type="submit" title="Search"><i class="fa-solid fa-search"></i></button>
55
56
  <input type="search" name="s" placeholder="Search" value="">
56
57
  <ul pgs="search-suggestions"></ul>
@@ -58,14 +59,14 @@
58
59
 
59
60
  <div pgs="modal search-modal" pgs-option="containerPGS[header]">
60
61
 
61
- <button type="button" pgs="modal-button buttonIcon" title="Search">
62
+ <button type="button" pgs="modal-button button" pgs-option="buttonIcon" title="Search">
62
63
  <i class="fa-solid fa-search"></i>
63
64
  </button>
64
65
 
65
66
  <dialog>
66
67
  <div pgs="flexRow section search-mobile">
67
68
 
68
- <form pgs="buttonNohover search" autocomplete="off" action="/" method="get">
69
+ <form pgs="button search" pgs-option="buttonNohover" autocomplete="off" action="/" method="get">
69
70
  <button type="submit" title="Search">
70
71
  <i class="fa-solid fa-search"></i>
71
72
  </button>
@@ -73,7 +74,7 @@
73
74
  <input type="search" name="s" placeholder="Search" value="">
74
75
  <ul pgs="search-suggestions"></ul>
75
76
 
76
- <button type="button" pgs="modal-close buttonIcon">
77
+ <button type="button" pgs="modal-close button" pgs-option="buttonIcon">
77
78
  <i class="fa-solid fa-close"></i>
78
79
  </button>
79
80
  </form>
@@ -15,6 +15,7 @@
15
15
  * - shadowDesktop: identifies the shadowDesktop element used by Slides.
16
16
  * - notScrollAnimation: identifies the notScrollAnimation element used by Slides.
17
17
  * - notScrollWithMouse: identifies the notScrollWithMouse element used by Slides.
18
+ * - buttonIcon: styles the previous and next actions generated at runtime.
18
19
  *
19
20
  * @api
20
21
  * - pgs.slides.init(root): initializes matching elements within the specified root.
@@ -34,8 +35,6 @@
34
35
  * - card-img: uses the related card-img component or utility in this example.
35
36
  * - imgCover: uses the related imgCover component or utility in this example.
36
37
  * - flexColumn: uses the related flexColumn component or utility in this example.
37
- * - flexColumnTexts: uses the related flexColumnTexts component or utility in this example.
38
- * - buttonIcon: uses the related buttonIcon component or utility in this example.
39
38
  *
40
39
  * @return Complete HTML markup and usage example for Slides.
41
40
  */
@@ -46,7 +45,7 @@
46
45
  <li>
47
46
  <article pgs="card flexColumn">
48
47
  <img pgs="card-img imgCover" src="https://placehold.co/800x500?text=Slide+1" alt="Slide 1">
49
- <div pgs="flexColumnTexts">
48
+ <div pgs="flexColumn">
50
49
  <h3>Slide uno</h3>
51
50
  <p>First slide content.</p>
52
51
  </div>
@@ -56,7 +55,7 @@
56
55
  <li>
57
56
  <article pgs="card flexColumn">
58
57
  <img pgs="card-img imgCover" src="https://placehold.co/800x500?text=Slide+2" alt="Slide 2">
59
- <div pgs="flexColumnTexts">
58
+ <div pgs="flexColumn">
60
59
  <h3>Slide due</h3>
61
60
  <p>Second slide content.</p>
62
61
  </div>
@@ -66,7 +65,7 @@
66
65
  <li>
67
66
  <article pgs="card flexColumn">
68
67
  <img pgs="card-img imgCover" src="https://placehold.co/800x500?text=Slide+3" alt="Slide 3">
69
- <div pgs="flexColumnTexts">
68
+ <div pgs="flexColumn">
70
69
  <h3>Slide tre</h3>
71
70
  <p>Third slide content.</p>
72
71
  </div>
@@ -36,8 +36,8 @@
36
36
  * - instance.getState(): provides the documented operation through the component public API.
37
37
  *
38
38
  * @related
39
- * - flexColumnElements: uses the related flexColumnElements component or utility in this example.
40
- * - flexColumnTexts: uses the related flexColumnTexts component or utility in this example.
39
+ * - flexColumn: uses the related flexColumn component or utility in this example.
40
+ * - gapElements: applies element spacing to the step tab container.
41
41
  * - flexRow: uses the related flexRow component or utility in this example.
42
42
  * - button: uses the related button component or utility in this example.
43
43
  *
@@ -45,21 +45,21 @@
45
45
  */
46
46
  -->
47
47
 
48
- <div pgs="stepTabs flexColumnElements">
48
+ <div pgs="stepTabs flexColumn gapElements">
49
49
  <div pgs="stepTabs-dots" aria-label="Avanzamento"></div>
50
50
 
51
51
  <div pgs="stepTabs-container">
52
- <section pgs="tab flexColumnTexts" tabindex="-1" pgs-option="tabIcon[fa-user]">
52
+ <section pgs="tab flexColumn" tabindex="-1" pgs-option="tabIcon[fa-user]">
53
53
  <h3>Personal details</h3>
54
54
  <p>First tab content.</p>
55
55
  </section>
56
56
 
57
- <section pgs="tab flexColumnTexts" tabindex="-1" pgs-option="tabIcon[fa-list-check]">
57
+ <section pgs="tab flexColumn" tabindex="-1" pgs-option="tabIcon[fa-list-check]">
58
58
  <h3>Preferences</h3>
59
59
  <p>Second tab content.</p>
60
60
  </section>
61
61
 
62
- <section pgs="tab flexColumnTexts" tabindex="-1" pgs-option="tabIcon[fa-check]">
62
+ <section pgs="tab flexColumn" tabindex="-1" pgs-option="tabIcon[fa-check]">
63
63
  <h3>Confirmation</h3>
64
64
  <p>Third tab content.</p>
65
65
  </section>
@@ -10,6 +10,7 @@
10
10
  *
11
11
  * @pgs-option
12
12
  * - position: identifies the position element used by Tooltip.
13
+ * - buttonMini: applies the smallest button variant to the tooltip trigger.
13
14
  *
14
15
  * @pgs-state
15
16
  * - open: identifies the open element used by Tooltip.
@@ -24,17 +25,17 @@
24
25
  * - instance.isOpen(): returns true when the component is open.
25
26
  *
26
27
  * @related
28
+ * - button: provides the base styling for the tooltip trigger.
27
29
  * - dropdown: uses the related dropdown component or utility in this example.
28
30
  * - dropdown-button: uses the related dropdown-button component or utility in this example.
29
31
  * - dropdown-content: uses the related dropdown-content component or utility in this example.
30
- * - buttonMini: uses the related buttonMini component or utility in this example.
31
32
  *
32
33
  * @return Complete HTML markup and usage example for Tooltip.
33
34
  */
34
35
  -->
35
36
 
36
37
  <span pgs="dropdown tooltip">
37
- <button pgs="dropdown-button buttonMini tooltip-button" title="open-tooltip" type="button">
38
+ <button pgs="dropdown-button button tooltip-button" pgs-option="buttonMini" title="open-tooltip" type="button">
38
39
  <i class="fa-solid fa-info"></i>
39
40
  </button>
40
41
  <div pgs="dropdown-content tooltip-content">
@@ -13,11 +13,14 @@
13
13
  * - footer-legal: identifies the lower section dedicated to legal information.
14
14
  * - footer-legal-content: identifies the content of the legal section.
15
15
  *
16
+ * @pgs-option
17
+ * - column-3: configures the footer flex layout with three columns.
18
+ *
16
19
  * @related
17
20
  * - button: presents theme and cookie preference controls as buttons.
18
21
  * - toggleDarkmode: connects the control to the global light or dark theme handler.
19
22
  * - section: applies the shared section structure to the upper and legal areas.
20
- * - flex-3: distributes the upper columns responsively.
23
+ * - flexRow: distributes the upper columns responsively.
21
24
  * - logo: inserts the brand into the footer.
22
25
  * - logo-text: uses the text variant of the logo.
23
26
  * - cookieConsent-actionOpen: opens the Cookie Consent preference panel.
@@ -32,7 +35,7 @@
32
35
  </button>
33
36
 
34
37
  <section pgs="footer-top section">
35
- <div pgs="footer-top-content flex-3">
38
+ <div pgs="footer-top-content flexRow" pgs-option="column-3">
36
39
  <div pgs="footer-brand">
37
40
  <a aria-label="Logo" pgs="logo" href="/">
38
41
  <span pgs="logo-text">MyPGS</span>
@@ -19,15 +19,16 @@
19
19
  * - menuHeader: adapts both menus to the header context.
20
20
  * - containerPGS: uses containerPGS[header] on the modal wrapper to move the dialog into the header.
21
21
  * - right: presents the mobile navigation dialog content from the right side.
22
+ * - buttonIcon: presents theme and hamburger controls as icon buttons.
22
23
  *
23
24
  * @pgs-state
24
25
  * - mobileActive: is applied to header and header-element when their width or the viewport requires mobile navigation.
25
26
  *
26
27
  * @related
28
+ * - button: provides the base styling for header controls.
27
29
  * - logo: inserts the brand into the initial area.
28
30
  * - logo-text: uses the text variant of the logo.
29
31
  * - menu: provides desktop and mobile navigation.
30
- * - buttonIcon: presents theme and hamburger controls as icon buttons.
31
32
  * - toggleDarkmode: connects the control to the global theme handler.
32
33
  * - modal: provides opening and closing behavior for mobile navigation.
33
34
  * - modal-button: opens the mobile panel.
@@ -61,14 +62,14 @@
61
62
  </div>
62
63
 
63
64
  <div pgs="header-element-alwaysOnLast">
64
- <button pgs="buttonIcon toggleDarkmode" type="button" aria-label="Change theme">
65
+ <button pgs="button toggleDarkmode" pgs-option="buttonIcon" type="button" aria-label="Change theme">
65
66
  <i class="fa-solid fa-moon"></i>
66
67
  </button>
67
68
  </div>
68
69
 
69
70
  <div pgs="header-element-hamburger modal" pgs-option="containerPGS[header] ">
70
71
 
71
- <button pgs="buttonIcon modal-button modal-close header-element-hamburger-button" type="button"></button>
72
+ <button pgs="button modal-button modal-close header-element-hamburger-button" pgs-option="buttonIcon" type="button"></button>
72
73
 
73
74
  <dialog pgs="modal-dialog" pgs-option="right">
74
75
  <div pgs="modal-dialog-content">
@@ -10,8 +10,8 @@
10
10
  * - pageShell-content: identifies the main page content.
11
11
  *
12
12
  * @related
13
- * - flexColumnTexts: organizes text contained in the sidebars.
14
- * - flexColumnElements: vertically organizes elements in the main sections.
13
+ * - flexColumn: organizes text contained in the sidebars.
14
+ * - gapElements: applies element spacing in the main sections.
15
15
  *
16
16
  * @return Four page-shell HTML configurations with two, one, or no sidebars.
17
17
  */
@@ -20,14 +20,14 @@
20
20
  <div pgs="pageShell">
21
21
  <aside pgs="pageShell-aside">
22
22
  <div pgs="pageShell-aside-scroll">
23
- <div pgs="flexColumnTexts">
23
+ <div pgs="flexColumn">
24
24
  <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ab modi ut sunt est illum accusantium dolores eum aut cum itaque.</p>
25
25
  </div>
26
26
  </div>
27
27
  </aside>
28
28
 
29
29
  <main pgs="pageShell-content">
30
- <section pgs="flexColumnElements" id="sezione-uno">
30
+ <section pgs="flexColumn gapElements" id="sezione-uno">
31
31
  <strong>Lorem ipsum</strong>
32
32
  <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quidem dolore veniam nulla hic voluptatum harum illo voluptatem quos. Id quibusdam nemo, mollitia iusto quisquam tenetur doloremque corrupti natus nisi est sed consectetur deserunt? Fugiat consectetur iure aut id voluptate unde autem eius facilis dolorum? Eveniet, sit, excepturi iusto porro eos temporibus illum non ut sunt ex aut earum neque. Iure harum similique autem commodi ratione enim quisquam soluta rem, eius dolor officiis necessitatibus voluptatibus obcaecati vel sint iusto. Eligendi reiciendis aut error rem? Hic aliquid tenetur porro itaque quaerat excepturi consequatur veniam, et alias molestiae, eius odio quae maiores suscipit iure voluptatibus sed dolor facere ipsa quod libero necessitatibus, placeat natus. Doloribus esse nobis culpa ab ut dolorem id expedita nesciunt necessitatibus ipsam natus accusantium eius eveniet eum, distinctio quos modi perspiciatis earum sequi nostrum consequatur quibusdam? Blanditiis iusto possimus officia odio animi repudiandae? Repellendus autem ut soluta facere accusamus magni aut architecto cumque cupiditate. Nostrum officiis, tenetur consequuntur quaerat alias animi debitis? Quae quas placeat iure alias totam quaerat fugit recusandae sed, earum ipsa nihil molestiae quam odit itaque, odio asperiores, mollitia porro ratione tempora laboriosam. Incidunt aliquam nobis sunt ut molestiae nam animi placeat neque vero ratione? Eaque?</p>
33
33
  </section>
@@ -35,7 +35,7 @@
35
35
 
36
36
  <aside pgs="pageShell-aside">
37
37
  <div pgs="pageShell-aside-scroll">
38
- <div pgs="flexColumnTexts">
38
+ <div pgs="flexColumn">
39
39
  <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ab modi ut sunt est illum accusantium dolores eum aut cum itaque.</p>
40
40
  </div>
41
41
  </div>
@@ -44,14 +44,14 @@
44
44
  <div pgs="pageShell">
45
45
  <aside pgs="pageShell-aside">
46
46
  <div pgs="pageShell-aside-scroll">
47
- <div pgs="flexColumnTexts">
47
+ <div pgs="flexColumn">
48
48
  <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ab modi ut sunt est illum accusantium dolores eum aut cum itaque.</p>
49
49
  </div>
50
50
  </div>
51
51
  </aside>
52
52
 
53
53
  <main pgs="pageShell-content">
54
- <section pgs="flexColumnElements" id="sezione-uno">
54
+ <section pgs="flexColumn gapElements" id="sezione-uno">
55
55
  <strong>Lorem ipsum</strong>
56
56
  <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quidem dolore veniam nulla hic voluptatum harum illo voluptatem quos. Id quibusdam nemo, mollitia iusto quisquam tenetur doloremque corrupti natus nisi est sed consectetur deserunt? Fugiat consectetur iure aut id voluptate unde autem eius facilis dolorum? Eveniet, sit, excepturi iusto porro eos temporibus illum non ut sunt ex aut earum neque. Iure harum similique autem commodi ratione enim quisquam soluta rem, eius dolor officiis necessitatibus voluptatibus obcaecati vel sint iusto. Eligendi reiciendis aut error rem? Hic aliquid tenetur porro itaque quaerat excepturi consequatur veniam, et alias molestiae, eius odio quae maiores suscipit iure voluptatibus sed dolor facere ipsa quod libero necessitatibus, placeat natus. Doloribus esse nobis culpa ab ut dolorem id expedita nesciunt necessitatibus ipsam natus accusantium eius eveniet eum, distinctio quos modi perspiciatis earum sequi nostrum consequatur quibusdam? Blanditiis iusto possimus officia odio animi repudiandae? Repellendus autem ut soluta facere accusamus magni aut architecto cumque cupiditate. Nostrum officiis, tenetur consequuntur quaerat alias animi debitis? Quae quas placeat iure alias totam quaerat fugit recusandae sed, earum ipsa nihil molestiae quam odit itaque, odio asperiores, mollitia porro ratione tempora laboriosam. Incidunt aliquam nobis sunt ut molestiae nam animi placeat neque vero ratione? Eaque?</p>
57
57
  </section>
@@ -61,7 +61,7 @@
61
61
  <div pgs="pageShell">
62
62
 
63
63
  <main pgs="pageShell-content">
64
- <section pgs="flexColumnElements" id="sezione-uno">
64
+ <section pgs="flexColumn gapElements" id="sezione-uno">
65
65
  <strong>Lorem ipsum</strong>
66
66
  <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quidem dolore veniam nulla hic voluptatum harum illo voluptatem quos. Id quibusdam nemo, mollitia iusto quisquam tenetur doloremque corrupti natus nisi est sed consectetur deserunt? Fugiat consectetur iure aut id voluptate unde autem eius facilis dolorum? Eveniet, sit, excepturi iusto porro eos temporibus illum non ut sunt ex aut earum neque. Iure harum similique autem commodi ratione enim quisquam soluta rem, eius dolor officiis necessitatibus voluptatibus obcaecati vel sint iusto. Eligendi reiciendis aut error rem? Hic aliquid tenetur porro itaque quaerat excepturi consequatur veniam, et alias molestiae, eius odio quae maiores suscipit iure voluptatibus sed dolor facere ipsa quod libero necessitatibus, placeat natus. Doloribus esse nobis culpa ab ut dolorem id expedita nesciunt necessitatibus ipsam natus accusantium eius eveniet eum, distinctio quos modi perspiciatis earum sequi nostrum consequatur quibusdam? Blanditiis iusto possimus officia odio animi repudiandae? Repellendus autem ut soluta facere accusamus magni aut architecto cumque cupiditate. Nostrum officiis, tenetur consequuntur quaerat alias animi debitis? Quae quas placeat iure alias totam quaerat fugit recusandae sed, earum ipsa nihil molestiae quam odit itaque, odio asperiores, mollitia porro ratione tempora laboriosam. Incidunt aliquam nobis sunt ut molestiae nam animi placeat neque vero ratione? Eaque?</p>
67
67
  </section>
@@ -69,7 +69,7 @@
69
69
 
70
70
  <aside pgs="pageShell-aside">
71
71
  <div pgs="pageShell-aside-scroll">
72
- <div pgs="flexColumnTexts">
72
+ <div pgs="flexColumn">
73
73
  <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ab modi ut sunt est illum accusantium dolores eum aut cum itaque.</p>
74
74
  </div>
75
75
  </div>
@@ -79,7 +79,7 @@
79
79
  <div pgs="pageShell">
80
80
 
81
81
  <main pgs="pageShell-content">
82
- <section pgs="flexColumnElements" id="sezione-uno">
82
+ <section pgs="flexColumn gapElements" id="sezione-uno">
83
83
  <strong>Lorem ipsum</strong>
84
84
  <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quidem dolore veniam nulla hic voluptatum harum illo voluptatem quos. Id quibusdam nemo, mollitia iusto quisquam tenetur doloremque corrupti natus nisi est sed consectetur deserunt? Fugiat consectetur iure aut id voluptate unde autem eius facilis dolorum? Eveniet, sit, excepturi iusto porro eos temporibus illum non ut sunt ex aut earum neque. Iure harum similique autem commodi ratione enim quisquam soluta rem, eius dolor officiis necessitatibus voluptatibus obcaecati vel sint iusto. Eligendi reiciendis aut error rem? Hic aliquid tenetur porro itaque quaerat excepturi consequatur veniam, et alias molestiae, eius odio quae maiores suscipit iure voluptatibus sed dolor facere ipsa quod libero necessitatibus, placeat natus. Doloribus esse nobis culpa ab ut dolorem id expedita nesciunt necessitatibus ipsam natus accusantium eius eveniet eum, distinctio quos modi perspiciatis earum sequi nostrum consequatur quibusdam? Blanditiis iusto possimus officia odio animi repudiandae? Repellendus autem ut soluta facere accusamus magni aut architecto cumque cupiditate. Nostrum officiis, tenetur consequuntur quaerat alias animi debitis? Quae quas placeat iure alias totam quaerat fugit recusandae sed, earum ipsa nihil molestiae quam odit itaque, odio asperiores, mollitia porro ratione tempora laboriosam. Incidunt aliquam nobis sunt ut molestiae nam animi placeat neque vero ratione? Eaque?</p>
85
85
  </section>
@@ -0,0 +1,83 @@
1
+ <!--
2
+ /**
3
+ * @title Responsive
4
+ * @description Responsive flex and grid layouts with configurable columns, spacing utilities, and wrapping controls.
5
+ *
6
+ * @pgs
7
+ * - flex: creates a responsive flex layout.
8
+ * - grid: creates a responsive grid layout.
9
+ * - flexColumn: stacks text inside each demonstration cell.
10
+ * - flexRow: arranges the gap demonstration items horizontally.
11
+ * - gapTexts: applies the text spacing token.
12
+ * - gapElements: applies the element spacing token.
13
+ * - gapSections: applies the section spacing token.
14
+ * - wrap: allows flex items to wrap.
15
+ * - nowrap: prevents flex items from wrapping.
16
+ * - box: makes the demonstration cells visible.
17
+ *
18
+ * @pgs-option
19
+ * - column-2: configures the flex example with two columns; column values from 1 through 8 are supported.
20
+ * - column-4: configures the grid example with four columns; column values from 1 through 8 are supported.
21
+ * - m2e: keeps two elements per row at the mobile breakpoint, returning to one column on watch-sized containers.
22
+ *
23
+ * @return Flex, grid, and gap examples in that order, using the current responsive layout API.
24
+ */
25
+ -->
26
+
27
+ <div pgs="flexColumn gapSections">
28
+ <section>
29
+ <strong>Flex</strong>
30
+ <div pgs="flexRow" pgs-option="column-2 m2e">
31
+ <article pgs="box flexColumn">
32
+ <strong>Column one</strong>
33
+ <p>First flex column.</p>
34
+ </article>
35
+ <article pgs="box flexColumn">
36
+ <strong>Column two</strong>
37
+ <p>Second flex column.</p>
38
+ </article>
39
+ <article pgs="box flexColumn">
40
+ <strong>Column three</strong>
41
+ <p>Third flex column.</p>
42
+ </article>
43
+ </div>
44
+ </section>
45
+
46
+ <section>
47
+ <strong>Grid</strong>
48
+ <div pgs="grid" pgs-option="column-4 m2e">
49
+ <article pgs="box flexColumn">
50
+ <strong>Column one</strong>
51
+ <p>First grid column.</p>
52
+ </article>
53
+ <article pgs="box flexColumn">
54
+ <strong>Column two</strong>
55
+ <p>Second grid column.</p>
56
+ </article>
57
+ <article pgs="box flexColumn">
58
+ <strong>Column three</strong>
59
+ <p>Third grid column.</p>
60
+ </article>
61
+ <article pgs="box flexColumn">
62
+ <strong>Column four</strong>
63
+ <p>Third grid column.</p>
64
+ </article>
65
+ </div>
66
+ </section>
67
+
68
+ <section pgs="flexRow">
69
+ <strong>Gap</strong>
70
+ <div pgs="flexRow gapTexts wrap">
71
+ <span pgs="box">Text gap</span>
72
+ <span pgs="box">Text gap</span>
73
+ </div>
74
+ <div pgs="flexRow gapElements wrap">
75
+ <span pgs="box">Element gap</span>
76
+ <span pgs="box">Element gap</span>
77
+ </div>
78
+ <div pgs="flexRow gapSections nowrap">
79
+ <span pgs="box">Section gap</span>
80
+ <span pgs="box">Section gap</span>
81
+ </div>
82
+ </section>
83
+ </div>
@@ -12,9 +12,9 @@
12
12
  * - sectionNoPadding: identifies a section without standard padding.
13
13
  *
14
14
  * @related
15
- * - flexColumnSections: vertically spaces all sections in the example.
16
- * - flexColumnElements: vertically organizes the main elements of each section.
17
- * - flexColumnTexts: organizes and spaces inner content.
15
+ * - flexColumn: vertically organizes sections and inner content.
16
+ * - gapSections: applies section spacing to the outer collection.
17
+ * - gapElements: applies element spacing inside each section.
18
18
  * - card-img: reuses card image treatment in the demonstration sections.
19
19
  * - imgCover: scales images to the section width.
20
20
  *
@@ -22,40 +22,40 @@
22
22
  */
23
23
  -->
24
24
 
25
- <div pgs="flexColumnSections">
26
- <section pgs="section flexColumnElements">
27
- <div pgs="flexColumnTexts">
25
+ <div pgs="flexColumn gapSections">
26
+ <section pgs="section flexColumn gapElements">
27
+ <div pgs="flexColumn">
28
28
  <strong>Standard section</strong>
29
29
  <p>Centered content inside a MyPGS section.</p>
30
30
  </div>
31
31
  </section>
32
32
 
33
- <section pgs="sectionFull flexColumnElements">
34
- <div pgs="flexColumnTexts">
33
+ <section pgs="sectionFull flexColumn gapElements">
34
+ <div pgs="flexColumn">
35
35
  <strong>Full-width section</strong>
36
36
  <p>Centered content inside a MyPGS section.</p>
37
37
  </div>
38
38
  </section>
39
39
 
40
- <section pgs="sectionSpecificity flexColumnElements">
41
- <div pgs="flexColumnTexts">
40
+ <section pgs="sectionSpecificity flexColumn gapElements">
41
+ <div pgs="flexColumn">
42
42
  <img pgs="card-img imgCover" src="https://placehold.co/800x200?text=Hero" alt="Placeholder image">
43
43
  </div>
44
- <div pgs="sectionSpecificity-child flexColumnTexts">
44
+ <div pgs="sectionSpecificity-child flexColumn">
45
45
  <strong>Specificity-child section</strong>
46
46
  <p>Centered content inside a MyPGS section.</p>
47
47
  </div>
48
48
  </section>
49
49
 
50
- <section pgs="sectionMax flexColumnElements" style="background-color: var(--color-primary-soft)">
51
- <div pgs="flexColumnTexts">
50
+ <section pgs="sectionMax flexColumn gapElements" style="background-color: var(--color-primary-soft)">
51
+ <div pgs="flexColumn">
52
52
  <strong>Max-width section</strong>
53
53
  <p>Centered content inside a MyPGS section.</p>
54
54
  </div>
55
55
  </section>
56
56
 
57
- <section pgs="sectionNoPadding flexColumnElements">
58
- <div pgs="flexColumnTexts">
57
+ <section pgs="sectionNoPadding flexColumn gapElements">
58
+ <div pgs="flexColumn">
59
59
  <img pgs="card-img imgCover" src="https://placehold.co/800x500?text=HI!" alt="Placeholder image">
60
60
  </div>
61
61
  </section>
@@ -17,13 +17,15 @@
17
17
  * - cookieConsent-accepted: runtime token applied to the root when analytics is allowed.
18
18
  * - cookieConsent-declined: runtime token applied to the root when analytics is not allowed.
19
19
  *
20
+ * @pgs-option
21
+ * - buttonStrong: presents full acceptance as the primary action.
22
+ *
20
23
  * @related
21
24
  * - flexColumn: vertically organizes the preference panel.
22
25
  * - flexRow: arranges panel rows and actions.
23
26
  * - nowrap: prevents wrapping in the essential-cookie row.
24
27
  * - toggle: presents analytics consent as a switch.
25
28
  * - button: presents the selection action with standard styling.
26
- * - buttonStrong: presents full acceptance as the primary action.
27
29
  *
28
30
  * @return Consent panel HTML with essential and analytics preferences, actions, and accessible attributes.
29
31
  */
@@ -75,7 +77,7 @@
75
77
  <i class="fa-solid fa-duotone fa-sliders"></i>Selected only
76
78
  </button>
77
79
 
78
- <button type="button" pgs="buttonStrong cookieConsent-actionAccept">
80
+ <button type="button" pgs="button cookieConsent-actionAccept" pgs-option="buttonStrong">
79
81
  <i class="fa-solid fa-check"></i> Accept all
80
82
  </button>
81
83
  </div>
@@ -1,6 +1,6 @@
1
1
  export default function Accordion() {
2
2
  return (
3
- <ul pgs="grid-1 gapTexts">
3
+ <ul pgs="grid gapTexts" pgs-option="column-1">
4
4
  <li pgs="accordion">
5
5
  <button pgs="accordion-button" type="button">
6
6
  <i className="fa-solid fa-circle-question" aria-hidden="true"></i>
@@ -0,0 +1,46 @@
1
+ const alerts = [
2
+ {
3
+ state: "info",
4
+ role: "status",
5
+ icon: "fa-circle-info",
6
+ title: "Information",
7
+ message: "Your profile information can be updated at any time.",
8
+ },
9
+ {
10
+ state: "success",
11
+ role: "status",
12
+ icon: "fa-circle-check",
13
+ title: "Changes saved",
14
+ message: "Your preferences were updated successfully.",
15
+ },
16
+ {
17
+ state: "warning",
18
+ role: "alert",
19
+ icon: "fa-triangle-exclamation",
20
+ title: "Check your information",
21
+ message: "Some fields may require your attention before continuing.",
22
+ },
23
+ {
24
+ state: "error",
25
+ role: "alert",
26
+ icon: "fa-circle-xmark",
27
+ title: "Unable to save",
28
+ message: "Correct the reported errors and try again.",
29
+ },
30
+ ];
31
+
32
+ export default function Alerts() {
33
+ return (
34
+ <div pgs="flexColumn gapElements">
35
+ {alerts.map(({ state, role, icon, title, message }) => (
36
+ <div key={state} pgs="alert" pgs-state={state} role={role}>
37
+ <i pgs="alert-icon" className={`fa-solid ${icon}`} aria-hidden="true"></i>
38
+ <div pgs="alert-content">
39
+ <strong pgs="alert-title">{title}</strong>
40
+ <p>{message}</p>
41
+ </div>
42
+ </div>
43
+ ))}
44
+ </div>
45
+ );
46
+ }
@@ -11,20 +11,20 @@ export default function Button() {
11
11
  <i className="fa-solid fa-arrow-right" aria-hidden="true"></i>
12
12
  </button>
13
13
 
14
- <button pgs="buttonStrong" type="button">
14
+ <button pgs="button" pgs-option="buttonStrong" type="button">
15
15
  <i className="fa-solid fa-check" aria-hidden="true"></i>
16
16
  Submit
17
17
  </button>
18
18
 
19
- <button pgs="buttonIcon" type="button" aria-label="Settings">
19
+ <button pgs="button" pgs-option="buttonIcon" type="button" aria-label="Settings">
20
20
  <i className="fa-solid fa-gear" aria-hidden="true"></i>
21
21
  </button>
22
22
 
23
- <button pgs="buttonMini" type="button" aria-label="Information">
23
+ <button pgs="button" pgs-option="buttonMini" type="button" aria-label="Information">
24
24
  <i className="fa-solid fa-info" aria-hidden="true"></i>
25
25
  </button>
26
26
 
27
- <button pgs="buttonBig" type="button" aria-label="Large button">
27
+ <button pgs="button" pgs-option="buttonBig" type="button" aria-label="Large button">
28
28
  <i className="fa-solid fa-rocket" aria-hidden="true"></i>
29
29
  Large button
30
30
  </button>
@@ -3,7 +3,7 @@ export default function Card() {
3
3
  <article pgs="card flexColumn">
4
4
  <img pgs="card-img imgCover" src="https://placehold.co/800x500" alt="Placeholder image" />
5
5
 
6
- <div pgs="flexColumnTexts">
6
+ <div pgs="flexColumn">
7
7
  <h3>Card riutilizzabile</h3>
8
8
  <p>Descriptive card content suitable for lists, previews, and grids.</p>
9
9
  <a pgs="button" href="#">Leggi di piu</a>
@@ -17,7 +17,7 @@ export default function CardLink() {
17
17
  <a pgs="flexColumn" href="">
18
18
  <img pgs="card-img imgCover" src="https://placehold.co/800x500" alt="Placeholder image" />
19
19
 
20
- <div pgs="flexColumnTexts">
20
+ <div pgs="flexColumn">
21
21
  <h3>Card riutilizzabile</h3>
22
22
  <p>Descriptive card content suitable for lists, previews, and grids.</p>
23
23
  </div>
@@ -21,7 +21,7 @@ export default function Form() {
21
21
  <input type="checkbox" name="privacy" required />
22
22
  </label>
23
23
 
24
- <button pgs="buttonStrong" type="submit">
24
+ <button pgs="button" pgs-option="buttonStrong" type="submit">
25
25
  <i className="fa-solid fa-paper-plane" aria-hidden="true"></i>
26
26
  Invia
27
27
  </button>
@@ -66,12 +66,12 @@ export default function Modal() {
66
66
  <h3>Save changes?</h3>
67
67
  </div>
68
68
 
69
- <div pgs="modal-dialog-content-scroll flexColumnElements">
69
+ <div pgs="modal-dialog-content-scroll flexColumn gapElements">
70
70
  <p>You have unsaved changes. Confirm to apply them or cancel to return to the page.</p>
71
71
 
72
72
  <div pgs="flexRow">
73
73
  <button pgs="button modal-close" type="button">Cancel</button>
74
- <button pgs="buttonStrong" type="button">Save changes</button>
74
+ <button pgs="button" pgs-option="buttonStrong" type="button">Save changes</button>
75
75
  </div>
76
76
  </div>
77
77
  </div>