@webority/theme 0.6.1 → 0.6.3

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.6.1",
3
+ "version": "0.6.3",
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": {
@@ -75,6 +75,13 @@
75
75
  min-height: var(--wui-control-height);
76
76
  }
77
77
 
78
+ // Tactile press feedback — every variant AND every size (sm/md/lg). Kept
79
+ // separate from the height rule above so sm/lg (which opt out of the shared
80
+ // control height) still get the nudge. A signal, not a depth cue.
81
+ .btn:not(.btn-pill):not(.btn-pill-sm):not(.u-action):not(.btn-icon):active:not(:disabled) {
82
+ transform: translateY(1px);
83
+ }
84
+
78
85
  .btn-primary {
79
86
  // Pin hover/active to the pressed-primary token so a rebrand tracks
80
87
  // automatically instead of Bootstrap auto-shading $primary off-spec.
@@ -82,9 +89,27 @@
82
89
  --bs-btn-hover-border-color: var(--wui-primary-pressed);
83
90
  --bs-btn-active-bg: var(--wui-primary-pressed);
84
91
  --bs-btn-active-border-color: var(--wui-primary-pressed);
85
- &:active:not(:disabled) {
86
- transform: translateY(1px);
87
- }
92
+ }
93
+
94
+ .btn-danger {
95
+ // Pin hover/active to the pressed-danger token so Bootstrap cannot auto-shade the fill
96
+ // off-spec — the same treatment .btn-primary gets above. That is what stops the label
97
+ // flipping between states: once the fill stops moving, color-contrast() resolves the
98
+ // same way on every state.
99
+ //
100
+ // The label is deliberately NOT pinned to white. --wui-danger (#F8285A) carries white
101
+ // at 3.86:1 and --wui-danger-active (#E82646) at 4.38:1, both under the 4.5:1 AA floor,
102
+ // so forcing white is a serious color-contrast violation — axe flags it on BOTH
103
+ // surfaces. Bootstrap's automatic choice (the dark label, 5.44:1) is the accessible one
104
+ // and is what has always shipped.
105
+ //
106
+ // If white-on-red is wanted — it is the conventional destructive look — the fix is to
107
+ // darken --wui-danger to about #C81340 (white 5.80:1), which is a brand decision, not a
108
+ // per-component override.
109
+ --bs-btn-hover-bg: var(--wui-danger-active);
110
+ --bs-btn-hover-border-color: var(--wui-danger-active);
111
+ --bs-btn-active-bg: var(--wui-danger-active);
112
+ --bs-btn-active-border-color: var(--wui-danger-active);
88
113
  }
89
114
 
90
115
 
@@ -188,6 +188,30 @@
188
188
  .search-select-placeholder {
189
189
  color: var(--color-text-subtle);
190
190
  }
191
+
192
+ // AppSelectMini — the compact single-purpose picker (page size, a range switch). It shares
193
+ // every behaviour with AppSelect and differs only in metrics.
194
+ //
195
+ // <wui-select compact> emitted this class and NOTHING styled it, so AppSelectMini rendered
196
+ // byte-identical to a full-size select on both surfaces — the catalogue told people to
197
+ // reach for it when they wanted something compact, and got a 44px control. It was invisible
198
+ // to every gate because the class check only ever scanned the Razor tag helpers, never the
199
+ // elements package that actually emits it.
200
+ //
201
+ // The metrics deliberately match `.select.tpg-select` (the native page-size select in table
202
+ // pagination) so a compact wui select and a compact native select read as one control
203
+ // rather than two sizes of the same idea.
204
+ .search-select-compact .search-select-control {
205
+ height: 32px;
206
+ min-height: 32px;
207
+ min-width: 64px;
208
+ padding: 0 10px;
209
+ font-size: 13px;
210
+ font-weight: 600;
211
+ }
212
+ .search-select-compact .search-select-caret {
213
+ font-size: 12px;
214
+ }
191
215
  // Menu matches the themed-select dropdown: 16px squircle, 4px padding, soft
192
216
  // shadow.
193
217
  .search-select-menu {
@@ -550,6 +550,39 @@ textarea.textarea:focus {
550
550
  min-width: 0;
551
551
  }
552
552
  // Controls fill their field even though .field aligns children flex-start.
553
+ //
554
+ // The `<wui-*>` entries are load-bearing, not defensive. Every hard interactive control
555
+ // is now `.field > wui-select > .search-select`, so the child combinator below stopped
556
+ // reaching the inner div AND the real flex item — the custom element — was named by no
557
+ // rule at all. With `align-items: flex-start` above, that means it shrinks to its
558
+ // content: a select rendered 164px wide in a 377px column. Neither render parity nor the
559
+ // interaction suite saw it, because BOTH surfaces wrap the same element and are equally
560
+ // wrong, and the fixtures render at full width where nothing has to stretch.
561
+ //
562
+ // `display: block` is here for the same reason and is not redundant with the stretch: a
563
+ // custom element is `display: inline` by default, so outside a flex `.field` — dropped
564
+ // into a plain div, a grid cell, a table cell — it would still collapse. Being a flex
565
+ // item blockifies it; nothing else does.
566
+ wui-select,
567
+ wui-autocomplete,
568
+ wui-multiselect,
569
+ wui-phone,
570
+ wui-datepicker {
571
+ display: block;
572
+ width: 100%;
573
+ }
574
+ // AppSelectMini renders <wui-select compact> — a page-size / range picker that is
575
+ // deliberately narrow and does NOT belong to a .field. It has to opt out of the width
576
+ // above, or every toolbar picker stretches across its toolbar.
577
+ wui-select[compact] {
578
+ display: inline-block;
579
+ width: auto;
580
+ }
581
+ .field > wui-select,
582
+ .field > wui-autocomplete,
583
+ .field > wui-multiselect,
584
+ .field > wui-phone,
585
+ .field > wui-datepicker,
553
586
  .field > .search-select,
554
587
  .field > .input-with-unit,
555
588
  .field > .input,