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.
Files changed (187) hide show
  1. package/README.md +11 -1
  2. package/alert/styles/_index.scss +11 -4
  3. package/badge/styles/_index.scss +30 -0
  4. package/badge/styles/_tag.scss +15 -1
  5. package/border-glow/border-glow.scss +1 -1
  6. package/border-glow/styles/_index.scss +15 -233
  7. package/border-glow/styles/_rules.scss +228 -0
  8. package/breadcrumbs/breadcrumbs.scss +1 -1
  9. package/breadcrumbs/styles/_index.scss +15 -78
  10. package/breadcrumbs/styles/_rules.scss +84 -0
  11. package/card/card.scss +1 -1
  12. package/card/styles/_index.scss +15 -96
  13. package/card/styles/_rules.scss +96 -0
  14. package/cascader/cascader.scss +1 -1
  15. package/cascader/styles/_index.scss +15 -244
  16. package/cascader/styles/_rules.scss +261 -0
  17. package/checkbox/styles/_index.scss +7 -0
  18. package/circular-text/circular-text.scss +1 -1
  19. package/circular-text/styles/_index.scss +15 -63
  20. package/circular-text/styles/_rules.scss +58 -0
  21. package/color-picker/styles/_index.scss +8 -0
  22. package/descriptions/styles/_index.scss +13 -3
  23. package/drag-drop/sortable-list.scss +1 -1
  24. package/drag-drop/styles/_index.scss +14 -143
  25. package/drag-drop/styles/_rules.scss +151 -0
  26. package/drawer/styles/_index.scss +95 -1
  27. package/falling-text/falling-text.scss +1 -1
  28. package/falling-text/styles/_index.scss +15 -36
  29. package/falling-text/styles/_rules.scss +31 -0
  30. package/fesm2022/ngwr-border-glow.mjs +2 -2
  31. package/fesm2022/ngwr-border-glow.mjs.map +1 -1
  32. package/fesm2022/ngwr-breadcrumbs.mjs +2 -2
  33. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  34. package/fesm2022/ngwr-card.mjs +2 -2
  35. package/fesm2022/ngwr-card.mjs.map +1 -1
  36. package/fesm2022/ngwr-cascader.mjs +27 -9
  37. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  38. package/fesm2022/ngwr-checkbox.mjs +86 -8
  39. package/fesm2022/ngwr-checkbox.mjs.map +1 -1
  40. package/fesm2022/ngwr-circular-text.mjs +2 -2
  41. package/fesm2022/ngwr-circular-text.mjs.map +1 -1
  42. package/fesm2022/ngwr-color-picker.mjs +57 -7
  43. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  44. package/fesm2022/ngwr-date-picker.mjs +8 -0
  45. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  46. package/fesm2022/ngwr-drag-drop.mjs +2 -2
  47. package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
  48. package/fesm2022/ngwr-drawer.mjs +6 -0
  49. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  50. package/fesm2022/ngwr-falling-text.mjs +2 -2
  51. package/fesm2022/ngwr-falling-text.mjs.map +1 -1
  52. package/fesm2022/ngwr-file-upload.mjs +29 -8
  53. package/fesm2022/ngwr-file-upload.mjs.map +1 -1
  54. package/fesm2022/ngwr-form.mjs +48 -1
  55. package/fesm2022/ngwr-form.mjs.map +1 -1
  56. package/fesm2022/ngwr-glitch-text.mjs +2 -2
  57. package/fesm2022/ngwr-glitch-text.mjs.map +1 -1
  58. package/fesm2022/ngwr-gradient-text.mjs +2 -2
  59. package/fesm2022/ngwr-gradient-text.mjs.map +1 -1
  60. package/fesm2022/ngwr-input-otp.mjs +41 -3
  61. package/fesm2022/ngwr-input-otp.mjs.map +1 -1
  62. package/fesm2022/ngwr-knob.mjs +17 -2
  63. package/fesm2022/ngwr-knob.mjs.map +1 -1
  64. package/fesm2022/ngwr-lightbox.mjs +2 -2
  65. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  66. package/fesm2022/ngwr-list.mjs +2 -2
  67. package/fesm2022/ngwr-list.mjs.map +1 -1
  68. package/fesm2022/ngwr-loading-bar.mjs +2 -2
  69. package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
  70. package/fesm2022/ngwr-marquee.mjs +2 -2
  71. package/fesm2022/ngwr-marquee.mjs.map +1 -1
  72. package/fesm2022/ngwr-pagination.mjs +1 -1
  73. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  74. package/fesm2022/ngwr-radio.mjs +63 -8
  75. package/fesm2022/ngwr-radio.mjs.map +1 -1
  76. package/fesm2022/ngwr-rating.mjs +17 -2
  77. package/fesm2022/ngwr-rating.mjs.map +1 -1
  78. package/fesm2022/ngwr-segmented.mjs +22 -3
  79. package/fesm2022/ngwr-segmented.mjs.map +1 -1
  80. package/fesm2022/ngwr-select.mjs +59 -15
  81. package/fesm2022/ngwr-select.mjs.map +1 -1
  82. package/fesm2022/ngwr-shiny-text.mjs +2 -2
  83. package/fesm2022/ngwr-shiny-text.mjs.map +1 -1
  84. package/fesm2022/ngwr-slider.mjs +21 -6
  85. package/fesm2022/ngwr-slider.mjs.map +1 -1
  86. package/fesm2022/ngwr-spotlight-card.mjs +2 -2
  87. package/fesm2022/ngwr-spotlight-card.mjs.map +1 -1
  88. package/fesm2022/ngwr-star-border.mjs +2 -2
  89. package/fesm2022/ngwr-star-border.mjs.map +1 -1
  90. package/fesm2022/ngwr-switch.mjs +44 -4
  91. package/fesm2022/ngwr-switch.mjs.map +1 -1
  92. package/fesm2022/ngwr-table.mjs +1 -1
  93. package/fesm2022/ngwr-table.mjs.map +1 -1
  94. package/fesm2022/ngwr-textarea.mjs +5 -2
  95. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  96. package/fesm2022/ngwr-theme.mjs +41 -1
  97. package/fesm2022/ngwr-theme.mjs.map +1 -1
  98. package/fesm2022/ngwr-tilt-card.mjs +2 -2
  99. package/fesm2022/ngwr-tilt-card.mjs.map +1 -1
  100. package/fesm2022/ngwr-transfer.mjs +38 -6
  101. package/fesm2022/ngwr-transfer.mjs.map +1 -1
  102. package/fesm2022/ngwr-tree.mjs +33 -7
  103. package/fesm2022/ngwr-tree.mjs.map +1 -1
  104. package/fesm2022/ngwr-typewriter.mjs +2 -2
  105. package/fesm2022/ngwr-typewriter.mjs.map +1 -1
  106. package/fesm2022/ngwr-version.mjs +1 -1
  107. package/fesm2022/ngwr-version.mjs.map +1 -1
  108. package/fesm2022/ngwr-virtual-scroll.mjs +2 -2
  109. package/fesm2022/ngwr-virtual-scroll.mjs.map +1 -1
  110. package/fesm2022/ngwr-waves.mjs +2 -2
  111. package/fesm2022/ngwr-waves.mjs.map +1 -1
  112. package/file-upload/styles/_index.scss +6 -0
  113. package/glitch-text/glitch-text.scss +1 -1
  114. package/glitch-text/styles/_index.scss +14 -164
  115. package/glitch-text/styles/_rules.scss +160 -0
  116. package/gradient-text/gradient-text.scss +1 -1
  117. package/gradient-text/styles/_index.scss +15 -118
  118. package/gradient-text/styles/_rules.scss +113 -0
  119. package/input/styles/_index.scss +13 -0
  120. package/input-otp/styles/_index.scss +8 -0
  121. package/lightbox/lightbox.scss +1 -1
  122. package/lightbox/styles/_index.scss +15 -191
  123. package/lightbox/styles/_rules.scss +198 -0
  124. package/list/list.scss +1 -1
  125. package/list/styles/_index.scss +15 -101
  126. package/list/styles/_rules.scss +108 -0
  127. package/llms-full.txt +3 -3
  128. package/loading-bar/loading-bar.scss +1 -1
  129. package/loading-bar/styles/_index.scss +15 -33
  130. package/loading-bar/styles/_rules.scss +28 -0
  131. package/marquee/marquee.scss +1 -1
  132. package/marquee/styles/_index.scss +15 -155
  133. package/marquee/styles/_rules.scss +150 -0
  134. package/overlay/styles/_arrow.scss +243 -0
  135. package/package.json +1 -1
  136. package/popconfirm/styles/_index.scss +17 -0
  137. package/popover/styles/_index.scss +49 -207
  138. package/segmented/styles/_index.scss +8 -0
  139. package/select/styles/_index.scss +47 -5
  140. package/shiny-text/shiny-text.scss +1 -1
  141. package/shiny-text/styles/_index.scss +14 -105
  142. package/shiny-text/styles/_rules.scss +101 -0
  143. package/sidebar/styles/_index.scss +4 -1
  144. package/slider/styles/_index.scss +8 -0
  145. package/spotlight-card/spotlight-card.scss +1 -1
  146. package/spotlight-card/styles/_index.scss +15 -52
  147. package/spotlight-card/styles/_rules.scss +47 -0
  148. package/star-border/star-border.scss +1 -1
  149. package/star-border/styles/_index.scss +15 -125
  150. package/star-border/styles/_rules.scss +120 -0
  151. package/stepper/styles/_index.scss +44 -5
  152. package/switch/styles/_index.scss +7 -0
  153. package/theme/styles/_dark.scss +81 -4
  154. package/theme/styles/_index.scss +1 -0
  155. package/theme/styles/_mixins.scss +10 -0
  156. package/theme/styles/_motion.scss +94 -0
  157. package/tilt-card/styles/_index.scss +15 -45
  158. package/tilt-card/styles/_rules.scss +40 -0
  159. package/tilt-card/tilt-card.scss +1 -1
  160. package/tree/styles/_index.scss +25 -3
  161. package/types/ngwr-cascader.d.ts +17 -1
  162. package/types/ngwr-checkbox.d.ts +51 -3
  163. package/types/ngwr-color-picker.d.ts +19 -1
  164. package/types/ngwr-file-upload.d.ts +18 -1
  165. package/types/ngwr-form.d.ts +51 -2
  166. package/types/ngwr-input-otp.d.ts +23 -1
  167. package/types/ngwr-knob.d.ts +14 -0
  168. package/types/ngwr-radio.d.ts +37 -2
  169. package/types/ngwr-rating.d.ts +14 -0
  170. package/types/ngwr-segmented.d.ts +18 -1
  171. package/types/ngwr-select.d.ts +29 -3
  172. package/types/ngwr-slider.d.ts +14 -1
  173. package/types/ngwr-switch.d.ts +26 -2
  174. package/types/ngwr-textarea.d.ts +3 -0
  175. package/types/ngwr-theme.d.ts +24 -0
  176. package/types/ngwr-transfer.d.ts +17 -1
  177. package/types/ngwr-tree.d.ts +21 -1
  178. package/types/ngwr-version.d.ts +1 -1
  179. package/typewriter/styles/_index.scss +15 -38
  180. package/typewriter/styles/_rules.scss +33 -0
  181. package/typewriter/typewriter.scss +1 -1
  182. package/virtual-scroll/styles/_index.scss +15 -32
  183. package/virtual-scroll/styles/_rules.scss +27 -0
  184. package/virtual-scroll/virtual-scroll.scss +1 -1
  185. package/waves/styles/_index.scss +15 -50
  186. package/waves/styles/_rules.scss +45 -0
  187. package/waves/waves.scss +1 -1
package/README.md CHANGED
@@ -162,6 +162,16 @@ Opt-in utilities (not part of `@use 'ngwr'`):
162
162
  `ngwr/typography-utilities` is the utility-class sheet — not `ngwr/typography`,
163
163
  which is the larger `wrTypography` component entry.
164
164
 
165
+ ### What you may style, and what may move
166
+
167
+ Components render with `ViewEncapsulation.None`, so their `.wr-*` BEM classes and
168
+ their `--wr-*` custom properties are reachable — and both are treated as public
169
+ API: renaming one is a breaking change carrying a migration note. The DOM *shape*
170
+ is not. Which element holds which class, how deeply they nest, whether a wrapper
171
+ exists — all of that may move in a minor. A rule keyed on one class survives; a
172
+ descendant selector that encodes a structure (`.wr-select__trigger > span > svg`)
173
+ does not. See [Theming](https://ngwr.dev/guides/theming) for the full statement.
174
+
165
175
  ## Quick start
166
176
 
167
177
  ```ts
@@ -260,7 +270,7 @@ Plus [icon](https://ngwr.dev/reference/components/icon), the experimental [squir
260
270
 
261
271
  ### Animations
262
272
 
263
- Animated UI effects. Mix of in-house components + ports of [reactbits.dev](https://www.reactbits.dev) — each port carries a credit chip on its docs page. Defaults are theme-aware (light + dark), and every component honors `prefers-reduced-motion` — the one exception is `spotlight-card`, whose highlight only tracks the pointer.
273
+ Animated UI effects. Mix of in-house components + ports of [reactbits.dev](https://www.reactbits.dev) — each port carries a credit chip on its docs page. Defaults are theme-aware (light + dark), and every component in **this section** honors `prefers-reduced-motion` — the one exception is `spotlight-card`, whose highlight only tracks the pointer. The scope of that sentence is the thing to read carefully: it says nothing about the rest of the catalog, and until v13 it was inviting a reader to over-generalise. The always-on chrome — the spinner and skeleton that animate on essentially every page, plus the enter animations on dialog, drawer, dropdown, popconfirm, toast, lightbox and the responsive bottom sheet — had no guard at all. It has one now, in the theme layer (`theme/styles/_motion.scss`) rather than per component, so the set is reviewable in one place.
264
274
 
265
275
  [aurora](https://ngwr.dev/animations/aurora), [blur-text](https://ngwr.dev/animations/blur-text), [border-glow](https://ngwr.dev/animations/border-glow), [circular-text](https://ngwr.dev/animations/circular-text), [click-spark](https://ngwr.dev/animations/click-spark), [confetti](https://ngwr.dev/animations/confetti), [decrypt-text](https://ngwr.dev/animations/decrypt-text), [falling-text](https://ngwr.dev/animations/falling-text), [fuzzy-text](https://ngwr.dev/animations/fuzzy-text), [glitch-text](https://ngwr.dev/animations/glitch-text), [gradient-text](https://ngwr.dev/animations/gradient-text), [marquee](https://ngwr.dev/animations/marquee), [rotating-text](https://ngwr.dev/animations/rotating-text), [shiny-text](https://ngwr.dev/animations/shiny-text), [splash-cursor](https://ngwr.dev/animations/splash-cursor), [split-text](https://ngwr.dev/animations/split-text), [spotlight-card](https://ngwr.dev/animations/spotlight-card), [star-border](https://ngwr.dev/animations/star-border), [tilt-card](https://ngwr.dev/animations/tilt-card), [typewriter](https://ngwr.dev/animations/typewriter), [waves](https://ngwr.dev/animations/waves).
266
276
 
@@ -18,7 +18,17 @@ $alert-colors: (
18
18
 
19
19
  // Defaults — overridden per variant below.
20
20
  --wr-alert-bg: var(--wr-color-info-soft);
21
- --wr-alert-border: var(--wr-color-info-soft-border);
21
+ // `transparent`, not a `-soft-border` hairline: the tint alone carries the
22
+ // block, and the ring around it was a second edge saying the same thing.
23
+ //
24
+ // The hook itself stays, and is still what the border reads — it is public
25
+ // API, an app that wants a bordered alert sets `--wr-alert-border` and gets
26
+ // one back, per variant if it likes. Nor does the declaration go: a
27
+ // transparent 1px border still occupies its 1px, so a consumer switching the
28
+ // hook on does not reflow the block by a pixel on each side, and no variant's
29
+ // padding has to be re-derived. NO variant overrides this any more — an alert
30
+ // has one border value, and it is the one a consumer can reach.
31
+ --wr-alert-border: transparent;
22
32
  // `-ink`, never the bare intent: this is the intent used AS TEXT on its own
23
33
  // soft tint, and a bare `--wr-color-warning` there is 1.71:1 in the light
24
34
  // theme. See the token note in AGENTS.md — `-contrast` is the other
@@ -103,7 +113,6 @@ $alert-colors: (
103
113
  @each $variant, $color in $alert-colors {
104
114
  &--#{$variant} {
105
115
  --wr-alert-bg: var(--wr-color-#{$color}-soft);
106
- --wr-alert-border: var(--wr-color-#{$color}-soft-border);
107
116
  --wr-alert-title: var(--wr-color-#{$color}-ink);
108
117
  --wr-alert-close: var(--wr-color-#{$color}-ink);
109
118
  }
@@ -112,7 +121,6 @@ $alert-colors: (
112
121
  // Neutral — muted gray chip, reusing the `medium` soft tokens.
113
122
  &--neutral {
114
123
  --wr-alert-bg: var(--wr-color-medium-soft);
115
- --wr-alert-border: var(--wr-color-medium-soft-border);
116
124
  --wr-alert-title: var(--wr-color-on-surface);
117
125
  --wr-alert-message: var(--wr-color-on-surface-muted);
118
126
  --wr-alert-close: var(--wr-color-on-surface-muted);
@@ -126,7 +134,6 @@ $alert-colors: (
126
134
  // light text in light theme; light bg + dark text in dark theme.
127
135
  &--offline {
128
136
  --wr-alert-bg: var(--wr-color-on-surface);
129
- --wr-alert-border: var(--wr-color-on-surface);
130
137
  --wr-alert-title: var(--wr-color-surface);
131
138
  --wr-alert-message: var(--wr-color-surface);
132
139
  --wr-alert-close: var(--wr-color-surface);
@@ -81,6 +81,31 @@
81
81
 
82
82
  // Outlined — transparent fill, colored border + text. The inset ring
83
83
  // replaces the solid background, so padding stays identical.
84
+ //
85
+ // The ring is deliberately NOT `currentcolor` once an intent is on the host.
86
+ // The label sits on `-ink`, which is calibrated to 5.0:1 and must not move —
87
+ // so a ring drawn in the text colour is a hairline at full label strength
88
+ // wrapped around text of exactly that strength, and the two cannot be
89
+ // separated while they share one value. `-soft-border` is the same intent at
90
+ // 0.3 alpha: the theme's canonical hairline, already per intent and already
91
+ // theme-correct through the `-rgb` channels. `wr-tag--outlined` draws the same
92
+ // ring from the same token; the tag keeps its 6% fill, because a tag is a
93
+ // chip you can click and a badge is a label you cannot.
94
+ //
95
+ // The soft trio covers the seven CHROMATIC intents, so `light` and `dark` have
96
+ // no `-soft-border` and the `var()` carries the token's own recipe as its
97
+ // fallback. That fallback is load-bearing twice over: an undefined custom
98
+ // property with no fallback invalidates the whole declaration, which would
99
+ // leave those two badges with no ring at all rather than a soft one — and
100
+ // 0.3 alpha is what keeps `dark` in the same family as the other eight
101
+ // instead of the only ring still drawn at full label strength, which is the
102
+ // weight this rule exists to stop drawing.
103
+ //
104
+ // `light` is the one intent the recipe cannot serve: it is a surface tone by
105
+ // definition, a hair off the page in either theme, so 30% of it over the page
106
+ // is nothing. At FULL strength it is `--wr-color-outline` — the hairline every
107
+ // bordered surface in the library already draws — so it is reached by that
108
+ // name, after the loop, rather than by an alpha that happens to land there.
84
109
  &--outlined {
85
110
  background-color: transparent;
86
111
  box-shadow: inset 0 0 0 1px currentcolor;
@@ -88,7 +113,12 @@
88
113
  @each $name in theme.$colors {
89
114
  &.wr-badge--#{$name} {
90
115
  color: var(--wr-color-#{$name}-ink);
116
+ box-shadow: inset 0 0 0 1px var(--wr-color-#{$name}-soft-border, rgba(var(--wr-color-#{$name}-rgb), 0.3));
91
117
  }
92
118
  }
119
+
120
+ &.wr-badge--light {
121
+ box-shadow: inset 0 0 0 1px var(--wr-color-outline);
122
+ }
93
123
  }
94
124
  }
@@ -74,10 +74,17 @@
74
74
  --wr-tag-bg: var(--wr-color-#{$name});
75
75
  --wr-tag-border: var(--wr-color-#{$name});
76
76
 
77
+ // The ring reads from `-soft-border` rather than a hand-rolled alpha, so
78
+ // it is the same hairline `wr-badge--outlined` draws — one alpha in one
79
+ // place, which is the reason the soft trio exists. 0.25 -> 0.30 is the
80
+ // whole visual change here. The 6% fill stays, and that is the one place
81
+ // the two deliberately differ: a tag is a chip you can click, hover and
82
+ // dismiss, so it keeps a body the badge has none of. `light` and `dark`
83
+ // fall back exactly as the badge does — see the note there.
77
84
  &.wr-tag--outlined {
78
85
  --wr-tag-color: var(--wr-color-#{$name}-ink);
79
86
  --wr-tag-bg: rgba(var(--wr-color-#{$name}-rgb), 0.06);
80
- --wr-tag-border: rgba(var(--wr-color-#{$name}-rgb), 0.25);
87
+ --wr-tag-border: var(--wr-color-#{$name}-soft-border, rgba(var(--wr-color-#{$name}-rgb), 0.3));
81
88
  }
82
89
 
83
90
  &.wr-tag--transparent {
@@ -87,4 +94,11 @@
87
94
  }
88
95
  }
89
96
  }
97
+
98
+ // `light` outlined, after the loop for the same reason the badge carries the
99
+ // same rule: 30% of a surface tone is not a line. At full strength it IS
100
+ // `--wr-color-outline`, which is already this component's default border.
101
+ &--light.wr-tag--outlined {
102
+ --wr-tag-border: var(--wr-color-outline);
103
+ }
90
104
  }
@@ -1,4 +1,4 @@
1
1
  // Component-scoped, but the lib uses `ViewEncapsulation.None` everywhere so
2
2
  // the selector starts with `.wr-border-glow` — the same as the umbrella
3
3
  // stylesheet entry. Importing the lib styles or just this file works.
4
- @forward './styles';
4
+ @forward './styles/rules';
@@ -1,233 +1,15 @@
1
- // Pull the whole theme so a standalone `@use 'ngwr/<name>'` brings in every
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
- // Cursor-tracked border glow — ports the reactbits.dev BorderGlow effect.
7
- // All visual state is driven by two custom properties the component writes:
8
- // --wr-border-glow-edge-proximity 0..100, scales with pointer-to-edge distance
9
- // --wr-border-glow-angle 0deg..360deg, pointer-from-centre angle
10
- // Plus a colour/geometry bag set once from inputs (see border-glow.ts).
11
-
12
- .wr-border-glow {
13
- --wr-border-glow-edge-proximity: 0;
14
- --wr-border-glow-angle: 45deg;
15
- // Theme-default halo (overridden inline when `[glowColor]` is set):
16
- // deep amber that reads on white. Dark theme swaps to the pale pastel.
17
- --wr-border-glow-color: hsl(40deg 90% 45% / 100%);
18
- --wr-border-glow-color-60: hsl(40deg 90% 45% / 60%);
19
- --wr-border-glow-color-50: hsl(40deg 90% 45% / 50%);
20
- --wr-border-glow-color-40: hsl(40deg 90% 45% / 40%);
21
- --wr-border-glow-color-30: hsl(40deg 90% 45% / 30%);
22
- --wr-border-glow-color-20: hsl(40deg 90% 45% / 20%);
23
- --wr-border-glow-color-10: hsl(40deg 90% 45% / 10%);
24
- // Theme-default mesh palette (overridden inline when `[colors]` is set):
25
- // deep tones that read on white. Dark theme restores the pastels below.
26
- --wr-border-glow-gradient-one: radial-gradient(at 80% 55%, hsl(268deg 80% 50%) 0px, transparent 50%);
27
- --wr-border-glow-gradient-two: radial-gradient(at 69% 34%, hsl(349deg 85% 52%) 0px, transparent 50%);
28
- --wr-border-glow-gradient-three: radial-gradient(at 8% 6%, hsl(136deg 70% 38%) 0px, transparent 50%);
29
- --wr-border-glow-gradient-four: radial-gradient(at 41% 38%, hsl(192deg 90% 40%) 0px, transparent 50%);
30
- --wr-border-glow-gradient-five: radial-gradient(at 86% 85%, hsl(186deg 90% 38%) 0px, transparent 50%);
31
- --wr-border-glow-gradient-six: radial-gradient(at 82% 18%, hsl(40deg 95% 45%) 0px, transparent 50%);
32
- --wr-border-glow-gradient-seven: radial-gradient(at 51% 4%, hsl(12deg 90% 50%) 0px, transparent 50%);
33
- --wr-border-glow-gradient-base: linear-gradient(hsl(262deg 70% 50%) 0 100%);
34
- --wr-border-glow-edge-sensitivity: 30;
35
- --wr-border-glow-color-sensitivity: calc(var(--wr-border-glow-edge-sensitivity) + 20);
36
- --wr-border-glow-radius: 28px;
37
- --wr-border-glow-padding: 40px;
38
- --wr-border-glow-cone-spread: 25;
39
-
40
- position: relative;
41
- display: grid;
42
- border-radius: var(--wr-border-glow-radius);
43
- background: var(--wr-border-glow-bg, var(--wr-color-surface, #fff));
44
- overflow: visible;
45
- isolation: isolate;
46
- transform: translate3d(0, 0, 0.01px); // create a new layer to keep blends tidy
47
- // The faint static outline uses `box-shadow inset` instead of `border:` —
48
- // CSS borders + `border-radius` leave 1px subpixel notches at the corners
49
- // where the mask layers meet the curve, but inset shadows hug the radius
50
- // pixel-perfect.
51
- box-shadow: inset 0 0 0 1px var(--wr-border-glow-outline, var(--wr-color-outline, rgb(255 255 255 / 15%)));
52
-
53
- &::before,
54
- &::after,
55
- & > .wr-border-glow__edge {
56
- content: '';
57
- position: absolute;
58
- inset: 0;
59
- border-radius: inherit;
60
- transition: opacity 0.25s ease-out;
61
- z-index: -1;
62
- }
63
-
64
- // Hide the glow layers when the cursor isn't engaged AND the one-shot
65
- // sweep isn't running.
66
- &:not(:hover):not(.wr-border-glow--sweeping) {
67
- &::before,
68
- &::after,
69
- & > .wr-border-glow__edge {
70
- opacity: 0;
71
- transition: opacity 0.75s ease-in-out;
72
- }
73
- }
74
-
75
- // Coloured mesh-gradient slice of the border (the visible "cone" along
76
- // the perimeter under the cursor).
77
- &::before {
78
- border: 1px solid transparent;
79
- background:
80
- linear-gradient(var(--wr-border-glow-bg, var(--wr-color-surface, #fff)) 0 100%) padding-box,
81
- linear-gradient(rgb(255 255 255 / 0%) 0 100%) border-box,
82
- var(--wr-border-glow-gradient-one, radial-gradient(at 80% 55%, hsl(268deg 100% 76%) 0px, transparent 50%))
83
- border-box,
84
- var(--wr-border-glow-gradient-two, radial-gradient(at 69% 34%, hsl(349deg 100% 74%) 0px, transparent 50%))
85
- border-box,
86
- var(--wr-border-glow-gradient-three, radial-gradient(at 8% 6%, hsl(136deg 100% 78%) 0px, transparent 50%))
87
- border-box,
88
- var(--wr-border-glow-gradient-four, radial-gradient(at 41% 38%, hsl(192deg 100% 64%) 0px, transparent 50%))
89
- border-box,
90
- var(--wr-border-glow-gradient-five, radial-gradient(at 86% 85%, hsl(186deg 100% 74%) 0px, transparent 50%))
91
- border-box,
92
- var(--wr-border-glow-gradient-six, radial-gradient(at 82% 18%, hsl(52deg 100% 65%) 0px, transparent 50%))
93
- border-box,
94
- var(--wr-border-glow-gradient-seven, radial-gradient(at 51% 4%, hsl(12deg 100% 72%) 0px, transparent 50%))
95
- border-box,
96
- var(--wr-border-glow-gradient-base, linear-gradient(#c299ff 0 100%)) border-box;
97
-
98
- opacity: calc(
99
- (var(--wr-border-glow-edge-proximity) - var(--wr-border-glow-color-sensitivity)) /
100
- (100 - var(--wr-border-glow-color-sensitivity))
101
- );
102
-
103
- mask-image: conic-gradient(
104
- from var(--wr-border-glow-angle) at center,
105
- black calc(var(--wr-border-glow-cone-spread) * 1%),
106
- transparent calc((var(--wr-border-glow-cone-spread) + 15) * 1%),
107
- transparent calc((100 - var(--wr-border-glow-cone-spread) - 15) * 1%),
108
- black calc((100 - var(--wr-border-glow-cone-spread)) * 1%)
109
- );
110
- }
111
-
112
- // Soft interior bloom — same mesh, blended with the card content.
113
- &::after {
114
- border: 1px solid transparent;
115
- background:
116
- var(--wr-border-glow-gradient-one, radial-gradient(at 80% 55%, hsl(268deg 100% 76%) 0px, transparent 50%))
117
- padding-box,
118
- var(--wr-border-glow-gradient-two, radial-gradient(at 69% 34%, hsl(349deg 100% 74%) 0px, transparent 50%))
119
- padding-box,
120
- var(--wr-border-glow-gradient-three, radial-gradient(at 8% 6%, hsl(136deg 100% 78%) 0px, transparent 50%))
121
- padding-box,
122
- var(--wr-border-glow-gradient-four, radial-gradient(at 41% 38%, hsl(192deg 100% 64%) 0px, transparent 50%))
123
- padding-box,
124
- var(--wr-border-glow-gradient-five, radial-gradient(at 86% 85%, hsl(186deg 100% 74%) 0px, transparent 50%))
125
- padding-box,
126
- var(--wr-border-glow-gradient-six, radial-gradient(at 82% 18%, hsl(52deg 100% 65%) 0px, transparent 50%))
127
- padding-box,
128
- var(--wr-border-glow-gradient-seven, radial-gradient(at 51% 4%, hsl(12deg 100% 72%) 0px, transparent 50%))
129
- padding-box,
130
- var(--wr-border-glow-gradient-base, linear-gradient(#c299ff 0 100%)) padding-box;
131
-
132
- mask-image:
133
- linear-gradient(to bottom, black, black), radial-gradient(ellipse at 50% 50%, black 40%, transparent 65%),
134
- radial-gradient(ellipse at 66% 66%, black 5%, transparent 40%),
135
- radial-gradient(ellipse at 33% 33%, black 5%, transparent 40%),
136
- radial-gradient(ellipse at 66% 33%, black 5%, transparent 40%),
137
- radial-gradient(ellipse at 33% 66%, black 5%, transparent 40%),
138
- conic-gradient(from var(--wr-border-glow-angle) at center, transparent 5%, black 15%, black 85%, transparent 95%);
139
- mask-composite: subtract, add, add, add, add, add;
140
-
141
- // `--wr-border-glow-fill-scale` keeps the interior bloom subtle on
142
- // light surfaces — at full strength the multiply wash darkens the
143
- // whole card and the cone's surface wedge shows against it.
144
- opacity: calc(
145
- var(--wr-border-glow-fill-opacity, 0.5) * var(--wr-border-glow-fill-scale, 0.25) *
146
- (var(--wr-border-glow-edge-proximity) - var(--wr-border-glow-color-sensitivity)) /
147
- (100 - var(--wr-border-glow-color-sensitivity))
148
- );
149
- mix-blend-mode: var(--wr-border-glow-fill-blend, multiply);
150
- }
151
-
152
- // Outer halo — stacked box-shadows on a separate child so we can mask
153
- // the shadows to the cone without affecting the host's content.
154
- & > .wr-border-glow__edge {
155
- inset: calc(var(--wr-border-glow-padding) * -1);
156
- pointer-events: none;
157
- z-index: 1;
158
-
159
- mask-image: conic-gradient(
160
- from var(--wr-border-glow-angle) at center,
161
- black 2.5%,
162
- transparent 10%,
163
- transparent 90%,
164
- black 97.5%
165
- );
166
- opacity: calc(
167
- (var(--wr-border-glow-edge-proximity) - var(--wr-border-glow-edge-sensitivity)) /
168
- (100 - var(--wr-border-glow-edge-sensitivity))
169
- );
170
- // `plus-lighter` saturates to white on a light page — light theme
171
- // paints the halo as plain colored shadows instead (see block below).
172
- mix-blend-mode: var(--wr-border-glow-halo-blend, normal);
173
-
174
- &::before {
175
- content: '';
176
- position: absolute;
177
- inset: var(--wr-border-glow-padding);
178
- border-radius: inherit;
179
- // Light theme keeps only the outward halo — the inset half washes
180
- // amber over the card interior without additive blending. Dark
181
- // restores the full reactbits stack (see block below).
182
- box-shadow: var(
183
- --wr-border-glow-edge-shadow,
184
- inset 0 0 0 1px var(--wr-border-glow-color, hsl(40deg 80% 80% / 100%)),
185
- 0 0 1px 0 var(--wr-border-glow-color-60, hsl(40deg 80% 80% / 60%)),
186
- 0 0 3px 0 var(--wr-border-glow-color-50, hsl(40deg 80% 80% / 50%)),
187
- 0 0 6px 0 var(--wr-border-glow-color-40, hsl(40deg 80% 80% / 40%)),
188
- 0 0 15px 0 var(--wr-border-glow-color-30, hsl(40deg 80% 80% / 30%)),
189
- 0 0 25px 2px var(--wr-border-glow-color-20, hsl(40deg 80% 80% / 20%)),
190
- 0 0 50px 2px var(--wr-border-glow-color-10, hsl(40deg 80% 80% / 10%))
191
- );
192
- }
193
- }
194
-
195
- &__inner {
196
- position: relative;
197
- z-index: 1;
198
- display: flex;
199
- flex-direction: column;
200
- }
201
- }
202
-
203
- // Dark theme: restore the reactbits look — pale halo + additive blends.
204
- [data-theme='dark'] .wr-border-glow {
205
- --wr-border-glow-outline: rgb(255 255 255 / 15%);
206
- --wr-border-glow-halo-blend: plus-lighter;
207
- --wr-border-glow-fill-blend: soft-light;
208
- --wr-border-glow-fill-scale: 1;
209
- /* stylelint-disable-next-line */
210
- --wr-border-glow-edge-shadow:
211
- inset 0 0 0 1px var(--wr-border-glow-color), inset 0 0 1px 0 var(--wr-border-glow-color-60),
212
- inset 0 0 3px 0 var(--wr-border-glow-color-50), inset 0 0 6px 0 var(--wr-border-glow-color-40),
213
- inset 0 0 15px 0 var(--wr-border-glow-color-30), inset 0 0 25px 2px var(--wr-border-glow-color-20),
214
- inset 0 0 50px 2px var(--wr-border-glow-color-10), 0 0 1px 0 var(--wr-border-glow-color-60),
215
- 0 0 3px 0 var(--wr-border-glow-color-50), 0 0 6px 0 var(--wr-border-glow-color-40),
216
- 0 0 15px 0 var(--wr-border-glow-color-30), 0 0 25px 2px var(--wr-border-glow-color-20),
217
- 0 0 50px 2px var(--wr-border-glow-color-10);
218
- --wr-border-glow-color: hsl(40deg 80% 80% / 100%);
219
- --wr-border-glow-color-60: hsl(40deg 80% 80% / 60%);
220
- --wr-border-glow-color-50: hsl(40deg 80% 80% / 50%);
221
- --wr-border-glow-color-40: hsl(40deg 80% 80% / 40%);
222
- --wr-border-glow-color-30: hsl(40deg 80% 80% / 30%);
223
- --wr-border-glow-color-20: hsl(40deg 80% 80% / 20%);
224
- --wr-border-glow-color-10: hsl(40deg 80% 80% / 10%);
225
- --wr-border-glow-gradient-one: radial-gradient(at 80% 55%, hsl(268deg 100% 76%) 0px, transparent 50%);
226
- --wr-border-glow-gradient-two: radial-gradient(at 69% 34%, hsl(349deg 100% 74%) 0px, transparent 50%);
227
- --wr-border-glow-gradient-three: radial-gradient(at 8% 6%, hsl(136deg 100% 78%) 0px, transparent 50%);
228
- --wr-border-glow-gradient-four: radial-gradient(at 41% 38%, hsl(192deg 100% 64%) 0px, transparent 50%);
229
- --wr-border-glow-gradient-five: radial-gradient(at 86% 85%, hsl(186deg 100% 74%) 0px, transparent 50%);
230
- --wr-border-glow-gradient-six: radial-gradient(at 82% 18%, hsl(52deg 100% 65%) 0px, transparent 50%);
231
- --wr-border-glow-gradient-seven: radial-gradient(at 51% 4%, hsl(12deg 100% 72%) 0px, transparent 50%);
232
- --wr-border-glow-gradient-base: linear-gradient(#c299ff 0 100%);
233
- }
1
+ // Public Sass entry for `@use 'ngwr/border-glow'`.
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
+ // `border-glow.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. `border-glow.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,228 @@
1
+ // Cursor-tracked border glow — ports the reactbits.dev BorderGlow effect.
2
+ // All visual state is driven by two custom properties the component writes:
3
+ // --wr-border-glow-edge-proximity 0..100, scales with pointer-to-edge distance
4
+ // --wr-border-glow-angle 0deg..360deg, pointer-from-centre angle
5
+ // Plus a colour/geometry bag set once from inputs (see border-glow.ts).
6
+
7
+ .wr-border-glow {
8
+ --wr-border-glow-edge-proximity: 0;
9
+ --wr-border-glow-angle: 45deg;
10
+ // Theme-default halo (overridden inline when `[glowColor]` is set):
11
+ // deep amber that reads on white. Dark theme swaps to the pale pastel.
12
+ --wr-border-glow-color: hsl(40deg 90% 45% / 100%);
13
+ --wr-border-glow-color-60: hsl(40deg 90% 45% / 60%);
14
+ --wr-border-glow-color-50: hsl(40deg 90% 45% / 50%);
15
+ --wr-border-glow-color-40: hsl(40deg 90% 45% / 40%);
16
+ --wr-border-glow-color-30: hsl(40deg 90% 45% / 30%);
17
+ --wr-border-glow-color-20: hsl(40deg 90% 45% / 20%);
18
+ --wr-border-glow-color-10: hsl(40deg 90% 45% / 10%);
19
+ // Theme-default mesh palette (overridden inline when `[colors]` is set):
20
+ // deep tones that read on white. Dark theme restores the pastels below.
21
+ --wr-border-glow-gradient-one: radial-gradient(at 80% 55%, hsl(268deg 80% 50%) 0px, transparent 50%);
22
+ --wr-border-glow-gradient-two: radial-gradient(at 69% 34%, hsl(349deg 85% 52%) 0px, transparent 50%);
23
+ --wr-border-glow-gradient-three: radial-gradient(at 8% 6%, hsl(136deg 70% 38%) 0px, transparent 50%);
24
+ --wr-border-glow-gradient-four: radial-gradient(at 41% 38%, hsl(192deg 90% 40%) 0px, transparent 50%);
25
+ --wr-border-glow-gradient-five: radial-gradient(at 86% 85%, hsl(186deg 90% 38%) 0px, transparent 50%);
26
+ --wr-border-glow-gradient-six: radial-gradient(at 82% 18%, hsl(40deg 95% 45%) 0px, transparent 50%);
27
+ --wr-border-glow-gradient-seven: radial-gradient(at 51% 4%, hsl(12deg 90% 50%) 0px, transparent 50%);
28
+ --wr-border-glow-gradient-base: linear-gradient(hsl(262deg 70% 50%) 0 100%);
29
+ --wr-border-glow-edge-sensitivity: 30;
30
+ --wr-border-glow-color-sensitivity: calc(var(--wr-border-glow-edge-sensitivity) + 20);
31
+ --wr-border-glow-radius: 28px;
32
+ --wr-border-glow-padding: 40px;
33
+ --wr-border-glow-cone-spread: 25;
34
+
35
+ position: relative;
36
+ display: grid;
37
+ border-radius: var(--wr-border-glow-radius);
38
+ background: var(--wr-border-glow-bg, var(--wr-color-surface, #fff));
39
+ overflow: visible;
40
+ isolation: isolate;
41
+ transform: translate3d(0, 0, 0.01px); // create a new layer to keep blends tidy
42
+ // The faint static outline uses `box-shadow inset` instead of `border:` —
43
+ // CSS borders + `border-radius` leave 1px subpixel notches at the corners
44
+ // where the mask layers meet the curve, but inset shadows hug the radius
45
+ // pixel-perfect.
46
+ box-shadow: inset 0 0 0 1px var(--wr-border-glow-outline, var(--wr-color-outline, rgb(255 255 255 / 15%)));
47
+
48
+ &::before,
49
+ &::after,
50
+ & > .wr-border-glow__edge {
51
+ content: '';
52
+ position: absolute;
53
+ inset: 0;
54
+ border-radius: inherit;
55
+ transition: opacity 0.25s ease-out;
56
+ z-index: -1;
57
+ }
58
+
59
+ // Hide the glow layers when the cursor isn't engaged AND the one-shot
60
+ // sweep isn't running.
61
+ &:not(:hover):not(.wr-border-glow--sweeping) {
62
+ &::before,
63
+ &::after,
64
+ & > .wr-border-glow__edge {
65
+ opacity: 0;
66
+ transition: opacity 0.75s ease-in-out;
67
+ }
68
+ }
69
+
70
+ // Coloured mesh-gradient slice of the border (the visible "cone" along
71
+ // the perimeter under the cursor).
72
+ &::before {
73
+ border: 1px solid transparent;
74
+ background:
75
+ linear-gradient(var(--wr-border-glow-bg, var(--wr-color-surface, #fff)) 0 100%) padding-box,
76
+ linear-gradient(rgb(255 255 255 / 0%) 0 100%) border-box,
77
+ var(--wr-border-glow-gradient-one, radial-gradient(at 80% 55%, hsl(268deg 100% 76%) 0px, transparent 50%))
78
+ border-box,
79
+ var(--wr-border-glow-gradient-two, radial-gradient(at 69% 34%, hsl(349deg 100% 74%) 0px, transparent 50%))
80
+ border-box,
81
+ var(--wr-border-glow-gradient-three, radial-gradient(at 8% 6%, hsl(136deg 100% 78%) 0px, transparent 50%))
82
+ border-box,
83
+ var(--wr-border-glow-gradient-four, radial-gradient(at 41% 38%, hsl(192deg 100% 64%) 0px, transparent 50%))
84
+ border-box,
85
+ var(--wr-border-glow-gradient-five, radial-gradient(at 86% 85%, hsl(186deg 100% 74%) 0px, transparent 50%))
86
+ border-box,
87
+ var(--wr-border-glow-gradient-six, radial-gradient(at 82% 18%, hsl(52deg 100% 65%) 0px, transparent 50%))
88
+ border-box,
89
+ var(--wr-border-glow-gradient-seven, radial-gradient(at 51% 4%, hsl(12deg 100% 72%) 0px, transparent 50%))
90
+ border-box,
91
+ var(--wr-border-glow-gradient-base, linear-gradient(#c299ff 0 100%)) border-box;
92
+
93
+ opacity: calc(
94
+ (var(--wr-border-glow-edge-proximity) - var(--wr-border-glow-color-sensitivity)) /
95
+ (100 - var(--wr-border-glow-color-sensitivity))
96
+ );
97
+
98
+ mask-image: conic-gradient(
99
+ from var(--wr-border-glow-angle) at center,
100
+ black calc(var(--wr-border-glow-cone-spread) * 1%),
101
+ transparent calc((var(--wr-border-glow-cone-spread) + 15) * 1%),
102
+ transparent calc((100 - var(--wr-border-glow-cone-spread) - 15) * 1%),
103
+ black calc((100 - var(--wr-border-glow-cone-spread)) * 1%)
104
+ );
105
+ }
106
+
107
+ // Soft interior bloom — same mesh, blended with the card content.
108
+ &::after {
109
+ border: 1px solid transparent;
110
+ background:
111
+ var(--wr-border-glow-gradient-one, radial-gradient(at 80% 55%, hsl(268deg 100% 76%) 0px, transparent 50%))
112
+ padding-box,
113
+ var(--wr-border-glow-gradient-two, radial-gradient(at 69% 34%, hsl(349deg 100% 74%) 0px, transparent 50%))
114
+ padding-box,
115
+ var(--wr-border-glow-gradient-three, radial-gradient(at 8% 6%, hsl(136deg 100% 78%) 0px, transparent 50%))
116
+ padding-box,
117
+ var(--wr-border-glow-gradient-four, radial-gradient(at 41% 38%, hsl(192deg 100% 64%) 0px, transparent 50%))
118
+ padding-box,
119
+ var(--wr-border-glow-gradient-five, radial-gradient(at 86% 85%, hsl(186deg 100% 74%) 0px, transparent 50%))
120
+ padding-box,
121
+ var(--wr-border-glow-gradient-six, radial-gradient(at 82% 18%, hsl(52deg 100% 65%) 0px, transparent 50%))
122
+ padding-box,
123
+ var(--wr-border-glow-gradient-seven, radial-gradient(at 51% 4%, hsl(12deg 100% 72%) 0px, transparent 50%))
124
+ padding-box,
125
+ var(--wr-border-glow-gradient-base, linear-gradient(#c299ff 0 100%)) padding-box;
126
+
127
+ mask-image:
128
+ linear-gradient(to bottom, black, black), radial-gradient(ellipse at 50% 50%, black 40%, transparent 65%),
129
+ radial-gradient(ellipse at 66% 66%, black 5%, transparent 40%),
130
+ radial-gradient(ellipse at 33% 33%, black 5%, transparent 40%),
131
+ radial-gradient(ellipse at 66% 33%, black 5%, transparent 40%),
132
+ radial-gradient(ellipse at 33% 66%, black 5%, transparent 40%),
133
+ conic-gradient(from var(--wr-border-glow-angle) at center, transparent 5%, black 15%, black 85%, transparent 95%);
134
+ mask-composite: subtract, add, add, add, add, add;
135
+
136
+ // `--wr-border-glow-fill-scale` keeps the interior bloom subtle on
137
+ // light surfaces — at full strength the multiply wash darkens the
138
+ // whole card and the cone's surface wedge shows against it.
139
+ opacity: calc(
140
+ var(--wr-border-glow-fill-opacity, 0.5) * var(--wr-border-glow-fill-scale, 0.25) *
141
+ (var(--wr-border-glow-edge-proximity) - var(--wr-border-glow-color-sensitivity)) /
142
+ (100 - var(--wr-border-glow-color-sensitivity))
143
+ );
144
+ mix-blend-mode: var(--wr-border-glow-fill-blend, multiply);
145
+ }
146
+
147
+ // Outer halo — stacked box-shadows on a separate child so we can mask
148
+ // the shadows to the cone without affecting the host's content.
149
+ & > .wr-border-glow__edge {
150
+ inset: calc(var(--wr-border-glow-padding) * -1);
151
+ pointer-events: none;
152
+ z-index: 1;
153
+
154
+ mask-image: conic-gradient(
155
+ from var(--wr-border-glow-angle) at center,
156
+ black 2.5%,
157
+ transparent 10%,
158
+ transparent 90%,
159
+ black 97.5%
160
+ );
161
+ opacity: calc(
162
+ (var(--wr-border-glow-edge-proximity) - var(--wr-border-glow-edge-sensitivity)) /
163
+ (100 - var(--wr-border-glow-edge-sensitivity))
164
+ );
165
+ // `plus-lighter` saturates to white on a light page — light theme
166
+ // paints the halo as plain colored shadows instead (see block below).
167
+ mix-blend-mode: var(--wr-border-glow-halo-blend, normal);
168
+
169
+ &::before {
170
+ content: '';
171
+ position: absolute;
172
+ inset: var(--wr-border-glow-padding);
173
+ border-radius: inherit;
174
+ // Light theme keeps only the outward halo — the inset half washes
175
+ // amber over the card interior without additive blending. Dark
176
+ // restores the full reactbits stack (see block below).
177
+ box-shadow: var(
178
+ --wr-border-glow-edge-shadow,
179
+ inset 0 0 0 1px var(--wr-border-glow-color, hsl(40deg 80% 80% / 100%)),
180
+ 0 0 1px 0 var(--wr-border-glow-color-60, hsl(40deg 80% 80% / 60%)),
181
+ 0 0 3px 0 var(--wr-border-glow-color-50, hsl(40deg 80% 80% / 50%)),
182
+ 0 0 6px 0 var(--wr-border-glow-color-40, hsl(40deg 80% 80% / 40%)),
183
+ 0 0 15px 0 var(--wr-border-glow-color-30, hsl(40deg 80% 80% / 30%)),
184
+ 0 0 25px 2px var(--wr-border-glow-color-20, hsl(40deg 80% 80% / 20%)),
185
+ 0 0 50px 2px var(--wr-border-glow-color-10, hsl(40deg 80% 80% / 10%))
186
+ );
187
+ }
188
+ }
189
+
190
+ &__inner {
191
+ position: relative;
192
+ z-index: 1;
193
+ display: flex;
194
+ flex-direction: column;
195
+ }
196
+ }
197
+
198
+ // Dark theme: restore the reactbits look — pale halo + additive blends.
199
+ [data-theme='dark'] .wr-border-glow {
200
+ --wr-border-glow-outline: rgb(255 255 255 / 15%);
201
+ --wr-border-glow-halo-blend: plus-lighter;
202
+ --wr-border-glow-fill-blend: soft-light;
203
+ --wr-border-glow-fill-scale: 1;
204
+ /* stylelint-disable-next-line */
205
+ --wr-border-glow-edge-shadow:
206
+ inset 0 0 0 1px var(--wr-border-glow-color), inset 0 0 1px 0 var(--wr-border-glow-color-60),
207
+ inset 0 0 3px 0 var(--wr-border-glow-color-50), inset 0 0 6px 0 var(--wr-border-glow-color-40),
208
+ inset 0 0 15px 0 var(--wr-border-glow-color-30), inset 0 0 25px 2px var(--wr-border-glow-color-20),
209
+ inset 0 0 50px 2px var(--wr-border-glow-color-10), 0 0 1px 0 var(--wr-border-glow-color-60),
210
+ 0 0 3px 0 var(--wr-border-glow-color-50), 0 0 6px 0 var(--wr-border-glow-color-40),
211
+ 0 0 15px 0 var(--wr-border-glow-color-30), 0 0 25px 2px var(--wr-border-glow-color-20),
212
+ 0 0 50px 2px var(--wr-border-glow-color-10);
213
+ --wr-border-glow-color: hsl(40deg 80% 80% / 100%);
214
+ --wr-border-glow-color-60: hsl(40deg 80% 80% / 60%);
215
+ --wr-border-glow-color-50: hsl(40deg 80% 80% / 50%);
216
+ --wr-border-glow-color-40: hsl(40deg 80% 80% / 40%);
217
+ --wr-border-glow-color-30: hsl(40deg 80% 80% / 30%);
218
+ --wr-border-glow-color-20: hsl(40deg 80% 80% / 20%);
219
+ --wr-border-glow-color-10: hsl(40deg 80% 80% / 10%);
220
+ --wr-border-glow-gradient-one: radial-gradient(at 80% 55%, hsl(268deg 100% 76%) 0px, transparent 50%);
221
+ --wr-border-glow-gradient-two: radial-gradient(at 69% 34%, hsl(349deg 100% 74%) 0px, transparent 50%);
222
+ --wr-border-glow-gradient-three: radial-gradient(at 8% 6%, hsl(136deg 100% 78%) 0px, transparent 50%);
223
+ --wr-border-glow-gradient-four: radial-gradient(at 41% 38%, hsl(192deg 100% 64%) 0px, transparent 50%);
224
+ --wr-border-glow-gradient-five: radial-gradient(at 86% 85%, hsl(186deg 100% 74%) 0px, transparent 50%);
225
+ --wr-border-glow-gradient-six: radial-gradient(at 82% 18%, hsl(52deg 100% 65%) 0px, transparent 50%);
226
+ --wr-border-glow-gradient-seven: radial-gradient(at 51% 4%, hsl(12deg 100% 72%) 0px, transparent 50%);
227
+ --wr-border-glow-gradient-base: linear-gradient(#c299ff 0 100%);
228
+ }
@@ -1 +1 @@
1
- @forward './styles';
1
+ @forward './styles/rules';