@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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webority/theme",
3
- "version": "0.128.0",
3
+ "version": "0.130.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": {
@@ -47,7 +47,7 @@
47
47
  "postcss": "^8.5.31"
48
48
  },
49
49
  "devDependencies": {
50
- "@webority/tokens": "0.128.0",
50
+ "@webority/tokens": "0.130.0",
51
51
  "bootstrap": "5.3.3",
52
52
  "country-flag-icons": "^1.6.20",
53
53
  "sass-embedded": "^1.97.0",
@@ -1,4 +1,4 @@
1
- // Generated by @webority/tokens 0.128.0 from its token source. Do not edit; run webority brand --library.
1
+ // Generated by @webority/tokens 0.130.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;
@@ -8,8 +8,10 @@
8
8
  // retained because it's a tactile signal, not a depth cue.
9
9
  // A button is exactly as tall as a field of the same size (the --wui-control-md ladder, 32/36/44px), so a
10
10
  // button beside an input lines up in every form row. Heights are min-height with the label flex-centred; sm/lg
11
- // set theirs in their size blocks below.
12
- .btn:not(.btn-sm):not(.btn-lg):not(.btn-pill):not(.btn-pill-sm):not(.u-action):not(.btn-icon) {
11
+ // set theirs in their size blocks below, and so does a button sized by its group (.btn-group-sm/-lg).
12
+ .btn:not(.btn-sm):not(.btn-lg):not(.btn-group-sm > .btn):not(.btn-group-lg > .btn):not(.btn-pill):not(.btn-pill-sm):not(.u-action):not(
13
+ .btn-icon
14
+ ) {
13
15
  // The height is the field height and the label is flex-centred, so no vertical padding: it
14
16
  // would push a button past its field height.
15
17
  --bs-btn-padding-y: 0;
@@ -74,7 +76,7 @@
74
76
  // only the TRANSPARENCY is taken from the reference — the tint deepens on hover
75
77
  // then press. No border (the tint carries the shape). Disabled is the shared
76
78
  // neutral-grey state below, like every other variant.
77
- .btn-secondary {
79
+ .btn-soft-primary {
78
80
  --bs-btn-color: var(--color-primary-text);
79
81
  --bs-btn-bg: color-mix(in srgb, var(--color-primary) 12%, transparent);
80
82
  --bs-btn-border-color: transparent;
@@ -86,7 +88,7 @@
86
88
  --bs-btn-active-border-color: transparent;
87
89
  }
88
90
 
89
- // A soft-tinted affirmative — the success counterpart of .btn-secondary. Dark success text on a
91
+ // A soft-tinted affirmative, the success counterpart of .btn-soft-primary. Dark success text on a
90
92
  // faint success fill, so it reads as "resolved / confirmed" without the weight of a solid green.
91
93
  .btn-success {
92
94
  --bs-btn-color: var(--color-success-text);
@@ -176,7 +178,7 @@
176
178
 
177
179
  // Neutral outline on the theme's text tokens. Bootstrap's compiled default draws it in
178
180
  // $secondary, which drops to about 2.4:1 on a dark surface.
179
- .btn-outline-secondary {
181
+ .btn-outline-neutral {
180
182
  --bs-btn-color: var(--color-text-muted);
181
183
  --bs-btn-border-color: var(--color-border-strong);
182
184
  --bs-btn-hover-color: var(--color-text);
@@ -190,15 +192,15 @@
190
192
  --bs-btn-focus-box-shadow: 0 0 0 0.25rem var(--bs-focus-ring-color);
191
193
  }
192
194
 
193
- // Secondary-danger — the destructive counterpart of .btn-secondary: a soft red wash
195
+ // Secondary-danger, the destructive counterpart of .btn-soft-primary: a soft red wash
194
196
  // instead of a solid red fill, for a quieter destructive action (e.g. a "Remove" that
195
- // shouldn't shout like a solid .btn-danger). Mirrors .btn-secondary exactly — low-alpha
197
+ // shouldn't shout like a solid .btn-danger). Mirrors .btn-soft-primary exactly: low-alpha
196
198
  // tint deepening on hover/press, no border — but keyed off the danger tokens. The label
197
199
  // uses --color-danger-text (the AA-safe error red, lifted in dark mode to read on a dark surface),
198
200
  // not the brighter --color-danger. Disabled falls through to the shared neutral-grey
199
- // state below (it is not .btn-danger), like .btn-secondary. A product sets another label
201
+ // state below (it is not .btn-danger), like .btn-soft-primary. A product sets another label
200
202
  // ink with --wui-btn-secondary-danger-ink (e.g. --color-danger-text-on-soft in dark mode).
201
- .btn-secondary-danger {
203
+ .btn-soft-danger {
202
204
  --bs-btn-color: var(--wui-btn-secondary-danger-ink, var(--color-danger-text));
203
205
  --bs-btn-bg: color-mix(in srgb, var(--color-danger) 12%, transparent);
204
206
  --bs-btn-border-color: transparent;
@@ -216,7 +218,7 @@
216
218
  // Neutral grey button: the secondary button's shape in grey instead of the brand tint, for a
217
219
  // supporting action (Back, Skip, Close) that should not carry the brand colour. The fill is the
218
220
  // text colour at 8%, 12% on hover and 16% pressed, so it follows the theme in light and dark.
219
- .btn-neutral {
221
+ .btn-soft-neutral {
220
222
  --bs-btn-bg: color-mix(in srgb, var(--color-text) 8%, transparent);
221
223
  --bs-btn-color: var(--color-text);
222
224
  --bs-btn-border-color: transparent;
@@ -229,10 +231,28 @@
229
231
  --bs-btn-focus-box-shadow: 0 0 0 0.25rem var(--bs-focus-ring-color);
230
232
  }
231
233
 
234
+ // Neutral button: a raised surface in both themes. Bootstrap compiles its own btn-light from $light, so it
235
+ // stayed near-white on a dark page; these read the meaning tokens, and the border is a soft line.
236
+ .btn-neutral {
237
+ --bs-btn-color: var(--color-text);
238
+ --bs-btn-bg: var(--color-surface);
239
+ --bs-btn-border-color: var(--color-border);
240
+ --bs-btn-hover-color: var(--color-text);
241
+ --bs-btn-hover-bg: var(--color-bg-muted);
242
+ --bs-btn-hover-border-color: var(--color-border);
243
+ --bs-btn-active-color: var(--color-text);
244
+ --bs-btn-active-bg: var(--color-border);
245
+ --bs-btn-active-border-color: var(--color-border);
246
+ --bs-btn-disabled-color: var(--color-text-muted);
247
+ --bs-btn-disabled-bg: var(--color-surface);
248
+ --bs-btn-disabled-border-color: var(--color-border);
249
+ --bs-btn-focus-box-shadow: 0 0 0 0.25rem var(--bs-focus-ring-color);
250
+ }
251
+
232
252
  // Light outline for a dark banner/hero CTA, where .btn-outline-primary's brand-coloured
233
253
  // border/text would disappear against a dark background. White is used directly (not a
234
254
  // token) because it's the one colour that reads on any dark surface, brand-independent.
235
- .btn-outline-light {
255
+ .btn-glass {
236
256
  --bs-btn-color: #fff;
237
257
  --bs-btn-bg: transparent;
238
258
  --bs-btn-border-color: rgba(255, 255, 255, 0.6);
@@ -281,22 +301,24 @@
281
301
  }
282
302
  // Transparent-fill variants (secondary/ghost/text/neutral/outline-*) have no fill to tint from —
283
303
  // key the wash and the label off the accent (text) colour so the hue still shows.
284
- .btn-secondary.is-loading:disabled,
285
- .btn-secondary.is-loading.disabled,
286
- .btn-secondary-danger.is-loading:disabled,
287
- .btn-secondary-danger.is-loading.disabled,
288
- .btn-ghost.is-loading:disabled,
289
- .btn-ghost.is-loading.disabled,
290
- .btn-text.is-loading:disabled,
291
- .btn-text.is-loading.disabled,
304
+ .btn-soft-primary.is-loading:disabled,
305
+ .btn-soft-primary.is-loading.disabled,
306
+ .btn-soft-danger.is-loading:disabled,
307
+ .btn-soft-danger.is-loading.disabled,
308
+ .btn-ghost-primary.is-loading:disabled,
309
+ .btn-ghost-primary.is-loading.disabled,
310
+ .btn-link-primary.is-loading:disabled,
311
+ .btn-link-primary.is-loading.disabled,
312
+ .btn-soft-neutral.is-loading:disabled,
313
+ .btn-soft-neutral.is-loading.disabled,
292
314
  .btn-neutral.is-loading:disabled,
293
315
  .btn-neutral.is-loading.disabled,
294
316
  .btn-outline-primary.is-loading:disabled,
295
317
  .btn-outline-primary.is-loading.disabled,
296
318
  .btn-outline-danger.is-loading:disabled,
297
319
  .btn-outline-danger.is-loading.disabled,
298
- .btn-outline-light.is-loading:disabled,
299
- .btn-outline-light.is-loading.disabled {
320
+ .btn-glass.is-loading:disabled,
321
+ .btn-glass.is-loading.disabled {
300
322
  background-color: color-mix(in srgb, var(--bs-btn-color) 12%, var(--color-surface));
301
323
  border-color: color-mix(in srgb, var(--bs-btn-color) 12%, var(--color-surface));
302
324
  color: var(--bs-btn-color);
@@ -753,7 +775,7 @@
753
775
  //
754
776
  // No .btn-ghost-sm/-lg rungs: it is an ordinary .btn variant and sizes with Bootstrap's
755
777
  // own .btn-sm/.btn-lg, like .btn-primary.
756
- .btn-ghost {
778
+ .btn-ghost-primary {
757
779
  --bs-btn-color: var(--color-primary-text);
758
780
  --bs-btn-bg: transparent;
759
781
  --bs-btn-border-color: transparent;
@@ -768,27 +790,27 @@
768
790
  --bs-btn-disabled-border-color: transparent;
769
791
  }
770
792
  // Bootstrap's link-style buttons can carry an underline; the ghost never does.
771
- .btn.btn-ghost,
772
- .btn.btn-ghost:hover,
773
- .btn.btn-ghost:active,
774
- .btn.btn-ghost:focus-visible {
793
+ .btn.btn-ghost-primary,
794
+ .btn.btn-ghost-primary:hover,
795
+ .btn.btn-ghost-primary:active,
796
+ .btn.btn-ghost-primary:focus-visible {
775
797
  text-decoration: none;
776
798
  }
777
799
  // No fill at rest, so keyboard focus gets the outline ring instead.
778
- .btn.btn-ghost:focus-visible {
800
+ .btn.btn-ghost-primary:focus-visible {
779
801
  outline: var(--wui-focus-ring-width) solid var(--color-focus-ring);
780
802
  outline-offset: var(--wui-focus-ring-offset);
781
803
  box-shadow: none;
782
804
  }
783
- .btn.btn-ghost.btn-ghost:disabled,
784
- .btn.btn-ghost.btn-ghost.disabled {
805
+ .btn.btn-ghost-primary.btn-ghost-primary:disabled,
806
+ .btn.btn-ghost-primary.btn-ghost-primary.disabled {
785
807
  background-color: transparent;
786
808
  border-color: transparent;
787
809
  color: var(--color-primary-text);
788
810
  opacity: var(--wui-disabled-opacity);
789
811
  }
790
- .btn.btn-ghost.btn-ghost.is-loading:disabled,
791
- .btn.btn-ghost.btn-ghost.is-loading.disabled {
812
+ .btn.btn-ghost-primary.btn-ghost-primary.is-loading:disabled,
813
+ .btn.btn-ghost-primary.btn-ghost-primary.is-loading.disabled {
792
814
  opacity: 1;
793
815
  }
794
816
 
@@ -797,7 +819,7 @@
797
819
  // no lift, and no side padding, so it lines up with the text around it. Hover deepens the colour.
798
820
  // It pairs with animation="roll", whose label roll and round icon well carry the motion.
799
821
  // AppButton's `text` variant emits this class on both surfaces.
800
- .btn-text {
822
+ .btn-link-primary {
801
823
  --bs-btn-color: var(--color-primary-text);
802
824
  --bs-btn-bg: transparent;
803
825
  --bs-btn-border-color: transparent;
@@ -812,49 +834,49 @@
812
834
  --bs-btn-disabled-border-color: transparent;
813
835
  }
814
836
  // After the size rungs and at their weight, so sm and lg text buttons lose the side padding too.
815
- .btn.btn-text {
837
+ .btn.btn-link-primary {
816
838
  --bs-btn-padding-x: 0;
817
839
  }
818
- .btn.btn-text,
819
- .btn.btn-text:hover,
820
- .btn.btn-text:active,
821
- .btn.btn-text:focus-visible {
840
+ .btn.btn-link-primary,
841
+ .btn.btn-link-primary:hover,
842
+ .btn.btn-link-primary:active,
843
+ .btn.btn-link-primary:focus-visible {
822
844
  text-decoration: none;
823
845
  }
824
- .btn.btn-text::before {
846
+ .btn.btn-link-primary::before {
825
847
  display: none;
826
848
  }
827
- .btn.btn-text:hover:not(:disabled) {
849
+ .btn.btn-link-primary:hover:not(:disabled) {
828
850
  transform: none;
829
851
  }
830
- .btn.btn-text:focus-visible {
852
+ .btn.btn-link-primary:focus-visible {
831
853
  outline: var(--wui-focus-ring-width) solid var(--color-focus-ring);
832
854
  outline-offset: var(--wui-focus-ring-offset);
833
855
  box-shadow: none;
834
856
  }
835
857
  // A text button's icons follow the text: each icon is the text size, and the roll or pinned well
836
858
  // is 18, 20 and 22px at sm, md and lg, a snug ring around the icon that never outweighs the label.
837
- .btn.btn-text {
859
+ .btn.btn-link-primary {
838
860
  --wui-btn-roll-well: 20px;
839
861
  --wui-btn-well-pad: 3px;
840
862
  --wui-btn-text-icon: 14px;
841
863
  }
842
- .btn.btn-text.btn-sm {
864
+ .btn.btn-link-primary.btn-sm {
843
865
  --wui-btn-roll-well: 18px;
844
866
  --wui-btn-well-pad: 3px;
845
867
  --wui-btn-text-icon: 12px;
846
868
  }
847
- .btn.btn-text.btn-lg {
869
+ .btn.btn-link-primary.btn-lg {
848
870
  --wui-btn-roll-well: 22px;
849
871
  --wui-btn-well-pad: 3px;
850
872
  --wui-btn-text-icon: 16px;
851
873
  }
852
- .btn.btn-text svg {
874
+ .btn.btn-link-primary svg {
853
875
  width: var(--wui-btn-text-icon);
854
876
  height: var(--wui-btn-text-icon);
855
877
  }
856
- .btn.btn-text.btn-text:disabled,
857
- .btn.btn-text.btn-text.disabled {
878
+ .btn.btn-link-primary.btn-link-primary:disabled,
879
+ .btn.btn-link-primary.btn-link-primary.disabled {
858
880
  background-color: transparent;
859
881
  border-color: transparent;
860
882
  color: var(--color-primary-text);
@@ -85,7 +85,7 @@
85
85
  //
86
86
  // Example:
87
87
  // <a class="btn btn-primary btn-pill" style="--bs-btn-padding-x:1.5rem;">…</a>
88
- // <a class="btn btn-light btn-pill-sm">Learn more</a>
88
+ // <a class="btn btn-neutral btn-pill-sm">Learn more</a>
89
89
  .btn-pill {
90
90
  --bs-btn-padding-y: 0; // height driven by min-height + flex centering
91
91
  --bs-btn-padding-x: 1.25rem; // 20px (px-5)
@@ -123,7 +123,7 @@
123
123
  // - text : --wui-text-heading (text-foreground in marketing-root)
124
124
  // - blur : 4px (backdrop-blur-sm)
125
125
  // - hover bg: #ffffff (hover:bg-surface = full opacity)
126
- .btn-ghost-dark {
126
+ .btn-ghost-glass {
127
127
  --bs-btn-color: var(--wui-text-heading);
128
128
  --bs-btn-bg: rgba(255, 255, 255, 0.60);
129
129
  --bs-btn-border-color: rgba(13, 24, 43, 0.15);