ngwr 12.1.0 → 13.0.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/README.md +11 -1
- package/alert/styles/_index.scss +11 -4
- package/badge/styles/_index.scss +30 -0
- package/badge/styles/_tag.scss +15 -1
- package/border-glow/border-glow.scss +1 -1
- package/border-glow/styles/_index.scss +15 -233
- package/border-glow/styles/_rules.scss +228 -0
- package/breadcrumbs/breadcrumbs.scss +1 -1
- package/breadcrumbs/styles/_index.scss +15 -78
- package/breadcrumbs/styles/_rules.scss +84 -0
- package/card/card.scss +1 -1
- package/card/styles/_index.scss +15 -96
- package/card/styles/_rules.scss +96 -0
- package/cascader/cascader.scss +1 -1
- package/cascader/styles/_index.scss +15 -244
- package/cascader/styles/_rules.scss +261 -0
- package/checkbox/styles/_index.scss +7 -0
- package/circular-text/circular-text.scss +1 -1
- package/circular-text/styles/_index.scss +15 -63
- package/circular-text/styles/_rules.scss +58 -0
- package/color-picker/styles/_index.scss +8 -0
- package/descriptions/styles/_index.scss +13 -3
- package/drag-drop/sortable-list.scss +1 -1
- package/drag-drop/styles/_index.scss +14 -143
- package/drag-drop/styles/_rules.scss +151 -0
- package/drawer/styles/_index.scss +95 -1
- package/falling-text/falling-text.scss +1 -1
- package/falling-text/styles/_index.scss +15 -36
- package/falling-text/styles/_rules.scss +31 -0
- package/fesm2022/ngwr-border-glow.mjs +2 -2
- package/fesm2022/ngwr-border-glow.mjs.map +1 -1
- package/fesm2022/ngwr-breadcrumbs.mjs +2 -2
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-card.mjs +2 -2
- package/fesm2022/ngwr-card.mjs.map +1 -1
- package/fesm2022/ngwr-cascader.mjs +27 -9
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-checkbox.mjs +86 -8
- package/fesm2022/ngwr-checkbox.mjs.map +1 -1
- package/fesm2022/ngwr-circular-text.mjs +2 -2
- package/fesm2022/ngwr-circular-text.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker.mjs +57 -7
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +8 -0
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-drag-drop.mjs +2 -2
- package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
- package/fesm2022/ngwr-drawer.mjs +6 -0
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-falling-text.mjs +2 -2
- package/fesm2022/ngwr-falling-text.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload.mjs +29 -8
- package/fesm2022/ngwr-file-upload.mjs.map +1 -1
- package/fesm2022/ngwr-form.mjs +48 -1
- package/fesm2022/ngwr-form.mjs.map +1 -1
- package/fesm2022/ngwr-glitch-text.mjs +2 -2
- package/fesm2022/ngwr-glitch-text.mjs.map +1 -1
- package/fesm2022/ngwr-gradient-text.mjs +2 -2
- package/fesm2022/ngwr-gradient-text.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp.mjs +41 -3
- package/fesm2022/ngwr-input-otp.mjs.map +1 -1
- package/fesm2022/ngwr-knob.mjs +17 -2
- package/fesm2022/ngwr-knob.mjs.map +1 -1
- package/fesm2022/ngwr-lightbox.mjs +2 -2
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +2 -2
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-loading-bar.mjs +2 -2
- package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
- package/fesm2022/ngwr-marquee.mjs +2 -2
- package/fesm2022/ngwr-marquee.mjs.map +1 -1
- package/fesm2022/ngwr-pagination.mjs +1 -1
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-radio.mjs +63 -8
- package/fesm2022/ngwr-radio.mjs.map +1 -1
- package/fesm2022/ngwr-rating.mjs +17 -2
- package/fesm2022/ngwr-rating.mjs.map +1 -1
- package/fesm2022/ngwr-segmented.mjs +22 -3
- package/fesm2022/ngwr-segmented.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +59 -15
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-shiny-text.mjs +2 -2
- package/fesm2022/ngwr-shiny-text.mjs.map +1 -1
- package/fesm2022/ngwr-slider.mjs +21 -6
- package/fesm2022/ngwr-slider.mjs.map +1 -1
- package/fesm2022/ngwr-spotlight-card.mjs +2 -2
- package/fesm2022/ngwr-spotlight-card.mjs.map +1 -1
- package/fesm2022/ngwr-star-border.mjs +2 -2
- package/fesm2022/ngwr-star-border.mjs.map +1 -1
- package/fesm2022/ngwr-switch.mjs +44 -4
- package/fesm2022/ngwr-switch.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +1 -1
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-textarea.mjs +5 -2
- package/fesm2022/ngwr-textarea.mjs.map +1 -1
- package/fesm2022/ngwr-theme.mjs +41 -1
- package/fesm2022/ngwr-theme.mjs.map +1 -1
- package/fesm2022/ngwr-tilt-card.mjs +2 -2
- package/fesm2022/ngwr-tilt-card.mjs.map +1 -1
- package/fesm2022/ngwr-transfer.mjs +38 -6
- package/fesm2022/ngwr-transfer.mjs.map +1 -1
- package/fesm2022/ngwr-tree.mjs +33 -7
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-typewriter.mjs +2 -2
- package/fesm2022/ngwr-typewriter.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/fesm2022/ngwr-virtual-scroll.mjs +2 -2
- package/fesm2022/ngwr-virtual-scroll.mjs.map +1 -1
- package/fesm2022/ngwr-waves.mjs +2 -2
- package/fesm2022/ngwr-waves.mjs.map +1 -1
- package/file-upload/styles/_index.scss +6 -0
- package/glitch-text/glitch-text.scss +1 -1
- package/glitch-text/styles/_index.scss +14 -164
- package/glitch-text/styles/_rules.scss +160 -0
- package/gradient-text/gradient-text.scss +1 -1
- package/gradient-text/styles/_index.scss +15 -118
- package/gradient-text/styles/_rules.scss +113 -0
- package/input/styles/_index.scss +13 -0
- package/input-otp/styles/_index.scss +8 -0
- package/lightbox/lightbox.scss +1 -1
- package/lightbox/styles/_index.scss +15 -191
- package/lightbox/styles/_rules.scss +198 -0
- package/list/list.scss +1 -1
- package/list/styles/_index.scss +15 -101
- package/list/styles/_rules.scss +108 -0
- package/llms-full.txt +3 -3
- package/loading-bar/loading-bar.scss +1 -1
- package/loading-bar/styles/_index.scss +15 -33
- package/loading-bar/styles/_rules.scss +28 -0
- package/marquee/marquee.scss +1 -1
- package/marquee/styles/_index.scss +15 -155
- package/marquee/styles/_rules.scss +150 -0
- package/overlay/styles/_arrow.scss +243 -0
- package/package.json +1 -1
- package/popconfirm/styles/_index.scss +17 -0
- package/popover/styles/_index.scss +49 -207
- package/segmented/styles/_index.scss +8 -0
- package/select/styles/_index.scss +47 -5
- package/shiny-text/shiny-text.scss +1 -1
- package/shiny-text/styles/_index.scss +14 -105
- package/shiny-text/styles/_rules.scss +101 -0
- package/sidebar/styles/_index.scss +4 -1
- package/slider/styles/_index.scss +8 -0
- package/spotlight-card/spotlight-card.scss +1 -1
- package/spotlight-card/styles/_index.scss +15 -52
- package/spotlight-card/styles/_rules.scss +47 -0
- package/star-border/star-border.scss +1 -1
- package/star-border/styles/_index.scss +15 -125
- package/star-border/styles/_rules.scss +120 -0
- package/stepper/styles/_index.scss +44 -5
- package/switch/styles/_index.scss +7 -0
- package/theme/styles/_dark.scss +81 -4
- package/theme/styles/_index.scss +1 -0
- package/theme/styles/_mixins.scss +10 -0
- package/theme/styles/_motion.scss +94 -0
- package/tilt-card/styles/_index.scss +15 -45
- package/tilt-card/styles/_rules.scss +40 -0
- package/tilt-card/tilt-card.scss +1 -1
- package/tree/styles/_index.scss +25 -3
- package/types/ngwr-cascader.d.ts +17 -1
- package/types/ngwr-checkbox.d.ts +51 -3
- package/types/ngwr-color-picker.d.ts +19 -1
- package/types/ngwr-file-upload.d.ts +18 -1
- package/types/ngwr-form.d.ts +51 -2
- package/types/ngwr-input-otp.d.ts +23 -1
- package/types/ngwr-knob.d.ts +14 -0
- package/types/ngwr-radio.d.ts +37 -2
- package/types/ngwr-rating.d.ts +14 -0
- package/types/ngwr-segmented.d.ts +18 -1
- package/types/ngwr-select.d.ts +29 -3
- package/types/ngwr-slider.d.ts +14 -1
- package/types/ngwr-switch.d.ts +26 -2
- package/types/ngwr-textarea.d.ts +3 -0
- package/types/ngwr-theme.d.ts +24 -0
- package/types/ngwr-transfer.d.ts +17 -1
- package/types/ngwr-tree.d.ts +21 -1
- package/types/ngwr-version.d.ts +1 -1
- package/typewriter/styles/_index.scss +15 -38
- package/typewriter/styles/_rules.scss +33 -0
- package/typewriter/typewriter.scss +1 -1
- package/virtual-scroll/styles/_index.scss +15 -32
- package/virtual-scroll/styles/_rules.scss +27 -0
- package/virtual-scroll/virtual-scroll.scss +1 -1
- package/waves/styles/_index.scss +15 -50
- package/waves/styles/_rules.scss +45 -0
- package/waves/waves.scss +1 -1
|
@@ -1,196 +1,27 @@
|
|
|
1
|
-
@use 'sass:list';
|
|
2
|
-
|
|
3
1
|
@use '../../theme/styles' as theme;
|
|
4
2
|
@use '../../overlay/styles'; // shared .wr-overlay-sheet / .wr-overlay-backdrop for responsive mode
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
//
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
top-start: (
|
|
28
|
-
bottom,
|
|
29
|
-
start,
|
|
30
|
-
),
|
|
31
|
-
top-end: (
|
|
32
|
-
bottom,
|
|
33
|
-
end,
|
|
34
|
-
),
|
|
35
|
-
bottom: (
|
|
36
|
-
top,
|
|
37
|
-
center,
|
|
38
|
-
),
|
|
39
|
-
bottom-start: (
|
|
40
|
-
top,
|
|
41
|
-
start,
|
|
42
|
-
),
|
|
43
|
-
bottom-end: (
|
|
44
|
-
top,
|
|
45
|
-
end,
|
|
46
|
-
),
|
|
47
|
-
left: (
|
|
48
|
-
right,
|
|
49
|
-
center,
|
|
50
|
-
),
|
|
51
|
-
left-start: (
|
|
52
|
-
right,
|
|
53
|
-
start,
|
|
54
|
-
),
|
|
55
|
-
left-end: (
|
|
56
|
-
right,
|
|
57
|
-
end,
|
|
58
|
-
),
|
|
59
|
-
right: (
|
|
60
|
-
left,
|
|
61
|
-
center,
|
|
62
|
-
),
|
|
63
|
-
right-start: (
|
|
64
|
-
left,
|
|
65
|
-
start,
|
|
66
|
-
),
|
|
67
|
-
right-end: (
|
|
68
|
-
left,
|
|
69
|
-
end,
|
|
70
|
-
),
|
|
71
|
-
);
|
|
72
|
-
|
|
73
|
-
/// Positions the arrow against `$edge`, offset outwards by `$pull`.
|
|
74
|
-
///
|
|
75
|
-
/// `left` / `right` name the panel edge in LTR terms only. Every side-anchored
|
|
76
|
-
/// and `-start` / `-end` entry in `WR_POPOVER_POSITIONS` is expressed as CDK
|
|
77
|
-
/// `originX: start | end` — plain `top` / `bottom` use `center`, which mirrors
|
|
78
|
-
/// to itself — and CDK resolves start / end against `Directionality`. So under
|
|
79
|
-
/// `dir="rtl"` the panel lands on the mirrored side of the trigger while the
|
|
80
|
-
/// modifier class keeps its LTR name, and the arrow has to travel with the
|
|
81
|
-
/// panel. Same for the `-start` / `-end` alignment along a horizontal edge.
|
|
82
|
-
///
|
|
83
|
-
/// The class names the placement the panel ACTUALLY took, not the requested one:
|
|
84
|
-
/// each entry in `WR_POPOVER_FALLBACKS` carries its own `panelClass`, so a flip
|
|
85
|
-
/// swaps the modifier and this loop moves the arrow with it.
|
|
86
|
-
@mixin _arrow-at($edge, $align, $pull) {
|
|
87
|
-
@if $edge == left {
|
|
88
|
-
inset-inline-start: -$pull;
|
|
89
|
-
} @else if $edge == right {
|
|
90
|
-
inset-inline-end: -$pull;
|
|
91
|
-
} @else {
|
|
92
|
-
#{$edge}: -$pull;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
@if $edge == bottom or $edge == top {
|
|
96
|
-
@if $align == center {
|
|
97
|
-
// Both halves of the centring pair go logical together, so the arrow
|
|
98
|
-
// stays on the midpoint whichever way the axis runs.
|
|
99
|
-
inset-inline-start: 50%;
|
|
100
|
-
margin-inline-start: -$_arrow-half;
|
|
101
|
-
} @else if $align == start {
|
|
102
|
-
inset-inline-start: $_arrow-inset;
|
|
103
|
-
} @else {
|
|
104
|
-
inset-inline-end: $_arrow-inset;
|
|
105
|
-
}
|
|
106
|
-
} @else {
|
|
107
|
-
@if $align == center {
|
|
108
|
-
top: 50%;
|
|
109
|
-
margin-top: -$_arrow-half;
|
|
110
|
-
} @else if $align == start {
|
|
111
|
-
top: $_arrow-inset;
|
|
112
|
-
} @else {
|
|
113
|
-
bottom: $_arrow-inset;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/// The two faces of the rotated square that stay visible outside the panel.
|
|
119
|
-
///
|
|
120
|
-
/// These stay physical, and it is not an oversight. Which two borders paint is
|
|
121
|
-
/// decided by `transform: rotate(45deg)`, not by reading order: the rotation
|
|
122
|
-
/// turns the right border into the down-right face and the bottom one into the
|
|
123
|
-
/// down-left face, so `right + bottom` is what outlines a tip pointing DOWN.
|
|
124
|
-
/// Swapping only the inline half would paint two faces that are tucked under
|
|
125
|
-
/// the panel. A mirrored arrow needs the rotation mirrored as well — more than
|
|
126
|
-
/// a property rewrite, so it is left for the RTL pass that owns the TS side.
|
|
127
|
-
@mixin _arrow-border($edge) {
|
|
128
|
-
@if $edge == bottom {
|
|
129
|
-
// rtl-ok: down-right face of a 45°-rotated square — fixed by the rotation
|
|
130
|
-
border-right: 1px solid var(--wr-color-outline);
|
|
131
|
-
border-bottom: 1px solid var(--wr-color-outline);
|
|
132
|
-
} @else if $edge == top {
|
|
133
|
-
// rtl-ok: up-left face of a 45°-rotated square — fixed by the rotation
|
|
134
|
-
border-left: 1px solid var(--wr-color-outline);
|
|
135
|
-
border-top: 1px solid var(--wr-color-outline);
|
|
136
|
-
} @else if $edge == right {
|
|
137
|
-
border-top: 1px solid var(--wr-color-outline);
|
|
138
|
-
// rtl-ok: down-right face of a 45°-rotated square — fixed by the rotation
|
|
139
|
-
border-right: 1px solid var(--wr-color-outline);
|
|
140
|
-
} @else {
|
|
141
|
-
border-bottom: 1px solid var(--wr-color-outline);
|
|
142
|
-
// rtl-ok: up-left face of a 45°-rotated square — fixed by the rotation
|
|
143
|
-
border-left: 1px solid var(--wr-color-outline);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.wr-popover-overlay {
|
|
148
|
-
> * {
|
|
149
|
-
// Containing block for the arrow below.
|
|
150
|
-
position: relative;
|
|
151
|
-
display: block;
|
|
152
|
-
min-width: 8rem;
|
|
153
|
-
max-width: 22rem;
|
|
154
|
-
background: var(--wr-color-surface);
|
|
155
|
-
border: 1px solid var(--wr-color-outline);
|
|
156
|
-
@include theme.smooth-br(var(--wr-border-radius-base));
|
|
157
|
-
box-shadow: var(--wr-shadow-overlay);
|
|
158
|
-
font-family: var(--wr-font-family-base);
|
|
159
|
-
color: var(--wr-color-on-surface);
|
|
160
|
-
animation: wr-overlay-in var(--wr-overlay-duration) var(--wr-overlay-ease);
|
|
161
|
-
// rtl-ok: scale-in growth corner — `transform-origin` takes no logical keywords
|
|
162
|
-
transform-origin: top left;
|
|
163
|
-
|
|
164
|
-
&::after {
|
|
165
|
-
content: '';
|
|
166
|
-
position: absolute;
|
|
167
|
-
width: $_arrow;
|
|
168
|
-
height: $_arrow;
|
|
169
|
-
background: var(--wr-color-surface);
|
|
170
|
-
transform: rotate(45deg);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
// Responsive bottom-sheet mode has no anchor to point at, so no arrow.
|
|
175
|
-
&.wr-overlay-sheet > *::after {
|
|
176
|
-
content: none;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
@each $position, $spec in $_arrow-placement {
|
|
181
|
-
$edge: list.nth($spec, 1);
|
|
182
|
-
$align: list.nth($spec, 2);
|
|
183
|
-
|
|
184
|
-
// Pulled one extra pixel so the square's own border lines up flush with the
|
|
185
|
-
// panel's, instead of leaving the panel border showing across the arrow's base.
|
|
186
|
-
.wr-popover-overlay--#{$position} > *::after {
|
|
187
|
-
@include _arrow-at($edge, $align, $_arrow-half + 1px);
|
|
188
|
-
@include _arrow-border($edge);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.wr-tooltip-overlay--#{$position} .wr-tooltip::after {
|
|
192
|
-
@include _arrow-at($edge, $align, $_arrow-half);
|
|
193
|
-
}
|
|
3
|
+
@use '../../overlay/styles/arrow';
|
|
4
|
+
|
|
5
|
+
// The arrow — a rotated square tucked half under the panel — used to be written
|
|
6
|
+
// out here: geometry, a twelve-placement map and two mixins. `wr-popconfirm` is
|
|
7
|
+
// the same kind of anchored panel and had none of it, so rather than a second
|
|
8
|
+
// copy the whole thing moved to `overlay/styles/_arrow.scss` and both components
|
|
9
|
+
// call `arrow.anchored-arrow()`. The two calls at the foot of this file emit the
|
|
10
|
+
// rules that were here, for the same twelve placements.
|
|
11
|
+
|
|
12
|
+
.wr-popover-overlay > * {
|
|
13
|
+
display: block;
|
|
14
|
+
min-width: 8rem;
|
|
15
|
+
max-width: 22rem;
|
|
16
|
+
background: var(--wr-color-surface);
|
|
17
|
+
border: 1px solid var(--wr-color-outline);
|
|
18
|
+
@include theme.smooth-br(var(--wr-border-radius-base));
|
|
19
|
+
box-shadow: var(--wr-shadow-overlay);
|
|
20
|
+
font-family: var(--wr-font-family-base);
|
|
21
|
+
color: var(--wr-color-on-surface);
|
|
22
|
+
animation: wr-overlay-in var(--wr-overlay-duration) var(--wr-overlay-ease);
|
|
23
|
+
// rtl-ok: scale-in growth corner — `transform-origin` takes no logical keywords
|
|
24
|
+
transform-origin: top left;
|
|
194
25
|
}
|
|
195
26
|
|
|
196
27
|
//
|
|
@@ -235,24 +66,35 @@ $_arrow-placement: (
|
|
|
235
66
|
// rtl-ok: scale-in growth corner — `transform-origin` takes no logical keywords
|
|
236
67
|
transform-origin: top left;
|
|
237
68
|
|
|
238
|
-
//
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
width: $_arrow;
|
|
243
|
-
height: $_arrow;
|
|
244
|
-
background: var(--wr-tooltip-bg);
|
|
245
|
-
transform: rotate(45deg);
|
|
246
|
-
// The one piece that stays inert: the arrow points AT the trigger and
|
|
247
|
-
// overlaps it, so a hittable arrow would eat clicks meant for the control
|
|
248
|
-
// the tooltip describes.
|
|
249
|
-
pointer-events: none;
|
|
250
|
-
}
|
|
69
|
+
// The arrow itself comes from `arrow.anchored-arrow()` below. `position:
|
|
70
|
+
// relative` is restated by that call and kept here too, so the class still
|
|
71
|
+
// stands on its own for anyone styling `.wr-tooltip` directly — it is public
|
|
72
|
+
// API, and the arrow is the pane's business rather than the chip's.
|
|
251
73
|
}
|
|
252
74
|
|
|
253
|
-
// Arrow
|
|
254
|
-
//
|
|
255
|
-
//
|
|
75
|
+
// Arrow for both modes.
|
|
76
|
+
//
|
|
77
|
+
// Popover: the pane wraps whatever the author projected, so the panel selector
|
|
78
|
+
// is `> *`, and the square carries the panel's border on its two outward faces
|
|
79
|
+
// so the outline reads as continuous.
|
|
80
|
+
@include arrow.anchored-arrow(
|
|
81
|
+
$pane: '.wr-popover-overlay',
|
|
82
|
+
$panel: '> *',
|
|
83
|
+
$background: var(--wr-color-surface),
|
|
84
|
+
$border: var(--wr-color-outline)
|
|
85
|
+
);
|
|
86
|
+
|
|
87
|
+
// Tooltip: a known child, and no border faces — the chip's own border colour is
|
|
88
|
+
// overridable per instance through `--wr-tooltip-border`, so painting the faces
|
|
89
|
+
// from the token here would desync the moment anyone retints one. The arrow
|
|
90
|
+
// points AT the trigger and overlaps it, so it is the one inert piece: a
|
|
91
|
+
// hittable arrow would eat clicks meant for the control the tooltip describes.
|
|
92
|
+
@include arrow.anchored-arrow(
|
|
93
|
+
$pane: '.wr-tooltip-overlay',
|
|
94
|
+
$panel: '.wr-tooltip',
|
|
95
|
+
$background: var(--wr-tooltip-bg),
|
|
96
|
+
$inert: true
|
|
97
|
+
);
|
|
256
98
|
|
|
257
99
|
@media (prefers-reduced-motion: reduce) {
|
|
258
100
|
.wr-tooltip {
|
|
@@ -130,6 +130,14 @@
|
|
|
130
130
|
line-height: var(--wr-segmented-line-height);
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
+
// A read-only strip still takes focus and still shows which segment is
|
|
134
|
+
// pressed, so it keeps the visual and only stops inviting the click. This
|
|
135
|
+
// cursor is the only cue there is — see the `readonly` input for why nothing
|
|
136
|
+
// is mirrored into ARIA.
|
|
137
|
+
&--readonly &__option {
|
|
138
|
+
cursor: default;
|
|
139
|
+
}
|
|
140
|
+
|
|
133
141
|
&--disabled {
|
|
134
142
|
pointer-events: none;
|
|
135
143
|
opacity: var(--wr-disabled-opacity);
|
|
@@ -10,6 +10,14 @@
|
|
|
10
10
|
--wr-select-padding-x: var(--wr-control-padding-x-md);
|
|
11
11
|
--wr-select-font-size: var(--wr-control-font-size-md);
|
|
12
12
|
--wr-select-line-height: var(--wr-control-line-height-md);
|
|
13
|
+
// The floor that keeps a bare `<wr-select>` from collapsing to its
|
|
14
|
+
// placeholder. A hook rather than a literal because the floor is wrong as
|
|
15
|
+
// often as it is right: dropped into a `minmax(0, 1fr)` grid column the
|
|
16
|
+
// trigger holds 160px and overhangs its cell, and overriding
|
|
17
|
+
// `.wr-select__trigger` is reaching past the public contract for something
|
|
18
|
+
// the rest of the component already exposes. Set it to 0 to hand the width
|
|
19
|
+
// back to the layout.
|
|
20
|
+
--wr-select-min-width: 10rem;
|
|
13
21
|
|
|
14
22
|
display: inline-flex;
|
|
15
23
|
vertical-align: middle;
|
|
@@ -36,7 +44,15 @@
|
|
|
36
44
|
&--rounded {
|
|
37
45
|
--wr-select-radius: var(--wr-border-radius-pill);
|
|
38
46
|
--wr-select-padding-x: 1rem;
|
|
39
|
-
|
|
47
|
+
|
|
48
|
+
// The squircle reset has to land on the element `smooth-br` ran on, and
|
|
49
|
+
// that is the trigger, not the host: `corner-shape` does not inherit, so a
|
|
50
|
+
// declaration here left the trigger drawing the inset curve the mixin's own
|
|
51
|
+
// gotcha warns about instead of a stadium. `wr-btn` / `wr-input` put their
|
|
52
|
+
// modifier and their `smooth-br` on one element, which is why they paint.
|
|
53
|
+
.wr-select__trigger {
|
|
54
|
+
corner-shape: round;
|
|
55
|
+
}
|
|
40
56
|
}
|
|
41
57
|
|
|
42
58
|
&--disabled {
|
|
@@ -44,12 +60,20 @@
|
|
|
44
60
|
--wr-select-bg: var(--wr-color-fill);
|
|
45
61
|
}
|
|
46
62
|
|
|
63
|
+
// A read-only select still takes focus and still shows what is selected, so it
|
|
64
|
+
// keeps the visual and only stops inviting the click that would open the
|
|
65
|
+
// panel. `not-allowed` would say something false about a control that works —
|
|
66
|
+
// the same call `.wr-select__tag-input:read-only` already makes.
|
|
67
|
+
&--readonly &__trigger {
|
|
68
|
+
cursor: default;
|
|
69
|
+
}
|
|
70
|
+
|
|
47
71
|
&__trigger {
|
|
48
72
|
display: inline-flex;
|
|
49
73
|
align-items: center;
|
|
50
74
|
gap: 0.5rem;
|
|
51
75
|
width: 100%;
|
|
52
|
-
min-width:
|
|
76
|
+
min-width: var(--wr-select-min-width);
|
|
53
77
|
appearance: none;
|
|
54
78
|
background: var(--wr-select-bg);
|
|
55
79
|
color: var(--wr-select-color);
|
|
@@ -128,7 +152,15 @@
|
|
|
128
152
|
// Search-mode trigger: inline text input + chevron + clear
|
|
129
153
|
&__trigger--search {
|
|
130
154
|
cursor: text;
|
|
131
|
-
padding
|
|
155
|
+
// The FIELD owns the padding here — it is the click target and has to be
|
|
156
|
+
// typable edge to edge — but the chevron and the × are siblings of it, not
|
|
157
|
+
// children, so a flat `padding: 0` left the chevron sitting on the border.
|
|
158
|
+
// Hand the TRAILING inset back to the trigger: the chevron is now inset by
|
|
159
|
+
// the same amount the placeholder is, and the field keeps the leading edge.
|
|
160
|
+
// Logical properties, so the inset moves to the left in `dir="rtl"` on its
|
|
161
|
+
// own — no physical side is named.
|
|
162
|
+
padding-block: 0;
|
|
163
|
+
padding-inline: 0 calc(var(--wr-select-padding-x) * var(--wr-density-x, 1));
|
|
132
164
|
|
|
133
165
|
&:focus-within {
|
|
134
166
|
border-color: var(--wr-color-primary);
|
|
@@ -218,7 +250,12 @@
|
|
|
218
250
|
// Roomier on the label side, tighter where the remove (×) sits.
|
|
219
251
|
padding-block: 0.125rem;
|
|
220
252
|
padding-inline: 0.5rem 0.25rem;
|
|
221
|
-
|
|
253
|
+
// Not a pill: a chip is a shape nested INSIDE the trigger, so it repeats the
|
|
254
|
+
// trigger's own corner and scales with `size` along with it (5 / 6 / 7px for
|
|
255
|
+
// sm / md / lg). `--rounded` sets `--wr-select-radius` to the pill token, so
|
|
256
|
+
// a pill select still gets pill chips — the shape follows the control rather
|
|
257
|
+
// than being decided twice.
|
|
258
|
+
border-radius: var(--wr-select-radius);
|
|
222
259
|
background: var(--wr-color-primary-soft);
|
|
223
260
|
// `-ink`, not the raw intent: the chip paints the hue on its own soft tint,
|
|
224
261
|
// where the base lands at 4.17:1.
|
|
@@ -241,7 +278,12 @@
|
|
|
241
278
|
justify-content: center;
|
|
242
279
|
width: 1rem;
|
|
243
280
|
height: 1rem;
|
|
244
|
-
|
|
281
|
+
// Concentric with the chip: the remove is inset from the chip's edge by the
|
|
282
|
+
// chip's 2px block padding, and an inner corner only nests cleanly when it
|
|
283
|
+
// is the outer corner minus that inset. `max()` keeps the value legal for a
|
|
284
|
+
// consumer who sets `--wr-select-radius: 0` — a negative radius would
|
|
285
|
+
// invalidate the declaration outright.
|
|
286
|
+
border-radius: max(0px, calc(var(--wr-select-radius) - 2px));
|
|
245
287
|
cursor: pointer;
|
|
246
288
|
transition: background 0.12s ease;
|
|
247
289
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@forward './styles';
|
|
1
|
+
@forward './styles/rules';
|
|
@@ -1,106 +1,15 @@
|
|
|
1
|
-
//
|
|
2
|
-
// design token this stylesheet references. Sass deduplicates `@use` per
|
|
3
|
-
// compilation, so the umbrella sheet still emits the theme only once.
|
|
4
|
-
@use '../../theme/styles' as theme;
|
|
5
|
-
|
|
6
|
-
// Shimmering text (reactbits port). Clips an animated linear gradient to
|
|
7
|
-
// the text via `background-clip: text`.
|
|
1
|
+
// Public Sass entry for `@use 'ngwr/shiny-text'`.
|
|
8
2
|
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
//
|
|
13
|
-
|
|
14
|
-
.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
background-size: 200% auto;
|
|
23
|
-
background-position: 150% center;
|
|
24
|
-
-webkit-background-clip: text;
|
|
25
|
-
background-clip: text;
|
|
26
|
-
-webkit-text-fill-color: transparent;
|
|
27
|
-
animation-name: wr-shiny-text-sweep;
|
|
28
|
-
animation-timing-function: linear;
|
|
29
|
-
animation-iteration-count: infinite;
|
|
30
|
-
animation-direction: normal;
|
|
31
|
-
animation-fill-mode: both;
|
|
32
|
-
animation-play-state: running;
|
|
33
|
-
|
|
34
|
-
&--reverse {
|
|
35
|
-
animation-direction: reverse;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&--yoyo {
|
|
39
|
-
animation-direction: alternate;
|
|
40
|
-
|
|
41
|
-
&.wr-shiny-text--reverse {
|
|
42
|
-
animation-direction: alternate-reverse;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
&--paused {
|
|
47
|
-
animation-play-state: paused;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
&--pause-on-hover:hover {
|
|
51
|
-
animation-play-state: paused;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
@keyframes wr-shiny-text-sweep {
|
|
56
|
-
0% {
|
|
57
|
-
background-position: 150% center;
|
|
58
|
-
}
|
|
59
|
-
50% {
|
|
60
|
-
background-position: -50% center;
|
|
61
|
-
}
|
|
62
|
-
100% {
|
|
63
|
-
background-position: -50% center;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// Reduced motion: freeze the sweep at its rest position — the gradient's
|
|
68
|
-
// base color fills the text, so it stays readable with zero movement.
|
|
69
|
-
@media (prefers-reduced-motion: reduce) {
|
|
70
|
-
.wr-shiny-text {
|
|
71
|
-
animation: none !important;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
// [wrShimmer] directive
|
|
76
|
-
// Same package as <wr-shiny-text>. Lightweight host-class directive —
|
|
77
|
-
// gradient sweep across text via `background-clip: text`.
|
|
78
|
-
@keyframes wr-shimmer {
|
|
79
|
-
100% {
|
|
80
|
-
background-position-x: -200%;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.wr-shimmer {
|
|
85
|
-
background: linear-gradient(
|
|
86
|
-
110deg,
|
|
87
|
-
var(--wr-color-on-surface) 30%,
|
|
88
|
-
rgba(var(--wr-color-primary-rgb), 0.9) 50%,
|
|
89
|
-
var(--wr-color-on-surface) 70%
|
|
90
|
-
);
|
|
91
|
-
background-size: 200% 100%;
|
|
92
|
-
background-clip: text;
|
|
93
|
-
-webkit-background-clip: text;
|
|
94
|
-
-webkit-text-fill-color: transparent;
|
|
95
|
-
color: transparent;
|
|
96
|
-
animation: wr-shimmer 2.5s linear infinite;
|
|
97
|
-
|
|
98
|
-
@media (prefers-reduced-motion: reduce) {
|
|
99
|
-
animation: none;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
[data-theme='dark'] .wr-shiny-text {
|
|
104
|
-
--wr-shiny-text-base: #b5b5b5;
|
|
105
|
-
--wr-shiny-text-shine: #ffffff;
|
|
106
|
-
}
|
|
3
|
+
// Pulls the whole theme so a standalone import still brings in every design
|
|
4
|
+
// token these rules reference, then loads the rules themselves from `_rules`.
|
|
5
|
+
//
|
|
6
|
+
// The split is what keeps the token layer out of the JavaScript bundle.
|
|
7
|
+
// `shiny-text.scss` is the component's `styleUrl`, and a component stylesheet is
|
|
8
|
+
// its OWN Sass compilation — `@use` only deduplicates within one. So while the
|
|
9
|
+
// umbrella sheet emits the theme once, forwarding it from here would inline a
|
|
10
|
+
// second, byte-identical copy of `:root`, `[data-theme='dark']` and the
|
|
11
|
+
// box-sizing reset into the compiled component styles, which ng-packagr then
|
|
12
|
+
// embeds in the FESM bundle as a string. `shiny-text.scss` forwards `_rules`
|
|
13
|
+
// instead, so it carries this component's own CSS and nothing else.
|
|
14
|
+
@use '../../theme/styles';
|
|
15
|
+
@forward 'rules';
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
// Shimmering text (reactbits port). Clips an animated linear gradient to
|
|
2
|
+
// the text via `background-clip: text`.
|
|
3
|
+
//
|
|
4
|
+
// The keyframes are 0% → 50%, then hold at the end position. Inputs set
|
|
5
|
+
// `animation-duration` to (speed + delay); the keyframe hits the end at
|
|
6
|
+
// the 50%/totalDuration mark and rests for the rest, which collapses to
|
|
7
|
+
// `speed` of motion + `delay` of pause — without needing two animations.
|
|
8
|
+
|
|
9
|
+
.wr-shiny-text {
|
|
10
|
+
// Theme-default sweep (overridden by `[color]` / `[shineColor]`):
|
|
11
|
+
// gray base with a dark shine on light surfaces; dark theme restores
|
|
12
|
+
// the reactbits gray-with-white-flash below.
|
|
13
|
+
--wr-shiny-text-base: var(--wr-color-on-surface-muted, #8594a4);
|
|
14
|
+
--wr-shiny-text-shine: var(--wr-color-on-surface, #0f172a);
|
|
15
|
+
|
|
16
|
+
display: inline-block;
|
|
17
|
+
background-size: 200% auto;
|
|
18
|
+
background-position: 150% center;
|
|
19
|
+
-webkit-background-clip: text;
|
|
20
|
+
background-clip: text;
|
|
21
|
+
-webkit-text-fill-color: transparent;
|
|
22
|
+
animation-name: wr-shiny-text-sweep;
|
|
23
|
+
animation-timing-function: linear;
|
|
24
|
+
animation-iteration-count: infinite;
|
|
25
|
+
animation-direction: normal;
|
|
26
|
+
animation-fill-mode: both;
|
|
27
|
+
animation-play-state: running;
|
|
28
|
+
|
|
29
|
+
&--reverse {
|
|
30
|
+
animation-direction: reverse;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&--yoyo {
|
|
34
|
+
animation-direction: alternate;
|
|
35
|
+
|
|
36
|
+
&.wr-shiny-text--reverse {
|
|
37
|
+
animation-direction: alternate-reverse;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&--paused {
|
|
42
|
+
animation-play-state: paused;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&--pause-on-hover:hover {
|
|
46
|
+
animation-play-state: paused;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@keyframes wr-shiny-text-sweep {
|
|
51
|
+
0% {
|
|
52
|
+
background-position: 150% center;
|
|
53
|
+
}
|
|
54
|
+
50% {
|
|
55
|
+
background-position: -50% center;
|
|
56
|
+
}
|
|
57
|
+
100% {
|
|
58
|
+
background-position: -50% center;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Reduced motion: freeze the sweep at its rest position — the gradient's
|
|
63
|
+
// base color fills the text, so it stays readable with zero movement.
|
|
64
|
+
@media (prefers-reduced-motion: reduce) {
|
|
65
|
+
.wr-shiny-text {
|
|
66
|
+
animation: none !important;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// [wrShimmer] directive
|
|
71
|
+
// Same package as <wr-shiny-text>. Lightweight host-class directive —
|
|
72
|
+
// gradient sweep across text via `background-clip: text`.
|
|
73
|
+
@keyframes wr-shimmer {
|
|
74
|
+
100% {
|
|
75
|
+
background-position-x: -200%;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.wr-shimmer {
|
|
80
|
+
background: linear-gradient(
|
|
81
|
+
110deg,
|
|
82
|
+
var(--wr-color-on-surface) 30%,
|
|
83
|
+
rgba(var(--wr-color-primary-rgb), 0.9) 50%,
|
|
84
|
+
var(--wr-color-on-surface) 70%
|
|
85
|
+
);
|
|
86
|
+
background-size: 200% 100%;
|
|
87
|
+
background-clip: text;
|
|
88
|
+
-webkit-background-clip: text;
|
|
89
|
+
-webkit-text-fill-color: transparent;
|
|
90
|
+
color: transparent;
|
|
91
|
+
animation: wr-shimmer 2.5s linear infinite;
|
|
92
|
+
|
|
93
|
+
@media (prefers-reduced-motion: reduce) {
|
|
94
|
+
animation: none;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
[data-theme='dark'] .wr-shiny-text {
|
|
99
|
+
--wr-shiny-text-base: #b5b5b5;
|
|
100
|
+
--wr-shiny-text-shine: #ffffff;
|
|
101
|
+
}
|
|
@@ -224,7 +224,10 @@
|
|
|
224
224
|
&__badge {
|
|
225
225
|
flex: 0 0 auto;
|
|
226
226
|
padding: 0.0625rem 0.375rem;
|
|
227
|
-
|
|
227
|
+
// The row's corner, not a pill: the badge sits inside `__entry` / `__item`,
|
|
228
|
+
// which both read `--wr-border-radius-sm`, and a stadium nested in a 6px row
|
|
229
|
+
// reads as a foreign shape rather than a part of it.
|
|
230
|
+
border-radius: var(--wr-border-radius-sm);
|
|
228
231
|
background: var(--wr-color-fill-strong);
|
|
229
232
|
color: var(--wr-color-on-surface-muted);
|
|
230
233
|
font-size: var(--wr-text-xs);
|
|
@@ -85,6 +85,14 @@
|
|
|
85
85
|
font-variant-numeric: tabular-nums;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
+
// A read-only slider still takes focus and still announces its value, so it
|
|
89
|
+
// keeps the visual and only stops inviting the drag — `grab` on something that
|
|
90
|
+
// cannot move is the part that looks broken. Matches `wr-knob--readonly`.
|
|
91
|
+
&--readonly &__track,
|
|
92
|
+
&--readonly &__thumb {
|
|
93
|
+
cursor: default;
|
|
94
|
+
}
|
|
95
|
+
|
|
88
96
|
&--disabled {
|
|
89
97
|
--wr-slider-thumb-border: var(--wr-color-on-surface-muted);
|
|
90
98
|
--wr-slider-fill: var(--wr-color-on-surface-muted);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@forward './styles';
|
|
1
|
+
@forward './styles/rules';
|