@db-ux/core-components 3.1.20 → 4.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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @db-ux/core-components
2
2
 
3
+ ## 4.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - feat: Switch stable rework - [see commit cb2deb0](https://github.com/db-ux-design-system/core-web/commit/cb2deb0f1c54900d1967483aea05d81279c02f59):
8
+ - **BREAKING CHANGE**: remove `emphasis` property
9
+ - introduce validation (invalid and valid)
10
+ - configurable label position
11
+
12
+ - **BREAKING CHANGE**: refactor(Custom Select): renamed `ariaListLabel` property to `listLabel` - [see commit 966d5ad](https://github.com/db-ux-design-system/core-web/commit/966d5ad01f00d0ca1707cc316a63e2d431fff1e9)
13
+
3
14
  ## 3.1.20
4
15
 
5
16
  ### Patch Changes
@@ -294,6 +294,9 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
294
294
  --db-adaptive-on-bg-basic-emphasis-100-pressed: var(
295
295
  --db-successful-on-bg-basic-emphasis-80-pressed
296
296
  );
297
+ --db-adaptive-on-bg-inverted-default: var(
298
+ --db-successful-on-bg-inverted-default
299
+ );
297
300
  }
298
301
  .db-checkbox:has(input:not([data-custom-validity]):required:user-valid):has(.db-infotext[data-semantic=successful]) > db-infotext > .db-infotext,
299
302
  .db-checkbox:has(input:not([data-custom-validity]):required:user-valid):has(.db-infotext[data-semantic=successful]) > .db-infotext {
@@ -319,15 +322,14 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
319
322
  );
320
323
  }
321
324
  .db-checkbox:has(input:not([data-custom-validity]):required:user-valid):has(.db-infotext[data-semantic=successful]) input:checked {
322
- --db-icon-color: var(--db-successful-on-bg-inverted-default);
323
325
  --db-adaptive-bg-basic-transparent-full-default: var(
324
- --db-successful-bg-inverted-contrast-high-default
326
+ --db-successful-bg-inverted-contrast-low-default
325
327
  );
326
328
  --db-adaptive-bg-basic-transparent-full-hovered: var(
327
- --db-successful-bg-inverted-contrast-high-hovered
329
+ --db-successful-bg-inverted-contrast-low-hovered
328
330
  );
329
331
  --db-adaptive-bg-basic-transparent-full-pressed: var(
330
- --db-successful-bg-inverted-contrast-high-pressed
332
+ --db-successful-bg-inverted-contrast-low-pressed
331
333
  );
332
334
  }
333
335
  .db-checkbox:has(input[data-custom-validity=valid]):has(.db-infotext[data-semantic=successful]), .db-checkbox[data-custom-validity=valid]:has(.db-infotext[data-semantic=successful]) {
@@ -343,6 +345,9 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
343
345
  --db-adaptive-on-bg-basic-emphasis-100-pressed: var(
344
346
  --db-successful-on-bg-basic-emphasis-80-pressed
345
347
  );
348
+ --db-adaptive-on-bg-inverted-default: var(
349
+ --db-successful-on-bg-inverted-default
350
+ );
346
351
  }
347
352
  .db-checkbox:has(input[data-custom-validity=valid]):has(.db-infotext[data-semantic=successful]) > db-infotext > .db-infotext,
348
353
  .db-checkbox:has(input[data-custom-validity=valid]):has(.db-infotext[data-semantic=successful]) > .db-infotext, .db-checkbox[data-custom-validity=valid]:has(.db-infotext[data-semantic=successful]) > db-infotext > .db-infotext,
@@ -371,15 +376,14 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
371
376
  );
372
377
  }
373
378
  .db-checkbox:has(input[data-custom-validity=valid]):has(.db-infotext[data-semantic=successful]) input:checked, .db-checkbox[data-custom-validity=valid]:has(.db-infotext[data-semantic=successful]) input:checked {
374
- --db-icon-color: var(--db-successful-on-bg-inverted-default);
375
379
  --db-adaptive-bg-basic-transparent-full-default: var(
376
- --db-successful-bg-inverted-contrast-high-default
380
+ --db-successful-bg-inverted-contrast-low-default
377
381
  );
378
382
  --db-adaptive-bg-basic-transparent-full-hovered: var(
379
- --db-successful-bg-inverted-contrast-high-hovered
383
+ --db-successful-bg-inverted-contrast-low-hovered
380
384
  );
381
385
  --db-adaptive-bg-basic-transparent-full-pressed: var(
382
- --db-successful-bg-inverted-contrast-high-pressed
386
+ --db-successful-bg-inverted-contrast-low-pressed
383
387
  );
384
388
  }
385
389
  .db-checkbox:has(input:not([data-custom-validity]):required:user-invalid) {
@@ -395,6 +399,9 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
395
399
  --db-adaptive-on-bg-basic-emphasis-100-pressed: var(
396
400
  --db-critical-on-bg-basic-emphasis-80-pressed
397
401
  );
402
+ --db-adaptive-on-bg-inverted-default: var(
403
+ --db-critical-on-bg-inverted-default
404
+ );
398
405
  }
399
406
  .db-checkbox:has(input:not([data-custom-validity]):required:user-invalid) > db-infotext > .db-infotext[data-semantic=critical]:not([hidden]),
400
407
  .db-checkbox:has(input:not([data-custom-validity]):required:user-invalid) > .db-infotext[data-semantic=critical]:not([hidden]) {
@@ -416,15 +423,14 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
416
423
  );
417
424
  }
418
425
  .db-checkbox:has(input:not([data-custom-validity]):required:user-invalid) input:checked {
419
- --db-icon-color: var(--db-critical-on-bg-inverted-default);
420
426
  --db-adaptive-bg-basic-transparent-full-default: var(
421
- --db-critical-bg-inverted-contrast-high-default
427
+ --db-critical-bg-inverted-contrast-low-default
422
428
  );
423
429
  --db-adaptive-bg-basic-transparent-full-hovered: var(
424
- --db-critical-bg-inverted-contrast-high-hovered
430
+ --db-critical-bg-inverted-contrast-low-hovered
425
431
  );
426
432
  --db-adaptive-bg-basic-transparent-full-pressed: var(
427
- --db-critical-bg-inverted-contrast-high-pressed
433
+ --db-critical-bg-inverted-contrast-low-pressed
428
434
  );
429
435
  }
430
436
  .db-checkbox:has(input[data-custom-validity=invalid]), .db-checkbox[data-custom-validity=invalid] {
@@ -440,6 +446,9 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
440
446
  --db-adaptive-on-bg-basic-emphasis-100-pressed: var(
441
447
  --db-critical-on-bg-basic-emphasis-80-pressed
442
448
  );
449
+ --db-adaptive-on-bg-inverted-default: var(
450
+ --db-critical-on-bg-inverted-default
451
+ );
443
452
  }
444
453
  .db-checkbox:has(input[data-custom-validity=invalid]) > db-infotext > .db-infotext[data-semantic=critical]:not([hidden]),
445
454
  .db-checkbox:has(input[data-custom-validity=invalid]) > .db-infotext[data-semantic=critical]:not([hidden]), .db-checkbox[data-custom-validity=invalid] > db-infotext > .db-infotext[data-semantic=critical]:not([hidden]),
@@ -463,15 +472,14 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
463
472
  );
464
473
  }
465
474
  .db-checkbox:has(input[data-custom-validity=invalid]) input:checked, .db-checkbox[data-custom-validity=invalid] input:checked {
466
- --db-icon-color: var(--db-critical-on-bg-inverted-default);
467
475
  --db-adaptive-bg-basic-transparent-full-default: var(
468
- --db-critical-bg-inverted-contrast-high-default
476
+ --db-critical-bg-inverted-contrast-low-default
469
477
  );
470
478
  --db-adaptive-bg-basic-transparent-full-hovered: var(
471
- --db-critical-bg-inverted-contrast-high-hovered
479
+ --db-critical-bg-inverted-contrast-low-hovered
472
480
  );
473
481
  --db-adaptive-bg-basic-transparent-full-pressed: var(
474
- --db-critical-bg-inverted-contrast-high-pressed
482
+ --db-critical-bg-inverted-contrast-low-pressed
475
483
  );
476
484
  }
477
485
  .db-checkbox input {
@@ -24,56 +24,6 @@
24
24
  }
25
25
  }
26
26
 
27
- @mixin get-validity-color-check($key: "valid") {
28
- $variant: successful;
29
-
30
- @if $key != "valid" {
31
- $variant: critical;
32
- }
33
-
34
- --db-check-element-border-color: var(
35
- --db-#{$variant}-on-bg-basic-emphasis-70-default
36
- );
37
- --db-adaptive-on-bg-basic-emphasis-100-default: var(
38
- --db-#{$variant}-on-bg-basic-emphasis-80-default
39
- );
40
- --db-adaptive-on-bg-basic-emphasis-100-hovered: var(
41
- --db-#{$variant}-on-bg-basic-emphasis-80-hovered
42
- );
43
- --db-adaptive-on-bg-basic-emphasis-100-pressed: var(
44
- --db-#{$variant}-on-bg-basic-emphasis-80-pressed
45
- );
46
-
47
- @include form-components.get-validity-message($key);
48
-
49
- input {
50
- &:not(:checked) {
51
- --db-adaptive-bg-basic-transparent-full-default: var(
52
- --db-#{$variant}-bg-basic-transparent-full-default
53
- );
54
- --db-adaptive-bg-basic-transparent-full-hovered: var(
55
- --db-#{$variant}-bg-basic-transparent-full-hovered
56
- );
57
- --db-adaptive-bg-basic-transparent-full-pressed: var(
58
- --db-#{$variant}-bg-basic-transparent-full-pressed
59
- );
60
- }
61
-
62
- &:checked {
63
- --db-icon-color: var(--db-#{$variant}-on-bg-inverted-default);
64
- --db-adaptive-bg-basic-transparent-full-default: var(
65
- --db-#{$variant}-bg-inverted-contrast-high-default
66
- );
67
- --db-adaptive-bg-basic-transparent-full-hovered: var(
68
- --db-#{$variant}-bg-inverted-contrast-high-hovered
69
- );
70
- --db-adaptive-bg-basic-transparent-full-pressed: var(
71
- --db-#{$variant}-bg-inverted-contrast-high-pressed
72
- );
73
- }
74
- }
75
- }
76
-
77
27
  .db-checkbox {
78
28
  @extend %helper-message;
79
29
  @include form-components.set-default-check-element;
@@ -85,12 +35,12 @@
85
35
 
86
36
  @include form-components.get-validity(check) {
87
37
  &:has(.db-infotext[data-semantic="successful"]) {
88
- @include get-validity-color-check("valid");
38
+ @include form-components.get-validity-color-checkbox("valid");
89
39
  }
90
40
  }
91
41
 
92
42
  @include form-components.get-validity(check, "invalid") {
93
- @include get-validity-color-check("invalid");
43
+ @include form-components.get-validity-color-checkbox("invalid");
94
44
  }
95
45
 
96
46
  input {
@@ -180,13 +180,13 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
180
180
  margin-inline-end: var(--db-icon-margin-end, var(--db-spacing-fixed-xs));
181
181
  }
182
182
  .db-infotext[data-semantic=adaptive], .db-infotext:not([data-semantic]) {
183
- color: var(--db-adaptive-bg-inverted-contrast-high-default);
183
+ color: var(--db-adaptive-on-bg-basic-emphasis-80-default);
184
184
  }
185
185
  .db-infotext[data-semantic=adaptive]::before, .db-infotext:not([data-semantic])::before {
186
186
  --db-icon-color: var(--db-adaptive-on-bg-basic-emphasis-70-default);
187
187
  }
188
188
  .db-infotext[data-semantic=neutral] {
189
- color: var(--db-neutral-bg-inverted-contrast-high-default);
189
+ color: var(--db-neutral-on-bg-basic-emphasis-80-default);
190
190
  }
191
191
  .db-infotext[data-semantic=neutral]:not([data-icon])::before {
192
192
  --db-icon: "information_circle";
@@ -198,7 +198,7 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
198
198
  );
199
199
  }
200
200
  .db-infotext[data-semantic=critical] {
201
- color: var(--db-critical-bg-inverted-contrast-high-default);
201
+ color: var(--db-critical-on-bg-basic-emphasis-80-default);
202
202
  }
203
203
  .db-infotext[data-semantic=critical]:not([data-icon])::before {
204
204
  --db-icon: "exclamation_mark_circle";
@@ -210,7 +210,7 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
210
210
  );
211
211
  }
212
212
  .db-infotext[data-semantic=successful] {
213
- color: var(--db-successful-bg-inverted-contrast-high-default);
213
+ color: var(--db-successful-on-bg-basic-emphasis-80-default);
214
214
  }
215
215
  .db-infotext[data-semantic=successful]:not([data-icon])::before {
216
216
  --db-icon: "check_circle";
@@ -221,7 +221,7 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
221
221
  );
222
222
  }
223
223
  .db-infotext[data-semantic=warning] {
224
- color: var(--db-warning-bg-inverted-contrast-high-default);
224
+ color: var(--db-warning-on-bg-basic-emphasis-80-default);
225
225
  }
226
226
  .db-infotext[data-semantic=warning]:not([data-icon])::before {
227
227
  --db-icon: "exclamation_mark_triangle";
@@ -233,7 +233,7 @@ paddings/gaps in an application e.g. the <main> should have a responsive padding
233
233
  );
234
234
  }
235
235
  .db-infotext[data-semantic=informational] {
236
- color: var(--db-informational-bg-inverted-contrast-high-default);
236
+ color: var(--db-informational-on-bg-basic-emphasis-80-default);
237
237
  }
238
238
  .db-infotext[data-semantic=informational]:not([data-icon])::before {
239
239
  --db-icon: "information_circle";
@@ -22,7 +22,7 @@
22
22
 
23
23
  &[data-semantic="adaptive"],
24
24
  &:not([data-semantic]) {
25
- color: colors.$db-adaptive-bg-inverted-contrast-high-default;
25
+ color: colors.$db-adaptive-on-bg-basic-emphasis-80-default;
26
26
 
27
27
  &::before {
28
28
  --db-icon-color: #{colors.$db-adaptive-on-bg-basic-emphasis-70-default};
@@ -33,7 +33,7 @@
33
33
  &[data-semantic="#{$name}"] {
34
34
  @include icons.variant-icons($name);
35
35
 
36
- color: var(--db-#{$name}-bg-inverted-contrast-high-default);
36
+ color: var(--db-#{$name}-on-bg-basic-emphasis-80-default);
37
37
 
38
38
  &::before {
39
39
  --db-icon-color: var(
@@ -676,6 +676,10 @@ input[type=radio]:checked) [id$=-placeholder] {
676
676
  caret-color: var(--db-successful-on-bg-basic-emphasis-100-default);
677
677
  }
678
678
  .db-input:has(input:not([data-custom-validity]):is(:required, [minlength], [maxlength], [pattern], [type=color], [type=date], [type=datetime-local], [type=email], [type=file], [type=hidden], [type=month], [type=number], [type=range], [type=tel], [type=time], [type=url], [type=week]):user-valid):has(> .db-infotext[data-semantic=successful],
679
+ > db-infotext > .db-infotext[data-semantic=successful]) input {
680
+ border-color: var(--db-successful-on-bg-basic-emphasis-70-default);
681
+ }
682
+ .db-input:has(input:not([data-custom-validity]):is(:required, [minlength], [maxlength], [pattern], [type=color], [type=date], [type=datetime-local], [type=email], [type=file], [type=hidden], [type=month], [type=number], [type=range], [type=tel], [type=time], [type=url], [type=week]):user-valid):has(> .db-infotext[data-semantic=successful],
679
683
  > db-infotext > .db-infotext[data-semantic=successful]) > db-infotext > .db-infotext,
680
684
  .db-input:has(input:not([data-custom-validity]):is(:required, [minlength], [maxlength], [pattern], [type=color], [type=date], [type=datetime-local], [type=email], [type=file], [type=hidden], [type=month], [type=number], [type=range], [type=tel], [type=time], [type=url], [type=week]):user-valid):has(> .db-infotext[data-semantic=successful],
681
685
  > db-infotext > .db-infotext[data-semantic=successful]) > .db-infotext {
@@ -709,6 +713,11 @@ input[type=radio]:checked) [id$=-placeholder] {
709
713
  caret-color: var(--db-successful-on-bg-basic-emphasis-100-default);
710
714
  }
711
715
  .db-input:has(input[data-custom-validity=valid]):has(> .db-infotext[data-semantic=successful],
716
+ > db-infotext > .db-infotext[data-semantic=successful]) input, .db-input[data-custom-validity=valid]:has(> .db-infotext[data-semantic=successful],
717
+ > db-infotext > .db-infotext[data-semantic=successful]) input {
718
+ border-color: var(--db-successful-on-bg-basic-emphasis-70-default);
719
+ }
720
+ .db-input:has(input[data-custom-validity=valid]):has(> .db-infotext[data-semantic=successful],
712
721
  > db-infotext > .db-infotext[data-semantic=successful]) > db-infotext > .db-infotext,
713
722
  .db-input:has(input[data-custom-validity=valid]):has(> .db-infotext[data-semantic=successful],
714
723
  > db-infotext > .db-infotext[data-semantic=successful]) > .db-infotext, .db-input[data-custom-validity=valid]:has(> .db-infotext[data-semantic=successful],
@@ -743,6 +752,9 @@ input[type=radio]:checked) [id$=-placeholder] {
743
752
  color: var(--db-critical-on-bg-basic-emphasis-100-default);
744
753
  caret-color: var(--db-critical-on-bg-basic-emphasis-100-default);
745
754
  }
755
+ .db-input:has(input:not([data-custom-validity]):is(:required, [minlength], [maxlength], [pattern], [type=color], [type=date], [type=datetime-local], [type=email], [type=file], [type=hidden], [type=month], [type=number], [type=range], [type=tel], [type=time], [type=url], [type=week]):user-invalid) input {
756
+ border-color: var(--db-critical-on-bg-basic-emphasis-70-default);
757
+ }
746
758
  .db-input:has(input:not([data-custom-validity]):is(:required, [minlength], [maxlength], [pattern], [type=color], [type=date], [type=datetime-local], [type=email], [type=file], [type=hidden], [type=month], [type=number], [type=range], [type=tel], [type=time], [type=url], [type=week]):user-invalid) > db-infotext > .db-infotext[data-semantic=critical]:not([hidden]),
747
759
  .db-input:has(input:not([data-custom-validity]):is(:required, [minlength], [maxlength], [pattern], [type=color], [type=date], [type=datetime-local], [type=email], [type=file], [type=hidden], [type=month], [type=number], [type=range], [type=tel], [type=time], [type=url], [type=week]):user-invalid) > .db-infotext[data-semantic=critical]:not([hidden]) {
748
760
  display: flex;
@@ -760,6 +772,9 @@ input[type=radio]:checked) [id$=-placeholder] {
760
772
  color: var(--db-critical-on-bg-basic-emphasis-100-default);
761
773
  caret-color: var(--db-critical-on-bg-basic-emphasis-100-default);
762
774
  }
775
+ .db-input:has(input[data-custom-validity=invalid]) input, .db-input[data-custom-validity=invalid] input {
776
+ border-color: var(--db-critical-on-bg-basic-emphasis-70-default);
777
+ }
763
778
  .db-input:has(input[data-custom-validity=invalid]) > db-infotext > .db-infotext[data-semantic=critical]:not([hidden]),
764
779
  .db-input:has(input[data-custom-validity=invalid]) > .db-infotext[data-semantic=critical]:not([hidden]), .db-input[data-custom-validity=invalid] > db-infotext > .db-infotext[data-semantic=critical]:not([hidden]),
765
780
  .db-input[data-custom-validity=invalid] > .db-infotext[data-semantic=critical]:not([hidden]) {