@webority/theme 0.86.0 → 0.86.3
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/dist/published-theme.json +11 -2
- package/dist/purge-safelist.json +2 -0
- package/dist/webority-theme.css +1 -1
- package/package.json +1 -1
- package/scss/_tokens.scss +21 -0
- package/scss/wui/_choice.scss +7 -0
- package/scss/wui/_controls.scss +14 -1
- package/scss/wui/_interaction.scss +3 -25
- package/scss/wui/_shell.scss +4 -3
- package/scss/wui/_utilities.scss +13 -0
- package/token-meanings.json +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webority/theme",
|
|
3
|
-
"version": "0.86.
|
|
3
|
+
"version": "0.86.3",
|
|
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": {
|
package/scss/_tokens.scss
CHANGED
|
@@ -478,6 +478,8 @@
|
|
|
478
478
|
--wui-fs-xs: clamp(0.75rem, 0.73rem + 0.1vw, 0.8125rem);
|
|
479
479
|
/// meaning: Small step of the fluid type scale; a product opts in per element.
|
|
480
480
|
--wui-fs-sm: clamp(0.8125rem, 0.79rem + 0.12vw, 0.875rem);
|
|
481
|
+
/// meaning: Step between the small and body sizes of the fluid type scale; a product opts in per element.
|
|
482
|
+
--wui-fs-smb: clamp(0.875rem, 0.8rem + 0.2vw, 0.9375rem);
|
|
481
483
|
/// meaning: Body-size step of the fluid type scale, close to Bootstrap's 1rem.
|
|
482
484
|
--wui-fs-base: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
|
|
483
485
|
/// meaning: Large step of the fluid type scale; a product opts in per element.
|
|
@@ -488,10 +490,14 @@
|
|
|
488
490
|
--wui-fs-2xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);
|
|
489
491
|
/// meaning: Triple extra-large step of the fluid type scale; a product opts in per element.
|
|
490
492
|
--wui-fs-3xl: clamp(1.875rem, 1.5rem + 1.75vw, 2.75rem);
|
|
493
|
+
/// meaning: Step between the triple and fourth extra-large sizes of the fluid type scale; a product opts in per element.
|
|
494
|
+
--wui-fs-48: clamp(2.5rem, 2.2rem + 1.5vw, 3rem);
|
|
491
495
|
/// meaning: Fourth extra-large step of the fluid type scale; a product opts in per element.
|
|
492
496
|
--wui-fs-4xl: clamp(2.25rem, 1.7rem + 2.5vw, 3.5rem);
|
|
493
497
|
/// meaning: Fifth extra-large step of the fluid type scale; a product opts in per element.
|
|
494
498
|
--wui-fs-5xl: clamp(2.75rem, 1.9rem + 3.75vw, 4.5rem);
|
|
499
|
+
/// meaning: Step between the fifth and sixth extra-large sizes of the fluid type scale; a product opts in per element.
|
|
500
|
+
--wui-fs-64: clamp(3rem, 2.6rem + 2.5vw, 4rem);
|
|
495
501
|
/// meaning: Sixth extra-large step of the fluid type scale; a product opts in per element.
|
|
496
502
|
--wui-fs-6xl: clamp(3.5rem, 2.2rem + 5.5vw, 6rem);
|
|
497
503
|
|
|
@@ -557,6 +563,21 @@
|
|
|
557
563
|
--wui-first-day: 1;
|
|
558
564
|
}
|
|
559
565
|
|
|
566
|
+
// The neutral surfaces follow the dark theme, so a neutral alert or table row stays dark on a dark
|
|
567
|
+
// page. The selectors match the dark theme (manual attribute, and the automatic media query).
|
|
568
|
+
:root[data-theme="dark"],
|
|
569
|
+
:root[data-bs-theme="dark"] {
|
|
570
|
+
--wui-neutral-bg-light: var(--wui-dark-bg-surface);
|
|
571
|
+
--wui-neutral-bg-dark: var(--wui-dark-bg-muted);
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
:root[data-theme="auto"] {
|
|
575
|
+
@media (prefers-color-scheme: dark) {
|
|
576
|
+
--wui-neutral-bg-light: var(--wui-dark-bg-surface);
|
|
577
|
+
--wui-neutral-bg-dark: var(--wui-dark-bg-muted);
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
|
|
560
581
|
// A finger needs 44px: on a phone-width or touch screen the default control takes the lg rung. The
|
|
561
582
|
// same query sizes the modal and drawer close buttons (wui/_overlays.scss).
|
|
562
583
|
@media (max-width: 575.98px), (pointer: coarse) {
|
package/scss/wui/_choice.scss
CHANGED
|
@@ -319,6 +319,13 @@
|
|
|
319
319
|
font-size: 16px;
|
|
320
320
|
border-radius: var(--wui-field-radius-lg);
|
|
321
321
|
}
|
|
322
|
+
// xl: the 52px select, the same height as an AppInput at size="xl". A literal height, as on the input.
|
|
323
|
+
.wui-search-select-xl .search-select-control {
|
|
324
|
+
height: 52px;
|
|
325
|
+
min-height: 52px;
|
|
326
|
+
font-size: 16px;
|
|
327
|
+
border-radius: var(--wui-field-radius-lg);
|
|
328
|
+
}
|
|
322
329
|
// Multi-select grows with its chips, so a size sets the FLOOR (min-height from the rule
|
|
323
330
|
// above) but never a fixed height — reset height:auto so a second row of chips can appear.
|
|
324
331
|
.search-select-sm .search-select-multi,
|
package/scss/wui/_controls.scss
CHANGED
|
@@ -423,6 +423,15 @@
|
|
|
423
423
|
font-size: 16px;
|
|
424
424
|
border-radius: var(--wui-field-radius-lg);
|
|
425
425
|
}
|
|
426
|
+
// xl (size="xl"): the 52px control for large forms. A literal height, because the control-height
|
|
427
|
+
// ladder stops at 44px and its tokens live in the theme's token file. A floating label needs no
|
|
428
|
+
// rule of its own: it centres on the field's box, so it stays inside at 52px.
|
|
429
|
+
.wui-input-xl {
|
|
430
|
+
height: 52px;
|
|
431
|
+
padding: 9px 16px;
|
|
432
|
+
font-size: 16px;
|
|
433
|
+
border-radius: var(--wui-field-radius-lg);
|
|
434
|
+
}
|
|
426
435
|
.textarea,
|
|
427
436
|
textarea.form-control {
|
|
428
437
|
height: auto;
|
|
@@ -850,7 +859,8 @@ $wui-field-error-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/
|
|
|
850
859
|
--wui-input-icon-size: 14px;
|
|
851
860
|
--wui-input-icon-gap: 10px;
|
|
852
861
|
}
|
|
853
|
-
.input-icon:has(> .input-lg)
|
|
862
|
+
.input-icon:has(> .input-lg),
|
|
863
|
+
.input-icon:has(> .wui-input-xl) {
|
|
854
864
|
--wui-input-icon-slot: 48px;
|
|
855
865
|
--wui-input-icon-size: 18px;
|
|
856
866
|
--wui-input-icon-gap: 14px;
|
|
@@ -1372,6 +1382,9 @@ wui-select[compact] {
|
|
|
1372
1382
|
.input-with-unit .num-input.input-lg {
|
|
1373
1383
|
height: calc(var(--wui-control-height-lg) - 2px);
|
|
1374
1384
|
}
|
|
1385
|
+
.input-with-unit .num-input.wui-input-xl {
|
|
1386
|
+
height: calc(52px - 2px);
|
|
1387
|
+
}
|
|
1375
1388
|
.input-with-unit .num-input:focus {
|
|
1376
1389
|
box-shadow: none;
|
|
1377
1390
|
}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
// ---- Default ring -----------------------------------------------------------
|
|
12
12
|
// Anything focusable that no partial styles gets the shared ring instead of the browser's.
|
|
13
13
|
// Zero specificity, so every component rule (including a panel's deliberate `outline: none`)
|
|
14
|
-
// still wins. Text fields are not in this list;
|
|
14
|
+
// still wins. Text fields are not in this list; their focus border marks them.
|
|
15
15
|
:where(
|
|
16
16
|
a[href],
|
|
17
17
|
area[href],
|
|
@@ -83,30 +83,8 @@
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
// ---- Text fields --------------------------------------------------------------
|
|
86
|
-
// A text field
|
|
87
|
-
//
|
|
88
|
-
// in the field. A field drawn inside a shell (phone, unit, stepper, input group, one-time code) rings
|
|
89
|
-
// the shell and the bare input inside it draws nothing; so does the borderless .input-bare, which
|
|
90
|
-
// sits inside another control's chrome.
|
|
91
|
-
:is(.form-control, .form-select, .input, .select, .textarea):not(.input-bare):focus-visible {
|
|
92
|
-
outline: var(--wui-focus-ring-width) solid var(--color-focus-ring);
|
|
93
|
-
outline-offset: var(--wui-focus-ring-offset);
|
|
94
|
-
}
|
|
95
|
-
.app-phone-number-input .phone-input-wrap:has(> .input:focus-visible),
|
|
96
|
-
.input-with-unit:has(.num-input:focus-visible),
|
|
97
|
-
.num-wrap:has(.num-input:focus-visible),
|
|
98
|
-
.wui-input-group:has(> :is(.form-control, .input):focus-visible),
|
|
99
|
-
.otp:has(.otp-field:focus-visible) .otp-slot.active {
|
|
100
|
-
outline: var(--wui-focus-ring-width) solid var(--color-focus-ring);
|
|
101
|
-
outline-offset: var(--wui-focus-ring-offset);
|
|
102
|
-
}
|
|
103
|
-
// After the ring rule: these tie with it on specificity, so source order decides.
|
|
104
|
-
.app-phone-number-input .phone-input-wrap > .input:focus-visible,
|
|
105
|
-
.input-with-unit .num-input:focus-visible,
|
|
106
|
-
.num-wrap .num-input:focus-visible,
|
|
107
|
-
.wui-input-group > :is(.form-control, .input):focus-visible {
|
|
108
|
-
outline: none;
|
|
109
|
-
}
|
|
86
|
+
// A text field (and a shell around one: phone, unit, stepper, input group, one-time code) draws no
|
|
87
|
+
// outer ring. Its soft focus border in _controls.scss is the focus cue.
|
|
110
88
|
|
|
111
89
|
// ---- Not obscured (WCAG 2.4.11) ---------------------------------------------
|
|
112
90
|
// A control focused by Tab scrolls clear of the sticky shell topbar (72px) and a sticky form
|
package/scss/wui/_shell.scss
CHANGED
|
@@ -384,7 +384,8 @@
|
|
|
384
384
|
align-items: center;
|
|
385
385
|
gap: 12px;
|
|
386
386
|
// Comfortable row: 44px, which with the 2px group gap is a 46px pitch. Compact sets its own below.
|
|
387
|
-
|
|
387
|
+
// An explicit itemHeight sets --wui-nav-item-height on the shell and replaces all three heights.
|
|
388
|
+
min-height: var(--wui-nav-item-height, var(--wui-control-height-lg));
|
|
388
389
|
padding: 9px 14px;
|
|
389
390
|
border-radius: var(--radius-xl);
|
|
390
391
|
corner-shape: squircle;
|
|
@@ -400,11 +401,11 @@
|
|
|
400
401
|
}
|
|
401
402
|
// Compact: 40px rows, a 42px pitch. The touch floor holds on a coarse pointer whatever the density.
|
|
402
403
|
.app-shell[data-density="compact"] .app-nav-item:not(.app-nav-subitem) {
|
|
403
|
-
min-height: 40px;
|
|
404
|
+
min-height: var(--wui-nav-item-height, 40px);
|
|
404
405
|
}
|
|
405
406
|
@media (pointer: coarse) {
|
|
406
407
|
.app-shell[data-density="compact"] .app-nav-item:not(.app-nav-subitem) {
|
|
407
|
-
min-height: var(--wui-control-height-lg);
|
|
408
|
+
min-height: var(--wui-nav-item-height, var(--wui-control-height-lg));
|
|
408
409
|
}
|
|
409
410
|
}
|
|
410
411
|
.app-nav-item:hover {
|
package/scss/wui/_utilities.scss
CHANGED
|
@@ -819,6 +819,16 @@
|
|
|
819
819
|
// AA-safe text colour for the heading and an accented <strong>.
|
|
820
820
|
--alert-text: var(--color-danger-text-on-soft);
|
|
821
821
|
}
|
|
822
|
+
// Neutral (`variant="neutral"`): a plain notice with no semantic colour. It sits on the neutral surface
|
|
823
|
+
// pair, its body and heading take the same ink as the status variants, and its edge is the muted text
|
|
824
|
+
// colour, so nothing in it reads as a status.
|
|
825
|
+
.alert-neutral {
|
|
826
|
+
--bs-alert-bg: var(--wui-neutral-bg-light);
|
|
827
|
+
--bs-alert-border-color: var(--wui-neutral-bg-dark);
|
|
828
|
+
--bs-alert-color: var(--color-text-body);
|
|
829
|
+
--alert-accent: var(--color-text-muted);
|
|
830
|
+
--alert-text: var(--color-text-body);
|
|
831
|
+
}
|
|
822
832
|
|
|
823
833
|
// AppErrorSummary: a danger alert holding a heading and one link per field error. It takes
|
|
824
834
|
// focus when it appears, so its focus ring is the alert's own edge rather than an outline.
|
|
@@ -1001,6 +1011,9 @@
|
|
|
1001
1011
|
.alert-danger .alert-heading {
|
|
1002
1012
|
color: var(--alert-text);
|
|
1003
1013
|
}
|
|
1014
|
+
.alert-neutral .alert-heading {
|
|
1015
|
+
color: var(--alert-text);
|
|
1016
|
+
}
|
|
1004
1017
|
|
|
1005
1018
|
// Heading and body type step with the size: sm 13px / 11px, md 14px / 12px (the base above),
|
|
1006
1019
|
// lg 16px / 14px. Declared after the base heading rule so these override it.
|
package/token-meanings.json
CHANGED
|
@@ -180,12 +180,15 @@
|
|
|
180
180
|
"--wui-font-mono": "Monospace typeface for code, identifiers and figures that must line up.",
|
|
181
181
|
"--wui-fs-2xl": "Double extra-large step of the fluid type scale; a product opts in per element.",
|
|
182
182
|
"--wui-fs-3xl": "Triple extra-large step of the fluid type scale; a product opts in per element.",
|
|
183
|
+
"--wui-fs-48": "Step between the triple and fourth extra-large sizes of the fluid type scale; a product opts in per element.",
|
|
183
184
|
"--wui-fs-4xl": "Fourth extra-large step of the fluid type scale; a product opts in per element.",
|
|
184
185
|
"--wui-fs-5xl": "Fifth extra-large step of the fluid type scale; a product opts in per element.",
|
|
186
|
+
"--wui-fs-64": "Step between the fifth and sixth extra-large sizes of the fluid type scale; a product opts in per element.",
|
|
185
187
|
"--wui-fs-6xl": "Sixth extra-large step of the fluid type scale; a product opts in per element.",
|
|
186
188
|
"--wui-fs-base": "Body-size step of the fluid type scale, close to Bootstrap's 1rem.",
|
|
187
189
|
"--wui-fs-lg": "Large step of the fluid type scale; a product opts in per element.",
|
|
188
190
|
"--wui-fs-sm": "Small step of the fluid type scale; a product opts in per element.",
|
|
191
|
+
"--wui-fs-smb": "Step between the small and body sizes of the fluid type scale; a product opts in per element.",
|
|
189
192
|
"--wui-fs-xl": "Extra-large step of the fluid type scale; a product opts in per element.",
|
|
190
193
|
"--wui-fs-xs": "Extra-small step of the fluid type scale; a product opts in per element.",
|
|
191
194
|
"--wui-hero-gradient": "Background gradient of the hero band on marketing pages.",
|