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
package/docs/components/menu.md
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- Automatically generated from reference/html/components/menu.html. Edit reference/html/components/menu.html and run npm run docs:generate again. -->
|
|
2
2
|
|
|
3
3
|
# Menu
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Menu markup, configuration, behavior, and usage example.
|
|
6
6
|
|
|
7
7
|
## PGS
|
|
8
8
|
|
|
9
|
-
- `menu`:
|
|
10
|
-
- `menu-buttonIcon`:
|
|
9
|
+
- `menu`: identifies the menu element used by Menu.
|
|
10
|
+
- `menu-buttonIcon`: identifies the menu-buttonIcon element used by Menu.
|
|
11
11
|
|
|
12
12
|
## PGS Options
|
|
13
13
|
|
|
14
|
-
- `horizontal`:
|
|
15
|
-
- `vertical`:
|
|
16
|
-
- `menuHeader`:
|
|
17
|
-
- `position`:
|
|
14
|
+
- `horizontal`: identifies the horizontal element used by Menu.
|
|
15
|
+
- `vertical`: identifies the vertical element used by Menu.
|
|
16
|
+
- `menuHeader`: identifies the menuHeader element used by Menu.
|
|
17
|
+
- `position`: identifies the position element used by Menu.
|
|
18
|
+
- `buttonNohover`: disables hover behavior on menu buttons generated at runtime.
|
|
18
19
|
|
|
19
20
|
## PGS States
|
|
20
21
|
|
|
21
|
-
- `open`:
|
|
22
|
+
- `open`: identifies the open element used by Menu.
|
|
22
23
|
|
|
23
|
-
## API
|
|
24
|
+
## JavaScript API
|
|
24
25
|
|
|
25
|
-
- `pgs.menu.init(root)`:
|
|
26
|
-
- `pgs.menu.api(element)`:
|
|
27
|
-
- `instance.refresh()`:
|
|
26
|
+
- `pgs.menu.init(root)`: initializes matching elements within the specified root.
|
|
27
|
+
- `pgs.menu.api(element)`: returns the instance associated with the specified initialized element.
|
|
28
|
+
- `instance.refresh()`: refreshes the component and returns its updated instance.
|
|
28
29
|
|
|
29
|
-
##
|
|
30
|
+
## Related elements
|
|
30
31
|
|
|
31
|
-
- `dropdown`:
|
|
32
|
-
- `dropdown-button`:
|
|
33
|
-
- `
|
|
34
|
-
- `dropdown-content`: identifica la lista annidata mostrata come pannello dropdown.
|
|
32
|
+
- `dropdown`: uses the related dropdown component or utility in this example.
|
|
33
|
+
- `dropdown-button`: uses the related dropdown-button component or utility in this example.
|
|
34
|
+
- `dropdown-content`: uses the related dropdown-content component or utility in this example.
|
|
35
35
|
|
|
36
36
|
## Output
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
Complete HTML markup and usage example for Menu.
|
|
39
39
|
|
|
40
|
-
##
|
|
40
|
+
## Example
|
|
41
41
|
|
|
42
42
|
```html
|
|
43
43
|
<nav pgs="menu" pgs-option="horizontal" aria-label="Menu orizzontale">
|
package/docs/components/modal.md
CHANGED
|
@@ -1,68 +1,69 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- Automatically generated from reference/html/components/modal.html. Edit reference/html/components/modal.html and run npm run docs:generate again. -->
|
|
2
2
|
|
|
3
3
|
# Modal
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Modal markup, configuration, behavior, and usage example.
|
|
6
6
|
|
|
7
7
|
## PGS
|
|
8
8
|
|
|
9
|
-
- `modal`:
|
|
10
|
-
- `modal-button`:
|
|
9
|
+
- `modal`: identifies the modal element used by Modal.
|
|
10
|
+
- `modal-button`: identifies the modal-button element used by Modal.
|
|
11
11
|
- `dialog`: token aggiunto dinamicamente all'elemento dialog inizializzato.
|
|
12
|
-
- `modal-dialog`:
|
|
13
|
-
- `modal-dialog-content`:
|
|
14
|
-
- `modal-dialog-content-header`:
|
|
15
|
-
- `modal-dialog-content-scroll`:
|
|
16
|
-
- `modal-close`:
|
|
12
|
+
- `modal-dialog`: identifies the modal-dialog element used by Modal.
|
|
13
|
+
- `modal-dialog-content`: identifies the modal-dialog-content element used by Modal.
|
|
14
|
+
- `modal-dialog-content-header`: identifies the modal-dialog-content-header element used by Modal.
|
|
15
|
+
- `modal-dialog-content-scroll`: identifies the modal-dialog-content-scroll element used by Modal.
|
|
16
|
+
- `modal-close`: identifies the modal-close element used by Modal.
|
|
17
17
|
|
|
18
18
|
## PGS Options
|
|
19
19
|
|
|
20
|
-
- `containerID`:
|
|
21
|
-
- `containerPGS`:
|
|
22
|
-
- `disableBackdropClose`:
|
|
23
|
-
- `history`:
|
|
24
|
-
- `topLevel`:
|
|
25
|
-
- `left`:
|
|
26
|
-
- `right`:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
- `
|
|
33
|
-
- `
|
|
34
|
-
- `instance.
|
|
35
|
-
- `instance.
|
|
36
|
-
- `instance.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
- `
|
|
43
|
-
- `
|
|
44
|
-
- `
|
|
20
|
+
- `containerID`: identifies the containerID element used by Modal.
|
|
21
|
+
- `containerPGS`: identifies the containerPGS element used by Modal.
|
|
22
|
+
- `disableBackdropClose`: identifies the disableBackdropClose element used by Modal.
|
|
23
|
+
- `history`: identifies the history element used by Modal.
|
|
24
|
+
- `topLevel`: identifies the topLevel element used by Modal.
|
|
25
|
+
- `left`: identifies the left element used by Modal.
|
|
26
|
+
- `right`: identifies the right element used by Modal.
|
|
27
|
+
- `buttonStrong`: applies stronger emphasis to the save action.
|
|
28
|
+
- `buttonClose`: styles the close action generated at runtime.
|
|
29
|
+
|
|
30
|
+
## JavaScript API
|
|
31
|
+
|
|
32
|
+
- `pgs.modal.init(root)`: initializes matching elements within the specified root.
|
|
33
|
+
- `pgs.modal.api(element)`: returns the instance associated with the specified initialized element.
|
|
34
|
+
- `instance.open()`: opens the component.
|
|
35
|
+
- `instance.close()`: closes the component.
|
|
36
|
+
- `instance.toggle()`: toggles the component state.
|
|
37
|
+
- `instance.refresh()`: refreshes the component and returns its updated instance.
|
|
38
|
+
- `instance.isOpen()`: returns true when the component is open.
|
|
39
|
+
|
|
40
|
+
## Related elements
|
|
41
|
+
|
|
42
|
+
- `button`: uses the related button component or utility in this example.
|
|
43
|
+
- `flexColumn`: vertically organizes modal content.
|
|
44
|
+
- `gapElements`: applies element spacing to modal content.
|
|
45
|
+
- `flexRow`: uses the related flexRow component or utility in this example.
|
|
45
46
|
|
|
46
47
|
## Output
|
|
47
48
|
|
|
48
|
-
|
|
49
|
+
Complete HTML markup and usage example for Modal.
|
|
49
50
|
|
|
50
|
-
##
|
|
51
|
+
## Example
|
|
51
52
|
|
|
52
53
|
```html
|
|
53
54
|
<div pgs="modal" pgs-option="containerID[modal-container]">
|
|
54
55
|
<button pgs="modal-button button" type="button">
|
|
55
|
-
<i class="fa-solid fa-window-maximize"></i>
|
|
56
|
+
<i class="fa-solid fa-window-maximize"></i> Open modal
|
|
56
57
|
</button>
|
|
57
58
|
|
|
58
59
|
<dialog>
|
|
59
60
|
<div pgs="modal-dialog-content">
|
|
60
61
|
<div pgs="modal-dialog-content-header">
|
|
61
|
-
<h3>
|
|
62
|
+
<h3>Example modal</h3>
|
|
62
63
|
</div>
|
|
63
64
|
|
|
64
65
|
<div pgs="modal-dialog-content-scroll">
|
|
65
|
-
<p>
|
|
66
|
+
<p>Modal content. The close button is added automatically when missing.</p>
|
|
66
67
|
</div>
|
|
67
68
|
</div>
|
|
68
69
|
</dialog>
|
|
@@ -70,17 +71,17 @@ Quattro esempi basati su dialog nativo e un contenitore opzionale usato da conta
|
|
|
70
71
|
|
|
71
72
|
<div pgs="modal" pgs-option="containerID[modal-container]">
|
|
72
73
|
<button pgs="modal-button button" type="button">
|
|
73
|
-
<i class="fa-solid fa-window-maximize"></i>
|
|
74
|
+
<i class="fa-solid fa-window-maximize"></i> Open modal right
|
|
74
75
|
</button>
|
|
75
76
|
|
|
76
77
|
<dialog pgs-option="right">
|
|
77
78
|
<div pgs="modal-dialog-content">
|
|
78
79
|
<div pgs="modal-dialog-content-header">
|
|
79
|
-
<h3>
|
|
80
|
+
<h3>Side modal</h3>
|
|
80
81
|
</div>
|
|
81
82
|
|
|
82
83
|
<div pgs="modal-dialog-content-scroll">
|
|
83
|
-
<p>
|
|
84
|
+
<p>Modal content with <code>pgs-option="right"</code>.</p>
|
|
84
85
|
</div>
|
|
85
86
|
</div>
|
|
86
87
|
</dialog>
|
|
@@ -88,17 +89,17 @@ Quattro esempi basati su dialog nativo e un contenitore opzionale usato da conta
|
|
|
88
89
|
|
|
89
90
|
<div pgs="modal" pgs-option="containerID[modal-container]">
|
|
90
91
|
<button pgs="modal-button button" type="button">
|
|
91
|
-
<i class="fa-solid fa-window-maximize"></i>
|
|
92
|
+
<i class="fa-solid fa-window-maximize"></i> Open modal left
|
|
92
93
|
</button>
|
|
93
94
|
|
|
94
95
|
<dialog pgs-option="left">
|
|
95
96
|
<div pgs="modal-dialog-content">
|
|
96
97
|
<div pgs="modal-dialog-content-header">
|
|
97
|
-
<h3>
|
|
98
|
+
<h3>Left-side modal</h3>
|
|
98
99
|
</div>
|
|
99
100
|
|
|
100
101
|
<div pgs="modal-dialog-content-scroll">
|
|
101
|
-
<p>
|
|
102
|
+
<p>Modal content with <code>pgs-option="left"</code>.</p>
|
|
102
103
|
</div>
|
|
103
104
|
</div>
|
|
104
105
|
</dialog>
|
|
@@ -106,21 +107,21 @@ Quattro esempi basati su dialog nativo e un contenitore opzionale usato da conta
|
|
|
106
107
|
|
|
107
108
|
<div pgs="modal">
|
|
108
109
|
<button pgs="modal-button button" type="button">
|
|
109
|
-
<i class="fa-solid fa-floppy-disk"></i>
|
|
110
|
+
<i class="fa-solid fa-floppy-disk"></i> Confirmation salvataggio
|
|
110
111
|
</button>
|
|
111
112
|
|
|
112
113
|
<dialog pgs-option="topLevel">
|
|
113
114
|
<div pgs="modal-dialog-content">
|
|
114
115
|
<div pgs="modal-dialog-content-header">
|
|
115
|
-
<h3>
|
|
116
|
+
<h3>Save changes?</h3>
|
|
116
117
|
</div>
|
|
117
118
|
|
|
118
|
-
<div pgs="modal-dialog-content-scroll
|
|
119
|
-
<p>
|
|
119
|
+
<div pgs="modal-dialog-content-scroll flexColumn gapElements">
|
|
120
|
+
<p>You have unsaved changes. Confirm to apply them or cancel to return to the page.</p>
|
|
120
121
|
|
|
121
122
|
<div pgs="flexRow">
|
|
122
|
-
<button pgs="button modal-close" type="button">
|
|
123
|
-
<button pgs="buttonStrong" type="button">
|
|
123
|
+
<button pgs="button modal-close" type="button">Cancel</button>
|
|
124
|
+
<button pgs="button" pgs-option="buttonStrong" type="button">Save changes</button>
|
|
124
125
|
</div>
|
|
125
126
|
</div>
|
|
126
127
|
</div>
|
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- Automatically generated from reference/html/components/notification.html. Edit reference/html/components/notification.html and run npm run docs:generate again. -->
|
|
2
2
|
|
|
3
3
|
# Notification
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Notification markup, configuration, behavior, and usage example.
|
|
6
6
|
|
|
7
7
|
## PGS
|
|
8
8
|
|
|
9
|
-
- `notification`:
|
|
10
|
-
- `notificationTrigger`:
|
|
11
|
-
- `notification-element`:
|
|
12
|
-
- `notification-element-title`:
|
|
13
|
-
- `notification-element-content`:
|
|
9
|
+
- `notification`: identifies the notification element used by Notification.
|
|
10
|
+
- `notificationTrigger`: identifies the notificationTrigger element used by Notification.
|
|
11
|
+
- `notification-element`: identifies the notification-element element used by Notification.
|
|
12
|
+
- `notification-element-title`: identifies the notification-element-title element used by Notification.
|
|
13
|
+
- `notification-element-content`: identifies the notification-element-content element used by Notification.
|
|
14
14
|
|
|
15
15
|
## PGS Options
|
|
16
16
|
|
|
17
|
-
- `toast`:
|
|
18
|
-
- `notification`:
|
|
17
|
+
- `toast`: identifies the toast element used by Notification.
|
|
18
|
+
- `notification`: identifies the notification element used by Notification.
|
|
19
|
+
- `buttonClose`: styles the dismiss action generated at runtime.
|
|
19
20
|
|
|
20
21
|
## PGS States
|
|
21
22
|
|
|
22
|
-
- `success`:
|
|
23
|
-
- `error`:
|
|
24
|
-
- `warning`:
|
|
25
|
-
- `info`:
|
|
23
|
+
- `success`: identifies the success element used by Notification.
|
|
24
|
+
- `error`: identifies the error element used by Notification.
|
|
25
|
+
- `warning`: identifies the warning element used by Notification.
|
|
26
|
+
- `info`: identifies the info element used by Notification.
|
|
26
27
|
|
|
27
|
-
## API
|
|
28
|
+
## JavaScript API
|
|
28
29
|
|
|
29
|
-
- `pgs.notification.trigger(root)`:
|
|
30
|
-
- `pgs.notification.alert.error(text, link, timeout, icon)`:
|
|
31
|
-
- `pgs.notification.alert.success(text, link, timeout, icon)`:
|
|
32
|
-
- `pgs.notification.alert.info(text, link, timeout, icon)`:
|
|
33
|
-
- `pgs.notification.alert.warning(text, link, timeout, icon)`:
|
|
34
|
-
- `pgs.notification.alert.deleteAll()`:
|
|
35
|
-
- `pgs.notification.toast.error(text, timeout, icon)`:
|
|
36
|
-
- `pgs.notification.toast.success(text, timeout, icon)`:
|
|
37
|
-
- `pgs.notification.toast.info(text, timeout, icon)`:
|
|
38
|
-
- `pgs.notification.toast.warning(text, timeout, icon)`:
|
|
39
|
-
- `pgs.notification.toast.deleteAll()`:
|
|
30
|
+
- `pgs.notification.trigger(root)`: provides the documented operation through the component public API.
|
|
31
|
+
- `pgs.notification.alert.error(text, link, timeout, icon)`: provides the documented operation through the component public API.
|
|
32
|
+
- `pgs.notification.alert.success(text, link, timeout, icon)`: provides the documented operation through the component public API.
|
|
33
|
+
- `pgs.notification.alert.info(text, link, timeout, icon)`: provides the documented operation through the component public API.
|
|
34
|
+
- `pgs.notification.alert.warning(text, link, timeout, icon)`: provides the documented operation through the component public API.
|
|
35
|
+
- `pgs.notification.alert.deleteAll()`: provides the documented operation through the component public API.
|
|
36
|
+
- `pgs.notification.toast.error(text, timeout, icon)`: provides the documented operation through the component public API.
|
|
37
|
+
- `pgs.notification.toast.success(text, timeout, icon)`: provides the documented operation through the component public API.
|
|
38
|
+
- `pgs.notification.toast.info(text, timeout, icon)`: provides the documented operation through the component public API.
|
|
39
|
+
- `pgs.notification.toast.warning(text, timeout, icon)`: provides the documented operation through the component public API.
|
|
40
|
+
- `pgs.notification.toast.deleteAll()`: provides the documented operation through the component public API.
|
|
40
41
|
|
|
41
|
-
##
|
|
42
|
+
## Related elements
|
|
42
43
|
|
|
43
|
-
- `hidden`:
|
|
44
|
-
- `buttonClose`: identifica il pulsante di rimozione aggiunto a ogni messaggio.
|
|
44
|
+
- `hidden`: uses the related hidden component or utility in this example.
|
|
45
45
|
|
|
46
46
|
## Output
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
Complete HTML markup and usage example for Notification.
|
|
49
49
|
|
|
50
|
-
##
|
|
50
|
+
## Example
|
|
51
51
|
|
|
52
52
|
```html
|
|
53
53
|
<div pgs="notification" aria-live="polite"></div>
|
|
54
54
|
<div pgs="notification" pgs-option="toast" aria-live="polite"></div>
|
|
55
55
|
|
|
56
56
|
<div pgs="hidden notificationTrigger" pgs-option='notification[{
|
|
57
|
-
"title": "
|
|
58
|
-
"message": "
|
|
57
|
+
"title": "Title",
|
|
58
|
+
"message": "Message",
|
|
59
59
|
"element": "notification",
|
|
60
60
|
"type": "info",
|
|
61
61
|
"icon": null,
|
|
@@ -65,7 +65,7 @@ Due contenitori notification, uno persistente e uno configurato con l'opzione to
|
|
|
65
65
|
|
|
66
66
|
<div pgs="hidden notificationTrigger" pgs-option='notification[{
|
|
67
67
|
"title": "Benvenuto",
|
|
68
|
-
"message": "
|
|
68
|
+
"message": "Message",
|
|
69
69
|
"element": "toast",
|
|
70
70
|
"type": "info",
|
|
71
71
|
"icon": null,
|
|
@@ -75,7 +75,7 @@ Due contenitori notification, uno persistente e uno configurato con l'opzione to
|
|
|
75
75
|
<!--
|
|
76
76
|
<div
|
|
77
77
|
pgs="hidden notificationTrigger"
|
|
78
|
-
pgs-option='notification[{"title":"
|
|
78
|
+
pgs-option='notification[{"title":"Title","message":"Message","element":"notification","type":"info","icon":"<i class=\"fa-solid fa-rocket\"></i>","duration":"4000","link":"/page/"}]'>
|
|
79
79
|
</div>
|
|
80
80
|
-->
|
|
81
81
|
```
|
|
@@ -1,91 +1,93 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- Automatically generated from reference/html/components/search.html. Edit reference/html/components/search.html and run npm run docs:generate again. -->
|
|
2
2
|
|
|
3
3
|
# Search
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Search markup, configuration, behavior, and usage example.
|
|
6
6
|
|
|
7
7
|
## PGS
|
|
8
8
|
|
|
9
|
-
- `search`:
|
|
10
|
-
- `search-suggestions`:
|
|
11
|
-
- `search-suggestions-item`:
|
|
12
|
-
- `search-modal`:
|
|
13
|
-
- `search-mobile`:
|
|
9
|
+
- `search`: identifies the search element used by Search.
|
|
10
|
+
- `search-suggestions`: identifies the search-suggestions element used by Search.
|
|
11
|
+
- `search-suggestions-item`: identifies the search-suggestions-item element used by Search.
|
|
12
|
+
- `search-modal`: identifies the search-modal element used by Search.
|
|
13
|
+
- `search-mobile`: identifies the search-mobile element used by Search.
|
|
14
14
|
|
|
15
15
|
## PGS Options
|
|
16
16
|
|
|
17
|
-
- `containerPGS`:
|
|
17
|
+
- `containerPGS`: identifies the containerPGS element used by Search.
|
|
18
|
+
- `buttonNohover`: disables hover behavior on the search container.
|
|
19
|
+
- `buttonIcon`: presents search and close actions as icon buttons.
|
|
18
20
|
|
|
19
21
|
## PGS States
|
|
20
22
|
|
|
21
|
-
- `open`:
|
|
22
|
-
- `loading`:
|
|
23
|
-
- `error`:
|
|
24
|
-
- `selected`:
|
|
25
|
-
|
|
26
|
-
## API
|
|
27
|
-
|
|
28
|
-
- `pgs.search.init(root)`:
|
|
29
|
-
- `pgs.search.api(element)`:
|
|
30
|
-
- `instance.configure(options)`:
|
|
31
|
-
- `instance.setSource(source)`:
|
|
32
|
-
- `instance.search(query)`:
|
|
33
|
-
- `instance.open()`:
|
|
34
|
-
- `instance.close()`:
|
|
35
|
-
- `instance.clear()`:
|
|
23
|
+
- `open`: identifies the open element used by Search.
|
|
24
|
+
- `loading`: identifies the loading element used by Search.
|
|
25
|
+
- `error`: identifies the error element used by Search.
|
|
26
|
+
- `selected`: identifies the selected element used by Search.
|
|
27
|
+
|
|
28
|
+
## JavaScript API
|
|
29
|
+
|
|
30
|
+
- `pgs.search.init(root)`: initializes matching elements within the specified root.
|
|
31
|
+
- `pgs.search.api(element)`: returns the instance associated with the specified initialized element.
|
|
32
|
+
- `instance.configure(options)`: provides the documented operation through the component public API.
|
|
33
|
+
- `instance.setSource(source)`: provides the documented operation through the component public API.
|
|
34
|
+
- `instance.search(query)`: provides the documented operation through the component public API.
|
|
35
|
+
- `instance.open()`: opens the component.
|
|
36
|
+
- `instance.close()`: closes the component.
|
|
37
|
+
- `instance.clear()`: provides the documented operation through the component public API.
|
|
36
38
|
- `instance.cancel()`: annulla debounce e richiesta attiva.
|
|
37
|
-
- `instance.select(index, submit)`:
|
|
38
|
-
- `instance.refresh()`:
|
|
39
|
-
- `instance.destroy()`:
|
|
40
|
-
- `instance.items()`:
|
|
41
|
-
- `instance.isOpen()`:
|
|
42
|
-
- `instance.isLoading()`:
|
|
43
|
-
- `instance.setActiveIndex(index)`:
|
|
44
|
-
|
|
45
|
-
##
|
|
46
|
-
|
|
47
|
-
- `
|
|
48
|
-
- `modal`:
|
|
49
|
-
- `modal-button`:
|
|
50
|
-
- `modal-close`:
|
|
51
|
-
- `
|
|
52
|
-
- `
|
|
53
|
-
- `section`: applica la spaziatura di sezione alla ricerca mobile.
|
|
39
|
+
- `instance.select(index, submit)`: provides the documented operation through the component public API.
|
|
40
|
+
- `instance.refresh()`: refreshes the component and returns its updated instance.
|
|
41
|
+
- `instance.destroy()`: removes listeners and releases the component instance.
|
|
42
|
+
- `instance.items()`: provides the documented operation through the component public API.
|
|
43
|
+
- `instance.isOpen()`: returns true when the component is open.
|
|
44
|
+
- `instance.isLoading()`: returns true while the component is loading.
|
|
45
|
+
- `instance.setActiveIndex(index)`: provides the documented operation through the component public API.
|
|
46
|
+
|
|
47
|
+
## Related elements
|
|
48
|
+
|
|
49
|
+
- `button`: provides the base styling for search controls.
|
|
50
|
+
- `modal`: uses the related modal component or utility in this example.
|
|
51
|
+
- `modal-button`: uses the related modal-button component or utility in this example.
|
|
52
|
+
- `modal-close`: uses the related modal-close component or utility in this example.
|
|
53
|
+
- `flexRow`: uses the related flexRow component or utility in this example.
|
|
54
|
+
- `section`: uses the related section component or utility in this example.
|
|
54
55
|
|
|
55
56
|
## Output
|
|
56
57
|
|
|
57
|
-
|
|
58
|
+
Complete HTML markup and usage example for Search.
|
|
58
59
|
|
|
59
|
-
##
|
|
60
|
+
## Example
|
|
60
61
|
|
|
61
62
|
```html
|
|
62
|
-
<form pgs="
|
|
63
|
-
<button type="submit" title="
|
|
64
|
-
<input type="search" name="s" placeholder="
|
|
63
|
+
<form pgs="button search" pgs-option="buttonNohover" autocomplete="off" action="" method="get">
|
|
64
|
+
<button type="submit" title="Search"><i class="fa-solid fa-search"></i></button>
|
|
65
|
+
<input type="search" name="s" placeholder="Search" value="">
|
|
65
66
|
<ul pgs="search-suggestions"></ul>
|
|
66
67
|
</form>
|
|
67
68
|
|
|
68
69
|
<div pgs="modal search-modal" pgs-option="containerPGS[header]">
|
|
69
70
|
|
|
70
|
-
<button type="button" pgs="modal-button buttonIcon" title="
|
|
71
|
+
<button type="button" pgs="modal-button button" pgs-option="buttonIcon" title="Search">
|
|
71
72
|
<i class="fa-solid fa-search"></i>
|
|
72
73
|
</button>
|
|
73
74
|
|
|
74
75
|
<dialog>
|
|
75
76
|
<div pgs="flexRow section search-mobile">
|
|
76
77
|
|
|
77
|
-
<form pgs="
|
|
78
|
-
<button type="submit" title="
|
|
78
|
+
<form pgs="button search" pgs-option="buttonNohover" autocomplete="off" action="/" method="get">
|
|
79
|
+
<button type="submit" title="Search">
|
|
79
80
|
<i class="fa-solid fa-search"></i>
|
|
80
81
|
</button>
|
|
81
82
|
|
|
82
|
-
<input type="search" name="s" placeholder="
|
|
83
|
+
<input type="search" name="s" placeholder="Search" value="">
|
|
83
84
|
<ul pgs="search-suggestions"></ul>
|
|
85
|
+
|
|
86
|
+
<button type="button" pgs="modal-close button" pgs-option="buttonIcon">
|
|
87
|
+
<i class="fa-solid fa-close"></i>
|
|
88
|
+
</button>
|
|
84
89
|
</form>
|
|
85
90
|
|
|
86
|
-
<button type="button" pgs="modal-close buttonIcon">
|
|
87
|
-
<i class="fa-solid fa-close"></i>
|
|
88
|
-
</button>
|
|
89
91
|
|
|
90
92
|
</div>
|
|
91
93
|
</dialog>
|