@webority/theme 0.174.1 → 0.176.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webority/theme",
3
- "version": "0.174.1",
3
+ "version": "0.176.0",
4
4
  "description": "Webority shared design system: Bootstrap 5.3 SCSS overrides, --wui-* tokens, and shared component CSS. The single source of brand chrome for React portals and Razor sites.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "publishConfig": {
@@ -80,8 +80,8 @@
80
80
  "devDependencies": {
81
81
  "@popperjs/core": "2.11.8",
82
82
  "@types/node": "25.6.0",
83
- "@webority/biome-config": "0.174.1",
84
- "@webority/tokens": "0.174.1",
83
+ "@webority/biome-config": "0.176.0",
84
+ "@webority/tokens": "0.176.0",
85
85
  "bootstrap": "5.3.9",
86
86
  "country-flag-icons": "^1.6.20",
87
87
  "sass-embedded": "^1.108.0",
@@ -1,4 +1,4 @@
1
- // Generated by @webority/tokens 0.174.1 from its token source. Do not edit; run webority brand --library.
1
+ // Generated by @webority/tokens 0.176.0 from its token source. Do not edit; run webority brand --library.
2
2
  $body-color: #252f4a !default;
3
3
  $body-secondary-color: #4b5675 !default;
4
4
  $body-tertiary-color: #626a82 !default;
@@ -453,6 +453,8 @@
453
453
  .btn-icon
454
454
  ) {
455
455
  min-height: var(--wui-touch-target);
456
+ // The pinned icon's inset reads the grown height, so its well keeps an even gap on touch screens.
457
+ --wui-btn-touch-height: var(--wui-touch-target);
456
458
  }
457
459
 
458
460
  :is(.btn-link-primary, .btn-link-success, .btn-link-warning, .btn-link-danger, .btn-link-info, .btn-link-neutral):not(.btn-icon) {
@@ -620,35 +622,34 @@
620
622
  .btn-anim-roll {
621
623
  --wui-btn-roll-ease: cubic-bezier(0.32, 0.72, 0, 1);
622
624
  }
623
- // The icon well and the pinned icon's end inset scale with the button size, so the well keeps
624
- // the same share of the button's height and an even gap above, below and beside it.
625
+ // The icon well scales with the button size, so it keeps the same share of the button's height.
626
+ // The pinned icon's end inset is the gap above and below the well, (height - well) / 2, less the end
627
+ // border it sits inside, so the well is as far from the end edge as from the top and bottom.
625
628
  :is(.btn-anim-roll, .wui-btn-pin-end) {
626
629
  --wui-btn-roll-well: 28px;
627
- --wui-btn-pin-inset: 8px;
630
+ --wui-btn-pin-inset: calc(
631
+ (max(var(--wui-btn-height), var(--wui-btn-touch-height, 0px)) - var(--wui-btn-roll-well)) / 2 - var(--bs-btn-border-width)
632
+ );
628
633
  // How far the arrow sits inside its well: (well - icon) / 2, with the 16, 14 and 20px icons.
629
634
  --wui-btn-well-pad: 6px;
630
635
  }
631
636
  :is(.btn-anim-roll, .wui-btn-pin-end).btn-sm,
632
637
  .btn-group-sm > .btn:is(.btn-anim-roll, .wui-btn-pin-end) {
633
638
  --wui-btn-roll-well: 22px;
634
- --wui-btn-pin-inset: 6px;
635
639
  --wui-btn-well-pad: 4px;
636
640
  }
637
641
  :is(.btn-anim-roll, .wui-btn-pin-end).btn-lg,
638
642
  .btn-group-lg > .btn:is(.btn-anim-roll, .wui-btn-pin-end) {
639
643
  --wui-btn-roll-well: 34px;
640
- --wui-btn-pin-inset: 10px;
641
644
  --wui-btn-well-pad: 7px;
642
645
  }
643
646
  :is(.btn-anim-roll, .wui-btn-pin-end).btn-xl {
644
647
  --wui-btn-roll-well: 34px;
645
- --wui-btn-pin-inset: 10px;
646
648
  --wui-btn-well-pad: 7px;
647
649
  }
648
650
  @media (max-width: 991.98px) {
649
651
  :is(.btn-anim-roll, .wui-btn-pin-end).btn-xl {
650
652
  --wui-btn-roll-well: 28px;
651
- --wui-btn-pin-inset: 8px;
652
653
  --wui-btn-well-pad: 6px;
653
654
  }
654
655
  }
@@ -1,4 +1,4 @@
1
- // Generated by @webority/tokens 0.174.1 from its token source. Do not edit; run webority brand --library.
1
+ // Generated by @webority/tokens 0.176.0 from its token source. Do not edit; run webority brand --library.
2
2
 
3
3
  @media (prefers-contrast: more) {
4
4
  :root,
@@ -1,4 +1,4 @@
1
- // Generated by @webority/tokens 0.174.1 from its token source. Do not edit; run webority brand --library.
1
+ // Generated by @webority/tokens 0.176.0 from its token source. Do not edit; run webority brand --library.
2
2
 
3
3
  :root {
4
4
  --wui-primary: #4F46E5;
@@ -198,7 +198,6 @@ dialog.wui-drawer-panel[data-wui-closing]::backdrop {
198
198
  transform: translateY(100%);
199
199
  }
200
200
  .wui-drawer-panel[open]:not([data-wui-closing]) {
201
- transform: translateY(calc((var(--wui-drawer-max, 90) - var(--wui-drawer-snap, 50)) * 1vh + var(--wui-drawer-drag, 0px)));
202
201
  transform: translateY(calc((var(--wui-drawer-max, 90) - var(--wui-drawer-snap, 50)) * 1dvh + var(--wui-drawer-drag, 0px)));
203
202
  }
204
203
  // The part of the sheet below the screen edge still scrolls into view.
@@ -97,16 +97,22 @@
97
97
  padding-inline: var(--wui-space-lg);
98
98
  font-size: var(--wui-fs-lg);
99
99
  }
100
+ // The button height token follows the field token too, because the general button rule's min-height reads it
101
+ // and outranks this selector, so a host that shrinks only the field token would leave the button taller.
100
102
  .wui-addon-group > .btn {
103
+ --wui-button-md-height: var(--wui-control-md);
101
104
  height: var(--wui-control-md);
102
105
  }
103
106
  .wui-addon-group-sm > .btn {
107
+ --wui-button-md-height: var(--wui-control-sm);
104
108
  height: var(--wui-control-sm);
105
109
  }
106
110
  .wui-addon-group-lg > .btn {
111
+ --wui-button-md-height: var(--wui-control-lg);
107
112
  height: var(--wui-control-lg);
108
113
  }
109
114
  .wui-addon-group-xl > .btn {
115
+ --wui-button-md-height: var(--wui-control-xl);
110
116
  height: var(--wui-control-xl);
111
117
  }
112
118
 
@@ -396,6 +396,7 @@
396
396
  .attach-figure img {
397
397
  display: block;
398
398
  width: 100%;
399
+ height: auto;
399
400
  max-height: 260px;
400
401
  object-fit: contain;
401
402
  }
@@ -427,8 +427,7 @@ dialog.wui-modal-shell[open] {
427
427
  // Fullscreen size: the card is the whole viewport. Both surfaces put `wui-modal-fullscreen` on the
428
428
  // `.modal` shell (Razor's size="fullscreen", React's size="fullscreen"); neither sets a max-width.
429
429
  // Header and footer are flex: none, so they stay pinned while the body scrolls between them, and
430
- // they pad past a notch or home indicator. `100dvh` follows the phone's collapsing toolbar; `100vh`
431
- // is the fallback for a browser without dynamic viewport units.
430
+ // they pad past a notch or home indicator. `100dvh` follows the phone's collapsing toolbar.
432
431
  // 100vw, not the shell's 100%: the document reserves a stable scrollbar gutter, which a fixed box's
433
432
  // 100% leaves uncovered, so a fullscreen card would stop short of the right edge.
434
433
  .modal.wui-modal-shell.wui-modal-fullscreen {
@@ -443,7 +442,6 @@ dialog.wui-modal-shell[open] {
443
442
  .wui-modal-fullscreen .wui-modal {
444
443
  width: 100vw;
445
444
  max-width: none;
446
- height: 100vh;
447
445
  height: 100dvh;
448
446
  max-height: none;
449
447
  border-radius: 0;
@@ -34,6 +34,7 @@
34
34
  // preset or a custom pixel value resolves to `--wui-splash-size` (set inline by App*/<app-*>).
35
35
  .splash-logo {
36
36
  max-width: calc(var(--wui-splash-size, 56px) * 3.2);
37
+ width: auto;
37
38
  height: auto;
38
39
  // A slow breath keeps the brand mark feeling alive through the wait.
39
40
  animation: wui-splash-breathe calc(var(--wui-duration-slow) * 7) var(--wui-ease-in-out) infinite;
@@ -0,0 +1,6 @@
1
+ @use "sass:color";
2
+
3
+ // Bootstrap's to-rgb() under a module namespace: Biome's CSS lint reads a bare Sass function call as an unknown CSS function.
4
+ @function rgb($value) {
5
+ @return color.channel($value, "red", $space: rgb), color.channel($value, "green", $space: rgb), color.channel($value, "blue", $space: rgb);
6
+ }
@@ -1,5 +1,6 @@
1
1
  // Plain rules only: wui/_print.scss wraps this file in its media query.
2
2
  @use "../../config" as *;
3
+ @use "channels";
3
4
 
4
5
  // Bootstrap's dark block and the dark-only rules below are not scoped to screen, so each
5
6
  // declaration restates the light value and carries !important to win on a dark page.
@@ -7,22 +8,22 @@
7
8
  color-scheme: light !important;
8
9
 
9
10
  --#{$prefix}body-color: #{$body-color} !important;
10
- --#{$prefix}body-color-rgb: #{to-rgb($body-color)} !important;
11
+ --#{$prefix}body-color-rgb: #{channels.rgb($body-color)} !important;
11
12
  --#{$prefix}body-bg: #{$body-bg} !important;
12
- --#{$prefix}body-bg-rgb: #{to-rgb($body-bg)} !important;
13
+ --#{$prefix}body-bg-rgb: #{channels.rgb($body-bg)} !important;
13
14
 
14
15
  --#{$prefix}emphasis-color: #{$body-emphasis-color} !important;
15
- --#{$prefix}emphasis-color-rgb: #{to-rgb($body-emphasis-color)} !important;
16
+ --#{$prefix}emphasis-color-rgb: #{channels.rgb($body-emphasis-color)} !important;
16
17
 
17
18
  --#{$prefix}secondary-color: #{$body-secondary-color} !important;
18
- --#{$prefix}secondary-color-rgb: #{to-rgb($body-secondary-color)} !important;
19
+ --#{$prefix}secondary-color-rgb: #{channels.rgb($body-secondary-color)} !important;
19
20
  --#{$prefix}secondary-bg: #{$body-secondary-bg} !important;
20
- --#{$prefix}secondary-bg-rgb: #{to-rgb($body-secondary-bg)} !important;
21
+ --#{$prefix}secondary-bg-rgb: #{channels.rgb($body-secondary-bg)} !important;
21
22
 
22
23
  --#{$prefix}tertiary-color: #{$body-tertiary-color} !important;
23
- --#{$prefix}tertiary-color-rgb: #{to-rgb($body-tertiary-color)} !important;
24
+ --#{$prefix}tertiary-color-rgb: #{channels.rgb($body-tertiary-color)} !important;
24
25
  --#{$prefix}tertiary-bg: #{$body-tertiary-bg} !important;
25
- --#{$prefix}tertiary-bg-rgb: #{to-rgb($body-tertiary-bg)} !important;
26
+ --#{$prefix}tertiary-bg-rgb: #{channels.rgb($body-tertiary-bg)} !important;
26
27
 
27
28
  @each $color, $value in $theme-colors-text {
28
29
  --#{$prefix}#{$color}-text-emphasis: #{$value} !important;
@@ -38,8 +39,8 @@
38
39
 
39
40
  --#{$prefix}link-color: #{$link-color} !important;
40
41
  --#{$prefix}link-hover-color: #{$link-hover-color} !important;
41
- --#{$prefix}link-color-rgb: #{to-rgb($link-color)} !important;
42
- --#{$prefix}link-hover-color-rgb: #{to-rgb($link-hover-color)} !important;
42
+ --#{$prefix}link-color-rgb: #{channels.rgb($link-color)} !important;
43
+ --#{$prefix}link-hover-color-rgb: #{channels.rgb($link-hover-color)} !important;
43
44
 
44
45
  --#{$prefix}code-color: #{$code-color} !important;
45
46
  --#{$prefix}highlight-color: #{$mark-color} !important;