@webority/theme 0.128.0 → 0.130.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.
@@ -6,6 +6,12 @@
6
6
  // partials are a split of one stylesheet, not independent modules, so a rule
7
7
  // here may be overridden by a later partial. Never reorder the imports.
8
8
 
9
+ // Bootstrap reads its text face from --bs-font-sans-serif (through --bs-body-font-family). Pointing it at the
10
+ // theme token means a product that sets --wui-font-ui restyles Bootstrap-only controls too, with no sheet of its own.
11
+ :root {
12
+ --bs-font-sans-serif: var(--wui-font-ui);
13
+ }
14
+
9
15
  // ── Text-scale utilities (wui-text-*) ──
10
16
  .wui-text-xs {
11
17
  font-size: 12px;
@@ -15,6 +21,11 @@
15
21
  font-size: 13.5px;
16
22
  line-height: 1.5;
17
23
  }
24
+ // Text a person typed: keep their line breaks and break a long unbroken run (a URL) instead of overflowing.
25
+ .wui-prewrap {
26
+ white-space: pre-wrap;
27
+ overflow-wrap: anywhere;
28
+ }
18
29
  .wui-text-base {
19
30
  font-size: 15px;
20
31
  line-height: 1.5;
@@ -351,7 +362,8 @@
351
362
  .search-select-multi {
352
363
  align-items: center;
353
364
  gap: 6px;
354
- min-height: 40px;
365
+ // The md field height is the floor, so a one-row multi-select lines up with the inputs and buttons beside it.
366
+ min-height: var(--wui-control-md);
355
367
  height: auto;
356
368
  padding-top: 5px;
357
369
  padding-bottom: 5px;
@@ -490,12 +502,6 @@ wui-multiselect[collapse-chips] .ms-chips {
490
502
  }
491
503
  // AppTagInput renders its input inside the chip row, after the chips, so the shared
492
504
  // `.ms-chips > .ms-input` rule above lets it wrap with them and fill the rest of the line.
493
- // Match AppInput's per-size heights: the shared `.search-select-multi` floor is lower than the md
494
- // control height, so raise it; sm and lg come from the size-specific `.search-select-{sm,lg}
495
- // .search-select-control` rules.
496
- wui-taginput .search-select-multi {
497
- min-height: var(--wui-control-md);
498
- }
499
505
 
500
506
  /* ── Choice card: image / custom-template variant ── */
501
507
  .struct-card-img-card {
@@ -525,3 +531,15 @@ wui-taginput .search-select-multi {
525
531
  top: 8px;
526
532
  right: 8px;
527
533
  }
534
+
535
+ // Line breaks in the text are kept and long lines still wrap. Used by multiline on app-value, app-description and AppDescriptions items.
536
+ .wui-pre-line {
537
+ white-space: pre-line;
538
+ }
539
+
540
+ // Monospace text for codes and references. The control selectors give a field the same family as plain text.
541
+ .wui-mono,
542
+ .form-control.wui-mono,
543
+ .input.wui-mono {
544
+ font-family: var(--bs-font-monospace);
545
+ }
@@ -869,6 +869,7 @@
869
869
  // data-theme attribute and the auto media query alike, with no per-component dark rules.
870
870
  .alert-info {
871
871
  --bs-alert-bg: var(--color-info-soft);
872
+ --alert-tone: var(--color-info);
872
873
  --bs-alert-border-color: var(--color-info-border);
873
874
  --bs-alert-color: var(--color-text-body);
874
875
  --alert-accent: var(--wui-info-active);
@@ -877,6 +878,7 @@
877
878
  }
878
879
  .alert-success {
879
880
  --bs-alert-bg: var(--color-success-soft);
881
+ --alert-tone: var(--color-success);
880
882
  --bs-alert-border-color: var(--color-success-border);
881
883
  --bs-alert-color: var(--color-text-body);
882
884
  --alert-accent: var(--wui-success-active);
@@ -885,6 +887,7 @@
885
887
  }
886
888
  .alert-warning {
887
889
  --bs-alert-bg: var(--color-warning-soft);
890
+ --alert-tone: var(--color-warning);
888
891
  --bs-alert-border-color: var(--color-warning-border);
889
892
  --bs-alert-color: var(--color-text-body);
890
893
  --alert-accent: var(--wui-warning-active);
@@ -893,6 +896,7 @@
893
896
  }
894
897
  .alert-danger {
895
898
  --bs-alert-bg: var(--color-danger-soft);
899
+ --alert-tone: var(--color-danger);
896
900
  --bs-alert-border-color: var(--color-danger-border);
897
901
  --bs-alert-color: var(--color-text-body);
898
902
  --alert-accent: var(--wui-danger-active);
@@ -1000,6 +1004,33 @@
1000
1004
  align-items: center;
1001
1005
  gap: 8px;
1002
1006
  }
1007
+ // A tinted, outline, ghost or text button in the action slot takes the alert's tone instead of
1008
+ // the brand colour, so it reads as part of the alert. The label is the alert's AA-safe text
1009
+ // colour. Solid buttons (primary, danger, warning) keep their own fill, which carries meaning.
1010
+ .alert-action :is(.btn-soft-primary, .btn-outline-primary, .btn-ghost-primary, .btn-link-primary) {
1011
+ --bs-btn-color: var(--alert-text);
1012
+ --bs-btn-hover-color: var(--alert-text);
1013
+ --bs-btn-active-color: var(--alert-text);
1014
+ --bs-btn-disabled-color: var(--alert-text);
1015
+ --bs-btn-focus-box-shadow: 0 0 0 0.25rem color-mix(in srgb, var(--alert-tone) 40%, transparent);
1016
+ }
1017
+ .alert-action .btn-soft-primary {
1018
+ --bs-btn-bg: color-mix(in srgb, var(--alert-tone) 16%, transparent);
1019
+ --bs-btn-hover-bg: color-mix(in srgb, var(--alert-tone) 24%, transparent);
1020
+ --bs-btn-active-bg: color-mix(in srgb, var(--alert-tone) 32%, transparent);
1021
+ }
1022
+ .alert-action .btn-outline-primary {
1023
+ --bs-btn-border-color: var(--alert-tone);
1024
+ --bs-btn-hover-bg: color-mix(in srgb, var(--alert-tone) 16%, transparent);
1025
+ --bs-btn-hover-border-color: var(--alert-tone);
1026
+ --bs-btn-active-bg: color-mix(in srgb, var(--alert-tone) 24%, transparent);
1027
+ --bs-btn-active-border-color: var(--alert-tone);
1028
+ --bs-btn-disabled-border-color: var(--alert-tone);
1029
+ }
1030
+ .alert-action .btn-ghost-primary {
1031
+ --bs-btn-hover-bg: color-mix(in srgb, var(--alert-tone) 16%, transparent);
1032
+ --bs-btn-active-bg: color-mix(in srgb, var(--alert-tone) 24%, transparent);
1033
+ }
1003
1034
  @include media-breakpoint-up(md) {
1004
1035
  .alert-has-action {
1005
1036
  flex-wrap: nowrap;
@@ -39,6 +39,7 @@
39
39
  "--color-field-border-focus": "Border of a focused, open or active control such as an input or select.",
40
40
  "--color-field-border-hover": "Hover border of an input-like control.",
41
41
  "--color-focus-ring": "Colour of the keyboard focus ring drawn on focus-visible controls.",
42
+ "--color-focus-ring-soft": "Translucent step of the focus ring colour, for a soft halo around a focused field.",
42
43
  "--color-info": "Vivid info fill for badges and dots.",
43
44
  "--color-info-border": "Tinted info border of alerts and badges.",
44
45
  "--color-info-pressed": "Info fill while a control is pressed.",
@@ -64,6 +65,10 @@
64
65
  "--color-success-text": "Success colour as text on light surfaces.",
65
66
  "--color-success-text-on-soft": "Success text on a soft success tint, such as an alert heading.",
66
67
  "--color-surface": "Card and panel surface.",
68
+ "--color-surface-inverse-wash-12": "Medium translucent wash over an inverse band, for a selected or pressed tile or row.",
69
+ "--color-surface-inverse-wash-24": "Strong translucent wash over an inverse band, for a divider or a filled chip.",
70
+ "--color-surface-inverse-wash-4": "Faintest translucent wash over an inverse band, for a resting tile or row.",
71
+ "--color-surface-inverse-wash-8": "Light translucent wash over an inverse band, for a hovered tile or row.",
67
72
  "--color-text": "Main heading and body ink.",
68
73
  "--color-text-body": "Body copy on a tinted surface such as an alert body.",
69
74
  "--color-text-muted": "Secondary text for descriptions and muted copy.",
@@ -84,8 +89,11 @@
84
89
  "--wui-border-light": "Default hairline border of cards, tables and dividers.",
85
90
  "--wui-border-soft": "Softest border, for inner dividers.",
86
91
  "--wui-border-strong": "Strong border for emphasised separators, chart axes and unselected control outlines.",
92
+ "--wui-card-pad": "Padding inside a card and its header; a card class can set it to retune one card.",
87
93
  "--wui-card-shadow-lifted": "Shadow of a lifted card, none in this theme.",
88
94
  "--wui-card-shadow-lifted-hover": "Shadow of a lifted card while it is hovered, none in this theme.",
95
+ "--wui-card-title-fs": "Font size of a card title.",
96
+ "--wui-card-title-lh": "Line height of a card title.",
89
97
  "--wui-chart-1": "Colour of chart series 1, the brand primary.",
90
98
  "--wui-chart-2": "Colour of chart series 2 of the eight categorical series.",
91
99
  "--wui-chart-3": "Colour of chart series 3 of the eight categorical series.",
@@ -155,6 +163,7 @@
155
163
  "--wui-dark-text-muted": "Secondary text colour in dark mode.",
156
164
  "--wui-dark-text-subtle": "Tertiary text colour in dark mode, for hints and captions.",
157
165
  "--wui-disabled-opacity": "Opacity of a control that dims as a whole when disabled.",
166
+ "--wui-drawer-max": "Height of a bottom sheet drawer as a count of viewport height percent.",
158
167
  "--wui-ease-elastic": "Overshooting easing for the tab ink bar's spring into place.",
159
168
  "--wui-ease-out": "Easing curve matching the locked design's motion exports.",
160
169
  "--wui-ease-ui": "Easing curve for interface transitions.",
@@ -171,6 +180,7 @@
171
180
  "--wui-first-day": "Weekday calendars start their week on, from 0 for Sunday to 6 for Saturday.",
172
181
  "--wui-focus-ring-inset": "Offset that draws the focus ring inside a scrolling container.",
173
182
  "--wui-focus-ring-offset": "Gap between a control and its keyboard focus ring.",
183
+ "--wui-focus-ring-soft-shadow": "Soft halo drawn around a focused text field, in the translucent focus ring colour.",
174
184
  "--wui-focus-ring-width": "Width of the keyboard focus ring.",
175
185
  "--wui-font-display": "Display typeface for headings marked as display text.",
176
186
  "--wui-font-mono": "Monospace typeface for code, identifiers and figures that must line up.",
@@ -201,9 +211,12 @@
201
211
  "--wui-info-active": "Info ink for icons and active states on light surfaces.",
202
212
  "--wui-info-text": "Info colour as text on light surfaces.",
203
213
  "--wui-ink": "Pure black ink, the highest-contrast text colour.",
214
+ "--wui-kpi-value-size": "Font size of the main figure in a KPI tile.",
204
215
  "--wui-lh-body": "Line height of running text and of any text that is not a heading or display text.",
205
216
  "--wui-lh-display": "Line height of display-size text such as hero titles.",
206
217
  "--wui-lh-heading": "Line height of headings.",
218
+ "--wui-modal-max-width": "Maximum width of a modal dialog; each dialog sets it from its size.",
219
+ "--wui-nav-menu-current-bg": "Background of the current item in a navigation menu.",
207
220
  "--wui-neutral-bg-dark": "Muted background of table emphasis rows and mega-menu hover.",
208
221
  "--wui-neutral-bg-light": "Faint background for table emphasis and mega-menu hover.",
209
222
  "--wui-neutral-border-dark": "Border tone of table emphasis rows and dividers.",
@@ -232,6 +245,7 @@
232
245
  "--wui-scrollbar-active": "Scrollbar thumb colour while it is dragged.",
233
246
  "--wui-scrollbar-hover": "Scrollbar thumb colour while it is hovered.",
234
247
  "--wui-shadow-card": "Shadow under in-page cards, none in this theme so cards stay flat.",
248
+ "--wui-shadow-elevated": "Shadow of a surface lifted slightly above the page, such as a toast, a sticky bar or a floating action button.",
235
249
  "--wui-shadow-modal": "Larger overlay shadow, for the largest floating surfaces.",
236
250
  "--wui-shadow-popover": "Shadow of floating overlays such as menus and popovers.",
237
251
  "--wui-space-2xl": "Double extra-large step of the spacing scale.",
@@ -244,6 +258,7 @@
244
258
  "--wui-space-xl": "Extra-large step of the spacing scale.",
245
259
  "--wui-space-xs": "Extra-small step of the spacing scale.",
246
260
  "--wui-space-xxs": "Hairline step of the spacing scale.",
261
+ "--wui-step-tile-size": "Width and height of the numbered circle in a step tile.",
247
262
  "--wui-success": "Vivid success fill for badges, dots and success buttons.",
248
263
  "--wui-success-10": "Success tint 10, the soft background of success alerts and badges.",
249
264
  "--wui-success-20": "Success tint 20 for soft fills behind success alerts and badges.",
@@ -1,156 +0,0 @@
1
- // ── Assistant chat ──
2
- // <wui-chat> / <app-chat>: a launcher pinned to a bottom corner and a side panel holding the
3
- // conversation and the question box. The header, buttons, form field and alerts inside are the
4
- // theme's own (.drawer-header, .btn, .form-control, .alert); only the placement and the two chat
5
- // shapes live here. A compact launcher is the shared .wui-floating-btn circle (_floating.scss).
6
- //
7
- // Part of the wui-components layer — see _wui-components.scss for load order.
8
-
9
- // The element is a plain host: its two parts are fixed to the viewport.
10
- wui-chat {
11
- display: contents;
12
- }
13
-
14
- .wui-chat-launcher {
15
- position: fixed;
16
- // Rises above an open consent banner, which publishes its room on html.
17
- bottom: var(--wui-consent-banner-block, 0px);
18
- inset-inline-end: 0;
19
- z-index: var(--wui-z-fixed);
20
- margin: 1rem;
21
- }
22
- wui-chat[position="start"] .wui-chat-launcher {
23
- inset-inline-end: auto;
24
- inset-inline-start: 0;
25
- }
26
-
27
- // Above the shell chrome and below modals, like the drawer it stands in for.
28
- .wui-chat-panel {
29
- position: fixed;
30
- top: 0;
31
- bottom: 0;
32
- inset-inline-end: 0;
33
- z-index: var(--wui-z-shell-drawer);
34
- display: flex;
35
- flex-direction: column;
36
- width: min(440px, 100%);
37
- background: var(--color-surface);
38
- border-inline-start: 1px solid var(--color-border);
39
- box-shadow: var(--wui-shadow-modal);
40
- }
41
- wui-chat[position="start"] .wui-chat-panel {
42
- inset-inline-end: auto;
43
- inset-inline-start: 0;
44
- border-inline-start: 0;
45
- border-inline-end: 1px solid var(--color-border);
46
- }
47
- // `hidden` is how the element closes the panel; display: flex above would otherwise win over it.
48
- .wui-chat-panel[hidden] {
49
- display: none;
50
- }
51
-
52
- .wui-chat-body {
53
- flex: 1 1 auto;
54
- min-height: 0;
55
- padding: 20px;
56
- overflow-y: auto;
57
- }
58
- .wui-chat-empty {
59
- padding-block: 2rem;
60
- }
61
- .wui-chat-foot {
62
- flex: none;
63
- padding: 16px 20px;
64
- border-top: 1px solid var(--color-border);
65
- }
66
-
67
- // The person's question, on the right; the answer is plain text on the panel.
68
- .wui-chat-question {
69
- max-width: 85%;
70
- }
71
- .wui-chat-bubble {
72
- padding: 10px 14px;
73
- background: var(--color-bg-muted);
74
- border-radius: var(--wui-radius-lg);
75
- white-space: pre-wrap;
76
- overflow-wrap: anywhere;
77
- }
78
-
79
- // The question box starts one line tall, as tall as Send beside it, and grows with its text
80
- // up to a few lines. Its padding is equal top and bottom, so one line of text sits centred in it.
81
- .wui-chat-composer .form-control {
82
- min-height: var(--wui-control-md);
83
- max-height: 9rem;
84
- padding-block: 10px;
85
- resize: none;
86
- }
87
- // A form reserves a line under each field for its error; the question box has none, and the
88
- // empty line pushed Send below the box.
89
- .wui-chat-composer .wui-field-message:empty {
90
- display: none;
91
- }
92
-
93
- // Attachments wrap onto new rows as the composer or a sent question grows.
94
- .wui-chat-attachments {
95
- display: flex;
96
- flex-wrap: wrap;
97
- gap: var(--wui-space-xs);
98
- }
99
- .wui-chat-question-attachments {
100
- display: flex;
101
- flex-wrap: wrap;
102
- justify-content: flex-end;
103
- gap: var(--wui-space-xs);
104
- }
105
-
106
- // The banner that says a question is being edited, with its cancel control beside the text.
107
- .wui-chat-editing {
108
- display: flex;
109
- align-items: center;
110
- gap: var(--wui-space-sm);
111
- padding: var(--wui-space-sm) var(--wui-space-md);
112
- background: var(--color-bg-muted);
113
- border-radius: var(--wui-radius-md);
114
- color: var(--color-text-muted);
115
- font-size: var(--wui-fs-sm);
116
- }
117
-
118
- // Copy, edit, retry and the other actions under an answer; they wrap rather than overflow the panel.
119
- .wui-chat-turn-actions {
120
- display: flex;
121
- flex-wrap: wrap;
122
- gap: var(--wui-space-xs);
123
- margin-block-start: var(--wui-space-xs);
124
- }
125
-
126
- // Suggested follow-up questions under an answer, as wrapping chips.
127
- .wui-chat-suggestions {
128
- display: flex;
129
- flex-wrap: wrap;
130
- gap: var(--wui-space-xs);
131
- }
132
-
133
- // Past chats: a scrolling list in the body's padding, one row per chat.
134
- .wui-chat-past {
135
- display: flex;
136
- flex-direction: column;
137
- flex: 1 1 auto;
138
- min-height: 0;
139
- gap: var(--wui-space-xs);
140
- padding: var(--wui-space-lg);
141
- overflow: auto;
142
- }
143
- // min-width 0 lets the title inside the row shrink and truncate instead of pushing the row wider.
144
- .wui-chat-past-row {
145
- display: flex;
146
- align-items: center;
147
- gap: var(--wui-space-sm);
148
- min-width: 0;
149
- }
150
-
151
- // Bootstrap's d-flex is !important, so hidden needs its own rule.
152
- .wui-chat-foot[hidden],
153
- .wui-chat-past[hidden],
154
- .wui-chat-suggestions[hidden] {
155
- display: none !important;
156
- }