@bagelink/vue 1.15.98 → 1.15.100

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/vue",
3
3
  "type": "module",
4
- "version": "1.15.98",
4
+ "version": "1.15.100",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Bagel Studio",
@@ -239,8 +239,9 @@ align-items: center;
239
239
  gap: 0.5rem;
240
240
  }
241
241
 
242
- .bagel-input input:disabled {
243
- background: #f5f5f5;
242
+ .bagel-input input:disabled,
243
+ .bagel-input textarea:disabled {
244
+ background: var(--input-disabled-bg);
244
245
  }
245
246
 
246
247
  .textInputIconWrap .bgl_icon-font {
@@ -17,6 +17,13 @@ interface Props {
17
17
  navLinks: LinkWithAction[]
18
18
  footerLinks?: LinkWithAction[]
19
19
  logo?: string
20
+ /** Optional dedicated logo for dark mode. When set, it replaces `logo`
21
+ * while `.bgl-dark-mode` is active. */
22
+ logoDark?: string
23
+ /** When no `logoDark` is provided, apply a filter that turns the logo white
24
+ * in dark mode. Set to `false` to keep the logo's original colors (e.g. a
25
+ * full-color logo that already reads on dark). Defaults to `true`. */
26
+ logoWhitenInDark?: boolean
20
27
  logoAlt?: string
21
28
  card?: boolean
22
29
  bgColor?: string
@@ -39,6 +46,7 @@ const props = withDefaults(defineProps<Props>(), {
39
46
  activeColor: 'var(--bgl-primary)',
40
47
  logoAlt: 'Logo',
41
48
  logoHeight: '2rem',
49
+ logoWhitenInDark: true,
42
50
  name: 'App Name',
43
51
  footerLinks: () => [],
44
52
  })
@@ -160,8 +168,18 @@ const sidebarStyles = computed(() => {
160
168
  :class="{ 'mx-1': isVisuallyOpen, 'mx-05': !isVisuallyOpen
161
169
  }"
162
170
  >
171
+ <!-- Light/base logo. Hidden in dark mode only when a dedicated dark
172
+ logo exists; otherwise it stays and (optionally) gets whitened. -->
163
173
  <img
164
- v-if="props.logo" :src="props.logo" :alt="props.logoAlt" class="contain"
174
+ v-if="props.logo" :src="props.logo" :alt="props.logoAlt"
175
+ class="contain sidebar-logo sidebar-logo-light"
176
+ :class="{ 'sidebar-logo-whiten': props.logoWhitenInDark && !props.logoDark }"
177
+ :style="{ height: props.logoHeight }"
178
+ >
179
+ <!-- Dedicated dark-mode logo (shown only in dark mode). -->
180
+ <img
181
+ v-if="props.logoDark" :src="props.logoDark" :alt="props.logoAlt"
182
+ class="contain sidebar-logo sidebar-logo-dark"
165
183
  :style="{ height: props.logoHeight }"
166
184
  >
167
185
  <slot name="brand" v-bind="{ isOpen: isVisuallyOpen }">
@@ -220,6 +238,29 @@ outline: 1px solid var(--bgl-border-color);
220
238
  outline-offset: -1px;
221
239
  }
222
240
 
241
+ /* ---- Logo theming (CSS-only, no JS) ---------------------------------------
242
+ The dark logo is hidden by default (light mode) and the light logo shown.
243
+ In dark mode we flip them. When there's no dedicated dark logo, the light
244
+ logo carries `.sidebar-logo-whiten` and gets turned white instead of hidden. */
245
+ .sidebar-logo-dark {
246
+ display: none;
247
+ }
248
+
249
+ .bgl-dark-mode .sidebar-logo-light:not(.sidebar-logo-whiten) {
250
+ display: none;
251
+ }
252
+
253
+ .bgl-dark-mode .sidebar-logo-dark {
254
+ display: block;
255
+ }
256
+
257
+ /* Whiten the light logo in dark mode when no dedicated dark logo is supplied.
258
+ `brightness(0)` flattens it to solid black (regardless of original colors),
259
+ then `invert(1)` flips that to solid white. Opt out via `logoWhitenInDark`. */
260
+ .bgl-dark-mode .sidebar-logo-whiten {
261
+ filter: brightness(0) invert(1);
262
+ }
263
+
223
264
  .app-sidebar {
224
265
  transition: width 0.4s ease;
225
266
  --bgl-input-font-size: 0.875rem;
@@ -76,6 +76,11 @@
76
76
  --bgl-box-bg: var(--bgl-dm-surface);
77
77
  --bgl-popup-bg: var(--bgl-dm-surface);
78
78
  --bgl-input-bg: var(--bgl-dm-input);
79
+ /* disabled inputs: a flat, slightly grayed surface so the field clearly reads
80
+ as inert (washed-out, not a usable recessed field) without becoming a bright
81
+ patch. Mixing in a touch of gray lifts it off the deep input bg and gives the
82
+ "greyed-out / not active" look. */
83
+ --input-disabled-bg: color-mix(in oklab, var(--bgl-gray) 14%, var(--bgl-dm-surface));
79
84
  --bgl-selected: var(--bgl-dm-surface-2);
80
85
  --bgl-skeleton-bg: var(--bgl-dm-surface-2);
81
86
  --bgl-skeleton-pulse: var(--bgl-dm-surface);
@@ -99,7 +104,8 @@
99
104
  * secondary labels, flat pills) and as faint fills/borders. On a dark
100
105
  * surface translucent black is invisible, so flip them to translucent
101
106
  * LIGHT. One remap fixes every `var(--bgl-black-tint)` usage at once. */
102
- --bgl-black-tint: rgba(219, 220, 220, 0.5); /* muted light text */
107
+ --bgl-black-tint: rgba(219, 220, 220, 0.5);
108
+ /* muted light text */
103
109
  --bgl-gray-tint: rgba(219, 220, 220, 0.16);
104
110
  --bgl-gray-tint-dark: rgba(219, 220, 220, 0.32);
105
111
 
@@ -206,6 +212,10 @@
206
212
  filter: invert(0.8);
207
213
  }
208
214
 
215
+ .bgl-dark-mode .logoLight {
216
+ filter: invert(1);
217
+ }
218
+
209
219
  /* Text selection */
210
220
  .bgl-dark-mode ::selection {
211
221
  color: var(--bgl-dm-text);
@@ -245,6 +255,7 @@
245
255
  color: var(--bgl-dm-text);
246
256
  border-color: var(--bgl-dm-border);
247
257
  }
258
+
248
259
  /* Hover/active on the dark secondary button: lift one step instead of the
249
260
  default lighten-filter which would wash the light original out. */
250
261
  .bgl-dark-mode .pair-white:not(.bgl_flatPill):not(.bgl_pill-border):hover,
@@ -326,9 +337,11 @@
326
337
  background: var(--bgl-bg);
327
338
  color: var(--bgl-text-color);
328
339
  }
340
+
329
341
  .bgl-dark-mode #bgl-app-sidebar .cardWrapSide {
330
342
  background-color: var(--bgl-box-bg) !important;
331
343
  }
344
+
332
345
  /* Nav buttons get their bg injected inline from props.bgColor; if a project
333
346
  still passes a physical color (e.g. "white"), force non-active buttons back
334
347
  to the card surface so they don't stay bright in dark mode. The active one
@@ -371,4 +384,23 @@
371
384
  come only from .code-editor-grandpa, not from the generic input ring. */
372
385
  .bgl-dark-mode .bagel-input .code-input {
373
386
  box-shadow: none;
387
+ }
388
+
389
+ /* Disabled inputs read as inert: greyed-out (washed) fill + muted text so it's
390
+ visually clear the field is not active. The --input-disabled-bg fill is set in
391
+ the dark palette above. */
392
+ .bgl-dark-mode .bagel-input input:disabled,
393
+ .bgl-dark-mode .bagel-input textarea:disabled,
394
+ .bgl-dark-mode .bagel-input select:disabled {
395
+ color: var(--bgl-dm-text-muted);
396
+ -webkit-text-fill-color: var(--bgl-dm-text-muted);
397
+ cursor: not-allowed;
398
+ }
399
+
400
+ .bgl-dark-mode .darkmodeHide {
401
+ display: none !important;
402
+ }
403
+
404
+ .bgl-dark-mode .darkmodeShow {
405
+ display: initial !important;
374
406
  }
@@ -50,6 +50,7 @@
50
50
  --bgl-label-color: #00000080;
51
51
  --bgl-input-bg: #f5f8fa;
52
52
  --bgl-input-color: #000000;
53
+ --input-disabled-bg: #f5f5f5;
53
54
  --bgl-dropdown-color: var(--bgl-black);
54
55
  --bgl-box-bg: var(--bgl-white);
55
56
  --bgl-popup-bg: var(--bgl-white);