@nubisco/ui 1.50.0 → 1.52.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/Modal.vue.d.ts.map +1 -1
- package/dist/components/Shell.vue.d.ts +6 -1
- package/dist/components/Shell.vue.d.ts.map +1 -1
- package/dist/components/ShellPanel.vue.d.ts.map +1 -1
- package/dist/components/Slider.vue.d.ts.map +1 -1
- package/dist/index.cjs +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +10189 -10140
- package/dist/index.mjs.map +1 -1
- package/dist/ui.css +1 -1
- package/package.json +1 -1
- package/src/styles/grid/_common.scss +3 -2
- package/src/styles/index.scss +1 -0
- package/src/styles/patterns/_inspector.scss +79 -0
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@use 'sass:list';
|
|
2
2
|
@use 'sass:meta';
|
|
3
3
|
@use 'sass:math';
|
|
4
|
+
@use 'sass:string';
|
|
4
5
|
@use '../variables/grid';
|
|
5
6
|
|
|
6
7
|
@function generate-list($value) {
|
|
@@ -17,11 +18,11 @@ $var-columns: generate-list(grid.$grid-columns) !default;
|
|
|
17
18
|
$result: null;
|
|
18
19
|
|
|
19
20
|
@if meta.type-of($index) != number {
|
|
20
|
-
@warn "$index: #{quote($index)} is not a number for `remove-nth`.";
|
|
21
|
+
@warn "$index: #{string.quote($index)} is not a number for `remove-nth`.";
|
|
21
22
|
} @else if $index == 0 {
|
|
22
23
|
@warn "List index 0 must be a non-zero integer for `remove-nth`.";
|
|
23
24
|
} @else if math.abs($index) > list.length($list) {
|
|
24
|
-
@warn "List index is #{$index} but list is only #{length($list)} item long for `remove-nth`.";
|
|
25
|
+
@warn "List index is #{$index} but list is only #{list.length($list)} item long for `remove-nth`.";
|
|
25
26
|
} @else {
|
|
26
27
|
$result: ();
|
|
27
28
|
@if $index < 0 {
|
package/src/styles/index.scss
CHANGED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// ── Inspector pattern ────────────────────────────────────────────────────
|
|
2
|
+
// Apply `.nb-inspector` to a container of stacked NbShellPanels to get the
|
|
3
|
+
// flat, dense, two-column inspector look from the "Building an inspector"
|
|
4
|
+
// guide: strong header caps that separate sections, and label-left /
|
|
5
|
+
// value-right rows sharing one value edge.
|
|
6
|
+
//
|
|
7
|
+
// The point of shipping it here is reuse: every inspector across every
|
|
8
|
+
// product (a node inspector, a control inspector, a settings sidebar) wears
|
|
9
|
+
// one implementation instead of reinventing a sidebar. The field components
|
|
10
|
+
// are converted in place, so no per-field markup change is needed.
|
|
11
|
+
|
|
12
|
+
.nb-inspector {
|
|
13
|
+
// Panels sit flush; the header cap does the separating, so no card gaps
|
|
14
|
+
// waste vertical space (the way dense pro-tool inspectors work).
|
|
15
|
+
--nb-shell-panel-gap: 0;
|
|
16
|
+
// Width of the label column. Override per surface if labels run long.
|
|
17
|
+
--nb-inspector-label-width: 96px;
|
|
18
|
+
|
|
19
|
+
// Header cap: a clearly tinted bar with a top divider, so each section
|
|
20
|
+
// start reads at a glance even though panels are flush. Title is muted
|
|
21
|
+
// STRUCTURE, never content, which reserves full contrast for the values.
|
|
22
|
+
.nb-shell-panel__header {
|
|
23
|
+
background: var(--nb-c-layer-2);
|
|
24
|
+
border-top: 1px solid var(--nb-c-layer-3);
|
|
25
|
+
border-bottom: 1px solid var(--nb-c-bg);
|
|
26
|
+
}
|
|
27
|
+
.nb-shell-panel__title {
|
|
28
|
+
font-weight: 600;
|
|
29
|
+
text-transform: uppercase;
|
|
30
|
+
letter-spacing: 0.06em;
|
|
31
|
+
color: var(--nb-c-text-muted);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Two-column rows: label left (quiet), control right, so every value shares
|
|
35
|
+
// one left edge you scan straight down and each field is half as tall. Only
|
|
36
|
+
// fields that HAVE a label get the two-column grid; a label-less input (e.g.
|
|
37
|
+
// a bare list of text inputs) stays full width instead of gaining a phantom
|
|
38
|
+
// empty label column.
|
|
39
|
+
.nb-text-input:has(> .nb-label),
|
|
40
|
+
.nb-select:has(> .nb-label) {
|
|
41
|
+
display: grid;
|
|
42
|
+
grid-template-columns: var(--nb-inspector-label-width) minmax(0, 1fr);
|
|
43
|
+
align-items: center;
|
|
44
|
+
column-gap: 10px;
|
|
45
|
+
row-gap: 0;
|
|
46
|
+
}
|
|
47
|
+
// A multiline field keeps its tall box, so top-align its label.
|
|
48
|
+
.nb-text-input--multiline {
|
|
49
|
+
align-items: start;
|
|
50
|
+
}
|
|
51
|
+
.nb-text-input .nb-label,
|
|
52
|
+
.nb-select .nb-label {
|
|
53
|
+
font-size: var(--nb-font-size-11, 11px);
|
|
54
|
+
line-height: 1.2;
|
|
55
|
+
color: var(--nb-c-text-muted);
|
|
56
|
+
text-transform: none;
|
|
57
|
+
letter-spacing: 0;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Sliders take the same two-column shape. The default variant's field-box is
|
|
61
|
+
// display:contents, so override it to a block to make it the value cell, and
|
|
62
|
+
// let the track shrink into the narrower column beside its readout.
|
|
63
|
+
.nb-slider:has(> .nb-slider__label) {
|
|
64
|
+
display: grid;
|
|
65
|
+
grid-template-columns: var(--nb-inspector-label-width) minmax(0, 1fr);
|
|
66
|
+
align-items: center;
|
|
67
|
+
column-gap: 10px;
|
|
68
|
+
|
|
69
|
+
.nb-slider__label {
|
|
70
|
+
font-size: var(--nb-font-size-11, 11px);
|
|
71
|
+
line-height: 1.2;
|
|
72
|
+
color: var(--nb-c-text-muted);
|
|
73
|
+
}
|
|
74
|
+
.nb-slider__field-box {
|
|
75
|
+
display: block;
|
|
76
|
+
min-width: 0;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|