@webority/theme 0.163.0 → 0.164.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/README.md +21 -21
- package/dist/purge-safelist.json +10 -11
- package/dist/webority-theme.css +1 -1
- package/package.json +6 -5
- package/scss/_bootstrap.generated.scss +1 -1
- package/scss/_components.scss +38 -34
- package/scss/_flags.scss +3 -3
- package/scss/_marketing.scss +6 -6
- package/scss/_tokens.generated.scss +1 -1
- package/scss/_variables.scss +19 -19
- package/scss/_wui-components.scss +2 -0
- package/scss/_wui-core.scss +2 -0
- package/scss/wui/_card.scss +8 -8
- package/scss/wui/_choice.scss +4 -4
- package/scss/wui/_command-palette.scss +7 -2
- package/scss/wui/_comment-thread.scss +3 -3
- package/scss/wui/_context-menu.scss +14 -10
- package/scss/wui/_controls.scss +74 -73
- package/scss/wui/_data.scss +19 -33
- package/scss/wui/_dialog-motion.scss +14 -19
- package/scss/wui/_disclosure.scss +3 -3
- package/scss/wui/_display.scss +56 -56
- package/scss/wui/_dock.scss +4 -4
- package/scss/wui/_drawer.scss +18 -15
- package/scss/wui/_empty-state.scss +4 -4
- package/scss/wui/_file-viewer.scss +14 -2
- package/scss/wui/_filter-popover.scss +1 -1
- package/scss/wui/_floating.scss +1 -1
- package/scss/wui/_flow.scss +33 -33
- package/scss/wui/_hover-card.scss +6 -5
- package/scss/wui/_inline-edit.scss +1 -1
- package/scss/wui/_kanban.scss +1 -1
- package/scss/wui/_lightbox.scss +20 -9
- package/scss/wui/_media.scss +1 -1
- package/scss/wui/_mention-input.scss +3 -3
- package/scss/wui/_menu-motion.scss +23 -23
- package/scss/wui/_modal-remote.scss +3 -3
- package/scss/wui/_native-overlay.scss +76 -0
- package/scss/wui/_navigation-menu.scss +13 -17
- package/scss/wui/_navigation.scss +25 -1
- package/scss/wui/_notification-center.scss +6 -9
- package/scss/wui/_overlay-reset.scss +15 -0
- package/scss/wui/_overlays.scss +139 -99
- package/scss/wui/_page-header-bar.scss +24 -0
- package/scss/wui/_scrollbar.scss +1 -1
- package/scss/wui/_sections.scss +3 -3
- package/scss/wui/_select.scss +16 -10
- package/scss/wui/_shell-parts.scss +2 -2
- package/scss/wui/_shell.scss +131 -28
- package/scss/wui/_shortcuts.scss +3 -15
- package/scss/wui/_sortable.scss +1 -1
- package/scss/wui/_tone-pill.scss +2 -2
- package/scss/wui/_toolbar.scss +3 -3
- package/scss/wui/_truncate.scss +2 -2
- package/scss/wui/_typography.scss +8 -8
- package/scss/wui/_utilities.scss +4 -5
- package/scss/wui/_whats-new.scss +6 -7
- package/scss/wui/_workspace.scss +34 -9
- package/scss/wui/tour/_base.scss +11 -1
- package/scss/wui/tour/_end.scss +6 -0
- package/scss/wui/tour/_media.scss +1 -1
- package/scss/wui/tour/_placement.scss +6 -0
|
@@ -148,7 +148,6 @@ button.wui-reaction:hover,
|
|
|
148
148
|
.wui-reaction-picker {
|
|
149
149
|
position: fixed;
|
|
150
150
|
z-index: var(--wui-z-menu);
|
|
151
|
-
display: flex;
|
|
152
151
|
gap: 2px;
|
|
153
152
|
padding: 4px;
|
|
154
153
|
background: var(--color-surface);
|
|
@@ -157,8 +156,9 @@ button.wui-reaction:hover,
|
|
|
157
156
|
corner-shape: squircle;
|
|
158
157
|
box-shadow: var(--wui-shadow-popover);
|
|
159
158
|
}
|
|
160
|
-
.
|
|
161
|
-
|
|
159
|
+
// An author display would override the closed popover's display: none, so it applies only when open.
|
|
160
|
+
.wui-reaction-picker:popover-open {
|
|
161
|
+
display: flex;
|
|
162
162
|
}
|
|
163
163
|
.wui-reaction-choice {
|
|
164
164
|
display: inline-flex;
|
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
// AppContextMenu / <app-context-menu> / <wui-context-menu>: a right-click menu over a region.
|
|
5
5
|
// The panel is a Bootstrap .dropdown-menu with .dropdown-item rows, so the look, the danger tone
|
|
6
6
|
// and the icon treatment come from the shared dropdown styles; this partial only adds what a
|
|
7
|
-
// menu opened at the pointer needs. The
|
|
8
|
-
// which a React re-render would reset)
|
|
9
|
-
// clipping ancestor. Every colour is a theme token.
|
|
7
|
+
// menu opened at the pointer needs. The panel is a popover, shown in the top layer while
|
|
8
|
+
// :popover-open (never `.show`, which a React re-render would reset). Every colour is a theme token.
|
|
10
9
|
//
|
|
11
10
|
// Part of the wui-components layer, see _wui-components.scss for load order.
|
|
12
11
|
|
|
@@ -17,15 +16,18 @@ wui-context-menu {
|
|
|
17
16
|
|
|
18
17
|
.dropdown-menu.wui-context-menu-panel {
|
|
19
18
|
position: fixed;
|
|
19
|
+
// The popover UA rules centre a popover with inset and margin; the anchor places this one.
|
|
20
|
+
inset: auto;
|
|
21
|
+
margin: 0;
|
|
20
22
|
// Above a modal, like every other portalled menu (see --wui-z-* in _tokens.scss).
|
|
21
23
|
z-index: var(--wui-z-menu);
|
|
22
|
-
// Never taller than the screen;
|
|
24
|
+
// Never taller than the screen; openAnchoredPopover clamps it further when the pointer is low.
|
|
23
25
|
max-height: calc(100vh - var(--wui-space-sm));
|
|
24
26
|
// Focus lands on the panel itself after a pointer open; the rows carry the visible focus.
|
|
25
27
|
outline: none;
|
|
26
28
|
transform-origin: top left;
|
|
27
29
|
|
|
28
|
-
|
|
30
|
+
&:popover-open {
|
|
29
31
|
display: block;
|
|
30
32
|
animation: var(--wui-menu-anim) var(--wui-menu-anim-duration) var(--wui-menu-anim-ease);
|
|
31
33
|
}
|
|
@@ -52,16 +54,18 @@ wui-context-menu {
|
|
|
52
54
|
}
|
|
53
55
|
}
|
|
54
56
|
|
|
55
|
-
// A submenu's panel is a
|
|
56
|
-
// above; it is placed beside its row
|
|
57
|
+
// A submenu's panel is a popover nested in the root panel, so it takes the rows and disabled rules
|
|
58
|
+
// above; it is placed beside its row and opens toward the side it chose.
|
|
57
59
|
.dropdown-menu.wui-context-menu-subpanel {
|
|
58
60
|
position: fixed;
|
|
61
|
+
inset: auto;
|
|
62
|
+
margin: 0;
|
|
59
63
|
z-index: var(--wui-z-menu);
|
|
60
64
|
max-height: calc(100vh - var(--wui-space-sm));
|
|
61
65
|
outline: none;
|
|
62
66
|
transform-origin: top left;
|
|
63
67
|
|
|
64
|
-
|
|
68
|
+
&:popover-open {
|
|
65
69
|
display: block;
|
|
66
70
|
animation: var(--wui-menu-anim) var(--wui-menu-anim-duration) var(--wui-menu-anim-ease);
|
|
67
71
|
}
|
|
@@ -124,8 +128,8 @@ wui-context-menu {
|
|
|
124
128
|
}
|
|
125
129
|
|
|
126
130
|
@media (prefers-reduced-motion: reduce) {
|
|
127
|
-
.dropdown-menu.wui-context-menu-panel
|
|
128
|
-
.dropdown-menu.wui-context-menu-subpanel
|
|
131
|
+
.dropdown-menu.wui-context-menu-panel:popover-open,
|
|
132
|
+
.dropdown-menu.wui-context-menu-subpanel:popover-open {
|
|
129
133
|
animation: none;
|
|
130
134
|
}
|
|
131
135
|
}
|
package/scss/wui/_controls.scss
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// Prefer .wui-* for new chrome; legacy bare names here are frozen until a BREAKING rename.
|
|
5
5
|
// Checkbox & radio, field/input, status badge, choice chip.
|
|
6
6
|
//
|
|
7
|
-
// Part of the wui-components layer
|
|
7
|
+
// Part of the wui-components layer. See _wui-components.scss for the whole
|
|
8
8
|
// picture and the load order. Order within the layer is LOAD-BEARING: these
|
|
9
9
|
// partials are a split of one stylesheet, not independent modules, so a rule
|
|
10
10
|
// here may be overridden by a later partial. Never reorder the imports.
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
// Bootstrap `.form-check` + `.form-check-input` are the public selection skin
|
|
14
14
|
// (AppCheckbox / AppRadio / AppSwitch). `.wui-check` / `.wui-radio` are aliases
|
|
15
15
|
// for the same glyph (AppDataTable select column + legacy `.wui-control`
|
|
16
|
-
// markup)
|
|
16
|
+
// markup), never a second look. One 20px brand glyph language.
|
|
17
17
|
//
|
|
18
18
|
// Layout wrappers:
|
|
19
|
-
// .form-check / .form-check-label
|
|
20
|
-
// .wui-control / .wui-control-label
|
|
19
|
+
// .form-check / .form-check-label: App* path
|
|
20
|
+
// .wui-control / .wui-control-label: optional compact label wrap (alias)
|
|
21
21
|
|
|
22
22
|
.form-check,
|
|
23
23
|
.wui-control {
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
user-select: none;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
// The block variant is a 2-column grid
|
|
61
|
+
// The block variant is a 2-column grid: glyph in column 1, label in column 2, so a long
|
|
62
62
|
// label WRAPS inside its own column and stays beside the glyph, never dropping onto a second
|
|
63
63
|
// line below it (a flex-wrap row breaks lines by each item's max-content size, so any label
|
|
64
64
|
// longer than the remaining width is bumped below the glyph regardless of flex sizing). The
|
|
@@ -190,7 +190,7 @@
|
|
|
190
190
|
margin-bottom: 0;
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
// Glyph
|
|
193
|
+
// Glyph: shared by BS form-check-input and the wui-check alias.
|
|
194
194
|
.form-check-input,
|
|
195
195
|
.wui-check,
|
|
196
196
|
.wui-radio {
|
|
@@ -246,7 +246,7 @@
|
|
|
246
246
|
box-shadow: none;
|
|
247
247
|
}
|
|
248
248
|
// A plain MOUSE click must leave NO lingering focus/active glow, ring, border tint or
|
|
249
|
-
// darkening
|
|
249
|
+
// darkening; Bootstrap paints all of them on :focus/:active. Neutralise them for pointer
|
|
250
250
|
// focus + active while the keyboard ring above stays, so a mouse click just toggles cleanly.
|
|
251
251
|
.form-check-input:focus:not(:focus-visible),
|
|
252
252
|
.wui-check:focus:not(:focus-visible),
|
|
@@ -305,7 +305,7 @@
|
|
|
305
305
|
color: var(--color-text-subtle);
|
|
306
306
|
}
|
|
307
307
|
|
|
308
|
-
// Compact row-select
|
|
308
|
+
// Compact row-select: ONLY inside the select column (AppDataTable / Razor
|
|
309
309
|
// data-table → `.wui-select-cell`). Scope is load-bearing.
|
|
310
310
|
.wui-select-cell .wui-check,
|
|
311
311
|
.wui-select-cell .form-check-input {
|
|
@@ -341,17 +341,17 @@
|
|
|
341
341
|
border-color: transparent;
|
|
342
342
|
background-color: var(--color-primary);
|
|
343
343
|
background-position: right center;
|
|
344
|
-
// Re-assert the knob
|
|
344
|
+
// Re-assert the knob. The checkbox :checked tick has equal specificity.
|
|
345
345
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='7' fill='white'/%3E%3C/svg%3E");
|
|
346
346
|
}
|
|
347
|
-
// On a mouse click the switch's track border reverts to its resting transparent
|
|
347
|
+
// On a mouse click the switch's track border reverts to its resting transparent; Bootstrap's
|
|
348
348
|
// :focus otherwise tints it brand-blue, leaving a coloured outline after the click. The shared
|
|
349
349
|
// :focus:not(:focus-visible) rule already dropped the glow; this drops the border tint too.
|
|
350
350
|
.form-switch .form-check-input:focus:not(:focus-visible) {
|
|
351
351
|
border-color: transparent;
|
|
352
352
|
}
|
|
353
353
|
|
|
354
|
-
// Circular variant (shape="circle")
|
|
354
|
+
// Circular variant (shape="circle"): a compact round on/off button instead of a sliding
|
|
355
355
|
// pill. The track is a square-sized circle; the knob dot stays CENTRED in both states (no
|
|
356
356
|
// left/right slide) and the fill flips to primary when on. Placed after the base switch
|
|
357
357
|
// block so the equal-specificity :checked position override wins on source order.
|
|
@@ -434,7 +434,7 @@
|
|
|
434
434
|
// ── Field / Input ──
|
|
435
435
|
// Bootstrap `.form-control` / `.form-select` are the field skin. `.input` /
|
|
436
436
|
// `.select` / `.textarea` are aliases (and App* size/shell hooks) that MUST
|
|
437
|
-
// share the same chrome
|
|
437
|
+
// share the same chrome; never a second look. The only WUI
|
|
438
438
|
// deltas on top of Bootstrap's $input-* vars: shared control height, hover
|
|
439
439
|
// fill, brand-border focus (no glow), soft invalid border.
|
|
440
440
|
//
|
|
@@ -443,7 +443,7 @@
|
|
|
443
443
|
// border + a soft focus ring on focus. "Filled" is the same resting look with a
|
|
444
444
|
// value; the state ladder is default/filled → hover → focus → disabled → error.
|
|
445
445
|
//
|
|
446
|
-
// Keep shell utilities (.input-wrap, .input-icon, .input-sm, …)
|
|
446
|
+
// Keep shell utilities (.input-wrap, .input-icon, .input-sm, …). Those are
|
|
447
447
|
// structure, not a parallel visual system.
|
|
448
448
|
.form-control,
|
|
449
449
|
.form-select,
|
|
@@ -489,7 +489,7 @@ textarea.form-control {
|
|
|
489
489
|
line-height: 1.5;
|
|
490
490
|
resize: vertical;
|
|
491
491
|
}
|
|
492
|
-
// Auto-grow
|
|
492
|
+
// Auto-grow: JS drives the height to fit the content (Razor: data-app-autosize;
|
|
493
493
|
// React: autoGrow). Manual grabber and scrollbar off so they can't fight measure.
|
|
494
494
|
.textarea.autosize,
|
|
495
495
|
textarea.form-control.autosize {
|
|
@@ -499,7 +499,7 @@ textarea.form-control.autosize {
|
|
|
499
499
|
// Hover/error guards: without them the hover fill repaints over an invalid border.
|
|
500
500
|
// `:not([aria-expanded="true"])` on the `.input` line: a combobox/dialog trigger whose popup is
|
|
501
501
|
// OPEN (datepicker/date-range/time-picker triggers set aria-expanded on the trigger, but carry
|
|
502
|
-
// their `.open` class on the WRAPPER, not the trigger) must keep its open white fill
|
|
502
|
+
// their `.open` class on the WRAPPER, not the trigger) must keep its open white fill; without
|
|
503
503
|
// this the resting-hover grey repaints over it the moment the cursor sits on the open trigger.
|
|
504
504
|
// `:not(.phone-input-wrap > .input)`: the phone shell owns the fill and border, so its inner input
|
|
505
505
|
// must stay transparent. This rule's specificity beats that shell's transparent rule, so without
|
|
@@ -523,7 +523,7 @@ textarea.form-control.autosize {
|
|
|
523
523
|
// Lift off the muted resting fill onto a clean white surface while active.
|
|
524
524
|
background-color: var(--color-surface);
|
|
525
525
|
color: var(--color-text);
|
|
526
|
-
// Soft brand border is the focus cue (per the reference)
|
|
526
|
+
// Soft brand border is the focus cue (per the reference). No ring or shadow.
|
|
527
527
|
border-color: var(--color-field-border-focus);
|
|
528
528
|
box-shadow: none;
|
|
529
529
|
}
|
|
@@ -532,7 +532,7 @@ textarea.form-control.autosize {
|
|
|
532
532
|
.textarea::placeholder {
|
|
533
533
|
color: var(--color-text-subtle);
|
|
534
534
|
}
|
|
535
|
-
// Borderless variant
|
|
535
|
+
// Borderless variant: no border/background, inherits the container's chrome
|
|
536
536
|
// (inline-rename, command-palette fields where the bordered shell is wrong).
|
|
537
537
|
.input-bare,
|
|
538
538
|
.input-bare:hover,
|
|
@@ -548,14 +548,14 @@ textarea.form-control.autosize {
|
|
|
548
548
|
.input-bare:focus {
|
|
549
549
|
outline: none;
|
|
550
550
|
}
|
|
551
|
-
// Edge/IE native password reveal
|
|
551
|
+
// Edge/IE native password reveal: hide so only the app eye toggle shows.
|
|
552
552
|
.form-control::-ms-reveal,
|
|
553
553
|
.form-control::-ms-clear,
|
|
554
554
|
.input::-ms-reveal,
|
|
555
555
|
.input::-ms-clear {
|
|
556
556
|
display: none;
|
|
557
557
|
}
|
|
558
|
-
// Autofill
|
|
558
|
+
// Autofill: kill the browser's yellow/blue autofill background so a filled field keeps its
|
|
559
559
|
// own chrome (muted at rest, clean surface on focus), same as a hand-typed value. WebKit
|
|
560
560
|
// won't let `background` win here, so paint over it with a full-cover inset box-shadow; the
|
|
561
561
|
// 9999s background transition defers the UA's own repaint so there's no fill flash. Applies to
|
|
@@ -607,7 +607,7 @@ textarea.form-control.autosize {
|
|
|
607
607
|
color: var(--color-text-muted);
|
|
608
608
|
}
|
|
609
609
|
|
|
610
|
-
// Read-only is NOT disabled
|
|
610
|
+
// Read-only is NOT disabled; still submitted/selectable/copyable, so no
|
|
611
611
|
// not-allowed cursor. Match `[readonly]`, never `:read-only` (that also hits
|
|
612
612
|
// disabled and non-editable controls).
|
|
613
613
|
.form-control[readonly],
|
|
@@ -620,7 +620,7 @@ textarea.form-control.autosize {
|
|
|
620
620
|
cursor: default;
|
|
621
621
|
}
|
|
622
622
|
|
|
623
|
-
// Invalid
|
|
623
|
+
// Invalid: soft danger border (one recipe for aria-invalid, .is-invalid, .error).
|
|
624
624
|
// Soft rather than solid --bs-danger so the field still reads as a surface, not a
|
|
625
625
|
// hard alarm box; text errors use --color-danger-text for AA.
|
|
626
626
|
.form-control.is-invalid,
|
|
@@ -650,7 +650,7 @@ textarea.form-control.autosize {
|
|
|
650
650
|
.input.error:focus,
|
|
651
651
|
.textarea.error:focus {
|
|
652
652
|
background: var(--color-surface);
|
|
653
|
-
// Soft danger border (danger at 30%, mirroring the primary-30 focus border)
|
|
653
|
+
// Soft danger border (danger at 30%, mirroring the primary-30 focus border). No ring,
|
|
654
654
|
// so the field reads as a quiet error, not a solid alarm box.
|
|
655
655
|
border-color: color-mix(in srgb, var(--color-danger) 30%, transparent);
|
|
656
656
|
box-shadow: none;
|
|
@@ -747,7 +747,7 @@ form .wui-field-message:empty {
|
|
|
747
747
|
cursor: pointer;
|
|
748
748
|
}
|
|
749
749
|
|
|
750
|
-
// Date inputs
|
|
750
|
+
// Date inputs: a brand calendar glyph that fills the field so a click
|
|
751
751
|
// anywhere opens the native picker; muted text until a value is chosen.
|
|
752
752
|
.input[type="date"] {
|
|
753
753
|
position: relative;
|
|
@@ -784,7 +784,7 @@ form .wui-field-message:empty {
|
|
|
784
784
|
appearance: textfield;
|
|
785
785
|
}
|
|
786
786
|
|
|
787
|
-
// Custom number stepper
|
|
787
|
+
// Custom number stepper: up/down arrows, no background.
|
|
788
788
|
.num-stepper {
|
|
789
789
|
position: relative;
|
|
790
790
|
width: 100%;
|
|
@@ -850,22 +850,22 @@ form .wui-field-message:empty {
|
|
|
850
850
|
background-size: 18px;
|
|
851
851
|
}
|
|
852
852
|
// Dark mode: keep the value in an errored field legible.
|
|
853
|
-
:root[data-theme="dark"] .form-control.error,
|
|
854
|
-
:root[data-theme="dark"] .form-control.error:focus,
|
|
855
|
-
:root[data-theme="dark"] .input.error,
|
|
856
|
-
:root[data-theme="dark"] .input.error:focus,
|
|
857
|
-
:root[data-theme="dark"] .form-control.error:-webkit-autofill,
|
|
858
|
-
:root[data-theme="dark"] .form-control.error:focus:-webkit-autofill,
|
|
859
|
-
:root[data-theme="dark"] .input.error:-webkit-autofill,
|
|
860
|
-
:root[data-theme="dark"] .input.error:focus:-webkit-autofill {
|
|
853
|
+
:root[data-bs-theme="dark"] .form-control.error,
|
|
854
|
+
:root[data-bs-theme="dark"] .form-control.error:focus,
|
|
855
|
+
:root[data-bs-theme="dark"] .input.error,
|
|
856
|
+
:root[data-bs-theme="dark"] .input.error:focus,
|
|
857
|
+
:root[data-bs-theme="dark"] .form-control.error:-webkit-autofill,
|
|
858
|
+
:root[data-bs-theme="dark"] .form-control.error:focus:-webkit-autofill,
|
|
859
|
+
:root[data-bs-theme="dark"] .input.error:-webkit-autofill,
|
|
860
|
+
:root[data-bs-theme="dark"] .input.error:focus:-webkit-autofill {
|
|
861
861
|
color: var(--color-text);
|
|
862
862
|
-webkit-text-fill-color: var(--color-text);
|
|
863
863
|
}
|
|
864
864
|
// ...but -webkit-text-fill-color is inherited by ::placeholder and beats its `color`, so the rule
|
|
865
865
|
// above painted the placeholder as bright as a typed value. Hand the placeholder its own subtle
|
|
866
866
|
// ink back (the same --color-text-subtle every other placeholder uses).
|
|
867
|
-
:root[data-theme="dark"] .form-control.error::placeholder,
|
|
868
|
-
:root[data-theme="dark"] .input.error::placeholder {
|
|
867
|
+
:root[data-bs-theme="dark"] .form-control.error::placeholder,
|
|
868
|
+
:root[data-bs-theme="dark"] .input.error::placeholder {
|
|
869
869
|
color: var(--color-text-subtle);
|
|
870
870
|
-webkit-text-fill-color: var(--color-text-subtle);
|
|
871
871
|
}
|
|
@@ -890,7 +890,7 @@ form .wui-field-message:empty {
|
|
|
890
890
|
color: var(--color-danger-text);
|
|
891
891
|
}
|
|
892
892
|
|
|
893
|
-
// Leading-icon input
|
|
893
|
+
// Leading-icon input: icon turns brand on focus.
|
|
894
894
|
// The leading icon sits centred in a fixed slot, a grey divider closes the slot, and the text
|
|
895
895
|
// starts a gap after it. Slot, glyph and gap scale with the field size, so every icon in a
|
|
896
896
|
// field of one size lands in the same place.
|
|
@@ -947,7 +947,7 @@ form .wui-field-message:empty {
|
|
|
947
947
|
color: var(--color-primary-text);
|
|
948
948
|
}
|
|
949
949
|
|
|
950
|
-
// Trailing action beside the field
|
|
950
|
+
// Trailing action beside the field: a control (a labelled button, or a confirmation once the
|
|
951
951
|
// value resolves) that sits OUTSIDE the input border. The field flexes to fill the row; the
|
|
952
952
|
// action keeps its natural width and centres against the control.
|
|
953
953
|
.input-action-row {
|
|
@@ -1011,7 +1011,7 @@ form .wui-field-message:empty {
|
|
|
1011
1011
|
display: block;
|
|
1012
1012
|
}
|
|
1013
1013
|
|
|
1014
|
-
// Clearable
|
|
1014
|
+
// Clearable ✕: a trailing reset button, placed inside .input-wrap / .input-icon. It only
|
|
1015
1015
|
// renders while the field has a value; .has-clear reserves the room so text never sits under it.
|
|
1016
1016
|
.input.has-clear {
|
|
1017
1017
|
padding-right: 40px;
|
|
@@ -1049,7 +1049,7 @@ form .wui-field-message:empty {
|
|
|
1049
1049
|
to { opacity: 1; transform: translateY(-50%) scale(1); }
|
|
1050
1050
|
}
|
|
1051
1051
|
|
|
1052
|
-
// Prefix / suffix addon
|
|
1052
|
+
// Prefix / suffix addon: a bordered box before/after the input (₹, https://, .com). The
|
|
1053
1053
|
// WRAPPER owns the border + radius so the affixes and input read as one control; the input
|
|
1054
1054
|
// itself goes borderless. Focus/hover/error move to the wrapper.
|
|
1055
1055
|
.input-affixed {
|
|
@@ -1058,7 +1058,7 @@ form .wui-field-message:empty {
|
|
|
1058
1058
|
width: 100%;
|
|
1059
1059
|
border: 1px solid var(--color-field-border);
|
|
1060
1060
|
border-radius: var(--wui-field-md-radius);
|
|
1061
|
-
// Soft-filled at rest, white on focus
|
|
1061
|
+
// Soft-filled at rest, white on focus; one shared fill for the whole control so the
|
|
1062
1062
|
// prefix/suffix and the input body are always the SAME colour combination as the field.
|
|
1063
1063
|
background: var(--color-field-bg);
|
|
1064
1064
|
// Clip the square inner input to the wrapper's rounded corners on hover and focus.
|
|
@@ -1101,7 +1101,7 @@ form .wui-field-message:empty {
|
|
|
1101
1101
|
justify-content: center;
|
|
1102
1102
|
min-width: 44px;
|
|
1103
1103
|
padding: 0 12px;
|
|
1104
|
-
// Transparent so the affix inherits the wrapper fill
|
|
1104
|
+
// Transparent so the affix inherits the wrapper fill; the addon and the input read as
|
|
1105
1105
|
// one continuous surface (only the separator border divides them).
|
|
1106
1106
|
background: transparent;
|
|
1107
1107
|
color: var(--color-text-subtle);
|
|
@@ -1117,7 +1117,7 @@ form .wui-field-message:empty {
|
|
|
1117
1117
|
border-radius: 0 var(--wui-field-md-radius) var(--wui-field-md-radius) 0;
|
|
1118
1118
|
}
|
|
1119
1119
|
|
|
1120
|
-
// Floating label
|
|
1120
|
+
// Floating label: the label starts centred as the placeholder, then slides up and shrinks
|
|
1121
1121
|
// on focus or when the field is filled. Opt-in (floatingLabel); the input carries a single
|
|
1122
1122
|
// space as its placeholder so :placeholder-shown drives the "empty" state. Standalone shell.
|
|
1123
1123
|
.field-float {
|
|
@@ -1216,10 +1216,10 @@ form .wui-field-message:empty {
|
|
|
1216
1216
|
color: var(--color-text-subtle);
|
|
1217
1217
|
text-align: start;
|
|
1218
1218
|
}
|
|
1219
|
-
// Character counter
|
|
1219
|
+
// Character counter: a right-aligned count under the field; turns danger at the limit.
|
|
1220
1220
|
.field-count {
|
|
1221
|
-
// `.field` is align-items:flex-start, so a shrink-wrapped count would sit on the LEFT
|
|
1222
|
-
//
|
|
1221
|
+
// `.field` is align-items:flex-start, so a shrink-wrapped count would sit on the LEFT.
|
|
1222
|
+
// Text-align alone can't move it. align-self pushes it to the control's right edge.
|
|
1223
1223
|
align-self: flex-end;
|
|
1224
1224
|
// Tighten the space above the count: .field's 10px gap → effective 8px, matching .field-error.
|
|
1225
1225
|
margin-top: -2px;
|
|
@@ -1240,7 +1240,8 @@ form .wui-field-message:empty {
|
|
|
1240
1240
|
color: var(--wui-field-label-color, var(--color-text));
|
|
1241
1241
|
margin-bottom: 6px;
|
|
1242
1242
|
}
|
|
1243
|
-
.form-label
|
|
1243
|
+
// Zero specificity: a field label carries .form-label and .label, and .label's own type and colour must win.
|
|
1244
|
+
:where(.form-label) {
|
|
1244
1245
|
font-size: var(--wui-field-label-fs, inherit);
|
|
1245
1246
|
font-weight: var(--wui-field-label-fw, inherit);
|
|
1246
1247
|
color: var(--wui-field-label-color, inherit);
|
|
@@ -1259,13 +1260,13 @@ form .wui-field-message:empty {
|
|
|
1259
1260
|
.required {
|
|
1260
1261
|
// Same red as .field-error. The mark is aria-hidden so it could carry the brighter brand
|
|
1261
1262
|
// hue, but then the asterisk and the message it belongs to sat two lines apart in visibly
|
|
1262
|
-
// different reds
|
|
1263
|
+
// different reds, which read as a bug and got "fixed" three times by repainting the
|
|
1263
1264
|
// message with the mark's sub-AA red. One token for both ends that.
|
|
1264
1265
|
color: var(--color-danger-text);
|
|
1265
1266
|
// The gap is CSS, not a significant space in the markup. RequiredMark used to render
|
|
1266
1267
|
// `{' '}*` while AppDatePicker and every Razor helper rendered a bare `*`, so the same
|
|
1267
|
-
// asterisk sat 4px further out in some fields than others
|
|
1268
|
-
// because HTML comparison collapses whitespace by design. Gap removed
|
|
1268
|
+
// asterisk sat 4px further out in some fields than others; and no check could see it,
|
|
1269
|
+
// because HTML comparison collapses whitespace by design. Gap removed. The star sits
|
|
1269
1270
|
// flush against the label.
|
|
1270
1271
|
margin-inline-start: 0;
|
|
1271
1272
|
}
|
|
@@ -1305,15 +1306,15 @@ form .wui-field-message:empty {
|
|
|
1305
1306
|
//
|
|
1306
1307
|
// The `<wui-*>` entries are load-bearing, not defensive. Every hard interactive control
|
|
1307
1308
|
// is now `.field > wui-select > .wui-select`, so the child combinator below stopped
|
|
1308
|
-
// reaching the inner div AND the real flex item
|
|
1309
|
+
// reaching the inner div AND the real flex item (the custom element) was named by no
|
|
1309
1310
|
// rule at all. With `align-items: flex-start` above, that means it shrinks to its
|
|
1310
1311
|
// content: a select rendered 164px wide in a 377px column. Neither render parity nor the
|
|
1311
1312
|
// interaction suite saw it, because BOTH surfaces wrap the same element and are equally
|
|
1312
1313
|
// wrong, and the fixtures render at full width where nothing has to stretch.
|
|
1313
1314
|
//
|
|
1314
1315
|
// `display: block` is here for the same reason and is not redundant with the stretch: a
|
|
1315
|
-
// custom element is `display: inline` by default, so outside a flex `.field
|
|
1316
|
-
// into a plain div, a grid cell, a table cell
|
|
1316
|
+
// custom element is `display: inline` by default, so outside a flex `.field`, dropped
|
|
1317
|
+
// into a plain div, a grid cell, a table cell; it would still collapse. Being a flex
|
|
1317
1318
|
// item blockifies it; nothing else does.
|
|
1318
1319
|
wui-select,
|
|
1319
1320
|
wui-phone,
|
|
@@ -1340,15 +1341,15 @@ wui-date-range {
|
|
|
1340
1341
|
align-self: stretch;
|
|
1341
1342
|
}
|
|
1342
1343
|
// A file picker fills its column by default (align-self:stretch fills the field on the cross
|
|
1343
|
-
// axis, but the field itself collapses to its content when it is a flex item
|
|
1344
|
-
// lays fields out in a flex row
|
|
1344
|
+
// axis, but the field itself collapses to its content when it is a flex item; the showcase
|
|
1345
|
+
// lays fields out in a flex row, so stretch the field to its container first). Override per
|
|
1345
1346
|
// use with a .file-w-* class or the --wui-file-width variable.
|
|
1346
1347
|
.field:has(> .file-input),
|
|
1347
1348
|
.field:has(> .file-preview) {
|
|
1348
1349
|
width: var(--wui-file-width, 100%);
|
|
1349
1350
|
max-width: 100%;
|
|
1350
1351
|
}
|
|
1351
|
-
// Doubled selectors
|
|
1352
|
+
// Doubled selectors. See the lg-tier block below: a media query carries no
|
|
1352
1353
|
// extra specificity, so a consumer's later single-class rule would win.
|
|
1353
1354
|
@media (max-width: 575.98px) {
|
|
1354
1355
|
.field-row.field-row,
|
|
@@ -1371,7 +1372,7 @@ wui-date-range {
|
|
|
1371
1372
|
align-items: stretch;
|
|
1372
1373
|
border: 1px solid var(--color-field-border);
|
|
1373
1374
|
border-radius: var(--wui-field-md-radius);
|
|
1374
|
-
// Soft-filled at rest, white on focus
|
|
1375
|
+
// Soft-filled at rest, white on focus; the numeric input and its unit pill share the
|
|
1375
1376
|
// one wrapper fill, same colour combination as every other field.
|
|
1376
1377
|
background: var(--color-field-bg);
|
|
1377
1378
|
transition:
|
|
@@ -1391,7 +1392,7 @@ wui-date-range {
|
|
|
1391
1392
|
border-color: color-mix(in srgb, var(--color-danger) 30%, transparent);
|
|
1392
1393
|
}
|
|
1393
1394
|
|
|
1394
|
-
// Numeric inputs are plain text fields
|
|
1395
|
+
// Numeric inputs are plain text fields. No native spinner, no stepper. The
|
|
1395
1396
|
// field flows seamlessly into the trailing unit pill; the wrapper carries the
|
|
1396
1397
|
// border.
|
|
1397
1398
|
.input-with-unit .num-input {
|
|
@@ -1415,7 +1416,7 @@ wui-date-range {
|
|
|
1415
1416
|
box-shadow: none;
|
|
1416
1417
|
}
|
|
1417
1418
|
.input-with-unit .unit {
|
|
1418
|
-
// Transparent so the pill inherits the wrapper fill
|
|
1419
|
+
// Transparent so the pill inherits the wrapper fill; one continuous surface.
|
|
1419
1420
|
background: transparent;
|
|
1420
1421
|
border: none;
|
|
1421
1422
|
border-left: 1px solid var(--color-border);
|
|
@@ -1433,7 +1434,7 @@ wui-date-range {
|
|
|
1433
1434
|
white-space: nowrap;
|
|
1434
1435
|
}
|
|
1435
1436
|
|
|
1436
|
-
// Number input with stepper
|
|
1437
|
+
// Number input with stepper: decrements/increments by step, clamped to min/max.
|
|
1437
1438
|
// One field, one border: the WRAPPER owns the border + hover/focus/error ring
|
|
1438
1439
|
// so the input and stepper buttons light up together.
|
|
1439
1440
|
.num-wrap {
|
|
@@ -1449,7 +1450,7 @@ wui-date-range {
|
|
|
1449
1450
|
background-color var(--wui-duration-fast) var(--wui-ease-ui);
|
|
1450
1451
|
overflow: hidden;
|
|
1451
1452
|
}
|
|
1452
|
-
// Not while invalid
|
|
1453
|
+
// Not while invalid: an errored control holds its red border/fill on hover rather than
|
|
1453
1454
|
// reverting to the grey hover one (matches AppInput, whose hover rule excludes the error state).
|
|
1454
1455
|
.num-wrap:hover:not(:focus-within):not(:has(.num-input.error)):not(:has(.num-input.is-invalid)):not(:has(.num-input[aria-invalid="true"])) {
|
|
1455
1456
|
background: var(--color-field-bg);
|
|
@@ -1462,7 +1463,7 @@ wui-date-range {
|
|
|
1462
1463
|
.num-wrap:has(.num-input.error),
|
|
1463
1464
|
.num-wrap:has(.num-input.is-invalid),
|
|
1464
1465
|
.num-wrap:has(.num-input[aria-invalid="true"]) {
|
|
1465
|
-
// Soft invalid border
|
|
1466
|
+
// Soft invalid border: match AppInput / AppPhoneNumberInput exactly (danger at 30%,
|
|
1466
1467
|
// mirroring the primary-30 focus border), not the solid full-strength danger this used to
|
|
1467
1468
|
// carry, so every field's error border reads the same light red. Clean surface fill, as
|
|
1468
1469
|
// AppInput's invalid state.
|
|
@@ -1470,9 +1471,9 @@ wui-date-range {
|
|
|
1470
1471
|
border-color: color-mix(in srgb, var(--color-danger) 30%, transparent);
|
|
1471
1472
|
}
|
|
1472
1473
|
|
|
1473
|
-
// Numeric input inside the stepper
|
|
1474
|
+
// Numeric input inside the stepper: plain text field, no native spinner.
|
|
1474
1475
|
// Flows seamlessly between the stepper buttons; the wrapper carries the border.
|
|
1475
|
-
// The value reads as the segmented centre cell
|
|
1476
|
+
// The value reads as the segmented centre cell, centred + semibold like the
|
|
1476
1477
|
// reference: minus | value | plus, three even cells divided by the button borders.
|
|
1477
1478
|
.num-wrap .num-input {
|
|
1478
1479
|
flex: 1;
|
|
@@ -1491,7 +1492,7 @@ wui-date-range {
|
|
|
1491
1492
|
box-shadow: none;
|
|
1492
1493
|
}
|
|
1493
1494
|
|
|
1494
|
-
// Stepper buttons
|
|
1495
|
+
// Stepper buttons: decrease/increase the value by step.
|
|
1495
1496
|
// Positioned left (minus, :first-child) and right (plus, :last-child) of the
|
|
1496
1497
|
// input; disabled at min/max or when the control is disabled. Each carries the
|
|
1497
1498
|
// divider on its input-facing edge so the value sits in its own segment.
|
|
@@ -1532,7 +1533,7 @@ wui-date-range {
|
|
|
1532
1533
|
cursor: not-allowed;
|
|
1533
1534
|
opacity: var(--wui-disabled-opacity);
|
|
1534
1535
|
}
|
|
1535
|
-
// Segment dividers: minus divides on its right, plus on its left
|
|
1536
|
+
// Segment dividers: minus divides on its right, plus on its left; so the value
|
|
1536
1537
|
// cell is bounded on both sides. (DOM order is minus, input, [unit], plus on both
|
|
1537
1538
|
// surfaces, so :first-child / :last-child land on the two buttons.)
|
|
1538
1539
|
.num-btn:first-child {
|
|
@@ -1564,7 +1565,7 @@ wui-date-range {
|
|
|
1564
1565
|
font-size: 16px;
|
|
1565
1566
|
}
|
|
1566
1567
|
|
|
1567
|
-
// Affix (unit) in the num-wrap
|
|
1568
|
+
// Affix (unit) in the num-wrap: a trailing pill after the input.
|
|
1568
1569
|
.num-wrap .affix {
|
|
1569
1570
|
background: var(--color-field-bg);
|
|
1570
1571
|
border: none;
|
|
@@ -1617,7 +1618,7 @@ wui-date-range {
|
|
|
1617
1618
|
background: currentColor;
|
|
1618
1619
|
}
|
|
1619
1620
|
|
|
1620
|
-
// "Soft" status badge
|
|
1621
|
+
// "Soft" status badge: pill, 12/600, muted tone fill.
|
|
1621
1622
|
.status-label {
|
|
1622
1623
|
display: inline-flex;
|
|
1623
1624
|
align-items: center;
|
|
@@ -1630,7 +1631,7 @@ wui-date-range {
|
|
|
1630
1631
|
line-height: 1;
|
|
1631
1632
|
white-space: nowrap;
|
|
1632
1633
|
}
|
|
1633
|
-
// Tones are SEMANTIC
|
|
1634
|
+
// Tones are SEMANTIC: success / warning / danger / info / primary / neutral,
|
|
1634
1635
|
// the same vocabulary .chip, .badge and every other tone-bearing component uses.
|
|
1635
1636
|
// A semantic name survives a palette change; a colour name does not (a "green"
|
|
1636
1637
|
// tone is a lie the moment the brand's success colour stops being green).
|
|
@@ -1649,7 +1650,7 @@ wui-date-range {
|
|
|
1649
1650
|
.status-label.primary {
|
|
1650
1651
|
@include wui-tone-pill-colors(primary, var(--color-primary-text));
|
|
1651
1652
|
}
|
|
1652
|
-
// Default/neutral
|
|
1653
|
+
// Default/neutral: also the bare `.status-label` look, so an unknown or omitted
|
|
1653
1654
|
// tone still renders as a proper pill instead of transparent text.
|
|
1654
1655
|
.status-label,
|
|
1655
1656
|
.status-label.neutral {
|
|
@@ -1772,7 +1773,7 @@ wui-date-range {
|
|
|
1772
1773
|
color: var(--color-text-muted);
|
|
1773
1774
|
}
|
|
1774
1775
|
|
|
1775
|
-
// Form section heading
|
|
1776
|
+
// Form section heading: a branded accent bar rather than a full-width hairline,
|
|
1776
1777
|
// so a long form reads as designed sections instead of raw rules.
|
|
1777
1778
|
//
|
|
1778
1779
|
// Block, not flex: an inline subscript in the label (N(SG)) would otherwise be
|
|
@@ -1802,7 +1803,7 @@ wui-date-range {
|
|
|
1802
1803
|
// ── OTP / code entry (<wui-otp>) ──
|
|
1803
1804
|
//
|
|
1804
1805
|
// One real input, transparent, sitting on top of the segment boxes. The input keeps focus,
|
|
1805
|
-
// caret, selection, IME and
|
|
1806
|
+
// caret, selection, IME and OS autofill (the reason for the whole design), which delivers
|
|
1806
1807
|
// an SMS code to the focused field whole. The boxes are presentational and aria-hidden; the
|
|
1807
1808
|
// input is the single labelled field a screen reader sees.
|
|
1808
1809
|
//
|
|
@@ -1873,13 +1874,13 @@ wui-otp {
|
|
|
1873
1874
|
border-color var(--wui-duration-fast) var(--wui-ease-ui),
|
|
1874
1875
|
box-shadow var(--wui-duration-fast) var(--wui-ease-ui);
|
|
1875
1876
|
}
|
|
1876
|
-
// Hover
|
|
1877
|
+
// Hover: the whole field lifts its border to strong (AppInput hover), but not while a
|
|
1877
1878
|
// slot is active (focus wins) or the field is disabled.
|
|
1878
1879
|
.otp:hover:not(:focus-within):not(:has(.otp-field:disabled)) .otp-slot {
|
|
1879
1880
|
border-color: var(--color-field-border-hover);
|
|
1880
1881
|
}
|
|
1881
1882
|
// The caret cannot be seen through a transparent input, so the ACTIVE box carries the
|
|
1882
|
-
// affordance instead
|
|
1883
|
+
// affordance instead, derived from selectionStart. Matches AppInput's focus: clean
|
|
1883
1884
|
// surface fill + soft brand border, no ring.
|
|
1884
1885
|
.otp-slot.active {
|
|
1885
1886
|
background: var(--color-surface);
|
|
@@ -1892,7 +1893,7 @@ wui-otp {
|
|
|
1892
1893
|
border-color: transparent;
|
|
1893
1894
|
color: var(--color-text-subtle);
|
|
1894
1895
|
}
|
|
1895
|
-
// Invalid
|
|
1896
|
+
// Invalid: soft danger border on a clean surface, mirroring AppInput's .error (danger
|
|
1896
1897
|
// at 30%, no ring), not a solid alarm box.
|
|
1897
1898
|
.field-error ~ .otp .otp-slot,
|
|
1898
1899
|
.otp.error .otp-slot,
|