@threadlabs/looma 0.12.6 → 0.13.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/components/ui-action-bar/ui-action-bar.html +10 -1
- package/components/ui-avatar/ui-avatar.html +18 -0
- package/components/ui-avatar-group/ui-avatar-group.html +16 -2
- package/components/ui-badge/ui-badge.html +42 -0
- package/components/ui-button/ui-button.html +70 -0
- package/components/ui-callout/ui-callout.html +55 -4
- package/components/ui-checkbox/ui-checkbox.html +16 -3
- package/components/ui-cluster/ui-cluster.html +7 -1
- package/components/ui-combobox/ui-combobox.html +66 -12
- package/components/ui-container/ui-container.html +12 -1
- package/components/ui-context-menu/ui-context-menu.html +10 -1
- package/components/ui-dialog/ui-dialog.html +21 -4
- package/components/ui-disclosure/ui-disclosure.html +23 -4
- package/components/ui-editable/ui-editable.html +1 -1
- package/components/ui-editor-slash-menu/ui-editor-slash-menu.html +2 -2
- package/components/ui-editor-table-context-menu/ui-editor-table-context-menu.html +2 -2
- package/components/ui-editor-table-overlay/ui-editor-table-overlay.html +8 -8
- package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.html +3 -3
- package/components/ui-floating-action-button/ui-floating-action-button.html +14 -0
- package/components/ui-form-field/ui-form-field.html +10 -1
- package/components/ui-grid/ui-grid.html +11 -1
- package/components/ui-icon/ui-icon.html +17 -3
- package/components/ui-icon-button/ui-icon-button.html +81 -3
- package/components/ui-input/ui-input.html +68 -13
- package/components/ui-input-group/ui-input-group.html +14 -13
- package/components/ui-list/ui-list.html +10 -0
- package/components/ui-list-item/ui-list-item.html +22 -1
- package/components/ui-menu/ui-menu.html +17 -5
- package/components/ui-menu-item/ui-menu-item.html +30 -3
- package/components/ui-nav-item/ui-nav-item.html +14 -0
- package/components/ui-popover/ui-popover.html +6 -0
- package/components/ui-radio/ui-radio.html +16 -3
- package/components/ui-reel/ui-reel.html +15 -2
- package/components/ui-search-result-row/ui-search-result-row.html +34 -0
- package/components/ui-search-shell/ui-search-shell.html +65 -11
- package/components/ui-select/ui-select.html +15 -1
- package/components/ui-separator/ui-separator.html +9 -2
- package/components/ui-sidebar/ui-sidebar.html +22 -1
- package/components/ui-stack/ui-stack.html +7 -1
- package/components/ui-switch/ui-switch.html +21 -3
- package/components/ui-switcher/ui-switcher.html +18 -5
- package/components/ui-tabs/ui-tabs.html +21 -2
- package/components/ui-textarea/ui-textarea.html +15 -1
- package/components/ui-toast-region/ui-toast-region.html +16 -2
- package/components/ui-tooltip/ui-tooltip.html +62 -13
- package/components/ui-top-bar/ui-top-bar.html +34 -1
- package/components/ui-tree/ui-tree.html +27 -4
- package/components/ui-tree-item/ui-tree-item.html +39 -10
- package/components/ui-tree-item/ui-tree-item.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/styles/ui-action-bar.css +14 -3
- package/styles/ui-avatar-group.css +20 -4
- package/styles/ui-avatar.css +22 -2
- package/styles/ui-badge.css +46 -2
- package/styles/ui-button.css +74 -2
- package/styles/ui-callout.css +59 -6
- package/styles/ui-checkbox.css +20 -5
- package/styles/ui-cluster.css +10 -2
- package/styles/ui-combobox.css +69 -14
- package/styles/ui-container.css +14 -2
- package/styles/ui-context-menu.css +14 -3
- package/styles/ui-dialog.css +25 -6
- package/styles/ui-disclosure.css +27 -6
- package/styles/ui-editable.css +1 -1
- package/styles/ui-editor-slash-menu.css +2 -2
- package/styles/ui-editor-table-context-menu.css +2 -2
- package/styles/ui-editor-table-overlay.css +8 -8
- package/styles/ui-editor-table-toolbar.css +3 -3
- package/styles/ui-floating-action-button.css +18 -2
- package/styles/ui-form-field.css +14 -3
- package/styles/ui-grid.css +14 -2
- package/styles/ui-icon-button.css +85 -5
- package/styles/ui-icon.css +21 -5
- package/styles/ui-input-group.css +14 -13
- package/styles/ui-input.css +73 -15
- package/styles/ui-list-item.css +26 -3
- package/styles/ui-list.css +14 -2
- package/styles/ui-menu-item.css +34 -5
- package/styles/ui-menu.css +21 -6
- package/styles/ui-nav-item.css +18 -2
- package/styles/ui-popover.css +10 -2
- package/styles/ui-radio.css +20 -5
- package/styles/ui-reel.css +18 -3
- package/styles/ui-search-result-row.css +38 -2
- package/styles/ui-search-shell.css +69 -13
- package/styles/ui-select.css +19 -3
- package/styles/ui-separator.css +14 -2
- package/styles/ui-sidebar.css +26 -3
- package/styles/ui-stack.css +10 -2
- package/styles/ui-switch.css +25 -5
- package/styles/ui-switcher.css +21 -6
- package/styles/ui-tabs.css +25 -4
- package/styles/ui-textarea.css +19 -3
- package/styles/ui-toast-region.css +20 -4
- package/styles/ui-tooltip.css +66 -15
- package/styles/ui-top-bar.css +38 -3
- package/styles/ui-tree-item.css +43 -12
- package/styles/ui-tree.css +33 -6
- package/theme-dark.css +1 -1
- package/theme-light.css +1 -1
- package/tokens.css +8 -6
- package/vue/UiActionBar.vue +12 -3
- package/vue/UiAvatar.vue +18 -0
- package/vue/UiAvatarGroup.vue +16 -2
- package/vue/UiBadge.vue +42 -0
- package/vue/UiButton.vue +70 -0
- package/vue/UiCallout.vue +55 -4
- package/vue/UiCheckbox.vue +16 -3
- package/vue/UiCluster.vue +6 -0
- package/vue/UiCombobox.vue +66 -12
- package/vue/UiContainer.vue +10 -0
- package/vue/UiContextMenu.vue +10 -1
- package/vue/UiDialog.vue +21 -4
- package/vue/UiDisclosure.vue +23 -4
- package/vue/UiEditable.vue +1 -1
- package/vue/UiEditorSlashMenu.vue +2 -2
- package/vue/UiEditorTableContextMenu.vue +2 -2
- package/vue/UiEditorTableOverlay.vue +8 -8
- package/vue/UiEditorTableToolbar.vue +3 -3
- package/vue/UiFloatingActionButton.vue +14 -0
- package/vue/UiFormField.vue +10 -1
- package/vue/UiGrid.vue +10 -0
- package/vue/UiIcon.vue +17 -3
- package/vue/UiIconButton.vue +81 -3
- package/vue/UiInput.vue +90 -15
- package/vue/UiInputGroup.vue +14 -13
- package/vue/UiList.vue +12 -2
- package/vue/UiListItem.vue +30 -9
- package/vue/UiMenu.vue +17 -5
- package/vue/UiMenuItem.vue +42 -4
- package/vue/UiNavItem.vue +17 -3
- package/vue/UiPopover.vue +6 -0
- package/vue/UiRadio.vue +16 -3
- package/vue/UiReel.vue +14 -1
- package/vue/UiSearchResultRow.vue +34 -0
- package/vue/UiSearchShell.vue +66 -12
- package/vue/UiSelect.vue +15 -1
- package/vue/UiSeparator.vue +9 -2
- package/vue/UiSidebar.vue +22 -1
- package/vue/UiStack.vue +6 -0
- package/vue/UiSwitch.vue +21 -3
- package/vue/UiSwitcher.vue +17 -4
- package/vue/UiTabs.vue +22 -3
- package/vue/UiTextarea.vue +15 -1
- package/vue/UiToastRegion.vue +16 -2
- package/vue/UiTooltip.vue +62 -13
- package/vue/UiTopBar.vue +34 -1
- package/vue/UiTree.vue +28 -5
- package/vue/UiTreeItem.vue +46 -11
- package/vue/chunks/UiActionBar.js +1 -1
- package/vue/chunks/UiAvatar.js +1 -1
- package/vue/chunks/UiAvatarGroup.js +1 -1
- package/vue/chunks/UiBadge.js +1 -1
- package/vue/chunks/UiButton.js +1 -1
- package/vue/chunks/UiCallout.js +1 -1
- package/vue/chunks/UiCheckbox.js +1 -1
- package/vue/chunks/UiCluster.js +1 -1
- package/vue/chunks/UiCombobox.js +1 -1
- package/vue/chunks/UiContainer.js +1 -1
- package/vue/chunks/UiContextMenu.js +1 -1
- package/vue/chunks/UiDialog.js +1 -1
- package/vue/chunks/UiDisclosure.js +1 -1
- package/vue/chunks/UiEditable.js +1 -1
- package/vue/chunks/UiEditorSlashMenu.js +1 -1
- package/vue/chunks/UiEditorTableContextMenu.js +1 -1
- package/vue/chunks/UiEditorTableOverlay.js +1 -1
- package/vue/chunks/UiEditorTableToolbar.js +1 -1
- package/vue/chunks/UiFloatingActionButton.js +1 -1
- package/vue/chunks/UiFormField.js +1 -1
- package/vue/chunks/UiGrid.js +1 -1
- package/vue/chunks/UiIcon.js +1 -1
- package/vue/chunks/UiIconButton.js +1 -1
- package/vue/chunks/UiInput.js +1 -1
- package/vue/chunks/UiInputGroup.js +1 -1
- package/vue/chunks/UiList.js +1 -1
- package/vue/chunks/UiListItem.js +1 -1
- package/vue/chunks/UiMenu.js +1 -1
- package/vue/chunks/UiMenuItem.js +1 -1
- package/vue/chunks/UiNavItem.js +1 -1
- package/vue/chunks/UiPopover.js +1 -1
- package/vue/chunks/UiRadio.js +1 -1
- package/vue/chunks/UiReel.js +1 -1
- package/vue/chunks/UiSearchResultRow.js +1 -1
- package/vue/chunks/UiSearchShell.js +1 -1
- package/vue/chunks/UiSelect.js +1 -1
- package/vue/chunks/UiSeparator.js +1 -1
- package/vue/chunks/UiSidebar.js +1 -1
- package/vue/chunks/UiStack.js +1 -1
- package/vue/chunks/UiSwitch.js +1 -1
- package/vue/chunks/UiSwitcher.js +1 -1
- package/vue/chunks/UiTabs.js +1 -1
- package/vue/chunks/UiTextarea.js +1 -1
- package/vue/chunks/UiToastRegion.js +1 -1
- package/vue/chunks/UiTooltip.js +1 -1
- package/vue/chunks/UiTopBar.js +1 -1
- package/vue/chunks/UiTree.js +1 -1
- package/vue/chunks/UiTreeItem.js +1 -1
- package/vue/components.css +1959 -927
|
@@ -23,19 +23,42 @@
|
|
|
23
23
|
</defs>
|
|
24
24
|
<div role="tree"><slot></slot></div>
|
|
25
25
|
<style>
|
|
26
|
+
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
27
|
+
@property --ui-tree-drop-color {
|
|
28
|
+
syntax: "*";
|
|
29
|
+
inherits: false;
|
|
30
|
+
}
|
|
31
|
+
@property --ui-tree-gutter {
|
|
32
|
+
syntax: "*";
|
|
33
|
+
inherits: false;
|
|
34
|
+
}
|
|
35
|
+
@property --ui-tree-indent {
|
|
36
|
+
syntax: "*";
|
|
37
|
+
inherits: false;
|
|
38
|
+
}
|
|
39
|
+
|
|
26
40
|
/* Reaches the items the way density does, so the setting lives on the tree the way a reader
|
|
27
41
|
thinks about it: this list scrolls its long names. */
|
|
28
42
|
:host-state([marquee]) {
|
|
29
|
-
--
|
|
43
|
+
--_ui-default-tree-item-marquee: 1;
|
|
30
44
|
}
|
|
31
45
|
|
|
46
|
+
/* The items' defaults for this density: an item's own hook still wins. */
|
|
32
47
|
:host-state([density="compact"]) {
|
|
33
|
-
--
|
|
34
|
-
--
|
|
35
|
-
--
|
|
48
|
+
--_ui-default-tree-item-min-block-size: var(--ui-control-size-sm);
|
|
49
|
+
--_ui-default-tree-item-font-size: var(--ui-font-size-sm);
|
|
50
|
+
--_ui-default-tree-item-label-padding-block: 0;
|
|
36
51
|
}
|
|
37
52
|
|
|
38
53
|
:host {
|
|
54
|
+
/* Hooks do not inherit: the tree hands its own to its items here, and a tree nested in an item
|
|
55
|
+
starts again from its own settings. */
|
|
56
|
+
--_ui-tree-indent: var(--ui-tree-indent);
|
|
57
|
+
--_ui-tree-drop-color: var(--ui-tree-drop-color);
|
|
58
|
+
--_ui-default-tree-item-marquee: initial;
|
|
59
|
+
--_ui-default-tree-item-min-block-size: initial;
|
|
60
|
+
--_ui-default-tree-item-font-size: initial;
|
|
61
|
+
--_ui-default-tree-item-label-padding-block: initial;
|
|
39
62
|
display: block;
|
|
40
63
|
min-inline-size: 0;
|
|
41
64
|
padding-inline-start: var(--ui-tree-gutter, 0px);
|
|
@@ -94,14 +94,43 @@
|
|
|
94
94
|
<span class="drop-indicator subtree-drop-indicator" aria-hidden="true"></span>
|
|
95
95
|
</div>
|
|
96
96
|
<style>
|
|
97
|
+
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
98
|
+
@property --ui-tree-item-depth {
|
|
99
|
+
syntax: "*";
|
|
100
|
+
inherits: false;
|
|
101
|
+
}
|
|
102
|
+
@property --ui-tree-item-font-size {
|
|
103
|
+
syntax: "*";
|
|
104
|
+
inherits: false;
|
|
105
|
+
}
|
|
106
|
+
@property --ui-tree-item-label-padding-block {
|
|
107
|
+
syntax: "*";
|
|
108
|
+
inherits: false;
|
|
109
|
+
}
|
|
110
|
+
@property --ui-tree-item-label-padding-inline {
|
|
111
|
+
syntax: "*";
|
|
112
|
+
inherits: false;
|
|
113
|
+
}
|
|
114
|
+
@property --ui-tree-item-min-block-size {
|
|
115
|
+
syntax: "*";
|
|
116
|
+
inherits: false;
|
|
117
|
+
}
|
|
118
|
+
|
|
97
119
|
:host {
|
|
120
|
+
/* Hooks do not inherit, so the parts below read them from the root. The tree's density
|
|
121
|
+
sets the defaults, in --_ui-default-*. */
|
|
122
|
+
--_ui-tree-item-min-block-size: var(--ui-tree-item-min-block-size, var(--_ui-default-tree-item-min-block-size));
|
|
123
|
+
--_ui-tree-item-font-size: var(--ui-tree-item-font-size, var(--_ui-default-tree-item-font-size));
|
|
124
|
+
--_ui-tree-item-label-padding-block: var(--ui-tree-item-label-padding-block, var(--_ui-default-tree-item-label-padding-block));
|
|
125
|
+
--_ui-tree-item-label-padding-inline: var(--ui-tree-item-label-padding-inline);
|
|
126
|
+
|
|
98
127
|
--_tree-row-min-height: 32px;
|
|
99
128
|
--_tree-disclosure-size: 16px;
|
|
100
129
|
|
|
101
130
|
position: relative;
|
|
102
131
|
display: block;
|
|
103
132
|
min-inline-size: 0;
|
|
104
|
-
margin-inline-start: calc(var(--ui-tree-item-depth, 0) * var(--
|
|
133
|
+
margin-inline-start: calc(var(--ui-tree-item-depth, 0) * var(--_ui-tree-indent, 16px));
|
|
105
134
|
}
|
|
106
135
|
|
|
107
136
|
.row {
|
|
@@ -109,9 +138,9 @@
|
|
|
109
138
|
display: grid;
|
|
110
139
|
grid-template-columns: var(--_tree-disclosure-size) auto minmax(0, 1fr);
|
|
111
140
|
align-items: center;
|
|
112
|
-
min-block-size: var(--
|
|
141
|
+
min-block-size: var(--_ui-tree-item-min-block-size, var(--_tree-row-min-height));
|
|
113
142
|
min-inline-size: 0;
|
|
114
|
-
font-size: var(--
|
|
143
|
+
font-size: var(--_ui-tree-item-font-size, var(--ui-font-size-sm));
|
|
115
144
|
border-radius: var(--ui-radius-md);
|
|
116
145
|
color: var(--ui-text-secondary);
|
|
117
146
|
transition:
|
|
@@ -148,7 +177,7 @@
|
|
|
148
177
|
/* Child combinators: drop feedback belongs to this item's own row, not the rows nested in it. */
|
|
149
178
|
:host[data-drop-position="inside"] > .row {
|
|
150
179
|
background: var(--ui-accent-subtle);
|
|
151
|
-
box-shadow: inset 0 0 0 1px var(--
|
|
180
|
+
box-shadow: inset 0 0 0 1px var(--_ui-tree-drop-color, var(--ui-accent-solid));
|
|
152
181
|
}
|
|
153
182
|
|
|
154
183
|
.disclosure,
|
|
@@ -250,7 +279,7 @@
|
|
|
250
279
|
min-inline-size: 0;
|
|
251
280
|
/* The cell clips: a name longer than the row slides inside it rather than over its icons. */
|
|
252
281
|
overflow: hidden;
|
|
253
|
-
padding: var(--
|
|
282
|
+
padding: var(--_ui-tree-item-label-padding-block, var(--ui-space-1)) var(--_ui-tree-item-label-padding-inline, var(--ui-space-2));
|
|
254
283
|
/* The length of the fade before the controls. The label's one flex child lays out no gap; this
|
|
255
284
|
is where the controller reads the length in pixels to stop a sliding name before the fade. */
|
|
256
285
|
column-gap: var(--ui-space-3);
|
|
@@ -312,11 +341,11 @@
|
|
|
312
341
|
under the icon rather than stopping at a hard edge beside it. */
|
|
313
342
|
.row[data-ui-marquee] > .label {
|
|
314
343
|
margin-inline-start: calc(-1 * var(--_marquee-lead, 0px));
|
|
315
|
-
padding-inline-start: calc(var(--_marquee-lead, 0px) + var(--
|
|
344
|
+
padding-inline-start: calc(var(--_marquee-lead, 0px) + var(--_ui-tree-item-label-padding-inline, var(--ui-space-2)));
|
|
316
345
|
mask-image: linear-gradient(
|
|
317
346
|
to right,
|
|
318
347
|
transparent calc(var(--_marquee-lead, 0px) / 2),
|
|
319
|
-
#000 calc(var(--_marquee-lead, 0px) + var(--
|
|
348
|
+
#000 calc(var(--_marquee-lead, 0px) + var(--_ui-tree-item-label-padding-inline, var(--ui-space-2))),
|
|
320
349
|
#000 calc(100% - var(--_tree-actions-width, 1.75rem) - var(--ui-space-3)),
|
|
321
350
|
transparent calc(100% - var(--_tree-actions-width, 1.75rem))
|
|
322
351
|
);
|
|
@@ -326,7 +355,7 @@
|
|
|
326
355
|
mask-image: linear-gradient(
|
|
327
356
|
to left,
|
|
328
357
|
transparent calc(var(--_marquee-lead, 0px) / 2),
|
|
329
|
-
#000 calc(var(--_marquee-lead, 0px) + var(--
|
|
358
|
+
#000 calc(var(--_marquee-lead, 0px) + var(--_ui-tree-item-label-padding-inline, var(--ui-space-2))),
|
|
330
359
|
#000 calc(100% - var(--_tree-actions-width, 1.75rem) - var(--ui-space-3)),
|
|
331
360
|
transparent calc(100% - var(--_tree-actions-width, 1.75rem))
|
|
332
361
|
);
|
|
@@ -444,7 +473,7 @@
|
|
|
444
473
|
display: none;
|
|
445
474
|
block-size: 2px;
|
|
446
475
|
border-radius: 999px;
|
|
447
|
-
background: var(--
|
|
476
|
+
background: var(--_ui-tree-drop-color, var(--ui-accent-solid));
|
|
448
477
|
pointer-events: none;
|
|
449
478
|
}
|
|
450
479
|
|
|
@@ -455,7 +484,7 @@
|
|
|
455
484
|
inset-block-start: 50%;
|
|
456
485
|
inline-size: 7px;
|
|
457
486
|
block-size: 7px;
|
|
458
|
-
border: 2px solid var(--
|
|
487
|
+
border: 2px solid var(--_ui-tree-drop-color, var(--ui-accent-solid));
|
|
459
488
|
border-radius: 999px;
|
|
460
489
|
background: var(--ui-surface-elevated);
|
|
461
490
|
transform: translateY(-50%);
|
|
@@ -105,7 +105,7 @@ export default function controller(host) {
|
|
|
105
105
|
const MARQUEE_SPEED = 36; // CSS pixels per second, for every name: a clamped duration made short slides crawl.
|
|
106
106
|
// The tree sets this for its items; an item's own prop overrides it either way.
|
|
107
107
|
const marqueeWanted = () => host.state.marquee
|
|
108
|
-
|| getComputedStyle(element).getPropertyValue("--
|
|
108
|
+
|| getComputedStyle(element).getPropertyValue("--_ui-default-tree-item-marquee").trim() === "1";
|
|
109
109
|
const startMarquee = () => {
|
|
110
110
|
if (!labelText || !label || !marqueeWanted()) return;
|
|
111
111
|
labelText.style.flex = "none";
|