mypgs 1.6.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/AGENTS.md +2 -2
  2. package/README.md +25 -25
  3. package/assets/javascript/components/_accordion.js +2 -2
  4. package/assets/javascript/components/_modals.js +159 -136
  5. package/assets/javascript/components/_notifications.js +19 -9
  6. package/assets/javascript/components/_search.js +2 -2
  7. package/assets/javascript/components/_slides.js +66 -32
  8. package/assets/javascript/components/_stepTabs.js +4 -4
  9. package/assets/javascript/components/_steps.js +2 -2
  10. package/assets/javascript/components/_summary.js +2 -2
  11. package/assets/javascript/functions/_formValidate.js +97 -53
  12. package/assets/javascript/functions/_scrollY.js +10 -10
  13. package/assets/javascript/layout/_header.js +3 -0
  14. package/assets/scss/base/_html.scss +2 -2
  15. package/assets/scss/base/_variables.scss +2 -2
  16. package/assets/scss/components/_accordion.scss +0 -2
  17. package/assets/scss/components/_button.scss +1 -1
  18. package/assets/scss/components/_form.scss +2 -18
  19. package/assets/scss/components/_formAddon.scss +18 -0
  20. package/assets/scss/components/_modals.scss +5 -3
  21. package/assets/scss/components/_notification.scss +23 -30
  22. package/assets/scss/components/_search.scss +29 -23
  23. package/assets/scss/components/_slides.scss +0 -1
  24. package/assets/scss/components/_tooltip.scss +0 -1
  25. package/assets/scss/index.scss +1 -0
  26. package/assets/scss/layout/_footer.scss +0 -2
  27. package/assets/scss/layout/_header.scss +9 -1
  28. package/assets/scss/layout/_pageShell.scss +24 -17
  29. package/assets/scss/mixin/_mx-button.scss +30 -76
  30. package/assets/scss/mixin/_mx-card.scss +11 -9
  31. package/assets/scss/mixin/_mx-form.scss +10 -12
  32. package/assets/scss/mixin/{_mx-form-addon.scss → _mx-formAddon.scss} +23 -26
  33. package/assets/scss/mixin/_mx-hover.scss +75 -0
  34. package/assets/scss/mixin/_settings.scss +2 -1
  35. package/assets/scss/mixin/mixin.scss +2 -1
  36. package/{templates/html → demo}/demo.html +1 -1
  37. package/demo/demo.js +241 -0
  38. package/dist/css/index.css +1317 -1674
  39. package/dist/css/index.css.map +1 -1
  40. package/dist/css/index.min.css +1 -1
  41. package/dist/javascript/index.js +356 -255
  42. package/dist/javascript/index.js.map +1 -1
  43. package/dist/javascript/index.min.js +1 -1
  44. package/docs/componenti-e-markup.md +32 -32
  45. package/docs/components/accordion.md +61 -0
  46. package/docs/components/badges.md +67 -0
  47. package/docs/components/breadcumbs.md +43 -0
  48. package/docs/components/button.md +59 -0
  49. package/docs/components/card.md +50 -0
  50. package/docs/components/dropdown.md +135 -0
  51. package/docs/components/form.md +136 -0
  52. package/docs/components/formAddon.md +79 -0
  53. package/docs/components/logo.md +36 -0
  54. package/docs/components/menu.md +90 -0
  55. package/docs/components/modal.md +131 -0
  56. package/docs/components/notification.md +81 -0
  57. package/docs/components/search.md +118 -0
  58. package/docs/components/slides.md +85 -0
  59. package/docs/components/stepTabs.md +93 -0
  60. package/docs/components/steps.md +56 -0
  61. package/docs/components/summary.md +49 -0
  62. package/docs/components/table.md +42 -0
  63. package/docs/components/tooltip.md +53 -0
  64. package/docs/convenzioni.md +11 -11
  65. package/docs/export-e-sviluppo.md +3 -3
  66. package/docs/helper-javascript.md +73 -8
  67. package/docs/layout/body.md +41 -0
  68. package/docs/layout/flex.md +116 -0
  69. package/docs/layout/footer.md +71 -0
  70. package/docs/layout/grid.md +116 -0
  71. package/docs/layout/header.md +116 -0
  72. package/docs/layout/pageShell.md +94 -0
  73. package/docs/layout/section.md +69 -0
  74. package/docs/patterns/cookieConsent.md +89 -0
  75. package/docs/utilizzo-css-scss.md +8 -8
  76. package/package.json +2 -1
  77. package/scripts/generate-component-docs.js +557 -0
  78. package/templates/html/components/accordion.html +36 -7
  79. package/templates/html/components/badges.html +28 -5
  80. package/templates/html/components/breadcumbs.html +15 -1
  81. package/templates/html/components/button.html +28 -6
  82. package/templates/html/components/card.html +28 -8
  83. package/templates/html/components/dropdown.html +42 -8
  84. package/templates/html/components/form.html +110 -9
  85. package/templates/html/components/formAddon.html +72 -0
  86. package/templates/html/components/logo.html +22 -1
  87. package/templates/html/components/menu.html +33 -6
  88. package/templates/html/components/modal.html +58 -14
  89. package/templates/html/components/notification.html +68 -32
  90. package/templates/html/components/search.html +85 -8
  91. package/templates/html/components/slides.html +46 -3
  92. package/templates/html/components/stepTabs.html +55 -8
  93. package/templates/html/components/steps.html +24 -0
  94. package/templates/html/components/summary.html +30 -3
  95. package/templates/html/components/table.html +14 -2
  96. package/templates/html/components/tooltip.html +35 -0
  97. package/templates/html/layout/body.html +20 -6
  98. package/templates/html/layout/flex.html +53 -33
  99. package/templates/html/layout/footer.html +32 -4
  100. package/templates/html/layout/grid.html +53 -33
  101. package/templates/html/layout/header.html +47 -6
  102. package/templates/html/layout/pageShell.html +19 -0
  103. package/templates/html/layout/section.html +41 -19
  104. package/templates/html/patterns/cookieConsent.html +44 -13
  105. package/templates/react/components/accordion.jsx +4 -4
  106. package/templates/react/components/breadcumbs.jsx +1 -1
  107. package/templates/react/components/button.jsx +5 -5
  108. package/templates/react/components/card.jsx +4 -4
  109. package/templates/react/components/dropdown.jsx +8 -8
  110. package/templates/react/components/form.jsx +5 -5
  111. package/templates/react/components/modal.jsx +14 -14
  112. package/templates/react/components/notification.jsx +7 -7
  113. package/templates/react/components/search.jsx +5 -5
  114. package/templates/react/components/slides.jsx +3 -3
  115. package/templates/react/components/stepTabs.jsx +8 -8
  116. package/templates/react/components/summary.jsx +3 -3
  117. package/templates/react/components/table.jsx +2 -2
  118. package/templates/react/layout/flex.jsx +8 -8
  119. package/templates/react/layout/grid.jsx +8 -8
  120. package/templates/react/layout/section.jsx +12 -12
  121. package/templates/react/patterns/cookieConsent.jsx +8 -8
  122. package/templates/react/patterns/footer.jsx +4 -4
  123. package/templates/react/patterns/header.jsx +3 -3
  124. package/templates/html/demo.js +0 -130
  125. /package/{templates/html → demo}/demo.css +0 -0
@@ -1,35 +1,71 @@
1
+ <!--
2
+ /**
3
+ * @title Notification
4
+ * @description Notification markup, configuration, behavior, and usage example.
5
+ *
6
+ * @pgs
7
+ * - notification: identifies the notification element used by Notification.
8
+ * - notificationTrigger: identifies the notificationTrigger element used by Notification.
9
+ * - notification-element: identifies the notification-element element used by Notification.
10
+ * - notification-element-title: identifies the notification-element-title element used by Notification.
11
+ * - notification-element-content: identifies the notification-element-content element used by Notification.
12
+ *
13
+ * @pgs-option
14
+ * - toast: identifies the toast element used by Notification.
15
+ * - notification: identifies the notification element used by Notification.
16
+ *
17
+ * @pgs-state
18
+ * - success: identifies the success element used by Notification.
19
+ * - error: identifies the error element used by Notification.
20
+ * - warning: identifies the warning element used by Notification.
21
+ * - info: identifies the info element used by Notification.
22
+ *
23
+ * @api
24
+ * - pgs.notification.trigger(root): provides the documented operation through the component public API.
25
+ * - pgs.notification.alert.error(text, link, timeout, icon): provides the documented operation through the component public API.
26
+ * - pgs.notification.alert.success(text, link, timeout, icon): provides the documented operation through the component public API.
27
+ * - pgs.notification.alert.info(text, link, timeout, icon): provides the documented operation through the component public API.
28
+ * - pgs.notification.alert.warning(text, link, timeout, icon): provides the documented operation through the component public API.
29
+ * - pgs.notification.alert.deleteAll(): provides the documented operation through the component public API.
30
+ * - pgs.notification.toast.error(text, timeout, icon): provides the documented operation through the component public API.
31
+ * - pgs.notification.toast.success(text, timeout, icon): provides the documented operation through the component public API.
32
+ * - pgs.notification.toast.info(text, timeout, icon): provides the documented operation through the component public API.
33
+ * - pgs.notification.toast.warning(text, timeout, icon): provides the documented operation through the component public API.
34
+ * - pgs.notification.toast.deleteAll(): provides the documented operation through the component public API.
35
+ *
36
+ * @related
37
+ * - hidden: uses the related hidden component or utility in this example.
38
+ * - buttonClose: uses the related buttonClose component or utility in this example.
39
+ *
40
+ * @return Complete HTML markup and usage example for Notification.
41
+ */
42
+ -->
43
+
1
44
  <div pgs="notification" aria-live="polite"></div>
2
- <div pgs="toast" aria-live="polite"></div>
45
+ <div pgs="notification" pgs-option="toast" aria-live="polite"></div>
3
46
 
4
- <div pgs="hidden notificationTrigger" data-notification='{
5
- "title":"Titolo",
6
- "message":"Messaggio",
7
- "element":"notification",
8
- "type":"info",
9
- "icon":null,
10
- "duration":"-1",
11
- "link":null
12
- }'>
13
- </div>
14
- <div pgs="hidden notificationTrigger" data-notification='{
15
- "title":"Benvetuto",
16
- "message":"Messaggio",
17
- "element":"toast",
18
- "type":"info",
19
- "icon":null,
20
- "duration":"3000",
21
- "link":null
22
- }'>
23
- </div>
47
+ <div pgs="hidden notificationTrigger" pgs-option='notification[{
48
+ "title": "Title",
49
+ "message": "Message",
50
+ "element": "notification",
51
+ "type": "info",
52
+ "icon": null,
53
+ "duration": "-1",
54
+ "link": null
55
+ }]'></div>
56
+
57
+ <div pgs="hidden notificationTrigger" pgs-option='notification[{
58
+ "title": "Benvenuto",
59
+ "message": "Message",
60
+ "element": "toast",
61
+ "type": "info",
62
+ "icon": null,
63
+ "duration": "3000",
64
+ "link": null
65
+ }]'></div>
24
66
  <!--
25
- <div pgs="hidden notificationTrigger" data-notification='{
26
- "title":"Titolo",
27
- "message":"Messaggio",
28
- "element":"notification | toast",
29
- "type":"info | success | warning | error",
30
- "icon":"null | <i class=\"fa-solid fa-rocket\"></i>",
31
- "duration":"-1 | 0 | 4000 | 5000",
32
- "link":"null | /pagina/"
33
- }'>
34
- </div>
35
- -->
67
+ <div
68
+ pgs="hidden notificationTrigger"
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
+ </div>
71
+ -->
@@ -1,12 +1,64 @@
1
+ <!--
2
+ /**
3
+ * @title Search
4
+ * @description Search markup, configuration, behavior, and usage example.
5
+ *
6
+ * @pgs
7
+ * - search: identifies the search element used by Search.
8
+ * - search-suggestions: identifies the search-suggestions element used by Search.
9
+ * - search-suggestions-item: identifies the search-suggestions-item element used by Search.
10
+ * - search-modal: identifies the search-modal element used by Search.
11
+ * - search-mobile: identifies the search-mobile element used by Search.
12
+ *
13
+ * @pgs-option
14
+ * - containerPGS: identifies the containerPGS element used by Search.
15
+ *
16
+ * @pgs-state
17
+ * - open: identifies the open element used by Search.
18
+ * - loading: identifies the loading element used by Search.
19
+ * - error: identifies the error element used by Search.
20
+ * - selected: identifies the selected element used by Search.
21
+ *
22
+ * @api
23
+ * - pgs.search.init(root): initializes matching elements within the specified root.
24
+ * - pgs.search.api(element): returns the instance associated with the specified initialized element.
25
+ * - instance.configure(options): provides the documented operation through the component public API.
26
+ * - instance.setSource(source): provides the documented operation through the component public API.
27
+ * - instance.search(query): provides the documented operation through the component public API.
28
+ * - instance.open(): opens the component.
29
+ * - instance.close(): closes the component.
30
+ * - instance.clear(): provides the documented operation through the component public API.
31
+ * - instance.cancel(): annulla debounce e richiesta attiva.
32
+ * - instance.select(index, submit): provides the documented operation through the component public API.
33
+ * - instance.refresh(): refreshes the component and returns its updated instance.
34
+ * - instance.destroy(): removes listeners and releases the component instance.
35
+ * - instance.items(): provides the documented operation through the component public API.
36
+ * - instance.isOpen(): returns true when the component is open.
37
+ * - instance.isLoading(): returns true while the component is loading.
38
+ * - instance.setActiveIndex(index): provides the documented operation through the component public API.
39
+ *
40
+ * @related
41
+ * - buttonNohover: uses the related buttonNohover component or utility in this example.
42
+ * - modal: uses the related modal component or utility in this example.
43
+ * - modal-button: uses the related modal-button component or utility in this example.
44
+ * - modal-close: uses the related modal-close component or utility in this example.
45
+ * - buttonIcon: uses the related buttonIcon component or utility in this example.
46
+ * - flexRow: uses the related flexRow component or utility in this example.
47
+ * - section: uses the related section component or utility in this example.
48
+ *
49
+ * @return Complete HTML markup and usage example for Search.
50
+ */
51
+ -->
52
+
1
53
  <form pgs="buttonNohover search" autocomplete="off" action="" method="get">
2
- <button type="submit" title="Cerca"><i class="fa-solid fa-search"></i></button>
3
- <input type="search" name="s" placeholder="Cerca" value="">
54
+ <button type="submit" title="Search"><i class="fa-solid fa-search"></i></button>
55
+ <input type="search" name="s" placeholder="Search" value="">
4
56
  <ul pgs="search-suggestions"></ul>
5
57
  </form>
6
58
 
7
59
  <div pgs="modal search-modal" pgs-option="containerPGS[header]">
8
60
 
9
- <button type="button" pgs="modal-button buttonIcon" title="Cerca">
61
+ <button type="button" pgs="modal-button buttonIcon" title="Search">
10
62
  <i class="fa-solid fa-search"></i>
11
63
  </button>
12
64
 
@@ -14,18 +66,43 @@
14
66
  <div pgs="flexRow section search-mobile">
15
67
 
16
68
  <form pgs="buttonNohover search" autocomplete="off" action="/" method="get">
17
- <button type="submit" title="Cerca">
69
+ <button type="submit" title="Search">
18
70
  <i class="fa-solid fa-search"></i>
19
71
  </button>
20
72
 
21
- <input type="search" name="s" placeholder="Cerca" value="">
73
+ <input type="search" name="s" placeholder="Search" value="">
22
74
  <ul pgs="search-suggestions"></ul>
75
+
76
+ <button type="button" pgs="modal-close buttonIcon">
77
+ <i class="fa-solid fa-close"></i>
78
+ </button>
23
79
  </form>
24
80
 
25
- <button type="button" pgs="modal-close buttonIcon">
26
- <i class="fa-solid fa-close"></i>
27
- </button>
28
81
 
29
82
  </div>
30
83
  </dialog>
31
84
  </div>
85
+
86
+ <script type="module">
87
+ import { pgs } from "mypgs";
88
+
89
+ const components = [
90
+ { label: "Accordion", value: "/componenti/accordion", data: { category: "component" } },
91
+ { label: "Dropdown", value: "/componenti/dropdown", data: { category: "component" } },
92
+ { label: "Modal", value: "/componenti/modal", data: { category: "component" } },
93
+ { label: "Search", value: "/componenti/search", data: { category: "component" } },
94
+ { label: "Page Shell", value: "/layout/page-shell", data: { category: "layout" } },
95
+ ];
96
+
97
+ pgs(document).querySelectorAll("search").forEach(search => {
98
+ pgs.search.api(search)?.configure({
99
+ minLength: 1,
100
+ debounce: 150,
101
+ limit: 5,
102
+ source: components,
103
+ onSelect: ({ item, value }) => {
104
+ console.log(`Selezionato ${item.label}: ${value}`);
105
+ },
106
+ });
107
+ });
108
+ </script>
@@ -1,3 +1,46 @@
1
+ <!--
2
+ /**
3
+ * @title Slides
4
+ * @description Slides markup, configuration, behavior, and usage example.
5
+ *
6
+ * @pgs
7
+ * - slides: identifies the slides element used by Slides.
8
+ * - slides-container: identifies the slides-container element used by Slides.
9
+ * - slides-prec: identifies the slides-prec element used by Slides.
10
+ * - slides-next: identifies the slides-next element used by Slides.
11
+ * - slides-dots: identifies the slides-dots element used by Slides.
12
+ *
13
+ * @pgs-option
14
+ * - singleScroll: identifies the singleScroll element used by Slides.
15
+ * - shadowDesktop: identifies the shadowDesktop element used by Slides.
16
+ * - notScrollAnimation: identifies the notScrollAnimation element used by Slides.
17
+ * - notScrollWithMouse: identifies the notScrollWithMouse element used by Slides.
18
+ *
19
+ * @api
20
+ * - pgs.slides.init(root): initializes matching elements within the specified root.
21
+ * - pgs.slides.api(element): returns the instance associated with the specified initialized element.
22
+ * - instance.previous(): moves to the previous item.
23
+ * - instance.next(): moves to the next item.
24
+ * - instance.goTo(index): provides the documented operation through the component public API.
25
+ * - instance.getCurrentIndexes(): provides the documented operation through the component public API.
26
+ * - instance.getCurrentElements(): provides the documented operation through the component public API.
27
+ * - instance.getTotal(): returns the total number of items.
28
+ * - instance.isAtStart(): provides the documented operation through the component public API.
29
+ * - instance.isAtEnd(): provides the documented operation through the component public API.
30
+ * - instance.refresh(): refreshes the component and returns its updated instance.
31
+ *
32
+ * @related
33
+ * - card: uses the related card component or utility in this example.
34
+ * - card-img: uses the related card-img component or utility in this example.
35
+ * - imgCover: uses the related imgCover component or utility in this example.
36
+ * - 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
+ *
40
+ * @return Complete HTML markup and usage example for Slides.
41
+ */
42
+ -->
43
+
1
44
  <div pgs="slides" pgs-option="singleScroll shadowDesktop">
2
45
  <ul pgs="slides-container">
3
46
  <li>
@@ -5,7 +48,7 @@
5
48
  <img pgs="card-img imgCover" src="https://placehold.co/800x500?text=Slide+1" alt="Slide 1">
6
49
  <div pgs="flexColumnTexts">
7
50
  <h3>Slide uno</h3>
8
- <p>Contenuto della prima slide.</p>
51
+ <p>First slide content.</p>
9
52
  </div>
10
53
  </article>
11
54
  </li>
@@ -15,7 +58,7 @@
15
58
  <img pgs="card-img imgCover" src="https://placehold.co/800x500?text=Slide+2" alt="Slide 2">
16
59
  <div pgs="flexColumnTexts">
17
60
  <h3>Slide due</h3>
18
- <p>Contenuto della seconda slide.</p>
61
+ <p>Second slide content.</p>
19
62
  </div>
20
63
  </article>
21
64
  </li>
@@ -25,7 +68,7 @@
25
68
  <img pgs="card-img imgCover" src="https://placehold.co/800x500?text=Slide+3" alt="Slide 3">
26
69
  <div pgs="flexColumnTexts">
27
70
  <h3>Slide tre</h3>
28
- <p>Contenuto della terza slide.</p>
71
+ <p>Third slide content.</p>
29
72
  </div>
30
73
  </article>
31
74
  </li>
@@ -1,27 +1,74 @@
1
+ <!--
2
+ /**
3
+ * @title Step Tabs
4
+ * @description Step Tabs markup, configuration, behavior, and usage example.
5
+ *
6
+ * @pgs
7
+ * - stepTabs: identifies the stepTabs element used by Step Tabs.
8
+ * - stepTabs-dots: identifies the stepTabs-dots element used by Step Tabs.
9
+ * - stepTabs-dots-dot: identifies the stepTabs-dots-dot element used by Step Tabs.
10
+ * - stepTabs-container: identifies the stepTabs-container element used by Step Tabs.
11
+ * - tab: identifies the tab element used by Step Tabs.
12
+ * - stepTabs-prev: identifies the stepTabs-prev element used by Step Tabs.
13
+ * - stepTabs-restart: identifies the stepTabs-restart element used by Step Tabs.
14
+ * - stepTabs-next: identifies the stepTabs-next element used by Step Tabs.
15
+ *
16
+ * @pgs-option
17
+ * - tabIcon: identifies the tabIcon element used by Step Tabs.
18
+ * - step: identifies the step element used by Step Tabs.
19
+ * - buttonReverse: identifies the buttonReverse element used by Step Tabs.
20
+ *
21
+ * @pgs-state
22
+ * - is-active: identifies the is-active element used by Step Tabs.
23
+ * - is-completed: identifies the is-completed element used by Step Tabs.
24
+ * - is-locked: identifies the is-locked element used by Step Tabs.
25
+ *
26
+ * @api
27
+ * - pgs.stepTabs.init(root): initializes matching elements within the specified root.
28
+ * - pgs.stepTabs.api(element): returns the instance associated with the specified initialized element.
29
+ * - instance.restart(): torna al primo tab e ripristina i blocchi dichiarati inizialmente.
30
+ * - instance.goTo(index, scroll): provides the documented operation through the component public API.
31
+ * - instance.next(): moves to the next item.
32
+ * - instance.prev(): moves to the previous item.
33
+ * - instance.toggleLock(index, lock): provides the documented operation through the component public API.
34
+ * - instance.refresh(): refreshes the component and returns its updated instance.
35
+ * - instance.getCurrent(): provides the documented operation through the component public API.
36
+ * - instance.getState(): provides the documented operation through the component public API.
37
+ *
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.
41
+ * - flexRow: uses the related flexRow component or utility in this example.
42
+ * - button: uses the related button component or utility in this example.
43
+ *
44
+ * @return Complete HTML markup and usage example for Step Tabs.
45
+ */
46
+ -->
47
+
1
48
  <div pgs="stepTabs flexColumnElements">
2
49
  <div pgs="stepTabs-dots" aria-label="Avanzamento"></div>
3
50
 
4
51
  <div pgs="stepTabs-container">
5
52
  <section pgs="tab flexColumnTexts" tabindex="-1" pgs-option="tabIcon[fa-user]">
6
- <h3>Dati personali</h3>
7
- <p>Contenuto del primo tab.</p>
53
+ <h3>Personal details</h3>
54
+ <p>First tab content.</p>
8
55
  </section>
9
56
 
10
57
  <section pgs="tab flexColumnTexts" tabindex="-1" pgs-option="tabIcon[fa-list-check]">
11
- <h3>Preferenze</h3>
12
- <p>Contenuto del secondo tab.</p>
58
+ <h3>Preferences</h3>
59
+ <p>Second tab content.</p>
13
60
  </section>
14
61
 
15
62
  <section pgs="tab flexColumnTexts" tabindex="-1" pgs-option="tabIcon[fa-check]">
16
- <h3>Conferma</h3>
17
- <p>Contenuto del terzo tab.</p>
63
+ <h3>Confirmation</h3>
64
+ <p>Third tab content.</p>
18
65
  </section>
19
66
  </div>
20
67
 
21
68
  <div pgs="flexRow">
22
69
  <button pgs="stepTabs-prev button" type="button">
23
70
  <i class="fa-solid fa-arrow-left" aria-hidden="true"></i>
24
- Indietro
71
+ Back
25
72
  </button>
26
73
 
27
74
  <button pgs="stepTabs-restart button" type="button">
@@ -29,7 +76,7 @@
29
76
  </button>
30
77
 
31
78
  <button pgs="stepTabs-next button" pgs-option="buttonReverse" type="button">
32
- Avanti
79
+ Next
33
80
  <i class="fa-solid fa-arrow-right" aria-hidden="true"></i>
34
81
  </button>
35
82
  </div>
@@ -1,3 +1,27 @@
1
+ <!--
2
+ /**
3
+ * @title Steps
4
+ * @description Ordered list of steps showing a number, content, and connecting line, with missing structural elements added at runtime.
5
+ *
6
+ * @pgs
7
+ * - steps: identifies the ordered list initialized by the steps module.
8
+ * - steps-step: identifies each step in the sequence.
9
+ * - steps-step-circle: identifies the numeric indicator, which is created automatically when missing.
10
+ * - steps-step-content: identifies the text content of the step.
11
+ * - steps-step-line: identifies the connecting line dynamically added to each step.
12
+ *
13
+ * @api
14
+ * - pgs.steps.init(root): initializes unregistered step lists within the specified Document or Element.
15
+ * - pgs.steps.api(element): returns the instance associated with an initialized steps root.
16
+ * - instance.steps(): returns an array containing every steps-step element.
17
+ * - instance.getStep(index): returns the step at the specified index.
18
+ * - instance.getTotal(): returns the total number of steps.
19
+ * - instance.refresh(): reinitializes the list, recreates missing elements, and returns the new instance.
20
+ *
21
+ * @return Ordered HTML list of numbered steps completed by the JavaScript module.
22
+ */
23
+ -->
24
+
1
25
  <ol pgs="steps">
2
26
  <li pgs="steps-step">
3
27
  <span pgs="steps-step-circle">1</span>
@@ -1,14 +1,41 @@
1
+ <!--
2
+ /**
3
+ * @title Summary
4
+ * @description Summary markup, configuration, behavior, and usage example.
5
+ *
6
+ * @pgs
7
+ * - summary: identifies the summary element used by Summary.
8
+ * - summary-content: identifies the summary-content element used by Summary.
9
+ * - summary-button: identifies the summary-button element used by Summary.
10
+ *
11
+ * @pgs-state
12
+ * - overflow: identifies the overflow element used by Summary.
13
+ * - open: identifies the open element used by Summary.
14
+ *
15
+ * @api
16
+ * - pgs.summary.init(root): initializes matching elements within the specified root.
17
+ * - pgs.summary.api(element): returns the instance associated with the specified initialized element.
18
+ * - instance.open(): opens the component.
19
+ * - instance.close(): closes the component.
20
+ * - instance.toggle(): toggles the component state.
21
+ * - instance.refresh(): refreshes the component and returns its updated instance.
22
+ * - instance.isOpen(): returns true when the component is open.
23
+ *
24
+ * @return Complete HTML markup and usage example for Summary.
25
+ */
26
+ -->
27
+
1
28
  <div pgs="summary">
2
29
  <div pgs="summary-content">
3
30
  <p>
4
- Questo testo dimostrativo e' abbastanza lungo da occupare piu righe e mostrare il comportamento del componente summary. Il contenuto puo includere testo, link e altri elementi inline senza richiedere markup aggiuntivo.
31
+ 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.
5
32
  </p>
6
33
  <p>
7
- Quando il contenuto supera tre righe viene mostrato un pulsante per espandere o richiudere l'area visibile.
34
+ When content exceeds three lines, a button is shown to expand or collapse the visible area.
8
35
  </p>
9
36
  </div>
10
37
 
11
38
  <button pgs="summary-button" type="button">
12
- Mostra di più
39
+ Show more
13
40
  </button>
14
41
  </div>
@@ -1,8 +1,20 @@
1
+ <!--
2
+ /**
3
+ * @title Table
4
+ * @description Responsive container for a semantic table with headers and data rows consistent with the design system styles.
5
+ *
6
+ * @pgs
7
+ * - table: identifies the wrapper that manages presentation and scrolling for the native table.
8
+ *
9
+ * @return Complete HTML table wrapped in the dedicated PGS container.
10
+ */
11
+ -->
12
+
1
13
  <div pgs="table">
2
14
  <table>
3
15
  <thead>
4
16
  <tr>
5
- <th>Nome</th>
17
+ <th>Name</th>
6
18
  <th>Stato</th>
7
19
  <th>Data</th>
8
20
  </tr>
@@ -11,7 +23,7 @@
11
23
  <tbody>
12
24
  <tr>
13
25
  <td>Elemento uno</td>
14
- <td>Attivo</td>
26
+ <td>Active</td>
15
27
  <td>2026-01-01</td>
16
28
  </tr>
17
29
  <tr>
@@ -1,3 +1,38 @@
1
+ <!--
2
+ /**
3
+ * @title Tooltip
4
+ * @description Tooltip markup, configuration, behavior, and usage example.
5
+ *
6
+ * @pgs
7
+ * - tooltip: identifies the tooltip element used by Tooltip.
8
+ * - tooltip-button: identifies the tooltip-button element used by Tooltip.
9
+ * - tooltip-content: identifies the tooltip-content element used by Tooltip.
10
+ *
11
+ * @pgs-option
12
+ * - position: identifies the position element used by Tooltip.
13
+ *
14
+ * @pgs-state
15
+ * - open: identifies the open element used by Tooltip.
16
+ *
17
+ * @api
18
+ * - pgs.dropdown.init(root): initializes matching elements within the specified root.
19
+ * - pgs.dropdown.api(element): returns the instance associated with the specified initialized element.
20
+ * - instance.open(): opens the component.
21
+ * - instance.close(): closes the component.
22
+ * - instance.toggle(): toggles the component state.
23
+ * - instance.refresh(): refreshes the component and returns its updated instance.
24
+ * - instance.isOpen(): returns true when the component is open.
25
+ *
26
+ * @related
27
+ * - dropdown: uses the related dropdown component or utility in this example.
28
+ * - dropdown-button: uses the related dropdown-button component or utility in this example.
29
+ * - 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
+ * @return Complete HTML markup and usage example for Tooltip.
33
+ */
34
+ -->
35
+
1
36
  <span pgs="dropdown tooltip">
2
37
  <button pgs="dropdown-button buttonMini tooltip-button" title="open-tooltip" type="button">
3
38
  <i class="fa-solid fa-info"></i>
@@ -1,3 +1,23 @@
1
+ <!--
2
+ /**
3
+ * @title Body
4
+ * @description Base HTML document that enables MyPGS, configures essential metadata, and applies shared background, text, and heading variants to the body.
5
+ *
6
+ * @pgs
7
+ * - htmlBase: applies the fundamental rules to the html element.
8
+ * - initP: enables layout, component, and pattern styles scoped to the MyPGS namespace.
9
+ * - bodyBase: applies the base structure and spacing to the body.
10
+ * - bodyImg: enables shared rules for images contained in the page.
11
+ * - bodyText: enables text typography and spacing.
12
+ * - bodyHeading: enables the typographic heading hierarchy.
13
+ *
14
+ * @pgs-state
15
+ * - darkmode: is applied dynamically to html and body to activate the dark theme.
16
+ *
17
+ * @return Complete HTML skeleton required to initialize the MyPGS library.
18
+ */
19
+ -->
20
+
1
21
  <!DOCTYPE html>
2
22
  <html lang="it-IT" pgs="htmlBase initP">
3
23
 
@@ -9,12 +29,6 @@
9
29
  <meta name="theme-color" content="">
10
30
  <meta name="apple-mobile-web-app-status-bar-color" content="">
11
31
 
12
- <!-- Fonts -->
13
- <link rel="preconnect" href="https://fonts.googleapis.com">
14
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
15
- <link href="https://fonts.googleapis.com/css2?family=Urbanist:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
16
-
17
32
  </head>
18
33
 
19
34
  <body pgs="bodyBase bodyImg bodyText bodyHeading" >
20
-