@lucca-front/scss 9.0.0-alpha.1 → 9.0.0-alpha.4
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/package.json +1 -1
- package/src/commons/base.scss +1 -0
- package/src/commons/config.scss +6 -3
- package/src/commons/core.scss +8 -0
- package/src/commons/utils/loading.scss +5 -10
- package/src/components/actionIcon/component.scss +1 -1
- package/src/components/actionIcon/index.scss +4 -0
- package/src/components/actionIcon/states.scss +4 -0
- package/src/components/button/mods.scss +4 -4
- package/src/components/button/vars.scss +2 -2
- package/src/components/callout/vars.scss +1 -1
- package/src/components/checkbox/component.scss +3 -2
- package/src/components/chip/component.scss +1 -4
- package/src/components/field/component.scss +2 -5
- package/src/components/field/index.scss +34 -0
- package/src/components/field/mods.scss +136 -14
- package/src/components/field/states.scss +4 -4
- package/src/components/field/vars.scss +3 -3
- package/src/components/form/component.scss +5 -7
- package/src/components/form/index.scss +35 -0
- package/src/components/form/mods.scss +101 -0
- package/src/components/form/vars.scss +1 -1
- package/src/components/icon/index.scss +2 -2
- package/src/components/index.scss +10 -11
- package/src/components/keyframe/component.scss +0 -0
- package/src/components/keyframe/exports.scss +4 -0
- package/src/components/keyframe/index.scss +1 -0
- package/src/components/keyframe/mods.scss +184 -0
- package/src/components/keyframe/states.scss +0 -0
- package/src/components/keyframe/vars.scss +0 -0
- package/src/components/label/component.scss +0 -1
- package/src/components/label/mods.scss +0 -1
- package/src/components/menu/component.scss +1 -1
- package/src/components/menu/index.scss +1 -1
- package/src/components/menu/mods.scss +0 -1
- package/src/components/navside/component.scss +5 -1
- package/src/components/navside/index.scss +12 -12
- package/src/components/navside/mods.scss +25 -27
- package/src/components/navside/vars.scss +1 -1
- package/src/components/progress/component.scss +4 -2
- package/src/components/progress/mods.scss +2 -2
- package/src/components/radio/component.scss +9 -1
- package/src/components/radioButtons/index.scss +1 -2
- package/src/components/radioButtons/vars.scss +20 -20
- package/src/components/table/mods.scss +6 -1
- package/src/components/tableSticked/mods.scss +5 -1
- package/src/components/tag/mods.scss +2 -1
- package/src/components/textfield/component.scss +1 -1
- package/src/components/textfield/index.scss +118 -114
- package/src/components/textfield/states.scss +9 -8
- package/src/components/textfield/vars.scss +9 -9
- package/src/components/timeline/component.scss +17 -7
- package/src/components/timeline/index.scss +8 -7
- package/src/components/timeline/mods.scss +6 -11
- package/src/components/toast/component.scss +2 -2
- package/src/components/toast/mods.scss +11 -3
- package/src/components/toc/component.scss +1 -0
- package/src/components/util/component.scss +0 -0
- package/src/components/util/exports.scss +4 -1
- package/src/components/util/index.scss +124 -6
- package/src/components/util/mods.scss +3 -0
- package/src/components/util/states.scss +0 -0
- package/src/components/util/vars.scss +0 -0
- package/src/main.dist.scss +2 -4
- package/dist/lucca-front.min.css +0 -1
package/package.json
CHANGED
package/src/commons/base.scss
CHANGED
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
html {
|
|
26
26
|
@include core.cssvars('commons-border-radius', config.$borderRadius);
|
|
27
27
|
@include core.cssvars('commons-animations', config.$animations);
|
|
28
|
+
@include core.cssvars('commons-animations-durations', config.$durations);
|
|
28
29
|
@include core.cssvars('commons-disabled', config.$disabled);
|
|
29
30
|
@include core.cssvars('commons-loading', config.$loading);
|
|
30
31
|
@include core.cssvars('commons-text-link', config.$textLink);
|
package/src/commons/config.scss
CHANGED
|
@@ -179,9 +179,12 @@ $animations: (
|
|
|
179
179
|
'translate': 3rem,
|
|
180
180
|
'function': ease,
|
|
181
181
|
'iteration-count': 5,
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
182
|
+
);
|
|
183
|
+
|
|
184
|
+
$durations: (
|
|
185
|
+
'fast': 100ms,
|
|
186
|
+
'standard': 250ms,
|
|
187
|
+
'slow': 350ms,
|
|
185
188
|
);
|
|
186
189
|
|
|
187
190
|
$loading: (
|
package/src/commons/core.scss
CHANGED
|
@@ -115,6 +115,14 @@ $states: 'error,' 'warning', 'success';
|
|
|
115
115
|
color: var(--palettes-#{$palette}-700) !important;
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
+
|
|
119
|
+
.u-textLight {
|
|
120
|
+
color: var(--palettes-grey-600) !important;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.u-textPlaceholder {
|
|
124
|
+
color: var(--palettes-grey-400) !important;
|
|
125
|
+
}
|
|
118
126
|
}
|
|
119
127
|
|
|
120
128
|
@mixin borderRadius($suffix: '!important') {
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
@
|
|
2
|
-
@keyframes rotating {
|
|
3
|
-
from {
|
|
4
|
-
transform: rotate(0deg);
|
|
5
|
-
}
|
|
6
|
-
to {
|
|
7
|
-
transform: rotate(360deg);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
1
|
+
@use '../../components/keyframe/exports' as keyframe;
|
|
10
2
|
|
|
3
|
+
@mixin spinner($size: 1rem) {
|
|
11
4
|
&::before,
|
|
12
5
|
&::after {
|
|
13
6
|
width: $size;
|
|
@@ -27,7 +20,9 @@
|
|
|
27
20
|
}
|
|
28
21
|
|
|
29
22
|
&::after {
|
|
30
|
-
|
|
23
|
+
@include keyframe.rotate;
|
|
24
|
+
|
|
25
|
+
animation-name: rotate;
|
|
31
26
|
animation-duration: var(--commons-loading-speed);
|
|
32
27
|
animation-timing-function: linear;
|
|
33
28
|
animation-iteration-count: infinite;
|
|
@@ -34,24 +34,24 @@
|
|
|
34
34
|
@mixin text {
|
|
35
35
|
background-color: transparent;
|
|
36
36
|
box-shadow: none;
|
|
37
|
-
color: var(--palettes-grey-
|
|
37
|
+
color: var(--palettes-700, var(--palettes-grey-700));
|
|
38
38
|
padding: var(--components-button-text-padding);
|
|
39
39
|
|
|
40
40
|
&:not([disabled], .is-disabled) {
|
|
41
41
|
&:hover {
|
|
42
42
|
box-shadow: none;
|
|
43
|
-
background-color: var(--palettes-grey-50);
|
|
43
|
+
background-color: var(--palettes-50, var(--palettes-grey-50));
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
&:focus {
|
|
47
47
|
box-shadow: var(--commons-box-shadow-xs), 0 0 0 4px var(--palettes-100, var(--palettes-primary-100)),
|
|
48
48
|
inset 0 0 0 1px var(--palettes-400, var(--palettes-primary-400));
|
|
49
|
-
background: var(--palettes-grey-50);
|
|
49
|
+
background: var(--palettes-50, var(--palettes-grey-50));
|
|
50
50
|
outline: none
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
&:active {
|
|
54
|
-
background-color: var(--palettes-grey-100);
|
|
54
|
+
background-color: var(--palettes-100, var(--palettes-grey-100));
|
|
55
55
|
box-shadow: var(--commons-box-shadow-xs), 0 0 0 4px var(--palettes-200, var(--palettes-primary-200)),
|
|
56
56
|
inset 0 0 0 1px var(--palettes-500, var(--palettes-primary-500));
|
|
57
57
|
}
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
--components-button-line-height: 1.5rem;
|
|
6
6
|
--components-button-padding: 0.5rem 1.5rem;
|
|
7
7
|
--components-button-small-font-size: 0.875rem;
|
|
8
|
-
--components-button-small-line-height:
|
|
8
|
+
--components-button-small-line-height: var(--sizes-smaller-line-height);
|
|
9
9
|
--components-button-small-padding: 0.5rem 1rem;
|
|
10
10
|
--components-button-smaller-font-size: 0.75rem;
|
|
11
|
-
--components-button-smaller-line-height:
|
|
11
|
+
--components-button-smaller-line-height: var(--sizes-smaller-line-height);
|
|
12
12
|
--components-button-smaller-padding: 0.25rem 0.5rem;
|
|
13
13
|
|
|
14
14
|
--components-button-text-padding: var(--spacings-smaller);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@mixin vars {
|
|
2
2
|
--components-callout-margin: 0 0 var(--spacings-small);
|
|
3
3
|
--components-callout-padding: var(--spacings-smaller) var(--spacings-small);
|
|
4
|
-
--components-callout-background: var(--
|
|
4
|
+
--components-callout-background: var(--palettes-grey-100);
|
|
5
5
|
}
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
&::before {
|
|
17
17
|
@include icon.makeIcon('tick');
|
|
18
|
+
|
|
18
19
|
background-color: var(--colors-white-color);
|
|
19
20
|
width: var(--components-checkbox-input-size);
|
|
20
21
|
height: var(--components-checkbox-input-size);
|
|
@@ -24,7 +25,7 @@
|
|
|
24
25
|
transition-duration: var(--commons-animations-durations-fast);
|
|
25
26
|
transition-property: all;
|
|
26
27
|
border: 2px solid var(--components-checkbox-input-border-color);
|
|
27
|
-
line-height: .85;
|
|
28
|
+
line-height: 0.85;
|
|
28
29
|
font-size: 1rem;
|
|
29
30
|
flex-grow: 0;
|
|
30
31
|
flex-shrink: 0;
|
|
@@ -32,7 +33,7 @@
|
|
|
32
33
|
color: transparent;
|
|
33
34
|
display: block;
|
|
34
35
|
text-align: center;
|
|
35
|
-
text-indent:
|
|
36
|
+
text-indent: -0.1rem;
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
&:hover {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
@mixin component {
|
|
4
4
|
background-color: var(--palettes-primary-700);
|
|
5
|
-
border-radius: var(--
|
|
5
|
+
border-radius: var(--commons-border-radius);
|
|
6
6
|
color: var(--colors-white-color);
|
|
7
7
|
|
|
8
8
|
display: inline-block;
|
|
@@ -27,9 +27,6 @@
|
|
|
27
27
|
width: 1rem;
|
|
28
28
|
transition-duration: 150ms;
|
|
29
29
|
transition-property: background-color;
|
|
30
|
-
display: flex;
|
|
31
|
-
align-items: center;
|
|
32
|
-
justify-content: center;
|
|
33
30
|
margin: auto;
|
|
34
31
|
position: absolute;
|
|
35
32
|
cursor: pointer;
|
|
@@ -14,15 +14,12 @@
|
|
|
14
14
|
background-color: var(--palettes-50, var(--components-textfield-background));
|
|
15
15
|
|
|
16
16
|
&::placeholder {
|
|
17
|
-
color: var(--palettes-400);
|
|
17
|
+
//color: var(--palettes-400);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
&:focus {
|
|
21
|
-
background-color: var(--colors-white-color);
|
|
22
|
-
box-shadow: 0 0 0 4px var(--palettes-200), 0 0 0 1px var(--palettes-700) inset; // todo: ajouter les couleurs par défaut
|
|
23
|
-
|
|
24
21
|
&::placeholder {
|
|
25
|
-
color: var(--palettes-300);
|
|
22
|
+
//color: var(--palettes-300);
|
|
26
23
|
}
|
|
27
24
|
}
|
|
28
25
|
|
|
@@ -45,6 +45,40 @@
|
|
|
45
45
|
&:is(.is-loading, .loading) {
|
|
46
46
|
@include framedLoading;
|
|
47
47
|
}
|
|
48
|
+
|
|
49
|
+
&.is-error {
|
|
50
|
+
@include fieldFramedState("error");
|
|
51
|
+
@include fieldFramedError("textfield");
|
|
52
|
+
@include fieldFramedError("radiosfield");
|
|
53
|
+
@include fieldFramedError("checkboxesfield");
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&.is-warning {
|
|
57
|
+
@include fieldFramedState("warning");
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&.is-valid,
|
|
61
|
+
&.is-success {
|
|
62
|
+
@include fieldFramedState("success");
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@at-root {
|
|
66
|
+
.is-error {
|
|
67
|
+
@include fieldFramedState("error");
|
|
68
|
+
@include fieldFramedError("textfield");
|
|
69
|
+
@include fieldFramedError("radiosfield");
|
|
70
|
+
@include fieldFramedError("checkboxesfield");
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.is-warning {
|
|
74
|
+
@include fieldFramedState("warning");
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.is-valid,
|
|
78
|
+
.is-success {
|
|
79
|
+
@include fieldFramedState("success");
|
|
80
|
+
}
|
|
81
|
+
}
|
|
48
82
|
}
|
|
49
83
|
|
|
50
84
|
.textfield-input,
|
|
@@ -59,6 +59,11 @@
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
@mixin framed {
|
|
62
|
+
fieldset {
|
|
63
|
+
border: 0;
|
|
64
|
+
padding: 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
62
67
|
.textfield-messages,
|
|
63
68
|
.radiosfield-messages,
|
|
64
69
|
.checkboxesfield-messages {
|
|
@@ -111,6 +116,17 @@
|
|
|
111
116
|
.textfield-input,
|
|
112
117
|
.radiosfield-input,
|
|
113
118
|
.checkboxesfield-input {
|
|
119
|
+
display: flex;
|
|
120
|
+
flex-wrap: wrap;
|
|
121
|
+
gap: var(--components-field-horizontal-spacing);
|
|
122
|
+
|
|
123
|
+
.checkbox {
|
|
124
|
+
margin-top: 0;
|
|
125
|
+
margin-bottom: 0;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.textfield-input {
|
|
114
130
|
&:not(:disabled, .is-error, .is-success, .is-valid, .is-warning, .is-invalid) {
|
|
115
131
|
background-color: var(--colors-white-color);
|
|
116
132
|
|
|
@@ -144,25 +160,130 @@
|
|
|
144
160
|
right: 0;
|
|
145
161
|
bottom: 0;
|
|
146
162
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
163
|
+
// todo: déplacer dans textfield
|
|
164
|
+
~ .textfield-input {
|
|
165
|
+
padding-right: var(--components-field-framed-suffix-padding-right);
|
|
150
166
|
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
@mixin fieldFramedState($state) {
|
|
171
|
+
@if ($state == 'error') {
|
|
172
|
+
z-index: 3;
|
|
173
|
+
box-shadow: form.fakeBorderOverlay(var(--palettes-#{$state}-700)) !important;
|
|
174
|
+
background-color: var(--palettes-#{$state}-50);
|
|
151
175
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
176
|
+
&:focus-within,
|
|
177
|
+
&:hover {
|
|
178
|
+
z-index: 4;
|
|
155
179
|
}
|
|
180
|
+
}
|
|
156
181
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
182
|
+
&.mod-search,
|
|
183
|
+
&.mod-autocomplete,
|
|
184
|
+
&.mod-select {
|
|
185
|
+
&::after {
|
|
186
|
+
color: var(--palettes-#{$state}-700);
|
|
161
187
|
}
|
|
188
|
+
}
|
|
162
189
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
190
|
+
.radiosfield-label,
|
|
191
|
+
.checkboxesfield-label,
|
|
192
|
+
.textfield-label {
|
|
193
|
+
color: var(--palettes-#{$state}-700);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.textfield-input {
|
|
197
|
+
&:hover {
|
|
198
|
+
background-color: var(--palettes-#{$state}-50) !important;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
&:focus {
|
|
202
|
+
background-color: white !important;
|
|
203
|
+
box-shadow: form.fakeBorderOverlay(var(--palettes-#{$state}-700)), 0 0 0 4px var(--palettes-#{$state}-50) !important;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
&::placeholder {
|
|
207
|
+
color: var(--palettes-#{$state}-300);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
@if ($state == 'error') {
|
|
211
|
+
background-color: var(--palettes-#{$state}-50) !important;
|
|
212
|
+
box-shadow: form.fakeBorderOverlay(var(--palettes-#{$state}-700)) !important;
|
|
213
|
+
|
|
214
|
+
&:hover {
|
|
215
|
+
background-color: var(--palettes-#{$state}-100) !important;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
&:focus {
|
|
219
|
+
box-shadow: form.fakeBorderOverlay(var(--palettes-#{$state}-700)), 0 0 0 4px var(--palettes-#{$state}-50) !important;
|
|
220
|
+
background-color: white !important;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
&:hover {
|
|
226
|
+
background-color: var(--palettes-#{$state}-50);
|
|
227
|
+
|
|
228
|
+
.textfield-messages,
|
|
229
|
+
.radiosfield-messages,
|
|
230
|
+
.checkboxesfield-messages {
|
|
231
|
+
transform: translateY(100%);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
&:focus-within {
|
|
236
|
+
background-color: white;
|
|
237
|
+
box-shadow: form.fakeBorderOverlay(var(--palettes-#{$state}-700)), 0 0 0 4px var(--palettes-#{$state}-50);
|
|
238
|
+
|
|
239
|
+
.textfield-messages,
|
|
240
|
+
.radiosfield-messages,
|
|
241
|
+
.checkboxesfield-messages {
|
|
242
|
+
transform: translateY(100%);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
@mixin fieldFramedError($fieldname) {
|
|
248
|
+
@if ($fieldname == 'textfield') {
|
|
249
|
+
&:not(:disabled) {
|
|
250
|
+
z-index: 3;
|
|
251
|
+
box-shadow: form.fakeBorderOverlay(var(--palettes-error-700));
|
|
252
|
+
background-color: var(--palettes-error-50);
|
|
253
|
+
transition: background-color var(--commons-animations-durations-fast);
|
|
254
|
+
|
|
255
|
+
~ .textfield-label {
|
|
256
|
+
color: var(--palettes-error-700);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
&:hover {
|
|
260
|
+
z-index: 4;
|
|
261
|
+
background-color: var(--palettes-error-100);
|
|
262
|
+
|
|
263
|
+
~ .textfield-messages {
|
|
264
|
+
transform: translateY(100%);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
&:focus {
|
|
269
|
+
background-color: white;
|
|
270
|
+
box-shadow: form.fakeBorderOverlay(var(--palettes-error-700)), 0 0 0 4px var(--palettes-error-50);
|
|
271
|
+
|
|
272
|
+
~ .textfield-messages {
|
|
273
|
+
transform: translateY(100%);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
@if ($fieldname == 'radiosfield') {
|
|
280
|
+
&:not(:disabled) {
|
|
281
|
+
~ .radio-label,
|
|
282
|
+
~ .checkbox-label {
|
|
283
|
+
&::before {
|
|
284
|
+
border-color: var(--palettes-error-700);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
166
287
|
}
|
|
167
288
|
}
|
|
168
289
|
}
|
|
@@ -184,7 +305,8 @@
|
|
|
184
305
|
display: flex;
|
|
185
306
|
flex-wrap: wrap;
|
|
186
307
|
|
|
187
|
-
.checkbox,
|
|
308
|
+
.checkbox,
|
|
309
|
+
.radio {
|
|
188
310
|
margin-top: 0;
|
|
189
311
|
margin-bottom: 0;
|
|
190
312
|
margin-right: var(--components-field-horizontal-spacing);
|
|
@@ -97,8 +97,8 @@
|
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
@mixin success {
|
|
100
|
-
@keyframes
|
|
101
|
-
|
|
100
|
+
@keyframes success {
|
|
101
|
+
0% {
|
|
102
102
|
opacity: 0;
|
|
103
103
|
transform: scale(0);
|
|
104
104
|
}
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
transform: scale(1.2);
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
100% {
|
|
127
127
|
opacity: 0;
|
|
128
128
|
transform: scale(0);
|
|
129
129
|
}
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
color: var(--palettes-success-700);
|
|
136
136
|
position: absolute;
|
|
137
137
|
animation-fill-mode: forwards;
|
|
138
|
-
animation-name:
|
|
138
|
+
animation-name: success;
|
|
139
139
|
animation-duration: 3s;
|
|
140
140
|
border-radius: 50%;
|
|
141
141
|
bottom: 0.85rem;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
--components-field-horizontal-spacing: 1.5rem;
|
|
4
4
|
--components-field-input-color: var(--palettes-grey-800);
|
|
5
5
|
--components-field-input-inline-margin: 0.15rem;
|
|
6
|
-
--components-field-label-color: var(--palettes-grey-
|
|
6
|
+
--components-field-label-color: var(--palettes-grey-500);
|
|
7
7
|
--components-field-label-font-size: var(--sizes-small-font-size);
|
|
8
8
|
--components-field-label-margin-bottom: var(--spacings-smaller);
|
|
9
9
|
--components-field-message-font-size: var(--sizes-small-font-size);
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
--components-field-compact-label-sizes-long: 9rem;
|
|
29
29
|
--components-field-compact-label-sizes-longer: 11rem;
|
|
30
30
|
|
|
31
|
-
--components-field-framed-color50:
|
|
31
|
+
--components-field-framed-color50: var(--palettes-grey-50);
|
|
32
32
|
--components-field-framed-color: #9299b0;
|
|
33
|
-
--components-field-framed-border:
|
|
33
|
+
--components-field-framed-border: var(--palettes-grey-200);
|
|
34
34
|
--components-field-framed-text: #4c5775;
|
|
35
35
|
--components-field-framed-side-padding: var(--spacings-small);
|
|
36
36
|
--components-field-framed-top-padding: var(--spacings-big);
|
|
@@ -35,13 +35,11 @@
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.form {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
margin-bottom: var(--components-form-field-margin-bottom);
|
|
44
|
-
}
|
|
38
|
+
.textfield,
|
|
39
|
+
.radiosfield,
|
|
40
|
+
.checkboxesfield,
|
|
41
|
+
.checkbox.mod-field {
|
|
42
|
+
margin-bottom: var(--components-form-field-margin-bottom);
|
|
45
43
|
}
|
|
46
44
|
}
|
|
47
45
|
|
|
@@ -33,3 +33,38 @@
|
|
|
33
33
|
@include required;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
+
|
|
37
|
+
.checkboxesfield.mod-framed,
|
|
38
|
+
.radiosfield.mod-framed,
|
|
39
|
+
.form.mod-framed .fieldsetWrapper {
|
|
40
|
+
@include framed;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.checkboxesfield.mod-framed,
|
|
44
|
+
.radiosfield.mod-framed {
|
|
45
|
+
margin-top: 0;
|
|
46
|
+
padding: var(--components-field-framed-side-padding) var(--components-field-framed-side-padding)
|
|
47
|
+
var(--components-field-framed-bottom-padding);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.form-group-label {
|
|
51
|
+
&.is-required {
|
|
52
|
+
&:not(:empty) {
|
|
53
|
+
&::after {
|
|
54
|
+
@extend %isRequired;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.radiosfield-label,
|
|
61
|
+
.checkboxesfield-label,
|
|
62
|
+
.textfield-label {
|
|
63
|
+
&.is-required {
|
|
64
|
+
&:not(:empty) {
|
|
65
|
+
&::after {
|
|
66
|
+
@extend %isRequired;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
@use '../../commons/utils/form';
|
|
4
4
|
@use '../../commons/utils/media';
|
|
5
|
+
@use '../../commons/utils/loading';
|
|
5
6
|
|
|
6
7
|
@mixin overlay {
|
|
7
8
|
&:focus-within {
|
|
@@ -73,3 +74,103 @@
|
|
|
73
74
|
flex-basis: (math.div(100%, 12) * $i);
|
|
74
75
|
}
|
|
75
76
|
}
|
|
77
|
+
|
|
78
|
+
@mixin framed {
|
|
79
|
+
margin-bottom: 0;
|
|
80
|
+
background-color: _color('white');
|
|
81
|
+
padding: 0;
|
|
82
|
+
box-shadow: form.fakeBorderOverlay(var(--palettes-grey-200));
|
|
83
|
+
transition: background-color var(--commons-animations-durations-standard);
|
|
84
|
+
margin-bottom: 0 !important;
|
|
85
|
+
|
|
86
|
+
&::before,
|
|
87
|
+
&::after {
|
|
88
|
+
content: ' ';
|
|
89
|
+
display: table;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&::after {
|
|
93
|
+
clear: both;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&:not(.is-disabled, :disabled, .is-error, .is-success, .is-valid, .is-warning, .is-invalid) {
|
|
97
|
+
&:hover,
|
|
98
|
+
&:focus {
|
|
99
|
+
position: relative;
|
|
100
|
+
z-index: 1;
|
|
101
|
+
background-color: _color('white');
|
|
102
|
+
box-shadow: form.fakeBorderOverlay(var(--palettes-grey-600));
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&:focus {
|
|
106
|
+
z-index: 4;
|
|
107
|
+
box-shadow: form.fakeBorderOverlay(var(--palettes-grey-600)), 0 0 0 4px var(--palettes-grey-50);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.radiosfield,
|
|
112
|
+
.checkboxesfield {
|
|
113
|
+
margin-top: var(--components-field-framed-side-padding);
|
|
114
|
+
padding: 0 var(--components-field-framed-side-padding) var(--components-field-framed-bottom-padding);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
&.is-disabled,
|
|
118
|
+
&.is-readonly {
|
|
119
|
+
background-color: var(--commons-disabled-background);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&.is-loading {
|
|
123
|
+
@include loading.spinner;
|
|
124
|
+
|
|
125
|
+
&::before,
|
|
126
|
+
&::after {
|
|
127
|
+
left: auto !important;
|
|
128
|
+
bottom: auto !important;
|
|
129
|
+
right: var(--components-field-framed-side-padding) !important;
|
|
130
|
+
top: var(--components-field-framed-side-padding) !important;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
@mixin fieldMaterialState($fieldname, $state) {
|
|
136
|
+
&:focus {
|
|
137
|
+
box-shadow: 0 2px 0 0 var(--palettes-#{$state}-700);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
@if ($state == 'error') {
|
|
141
|
+
box-shadow: 0 2px 0 0 var(--palettes-#{$state}-700);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
~ .#{$fieldname}-label {
|
|
145
|
+
color: var(--palettes-#{$state}-700);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&:focus ~ .#{$fieldname}-label {
|
|
149
|
+
color: var(--palettes-#{$state}-700);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
@mixin fieldMaterialError($fieldname) {
|
|
154
|
+
@include fieldMaterialState($fieldname, 'error');
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
@mixin fieldMaterialFilled($fieldname) {
|
|
158
|
+
~ .#{$fieldname}-label {
|
|
159
|
+
font-size: --var(--sizes-small-font-size);
|
|
160
|
+
top: 0;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
%isRequired {
|
|
165
|
+
color: var(--palettes-error-700);
|
|
166
|
+
display: inline-block;
|
|
167
|
+
margin-left: 0.2em;
|
|
168
|
+
|
|
169
|
+
@supports (content: '*' / '') {
|
|
170
|
+
content: '*' / '';
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
@supports not (content: '*' / '') {
|
|
174
|
+
content: '*';
|
|
175
|
+
}
|
|
176
|
+
}
|
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
--components-field-framed-textarea-min-height: 5.5rem;
|
|
15
15
|
--components-field-framed-textarea-max-height: 80vh;
|
|
16
16
|
--components-field-framed-title-font-size: 1.125rem;
|
|
17
|
-
--components-field-framed-title-line-height:
|
|
17
|
+
--components-field-framed-title-line-height: 1.5rem;
|
|
18
18
|
--components-field-framed-suffix-padding-right: 3rem;
|
|
19
19
|
}
|