@webority/theme 0.171.3 → 0.172.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.171.3",
3
+ "version": "0.172.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.171.3",
84
- "@webority/tokens": "0.171.3",
83
+ "@webority/biome-config": "0.172.1",
84
+ "@webority/tokens": "0.172.1",
85
85
  "bootstrap": "5.3.9",
86
86
  "country-flag-icons": "^1.6.20",
87
87
  "sass-embedded": "^1.108.0",
@@ -89,7 +89,7 @@
89
89
  "vite": "^8.3.6"
90
90
  },
91
91
  "scripts": {
92
- "test": "node --test runtime/productTheme.test.mts",
92
+ "test": "node --conditions=@webority/source --test runtime/productTheme.test.mts",
93
93
  "typecheck": "tsc -p tsconfig.json",
94
94
  "tokens": "node ../../scripts/ensure-tokens-built.mjs && node ../tokens/dist/webority.js brand --library --out ../tokens/dist --web scss/_tokens.generated.scss --web-modes scss/_tokens-modes.generated.scss",
95
95
  "tokens:check": "node ../tokens/dist/webority.js brand --library --out ../tokens/dist --web scss/_tokens.generated.scss --web-modes scss/_tokens-modes.generated.scss --check",
@@ -1,4 +1,4 @@
1
- // Generated by @webority/tokens 0.171.3 from its token source. Do not edit; run webority brand --library.
1
+ // Generated by @webority/tokens 0.172.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.171.3 from its token source. Do not edit; run webority brand --library.
1
+ // Generated by @webority/tokens 0.172.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.171.3 from its token source. Do not edit; run webority brand --library.
1
+ // Generated by @webority/tokens 0.172.1 from its token source. Do not edit; run webority brand --library.
2
2
 
3
3
  :root {
4
4
  --wui-primary: #4F46E5;
@@ -267,6 +267,8 @@ $input-border-radius: $border-radius;
267
267
  $input-placeholder-color: var(--color-text-subtle);
268
268
  // The trailing error glyph, shared by every field that shows one (the phone shell draws it too).
269
269
  $wui-field-error-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F8285A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E");
270
+ // The trailing valid tick, drawn in the --wui-success colour.
271
+ $wui-field-valid-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2304B440' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E");
270
272
 
271
273
 
272
274
  // ---- Cards ----------------------------------------------------------
@@ -922,8 +922,20 @@ form .wui-field-message:empty {
922
922
  .field > .form-control[aria-invalid="true"],
923
923
  .field > .input.error,
924
924
  .field > .input.is-invalid,
925
- .field > .input[aria-invalid="true"] {
925
+ .field > .input[aria-invalid="true"],
926
+ .field > .input.wui-valid:not(.error):not([aria-invalid="true"]),
927
+ .field > .form-select.wui-valid:not(.error):not([aria-invalid="true"]),
928
+ .field > wui-select.wui-valid:not(.error):not([aria-invalid="true"]) > .wui-select > .wui-select-control,
929
+ .field > wui-datepicker.wui-valid:not([aria-invalid="true"]) > .datepicker > .datepicker-trigger,
930
+ .field-float > wui-select.wui-valid:not(.error):not([aria-invalid="true"]) > .wui-select > .wui-select-control {
926
931
  padding-inline-end: 41px;
932
+ }
933
+ .field > .form-control.error,
934
+ .field > .form-control.is-invalid,
935
+ .field > .form-control[aria-invalid="true"],
936
+ .field > .input.error,
937
+ .field > .input.is-invalid,
938
+ .field > .input[aria-invalid="true"] {
927
939
  background-image: $wui-field-error-glyph;
928
940
  background-repeat: no-repeat;
929
941
  background-position: right 14px center;
@@ -937,6 +949,24 @@ form .wui-field-message:empty {
937
949
  .field > .input[aria-invalid="true"]:dir(rtl) {
938
950
  background-position: left 14px center;
939
951
  }
952
+ // A filled, error-free field shows the valid tick. A select's host carries wui-valid, so its tick goes on the inner control.
953
+ .field > .input.wui-valid:not(.error):not([aria-invalid="true"]),
954
+ .field > .form-select.wui-valid:not(.error):not([aria-invalid="true"]),
955
+ .field > wui-select.wui-valid:not(.error):not([aria-invalid="true"]) > .wui-select > .wui-select-control,
956
+ .field > wui-datepicker.wui-valid:not([aria-invalid="true"]) > .datepicker > .datepicker-trigger,
957
+ .field-float > wui-select.wui-valid:not(.error):not([aria-invalid="true"]) > .wui-select > .wui-select-control {
958
+ background-image: $wui-field-valid-glyph;
959
+ background-repeat: no-repeat;
960
+ background-position: right 14px center;
961
+ background-size: 18px;
962
+ }
963
+ .field > .input.wui-valid:not(.error):not([aria-invalid="true"]):dir(rtl),
964
+ .field > .form-select.wui-valid:not(.error):not([aria-invalid="true"]):dir(rtl),
965
+ .field > wui-select.wui-valid:not(.error):not([aria-invalid="true"]):dir(rtl) > .wui-select > .wui-select-control,
966
+ .field > wui-datepicker.wui-valid:not([aria-invalid="true"]):dir(rtl) > .datepicker > .datepicker-trigger,
967
+ .field-float > wui-select.wui-valid:not(.error):not([aria-invalid="true"]):dir(rtl) > .wui-select > .wui-select-control {
968
+ background-position: left 14px center;
969
+ }
940
970
  // Dark mode: keep the value in an errored field legible.
941
971
  :root[data-bs-theme="dark"] .form-control.error,
942
972
  :root[data-bs-theme="dark"] .form-control.error:focus,
@@ -1411,7 +1441,8 @@ form .wui-field-message:empty {
1411
1441
  wui-select,
1412
1442
  wui-phone,
1413
1443
  wui-datepicker,
1414
- wui-date-range {
1444
+ wui-date-range,
1445
+ wui-date-time {
1415
1446
  display: block;
1416
1447
  width: 100%;
1417
1448
  }
@@ -1419,6 +1450,7 @@ wui-date-range {
1419
1450
  .field > wui-phone,
1420
1451
  .field > wui-datepicker,
1421
1452
  .field > wui-date-range,
1453
+ .field > wui-date-time,
1422
1454
  .field > .wui-select,
1423
1455
  .field > .input-with-unit,
1424
1456
  .field > .input-action-row,
@@ -763,6 +763,22 @@
763
763
  inset 0 0 0 9999px var(--bs-table-bg-state, var(--bs-table-bg-type, var(--bs-table-accent-bg)));
764
764
  }
765
765
 
766
+ // Row tint (AppDataTable `rowTone`, or `data-tone` on a Razor <tr>). The tint is set as --bs-table-bg-type,
767
+ // not background, because Bootstrap paints cell state through box-shadow (see the rules above). The state
768
+ // rules set --bs-table-bg-state, which wins over the tint, so selected, hover and active rows keep their own look.
769
+ .table-ledger tbody tr[data-tone="info"] {
770
+ --bs-table-bg-type: var(--color-info-soft);
771
+ }
772
+ .table-ledger tbody tr[data-tone="success"] {
773
+ --bs-table-bg-type: var(--color-success-soft);
774
+ }
775
+ .table-ledger tbody tr[data-tone="warning"] {
776
+ --bs-table-bg-type: var(--color-warning-soft);
777
+ }
778
+ .table-ledger tbody tr[data-tone="danger"] {
779
+ --bs-table-bg-type: var(--color-danger-soft);
780
+ }
781
+
766
782
  // Columns menu (AppColumnMenu / <app-column-menu>) and the column it hides on Razor.
767
783
  .table-ledger .wui-col-hidden {
768
784
  display: none;
@@ -1172,6 +1188,60 @@
1172
1188
  min-width: var(--wui-row-action-width);
1173
1189
  justify-content: center;
1174
1190
  }
1191
+
1192
+ // Row actions show on row hover and keyboard focus by default (AppDataTable `rowActionsMode`, Razor
1193
+ // `row-actions-mode`). "column" keeps the icons always visible; "hover-menu" keeps the menu visible and fades the icons.
1194
+ .table-ledger:not(.wui-table-actions-column) tbody .u-row-actions {
1195
+ opacity: 0;
1196
+ pointer-events: none;
1197
+ transition: opacity var(--wui-duration-fast) var(--wui-ease-ui);
1198
+ }
1199
+ .table-ledger:not(.wui-table-actions-column) tbody tr:hover .u-row-actions,
1200
+ .table-ledger:not(.wui-table-actions-column) tbody tr:focus-within .u-row-actions {
1201
+ opacity: 1;
1202
+ pointer-events: auto;
1203
+ }
1204
+ // A touch pointer has no hover: the actions stay on, and the menu holds them.
1205
+ @media (hover: none) {
1206
+ .table-ledger:not(.wui-table-actions-column) tbody .u-row-actions {
1207
+ opacity: 1;
1208
+ pointer-events: auto;
1209
+ }
1210
+ .table-ledger:not(.wui-table-actions-column) tbody .u-row-actions > .wui-row-action-inline {
1211
+ display: none;
1212
+ }
1213
+ .table-ledger:not(.wui-table-actions-column) tbody .u-row-actions > .wui-row-actions-menu.wui-hidden-from-sm {
1214
+ display: revert;
1215
+ }
1216
+ }
1217
+ .table-ledger.wui-table-actions-menu tbody .u-row-actions {
1218
+ opacity: 1;
1219
+ pointer-events: auto;
1220
+ }
1221
+ .table-ledger.wui-table-actions-menu tbody .u-row-actions > .wui-row-action-inline {
1222
+ opacity: 0;
1223
+ pointer-events: none;
1224
+ transition: opacity var(--wui-duration-fast) var(--wui-ease-ui);
1225
+ }
1226
+ .table-ledger.wui-table-actions-menu tbody tr:hover .u-row-actions > .wui-row-action-inline,
1227
+ .table-ledger.wui-table-actions-menu tbody tr:focus-within .u-row-actions > .wui-row-action-inline {
1228
+ opacity: 1;
1229
+ pointer-events: auto;
1230
+ }
1231
+ @include media-breakpoint-up(sm) {
1232
+ .table-ledger.wui-table-actions-menu tbody .u-row-actions > .wui-row-actions-menu.wui-hidden-from-sm {
1233
+ display: revert;
1234
+ }
1235
+ }
1236
+
1237
+ // The export bar and the density switch sit above the table, end-aligned.
1238
+ .wui-table-export,
1239
+ .wui-table-density {
1240
+ display: flex;
1241
+ justify-content: flex-end;
1242
+ gap: var(--wui-space-sm);
1243
+ margin-bottom: var(--wui-space-sm);
1244
+ }
1175
1245
  .u-action {
1176
1246
  // The disc size is a custom property so the wrapper can scale it with the glyph `size`
1177
1247
  // (React AppActionIcon / Razor <app-action-icon> set it to `size + 16px` — a constant 8px
@@ -135,6 +135,54 @@
135
135
  margin-top: 2px;
136
136
  }
137
137
 
138
+ // Default layout: the icon, then the label and figure on one line, the delta and sparkline at the right.
139
+ .kpi.wui-kpi-picked {
140
+ display: grid;
141
+ grid-template-columns: auto auto minmax(0, 1fr) auto;
142
+ column-gap: var(--wui-space-md);
143
+ align-items: center;
144
+ }
145
+ .kpi.wui-kpi-picked .kpi-icon {
146
+ grid-column: 1;
147
+ grid-row: 1 / span 2;
148
+ margin-bottom: 0;
149
+ }
150
+ .kpi.wui-kpi-picked .kpi-label {
151
+ grid-column: 2;
152
+ grid-row: 1;
153
+ }
154
+ .kpi.wui-kpi-picked .kpi-value {
155
+ grid-column: 3;
156
+ grid-row: 1;
157
+ margin-top: 0;
158
+ justify-self: start;
159
+ }
160
+ .kpi.wui-kpi-picked .kpi-caption {
161
+ grid-column: 2 / span 2;
162
+ grid-row: 2;
163
+ margin-top: 0;
164
+ }
165
+ .kpi.wui-kpi-picked .kpi-delta {
166
+ grid-column: 4;
167
+ grid-row: 1;
168
+ margin-top: 0;
169
+ align-self: center;
170
+ }
171
+ .kpi.wui-kpi-picked .kpi-sparkline {
172
+ grid-column: 4;
173
+ grid-row: 2;
174
+ margin-top: 0;
175
+ justify-self: end;
176
+ }
177
+
178
+ // Icon chip colours by chart slot (React `iconSlot`, Razor `icon-slot`).
179
+ @for $n from 1 through 8 {
180
+ .wui-kpi-icon-chart-#{$n} {
181
+ background: color-mix(in srgb, var(--color-chart-#{$n}) 16%, transparent);
182
+ color: var(--color-chart-#{$n});
183
+ }
184
+ }
185
+
138
186
  // Surface variants: plain (above) is borderless on the surface fill; these just swap the
139
187
  // fill so a dashboard can mix a KPI strip with the surrounding card.
140
188
  .kpi.kpi-filled {
@@ -424,6 +472,27 @@ a.kpi:focus-visible {
424
472
  text-align: end;
425
473
  font-variant-numeric: tabular-nums;
426
474
  }
475
+ // Labels at the start (`labels="start"`): each label sits left of its value in the grid's columns.
476
+ .wui-descs-labels-start .descs-item {
477
+ flex-direction: row;
478
+ align-items: baseline;
479
+ gap: var(--wui-space-md);
480
+ }
481
+ .wui-descs-labels-start .descs-label {
482
+ flex: 0 0 auto;
483
+ max-width: 50%;
484
+ padding: var(--wui-space-md) 0 var(--wui-space-md) var(--wui-space-lg);
485
+ }
486
+ .wui-descs-labels-start .descs-value {
487
+ min-width: 0;
488
+ padding: var(--wui-space-md) var(--wui-space-lg) var(--wui-space-md) 0;
489
+ }
490
+ .descs-sm.wui-descs-labels-start .descs-label {
491
+ padding: var(--wui-space-sm) 0 var(--wui-space-sm) var(--wui-space-md);
492
+ }
493
+ .descs-sm.wui-descs-labels-start .descs-value {
494
+ padding: var(--wui-space-sm) var(--wui-space-md) var(--wui-space-sm) 0;
495
+ }
427
496
  // Emphasis (React item `emphasis`): the total row, bold, with a rule above it. The row before it
428
497
  // drops its own bottom rule so the two do not stack into a double line.
429
498
  .descs-item.wui-descs-emphasis {
@@ -28,13 +28,16 @@
28
28
  text-decoration: none;
29
29
 
30
30
  &:hover {
31
+ text-decoration: none;
31
32
  background: var(--color-bg-muted);
32
33
  }
33
34
  &:focus-visible {
35
+ text-decoration: none;
34
36
  outline: var(--wui-focus-ring-width) solid var(--color-focus-ring);
35
37
  outline-offset: 1px;
36
38
  }
37
39
  &.is-active {
40
+ text-decoration: none;
38
41
  background: var(--color-primary-soft);
39
42
  color: var(--color-primary-text);
40
43
  font-weight: var(--wui-fw-medium);
@@ -70,6 +70,16 @@ wui-navigation-menu {
70
70
  .wui-nav-menu-trigger[aria-expanded="true"] > .wui-nav-menu-chevron {
71
71
  rotate: 180deg;
72
72
  }
73
+ .wui-nav-menu-trigger.is-current {
74
+ color: var(--color-primary-text);
75
+ }
76
+ .wui-nav-menu-group {
77
+ padding: var(--wui-space-sm) var(--wui-space-md) var(--wui-space-xxs);
78
+ font-size: var(--wui-fs-xs);
79
+ font-weight: var(--wui-fw-semibold);
80
+ color: var(--color-text-muted);
81
+ list-style: none;
82
+ }
73
83
 
74
84
  .wui-nav-menu-panel {
75
85
  display: none;
@@ -145,7 +145,7 @@ wui-select[mode="search"] .wui-select-control:disabled {
145
145
  }
146
146
 
147
147
  // Per-option leading glyph: wraps icon + label as one node (menu row, the selected
148
- // value in the control, and chips all render through optionLabelHtml). The icon inherits
148
+ // value in the control, and chips all render through optionLabelNodes). The icon inherits
149
149
  // the row's colour so it recolours with the label on hover / when selected.
150
150
  .wui-opt-label {
151
151
  display: inline-flex;
@@ -104,7 +104,7 @@
104
104
  -webkit-line-clamp: 2;
105
105
  font-size: 0.75rem;
106
106
  line-height: 1.15;
107
- overflow-wrap: anywhere;
107
+ overflow-wrap: normal;
108
108
  text-overflow: clip;
109
109
  white-space: normal;
110
110
  }