@lucca-front/scss 16.2.7-rc.2 → 16.3.0-rc.1

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 (106) hide show
  1. package/dist/lucca-front.min.css +1 -1
  2. package/package.json +2 -2
  3. package/src/components/button/index.scss +1 -1
  4. package/src/components/button/mods.scss +6 -5
  5. package/src/components/button/states.scss +7 -3
  6. package/src/components/checkbox/mods.scss +1 -1
  7. package/src/components/checkboxField/component.scss +85 -0
  8. package/src/components/checkboxField/index.scss +72 -0
  9. package/src/components/checkboxField/mods.scss +18 -0
  10. package/src/components/checkboxField/states.scss +167 -0
  11. package/src/components/checkboxField/vars.scss +8 -0
  12. package/src/components/chip/index.scss +0 -8
  13. package/src/components/chip/mods.scss +0 -20
  14. package/src/components/clear/index.scss +1 -1
  15. package/src/components/clear/mods.scss +1 -1
  16. package/src/components/footer/component.scss +36 -0
  17. package/src/components/footer/exports.scss +4 -0
  18. package/src/components/footer/index.scss +10 -0
  19. package/src/components/footer/mods.scss +4 -0
  20. package/src/components/footer/vars.scss +2 -0
  21. package/src/components/formLabel/component.scss +21 -0
  22. package/src/components/formLabel/exports.scss +4 -0
  23. package/src/components/formLabel/index.scss +18 -0
  24. package/src/components/formLabel/mods.scss +17 -0
  25. package/src/components/formLabel/states.scss +8 -0
  26. package/src/components/formLabel/vars.scss +7 -0
  27. package/src/components/index.scss +13 -2
  28. package/src/components/inlineMessage/component.scss +13 -0
  29. package/src/components/inlineMessage/exports.scss +4 -0
  30. package/src/components/inlineMessage/index.scss +22 -0
  31. package/src/components/inlineMessage/mods.scss +5 -0
  32. package/src/components/inlineMessage/states.scss +41 -0
  33. package/src/components/inlineMessage/vars.scss +7 -0
  34. package/src/components/list/component.scss +16 -6
  35. package/src/components/list/mods.scss +4 -5
  36. package/src/components/menu/component.scss +2 -2
  37. package/src/components/menu/mods.scss +1 -1
  38. package/src/components/menu/states.scss +12 -2
  39. package/src/components/mobileHeader/component.scss +30 -0
  40. package/src/components/mobileHeader/exports.scss +4 -0
  41. package/src/components/mobileHeader/index.scss +10 -0
  42. package/src/components/mobileHeader/mods.scss +23 -0
  43. package/src/components/mobileHeader/states.scss +0 -0
  44. package/src/components/mobileHeader/vars.scss +3 -0
  45. package/src/components/mobileNavigation/component.scss +56 -0
  46. package/src/components/mobileNavigation/exports.scss +4 -0
  47. package/src/components/mobileNavigation/index.scss +10 -0
  48. package/src/components/mobileNavigation/mods.scss +5 -0
  49. package/src/components/mobileNavigation/states.scss +0 -0
  50. package/src/components/mobileNavigation/vars.scss +2 -0
  51. package/src/components/navside/component.scss +6 -3
  52. package/src/components/navside/mods.scss +9 -1
  53. package/src/components/navside/states.scss +1 -1
  54. package/src/components/newBadge/component.scss +10 -0
  55. package/src/components/newBadge/exports.scss +4 -0
  56. package/src/components/newBadge/index.scss +6 -0
  57. package/src/components/newBadge/mods.scss +0 -0
  58. package/src/components/newBadge/states.scss +0 -0
  59. package/src/components/newBadge/vars.scss +2 -0
  60. package/src/components/numericBadge/component.scss +17 -0
  61. package/src/components/numericBadge/exports.scss +4 -0
  62. package/src/components/numericBadge/index.scss +14 -0
  63. package/src/components/numericBadge/mods.scss +13 -0
  64. package/src/components/numericBadge/states.scss +0 -0
  65. package/src/components/numericBadge/vars.scss +8 -0
  66. package/src/components/pagination/component.scss +1 -1
  67. package/src/components/radioButtons/component.scss +5 -0
  68. package/src/components/radioField/component.scss +98 -0
  69. package/src/components/radioField/exports.scss +4 -0
  70. package/src/components/radioField/index.scss +32 -0
  71. package/src/components/radioField/mods.scss +18 -0
  72. package/src/components/radioField/states.scss +122 -0
  73. package/src/components/radioField/vars.scss +7 -0
  74. package/src/components/switchField/component.scss +110 -0
  75. package/src/components/switchField/exports.scss +4 -0
  76. package/src/components/switchField/index.scss +32 -0
  77. package/src/components/switchField/mods.scss +18 -0
  78. package/src/components/switchField/states.scss +119 -0
  79. package/src/components/switchField/vars.scss +7 -0
  80. package/src/components/table/component.scss +4 -16
  81. package/src/components/table/mods.scss +9 -3
  82. package/src/components/table/vars.scss +1 -1
  83. package/src/components/textfield/component.scss +113 -61
  84. package/src/components/textfield/index.scss +10 -380
  85. package/src/components/textfield/mods.scss +61 -619
  86. package/src/components/textfield/states.scss +80 -228
  87. package/src/components/textfield/vars.scss +12 -39
  88. package/src/components/textfields/component.scss +77 -0
  89. package/src/components/textfields/exports.scss +4 -0
  90. package/src/components/textfields/index.scss +402 -0
  91. package/src/components/textfields/mods.scss +560 -0
  92. package/src/components/textfields/states.scss +224 -0
  93. package/src/components/textfields/vars.scss +41 -0
  94. package/src/components/title/component.scss +1 -1
  95. package/src/components/verticalNavigation/component.scss +42 -0
  96. package/src/components/verticalNavigation/exports.scss +4 -0
  97. package/src/components/verticalNavigation/index.scss +26 -0
  98. package/src/components/verticalNavigation/mods.scss +7 -0
  99. package/src/components/verticalNavigation/states.scss +28 -0
  100. package/src/components/verticalNavigation/vars.scss +4 -0
  101. package/src/components/sortableList/component.scss +0 -68
  102. package/src/components/sortableList/index.scss +0 -16
  103. package/src/components/sortableList/mods.scss +0 -19
  104. package/src/components/sortableList/vars.scss +0 -8
  105. /package/src/components/{sortableList → checkboxField}/exports.scss +0 -0
  106. /package/src/components/{sortableList → footer}/states.scss +0 -0
@@ -0,0 +1,560 @@
1
+ @use '@lucca-front/scss/src/commons/utils/form';
2
+ @use '@lucca-front/icons/src/commons/utils/icon';
3
+
4
+ @mixin password {
5
+ .textfield-suffix {
6
+ pointer-events: auto;
7
+ }
8
+
9
+ .textfield-input {
10
+ padding-right: var(--spacings-XL) !important;
11
+
12
+ &::-ms-reveal {
13
+ display: none;
14
+ }
15
+ }
16
+
17
+ .textfield-suffix-action {
18
+ text-decoration: none;
19
+ color: currentColor;
20
+ display: block;
21
+ }
22
+ }
23
+
24
+ @mixin clearable {
25
+ .textfield-input {
26
+ padding-right: 2rem;
27
+ }
28
+
29
+ .textfield-clear {
30
+ position: absolute;
31
+ bottom: .75rem;
32
+ right: var(--spacings-XS);
33
+ }
34
+ }
35
+
36
+ @mixin clearableS {
37
+ .textfield-clear {
38
+ bottom: var(--spacings-XXS);
39
+ right: var(--spacings-XXS);
40
+ }
41
+ }
42
+
43
+ @mixin clearableXS {
44
+ .textfield-clear {
45
+ bottom: var(--spacings-XXS);
46
+ right: var(--spacings-XXS);
47
+ }
48
+ }
49
+
50
+ @mixin suffix {
51
+ .textfield-input {
52
+ padding-right: var(--components-textfield-suffix-padding-right);
53
+ }
54
+ }
55
+
56
+ @mixin noLabel {
57
+ .textfield-suffix {
58
+ top: var(--components-textfield-input-padding-vertical);
59
+ }
60
+ }
61
+
62
+ @mixin S {
63
+ .textfield-label {
64
+ line-height: var(--sizes-S-lineHeight);
65
+ font-size: var(--sizes-S-fontSize);
66
+ }
67
+
68
+ .textfield-input {
69
+ line-height: var(--sizes-S-lineHeight);
70
+ font-size: var(--sizes-S-fontSize);
71
+ padding: .375rem;
72
+ }
73
+
74
+ .textfield-suffix {
75
+ line-height: calc(var(--sizes-S-fontSize) * 1.25);
76
+ font-size: var(--sizes-S-fontSize);
77
+
78
+ .lucca-icon {
79
+ font-size: calc(var(--sizes-S-fontSize) * 1.25);
80
+ }
81
+ }
82
+ }
83
+
84
+ @mixin XS {
85
+ .textfield-label {
86
+ line-height: var(--sizes-XS-lineHeight);
87
+ font-size: var(--sizes-XS-fontSize);
88
+ }
89
+
90
+ .textfield-input {
91
+ line-height: var(--sizes-XS-lineHeight);
92
+ font-size: var(--sizes-XS-fontSize);
93
+ padding: var(--spacings-XXS);
94
+ }
95
+
96
+ .textfield-suffix {
97
+ line-height: calc(var(--sizes-XS-fontSize) * 1.25);
98
+ font-size: var(--sizes-XS-fontSize);
99
+ top: calc(var(--components-textfield-suffix-top) + var(--spacings-XXS));
100
+
101
+ .lucca-icon {
102
+ font-size: calc(var(--sizes-XS-fontSize) * 1.25);
103
+ }
104
+ }
105
+
106
+ .textfield-messages {
107
+ font-size: var(--sizes-XS-fontSize);
108
+ line-height: var(--sizes-XS-lineHeight);
109
+
110
+ .lucca-icon {
111
+ font-size: .75rem;
112
+ line-height: var(--sizes-XS-lineHeight);
113
+ }
114
+ }
115
+ }
116
+
117
+ @mixin noLabelXS {
118
+ .textfield-suffix {
119
+ top: var(--spacings-XXS);
120
+ }
121
+ }
122
+
123
+ @mixin SInputIcon {
124
+ line-height: var(--sizes-XS-lineHeight);
125
+ font-size: var(--sizes-S-fontSize);
126
+ }
127
+
128
+ @mixin XSInputIcon {
129
+ line-height: var(--sizes-XS-lineHeight);
130
+ font-size: var(--sizes-S-fontSize);
131
+ }
132
+
133
+ @mixin size($size) {
134
+ width: var(--components-textfield-sizes-#{$size});
135
+ }
136
+
137
+ @mixin multiline {
138
+ .textfield-input {
139
+ line-height: var(--sizes-M-lineHeight);
140
+ font-size: var(--sizes-M-fontSize);
141
+ resize: vertical;
142
+ height: 5rem;
143
+ }
144
+ }
145
+
146
+ @mixin multilineS {
147
+ .textfield-input {
148
+ line-height: var(--sizes-XS-lineHeight);
149
+ font-size: var(--sizes-S-fontSize);
150
+ height: 4rem;
151
+ }
152
+ }
153
+
154
+ @mixin invert {
155
+ .textfield-label {
156
+ color: var(--colors-white-color);
157
+ }
158
+ }
159
+
160
+ @mixin materialSearchBlockClearableInput {
161
+ .textfield-input {
162
+ padding-right: 3.75rem;
163
+ }
164
+
165
+ .textfield-clear {
166
+ right: 2rem;
167
+ }
168
+ }
169
+
170
+ @mixin search {
171
+ &::after {
172
+ @include icon.generate('search');
173
+
174
+ color: var(--palettes-grey-600);
175
+ position: absolute;
176
+ pointer-events: none;
177
+ bottom: var(--spacings-XS);
178
+ font-size: var(--sizes-M-lineHeight);
179
+ line-height: var(--sizes-M-lineHeight);
180
+ right: var(--spacings-XS);
181
+ }
182
+
183
+ .textfield-input {
184
+ padding-right: var(--spacings-L);
185
+
186
+ &[type='search']:is(:hover, :focus) {
187
+ &::-webkit-search-cancel-button {
188
+ display: none;
189
+ }
190
+ }
191
+ }
192
+ }
193
+
194
+ @mixin searchClearable {
195
+ .textfield-input {
196
+ padding-right: 4rem;
197
+ }
198
+
199
+ .textfield-clear {
200
+ right: 2.5rem;
201
+ }
202
+ }
203
+
204
+ @mixin searchS {
205
+ &::after {
206
+ line-height: var(--sizes-S-lineHeight);
207
+ font-size: var(--sizes-S-lineHeight);
208
+ bottom: .375rem;
209
+ right: .375rem;
210
+ }
211
+ }
212
+
213
+ @mixin searchClearableS {
214
+ .textfield-input {
215
+ padding-right: 3.5rem;
216
+ }
217
+
218
+ .textfield-clear {
219
+ --components-clear-size: .75rem;
220
+ --components-clear-icon-size: .75rem;
221
+
222
+ right: 2.125rem;
223
+ bottom: .625rem;
224
+ }
225
+ }
226
+
227
+ @mixin searchXS {
228
+ &::after {
229
+ line-height: var(--sizes-XS-lineHeight);
230
+ font-size: var(--sizes-XS-lineHeight);
231
+ bottom: var(--spacings-XXS);
232
+ right: var(--spacings-XXS);
233
+ }
234
+ }
235
+
236
+ @mixin searchClearableXS {
237
+ .textfield-input {
238
+ padding-right: 3rem;
239
+ }
240
+
241
+ .textfield-clear {
242
+ --components-clear-size: .75rem;
243
+ --components-clear-icon-size: .75rem;
244
+
245
+ right: 1.75rem;
246
+ bottom: .375rem;
247
+ }
248
+ }
249
+
250
+ @mixin radio {
251
+ display: inline-block;
252
+ margin-left: var(--spacings-XXS);
253
+
254
+ .textfield-input {
255
+ padding-top: 0;
256
+ padding-bottom: 0;
257
+ }
258
+ }
259
+
260
+ @mixin filter {
261
+ width: var(--components-textfield-filter-width);
262
+ height: var(--components-filters-height);
263
+ border-right-color: var(--commons-divider-color);
264
+ border-right-width: 1px;
265
+ border-right-style: solid;
266
+ transition-duration: var(--commons-animations-durations-standard);
267
+ transition-property: background-color;
268
+ display: block;
269
+ position: relative;
270
+
271
+ .textfield-label {
272
+ color: var(--palettes-grey-600);
273
+ left: var(--spacings-S);
274
+ font-size: var(--sizes-S-fontSize);
275
+ font-weight: 400;
276
+ line-height: var(--sizes-S-lineHeight);
277
+ pointer-events: none;
278
+ position: absolute;
279
+ top: var(--spacings-XS);
280
+ }
281
+
282
+ .textfield-input {
283
+ background-color: transparent;
284
+ padding: var(--spacings-S) 2.5rem 0 var(--spacings-S);
285
+ // todo: déplacer dans filters ?
286
+ height: var(--components-filters-height);
287
+ border-radius: 0;
288
+ box-shadow: none;
289
+
290
+ &::after {
291
+ bottom: var(--spacings-XS);
292
+ color: var(--palettes-grey-600);
293
+ font-weight: 400;
294
+ }
295
+ }
296
+ }
297
+
298
+ @mixin suffixIcon {
299
+ color: var(--palettes-grey-600);
300
+ line-height: var(--sizes-M-lineHeight);
301
+ }
302
+
303
+ @mixin compact {
304
+ .textfield-options {
305
+ width: calc(100% - var(--components-textfield-compact-label-right-margin) - var(--components-textfield-compact-label-sizes-default));
306
+ left: auto;
307
+ right: 0;
308
+ }
309
+
310
+ .textfield-suffix {
311
+ top: var(--components-textfield-compact-padding);
312
+ right: var(--components-textfield-compact-padding);
313
+ }
314
+ }
315
+
316
+ @mixin compactMultiline {
317
+ align-items: flex-start;
318
+ }
319
+
320
+ @mixin compactSize($size) {
321
+ width: calc(
322
+ var(--components-textfield-sizes-#{$size}) + var(--components-textfield-compact-label-right-margin) +
323
+ var(--components-textfield-compact-label-sizes-default)
324
+ );
325
+
326
+ .textfield-options {
327
+ // width: $input-width; // todo: récupérer la bonne taille
328
+ outline: 2px dashed greenyellow !important;
329
+ }
330
+ }
331
+
332
+ @mixin framed {
333
+ width: 100%;
334
+ margin-bottom: 0 !important;
335
+
336
+ .textfield.mod-search {
337
+ @include framedSearch;
338
+ }
339
+
340
+ .textfield-options {
341
+ width: auto;
342
+ margin-top: -2px;
343
+ right: 1px;
344
+
345
+ mark {
346
+ background-color: transparent;
347
+ text-decoration: underline;
348
+ color: inherit;
349
+ }
350
+ }
351
+
352
+ .textfield-input {
353
+ width: 100%;
354
+ border-radius: 0;
355
+ box-shadow: form.fakeBorderOverlay(var(--components-field-framed-border));
356
+ padding: var(--components-field-framed-top-padding) var(--components-field-framed-side-padding)
357
+ var(--components-field-framed-bottom-padding);
358
+ line-height: var(--sizes-M-lineHeight);
359
+ outline: none;
360
+
361
+ &:not(:disabled, .is-error, .is-success, .is-valid, .is-warning, .is-invalid) {
362
+ background-color: var(--colors-white-color);
363
+ }
364
+ }
365
+
366
+ .textfield-label {
367
+ padding: var(--components-field-framed-label-top-offset) var(--components-field-framed-side-padding);
368
+ position: absolute;
369
+ pointer-events: none;
370
+ left: 0;
371
+ top: 0;
372
+ z-index: 10;
373
+ line-height: var(--sizes-M-lineHeight);
374
+ font-size: var(--sizes-S-fontSize);
375
+ color: var(--palettes-grey-600);
376
+ }
377
+
378
+ .textfield-messages,
379
+ .radiosfield-messages,
380
+ .checkboxesfield-messages {
381
+ transition-duration: var(--commons-animations-durations-standard);
382
+ transition-property: transform;
383
+ position: absolute;
384
+ text-align: center;
385
+ bottom: 0;
386
+ left: -1px;
387
+ right: 0;
388
+ transform: translateY(0);
389
+ z-index: 4;
390
+
391
+ > * {
392
+ display: block;
393
+ }
394
+ }
395
+
396
+ .textfield-messages-error,
397
+ .radiosfield-messages-error,
398
+ .checkboxesfield-messages-error {
399
+ background-color: var(--palettes-error-700);
400
+ color: var(--colors-white-color);
401
+ }
402
+
403
+ .textfield-messages-warning,
404
+ .radiosfield-messages-warning,
405
+ .checkboxesfield-messages-warning {
406
+ background-color: var(--palettes-warning-700);
407
+ color: var(--colors-white-color);
408
+ }
409
+
410
+ .textfield-messages-valid,
411
+ .radiosfield-messages-valid,
412
+ .checkboxesfield-messages-valid,
413
+ .textfield-messages-success,
414
+ .radiosfield-messages-success,
415
+ .checkboxesfield-messages-success {
416
+ background-color: var(--palettes-success-700);
417
+ color: var(--colors-white-color);
418
+ }
419
+
420
+ .textfield-messages-helper,
421
+ .radiosfield-messages-helper,
422
+ .checkboxesfield-messages-helper {
423
+ background-color: var(--palettes-grey-500);
424
+ color: var(--colors-white-color);
425
+ }
426
+ }
427
+
428
+ @mixin framedMultiline {
429
+ .textfield-input {
430
+ height: var(--components-field-framed-textarea-height);
431
+ min-height: var(--components-field-framed-textarea-min-height);
432
+ max-height: var(--components-field-framed-textarea-max-height);
433
+ }
434
+ }
435
+
436
+ @mixin framedMultilineS {
437
+ .textfield-input {
438
+ height: auto;
439
+ }
440
+ }
441
+
442
+ @mixin framedSearch {
443
+ &::after {
444
+ color: var(--palettes-grey-600);
445
+ padding: var(--components-field-framed-side-padding);
446
+ bottom: 0;
447
+ right: 0;
448
+ z-index: 4;
449
+ }
450
+
451
+ .textfield {
452
+ width: 100%;
453
+ }
454
+
455
+ .textfield-input {
456
+ padding-right: var(--components-field-framed-suffix-padding-right);
457
+ }
458
+ }
459
+
460
+ @mixin material {
461
+ padding-top: var(--components-textfield-material-padding-top);
462
+ vertical-align: baseline;
463
+
464
+ .textfield-input {
465
+ box-shadow: 0 1px 0 0 var(--components-textfield-material-border-color);
466
+ background-color: transparent;
467
+ border-radius: 0;
468
+ padding-left: 0;
469
+ padding-right: 0;
470
+
471
+ &::placeholder {
472
+ opacity: 0;
473
+ color: var(--palettes-grey-400);
474
+ }
475
+ }
476
+
477
+ .textfield-label {
478
+ color: var(--components-textfield-material-label-color);
479
+ font-size: var(--components-textfield-material-label-font-size);
480
+ position: absolute;
481
+ pointer-events: none;
482
+ font-weight: 400;
483
+ line-height: var(--sizes-M-lineHeight);
484
+ width: 100%;
485
+ top: var(--spacings-M);
486
+ left: 0;
487
+ }
488
+
489
+ .textfield-suffix {
490
+ top: calc(var(--components-textfield-material-padding-top) + var(--components-textfield-input-padding-vertical));
491
+ position: absolute;
492
+ right: 0;
493
+ }
494
+ }
495
+
496
+ @mixin materialS {
497
+ .textfield-label {
498
+ line-height: var(--sizes-S-lineHeight);
499
+ font-size: var(--sizes-S-fontSize);
500
+ }
501
+ }
502
+
503
+ @mixin materialSuffix {
504
+ .textfield-input {
505
+ padding-right: var(--components-textfield-material-suffix-padding-right);
506
+ }
507
+ }
508
+
509
+ @mixin materialNoLabel {
510
+ padding-top: 0;
511
+
512
+ .textfield-input {
513
+ &::placeholder {
514
+ opacity: 1;
515
+ }
516
+ }
517
+
518
+ .textfield-label {
519
+ display: none;
520
+ }
521
+
522
+ .textfield-suffix {
523
+ top: var(--components-textfield-input-padding-vertical);
524
+ }
525
+ }
526
+
527
+ @mixin materialSearch {
528
+ &::after {
529
+ color: var(--palettes-grey-500);
530
+ bottom: var(--spacings-XS);
531
+ right: 0;
532
+ }
533
+
534
+ .textfield-input {
535
+ padding-right: 1.75rem;
536
+ }
537
+
538
+ .textfield-label {
539
+ padding-right: 0;
540
+ }
541
+ }
542
+
543
+ @mixin materialRadio {
544
+ padding-top: 0;
545
+ }
546
+
547
+ @mixin materialValid {
548
+ &::before {
549
+ bottom: 0.7rem !important;
550
+ right: 0 !important;
551
+ }
552
+
553
+ .textfield-label {
554
+ padding-right: var(--spacings-M);
555
+ }
556
+
557
+ .textfield-input {
558
+ padding-right: var(--spacings-M);
559
+ }
560
+ }