@threadlabs/looma 0.10.5 → 0.10.7
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/components/ui-combobox/ui-combobox.js +2 -1
- package/components/ui-tree-item/ui-tree-item.html +20 -6
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/styles/ui-tree-item.css +25 -6
- package/vue/UiTreeItem.vue +21 -6
- package/vue/chunks/UiTreeItem.js +6 -2
- package/vue/components.css +81 -68
|
@@ -139,7 +139,8 @@ export default function controller(host) {
|
|
|
139
139
|
// When nothing matches what was typed, the offer to create it is the only choice, so it is
|
|
140
140
|
// the one Enter makes, and it is highlighted as such.
|
|
141
141
|
if (query && !host.state.rows.some((row) => !row.disabled) && canCreate()) host.state.active = host.state.rows.length;
|
|
142
|
-
|
|
142
|
+
// Options in their declared shape: a row's `selected` flag is the list's own view state.
|
|
143
|
+
host.dispatch("options-change", host.state.rows.map(asItem));
|
|
143
144
|
};
|
|
144
145
|
applyOptions(current.options);
|
|
145
146
|
};
|
|
@@ -380,19 +380,23 @@
|
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
382
|
|
|
383
|
+
/* The handle sits beside what it drags. A leaf row has no disclosure, so the handle takes that
|
|
384
|
+
empty column, right before the icon; a branch's disclosure is there, so its handle sits just
|
|
385
|
+
outside the row. It is bare until pointed at: a resting surface behind it read as a faint
|
|
386
|
+
patch rather than as a control. */
|
|
383
387
|
.drag-handle {
|
|
384
388
|
position: absolute;
|
|
385
389
|
z-index: 2;
|
|
386
390
|
inset-block-start: 50%;
|
|
387
|
-
inset-inline-start:
|
|
388
|
-
inline-size:
|
|
389
|
-
block-size:
|
|
391
|
+
inset-inline-start: 0;
|
|
392
|
+
inline-size: var(--_tree-disclosure-size);
|
|
393
|
+
block-size: 24px;
|
|
390
394
|
display: grid;
|
|
391
395
|
place-items: center;
|
|
392
|
-
padding:
|
|
396
|
+
padding: 5px 2px;
|
|
393
397
|
color: var(--ui-text-muted);
|
|
394
|
-
background:
|
|
395
|
-
border:
|
|
398
|
+
background: transparent;
|
|
399
|
+
border: 0;
|
|
396
400
|
border-radius: var(--ui-radius-sm);
|
|
397
401
|
cursor: grab;
|
|
398
402
|
/* Hidden until the row is hovered, but always hittable: the handle sits outside the row, and moving
|
|
@@ -409,6 +413,16 @@
|
|
|
409
413
|
opacity: 1;
|
|
410
414
|
}
|
|
411
415
|
|
|
416
|
+
:host-state([isContainer]) > .row > .drag-handle {
|
|
417
|
+
inset-inline-start: calc(-1 * var(--_tree-disclosure-size) - 2px);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.drag-handle:hover,
|
|
421
|
+
.drag-handle:focus-visible {
|
|
422
|
+
color: var(--ui-text-primary);
|
|
423
|
+
background: var(--ui-surface-hover);
|
|
424
|
+
}
|
|
425
|
+
|
|
412
426
|
.drag-handle:active {
|
|
413
427
|
cursor: grabbing;
|
|
414
428
|
}
|