@vuecs/theme-bulma 1.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.
@@ -0,0 +1,646 @@
1
+ /*!
2
+ * @vuecs/theme-bulma — Design-token bridge + structural gap-fills
3
+ *
4
+ * Wires Bulma 1.0+'s CSS variables onto vuecs design-system tokens
5
+ * (`--vc-color-*`), and adds the structural rules vuecs components
6
+ * need that core Bulma doesn't ship (overlay panel chrome, stepper
7
+ * data-state visualization, modal sizing, switch / slider colors).
8
+ *
9
+ * Import order:
10
+ * 1. Bulma CSS (provides the default --bulma-* values).
11
+ * 2. @vuecs/design/index.css (provides --vc-color-*).
12
+ * 3. This bridge (overrides --bulma-* to reference --vc-color-*).
13
+ *
14
+ * What this covers:
15
+ * - The global `--bulma-primary` / `-link` / `-info` / `-success` /
16
+ * `-warning` / `-danger` tokens — read directly by anything you
17
+ * reference via `var(--bulma-primary)` yourself.
18
+ * - Resolved colors on every per-variant selector: `.button.is-X`,
19
+ * `.tag.is-X`, `.notification.is-X`, `.pagination-link.is-current`.
20
+ *
21
+ * Why direct property overrides (not `--bulma-*-background-color`):
22
+ *
23
+ * Bulma 1.0 routes per-variant theming through HSL **channel** vars,
24
+ * not the named `--bulma-button-background-color`-style tokens. A
25
+ * `.button.is-primary` does NOT set the bg-color var — it sets
26
+ * `--bulma-button-h/s/l` and the base `.button` rule resolves
27
+ * `background-color: hsl(--bulma-button-h, …)`. Pure CSS can't
28
+ * decompose `var(--vc-color-primary-600)` into H/S/L channels, so the
29
+ * static :root rebinding below cannot reach those channels. Instead we
30
+ * override the **resolved** `background-color` / `border-color` /
31
+ * `color` properties directly on each per-variant selector. Specificity
32
+ * 0,2,0 beats Bulma's base `.button` (0,1,0); no `!important` needed.
33
+ *
34
+ * Trade-off: Bulma's auto-computed hover/active lightness deltas are
35
+ * short-circuited at this static layer. We re-specify hover (`-700`)
36
+ * and active (`-800`) shades manually per variant — these are the
37
+ * design-system's tuned shade stops, so the trade-off is intentional.
38
+ *
39
+ * Runtime palette switching (`setColorPalette()` / `useColorPalette()`)
40
+ * fills in the channel-decomposition gap that pure CSS can't bridge: at
41
+ * runtime, JS writes `--bulma-<scale>-h/s/l` channels (sourced from a
42
+ * pre-decomposed catalog) AND rebinds `--vc-color-<scale>-{50…950}` so
43
+ * both the per-variant overrides below AND any of Bulma's own
44
+ * auto-derived rules re-tint together. Static defaults below remain
45
+ * the design-system blue/green/red/amber/sky baseline.
46
+ *
47
+ * Limitations:
48
+ * - Bulma's built-in `prefers-color-scheme: dark` block toggles
49
+ * `[data-theme="dark"]` semantics. This bridge uses the `.dark`
50
+ * class (vuecs design-system convention); pick one source of truth.
51
+ */
52
+
53
+ :root {
54
+ --bulma-primary: var(--vc-color-primary-500);
55
+ --bulma-link: var(--vc-color-info-500);
56
+ --bulma-info: var(--vc-color-info-500);
57
+ --bulma-success: var(--vc-color-success-500);
58
+ --bulma-warning: var(--vc-color-warning-500);
59
+ --bulma-danger: var(--vc-color-error-500);
60
+
61
+ /* Bulma's neutral ramp (named "grey") — map to design-system shades. */
62
+ --bulma-grey-darker: var(--vc-color-neutral-800);
63
+ --bulma-grey-dark: var(--vc-color-neutral-700);
64
+ --bulma-grey: var(--vc-color-neutral-600);
65
+ --bulma-grey-light: var(--vc-color-neutral-400);
66
+ --bulma-grey-lighter: var(--vc-color-neutral-200);
67
+ --bulma-grey-lightest: var(--vc-color-neutral-100);
68
+
69
+ --bulma-light: var(--vc-color-neutral-100);
70
+ --bulma-dark: var(--vc-color-neutral-900);
71
+
72
+ /* Page chrome */
73
+ --bulma-scheme-main: var(--vc-color-bg);
74
+ --bulma-scheme-main-bis: var(--vc-color-bg-muted);
75
+ --bulma-scheme-main-ter: var(--vc-color-bg-elevated);
76
+ --bulma-background: var(--vc-color-bg-muted);
77
+ --bulma-text: var(--vc-color-fg);
78
+ --bulma-text-strong: var(--vc-color-fg);
79
+ --bulma-text-light: var(--vc-color-fg-muted);
80
+ --bulma-text-weak: var(--vc-color-fg-muted);
81
+ --bulma-border: var(--vc-color-border);
82
+ --bulma-border-weak: var(--vc-color-border-muted);
83
+ --bulma-body-background-color: var(--vc-color-bg);
84
+ --bulma-body-color: var(--vc-color-fg);
85
+ }
86
+
87
+ .dark {
88
+ /* Only the per-color shades flip — semantic aliases (`--vc-color-fg`,
89
+ `--vc-color-bg`, `--vc-color-border`, …) flip themselves in
90
+ @vuecs/design's `.dark` block, so the scheme/text/border bindings
91
+ in :root above already track dark mode. We just bump the active
92
+ color shade to `-400` (matching the design-system's own
93
+ `--vc-color-ring` dark-mode flip — gives a brighter primary on
94
+ dark bg). */
95
+ --bulma-primary: var(--vc-color-primary-400);
96
+ --bulma-link: var(--vc-color-info-400);
97
+ --bulma-info: var(--vc-color-info-400);
98
+ --bulma-success: var(--vc-color-success-400);
99
+ --bulma-warning: var(--vc-color-warning-400);
100
+ --bulma-danger: var(--vc-color-error-400);
101
+
102
+ --bulma-light: var(--vc-color-neutral-800);
103
+ --bulma-dark: var(--vc-color-neutral-100);
104
+ }
105
+
106
+ /* ────────────────────────────────────────────────────────────────────────────
107
+ * Per-variant button overrides.
108
+ *
109
+ * Critical Bulma 1.0 cascade detail: `.button.is-<color>` does NOT use
110
+ * `--bulma-button-background-color`. Bulma defines the modifier as
111
+ *
112
+ * .button.is-primary {
113
+ * --bulma-button-h: var(--bulma-primary-h);
114
+ * --bulma-button-s: var(--bulma-primary-s);
115
+ * --bulma-button-l: var(--bulma-primary-l);
116
+ * }
117
+ *
118
+ * and the base `.button` rule resolves bg/border/color via
119
+ * background-color: hsl(var(--bulma-button-h), …, calc(var(--bulma-button-l) + …));
120
+ *
121
+ * So overriding `--bulma-button-background-color` is a no-op — Bulma
122
+ * recomputes the color from HSL channels. The viable approaches are
123
+ * either (a) override the HSL channel vars (requires per-shade HSL
124
+ * decomposition that we can't compute in pure CSS), or (b) override the
125
+ * resolved properties directly. We pick (b): set `background-color` /
126
+ * `border-color` / `color` on each `.is-<color>` selector. Specificity
127
+ * 0,2,0 beats Bulma's `.button` (0,1,0) so no `!important` is needed.
128
+ *
129
+ * Trade-off: Bulma's auto-computed hover/active lightness deltas no
130
+ * longer apply; we re-specify them explicitly with `-700`/`-800` shades.
131
+ * ──────────────────────────────────────────────────────────────────────── */
132
+
133
+ /* solid */
134
+ .button.is-primary { background-color: var(--vc-color-primary-600); border-color: var(--vc-color-primary-600); color: var(--vc-color-on-primary); }
135
+ .button.is-info { background-color: var(--vc-color-info-600); border-color: var(--vc-color-info-600); color: var(--vc-color-on-info); }
136
+ .button.is-success { background-color: var(--vc-color-success-600); border-color: var(--vc-color-success-600); color: var(--vc-color-on-success); }
137
+ .button.is-warning { background-color: var(--vc-color-warning-600); border-color: var(--vc-color-warning-600); color: var(--vc-color-on-warning); }
138
+ .button.is-danger { background-color: var(--vc-color-error-600); border-color: var(--vc-color-error-600); color: var(--vc-color-on-error); }
139
+
140
+ .button.is-primary:hover, .button.is-primary.is-hovered { background-color: var(--vc-color-primary-700); border-color: var(--vc-color-primary-700); }
141
+ .button.is-info:hover, .button.is-info.is-hovered { background-color: var(--vc-color-info-700); border-color: var(--vc-color-info-700); }
142
+ .button.is-success:hover, .button.is-success.is-hovered { background-color: var(--vc-color-success-700); border-color: var(--vc-color-success-700); }
143
+ .button.is-warning:hover, .button.is-warning.is-hovered { background-color: var(--vc-color-warning-700); border-color: var(--vc-color-warning-700); }
144
+ .button.is-danger:hover, .button.is-danger.is-hovered { background-color: var(--vc-color-error-700); border-color: var(--vc-color-error-700); }
145
+
146
+ .button.is-primary:active, .button.is-primary.is-active { background-color: var(--vc-color-primary-800); border-color: var(--vc-color-primary-800); }
147
+ .button.is-info:active, .button.is-info.is-active { background-color: var(--vc-color-info-800); border-color: var(--vc-color-info-800); }
148
+ .button.is-success:active, .button.is-success.is-active { background-color: var(--vc-color-success-800); border-color: var(--vc-color-success-800); }
149
+ .button.is-warning:active, .button.is-warning.is-active { background-color: var(--vc-color-warning-800); border-color: var(--vc-color-warning-800); }
150
+ .button.is-danger:active, .button.is-danger.is-active { background-color: var(--vc-color-error-800); border-color: var(--vc-color-error-800); }
151
+
152
+ /* `.is-light` shade modifier on a colored button — tinted bg, colored
153
+ text. Matches BS5's `*-subtle` / `*-emphasis` token pair. The 0,3,0
154
+ specificity beats both `.button` and `.button.is-<color>`. */
155
+ .button.is-primary.is-light { background-color: var(--vc-color-primary-100); border-color: transparent; color: var(--vc-color-primary-700); }
156
+ .button.is-info.is-light { background-color: var(--vc-color-info-100); border-color: transparent; color: var(--vc-color-info-700); }
157
+ .button.is-success.is-light { background-color: var(--vc-color-success-100); border-color: transparent; color: var(--vc-color-success-700); }
158
+ .button.is-warning.is-light { background-color: var(--vc-color-warning-100); border-color: transparent; color: var(--vc-color-warning-700); }
159
+ .button.is-danger.is-light { background-color: var(--vc-color-error-100); border-color: transparent; color: var(--vc-color-error-700); }
160
+
161
+ .button.is-primary.is-light:hover { background-color: var(--vc-color-primary-200); }
162
+ .button.is-info.is-light:hover { background-color: var(--vc-color-info-200); }
163
+ .button.is-success.is-light:hover { background-color: var(--vc-color-success-200); }
164
+ .button.is-warning.is-light:hover { background-color: var(--vc-color-warning-200); }
165
+ .button.is-danger.is-light:hover { background-color: var(--vc-color-error-200); }
166
+
167
+ /* `.is-outlined` — transparent bg, colored text + border, fills on hover. */
168
+ .button.is-primary.is-outlined { background-color: transparent; border-color: var(--vc-color-primary-600); color: var(--vc-color-primary-700); }
169
+ .button.is-info.is-outlined { background-color: transparent; border-color: var(--vc-color-info-600); color: var(--vc-color-info-700); }
170
+ .button.is-success.is-outlined { background-color: transparent; border-color: var(--vc-color-success-600); color: var(--vc-color-success-700); }
171
+ .button.is-warning.is-outlined { background-color: transparent; border-color: var(--vc-color-warning-600); color: var(--vc-color-warning-700); }
172
+ .button.is-danger.is-outlined { background-color: transparent; border-color: var(--vc-color-error-600); color: var(--vc-color-error-700); }
173
+
174
+ .button.is-primary.is-outlined:hover { background-color: var(--vc-color-primary-600); color: var(--vc-color-on-primary); }
175
+ .button.is-info.is-outlined:hover { background-color: var(--vc-color-info-600); color: var(--vc-color-on-info); }
176
+ .button.is-success.is-outlined:hover { background-color: var(--vc-color-success-600); color: var(--vc-color-on-success); }
177
+ .button.is-warning.is-outlined:hover { background-color: var(--vc-color-warning-600); color: var(--vc-color-on-warning); }
178
+ .button.is-danger.is-outlined:hover { background-color: var(--vc-color-error-600); color: var(--vc-color-on-error); }
179
+
180
+ /* `.is-light` and `.is-dark` as standalone color modifiers — used by
181
+ our matrix for `<VCButton variant="soft" color="neutral">` and
182
+ `<VCBadge variant="solid" color="neutral">`. Bulma's defaults
183
+ compute these via `--bulma-light-*` / `--bulma-dark-*` HSL channels;
184
+ override with neutral shades so they read consistently in light and
185
+ dark mode (the design tokens flip themselves). */
186
+ .button.is-light:not(.is-primary):not(.is-info):not(.is-success):not(.is-warning):not(.is-danger):not(.is-dark) {
187
+ background-color: var(--vc-color-bg-elevated);
188
+ border-color: var(--vc-color-border);
189
+ color: var(--vc-color-fg);
190
+ }
191
+ .button.is-light:not(.is-primary):not(.is-info):not(.is-success):not(.is-warning):not(.is-danger):not(.is-dark):hover {
192
+ background-color: var(--vc-color-bg-muted);
193
+ }
194
+ .button.is-dark {
195
+ background-color: var(--vc-color-neutral-800);
196
+ border-color: var(--vc-color-neutral-800);
197
+ color: var(--vc-color-on-neutral);
198
+ }
199
+ .button.is-dark:hover { background-color: var(--vc-color-neutral-900); border-color: var(--vc-color-neutral-900); }
200
+
201
+ /* ────────────────────────────────────────────────────────────────────────────
202
+ * Tag + notification per-variant overrides.
203
+ * Same HSL-channel architecture as `.button` — direct property
204
+ * overrides are required (the `--bulma-X-background-color` named vars
205
+ * are unread).
206
+ * ──────────────────────────────────────────────────────────────────────── */
207
+
208
+ .tag.is-primary { background-color: var(--vc-color-primary-600); color: var(--vc-color-on-primary); }
209
+ .tag.is-info { background-color: var(--vc-color-info-600); color: var(--vc-color-on-info); }
210
+ .tag.is-success { background-color: var(--vc-color-success-600); color: var(--vc-color-on-success); }
211
+ .tag.is-warning { background-color: var(--vc-color-warning-600); color: var(--vc-color-on-warning); }
212
+ .tag.is-danger { background-color: var(--vc-color-error-600); color: var(--vc-color-on-error); }
213
+
214
+ .tag.is-primary.is-light { background-color: var(--vc-color-primary-100); color: var(--vc-color-primary-700); }
215
+ .tag.is-info.is-light { background-color: var(--vc-color-info-100); color: var(--vc-color-info-700); }
216
+ .tag.is-success.is-light { background-color: var(--vc-color-success-100); color: var(--vc-color-success-700); }
217
+ .tag.is-warning.is-light { background-color: var(--vc-color-warning-100); color: var(--vc-color-warning-700); }
218
+ .tag.is-danger.is-light { background-color: var(--vc-color-error-100); color: var(--vc-color-error-700); }
219
+
220
+ /* `.is-light` and `.is-dark` standalone — used by `<VCBadge>`'s
221
+ `(soft, neutral)` and `(solid, neutral)` cells. Bulma's defaults rely
222
+ on `--bulma-light-h/s/l/invert-l` HSL channels, which we don't
223
+ re-derive when overriding `--bulma-light` to a hex token at `:root`
224
+ — so the resolved color is broken. Override the resolved properties
225
+ directly using the `bg-elevated` / `fg` alias pair so BOTH halves
226
+ flip together under `.dark` (a `neutral-100` bg + `fg` text would
227
+ give white-on-white in dark mode because `neutral-100` doesn't flip
228
+ but `fg` does). */
229
+ .tag.is-light:not(.is-primary):not(.is-info):not(.is-success):not(.is-warning):not(.is-danger):not(.is-dark) {
230
+ background-color: var(--vc-color-bg-elevated);
231
+ color: var(--vc-color-fg);
232
+ }
233
+ .tag.is-dark {
234
+ background-color: var(--vc-color-neutral-800);
235
+ color: var(--vc-color-on-neutral);
236
+ }
237
+
238
+ .notification.is-primary { background-color: var(--vc-color-primary-600); color: var(--vc-color-on-primary); }
239
+ .notification.is-info { background-color: var(--vc-color-info-600); color: var(--vc-color-on-info); }
240
+ .notification.is-success { background-color: var(--vc-color-success-600); color: var(--vc-color-on-success); }
241
+ .notification.is-warning { background-color: var(--vc-color-warning-600); color: var(--vc-color-on-warning); }
242
+ .notification.is-danger { background-color: var(--vc-color-error-600); color: var(--vc-color-on-error); }
243
+
244
+ .notification.is-primary.is-light { background-color: var(--vc-color-primary-100); color: var(--vc-color-primary-700); }
245
+ .notification.is-info.is-light { background-color: var(--vc-color-info-100); color: var(--vc-color-info-700); }
246
+ .notification.is-success.is-light { background-color: var(--vc-color-success-100); color: var(--vc-color-success-700); }
247
+ .notification.is-warning.is-light { background-color: var(--vc-color-warning-100); color: var(--vc-color-warning-800); }
248
+ .notification.is-danger.is-light { background-color: var(--vc-color-error-100); color: var(--vc-color-error-700); }
249
+
250
+ /* ────────────────────────────────────────────────────────────────────────────
251
+ * `has-background-*` / `has-text-*` utilities.
252
+ * Bulma 1.0 reads these from `var(--bulma-<color>)` directly, so the
253
+ * :root rebinding above already propagates. We also redeclare here so
254
+ * the resolved value matches the design palette's `-600` shade
255
+ * (the :root rebinding uses `-500` for visual consistency with Bulma
256
+ * default brightness).
257
+ * ──────────────────────────────────────────────────────────────────────── */
258
+
259
+ .has-background-primary { background-color: var(--vc-color-primary-600); }
260
+ .has-background-info { background-color: var(--vc-color-info-600); }
261
+ .has-background-success { background-color: var(--vc-color-success-600); }
262
+ .has-background-warning { background-color: var(--vc-color-warning-600); }
263
+ .has-background-danger { background-color: var(--vc-color-error-600); }
264
+
265
+ .has-text-primary { color: var(--vc-color-primary-600); }
266
+ .has-text-info { color: var(--vc-color-info-600); }
267
+ .has-text-success { color: var(--vc-color-success-600); }
268
+ .has-text-warning { color: var(--vc-color-warning-600); }
269
+ .has-text-danger { color: var(--vc-color-error-600); }
270
+
271
+ /* ────────────────────────────────────────────────────────────────────────────
272
+ * Form controls — `.input`, `.textarea`, `.select`.
273
+ * Bulma's focus state reads `var(--bulma-input-focus-border-color)`,
274
+ * which defaults to `var(--bulma-link)`. Rebind to primary so vuecs
275
+ * inputs land on the design-system primary on focus.
276
+ * ──────────────────────────────────────────────────────────────────────── */
277
+
278
+ .input,
279
+ .textarea,
280
+ .select select {
281
+ --bulma-input-focus-border-color: var(--vc-color-primary-500);
282
+ --bulma-input-focus-shadow-alpha: 0.25;
283
+ }
284
+
285
+ /* ────────────────────────────────────────────────────────────────────────────
286
+ * Pagination — `.pagination-link.is-current` reads `--bulma-link`;
287
+ * rebind to primary for visual consistency with the rest of the theme.
288
+ * ──────────────────────────────────────────────────────────────────────── */
289
+
290
+ .pagination-link.is-current,
291
+ .pagination-link.is-selected {
292
+ /* Direct property override — Bulma uses HSL channels here too. */
293
+ background-color: var(--vc-color-primary-600);
294
+ border-color: var(--vc-color-primary-600);
295
+ color: var(--vc-color-on-primary);
296
+ }
297
+
298
+ /* ────────────────────────────────────────────────────────────────────────────
299
+ * Progress bar — same primary-600 alignment.
300
+ * ──────────────────────────────────────────────────────────────────────── */
301
+
302
+ .progress {
303
+ --bulma-progress-value-background-color: var(--vc-color-primary-600);
304
+ }
305
+
306
+ /* ────────────────────────────────────────────────────────────────────────────
307
+ * @vuecs/list shorthand-mode wrappers — same as the BS bridge: hide
308
+ * empty wrappers so the layout doesn't sprout extra rows.
309
+ * ──────────────────────────────────────────────────────────────────────── */
310
+
311
+ .vc-list-header:empty,
312
+ .vc-list-body:empty,
313
+ .vc-list-footer:empty {
314
+ display: none;
315
+ }
316
+
317
+ /* ────────────────────────────────────────────────────────────────────────────
318
+ * @vuecs/elements Badge — outline variant.
319
+ * Bulma 1.0 has no `.tag.is-outlined` in core. The variant matrix tags
320
+ * outline cells with the marker classes `vc-badge-outline` +
321
+ * `vc-badge-outline-<color>`; this block paints them via design-system
322
+ * tokens. Borders use `-600` (matches solid bg saturation), text uses
323
+ * `-700` for emphasis.
324
+ * ──────────────────────────────────────────────────────────────────────── */
325
+
326
+ .vc-badge-outline {
327
+ background-color: transparent;
328
+ border: 1px solid currentcolor;
329
+ }
330
+ .vc-badge-outline-primary { border-color: var(--vc-color-primary-600); color: var(--vc-color-primary-700); }
331
+ .vc-badge-outline-neutral { border-color: var(--vc-color-border); color: var(--vc-color-fg); }
332
+ .vc-badge-outline-success { border-color: var(--vc-color-success-600); color: var(--vc-color-success-700); }
333
+ .vc-badge-outline-warning { border-color: var(--vc-color-warning-600); color: var(--vc-color-warning-700); }
334
+ .vc-badge-outline-error { border-color: var(--vc-color-error-600); color: var(--vc-color-error-700); }
335
+ .vc-badge-outline-info { border-color: var(--vc-color-info-600); color: var(--vc-color-info-700); }
336
+
337
+ /* ────────────────────────────────────────────────────────────────────────────
338
+ * @vuecs/overlays Modal — Bulma's `.modal-content` accepts no native
339
+ * size modifiers (unlike Bootstrap's `.modal-dialog` family). Re-implement
340
+ * the width tier so the theme's size variants take effect on our
341
+ * compound shape. Defaults match Bootstrap's tiers (sm=300, lg=800,
342
+ * xl=1140) so the same demo content reads consistently across themes;
343
+ * md keeps the unsized default which centers via the theme's
344
+ * `.modal-content` base padding.
345
+ *
346
+ * Reka renders the overlay (`DialogOverlay`) and panel (`DialogContent`)
347
+ * as two standalone portal nodes — there is no surrounding `.modal`
348
+ * wrapper to provide Bulma's flex-centered layout. Re-implement the
349
+ * fixed-position centering on the structural `vc-modal-content` class
350
+ * directly, and pin the overlay full-screen.
351
+ * ──────────────────────────────────────────────────────────────────────── */
352
+
353
+ .modal-background {
354
+ position: fixed;
355
+ inset: 0;
356
+ }
357
+
358
+ .vc-modal-content {
359
+ position: fixed;
360
+ top: 50%;
361
+ left: 50%;
362
+ transform: translate(-50%, -50%);
363
+ margin: 0;
364
+ /* Bulma's `.modal-content` ships no border-radius (it's intended
365
+ to be used with `.modal-card`'s rounded chrome instead). Add
366
+ radius via the design-system token so the modal panel reads as
367
+ a card. */
368
+ border-radius: var(--vc-radius-lg);
369
+ }
370
+
371
+ .vc-modal-content.modal-sm { max-width: 300px; width: calc(100% - 1rem); }
372
+ .vc-modal-content.modal-lg { max-width: 800px; width: calc(100% - 1rem); }
373
+ .vc-modal-content.modal-xl { max-width: 1140px; width: calc(100% - 1rem); }
374
+
375
+ /* Tooltip same border-radius reasoning — Bulma's `[data-tooltip]` is a
376
+ CSS pseudo-element on a data attribute, not a class-based panel, so
377
+ our class-based tooltip needs explicit radius. */
378
+ .vc-tooltip-content { border-radius: var(--vc-radius-md); }
379
+
380
+ /* ────────────────────────────────────────────────────────────────────────────
381
+ * @vuecs/overlays close-icon corner positioning.
382
+ *
383
+ * Bulma's `.delete` is `position: relative` by default — fine inline,
384
+ * wrong for our `closeIcon` slot which is meant to dock the button into
385
+ * the panel's top-right corner. The structural `vc-modal-close-icon` /
386
+ * `vc-popover-close-icon` classes (from component defaults) give us a
387
+ * scoped hook to apply corner-positioning without affecting standalone
388
+ * `.delete` buttons elsewhere on the page.
389
+ * ──────────────────────────────────────────────────────────────────────── */
390
+
391
+ .vc-modal-content .vc-modal-close-icon,
392
+ .vc-popover-close-icon {
393
+ position: absolute;
394
+ top: 0.5rem;
395
+ right: 0.5rem;
396
+ }
397
+
398
+ /* ────────────────────────────────────────────────────────────────────────────
399
+ * @vuecs/navigation Stepper — Bulma class strings can't carry
400
+ * `[data-state=…]` attribute selectors, so the theme's
401
+ * `.has-background-light` / `.has-text-grey` apply uniformly to every
402
+ * step. Differentiate active + completed states here. Both use primary
403
+ * so the trail-of-progress reads as one continuous run (matches the
404
+ * Tailwind theme).
405
+ *
406
+ * No `!important` needed: Bulma 1.0 dropped most `!important` flooding
407
+ * from utility classes (unlike Bootstrap's `.bg-light` etc.), so plain
408
+ * attribute-selector specificity wins against the utility classes the
409
+ * theme strings emit.
410
+ * ──────────────────────────────────────────────────────────────────────── */
411
+
412
+ .vc-stepper-item[data-state="active"] .vc-stepper-indicator,
413
+ .vc-stepper-item[data-state="completed"] .vc-stepper-indicator {
414
+ background-color: var(--vc-color-primary-600);
415
+ border-color: var(--vc-color-primary-600);
416
+ color: var(--vc-color-on-primary);
417
+ }
418
+
419
+ .vc-stepper-item[data-state="active"] .vc-stepper-title,
420
+ .vc-stepper-item[data-state="completed"] .vc-stepper-title {
421
+ color: var(--vc-color-fg);
422
+ }
423
+
424
+ .vc-stepper-separator[data-state="completed"] {
425
+ background-color: var(--vc-color-primary-600);
426
+ }
427
+
428
+ /* ────────────────────────────────────────────────────────────────────────────
429
+ * @vuecs/forms FormNumber — Bulma's `.button` class ships with
430
+ * `border: 1px solid …` and a fixed `height: var(--bulma-control-height)`.
431
+ * Our `<VCFormNumber>` decrement / increment slots receive `class="button"`
432
+ * from the theme so the visual reads "buttoned up", but the structural
433
+ * `.vc-form-number-{decrement,increment}` rules deliberately drop borders
434
+ * (the parent `.vc-form-number` carries the single outer border + radius
435
+ * + overflow:hidden). Bulma's per-class border ends up showing as a
436
+ * vertical hairline against the input — strip it back here. Height also
437
+ * needs to flex with the input, not lock to control-height.
438
+ *
439
+ * Same rationale for `.vc-form-number-input` carrying `.input` — its
440
+ * border + height fight the structural shell.
441
+ * ──────────────────────────────────────────────────────────────────────── */
442
+
443
+ .vc-form-number .button,
444
+ .vc-form-number .input {
445
+ border: 0;
446
+ box-shadow: none;
447
+ height: auto;
448
+ border-radius: 0;
449
+ }
450
+
451
+ /* ────────────────────────────────────────────────────────────────────────────
452
+ * @vuecs/elements Card — Bulma's `.card` ladder doesn't match the
453
+ * <VCCard*> compound (Bulma's `.card-content` only has one content band),
454
+ * so the theme entry uses `.box` as the host and these gap-fill helpers
455
+ * paint the separator borders + flex layout that Bootstrap gets for free
456
+ * from its `.card-header` / `.card-footer` ladder.
457
+ *
458
+ * The `vc-card-outline` modifier flattens Bulma's default `.box` shadow
459
+ * and adds a single border so the outline variant reads as the "stripped
460
+ * down" style. `vc-card-interactive` adds hover + focus lift.
461
+ * ──────────────────────────────────────────────────────────────────────── */
462
+
463
+ .vc-card-outline {
464
+ border: 1px solid var(--vc-color-border);
465
+ }
466
+
467
+ .vc-card-interactive {
468
+ cursor: pointer;
469
+ transition: box-shadow 150ms ease, transform 150ms ease;
470
+ }
471
+ .vc-card-interactive:hover {
472
+ box-shadow: var(--bulma-shadow, 0 0.5em 1em -0.125em rgba(10, 10, 10, 0.1));
473
+ }
474
+ .vc-card-interactive:focus-within {
475
+ box-shadow: 0 0 0 2px var(--vc-color-primary-500);
476
+ outline: none;
477
+ }
478
+
479
+ .vc-card-header {
480
+ display: flex;
481
+ flex-direction: column;
482
+ gap: 0.25rem;
483
+ border-bottom: 1px solid var(--vc-color-border);
484
+ /* Cancel `.box`'s inner padding so the header sits flush against
485
+ * the outer edge of the card. */
486
+ margin: -1.25rem -1.25rem 0;
487
+ }
488
+
489
+ .vc-card-body {
490
+ /* Cancel `.box`'s inner padding so the body's own padding variant
491
+ * controls spacing. */
492
+ margin: 0 -1.25rem;
493
+ }
494
+
495
+ .vc-card-footer {
496
+ border-top: 1px solid var(--vc-color-border);
497
+ /* Cancel `.box`'s inner padding so the footer sits flush against
498
+ * the outer edge of the card. */
499
+ margin: 0 -1.25rem -1.25rem;
500
+ }
501
+
502
+ /* Soft variant — paint with our design-token muted background instead
503
+ * of Bulma's `.has-background-light`, which resolves through the
504
+ * unbridged `--bulma-light-h/s/l` channels and ignores runtime
505
+ * palette / color-mode flips (and ships `!important`, so layered
506
+ * overrides can't fix it). */
507
+ .box.vc-card-soft {
508
+ background-color: var(--vc-color-bg-muted);
509
+ }
510
+
511
+ /* ────────────────────────────────────────────────────────────────────────────
512
+ * @vuecs/table — gap-fill helpers. Same rationale as Bootstrap:
513
+ * Bulma theme strings can't carry attribute selectors, so sort-indicator
514
+ * state + sticky-header + disabled-row + focused-row each get a vc-*
515
+ * helper class instead of a `[aria-sort=…]` / `[data-state=…]` rule.
516
+ * ──────────────────────────────────────────────────────────────────────── */
517
+
518
+ .vc-table-sort-asc,
519
+ .vc-table-sort-desc {
520
+ color: var(--vc-color-fg);
521
+ }
522
+
523
+ .vc-table-sticky-header thead th {
524
+ position: sticky;
525
+ top: 0;
526
+ background: var(--vc-color-bg);
527
+ z-index: 10;
528
+ }
529
+
530
+ .vc-table-sticky-column {
531
+ background: var(--vc-color-bg);
532
+ z-index: 1;
533
+ }
534
+
535
+ .vc-table-row-focused {
536
+ outline: 2px solid var(--vc-color-primary-500);
537
+ outline-offset: -2px;
538
+ }
539
+
540
+ .vc-table-row-disabled {
541
+ opacity: 0.5;
542
+ pointer-events: none;
543
+ }
544
+
545
+ .vc-table-loading-overlay-bulma {
546
+ background: hsla(var(--bulma-scheme-h, 0), var(--bulma-scheme-s, 0%), var(--bulma-scheme-main-l, 100%), 0.7);
547
+ }
548
+
549
+ /* Sort-indicator bar — Bulma has no canonical container helper that
550
+ * combines border + muted background + radius + padding in one class,
551
+ * so we ship the chrome inline. The chip is `.tag` (Bulma's pill
552
+ * primitive); the inner toggle + remove are borderless buttons that
553
+ * inherit the tag's background. */
554
+ .vc-table-sort-indicators-bulma {
555
+ background: var(--bulma-scheme-main-bis, hsl(0deg, 0%, 96%));
556
+ border: 1px solid var(--bulma-border, hsl(0deg, 0%, 86%));
557
+ border-radius: var(--bulma-radius, 4px);
558
+ padding: 0.5rem 0.75rem;
559
+ }
560
+
561
+ .vc-table-sort-indicators-chip-bulma {
562
+ /* `.tag` is normally a styled `<span>`. We turn it into a flex
563
+ * container so the inner toggle + remove buttons stack
564
+ * horizontally inside the pill. */
565
+ display: inline-flex;
566
+ align-items: center;
567
+ padding: 0;
568
+ gap: 0;
569
+ }
570
+
571
+ .vc-table-sort-indicators-chip-toggle-bulma,
572
+ .vc-table-sort-indicators-chip-remove-bulma {
573
+ /* Bulma's `.button` ships its own background + border. Strip
574
+ * both so the toggle / remove inherit the parent tag's
575
+ * background and look like one unified chip. */
576
+ background: transparent;
577
+ border: 0;
578
+ height: auto;
579
+ padding: 0.125rem 0.5rem;
580
+ }
581
+
582
+ .vc-table-sort-indicators-chip-toggle-bulma {
583
+ gap: 0.375rem;
584
+ }
585
+
586
+ .vc-table-sort-indicators-chip-toggle-bulma:hover,
587
+ .vc-table-sort-indicators-chip-remove-bulma:hover {
588
+ background: var(--bulma-scheme-main-ter, hsl(0deg, 0%, 92%));
589
+ }
590
+
591
+ /* ────────────────────────────────────────────────────────────────────────────
592
+ * @vuecs/overlays Toast — Bulma 1.0 ships no toast component, so the
593
+ * theme entry composes `.notification` (closest visual equivalent) for
594
+ * the toast root. The viewport positioning helpers below pin the toast
595
+ * stack into one of six corners on top of any page chrome, and the
596
+ * `vc-toast-outline-*` helpers reskin the `outline` variant per color
597
+ * since `.notification` has no outline modifier.
598
+ * ──────────────────────────────────────────────────────────────────────── */
599
+
600
+ .vc-toast-viewport-fixed {
601
+ position: fixed;
602
+ z-index: 1000;
603
+ gap: 0.5rem;
604
+ max-width: calc(100% - 2rem);
605
+ pointer-events: none;
606
+ }
607
+ .vc-toast-viewport-fixed > * {
608
+ pointer-events: auto;
609
+ }
610
+ .vc-toast-viewport-top-left { top: 1rem; left: 1rem; }
611
+ .vc-toast-viewport-top-right { top: 1rem; right: 1rem; }
612
+ .vc-toast-viewport-top-center { top: 1rem; left: 50%; transform: translateX(-50%); }
613
+ .vc-toast-viewport-bottom-left { bottom: 1rem; left: 1rem; }
614
+ .vc-toast-viewport-bottom-right { bottom: 1rem; right: 1rem; }
615
+ .vc-toast-viewport-bottom-center { bottom: 1rem; left: 50%; transform: translateX(-50%); }
616
+
617
+ .vc-toast-outline-primary {
618
+ background-color: transparent;
619
+ border: 1px solid var(--vc-color-primary-600);
620
+ color: var(--vc-color-primary-700);
621
+ }
622
+ .vc-toast-outline-neutral {
623
+ background-color: transparent;
624
+ border: 1px solid var(--vc-color-neutral-500);
625
+ color: var(--vc-color-fg);
626
+ }
627
+ .vc-toast-outline-success {
628
+ background-color: transparent;
629
+ border: 1px solid var(--vc-color-success-600);
630
+ color: var(--vc-color-success-700);
631
+ }
632
+ .vc-toast-outline-warning {
633
+ background-color: transparent;
634
+ border: 1px solid var(--vc-color-warning-600);
635
+ color: var(--vc-color-warning-800);
636
+ }
637
+ .vc-toast-outline-error {
638
+ background-color: transparent;
639
+ border: 1px solid var(--vc-color-error-600);
640
+ color: var(--vc-color-error-700);
641
+ }
642
+ .vc-toast-outline-info {
643
+ background-color: transparent;
644
+ border: 1px solid var(--vc-color-info-600);
645
+ color: var(--vc-color-info-700);
646
+ }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Bulma-theme config keys. Augments the cross-cutting `Config`
3
+ * interface in `@vuecs/core`. Side-effect imported by this package's
4
+ * `index.ts` so the augmentation is loaded whenever consumers depend
5
+ * on `@vuecs/theme-bulma`.
6
+ *
7
+ * No `withDefaults` registration here — `nonce` has no sensible
8
+ * framework default; it must come from the consumer's CSP setup.
9
+ * `setColorPalette` may read it via `useConfig('nonce')` (returns
10
+ * `undefined` when unset). The same key is augmented by
11
+ * `@vuecs/theme-tailwind`; declaration-merging makes the two identical
12
+ * augmentations harmless when both themes are installed.
13
+ */
14
+ declare module '@vuecs/core' {
15
+ interface Config {
16
+ /**
17
+ * CSP nonce written onto inline `<style>` tags created at
18
+ * runtime — used by `setColorPalette`'s
19
+ * `<style id="vc-color-palette">` block. When unset, no
20
+ * `nonce` attribute is added (works in non-CSP environments
21
+ * and in CSP environments that allow `unsafe-inline` for
22
+ * styles).
23
+ */
24
+ nonce?: string;
25
+ }
26
+ }
27
+ export {};
28
+ //# sourceMappingURL=config.d.ts.map