@webority/theme 0.172.0 → 0.173.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/dist/webority-theme.css +1 -1
- package/package.json +3 -3
- package/scss/_bootstrap.generated.scss +1 -1
- package/scss/_tokens-modes.generated.scss +1 -1
- package/scss/_tokens.generated.scss +1 -1
- package/scss/wui/_command-palette.scss +5 -3
- package/scss/wui/_data.scss +0 -1
- package/scss/wui/_drawer.scss +8 -3
- package/scss/wui/_overlays.scss +8 -7
- package/scss/wui/_shell.scss +18 -46
- package/scss/wui/_utilities.scss +26 -23
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webority/theme",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.173.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.
|
|
84
|
-
"@webority/tokens": "0.
|
|
83
|
+
"@webority/biome-config": "0.173.0",
|
|
84
|
+
"@webority/tokens": "0.173.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.
|
|
1
|
+
// Generated by @webority/tokens 0.173.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;
|
|
@@ -10,17 +10,19 @@
|
|
|
10
10
|
// Part of the wui-components layer, see _wui-components.scss for load order.
|
|
11
11
|
|
|
12
12
|
// Anchored near the top rather than centred, so the input stays put while results grow and
|
|
13
|
-
// shrink underneath it.
|
|
13
|
+
// shrink underneath it. The offset is one property, so the card height and the top space never add past the window.
|
|
14
14
|
dialog.wui-modal-shell[open]:has(.wui-cmd-card) {
|
|
15
|
+
--wui-cmd-top: max(20px, min(12dvh, 120px));
|
|
15
16
|
align-items: flex-start;
|
|
16
|
-
padding-top:
|
|
17
|
+
padding-top: var(--wui-cmd-top);
|
|
18
|
+
padding-bottom: var(--wui-cmd-top);
|
|
17
19
|
}
|
|
18
20
|
// As a flex item the wrapper's min-height would be its content height; zero keeps the block-box value it always had.
|
|
19
21
|
dialog.wui-modal-shell[open]:has(.wui-cmd-card) .modal-dialog.wui-rb-dialog {
|
|
20
22
|
min-height: 0;
|
|
21
23
|
}
|
|
22
24
|
.wui-modal.wui-cmd-card {
|
|
23
|
-
max-height: min(560px, calc(
|
|
25
|
+
max-height: min(560px, calc(100dvh - 2 * var(--wui-cmd-top)));
|
|
24
26
|
}
|
|
25
27
|
// The list scrolls, not the body: the input and the footer stay pinned.
|
|
26
28
|
.wui-cmd-card > .wui-modal-body {
|
package/scss/wui/_data.scss
CHANGED
|
@@ -1038,7 +1038,6 @@
|
|
|
1038
1038
|
// Pinned header (`maxHeight`): the wrap becomes the scroll box and the header sticks to its top.
|
|
1039
1039
|
.table-wrap.wui-table-scroll {
|
|
1040
1040
|
overflow-y: auto;
|
|
1041
|
-
overscroll-behavior-y: contain;
|
|
1042
1041
|
}
|
|
1043
1042
|
.table-wrap.wui-table-scroll .table-ledger thead th {
|
|
1044
1043
|
position: sticky;
|
package/scss/wui/_drawer.scss
CHANGED
|
@@ -172,19 +172,24 @@ dialog.wui-drawer-panel[data-wui-closing]::backdrop {
|
|
|
172
172
|
@include wui-drawer-side;
|
|
173
173
|
}
|
|
174
174
|
// A menu panel fills a phone, as the side panel always did below sm.
|
|
175
|
+
// 100vw from the left edge, not 100%: the document reserves a stable scrollbar gutter, which a fixed
|
|
176
|
+
// box's 100% leaves uncovered, so the panel would stop short of the right edge (as the fullscreen modal).
|
|
175
177
|
@include media-breakpoint-down(sm) {
|
|
176
178
|
.wui-drawer[no-sheet] .wui-drawer-panel {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
+
left: 0;
|
|
180
|
+
right: auto;
|
|
181
|
+
width: 100vw;
|
|
182
|
+
max-width: 100vw;
|
|
179
183
|
}
|
|
180
184
|
}
|
|
181
185
|
|
|
182
186
|
// Bottom sheet: below md, unless the drawer is `no-sheet`.
|
|
183
187
|
@include media-breakpoint-down(md) {
|
|
184
188
|
.wui-drawer:not([no-sheet]) {
|
|
189
|
+
// 100vw, not right: 0, for the same scrollbar gutter as the menu panel above.
|
|
185
190
|
.wui-drawer-panel {
|
|
186
191
|
left: 0;
|
|
187
|
-
|
|
192
|
+
width: 100vw;
|
|
188
193
|
bottom: 0;
|
|
189
194
|
height: calc(var(--wui-drawer-max, 90) * 1dvh);
|
|
190
195
|
max-height: 100dvh;
|
package/scss/wui/_overlays.scss
CHANGED
|
@@ -132,6 +132,7 @@ dialog.wui-modal-shell[open] {
|
|
|
132
132
|
// would also hide a select menu or popover that a control in the body draws past the body's edge.
|
|
133
133
|
// Their opacity follows the body's own scroll timeline, so a body that does not scroll has an
|
|
134
134
|
// inactive timeline and shows neither fade, with no script on either surface.
|
|
135
|
+
// The fade is shorter than a line and never fully opaque, so text under it stays readable.
|
|
135
136
|
// The negative margins take the fades out of the layout. In a body that spaces its children with a
|
|
136
137
|
// flex gap, each fade would also add one gap, so such a body sets --wui-scroll-fade-gap to its gap.
|
|
137
138
|
@supports (animation-timeline: scroll()) {
|
|
@@ -141,7 +142,7 @@ dialog.wui-modal-shell[open] {
|
|
|
141
142
|
position: sticky;
|
|
142
143
|
z-index: 1;
|
|
143
144
|
display: block;
|
|
144
|
-
height: var(--wui-scroll-fade-size, var(--wui-space-
|
|
145
|
+
height: var(--wui-scroll-fade-size, var(--wui-space-md));
|
|
145
146
|
grid-column: 1 / -1;
|
|
146
147
|
pointer-events: none;
|
|
147
148
|
opacity: 0;
|
|
@@ -153,16 +154,16 @@ dialog.wui-modal-shell[open] {
|
|
|
153
154
|
}
|
|
154
155
|
:is(.wui-modal-body, .modal-body, .wui-drawer-body)::before {
|
|
155
156
|
top: 0;
|
|
156
|
-
margin-bottom: calc(-1 * (var(--wui-scroll-fade-size, var(--wui-space-
|
|
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-
|
|
157
|
+
margin-bottom: calc(-1 * (var(--wui-scroll-fade-size, var(--wui-space-md)) + var(--wui-scroll-fade-gap, var(--wui-space-none))));
|
|
158
|
+
background: linear-gradient(to bottom, color-mix(in srgb, var(--wui-scroll-fade-surface, var(--color-surface)) 70%, transparent), transparent);
|
|
159
|
+
animation-range: 0 var(--wui-scroll-fade-size, var(--wui-space-md));
|
|
159
160
|
}
|
|
160
161
|
:is(.wui-modal-body, .modal-body, .wui-drawer-body)::after {
|
|
161
162
|
bottom: 0;
|
|
162
|
-
margin-top: calc(-1 * (var(--wui-scroll-fade-size, var(--wui-space-
|
|
163
|
-
background: linear-gradient(to top, var(--wui-scroll-fade-surface, var(--color-surface)), transparent);
|
|
163
|
+
margin-top: calc(-1 * (var(--wui-scroll-fade-size, var(--wui-space-md)) + var(--wui-scroll-fade-gap, var(--wui-space-none))));
|
|
164
|
+
background: linear-gradient(to top, color-mix(in srgb, var(--wui-scroll-fade-surface, var(--color-surface)) 70%, transparent), transparent);
|
|
164
165
|
animation-name: wui-scroll-fade-out;
|
|
165
|
-
animation-range: calc(100% - var(--wui-scroll-fade-size, var(--wui-space-
|
|
166
|
+
animation-range: calc(100% - var(--wui-scroll-fade-size, var(--wui-space-md))) 100%;
|
|
166
167
|
}
|
|
167
168
|
// A sticky form action bar already marks the foot, and a fade over it would dim its buttons.
|
|
168
169
|
:is(.wui-modal-body, .modal-body, .wui-drawer-body):has(.form-actions-sticky)::after {
|
package/scss/wui/_shell.scss
CHANGED
|
@@ -366,55 +366,27 @@
|
|
|
366
366
|
flex-direction: column;
|
|
367
367
|
gap: 2px;
|
|
368
368
|
overflow-y: auto;
|
|
369
|
-
//
|
|
370
|
-
|
|
371
|
-
scrollbar-
|
|
369
|
+
// The native thin scrollbar is used so it can be dragged; its thumb shows on hover or focus.
|
|
370
|
+
scrollbar-width: thin;
|
|
371
|
+
scrollbar-color: transparent transparent;
|
|
372
|
+
}
|
|
373
|
+
.app-sidebar-scroll:hover,
|
|
374
|
+
.app-sidebar-scroll:focus-within {
|
|
375
|
+
scrollbar-color: var(--color-scrollbar) transparent;
|
|
372
376
|
}
|
|
373
377
|
.app-sidebar-scroll::-webkit-scrollbar {
|
|
374
|
-
|
|
375
|
-
width: 0;
|
|
376
|
-
height: 0;
|
|
377
|
-
}
|
|
378
|
-
// Scroll thumb for a long menu, shown on hover or keyboard focus and only when the links
|
|
379
|
-
// overflow. It is a sticky pseudo-element over the nav's right edge, moved by the nav's own
|
|
380
|
-
// scroll timeline, so it takes no width. The negative bottom margin cancels its height and the
|
|
381
|
-
// flex gap, so no link moves. Browsers without scroll timelines keep the hidden scrollbar.
|
|
382
|
-
@supports (animation-timeline: scroll()) {
|
|
383
|
-
.app-sidebar-scroll {
|
|
384
|
-
container-type: scroll-state;
|
|
385
|
-
}
|
|
386
|
-
.app-sidebar-scroll::before {
|
|
387
|
-
content: "";
|
|
388
|
-
position: sticky;
|
|
389
|
-
top: 0;
|
|
390
|
-
flex: none;
|
|
391
|
-
align-self: flex-end;
|
|
392
|
-
width: 6px;
|
|
393
|
-
height: 48px;
|
|
394
|
-
margin-bottom: -50px;
|
|
395
|
-
border-radius: 9999px;
|
|
396
|
-
background: var(--wui-scrollbar);
|
|
397
|
-
visibility: hidden;
|
|
398
|
-
opacity: 0;
|
|
399
|
-
pointer-events: none;
|
|
400
|
-
transition: opacity var(--wui-duration-default) var(--wui-ease-ui);
|
|
401
|
-
animation: wui-sidebar-thumb var(--wui-ease-linear) both;
|
|
402
|
-
animation-timeline: scroll(nearest);
|
|
403
|
-
}
|
|
404
|
-
@container scroll-state(scrollable: y) {
|
|
405
|
-
.app-sidebar-scroll::before {
|
|
406
|
-
visibility: visible;
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
.app-sidebar-scroll:hover::before,
|
|
410
|
-
.app-sidebar-scroll:focus-within::before {
|
|
411
|
-
opacity: 1;
|
|
412
|
-
}
|
|
378
|
+
width: 6px;
|
|
413
379
|
}
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
380
|
+
.app-sidebar-scroll::-webkit-scrollbar-track {
|
|
381
|
+
background: transparent;
|
|
382
|
+
}
|
|
383
|
+
.app-sidebar-scroll::-webkit-scrollbar-thumb {
|
|
384
|
+
background: transparent;
|
|
385
|
+
border-radius: 3px;
|
|
386
|
+
}
|
|
387
|
+
.app-sidebar-scroll:hover::-webkit-scrollbar-thumb,
|
|
388
|
+
.app-sidebar-scroll:focus-within::-webkit-scrollbar-thumb {
|
|
389
|
+
background: var(--color-scrollbar);
|
|
418
390
|
}
|
|
419
391
|
// Between the brand row and the nav — a workspace/tenant switcher, an environment
|
|
420
392
|
// badge. It must not shrink when the nav overflows. The full card has no place on
|
package/scss/wui/_utilities.scss
CHANGED
|
@@ -885,6 +885,10 @@
|
|
|
885
885
|
// the heading to the variant. Only the heading takes the variant colour — the body
|
|
886
886
|
// stays dark ink so the message reads calmly.
|
|
887
887
|
.alert {
|
|
888
|
+
// The title line and the stacked badge read these, so the badge stays centred on that line.
|
|
889
|
+
--alert-title-size: 14px;
|
|
890
|
+
--alert-title-leading: 1.3;
|
|
891
|
+
--alert-badge-size: 24px;
|
|
888
892
|
--bs-alert-border-radius: 8px;
|
|
889
893
|
border-radius: 8px;
|
|
890
894
|
padding: 16px 18px;
|
|
@@ -1007,6 +1011,7 @@
|
|
|
1007
1011
|
// same dark ink and regular weight as md (only the heading is bold and variant-coloured); the
|
|
1008
1012
|
// badge stays the single-line 20px base.
|
|
1009
1013
|
.alert-sm {
|
|
1014
|
+
--alert-title-size: 13px;
|
|
1010
1015
|
padding: 9px 14px;
|
|
1011
1016
|
}
|
|
1012
1017
|
.alert-sm.alert-has-icon {
|
|
@@ -1073,18 +1078,21 @@
|
|
|
1073
1078
|
|
|
1074
1079
|
.alert-has-icon {
|
|
1075
1080
|
display: flex;
|
|
1076
|
-
//
|
|
1077
|
-
// centred against the one line. A heading+body STACK top-aligns instead — the
|
|
1078
|
-
// wrapper adds `.alert-stack` when both a title and a body are present.
|
|
1081
|
+
// A single line centres the badge on that line.
|
|
1079
1082
|
align-items: center;
|
|
1080
1083
|
gap: 14px;
|
|
1081
1084
|
}
|
|
1082
|
-
// A title+body stack
|
|
1083
|
-
//
|
|
1084
|
-
|
|
1085
|
+
// A title+body stack aligns the badge to the title line, not the whole block: the top
|
|
1086
|
+
// margin puts the badge's centre on the centre of the first heading line.
|
|
1087
|
+
.alert-has-icon.alert-stack {
|
|
1088
|
+
align-items: flex-start;
|
|
1089
|
+
}
|
|
1090
|
+
// A title+body stack gets the larger badge (22px glyph); a lone line keeps the smaller
|
|
1091
|
+
// base below.
|
|
1085
1092
|
.alert-has-icon.alert-stack .alert-icon {
|
|
1086
|
-
width:
|
|
1087
|
-
height:
|
|
1093
|
+
width: var(--alert-badge-size);
|
|
1094
|
+
height: var(--alert-badge-size);
|
|
1095
|
+
margin-top: calc((var(--alert-title-size) * var(--alert-title-leading) - var(--alert-badge-size)) / 2);
|
|
1088
1096
|
}
|
|
1089
1097
|
|
|
1090
1098
|
// The leading glyph is a solid circular badge: variant fill, white glyph centred, with
|
|
@@ -1134,9 +1142,9 @@
|
|
|
1134
1142
|
// Coloured, bold heading line (Bootstrap's own rule is just `color: inherit`).
|
|
1135
1143
|
.alert .alert-heading {
|
|
1136
1144
|
margin-bottom: 2px;
|
|
1137
|
-
font-size:
|
|
1145
|
+
font-size: var(--alert-title-size);
|
|
1138
1146
|
font-weight: 600;
|
|
1139
|
-
line-height:
|
|
1147
|
+
line-height: var(--alert-title-leading);
|
|
1140
1148
|
}
|
|
1141
1149
|
// Use the AA-safe `-text` tokens (not the vivid `-active`, which fails AA as text on
|
|
1142
1150
|
// the soft `-10` background); the badge fill / halo keep the vivid `-active`.
|
|
@@ -1156,24 +1164,19 @@
|
|
|
1156
1164
|
color: var(--alert-text);
|
|
1157
1165
|
}
|
|
1158
1166
|
|
|
1159
|
-
// Heading
|
|
1160
|
-
// lg 16px / 14px. Declared after the base heading rule so these override it.
|
|
1161
|
-
.alert-sm .alert-heading {
|
|
1162
|
-
font-size: 13px;
|
|
1163
|
-
}
|
|
1164
|
-
|
|
1167
|
+
// Heading type steps with the size through --alert-title-size: sm 13px, md 14px, lg 16px.
|
|
1165
1168
|
// Large size (`size="lg"`): roomier padding, a larger heading and body, and a larger badge
|
|
1166
|
-
// (28px, or 32px for a title+body stack). Declared after the
|
|
1167
|
-
// overrides them.
|
|
1169
|
+
// (28px, or 32px for a title+body stack). Declared after the stack rules so it overrides them.
|
|
1168
1170
|
.alert-lg {
|
|
1171
|
+
--alert-title-size: 16px;
|
|
1169
1172
|
padding: 20px 22px;
|
|
1170
1173
|
}
|
|
1174
|
+
.alert-lg.alert-stack {
|
|
1175
|
+
--alert-badge-size: 32px;
|
|
1176
|
+
}
|
|
1171
1177
|
.alert-lg.alert-has-icon {
|
|
1172
1178
|
gap: 16px;
|
|
1173
1179
|
}
|
|
1174
|
-
.alert-lg .alert-heading {
|
|
1175
|
-
font-size: 16px;
|
|
1176
|
-
}
|
|
1177
1180
|
.alert-lg .alert-content {
|
|
1178
1181
|
font-size: 14px;
|
|
1179
1182
|
}
|
|
@@ -1182,8 +1185,8 @@
|
|
|
1182
1185
|
height: 28px;
|
|
1183
1186
|
}
|
|
1184
1187
|
.alert-lg.alert-has-icon.alert-stack .alert-icon {
|
|
1185
|
-
width:
|
|
1186
|
-
height:
|
|
1188
|
+
width: var(--alert-badge-size);
|
|
1189
|
+
height: var(--alert-badge-size);
|
|
1187
1190
|
}
|
|
1188
1191
|
// The accent's padding per size: the size's own padding + the 1px the border no longer takes,
|
|
1189
1192
|
// + the 4px edge on the left. Two-class selectors, so they beat the size blocks above.
|