@nubisco/ui 1.50.0 → 1.51.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": "@nubisco/ui",
3
- "version": "1.50.0",
3
+ "version": "1.51.0",
4
4
  "description": "Vue 3 UI component library",
5
5
  "packageManager": "pnpm@11.0.8",
6
6
  "repository": {
@@ -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 {
@@ -7,6 +7,7 @@
7
7
  @use 'theme';
8
8
  @use 'typography';
9
9
  @use 'utils';
10
+ @use 'patterns/inspector';
10
11
 
11
12
  @include theme.base;
12
13
  @include theme.classes;
@@ -0,0 +1,56 @@
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.
36
+ .nb-text-input,
37
+ .nb-select {
38
+ display: grid;
39
+ grid-template-columns: var(--nb-inspector-label-width) minmax(0, 1fr);
40
+ align-items: center;
41
+ column-gap: 10px;
42
+ row-gap: 0;
43
+ }
44
+ // A multiline field keeps its tall box, so top-align its label.
45
+ .nb-text-input--multiline {
46
+ align-items: start;
47
+ }
48
+ .nb-text-input .nb-label,
49
+ .nb-select .nb-label {
50
+ font-size: var(--nb-font-size-11, 11px);
51
+ line-height: 1.2;
52
+ color: var(--nb-c-text-muted);
53
+ text-transform: none;
54
+ letter-spacing: 0;
55
+ }
56
+ }