@nubisco/ui 2.6.0 → 2.8.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/dist/components/Banner.d.ts +53 -0
- package/dist/components/Banner.vue.d.ts +31 -0
- package/dist/components/Banner.vue.d.ts.map +1 -0
- package/dist/components/Blueprint.types.d.ts +40 -1
- package/dist/components/Blueprint.types.d.ts.map +1 -1
- package/dist/components/Blueprint.vue.d.ts +4 -11
- package/dist/components/Blueprint.vue.d.ts.map +1 -1
- package/dist/components/BlueprintCard.types.d.ts +28 -0
- package/dist/components/BlueprintCard.types.d.ts.map +1 -1
- package/dist/components/BlueprintCard.vue.d.ts +10 -23
- package/dist/components/BlueprintCard.vue.d.ts.map +1 -1
- package/dist/components/Button.vue.d.ts +2 -2
- package/dist/components/Charts/BarChart.vue.d.ts +1 -1
- package/dist/components/Charts/GanttChart.vue.d.ts +1 -1
- package/dist/components/Charts/InterpolationChart.vue.d.ts +1 -1
- package/dist/components/Charts/LineChart.vue.d.ts +1 -1
- package/dist/components/Charts/PieChart.vue.d.ts +1 -1
- package/dist/components/Charts/Sparkline.vue.d.ts +1 -1
- package/dist/components/Charts/shared/ChartFrame.vue.d.ts +1 -1
- package/dist/components/Charts/shared/ChartFrame.vue.d.ts.map +1 -1
- package/dist/components/DatePicker.vue.d.ts +1 -1
- package/dist/components/Icon.vue.d.ts +1 -1
- package/dist/components/MenuItem.vue.d.ts +1 -1
- package/dist/components/NumberInput.vue.d.ts +1 -1
- package/dist/components/NumberInput.vue.d.ts.map +1 -1
- package/dist/components/ProgressBar.vue.d.ts +1 -1
- package/dist/components/Select.vue.d.ts +1 -1
- package/dist/components/SidebarBrand.vue.d.ts +1 -1
- package/dist/components/SidebarMenuItem.vue.d.ts +1 -1
- package/dist/components/TextInput.vue.d.ts +2 -2
- package/dist/components/TextInput.vue.d.ts.map +1 -1
- package/dist/components/Tree.vue.d.ts +1 -1
- package/dist/components/TreeNode.vue.d.ts +1 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/composables/useTheme.composable.d.ts +76 -0
- package/dist/composables/useTheme.composable.d.ts.map +1 -0
- package/dist/global.d.ts +2 -0
- package/dist/index.cjs +9 -9
- package/dist/index.mjs +11936 -11575
- package/dist/main.d.ts +5 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/ui.css +1 -1
- package/package.json +1 -1
- package/src/styles/_theme.scss +139 -0
package/package.json
CHANGED
package/src/styles/_theme.scss
CHANGED
|
@@ -182,6 +182,33 @@
|
|
|
182
182
|
--nb-c-danger-active: var(--nb-c-chicken-comb-700);
|
|
183
183
|
--nb-c-danger-active-a11y: var(--nb-c-chicken-comb-700-a11y);
|
|
184
184
|
|
|
185
|
+
// ── Status SURFACES ───────────────────────────────────────────────────
|
|
186
|
+
// The semantic colours above are inks: strong enough to draw a border or
|
|
187
|
+
// set a word in, far too strong to fill a block with. A notification that
|
|
188
|
+
// fills its background needs a quiet ground and an ink that stays legible
|
|
189
|
+
// ON that ground, which is a different pair, not a lighter version of the
|
|
190
|
+
// same one. Named semantically so a component never has to know that
|
|
191
|
+
// "warning" happens to be phoenix-flames.
|
|
192
|
+
--nb-c-info-surface: var(--nb-c-the-blues-brothers-100);
|
|
193
|
+
--nb-c-on-info-surface: var(--nb-c-the-blues-brothers-800);
|
|
194
|
+
--nb-c-info-surface-border: var(--nb-c-the-blues-brothers-200);
|
|
195
|
+
|
|
196
|
+
--nb-c-success-surface: var(--nb-c-emerald-reflection-100);
|
|
197
|
+
--nb-c-on-success-surface: var(--nb-c-emerald-reflection-800);
|
|
198
|
+
--nb-c-success-surface-border: var(--nb-c-emerald-reflection-200);
|
|
199
|
+
|
|
200
|
+
--nb-c-warning-surface: var(--nb-c-phoenix-flames-100);
|
|
201
|
+
--nb-c-on-warning-surface: var(--nb-c-phoenix-flames-800);
|
|
202
|
+
--nb-c-warning-surface-border: var(--nb-c-phoenix-flames-200);
|
|
203
|
+
|
|
204
|
+
--nb-c-danger-surface: var(--nb-c-chicken-comb-100);
|
|
205
|
+
--nb-c-on-danger-surface: var(--nb-c-chicken-comb-800);
|
|
206
|
+
--nb-c-danger-surface-border: var(--nb-c-chicken-comb-200);
|
|
207
|
+
|
|
208
|
+
--nb-c-neutral-surface: var(--nb-c-nouveau-gray-100);
|
|
209
|
+
--nb-c-on-neutral-surface: var(--nb-c-nouveau-gray-800);
|
|
210
|
+
--nb-c-neutral-surface-border: var(--nb-c-nouveau-gray-200);
|
|
211
|
+
|
|
185
212
|
--nb-c-component-plain: var(--nb-c-nouveau-gray-500);
|
|
186
213
|
--nb-c-component-plain-a11y: var(--nb-c-nouveau-gray-500-a11y);
|
|
187
214
|
--nb-c-component-inactive: var(--nb-c-nouveau-gray-700);
|
|
@@ -210,6 +237,29 @@
|
|
|
210
237
|
// Form field tokens: heights and padding relative to --nb-base-unit (8px)
|
|
211
238
|
--nb-c-field-bg: #{layers.token(layers.$light, field-bg)};
|
|
212
239
|
--nb-c-field-border: #{layers.token(layers.$light, field-border)};
|
|
240
|
+
|
|
241
|
+
// ── Status foregrounds ────────────────────────────────────────────────
|
|
242
|
+
// Drawn as glyphs and outlines directly on a layer surface, so they are
|
|
243
|
+
// held to WCAG 1.4.11 (3:1) against every surface a card paints. These
|
|
244
|
+
// are deliberately separate from --nb-c-success / -warning / -danger,
|
|
245
|
+
// which are FILL colours sized for buttons and carry white text.
|
|
246
|
+
// Measured here against layer-1 / layer-2: 5.19 / 4.42, 5.20 / 4.43,
|
|
247
|
+
// 6.64 / 5.66. Verify any change with scripts/audit-contrast.mjs.
|
|
248
|
+
--nb-c-status-valid: var(--nb-c-emerald-reflection-700);
|
|
249
|
+
--nb-c-status-warning: var(--nb-c-phoenix-flames-700);
|
|
250
|
+
--nb-c-status-error: var(--nb-c-chicken-comb-600);
|
|
251
|
+
|
|
252
|
+
// ── Node graph (NbBlueprint) ──────────────────────────────────────────
|
|
253
|
+
// A port is a control, and it sits OUTSIDE the card on the canvas
|
|
254
|
+
// ground, so its outline is measured against layer-0 rather than the
|
|
255
|
+
// card: field-border gives 5.03 here. port-bg follows the card surface
|
|
256
|
+
// so an unwired pin reads as an empty socket cut into the card.
|
|
257
|
+
--nb-c-port-bg: var(--nb-c-surface);
|
|
258
|
+
--nb-c-port-border: var(--nb-c-field-border);
|
|
259
|
+
// The discrete-event ping. Theme-aware, unlike the #38e0ff it replaces.
|
|
260
|
+
--nb-c-port-signal: var(--nb-c-info);
|
|
261
|
+
// Parameter rows inside a card: one layer deeper than the card itself.
|
|
262
|
+
--nb-c-node-row-bg: var(--nb-c-layer-2);
|
|
213
263
|
// xs is the compact size for dense surfaces (inspectors, toolbars).
|
|
214
264
|
// Distinctly smaller than sm; pair with a 13px field font. See the
|
|
215
265
|
// "Building an inspector" guide in the docs before reaching for it.
|
|
@@ -250,6 +300,20 @@
|
|
|
250
300
|
// ── Radii ─────────────────────────────────────────────────────────────
|
|
251
301
|
// Corner scale, expressed against the 8px base unit so a change to
|
|
252
302
|
// --nb-base-unit rescales rounding with everything else.
|
|
303
|
+
//
|
|
304
|
+
// Which step to reach for. A pill means the thing slides along a track or
|
|
305
|
+
// represents a person. `xs` means a control the user manipulates directly.
|
|
306
|
+
// Anything larger is a container they do not. Under that rule a node card
|
|
307
|
+
// and its ports are controls, not containers, which is why NbBlueprint
|
|
308
|
+
// sits on `xs` rather than on the 10px it used to hard-code.
|
|
309
|
+
//
|
|
310
|
+
// none full-bleed rails, meters, table cells, canvas edges
|
|
311
|
+
// xs buttons, fields, tags, blueprint cards and their ports
|
|
312
|
+
// sm popovers, menus, tooltips, minimap frame
|
|
313
|
+
// md modals, media thumbnails
|
|
314
|
+
// lg inspector panels, coach marks
|
|
315
|
+
// pill toggle tracks and thumbs, avatars, status pills
|
|
316
|
+
--nb-radius-none: 0;
|
|
253
317
|
--nb-radius-xs: calc(var(--nb-base-unit) / 4); // 2px
|
|
254
318
|
--nb-radius-sm: calc(var(--nb-base-unit) / 2); // 4px
|
|
255
319
|
--nb-radius-md: var(--nb-base-unit); // 8px
|
|
@@ -454,6 +518,71 @@
|
|
|
454
518
|
--nb-c-danger: #{colors.get-color('chicken-comb', 400)};
|
|
455
519
|
--nb-c-component-plain: #{colors.get-color('nouveau-gray', 400)};
|
|
456
520
|
|
|
521
|
+
// Status surfaces, inverted. A 100-tint ground is a lamp on a dark page, so
|
|
522
|
+
// dark mode fills with a translucent wash of the status colour over
|
|
523
|
+
// whatever layer is behind it and takes the ink from the light tints. The
|
|
524
|
+
// wash keeps the banner sitting ON the page rather than punching a hole in
|
|
525
|
+
// it, which a flat dark tint does.
|
|
526
|
+
--nb-c-info-surface: color-mix(
|
|
527
|
+
in srgb,
|
|
528
|
+
#{colors.get-color('the-blues-brothers', 400)} 16%,
|
|
529
|
+
transparent
|
|
530
|
+
);
|
|
531
|
+
--nb-c-on-info-surface: #{colors.get-color('the-blues-brothers', 200)};
|
|
532
|
+
--nb-c-info-surface-border: color-mix(
|
|
533
|
+
in srgb,
|
|
534
|
+
#{colors.get-color('the-blues-brothers', 400)} 32%,
|
|
535
|
+
transparent
|
|
536
|
+
);
|
|
537
|
+
|
|
538
|
+
--nb-c-success-surface: color-mix(
|
|
539
|
+
in srgb,
|
|
540
|
+
#{colors.get-color('emerald-reflection', 400)} 16%,
|
|
541
|
+
transparent
|
|
542
|
+
);
|
|
543
|
+
--nb-c-on-success-surface: #{colors.get-color('emerald-reflection', 200)};
|
|
544
|
+
--nb-c-success-surface-border: color-mix(
|
|
545
|
+
in srgb,
|
|
546
|
+
#{colors.get-color('emerald-reflection', 400)} 32%,
|
|
547
|
+
transparent
|
|
548
|
+
);
|
|
549
|
+
|
|
550
|
+
--nb-c-warning-surface: color-mix(
|
|
551
|
+
in srgb,
|
|
552
|
+
#{colors.get-color('phoenix-flames', 400)} 16%,
|
|
553
|
+
transparent
|
|
554
|
+
);
|
|
555
|
+
--nb-c-on-warning-surface: #{colors.get-color('phoenix-flames', 200)};
|
|
556
|
+
--nb-c-warning-surface-border: color-mix(
|
|
557
|
+
in srgb,
|
|
558
|
+
#{colors.get-color('phoenix-flames', 400)} 32%,
|
|
559
|
+
transparent
|
|
560
|
+
);
|
|
561
|
+
|
|
562
|
+
--nb-c-danger-surface: color-mix(
|
|
563
|
+
in srgb,
|
|
564
|
+
#{colors.get-color('chicken-comb', 400)} 16%,
|
|
565
|
+
transparent
|
|
566
|
+
);
|
|
567
|
+
--nb-c-on-danger-surface: #{colors.get-color('chicken-comb', 200)};
|
|
568
|
+
--nb-c-danger-surface-border: color-mix(
|
|
569
|
+
in srgb,
|
|
570
|
+
#{colors.get-color('chicken-comb', 400)} 32%,
|
|
571
|
+
transparent
|
|
572
|
+
);
|
|
573
|
+
|
|
574
|
+
--nb-c-neutral-surface: color-mix(
|
|
575
|
+
in srgb,
|
|
576
|
+
#{colors.get-color('nouveau-gray', 400)} 16%,
|
|
577
|
+
transparent
|
|
578
|
+
);
|
|
579
|
+
--nb-c-on-neutral-surface: #{colors.get-color('nouveau-gray', 200)};
|
|
580
|
+
--nb-c-neutral-surface-border: color-mix(
|
|
581
|
+
in srgb,
|
|
582
|
+
#{colors.get-color('nouveau-gray', 400)} 32%,
|
|
583
|
+
transparent
|
|
584
|
+
);
|
|
585
|
+
|
|
457
586
|
// ── Layer system (dark) ───────────────────────────────────────────────
|
|
458
587
|
// In dark mode, layers get progressively lighter as elevation increases
|
|
459
588
|
--nb-c-layer-0: #{layers.level(layers.$dark, surface, 0)};
|
|
@@ -496,6 +625,16 @@
|
|
|
496
625
|
--nb-c-field-bg: #{layers.token(layers.$dark, field-bg)};
|
|
497
626
|
--nb-c-field-border: #{layers.token(layers.$dark, field-border)};
|
|
498
627
|
|
|
628
|
+
// Status foregrounds. The light values are mid-ramp fills that fall to
|
|
629
|
+
// ~3:1 or below on the dark surfaces, so the dark theme steps up the
|
|
630
|
+
// ramp instead: 8.26 / 6.80, 8.89 / 7.33, 5.99 / 4.94 against
|
|
631
|
+
// layer-1 / layer-2. --nb-c-port-bg, -port-border, -port-signal and
|
|
632
|
+
// -node-row-bg are aliases of tokens that already flip, so they need no
|
|
633
|
+
// override here.
|
|
634
|
+
--nb-c-status-valid: #{colors.get-color('emerald-reflection', 400)};
|
|
635
|
+
--nb-c-status-warning: #{colors.get-color('phoenix-flames', 400)};
|
|
636
|
+
--nb-c-status-error: #{colors.get-color('chicken-comb', 300)};
|
|
637
|
+
|
|
499
638
|
// Discrete
|
|
500
639
|
--nb-c-discrete: #{colors.get-color('nouveau-gray', 700)};
|
|
501
640
|
--nb-c-component-discrete-text: #{colors.get-color('nouveau-gray', 300)};
|