@webority/theme 0.170.1 → 0.171.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webority/theme",
3
- "version": "0.170.1",
3
+ "version": "0.171.1",
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.170.1",
84
- "@webority/tokens": "0.170.1",
83
+ "@webority/biome-config": "0.171.1",
84
+ "@webority/tokens": "0.171.1",
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.170.1 from its token source. Do not edit; run webority brand --library.
1
+ // Generated by @webority/tokens 0.171.1 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;
@@ -1,4 +1,4 @@
1
- // Generated by @webority/tokens 0.170.1 from its token source. Do not edit; run webority brand --library.
1
+ // Generated by @webority/tokens 0.171.1 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.170.1 from its token source. Do not edit; run webority brand --library.
1
+ // Generated by @webority/tokens 0.171.1 from its token source. Do not edit; run webority brand --library.
2
2
 
3
3
  :root {
4
4
  --wui-primary: #4F46E5;
@@ -25,7 +25,12 @@
25
25
  // flat surface. The token carries a unit, because the inner radius below subtracts it and calc()
26
26
  // drops a bare 0.
27
27
  --bs-card-border-width: var(--wui-card-border-width);
28
- --bs-card-border-color: var(--color-border);
28
+ --bs-card-border-color: var(--wui-card-border-color, var(--color-border));
29
+ // --wui-card-border-top-width and --wui-card-border-top-color draw a heavier or coloured top edge;
30
+ // unset, the top edge is the card's own border. A nested card takes the top width of its own border below.
31
+ border-top: var(--wui-card-border-top-width, var(--bs-card-border-width)) solid var(--wui-card-border-top-color, var(--bs-card-border-color));
32
+ // --wui-card-shadow gives the card a resting shadow.
33
+ box-shadow: var(--wui-card-shadow, none);
29
34
  // Bootstrap compiles the inner radius from $card-border-radius, which is smaller than the
30
35
  // token radius the card actually draws. The header, footer and media round their corners
31
36
  // with it, so their fill poked out over a bordered card's corners and the border looked cut.
@@ -37,6 +42,8 @@
37
42
  // :where keeps the rule at one class, so the elevated and outlined variants below still set their width.
38
43
  :where(.card) .card {
39
44
  --bs-card-border-width: var(--wui-card-nested-border-width, var(--wui-card-border-width));
45
+ --wui-card-border-top-width: var(--bs-card-border-width);
46
+ --wui-card-shadow: none;
40
47
  }
41
48
 
42
49
  // A card header that carries a title on the left and controls on the right; the
@@ -1751,8 +1751,9 @@ wui-date-range {
1751
1751
  }
1752
1752
  .status-label.info {
1753
1753
  @include wui-tone-pill-colors(info);
1754
- // An inset shadow, not a border, so an info pill keeps its size.
1755
- box-shadow: inset 0 0 0 1px var(--color-info-border);
1754
+ // An inset shadow, not a border, so an info pill keeps its size. The edge follows the
1755
+ // on-tint text hue: --color-info-border is too close to the soft fill in light mode to read.
1756
+ box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-info-text-on-soft) 45%, transparent);
1756
1757
  }
1757
1758
  .status-label.primary {
1758
1759
  @include wui-tone-pill-colors(primary, var(--color-primary-text));
@@ -225,6 +225,14 @@
225
225
  .table-ledger tbody td {
226
226
  font-weight: 500;
227
227
  }
228
+ // A pill in a ledger cell wraps inside its column instead of running past it; the pill stays
229
+ // a rounded box and its text starts at the leading edge.
230
+ .table-ledger td .badge {
231
+ white-space: normal;
232
+ overflow-wrap: anywhere;
233
+ text-align: start;
234
+ max-width: 100%;
235
+ }
228
236
  .table-ledger tbody td:first-child,
229
237
  .table-ledger tbody th.wui-row-header:first-child {
230
238
  padding-inline-start: 20px;
@@ -251,7 +259,7 @@
251
259
  // A row tints under the pointer, and while a control inside it holds keyboard focus.
252
260
  .table-ledger tbody tr:hover,
253
261
  .table-ledger tbody tr:focus-within {
254
- --bs-table-bg-state: var(--color-bg-muted);
262
+ --bs-table-bg-state: var(--color-bg-subtle);
255
263
  }
256
264
  // The identity block is a flex child of its cell: without a zero floor it keeps a long email's full
257
265
  // width inside a phone card and the subline's truncation never starts. Column sizing is unaffected,
@@ -23,5 +23,6 @@
23
23
  display: flex;
24
24
  flex-direction: column;
25
25
  gap: var(--wui-space-md);
26
+ --wui-scroll-fade-gap: var(--wui-space-md);
26
27
  padding: var(--wui-space-lg);
27
28
  }
@@ -38,13 +38,10 @@
38
38
  width: 100%;
39
39
  min-width: 0;
40
40
  }
41
- .wui-entry-grid-table td:has(> wui-select) {
42
- max-width: 16rem;
43
- }
44
41
  .wui-entry-grid-table td > wui-select {
45
42
  display: block;
46
43
  width: 100%;
47
- max-width: 16rem;
44
+ max-width: 22.125rem;
48
45
  min-width: 0;
49
46
  }
50
47
 
@@ -12,7 +12,13 @@
12
12
  gap: 16px;
13
13
  align-items: end;
14
14
  }
15
- // Two columns below 768px, the column count from the attribute above it.
15
+ // One column below 768px when the strip asks for it.
16
+ @media (max-width: 767.98px) {
17
+ .wui-metric-strip.wui-metric-strip-phone-cols-1 {
18
+ grid-template-columns: minmax(0, 1fr);
19
+ }
20
+ }
21
+ // Two columns below 768px (or one with the phone setting), the column count from the attribute above it.
16
22
  @media (min-width: 768px) {
17
23
  .wui-metric-strip.wui-metric-strip-cols-3 {
18
24
  grid-template-columns: repeat(3, minmax(0, 1fr));
@@ -56,6 +56,13 @@
56
56
  margin-bottom: 16px;
57
57
  }
58
58
 
59
+ // A modal page opened by its address sits in the host layout: centred, width from `--wui-modal-max-width` (set by a nonce'd style the tag helper writes), 720px when no size was given.
60
+ .wui-modal.wui-modal-page {
61
+ max-width: var(--wui-modal-max-width, 720px);
62
+ margin-inline: auto;
63
+ max-height: none;
64
+ }
65
+
59
66
  // The remote drawer: the same shell and card, docked to the end edge at full height. Width
60
67
  // comes from `--wui-modal-max-width` (sm 360, md 480, lg 640, xl 720), set on the shell by the script.
61
68
  .modal.wui-modal-shell.wui-remote-drawer {
@@ -804,7 +804,8 @@
804
804
  display: inline-flex;
805
805
  align-items: center;
806
806
  gap: 4px;
807
- color: var(--color-text-muted);
807
+ // A product sets the link ink with --wui-breadcrumb-link-color.
808
+ color: var(--wui-breadcrumb-link-color, var(--color-text-muted));
808
809
  text-decoration: none;
809
810
  }
810
811
  .breadcrumb-item a:hover {
@@ -127,6 +127,64 @@ dialog.wui-modal-shell[open] {
127
127
  scroll-behavior: auto;
128
128
  }
129
129
  }
130
+ // Scroll hint: a pop-up or drawer body that scrolls fades its foot while more lies below, and its
131
+ // head once scrolled. The fades are sticky overlays in the body's surface colour, not a mask: a mask
132
+ // would also hide a select menu or popover that a control in the body draws past the body's edge.
133
+ // Their opacity follows the body's own scroll timeline, so a body that does not scroll has an
134
+ // inactive timeline and shows neither fade, with no script on either surface.
135
+ // The negative margins take the fades out of the layout. In a body that spaces its children with a
136
+ // flex gap, each fade would also add one gap, so such a body sets --wui-scroll-fade-gap to its gap.
137
+ @supports (animation-timeline: scroll()) {
138
+ :is(.wui-modal-body, .modal-body, .wui-drawer-body)::before,
139
+ :is(.wui-modal-body, .modal-body, .wui-drawer-body)::after {
140
+ content: "";
141
+ position: sticky;
142
+ z-index: 1;
143
+ display: block;
144
+ height: var(--wui-scroll-fade-size, var(--wui-space-2xl));
145
+ grid-column: 1 / -1;
146
+ pointer-events: none;
147
+ opacity: 0;
148
+ animation-name: wui-scroll-fade-in;
149
+ animation-duration: auto;
150
+ animation-timing-function: var(--wui-ease-linear);
151
+ animation-fill-mode: both;
152
+ animation-timeline: scroll(nearest block);
153
+ }
154
+ :is(.wui-modal-body, .modal-body, .wui-drawer-body)::before {
155
+ top: 0;
156
+ margin-bottom: calc(-1 * (var(--wui-scroll-fade-size, var(--wui-space-2xl)) + var(--wui-scroll-fade-gap, var(--wui-space-none))));
157
+ background: linear-gradient(to bottom, var(--wui-scroll-fade-surface, var(--color-surface)), transparent);
158
+ animation-range: 0 var(--wui-scroll-fade-size, var(--wui-space-2xl));
159
+ }
160
+ :is(.wui-modal-body, .modal-body, .wui-drawer-body)::after {
161
+ bottom: 0;
162
+ margin-top: calc(-1 * (var(--wui-scroll-fade-size, var(--wui-space-2xl)) + var(--wui-scroll-fade-gap, var(--wui-space-none))));
163
+ background: linear-gradient(to top, var(--wui-scroll-fade-surface, var(--color-surface)), transparent);
164
+ animation-name: wui-scroll-fade-out;
165
+ animation-range: calc(100% - var(--wui-scroll-fade-size, var(--wui-space-2xl))) 100%;
166
+ }
167
+ // A sticky form action bar already marks the foot, and a fade over it would dim its buttons.
168
+ :is(.wui-modal-body, .modal-body, .wui-drawer-body):has(.form-actions-sticky)::after {
169
+ content: none;
170
+ }
171
+ }
172
+ @keyframes wui-scroll-fade-in {
173
+ from {
174
+ opacity: 0;
175
+ }
176
+ to {
177
+ opacity: 1;
178
+ }
179
+ }
180
+ @keyframes wui-scroll-fade-out {
181
+ from {
182
+ opacity: 1;
183
+ }
184
+ to {
185
+ opacity: 0;
186
+ }
187
+ }
130
188
  // Modal heading group: optional contextual (Bulk) icon tile + title/subtitle.
131
189
  .wui-modal-heading {
132
190
  display: flex;
@@ -404,6 +462,29 @@ dialog.wui-modal-shell[open] {
404
462
  padding-right: max(22px, env(safe-area-inset-right));
405
463
  }
406
464
 
465
+ // Wide size: a 1080px card capped at 90vw whose fields sit in two columns from md up. Both surfaces put wui-modal-wide on the shell.
466
+ .modal.wui-modal-shell.wui-modal-wide .wui-modal {
467
+ max-width: min(var(--wui-modal-max-width), 90vw);
468
+ }
469
+ // The form inside a wide body is the field grid; the body stays in block flow, so the scroll hint fades take no room.
470
+ @include media-breakpoint-up(md) {
471
+ .wui-modal-wide .wui-modal-body > form,
472
+ .wui-modal-wide .wui-modal-body .form-section-body {
473
+ display: grid;
474
+ grid-template-columns: repeat(2, minmax(0, 1fr));
475
+ column-gap: var(--wui-space-lg);
476
+ row-gap: var(--wui-space-lg);
477
+ align-content: start;
478
+ }
479
+ .wui-modal-wide .wui-modal-body > form > :not(.field),
480
+ .wui-modal-wide .wui-modal-body .form-section-body > :not(.field) {
481
+ grid-column: 1 / -1;
482
+ }
483
+ .wui-modal-wide .wui-modal-body > form > :is(.field, .form-row-grid) + :is(.field, .form-row-grid) {
484
+ margin-top: 0;
485
+ }
486
+ }
487
+
407
488
  // ── Confirm dialog ──
408
489
  // Confirmation dialog — centred status icon + title + message, two equal
409
490
  // side-by-side CTAs. Runs headerless (Modal hideHeader), so the body
@@ -587,6 +668,7 @@ dialog.wui-modal-shell[open] {
587
668
  // A hairline shadow so the light default's white arrow still reads on a white page; on a tinted
588
669
  // tone the arrow is coloured and this just adds subtle depth.
589
670
  .tooltip.wui-tooltip .tooltip-arrow {
671
+ position: absolute;
590
672
  filter: drop-shadow(0 1px 1px color-mix(in srgb, var(--color-text) 14%, transparent));
591
673
  }
592
674
 
@@ -102,6 +102,9 @@
102
102
  color: var(--color-text-muted);
103
103
  text-decoration: none;
104
104
  }
105
+ .page-header-bar-crumbs .breadcrumb-item a {
106
+ color: var(--wui-breadcrumb-link-color, var(--color-text-muted));
107
+ }
105
108
  .page-header-bar-crumbs .breadcrumb-item a:hover {
106
109
  text-decoration: underline;
107
110
  }
@@ -287,7 +287,9 @@
287
287
  // A clip, unlike hidden, leaves the grid row free to grow to the whole nav list; this keeps
288
288
  // a shell set in a fixed-height box at the box's height, with the nav scrolling inside it.
289
289
  min-height: 0;
290
- background: var(--color-surface);
290
+ // --wui-shell-sidebar-bg takes any background, so a brand can set a gradient; --wui-shell-sidebar-shadow draws its edge.
291
+ background: var(--wui-shell-sidebar-bg, var(--color-surface));
292
+ box-shadow: var(--wui-shell-sidebar-shadow, none);
291
293
  transition: padding var(--wui-duration-default) var(--wui-ease-ui);
292
294
  }
293
295
  .app-shell.collapsed .app-sidebar {
@@ -566,6 +568,11 @@
566
568
  color: var(--color-primary-text);
567
569
  font-weight: 600;
568
570
  }
571
+ // --wui-nav-item-active-shadow draws a mark on the open page's row (an inset accent bar). A parent
572
+ // row and a sub-item row mark their open state another way, so they never take it.
573
+ .app-nav-item.active:not(.has-children, .app-nav-subitem) {
574
+ box-shadow: var(--wui-nav-item-active-shadow, none);
575
+ }
569
576
  .app-nav-item:focus-visible {
570
577
  outline: var(--wui-focus-ring-width) solid var(--color-focus-ring);
571
578
  outline-offset: var(--wui-focus-ring-inset);
@@ -969,7 +976,10 @@
969
976
  gap: 16px;
970
977
  min-height: var(--wui-shell-topbar-height);
971
978
  padding: 12px 28px;
972
- background: var(--color-surface);
979
+ // --wui-shell-topbar-bg takes any background (a gradient too); -color and -shadow set its ink and resting shadow.
980
+ background: var(--wui-shell-topbar-bg, var(--color-surface));
981
+ color: var(--wui-shell-topbar-color, inherit);
982
+ box-shadow: var(--wui-shell-topbar-shadow, none);
973
983
  // Reserved rather than absent, so colouring the divider once scrolled
974
984
  // (`.app-topbar.wui-scrolled`) doesn't shift the layout by a pixel.
975
985
  border-bottom: 1px solid transparent;
@@ -981,7 +991,7 @@
981
991
  // and shadow once the page has scrolled; unset, the scrolled topbar looks as it does at rest.
982
992
  .app-topbar.wui-scrolled {
983
993
  border-bottom-color: var(--wui-shell-topbar-scrolled-border-color, transparent);
984
- box-shadow: var(--wui-shell-topbar-scrolled-shadow, none);
994
+ box-shadow: var(--wui-shell-topbar-scrolled-shadow, var(--wui-shell-topbar-shadow, none));
985
995
  }
986
996
  .app-topbar[data-tone="primary"] {
987
997
  background: var(--color-primary);
@@ -1020,10 +1030,10 @@
1020
1030
  width: 36px;
1021
1031
  height: 36px;
1022
1032
  place-items: center;
1023
- border: 1px solid var(--color-border);
1033
+ border: 1px solid var(--wui-shell-topbar-menu-border-color, var(--color-border));
1024
1034
  border-radius: 999px;
1025
- background: var(--color-surface);
1026
- color: var(--color-text-muted);
1035
+ background: var(--wui-shell-topbar-menu-bg, var(--color-surface));
1036
+ color: var(--wui-shell-topbar-menu-color, var(--color-text-muted));
1027
1037
  cursor: pointer;
1028
1038
  }
1029
1039
  .app-topbar-menu:focus-visible {
@@ -1192,7 +1202,7 @@
1192
1202
  --wui-nav-group-rule: var(--color-shell-rule);
1193
1203
 
1194
1204
  .app-sidebar {
1195
- background: var(--color-shell-bg);
1205
+ background: var(--wui-shell-sidebar-bg, var(--color-shell-bg));
1196
1206
  color: var(--color-shell-text);
1197
1207
  }
1198
1208
  .app-sidebar-brand {
@@ -269,7 +269,8 @@
269
269
  font-size: var(--wui-page-header-title-fs);
270
270
  font-weight: 600;
271
271
  letter-spacing: -0.02em;
272
- color: var(--color-text);
272
+ // A product sets the title's ink with --wui-page-title-color.
273
+ color: var(--wui-page-title-color, var(--color-text));
273
274
  }
274
275
  .page-subtitle {
275
276
  font-size: 14px;