mypgs 2.1.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.
Files changed (135) hide show
  1. package/.vscode/tasks.json +39 -0
  2. package/AGENTS.md +22 -21
  3. package/README.md +2 -2
  4. package/assets/javascript/components/_menu.js +2 -1
  5. package/assets/javascript/components/_modals.js +1 -1
  6. package/assets/javascript/components/_notifications.js +2 -1
  7. package/assets/javascript/components/_slides.js +2 -2
  8. package/assets/scss/base/_body.scss +5 -5
  9. package/assets/scss/base/_general.scss +27 -18
  10. package/assets/scss/base/_variables.scss +1 -1
  11. package/assets/scss/components/_accordion.scss +9 -7
  12. package/assets/scss/components/_alerts.scss +71 -0
  13. package/assets/scss/components/_badges.scss +40 -48
  14. package/assets/scss/components/_button.scss +27 -19
  15. package/assets/scss/components/_card.scss +9 -4
  16. package/assets/scss/components/_formAddon.scss +5 -1
  17. package/assets/scss/components/_logo.scss +3 -4
  18. package/assets/scss/components/_menu.scss +26 -3
  19. package/assets/scss/components/_modals.scss +2 -2
  20. package/assets/scss/components/_stepTabs.scss +2 -1
  21. package/assets/scss/index.scss +2 -3
  22. package/assets/scss/layout/_header.scss +3 -3
  23. package/assets/scss/layout/_responsive.scss +63 -0
  24. package/assets/scss/mixin/_mx-base.scss +4 -8
  25. package/assets/scss/mixin/_mx-button.scss +74 -70
  26. package/assets/scss/mixin/_mx-card.scss +33 -36
  27. package/assets/scss/mixin/_mx-form.scss +10 -5
  28. package/assets/scss/mixin/_mx-formAddon.scss +100 -58
  29. package/assets/scss/mixin/_mx-hover.scss +21 -15
  30. package/assets/scss/mixin/_mx-responsive.scss +81 -201
  31. package/demo/demo.css +9 -6
  32. package/demo/demo.html +7 -5
  33. package/demo/demo.js +34 -32
  34. package/dist/css/index.css +2502 -3507
  35. package/dist/css/index.css.map +1 -1
  36. package/dist/css/index.min.css +1 -1
  37. package/dist/javascript/index.js +7 -5
  38. package/dist/javascript/index.js.map +1 -1
  39. package/dist/javascript/index.min.js +1 -1
  40. package/docs/componenti-e-markup.md +5 -5
  41. package/docs/components/accordion.md +3 -3
  42. package/docs/components/alerts.md +67 -0
  43. package/docs/components/badges.md +11 -8
  44. package/docs/components/breadcumbs.md +1 -1
  45. package/docs/components/button.md +9 -9
  46. package/docs/components/card.md +9 -6
  47. package/docs/components/dropdown.md +1 -1
  48. package/docs/components/form.md +6 -5
  49. package/docs/components/formAddon.md +56 -19
  50. package/docs/components/logo.md +1 -1
  51. package/docs/components/menu.md +2 -2
  52. package/docs/components/modal.md +7 -6
  53. package/docs/components/notification.md +2 -2
  54. package/docs/components/search.md +8 -7
  55. package/docs/components/slides.md +5 -6
  56. package/docs/components/stepTabs.md +7 -7
  57. package/docs/components/steps.md +1 -1
  58. package/docs/components/summary.md +1 -1
  59. package/docs/components/table.md +1 -1
  60. package/docs/components/tooltip.md +4 -3
  61. package/docs/convenzioni.md +1 -1
  62. package/docs/export-e-sviluppo.md +1 -1
  63. package/docs/helper-javascript.md +1 -1
  64. package/docs/layout/body.md +1 -1
  65. package/docs/layout/footer.md +7 -3
  66. package/docs/layout/header.md +5 -4
  67. package/docs/layout/pageShell.md +11 -11
  68. package/docs/layout/responsive.md +90 -0
  69. package/docs/layout/section.md +16 -16
  70. package/docs/patterns/cookieConsent.md +6 -3
  71. package/docs/utilizzo-css-scss.md +26 -2
  72. package/package.json +1 -1
  73. package/{templates → reference}/html/components/accordion.html +2 -2
  74. package/reference/html/components/alerts.html +59 -0
  75. package/{templates → reference}/html/components/badges.html +9 -7
  76. package/{templates → reference}/html/components/button.html +7 -7
  77. package/{templates → reference}/html/components/card.html +7 -5
  78. package/{templates → reference}/html/components/form.html +5 -4
  79. package/reference/html/components/formAddon.html +109 -0
  80. package/{templates → reference}/html/components/menu.html +2 -2
  81. package/{templates → reference}/html/components/modal.html +6 -5
  82. package/{templates → reference}/html/components/notification.html +2 -2
  83. package/{templates → reference}/html/components/search.html +7 -6
  84. package/{templates → reference}/html/components/slides.html +4 -5
  85. package/{templates → reference}/html/components/stepTabs.html +6 -6
  86. package/{templates → reference}/html/components/tooltip.html +3 -2
  87. package/{templates → reference}/html/layout/footer.html +5 -2
  88. package/{templates → reference}/html/layout/header.html +4 -3
  89. package/{templates → reference}/html/layout/pageShell.html +10 -10
  90. package/reference/html/layout/responsive.html +83 -0
  91. package/{templates → reference}/html/layout/section.html +15 -15
  92. package/{templates → reference}/html/patterns/cookieConsent.html +4 -2
  93. package/{templates → reference}/react/components/accordion.jsx +1 -1
  94. package/reference/react/components/alerts.jsx +46 -0
  95. package/{templates → reference}/react/components/button.jsx +4 -4
  96. package/{templates → reference}/react/components/card.jsx +2 -2
  97. package/{templates → reference}/react/components/form.jsx +1 -1
  98. package/{templates → reference}/react/components/modal.jsx +2 -2
  99. package/{templates → reference}/react/components/search.jsx +4 -4
  100. package/{templates → reference}/react/components/slides.jsx +1 -1
  101. package/{templates → reference}/react/components/stepTabs.jsx +4 -4
  102. package/{templates → reference}/react/components/tooltip.jsx +1 -1
  103. package/{templates → reference}/react/layout/pageShell.jsx +2 -2
  104. package/reference/react/layout/responsive.jsx +61 -0
  105. package/{templates → reference}/react/layout/section.jsx +12 -12
  106. package/{templates → reference}/react/patterns/cookieConsent.jsx +1 -1
  107. package/{templates → reference}/react/patterns/footer.jsx +1 -1
  108. package/{templates → reference}/react/patterns/header.jsx +2 -2
  109. package/scripts/generate-component-docs.js +8 -8
  110. package/assets/scss/layout/_flex.scss +0 -49
  111. package/assets/scss/layout/_gap.scss +0 -21
  112. package/assets/scss/layout/_grid.scss +0 -13
  113. package/docs/layout/flex.md +0 -116
  114. package/docs/layout/grid.md +0 -116
  115. package/templates/html/components/formAddon.html +0 -72
  116. package/templates/html/layout/flex.html +0 -109
  117. package/templates/html/layout/grid.html +0 -109
  118. package/templates/react/layout/flex.jsx +0 -36
  119. package/templates/react/layout/grid.jsx +0 -36
  120. /package/{templates → reference}/html/components/breadcumbs.html +0 -0
  121. /package/{templates → reference}/html/components/dropdown.html +0 -0
  122. /package/{templates → reference}/html/components/logo.html +0 -0
  123. /package/{templates → reference}/html/components/steps.html +0 -0
  124. /package/{templates → reference}/html/components/summary.html +0 -0
  125. /package/{templates → reference}/html/components/table.html +0 -0
  126. /package/{templates → reference}/html/layout/body.html +0 -0
  127. /package/{templates → reference}/react/components/breadcumbs.jsx +0 -0
  128. /package/{templates → reference}/react/components/dropdown.jsx +0 -0
  129. /package/{templates → reference}/react/components/logo.jsx +0 -0
  130. /package/{templates → reference}/react/components/menu.jsx +0 -0
  131. /package/{templates → reference}/react/components/notification.jsx +0 -0
  132. /package/{templates → reference}/react/components/steps.jsx +0 -0
  133. /package/{templates → reference}/react/components/summary.jsx +0 -0
  134. /package/{templates → reference}/react/components/table.jsx +0 -0
  135. /package/{templates → reference}/react/layout/body.jsx +0 -0
@@ -1,72 +0,0 @@
1
- <!--
2
- /**
3
- * @title Form Add-ons
4
- * @description Additional form controls for selectable cards, two-state buttons, switches, and compact chip groups.
5
- *
6
- * @pgs
7
- * - checkboxBackground: presents a checkbox as a selectable container with a highlighted checked state.
8
- * - twoState: presents checkbox or radio labels as buttons whose appearance changes when selected.
9
- * - toggle: presents a checkbox as a switch with a rail and movable thumb.
10
- * - chips: groups twoState controls into a compact segmented selector.
11
- *
12
- * @related
13
- * - flexColumnElements: vertically arranges the form add-on examples.
14
- * - flexColumnTexts: groups each example with its heading and control.
15
- *
16
- * @return HTML examples of the checkboxBackground, twoState, toggle, and chips form controls using native checkbox and radio inputs.
17
- */
18
- -->
19
-
20
- <div pgs="flexColumnElements">
21
- <section pgs="flexColumnTexts">
22
- <strong>Checkbox with background</strong>
23
-
24
- <label pgs="checkboxBackground">
25
- <input type="checkbox" name="notifications" value="enabled">
26
- <span>
27
- <strong>Enable notifications</strong><br>
28
- Receive important account updates.
29
- </span>
30
- </label>
31
- </section>
32
-
33
- <section pgs="flexColumnTexts">
34
- <strong>Two-state controls</strong>
35
-
36
- <label pgs="twoState">
37
- <input type="checkbox" name="favorite" value="yes">
38
- <i class="fa-solid fa-star" aria-hidden="true"></i>
39
- Add to favorites
40
- </label>
41
- </section>
42
-
43
- <section pgs="flexColumnTexts">
44
- <strong>Toggle</strong>
45
-
46
- <label pgs="toggle">
47
- <span>Enable dark mode</span>
48
- <input type="checkbox" name="darkMode" value="enabled">
49
- </label>
50
- </section>
51
-
52
- <section pgs="flexColumnTexts">
53
- <strong>Chips</strong>
54
-
55
- <div pgs="chips" role="group" aria-label="Select a plan">
56
- <label pgs="twoState">
57
- <input type="radio" name="plan" value="basic" checked>
58
- Basic
59
- </label>
60
-
61
- <label pgs="twoState">
62
- <input type="radio" name="plan" value="pro">
63
- Pro
64
- </label>
65
-
66
- <label pgs="twoState">
67
- <input type="radio" name="plan" value="enterprise">
68
- Enterprise
69
- </label>
70
- </div>
71
- </section>
72
- </div>
@@ -1,109 +0,0 @@
1
- <!--
2
- /**
3
- * @title Flex
4
- * @description Flex markup, configuration, behavior, and usage example.
5
- *
6
- * @pgs
7
- * - flex-2: identifies the flex-2 element used by Flex.
8
- * - flex-3: identifies the flex-3 element used by Flex.
9
- * - flex-4: identifies the flex-4 element used by Flex.
10
- * - flex-6: identifies the flex-6 element used by Flex.
11
- *
12
- * @related
13
- * - container: defines the container context for the introduction.
14
- * - flexColumnTexts: vertically organizes and spaces card text and content.
15
- * - card: makes the demonstration cells of the flex layout visible.
16
- *
17
- * @return HTML collection of responsive flex layouts with two, three, four, and six items.
18
- */
19
- -->
20
-
21
- <div pgs="container flexColumnTexts">
22
- <strong>Standard section</strong>
23
- <p>Centered content inside a MyPGS section.</p>
24
- </div>
25
-
26
-
27
- <div pgs="flex-2">
28
- <article pgs="card flexColumnTexts">
29
- <strong>Column one</strong>
30
- <p>First column content.</p>
31
- </article>
32
-
33
- <article pgs="card flexColumnTexts">
34
- <strong>Column two</strong>
35
- <p>Second column content.</p>
36
- </article>
37
- </div>
38
-
39
-
40
- <div pgs="flex-3">
41
- <article pgs="card flexColumnTexts">
42
- <strong>Column one</strong>
43
- <p>First column content.</p>
44
- </article>
45
-
46
- <article pgs="card flexColumnTexts">
47
- <strong>Column two</strong>
48
- <p>Second column content.</p>
49
- </article>
50
-
51
- <article pgs="card flexColumnTexts">
52
- <strong>Column three</strong>
53
- <p>Third column content.</p>
54
- </article>
55
- </div>
56
-
57
-
58
- <div pgs="flex-4">
59
- <article pgs="card flexColumnTexts">
60
- <strong>Column one</strong>
61
- <p>First column content.</p>
62
- </article>
63
-
64
- <article pgs="card flexColumnTexts">
65
- <strong>Column two</strong>
66
- <p>Second column content.</p>
67
- </article>
68
-
69
- <article pgs="card flexColumnTexts">
70
- <strong>Column three</strong>
71
- <p>Third column content.</p>
72
- </article>
73
- <article pgs="card flexColumnTexts">
74
- <strong>Column four</strong>
75
- <p>Fourth column content.</p>
76
- </article>
77
- </div>
78
-
79
- <div pgs="flex-6">
80
- <article pgs="card flexColumnTexts">
81
- <strong>Column one</strong>
82
- <p>First column content.</p>
83
- </article>
84
-
85
- <article pgs="card flexColumnTexts">
86
- <strong>Column two</strong>
87
- <p>Second column content.</p>
88
- </article>
89
-
90
- <article pgs="card flexColumnTexts">
91
- <strong>Column three</strong>
92
- <p>Third column content.</p>
93
- </article>
94
-
95
- <article pgs="card flexColumnTexts">
96
- <strong>Column four</strong>
97
- <p>Fourth column content.</p>
98
- </article>
99
-
100
- <article pgs="card flexColumnTexts">
101
- <strong>Column five</strong>
102
- <p>Fifth column content.</p>
103
- </article>
104
-
105
- <article pgs="card flexColumnTexts">
106
- <strong>Column six</strong>
107
- <p>Sixth column content.</p>
108
- </article>
109
- </div
@@ -1,109 +0,0 @@
1
- <!--
2
- /**
3
- * @title Grid
4
- * @description Responsive grid examples that distribute two to six columns while preserving design-system gaps and sizing.
5
- *
6
- * @pgs
7
- * - grid-2: creates a responsive grid with up to two columns.
8
- * - grid-3: creates a responsive grid with up to three columns.
9
- * - grid-4: creates a responsive grid with up to four columns.
10
- * - grid-6: creates a responsive grid with up to six columns.
11
- *
12
- * @related
13
- * - container: defines the container context for the introduction.
14
- * - flexColumnTexts: organizes and spaces introductory and card text.
15
- * - card: makes the demonstration grid cells visible.
16
- *
17
- * @return HTML collection of responsive grids with two, three, four, and six columns.
18
- */
19
- -->
20
-
21
- <div pgs="container flexColumnTexts">
22
- <strong>Standard section</strong>
23
- <p>Centered content inside a MyPGS section.</p>
24
- </div>
25
-
26
-
27
- <div pgs="grid-2">
28
- <article pgs="card flexColumnTexts">
29
- <strong>Column one</strong>
30
- <p>First column content.</p>
31
- </article>
32
-
33
- <article pgs="card flexColumnTexts">
34
- <strong>Column two</strong>
35
- <p>Second column content.</p>
36
- </article>
37
- </div>
38
-
39
-
40
- <div pgs="grid-3">
41
- <article pgs="card flexColumnTexts">
42
- <strong>Column one</strong>
43
- <p>First column content.</p>
44
- </article>
45
-
46
- <article pgs="card flexColumnTexts">
47
- <strong>Column two</strong>
48
- <p>Second column content.</p>
49
- </article>
50
-
51
- <article pgs="card flexColumnTexts">
52
- <strong>Column three</strong>
53
- <p>Third column content.</p>
54
- </article>
55
- </div>
56
-
57
-
58
- <div pgs="grid-4">
59
- <article pgs="card flexColumnTexts">
60
- <strong>Column one</strong>
61
- <p>First column content.</p>
62
- </article>
63
-
64
- <article pgs="card flexColumnTexts">
65
- <strong>Column two</strong>
66
- <p>Second column content.</p>
67
- </article>
68
-
69
- <article pgs="card flexColumnTexts">
70
- <strong>Column three</strong>
71
- <p>Third column content.</p>
72
- </article>
73
- <article pgs="card flexColumnTexts">
74
- <strong>Column four</strong>
75
- <p>Fourth column content.</p>
76
- </article>
77
- </div>
78
-
79
- <div pgs="grid-6">
80
- <article pgs="card flexColumnTexts">
81
- <strong>Column one</strong>
82
- <p>First column content.</p>
83
- </article>
84
-
85
- <article pgs="card flexColumnTexts">
86
- <strong>Column two</strong>
87
- <p>Second column content.</p>
88
- </article>
89
-
90
- <article pgs="card flexColumnTexts">
91
- <strong>Column three</strong>
92
- <p>Third column content.</p>
93
- </article>
94
-
95
- <article pgs="card flexColumnTexts">
96
- <strong>Column four</strong>
97
- <p>Fourth column content.</p>
98
- </article>
99
-
100
- <article pgs="card flexColumnTexts">
101
- <strong>Column five</strong>
102
- <p>Fifth column content.</p>
103
- </article>
104
-
105
- <article pgs="card flexColumnTexts">
106
- <strong>Column six</strong>
107
- <p>Sixth column content.</p>
108
- </article>
109
- </div
@@ -1,36 +0,0 @@
1
- const columns = [
2
- ["Column one", "First column content."],
3
- ["Column two", "Second column content."],
4
- ["Column three", "Third column content."],
5
- ["Column four", "Fourth column content."],
6
- ["Column five", "Fifth column content."],
7
- ["Column six", "Sixth column content."],
8
- ];
9
-
10
- function ColumnCard({ title, text }) {
11
- return (
12
- <article pgs="card flexColumnTexts">
13
- <strong>{title}</strong>
14
- <p>{text}</p>
15
- </article>
16
- );
17
- }
18
-
19
- export default function Flex() {
20
- return (
21
- <>
22
- <div pgs="container flexColumnTexts">
23
- <strong>Standard section</strong>
24
- <p>Centered content inside a MyPGS section.</p>
25
- </div>
26
-
27
- {[2, 3, 4, 6].map((count) => (
28
- <div key={count} pgs={`flex-${count}`}>
29
- {columns.slice(0, count).map(([title, text]) => (
30
- <ColumnCard key={title} title={title} text={text} />
31
- ))}
32
- </div>
33
- ))}
34
- </>
35
- );
36
- }
@@ -1,36 +0,0 @@
1
- const columns = [
2
- ["Column one", "First column content."],
3
- ["Column two", "Second column content."],
4
- ["Column three", "Third column content."],
5
- ["Column four", "Fourth column content."],
6
- ["Column five", "Fifth column content."],
7
- ["Column six", "Sixth column content."],
8
- ];
9
-
10
- function ColumnCard({ title, text }) {
11
- return (
12
- <article pgs="card flexColumnTexts">
13
- <strong>{title}</strong>
14
- <p>{text}</p>
15
- </article>
16
- );
17
- }
18
-
19
- export default function Grid() {
20
- return (
21
- <>
22
- <div pgs="container flexColumnTexts">
23
- <strong>Standard section</strong>
24
- <p>Centered content inside a MyPGS section.</p>
25
- </div>
26
-
27
- {[2, 3, 4, 6].map((count) => (
28
- <div key={count} pgs={`grid-${count}`}>
29
- {columns.slice(0, count).map(([title, text]) => (
30
- <ColumnCard key={title} title={title} text={text} />
31
- ))}
32
- </div>
33
- ))}
34
- </>
35
- );
36
- }
File without changes
File without changes