@bsuite/theme 0.4.2 → 0.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bsuite/theme",
3
- "version": "0.4.2",
3
+ "version": "0.5.0",
4
4
  "type": "module",
5
5
  "license": "UNLICENSED",
6
6
  "publishConfig": {
@@ -164,6 +164,11 @@
164
164
  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.08);
165
165
  --shadow-md: 0 4px 6px oklch(0 0 0 / 0.10), 0 2px 4px oklch(0 0 0 / 0.06);
166
166
  --shadow-lg: 0 10px 15px oklch(0 0 0 / 0.10), 0 4px 6px oklch(0 0 0 / 0.05);
167
+
168
+ /* Card glow is a dark-mode-only device (see .dark below); light mode
169
+ stays border-only, consistent with the corporate "no neon glow" rule. */
170
+ --glow-card: none;
171
+ --glow-card-hover: none;
167
172
  }
168
173
 
169
174
  /* ============================================================
@@ -206,4 +211,20 @@
206
211
  --muted-foreground:var(--braden-dark-text-muted);
207
212
  --border: oklch(0.30 0.020 250);
208
213
  --input: oklch(0.30 0.020 250);
214
+
215
+ /*
216
+ * Card glow — Braden dark mode gets a restrained gold separation glow,
217
+ * NOT the D2C neon treatment (no cyan, lower alpha, same two-layer
218
+ * ring+halo shape for consumer-code parity with @bsuite/theme's D2C
219
+ * --glow-card). Source is --app-accent (Braden Gold), which is
220
+ * inherited from :root since this file does not rebind it per-mode.
221
+ * Deliberately more subdued than D2C to honour the "corporate
222
+ * subtle, no neon glow" shadow philosophy above, adapted for dark UI
223
+ * where SOME separation glow is still needed for surface legibility.
224
+ */
225
+ --card-glow-source: var(--app-accent, var(--braden-gold-500));
226
+ --glow-card: 0 0 0 1px color-mix(in oklch, var(--card-glow-source) 18%, transparent),
227
+ 0 0 10px -4px color-mix(in oklch, var(--card-glow-source) 20%, transparent);
228
+ --glow-card-hover: 0 0 0 1px color-mix(in oklch, var(--card-glow-source) 26%, transparent),
229
+ 0 0 14px -4px color-mix(in oklch, var(--card-glow-source) 28%, transparent);
209
230
  }
@@ -77,8 +77,23 @@
77
77
  /* ===== Neon glow helpers ===== */
78
78
  --glow-button: 0 0 20px oklch(0.769 0.132 191.7 / 0.3);
79
79
  --glow-button-hover: 0 0 30px oklch(0.769 0.132 191.7 / 0.5);
80
- --glow-card: 0 0 15px oklch(0.769 0.132 191.7 / 0.08);
81
- --glow-card-hover: 0 0 25px oklch(0.769 0.132 191.7 / 0.15);
80
+
81
+ /*
82
+ * Card glow — subtle neon separation for card surfaces, dark mode only.
83
+ * Derived from the app's accent colour (--app-accent, falling back to
84
+ * the shared --role-accent default, matching the live vars.css) so
85
+ * per-tenant
86
+ * BrandingProvider overrides and per-app brand accents (Conduit green,
87
+ * R80.3 amber, etc.) automatically re-colour the glow. Two layers:
88
+ * a 1px accent ring (edge definition, replaces a hard border) plus a
89
+ * soft negative-spread halo (ambient separation). Kept subtle by
90
+ * design — this is surface separation, not a decorative outline.
91
+ */
92
+ --card-glow-source: var(--app-accent, var(--role-accent));
93
+ --glow-card: 0 0 0 1px color-mix(in oklch, var(--card-glow-source) 30%, transparent),
94
+ 0 0 14px -4px color-mix(in oklch, var(--card-glow-source) 35%, transparent);
95
+ --glow-card-hover: 0 0 0 1px color-mix(in oklch, var(--card-glow-source) 42%, transparent),
96
+ 0 0 20px -4px color-mix(in oklch, var(--card-glow-source) 48%, transparent);
82
97
 
83
98
  /* ===== Button shadow ===== */
84
99
  --button-shadow: 0 0 20px oklch(0.769 0.132 191.7 / 0.3);
package/src/css/vars.css CHANGED
@@ -160,6 +160,16 @@
160
160
  --glow-strength: 0.4;
161
161
  --shadow-strength: 1;
162
162
 
163
+ /* ============================================================
164
+ CARD SURFACE GLOW — subtle neon separation, dark mode only.
165
+ Light mode keeps the existing border-only treatment (--role-border);
166
+ these resolve to `none` here so any consumer applying the utility
167
+ unconditionally (i.e. without a `dark:` guard) degrades safely.
168
+ ============================================================ */
169
+ --card-glow-source: var(--app-accent, var(--role-accent));
170
+ --glow-card: none;
171
+ --glow-card-hover: none;
172
+
163
173
  /* ============================================================
164
174
  SRGB FALLBACKS (for browsers without oklch support)
165
175
  Tested against Chrome 105-. Values are closest sRGB equivalents.
@@ -233,5 +243,22 @@
233
243
  --glow-strength: 0.6;
234
244
  --shadow-strength: 0.8;
235
245
 
246
+ /*
247
+ * Card glow — subtle neon separation for card surfaces, dark mode only.
248
+ * Derived from the app's accent colour (--app-accent, falling back to
249
+ * the shared --role-accent default) via color-mix() so per-tenant
250
+ * BrandingProvider overrides and per-app brand accents (Conduit green,
251
+ * R80.3 amber, etc.) automatically re-colour the glow. Two layers:
252
+ * a 1px accent ring (edge definition, replaces a hard border) plus a
253
+ * soft negative-spread halo (ambient separation). Kept subtle by
254
+ * design — this is surface separation, not a decorative outline.
255
+ */
256
+ --glow-card:
257
+ 0 0 0 1px color-mix(in oklch, var(--card-glow-source) 30%, transparent),
258
+ 0 0 14px -4px color-mix(in oklch, var(--card-glow-source) 35%, transparent);
259
+ --glow-card-hover:
260
+ 0 0 0 1px color-mix(in oklch, var(--card-glow-source) 42%, transparent),
261
+ 0 0 20px -4px color-mix(in oklch, var(--card-glow-source) 48%, transparent);
262
+
236
263
  /* Shadcn bridge picks up rebindings automatically via var() chain */
237
264
  }