@webority/theme 0.13.0 → 0.13.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.13.0",
3
+ "version": "0.13.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": {
@@ -59,7 +59,6 @@
59
59
  @import "flags";
60
60
  @import "wui/shell";
61
61
  @import "wui/dock";
62
- @import "wui/feedback";
63
62
  @import "wui/consent-banner";
64
63
  @import "wui/toolbar";
65
64
  // Last: restates the settled state of menus other partials style, so it must win.
@@ -701,7 +701,7 @@ $wui-field-error-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/
701
701
  .pw-toggle {
702
702
  position: absolute;
703
703
  right: 7px;
704
- top: 22px;
704
+ top: 50%;
705
705
  transform: translateY(-50%);
706
706
  display: grid;
707
707
  place-items: center;
@@ -1542,64 +1542,100 @@ wui-otp {
1542
1542
  // keyboard navigation (arrow keys, Page Up/Down, Home/End). Form-associated for
1543
1543
  // single/range value submission.
1544
1544
  .slider {
1545
+ // The thumb diameter, which also sets how far in from each track end the thumb's
1546
+ // centre stops (half of it), so a thumb at min or max sits inside the track.
1547
+ --wui-slider-thumb: 30px;
1545
1548
  display: flex;
1546
1549
  align-items: center;
1547
1550
  gap: 12px;
1548
1551
  position: relative;
1549
1552
  user-select: none;
1550
- height: 32px;
1553
+ height: 36px;
1551
1554
  min-width: 200px;
1552
1555
  }
1556
+ // One continuous pill: the filled part runs up to the thumb in the primary accent, the
1557
+ // rest stays the neutral border tone.
1553
1558
  .slider-track {
1554
1559
  flex: 1;
1555
1560
  position: relative;
1556
- height: 6px;
1561
+ height: 12px;
1557
1562
  background-color: var(--color-border);
1558
- border-radius: 3px;
1563
+ border-radius: 999px;
1559
1564
  cursor: pointer;
1560
1565
  }
1566
+ // The fill and the thumbs are siblings of the track, positioned against .slider, so each
1567
+ // centres itself on the track's midline rather than inheriting the container's height.
1561
1568
  .slider-fill {
1562
1569
  position: absolute;
1563
- top: 0;
1564
- height: 6px;
1570
+ top: 50%;
1571
+ height: 12px;
1572
+ margin-top: -6px;
1573
+ // left/right carry the raw percentage; these margins move each edge onto the inset
1574
+ // thumb centre. A single slider sets no --wui-fill-start, so its fill keeps the track's
1575
+ // own start.
1576
+ margin-left: calc(var(--wui-slider-thumb) * (0.5 - var(--wui-fill-start, 0.5)));
1577
+ margin-right: calc(var(--wui-slider-thumb) * (var(--wui-fill-end, 0.5) - 0.5));
1565
1578
  background-color: var(--color-primary);
1566
- border-radius: 3px;
1579
+ border-radius: 999px;
1567
1580
  pointer-events: none;
1568
1581
  }
1582
+ // A surface-coloured disc with an accent ring. The thumb answers the pointer before the
1583
+ // value does: a small lift on hover and a firmer one while held, so the control feels
1584
+ // picked up rather than merely moved. Only the thumb is eased; the fill and the thumb's
1585
+ // position follow the pointer per frame and would lag it if they were transitioned.
1569
1586
  .slider-thumb {
1570
1587
  position: absolute;
1571
1588
  top: 50%;
1572
- width: 20px;
1573
- height: 20px;
1574
- margin-top: -10px;
1575
- margin-left: -10px;
1589
+ box-sizing: border-box;
1590
+ width: var(--wui-slider-thumb);
1591
+ height: var(--wui-slider-thumb);
1592
+ margin-top: calc(var(--wui-slider-thumb) / -2);
1593
+ // left is t x 100% of the track; pulling back by t x the thumb width puts the centre at
1594
+ // half a thumb + t x (track - thumb), the inset travel the pointer math also uses.
1595
+ margin-left: calc(var(--wui-slider-thumb) * -1 * var(--wui-t, 0.5));
1576
1596
  padding: 0;
1577
1597
  appearance: none;
1578
1598
  -webkit-appearance: none;
1579
- background-color: var(--color-primary);
1580
- border: 2px solid var(--color-surface);
1599
+ background-color: var(--color-surface);
1600
+ border: 3px solid var(--color-primary);
1581
1601
  border-radius: 50%;
1582
1602
  box-shadow: var(--wui-shadow-thumb);
1583
1603
  cursor: pointer;
1584
1604
  transition:
1585
- background-color 0.15s ease,
1586
- box-shadow 0.15s ease,
1605
+ transform 0.18s var(--wui-ease-ui),
1606
+ box-shadow 0.18s var(--wui-ease-ui),
1587
1607
  border-color 0.15s ease;
1588
1608
  }
1589
1609
  .slider-thumb:hover:not(:disabled) {
1610
+ transform: scale(1.08);
1590
1611
  box-shadow: var(--wui-shadow-thumb-hover);
1591
1612
  }
1613
+ .slider-thumb:active:not(:disabled) {
1614
+ transform: scale(1.14);
1615
+ box-shadow: 0 3px 14px color-mix(in srgb, var(--color-primary) 28%, transparent);
1616
+ }
1592
1617
  .slider-thumb:focus-visible {
1593
1618
  outline: 2px solid var(--color-primary);
1594
1619
  outline-offset: 4px;
1595
1620
  }
1596
1621
  .slider-thumb:disabled,
1597
1622
  .slider:has([disabled]) .slider-thumb {
1598
- background-color: var(--color-text-subtle);
1599
- border-color: var(--color-border);
1623
+ border-color: var(--color-text-subtle);
1600
1624
  cursor: not-allowed;
1601
1625
  opacity: 0.6;
1602
1626
  }
1627
+ .slider:has([disabled]) .slider-fill {
1628
+ background-color: var(--color-text-subtle);
1629
+ }
1630
+ @media (prefers-reduced-motion: reduce) {
1631
+ .slider-thumb {
1632
+ transition: none;
1633
+ }
1634
+ .slider-thumb:hover:not(:disabled),
1635
+ .slider-thumb:active:not(:disabled) {
1636
+ transform: none;
1637
+ }
1638
+ }
1603
1639
  .slider-value {
1604
1640
  display: inline-block;
1605
1641
  min-width: 60px;
@@ -1610,23 +1646,21 @@ wui-otp {
1610
1646
  white-space: nowrap;
1611
1647
  }
1612
1648
 
1613
- // Dark mode: slider shadows need light ink for visibility.
1614
1649
  // Size variants
1615
1650
  .slider-sm {
1651
+ --wui-slider-thumb: 22px;
1616
1652
  height: 28px;
1617
1653
  gap: 8px;
1618
1654
  }
1619
- .slider-sm .slider-track {
1620
- height: 4px;
1655
+ .slider-sm .slider-track,
1656
+ .slider-sm .slider-fill {
1657
+ height: 8px;
1621
1658
  }
1622
1659
  .slider-sm .slider-fill {
1623
- height: 4px;
1660
+ margin-top: -4px;
1624
1661
  }
1625
1662
  .slider-sm .slider-thumb {
1626
- width: 16px;
1627
- height: 16px;
1628
- margin-top: -8px;
1629
- margin-left: -8px;
1663
+ border-width: 2px;
1630
1664
  }
1631
1665
  .slider-sm .slider-value {
1632
1666
  font-size: 12px;
@@ -1634,20 +1668,16 @@ wui-otp {
1634
1668
  }
1635
1669
 
1636
1670
  .slider-lg {
1637
- height: 36px;
1671
+ --wui-slider-thumb: 34px;
1672
+ height: 40px;
1638
1673
  gap: 16px;
1639
1674
  }
1640
- .slider-lg .slider-track {
1641
- height: 8px;
1642
- }
1675
+ .slider-lg .slider-track,
1643
1676
  .slider-lg .slider-fill {
1644
- height: 8px;
1677
+ height: 14px;
1645
1678
  }
1646
- .slider-lg .slider-thumb {
1647
- width: 24px;
1648
- height: 24px;
1649
- margin-top: -12px;
1650
- margin-left: -12px;
1679
+ .slider-lg .slider-fill {
1680
+ margin-top: -7px;
1651
1681
  }
1652
1682
  .slider-lg .slider-value {
1653
1683
  font-size: 15px;
@@ -1,259 +0,0 @@
1
- // ── In-product feedback ──
2
- // AppFeedback / <app-feedback> / <wui-feedback> — a floating trigger pinned to a page
3
- // corner that opens a small panel with a message box. The element authors the markup and
4
- // owns the states (`open` / `busy` on the host, `hidden` on the panel, error and thank-you
5
- // blocks); everything visual lives here.
6
- //
7
- // Part of the wui-components layer — see _wui-components.scss for load order.
8
-
9
- wui-feedback {
10
- position: fixed;
11
- bottom: 20px;
12
- z-index: var(--wui-z-fixed);
13
- display: block;
14
- }
15
- wui-feedback,
16
- wui-feedback[position="bottom-right"] {
17
- right: 20px;
18
- left: auto;
19
- }
20
- wui-feedback[position="bottom-left"] {
21
- left: 20px;
22
- right: auto;
23
- }
24
-
25
- // ── Trigger ──
26
- .feedback-trigger {
27
- display: inline-flex;
28
- align-items: center;
29
- gap: 8px;
30
- height: var(--wui-control-height-sm);
31
- padding: 0 16px;
32
- border: none;
33
- border-radius: 999px;
34
- background: var(--color-primary);
35
- color: var(--color-primary-text);
36
- font-size: 14px;
37
- font-weight: 600;
38
- line-height: 1;
39
- cursor: pointer;
40
- box-shadow: var(--wui-shadow-overlay);
41
- transition:
42
- background-color 160ms var(--wui-ease-ui),
43
- transform 160ms var(--wui-ease-ui);
44
- }
45
- .feedback-trigger:hover {
46
- background: var(--color-primary-hover);
47
- }
48
- .feedback-trigger:focus-visible {
49
- outline: 2px solid var(--color-primary);
50
- outline-offset: 2px;
51
- }
52
- .feedback-trigger-icon {
53
- display: grid;
54
- place-items: center;
55
- line-height: 0;
56
- }
57
- .feedback-trigger-label {
58
- white-space: nowrap;
59
- }
60
-
61
- // ── Panel ──
62
- // Anchored to the same corner as the trigger, opening upward — the trigger sits at the
63
- // bottom of the viewport, so there is only ever room above it.
64
- .feedback-panel {
65
- position: absolute;
66
- bottom: calc(100% + 12px);
67
- width: 340px;
68
- max-width: calc(100vw - 40px);
69
- padding: 16px;
70
- background: var(--color-surface);
71
- border: 1px solid var(--color-border);
72
- border-radius: var(--wui-radius-lg);
73
- box-shadow: var(--wui-shadow-overlay-lg);
74
- color: var(--color-text);
75
- text-align: start;
76
- }
77
- wui-feedback[position="bottom-right"] .feedback-panel {
78
- right: 0;
79
- }
80
- wui-feedback[position="bottom-left"] .feedback-panel {
81
- left: 0;
82
- }
83
- // `hidden` on a custom element's child is honoured, but a later display rule would win —
84
- // state it explicitly so the panel cannot be left visible by cascade order.
85
- .feedback-panel[hidden] {
86
- display: none;
87
- }
88
-
89
- .feedback-head {
90
- display: flex;
91
- align-items: flex-start;
92
- justify-content: space-between;
93
- gap: 12px;
94
- margin-bottom: 12px;
95
- }
96
- .feedback-heading {
97
- margin: 0;
98
- font-size: 15px;
99
- font-weight: 600;
100
- line-height: 1.3;
101
- color: var(--color-text);
102
- }
103
- .feedback-close {
104
- display: grid;
105
- place-items: center;
106
- width: 28px;
107
- height: 28px;
108
- flex: 0 0 auto;
109
- padding: 0;
110
- border: none;
111
- border-radius: var(--wui-radius-sm);
112
- background: transparent;
113
- color: var(--color-text-muted);
114
- cursor: pointer;
115
- }
116
- .feedback-close:hover {
117
- background: var(--color-bg-muted);
118
- color: var(--color-text);
119
- }
120
- .feedback-close:focus-visible {
121
- outline: 2px solid var(--color-primary);
122
- outline-offset: 1px;
123
- }
124
-
125
- .feedback-body[hidden],
126
- .feedback-actions[hidden],
127
- .feedback-thanks[hidden] {
128
- display: none;
129
- }
130
-
131
- // ── Fields ──
132
- .feedback-field {
133
- display: block;
134
- margin-bottom: 12px;
135
- }
136
- .feedback-field-label {
137
- display: block;
138
- margin-bottom: 6px;
139
- font-size: 13px;
140
- font-weight: 500;
141
- color: var(--color-text-muted);
142
- }
143
- .feedback-message,
144
- .feedback-email {
145
- display: block;
146
- width: 100%;
147
- padding: 10px 12px;
148
- background: var(--color-surface);
149
- border: 1px solid var(--color-border);
150
- border-radius: var(--wui-radius-sm);
151
- color: var(--color-text);
152
- font-family: inherit;
153
- font-size: 14px;
154
- line-height: 1.45;
155
- }
156
- .feedback-message {
157
- min-height: 96px;
158
- resize: vertical;
159
- }
160
- .feedback-message:focus-visible,
161
- .feedback-email:focus-visible {
162
- outline: none;
163
- border-color: var(--color-primary);
164
- box-shadow: 0 0 0 3px var(--color-primary-soft);
165
- }
166
- .feedback-email {
167
- height: var(--wui-control-height-sm);
168
- }
169
-
170
- .feedback-error {
171
- margin: 0 0 4px;
172
- font-size: 13px;
173
- line-height: 1.4;
174
- color: var(--color-danger-text);
175
- }
176
- .feedback-error[hidden] {
177
- display: none;
178
- }
179
-
180
- // ── Actions ──
181
- .feedback-actions {
182
- display: flex;
183
- justify-content: flex-end;
184
- gap: 8px;
185
- }
186
- .feedback-cancel,
187
- .feedback-submit {
188
- height: var(--wui-control-height-sm);
189
- padding: 0 14px;
190
- border-radius: var(--wui-radius-sm);
191
- font-size: 14px;
192
- font-weight: 600;
193
- line-height: 1;
194
- cursor: pointer;
195
- }
196
- .feedback-cancel {
197
- border: 1px solid var(--color-border);
198
- background: transparent;
199
- color: var(--color-text);
200
- }
201
- .feedback-cancel:hover {
202
- background: var(--color-bg-muted);
203
- }
204
- .feedback-submit {
205
- border: none;
206
- background: var(--color-primary);
207
- color: var(--color-primary-text);
208
- }
209
- .feedback-submit:hover:not(:disabled) {
210
- background: var(--color-primary-hover);
211
- }
212
- .feedback-submit:disabled {
213
- opacity: 0.65;
214
- cursor: default;
215
- }
216
- .feedback-cancel:focus-visible,
217
- .feedback-submit:focus-visible {
218
- outline: 2px solid var(--color-primary);
219
- outline-offset: 2px;
220
- }
221
-
222
- // ── Thank-you ──
223
- .feedback-thanks {
224
- display: flex;
225
- align-items: center;
226
- gap: 10px;
227
- padding: 8px 0 4px;
228
- font-size: 14px;
229
- color: var(--color-success-text);
230
- }
231
- .feedback-thanks-icon {
232
- display: grid;
233
- place-items: center;
234
- line-height: 0;
235
- }
236
- .feedback-thanks-text {
237
- font-weight: 500;
238
- line-height: 1.4;
239
- }
240
-
241
- // ── Small screens ──
242
- // The panel is nearly the width of the phone, so pin it to both edges rather than to the
243
- // trigger's corner — a 340px card anchored to one side overhangs on the narrowest devices.
244
- @include media-breakpoint-down(sm) {
245
- .feedback-panel {
246
- position: fixed;
247
- right: 12px;
248
- left: 12px;
249
- bottom: calc(var(--wui-control-height-sm) + 32px);
250
- width: auto;
251
- max-width: none;
252
- }
253
- }
254
-
255
- @media (prefers-reduced-motion: reduce) {
256
- .feedback-trigger {
257
- transition: none;
258
- }
259
- }