mypgs 1.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/README.md +33 -0
- package/assets/javascript/_pgs.js +214 -0
- package/assets/javascript/base/_darkmode.js +121 -0
- package/assets/javascript/base/_object.js +42 -0
- package/assets/javascript/components/_accordion.js +77 -0
- package/assets/javascript/components/_dropdown.js +107 -0
- package/assets/javascript/components/_exeNotifications.js +85 -0
- package/assets/javascript/components/_menu.js +92 -0
- package/assets/javascript/components/_modals.js +123 -0
- package/assets/javascript/components/_slides.js +183 -0
- package/assets/javascript/components/_steps.js +27 -0
- package/assets/javascript/components/_tabs.js +134 -0
- package/assets/javascript/functions/_formValidate.js +217 -0
- package/assets/javascript/functions/_notifications.js +74 -0
- package/assets/javascript/functions/_scrollY.js +77 -0
- package/assets/javascript/functions/_sendForm.js +100 -0
- package/assets/javascript/index.js +20 -0
- package/assets/javascript/patterns/_cookieConsent.js +209 -0
- package/assets/javascript/patterns/_header.js +134 -0
- package/assets/javascript/pgs.d.ts +23 -0
- package/assets/scss/base/_body.scss +151 -0
- package/assets/scss/base/_color.scss +56 -0
- package/assets/scss/base/_general.scss +58 -0
- package/assets/scss/base/_heading.scss +20 -0
- package/assets/scss/base/_html.scss +4 -0
- package/assets/scss/base/_reset.scss +15 -0
- package/assets/scss/base/_variables.scss +39 -0
- package/assets/scss/components/_accordion.scss +91 -0
- package/assets/scss/components/_breadcumbs.scss +40 -0
- package/assets/scss/components/_button.scss +28 -0
- package/assets/scss/components/_dropdown.scss +106 -0
- package/assets/scss/components/_form.scss +53 -0
- package/assets/scss/components/_logo.scss +51 -0
- package/assets/scss/components/_menu.scss +23 -0
- package/assets/scss/components/_modals.scss +120 -0
- package/assets/scss/components/_notification.scss +193 -0
- package/assets/scss/components/_searchbar.scss +68 -0
- package/assets/scss/components/_slides.scss +198 -0
- package/assets/scss/components/_steps.scss +111 -0
- package/assets/scss/components/_table.scss +59 -0
- package/assets/scss/components/_tabs.scss +69 -0
- package/assets/scss/components/_tooltip.scss +16 -0
- package/assets/scss/index.scss +64 -0
- package/assets/scss/layout/_flex.scss +47 -0
- package/assets/scss/layout/_gap.scss +12 -0
- package/assets/scss/layout/_grid.scss +11 -0
- package/assets/scss/layout/_layout.scss +41 -0
- package/assets/scss/layout/_pageShell.scss +171 -0
- package/assets/scss/mixin/_mx-base.scss +126 -0
- package/assets/scss/mixin/_mx-button.scss +186 -0
- package/assets/scss/mixin/_mx-card.scss +77 -0
- package/assets/scss/mixin/_mx-color.scss +34 -0
- package/assets/scss/mixin/_mx-form-addon.scss +180 -0
- package/assets/scss/mixin/_mx-form.scss +512 -0
- package/assets/scss/mixin/_mx-menu.scss +154 -0
- package/assets/scss/mixin/_mx-responsive.scss +353 -0
- package/assets/scss/mixin/_mx-semantic.scss +147 -0
- package/assets/scss/mixin/mixin.scss +36 -0
- package/assets/scss/patterns/_cookieConsent.scss +101 -0
- package/assets/scss/patterns/_footer.scss +180 -0
- package/assets/scss/patterns/_header.scss +143 -0
- package/dist/css/index.css +7026 -0
- package/dist/css/index.css.map +1 -0
- package/dist/css/index.min.css +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/javascript/index.js +2034 -0
- package/dist/javascript/index.js.map +1 -0
- package/dist/javascript/index.min.js +1 -0
- package/package.json +40 -0
- package/templates/components/md-breadcumbs.html +23 -0
- package/templates/components/md-menu.html +6 -0
- package/templates/components/md-notification.html +10 -0
- package/templates/components/md-searchbar.html +24 -0
- package/templates/components/md-tooltip.html +5 -0
- package/templates/layout/md-body.html +20 -0
- package/templates/layout/md-cookieConsent.html +51 -0
- package/templates/layout/md-footer.html +16 -0
- package/templates/layout/md-header.html +43 -0
- package/webpack.config.js +131 -0
|
@@ -0,0 +1,512 @@
|
|
|
1
|
+
//=FORM
|
|
2
|
+
//== INPUT
|
|
3
|
+
@mixin input($padding: 15px) {
|
|
4
|
+
--input-padding: #{$padding};
|
|
5
|
+
appearance: none;
|
|
6
|
+
border: var(--border-complete);
|
|
7
|
+
background-color: var(--color-white);
|
|
8
|
+
border-radius: var(--border-radius-input);
|
|
9
|
+
color: var(--color-text);
|
|
10
|
+
padding: var(--input-padding);
|
|
11
|
+
font-size: 1.6rem;
|
|
12
|
+
width: 100%;
|
|
13
|
+
margin-bottom: var(--gap-texts);
|
|
14
|
+
letter-spacing: 0.03em;
|
|
15
|
+
font-family: var(--font);
|
|
16
|
+
|
|
17
|
+
&::placeholder {
|
|
18
|
+
color: var(--color-black);
|
|
19
|
+
opacity: 20%;
|
|
20
|
+
font-weight: 500;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&:hover {
|
|
24
|
+
outline: solid var(--color-primary);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
//== LABEL
|
|
29
|
+
@mixin label($borderadius: 1.0rem 1.0rem 0 0, $left: var(--border-radius-input)) {
|
|
30
|
+
--label-borderadius: #{$borderadius};
|
|
31
|
+
--label-left: #{$left};
|
|
32
|
+
--label-padding: 0.7rem 1.2rem;
|
|
33
|
+
--label-color: var(--color-black);
|
|
34
|
+
--label-background: var(--border-color);
|
|
35
|
+
position: relative;
|
|
36
|
+
font-weight: 600;
|
|
37
|
+
display: inline-block;
|
|
38
|
+
width: fit-content;
|
|
39
|
+
cursor: pointer;
|
|
40
|
+
left: var(--label-left);
|
|
41
|
+
color: var(--label-color);
|
|
42
|
+
padding: var(--label-padding);
|
|
43
|
+
border-radius: var(--label-borderadius);
|
|
44
|
+
background-color: var(--label-background);
|
|
45
|
+
|
|
46
|
+
i {
|
|
47
|
+
font-size: 1.6rem;
|
|
48
|
+
margin-right: .7rem;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
//== REQUIRED
|
|
53
|
+
@mixin required() {
|
|
54
|
+
position: relative;
|
|
55
|
+
|
|
56
|
+
[pgs~=required-here],
|
|
57
|
+
&:not(:has([pgs~=required-here])) {
|
|
58
|
+
&::after {
|
|
59
|
+
content: "*";
|
|
60
|
+
color: var(--color-error);
|
|
61
|
+
transform: translate(20px, 0px);
|
|
62
|
+
position: absolute;
|
|
63
|
+
font-size: 40px;
|
|
64
|
+
bottom: -8px;
|
|
65
|
+
font-weight: 600;
|
|
66
|
+
right: 0px;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
[pgs~=required-here] {
|
|
71
|
+
&::after {
|
|
72
|
+
position: relative;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
//== DISABLED
|
|
78
|
+
@mixin disabled() {
|
|
79
|
+
opacity: 0.5;
|
|
80
|
+
cursor: not-allowed !important;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
//== DISABLED
|
|
84
|
+
@mixin file() {
|
|
85
|
+
width: 100%;
|
|
86
|
+
// margin-bottom: var(--gap-texts);
|
|
87
|
+
background-color: var(--color-white);
|
|
88
|
+
padding: var(--gap-texts);
|
|
89
|
+
border-radius: calc( var(--border-radius-input) + var(--gap-texts));
|
|
90
|
+
|
|
91
|
+
&::file-selector-button {
|
|
92
|
+
@include button(false);
|
|
93
|
+
width: 40%;
|
|
94
|
+
margin-bottom: var(--gap-texts);
|
|
95
|
+
margin-right: var(--gap-texts);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&::file-selector-button:hover {
|
|
99
|
+
background-color: var(--color-primary);
|
|
100
|
+
color: var(--color-white);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
//== RANGE
|
|
105
|
+
@mixin rage() {
|
|
106
|
+
-webkit-appearance: none;
|
|
107
|
+
-moz-appearance: none;
|
|
108
|
+
appearance: none;
|
|
109
|
+
--range-size: calc(var(--border-radius-input));
|
|
110
|
+
width: 100%;
|
|
111
|
+
height: var(--range-size);
|
|
112
|
+
background: linear-gradient(90deg, var(--color-box-transparent), var(--color-primary));
|
|
113
|
+
outline: none;
|
|
114
|
+
transition: background 0.3s;
|
|
115
|
+
border-radius: var(--border-radius-input);
|
|
116
|
+
z-index: 1;
|
|
117
|
+
position: relative;
|
|
118
|
+
|
|
119
|
+
//=== thumb
|
|
120
|
+
&::-webkit-slider-thumb {
|
|
121
|
+
-webkit-appearance: none;
|
|
122
|
+
appearance: none;
|
|
123
|
+
width: calc(var(--range-size) * 1.5);
|
|
124
|
+
height: calc(var(--range-size) * 1.2);
|
|
125
|
+
border-radius: var(--border-radius-input);
|
|
126
|
+
background: var(--color-white);
|
|
127
|
+
outline: inset 1px var(--color-primary);
|
|
128
|
+
cursor: pointer;
|
|
129
|
+
transition: transform 0.2s;
|
|
130
|
+
|
|
131
|
+
&:hover {
|
|
132
|
+
scale: 1.2;
|
|
133
|
+
background: var(--color-box-transparent);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
//=== rail
|
|
138
|
+
&::-moz-range-thumb {
|
|
139
|
+
-moz-appearance: none;
|
|
140
|
+
appearance: none;
|
|
141
|
+
width: calc(var(--range-size) * 1.5);
|
|
142
|
+
height: calc(var(--range-size) * 1.2);
|
|
143
|
+
border-radius: var(--border-radius-input);
|
|
144
|
+
background: var(--color-white);
|
|
145
|
+
outline: inset 1px var(--color-primary);
|
|
146
|
+
cursor: pointer;
|
|
147
|
+
transition: transform 0.2s;
|
|
148
|
+
|
|
149
|
+
&:hover {
|
|
150
|
+
transform: scale(1.2);
|
|
151
|
+
background: var(--color-box-transparent);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
//=== focus
|
|
156
|
+
&:focus-visible::-webkit-slider-thumb {
|
|
157
|
+
outline: 3px solid var(--color-link) !important;
|
|
158
|
+
background-color: var(--color-link) !important;
|
|
159
|
+
scale: 1.2;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
//=== disabled
|
|
163
|
+
&:disabled {
|
|
164
|
+
@include disabled();
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
@mixin checkbox() {
|
|
169
|
+
--checkbox-size: 2.0rem;
|
|
170
|
+
--checkbox-check-color: var(--color-primary);
|
|
171
|
+
--checkbox-box-background: var(--color-white);
|
|
172
|
+
--checkbox-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='inerit' d='M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.2 0z'/%3E%3C/svg%3E");
|
|
173
|
+
position: relative;
|
|
174
|
+
display: flex;
|
|
175
|
+
|
|
176
|
+
&:is(label),
|
|
177
|
+
label {
|
|
178
|
+
user-select: none;
|
|
179
|
+
color: var(--color-black);
|
|
180
|
+
position: relative;
|
|
181
|
+
width: auto;
|
|
182
|
+
display: block;
|
|
183
|
+
text-align: left;
|
|
184
|
+
line-height: var(--checkbox-size);
|
|
185
|
+
margin-bottom: var(--gap-texts);
|
|
186
|
+
width: fit-content;
|
|
187
|
+
cursor: pointer;
|
|
188
|
+
display: flex;
|
|
189
|
+
|
|
190
|
+
//=== Disabled
|
|
191
|
+
&:has(input:disabled) {
|
|
192
|
+
opacity: 0.5;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
//=== Focus
|
|
196
|
+
&:has(input[type=checkbox]:required) {
|
|
197
|
+
@include required();
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
//== ICON & BOX
|
|
202
|
+
input {
|
|
203
|
+
appearance: none;
|
|
204
|
+
position: relative;
|
|
205
|
+
width: var(--checkbox-size);
|
|
206
|
+
min-width: var(--checkbox-size);
|
|
207
|
+
height: var(--checkbox-size);
|
|
208
|
+
margin-right: var(--gap-texts);
|
|
209
|
+
cursor: pointer;
|
|
210
|
+
|
|
211
|
+
//=== BOX SQUARE
|
|
212
|
+
&::before {
|
|
213
|
+
content: "";
|
|
214
|
+
position: absolute;
|
|
215
|
+
width: var(--checkbox-size);
|
|
216
|
+
height: var(--checkbox-size);
|
|
217
|
+
outline: solid var(--color-boxDark) 0.1rem;
|
|
218
|
+
background: var(--checkbox-box-background);
|
|
219
|
+
color: var(--color-primary-soft);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
//=== ICON CHECK
|
|
223
|
+
&::after {
|
|
224
|
+
position: absolute;
|
|
225
|
+
line-height: var(--checkbox-size);
|
|
226
|
+
text-align: center;
|
|
227
|
+
opacity: 0;
|
|
228
|
+
color: var(--checkbox-check-color);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
//=== Checked
|
|
232
|
+
&:checked::after {
|
|
233
|
+
opacity: 1;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
//=== Focus
|
|
237
|
+
&:focus-visible::before {
|
|
238
|
+
outline: 3px solid var(--color-link) !important;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
//=== Checkbox
|
|
242
|
+
&[type=checkbox] {
|
|
243
|
+
&::after {
|
|
244
|
+
top: -1.7rem;
|
|
245
|
+
left: -0.5rem;
|
|
246
|
+
@include iconSvgBase64(var(--checkbox-icon), calc(2rem + var(--checkbox-size)), var(--checkbox-check-color));
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
&::before {
|
|
250
|
+
border-radius: 0.3rem;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
//=== Radio
|
|
255
|
+
&[type=radio] {
|
|
256
|
+
&::after {
|
|
257
|
+
$size: 0.4rem;
|
|
258
|
+
content: "";
|
|
259
|
+
top: $size / 2;
|
|
260
|
+
left: $size / 2;
|
|
261
|
+
display: inline-block;
|
|
262
|
+
width: calc(var(--checkbox-size) - $size);
|
|
263
|
+
height: calc(var(--checkbox-size) - $size);
|
|
264
|
+
background-color: var(--checkbox-check-color);
|
|
265
|
+
border-radius: 50%;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
&::before {
|
|
269
|
+
border-radius: 50%;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
a {
|
|
275
|
+
text-decoration: underline;
|
|
276
|
+
color: var(--color-link);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
//== SELECT
|
|
281
|
+
@mixin select() {
|
|
282
|
+
@include input();
|
|
283
|
+
overflow: auto;
|
|
284
|
+
appearance: none;
|
|
285
|
+
cursor: pointer;
|
|
286
|
+
|
|
287
|
+
option {
|
|
288
|
+
padding: var(--gap-texts);
|
|
289
|
+
border-radius: calc(var(--border-radius-input) - var(--input-padding));
|
|
290
|
+
background-color: transparent;
|
|
291
|
+
cursor: pointer;
|
|
292
|
+
|
|
293
|
+
&:checked {
|
|
294
|
+
background-color: var(--color-primary);
|
|
295
|
+
color: var(--color-whiteFixed);
|
|
296
|
+
font-weight: 600;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
&:hover {
|
|
300
|
+
background-color: var(--color-primary-soft);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
&:checked:hover {
|
|
304
|
+
background-color: var(--color-primary-dark);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
@mixin formTextarea() {
|
|
310
|
+
resize: vertical;
|
|
311
|
+
@include input();
|
|
312
|
+
height: 120px;
|
|
313
|
+
min-height: 100px;
|
|
314
|
+
border-bottom-right-radius: 40px;
|
|
315
|
+
appearance: none;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
@mixin inputcolor() {
|
|
319
|
+
$size: 50px;
|
|
320
|
+
$padding: 5px;
|
|
321
|
+
@include input(0);
|
|
322
|
+
block-size: $size;
|
|
323
|
+
inline-size: calc($size * 4);
|
|
324
|
+
margin-right: auto;
|
|
325
|
+
display: flex;
|
|
326
|
+
|
|
327
|
+
&::-webkit-color-swatch-wrapper {
|
|
328
|
+
padding: $padding;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
&::-webkit-color-swatch {
|
|
332
|
+
border: var(--border-complete);
|
|
333
|
+
border-radius: calc(var(--border-radius-input) - $padding);
|
|
334
|
+
cursor: pointer;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
@mixin legend() {
|
|
339
|
+
@include label(1.0rem, 0);
|
|
340
|
+
--label-color: var(--color-black);
|
|
341
|
+
--label-background: var(--color-box);
|
|
342
|
+
margin-bottom: var(--gap-texts);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
//= FORM
|
|
346
|
+
@mixin form() {
|
|
347
|
+
|
|
348
|
+
//=== LABEL
|
|
349
|
+
label {
|
|
350
|
+
&:not(:has([pgs~="label-unset"], +input[type=checkbox], +input[type=radio])) {
|
|
351
|
+
&:has(+input, +select, +textarea) {
|
|
352
|
+
@include label();
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
&:has(+[hidden]) {
|
|
357
|
+
display: none !important;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
//=== INPUT
|
|
362
|
+
input {
|
|
363
|
+
&:not([pgs~="input-unset"], [type=checkbox], [type=file], [type=radio], [type=range]) {
|
|
364
|
+
@include input();
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
&[type="password"] {
|
|
368
|
+
font-family: initial;
|
|
369
|
+
font-size: calc(1.74rem);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
&[type="file"] {
|
|
373
|
+
min-height: 5.3rem;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
&[type=search],
|
|
377
|
+
&[type=number],
|
|
378
|
+
&[type=datetime-local],
|
|
379
|
+
&[type=date],
|
|
380
|
+
&[type=month],
|
|
381
|
+
&[type=week],
|
|
382
|
+
&[type=time] {
|
|
383
|
+
width: clamp(50px, 100%, 300px);
|
|
384
|
+
display: flex;
|
|
385
|
+
|
|
386
|
+
&::-webkit-calendar-picker-indicator {
|
|
387
|
+
order: -1;
|
|
388
|
+
margin: 0;
|
|
389
|
+
margin-right: var(--gap-texts);
|
|
390
|
+
font-size: 1.5em;
|
|
391
|
+
background-color: var(--border-color);
|
|
392
|
+
border-radius: var(--input-padding);
|
|
393
|
+
padding: 10px;
|
|
394
|
+
margin: -10px;
|
|
395
|
+
margin-right: 10px;
|
|
396
|
+
cursor: pointer;
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
//==== LEGEND
|
|
402
|
+
legend {
|
|
403
|
+
@include legend();
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
//==== CHECKBOX
|
|
407
|
+
label:has(input[type=checkbox]):not([pgs~="toggle"]),
|
|
408
|
+
label:has(input[type=radio]):not([pgs~="toggle"]) {
|
|
409
|
+
@include checkbox();
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
//=== TEXTAREA
|
|
413
|
+
textarea {
|
|
414
|
+
@include formTextarea()
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
//=== RAGE
|
|
418
|
+
input[type=range] {
|
|
419
|
+
@include rage();
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
//=== COLOR
|
|
423
|
+
input[type=color] {
|
|
424
|
+
@include inputcolor();
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
//=== RAGE
|
|
428
|
+
select {
|
|
429
|
+
@include select();
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
//===BUTTON
|
|
433
|
+
button[type="submit"] {
|
|
434
|
+
@include button(true, false, true)
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
//===FIELDSET
|
|
438
|
+
fieldset {
|
|
439
|
+
border: unset;
|
|
440
|
+
|
|
441
|
+
&[required] legend {
|
|
442
|
+
@include required();
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
//=== REQUIRED
|
|
447
|
+
label:has(+ input[required]:not([type="checkbox"], [type="radio"]), +select[required], +textarea[required]),
|
|
448
|
+
fieldset:has(input[type="checkbox"][required], input[type="radio"][required]) legend {
|
|
449
|
+
@include required();
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
//=== DISABLED
|
|
453
|
+
input[disabled],
|
|
454
|
+
input[disabled]:is([type="checkbox"], [type="radio"])+label,
|
|
455
|
+
label:has(+ input[disabled]:not([type="checkbox"], [type="radio"])),
|
|
456
|
+
label:has(+ :is(textarea[disabled], select[disabled])),
|
|
457
|
+
label.disabled,
|
|
458
|
+
.disabled {
|
|
459
|
+
@include disabled();
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
//=== EYE
|
|
463
|
+
input[type="password"]::-ms-reveal,
|
|
464
|
+
input[type="password"]::-ms-clear,
|
|
465
|
+
input[type="password"]::-webkit-textfield-decoration-container,
|
|
466
|
+
input[type="password"]::-webkit-credentials-auto-fill-button,
|
|
467
|
+
input[type="password"]::-webkit-password-toggle {
|
|
468
|
+
display: none;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
input[type="file"] {
|
|
472
|
+
@include file();
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
//== formError
|
|
477
|
+
@mixin formError() {
|
|
478
|
+
|
|
479
|
+
//=== ERROR
|
|
480
|
+
&[data-form-status="error"] {
|
|
481
|
+
[data-form-field-status="error"] {
|
|
482
|
+
&:not([type=checkbox], [type=radio]) {
|
|
483
|
+
outline: solid 3px var(--color-error) !important;
|
|
484
|
+
|
|
485
|
+
&::before {
|
|
486
|
+
content: "Questo campo è obbligatorio";
|
|
487
|
+
color: var(--color-error);
|
|
488
|
+
font-weight: 500;
|
|
489
|
+
font-size: 1.7rem;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
// button[type=submit] {
|
|
495
|
+
// --button-background: var(--color-error);
|
|
496
|
+
// }
|
|
497
|
+
label:has(+[data-form-field-status="error"], [data-form-field-status="error"]) {
|
|
498
|
+
&:has(input[type=checkbox]) {
|
|
499
|
+
background-color: var(--color-error) !important;
|
|
500
|
+
padding: 6px;
|
|
501
|
+
margin-left: -6px;
|
|
502
|
+
border-radius: 10px;
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
fieldset:has(input[type=radio][data-form-field-status="error"]) {
|
|
507
|
+
legend {
|
|
508
|
+
--label-background: var(--color-error) !important;
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
//# MENU
|
|
2
|
+
@mixin menu($direction: row, $isHeader: true) {
|
|
3
|
+
|
|
4
|
+
>ul {
|
|
5
|
+
display: flex;
|
|
6
|
+
font-weight: 600;
|
|
7
|
+
align-items: center;
|
|
8
|
+
flex-direction: $direction;
|
|
9
|
+
column-gap: var(--gap-texts);
|
|
10
|
+
row-gap: 1.0rem;
|
|
11
|
+
// width: 100%;
|
|
12
|
+
isolation: isolate;
|
|
13
|
+
flex-wrap: nowrap;
|
|
14
|
+
|
|
15
|
+
//= Content
|
|
16
|
+
>li {
|
|
17
|
+
|
|
18
|
+
>a {
|
|
19
|
+
flex-grow: 1;
|
|
20
|
+
min-width: fit-content;
|
|
21
|
+
|
|
22
|
+
@include button();
|
|
23
|
+
@if($isHeader) {
|
|
24
|
+
@include button_header();
|
|
25
|
+
}
|
|
26
|
+
span {
|
|
27
|
+
line-height: 1.6;
|
|
28
|
+
flex-grow: 1;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
//= ROW
|
|
35
|
+
@if($direction ==row) {
|
|
36
|
+
ul {
|
|
37
|
+
>li>a {
|
|
38
|
+
width: max-content;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
//== Sub menu
|
|
42
|
+
>li.menu-item-has-children {
|
|
43
|
+
display: flex;
|
|
44
|
+
gap: 0.2rem;
|
|
45
|
+
flex-wrap: nowrap;
|
|
46
|
+
isolation: isolate;
|
|
47
|
+
|
|
48
|
+
>a {
|
|
49
|
+
border-radius: var(--border-radius-input);
|
|
50
|
+
// box-shadow: var(--box-shadow);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
ul.sub-menu {
|
|
54
|
+
&:not([popover]) {
|
|
55
|
+
display: none;
|
|
56
|
+
|
|
57
|
+
li a {
|
|
58
|
+
min-width: 100% !important;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&[pgs-state=open] {
|
|
63
|
+
display: flex;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
//== ICON
|
|
68
|
+
button.icon-down {
|
|
69
|
+
--button-size: 0.9rem;
|
|
70
|
+
margin-right: -15px;
|
|
71
|
+
margin-block: auto;
|
|
72
|
+
scale: 0.9;
|
|
73
|
+
height: min-content;
|
|
74
|
+
cursor: pointer;
|
|
75
|
+
translate: -15px;
|
|
76
|
+
z-index: -1;
|
|
77
|
+
|
|
78
|
+
&[aria-expanded="true"] {
|
|
79
|
+
span {
|
|
80
|
+
rotate: 180deg;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
//= COLUMN
|
|
89
|
+
@if($direction ==column) {
|
|
90
|
+
ul {
|
|
91
|
+
li {
|
|
92
|
+
width: -webkit-fill-available;
|
|
93
|
+
|
|
94
|
+
>a {
|
|
95
|
+
width: 100%;
|
|
96
|
+
padding: 1.5rem;
|
|
97
|
+
--button-background: transaprent;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
//== Sub menu
|
|
102
|
+
>li:has(ul.sub-menu) {
|
|
103
|
+
@include flexRow;
|
|
104
|
+
align-items: center;
|
|
105
|
+
|
|
106
|
+
button.icon-down {
|
|
107
|
+
--button-background: var(--color-boxDark);
|
|
108
|
+
--button-color: var(--color-white);
|
|
109
|
+
max-height: max-content;
|
|
110
|
+
justify-content: center;
|
|
111
|
+
|
|
112
|
+
span {
|
|
113
|
+
transition: all 300ms;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&[aria-expanded="true"] span {
|
|
117
|
+
rotate: 180deg;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
a {
|
|
122
|
+
max-width: calc(90% - var(--gap-texts));
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
>ul {
|
|
126
|
+
flex-basis: 100%;
|
|
127
|
+
|
|
128
|
+
&.sub-menu:not([pgs-state~=open]) {
|
|
129
|
+
display: none;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&.sub-menu[pgs-state~=open] {
|
|
133
|
+
padding-left: 2rem;
|
|
134
|
+
margin-left: 2rem;
|
|
135
|
+
border-left: solid 2px var(--color-gray);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
@mixin menuFooter() {
|
|
144
|
+
ul {
|
|
145
|
+
@include flexColumn();
|
|
146
|
+
|
|
147
|
+
li {
|
|
148
|
+
a {
|
|
149
|
+
color: var(--color-text);
|
|
150
|
+
font-weight: 600;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|