@threadlabs/looma 0.26.6 → 0.26.8

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": "@threadlabs/looma",
3
- "version": "0.26.6",
3
+ "version": "0.26.8",
4
4
  "type": "module",
5
5
  "description": "Looma components as HTML, Vue, and plain DOM, with design tokens.",
6
6
  "license": "MIT",
@@ -53,23 +53,26 @@
53
53
  background: var(--ui-surface-raised);
54
54
  }
55
55
 
56
- :scope:where(:has(.title a[href])):hover {
56
+ :scope:where(:has(.title a[href])):hover,
57
+ :scope[data-ui-list-item-state~="highlighted"],
58
+ :scope[data-ui-list-item-state~="current"] {
57
59
  background: var(--ui-selection-surface);
60
+ box-shadow: inset 0 0 0 var(--ui-border-width) var(--ui-selection-border);
58
61
  }
59
62
 
60
63
  :scope[data-ui-list-item-state~="variant=card"]:where(:has(.title a[href])):hover {
61
64
  border-color: var(--ui-border-strong);
62
65
  }
63
66
 
64
- :scope[data-ui-list-item-state~="highlighted"] {
65
- background: var(--ui-selection-surface);
66
- }
67
-
68
67
  :scope[data-ui-list-item-state~="current"] {
69
- background: var(--ui-selection-surface);
70
68
  color: var(--ui-selection-text);
71
69
  }
72
70
 
71
+ /* Framed cards already have their own edge; the stronger focus ring stays separate. */
72
+ :scope[data-ui-list-item-state~="variant=card"] {
73
+ box-shadow: none;
74
+ }
75
+
73
76
  :scope:has(.title a[href]:focus-visible) {
74
77
  box-shadow: 0 0 0 var(--ui-focus-width) var(--ui-focus-ring);
75
78
  }
@@ -186,6 +189,8 @@
186
189
  a router, a modified click, and "open in new tab" all work. Trailing controls sit above it and
187
190
  stay their own. */
188
191
 
192
+ /* Framed cards already have their own edge; the stronger focus ring stays separate. */
193
+
189
194
  /* An explicitly independent leading control sits above the stretched row link. */
190
195
 
191
196
  /* Trailing controls take their own clicks, above the title link's stretched hit area. */
@@ -66,6 +66,11 @@
66
66
  color: var(--ui-selection-text);
67
67
  }
68
68
 
69
+ /* A complete inset edge separates pale fills without changing rail geometry. */
70
+ :scope[data-ui-nav-item-state~="variant=surface"]:is(:hover, [aria-current]) {
71
+ box-shadow: inset 0 0 0 var(--ui-border-width) var(--ui-selection-border);
72
+ }
73
+
69
74
  :scope[data-ui-nav-item-state~="variant=line"] {
70
75
  border-radius: 0;
71
76
  }
@@ -177,6 +182,8 @@
177
182
  /* The ring is an outline, drawn inside the item: forced colors keep an outline where they drop a
178
183
  box shadow, and a scrolling rail cannot clip a ring that stays within the item. */
179
184
 
185
+ /* A complete inset edge separates pale fills without changing rail geometry. */
186
+
180
187
  /* A line treatment has straight corners and a continuous edge. Surface treatment has
181
188
  shared rounded corners and no edge marker; never combine the two geometries.
182
189
  The line is a border, not a fill: forced colors replace backgrounds but keep a
@@ -70,12 +70,14 @@
70
70
  .row:focus-within {
71
71
  color: var(--ui-text-primary);
72
72
  background: var(--ui-surface-muted);
73
+ box-shadow: inset 0 0 0 var(--ui-border-width) var(--ui-selection-border);
73
74
  }
74
75
 
75
76
  /* Selection is the same surface recipe as destination and choice rows. */
76
77
  :scope[data-ui-tree-item-state~="selected"] > .row {
77
78
  color: var(--ui-selection-text);
78
79
  background: var(--ui-selection-surface);
80
+ box-shadow: inset 0 0 0 var(--ui-border-width) var(--ui-selection-border);
79
81
  }
80
82
  :scope[data-ui-tree-item-state~="selected"]:not([aria-disabled="true"]) > .row > .leading {
81
83
  color: var(--ui-selection-text);
@@ -84,6 +86,7 @@
84
86
  :scope[data-ui-tree-item-state~="disabled"] .row {
85
87
  color: var(--ui-disabled-text);
86
88
  background: var(--ui-disabled-surface);
89
+ box-shadow: none;
87
90
  }
88
91
 
89
92
  :scope[data-dragging]:not([data-move-source]) .row {
package/tokens.css CHANGED
@@ -184,6 +184,7 @@
184
184
  /* One quiet selection recipe for destination/content rows. Hue derives from the brand;
185
185
  corners derive from the scale, and selected labels retain their resting weight. */
186
186
  --ui-selection-surface: color-mix(in oklab, var(--ui-accent) 6%, var(--ui-surface));
187
+ --ui-selection-border: color-mix(in oklab, var(--ui-accent) 20%, var(--ui-surface));
187
188
  --ui-selection-text: var(--ui-accent-subtle-text);
188
189
  --ui-selection-radius: var(--ui-radius-md);
189
190
  --ui-nav-icon-size: var(--ui-font-size-md);
@@ -280,8 +280,11 @@ const hostState = computed(() =>
280
280
  background: var(--ui-surface-raised);
281
281
  }
282
282
 
283
- [data-component~="ui-list-item"]:where(:has(.title a[href])):hover {
283
+ [data-component~="ui-list-item"]:where(:has(.title a[href])):hover,
284
+ [data-component~="ui-list-item"][data-ui-list-item-state~="highlighted"],
285
+ [data-component~="ui-list-item"][data-ui-list-item-state~="current"] {
284
286
  background: var(--ui-selection-surface);
287
+ box-shadow: inset 0 0 0 var(--ui-border-width) var(--ui-selection-border);
285
288
  }
286
289
 
287
290
  [data-component~="ui-list-item"][data-ui-list-item-state~="variant=card"]:where(:has(.title
@@ -289,15 +292,15 @@ const hostState = computed(() =>
289
292
  border-color: var(--ui-border-strong);
290
293
  }
291
294
 
292
- [data-component~="ui-list-item"][data-ui-list-item-state~="highlighted"] {
293
- background: var(--ui-selection-surface);
294
- }
295
-
296
295
  [data-component~="ui-list-item"][data-ui-list-item-state~="current"] {
297
- background: var(--ui-selection-surface);
298
296
  color: var(--ui-selection-text);
299
297
  }
300
298
 
299
+ /* Framed cards already have their own edge; the stronger focus ring stays separate. */
300
+ [data-component~="ui-list-item"][data-ui-list-item-state~="variant=card"] {
301
+ box-shadow: none;
302
+ }
303
+
301
304
  [data-component~="ui-list-item"]:has(.title a[href]:focus-visible) {
302
305
  box-shadow: 0 0 0 var(--ui-focus-width) var(--ui-focus-ring);
303
306
  }
package/vue/UiNavItem.vue CHANGED
@@ -439,6 +439,11 @@ function concat<T extends unknown[]>(...values: T): ConcatResult<T> {
439
439
  color: var(--ui-selection-text);
440
440
  }
441
441
 
442
+ /* A complete inset edge separates pale fills without changing rail geometry. */
443
+ [data-component~="ui-nav-item"][data-ui-nav-item-state~="variant=surface"]:is(:hover, [aria-current]) {
444
+ box-shadow: inset 0 0 0 var(--ui-border-width) var(--ui-selection-border);
445
+ }
446
+
442
447
  [data-component~="ui-nav-item"][data-ui-nav-item-state~="variant=line"] {
443
448
  border-radius: 0;
444
449
  }
@@ -778,12 +778,14 @@ function concat<T extends unknown[]>(...values: T): ConcatResult<T> {
778
778
  .row:focus-within {
779
779
  color: var(--ui-text-primary);
780
780
  background: var(--ui-surface-muted);
781
+ box-shadow: inset 0 0 0 var(--ui-border-width) var(--ui-selection-border);
781
782
  }
782
783
 
783
784
  /* Selection is the same surface recipe as destination and choice rows. */
784
785
  [data-component~="ui-tree-item"][data-ui-tree-item-state~="selected"] > .row {
785
786
  color: var(--ui-selection-text);
786
787
  background: var(--ui-selection-surface);
788
+ box-shadow: inset 0 0 0 var(--ui-border-width) var(--ui-selection-border);
787
789
  }
788
790
  [data-component~="ui-tree-item"][data-ui-tree-item-state~="selected"]:not([aria-disabled="true"])
789
791
  > .row
@@ -794,6 +796,7 @@ function concat<T extends unknown[]>(...values: T): ConcatResult<T> {
794
796
  [data-component~="ui-tree-item"][data-ui-tree-item-state~="disabled"] .row {
795
797
  color: var(--ui-disabled-text);
796
798
  background: var(--ui-disabled-surface);
799
+ box-shadow: none;
797
800
  }
798
801
 
799
802
  [data-component~="ui-tree-item"][data-dragging]:not([data-move-source]) .row {
@@ -203,6 +203,6 @@ var UiListItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
203
203
  }]]);
204
204
  };
205
205
  }
206
- }), [["__scopeId", "data-v-6c3bc8f3"]]);
206
+ }), [["__scopeId", "data-v-deeac109"]]);
207
207
  //#endregion
208
208
  export { UiListItem_default as t };
@@ -357,6 +357,6 @@ var UiNavItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
357
357
  }]]);
358
358
  };
359
359
  }
360
- }), [["__scopeId", "data-v-5ff984a2"]]);
360
+ }), [["__scopeId", "data-v-e4b23866"]]);
361
361
  //#endregion
362
362
  export { UiNavItem_default as t };
@@ -699,6 +699,6 @@ var UiTreeItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
699
699
  }]]);
700
700
  };
701
701
  }
702
- }), [["__scopeId", "data-v-9fa5fb80"]]);
702
+ }), [["__scopeId", "data-v-b69b9249"]]);
703
703
  //#endregion
704
704
  export { UiTreeItem_default as t };