mypgs 2.0.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscode/tasks.json +39 -0
- package/AGENTS.md +22 -21
- package/README.md +25 -25
- package/assets/javascript/components/_menu.js +2 -1
- package/assets/javascript/components/_modals.js +1 -1
- package/assets/javascript/components/_notifications.js +2 -1
- package/assets/javascript/components/_slides.js +2 -2
- package/assets/scss/base/_body.scss +5 -5
- package/assets/scss/base/_general.scss +27 -18
- package/assets/scss/base/_variables.scss +1 -1
- package/assets/scss/components/_accordion.scss +9 -9
- package/assets/scss/components/_alerts.scss +71 -0
- package/assets/scss/components/_badges.scss +40 -48
- package/assets/scss/components/_button.scss +28 -20
- package/assets/scss/components/_card.scss +9 -4
- package/assets/scss/components/_form.scss +0 -16
- package/assets/scss/components/_formAddon.scss +22 -0
- package/assets/scss/components/_logo.scss +3 -4
- package/assets/scss/components/_menu.scss +26 -3
- package/assets/scss/components/_modals.scss +6 -4
- package/assets/scss/components/_search.scss +2 -2
- package/assets/scss/components/_slides.scss +0 -1
- package/assets/scss/components/_stepTabs.scss +2 -1
- package/assets/scss/components/_tooltip.scss +0 -1
- package/assets/scss/index.scss +3 -3
- package/assets/scss/layout/_footer.scss +0 -2
- package/assets/scss/layout/_header.scss +10 -2
- package/assets/scss/layout/_pageShell.scss +6 -2
- package/assets/scss/layout/_responsive.scss +63 -0
- package/assets/scss/mixin/_mx-base.scss +4 -8
- package/assets/scss/mixin/_mx-button.scss +73 -115
- package/assets/scss/mixin/_mx-card.scss +39 -40
- package/assets/scss/mixin/_mx-form.scss +13 -10
- package/assets/scss/mixin/{_mx-form-addon.scss → _mx-formAddon.scss} +103 -64
- package/assets/scss/mixin/_mx-hover.scss +81 -0
- package/assets/scss/mixin/_mx-responsive.scss +81 -201
- package/assets/scss/mixin/_settings.scss +2 -1
- package/assets/scss/mixin/mixin.scss +2 -1
- package/demo/demo.css +9 -6
- package/demo/demo.html +7 -5
- package/demo/demo.js +37 -34
- package/dist/css/index.css +2469 -3825
- package/dist/css/index.css.map +1 -1
- package/dist/css/index.min.css +1 -1
- package/dist/javascript/index.js +7 -5
- package/dist/javascript/index.js.map +1 -1
- package/dist/javascript/index.min.js +1 -1
- package/docs/componenti-e-markup.md +9 -8
- package/docs/components/accordion.md +23 -23
- package/docs/components/alerts.md +67 -0
- package/docs/components/badges.md +29 -26
- package/docs/components/breadcumbs.md +8 -8
- package/docs/components/button.md +18 -18
- package/docs/components/card.md +25 -22
- package/docs/components/dropdown.md +29 -29
- package/docs/components/form.md +65 -41
- package/docs/components/formAddon.md +116 -0
- package/docs/components/logo.md +11 -11
- package/docs/components/menu.md +20 -20
- package/docs/components/modal.md +52 -51
- package/docs/components/notification.md +34 -34
- package/docs/components/search.md +54 -52
- package/docs/components/slides.md +41 -42
- package/docs/components/stepTabs.md +45 -45
- 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 +24 -23
- package/docs/convenzioni.md +11 -11
- package/docs/export-e-sviluppo.md +4 -4
- package/docs/helper-javascript.md +8 -8
- package/docs/layout/body.md +11 -11
- package/docs/layout/footer.md +28 -24
- package/docs/layout/header.md +36 -35
- package/docs/layout/pageShell.md +19 -19
- package/docs/layout/responsive.md +90 -0
- package/docs/layout/section.md +38 -38
- package/docs/patterns/cookieConsent.md +42 -39
- package/docs/utilizzo-css-scss.md +33 -9
- package/package.json +1 -1
- package/reference/html/components/accordion.html +52 -0
- package/reference/html/components/alerts.html +59 -0
- package/reference/html/components/badges.html +62 -0
- package/{templates → reference}/html/components/breadcumbs.html +6 -6
- package/reference/html/components/button.html +51 -0
- package/reference/html/components/card.html +45 -0
- package/{templates → reference}/html/components/dropdown.html +25 -25
- package/reference/html/components/form.html +128 -0
- package/reference/html/components/formAddon.html +109 -0
- package/reference/html/components/logo.html +28 -0
- package/{templates → reference}/html/components/menu.html +17 -17
- package/reference/html/components/modal.html +123 -0
- package/reference/html/components/notification.html +71 -0
- package/reference/html/components/search.html +109 -0
- package/reference/html/components/slides.html +75 -0
- package/reference/html/components/stepTabs.html +83 -0
- package/reference/html/components/steps.html +49 -0
- package/reference/html/components/summary.html +41 -0
- package/{templates → reference}/html/components/table.html +5 -5
- package/reference/html/components/tooltip.html +44 -0
- package/reference/html/layout/body.html +34 -0
- package/reference/html/layout/footer.html +67 -0
- package/reference/html/layout/header.html +108 -0
- package/{templates → reference}/html/layout/pageShell.html +16 -16
- package/reference/html/layout/responsive.html +83 -0
- package/reference/html/layout/section.html +62 -0
- package/reference/html/patterns/cookieConsent.html +84 -0
- package/{templates → reference}/react/components/accordion.jsx +5 -5
- package/reference/react/components/alerts.jsx +46 -0
- package/{templates → reference}/react/components/breadcumbs.jsx +1 -1
- package/{templates → reference}/react/components/button.jsx +6 -6
- package/{templates → reference}/react/components/card.jsx +6 -6
- package/{templates → reference}/react/components/dropdown.jsx +8 -8
- package/{templates → reference}/react/components/form.jsx +3 -3
- package/{templates → reference}/react/components/modal.jsx +15 -15
- package/{templates → reference}/react/components/notification.jsx +3 -3
- package/{templates → reference}/react/components/search.jsx +8 -8
- package/{templates → reference}/react/components/slides.jsx +4 -4
- package/{templates → reference}/react/components/stepTabs.jsx +12 -12
- package/reference/react/components/summary.jsx +18 -0
- package/{templates → reference}/react/components/table.jsx +2 -2
- package/{templates → reference}/react/components/tooltip.jsx +1 -1
- package/{templates → reference}/react/layout/pageShell.jsx +2 -2
- package/reference/react/layout/responsive.jsx +61 -0
- package/reference/react/layout/section.jsx +44 -0
- package/{templates → reference}/react/patterns/cookieConsent.jsx +9 -9
- package/{templates → reference}/react/patterns/footer.jsx +4 -4
- package/{templates → reference}/react/patterns/header.jsx +4 -4
- package/scripts/generate-component-docs.js +12 -12
- package/assets/scss/layout/_flex.scss +0 -49
- package/assets/scss/layout/_gap.scss +0 -21
- package/assets/scss/layout/_grid.scss +0 -13
- package/docs/layout/flex.md +0 -116
- package/docs/layout/grid.md +0 -116
- package/templates/html/components/accordion.html +0 -52
- package/templates/html/components/badges.html +0 -60
- package/templates/html/components/button.html +0 -51
- package/templates/html/components/card.html +0 -43
- package/templates/html/components/form.html +0 -104
- package/templates/html/components/logo.html +0 -28
- package/templates/html/components/modal.html +0 -122
- package/templates/html/components/notification.html +0 -71
- package/templates/html/components/search.html +0 -107
- package/templates/html/components/slides.html +0 -76
- package/templates/html/components/stepTabs.html +0 -83
- package/templates/html/components/steps.html +0 -49
- package/templates/html/components/summary.html +0 -41
- package/templates/html/components/tooltip.html +0 -43
- package/templates/html/layout/body.html +0 -35
- package/templates/html/layout/flex.html +0 -109
- package/templates/html/layout/footer.html +0 -64
- package/templates/html/layout/grid.html +0 -109
- package/templates/html/layout/header.html +0 -107
- package/templates/html/layout/section.html +0 -62
- package/templates/html/patterns/cookieConsent.html +0 -82
- package/templates/react/components/summary.jsx +0 -18
- package/templates/react/layout/flex.jsx +0 -36
- package/templates/react/layout/grid.jsx +0 -36
- package/templates/react/layout/section.jsx +0 -44
- /package/{templates → reference}/react/components/logo.jsx +0 -0
- /package/{templates → reference}/react/components/menu.jsx +0 -0
- /package/{templates → reference}/react/components/steps.jsx +0 -0
- /package/{templates → reference}/react/layout/body.jsx +0 -0
|
@@ -1,33 +1,33 @@
|
|
|
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
|
-
* -
|
|
14
|
-
* -
|
|
13
|
+
* - flexColumn: organizes text contained in the sidebars.
|
|
14
|
+
* - gapElements: applies element spacing 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
|
|
|
20
20
|
<div pgs="pageShell">
|
|
21
21
|
<aside pgs="pageShell-aside">
|
|
22
22
|
<div pgs="pageShell-aside-scroll">
|
|
23
|
-
<div pgs="
|
|
23
|
+
<div pgs="flexColumn">
|
|
24
24
|
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ab modi ut sunt est illum accusantium dolores eum aut cum itaque.</p>
|
|
25
25
|
</div>
|
|
26
26
|
</div>
|
|
27
27
|
</aside>
|
|
28
28
|
|
|
29
29
|
<main pgs="pageShell-content">
|
|
30
|
-
<section pgs="
|
|
30
|
+
<section pgs="flexColumn gapElements" id="sezione-uno">
|
|
31
31
|
<strong>Lorem ipsum</strong>
|
|
32
32
|
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quidem dolore veniam nulla hic voluptatum harum illo voluptatem quos. Id quibusdam nemo, mollitia iusto quisquam tenetur doloremque corrupti natus nisi est sed consectetur deserunt? Fugiat consectetur iure aut id voluptate unde autem eius facilis dolorum? Eveniet, sit, excepturi iusto porro eos temporibus illum non ut sunt ex aut earum neque. Iure harum similique autem commodi ratione enim quisquam soluta rem, eius dolor officiis necessitatibus voluptatibus obcaecati vel sint iusto. Eligendi reiciendis aut error rem? Hic aliquid tenetur porro itaque quaerat excepturi consequatur veniam, et alias molestiae, eius odio quae maiores suscipit iure voluptatibus sed dolor facere ipsa quod libero necessitatibus, placeat natus. Doloribus esse nobis culpa ab ut dolorem id expedita nesciunt necessitatibus ipsam natus accusantium eius eveniet eum, distinctio quos modi perspiciatis earum sequi nostrum consequatur quibusdam? Blanditiis iusto possimus officia odio animi repudiandae? Repellendus autem ut soluta facere accusamus magni aut architecto cumque cupiditate. Nostrum officiis, tenetur consequuntur quaerat alias animi debitis? Quae quas placeat iure alias totam quaerat fugit recusandae sed, earum ipsa nihil molestiae quam odit itaque, odio asperiores, mollitia porro ratione tempora laboriosam. Incidunt aliquam nobis sunt ut molestiae nam animi placeat neque vero ratione? Eaque?</p>
|
|
33
33
|
</section>
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
|
|
36
36
|
<aside pgs="pageShell-aside">
|
|
37
37
|
<div pgs="pageShell-aside-scroll">
|
|
38
|
-
<div pgs="
|
|
38
|
+
<div pgs="flexColumn">
|
|
39
39
|
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ab modi ut sunt est illum accusantium dolores eum aut cum itaque.</p>
|
|
40
40
|
</div>
|
|
41
41
|
</div>
|
|
@@ -44,14 +44,14 @@
|
|
|
44
44
|
<div pgs="pageShell">
|
|
45
45
|
<aside pgs="pageShell-aside">
|
|
46
46
|
<div pgs="pageShell-aside-scroll">
|
|
47
|
-
<div pgs="
|
|
47
|
+
<div pgs="flexColumn">
|
|
48
48
|
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ab modi ut sunt est illum accusantium dolores eum aut cum itaque.</p>
|
|
49
49
|
</div>
|
|
50
50
|
</div>
|
|
51
51
|
</aside>
|
|
52
52
|
|
|
53
53
|
<main pgs="pageShell-content">
|
|
54
|
-
<section pgs="
|
|
54
|
+
<section pgs="flexColumn gapElements" id="sezione-uno">
|
|
55
55
|
<strong>Lorem ipsum</strong>
|
|
56
56
|
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quidem dolore veniam nulla hic voluptatum harum illo voluptatem quos. Id quibusdam nemo, mollitia iusto quisquam tenetur doloremque corrupti natus nisi est sed consectetur deserunt? Fugiat consectetur iure aut id voluptate unde autem eius facilis dolorum? Eveniet, sit, excepturi iusto porro eos temporibus illum non ut sunt ex aut earum neque. Iure harum similique autem commodi ratione enim quisquam soluta rem, eius dolor officiis necessitatibus voluptatibus obcaecati vel sint iusto. Eligendi reiciendis aut error rem? Hic aliquid tenetur porro itaque quaerat excepturi consequatur veniam, et alias molestiae, eius odio quae maiores suscipit iure voluptatibus sed dolor facere ipsa quod libero necessitatibus, placeat natus. Doloribus esse nobis culpa ab ut dolorem id expedita nesciunt necessitatibus ipsam natus accusantium eius eveniet eum, distinctio quos modi perspiciatis earum sequi nostrum consequatur quibusdam? Blanditiis iusto possimus officia odio animi repudiandae? Repellendus autem ut soluta facere accusamus magni aut architecto cumque cupiditate. Nostrum officiis, tenetur consequuntur quaerat alias animi debitis? Quae quas placeat iure alias totam quaerat fugit recusandae sed, earum ipsa nihil molestiae quam odit itaque, odio asperiores, mollitia porro ratione tempora laboriosam. Incidunt aliquam nobis sunt ut molestiae nam animi placeat neque vero ratione? Eaque?</p>
|
|
57
57
|
</section>
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
<div pgs="pageShell">
|
|
62
62
|
|
|
63
63
|
<main pgs="pageShell-content">
|
|
64
|
-
<section pgs="
|
|
64
|
+
<section pgs="flexColumn gapElements" id="sezione-uno">
|
|
65
65
|
<strong>Lorem ipsum</strong>
|
|
66
66
|
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quidem dolore veniam nulla hic voluptatum harum illo voluptatem quos. Id quibusdam nemo, mollitia iusto quisquam tenetur doloremque corrupti natus nisi est sed consectetur deserunt? Fugiat consectetur iure aut id voluptate unde autem eius facilis dolorum? Eveniet, sit, excepturi iusto porro eos temporibus illum non ut sunt ex aut earum neque. Iure harum similique autem commodi ratione enim quisquam soluta rem, eius dolor officiis necessitatibus voluptatibus obcaecati vel sint iusto. Eligendi reiciendis aut error rem? Hic aliquid tenetur porro itaque quaerat excepturi consequatur veniam, et alias molestiae, eius odio quae maiores suscipit iure voluptatibus sed dolor facere ipsa quod libero necessitatibus, placeat natus. Doloribus esse nobis culpa ab ut dolorem id expedita nesciunt necessitatibus ipsam natus accusantium eius eveniet eum, distinctio quos modi perspiciatis earum sequi nostrum consequatur quibusdam? Blanditiis iusto possimus officia odio animi repudiandae? Repellendus autem ut soluta facere accusamus magni aut architecto cumque cupiditate. Nostrum officiis, tenetur consequuntur quaerat alias animi debitis? Quae quas placeat iure alias totam quaerat fugit recusandae sed, earum ipsa nihil molestiae quam odit itaque, odio asperiores, mollitia porro ratione tempora laboriosam. Incidunt aliquam nobis sunt ut molestiae nam animi placeat neque vero ratione? Eaque?</p>
|
|
67
67
|
</section>
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
|
|
70
70
|
<aside pgs="pageShell-aside">
|
|
71
71
|
<div pgs="pageShell-aside-scroll">
|
|
72
|
-
<div pgs="
|
|
72
|
+
<div pgs="flexColumn">
|
|
73
73
|
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ab modi ut sunt est illum accusantium dolores eum aut cum itaque.</p>
|
|
74
74
|
</div>
|
|
75
75
|
</div>
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
<div pgs="pageShell">
|
|
80
80
|
|
|
81
81
|
<main pgs="pageShell-content">
|
|
82
|
-
<section pgs="
|
|
82
|
+
<section pgs="flexColumn gapElements" id="sezione-uno">
|
|
83
83
|
<strong>Lorem ipsum</strong>
|
|
84
84
|
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quidem dolore veniam nulla hic voluptatum harum illo voluptatem quos. Id quibusdam nemo, mollitia iusto quisquam tenetur doloremque corrupti natus nisi est sed consectetur deserunt? Fugiat consectetur iure aut id voluptate unde autem eius facilis dolorum? Eveniet, sit, excepturi iusto porro eos temporibus illum non ut sunt ex aut earum neque. Iure harum similique autem commodi ratione enim quisquam soluta rem, eius dolor officiis necessitatibus voluptatibus obcaecati vel sint iusto. Eligendi reiciendis aut error rem? Hic aliquid tenetur porro itaque quaerat excepturi consequatur veniam, et alias molestiae, eius odio quae maiores suscipit iure voluptatibus sed dolor facere ipsa quod libero necessitatibus, placeat natus. Doloribus esse nobis culpa ab ut dolorem id expedita nesciunt necessitatibus ipsam natus accusantium eius eveniet eum, distinctio quos modi perspiciatis earum sequi nostrum consequatur quibusdam? Blanditiis iusto possimus officia odio animi repudiandae? Repellendus autem ut soluta facere accusamus magni aut architecto cumque cupiditate. Nostrum officiis, tenetur consequuntur quaerat alias animi debitis? Quae quas placeat iure alias totam quaerat fugit recusandae sed, earum ipsa nihil molestiae quam odit itaque, odio asperiores, mollitia porro ratione tempora laboriosam. Incidunt aliquam nobis sunt ut molestiae nam animi placeat neque vero ratione? Eaque?</p>
|
|
85
85
|
</section>
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
/**
|
|
3
|
+
* @title Responsive
|
|
4
|
+
* @description Responsive flex and grid layouts with configurable columns, spacing utilities, and wrapping controls.
|
|
5
|
+
*
|
|
6
|
+
* @pgs
|
|
7
|
+
* - flex: creates a responsive flex layout.
|
|
8
|
+
* - grid: creates a responsive grid layout.
|
|
9
|
+
* - flexColumn: stacks text inside each demonstration cell.
|
|
10
|
+
* - flexRow: arranges the gap demonstration items horizontally.
|
|
11
|
+
* - gapTexts: applies the text spacing token.
|
|
12
|
+
* - gapElements: applies the element spacing token.
|
|
13
|
+
* - gapSections: applies the section spacing token.
|
|
14
|
+
* - wrap: allows flex items to wrap.
|
|
15
|
+
* - nowrap: prevents flex items from wrapping.
|
|
16
|
+
* - box: makes the demonstration cells visible.
|
|
17
|
+
*
|
|
18
|
+
* @pgs-option
|
|
19
|
+
* - column-2: configures the flex example with two columns; column values from 1 through 8 are supported.
|
|
20
|
+
* - column-4: configures the grid example with four columns; column values from 1 through 8 are supported.
|
|
21
|
+
* - m2e: keeps two elements per row at the mobile breakpoint, returning to one column on watch-sized containers.
|
|
22
|
+
*
|
|
23
|
+
* @return Flex, grid, and gap examples in that order, using the current responsive layout API.
|
|
24
|
+
*/
|
|
25
|
+
-->
|
|
26
|
+
|
|
27
|
+
<div pgs="flexColumn gapSections">
|
|
28
|
+
<section>
|
|
29
|
+
<strong>Flex</strong>
|
|
30
|
+
<div pgs="flexRow" pgs-option="column-2 m2e">
|
|
31
|
+
<article pgs="box flexColumn">
|
|
32
|
+
<strong>Column one</strong>
|
|
33
|
+
<p>First flex column.</p>
|
|
34
|
+
</article>
|
|
35
|
+
<article pgs="box flexColumn">
|
|
36
|
+
<strong>Column two</strong>
|
|
37
|
+
<p>Second flex column.</p>
|
|
38
|
+
</article>
|
|
39
|
+
<article pgs="box flexColumn">
|
|
40
|
+
<strong>Column three</strong>
|
|
41
|
+
<p>Third flex column.</p>
|
|
42
|
+
</article>
|
|
43
|
+
</div>
|
|
44
|
+
</section>
|
|
45
|
+
|
|
46
|
+
<section>
|
|
47
|
+
<strong>Grid</strong>
|
|
48
|
+
<div pgs="grid" pgs-option="column-4 m2e">
|
|
49
|
+
<article pgs="box flexColumn">
|
|
50
|
+
<strong>Column one</strong>
|
|
51
|
+
<p>First grid column.</p>
|
|
52
|
+
</article>
|
|
53
|
+
<article pgs="box flexColumn">
|
|
54
|
+
<strong>Column two</strong>
|
|
55
|
+
<p>Second grid column.</p>
|
|
56
|
+
</article>
|
|
57
|
+
<article pgs="box flexColumn">
|
|
58
|
+
<strong>Column three</strong>
|
|
59
|
+
<p>Third grid column.</p>
|
|
60
|
+
</article>
|
|
61
|
+
<article pgs="box flexColumn">
|
|
62
|
+
<strong>Column four</strong>
|
|
63
|
+
<p>Third grid column.</p>
|
|
64
|
+
</article>
|
|
65
|
+
</div>
|
|
66
|
+
</section>
|
|
67
|
+
|
|
68
|
+
<section pgs="flexRow">
|
|
69
|
+
<strong>Gap</strong>
|
|
70
|
+
<div pgs="flexRow gapTexts wrap">
|
|
71
|
+
<span pgs="box">Text gap</span>
|
|
72
|
+
<span pgs="box">Text gap</span>
|
|
73
|
+
</div>
|
|
74
|
+
<div pgs="flexRow gapElements wrap">
|
|
75
|
+
<span pgs="box">Element gap</span>
|
|
76
|
+
<span pgs="box">Element gap</span>
|
|
77
|
+
</div>
|
|
78
|
+
<div pgs="flexRow gapSections nowrap">
|
|
79
|
+
<span pgs="box">Section gap</span>
|
|
80
|
+
<span pgs="box">Section gap</span>
|
|
81
|
+
</div>
|
|
82
|
+
</section>
|
|
83
|
+
</div>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
/**
|
|
3
|
+
* @title Section
|
|
4
|
+
* @description Section variants that control width, padding, and specific content treatment while preserving shared vertical spacing.
|
|
5
|
+
*
|
|
6
|
+
* @pgs
|
|
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
|
+
*
|
|
14
|
+
* @related
|
|
15
|
+
* - flexColumn: vertically organizes sections and inner content.
|
|
16
|
+
* - gapSections: applies section spacing to the outer collection.
|
|
17
|
+
* - gapElements: applies element spacing inside each section.
|
|
18
|
+
* - card-img: reuses card image treatment in the demonstration sections.
|
|
19
|
+
* - imgCover: scales images to the section width.
|
|
20
|
+
*
|
|
21
|
+
* @return HTML collection of the available section variants.
|
|
22
|
+
*/
|
|
23
|
+
-->
|
|
24
|
+
|
|
25
|
+
<div pgs="flexColumn gapSections">
|
|
26
|
+
<section pgs="section flexColumn gapElements">
|
|
27
|
+
<div pgs="flexColumn">
|
|
28
|
+
<strong>Standard section</strong>
|
|
29
|
+
<p>Centered content inside a MyPGS section.</p>
|
|
30
|
+
</div>
|
|
31
|
+
</section>
|
|
32
|
+
|
|
33
|
+
<section pgs="sectionFull flexColumn gapElements">
|
|
34
|
+
<div pgs="flexColumn">
|
|
35
|
+
<strong>Full-width section</strong>
|
|
36
|
+
<p>Centered content inside a MyPGS section.</p>
|
|
37
|
+
</div>
|
|
38
|
+
</section>
|
|
39
|
+
|
|
40
|
+
<section pgs="sectionSpecificity flexColumn gapElements">
|
|
41
|
+
<div pgs="flexColumn">
|
|
42
|
+
<img pgs="card-img imgCover" src="https://placehold.co/800x200?text=Hero" alt="Placeholder image">
|
|
43
|
+
</div>
|
|
44
|
+
<div pgs="sectionSpecificity-child flexColumn">
|
|
45
|
+
<strong>Specificity-child section</strong>
|
|
46
|
+
<p>Centered content inside a MyPGS section.</p>
|
|
47
|
+
</div>
|
|
48
|
+
</section>
|
|
49
|
+
|
|
50
|
+
<section pgs="sectionMax flexColumn gapElements" style="background-color: var(--color-primary-soft)">
|
|
51
|
+
<div pgs="flexColumn">
|
|
52
|
+
<strong>Max-width section</strong>
|
|
53
|
+
<p>Centered content inside a MyPGS section.</p>
|
|
54
|
+
</div>
|
|
55
|
+
</section>
|
|
56
|
+
|
|
57
|
+
<section pgs="sectionNoPadding flexColumn gapElements">
|
|
58
|
+
<div pgs="flexColumn">
|
|
59
|
+
<img pgs="card-img imgCover" src="https://placehold.co/800x500?text=HI!" alt="Placeholder image">
|
|
60
|
+
</div>
|
|
61
|
+
</section>
|
|
62
|
+
</div>
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
/**
|
|
3
|
+
* @title Cookie Consent
|
|
4
|
+
* @description Accessible pattern for collecting and storing analytics cookie consent, applying preferences, and loading Google Analytics only when authorized.
|
|
5
|
+
*
|
|
6
|
+
* @pgs
|
|
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
|
+
*
|
|
20
|
+
* @pgs-option
|
|
21
|
+
* - buttonStrong: presents full acceptance as the primary action.
|
|
22
|
+
*
|
|
23
|
+
* @related
|
|
24
|
+
* - flexColumn: vertically organizes the preference panel.
|
|
25
|
+
* - flexRow: arranges panel rows and actions.
|
|
26
|
+
* - nowrap: prevents wrapping in the essential-cookie row.
|
|
27
|
+
* - toggle: presents analytics consent as a switch.
|
|
28
|
+
* - button: presents the selection action with standard styling.
|
|
29
|
+
*
|
|
30
|
+
* @return Consent panel HTML with essential and analytics preferences, actions, and accessible attributes.
|
|
31
|
+
*/
|
|
32
|
+
-->
|
|
33
|
+
|
|
34
|
+
<section id="pgs-cookieConsent" pgs="cookieConsent" role="dialog" aria-modal="true" data-ga-id="G-XXXXXXXXXX" hidden tabindex="-1">
|
|
35
|
+
<p><i class="fa-duotone fa-solid fa-cookie-bite"></i> Cookies and privacy <br></p>
|
|
36
|
+
<h2>Your privacy comes first</h2>
|
|
37
|
+
|
|
38
|
+
<p>
|
|
39
|
+
We use essential cookies to provide the service and, with your consent, analytics cookies from
|
|
40
|
+
<strong>Google Analytics</strong> to measure traffic anonymously and improve our content.
|
|
41
|
+
You can change your choice at any time.
|
|
42
|
+
</p>
|
|
43
|
+
|
|
44
|
+
<p>
|
|
45
|
+
<a href="/privacy-policy/" target="_blank" rel="noopener">Privacy Policy</a> -
|
|
46
|
+
<a href="/cookie-policy/" target="_blank" rel="noopener">Cookie Policy</a>
|
|
47
|
+
</p>
|
|
48
|
+
|
|
49
|
+
<div pgs="cookieConsent-panel flexColumn" role="group" aria-label="Cookie preferences">
|
|
50
|
+
<div pgs="flexRow nowrap cookieConsent-featureEssential">
|
|
51
|
+
<div>
|
|
52
|
+
<p>
|
|
53
|
+
<strong>Essential cookies</strong>
|
|
54
|
+
<br>
|
|
55
|
+
<small>Always active to ensure the website works correctly.</small>
|
|
56
|
+
</p>
|
|
57
|
+
</div>
|
|
58
|
+
|
|
59
|
+
<span pgs="cookieConsent-panel-badge">Active</span>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<div pgs="flexRow cookieConsent-featureAnalytics">
|
|
63
|
+
<label pgs="toggle">
|
|
64
|
+
<p>
|
|
65
|
+
<strong>Analytics</strong>
|
|
66
|
+
<br>
|
|
67
|
+
<small>Browsing data collected in aggregate form for anonymous statistics.</small>
|
|
68
|
+
</p>
|
|
69
|
+
|
|
70
|
+
<input type="checkbox" pgs="cookieConsent-toggleAnalytics" aria-label="Enable Google Analytics">
|
|
71
|
+
</label>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
<div pgs="flexRow">
|
|
76
|
+
<button type="button" pgs="button cookieConsent-actionReject">
|
|
77
|
+
<i class="fa-solid fa-duotone fa-sliders"></i>Selected only
|
|
78
|
+
</button>
|
|
79
|
+
|
|
80
|
+
<button type="button" pgs="button cookieConsent-actionAccept" pgs-option="buttonStrong">
|
|
81
|
+
<i class="fa-solid fa-check"></i> Accept all
|
|
82
|
+
</button>
|
|
83
|
+
</div>
|
|
84
|
+
</section>
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
export default function Accordion() {
|
|
2
2
|
return (
|
|
3
|
-
<ul pgs="grid
|
|
3
|
+
<ul pgs="grid gapTexts" pgs-option="column-1">
|
|
4
4
|
<li pgs="accordion">
|
|
5
5
|
<button pgs="accordion-button" type="button">
|
|
6
6
|
<i className="fa-solid fa-circle-question" aria-hidden="true"></i>
|
|
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>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const alerts = [
|
|
2
|
+
{
|
|
3
|
+
state: "info",
|
|
4
|
+
role: "status",
|
|
5
|
+
icon: "fa-circle-info",
|
|
6
|
+
title: "Information",
|
|
7
|
+
message: "Your profile information can be updated at any time.",
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
state: "success",
|
|
11
|
+
role: "status",
|
|
12
|
+
icon: "fa-circle-check",
|
|
13
|
+
title: "Changes saved",
|
|
14
|
+
message: "Your preferences were updated successfully.",
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
state: "warning",
|
|
18
|
+
role: "alert",
|
|
19
|
+
icon: "fa-triangle-exclamation",
|
|
20
|
+
title: "Check your information",
|
|
21
|
+
message: "Some fields may require your attention before continuing.",
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
state: "error",
|
|
25
|
+
role: "alert",
|
|
26
|
+
icon: "fa-circle-xmark",
|
|
27
|
+
title: "Unable to save",
|
|
28
|
+
message: "Correct the reported errors and try again.",
|
|
29
|
+
},
|
|
30
|
+
];
|
|
31
|
+
|
|
32
|
+
export default function Alerts() {
|
|
33
|
+
return (
|
|
34
|
+
<div pgs="flexColumn gapElements">
|
|
35
|
+
{alerts.map(({ state, role, icon, title, message }) => (
|
|
36
|
+
<div key={state} pgs="alert" pgs-state={state} role={role}>
|
|
37
|
+
<i pgs="alert-icon" className={`fa-solid ${icon}`} aria-hidden="true"></i>
|
|
38
|
+
<div pgs="alert-content">
|
|
39
|
+
<strong pgs="alert-title">{title}</strong>
|
|
40
|
+
<p>{message}</p>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
))}
|
|
44
|
+
</div>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
@@ -7,26 +7,26 @@ export default function Button() {
|
|
|
7
7
|
</a>
|
|
8
8
|
|
|
9
9
|
<button pgs="button" type="button" pgs-option="buttonReverse">
|
|
10
|
-
|
|
10
|
+
Next
|
|
11
11
|
<i className="fa-solid fa-arrow-right" aria-hidden="true"></i>
|
|
12
12
|
</button>
|
|
13
13
|
|
|
14
|
-
<button pgs="buttonStrong" type="button">
|
|
14
|
+
<button pgs="button" pgs-option="buttonStrong" type="button">
|
|
15
15
|
<i className="fa-solid fa-check" aria-hidden="true"></i>
|
|
16
16
|
Submit
|
|
17
17
|
</button>
|
|
18
18
|
|
|
19
|
-
<button pgs="buttonIcon" type="button" aria-label="
|
|
19
|
+
<button pgs="button" pgs-option="buttonIcon" type="button" aria-label="Settings">
|
|
20
20
|
<i className="fa-solid fa-gear" aria-hidden="true"></i>
|
|
21
21
|
</button>
|
|
22
22
|
|
|
23
|
-
<button pgs="buttonMini" type="button" aria-label="
|
|
23
|
+
<button pgs="button" pgs-option="buttonMini" type="button" aria-label="Information">
|
|
24
24
|
<i className="fa-solid fa-info" aria-hidden="true"></i>
|
|
25
25
|
</button>
|
|
26
26
|
|
|
27
|
-
<button pgs="buttonBig" type="button" aria-label="
|
|
27
|
+
<button pgs="button" pgs-option="buttonBig" type="button" aria-label="Large button">
|
|
28
28
|
<i className="fa-solid fa-rocket" aria-hidden="true"></i>
|
|
29
|
-
|
|
29
|
+
Large button
|
|
30
30
|
</button>
|
|
31
31
|
</div>
|
|
32
32
|
);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export default function Card() {
|
|
2
2
|
return (
|
|
3
3
|
<article pgs="card flexColumn">
|
|
4
|
-
<img pgs="card-img imgCover" src="https://placehold.co/800x500" alt="
|
|
4
|
+
<img pgs="card-img imgCover" src="https://placehold.co/800x500" alt="Placeholder image" />
|
|
5
5
|
|
|
6
|
-
<div pgs="
|
|
6
|
+
<div pgs="flexColumn">
|
|
7
7
|
<h3>Card riutilizzabile</h3>
|
|
8
|
-
<p>
|
|
8
|
+
<p>Descriptive card content suitable for lists, previews, and grids.</p>
|
|
9
9
|
<a pgs="button" href="#">Leggi di piu</a>
|
|
10
10
|
</div>
|
|
11
11
|
</article>
|
|
@@ -15,11 +15,11 @@ export default function CardLink() {
|
|
|
15
15
|
return (
|
|
16
16
|
<article pgs="card">
|
|
17
17
|
<a pgs="flexColumn" href="">
|
|
18
|
-
<img pgs="card-img imgCover" src="https://placehold.co/800x500" alt="
|
|
18
|
+
<img pgs="card-img imgCover" src="https://placehold.co/800x500" alt="Placeholder image" />
|
|
19
19
|
|
|
20
|
-
<div pgs="
|
|
20
|
+
<div pgs="flexColumn">
|
|
21
21
|
<h3>Card riutilizzabile</h3>
|
|
22
|
-
<p>
|
|
22
|
+
<p>Descriptive card content suitable for lists, previews, and grids.</p>
|
|
23
23
|
</div>
|
|
24
24
|
</a>
|
|
25
25
|
</article>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
const dropdowns = [
|
|
2
|
-
["Bottom center", "
|
|
3
|
-
["Top left", "
|
|
4
|
-
["Top center", "
|
|
5
|
-
["Top right", "
|
|
6
|
-
["Bottom left", "
|
|
7
|
-
["Bottom right", "
|
|
8
|
-
["Left center", "
|
|
9
|
-
["Right center", "
|
|
2
|
+
["Bottom center", "bottom center content"],
|
|
3
|
+
["Top left", "top left content", "position[top left]"],
|
|
4
|
+
["Top center", "top center content", "position[top center]"],
|
|
5
|
+
["Top right", "top right content", "position[top right]"],
|
|
6
|
+
["Bottom left", "bottom left content", "position[bottom left]"],
|
|
7
|
+
["Bottom right", "bottom right content", "position[bottom right]"],
|
|
8
|
+
["Left center", "left center content", "position[left center]"],
|
|
9
|
+
["Right center", "right center content", "position[right center]"],
|
|
10
10
|
];
|
|
11
11
|
|
|
12
12
|
export default function Dropdown() {
|
|
@@ -12,16 +12,16 @@ export default function Form() {
|
|
|
12
12
|
<input id="form-email" pgs="input" pgs-option="message[Inserisci una email valida]" type="email" name="email" placeholder="nome@example.com" required />
|
|
13
13
|
|
|
14
14
|
<label pgs="label" htmlFor="form-message">
|
|
15
|
-
|
|
15
|
+
Message
|
|
16
16
|
</label>
|
|
17
|
-
<textarea id="form-message" pgs="textarea" name="message" rows="5" placeholder="
|
|
17
|
+
<textarea id="form-message" pgs="textarea" name="message" rows="5" placeholder="Write your message"></textarea>
|
|
18
18
|
|
|
19
19
|
<label pgs="toggle">
|
|
20
20
|
<span>Accetto la privacy policy</span>
|
|
21
21
|
<input type="checkbox" name="privacy" required />
|
|
22
22
|
</label>
|
|
23
23
|
|
|
24
|
-
<button pgs="buttonStrong" type="submit">
|
|
24
|
+
<button pgs="button" pgs-option="buttonStrong" type="submit">
|
|
25
25
|
<i className="fa-solid fa-paper-plane" aria-hidden="true"></i>
|
|
26
26
|
Invia
|
|
27
27
|
</button>
|
|
@@ -3,17 +3,17 @@ export default function Modal() {
|
|
|
3
3
|
<>
|
|
4
4
|
<div pgs="modal" pgs-option="containerID[modal-container]">
|
|
5
5
|
<button pgs="modal-button button" type="button">
|
|
6
|
-
<i className="fa-solid fa-window-maximize"></i>
|
|
6
|
+
<i className="fa-solid fa-window-maximize"></i> Open modal
|
|
7
7
|
</button>
|
|
8
8
|
|
|
9
9
|
<dialog>
|
|
10
10
|
<div pgs="modal-dialog-content">
|
|
11
11
|
<div pgs="modal-dialog-content-header">
|
|
12
|
-
<h3>
|
|
12
|
+
<h3>Example modal</h3>
|
|
13
13
|
</div>
|
|
14
14
|
|
|
15
15
|
<div pgs="modal-dialog-content-scroll">
|
|
16
|
-
<p>
|
|
16
|
+
<p>Modal content. The close button is added automatically when missing.</p>
|
|
17
17
|
</div>
|
|
18
18
|
</div>
|
|
19
19
|
</dialog>
|
|
@@ -21,17 +21,17 @@ export default function Modal() {
|
|
|
21
21
|
|
|
22
22
|
<div pgs="modal" pgs-option="containerID[modal-container]">
|
|
23
23
|
<button pgs="modal-button button" type="button">
|
|
24
|
-
<i className="fa-solid fa-window-maximize"></i>
|
|
24
|
+
<i className="fa-solid fa-window-maximize"></i> Open modal right
|
|
25
25
|
</button>
|
|
26
26
|
|
|
27
27
|
<dialog pgs-option="right">
|
|
28
28
|
<div pgs="modal-dialog-content">
|
|
29
29
|
<div pgs="modal-dialog-content-header">
|
|
30
|
-
<h3>
|
|
30
|
+
<h3>Side modal</h3>
|
|
31
31
|
</div>
|
|
32
32
|
|
|
33
33
|
<div pgs="modal-dialog-content-scroll">
|
|
34
|
-
<p>
|
|
34
|
+
<p>Modal content with <code>pgs-option="right"</code>.</p>
|
|
35
35
|
</div>
|
|
36
36
|
</div>
|
|
37
37
|
</dialog>
|
|
@@ -39,17 +39,17 @@ export default function Modal() {
|
|
|
39
39
|
|
|
40
40
|
<div pgs="modal" pgs-option="containerID[modal-container]">
|
|
41
41
|
<button pgs="modal-button button" type="button">
|
|
42
|
-
<i className="fa-solid fa-window-maximize"></i>
|
|
42
|
+
<i className="fa-solid fa-window-maximize"></i> Open modal left
|
|
43
43
|
</button>
|
|
44
44
|
|
|
45
45
|
<dialog pgs-option="left">
|
|
46
46
|
<div pgs="modal-dialog-content">
|
|
47
47
|
<div pgs="modal-dialog-content-header">
|
|
48
|
-
<h3>
|
|
48
|
+
<h3>Left-side modal</h3>
|
|
49
49
|
</div>
|
|
50
50
|
|
|
51
51
|
<div pgs="modal-dialog-content-scroll">
|
|
52
|
-
<p>
|
|
52
|
+
<p>Modal content with <code>pgs-option="left"</code>.</p>
|
|
53
53
|
</div>
|
|
54
54
|
</div>
|
|
55
55
|
</dialog>
|
|
@@ -57,21 +57,21 @@ export default function Modal() {
|
|
|
57
57
|
|
|
58
58
|
<div pgs="modal">
|
|
59
59
|
<button pgs="modal-button button" type="button">
|
|
60
|
-
<i className="fa-solid fa-floppy-disk"></i>
|
|
60
|
+
<i className="fa-solid fa-floppy-disk"></i> Confirmation salvataggio
|
|
61
61
|
</button>
|
|
62
62
|
|
|
63
63
|
<dialog pgs-option="topLevel">
|
|
64
64
|
<div pgs="modal-dialog-content">
|
|
65
65
|
<div pgs="modal-dialog-content-header">
|
|
66
|
-
<h3>
|
|
66
|
+
<h3>Save changes?</h3>
|
|
67
67
|
</div>
|
|
68
68
|
|
|
69
|
-
<div pgs="modal-dialog-content-scroll
|
|
70
|
-
<p>
|
|
69
|
+
<div pgs="modal-dialog-content-scroll flexColumn gapElements">
|
|
70
|
+
<p>You have unsaved changes. Confirm to apply them or cancel to return to the page.</p>
|
|
71
71
|
|
|
72
72
|
<div pgs="flexRow">
|
|
73
|
-
<button pgs="button modal-close" type="button">
|
|
74
|
-
<button pgs="buttonStrong" type="button">
|
|
73
|
+
<button pgs="button modal-close" type="button">Cancel</button>
|
|
74
|
+
<button pgs="button" pgs-option="buttonStrong" type="button">Save changes</button>
|
|
75
75
|
</div>
|
|
76
76
|
</div>
|
|
77
77
|
</div>
|