ngwr 12.2.0 → 13.0.1
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 +14 -5
- package/fesm2022/ngwr-border-glow.mjs.map +1 -1
- package/fesm2022/ngwr-breadcrumbs.mjs +15 -4
- 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-context-menu.mjs +6 -2
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +8 -0
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-dialog.mjs +22 -16
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-directives.mjs +5 -2
- package/fesm2022/ngwr-directives.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 +24 -18
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +6 -2
- package/fesm2022/ngwr-dropdown.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-fuzzy-text.mjs +21 -4
- package/fesm2022/ngwr-fuzzy-text.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 +11 -4
- package/fesm2022/ngwr-gradient-text.mjs.map +1 -1
- package/fesm2022/ngwr-icon-adapters-feather.mjs +11 -0
- package/fesm2022/ngwr-icon-adapters-feather.mjs.map +1 -1
- package/fesm2022/ngwr-icon-adapters-lucide.mjs +22 -2
- package/fesm2022/ngwr-icon-adapters-lucide.mjs.map +1 -1
- package/fesm2022/ngwr-icon.mjs +474 -37
- package/fesm2022/ngwr-icon.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-markdown.mjs +63 -11
- package/fesm2022/ngwr-markdown.mjs.map +1 -1
- package/fesm2022/ngwr-marquee.mjs +2 -2
- package/fesm2022/ngwr-marquee.mjs.map +1 -1
- package/fesm2022/ngwr-overlay.mjs +36 -7
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-pagination.mjs +1 -1
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-qr.mjs +38 -1
- package/fesm2022/ngwr-qr.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 +12 -5
- 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-tabs.mjs +6 -2
- package/fesm2022/ngwr-tabs.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-utils.mjs +107 -1
- package/fesm2022/ngwr-utils.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 +4 -4
- 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 +3 -3
- 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-breadcrumbs.d.ts +1 -0
- 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-fuzzy-text.d.ts +5 -0
- package/types/ngwr-icon-adapters-feather.d.ts +11 -0
- package/types/ngwr-icon.d.ts +42 -1
- 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-shiny-text.d.ts +1 -0
- 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-utils.d.ts +47 -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,165 +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
|
-
// Glitch text (reactbits port). Two pseudo-element clones of the text
|
|
7
|
-
// are offset by ±5px and tinted with `text-shadow` (red / cyan).
|
|
8
|
-
// A clip-path keyframe slices random horizontal bands of each clone.
|
|
1
|
+
// Public Sass entry for `@use 'ngwr/glitch-text'`.
|
|
9
2
|
//
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
//
|
|
13
|
-
// out of the
|
|
14
|
-
|
|
15
|
-
.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
white-space: nowrap;
|
|
24
|
-
user-select: none;
|
|
25
|
-
font-weight: 900;
|
|
26
|
-
color: var(--wr-color-on-surface, #0f172a);
|
|
27
|
-
|
|
28
|
-
// The decorative layer. Stretched over the label so the clones land exactly
|
|
29
|
-
// where they did when they hung off the host. No `pointer-events: none`: the
|
|
30
|
-
// clones overhang the host by 10px on each side, and the hover-only variant
|
|
31
|
-
// is gated on `:hover`, so a layer the pointer passes through would leave the
|
|
32
|
-
// effect flickering off along those two strips.
|
|
33
|
-
&__clones {
|
|
34
|
-
position: absolute;
|
|
35
|
-
inset: 0;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&__clones::before,
|
|
39
|
-
&__clones::after {
|
|
40
|
-
content: attr(data-text);
|
|
41
|
-
position: absolute;
|
|
42
|
-
top: 0;
|
|
43
|
-
color: inherit;
|
|
44
|
-
background-color: var(--wr-glitch-text-bg, transparent);
|
|
45
|
-
overflow: hidden;
|
|
46
|
-
clip-path: inset(0 0 0 0);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// Always-on variant — clones animate continuously.
|
|
50
|
-
&:not(&--hover-only) &__clones::before {
|
|
51
|
-
// rtl-ok: aberration offset paired with the physical x-offset in `--wr-glitch-text-before-shadow` (`5px 0`)
|
|
52
|
-
left: -10px;
|
|
53
|
-
text-shadow: var(--wr-glitch-text-before-shadow);
|
|
54
|
-
animation: wr-glitch-text-tear var(--wr-glitch-text-before-duration) infinite linear alternate-reverse;
|
|
55
|
-
}
|
|
56
|
-
&:not(&--hover-only) &__clones::after {
|
|
57
|
-
// rtl-ok: aberration offset paired with the physical x-offset in `--wr-glitch-text-after-shadow` (`-5px 0`)
|
|
58
|
-
left: 10px;
|
|
59
|
-
text-shadow: var(--wr-glitch-text-after-shadow);
|
|
60
|
-
animation: wr-glitch-text-tear var(--wr-glitch-text-after-duration) infinite linear alternate-reverse;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// Hover-only variant — clones hidden by default, animate on :hover.
|
|
64
|
-
&--hover-only &__clones::before,
|
|
65
|
-
&--hover-only &__clones::after {
|
|
66
|
-
content: '';
|
|
67
|
-
opacity: 0;
|
|
68
|
-
animation: none;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
&--hover-only:hover &__clones::before {
|
|
72
|
-
content: attr(data-text);
|
|
73
|
-
opacity: 1;
|
|
74
|
-
// rtl-ok: same decorative offset as the always-on variant, paired with a physical `text-shadow` x-offset
|
|
75
|
-
left: -10px;
|
|
76
|
-
text-shadow: var(--wr-glitch-text-before-shadow);
|
|
77
|
-
animation: wr-glitch-text-tear var(--wr-glitch-text-before-duration) infinite linear alternate-reverse;
|
|
78
|
-
}
|
|
79
|
-
&--hover-only:hover &__clones::after {
|
|
80
|
-
content: attr(data-text);
|
|
81
|
-
opacity: 1;
|
|
82
|
-
// rtl-ok: same decorative offset as the always-on variant, paired with a physical `text-shadow` x-offset
|
|
83
|
-
left: 10px;
|
|
84
|
-
text-shadow: var(--wr-glitch-text-after-shadow);
|
|
85
|
-
animation: wr-glitch-text-tear var(--wr-glitch-text-after-duration) infinite linear alternate-reverse;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
// Reduced motion: drop the glitch clones entirely — a frozen glitch frame
|
|
90
|
-
// reads as broken double-vision text, so plain text is the right fallback.
|
|
91
|
-
// `!important` outweighs the higher-specificity `:hover` re-enable rules.
|
|
92
|
-
@media (prefers-reduced-motion: reduce) {
|
|
93
|
-
.wr-glitch-text__clones::before,
|
|
94
|
-
.wr-glitch-text__clones::after {
|
|
95
|
-
content: '' !important;
|
|
96
|
-
opacity: 0 !important;
|
|
97
|
-
animation: none !important;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
@keyframes wr-glitch-text-tear {
|
|
102
|
-
0% {
|
|
103
|
-
clip-path: inset(20% 0 50% 0);
|
|
104
|
-
}
|
|
105
|
-
5% {
|
|
106
|
-
clip-path: inset(10% 0 60% 0);
|
|
107
|
-
}
|
|
108
|
-
10% {
|
|
109
|
-
clip-path: inset(15% 0 55% 0);
|
|
110
|
-
}
|
|
111
|
-
15% {
|
|
112
|
-
clip-path: inset(25% 0 35% 0);
|
|
113
|
-
}
|
|
114
|
-
20% {
|
|
115
|
-
clip-path: inset(30% 0 40% 0);
|
|
116
|
-
}
|
|
117
|
-
25% {
|
|
118
|
-
clip-path: inset(40% 0 20% 0);
|
|
119
|
-
}
|
|
120
|
-
30% {
|
|
121
|
-
clip-path: inset(10% 0 60% 0);
|
|
122
|
-
}
|
|
123
|
-
35% {
|
|
124
|
-
clip-path: inset(15% 0 55% 0);
|
|
125
|
-
}
|
|
126
|
-
40% {
|
|
127
|
-
clip-path: inset(25% 0 35% 0);
|
|
128
|
-
}
|
|
129
|
-
45% {
|
|
130
|
-
clip-path: inset(30% 0 40% 0);
|
|
131
|
-
}
|
|
132
|
-
50% {
|
|
133
|
-
clip-path: inset(20% 0 50% 0);
|
|
134
|
-
}
|
|
135
|
-
55% {
|
|
136
|
-
clip-path: inset(10% 0 60% 0);
|
|
137
|
-
}
|
|
138
|
-
60% {
|
|
139
|
-
clip-path: inset(15% 0 55% 0);
|
|
140
|
-
}
|
|
141
|
-
65% {
|
|
142
|
-
clip-path: inset(25% 0 35% 0);
|
|
143
|
-
}
|
|
144
|
-
70% {
|
|
145
|
-
clip-path: inset(30% 0 40% 0);
|
|
146
|
-
}
|
|
147
|
-
75% {
|
|
148
|
-
clip-path: inset(40% 0 20% 0);
|
|
149
|
-
}
|
|
150
|
-
80% {
|
|
151
|
-
clip-path: inset(20% 0 50% 0);
|
|
152
|
-
}
|
|
153
|
-
85% {
|
|
154
|
-
clip-path: inset(10% 0 60% 0);
|
|
155
|
-
}
|
|
156
|
-
90% {
|
|
157
|
-
clip-path: inset(15% 0 55% 0);
|
|
158
|
-
}
|
|
159
|
-
95% {
|
|
160
|
-
clip-path: inset(25% 0 35% 0);
|
|
161
|
-
}
|
|
162
|
-
100% {
|
|
163
|
-
clip-path: inset(30% 0 40% 0);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
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
|
+
// `glitch-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. `glitch-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,160 @@
|
|
|
1
|
+
// Glitch text (reactbits port). Two pseudo-element clones of the text
|
|
2
|
+
// are offset by ±5px and tinted with `text-shadow` (red / cyan).
|
|
3
|
+
// A clip-path keyframe slices random horizontal bands of each clone.
|
|
4
|
+
//
|
|
5
|
+
// The clones hang off `__clones`, never off the host. `content: attr(data-text)`
|
|
6
|
+
// is exposed to the accessibility tree, so pseudos on the host made the string
|
|
7
|
+
// announce three times; `__clones` carries `aria-hidden` and takes both of them
|
|
8
|
+
// out of the tree at once.
|
|
9
|
+
|
|
10
|
+
.wr-glitch-text {
|
|
11
|
+
--wr-glitch-text-before-duration: 2s;
|
|
12
|
+
--wr-glitch-text-after-duration: 3s;
|
|
13
|
+
--wr-glitch-text-before-shadow: 5px 0 var(--wr-color-info);
|
|
14
|
+
--wr-glitch-text-after-shadow: -5px 0 var(--wr-color-danger);
|
|
15
|
+
|
|
16
|
+
position: relative;
|
|
17
|
+
display: inline-block;
|
|
18
|
+
white-space: nowrap;
|
|
19
|
+
user-select: none;
|
|
20
|
+
font-weight: 900;
|
|
21
|
+
color: var(--wr-color-on-surface, #0f172a);
|
|
22
|
+
|
|
23
|
+
// The decorative layer. Stretched over the label so the clones land exactly
|
|
24
|
+
// where they did when they hung off the host. No `pointer-events: none`: the
|
|
25
|
+
// clones overhang the host by 10px on each side, and the hover-only variant
|
|
26
|
+
// is gated on `:hover`, so a layer the pointer passes through would leave the
|
|
27
|
+
// effect flickering off along those two strips.
|
|
28
|
+
&__clones {
|
|
29
|
+
position: absolute;
|
|
30
|
+
inset: 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&__clones::before,
|
|
34
|
+
&__clones::after {
|
|
35
|
+
content: attr(data-text);
|
|
36
|
+
position: absolute;
|
|
37
|
+
top: 0;
|
|
38
|
+
color: inherit;
|
|
39
|
+
background-color: var(--wr-glitch-text-bg, transparent);
|
|
40
|
+
overflow: hidden;
|
|
41
|
+
clip-path: inset(0 0 0 0);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Always-on variant — clones animate continuously.
|
|
45
|
+
&:not(&--hover-only) &__clones::before {
|
|
46
|
+
// rtl-ok: aberration offset paired with the physical x-offset in `--wr-glitch-text-before-shadow` (`5px 0`)
|
|
47
|
+
left: -10px;
|
|
48
|
+
text-shadow: var(--wr-glitch-text-before-shadow);
|
|
49
|
+
animation: wr-glitch-text-tear var(--wr-glitch-text-before-duration) infinite linear alternate-reverse;
|
|
50
|
+
}
|
|
51
|
+
&:not(&--hover-only) &__clones::after {
|
|
52
|
+
// rtl-ok: aberration offset paired with the physical x-offset in `--wr-glitch-text-after-shadow` (`-5px 0`)
|
|
53
|
+
left: 10px;
|
|
54
|
+
text-shadow: var(--wr-glitch-text-after-shadow);
|
|
55
|
+
animation: wr-glitch-text-tear var(--wr-glitch-text-after-duration) infinite linear alternate-reverse;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Hover-only variant — clones hidden by default, animate on :hover.
|
|
59
|
+
&--hover-only &__clones::before,
|
|
60
|
+
&--hover-only &__clones::after {
|
|
61
|
+
content: '';
|
|
62
|
+
opacity: 0;
|
|
63
|
+
animation: none;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&--hover-only:hover &__clones::before {
|
|
67
|
+
content: attr(data-text);
|
|
68
|
+
opacity: 1;
|
|
69
|
+
// rtl-ok: same decorative offset as the always-on variant, paired with a physical `text-shadow` x-offset
|
|
70
|
+
left: -10px;
|
|
71
|
+
text-shadow: var(--wr-glitch-text-before-shadow);
|
|
72
|
+
animation: wr-glitch-text-tear var(--wr-glitch-text-before-duration) infinite linear alternate-reverse;
|
|
73
|
+
}
|
|
74
|
+
&--hover-only:hover &__clones::after {
|
|
75
|
+
content: attr(data-text);
|
|
76
|
+
opacity: 1;
|
|
77
|
+
// rtl-ok: same decorative offset as the always-on variant, paired with a physical `text-shadow` x-offset
|
|
78
|
+
left: 10px;
|
|
79
|
+
text-shadow: var(--wr-glitch-text-after-shadow);
|
|
80
|
+
animation: wr-glitch-text-tear var(--wr-glitch-text-after-duration) infinite linear alternate-reverse;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// Reduced motion: drop the glitch clones entirely — a frozen glitch frame
|
|
85
|
+
// reads as broken double-vision text, so plain text is the right fallback.
|
|
86
|
+
// `!important` outweighs the higher-specificity `:hover` re-enable rules.
|
|
87
|
+
@media (prefers-reduced-motion: reduce) {
|
|
88
|
+
.wr-glitch-text__clones::before,
|
|
89
|
+
.wr-glitch-text__clones::after {
|
|
90
|
+
content: '' !important;
|
|
91
|
+
opacity: 0 !important;
|
|
92
|
+
animation: none !important;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@keyframes wr-glitch-text-tear {
|
|
97
|
+
0% {
|
|
98
|
+
clip-path: inset(20% 0 50% 0);
|
|
99
|
+
}
|
|
100
|
+
5% {
|
|
101
|
+
clip-path: inset(10% 0 60% 0);
|
|
102
|
+
}
|
|
103
|
+
10% {
|
|
104
|
+
clip-path: inset(15% 0 55% 0);
|
|
105
|
+
}
|
|
106
|
+
15% {
|
|
107
|
+
clip-path: inset(25% 0 35% 0);
|
|
108
|
+
}
|
|
109
|
+
20% {
|
|
110
|
+
clip-path: inset(30% 0 40% 0);
|
|
111
|
+
}
|
|
112
|
+
25% {
|
|
113
|
+
clip-path: inset(40% 0 20% 0);
|
|
114
|
+
}
|
|
115
|
+
30% {
|
|
116
|
+
clip-path: inset(10% 0 60% 0);
|
|
117
|
+
}
|
|
118
|
+
35% {
|
|
119
|
+
clip-path: inset(15% 0 55% 0);
|
|
120
|
+
}
|
|
121
|
+
40% {
|
|
122
|
+
clip-path: inset(25% 0 35% 0);
|
|
123
|
+
}
|
|
124
|
+
45% {
|
|
125
|
+
clip-path: inset(30% 0 40% 0);
|
|
126
|
+
}
|
|
127
|
+
50% {
|
|
128
|
+
clip-path: inset(20% 0 50% 0);
|
|
129
|
+
}
|
|
130
|
+
55% {
|
|
131
|
+
clip-path: inset(10% 0 60% 0);
|
|
132
|
+
}
|
|
133
|
+
60% {
|
|
134
|
+
clip-path: inset(15% 0 55% 0);
|
|
135
|
+
}
|
|
136
|
+
65% {
|
|
137
|
+
clip-path: inset(25% 0 35% 0);
|
|
138
|
+
}
|
|
139
|
+
70% {
|
|
140
|
+
clip-path: inset(30% 0 40% 0);
|
|
141
|
+
}
|
|
142
|
+
75% {
|
|
143
|
+
clip-path: inset(40% 0 20% 0);
|
|
144
|
+
}
|
|
145
|
+
80% {
|
|
146
|
+
clip-path: inset(20% 0 50% 0);
|
|
147
|
+
}
|
|
148
|
+
85% {
|
|
149
|
+
clip-path: inset(10% 0 60% 0);
|
|
150
|
+
}
|
|
151
|
+
90% {
|
|
152
|
+
clip-path: inset(15% 0 55% 0);
|
|
153
|
+
}
|
|
154
|
+
95% {
|
|
155
|
+
clip-path: inset(25% 0 35% 0);
|
|
156
|
+
}
|
|
157
|
+
100% {
|
|
158
|
+
clip-path: inset(30% 0 40% 0);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@forward './styles';
|
|
1
|
+
@forward './styles/rules';
|
|
@@ -1,118 +1,15 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
display: inline-flex;
|
|
17
|
-
align-items: center;
|
|
18
|
-
justify-content: center;
|
|
19
|
-
margin: 0;
|
|
20
|
-
font-weight: 500;
|
|
21
|
-
line-height: 1.25;
|
|
22
|
-
overflow: hidden;
|
|
23
|
-
|
|
24
|
-
&--border {
|
|
25
|
-
padding: 0.35rem 0.75rem;
|
|
26
|
-
border-radius: 1.25rem;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&__text {
|
|
30
|
-
position: relative;
|
|
31
|
-
z-index: 2;
|
|
32
|
-
display: inline-block;
|
|
33
|
-
background-image: var(--wr-gradient-text-image);
|
|
34
|
-
background-size: var(--wr-gradient-text-size);
|
|
35
|
-
background-position: 0% 50%;
|
|
36
|
-
-webkit-background-clip: text;
|
|
37
|
-
background-clip: text;
|
|
38
|
-
color: transparent;
|
|
39
|
-
animation: wr-gradient-text-horizontal var(--wr-gradient-text-duration) linear infinite;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// Border variant — animated gradient ring + dark inner pill behind the
|
|
43
|
-
// text. The inner uses a `::before` so the gradient is only visible at
|
|
44
|
-
// the perimeter.
|
|
45
|
-
&__border {
|
|
46
|
-
position: absolute;
|
|
47
|
-
inset: 0;
|
|
48
|
-
border-radius: inherit;
|
|
49
|
-
background-image: var(--wr-gradient-text-image);
|
|
50
|
-
background-size: var(--wr-gradient-text-size);
|
|
51
|
-
background-position: 0% 50%;
|
|
52
|
-
animation: wr-gradient-text-horizontal var(--wr-gradient-text-duration) linear infinite;
|
|
53
|
-
z-index: 0;
|
|
54
|
-
pointer-events: none;
|
|
55
|
-
|
|
56
|
-
&::before {
|
|
57
|
-
content: '';
|
|
58
|
-
position: absolute;
|
|
59
|
-
inset: 1px;
|
|
60
|
-
border-radius: inherit;
|
|
61
|
-
// Surface token — flips with the theme so the ring reads on both.
|
|
62
|
-
background-color: var(--wr-color-surface, #fff);
|
|
63
|
-
z-index: 1;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// Direction variants change which axis the gradient slides on.
|
|
68
|
-
&--vertical &__text,
|
|
69
|
-
&--vertical &__border {
|
|
70
|
-
background-position: 50% 0%;
|
|
71
|
-
animation-name: wr-gradient-text-vertical;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// Diagonal: same as horizontal motion but a diagonal angle on the
|
|
75
|
-
// gradient itself.
|
|
76
|
-
&--diagonal &__text,
|
|
77
|
-
&--diagonal &__border {
|
|
78
|
-
background-position: 0% 50%;
|
|
79
|
-
animation-name: wr-gradient-text-horizontal;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
&--yoyo &__text,
|
|
83
|
-
&--yoyo &__border {
|
|
84
|
-
animation-direction: alternate;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
&--pause-on-hover:hover &__text,
|
|
88
|
-
&--pause-on-hover:hover &__border {
|
|
89
|
-
animation-play-state: paused;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
@keyframes wr-gradient-text-horizontal {
|
|
94
|
-
from {
|
|
95
|
-
background-position: 0% 50%;
|
|
96
|
-
}
|
|
97
|
-
to {
|
|
98
|
-
background-position: 100% 50%;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
@keyframes wr-gradient-text-vertical {
|
|
103
|
-
from {
|
|
104
|
-
background-position: 50% 0%;
|
|
105
|
-
}
|
|
106
|
-
to {
|
|
107
|
-
background-position: 50% 100%;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
// Reduced motion: hold the gradient still — text keeps its gradient fill
|
|
112
|
-
// (and the border variant its ring), only the slide stops.
|
|
113
|
-
@media (prefers-reduced-motion: reduce) {
|
|
114
|
-
.wr-gradient-text__text,
|
|
115
|
-
.wr-gradient-text__border {
|
|
116
|
-
animation: none !important;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
1
|
+
// Public Sass entry for `@use 'ngwr/gradient-text'`.
|
|
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
|
+
// `gradient-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. `gradient-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,113 @@
|
|
|
1
|
+
// Animated gradient text (reactbits port). The gradient is shared between
|
|
2
|
+
// the text fill (via `background-clip: text`) and an optional outer ring.
|
|
3
|
+
// Both layers use the same animation, so the ring + text stay in sync.
|
|
4
|
+
|
|
5
|
+
.wr-gradient-text {
|
|
6
|
+
--wr-gradient-text-image: linear-gradient(to right, #5227ff, #ff9ffc, #b497cf, #5227ff);
|
|
7
|
+
--wr-gradient-text-size: 300% 100%;
|
|
8
|
+
--wr-gradient-text-duration: 8s;
|
|
9
|
+
|
|
10
|
+
position: relative;
|
|
11
|
+
display: inline-flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
margin: 0;
|
|
15
|
+
font-weight: 500;
|
|
16
|
+
line-height: 1.25;
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
|
|
19
|
+
&--border {
|
|
20
|
+
padding: 0.35rem 0.75rem;
|
|
21
|
+
border-radius: 1.25rem;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&__text {
|
|
25
|
+
position: relative;
|
|
26
|
+
z-index: 2;
|
|
27
|
+
display: inline-block;
|
|
28
|
+
background-image: var(--wr-gradient-text-image);
|
|
29
|
+
background-size: var(--wr-gradient-text-size);
|
|
30
|
+
background-position: 0% 50%;
|
|
31
|
+
-webkit-background-clip: text;
|
|
32
|
+
background-clip: text;
|
|
33
|
+
color: transparent;
|
|
34
|
+
animation: wr-gradient-text-horizontal var(--wr-gradient-text-duration) linear infinite;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Border variant — animated gradient ring + dark inner pill behind the
|
|
38
|
+
// text. The inner uses a `::before` so the gradient is only visible at
|
|
39
|
+
// the perimeter.
|
|
40
|
+
&__border {
|
|
41
|
+
position: absolute;
|
|
42
|
+
inset: 0;
|
|
43
|
+
border-radius: inherit;
|
|
44
|
+
background-image: var(--wr-gradient-text-image);
|
|
45
|
+
background-size: var(--wr-gradient-text-size);
|
|
46
|
+
background-position: 0% 50%;
|
|
47
|
+
animation: wr-gradient-text-horizontal var(--wr-gradient-text-duration) linear infinite;
|
|
48
|
+
z-index: 0;
|
|
49
|
+
pointer-events: none;
|
|
50
|
+
|
|
51
|
+
&::before {
|
|
52
|
+
content: '';
|
|
53
|
+
position: absolute;
|
|
54
|
+
inset: 1px;
|
|
55
|
+
border-radius: inherit;
|
|
56
|
+
// Surface token — flips with the theme so the ring reads on both.
|
|
57
|
+
background-color: var(--wr-color-surface, #fff);
|
|
58
|
+
z-index: 1;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Direction variants change which axis the gradient slides on.
|
|
63
|
+
&--vertical &__text,
|
|
64
|
+
&--vertical &__border {
|
|
65
|
+
background-position: 50% 0%;
|
|
66
|
+
animation-name: wr-gradient-text-vertical;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Diagonal: same as horizontal motion but a diagonal angle on the
|
|
70
|
+
// gradient itself.
|
|
71
|
+
&--diagonal &__text,
|
|
72
|
+
&--diagonal &__border {
|
|
73
|
+
background-position: 0% 50%;
|
|
74
|
+
animation-name: wr-gradient-text-horizontal;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&--yoyo &__text,
|
|
78
|
+
&--yoyo &__border {
|
|
79
|
+
animation-direction: alternate;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&--pause-on-hover:hover &__text,
|
|
83
|
+
&--pause-on-hover:hover &__border {
|
|
84
|
+
animation-play-state: paused;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
@keyframes wr-gradient-text-horizontal {
|
|
89
|
+
from {
|
|
90
|
+
background-position: 0% 50%;
|
|
91
|
+
}
|
|
92
|
+
to {
|
|
93
|
+
background-position: 100% 50%;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@keyframes wr-gradient-text-vertical {
|
|
98
|
+
from {
|
|
99
|
+
background-position: 50% 0%;
|
|
100
|
+
}
|
|
101
|
+
to {
|
|
102
|
+
background-position: 50% 100%;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// Reduced motion: hold the gradient still — text keeps its gradient fill
|
|
107
|
+
// (and the border variant its ring), only the slide stops.
|
|
108
|
+
@media (prefers-reduced-motion: reduce) {
|
|
109
|
+
.wr-gradient-text__text,
|
|
110
|
+
.wr-gradient-text__border {
|
|
111
|
+
animation: none !important;
|
|
112
|
+
}
|
|
113
|
+
}
|
package/input/styles/_index.scss
CHANGED
|
@@ -131,6 +131,19 @@
|
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
+
// ...which is why the group has to carry the disabled fill on the input's
|
|
135
|
+
// behalf. `.wr-input:disabled` sets `--wr-input-bg: var(--wr-color-fill)`,
|
|
136
|
+
// but the `background: transparent` above outranks it and the group keeps
|
|
137
|
+
// painting `--wr-color-surface` — so in a disabled form `<wr-date-picker>`
|
|
138
|
+
// and `<wr-input-number>` were the only fields still reading as editable
|
|
139
|
+
// beside a greyed `[wrInput]`, `<wr-textarea>` and `<wr-select>`.
|
|
140
|
+
// Readonly is deliberately NOT matched: `--disabled` is the only state
|
|
141
|
+
// `wr-textarea` / `wr-select` / `wr-cascader` fill for, and the bare
|
|
142
|
+
// `.wr-input[readonly]` fill is the outlier, not the contract.
|
|
143
|
+
&:has(> .wr-input:disabled) {
|
|
144
|
+
--wr-input-group-bg: var(--wr-color-fill);
|
|
145
|
+
}
|
|
146
|
+
|
|
134
147
|
&__affix {
|
|
135
148
|
display: inline-flex;
|
|
136
149
|
align-items: center;
|
|
@@ -50,6 +50,14 @@
|
|
|
50
50
|
box-shadow: 0 0 0 3px rgba(var(--wr-color-primary-rgb), 0.15);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
// A read-only box still takes focus, still answers the arrow keys and still
|
|
54
|
+
// submits, so `not-allowed` would say something false about a control that
|
|
55
|
+
// is working — the cursor is the whole cue. Listed before `:disabled`, which
|
|
56
|
+
// matches a readonly-OR-disabled box too and has to win on source order.
|
|
57
|
+
&:read-only {
|
|
58
|
+
cursor: default;
|
|
59
|
+
}
|
|
60
|
+
|
|
53
61
|
&:disabled {
|
|
54
62
|
background: var(--wr-color-fill-strong);
|
|
55
63
|
color: var(--wr-color-on-surface-muted);
|
package/lightbox/lightbox.scss
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@forward './styles';
|
|
1
|
+
@forward './styles/rules';
|