@webority/theme 0.139.3 → 0.140.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.139.3",
3
+ "version": "0.140.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": {
@@ -47,13 +47,14 @@
47
47
  "postcss": "^8.5.31"
48
48
  },
49
49
  "devDependencies": {
50
- "@webority/tokens": "0.139.3",
50
+ "@webority/tokens": "0.140.0",
51
51
  "bootstrap": "5.3.3",
52
52
  "country-flag-icons": "^1.6.20",
53
53
  "sass-embedded": "^1.97.0",
54
54
  "vite": "^8.0.12"
55
55
  },
56
56
  "scripts": {
57
+ "test": "node --test runtime/productTheme.test.mjs",
57
58
  "tokens": "node ../tokens/dist/webority.js brand --library --out ../tokens/dist --web scss/_tokens.generated.scss",
58
59
  "tokens:check": "node ../tokens/dist/webority.js brand --library --out ../tokens/dist --web scss/_tokens.generated.scss --check",
59
60
  "build": "corepack pnpm run tokens && sass index.scss dist/webority-theme.css --load-path=node_modules --style=compressed --no-source-map --quiet-deps --silence-deprecation=if-function && sass scss/_flags.scss dist/webority-flags.css --style=compressed --no-source-map --quiet && sass scss/_runtime-brand.scss dist/webority-runtime-brand.css --style=compressed --no-source-map --quiet && node ../../scripts/force-state-selectors.mjs dist/webority-theme.css && node ../../scripts/gen-purge-safelist.mjs && node ../../scripts/sync-rcl-assets.mjs theme && vite build --config vite.cli.config.js && node scripts/exportCanvasTheme.mjs"
@@ -1,4 +1,4 @@
1
- // Generated by @webority/tokens 0.139.3 from its token source. Do not edit; run webority brand --library.
1
+ // Generated by @webority/tokens 0.140.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;
@@ -1,4 +1,4 @@
1
- // Generated by @webority/tokens 0.139.3 from its token source. Do not edit; run webority brand --library.
1
+ // Generated by @webority/tokens 0.140.0 from its token source. Do not edit; run webority brand --library.
2
2
 
3
3
  :root {
4
4
  --wui-primary: #4F46E5;
@@ -63,6 +63,21 @@ wui-command-palette {
63
63
  color: var(--color-primary-text);
64
64
  }
65
65
 
66
+ // The group pills under the search: one row that scrolls sideways rather than wrapping. The element
67
+ // sets hidden on it for a nested page, which display flex would otherwise keep showing.
68
+ .wui-cmd-tabs {
69
+ display: flex;
70
+ flex: 0 0 auto;
71
+ flex-wrap: nowrap;
72
+ gap: var(--wui-space-xs);
73
+ padding-inline: var(--wui-space-lg);
74
+ margin-bottom: var(--wui-space-xs);
75
+ overflow-x: auto;
76
+ }
77
+ .wui-cmd-tabs[hidden] {
78
+ display: none;
79
+ }
80
+
66
81
  // Nested pages: the Back button and the path to the open page. The element fills the trail and
67
82
  // shows the bar only while a page is open.
68
83
  .wui-cmd-crumbs {
@@ -346,6 +346,62 @@
346
346
  margin-inline: auto;
347
347
  }
348
348
 
349
+ // FAQ, split: the title on the left and the questions on the right from lg up. The section takes
350
+ // `wui-section-faq--split`; the questions are numbered by the list's counter.
351
+ .wui-section-faq--split .wui-accordion {
352
+ counter-reset: wui-faq-item;
353
+ }
354
+ .wui-section-faq--split .wui-accordion-item {
355
+ counter-increment: wui-faq-item;
356
+ }
357
+ .wui-section-faq--split .wui-accordion-trigger::before {
358
+ flex: none;
359
+ content: counter(wui-faq-item, decimal-leading-zero);
360
+ color: var(--color-text-subtle);
361
+ font-variant-numeric: tabular-nums;
362
+ }
363
+ // The toggle is a circle, sized by the control token so it matches the field and button rows.
364
+ .wui-section-faq--split .wui-accordion-icon {
365
+ width: var(--wui-control-sm);
366
+ height: var(--wui-control-sm);
367
+ border-radius: var(--wui-radius-pill);
368
+ background: var(--color-bg-muted);
369
+ }
370
+ // Expanded, the toggle turns primary. A trigger carrying data-close-label swaps its chevron for that
371
+ // label as a pill; attr() reads only its own element, so the pill is the trigger's ::after.
372
+ .wui-section-faq--split .wui-accordion-trigger[aria-expanded="true"] .wui-accordion-icon {
373
+ background: var(--color-primary-soft);
374
+ color: var(--color-primary-text);
375
+ }
376
+ .wui-section-faq--split .wui-accordion-trigger[aria-expanded="true"][data-close-label] .wui-accordion-icon {
377
+ display: none;
378
+ }
379
+ .wui-section-faq--split .wui-accordion-trigger[aria-expanded="true"][data-close-label]::after {
380
+ content: attr(data-close-label);
381
+ flex: none;
382
+ padding: var(--wui-space-xs) var(--wui-space-sm);
383
+ border-radius: var(--wui-radius-pill);
384
+ background: var(--color-primary-soft);
385
+ color: var(--color-primary-text);
386
+ font-size: var(--wui-fs-sm);
387
+ font-weight: var(--wui-fw-semibold);
388
+ white-space: nowrap;
389
+ }
390
+ @include media-breakpoint-up(lg) {
391
+ .wui-section-faq--split .wui-section-inner {
392
+ display: grid;
393
+ grid-template-columns: minmax(7.2em, 1fr) minmax(0, 2fr);
394
+ align-items: start;
395
+ }
396
+ .wui-section-faq--split .wui-section-head {
397
+ min-width: 7.2em;
398
+ }
399
+ .wui-section-faq--split .wui-section-faq-body {
400
+ max-width: none;
401
+ margin-inline: 0;
402
+ }
403
+ }
404
+
349
405
  // ── Call to action: the heading block becomes a soft brand panel ──
350
406
  .wui-section-call-to-action .wui-section-head {
351
407
  width: 100%;
@@ -358,6 +414,41 @@
358
414
  max-width: 40rem;
359
415
  }
360
416
 
417
+ // Call to action, band: a filled primary band with the on-primary text; from lg up the actions sit at
418
+ // the end. The section takes `wui-section-call-to-action--band`. The band reads the theme's primary pair,
419
+ // so the fill and its text switch together in dark mode.
420
+ .wui-section-call-to-action--band {
421
+ background: var(--color-primary);
422
+ color: var(--color-on-primary);
423
+ }
424
+ .wui-section-call-to-action--band .wui-section-head {
425
+ background: none;
426
+ }
427
+ .wui-section-call-to-action--band .wui-section-eyebrow,
428
+ .wui-section-call-to-action--band .wui-section-title,
429
+ .wui-section-call-to-action--band .wui-section-subtitle {
430
+ color: inherit;
431
+ }
432
+ // A primary button on a primary band would vanish into it, so inside the band it inverts.
433
+ .wui-section-call-to-action--band .wui-section-actions .btn-primary {
434
+ --bs-btn-bg: var(--color-on-primary);
435
+ --bs-btn-border-color: var(--color-on-primary);
436
+ --bs-btn-color: var(--color-primary);
437
+ --bs-btn-hover-bg: color-mix(in srgb, var(--color-on-primary) 88%, var(--color-primary));
438
+ --bs-btn-hover-border-color: color-mix(in srgb, var(--color-on-primary) 88%, var(--color-primary));
439
+ --bs-btn-hover-color: var(--color-primary);
440
+ --bs-btn-active-bg: color-mix(in srgb, var(--color-on-primary) 80%, var(--color-primary));
441
+ --bs-btn-active-border-color: color-mix(in srgb, var(--color-on-primary) 80%, var(--color-primary));
442
+ --bs-btn-active-color: var(--color-primary);
443
+ border-radius: var(--wui-radius-pill);
444
+ }
445
+ @include media-breakpoint-up(lg) {
446
+ .wui-section-call-to-action--band .wui-section-actions {
447
+ align-self: flex-end;
448
+ justify-content: flex-end;
449
+ }
450
+ }
451
+
361
452
  @media (prefers-reduced-motion: reduce) {
362
453
  .wui-section-logo-img {
363
454
  transition: none;
@@ -51,8 +51,7 @@
51
51
  .wui-select-caret {
52
52
  flex-shrink: 0;
53
53
  color: var(--color-text-subtle);
54
- --wui-select-ease: ease;
55
- transition: transform var(--wui-duration-fast) var(--wui-select-ease);
54
+ transition: transform var(--wui-duration-fast) var(--wui-ease-ui);
56
55
  }
57
56
  .wui-select-caret path {
58
57
  stroke-width: 2px;
@@ -76,15 +75,13 @@
76
75
  .wui-select-sm .wui-select-control {
77
76
  height: var(--wui-control-sm);
78
77
  min-height: var(--wui-control-sm);
79
- --wui-select-font-size: 13px;
80
- font-size: var(--wui-select-font-size);
78
+ font-size: var(--wui-fs-xs);
81
79
  border-radius: var(--wui-radius-sm);
82
80
  }
83
81
  .wui-select-lg .wui-select-control {
84
82
  height: var(--wui-control-lg);
85
83
  min-height: var(--wui-control-lg);
86
- --wui-select-font-size: 16px;
87
- font-size: var(--wui-select-font-size);
84
+ font-size: var(--wui-fs-base);
88
85
  border-radius: var(--wui-radius-sm);
89
86
  }
90
87
  // Multi-select grows with its chips, so a size sets the FLOOR (min-height from the rule
@@ -107,15 +104,12 @@
107
104
  width: 20px;
108
105
  height: 20px;
109
106
  border-radius: 50%;
110
- --wui-select-reset-font-size: 12px;
111
- --wui-select-hover-duration: 0.12s;
112
- --wui-select-ease: ease;
113
- font-size: var(--wui-select-reset-font-size);
107
+ font-size: var(--wui-fs-xs);
114
108
  color: var(--color-text-subtle);
115
109
  cursor: pointer;
116
110
  transition:
117
- background var(--wui-select-hover-duration) var(--wui-select-ease),
118
- color var(--wui-select-hover-duration) var(--wui-select-ease);
111
+ background var(--wui-duration-fast) var(--wui-ease-ui),
112
+ color var(--wui-duration-fast) var(--wui-ease-ui);
119
113
  }
120
114
  .wui-select-reset:hover {
121
115
  background: var(--color-bg-muted);
@@ -128,8 +122,7 @@
128
122
  flex-shrink: 0;
129
123
  display: inline-flex;
130
124
  color: var(--color-text-muted);
131
- --wui-select-icon-size: 15px;
132
- font-size: var(--wui-select-icon-size);
125
+ font-size: var(--wui-fs-sm);
133
126
  }
134
127
  .wui-select-prefix {
135
128
  flex-shrink: 0;
@@ -204,12 +197,10 @@
204
197
  // Sits at the box's 12px right padding; a small negative margin nudges it
205
198
  // closer to the edge so it lines up with the field's own trailing controls.
206
199
  margin-right: calc(-1 * var(--wui-space-xs));
207
- --wui-select-clear-font-size: 20px;
208
- --wui-select-clear-line-height: 1;
209
- font-size: var(--wui-select-clear-font-size);
200
+ font-size: var(--wui-fs-lg);
210
201
  // Tight line box: at normal line-height the icon's box is taller than the
211
202
  // button, so bootstrap-icons' baseline offset drifts the glyph low.
212
- line-height: var(--wui-select-clear-line-height);
203
+ line-height: var(--wui-lh-display);
213
204
  cursor: pointer;
214
205
  color: var(--color-text-subtle);
215
206
  }
@@ -244,8 +235,7 @@
244
235
  width: 100%;
245
236
  text-align: left;
246
237
  padding: var(--wui-space-sm) var(--wui-space-md);
247
- --wui-select-option-line-height: 1.4;
248
- line-height: var(--wui-select-option-line-height);
238
+ line-height: var(--wui-lh-body);
249
239
  border: none;
250
240
  border-radius: var(--wui-radius-sm);
251
241
  corner-shape: squircle;
@@ -253,11 +243,9 @@
253
243
  font-size: var(--wui-fs-sm);
254
244
  color: var(--color-text-body);
255
245
  cursor: pointer;
256
- --wui-select-hover-duration: 0.12s;
257
- --wui-select-ease: ease;
258
246
  transition:
259
- background var(--wui-select-hover-duration) var(--wui-select-ease),
260
- color var(--wui-select-hover-duration) var(--wui-select-ease);
247
+ background var(--wui-duration-fast) var(--wui-ease-ui),
248
+ color var(--wui-duration-fast) var(--wui-ease-ui);
261
249
  }
262
250
  // The row under the pointer or the keyboard takes the muted fill, with no outline.
263
251
  .wui-select-option:hover,
@@ -272,10 +260,8 @@
272
260
  }
273
261
  .wui-select-empty,
274
262
  .wui-select-hint {
275
- --wui-select-note-padding-x: 10px;
276
- --wui-select-note-font-size: 13px;
277
- padding: var(--wui-space-md) var(--wui-select-note-padding-x);
278
- font-size: var(--wui-select-note-font-size);
263
+ padding: var(--wui-space-md) var(--wui-space-sm);
264
+ font-size: var(--wui-fs-xs);
279
265
  color: var(--color-text-subtle);
280
266
  text-align: center;
281
267
  }
@@ -385,8 +371,7 @@ wui-select[mode="multiple"][collapse-chips] .wui-select-chips {
385
371
  }
386
372
  .wui-opt-hint {
387
373
  flex: none;
388
- --wui-select-hint-font-size: 0.75rem;
389
- font-size: var(--wui-select-hint-font-size);
374
+ font-size: var(--wui-fs-xs);
390
375
  color: var(--color-text-muted);
391
376
  }
392
377
  // A disabled row stays readable and reachable by the keyboard, but never looks choosable:
@@ -492,8 +477,7 @@ wui-select[density="compact"] .wui-select-control {
492
477
  font-weight: var(--wui-fw-semibold);
493
478
  }
494
479
  wui-select[density="compact"] .wui-select-caret {
495
- --wui-select-caret-font-size: 12px;
496
- font-size: var(--wui-select-caret-font-size);
480
+ font-size: var(--wui-fs-xs);
497
481
  }
498
482
  wui-select[density="compact"] .wui-select-sm .wui-select-control {
499
483
  height: var(--wui-control-sm);
@@ -200,6 +200,8 @@
200
200
  --app-shell-foot-h: 39px;
201
201
  // The equal space above (below the rule) and below the collapse toggle.
202
202
  --app-sidebar-toggle-gap: 4px;
203
+ // The top bar's height. Content that sticks below the top bar reads it.
204
+ --wui-shell-topbar-height: 72px;
203
205
 
204
206
  position: relative;
205
207
  display: grid;
@@ -886,7 +888,7 @@
886
888
  align-items: center;
887
889
  justify-content: space-between;
888
890
  gap: 16px;
889
- min-height: 72px;
891
+ min-height: var(--wui-shell-topbar-height);
890
892
  padding: 12px 28px;
891
893
  background: var(--color-surface);
892
894
  // Reserved rather than absent, so a consumer colouring the divider on