@siemens/element-theme 51.0.0-rc.7 → 51.0.0-rc.8

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 (44) hide show
  1. package/package.json +1 -1
  2. package/src/styles/_density.scss +144 -0
  3. package/src/styles/_utilities.scss +5 -0
  4. package/src/styles/_variables.scss +1 -0
  5. package/src/styles/bootstrap/_badges.scss +3 -3
  6. package/src/styles/bootstrap/_button-group.scss +3 -3
  7. package/src/styles/bootstrap/_buttons.scss +2 -3
  8. package/src/styles/bootstrap/_card.scss +18 -11
  9. package/src/styles/bootstrap/_dropdowns.scss +12 -12
  10. package/src/styles/bootstrap/_images.scss +2 -1
  11. package/src/styles/bootstrap/_modals.scss +8 -8
  12. package/src/styles/bootstrap/_pagination.scss +3 -3
  13. package/src/styles/bootstrap/_popovers.scss +1 -1
  14. package/src/styles/bootstrap/_reboot.scss +1 -1
  15. package/src/styles/bootstrap/_tables.scss +8 -6
  16. package/src/styles/bootstrap/_type.scss +65 -1
  17. package/src/styles/bootstrap/_utilities.scss +2 -7
  18. package/src/styles/bootstrap/_variables.scss +60 -54
  19. package/src/styles/bootstrap/forms/_form-check.scss +12 -12
  20. package/src/styles/bootstrap/forms/_form-control.scss +19 -13
  21. package/src/styles/bootstrap/forms/_form-file.scss +2 -2
  22. package/src/styles/bootstrap/forms/_form-label.scss +1 -1
  23. package/src/styles/bootstrap/forms/_form-layout.scss +2 -2
  24. package/src/styles/bootstrap/forms/_validation.scss +2 -2
  25. package/src/styles/bootstrap/mixins/_badge-text.scss +2 -2
  26. package/src/styles/bootstrap/mixins/_form-layout.scss +4 -4
  27. package/src/styles/bootstrap/mixins/_grid.scss +3 -3
  28. package/src/styles/bootstrap/mixins/_utilities.scss +14 -3
  29. package/src/styles/components/_application-header.scss +8 -8
  30. package/src/styles/components/_datatable.scss +20 -8
  31. package/src/styles/components/_layout.scss +12 -12
  32. package/src/styles/components/_list-item.scss +47 -17
  33. package/src/styles/components/_markdown.scss +8 -8
  34. package/src/styles/components/_pills.scss +3 -3
  35. package/src/styles/components/_search-bar.scss +67 -0
  36. package/src/styles/components/_switch.scss +4 -4
  37. package/src/styles/components/_widgets.scss +9 -7
  38. package/src/styles/mixins/_utilities.scss +259 -0
  39. package/src/styles/variables/_si-vars.scss +13 -7
  40. package/src/styles/variables/_sizing.scss +22 -0
  41. package/src/styles/variables/_spacers.scss +53 -25
  42. package/src/styles/variables/_typography.scss +86 -53
  43. package/src/styles/variables/_utilities.scss +56 -51
  44. package/src/theme.scss +3 -0
@@ -35,17 +35,11 @@
35
35
  }
36
36
  }
37
37
 
38
+ // Deprecated legacy utilities. Use system-token text utilities instead.
38
39
  $text-colors: (
39
- 'primary': system-tokens.$si-sys-text-accent,
40
40
  'body': system-tokens.$si-sys-text-primary,
41
- 'secondary': system-tokens.$si-sys-text-secondary,
42
41
  'tertiary': system-tokens.$si-sys-text-disabled,
43
- 'success': system-tokens.$si-sys-text-success,
44
42
  'info': system-tokens.$si-sys-text-information,
45
- 'warning': system-tokens.$si-sys-text-warning,
46
- 'caution': system-tokens.$si-sys-text-caution,
47
- 'danger': system-tokens.$si-sys-text-danger,
48
- 'inverse': system-tokens.$si-sys-text-inverse,
49
43
  'muted': system-tokens.$si-sys-text-disabled
50
44
  ) !default;
51
45
 
@@ -55,6 +49,7 @@ $text-colors: (
55
49
  }
56
50
  }
57
51
 
52
+ // Deprecated legacy utilities. Use system-token background utilities instead.
58
53
  $background-colors: (
59
54
  'primary': system-tokens.$si-sys-background-accent,
60
55
  'secondary': system-tokens.$si-sys-text-secondary,
@@ -104,13 +104,15 @@ $container-max-widths: (
104
104
  // Set the number of columns and specify the width of the gutters.
105
105
 
106
106
  $grid-columns: 12 !default;
107
- $grid-gutter-width: spacers.$spacer !default;
107
+ $grid-gutter-width: map.get(spacers.$spacers-inline, 6) !default;
108
108
  $grid-row-columns: 6 !default;
109
- $gutters: spacers.$spacers !default;
109
+ $gutters-inline: spacers.$spacers-inline !default;
110
+ $gutters-block: spacers.$spacers-block !default;
111
+ $gutters: $gutters-block !default;
110
112
 
111
113
  // Container padding
112
114
 
113
- $container-padding-x: $grid-gutter-width * 0.5 !default;
115
+ $container-padding-x: calc(#{$grid-gutter-width} * 0.5) !default;
114
116
 
115
117
  // Components
116
118
  //
@@ -169,7 +171,7 @@ $font-weight-lighter: typography.$si-font-weight-lighter;
169
171
  $font-weight-light: typography.$si-font-weight-light;
170
172
  $font-weight-normal: typography.$si-font-weight-normal;
171
173
  $font-weight-medium: typography.$si-font-weight-medium;
172
- $font-weight-semibold: typography.$si-font-weight-semibold;
174
+ $font-weight-semibold: typography.$si-font-weight-sbold;
173
175
  $font-weight-bold: typography.$si-font-weight-bold;
174
176
  $font-weight-bolder: typography.$si-font-weight-bolder;
175
177
 
@@ -195,10 +197,10 @@ $font-sizes: (
195
197
  6: $h6-font-size
196
198
  ) !default;
197
199
 
198
- $headings-margin-bottom: spacers.$spacer * 0.5 !default;
200
+ $headings-margin-bottom: map.get(spacers.$spacers-block, 4) !default;
199
201
  $headings-font-family: null !default;
200
202
  $headings-font-style: null !default;
201
- $headings-font-weight: typography.$si-font-weight-semibold !default;
203
+ $headings-font-weight: typography.$si-font-weight-sbold !default;
202
204
  $headings-line-height: 1.2 !default;
203
205
  $headings-color: system-tokens.$si-sys-text-primary !default;
204
206
 
@@ -212,14 +214,14 @@ $sub-sup-font-size: 0.75em !default;
212
214
 
213
215
  $initialism-font-size: $small-font-size !default;
214
216
 
215
- $text-muted: system-tokens.$si-sys-text-disabled !default;
217
+ $text-disabled: system-tokens.$si-sys-text-disabled !default;
216
218
 
217
- $blockquote-margin-y: spacers.$spacer !default;
219
+ $blockquote-margin-y: map.get(spacers.$spacers-block, 6) !default;
218
220
  $blockquote-font-size: typography.$si-font-size-body-lg !default;
219
221
  $blockquote-footer-color: system-tokens.$si-sys-text-secondary !default;
220
222
  $blockquote-footer-font-size: $small-font-size !default;
221
223
 
222
- $hr-margin-y: spacers.$spacer !default;
224
+ $hr-margin-y: map.get(spacers.$spacers-block, 6) !default;
223
225
  $hr-color: system-tokens.$si-sys-border-4 !default;
224
226
  $hr-height: $border-width !default;
225
227
  $hr-opacity: 1 !default;
@@ -243,10 +245,10 @@ $mark-color: system-tokens.$si-sys-text-on-caution;
243
245
  //
244
246
  // Customizes the `.table` component with basic values, each used across all table variations.
245
247
 
246
- $table-cell-padding-y: map.get(spacers.$spacers, 4) !default;
247
- $table-cell-padding-x: map.get(spacers.$spacers, 4) !default;
248
- $table-cell-padding-y-sm: map.get(spacers.$spacers, 2) !default;
249
- $table-cell-padding-x-sm: map.get(spacers.$spacers, 4) !default;
248
+ $table-cell-padding-y: map.get(spacers.$spacers-block, 4) !default;
249
+ $table-cell-padding-x: map.get(spacers.$spacers-inline, 4) !default;
250
+ $table-cell-padding-y-sm: map.get(spacers.$spacers-block, 2) !default;
251
+ $table-cell-padding-x-sm: map.get(spacers.$spacers-inline, 4) !default;
250
252
 
251
253
  $table-cell-vertical-align: top !default;
252
254
 
@@ -285,14 +287,14 @@ $table-variants: (
285
287
  //
286
288
  // For each of Bootstrap's buttons, define text, background, and border color.
287
289
 
288
- $btn-padding-y: map.get(spacers.$spacers, 4);
289
- $btn-padding-x: map.get(spacers.$spacers, 4);
290
+ $btn-padding-y: map.get(spacers.$spacers-block, 4);
291
+ $btn-padding-x: map.get(spacers.$spacers-inline, 4);
290
292
  $btn-font-size: $font-size-base;
291
293
  $btn-line-height: $line-height-base;
292
294
  $btn-white-space: null !default; // Set to `nowrap` to prevent text wrapping
293
295
 
294
- $btn-padding-y-sm: map.get(spacers.$spacers, 2);
295
- $btn-padding-y-lg: map.get(spacers.$spacers, 5);
296
+ $btn-padding-y-sm: map.get(spacers.$spacers-block, 2);
297
+ $btn-padding-y-lg: map.get(spacers.$spacers-block, 5);
296
298
 
297
299
  $btn-link-color: $link-color !default;
298
300
  $btn-link-hover-color: $link-hover-color !default;
@@ -312,7 +314,7 @@ $btn-transition:
312
314
  // Forms
313
315
  // According to figma it should be 2px + line-height: 16px
314
316
  // As overriding line-height is not planned by bootstrap, we use 4px + line-height of 14px
315
- $form-text-margin-top: map.get(spacers.$spacers, 2);
317
+ $form-text-margin-top: map.get(spacers.$spacers-block, 2);
316
318
  $form-text-font-size: $small-font-size !default;
317
319
  $form-text-font-style: null !default;
318
320
  $form-text-font-weight: null !default;
@@ -324,14 +326,16 @@ $form-label-font-style: null !default;
324
326
  $form-label-font-weight: null !default;
325
327
  $form-label-color: system-tokens.$si-sys-text-secondary !default;
326
328
 
327
- $input-padding-y: (map.get(spacers.$spacers, 4) - 1px); // 8px including 1px border
328
- $input-padding-x: (map.get(spacers.$spacers, 4) - 1px); // 8px including 1px border
329
+ $input-padding-y-full: map.get(spacers.$spacers-block, 4);
330
+ $input-padding-y: calc(map.get(spacers.$spacers-block, 4) - 1px); // 8px including 1px border
331
+ $input-padding-x-full: map.get(spacers.$spacers-inline, 4);
332
+ $input-padding-x: calc(map.get(spacers.$spacers-inline, 4) - 1px); // 8px including 1px border
329
333
  $input-font-family: null !default;
330
334
  $input-font-size: $font-size-base;
331
335
  $input-font-weight: $font-weight-base;
332
336
  // Use an explicit rem value instead of a unitless ratio to prevent cross-browser
333
337
  // rounding differences (Safari rounds 14 × 1.1428... to 15px, Chrome to 16px). See #2031
334
- $input-line-height: typography.$si-line-height-body-rem !default;
338
+ $input-line-height: calc(typography.$si-font-size-body * typography.$si-line-height-body);
335
339
 
336
340
  $input-bg: system-tokens.$si-sys-background-1 !default;
337
341
  $input-disabled-bg: system-tokens.$si-sys-background-1 !default;
@@ -355,10 +359,10 @@ $input-plaintext-color: $body-color !default;
355
359
 
356
360
  $input-height-border: $input-border-width * 2 !default;
357
361
 
358
- $input-height: functions.add(1lh, ($input-padding-y + $input-border-width) * 2) !default;
362
+ $input-height: calc(1lh + ($input-padding-y-full * 2));
359
363
 
360
364
  // don't derive from $input-height as it generates a nested calc() expression
361
- $input-height-inner: functions.add($input-line-height, $input-padding-y * 2) !default;
365
+ $input-height-inner: calc($input-line-height + ($input-padding-y-full - 1px) * 2) !default;
362
366
  // Wrap in parenthesis: `*` binds tighter than `-`, so without them only the border term gets multiplied.
363
367
  // DEPRECATED: Calculate it yourself using $input-height-inner
364
368
  $input-height-inner-half: calc((#{$input-height-inner}) * 0.5) !default;
@@ -418,7 +422,7 @@ $form-validation-states: (
418
422
  // Navs
419
423
 
420
424
  $nav-link-padding-y: 10px;
421
- $nav-link-padding-x: map.get(spacers.$spacers, 8);
425
+ $nav-link-padding-x: map.get(spacers.$spacers-inline, 8);
422
426
  $nav-link-font-size: typography.$si-font-size-h4;
423
427
  $nav-link-font-weight: typography.$si-font-weight-h4;
424
428
  $nav-link-line-height: typography.$si-line-height-h4;
@@ -438,8 +442,8 @@ $nav-tabs-link-active-bg: transparent !default;
438
442
  $badge-font-size: typography.$si-font-size-body;
439
443
  $badge-font-weight: typography.$si-font-weight-body;
440
444
  $badge-color: system-tokens.$si-sys-text-inverse !default;
441
- $badge-padding-y: map.get(spacers.$spacers, 1);
442
- $badge-padding-x: map.get(spacers.$spacers, 4);
445
+ $badge-padding-y: map.get(spacers.$spacers-block, 1);
446
+ $badge-padding-x: map.get(spacers.$spacers-inline, 4);
443
447
  $badge-border-radius: 0.75rem;
444
448
  $badge-dot-size: 0.625rem;
445
449
  $badge-line-height: 1.25rem;
@@ -450,7 +454,7 @@ $badge-height: calc($badge-line-height + 2 * $badge-padding-y);
450
454
  // Dropdown menu container and contents.
451
455
  $dropdown-min-width: 10rem !default;
452
456
  $dropdown-padding-x: 0 !default;
453
- $dropdown-padding-y: map.get(spacers.$spacers, 4) !default;
457
+ $dropdown-padding-y: map.get(spacers.$spacers-block, 4) !default;
454
458
  $dropdown-spacer: 0.125rem !default;
455
459
  $dropdown-font-size: $font-size-base !default;
456
460
  // this is to have room for icon and badges
@@ -463,25 +467,25 @@ $dropdown-divider-margin-y: 4px !default;
463
467
  $dropdown-box-shadow: elevation.$element-elevation-2 !default;
464
468
  $dropdown-link-color: system-tokens.$si-sys-text-primary !default;
465
469
  $dropdown-link-disabled-color: system-tokens.$si-sys-text-disabled !default;
466
- $dropdown-item-padding-y: map.get(spacers.$spacers, 2);
467
- $dropdown-item-padding-x: map.get(spacers.$spacers, 5);
470
+ $dropdown-item-padding-y: map.get(spacers.$spacers-block, 2);
471
+ $dropdown-item-padding-x: map.get(spacers.$spacers-inline, 5);
468
472
  $dropdown-header-color: system-tokens.$si-sys-text-primary !default;
469
473
 
470
474
  // Cards
471
475
 
472
- $card-spacer-y: map.get(spacers.$spacers, 6) !default;
473
- $card-spacer-x: map.get(spacers.$spacers, 6) !default;
474
- $card-title-spacer-y: map.get(spacers.$spacers, 5) !default;
476
+ $card-spacer-y: map.get(spacers.$spacers-block, 6) !default;
477
+ $card-spacer-x: map.get(spacers.$spacers-inline, 6) !default;
478
+ $card-title-spacer-y: map.get(spacers.$spacers-block, 5) !default;
475
479
  $card-border-radius: $border-radius !default;
476
480
  $card-inner-border-radius: $card-border-radius;
477
- $card-cap-padding-y: map.get(spacers.$spacers, 5) !default;
481
+ $card-cap-padding-y: map.get(spacers.$spacers-block, 5) !default;
478
482
  $card-cap-padding-x: $card-spacer-x !default;
479
483
  $card-cap-bg: system-tokens.$si-sys-background-1 !default;
480
484
  $card-cap-color: null !default;
481
485
  $card-height: null !default;
482
486
  $card-color: null !default;
483
487
  $card-bg: system-tokens.$si-sys-background-1 !default;
484
- $card-img-overlay-padding: spacers.$spacer !default;
488
+ $card-img-overlay-padding: map.get(spacers.$spacers-block, 6) map.get(spacers.$spacers-inline, 6) !default;
485
489
  $card-group-margin: $grid-gutter-width !default;
486
490
 
487
491
  // Tooltips
@@ -492,8 +496,8 @@ $tooltip-color: system-tokens.$si-sys-text-inverse !default;
492
496
  $tooltip-bg: system-tokens.$si-sys-background-inverse !default;
493
497
  $tooltip-border-radius: semantic-tokens.$element-radius-2 !default;
494
498
  $tooltip-opacity: 0.9 !default;
495
- $tooltip-padding-y: map.get(spacers.$spacers, 4) !default;
496
- $tooltip-padding-x: map.get(spacers.$spacers, 6) !default;
499
+ $tooltip-padding-y: map.get(spacers.$spacers-block, 4) !default;
500
+ $tooltip-padding-x: map.get(spacers.$spacers-inline, 6) !default;
497
501
  $tooltip-margin: 0 !default;
498
502
 
499
503
  $tooltip-arrow-width: 12px !default;
@@ -516,8 +520,8 @@ $popover-box-shadow: $box-shadow !default;
516
520
 
517
521
  $popover-header-bg: system-tokens.$si-sys-background-3 !default;
518
522
  $popover-header-color: system-tokens.$si-sys-text-accent;
519
- $popover-header-padding-y: map.get(spacers.$spacers, 5) !default;
520
- $popover-header-padding-x: map.get(spacers.$spacers, 5) !default;
523
+ $popover-header-padding-y: map.get(spacers.$spacers-block, 5) !default;
524
+ $popover-header-padding-x: map.get(spacers.$spacers-inline, 5) !default;
521
525
 
522
526
  $popover-body-color: system-tokens.$si-sys-text-primary !default;
523
527
  $popover-body-padding-y: $popover-header-padding-y !default;
@@ -532,13 +536,13 @@ $popover-arrow-outer-color: $popover-border-color !default;
532
536
  // Modals
533
537
 
534
538
  // Padding applied to the modal body
535
- $modal-inner-padding: map.get(spacers.$spacers, 8);
539
+ $modal-inner-padding: map.get(spacers.$spacers-block, 8);
536
540
 
537
541
  // Margin between elements in footer, must be lower than or equal to 2 * $modal-inner-padding
538
- $modal-footer-margin-between: map.get(spacers.$spacers, 6);
542
+ $modal-footer-margin-between: map.get(spacers.$spacers-block, 6);
539
543
 
540
- $modal-dialog-margin: map.get(spacers.$spacers, 4);
541
- $modal-dialog-margin-y-sm-up: map.get(spacers.$spacers, 9);
544
+ $modal-dialog-margin: map.get(spacers.$spacers-block, 4);
545
+ $modal-dialog-margin-y-sm-up: map.get(spacers.$spacers-block, 9);
542
546
 
543
547
  $modal-title-line-height: typography.$si-line-height-h4 !default;
544
548
 
@@ -559,8 +563,8 @@ $modal-header-border-color: $border-color !default;
559
563
  $modal-footer-border-color: $modal-header-border-color !default;
560
564
  $modal-header-border-width: 0 !default;
561
565
  $modal-footer-border-width: 0 !default;
562
- $modal-header-padding-y: map.get(spacers.$spacers, 5);
563
- $modal-header-padding-x: map.get(spacers.$spacers, 8);
566
+ $modal-header-padding-y: map.get(spacers.$spacers-block, 5);
567
+ $modal-header-padding-x: map.get(spacers.$spacers-inline, 8);
564
568
 
565
569
  $modal-sm: 300px !default;
566
570
  $modal-md: 500px !default;
@@ -577,17 +581,19 @@ $modal-scale-transform: scale(1.02) !default;
577
581
  // Define alert colors, border radius, and padding.
578
582
 
579
583
  $alert-padding-y: 10px !default;
580
- $alert-padding-x: map.get(spacers.$spacers, 5) !default;
584
+ $alert-padding-x: map.get(spacers.$spacers-inline, 5) !default;
581
585
  $alert-margin-bottom: 0 !default;
582
586
  $alert-border-radius: 0 !default;
583
587
  $alert-link-font-weight: $font-weight-bold !default;
584
588
  $alert-border-width: 0 !default;
585
- $alert-dismissible-padding-r: $alert-padding-x * 3 !default; // 3x covers width of x plus default padding on either side
589
+ $alert-dismissible-padding-r: calc(
590
+ $alert-padding-x * 3
591
+ ) !default; // 3x covers width of x plus default padding on either side
586
592
 
587
593
  // Progress bars
588
594
 
589
595
  $progress-height: 0.5rem !default;
590
- $progress-font-size: $font-size-base * 0.75 !default;
596
+ $progress-font-size: calc(#{$font-size-base} * 0.75) !default;
591
597
  $progress-bg: system-tokens.$si-sys-border-4 !default;
592
598
  $progress-border-radius: $progress-height * 0.5 !default;
593
599
  $progress-box-shadow: none !default;
@@ -604,8 +610,8 @@ $list-group-border-color: $border-color !default;
604
610
  $list-group-border-width: $border-width !default;
605
611
  $list-group-border-radius: $border-radius !default;
606
612
 
607
- $list-group-item-padding-y: map.get(spacers.$spacers, 4) !default;
608
- $list-group-item-padding-x: map.get(spacers.$spacers, 6) !default; // 1.25rem !default;
613
+ $list-group-item-padding-y: map.get(spacers.$spacers-block, 4) !default;
614
+ $list-group-item-padding-x: map.get(spacers.$spacers-inline, 6) !default; // 1.25rem !default;
609
615
 
610
616
  $list-group-hover-bg: system-tokens.$si-sys-background-hover !default;
611
617
  $list-group-active-color: $body-color !default;
@@ -640,7 +646,7 @@ $figure-caption-color: system-tokens.$si-sys-text-secondary !default;
640
646
  $breadcrumb-font-size: null !default;
641
647
  $breadcrumb-padding-y: 0;
642
648
  $breadcrumb-padding-x: 0;
643
- $breadcrumb-item-padding-x: map.get(spacers.$spacers, 5);
649
+ $breadcrumb-item-padding-x: map.get(spacers.$spacers-inline, 5);
644
650
  $breadcrumb-margin-bottom: 0;
645
651
  $breadcrumb-bg: inherit !default;
646
652
  $breadcrumb-divider-color: system-tokens.$si-sys-text-secondary !default;
@@ -655,8 +661,8 @@ $code-font-size: typography.$si-font-size-body !default;
655
661
  $code-line-height: typography.$si-line-height-body !default;
656
662
  $code-color: system-tokens.$si-sys-text-primary !default;
657
663
  $code-background: system-tokens.$si-sys-background-selected !default;
658
- $code-padding-y: map.get(spacers.$spacers, 1) !default;
659
- $code-padding-x: map.get(spacers.$spacers, 2) !default;
664
+ $code-padding-y: map.get(spacers.$spacers-block, 1) !default;
665
+ $code-padding-x: map.get(spacers.$spacers-inline, 2) !default;
660
666
  $code-border-radius: semantic-tokens.$element-radius-1 !default;
661
667
 
662
668
  $kbd-padding-y: 0.2rem !default;
@@ -667,8 +673,8 @@ $kbd-bg: system-tokens.$si-sys-background-3 !default;
667
673
  $kbd-font-size: $code-font-size !default;
668
674
 
669
675
  $pre-color: system-tokens.$si-sys-text-primary !default;
670
- $pre-padding-y: map.get(spacers.$spacers, 4) !default;
671
- $pre-padding-x: map.get(spacers.$spacers, 4) !default;
676
+ $pre-padding-y: map.get(spacers.$spacers-block, 4) !default;
677
+ $pre-padding-x: map.get(spacers.$spacers-inline, 4) !default;
672
678
  $pre-border-color: system-tokens.$si-sys-border-4 !default;
673
679
  $pre-border-width: $border-width !default;
674
680
  $pre-border-radius: semantic-tokens.$element-radius-1 !default;
@@ -9,13 +9,13 @@
9
9
  // there's too many differences between what BS5 does and what the design system expects
10
10
  @use 'sass:map';
11
11
 
12
- $form-check-size: 1rem;
13
- $form-radio-size: 1rem;
14
- $form-radio-inner-size: 0.375rem;
12
+ $form-check-size: max(1rem, 16px); // FIXME: ref value
13
+ $form-radio-size: max(1rem, 16px); // FIXME: ref value
14
+ $form-radio-inner-size: max(0.375rem, 6px); // FIXME: ref value
15
15
  $form-radio-offset: calc((#{$form-radio-size} - #{$form-radio-inner-size}) * 0.5 - 1px);
16
- $form-check-padding-x: map.get(spacers.$spacers, 2);
16
+ $form-check-padding-x: map.get(spacers.$spacers-inline, 2);
17
17
 
18
- $form-check-label-start: calc($form-check-size + map.get(spacers.$spacers, 4));
18
+ $form-check-label-start: calc($form-check-size + map.get(spacers.$spacers-inline, 4));
19
19
 
20
20
  %form-check-spacing {
21
21
  .form-check-input {
@@ -24,9 +24,9 @@ $form-check-label-start: calc($form-check-size + map.get(spacers.$spacers, 4));
24
24
  }
25
25
 
26
26
  .form-check {
27
- padding-block: map.get(spacers.$spacers, 1);
28
- padding-inline-start: calc($form-check-size + map.get(spacers.$spacers, 4));
29
- margin-block-end: map.get(spacers.$spacers, 2);
27
+ padding-block: map.get(spacers.$spacers-block, 1);
28
+ padding-inline-start: calc($form-check-size + map.get(spacers.$spacers-inline, 4));
29
+ margin-block-end: map.get(spacers.$spacers-block, 2);
30
30
 
31
31
  @extend %form-check-spacing;
32
32
 
@@ -109,11 +109,11 @@ $form-check-label-start: calc($form-check-size + map.get(spacers.$spacers, 4));
109
109
  &:indeterminate {
110
110
  &::after {
111
111
  mask-image: none;
112
- inline-size: 0.625rem;
113
- block-size: 0.125rem;
112
+ inline-size: calc($form-check-size * 0.625);
113
+ block-size: calc($form-check-size * 0.125);
114
114
  opacity: 1;
115
- inset-inline-start: 0.125rem;
116
- inset-block-start: 0.375rem;
115
+ inset-inline-start: calc($form-check-size * 0.125);
116
+ inset-block-start: calc($form-check-size * 0.375);
117
117
  }
118
118
  }
119
119
  }
@@ -1,6 +1,7 @@
1
1
  @use '../../variables/focus';
2
2
  @use '../../variables/system-tokens';
3
3
  @use '../../variables/spacers';
4
+ @use '../../variables/sizing';
4
5
  @use '../../variables/utilities';
5
6
  @use '../../variables/si-vars';
6
7
  @use '../variables';
@@ -16,7 +17,7 @@
16
17
  // + 3px (min padding between input and first action or validation icon)
17
18
  --si-input-padding-inline-end: calc(
18
19
  var(--si-feedback-icon-size, 0px) + var(--si-action-icon-offset, 0px) +
19
- #{map.get(spacers.$spacers, 2) - variables.$input-border-width}
20
+ #{map.get(spacers.$spacers-block, 2)} - #{variables.$input-border-width}
20
21
  );
21
22
  display: block;
22
23
  inline-size: 100%;
@@ -40,14 +41,15 @@
40
41
  calc((#{variables.$input-height-inner} - #{variables.$form-feedback-icon-size}) * 0.5);
41
42
  background-position-x: right
42
43
  calc(
43
- #{map.get(spacers.$spacers, 2) - variables.$input-border-width} +
44
+ map.get(spacers.$spacers-block, 2) - variables.$input-border-width +
44
45
  var(--si-action-icon-offset, 0px)
45
46
  );
46
47
 
47
48
  @include utilities.rtl {
48
49
  background-position-x: left
49
50
  calc(
50
- map.get(spacers.$spacers, 1) + var(--si-action-icon-offset, variables.$input-border-width)
51
+ map.get(spacers.$spacers-block, 1) +
52
+ var(--si-action-icon-offset, variables.$input-border-width)
51
53
  );
52
54
  }
53
55
 
@@ -61,7 +63,9 @@
61
63
  // form-control must not add extra `padding-inline-end` for it.
62
64
  &:has(.form-control-actions) {
63
65
  background-image: none;
64
- --si-input-padding-inline-end: #{map.get(spacers.$spacers, 2) - variables.$input-border-width};
66
+ --si-input-padding-inline-end: calc(
67
+ #{map.get(spacers.$spacers-block, 2)} - #{variables.$input-border-width}
68
+ );
65
69
  }
66
70
 
67
71
  &:autofill {
@@ -117,10 +121,11 @@
117
121
  .form-control:not(textarea):not(select[multiple]) {
118
122
  // force height to fix line-height issue in firefox
119
123
  block-size: variables.$input-height;
124
+ min-block-size: map.get(sizing.$sizing, 80);
120
125
  }
121
126
 
122
127
  .addon-second-icon {
123
- --input-addon-inset-end: #{map.get(spacers.$spacers, 9)};
128
+ --input-addon-inset-end: #{map.get(spacers.$spacers-block, 9)};
124
129
  }
125
130
 
126
131
  // Wrapper for trailing actions (buttons, icons, unit labels) inside
@@ -135,7 +140,7 @@
135
140
  display: inline-flex;
136
141
  align-items: center;
137
142
  block-size: variables.$input-height-inner;
138
- padding-inline-start: map.get(spacers.$spacers, 1);
143
+ padding-inline-start: map.get(spacers.$spacers-inline, 1);
139
144
  }
140
145
 
141
146
  .form-control .form-control-actions::before {
@@ -143,13 +148,13 @@
143
148
  margin-block: auto;
144
149
  inline-size: variables.$form-feedback-icon-size;
145
150
  block-size: variables.$form-feedback-icon-size;
146
- padding-inline-end: map.get(spacers.$spacers, 1);
151
+ padding-inline-end: map.get(spacers.$spacers-inline, 1);
147
152
  content: var(--si-feedback-icon, none);
148
153
  }
149
154
 
150
155
  .form-control + .form-control-actions {
151
156
  position: absolute;
152
- inset-inline-end: map.get(spacers.$spacers, 2);
157
+ inset-inline-end: map.get(spacers.$spacers-inline, 2);
153
158
  inset-block-start: variables.$input-border-width;
154
159
  z-index: 2;
155
160
  }
@@ -187,15 +192,16 @@ select:is(.form-control, .form-select):not([multiple]) {
187
192
  // + spacer-1(between arrow and validation)
188
193
  right
189
194
  calc(
190
- #{map.get(spacers.$spacers, 2) - variables.$input-border-width +
191
- map.get(spacers.$spacers, 1)} + #{si-vars.$si-icon-font-size}
195
+ map.get(spacers.$spacers-block, 2) - variables.$input-border-width +
196
+ map.get(spacers.$spacers-block, 1) + si-vars.$si-icon-font-size
192
197
  )
193
198
  center,
194
- right map.get(spacers.$spacers, 2) - variables.$input-border-width top 50%;
199
+ right calc(map.get(spacers.$spacers-block, 2) - variables.$input-border-width) top 50%;
195
200
  background-size: si-vars.$si-icon-font-size, variables.$form-feedback-icon-size;
196
201
 
197
202
  @include utilities.rtl {
198
- background-position: left map.get(spacers.$spacers, 2) - variables.$input-border-width top 50%;
203
+ background-position: left
204
+ calc(map.get(spacers.$spacers-inline, 2) - variables.$input-border-width) top 50%;
199
205
  }
200
206
 
201
207
  .app--dark & {
@@ -211,7 +217,7 @@ select:is(.form-control, .form-select)[multiple] {
211
217
  padding: 0;
212
218
 
213
219
  option {
214
- padding: map.get(spacers.$spacers, 4);
220
+ padding: map.get(spacers.$spacers-block, 4) map.get(spacers.$spacers-inline, 4);
215
221
  }
216
222
 
217
223
  option:checked,
@@ -16,8 +16,8 @@
16
16
  border-color: inherit;
17
17
  border-block-width: 0;
18
18
  border-inline-width: 0 1px;
19
- margin-block: -(variables.$input-padding-y);
20
- margin-inline: -(variables.$input-padding-x) variables.$input-padding-x;
19
+ margin-block: calc(variables.$input-padding-y * -1);
20
+ margin-inline: calc(variables.$input-padding-x * -1) variables.$input-padding-x;
21
21
  block-size: inherit;
22
22
  padding-inline: variables.$btn-padding-x;
23
23
  }
@@ -14,7 +14,7 @@
14
14
 
15
15
  .form-label {
16
16
  display: inline-block;
17
- padding-block: map.get(spacers.$spacers, 2);
17
+ padding-block: map.get(spacers.$spacers-block, 2);
18
18
 
19
19
  .text-end & {
20
20
  padding-inline-end: variables.$input-padding-x;
@@ -6,7 +6,7 @@
6
6
  .si-form-input {
7
7
  display: flex;
8
8
  flex-direction: column;
9
- margin-block-end: map.get(spacers.$spacers, 6);
9
+ margin-block-end: map.get(spacers.$spacers-block, 6);
10
10
 
11
11
  .form-item-content {
12
12
  flex-grow: 1;
@@ -15,7 +15,7 @@
15
15
 
16
16
  .si-form-fieldset {
17
17
  .form-label {
18
- margin-block-end: map.get(spacers.$spacers, 2);
18
+ margin-block-end: map.get(spacers.$spacers-block, 2);
19
19
  }
20
20
 
21
21
  .form-check:not(.form-check-inline) {
@@ -63,8 +63,8 @@
63
63
  display: none;
64
64
  inline-size: 100%;
65
65
  line-height: typography.$si-line-height-caption;
66
- margin-block: map.get(spacers.$spacers, 1);
67
- margin-inline: map.get(spacers.$spacers, 1);
66
+ margin-block: map.get(spacers.$spacers-block, 1);
67
+ margin-inline: map.get(spacers.$spacers-inline, 1);
68
68
  }
69
69
 
70
70
  @mixin form-validation-state-enh($state, $color, $icon, $text-color) {
@@ -10,8 +10,8 @@
10
10
  font-size: typography.$si-font-size-caption;
11
11
  line-height: 0.875rem;
12
12
  padding-block: 0;
13
- padding-inline: map.get(spacers.$spacers, 2);
13
+ padding-inline: map.get(spacers.$spacers-inline, 2);
14
14
  font-family: variables.$font-family-sans-serif;
15
- font-weight: typography.$si-font-weight-semibold;
15
+ font-weight: typography.$si-font-weight-sbold;
16
16
  text-align: center;
17
17
  }
@@ -12,13 +12,13 @@ $form-col-layout-label-width: 16ch !default;
12
12
  display: flex;
13
13
  flex-direction: row;
14
14
  align-items: start;
15
- column-gap: map.get(spacers.$spacers, 6);
15
+ column-gap: map.get(spacers.$spacers-inline, 6);
16
16
 
17
17
  > .form-label {
18
18
  flex: 0 0 var(--si-form-label-width, #{$form-col-layout-label-width});
19
19
  max-inline-size: var(--si-form-label-width, #{$form-col-layout-label-width});
20
20
  align-self: start;
21
- padding-block: variables.$input-padding-y + variables.$input-border-width;
21
+ padding-block: variables.$input-padding-y-full;
22
22
  line-height: variables.$input-line-height;
23
23
 
24
24
  &:empty {
@@ -37,7 +37,7 @@ $form-col-layout-label-width: 16ch !default;
37
37
 
38
38
  .form-check-input {
39
39
  margin-inline-start: 0;
40
- margin-inline-end: map.get(spacers.$spacers, 4);
40
+ margin-inline-end: map.get(spacers.$spacers-inline, 4);
41
41
  }
42
42
  }
43
43
 
@@ -46,7 +46,7 @@ $form-col-layout-label-width: 16ch !default;
46
46
 
47
47
  > .form-label {
48
48
  align-self: start;
49
- padding-block: map.get(spacers.$spacers, 1) 0 !important; // stylelint-disable-line declaration-no-important
49
+ padding-block: map.get(spacers.$spacers-block, 1) 0 !important; // stylelint-disable-line declaration-no-important
50
50
  margin-block-end: 0 !important; // stylelint-disable-line declaration-no-important
51
51
  }
52
52
  }
@@ -133,15 +133,15 @@
133
133
  // Gutters
134
134
  //
135
135
  // Make use of `.g-*`, `.gx-*` or `.gy-*` utilities to change spacing between the columns.
136
- @each $key, $value in variables.$gutters {
136
+ @each $key, $block-value in variables.$gutters-block {
137
137
  .g#{$infix}-#{$key},
138
138
  .gx#{$infix}-#{$key} {
139
- --#{variables.$variable-prefix}gutter-x: #{$value};
139
+ --#{variables.$variable-prefix}gutter-x: #{map.get(variables.$gutters-inline, $key)};
140
140
  }
141
141
 
142
142
  .g#{$infix}-#{$key},
143
143
  .gy#{$infix}-#{$key} {
144
- --#{variables.$variable-prefix}gutter-y: #{$value};
144
+ --#{variables.$variable-prefix}gutter-y: #{$block-value};
145
145
  }
146
146
  }
147
147
  }
@@ -17,6 +17,7 @@
17
17
 
18
18
  @each $key, $value in $values {
19
19
  $properties: map.get($utility, property);
20
+ $property-values: map.get($utility, property-values);
20
21
 
21
22
  // Multiple properties are possible, for example with vertical or horizontal margins or paddings
22
23
  @if meta.type-of($properties) == 'string' {
@@ -45,7 +46,9 @@
45
46
  // Don't prefix if value key is null (eg. with shadow class)
46
47
  $property-class-modifier: '';
47
48
  @if ($key) {
48
- @if ($property-class == '' and $infix == '') {
49
+ @if map.get($utility, negative) {
50
+ $property-class-modifier: '-n' + $key;
51
+ } @else if ($property-class == '' and $infix == '') {
49
52
  $property-class-modifier: $key;
50
53
  } @else {
51
54
  $property-class-modifier: '-' + $key;
@@ -79,14 +82,22 @@
79
82
  --#{variables.$variable-prefix}#{$local-var}: #{$value};
80
83
  }
81
84
  }
82
- #{$property}: $value $important;
85
+ @if $property-values {
86
+ #{$property}: map.get(map.get($property-values, $property), $key) $important;
87
+ } @else {
88
+ #{$property}: $value $important;
89
+ }
83
90
  }
84
91
  }
85
92
 
86
93
  @each $pseudo in $state {
87
94
  .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {
88
95
  @each $property in $properties {
89
- #{$property}: $value $important;
96
+ @if $property-values {
97
+ #{$property}: map.get(map.get($property-values, $property), $key) $important;
98
+ } @else {
99
+ #{$property}: $value $important;
100
+ }
90
101
  }
91
102
  }
92
103
  }