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,52 +1,51 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- Automatically generated from reference/html/components/slides.html. Edit reference/html/components/slides.html and run npm run docs:generate again. -->
|
|
2
2
|
|
|
3
3
|
# Slides
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Slides markup, configuration, behavior, and usage example.
|
|
6
6
|
|
|
7
7
|
## PGS
|
|
8
8
|
|
|
9
|
-
- `slides`:
|
|
10
|
-
- `slides-container`:
|
|
11
|
-
- `slides-prec`:
|
|
12
|
-
- `slides-next`:
|
|
13
|
-
- `slides-dots`:
|
|
9
|
+
- `slides`: identifies the slides element used by Slides.
|
|
10
|
+
- `slides-container`: identifies the slides-container element used by Slides.
|
|
11
|
+
- `slides-prec`: identifies the slides-prec element used by Slides.
|
|
12
|
+
- `slides-next`: identifies the slides-next element used by Slides.
|
|
13
|
+
- `slides-dots`: identifies the slides-dots element used by Slides.
|
|
14
14
|
|
|
15
15
|
## PGS Options
|
|
16
16
|
|
|
17
|
-
- `singleScroll`:
|
|
18
|
-
- `shadowDesktop`:
|
|
19
|
-
- `notScrollAnimation`:
|
|
20
|
-
- `notScrollWithMouse`:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
- `pgs.slides.
|
|
26
|
-
- `
|
|
27
|
-
- `instance.
|
|
28
|
-
- `instance.
|
|
29
|
-
- `instance.
|
|
30
|
-
- `instance.
|
|
31
|
-
- `instance.
|
|
32
|
-
- `instance.
|
|
33
|
-
- `instance.
|
|
34
|
-
- `instance.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
- `card
|
|
40
|
-
- `
|
|
41
|
-
- `
|
|
42
|
-
- `
|
|
43
|
-
- `buttonIcon`: viene applicato ai controlli precedente e successivo generati.
|
|
17
|
+
- `singleScroll`: identifies the singleScroll element used by Slides.
|
|
18
|
+
- `shadowDesktop`: identifies the shadowDesktop element used by Slides.
|
|
19
|
+
- `notScrollAnimation`: identifies the notScrollAnimation element used by Slides.
|
|
20
|
+
- `notScrollWithMouse`: identifies the notScrollWithMouse element used by Slides.
|
|
21
|
+
- `buttonIcon`: styles the previous and next actions generated at runtime.
|
|
22
|
+
|
|
23
|
+
## JavaScript API
|
|
24
|
+
|
|
25
|
+
- `pgs.slides.init(root)`: initializes matching elements within the specified root.
|
|
26
|
+
- `pgs.slides.api(element)`: returns the instance associated with the specified initialized element.
|
|
27
|
+
- `instance.previous()`: moves to the previous item.
|
|
28
|
+
- `instance.next()`: moves to the next item.
|
|
29
|
+
- `instance.goTo(index)`: provides the documented operation through the component public API.
|
|
30
|
+
- `instance.getCurrentIndexes()`: provides the documented operation through the component public API.
|
|
31
|
+
- `instance.getCurrentElements()`: provides the documented operation through the component public API.
|
|
32
|
+
- `instance.getTotal()`: returns the total number of items.
|
|
33
|
+
- `instance.isAtStart()`: provides the documented operation through the component public API.
|
|
34
|
+
- `instance.isAtEnd()`: provides the documented operation through the component public API.
|
|
35
|
+
- `instance.refresh()`: refreshes the component and returns its updated instance.
|
|
36
|
+
|
|
37
|
+
## Related elements
|
|
38
|
+
|
|
39
|
+
- `card`: uses the related card component or utility in this example.
|
|
40
|
+
- `card-img`: uses the related card-img component or utility in this example.
|
|
41
|
+
- `imgCover`: uses the related imgCover component or utility in this example.
|
|
42
|
+
- `flexColumn`: uses the related flexColumn component or utility in this example.
|
|
44
43
|
|
|
45
44
|
## Output
|
|
46
45
|
|
|
47
|
-
|
|
46
|
+
Complete HTML markup and usage example for Slides.
|
|
48
47
|
|
|
49
|
-
##
|
|
48
|
+
## Example
|
|
50
49
|
|
|
51
50
|
```html
|
|
52
51
|
<div pgs="slides" pgs-option="singleScroll shadowDesktop">
|
|
@@ -54,9 +53,9 @@ Lista di slide basate su card, completata a runtime con pulsanti e indicatori.
|
|
|
54
53
|
<li>
|
|
55
54
|
<article pgs="card flexColumn">
|
|
56
55
|
<img pgs="card-img imgCover" src="https://placehold.co/800x500?text=Slide+1" alt="Slide 1">
|
|
57
|
-
<div pgs="
|
|
56
|
+
<div pgs="flexColumn">
|
|
58
57
|
<h3>Slide uno</h3>
|
|
59
|
-
<p>
|
|
58
|
+
<p>First slide content.</p>
|
|
60
59
|
</div>
|
|
61
60
|
</article>
|
|
62
61
|
</li>
|
|
@@ -64,9 +63,9 @@ Lista di slide basate su card, completata a runtime con pulsanti e indicatori.
|
|
|
64
63
|
<li>
|
|
65
64
|
<article pgs="card flexColumn">
|
|
66
65
|
<img pgs="card-img imgCover" src="https://placehold.co/800x500?text=Slide+2" alt="Slide 2">
|
|
67
|
-
<div pgs="
|
|
66
|
+
<div pgs="flexColumn">
|
|
68
67
|
<h3>Slide due</h3>
|
|
69
|
-
<p>
|
|
68
|
+
<p>Second slide content.</p>
|
|
70
69
|
</div>
|
|
71
70
|
</article>
|
|
72
71
|
</li>
|
|
@@ -74,9 +73,9 @@ Lista di slide basate su card, completata a runtime con pulsanti e indicatori.
|
|
|
74
73
|
<li>
|
|
75
74
|
<article pgs="card flexColumn">
|
|
76
75
|
<img pgs="card-img imgCover" src="https://placehold.co/800x500?text=Slide+3" alt="Slide 3">
|
|
77
|
-
<div pgs="
|
|
76
|
+
<div pgs="flexColumn">
|
|
78
77
|
<h3>Slide tre</h3>
|
|
79
|
-
<p>
|
|
78
|
+
<p>Third slide content.</p>
|
|
80
79
|
</div>
|
|
81
80
|
</article>
|
|
82
81
|
</li>
|
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- Automatically generated from reference/html/components/stepTabs.html. Edit reference/html/components/stepTabs.html and run npm run docs:generate again. -->
|
|
2
2
|
|
|
3
3
|
# Step Tabs
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Step Tabs markup, configuration, behavior, and usage example.
|
|
6
6
|
|
|
7
7
|
## PGS
|
|
8
8
|
|
|
9
|
-
- `stepTabs`:
|
|
10
|
-
- `stepTabs-dots`:
|
|
11
|
-
- `stepTabs-dots-dot`:
|
|
12
|
-
- `stepTabs-container`:
|
|
13
|
-
- `tab`:
|
|
14
|
-
- `stepTabs-prev`:
|
|
15
|
-
- `stepTabs-restart`:
|
|
16
|
-
- `stepTabs-next`:
|
|
9
|
+
- `stepTabs`: identifies the stepTabs element used by Step Tabs.
|
|
10
|
+
- `stepTabs-dots`: identifies the stepTabs-dots element used by Step Tabs.
|
|
11
|
+
- `stepTabs-dots-dot`: identifies the stepTabs-dots-dot element used by Step Tabs.
|
|
12
|
+
- `stepTabs-container`: identifies the stepTabs-container element used by Step Tabs.
|
|
13
|
+
- `tab`: identifies the tab element used by Step Tabs.
|
|
14
|
+
- `stepTabs-prev`: identifies the stepTabs-prev element used by Step Tabs.
|
|
15
|
+
- `stepTabs-restart`: identifies the stepTabs-restart element used by Step Tabs.
|
|
16
|
+
- `stepTabs-next`: identifies the stepTabs-next element used by Step Tabs.
|
|
17
17
|
|
|
18
18
|
## PGS Options
|
|
19
19
|
|
|
20
|
-
- `tabIcon`:
|
|
21
|
-
- `step`:
|
|
22
|
-
- `buttonReverse`:
|
|
20
|
+
- `tabIcon`: identifies the tabIcon element used by Step Tabs.
|
|
21
|
+
- `step`: identifies the step element used by Step Tabs.
|
|
22
|
+
- `buttonReverse`: identifies the buttonReverse element used by Step Tabs.
|
|
23
23
|
|
|
24
24
|
## PGS States
|
|
25
25
|
|
|
26
|
-
- `is-active`:
|
|
27
|
-
- `is-completed`:
|
|
28
|
-
- `is-locked`:
|
|
26
|
+
- `is-active`: identifies the is-active element used by Step Tabs.
|
|
27
|
+
- `is-completed`: identifies the is-completed element used by Step Tabs.
|
|
28
|
+
- `is-locked`: identifies the is-locked element used by Step Tabs.
|
|
29
29
|
|
|
30
|
-
## API
|
|
30
|
+
## JavaScript API
|
|
31
31
|
|
|
32
|
-
- `pgs.stepTabs.init(root)`:
|
|
33
|
-
- `pgs.stepTabs.api(element)`:
|
|
32
|
+
- `pgs.stepTabs.init(root)`: initializes matching elements within the specified root.
|
|
33
|
+
- `pgs.stepTabs.api(element)`: returns the instance associated with the specified initialized element.
|
|
34
34
|
- `instance.restart()`: torna al primo tab e ripristina i blocchi dichiarati inizialmente.
|
|
35
|
-
- `instance.goTo(index, scroll)`:
|
|
36
|
-
- `instance.next()`:
|
|
37
|
-
- `instance.prev()`:
|
|
38
|
-
- `instance.toggleLock(index, lock)`:
|
|
39
|
-
- `instance.refresh()`:
|
|
40
|
-
- `instance.getCurrent()`:
|
|
41
|
-
- `instance.getState()`:
|
|
35
|
+
- `instance.goTo(index, scroll)`: provides the documented operation through the component public API.
|
|
36
|
+
- `instance.next()`: moves to the next item.
|
|
37
|
+
- `instance.prev()`: moves to the previous item.
|
|
38
|
+
- `instance.toggleLock(index, lock)`: provides the documented operation through the component public API.
|
|
39
|
+
- `instance.refresh()`: refreshes the component and returns its updated instance.
|
|
40
|
+
- `instance.getCurrent()`: provides the documented operation through the component public API.
|
|
41
|
+
- `instance.getState()`: provides the documented operation through the component public API.
|
|
42
42
|
|
|
43
|
-
##
|
|
43
|
+
## Related elements
|
|
44
44
|
|
|
45
|
-
- `
|
|
46
|
-
- `
|
|
47
|
-
- `flexRow`:
|
|
48
|
-
- `button`:
|
|
45
|
+
- `flexColumn`: uses the related flexColumn component or utility in this example.
|
|
46
|
+
- `gapElements`: applies element spacing to the step tab container.
|
|
47
|
+
- `flexRow`: uses the related flexRow component or utility in this example.
|
|
48
|
+
- `button`: uses the related button component or utility in this example.
|
|
49
49
|
|
|
50
50
|
## Output
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
Complete HTML markup and usage example for Step Tabs.
|
|
53
53
|
|
|
54
|
-
##
|
|
54
|
+
## Example
|
|
55
55
|
|
|
56
56
|
```html
|
|
57
|
-
<div pgs="stepTabs
|
|
57
|
+
<div pgs="stepTabs flexColumn gapElements">
|
|
58
58
|
<div pgs="stepTabs-dots" aria-label="Avanzamento"></div>
|
|
59
59
|
|
|
60
60
|
<div pgs="stepTabs-container">
|
|
61
|
-
<section pgs="tab
|
|
62
|
-
<h3>
|
|
63
|
-
<p>
|
|
61
|
+
<section pgs="tab flexColumn" tabindex="-1" pgs-option="tabIcon[fa-user]">
|
|
62
|
+
<h3>Personal details</h3>
|
|
63
|
+
<p>First tab content.</p>
|
|
64
64
|
</section>
|
|
65
65
|
|
|
66
|
-
<section pgs="tab
|
|
67
|
-
<h3>
|
|
68
|
-
<p>
|
|
66
|
+
<section pgs="tab flexColumn" tabindex="-1" pgs-option="tabIcon[fa-list-check]">
|
|
67
|
+
<h3>Preferences</h3>
|
|
68
|
+
<p>Second tab content.</p>
|
|
69
69
|
</section>
|
|
70
70
|
|
|
71
|
-
<section pgs="tab
|
|
72
|
-
<h3>
|
|
73
|
-
<p>
|
|
71
|
+
<section pgs="tab flexColumn" tabindex="-1" pgs-option="tabIcon[fa-check]">
|
|
72
|
+
<h3>Confirmation</h3>
|
|
73
|
+
<p>Third tab content.</p>
|
|
74
74
|
</section>
|
|
75
75
|
</div>
|
|
76
76
|
|
|
77
77
|
<div pgs="flexRow">
|
|
78
78
|
<button pgs="stepTabs-prev button" type="button">
|
|
79
79
|
<i class="fa-solid fa-arrow-left" aria-hidden="true"></i>
|
|
80
|
-
|
|
80
|
+
Back
|
|
81
81
|
</button>
|
|
82
82
|
|
|
83
83
|
<button pgs="stepTabs-restart button" type="button">
|
|
@@ -85,7 +85,7 @@ Procedura HTML a tre schede con indicatori e controlli di navigazione.
|
|
|
85
85
|
</button>
|
|
86
86
|
|
|
87
87
|
<button pgs="stepTabs-next button" pgs-option="buttonReverse" type="button">
|
|
88
|
-
|
|
88
|
+
Next
|
|
89
89
|
<i class="fa-solid fa-arrow-right" aria-hidden="true"></i>
|
|
90
90
|
</button>
|
|
91
91
|
</div>
|
package/docs/components/steps.md
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- Automatically generated from reference/html/components/steps.html. Edit reference/html/components/steps.html and run npm run docs:generate again. -->
|
|
2
2
|
|
|
3
3
|
# Steps
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Ordered list of steps showing a number, content, and connecting line, with missing structural elements added at runtime.
|
|
6
6
|
|
|
7
7
|
## PGS
|
|
8
8
|
|
|
9
|
-
- `steps`:
|
|
10
|
-
- `steps-step`:
|
|
11
|
-
- `steps-step-circle`:
|
|
12
|
-
- `steps-step-content`:
|
|
13
|
-
- `steps-step-line`:
|
|
9
|
+
- `steps`: identifies the ordered list initialized by the steps module.
|
|
10
|
+
- `steps-step`: identifies each step in the sequence.
|
|
11
|
+
- `steps-step-circle`: identifies the numeric indicator, which is created automatically when missing.
|
|
12
|
+
- `steps-step-content`: identifies the text content of the step.
|
|
13
|
+
- `steps-step-line`: identifies the connecting line dynamically added to each step.
|
|
14
14
|
|
|
15
|
-
## API
|
|
15
|
+
## JavaScript API
|
|
16
16
|
|
|
17
|
-
- `pgs.steps.init(root)`:
|
|
18
|
-
- `pgs.steps.api(element)`:
|
|
19
|
-
- `instance.steps()`:
|
|
20
|
-
- `instance.getStep(index)`:
|
|
21
|
-
- `instance.getTotal()`:
|
|
22
|
-
- `instance.refresh()`:
|
|
17
|
+
- `pgs.steps.init(root)`: initializes unregistered step lists within the specified Document or Element.
|
|
18
|
+
- `pgs.steps.api(element)`: returns the instance associated with an initialized steps root.
|
|
19
|
+
- `instance.steps()`: returns an array containing every steps-step element.
|
|
20
|
+
- `instance.getStep(index)`: returns the step at the specified index.
|
|
21
|
+
- `instance.getTotal()`: returns the total number of steps.
|
|
22
|
+
- `instance.refresh()`: reinitializes the list, recreates missing elements, and returns the new instance.
|
|
23
23
|
|
|
24
24
|
## Output
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
Ordered HTML list of numbered steps completed by the JavaScript module.
|
|
27
27
|
|
|
28
|
-
##
|
|
28
|
+
## Example
|
|
29
29
|
|
|
30
30
|
```html
|
|
31
31
|
<ol pgs="steps">
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- Automatically generated from reference/html/components/summary.html. Edit reference/html/components/summary.html and run npm run docs:generate again. -->
|
|
2
2
|
|
|
3
3
|
# Summary
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Summary markup, configuration, behavior, and usage example.
|
|
6
6
|
|
|
7
7
|
## PGS
|
|
8
8
|
|
|
9
|
-
- `summary`:
|
|
10
|
-
- `summary-content`:
|
|
11
|
-
- `summary-button`:
|
|
9
|
+
- `summary`: identifies the summary element used by Summary.
|
|
10
|
+
- `summary-content`: identifies the summary-content element used by Summary.
|
|
11
|
+
- `summary-button`: identifies the summary-button element used by Summary.
|
|
12
12
|
|
|
13
13
|
## PGS States
|
|
14
14
|
|
|
15
|
-
- `overflow`:
|
|
16
|
-
- `open`:
|
|
15
|
+
- `overflow`: identifies the overflow element used by Summary.
|
|
16
|
+
- `open`: identifies the open element used by Summary.
|
|
17
17
|
|
|
18
|
-
## API
|
|
18
|
+
## JavaScript API
|
|
19
19
|
|
|
20
|
-
- `pgs.summary.init(root)`:
|
|
21
|
-
- `pgs.summary.api(element)`:
|
|
22
|
-
- `instance.open()`:
|
|
23
|
-
- `instance.close()`:
|
|
24
|
-
- `instance.toggle()`:
|
|
25
|
-
- `instance.refresh()`:
|
|
26
|
-
- `instance.isOpen()`:
|
|
20
|
+
- `pgs.summary.init(root)`: initializes matching elements within the specified root.
|
|
21
|
+
- `pgs.summary.api(element)`: returns the instance associated with the specified initialized element.
|
|
22
|
+
- `instance.open()`: opens the component.
|
|
23
|
+
- `instance.close()`: closes the component.
|
|
24
|
+
- `instance.toggle()`: toggles the component state.
|
|
25
|
+
- `instance.refresh()`: refreshes the component and returns its updated instance.
|
|
26
|
+
- `instance.isOpen()`: returns true when the component is open.
|
|
27
27
|
|
|
28
28
|
## Output
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
Complete HTML markup and usage example for Summary.
|
|
31
31
|
|
|
32
|
-
##
|
|
32
|
+
## Example
|
|
33
33
|
|
|
34
34
|
```html
|
|
35
35
|
<div pgs="summary">
|
|
36
36
|
<div pgs="summary-content">
|
|
37
37
|
<p>
|
|
38
|
-
|
|
38
|
+
This demonstration text is long enough to span multiple lines and show the summary component behavior. Content can include text, links, and other inline elements without requiring additional markup.
|
|
39
39
|
</p>
|
|
40
40
|
<p>
|
|
41
|
-
|
|
41
|
+
When content exceeds three lines, a button is shown to expand or collapse the visible area.
|
|
42
42
|
</p>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
<button pgs="summary-button" type="button">
|
|
46
|
-
|
|
46
|
+
Show more
|
|
47
47
|
</button>
|
|
48
48
|
</div>
|
|
49
49
|
```
|
package/docs/components/table.md
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- Automatically generated from reference/html/components/table.html. Edit reference/html/components/table.html and run npm run docs:generate again. -->
|
|
2
2
|
|
|
3
3
|
# Table
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Responsive container for a semantic table with headers and data rows consistent with the design system styles.
|
|
6
6
|
|
|
7
7
|
## PGS
|
|
8
8
|
|
|
9
|
-
- `table`:
|
|
9
|
+
- `table`: identifies the wrapper that manages presentation and scrolling for the native table.
|
|
10
10
|
|
|
11
11
|
## Output
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Complete HTML table wrapped in the dedicated PGS container.
|
|
14
14
|
|
|
15
|
-
##
|
|
15
|
+
## Example
|
|
16
16
|
|
|
17
17
|
```html
|
|
18
18
|
<div pgs="table">
|
|
19
19
|
<table>
|
|
20
20
|
<thead>
|
|
21
21
|
<tr>
|
|
22
|
-
<th>
|
|
22
|
+
<th>Name</th>
|
|
23
23
|
<th>Stato</th>
|
|
24
24
|
<th>Data</th>
|
|
25
25
|
</tr>
|
|
@@ -28,7 +28,7 @@ Tabella HTML completa racchiusa nel contenitore PGS dedicato.
|
|
|
28
28
|
<tbody>
|
|
29
29
|
<tr>
|
|
30
30
|
<td>Elemento uno</td>
|
|
31
|
-
<td>
|
|
31
|
+
<td>Active</td>
|
|
32
32
|
<td>2026-01-01</td>
|
|
33
33
|
</tr>
|
|
34
34
|
<tr>
|
|
@@ -1,49 +1,50 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- Automatically generated from reference/html/components/tooltip.html. Edit reference/html/components/tooltip.html and run npm run docs:generate again. -->
|
|
2
2
|
|
|
3
3
|
# Tooltip
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Tooltip markup, configuration, behavior, and usage example.
|
|
6
6
|
|
|
7
7
|
## PGS
|
|
8
8
|
|
|
9
|
-
- `tooltip`:
|
|
10
|
-
- `tooltip-button`:
|
|
11
|
-
- `tooltip-content`:
|
|
9
|
+
- `tooltip`: identifies the tooltip element used by Tooltip.
|
|
10
|
+
- `tooltip-button`: identifies the tooltip-button element used by Tooltip.
|
|
11
|
+
- `tooltip-content`: identifies the tooltip-content element used by Tooltip.
|
|
12
12
|
|
|
13
13
|
## PGS Options
|
|
14
14
|
|
|
15
|
-
- `position`:
|
|
15
|
+
- `position`: identifies the position element used by Tooltip.
|
|
16
|
+
- `buttonMini`: applies the smallest button variant to the tooltip trigger.
|
|
16
17
|
|
|
17
18
|
## PGS States
|
|
18
19
|
|
|
19
|
-
- `open`:
|
|
20
|
+
- `open`: identifies the open element used by Tooltip.
|
|
20
21
|
|
|
21
|
-
## API
|
|
22
|
+
## JavaScript API
|
|
22
23
|
|
|
23
|
-
- `pgs.dropdown.init(root)`:
|
|
24
|
-
- `pgs.dropdown.api(element)`:
|
|
25
|
-
- `instance.open()`:
|
|
26
|
-
- `instance.close()`:
|
|
27
|
-
- `instance.toggle()`:
|
|
28
|
-
- `instance.refresh()`:
|
|
29
|
-
- `instance.isOpen()`:
|
|
24
|
+
- `pgs.dropdown.init(root)`: initializes matching elements within the specified root.
|
|
25
|
+
- `pgs.dropdown.api(element)`: returns the instance associated with the specified initialized element.
|
|
26
|
+
- `instance.open()`: opens the component.
|
|
27
|
+
- `instance.close()`: closes the component.
|
|
28
|
+
- `instance.toggle()`: toggles the component state.
|
|
29
|
+
- `instance.refresh()`: refreshes the component and returns its updated instance.
|
|
30
|
+
- `instance.isOpen()`: returns true when the component is open.
|
|
30
31
|
|
|
31
|
-
##
|
|
32
|
+
## Related elements
|
|
32
33
|
|
|
33
|
-
- `
|
|
34
|
-
- `dropdown
|
|
35
|
-
- `dropdown-
|
|
36
|
-
- `
|
|
34
|
+
- `button`: provides the base styling for the tooltip trigger.
|
|
35
|
+
- `dropdown`: uses the related dropdown component or utility in this example.
|
|
36
|
+
- `dropdown-button`: uses the related dropdown-button component or utility in this example.
|
|
37
|
+
- `dropdown-content`: uses the related dropdown-content component or utility in this example.
|
|
37
38
|
|
|
38
39
|
## Output
|
|
39
40
|
|
|
40
|
-
|
|
41
|
+
Complete HTML markup and usage example for Tooltip.
|
|
41
42
|
|
|
42
|
-
##
|
|
43
|
+
## Example
|
|
43
44
|
|
|
44
45
|
```html
|
|
45
46
|
<span pgs="dropdown tooltip">
|
|
46
|
-
<button pgs="dropdown-button
|
|
47
|
+
<button pgs="dropdown-button button tooltip-button" pgs-option="buttonMini" title="open-tooltip" type="button">
|
|
47
48
|
<i class="fa-solid fa-info"></i>
|
|
48
49
|
</button>
|
|
49
50
|
<div pgs="dropdown-content tooltip-content">
|
package/docs/convenzioni.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Conventions
|
|
2
2
|
|
|
3
|
-
-
|
|
4
|
-
-
|
|
5
|
-
-
|
|
6
|
-
-
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
3
|
+
- Use `pgs` as the first choice for markup, layouts, components, and behaviors.
|
|
4
|
+
- Keep tokens consistent across references, SCSS, and JavaScript.
|
|
5
|
+
- Use `pgs-state` for runtime states.
|
|
6
|
+
- Use `pgs-option` for declarative options.
|
|
7
|
+
- Prefer custom properties and mixins to hardcoded CSS.
|
|
8
|
+
- Do not duplicate components that already exist in the library.
|
|
9
|
+
- Do not invent APIs: verify the sources in `assets/javascript/`.
|
|
10
|
+
- Keep only reusable styles and behaviors in `mypgs`.
|
|
11
|
+
- Keep project-specific customizations in the consuming project.
|
|
12
|
+
- Update `AGENTS.md` when introducing important patterns.
|
|
@@ -36,7 +36,7 @@ Uso sorgente SCSS:
|
|
|
36
36
|
|
|
37
37
|
## Sviluppo
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
One-time build:
|
|
40
40
|
|
|
41
41
|
```bash
|
|
42
42
|
npm run start
|
|
@@ -54,10 +54,10 @@ Creare un pacchetto locale:
|
|
|
54
54
|
npm pack
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
Recommended workflow when modifying the library:
|
|
58
58
|
|
|
59
59
|
1. modifica i sorgenti in `assets/`;
|
|
60
|
-
2. aggiorna
|
|
60
|
+
2. aggiorna i riferimenti o la documentazione se cambia il modo d'uso;
|
|
61
61
|
3. ricompila con `npm run start`;
|
|
62
62
|
4. verifica `dist/`;
|
|
63
63
|
5. crea il pacchetto con `npm pack`;
|
|
@@ -67,7 +67,7 @@ Nota: se la build Webpack fallisce, non modificare manualmente `dist/javascript`
|
|
|
67
67
|
|
|
68
68
|
## Aggiungere un nuovo modulo
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
Component example:
|
|
71
71
|
|
|
72
72
|
```js
|
|
73
73
|
export function PGS_myComponent_init(root = document) {
|