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,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# JavaScript helper
|
|
2
2
|
|
|
3
3
|
`pgs(root)` permette di cercare e modificare token PGS senza scrivere selettori manuali:
|
|
4
4
|
|
|
@@ -18,7 +18,7 @@ Ricerca disponibile su `Document` ed `Element`:
|
|
|
18
18
|
- `pgs(root).querySelector(token)`: restituisce il primo discendente che contiene il token `pgs` richiesto.
|
|
19
19
|
- `pgs(root).querySelectorAll(token)`: restituisce tutti i discendenti corrispondenti; accetta anche un array o token separati da virgola.
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Manipulation available when `root` è un `Element`:
|
|
22
22
|
|
|
23
23
|
- `pgs(element).add(...tokens)`: aggiunge token evitando duplicati e restituisce l'helper.
|
|
24
24
|
- `pgs(element).remove(...tokens)`: rimuove i token indicati e restituisce l'helper.
|
|
@@ -55,14 +55,14 @@ pgs(modal).option.getValueBrackets("containerID");
|
|
|
55
55
|
- `option.setValueBrackets(key, value)`: imposta o sostituisce una singola opzione parametrizzata.
|
|
56
56
|
- `option.value`: legge o sostituisce l'intero attributo `pgs-option`.
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
Example markup with options:
|
|
59
59
|
|
|
60
60
|
```html
|
|
61
61
|
<div pgs="modal" pgs-option="containerID[modal-container]"></div>
|
|
62
62
|
<div pgs="slides" pgs-option="singleScroll shadowDesktop"></div>
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
##
|
|
65
|
+
## Automatically initialized JavaScript
|
|
66
66
|
|
|
67
67
|
Importando `mypgs`, l'entrypoint inizializza:
|
|
68
68
|
|
|
@@ -118,7 +118,7 @@ pgs.dropdown.api(dropdownEl)?.close();
|
|
|
118
118
|
pgs.slides.api(slidesEl)?.next();
|
|
119
119
|
```
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
Shortcuts available after `import "mypgs"`:
|
|
122
122
|
|
|
123
123
|
- `pgs.svg`
|
|
124
124
|
- `pgs.accordion`
|
|
@@ -134,9 +134,9 @@ Shortcut disponibili dopo `import "mypgs"`:
|
|
|
134
134
|
- `pgs.formValidate`
|
|
135
135
|
- `pgs.scrollHorizontal`
|
|
136
136
|
|
|
137
|
-
##
|
|
137
|
+
## Component API reference
|
|
138
138
|
|
|
139
|
-
Le firme, i parametri e la funzione di ogni metodo sono generati dai commenti nei
|
|
139
|
+
Le firme, i parametri e la funzione di ogni metodo sono generati dai commenti nei riferimenti HTML:
|
|
140
140
|
|
|
141
141
|
- [Accordion](components/accordion.md#api-javascript)
|
|
142
142
|
- [Dropdown](components/dropdown.md#api-javascript)
|
|
@@ -160,7 +160,7 @@ I componenti non elencati non espongono attualmente un'API JavaScript specifica.
|
|
|
160
160
|
- `pgs.svg.applyColorsLottie(isDarkMode)`: aggiorna i colori degli SVG interni ai player Lottie marcati con `lottieChangeColor`.
|
|
161
161
|
- `pgs.svg.eventChangeColor`: contiene il nome dell'evento `pgs:svg:changeColor` ascoltato dal modulo SVG.
|
|
162
162
|
|
|
163
|
-
##
|
|
163
|
+
## Component module structure
|
|
164
164
|
|
|
165
165
|
I componenti con istanze seguono questo schema:
|
|
166
166
|
|
package/docs/layout/body.md
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- Automatically generated from reference/html/layout/body.html. Edit reference/html/layout/body.html and run npm run docs:generate again. -->
|
|
2
2
|
|
|
3
3
|
# Body
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Base HTML document that enables MyPGS, configures essential metadata, and applies shared background, text, and heading variants to the body.
|
|
6
6
|
|
|
7
7
|
## PGS
|
|
8
8
|
|
|
9
|
-
- `htmlBase`:
|
|
10
|
-
- `initP`:
|
|
11
|
-
- `bodyBase`:
|
|
12
|
-
- `bodyImg`:
|
|
13
|
-
- `bodyText`:
|
|
14
|
-
- `bodyHeading`:
|
|
9
|
+
- `htmlBase`: applies the fundamental rules to the html element.
|
|
10
|
+
- `initP`: enables layout, component, and pattern styles scoped to the MyPGS namespace.
|
|
11
|
+
- `bodyBase`: applies the base structure and spacing to the body.
|
|
12
|
+
- `bodyImg`: enables shared rules for images contained in the page.
|
|
13
|
+
- `bodyText`: enables text typography and spacing.
|
|
14
|
+
- `bodyHeading`: enables the typographic heading hierarchy.
|
|
15
15
|
|
|
16
16
|
## PGS States
|
|
17
17
|
|
|
18
|
-
- `darkmode`:
|
|
18
|
+
- `darkmode`: is applied dynamically to html and body to activate the dark theme.
|
|
19
19
|
|
|
20
20
|
## Output
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
Complete HTML skeleton required to initialize the MyPGS library.
|
|
23
23
|
|
|
24
|
-
##
|
|
24
|
+
## Example
|
|
25
25
|
|
|
26
26
|
```html
|
|
27
27
|
<!DOCTYPE html>
|
package/docs/layout/footer.md
CHANGED
|
@@ -1,44 +1,48 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- Automatically generated from reference/html/layout/footer.html. Edit reference/html/layout/footer.html and run npm run docs:generate again. -->
|
|
2
2
|
|
|
3
3
|
# Footer
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Complete footer with theme control, brand area, navigation, informational content, and a link to cookie preferences.
|
|
6
6
|
|
|
7
7
|
## PGS
|
|
8
8
|
|
|
9
|
-
- `footer`:
|
|
10
|
-
- `footer-top`:
|
|
11
|
-
- `footer-top-content`:
|
|
12
|
-
- `footer-brand`:
|
|
13
|
-
- `footer-brand-motto`:
|
|
14
|
-
- `footer-content`:
|
|
15
|
-
- `footer-legal`:
|
|
16
|
-
- `footer-legal-content`:
|
|
9
|
+
- `footer`: identifies the main footer container.
|
|
10
|
+
- `footer-top`: identifies the upper section containing the brand and content.
|
|
11
|
+
- `footer-top-content`: identifies the responsive inner layout of the upper section.
|
|
12
|
+
- `footer-brand`: identifies the group dedicated to the brand.
|
|
13
|
+
- `footer-brand-motto`: identifies the descriptive text associated with the brand.
|
|
14
|
+
- `footer-content`: identifies an informational footer column.
|
|
15
|
+
- `footer-legal`: identifies the lower section dedicated to legal information.
|
|
16
|
+
- `footer-legal-content`: identifies the content of the legal section.
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## PGS Options
|
|
19
19
|
|
|
20
|
-
- `
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
- `
|
|
25
|
-
- `
|
|
26
|
-
- `
|
|
20
|
+
- `column-3`: configures the footer flex layout with three columns.
|
|
21
|
+
|
|
22
|
+
## Related elements
|
|
23
|
+
|
|
24
|
+
- `button`: presents theme and cookie preference controls as buttons.
|
|
25
|
+
- `toggleDarkmode`: connects the control to the global light or dark theme handler.
|
|
26
|
+
- `section`: applies the shared section structure to the upper and legal areas.
|
|
27
|
+
- `flexRow`: distributes the upper columns responsively.
|
|
28
|
+
- `logo`: inserts the brand into the footer.
|
|
29
|
+
- `logo-text`: uses the text variant of the logo.
|
|
30
|
+
- `cookieConsent-actionOpen`: opens the Cookie Consent preference panel.
|
|
27
31
|
|
|
28
32
|
## Output
|
|
29
33
|
|
|
30
|
-
|
|
34
|
+
Complete footer HTML structure with brand, menu, and legal area.
|
|
31
35
|
|
|
32
|
-
##
|
|
36
|
+
## Example
|
|
33
37
|
|
|
34
38
|
```html
|
|
35
39
|
<footer pgs="footer">
|
|
36
|
-
<button pgs="button toggleDarkmode" type="button" aria-label="
|
|
40
|
+
<button pgs="button toggleDarkmode" type="button" aria-label="Change theme">
|
|
37
41
|
<i class="fa-solid fa-moon"></i>
|
|
38
42
|
</button>
|
|
39
43
|
|
|
40
44
|
<section pgs="footer-top section">
|
|
41
|
-
<div pgs="footer-top-content
|
|
45
|
+
<div pgs="footer-top-content flexRow" pgs-option="column-3">
|
|
42
46
|
<div pgs="footer-brand">
|
|
43
47
|
<a aria-label="Logo" pgs="logo" href="/">
|
|
44
48
|
<span pgs="logo-text">MyPGS</span>
|
|
@@ -60,11 +64,11 @@ Struttura HTML completa del footer con brand, menu e area legale.
|
|
|
60
64
|
|
|
61
65
|
<section pgs="footer-legal section">
|
|
62
66
|
<div pgs="footer-legal-content">
|
|
63
|
-
<button type="button" pgs="button cookieConsent-actionOpen">
|
|
67
|
+
<button type="button" pgs="button cookieConsent-actionOpen">Cookie preferences</button>
|
|
64
68
|
<p><a href="">Privacy Policy</a></p>
|
|
65
69
|
<p><a href="">Cookie Policy</a></p>
|
|
66
70
|
<p><a href="">Termini e Condizioni</a></p>
|
|
67
|
-
<p>© 2026 MyPgs.
|
|
71
|
+
<p>© 2026 MyPgs. No rights reserved.</p>
|
|
68
72
|
</div>
|
|
69
73
|
</section>
|
|
70
74
|
</footer>
|
package/docs/layout/header.md
CHANGED
|
@@ -1,50 +1,51 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- Automatically generated from reference/html/layout/header.html. Edit reference/html/layout/header.html and run npm run docs:generate again. -->
|
|
2
2
|
|
|
3
3
|
# Header
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Responsive header that measures available space, switches between desktop and mobile content, and integrates menus, dark mode, and modal navigation.
|
|
6
6
|
|
|
7
7
|
## PGS
|
|
8
8
|
|
|
9
|
-
- `header`:
|
|
10
|
-
- `header-element`:
|
|
11
|
-
- `header-element-alwaysOn`:
|
|
12
|
-
- `header-element-onlyDesktop`:
|
|
13
|
-
- `header-element-onlyMobile`:
|
|
14
|
-
- `header-element-alwaysOnLast`:
|
|
15
|
-
- `header-element-hamburger`:
|
|
16
|
-
- `header-element-hamburger-button`:
|
|
9
|
+
- `header`: identifies the main header observed by the JavaScript module.
|
|
10
|
+
- `header-element`: identifies the inner group measured to determine the switch to mobile mode.
|
|
11
|
+
- `header-element-alwaysOn`: identifies the initial area that is always visible.
|
|
12
|
+
- `header-element-onlyDesktop`: identifies content shown only while the desktop menu is active.
|
|
13
|
+
- `header-element-onlyMobile`: identifies content shown only in mobile mode.
|
|
14
|
+
- `header-element-alwaysOnLast`: identifies the final area that is always visible.
|
|
15
|
+
- `header-element-hamburger`: identifies the mobile navigation group.
|
|
16
|
+
- `header-element-hamburger-button`: identifies the header-specific hamburger control.
|
|
17
17
|
|
|
18
18
|
## PGS Options
|
|
19
19
|
|
|
20
|
-
- `horizontal`:
|
|
21
|
-
- `vertical`:
|
|
22
|
-
- `menuHeader`:
|
|
23
|
-
- `containerPGS`:
|
|
24
|
-
- `right`:
|
|
20
|
+
- `horizontal`: arranges the related desktop menu horizontally.
|
|
21
|
+
- `vertical`: arranges the related mobile menu vertically.
|
|
22
|
+
- `menuHeader`: adapts both menus to the header context.
|
|
23
|
+
- `containerPGS`: uses containerPGS[header] on the modal wrapper to move the dialog into the header.
|
|
24
|
+
- `right`: presents the mobile navigation dialog content from the right side.
|
|
25
|
+
- `buttonIcon`: presents theme and hamburger controls as icon buttons.
|
|
25
26
|
|
|
26
27
|
## PGS States
|
|
27
28
|
|
|
28
|
-
- `mobileActive`:
|
|
29
|
+
- `mobileActive`: is applied to header and header-element when their width or the viewport requires mobile navigation.
|
|
29
30
|
|
|
30
|
-
##
|
|
31
|
+
## Related elements
|
|
31
32
|
|
|
32
|
-
- `
|
|
33
|
-
- `logo
|
|
34
|
-
- `
|
|
35
|
-
- `
|
|
36
|
-
- `toggleDarkmode`:
|
|
37
|
-
- `modal`:
|
|
38
|
-
- `modal-button`:
|
|
39
|
-
- `modal-close`:
|
|
40
|
-
- `modal-dialog`:
|
|
41
|
-
- `modal-dialog-content`:
|
|
33
|
+
- `button`: provides the base styling for header controls.
|
|
34
|
+
- `logo`: inserts the brand into the initial area.
|
|
35
|
+
- `logo-text`: uses the text variant of the logo.
|
|
36
|
+
- `menu`: provides desktop and mobile navigation.
|
|
37
|
+
- `toggleDarkmode`: connects the control to the global theme handler.
|
|
38
|
+
- `modal`: provides opening and closing behavior for mobile navigation.
|
|
39
|
+
- `modal-button`: opens the mobile panel.
|
|
40
|
+
- `modal-close`: closes the mobile panel and shares the hamburger control.
|
|
41
|
+
- `modal-dialog`: identifies the mobile navigation dialog.
|
|
42
|
+
- `modal-dialog-content`: identifies the inner mobile navigation panel.
|
|
42
43
|
|
|
43
44
|
## Output
|
|
44
45
|
|
|
45
|
-
|
|
46
|
+
Complete header HTML with desktop navigation and a side mobile panel.
|
|
46
47
|
|
|
47
|
-
##
|
|
48
|
+
## Example
|
|
48
49
|
|
|
49
50
|
```html
|
|
50
51
|
<header pgs="header">
|
|
@@ -56,10 +57,10 @@ Header HTML completo con navigazione desktop e pannello mobile laterale.
|
|
|
56
57
|
</div>
|
|
57
58
|
|
|
58
59
|
<div pgs="header-element-onlyDesktop">
|
|
59
|
-
<nav pgs="menu" pgs-option="horizontal menuHeader" aria-label="
|
|
60
|
+
<nav pgs="menu" pgs-option="horizontal menuHeader" aria-label="Main menu">
|
|
60
61
|
<ul>
|
|
61
62
|
<li><a href="/">Home</a></li>
|
|
62
|
-
<li><a href="#
|
|
63
|
+
<li><a href="#components">Components</a></li>
|
|
63
64
|
<li><a href="#layout">Layout</a></li>
|
|
64
65
|
</ul>
|
|
65
66
|
</nav>
|
|
@@ -69,21 +70,21 @@ Header HTML completo con navigazione desktop e pannello mobile laterale.
|
|
|
69
70
|
</div>
|
|
70
71
|
|
|
71
72
|
<div pgs="header-element-alwaysOnLast">
|
|
72
|
-
<button pgs="
|
|
73
|
+
<button pgs="button toggleDarkmode" pgs-option="buttonIcon" type="button" aria-label="Change theme">
|
|
73
74
|
<i class="fa-solid fa-moon"></i>
|
|
74
75
|
</button>
|
|
75
76
|
</div>
|
|
76
77
|
|
|
77
78
|
<div pgs="header-element-hamburger modal" pgs-option="containerPGS[header] ">
|
|
78
79
|
|
|
79
|
-
<button pgs="
|
|
80
|
+
<button pgs="button modal-button modal-close header-element-hamburger-button" pgs-option="buttonIcon" type="button"></button>
|
|
80
81
|
|
|
81
82
|
<dialog pgs="modal-dialog" pgs-option="right">
|
|
82
83
|
<div pgs="modal-dialog-content">
|
|
83
|
-
<nav pgs="menu" pgs-option="vertical menuHeader" aria-label="
|
|
84
|
+
<nav pgs="menu" pgs-option="vertical menuHeader" aria-label="Mobile menu">
|
|
84
85
|
<ul>
|
|
85
86
|
<li><a href="/">Home</a></li>
|
|
86
|
-
<li><a href="#
|
|
87
|
+
<li><a href="#components">Components</a></li>
|
|
87
88
|
<li><a href="#layout">Layout</a></li>
|
|
88
89
|
</ul>
|
|
89
90
|
</nav>
|
package/docs/layout/pageShell.md
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- Automatically generated from reference/html/layout/pageShell.html. Edit reference/html/layout/pageShell.html and run npm run docs:generate again. -->
|
|
2
2
|
|
|
3
3
|
# Page Shell
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Responsive page layout that combines main content with zero, one, or two scrollable sidebars and adapts their width and position.
|
|
6
6
|
|
|
7
7
|
## PGS
|
|
8
8
|
|
|
9
|
-
- `pageShell`:
|
|
10
|
-
- `pageShell-aside`:
|
|
11
|
-
- `pageShell-aside-scroll`:
|
|
12
|
-
- `pageShell-content`:
|
|
9
|
+
- `pageShell`: identifies the container that calculates the main and aside composition.
|
|
10
|
+
- `pageShell-aside`: identifies a sidebar that can be placed before or after the content.
|
|
11
|
+
- `pageShell-aside-scroll`: identifies the inner area that can remain visible while scrolling.
|
|
12
|
+
- `pageShell-content`: identifies the main page content.
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## Related elements
|
|
15
15
|
|
|
16
|
-
- `
|
|
17
|
-
- `
|
|
16
|
+
- `flexColumn`: organizes text contained in the sidebars.
|
|
17
|
+
- `gapElements`: applies element spacing in the main sections.
|
|
18
18
|
|
|
19
19
|
## Output
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Four page-shell HTML configurations with two, one, or no sidebars.
|
|
22
22
|
|
|
23
|
-
##
|
|
23
|
+
## Example
|
|
24
24
|
|
|
25
25
|
```html
|
|
26
26
|
<div pgs="pageShell">
|
|
27
27
|
<aside pgs="pageShell-aside">
|
|
28
28
|
<div pgs="pageShell-aside-scroll">
|
|
29
|
-
<div pgs="
|
|
29
|
+
<div pgs="flexColumn">
|
|
30
30
|
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ab modi ut sunt est illum accusantium dolores eum aut cum itaque.</p>
|
|
31
31
|
</div>
|
|
32
32
|
</div>
|
|
33
33
|
</aside>
|
|
34
34
|
|
|
35
35
|
<main pgs="pageShell-content">
|
|
36
|
-
<section pgs="
|
|
36
|
+
<section pgs="flexColumn gapElements" id="sezione-uno">
|
|
37
37
|
<strong>Lorem ipsum</strong>
|
|
38
38
|
<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>
|
|
39
39
|
</section>
|
|
@@ -41,7 +41,7 @@ Quattro configurazioni HTML di page shell con due, una o nessuna barra laterale.
|
|
|
41
41
|
|
|
42
42
|
<aside pgs="pageShell-aside">
|
|
43
43
|
<div pgs="pageShell-aside-scroll">
|
|
44
|
-
<div pgs="
|
|
44
|
+
<div pgs="flexColumn">
|
|
45
45
|
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ab modi ut sunt est illum accusantium dolores eum aut cum itaque.</p>
|
|
46
46
|
</div>
|
|
47
47
|
</div>
|
|
@@ -50,14 +50,14 @@ Quattro configurazioni HTML di page shell con due, una o nessuna barra laterale.
|
|
|
50
50
|
<div pgs="pageShell">
|
|
51
51
|
<aside pgs="pageShell-aside">
|
|
52
52
|
<div pgs="pageShell-aside-scroll">
|
|
53
|
-
<div pgs="
|
|
53
|
+
<div pgs="flexColumn">
|
|
54
54
|
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ab modi ut sunt est illum accusantium dolores eum aut cum itaque.</p>
|
|
55
55
|
</div>
|
|
56
56
|
</div>
|
|
57
57
|
</aside>
|
|
58
58
|
|
|
59
59
|
<main pgs="pageShell-content">
|
|
60
|
-
<section pgs="
|
|
60
|
+
<section pgs="flexColumn gapElements" id="sezione-uno">
|
|
61
61
|
<strong>Lorem ipsum</strong>
|
|
62
62
|
<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>
|
|
63
63
|
</section>
|
|
@@ -67,7 +67,7 @@ Quattro configurazioni HTML di page shell con due, una o nessuna barra laterale.
|
|
|
67
67
|
<div pgs="pageShell">
|
|
68
68
|
|
|
69
69
|
<main pgs="pageShell-content">
|
|
70
|
-
<section pgs="
|
|
70
|
+
<section pgs="flexColumn gapElements" id="sezione-uno">
|
|
71
71
|
<strong>Lorem ipsum</strong>
|
|
72
72
|
<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>
|
|
73
73
|
</section>
|
|
@@ -75,7 +75,7 @@ Quattro configurazioni HTML di page shell con due, una o nessuna barra laterale.
|
|
|
75
75
|
|
|
76
76
|
<aside pgs="pageShell-aside">
|
|
77
77
|
<div pgs="pageShell-aside-scroll">
|
|
78
|
-
<div pgs="
|
|
78
|
+
<div pgs="flexColumn">
|
|
79
79
|
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ab modi ut sunt est illum accusantium dolores eum aut cum itaque.</p>
|
|
80
80
|
</div>
|
|
81
81
|
</div>
|
|
@@ -85,7 +85,7 @@ Quattro configurazioni HTML di page shell con due, una o nessuna barra laterale.
|
|
|
85
85
|
<div pgs="pageShell">
|
|
86
86
|
|
|
87
87
|
<main pgs="pageShell-content">
|
|
88
|
-
<section pgs="
|
|
88
|
+
<section pgs="flexColumn gapElements" id="sezione-uno">
|
|
89
89
|
<strong>Lorem ipsum</strong>
|
|
90
90
|
<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>
|
|
91
91
|
</section>
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
<!-- Automatically generated from reference/html/layout/responsive.html. Edit reference/html/layout/responsive.html and run npm run docs:generate again. -->
|
|
2
|
+
|
|
3
|
+
# Responsive
|
|
4
|
+
|
|
5
|
+
Responsive flex and grid layouts with configurable columns, spacing utilities, and wrapping controls.
|
|
6
|
+
|
|
7
|
+
## PGS
|
|
8
|
+
|
|
9
|
+
- `flex`: creates a responsive flex layout.
|
|
10
|
+
- `grid`: creates a responsive grid layout.
|
|
11
|
+
- `flexColumn`: stacks text inside each demonstration cell.
|
|
12
|
+
- `flexRow`: arranges the gap demonstration items horizontally.
|
|
13
|
+
- `gapTexts`: applies the text spacing token.
|
|
14
|
+
- `gapElements`: applies the element spacing token.
|
|
15
|
+
- `gapSections`: applies the section spacing token.
|
|
16
|
+
- `wrap`: allows flex items to wrap.
|
|
17
|
+
- `nowrap`: prevents flex items from wrapping.
|
|
18
|
+
- `box`: makes the demonstration cells visible.
|
|
19
|
+
|
|
20
|
+
## PGS Options
|
|
21
|
+
|
|
22
|
+
- `column-2`: configures the flex example with two columns; column values from 1 through 8 are supported.
|
|
23
|
+
- `column-4`: configures the grid example with four columns; column values from 1 through 8 are supported.
|
|
24
|
+
- `m2e`: keeps two elements per row at the mobile breakpoint, returning to one column on watch-sized containers.
|
|
25
|
+
|
|
26
|
+
## Output
|
|
27
|
+
|
|
28
|
+
Flex, grid, and gap examples in that order, using the current responsive layout API.
|
|
29
|
+
|
|
30
|
+
## Example
|
|
31
|
+
|
|
32
|
+
```html
|
|
33
|
+
<div pgs="flexColumn gapSections">
|
|
34
|
+
<section>
|
|
35
|
+
<strong>Flex</strong>
|
|
36
|
+
<div pgs="flexRow" pgs-option="column-2 m2e">
|
|
37
|
+
<article pgs="box flexColumn">
|
|
38
|
+
<strong>Column one</strong>
|
|
39
|
+
<p>First flex column.</p>
|
|
40
|
+
</article>
|
|
41
|
+
<article pgs="box flexColumn">
|
|
42
|
+
<strong>Column two</strong>
|
|
43
|
+
<p>Second flex column.</p>
|
|
44
|
+
</article>
|
|
45
|
+
<article pgs="box flexColumn">
|
|
46
|
+
<strong>Column three</strong>
|
|
47
|
+
<p>Third flex column.</p>
|
|
48
|
+
</article>
|
|
49
|
+
</div>
|
|
50
|
+
</section>
|
|
51
|
+
|
|
52
|
+
<section>
|
|
53
|
+
<strong>Grid</strong>
|
|
54
|
+
<div pgs="grid" pgs-option="column-4 m2e">
|
|
55
|
+
<article pgs="box flexColumn">
|
|
56
|
+
<strong>Column one</strong>
|
|
57
|
+
<p>First grid column.</p>
|
|
58
|
+
</article>
|
|
59
|
+
<article pgs="box flexColumn">
|
|
60
|
+
<strong>Column two</strong>
|
|
61
|
+
<p>Second grid column.</p>
|
|
62
|
+
</article>
|
|
63
|
+
<article pgs="box flexColumn">
|
|
64
|
+
<strong>Column three</strong>
|
|
65
|
+
<p>Third grid column.</p>
|
|
66
|
+
</article>
|
|
67
|
+
<article pgs="box flexColumn">
|
|
68
|
+
<strong>Column four</strong>
|
|
69
|
+
<p>Third grid column.</p>
|
|
70
|
+
</article>
|
|
71
|
+
</div>
|
|
72
|
+
</section>
|
|
73
|
+
|
|
74
|
+
<section pgs="flexRow">
|
|
75
|
+
<strong>Gap</strong>
|
|
76
|
+
<div pgs="flexRow gapTexts wrap">
|
|
77
|
+
<span pgs="box">Text gap</span>
|
|
78
|
+
<span pgs="box">Text gap</span>
|
|
79
|
+
</div>
|
|
80
|
+
<div pgs="flexRow gapElements wrap">
|
|
81
|
+
<span pgs="box">Element gap</span>
|
|
82
|
+
<span pgs="box">Element gap</span>
|
|
83
|
+
</div>
|
|
84
|
+
<div pgs="flexRow gapSections nowrap">
|
|
85
|
+
<span pgs="box">Section gap</span>
|
|
86
|
+
<span pgs="box">Section gap</span>
|
|
87
|
+
</div>
|
|
88
|
+
</section>
|
|
89
|
+
</div>
|
|
90
|
+
```
|