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.
- package/AGENTS.md +2 -2
- package/README.md +25 -25
- package/assets/javascript/components/_accordion.js +2 -2
- package/assets/javascript/components/_modals.js +159 -136
- package/assets/javascript/components/_notifications.js +19 -9
- package/assets/javascript/components/_search.js +2 -2
- package/assets/javascript/components/_slides.js +66 -32
- package/assets/javascript/components/_stepTabs.js +4 -4
- package/assets/javascript/components/_steps.js +2 -2
- package/assets/javascript/components/_summary.js +2 -2
- package/assets/javascript/functions/_formValidate.js +97 -53
- package/assets/javascript/functions/_scrollY.js +10 -10
- package/assets/javascript/layout/_header.js +3 -0
- package/assets/scss/base/_html.scss +2 -2
- package/assets/scss/base/_variables.scss +2 -2
- package/assets/scss/components/_accordion.scss +0 -2
- package/assets/scss/components/_button.scss +1 -1
- package/assets/scss/components/_form.scss +2 -18
- package/assets/scss/components/_formAddon.scss +18 -0
- package/assets/scss/components/_modals.scss +5 -3
- package/assets/scss/components/_notification.scss +23 -30
- package/assets/scss/components/_search.scss +29 -23
- package/assets/scss/components/_slides.scss +0 -1
- package/assets/scss/components/_tooltip.scss +0 -1
- package/assets/scss/index.scss +1 -0
- package/assets/scss/layout/_footer.scss +0 -2
- package/assets/scss/layout/_header.scss +9 -1
- package/assets/scss/layout/_pageShell.scss +24 -17
- package/assets/scss/mixin/_mx-button.scss +30 -76
- package/assets/scss/mixin/_mx-card.scss +11 -9
- package/assets/scss/mixin/_mx-form.scss +10 -12
- package/assets/scss/mixin/{_mx-form-addon.scss → _mx-formAddon.scss} +23 -26
- package/assets/scss/mixin/_mx-hover.scss +75 -0
- package/assets/scss/mixin/_settings.scss +2 -1
- package/assets/scss/mixin/mixin.scss +2 -1
- package/{templates/html → demo}/demo.html +1 -1
- package/demo/demo.js +241 -0
- package/dist/css/index.css +1317 -1674
- package/dist/css/index.css.map +1 -1
- package/dist/css/index.min.css +1 -1
- package/dist/javascript/index.js +356 -255
- package/dist/javascript/index.js.map +1 -1
- package/dist/javascript/index.min.js +1 -1
- package/docs/componenti-e-markup.md +32 -32
- package/docs/components/accordion.md +61 -0
- package/docs/components/badges.md +67 -0
- package/docs/components/breadcumbs.md +43 -0
- package/docs/components/button.md +59 -0
- package/docs/components/card.md +50 -0
- package/docs/components/dropdown.md +135 -0
- package/docs/components/form.md +136 -0
- package/docs/components/formAddon.md +79 -0
- package/docs/components/logo.md +36 -0
- package/docs/components/menu.md +90 -0
- package/docs/components/modal.md +131 -0
- package/docs/components/notification.md +81 -0
- package/docs/components/search.md +118 -0
- package/docs/components/slides.md +85 -0
- package/docs/components/stepTabs.md +93 -0
- package/docs/components/steps.md +56 -0
- package/docs/components/summary.md +49 -0
- package/docs/components/table.md +42 -0
- package/docs/components/tooltip.md +53 -0
- package/docs/convenzioni.md +11 -11
- package/docs/export-e-sviluppo.md +3 -3
- package/docs/helper-javascript.md +73 -8
- package/docs/layout/body.md +41 -0
- package/docs/layout/flex.md +116 -0
- package/docs/layout/footer.md +71 -0
- package/docs/layout/grid.md +116 -0
- package/docs/layout/header.md +116 -0
- package/docs/layout/pageShell.md +94 -0
- package/docs/layout/section.md +69 -0
- package/docs/patterns/cookieConsent.md +89 -0
- package/docs/utilizzo-css-scss.md +8 -8
- package/package.json +2 -1
- package/scripts/generate-component-docs.js +557 -0
- package/templates/html/components/accordion.html +36 -7
- package/templates/html/components/badges.html +28 -5
- package/templates/html/components/breadcumbs.html +15 -1
- package/templates/html/components/button.html +28 -6
- package/templates/html/components/card.html +28 -8
- package/templates/html/components/dropdown.html +42 -8
- package/templates/html/components/form.html +110 -9
- package/templates/html/components/formAddon.html +72 -0
- package/templates/html/components/logo.html +22 -1
- package/templates/html/components/menu.html +33 -6
- package/templates/html/components/modal.html +58 -14
- package/templates/html/components/notification.html +68 -32
- package/templates/html/components/search.html +85 -8
- package/templates/html/components/slides.html +46 -3
- package/templates/html/components/stepTabs.html +55 -8
- package/templates/html/components/steps.html +24 -0
- package/templates/html/components/summary.html +30 -3
- package/templates/html/components/table.html +14 -2
- package/templates/html/components/tooltip.html +35 -0
- package/templates/html/layout/body.html +20 -6
- package/templates/html/layout/flex.html +53 -33
- package/templates/html/layout/footer.html +32 -4
- package/templates/html/layout/grid.html +53 -33
- package/templates/html/layout/header.html +47 -6
- package/templates/html/layout/pageShell.html +19 -0
- package/templates/html/layout/section.html +41 -19
- package/templates/html/patterns/cookieConsent.html +44 -13
- package/templates/react/components/accordion.jsx +4 -4
- package/templates/react/components/breadcumbs.jsx +1 -1
- package/templates/react/components/button.jsx +5 -5
- package/templates/react/components/card.jsx +4 -4
- package/templates/react/components/dropdown.jsx +8 -8
- package/templates/react/components/form.jsx +5 -5
- package/templates/react/components/modal.jsx +14 -14
- package/templates/react/components/notification.jsx +7 -7
- package/templates/react/components/search.jsx +5 -5
- package/templates/react/components/slides.jsx +3 -3
- package/templates/react/components/stepTabs.jsx +8 -8
- package/templates/react/components/summary.jsx +3 -3
- package/templates/react/components/table.jsx +2 -2
- package/templates/react/layout/flex.jsx +8 -8
- package/templates/react/layout/grid.jsx +8 -8
- package/templates/react/layout/section.jsx +12 -12
- package/templates/react/patterns/cookieConsent.jsx +8 -8
- package/templates/react/patterns/footer.jsx +4 -4
- package/templates/react/patterns/header.jsx +3 -3
- package/templates/html/demo.js +0 -130
- /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"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<div pgs="hidden notificationTrigger"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
|
26
|
-
"
|
|
27
|
-
"message":"
|
|
28
|
-
|
|
29
|
-
|
|
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="
|
|
3
|
-
<input type="search" name="s" placeholder="
|
|
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="
|
|
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="
|
|
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="
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
7
|
-
<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>
|
|
12
|
-
<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>
|
|
17
|
-
<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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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>
|
|
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>
|
|
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
|
-
|