mypgs 2.0.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/README.md +25 -25
- package/assets/scss/components/_accordion.scss +0 -2
- package/assets/scss/components/_button.scss +1 -1
- package/assets/scss/components/_form.scss +0 -16
- package/assets/scss/components/_formAddon.scss +18 -0
- package/assets/scss/components/_modals.scss +5 -3
- package/assets/scss/components/_search.scss +2 -2
- 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 +6 -2
- 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 +3 -5
- 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/demo/demo.js +4 -3
- package/dist/css/index.css +1166 -1517
- package/dist/css/index.css.map +1 -1
- package/dist/css/index.min.css +1 -1
- package/docs/componenti-e-markup.md +6 -5
- package/docs/components/accordion.md +22 -22
- package/docs/components/badges.md +19 -19
- package/docs/components/breadcumbs.md +8 -8
- package/docs/components/button.md +17 -17
- package/docs/components/card.md +19 -19
- package/docs/components/dropdown.md +29 -29
- package/docs/components/form.md +63 -40
- package/docs/components/formAddon.md +79 -0
- package/docs/components/logo.md +11 -11
- package/docs/components/menu.md +20 -20
- package/docs/components/modal.md +46 -46
- package/docs/components/notification.md +34 -34
- package/docs/components/search.md +51 -50
- package/docs/components/slides.md +39 -39
- package/docs/components/stepTabs.md +41 -41
- package/docs/components/steps.md +16 -16
- package/docs/components/summary.md +20 -20
- package/docs/components/table.md +7 -7
- package/docs/components/tooltip.md +22 -22
- package/docs/convenzioni.md +11 -11
- package/docs/export-e-sviluppo.md +3 -3
- package/docs/helper-javascript.md +7 -7
- package/docs/layout/body.md +11 -11
- package/docs/layout/flex.md +44 -44
- package/docs/layout/footer.md +23 -23
- package/docs/layout/grid.md +44 -44
- package/docs/layout/header.md +34 -34
- package/docs/layout/pageShell.md +11 -11
- package/docs/layout/section.md +26 -26
- package/docs/patterns/cookieConsent.md +38 -38
- package/docs/utilizzo-css-scss.md +8 -8
- package/package.json +1 -1
- package/scripts/generate-component-docs.js +5 -5
- package/templates/html/components/accordion.html +19 -19
- package/templates/html/components/badges.html +17 -17
- package/templates/html/components/breadcumbs.html +6 -6
- package/templates/html/components/button.html +15 -15
- package/templates/html/components/card.html +17 -17
- package/templates/html/components/dropdown.html +25 -25
- package/templates/html/components/form.html +58 -35
- package/templates/html/components/formAddon.html +72 -0
- package/templates/html/components/logo.html +9 -9
- package/templates/html/components/menu.html +16 -16
- package/templates/html/components/modal.html +42 -42
- package/templates/html/components/notification.html +30 -30
- package/templates/html/components/search.html +43 -42
- package/templates/html/components/slides.html +31 -31
- package/templates/html/components/stepTabs.html +37 -37
- package/templates/html/components/steps.html +13 -13
- package/templates/html/components/summary.html +17 -17
- package/templates/html/components/table.html +5 -5
- package/templates/html/components/tooltip.html +18 -18
- package/templates/html/layout/body.html +9 -10
- package/templates/html/layout/flex.html +42 -42
- package/templates/html/layout/footer.html +20 -20
- package/templates/html/layout/grid.html +42 -42
- package/templates/html/layout/header.html +32 -32
- package/templates/html/layout/pageShell.html +8 -8
- package/templates/html/layout/section.html +24 -24
- package/templates/html/patterns/cookieConsent.html +33 -33
- 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 +2 -2
- package/templates/react/components/modal.jsx +14 -14
- package/templates/react/components/notification.jsx +3 -3
- 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 +3 -3
- package/templates/react/patterns/header.jsx +3 -3
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
/**
|
|
3
3
|
* @title Footer
|
|
4
|
-
* @description
|
|
4
|
+
* @description Complete footer with theme control, brand area, navigation, informational content, and a link to cookie preferences.
|
|
5
5
|
*
|
|
6
6
|
* @pgs
|
|
7
|
-
* - footer:
|
|
8
|
-
* - footer-top:
|
|
9
|
-
* - footer-top-content:
|
|
10
|
-
* - footer-brand:
|
|
11
|
-
* - footer-brand-motto:
|
|
12
|
-
* - footer-content:
|
|
13
|
-
* - footer-legal:
|
|
14
|
-
* - footer-legal-content:
|
|
7
|
+
* - footer: identifies the main footer container.
|
|
8
|
+
* - footer-top: identifies the upper section containing the brand and content.
|
|
9
|
+
* - footer-top-content: identifies the responsive inner layout of the upper section.
|
|
10
|
+
* - footer-brand: identifies the group dedicated to the brand.
|
|
11
|
+
* - footer-brand-motto: identifies the descriptive text associated with the brand.
|
|
12
|
+
* - footer-content: identifies an informational footer column.
|
|
13
|
+
* - footer-legal: identifies the lower section dedicated to legal information.
|
|
14
|
+
* - footer-legal-content: identifies the content of the legal section.
|
|
15
15
|
*
|
|
16
16
|
* @related
|
|
17
|
-
* - button:
|
|
18
|
-
* - toggleDarkmode:
|
|
19
|
-
* - section:
|
|
20
|
-
* - flex-3:
|
|
21
|
-
* - logo:
|
|
22
|
-
* - logo-text:
|
|
23
|
-
* - cookieConsent-actionOpen:
|
|
17
|
+
* - button: presents theme and cookie preference controls as buttons.
|
|
18
|
+
* - toggleDarkmode: connects the control to the global light or dark theme handler.
|
|
19
|
+
* - section: applies the shared section structure to the upper and legal areas.
|
|
20
|
+
* - flex-3: distributes the upper columns responsively.
|
|
21
|
+
* - logo: inserts the brand into the footer.
|
|
22
|
+
* - logo-text: uses the text variant of the logo.
|
|
23
|
+
* - cookieConsent-actionOpen: opens the Cookie Consent preference panel.
|
|
24
24
|
*
|
|
25
|
-
* @return
|
|
25
|
+
* @return Complete footer HTML structure with brand, menu, and legal area.
|
|
26
26
|
*/
|
|
27
27
|
-->
|
|
28
28
|
|
|
29
29
|
<footer pgs="footer">
|
|
30
|
-
<button pgs="button toggleDarkmode" type="button" aria-label="
|
|
30
|
+
<button pgs="button toggleDarkmode" type="button" aria-label="Change theme">
|
|
31
31
|
<i class="fa-solid fa-moon"></i>
|
|
32
32
|
</button>
|
|
33
33
|
|
|
@@ -54,11 +54,11 @@
|
|
|
54
54
|
|
|
55
55
|
<section pgs="footer-legal section">
|
|
56
56
|
<div pgs="footer-legal-content">
|
|
57
|
-
<button type="button" pgs="button cookieConsent-actionOpen">
|
|
57
|
+
<button type="button" pgs="button cookieConsent-actionOpen">Cookie preferences</button>
|
|
58
58
|
<p><a href="">Privacy Policy</a></p>
|
|
59
59
|
<p><a href="">Cookie Policy</a></p>
|
|
60
60
|
<p><a href="">Termini e Condizioni</a></p>
|
|
61
|
-
<p>© 2026 MyPgs.
|
|
61
|
+
<p>© 2026 MyPgs. No rights reserved.</p>
|
|
62
62
|
</div>
|
|
63
63
|
</section>
|
|
64
64
|
</footer>
|
|
@@ -1,109 +1,109 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
/**
|
|
3
3
|
* @title Grid
|
|
4
|
-
* @description
|
|
4
|
+
* @description Responsive grid examples that distribute two to six columns while preserving design-system gaps and sizing.
|
|
5
5
|
*
|
|
6
6
|
* @pgs
|
|
7
|
-
* - grid-2:
|
|
8
|
-
* - grid-3:
|
|
9
|
-
* - grid-4:
|
|
10
|
-
* - grid-6:
|
|
7
|
+
* - grid-2: creates a responsive grid with up to two columns.
|
|
8
|
+
* - grid-3: creates a responsive grid with up to three columns.
|
|
9
|
+
* - grid-4: creates a responsive grid with up to four columns.
|
|
10
|
+
* - grid-6: creates a responsive grid with up to six columns.
|
|
11
11
|
*
|
|
12
12
|
* @related
|
|
13
|
-
* - container:
|
|
14
|
-
* - flexColumnTexts:
|
|
15
|
-
* - card:
|
|
13
|
+
* - container: defines the container context for the introduction.
|
|
14
|
+
* - flexColumnTexts: organizes and spaces introductory and card text.
|
|
15
|
+
* - card: makes the demonstration grid cells visible.
|
|
16
16
|
*
|
|
17
|
-
* @return
|
|
17
|
+
* @return HTML collection of responsive grids with two, three, four, and six columns.
|
|
18
18
|
*/
|
|
19
19
|
-->
|
|
20
20
|
|
|
21
21
|
<div pgs="container flexColumnTexts">
|
|
22
|
-
<strong>
|
|
23
|
-
<p>
|
|
22
|
+
<strong>Standard section</strong>
|
|
23
|
+
<p>Centered content inside a MyPGS section.</p>
|
|
24
24
|
</div>
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
<div pgs="grid-2">
|
|
28
28
|
<article pgs="card flexColumnTexts">
|
|
29
|
-
<strong>
|
|
30
|
-
<p>
|
|
29
|
+
<strong>Column one</strong>
|
|
30
|
+
<p>First column content.</p>
|
|
31
31
|
</article>
|
|
32
32
|
|
|
33
33
|
<article pgs="card flexColumnTexts">
|
|
34
|
-
<strong>
|
|
35
|
-
<p>
|
|
34
|
+
<strong>Column two</strong>
|
|
35
|
+
<p>Second column content.</p>
|
|
36
36
|
</article>
|
|
37
37
|
</div>
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
<div pgs="grid-3">
|
|
41
41
|
<article pgs="card flexColumnTexts">
|
|
42
|
-
<strong>
|
|
43
|
-
<p>
|
|
42
|
+
<strong>Column one</strong>
|
|
43
|
+
<p>First column content.</p>
|
|
44
44
|
</article>
|
|
45
45
|
|
|
46
46
|
<article pgs="card flexColumnTexts">
|
|
47
|
-
<strong>
|
|
48
|
-
<p>
|
|
47
|
+
<strong>Column two</strong>
|
|
48
|
+
<p>Second column content.</p>
|
|
49
49
|
</article>
|
|
50
50
|
|
|
51
51
|
<article pgs="card flexColumnTexts">
|
|
52
|
-
<strong>
|
|
53
|
-
<p>
|
|
52
|
+
<strong>Column three</strong>
|
|
53
|
+
<p>Third column content.</p>
|
|
54
54
|
</article>
|
|
55
55
|
</div>
|
|
56
56
|
|
|
57
57
|
|
|
58
58
|
<div pgs="grid-4">
|
|
59
59
|
<article pgs="card flexColumnTexts">
|
|
60
|
-
<strong>
|
|
61
|
-
<p>
|
|
60
|
+
<strong>Column one</strong>
|
|
61
|
+
<p>First column content.</p>
|
|
62
62
|
</article>
|
|
63
63
|
|
|
64
64
|
<article pgs="card flexColumnTexts">
|
|
65
|
-
<strong>
|
|
66
|
-
<p>
|
|
65
|
+
<strong>Column two</strong>
|
|
66
|
+
<p>Second column content.</p>
|
|
67
67
|
</article>
|
|
68
68
|
|
|
69
69
|
<article pgs="card flexColumnTexts">
|
|
70
|
-
<strong>
|
|
71
|
-
<p>
|
|
70
|
+
<strong>Column three</strong>
|
|
71
|
+
<p>Third column content.</p>
|
|
72
72
|
</article>
|
|
73
73
|
<article pgs="card flexColumnTexts">
|
|
74
|
-
<strong>
|
|
75
|
-
<p>
|
|
74
|
+
<strong>Column four</strong>
|
|
75
|
+
<p>Fourth column content.</p>
|
|
76
76
|
</article>
|
|
77
77
|
</div>
|
|
78
78
|
|
|
79
79
|
<div pgs="grid-6">
|
|
80
80
|
<article pgs="card flexColumnTexts">
|
|
81
|
-
<strong>
|
|
82
|
-
<p>
|
|
81
|
+
<strong>Column one</strong>
|
|
82
|
+
<p>First column content.</p>
|
|
83
83
|
</article>
|
|
84
84
|
|
|
85
85
|
<article pgs="card flexColumnTexts">
|
|
86
|
-
<strong>
|
|
87
|
-
<p>
|
|
86
|
+
<strong>Column two</strong>
|
|
87
|
+
<p>Second column content.</p>
|
|
88
88
|
</article>
|
|
89
89
|
|
|
90
90
|
<article pgs="card flexColumnTexts">
|
|
91
|
-
<strong>
|
|
92
|
-
<p>
|
|
91
|
+
<strong>Column three</strong>
|
|
92
|
+
<p>Third column content.</p>
|
|
93
93
|
</article>
|
|
94
94
|
|
|
95
95
|
<article pgs="card flexColumnTexts">
|
|
96
|
-
<strong>
|
|
97
|
-
<p>
|
|
96
|
+
<strong>Column four</strong>
|
|
97
|
+
<p>Fourth column content.</p>
|
|
98
98
|
</article>
|
|
99
99
|
|
|
100
100
|
<article pgs="card flexColumnTexts">
|
|
101
|
-
<strong>
|
|
102
|
-
<p>
|
|
101
|
+
<strong>Column five</strong>
|
|
102
|
+
<p>Fifth column content.</p>
|
|
103
103
|
</article>
|
|
104
104
|
|
|
105
105
|
<article pgs="card flexColumnTexts">
|
|
106
|
-
<strong>
|
|
107
|
-
<p>
|
|
106
|
+
<strong>Column six</strong>
|
|
107
|
+
<p>Sixth column content.</p>
|
|
108
108
|
</article>
|
|
109
|
-
</div
|
|
109
|
+
</div
|
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
/**
|
|
3
3
|
* @title Header
|
|
4
|
-
* @description
|
|
4
|
+
* @description Responsive header that measures available space, switches between desktop and mobile content, and integrates menus, dark mode, and modal navigation.
|
|
5
5
|
*
|
|
6
6
|
* @pgs
|
|
7
|
-
* - header:
|
|
8
|
-
* - header-element:
|
|
9
|
-
* - header-element-alwaysOn:
|
|
10
|
-
* - header-element-onlyDesktop:
|
|
11
|
-
* - header-element-onlyMobile:
|
|
12
|
-
* - header-element-alwaysOnLast:
|
|
13
|
-
* - header-element-hamburger:
|
|
14
|
-
* - header-element-hamburger-button:
|
|
7
|
+
* - header: identifies the main header observed by the JavaScript module.
|
|
8
|
+
* - header-element: identifies the inner group measured to determine the switch to mobile mode.
|
|
9
|
+
* - header-element-alwaysOn: identifies the initial area that is always visible.
|
|
10
|
+
* - header-element-onlyDesktop: identifies content shown only while the desktop menu is active.
|
|
11
|
+
* - header-element-onlyMobile: identifies content shown only in mobile mode.
|
|
12
|
+
* - header-element-alwaysOnLast: identifies the final area that is always visible.
|
|
13
|
+
* - header-element-hamburger: identifies the mobile navigation group.
|
|
14
|
+
* - header-element-hamburger-button: identifies the header-specific hamburger control.
|
|
15
15
|
*
|
|
16
16
|
* @pgs-option
|
|
17
|
-
* - horizontal:
|
|
18
|
-
* - vertical:
|
|
19
|
-
* - menuHeader:
|
|
20
|
-
* - containerPGS:
|
|
21
|
-
* - right:
|
|
17
|
+
* - horizontal: arranges the related desktop menu horizontally.
|
|
18
|
+
* - vertical: arranges the related mobile menu vertically.
|
|
19
|
+
* - menuHeader: adapts both menus to the header context.
|
|
20
|
+
* - containerPGS: uses containerPGS[header] on the modal wrapper to move the dialog into the header.
|
|
21
|
+
* - right: presents the mobile navigation dialog content from the right side.
|
|
22
22
|
*
|
|
23
23
|
* @pgs-state
|
|
24
|
-
* - mobileActive:
|
|
24
|
+
* - mobileActive: is applied to header and header-element when their width or the viewport requires mobile navigation.
|
|
25
25
|
*
|
|
26
26
|
* @related
|
|
27
|
-
* - logo:
|
|
28
|
-
* - logo-text:
|
|
29
|
-
* - menu:
|
|
30
|
-
* - buttonIcon:
|
|
31
|
-
* - toggleDarkmode:
|
|
32
|
-
* - modal:
|
|
33
|
-
* - modal-button:
|
|
34
|
-
* - modal-close:
|
|
35
|
-
* - modal-dialog:
|
|
36
|
-
* - modal-dialog-content:
|
|
27
|
+
* - logo: inserts the brand into the initial area.
|
|
28
|
+
* - logo-text: uses the text variant of the logo.
|
|
29
|
+
* - menu: provides desktop and mobile navigation.
|
|
30
|
+
* - buttonIcon: presents theme and hamburger controls as icon buttons.
|
|
31
|
+
* - toggleDarkmode: connects the control to the global theme handler.
|
|
32
|
+
* - modal: provides opening and closing behavior for mobile navigation.
|
|
33
|
+
* - modal-button: opens the mobile panel.
|
|
34
|
+
* - modal-close: closes the mobile panel and shares the hamburger control.
|
|
35
|
+
* - modal-dialog: identifies the mobile navigation dialog.
|
|
36
|
+
* - modal-dialog-content: identifies the inner mobile navigation panel.
|
|
37
37
|
*
|
|
38
|
-
* @return
|
|
38
|
+
* @return Complete header HTML with desktop navigation and a side mobile panel.
|
|
39
39
|
*/
|
|
40
40
|
-->
|
|
41
41
|
|
|
@@ -48,10 +48,10 @@
|
|
|
48
48
|
</div>
|
|
49
49
|
|
|
50
50
|
<div pgs="header-element-onlyDesktop">
|
|
51
|
-
<nav pgs="menu" pgs-option="horizontal menuHeader" aria-label="
|
|
51
|
+
<nav pgs="menu" pgs-option="horizontal menuHeader" aria-label="Main menu">
|
|
52
52
|
<ul>
|
|
53
53
|
<li><a href="/">Home</a></li>
|
|
54
|
-
<li><a href="#
|
|
54
|
+
<li><a href="#components">Components</a></li>
|
|
55
55
|
<li><a href="#layout">Layout</a></li>
|
|
56
56
|
</ul>
|
|
57
57
|
</nav>
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
</div>
|
|
62
62
|
|
|
63
63
|
<div pgs="header-element-alwaysOnLast">
|
|
64
|
-
<button pgs="buttonIcon toggleDarkmode" type="button" aria-label="
|
|
64
|
+
<button pgs="buttonIcon toggleDarkmode" type="button" aria-label="Change theme">
|
|
65
65
|
<i class="fa-solid fa-moon"></i>
|
|
66
66
|
</button>
|
|
67
67
|
</div>
|
|
@@ -72,10 +72,10 @@
|
|
|
72
72
|
|
|
73
73
|
<dialog pgs="modal-dialog" pgs-option="right">
|
|
74
74
|
<div pgs="modal-dialog-content">
|
|
75
|
-
<nav pgs="menu" pgs-option="vertical menuHeader" aria-label="
|
|
75
|
+
<nav pgs="menu" pgs-option="vertical menuHeader" aria-label="Mobile menu">
|
|
76
76
|
<ul>
|
|
77
77
|
<li><a href="/">Home</a></li>
|
|
78
|
-
<li><a href="#
|
|
78
|
+
<li><a href="#components">Components</a></li>
|
|
79
79
|
<li><a href="#layout">Layout</a></li>
|
|
80
80
|
</ul>
|
|
81
81
|
</nav>
|
|
@@ -104,4 +104,4 @@
|
|
|
104
104
|
addPgsState(document.querySelector("[pgs~=header-element]"), "mobileActive");
|
|
105
105
|
}
|
|
106
106
|
</script>
|
|
107
|
-
</header>
|
|
107
|
+
</header>
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
/**
|
|
3
3
|
* @title Page Shell
|
|
4
|
-
* @description
|
|
4
|
+
* @description Responsive page layout that combines main content with zero, one, or two scrollable sidebars and adapts their width and position.
|
|
5
5
|
*
|
|
6
6
|
* @pgs
|
|
7
|
-
* - pageShell:
|
|
8
|
-
* - pageShell-aside:
|
|
9
|
-
* - pageShell-aside-scroll:
|
|
10
|
-
* - pageShell-content:
|
|
7
|
+
* - pageShell: identifies the container that calculates the main and aside composition.
|
|
8
|
+
* - pageShell-aside: identifies a sidebar that can be placed before or after the content.
|
|
9
|
+
* - pageShell-aside-scroll: identifies the inner area that can remain visible while scrolling.
|
|
10
|
+
* - pageShell-content: identifies the main page content.
|
|
11
11
|
*
|
|
12
12
|
* @related
|
|
13
|
-
* - flexColumnTexts:
|
|
14
|
-
* - flexColumnElements:
|
|
13
|
+
* - flexColumnTexts: organizes text contained in the sidebars.
|
|
14
|
+
* - flexColumnElements: vertically organizes elements in the main sections.
|
|
15
15
|
*
|
|
16
|
-
* @return
|
|
16
|
+
* @return Four page-shell HTML configurations with two, one, or no sidebars.
|
|
17
17
|
*/
|
|
18
18
|
-->
|
|
19
19
|
|
|
@@ -1,62 +1,62 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
/**
|
|
3
3
|
* @title Section
|
|
4
|
-
* @description
|
|
4
|
+
* @description Section variants that control width, padding, and specific content treatment while preserving shared vertical spacing.
|
|
5
5
|
*
|
|
6
6
|
* @pgs
|
|
7
|
-
* - section:
|
|
8
|
-
* - sectionFull:
|
|
9
|
-
* - sectionSpecificity:
|
|
10
|
-
* - sectionSpecificity-child:
|
|
11
|
-
* - sectionMax:
|
|
12
|
-
* - sectionNoPadding:
|
|
7
|
+
* - section: identifies the standard section with centered content.
|
|
8
|
+
* - sectionFull: identifies a section that spans the full available width.
|
|
9
|
+
* - sectionSpecificity: identifies a section that applies a specific structure to its child.
|
|
10
|
+
* - sectionSpecificity-child: identifies child content managed by the sectionSpecificity variant.
|
|
11
|
+
* - sectionMax: identifies a section with an extended maximum width.
|
|
12
|
+
* - sectionNoPadding: identifies a section without standard padding.
|
|
13
13
|
*
|
|
14
14
|
* @related
|
|
15
|
-
* - flexColumnSections:
|
|
16
|
-
* - flexColumnElements:
|
|
17
|
-
* - flexColumnTexts:
|
|
18
|
-
* - card-img:
|
|
19
|
-
* - imgCover:
|
|
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.
|
|
18
|
+
* - card-img: reuses card image treatment in the demonstration sections.
|
|
19
|
+
* - imgCover: scales images to the section width.
|
|
20
20
|
*
|
|
21
|
-
* @return
|
|
21
|
+
* @return HTML collection of the available section variants.
|
|
22
22
|
*/
|
|
23
23
|
-->
|
|
24
24
|
|
|
25
25
|
<div pgs="flexColumnSections">
|
|
26
26
|
<section pgs="section flexColumnElements">
|
|
27
27
|
<div pgs="flexColumnTexts">
|
|
28
|
-
<strong>
|
|
29
|
-
<p>
|
|
28
|
+
<strong>Standard section</strong>
|
|
29
|
+
<p>Centered content inside a MyPGS section.</p>
|
|
30
30
|
</div>
|
|
31
31
|
</section>
|
|
32
32
|
|
|
33
33
|
<section pgs="sectionFull flexColumnElements">
|
|
34
34
|
<div pgs="flexColumnTexts">
|
|
35
|
-
<strong>
|
|
36
|
-
<p>
|
|
35
|
+
<strong>Full-width section</strong>
|
|
36
|
+
<p>Centered content inside a MyPGS section.</p>
|
|
37
37
|
</div>
|
|
38
38
|
</section>
|
|
39
39
|
|
|
40
40
|
<section pgs="sectionSpecificity flexColumnElements">
|
|
41
41
|
<div pgs="flexColumnTexts">
|
|
42
|
-
<img pgs="card-img imgCover" src="https://placehold.co/800x200?text=Hero" alt="
|
|
42
|
+
<img pgs="card-img imgCover" src="https://placehold.co/800x200?text=Hero" alt="Placeholder image">
|
|
43
43
|
</div>
|
|
44
44
|
<div pgs="sectionSpecificity-child flexColumnTexts">
|
|
45
|
-
<strong>
|
|
46
|
-
<p>
|
|
45
|
+
<strong>Specificity-child section</strong>
|
|
46
|
+
<p>Centered content inside a MyPGS section.</p>
|
|
47
47
|
</div>
|
|
48
48
|
</section>
|
|
49
49
|
|
|
50
50
|
<section pgs="sectionMax flexColumnElements" style="background-color: var(--color-primary-soft)">
|
|
51
51
|
<div pgs="flexColumnTexts">
|
|
52
|
-
<strong>
|
|
53
|
-
<p>
|
|
52
|
+
<strong>Max-width section</strong>
|
|
53
|
+
<p>Centered content inside a MyPGS section.</p>
|
|
54
54
|
</div>
|
|
55
55
|
</section>
|
|
56
56
|
|
|
57
57
|
<section pgs="sectionNoPadding flexColumnElements">
|
|
58
58
|
<div pgs="flexColumnTexts">
|
|
59
|
-
<img pgs="card-img imgCover" src="https://placehold.co/800x500?text=HI!" alt="
|
|
59
|
+
<img pgs="card-img imgCover" src="https://placehold.co/800x500?text=HI!" alt="Placeholder image">
|
|
60
60
|
</div>
|
|
61
61
|
</section>
|
|
62
|
-
</div>
|
|
62
|
+
</div>
|
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
/**
|
|
3
3
|
* @title Cookie Consent
|
|
4
|
-
* @description
|
|
4
|
+
* @description Accessible pattern for collecting and storing analytics cookie consent, applying preferences, and loading Google Analytics only when authorized.
|
|
5
5
|
*
|
|
6
6
|
* @pgs
|
|
7
|
-
* - cookieConsent:
|
|
8
|
-
* - cookieConsent-panel:
|
|
9
|
-
* - cookieConsent-featureEssential:
|
|
10
|
-
* - cookieConsent-panel-badge:
|
|
11
|
-
* - cookieConsent-featureAnalytics:
|
|
12
|
-
* - cookieConsent-toggleAnalytics:
|
|
13
|
-
* - cookieConsent-actionReject:
|
|
14
|
-
* - cookieConsent-actionAccept:
|
|
15
|
-
* - cookieConsent-actionOpen:
|
|
16
|
-
* - cookieConsent-gaUnavailable: token
|
|
17
|
-
* - cookieConsent-accepted: token
|
|
18
|
-
* - cookieConsent-declined: token
|
|
7
|
+
* - cookieConsent: identifies the main panel initialized by the JavaScript pattern.
|
|
8
|
+
* - cookieConsent-panel: identifies the configurable preference group.
|
|
9
|
+
* - cookieConsent-featureEssential: identifies the row of always-active essential cookies.
|
|
10
|
+
* - cookieConsent-panel-badge: identifies the essential-cookie status indicator.
|
|
11
|
+
* - cookieConsent-featureAnalytics: identifies the optional analytics-cookie row.
|
|
12
|
+
* - cookieConsent-toggleAnalytics: identifies the control that enables analytics consent.
|
|
13
|
+
* - cookieConsent-actionReject: applies selected preferences without automatically accepting analytics.
|
|
14
|
+
* - cookieConsent-actionAccept: accepts all available cookies.
|
|
15
|
+
* - cookieConsent-actionOpen: identifies external controls that reopen the preference panel.
|
|
16
|
+
* - cookieConsent-gaUnavailable: runtime token applied to the root when no usable measurement ID is available.
|
|
17
|
+
* - cookieConsent-accepted: runtime token applied to the root when analytics is allowed.
|
|
18
|
+
* - cookieConsent-declined: runtime token applied to the root when analytics is not allowed.
|
|
19
19
|
*
|
|
20
20
|
* @related
|
|
21
|
-
* - flexColumn:
|
|
22
|
-
* - flexRow:
|
|
23
|
-
* - nowrap:
|
|
24
|
-
* - toggle:
|
|
25
|
-
* - button:
|
|
26
|
-
* - buttonStrong:
|
|
21
|
+
* - flexColumn: vertically organizes the preference panel.
|
|
22
|
+
* - flexRow: arranges panel rows and actions.
|
|
23
|
+
* - nowrap: prevents wrapping in the essential-cookie row.
|
|
24
|
+
* - toggle: presents analytics consent as a switch.
|
|
25
|
+
* - button: presents the selection action with standard styling.
|
|
26
|
+
* - buttonStrong: presents full acceptance as the primary action.
|
|
27
27
|
*
|
|
28
|
-
* @return
|
|
28
|
+
* @return Consent panel HTML with essential and analytics preferences, actions, and accessible attributes.
|
|
29
29
|
*/
|
|
30
30
|
-->
|
|
31
31
|
|
|
32
32
|
<section id="pgs-cookieConsent" pgs="cookieConsent" role="dialog" aria-modal="true" data-ga-id="G-XXXXXXXXXX" hidden tabindex="-1">
|
|
33
|
-
<p><i class="fa-duotone fa-solid fa-cookie-bite"></i>
|
|
34
|
-
<h2>
|
|
33
|
+
<p><i class="fa-duotone fa-solid fa-cookie-bite"></i> Cookies and privacy <br></p>
|
|
34
|
+
<h2>Your privacy comes first</h2>
|
|
35
35
|
|
|
36
36
|
<p>
|
|
37
|
-
|
|
38
|
-
<strong>Google Analytics</strong>
|
|
39
|
-
|
|
37
|
+
We use essential cookies to provide the service and, with your consent, analytics cookies from
|
|
38
|
+
<strong>Google Analytics</strong> to measure traffic anonymously and improve our content.
|
|
39
|
+
You can change your choice at any time.
|
|
40
40
|
</p>
|
|
41
41
|
|
|
42
42
|
<p>
|
|
@@ -44,17 +44,17 @@
|
|
|
44
44
|
<a href="/cookie-policy/" target="_blank" rel="noopener">Cookie Policy</a>
|
|
45
45
|
</p>
|
|
46
46
|
|
|
47
|
-
<div pgs="cookieConsent-panel flexColumn" role="group" aria-label="
|
|
47
|
+
<div pgs="cookieConsent-panel flexColumn" role="group" aria-label="Cookie preferences">
|
|
48
48
|
<div pgs="flexRow nowrap cookieConsent-featureEssential">
|
|
49
49
|
<div>
|
|
50
50
|
<p>
|
|
51
|
-
<strong>
|
|
51
|
+
<strong>Essential cookies</strong>
|
|
52
52
|
<br>
|
|
53
|
-
<small>
|
|
53
|
+
<small>Always active to ensure the website works correctly.</small>
|
|
54
54
|
</p>
|
|
55
55
|
</div>
|
|
56
56
|
|
|
57
|
-
<span pgs="cookieConsent-panel-badge">
|
|
57
|
+
<span pgs="cookieConsent-panel-badge">Active</span>
|
|
58
58
|
</div>
|
|
59
59
|
|
|
60
60
|
<div pgs="flexRow cookieConsent-featureAnalytics">
|
|
@@ -62,21 +62,21 @@
|
|
|
62
62
|
<p>
|
|
63
63
|
<strong>Analytics</strong>
|
|
64
64
|
<br>
|
|
65
|
-
<small>
|
|
65
|
+
<small>Browsing data collected in aggregate form for anonymous statistics.</small>
|
|
66
66
|
</p>
|
|
67
67
|
|
|
68
|
-
<input type="checkbox" pgs="cookieConsent-toggleAnalytics" aria-label="
|
|
68
|
+
<input type="checkbox" pgs="cookieConsent-toggleAnalytics" aria-label="Enable Google Analytics">
|
|
69
69
|
</label>
|
|
70
70
|
</div>
|
|
71
71
|
</div>
|
|
72
72
|
|
|
73
73
|
<div pgs="flexRow">
|
|
74
74
|
<button type="button" pgs="button cookieConsent-actionReject">
|
|
75
|
-
<i class="fa-solid fa-duotone fa-sliders"></i>
|
|
75
|
+
<i class="fa-solid fa-duotone fa-sliders"></i>Selected only
|
|
76
76
|
</button>
|
|
77
77
|
|
|
78
78
|
<button type="button" pgs="buttonStrong cookieConsent-actionAccept">
|
|
79
|
-
<i class="fa-solid fa-check"></i>
|
|
79
|
+
<i class="fa-solid fa-check"></i> Accept all
|
|
80
80
|
</button>
|
|
81
81
|
</div>
|
|
82
82
|
</section>
|
|
@@ -4,22 +4,22 @@ export default function Accordion() {
|
|
|
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>
|
|
7
|
-
<span>
|
|
7
|
+
<span>Frequently asked question</span>
|
|
8
8
|
</button>
|
|
9
9
|
|
|
10
10
|
<div pgs="accordion-content" hidden>
|
|
11
|
-
<p>
|
|
11
|
+
<p>Example answer with reusable text content.</p>
|
|
12
12
|
</div>
|
|
13
13
|
</li>
|
|
14
14
|
|
|
15
15
|
<li pgs="accordion">
|
|
16
16
|
<button pgs="accordion-button" type="button">
|
|
17
17
|
<i className="fa-solid fa-circle-info" aria-hidden="true"></i>
|
|
18
|
-
<span>
|
|
18
|
+
<span>Second section</span>
|
|
19
19
|
</button>
|
|
20
20
|
|
|
21
21
|
<div pgs="accordion-content" hidden>
|
|
22
|
-
<p>
|
|
22
|
+
<p>Additional accordion panel content.</p>
|
|
23
23
|
</div>
|
|
24
24
|
</li>
|
|
25
25
|
</ul>
|