mypgs 1.3.6 → 1.4.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/{AI_GUIDELINES.md → AGENTS.md} +17 -15
- package/README.md +8 -172
- package/assets/javascript/_imports.js +2 -1
- package/assets/javascript/components/_summary.js +105 -0
- package/assets/javascript/index.js +2 -1
- package/assets/javascript/patterns/_header.js +5 -6
- package/assets/javascript/pgs.d.ts +1 -0
- package/assets/scss/base/_variables.scss +1 -1
- package/assets/scss/components/_badges.scss +93 -0
- package/assets/scss/components/_summary.scss +56 -0
- package/assets/scss/index.scss +2 -0
- package/assets/scss/layout/_pageShell.scss +66 -40
- package/assets/scss/mixin/_mx-responsive.scss +11 -10
- package/assets/scss/patterns/_header.scss +6 -2
- package/dist/css/index.css +217 -57
- package/dist/css/index.css.map +1 -1
- package/dist/css/index.min.css +1 -1
- package/dist/javascript/index.js +143 -17
- package/dist/javascript/index.js.map +1 -1
- package/dist/javascript/index.min.js +1 -1
- package/package.json +1 -1
- package/templates/html/components/badges.html +37 -0
- package/templates/html/components/summary.html +14 -0
- package/templates/{demo.html → html/demo.html} +1 -1
- package/templates/{demo.js → html/demo.js} +11 -9
- package/templates/{layout → html/layout}/pageShell.html +22 -13
- package/templates/react/components/accordion.jsx +27 -0
- package/templates/react/components/breadcumbs.jsx +27 -0
- package/templates/react/components/button.jsx +33 -0
- package/templates/react/components/card.jsx +27 -0
- package/templates/react/components/dropdown.jsx +29 -0
- package/templates/react/components/form.jsx +30 -0
- package/templates/react/components/logo.jsx +14 -0
- package/templates/react/components/menu.jsx +37 -0
- package/templates/react/components/modal.jsx +84 -0
- package/templates/react/components/notification.jsx +31 -0
- package/templates/react/components/searchbar.jsx +34 -0
- package/templates/react/components/slides.jsx +25 -0
- package/templates/react/components/stepTabs.jsx +40 -0
- package/templates/react/components/steps.jsx +21 -0
- package/templates/react/components/summary.jsx +18 -0
- package/templates/react/components/table.jsx +28 -0
- package/templates/react/components/tooltip.jsx +12 -0
- package/templates/react/layout/body.jsx +7 -0
- package/templates/react/layout/flex.jsx +36 -0
- package/templates/react/layout/grid.jsx +36 -0
- package/templates/react/layout/pageShell.jsx +50 -0
- package/templates/react/layout/section.jsx +44 -0
- package/templates/react/patterns/cookieConsent.jsx +62 -0
- package/templates/react/patterns/footer.jsx +40 -0
- package/templates/react/patterns/header.jsx +62 -0
- /package/templates/{components → html/components}/accordion.html +0 -0
- /package/templates/{components → html/components}/breadcumbs.html +0 -0
- /package/templates/{components → html/components}/button.html +0 -0
- /package/templates/{components → html/components}/card.html +0 -0
- /package/templates/{components → html/components}/dropdown.html +0 -0
- /package/templates/{components → html/components}/form.html +0 -0
- /package/templates/{components → html/components}/logo.html +0 -0
- /package/templates/{components → html/components}/menu.html +0 -0
- /package/templates/{components → html/components}/modal.html +0 -0
- /package/templates/{components → html/components}/notification.html +0 -0
- /package/templates/{components → html/components}/searchbar.html +0 -0
- /package/templates/{components → html/components}/slides.html +0 -0
- /package/templates/{components → html/components}/stepTabs.html +0 -0
- /package/templates/{components → html/components}/steps.html +0 -0
- /package/templates/{components → html/components}/table.html +0 -0
- /package/templates/{components → html/components}/tooltip.html +0 -0
- /package/templates/{demo.css → html/demo.css} +0 -0
- /package/templates/{layout → html/layout}/body.html +0 -0
- /package/templates/{layout → html/layout}/flex.html +0 -0
- /package/templates/{layout → html/layout}/grid.html +0 -0
- /package/templates/{layout → html/layout}/section.html +0 -0
- /package/templates/{patterns → html/patterns}/cookieConsent.html +0 -0
- /package/templates/{patterns → html/patterns}/footer.html +0 -0
- /package/templates/{patterns → html/patterns}/header.html +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
@use "../mixin/mixin" as *;
|
|
2
|
-
|
|
3
2
|
//# pageShell
|
|
4
3
|
$aside-size: 400px;
|
|
5
4
|
$content-size: 500px;
|
|
@@ -9,16 +8,18 @@ $pageShell-test-gap: 4rem;
|
|
|
9
8
|
position: relative;
|
|
10
9
|
top: auto;
|
|
11
10
|
max-height: none;
|
|
12
|
-
overflow: visible;
|
|
13
|
-
scrollbar-gutter: auto;
|
|
14
11
|
width: 100%;
|
|
15
12
|
min-width: 100%;
|
|
13
|
+
|
|
14
|
+
[pgs~="pageShell-aside"] {
|
|
15
|
+
scrollbar-gutter: auto;
|
|
16
|
+
overflow: visible;
|
|
17
|
+
}
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
[pgs~="pageShell"] {
|
|
19
21
|
--pageShell-aside-sticky-top: 0;
|
|
20
|
-
--pageShell-
|
|
21
|
-
--pageShell-asideRight-width: #{$aside-size};
|
|
22
|
+
--pageShell-aside-width: #{$aside-size};
|
|
22
23
|
--pageShell-content-width: 500px;
|
|
23
24
|
--pageShell-gap: var(--gap-elements);
|
|
24
25
|
display: flex;
|
|
@@ -29,7 +30,6 @@ $pageShell-test-gap: 4rem;
|
|
|
29
30
|
justify-content: center;
|
|
30
31
|
width: 100%;
|
|
31
32
|
max-width: calc(var(--page-width) + (var(--padding-page) * 2));
|
|
32
|
-
padding-bottom: var(--page-top);
|
|
33
33
|
padding-inline: var(--padding-page);
|
|
34
34
|
container-type: inline-size;
|
|
35
35
|
|
|
@@ -40,10 +40,10 @@ $pageShell-test-gap: 4rem;
|
|
|
40
40
|
width: min(100%, var(--page-width));
|
|
41
41
|
max-width: var(--page-width);
|
|
42
42
|
padding-top: var(--page-top);
|
|
43
|
+
padding-bottom: var(--gap-elements);
|
|
43
44
|
}
|
|
44
45
|
|
|
45
|
-
[pgs~="pageShell-
|
|
46
|
-
[pgs~="pageShell-asideRight"] {
|
|
46
|
+
[pgs~="pageShell-aside"] {
|
|
47
47
|
@include flexColumn;
|
|
48
48
|
align-items: flex-start;
|
|
49
49
|
isolation: isolate;
|
|
@@ -56,6 +56,10 @@ $pageShell-test-gap: 4rem;
|
|
|
56
56
|
scrollbar-gutter: stable;
|
|
57
57
|
scrollbar-width: none;
|
|
58
58
|
padding-top: var(--page-top);
|
|
59
|
+
padding-bottom: var(--gap-elements);
|
|
60
|
+
flex: 1 1 var(--pageShell-aside-width);
|
|
61
|
+
min-width: min(100%, var(--pageShell-aside-width));
|
|
62
|
+
max-width: var(--pageShell-aside-width);
|
|
59
63
|
|
|
60
64
|
&::-webkit-scrollbar {
|
|
61
65
|
display: none;
|
|
@@ -65,38 +69,63 @@ $pageShell-test-gap: 4rem;
|
|
|
65
69
|
width: 100%;
|
|
66
70
|
}
|
|
67
71
|
|
|
68
|
-
&:
|
|
72
|
+
&:has(+ [pgs~="pageShell-content"]) {
|
|
69
73
|
grid-area: asideLeft;
|
|
70
|
-
flex: 1 1 var(--pageShell-asideLeft-width);
|
|
71
|
-
min-width: min(100%, var(--pageShell-asideLeft-width));
|
|
72
|
-
max-width: var(--pageShell-asideLeft-width);
|
|
73
74
|
}
|
|
74
75
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
[pgs~="pageShell-aside-scroll"] {
|
|
77
|
+
@include flexColumn;
|
|
78
|
+
align-items: flex-start;
|
|
79
|
+
width: 100%;
|
|
80
|
+
overflow-y: auto;
|
|
81
|
+
overscroll-behavior: contain;
|
|
82
|
+
scrollbar-gutter: stable;
|
|
83
|
+
scrollbar-width: none;
|
|
84
|
+
padding-top: var(--page-top);
|
|
85
|
+
padding-bottom: calc(var(--gap-elements)*2);
|
|
86
|
+
|
|
87
|
+
&::-webkit-scrollbar {
|
|
88
|
+
display: none;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
>* {
|
|
92
|
+
width: 100%;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&:has([pgs~="pageShell-aside-scroll"]) {
|
|
97
|
+
padding-top: 0;
|
|
98
|
+
padding-bottom: 0;
|
|
99
|
+
|
|
100
|
+
&::after {
|
|
101
|
+
content: "";
|
|
102
|
+
position: absolute;
|
|
103
|
+
inset-inline: 0;
|
|
104
|
+
bottom: 0;
|
|
105
|
+
height: calc(var(--gap-elements)*2);
|
|
106
|
+
background: linear-gradient(0deg, var(--color-background) 25%, transparent);
|
|
107
|
+
pointer-events: none;
|
|
108
|
+
z-index: 1;
|
|
109
|
+
}
|
|
80
110
|
}
|
|
81
111
|
}
|
|
82
112
|
|
|
83
|
-
|
|
84
|
-
|
|
113
|
+
[pgs~="pageShell-content"]+[pgs~="pageShell-aside"] {
|
|
114
|
+
grid-area: asideRight;
|
|
85
115
|
}
|
|
86
116
|
|
|
87
|
-
&:has(> [pgs~="pageShell-
|
|
88
|
-
max-width: calc(var(--page-width) + var(--pageShell-
|
|
117
|
+
&:has(> [pgs~="pageShell-aside"]) {
|
|
118
|
+
max-width: calc(var(--page-width) + var(--pageShell-aside-width) + var(--pageShell-gap) + (var(--padding-page) * 2));
|
|
89
119
|
}
|
|
90
120
|
|
|
91
|
-
&:has(> [pgs~="pageShell-
|
|
92
|
-
max-width: calc(var(--page-width) + var(--pageShell-
|
|
121
|
+
&:has(> [pgs~="pageShell-aside"] ~ [pgs~="pageShell-aside"]) {
|
|
122
|
+
max-width: calc(var(--page-width) + (var(--pageShell-aside-width) * 2) + (var(--pageShell-gap) * 2) + (var(--padding-page) * 2));
|
|
93
123
|
}
|
|
94
124
|
|
|
95
125
|
//== RESPONSIVE ==//
|
|
96
|
-
|
|
97
|
-
&:has(> [pgs~="pageShell-asideLeft"]) {
|
|
126
|
+
&:has(> [pgs~="pageShell-aside"]) {
|
|
98
127
|
@container (max-width: calc(#{$aside-size} + #{$content-size} + #{$pageShell-test-gap})) {
|
|
99
|
-
[pgs~="pageShell-
|
|
128
|
+
[pgs~="pageShell-aside"] {
|
|
100
129
|
@include pageShell-aside-flow;
|
|
101
130
|
}
|
|
102
131
|
|
|
@@ -107,9 +136,9 @@ $pageShell-test-gap: 4rem;
|
|
|
107
136
|
}
|
|
108
137
|
}
|
|
109
138
|
|
|
110
|
-
&:has(> [pgs~="pageShell-
|
|
139
|
+
&:has(> [pgs~="pageShell-content"] + [pgs~="pageShell-aside"]) {
|
|
111
140
|
@container (max-width: calc(#{$content-size} + #{$aside-size} + #{$pageShell-test-gap})) {
|
|
112
|
-
[pgs~="pageShell-
|
|
141
|
+
[pgs~="pageShell-content"]+[pgs~="pageShell-aside"] {
|
|
113
142
|
@include pageShell-aside-flow;
|
|
114
143
|
padding-top: 0;
|
|
115
144
|
min-width: 100%;
|
|
@@ -117,32 +146,31 @@ $pageShell-test-gap: 4rem;
|
|
|
117
146
|
}
|
|
118
147
|
}
|
|
119
148
|
|
|
120
|
-
&:has(> [pgs~="pageShell-
|
|
149
|
+
&:has(> [pgs~="pageShell-aside"]):has(> [pgs~="pageShell-content"] + [pgs~="pageShell-aside"]) {
|
|
121
150
|
@container (max-width: calc(#{$aside-size} + #{$content-size} + #{$aside-size} + (#{$pageShell-test-gap} * 2))) {
|
|
122
151
|
display: grid;
|
|
123
|
-
grid-template-columns: var(--pageShell-
|
|
152
|
+
grid-template-columns: var(--pageShell-aside-width) minmax(0, var(--page-width));
|
|
124
153
|
grid-template-areas:
|
|
125
154
|
"asideLeft content"
|
|
126
155
|
"asideLeft asideRight";
|
|
127
156
|
justify-content: center;
|
|
128
157
|
|
|
129
|
-
[pgs~="pageShell-
|
|
158
|
+
[pgs~="pageShell-content"]+[pgs~="pageShell-aside"] {
|
|
130
159
|
@include pageShell-aside-flow;
|
|
131
160
|
padding-top: 0;
|
|
132
|
-
min-width: min(100%, var(--pageShell-
|
|
161
|
+
min-width: min(100%, var(--pageShell-aside-width));
|
|
133
162
|
}
|
|
134
163
|
}
|
|
135
164
|
|
|
136
165
|
@container (max-width: calc(#{$aside-size} + #{$content-size} + #{$pageShell-test-gap})) {
|
|
137
166
|
display: flex;
|
|
138
167
|
|
|
139
|
-
[pgs~="pageShell-
|
|
140
|
-
[pgs~="pageShell-asideRight"] {
|
|
168
|
+
[pgs~="pageShell-aside"] {
|
|
141
169
|
@include pageShell-aside-flow;
|
|
142
170
|
}
|
|
143
171
|
|
|
144
172
|
[pgs~="pageShell-content"],
|
|
145
|
-
[pgs~="pageShell-
|
|
173
|
+
[pgs~="pageShell-content"]+[pgs~="pageShell-aside"] {
|
|
146
174
|
padding-top: 0;
|
|
147
175
|
min-width: 100%;
|
|
148
176
|
}
|
|
@@ -153,15 +181,13 @@ $pageShell-test-gap: 4rem;
|
|
|
153
181
|
padding-top: var(--page-top);
|
|
154
182
|
|
|
155
183
|
[pgs~="pageShell-content"],
|
|
156
|
-
[pgs~="pageShell-
|
|
157
|
-
[pgs~="pageShell-asideRight"] {
|
|
184
|
+
[pgs~="pageShell-aside"] {
|
|
158
185
|
padding-top: 0;
|
|
159
186
|
min-width: 100% !important;
|
|
160
187
|
}
|
|
161
188
|
|
|
162
|
-
[pgs~="pageShell-
|
|
163
|
-
[pgs~="pageShell-asideRight"] {
|
|
189
|
+
[pgs~="pageShell-aside"] {
|
|
164
190
|
@include pageShell-aside-flow;
|
|
165
191
|
}
|
|
166
192
|
}
|
|
167
|
-
}
|
|
193
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@use "sass:math";
|
|
1
2
|
@use "settings" as *;
|
|
2
3
|
|
|
3
4
|
//= FLEX
|
|
@@ -52,7 +53,7 @@
|
|
|
52
53
|
|
|
53
54
|
//= FLEX
|
|
54
55
|
@function _basis($ratio, $gap, $columns) {
|
|
55
|
-
$cols: ceil($columns * $ratio);
|
|
56
|
+
$cols: math.ceil($columns * $ratio);
|
|
56
57
|
@return calc((100% - ($gap * ($cols - 1))) / $cols);
|
|
57
58
|
}
|
|
58
59
|
|
|
@@ -196,17 +197,17 @@
|
|
|
196
197
|
|
|
197
198
|
//-( laptop
|
|
198
199
|
@container (max-width: #{$laptop}) {
|
|
199
|
-
grid-template-columns: repeat(ceil($columns * 0.75), 1fr); // 75% delle colonne originali
|
|
200
|
+
grid-template-columns: repeat(math.ceil($columns * 0.75), 1fr); // 75% delle colonne originali
|
|
200
201
|
}
|
|
201
202
|
|
|
202
203
|
//-( big-tablet
|
|
203
204
|
@container (max-width: #{$big-tablet}) {
|
|
204
|
-
grid-template-columns: repeat(ceil($columns * 0.5), 1fr); // 50% delle colonne originali
|
|
205
|
+
grid-template-columns: repeat(math.ceil($columns * 0.5), 1fr); // 50% delle colonne originali
|
|
205
206
|
}
|
|
206
207
|
|
|
207
208
|
//-( tablet
|
|
208
209
|
@container (max-width: #{$tablet}) {
|
|
209
|
-
grid-template-columns: repeat(ceil($columns * 0.33), 1fr); // 33% delle colonne originali
|
|
210
|
+
grid-template-columns: repeat(math.ceil($columns * 0.33), 1fr); // 33% delle colonne originali
|
|
210
211
|
}
|
|
211
212
|
}
|
|
212
213
|
|
|
@@ -214,17 +215,17 @@
|
|
|
214
215
|
|
|
215
216
|
//-( laptop
|
|
216
217
|
@container (max-width: #{$laptop}) {
|
|
217
|
-
grid-template-columns: repeat(ceil($columns * 0.75), 1fr); // 75% delle colonne originali
|
|
218
|
+
grid-template-columns: repeat(math.ceil($columns * 0.75), 1fr); // 75% delle colonne originali
|
|
218
219
|
}
|
|
219
220
|
|
|
220
221
|
//-( big-tablet
|
|
221
222
|
@container (max-width: #{$big-tablet}) {
|
|
222
|
-
grid-template-columns: repeat(ceil($columns * 0.5), 1fr); // 50% delle colonne originali
|
|
223
|
+
grid-template-columns: repeat(math.ceil($columns * 0.5), 1fr); // 50% delle colonne originali
|
|
223
224
|
}
|
|
224
225
|
|
|
225
226
|
//-( tablet
|
|
226
227
|
@container (max-width: #{$tablet}) {
|
|
227
|
-
grid-template-columns: repeat(ceil($columns * 0.33), 1fr); // 33% delle colonne originali
|
|
228
|
+
grid-template-columns: repeat(math.ceil($columns * 0.33), 1fr); // 33% delle colonne originali
|
|
228
229
|
}
|
|
229
230
|
}
|
|
230
231
|
|
|
@@ -261,17 +262,17 @@
|
|
|
261
262
|
|
|
262
263
|
//-( da 1500px
|
|
263
264
|
@container (max-width: #{$start}) {
|
|
264
|
-
grid-template-columns: repeat(ceil($columns * 0.75), 1fr);
|
|
265
|
+
grid-template-columns: repeat(math.ceil($columns * 0.75), 1fr);
|
|
265
266
|
}
|
|
266
267
|
|
|
267
268
|
//-( circa tablet landscape
|
|
268
269
|
@container (max-width: #{calc($start * 0.75)}) {
|
|
269
|
-
grid-template-columns: repeat(ceil($columns * 0.5), 1fr);
|
|
270
|
+
grid-template-columns: repeat(math.ceil($columns * 0.5), 1fr);
|
|
270
271
|
}
|
|
271
272
|
|
|
272
273
|
//-( tablet
|
|
273
274
|
@container (max-width: #{calc($start * 0.5)}) {
|
|
274
|
-
grid-template-columns: repeat(ceil($columns * 0.33), 1fr);
|
|
275
|
+
grid-template-columns: repeat(math.ceil($columns * 0.33), 1fr);
|
|
275
276
|
}
|
|
276
277
|
|
|
277
278
|
//-( mobile
|
|
@@ -110,8 +110,12 @@
|
|
|
110
110
|
|
|
111
111
|
[pgs~="modal-dialog-content"] {
|
|
112
112
|
nav {
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
|
|
114
|
+
// padding: var(--padding-2);
|
|
115
|
+
// border-radius: var(--padding-2);
|
|
116
|
+
a {
|
|
117
|
+
--button-background: var(--modal-background);
|
|
118
|
+
}
|
|
115
119
|
}
|
|
116
120
|
}
|
|
117
121
|
|