ngwr 12.2.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/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/drag-drop/sortable-list.scss +1 -1
- package/drag-drop/styles/_index.scss +14 -143
- package/drag-drop/styles/_rules.scss +151 -0
- 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-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 +46 -12
- 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/package.json +1 -1
- package/segmented/styles/_index.scss +8 -0
- package/select/styles/_index.scss +17 -1
- 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/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/switch/styles/_index.scss +7 -0
- package/theme/styles/_dark.scss +81 -4
- package/theme/styles/_index.scss +1 -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 +15 -1
- 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 +17 -1
- 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,33 +1,15 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
opacity: 0;
|
|
17
|
-
transition: opacity 0.2s ease;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
&--active {
|
|
21
|
-
opacity: 1;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
&__fill {
|
|
25
|
-
width: 0;
|
|
26
|
-
height: 2px;
|
|
27
|
-
background: var(--wr-color-primary);
|
|
28
|
-
box-shadow: 0 0 8px rgb(var(--wr-color-primary-rgb) / 60%);
|
|
29
|
-
transition:
|
|
30
|
-
width 0.15s ease-out,
|
|
31
|
-
opacity 0.2s ease;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
1
|
+
// Public Sass entry for `@use 'ngwr/loading-bar'`.
|
|
2
|
+
//
|
|
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
|
+
// `loading-bar.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. `loading-bar.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,28 @@
|
|
|
1
|
+
.wr-loading-bar {
|
|
2
|
+
position: fixed;
|
|
3
|
+
top: 0;
|
|
4
|
+
inset-inline: 0;
|
|
5
|
+
z-index: var(--wr-z-top, 9999);
|
|
6
|
+
pointer-events: none;
|
|
7
|
+
|
|
8
|
+
&__track {
|
|
9
|
+
width: 100%;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
opacity: 0;
|
|
12
|
+
transition: opacity 0.2s ease;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&--active {
|
|
16
|
+
opacity: 1;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&__fill {
|
|
20
|
+
width: 0;
|
|
21
|
+
height: 2px;
|
|
22
|
+
background: var(--wr-color-primary);
|
|
23
|
+
box-shadow: 0 0 8px rgb(var(--wr-color-primary-rgb) / 60%);
|
|
24
|
+
transition:
|
|
25
|
+
width 0.15s ease-out,
|
|
26
|
+
opacity 0.2s ease;
|
|
27
|
+
}
|
|
28
|
+
}
|
package/marquee/marquee.scss
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@forward './styles';
|
|
1
|
+
@forward './styles/rules';
|
|
@@ -1,155 +1,15 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
|
|
12
|
-
.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
// `[fadeOutColor]` or by setting `--wr-marquee-fade-color` directly.
|
|
17
|
-
--wr-marquee-fade-color-auto: var(--wr-color-surface, #ffffff);
|
|
18
|
-
|
|
19
|
-
position: relative;
|
|
20
|
-
display: block;
|
|
21
|
-
width: 100%;
|
|
22
|
-
overflow: hidden;
|
|
23
|
-
|
|
24
|
-
&--scale-hover {
|
|
25
|
-
padding-top: calc(var(--wr-marquee-height) * 0.1);
|
|
26
|
-
padding-bottom: calc(var(--wr-marquee-height) * 0.1);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&__track {
|
|
30
|
-
display: flex;
|
|
31
|
-
width: max-content;
|
|
32
|
-
will-change: transform;
|
|
33
|
-
user-select: none;
|
|
34
|
-
position: relative;
|
|
35
|
-
z-index: 0;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&__list {
|
|
39
|
-
display: flex;
|
|
40
|
-
align-items: center;
|
|
41
|
-
margin: 0;
|
|
42
|
-
padding: 0;
|
|
43
|
-
list-style: none;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
&__item {
|
|
47
|
-
flex: 0 0 auto;
|
|
48
|
-
// The whole strip is physical, not textual: `[direction]` is literally
|
|
49
|
-
// `'left' | 'right'`, the track is driven by `translate3d(-offset px, 0, 0)`
|
|
50
|
-
// against a `getBoundingClientRect().width` measurement of one sequence, and
|
|
51
|
-
// the edge fades are `left`/`right` gradients. The item gap is the seam of
|
|
52
|
-
// that physical loop — it has to match the offset the track wraps at, so it
|
|
53
|
-
// stays on the same axis the animation runs on.
|
|
54
|
-
// rtl-ok: seam gap of a physically-animated track (see the note above)
|
|
55
|
-
margin-right: var(--wr-marquee-gap);
|
|
56
|
-
font-size: var(--wr-marquee-height);
|
|
57
|
-
line-height: 1;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
&__item:last-child {
|
|
61
|
-
// Restates the interior gap on the last item so the join between two copies
|
|
62
|
-
// of the sequence is spaced like the gaps inside it.
|
|
63
|
-
// rtl-ok: same physical loop axis as the interior gap above
|
|
64
|
-
margin-right: var(--wr-marquee-gap);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
&__node {
|
|
68
|
-
display: inline-flex;
|
|
69
|
-
align-items: center;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
&__item img {
|
|
73
|
-
height: var(--wr-marquee-height);
|
|
74
|
-
width: auto;
|
|
75
|
-
display: block;
|
|
76
|
-
object-fit: contain;
|
|
77
|
-
image-rendering: -webkit-optimize-contrast;
|
|
78
|
-
-webkit-user-drag: none;
|
|
79
|
-
pointer-events: none;
|
|
80
|
-
transition: transform var(--wr-duration-slow) var(--wr-ease-out);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
&--scale-hover &__item {
|
|
84
|
-
overflow: visible;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
&--scale-hover &__item:hover img,
|
|
88
|
-
&--scale-hover &__item:hover &__node {
|
|
89
|
-
transform: scale(1.2);
|
|
90
|
-
transform-origin: center center;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
&--scale-hover &__node {
|
|
94
|
-
transition: transform var(--wr-duration-slow) var(--wr-ease-out);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
&__link {
|
|
98
|
-
display: inline-flex;
|
|
99
|
-
align-items: center;
|
|
100
|
-
text-decoration: none;
|
|
101
|
-
border-radius: 4px;
|
|
102
|
-
transition: opacity 0.2s ease;
|
|
103
|
-
|
|
104
|
-
&:hover {
|
|
105
|
-
opacity: 0.8;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
&:focus-visible {
|
|
109
|
-
outline: 2px solid currentColor;
|
|
110
|
-
outline-offset: 2px;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
&--fade::before,
|
|
115
|
-
&--fade::after {
|
|
116
|
-
content: '';
|
|
117
|
-
position: absolute;
|
|
118
|
-
top: 0;
|
|
119
|
-
bottom: 0;
|
|
120
|
-
width: clamp(24px, 8%, 120px);
|
|
121
|
-
pointer-events: none;
|
|
122
|
-
z-index: 10;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
&--fade::before {
|
|
126
|
-
// rtl-ok: paired with the physical `linear-gradient(to right, …)` below, which has no logical form
|
|
127
|
-
left: 0;
|
|
128
|
-
background: linear-gradient(
|
|
129
|
-
to right,
|
|
130
|
-
var(--wr-marquee-fade-color, var(--wr-marquee-fade-color-auto)) 0%,
|
|
131
|
-
rgba(0, 0, 0, 0) 100%
|
|
132
|
-
);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
&--fade::after {
|
|
136
|
-
// rtl-ok: paired with the physical `linear-gradient(to left, …)` below, which has no logical form
|
|
137
|
-
right: 0;
|
|
138
|
-
background: linear-gradient(
|
|
139
|
-
to left,
|
|
140
|
-
var(--wr-marquee-fade-color, var(--wr-marquee-fade-color-auto)) 0%,
|
|
141
|
-
rgba(0, 0, 0, 0) 100%
|
|
142
|
-
);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
@media (prefers-reduced-motion: reduce) {
|
|
146
|
-
.wr-marquee__track {
|
|
147
|
-
transform: translate3d(0, 0, 0) !important;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.wr-marquee__item img,
|
|
151
|
-
.wr-marquee__node {
|
|
152
|
-
transition: none !important;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}
|
|
1
|
+
// Public Sass entry for `@use 'ngwr/marquee'`.
|
|
2
|
+
//
|
|
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
|
+
// `marquee.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. `marquee.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,150 @@
|
|
|
1
|
+
// Endless marquee (reactbits LogoLoop port).
|
|
2
|
+
// Vars driven from component inputs:
|
|
3
|
+
// --wr-marquee-gap gap between items (px)
|
|
4
|
+
// --wr-marquee-height item height (px)
|
|
5
|
+
// --wr-marquee-fade-color edge fade colour (falls back to page bg)
|
|
6
|
+
|
|
7
|
+
.wr-marquee {
|
|
8
|
+
--wr-marquee-gap: 32px;
|
|
9
|
+
--wr-marquee-height: 28px;
|
|
10
|
+
// Default to the lib's surface colour; consumers can override via
|
|
11
|
+
// `[fadeOutColor]` or by setting `--wr-marquee-fade-color` directly.
|
|
12
|
+
--wr-marquee-fade-color-auto: var(--wr-color-surface, #ffffff);
|
|
13
|
+
|
|
14
|
+
position: relative;
|
|
15
|
+
display: block;
|
|
16
|
+
width: 100%;
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
|
|
19
|
+
&--scale-hover {
|
|
20
|
+
padding-top: calc(var(--wr-marquee-height) * 0.1);
|
|
21
|
+
padding-bottom: calc(var(--wr-marquee-height) * 0.1);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&__track {
|
|
25
|
+
display: flex;
|
|
26
|
+
width: max-content;
|
|
27
|
+
will-change: transform;
|
|
28
|
+
user-select: none;
|
|
29
|
+
position: relative;
|
|
30
|
+
z-index: 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&__list {
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
margin: 0;
|
|
37
|
+
padding: 0;
|
|
38
|
+
list-style: none;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&__item {
|
|
42
|
+
flex: 0 0 auto;
|
|
43
|
+
// The whole strip is physical, not textual: `[direction]` is literally
|
|
44
|
+
// `'left' | 'right'`, the track is driven by `translate3d(-offset px, 0, 0)`
|
|
45
|
+
// against a `getBoundingClientRect().width` measurement of one sequence, and
|
|
46
|
+
// the edge fades are `left`/`right` gradients. The item gap is the seam of
|
|
47
|
+
// that physical loop — it has to match the offset the track wraps at, so it
|
|
48
|
+
// stays on the same axis the animation runs on.
|
|
49
|
+
// rtl-ok: seam gap of a physically-animated track (see the note above)
|
|
50
|
+
margin-right: var(--wr-marquee-gap);
|
|
51
|
+
font-size: var(--wr-marquee-height);
|
|
52
|
+
line-height: 1;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&__item:last-child {
|
|
56
|
+
// Restates the interior gap on the last item so the join between two copies
|
|
57
|
+
// of the sequence is spaced like the gaps inside it.
|
|
58
|
+
// rtl-ok: same physical loop axis as the interior gap above
|
|
59
|
+
margin-right: var(--wr-marquee-gap);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&__node {
|
|
63
|
+
display: inline-flex;
|
|
64
|
+
align-items: center;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&__item img {
|
|
68
|
+
height: var(--wr-marquee-height);
|
|
69
|
+
width: auto;
|
|
70
|
+
display: block;
|
|
71
|
+
object-fit: contain;
|
|
72
|
+
image-rendering: -webkit-optimize-contrast;
|
|
73
|
+
-webkit-user-drag: none;
|
|
74
|
+
pointer-events: none;
|
|
75
|
+
transition: transform var(--wr-duration-slow) var(--wr-ease-out);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&--scale-hover &__item {
|
|
79
|
+
overflow: visible;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&--scale-hover &__item:hover img,
|
|
83
|
+
&--scale-hover &__item:hover &__node {
|
|
84
|
+
transform: scale(1.2);
|
|
85
|
+
transform-origin: center center;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&--scale-hover &__node {
|
|
89
|
+
transition: transform var(--wr-duration-slow) var(--wr-ease-out);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&__link {
|
|
93
|
+
display: inline-flex;
|
|
94
|
+
align-items: center;
|
|
95
|
+
text-decoration: none;
|
|
96
|
+
border-radius: 4px;
|
|
97
|
+
transition: opacity 0.2s ease;
|
|
98
|
+
|
|
99
|
+
&:hover {
|
|
100
|
+
opacity: 0.8;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
&:focus-visible {
|
|
104
|
+
outline: 2px solid currentColor;
|
|
105
|
+
outline-offset: 2px;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&--fade::before,
|
|
110
|
+
&--fade::after {
|
|
111
|
+
content: '';
|
|
112
|
+
position: absolute;
|
|
113
|
+
top: 0;
|
|
114
|
+
bottom: 0;
|
|
115
|
+
width: clamp(24px, 8%, 120px);
|
|
116
|
+
pointer-events: none;
|
|
117
|
+
z-index: 10;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&--fade::before {
|
|
121
|
+
// rtl-ok: paired with the physical `linear-gradient(to right, …)` below, which has no logical form
|
|
122
|
+
left: 0;
|
|
123
|
+
background: linear-gradient(
|
|
124
|
+
to right,
|
|
125
|
+
var(--wr-marquee-fade-color, var(--wr-marquee-fade-color-auto)) 0%,
|
|
126
|
+
rgba(0, 0, 0, 0) 100%
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
&--fade::after {
|
|
131
|
+
// rtl-ok: paired with the physical `linear-gradient(to left, …)` below, which has no logical form
|
|
132
|
+
right: 0;
|
|
133
|
+
background: linear-gradient(
|
|
134
|
+
to left,
|
|
135
|
+
var(--wr-marquee-fade-color, var(--wr-marquee-fade-color-auto)) 0%,
|
|
136
|
+
rgba(0, 0, 0, 0) 100%
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
@media (prefers-reduced-motion: reduce) {
|
|
141
|
+
.wr-marquee__track {
|
|
142
|
+
transform: translate3d(0, 0, 0) !important;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.wr-marquee__item img,
|
|
146
|
+
.wr-marquee__node {
|
|
147
|
+
transition: none !important;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
package/package.json
CHANGED
|
@@ -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;
|
|
@@ -52,12 +60,20 @@
|
|
|
52
60
|
--wr-select-bg: var(--wr-color-fill);
|
|
53
61
|
}
|
|
54
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
|
+
|
|
55
71
|
&__trigger {
|
|
56
72
|
display: inline-flex;
|
|
57
73
|
align-items: center;
|
|
58
74
|
gap: 0.5rem;
|
|
59
75
|
width: 100%;
|
|
60
|
-
min-width:
|
|
76
|
+
min-width: var(--wr-select-min-width);
|
|
61
77
|
appearance: none;
|
|
62
78
|
background: var(--wr-select-bg);
|
|
63
79
|
color: var(--wr-select-color);
|
|
@@ -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
|
+
}
|