@threadlabs/looma 0.10.6 → 0.10.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/components/ui-avatar/ui-avatar.html +1 -1
- package/components/ui-combobox/ui-combobox.js +2 -1
- package/components/ui-tree-item/ui-tree-item.js +9 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/styles/ui-avatar.css +1 -1
- package/vue/UiAvatar.vue +1 -1
- package/vue/chunks/UiAvatar.js +1 -1
- package/vue/components.css +7 -7
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
border-radius: 999px;
|
|
32
32
|
border: 1px solid var(--ui-avatar-border, var(--ui-border-strong));
|
|
33
33
|
background: var(--ui-avatar-surface, var(--ui-accent-soft));
|
|
34
|
-
color: var(--ui-avatar-text, var(--ui-accent-solid));
|
|
34
|
+
color: var(--ui-avatar-text, var(--ui-accent-subtle-text, var(--ui-accent-solid)));
|
|
35
35
|
font: inherit;
|
|
36
36
|
font-size: var(--ui-font-size-sm);
|
|
37
37
|
font-weight: 600;
|
|
@@ -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
|
};
|
|
@@ -9,6 +9,14 @@ function parentItem(element) {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
/** Synchronizes an inferred tree hierarchy after nested component lowering. */
|
|
12
|
+
// What a row click leaves alone: a control, or anything inside one, such as an item of the options
|
|
13
|
+
// menu a row holds. Clicking those neither follows the row's link nor toggles a branch.
|
|
14
|
+
const CONTROLS = [
|
|
15
|
+
"a", "button", "input", "select", "textarea", "label", "summary", '[contenteditable=""]', '[contenteditable="true"]',
|
|
16
|
+
...["button", "link", "menu", "menuitem", "menuitemcheckbox", "menuitemradio", "listbox", "option", "checkbox",
|
|
17
|
+
"radio", "switch", "tab", "slider", "spinbutton", "combobox", "textbox", "dialog"].map((role) => `[role="${role}"]`),
|
|
18
|
+
].join(", ");
|
|
19
|
+
|
|
12
20
|
export default function controller(host) {
|
|
13
21
|
const element = host.element;
|
|
14
22
|
const { row, disclosure, children, actions, labelText } = host.refs;
|
|
@@ -60,7 +68,7 @@ export default function controller(host) {
|
|
|
60
68
|
const onDisclosureClick = (event) => { event.stopPropagation(); setExpanded(!Boolean(host.state.internalExpanded), triggerFor(event)); };
|
|
61
69
|
const onRowClick = (event) => {
|
|
62
70
|
if (host.state.disabled) return;
|
|
63
|
-
const interactive = event.composedPath().some((node) => node instanceof HTMLElement && node.matches?.(
|
|
71
|
+
const interactive = event.composedPath().some((node) => node instanceof HTMLElement && node.matches?.(CONTROLS));
|
|
64
72
|
if (interactive) return;
|
|
65
73
|
if (isContainer()) {
|
|
66
74
|
setExpanded(!Boolean(host.state.internalExpanded), triggerFor(event));
|