@webority/theme 0.53.1 → 0.54.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.
Files changed (62) hide show
  1. package/dist/purge-safelist.json +339 -3
  2. package/dist/webority-theme.css +1 -1
  3. package/package.json +1 -1
  4. package/scss/_components.scss +27 -4
  5. package/scss/_marketing.scss +5 -0
  6. package/scss/_variables.scss +5 -4
  7. package/scss/_wui-aliases.scss +14 -0
  8. package/scss/_wui-components.scss +29 -0
  9. package/scss/wui/_avatar-picker.scss +1 -1
  10. package/scss/wui/_calendar.scss +5 -5
  11. package/scss/wui/_card.scss +2 -2
  12. package/scss/wui/_carousel.scss +182 -0
  13. package/scss/wui/_chart.scss +2 -2
  14. package/scss/wui/_choice.scss +88 -8
  15. package/scss/wui/_code-block.scss +138 -0
  16. package/scss/wui/_command-palette.scss +99 -1
  17. package/scss/wui/_comment-thread.scss +268 -0
  18. package/scss/wui/_context-menu.scss +2 -2
  19. package/scss/wui/_controls.scss +14 -12
  20. package/scss/wui/_data.scss +407 -14
  21. package/scss/wui/_disclosure.scss +2 -2
  22. package/scss/wui/_display.scss +13 -9
  23. package/scss/wui/_dock.scss +2 -2
  24. package/scss/wui/_drawer.scss +198 -0
  25. package/scss/wui/_file-viewer.scss +6 -6
  26. package/scss/wui/_groups.scss +111 -0
  27. package/scss/wui/_hover-card.scss +55 -0
  28. package/scss/wui/_illustration.scss +76 -0
  29. package/scss/wui/_image-crop.scss +6 -6
  30. package/scss/wui/_inline-edit.scss +131 -0
  31. package/scss/wui/_interaction.scss +286 -0
  32. package/scss/wui/_kanban.scss +6 -6
  33. package/scss/wui/_lightbox.scss +169 -0
  34. package/scss/wui/_media.scss +8 -5
  35. package/scss/wui/_mention-input.scss +88 -0
  36. package/scss/wui/_menubar.scss +110 -0
  37. package/scss/wui/_navigation-menu.scss +172 -0
  38. package/scss/wui/_navigation.scss +109 -6
  39. package/scss/wui/_notification-center.scss +251 -0
  40. package/scss/wui/_onboarding-checklist.scss +199 -0
  41. package/scss/wui/_overlays.scss +7 -11
  42. package/scss/wui/_rating.scss +87 -0
  43. package/scss/wui/_record-pager.scss +27 -0
  44. package/scss/wui/_relative-time.scss +10 -0
  45. package/scss/wui/_resizable.scss +98 -0
  46. package/scss/wui/_rich-text.scss +2 -2
  47. package/scss/wui/_rolling-number.scss +60 -0
  48. package/scss/wui/_sections.scss +315 -0
  49. package/scss/wui/_shell-parts.scss +12 -3
  50. package/scss/wui/_shell.scss +6 -6
  51. package/scss/wui/_shortcuts.scss +143 -0
  52. package/scss/wui/_show-more.scss +30 -0
  53. package/scss/wui/_sortable.scss +2 -2
  54. package/scss/wui/_split-view.scss +321 -0
  55. package/scss/wui/_toolbar.scss +4 -4
  56. package/scss/wui/_tour.scss +2 -2
  57. package/scss/wui/_tree.scss +2 -2
  58. package/scss/wui/_truncate.scss +32 -0
  59. package/scss/wui/_typography.scss +14 -0
  60. package/scss/wui/_utilities.scss +8 -8
  61. package/scss/wui/_whats-new.scss +147 -0
  62. package/scss/wui/_workspace.scss +2 -2
@@ -0,0 +1,198 @@
1
+ // ── Drawer ──
2
+ // AppDrawer / <app-drawer> (a <wui-drawer> element): a side drawer from md up, a bottom sheet
3
+ // below it. The sheet is as tall as its highest snap point (`--wui-drawer-max`, percent of the
4
+ // viewport height) and sits `max - snap` down, so a snap point is one number the element writes
5
+ // (`--wui-drawer-snap`) and a drag adds its pixels (`--wui-drawer-drag`). Only transform moves.
6
+ //
7
+ // Part of the wui-components layer, see _wui-components.scss for load order.
8
+
9
+ .wui-drawer {
10
+ --wui-drawer-width: 480px;
11
+ --wui-drawer-duration: 280ms;
12
+ position: fixed;
13
+ inset: 0;
14
+ z-index: var(--wui-z-modal);
15
+ visibility: hidden;
16
+ pointer-events: none;
17
+ }
18
+ .wui-drawer[open] {
19
+ visibility: visible;
20
+ pointer-events: auto;
21
+ }
22
+ .wui-drawer[size="sm"] {
23
+ --wui-drawer-width: 360px;
24
+ }
25
+ .wui-drawer[size="lg"] {
26
+ --wui-drawer-width: 640px;
27
+ }
28
+
29
+ .wui-drawer-backdrop {
30
+ position: absolute;
31
+ inset: 0;
32
+ background: color-mix(in srgb, var(--color-scrim) 85%, transparent);
33
+ opacity: 0;
34
+ }
35
+ .wui-drawer[open] .wui-drawer-backdrop {
36
+ opacity: 1;
37
+ }
38
+
39
+ .wui-drawer-panel {
40
+ position: absolute;
41
+ display: flex;
42
+ flex-direction: column;
43
+ background: var(--color-surface);
44
+ color: var(--color-text);
45
+ box-shadow: var(--wui-shadow-overlay-lg);
46
+ overflow: hidden;
47
+ }
48
+ .wui-drawer-panel:focus {
49
+ outline: none;
50
+ }
51
+
52
+ .wui-drawer-grip {
53
+ display: none;
54
+ }
55
+ .wui-drawer-header {
56
+ flex: none;
57
+ display: flex;
58
+ align-items: center;
59
+ justify-content: space-between;
60
+ gap: 12px;
61
+ padding: 16px 20px;
62
+ border-bottom: 1px solid var(--color-border);
63
+ }
64
+ .wui-drawer-headtext {
65
+ min-width: 0;
66
+ }
67
+ .wui-drawer-title {
68
+ font-size: 18px;
69
+ font-weight: 600;
70
+ color: var(--color-text);
71
+ overflow-wrap: anywhere;
72
+ }
73
+ .wui-drawer-subtitle {
74
+ margin-top: 1px;
75
+ font-size: 12px;
76
+ color: var(--color-text-muted);
77
+ overflow-wrap: anywhere;
78
+ }
79
+ .wui-drawer-body {
80
+ flex: 1 1 auto;
81
+ min-height: 0;
82
+ overflow-y: auto;
83
+ overscroll-behavior: contain;
84
+ padding: 20px 22px 24px;
85
+ }
86
+ .wui-drawer-footer {
87
+ flex: none;
88
+ display: flex;
89
+ flex-wrap: wrap;
90
+ justify-content: flex-end;
91
+ gap: 8px;
92
+ padding: 12px 20px;
93
+ border-top: 1px solid var(--color-border);
94
+ }
95
+
96
+ // Side drawer: from md up.
97
+ @include media-breakpoint-up(md) {
98
+ .wui-drawer-panel {
99
+ top: 0;
100
+ bottom: 0;
101
+ right: 0;
102
+ width: min(var(--wui-drawer-width), 100%);
103
+ transform: translateX(100%);
104
+ }
105
+ .wui-drawer[side="start"] .wui-drawer-panel {
106
+ right: auto;
107
+ left: 0;
108
+ transform: translateX(-100%);
109
+ }
110
+ .wui-drawer[open] .wui-drawer-panel,
111
+ .wui-drawer[open][side="start"] .wui-drawer-panel {
112
+ transform: none;
113
+ }
114
+ }
115
+
116
+ // Bottom sheet: below md.
117
+ @include media-breakpoint-down(md) {
118
+ .wui-drawer-panel {
119
+ left: 0;
120
+ right: 0;
121
+ bottom: 0;
122
+ height: calc(var(--wui-drawer-max, 90) * 1dvh);
123
+ max-height: 100dvh;
124
+ border-radius: var(--radius-xl) var(--radius-xl) 0 0;
125
+ corner-shape: squircle;
126
+ transform: translateY(100%);
127
+ }
128
+ .wui-drawer[open] .wui-drawer-panel {
129
+ transform: translateY(calc((var(--wui-drawer-max, 90) - var(--wui-drawer-snap, 50)) * 1vh + var(--wui-drawer-drag, 0px)));
130
+ transform: translateY(calc((var(--wui-drawer-max, 90) - var(--wui-drawer-snap, 50)) * 1dvh + var(--wui-drawer-drag, 0px)));
131
+ }
132
+ // The part of the sheet below the screen edge still scrolls into view.
133
+ .wui-drawer-body {
134
+ padding-bottom: calc(24px + (var(--wui-drawer-max, 90) - var(--wui-drawer-snap, 50)) * 1dvh + env(safe-area-inset-bottom, 0px));
135
+ }
136
+ .wui-drawer-footer {
137
+ padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
138
+ }
139
+ .wui-drawer-grip {
140
+ display: flex;
141
+ flex: none;
142
+ justify-content: center;
143
+ touch-action: none;
144
+ cursor: grab;
145
+ }
146
+ .wui-drawer-header {
147
+ touch-action: none;
148
+ }
149
+ .wui-drawer.is-dragging .wui-drawer-grip,
150
+ .wui-drawer.is-dragging .wui-drawer-header {
151
+ cursor: grabbing;
152
+ }
153
+ .wui-drawer-handle {
154
+ display: flex;
155
+ align-items: center;
156
+ justify-content: center;
157
+ width: 64px;
158
+ height: 28px;
159
+ border-radius: var(--radius);
160
+ cursor: inherit;
161
+ }
162
+ .wui-drawer-handle::before {
163
+ content: "";
164
+ width: 40px;
165
+ height: 4px;
166
+ border-radius: 999px;
167
+ background: var(--color-border-strong);
168
+ }
169
+ .wui-drawer-handle:focus-visible {
170
+ outline: var(--wui-focus-ring-width) solid var(--color-focus-ring);
171
+ outline-offset: var(--wui-focus-ring-offset);
172
+ }
173
+ .wui-drawer-header {
174
+ padding-top: 4px;
175
+ }
176
+ }
177
+
178
+ body.wui-drawer-locked {
179
+ overflow: hidden;
180
+ }
181
+
182
+ @media (prefers-reduced-motion: no-preference) {
183
+ .wui-drawer {
184
+ transition: visibility 0s linear var(--wui-drawer-duration);
185
+ }
186
+ .wui-drawer[open] {
187
+ transition-delay: 0s;
188
+ }
189
+ .wui-drawer-backdrop {
190
+ transition: opacity var(--wui-drawer-duration) ease;
191
+ }
192
+ .wui-drawer-panel {
193
+ transition: transform var(--wui-drawer-duration) var(--wui-ease-ui);
194
+ }
195
+ .wui-drawer.is-dragging .wui-drawer-panel {
196
+ transition: none;
197
+ }
198
+ }
@@ -125,7 +125,7 @@ wui-file-viewer:fullscreen {
125
125
  background: var(--color-bg-subtle);
126
126
  }
127
127
  .wui-file-viewer-zoom:focus-visible {
128
- outline: 2px solid var(--color-primary);
128
+ outline: var(--wui-focus-ring-width) solid var(--color-focus-ring);
129
129
  outline-offset: 1px;
130
130
  }
131
131
  // The zoom menu, placed against its button by the element (position: fixed).
@@ -259,8 +259,8 @@ wui-file-viewer:fullscreen {
259
259
  scrollbar-gutter: stable;
260
260
  }
261
261
  .wui-file-viewer-scroll:focus-visible {
262
- outline: 2px solid var(--color-primary);
263
- outline-offset: -2px;
262
+ outline: var(--wui-focus-ring-width) solid var(--color-focus-ring);
263
+ outline-offset: var(--wui-focus-ring-inset);
264
264
  }
265
265
  // Grab-to-pan: while a drag is active the cursor becomes a fist and selection is suppressed, so
266
266
  // dragging across the text pans instead of selecting.
@@ -386,7 +386,7 @@ wui-file-viewer:fullscreen {
386
386
  pointer-events: auto;
387
387
  }
388
388
  .wui-file-viewer-links a:focus-visible {
389
- outline: 2px solid var(--color-primary);
389
+ outline: var(--wui-focus-ring-width) solid var(--color-focus-ring);
390
390
  }
391
391
 
392
392
  // The hidden frame Print fills with page images. Kept in the layout at no size rather than
@@ -446,8 +446,8 @@ wui-file-viewer:fullscreen {
446
446
  background: #000;
447
447
  }
448
448
  .wui-file-viewer-stage:focus-visible {
449
- outline: 2px solid var(--color-primary);
450
- outline-offset: -2px;
449
+ outline: var(--wui-focus-ring-width) solid var(--color-focus-ring);
450
+ outline-offset: var(--wui-focus-ring-inset);
451
451
  }
452
452
  .wui-file-viewer-video {
453
453
  display: block;
@@ -0,0 +1,111 @@
1
+ // ── Joined controls ──
2
+ // AppButtonGroup / <app-button-group> (`.wui-btn-group`, on Bootstrap's `.btn-group`),
3
+ // AppSplitButton / <app-split-button> (`.wui-split-button`: a main button and a menu chevron) and
4
+ // AppInputGroup / <app-input-group> (`.wui-addon-group`: a field with `.wui-addon` text or button
5
+ // add-ons attached). `.wui-kbd`, the key label AppKbd draws, lives in _shortcuts.scss.
6
+ //
7
+ // Part of the wui-components layer, see _wui-components.scss for load order.
8
+
9
+ // Joined buttons stay level: the default hover lift would pull one of them out of the row.
10
+ .wui-btn-group > .btn:hover:not(:disabled),
11
+ .wui-split-button .btn:hover:not(:disabled),
12
+ .wui-addon-group > .btn:hover:not(:disabled) {
13
+ transform: none !important;
14
+ }
15
+
16
+ .wui-btn-group-full {
17
+ display: flex;
18
+ width: 100%;
19
+ }
20
+ .wui-btn-group-full > .btn {
21
+ flex: 1 1 0;
22
+ }
23
+
24
+ // ── Split button ──
25
+ .wui-split-button {
26
+ position: relative;
27
+ display: inline-flex;
28
+ vertical-align: middle;
29
+ }
30
+ .wui-split-button > .btn {
31
+ border-start-end-radius: 0;
32
+ border-end-end-radius: 0;
33
+ }
34
+ .wui-split-menu {
35
+ position: relative;
36
+ display: inline-flex;
37
+ }
38
+ // A thin seam in the button's own colour tells the two halves apart on a solid fill.
39
+ .wui-split-button .wui-split-menu > .btn {
40
+ margin-inline-start: -1px;
41
+ border-start-start-radius: 0;
42
+ border-end-start-radius: 0;
43
+ border-inline-start-color: color-mix(in srgb, currentColor 35%, transparent);
44
+ --bs-btn-padding-x: 0.75rem;
45
+ }
46
+ .wui-split-button .btn:focus-visible {
47
+ z-index: 2;
48
+ }
49
+
50
+ // ── Input group ──
51
+ .wui-addon-group {
52
+ display: flex;
53
+ align-items: stretch;
54
+ width: 100%;
55
+ }
56
+ .wui-addon-group > * {
57
+ position: relative;
58
+ }
59
+ .wui-addon-group > .field,
60
+ .wui-addon-group > .form-control,
61
+ .wui-addon-group > .form-select {
62
+ flex: 1 1 auto;
63
+ min-width: 0;
64
+ margin: 0;
65
+ }
66
+ .wui-addon {
67
+ display: inline-flex;
68
+ flex: 0 0 auto;
69
+ align-items: center;
70
+ min-height: var(--wui-control-height);
71
+ padding-inline: 0.875rem;
72
+ border: 1px solid var(--color-border);
73
+ border-radius: var(--radius);
74
+ background: var(--color-bg-muted);
75
+ color: var(--color-text-muted);
76
+ font-size: 0.875rem;
77
+ line-height: 1;
78
+ white-space: nowrap;
79
+ }
80
+ .wui-addon-group-sm .wui-addon {
81
+ min-height: 35px;
82
+ padding-inline: 0.75rem;
83
+ font-size: 0.75rem;
84
+ }
85
+ .wui-addon-group-lg .wui-addon {
86
+ min-height: 55px;
87
+ padding-inline: 1.25rem;
88
+ font-size: 1rem;
89
+ }
90
+
91
+ // Square the sides that meet, and let the shared border overlap.
92
+ .wui-addon-group > :not(:first-child),
93
+ .wui-addon-group > .field:not(:first-child) .form-control,
94
+ .wui-addon-group > .field:not(:first-child) .form-select {
95
+ border-start-start-radius: 0;
96
+ border-end-start-radius: 0;
97
+ }
98
+ .wui-addon-group > :not(:last-child),
99
+ .wui-addon-group > .field:not(:last-child) .form-control,
100
+ .wui-addon-group > .field:not(:last-child) .form-select {
101
+ border-start-end-radius: 0;
102
+ border-end-end-radius: 0;
103
+ }
104
+ .wui-addon-group > :not(:first-child) {
105
+ margin-inline-start: -1px;
106
+ }
107
+ // The focused or hovered part sits above its neighbours so its whole outline shows.
108
+ .wui-addon-group > :focus-within,
109
+ .wui-addon-group > :hover {
110
+ z-index: 2;
111
+ }
@@ -0,0 +1,55 @@
1
+ // ── Hover card ──
2
+ // AppHoverCard / <app-hover-card> (a <wui-hover-card> element): a small preview card beside a name or
3
+ // record link. The element shows the panel with [data-open] (never a class or the hidden attribute,
4
+ // which a React re-render could reset) and places it with position: fixed, so it escapes any
5
+ // clipping ancestor. Every colour is a theme token.
6
+ //
7
+ // Part of the wui-components layer, see _wui-components.scss for load order.
8
+
9
+ // The element wraps the trigger without taking part in the surrounding layout.
10
+ wui-hover-card {
11
+ display: contents;
12
+ }
13
+
14
+ .wui-hover-card-trigger {
15
+ display: inline;
16
+ }
17
+
18
+ .wui-hover-card-panel {
19
+ position: fixed;
20
+ z-index: var(--wui-z-popover);
21
+ display: none;
22
+ width: 20rem;
23
+ max-width: calc(100vw - 16px);
24
+ max-height: calc(100vh - 8px);
25
+ overflow: auto;
26
+ padding: 12px 14px;
27
+ border: 1px solid var(--color-border);
28
+ border-radius: var(--wui-radius);
29
+ background: var(--color-surface);
30
+ color: var(--color-text);
31
+ box-shadow: var(--wui-shadow-overlay);
32
+ font-size: 13px;
33
+
34
+ &[data-open] {
35
+ display: block;
36
+ animation: var(--wui-menu-anim) var(--wui-menu-anim-duration) var(--wui-menu-anim-ease);
37
+ }
38
+ &.drop-up {
39
+ --wui-menu-drop: 6px;
40
+ }
41
+ }
42
+
43
+ // The loading state: a spinner and a short line, announced politely.
44
+ .wui-hover-card-loading {
45
+ display: flex;
46
+ align-items: center;
47
+ gap: 8px;
48
+ color: var(--color-text-muted);
49
+ }
50
+
51
+ @media (prefers-reduced-motion: reduce) {
52
+ .wui-hover-card-panel[data-open] {
53
+ animation: none;
54
+ }
55
+ }
@@ -0,0 +1,76 @@
1
+ // ── Illustrations ──
2
+ // The empty-state illustration set (AppEmptyState / AppTableEmptyState `illustration`, <app-empty-state
3
+ // illustration>): decorative SVG drawn only with these classes, so every colour is a theme token and
4
+ // dark mode follows. Sources: packages/theme/illustrations/*.svg.
5
+ //
6
+ // Part of the wui-components layer, see _wui-components.scss for load order.
7
+
8
+ .wui-illustration {
9
+ display: block;
10
+ flex: none;
11
+ width: 160px;
12
+ max-width: 100%;
13
+ height: auto;
14
+ margin-inline: auto;
15
+ color: var(--color-text-subtle);
16
+ }
17
+ .wui-ill-mute {
18
+ fill: var(--color-bg-muted);
19
+ }
20
+ .wui-ill-soft {
21
+ fill: var(--color-primary-soft);
22
+ }
23
+ .wui-ill-accent {
24
+ fill: var(--color-primary);
25
+ }
26
+ .wui-ill-card {
27
+ fill: var(--color-surface);
28
+ stroke: var(--color-border-strong);
29
+ stroke-width: 1.5;
30
+ stroke-linejoin: round;
31
+ }
32
+ .wui-ill-ink,
33
+ .wui-ill-accent-line,
34
+ .wui-ill-danger-line,
35
+ .wui-ill-dash {
36
+ fill: none;
37
+ stroke-width: 2;
38
+ stroke-linecap: round;
39
+ stroke-linejoin: round;
40
+ }
41
+ .wui-ill-ink {
42
+ stroke: currentColor;
43
+ }
44
+ .wui-ill-accent-line {
45
+ stroke: var(--color-primary);
46
+ }
47
+ .wui-ill-dash {
48
+ stroke: var(--color-border-strong);
49
+ stroke-dasharray: 4 4;
50
+ }
51
+ .wui-ill-danger {
52
+ fill: var(--color-danger-soft);
53
+ stroke: var(--color-danger);
54
+ stroke-width: 2;
55
+ }
56
+ .wui-ill-danger-line {
57
+ stroke: var(--color-danger);
58
+ }
59
+ .wui-ill-danger-fill {
60
+ fill: var(--color-danger);
61
+ }
62
+ .wui-ill-thick {
63
+ stroke-width: 5;
64
+ }
65
+
66
+ // Placement inside the empty states: the illustration replaces the icon bubble and sits above the title.
67
+ .wui-empty-illustration {
68
+ margin-bottom: 16px;
69
+ }
70
+ .empty-state-sm .wui-empty-illustration {
71
+ width: 112px;
72
+ margin-bottom: 12px;
73
+ }
74
+ .tbl-empty .wui-empty-illustration {
75
+ width: 140px;
76
+ }
@@ -25,8 +25,8 @@ wui-image-crop {
25
25
  cursor: grabbing;
26
26
  }
27
27
  .wui-crop-stage:focus-visible {
28
- outline: 2px solid var(--color-primary);
29
- outline-offset: 2px;
28
+ outline: var(--wui-focus-ring-width) solid var(--color-focus-ring);
29
+ outline-offset: var(--wui-focus-ring-offset);
30
30
  }
31
31
 
32
32
  .wui-crop-img {
@@ -146,8 +146,8 @@ wui-image-crop {
146
146
  border-color: var(--color-border-strong);
147
147
  }
148
148
  .wui-crop-zoombtn:focus-visible {
149
- outline: 2px solid var(--color-primary);
150
- outline-offset: 2px;
149
+ outline: var(--wui-focus-ring-width) solid var(--color-focus-ring);
150
+ outline-offset: var(--wui-focus-ring-offset);
151
151
  }
152
152
 
153
153
  // Rotate and Reset (the rotatable attribute), on their own row so the zoom slider keeps its width
@@ -181,8 +181,8 @@ wui-image-crop {
181
181
  border-color: var(--color-border-strong);
182
182
  }
183
183
  .wui-crop-toolbtn:focus-visible {
184
- outline: 2px solid var(--color-primary);
185
- outline-offset: 2px;
184
+ outline: var(--wui-focus-ring-width) solid var(--color-focus-ring);
185
+ outline-offset: var(--wui-focus-ring-offset);
186
186
  }
187
187
 
188
188
  // Live copies of the crop (the previews attribute), drawn by the element on a canvas each.
@@ -0,0 +1,131 @@
1
+ // ── Inline edit ──
2
+ // AppInlineEdit / <app-inline-edit> / <wui-inline-edit>. The value reads as plain text with a
3
+ // pencil that shows on hover and focus; while editing, the element swaps it for the library
4
+ // control. The element sets the states on the host: [data-wui-editing] and
5
+ // [data-wui-state="saving" | "saved" | "error"].
6
+ //
7
+ // Part of the wui-components layer — see _wui-components.scss for load order.
8
+
9
+ .wui-inline-edit {
10
+ display: inline-flex;
11
+ flex-wrap: wrap;
12
+ align-items: center;
13
+ gap: 2px 6px;
14
+ min-width: 0;
15
+ max-width: 100%;
16
+ vertical-align: middle;
17
+ }
18
+ // The control takes the whole width it is given, so a long value or a textarea has room.
19
+ .wui-inline-edit[data-wui-editing] {
20
+ display: flex;
21
+ }
22
+
23
+ .wui-inline-edit-display {
24
+ display: inline-flex;
25
+ align-items: center;
26
+ gap: 6px;
27
+ min-width: 0;
28
+ max-width: 100%;
29
+ min-height: 32px;
30
+ // The text lines up with its neighbours; only the hover tint reaches past it.
31
+ margin-inline: -6px;
32
+ padding: 4px 6px;
33
+ border: 0;
34
+ border-radius: var(--wui-radius-sm);
35
+ background: transparent;
36
+ color: inherit;
37
+ font: inherit;
38
+ text-align: start;
39
+ cursor: pointer;
40
+ transition: background-color 160ms var(--wui-ease-ui);
41
+ }
42
+ .wui-inline-edit-display[hidden] {
43
+ display: none;
44
+ }
45
+ .wui-inline-edit-display:hover {
46
+ background: var(--color-bg-muted);
47
+ }
48
+ .wui-inline-edit-display:focus-visible {
49
+ outline: var(--wui-focus-ring-width) solid var(--color-focus-ring);
50
+ outline-offset: 0;
51
+ }
52
+ .wui-inline-edit-display:disabled {
53
+ background: transparent;
54
+ cursor: default;
55
+ }
56
+
57
+ .wui-inline-edit-value {
58
+ min-width: 0;
59
+ overflow-wrap: anywhere;
60
+ // A textarea's line breaks still read as lines.
61
+ white-space: pre-line;
62
+ }
63
+ .wui-inline-edit-value[data-wui-empty] {
64
+ color: var(--color-text-subtle);
65
+ }
66
+
67
+ .wui-inline-edit-icon {
68
+ display: inline-flex;
69
+ flex: none;
70
+ color: var(--color-text-subtle);
71
+ opacity: 0;
72
+ transition: opacity 160ms var(--wui-ease-ui);
73
+ }
74
+ .wui-inline-edit-display:hover .wui-inline-edit-icon,
75
+ .wui-inline-edit-display:focus-visible .wui-inline-edit-icon {
76
+ opacity: 1;
77
+ }
78
+ .wui-inline-edit-display:disabled .wui-inline-edit-icon {
79
+ display: none;
80
+ }
81
+ // A touch screen has no hover: the pencil stays, faintly, so the value still reads as editable.
82
+ @media (hover: none) {
83
+ .wui-inline-edit-icon {
84
+ opacity: 0.6;
85
+ }
86
+ }
87
+ @media (pointer: coarse) {
88
+ .wui-inline-edit-display {
89
+ min-height: 44px;
90
+ }
91
+ }
92
+
93
+ .wui-inline-edit-editor {
94
+ flex: 1 1 12rem;
95
+ min-width: 0;
96
+ }
97
+
98
+ .wui-inline-edit-status,
99
+ .wui-inline-edit-spinner,
100
+ .wui-inline-edit-saved {
101
+ display: none;
102
+ }
103
+ .wui-inline-edit[data-wui-state="saving"] .wui-inline-edit-status,
104
+ .wui-inline-edit[data-wui-state="saved"] .wui-inline-edit-status {
105
+ display: inline-flex;
106
+ flex: none;
107
+ align-items: center;
108
+ color: var(--color-text-subtle);
109
+ }
110
+ .wui-inline-edit[data-wui-state="saving"] .wui-inline-edit-spinner {
111
+ display: inline-block;
112
+ }
113
+ .wui-inline-edit[data-wui-state="saved"] .wui-inline-edit-saved {
114
+ display: inline-flex;
115
+ color: var(--color-success-text);
116
+ }
117
+
118
+ .wui-inline-edit-error {
119
+ flex-basis: 100%;
120
+ font-size: 12px;
121
+ line-height: normal;
122
+ // The AA text shade, as .field-error: the fill red is under 4.5:1 at this size.
123
+ color: var(--color-danger-text);
124
+ }
125
+
126
+ @media (prefers-reduced-motion: reduce) {
127
+ .wui-inline-edit-display,
128
+ .wui-inline-edit-icon {
129
+ transition: none;
130
+ }
131
+ }