@threadlabs/looma 0.5.2 → 0.6.0-rc.1

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.
Files changed (174) hide show
  1. package/components/shared/overlay.js +3 -0
  2. package/components/ui-button/ui-button.html +14 -14
  3. package/components/ui-callout/ui-callout.html +1 -1
  4. package/components/ui-checkbox/ui-checkbox.html +1 -1
  5. package/components/ui-cluster/ui-cluster.html +6 -6
  6. package/components/ui-combobox/ui-combobox.html +23 -23
  7. package/components/ui-container/ui-container.html +4 -4
  8. package/components/ui-context-menu/ui-context-menu.html +2 -2
  9. package/components/ui-dialog/ui-dialog.html +12 -12
  10. package/components/ui-disclosure/ui-disclosure.html +19 -4
  11. package/components/ui-editable/ui-editable.html +6 -6
  12. package/components/ui-editor-insert-table-grid/ui-editor-insert-table-grid.html +20 -20
  13. package/components/ui-editor-mention-menu/ui-editor-mention-menu.html +25 -25
  14. package/components/ui-editor-slash-menu/ui-editor-slash-menu.html +39 -39
  15. package/components/ui-editor-table-context-menu/ui-editor-table-context-menu.html +20 -20
  16. package/components/ui-editor-table-overlay/ui-editor-table-overlay.html +48 -48
  17. package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.html +34 -34
  18. package/components/ui-editor-toolbar/ui-editor-toolbar.html +9 -9
  19. package/components/ui-floating-action-button/ui-floating-action-button.html +16 -22
  20. package/components/ui-grid/ui-grid.html +6 -6
  21. package/components/ui-icon-button/ui-icon-button.html +42 -38
  22. package/components/ui-input/ui-input.html +2 -2
  23. package/components/ui-menu/ui-menu.html +15 -4
  24. package/components/ui-menu-item/ui-menu-item.html +5 -5
  25. package/components/ui-popover/ui-popover.html +3 -3
  26. package/components/ui-reel/ui-reel.html +6 -6
  27. package/components/ui-search-result-row/ui-search-result-row.html +9 -9
  28. package/components/ui-search-shell/ui-search-shell.html +3 -3
  29. package/components/ui-select/ui-select.html +2 -2
  30. package/components/ui-sidebar/ui-sidebar.html +11 -11
  31. package/components/ui-stack/ui-stack.html +6 -6
  32. package/components/ui-switcher/ui-switcher.html +6 -6
  33. package/components/ui-tabs/ui-tabs.html +18 -4
  34. package/components/ui-textarea/ui-textarea.html +2 -2
  35. package/components/ui-toast-region/ui-toast-region.html +2 -2
  36. package/components/ui-tooltip/ui-tooltip.html +1 -1
  37. package/components/ui-top-bar/ui-top-bar.html +5 -5
  38. package/components/ui-tree/ui-tree.html +7 -0
  39. package/components/ui-tree-item/ui-tree-item.html +15 -7
  40. package/dist/index.js +1 -1
  41. package/package.json +1 -1
  42. package/styles/ui-button.css +14 -14
  43. package/styles/ui-callout.css +1 -1
  44. package/styles/ui-checkbox.css +1 -1
  45. package/styles/ui-cluster.css +6 -6
  46. package/styles/ui-combobox.css +23 -23
  47. package/styles/ui-container.css +4 -4
  48. package/styles/ui-context-menu.css +2 -2
  49. package/styles/ui-dialog.css +12 -12
  50. package/styles/ui-disclosure.css +22 -6
  51. package/styles/ui-editable.css +6 -6
  52. package/styles/ui-editor-insert-table-grid.css +20 -20
  53. package/styles/ui-editor-mention-menu.css +25 -25
  54. package/styles/ui-editor-slash-menu.css +39 -39
  55. package/styles/ui-editor-table-context-menu.css +20 -20
  56. package/styles/ui-editor-table-overlay.css +48 -48
  57. package/styles/ui-editor-table-toolbar.css +34 -34
  58. package/styles/ui-editor-toolbar.css +9 -9
  59. package/styles/ui-floating-action-button.css +16 -22
  60. package/styles/ui-grid.css +6 -6
  61. package/styles/ui-icon-button.css +42 -38
  62. package/styles/ui-input.css +2 -2
  63. package/styles/ui-menu-item.css +5 -5
  64. package/styles/ui-menu.css +18 -6
  65. package/styles/ui-popover.css +3 -3
  66. package/styles/ui-reel.css +6 -6
  67. package/styles/ui-search-result-row.css +9 -9
  68. package/styles/ui-search-shell.css +3 -3
  69. package/styles/ui-select.css +2 -2
  70. package/styles/ui-sidebar.css +11 -11
  71. package/styles/ui-stack.css +6 -6
  72. package/styles/ui-switcher.css +6 -6
  73. package/styles/ui-tabs.css +20 -6
  74. package/styles/ui-textarea.css +2 -2
  75. package/styles/ui-toast-region.css +2 -2
  76. package/styles/ui-tooltip.css +1 -1
  77. package/styles/ui-top-bar.css +5 -5
  78. package/styles/ui-tree-item.css +21 -8
  79. package/styles/ui-tree.css +7 -1
  80. package/theme-dark.css +42 -103
  81. package/theme-high-contrast.css +18 -22
  82. package/theme-light.css +15 -41
  83. package/tokens.css +149 -201
  84. package/vanilla/UiDisclosure.d.ts +1 -0
  85. package/vanilla/UiDisclosure.js +1 -1
  86. package/vanilla/UiMenu.d.ts +1 -0
  87. package/vanilla/UiMenu.js +1 -1
  88. package/vanilla/UiTabs.d.ts +1 -0
  89. package/vanilla/UiTabs.js +1 -1
  90. package/vanilla/UiTree.d.ts +1 -0
  91. package/vanilla/UiTree.js +1 -1
  92. package/vue/UiButton.vue +20 -14
  93. package/vue/UiCallout.vue +1 -1
  94. package/vue/UiCheckbox.vue +1 -1
  95. package/vue/UiCluster.vue +6 -6
  96. package/vue/UiCombobox.vue +23 -23
  97. package/vue/UiContainer.vue +4 -4
  98. package/vue/UiContextMenu.vue +2 -2
  99. package/vue/UiDialog.vue +12 -12
  100. package/vue/UiDisclosure.d.ts +2 -0
  101. package/vue/UiDisclosure.vue +21 -4
  102. package/vue/UiEditable.vue +6 -6
  103. package/vue/UiEditorInsertTableGrid.vue +20 -20
  104. package/vue/UiEditorMentionMenu.vue +25 -25
  105. package/vue/UiEditorSlashMenu.vue +39 -39
  106. package/vue/UiEditorTableContextMenu.vue +20 -20
  107. package/vue/UiEditorTableOverlay.vue +48 -57
  108. package/vue/UiEditorTableToolbar.vue +34 -34
  109. package/vue/UiEditorToolbar.vue +9 -9
  110. package/vue/UiFloatingActionButton.vue +17 -22
  111. package/vue/UiGrid.vue +6 -6
  112. package/vue/UiIconButton.vue +46 -42
  113. package/vue/UiInput.vue +2 -2
  114. package/vue/UiMenu.d.ts +2 -0
  115. package/vue/UiMenu.vue +17 -7
  116. package/vue/UiMenuItem.vue +6 -5
  117. package/vue/UiPopover.vue +3 -3
  118. package/vue/UiReel.vue +6 -6
  119. package/vue/UiSearchResultRow.vue +10 -13
  120. package/vue/UiSearchShell.vue +3 -3
  121. package/vue/UiSelect.vue +2 -2
  122. package/vue/UiSidebar.vue +11 -16
  123. package/vue/UiStack.vue +6 -6
  124. package/vue/UiSwitcher.vue +6 -6
  125. package/vue/UiTabs.d.ts +2 -0
  126. package/vue/UiTabs.vue +21 -4
  127. package/vue/UiTextarea.vue +2 -2
  128. package/vue/UiToastRegion.vue +2 -2
  129. package/vue/UiTooltip.vue +1 -1
  130. package/vue/UiTopBar.vue +5 -5
  131. package/vue/UiTree.d.ts +2 -0
  132. package/vue/UiTree.vue +24 -1
  133. package/vue/UiTreeItem.vue +16 -8
  134. package/vue/chunks/UiButton.js +1 -1
  135. package/vue/chunks/UiCallout.js +1 -1
  136. package/vue/chunks/UiCheckbox.js +1 -1
  137. package/vue/chunks/UiCluster.js +1 -1
  138. package/vue/chunks/UiCombobox.js +1 -1
  139. package/vue/chunks/UiContainer.js +1 -1
  140. package/vue/chunks/UiContextMenu.js +1 -1
  141. package/vue/chunks/UiDialog.js +1 -1
  142. package/vue/chunks/UiDisclosure.js +3 -2
  143. package/vue/chunks/UiEditable.js +1 -1
  144. package/vue/chunks/UiEditorInsertTableGrid.js +1 -1
  145. package/vue/chunks/UiEditorMentionMenu.js +1 -1
  146. package/vue/chunks/UiEditorSlashMenu.js +1 -1
  147. package/vue/chunks/UiEditorTableContextMenu.js +1 -1
  148. package/vue/chunks/UiEditorTableOverlay.js +1 -1
  149. package/vue/chunks/UiEditorTableToolbar.js +1 -1
  150. package/vue/chunks/UiEditorToolbar.js +1 -1
  151. package/vue/chunks/UiFloatingActionButton.js +1 -1
  152. package/vue/chunks/UiGrid.js +1 -1
  153. package/vue/chunks/UiIconButton.js +1 -1
  154. package/vue/chunks/UiInput.js +1 -1
  155. package/vue/chunks/UiMenu.js +3 -2
  156. package/vue/chunks/UiMenuItem.js +1 -1
  157. package/vue/chunks/UiPopover.js +1 -1
  158. package/vue/chunks/UiReel.js +1 -1
  159. package/vue/chunks/UiSearchResultRow.js +1 -1
  160. package/vue/chunks/UiSearchShell.js +1 -1
  161. package/vue/chunks/UiSelect.js +1 -1
  162. package/vue/chunks/UiSidebar.js +1 -1
  163. package/vue/chunks/UiStack.js +1 -1
  164. package/vue/chunks/UiSwitcher.js +1 -1
  165. package/vue/chunks/UiTabs.js +7 -2
  166. package/vue/chunks/UiTextarea.js +1 -1
  167. package/vue/chunks/UiToastRegion.js +1 -1
  168. package/vue/chunks/UiTooltip.js +1 -1
  169. package/vue/chunks/UiTopBar.js +1 -1
  170. package/vue/chunks/UiTree.js +8 -2
  171. package/vue/chunks/UiTreeItem.js +1 -1
  172. package/vue/components.css +1082 -1048
  173. package/vue/editor/LoomaEditor.d.ts +11 -0
  174. package/vue/editor/index.js +9 -0
package/vue/UiReel.vue CHANGED
@@ -34,7 +34,7 @@ const hostState = computed(() =>
34
34
 
35
35
  <style scoped>
36
36
  [data-component~="ui-reel"] {
37
- --_reel-gap: var(--ui-space-4, 1rem);
37
+ --_reel-gap: var(--ui-space-4);
38
38
  --_reel-item-width: auto;
39
39
  display: flex;
40
40
  inline-size: 100%;
@@ -53,19 +53,19 @@ const hostState = computed(() =>
53
53
  }
54
54
 
55
55
  [data-component~="ui-reel"][data-ui-reel-state~="gap=xs"] {
56
- --_reel-gap: var(--ui-space-2, 0.5rem);
56
+ --_reel-gap: var(--ui-space-2);
57
57
  }
58
58
  [data-component~="ui-reel"][data-ui-reel-state~="gap=s"] {
59
- --_reel-gap: var(--ui-space-3, 0.75rem);
59
+ --_reel-gap: var(--ui-space-3);
60
60
  }
61
61
  [data-component~="ui-reel"][data-ui-reel-state~="gap=m"] {
62
- --_reel-gap: var(--ui-space-4, 1rem);
62
+ --_reel-gap: var(--ui-space-4);
63
63
  }
64
64
  [data-component~="ui-reel"][data-ui-reel-state~="gap=l"] {
65
- --_reel-gap: var(--ui-space-5, 1.5rem);
65
+ --_reel-gap: var(--ui-space-5);
66
66
  }
67
67
  [data-component~="ui-reel"][data-ui-reel-state~="gap=xl"] {
68
- --_reel-gap: var(--ui-space-6, 2rem);
68
+ --_reel-gap: var(--ui-space-6);
69
69
  }
70
70
  [data-component~="ui-reel"][data-ui-reel-state~="itemWidth=sm"] {
71
71
  --_reel-item-width: 12rem;
@@ -45,18 +45,18 @@ const hostState = computed(() =>
45
45
  inline-size: 100%;
46
46
  min-block-size: var(--ui-search-result-row-min-height, 56px);
47
47
  margin: 0;
48
- padding-block: var(--ui-search-result-row-padding-block, var(--ui-space-3, 0.75rem));
49
- padding-inline: var(--ui-search-result-row-padding-inline, var(--ui-space-4, 1rem));
48
+ padding-block: var(--ui-search-result-row-padding-block, var(--ui-space-3));
49
+ padding-inline: var(--ui-search-result-row-padding-inline, var(--ui-space-4));
50
50
  display: flex;
51
51
  align-items: flex-start;
52
- gap: var(--ui-search-result-row-gap, var(--ui-space-3, 0.75rem));
53
- background: var(--ui-search-result-row-bg, transparent);
52
+ gap: var(--ui-search-result-row-gap, var(--ui-space-3));
53
+ background: var(--ui-search-result-row-surface, transparent);
54
54
  border: none;
55
- border-block-end: 1px solid var(--ui-search-result-row-border, var(--ui-border, #e5e7eb));
55
+ border-block-end: 1px solid var(--ui-search-result-row-border, var(--ui-border));
56
56
  color: inherit;
57
57
  cursor: pointer;
58
58
  text-align: left;
59
- transition: background-color var(--ui-motion-fast, 160ms) var(--ui-motion-ease, ease);
59
+ transition: background-color var(--ui-motion-fast) var(--ui-motion-ease);
60
60
  }
61
61
 
62
62
  [data-component~="ui-search-result-row"]:last-child {
@@ -65,23 +65,20 @@ const hostState = computed(() =>
65
65
 
66
66
  [data-component~="ui-search-result-row"]:hover:enabled {
67
67
  background: var(
68
- --ui-search-result-row-hover-bg,
69
- color-mix(in srgb, var(--ui-surface, #ffffff) 85%, black 3%)
68
+ --ui-search-result-row-hover-surface,
69
+ color-mix(in srgb, var(--ui-surface) 85%, black 3%)
70
70
  );
71
71
  }
72
72
 
73
73
  [data-component~="ui-search-result-row"][data-ui-search-result-row-state~="selected"] {
74
74
  background: var(
75
75
  --ui-search-result-row-selected-bg,
76
- var(
77
- --ui-search-result-row-hover-bg,
78
- color-mix(in srgb, var(--ui-surface, #ffffff) 85%, black 3%)
79
- )
76
+ var(--ui-search-result-row-hover-surface, color-mix(in srgb, var(--ui-surface) 85%, black 3%))
80
77
  );
81
78
  }
82
79
 
83
80
  [data-component~="ui-search-result-row"]:focus-visible {
84
- outline: 2px solid var(--ui-focus-ring, #2563eb);
81
+ outline: 2px solid var(--ui-focus-ring);
85
82
  outline-offset: -2px;
86
83
  }
87
84
 
@@ -207,7 +207,7 @@ dialog::backdrop {
207
207
  max-block-size: var(--ui-search-shell-max-height, 80vh);
208
208
  margin-inline: auto;
209
209
  overflow: hidden;
210
- background: var(--ui-search-shell-bg, var(--ui-surface-elevated));
210
+ background: var(--ui-search-shell-surface, var(--ui-surface-elevated));
211
211
  border: 1px solid var(--ui-search-shell-border, var(--ui-border-default));
212
212
  border-radius: var(--ui-search-shell-radius, var(--ui-radius-dialog));
213
213
  box-shadow: var(--ui-search-shell-shadow, var(--ui-elevation-dialog, var(--ui-shadow-xl)));
@@ -233,7 +233,7 @@ dialog::backdrop {
233
233
  min-block-size: var(--ui-control-min-block-size);
234
234
  padding: var(--ui-space-2) var(--ui-space-3);
235
235
  border: 1px solid var(--ui-control-border);
236
- border-radius: var(--ui-radius-2);
236
+ border-radius: var(--ui-radius-md);
237
237
  background: var(--ui-control-surface);
238
238
  color: var(--ui-text-primary);
239
239
  font: inherit;
@@ -242,7 +242,7 @@ dialog::backdrop {
242
242
 
243
243
  :slotted(input[slot="search"]:focus-visible) {
244
244
  border-color: var(--ui-control-focus);
245
- outline: 2px solid var(--ui-focus-ring, currentColor);
245
+ outline: 2px solid var(--ui-focus-ring);
246
246
  outline-offset: 2px;
247
247
  }
248
248
 
package/vue/UiSelect.vue CHANGED
@@ -134,11 +134,11 @@ onBeforeUnmount(() => {
134
134
  display: inline-block;
135
135
  inline-size: 100%;
136
136
  min-inline-size: 0;
137
- min-block-size: var(--ui-control-size-md, 2.5rem);
137
+ min-block-size: var(--ui-control-size-md);
138
138
  margin: 0;
139
139
  padding: var(--ui-space-2) var(--ui-space-3);
140
140
  border: 1px solid var(--ui-control-border, var(--ui-border-strong));
141
- border-radius: var(--ui-select-radius, var(--ui-radius-2));
141
+ border-radius: var(--ui-select-radius, var(--ui-radius-md));
142
142
  background-color: var(--ui-control-surface, var(--ui-surface-elevated));
143
143
  color: var(--ui-text-primary);
144
144
  color-scheme: light dark;
package/vue/UiSidebar.vue CHANGED
@@ -280,11 +280,10 @@ onBeforeUnmount(() => {
280
280
  var(--ui-affordance-guide-color, var(--ui-border-strong)) 45%,
281
281
  transparent
282
282
  );
283
- opacity: var(--ui-affordance-guide-opacity, 0.42);
283
+ opacity: var(--ui-affordance-guide-opacity);
284
284
  transition:
285
- background-color var(--ui-affordance-motion, var(--ui-motion-fast, 120ms))
286
- var(--ui-motion-ease, ease),
287
- opacity var(--ui-affordance-motion, var(--ui-motion-fast, 120ms)) var(--ui-motion-ease, ease);
285
+ background-color var(--ui-affordance-motion, var(--ui-motion-fast)) var(--ui-motion-ease),
286
+ opacity var(--ui-affordance-motion, var(--ui-motion-fast)) var(--ui-motion-ease);
288
287
  }
289
288
 
290
289
  .guide {
@@ -293,21 +292,17 @@ onBeforeUnmount(() => {
293
292
  inset-inline-start: 50%;
294
293
  inline-size: 6px;
295
294
  block-size: 22px;
296
- border: 1px solid var(--ui-border-strong, #c8c8c4);
297
- border-radius: var(--ui-radius-round, 999px);
298
- background: var(--ui-surface-elevated, #fff);
295
+ border: 1px solid var(--ui-border-strong);
296
+ border-radius: var(--ui-radius-round);
297
+ background: var(--ui-surface-elevated);
299
298
  opacity: 0;
300
299
  transform: translate(-50%, -50%);
301
- transition: opacity var(--ui-affordance-motion, var(--ui-motion-fast, 120ms))
302
- var(--ui-motion-ease, ease);
300
+ transition: opacity var(--ui-affordance-motion, var(--ui-motion-fast)) var(--ui-motion-ease);
303
301
  pointer-events: none;
304
302
  }
305
303
 
306
304
  .resizer:is(:hover, :focus-visible)::after {
307
- background: var(
308
- --ui-affordance-direct-color,
309
- var(--ui-accent-solid, var(--ui-color-focus, Highlight))
310
- );
305
+ background: var(--ui-affordance-direct-color, var(--ui-accent-solid, var(--ui-focus-ring)));
311
306
  opacity: 1;
312
307
  }
313
308
 
@@ -330,9 +325,9 @@ onBeforeUnmount(() => {
330
325
  box-shadow: var(--ui-elevation-overlay, var(--ui-shadow-lg));
331
326
  transform: translateX(0);
332
327
  transition:
333
- transform var(--ui-motion-base, 0.2s) var(--ui-motion-ease-out, ease-out),
334
- display var(--ui-motion-base, 0.2s) allow-discrete,
335
- overlay var(--ui-motion-base, 0.2s) allow-discrete;
328
+ transform var(--ui-motion-base) var(--ui-motion-ease-out),
329
+ display var(--ui-motion-base) allow-discrete,
330
+ overlay var(--ui-motion-base) allow-discrete;
336
331
  }
337
332
 
338
333
  /* The author display above would otherwise override the UA rule that hides a closed popover. */
package/vue/UiStack.vue CHANGED
@@ -28,7 +28,7 @@ const hostState = computed(() =>
28
28
 
29
29
  <style scoped>
30
30
  [data-component~="ui-stack"] {
31
- --_layout-gap: var(--ui-space-4, 1rem);
31
+ --_layout-gap: var(--ui-space-4);
32
32
  display: flex;
33
33
  flex-direction: column;
34
34
  align-items: stretch;
@@ -39,19 +39,19 @@ const hostState = computed(() =>
39
39
  }
40
40
 
41
41
  [data-component~="ui-stack"][data-ui-stack-state~="gap=xs"] {
42
- --_layout-gap: var(--ui-space-2, 0.5rem);
42
+ --_layout-gap: var(--ui-space-2);
43
43
  }
44
44
  [data-component~="ui-stack"][data-ui-stack-state~="gap=s"] {
45
- --_layout-gap: var(--ui-space-3, 0.75rem);
45
+ --_layout-gap: var(--ui-space-3);
46
46
  }
47
47
  [data-component~="ui-stack"][data-ui-stack-state~="gap=m"] {
48
- --_layout-gap: var(--ui-space-4, 1rem);
48
+ --_layout-gap: var(--ui-space-4);
49
49
  }
50
50
  [data-component~="ui-stack"][data-ui-stack-state~="gap=l"] {
51
- --_layout-gap: var(--ui-space-5, 1.5rem);
51
+ --_layout-gap: var(--ui-space-5);
52
52
  }
53
53
  [data-component~="ui-stack"][data-ui-stack-state~="gap=xl"] {
54
- --_layout-gap: var(--ui-space-6, 2rem);
54
+ --_layout-gap: var(--ui-space-6);
55
55
  }
56
56
  [data-component~="ui-stack"][data-ui-stack-state~="align=start"] {
57
57
  align-items: flex-start;
@@ -32,7 +32,7 @@ const hostState = computed(() =>
32
32
 
33
33
  <style scoped>
34
34
  [data-component~="ui-switcher"] {
35
- --_switcher-gap: var(--ui-space-4, 1rem);
35
+ --_switcher-gap: var(--ui-space-4);
36
36
  display: flex;
37
37
  flex-wrap: wrap;
38
38
  gap: var(--ui-switcher-gap, var(--_switcher-gap));
@@ -49,19 +49,19 @@ const hostState = computed(() =>
49
49
  }
50
50
 
51
51
  [data-component~="ui-switcher"][data-ui-switcher-state~="gap=xs"] {
52
- --_switcher-gap: var(--ui-space-2, 0.5rem);
52
+ --_switcher-gap: var(--ui-space-2);
53
53
  }
54
54
  [data-component~="ui-switcher"][data-ui-switcher-state~="gap=s"] {
55
- --_switcher-gap: var(--ui-space-3, 0.75rem);
55
+ --_switcher-gap: var(--ui-space-3);
56
56
  }
57
57
  [data-component~="ui-switcher"][data-ui-switcher-state~="gap=m"] {
58
- --_switcher-gap: var(--ui-space-4, 1rem);
58
+ --_switcher-gap: var(--ui-space-4);
59
59
  }
60
60
  [data-component~="ui-switcher"][data-ui-switcher-state~="gap=l"] {
61
- --_switcher-gap: var(--ui-space-5, 1.5rem);
61
+ --_switcher-gap: var(--ui-space-5);
62
62
  }
63
63
  [data-component~="ui-switcher"][data-ui-switcher-state~="gap=xl"] {
64
- --_switcher-gap: var(--ui-space-6, 2rem);
64
+ --_switcher-gap: var(--ui-space-6);
65
65
  }
66
66
  [data-component~="ui-switcher"][data-ui-switcher-state~="threshold=xs"] > :slotted(*) {
67
67
  flex-basis: calc((var(--ui-switcher-threshold, 20rem) - 100%) * 999);
package/vue/UiTabs.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  type __VLS_Props = {
2
+ density?: 'comfortable' | 'compact';
2
3
  label?: string;
3
4
  orientation?: 'horizontal' | 'vertical';
4
5
  stretch?: boolean;
@@ -26,6 +27,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
26
27
  label: string;
27
28
  value: string;
28
29
  stretch: boolean;
30
+ density: "comfortable" | "compact";
29
31
  orientation: "horizontal" | "vertical";
30
32
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
31
33
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
package/vue/UiTabs.vue CHANGED
@@ -15,12 +15,14 @@ defineOptions({ inheritAttrs: false })
15
15
 
16
16
  const props = withDefaults(
17
17
  defineProps<{
18
+ density?: 'comfortable' | 'compact'
18
19
  label?: string
19
20
  orientation?: 'horizontal' | 'vertical'
20
21
  stretch?: boolean
21
22
  value?: string
22
23
  }>(),
23
24
  {
25
+ density: 'comfortable',
24
26
  label: 'Tabs',
25
27
  orientation: 'horizontal',
26
28
  stretch: false,
@@ -47,6 +49,7 @@ const tabs = ref<{ id: string; label: string }[]>([])
47
49
  /** The values the styles' :host-state() rules test. */
48
50
  const hostState = computed(() =>
49
51
  [
52
+ props.density && `density density=${props.density}`,
50
53
  props.stretch && 'stretch',
51
54
  props.orientation && `orientation orientation=${props.orientation}`,
52
55
  ].filter(Boolean).join(' ')
@@ -201,6 +204,19 @@ onBeforeUnmount(() => {
201
204
  </template>
202
205
 
203
206
  <style scoped>
207
+ /* Density resolves into the tab row's own values; the public tokens still override them. */
208
+ [data-component~="ui-tabs"] {
209
+ --_tab-min-block-size: var(--ui-control-size);
210
+ --_tab-padding-block: var(--ui-space-2);
211
+ --_tab-padding-inline: var(--ui-space-3);
212
+ }
213
+
214
+ [data-component~="ui-tabs"][data-ui-tabs-state~="density=compact"] {
215
+ --_tab-min-block-size: var(--ui-control-size-sm);
216
+ --_tab-padding-block: var(--ui-space-1);
217
+ --_tab-padding-inline: var(--ui-space-2);
218
+ }
219
+
204
220
  [data-component~="ui-tabs"] {
205
221
  display: grid;
206
222
  inline-size: 100%;
@@ -225,16 +241,17 @@ onBeforeUnmount(() => {
225
241
  }
226
242
 
227
243
  .list button {
228
- min-block-size: 2.5rem;
244
+ min-block-size: var(--ui-tabs-tab-min-block-size, var(--_tab-min-block-size));
229
245
  margin: 0 0 -1px;
230
- padding: var(--ui-space-2) var(--ui-space-3);
246
+ padding: var(--ui-tabs-tab-padding-block, var(--_tab-padding-block))
247
+ var(--ui-tabs-tab-padding-inline, var(--_tab-padding-inline));
231
248
  border: 0;
232
249
  border-block-end: 2px solid transparent;
233
250
  background: transparent;
234
251
  color: var(--ui-text-secondary);
235
252
  font: inherit;
236
253
  font-size: var(--ui-font-size-sm);
237
- font-weight: var(--ui-font-medium, 500);
254
+ font-weight: var(--ui-font-medium);
238
255
  cursor: pointer;
239
256
  transition:
240
257
  color var(--ui-motion-fast) var(--ui-motion-ease),
@@ -262,7 +279,7 @@ onBeforeUnmount(() => {
262
279
  position: relative;
263
280
  outline: none;
264
281
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ui-focus-ring) 45%, transparent);
265
- border-radius: var(--ui-radius-1);
282
+ border-radius: var(--ui-radius-sm);
266
283
  }
267
284
 
268
285
  .panels {
@@ -135,13 +135,13 @@ onBeforeUnmount(() => {
135
135
  display: inline-block;
136
136
  inline-size: 100%;
137
137
  min-inline-size: 0;
138
- min-block-size: calc(var(--ui-space-12, 3rem) * 2);
138
+ min-block-size: calc(3rem * 2);
139
139
  margin: 0;
140
140
  padding: var(--ui-space-2) var(--ui-space-3);
141
141
  appearance: none;
142
142
  resize: vertical;
143
143
  border: 1px solid var(--ui-control-border, var(--ui-border-strong));
144
- border-radius: var(--ui-textarea-radius, var(--ui-radius-2));
144
+ border-radius: var(--ui-textarea-radius, var(--ui-radius-md));
145
145
  background: var(--ui-control-surface, var(--ui-surface-elevated));
146
146
  color: var(--ui-text-primary);
147
147
  font: inherit;
@@ -259,7 +259,7 @@ defineExpose({
259
259
  gap: var(--ui-space-2);
260
260
  align-items: start;
261
261
  border: 1px solid var(--ui-border-default);
262
- border-radius: var(--ui-radius-3);
262
+ border-radius: var(--ui-radius-lg);
263
263
  padding: var(--ui-space-3) var(--ui-space-4);
264
264
  background: var(--ui-surface-elevated);
265
265
  color: var(--ui-text-primary);
@@ -270,7 +270,7 @@ defineExpose({
270
270
 
271
271
  /* Leaving slides on down and fades; the controller removes the toast when this ends. */
272
272
  .toast.closing {
273
- animation: ui-toast-exit var(--ui-toast-exit-duration, 0.22s) var(--ui-motion-ease, ease) both;
273
+ animation: ui-toast-exit var(--ui-toast-exit-duration, 0.22s) var(--ui-motion-ease) both;
274
274
  pointer-events: none;
275
275
  }
276
276
 
package/vue/UiTooltip.vue CHANGED
@@ -217,7 +217,7 @@ onBeforeUnmount(() => {
217
217
  box-sizing: border-box;
218
218
  max-inline-size: var(--ui-tooltip-max-inline-size, 18rem);
219
219
  border: 1px solid var(--_tooltip-line);
220
- border-radius: var(--ui-tooltip-radius, var(--ui-radius-1));
220
+ border-radius: var(--ui-tooltip-radius, var(--ui-radius-sm));
221
221
  background: var(--ui-tooltip-surface, var(--ui-surface-elevated));
222
222
  color: var(--ui-tooltip-text, var(--ui-text-primary));
223
223
  padding: var(--ui-space-1) var(--ui-space-2);
package/vue/UiTopBar.vue CHANGED
@@ -20,17 +20,17 @@ defineOptions({ inheritAttrs: false })
20
20
  min-block-size: calc(var(--ui-top-bar-height, 56px) + env(safe-area-inset-top));
21
21
  display: flex;
22
22
  align-items: center;
23
- gap: var(--ui-top-bar-gap, var(--ui-space-3, 0.75rem));
23
+ gap: var(--ui-top-bar-gap, var(--ui-space-3));
24
24
  padding-block-start: env(safe-area-inset-top);
25
25
  padding-inline-start: max(
26
- var(--ui-top-bar-padding-inline, var(--ui-space-4, 1rem)),
26
+ var(--ui-top-bar-padding-inline, var(--ui-space-4)),
27
27
  env(safe-area-inset-left)
28
28
  );
29
29
  padding-inline-end: max(
30
- var(--ui-top-bar-padding-inline, var(--ui-space-4, 1rem)),
30
+ var(--ui-top-bar-padding-inline, var(--ui-space-4)),
31
31
  env(safe-area-inset-right)
32
32
  );
33
- background: var(--ui-top-bar-bg, var(--ui-surface-elevated));
33
+ background: var(--ui-top-bar-surface, var(--ui-surface-elevated));
34
34
  border-block-end: 1px solid var(--ui-top-bar-border, var(--ui-border-default));
35
35
  }
36
36
 
@@ -43,7 +43,7 @@ defineOptions({ inheritAttrs: false })
43
43
  }
44
44
 
45
45
  .actions {
46
- gap: var(--ui-top-bar-actions-gap, var(--ui-space-1, 0.25rem));
46
+ gap: var(--ui-top-bar-actions-gap, var(--ui-space-1));
47
47
  }
48
48
 
49
49
  .title {
package/vue/UiTree.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  type __VLS_Props = {
2
+ density?: 'comfortable' | 'compact';
2
3
  hoverExpandDelay?: number;
3
4
  label?: string;
4
5
  maxDepth?: number;
@@ -51,6 +52,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
51
52
  }) => any) | undefined;
52
53
  }>, {
53
54
  label: string;
55
+ density: "comfortable" | "compact";
54
56
  hoverExpandDelay: number;
55
57
  maxDepth: number;
56
58
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
package/vue/UiTree.vue CHANGED
@@ -7,11 +7,13 @@ defineOptions({ inheritAttrs: false })
7
7
 
8
8
  const props = withDefaults(
9
9
  defineProps<{
10
+ density?: 'comfortable' | 'compact'
10
11
  hoverExpandDelay?: number
11
12
  label?: string
12
13
  maxDepth?: number
13
14
  }>(),
14
15
  {
16
+ density: 'comfortable',
15
17
  hoverExpandDelay: 700,
16
18
  label: 'Tree',
17
19
  maxDepth: 0,
@@ -46,6 +48,13 @@ const emit = defineEmits<{
46
48
 
47
49
  const root = ref<HTMLElement | null>(null)
48
50
 
51
+ /** The values the styles' :host-state() rules test. */
52
+ const hostState = computed(() =>
53
+ [
54
+ props.density && `density density=${props.density}`,
55
+ ].filter(Boolean).join(' ')
56
+ )
57
+
49
58
  /** Dispatches a component event to Vue listeners and, for controllers and page code, on the root. */
50
59
  function dispatch(name: string, detail?: unknown): boolean {
51
60
  const declared: Record<string, EventInit | undefined> = {
@@ -187,10 +196,24 @@ onBeforeUnmount(() => {
187
196
  </script>
188
197
 
189
198
  <template>
190
- <div data-component="ui-tree" role="tree" v-bind="$attrs" ref="root"><slot /></div>
199
+ <div
200
+ data-component="ui-tree"
201
+ role="tree"
202
+ v-bind="$attrs"
203
+ :data-ui-tree-state="hostState || undefined"
204
+ ref="root"
205
+ >
206
+ <slot />
207
+ </div>
191
208
  </template>
192
209
 
193
210
  <style scoped>
211
+ [data-component~="ui-tree"][data-ui-tree-state~="density=compact"] {
212
+ --ui-tree-item-min-block-size: var(--ui-control-size-sm);
213
+ --ui-tree-item-font-size: var(--ui-font-size-sm);
214
+ --ui-tree-item-label-padding-block: 0;
215
+ }
216
+
194
217
  [data-component~="ui-tree"] {
195
218
  display: block;
196
219
  min-inline-size: 0;
@@ -288,9 +288,9 @@ onBeforeUnmount(() => {
288
288
  display: grid;
289
289
  grid-template-columns: 20px auto minmax(0, 1fr) auto;
290
290
  align-items: center;
291
- min-block-size: var(--ui-tree-row-min-height, var(--_tree-row-min-height));
291
+ min-block-size: var(--ui-tree-item-min-block-size, var(--_tree-row-min-height));
292
292
  min-inline-size: 0;
293
- font-size: var(--ui-tree-font-size, var(--ui-font-size-ui, 0.9375rem));
293
+ font-size: var(--ui-tree-item-font-size, var(--ui-font-size-ui));
294
294
  border-radius: var(--ui-radius-md);
295
295
  color: var(--ui-text-secondary);
296
296
  transition:
@@ -324,7 +324,8 @@ onBeforeUnmount(() => {
324
324
  box-shadow: 0 0 0 2px var(--ui-focus-ring);
325
325
  }
326
326
 
327
- [data-component~="ui-tree-item"][data-drop-position="inside"] .row {
327
+ /* Child combinators: drop feedback belongs to this item's own row, not the rows nested in it. */
328
+ [data-component~="ui-tree-item"][data-drop-position="inside"] > .row {
328
329
  background: var(--ui-accent-subtle);
329
330
  box-shadow: inset 0 0 0 1px var(--ui-tree-drop-color, var(--ui-accent-solid));
330
331
  }
@@ -422,8 +423,15 @@ onBeforeUnmount(() => {
422
423
  display: flex;
423
424
  align-items: center;
424
425
  min-inline-size: 0;
425
- padding: var(--ui-tree-label-padding-block, var(--ui-space-1))
426
- var(--ui-tree-label-padding-inline, var(--ui-space-2));
426
+ padding: var(--ui-tree-item-label-padding-block, var(--ui-space-1))
427
+ var(--ui-tree-item-label-padding-inline, var(--ui-space-2));
428
+ }
429
+
430
+ /* Slotted label content fills the cell, so a link is the row's hit area rather than sizing to
431
+ its own text and reading as overflow. */
432
+ .label > :slotted(*) {
433
+ flex: 1 1 auto;
434
+ min-inline-size: 0;
427
435
  }
428
436
 
429
437
  .actions {
@@ -459,7 +467,7 @@ onBeforeUnmount(() => {
459
467
  .row:hover .drag-handle,
460
468
  .drag-handle:hover,
461
469
  .drag-handle:focus-visible,
462
- [data-component~="ui-tree-item"][data-dragging] .drag-handle {
470
+ [data-component~="ui-tree-item"][data-dragging] > .row > .drag-handle {
463
471
  opacity: 1;
464
472
  }
465
473
 
@@ -498,12 +506,12 @@ onBeforeUnmount(() => {
498
506
  inset-inline-end: -1px;
499
507
  }
500
508
 
501
- [data-component~="ui-tree-item"][data-drop-position="before"] .row-drop-indicator {
509
+ [data-component~="ui-tree-item"][data-drop-position="before"] > .row > .row-drop-indicator {
502
510
  display: block;
503
511
  inset-block-start: -1px;
504
512
  }
505
513
 
506
- [data-component~="ui-tree-item"][data-drop-position="after"] .subtree-drop-indicator {
514
+ [data-component~="ui-tree-item"][data-drop-position="after"] > .subtree-drop-indicator {
507
515
  display: block;
508
516
  inset-block-end: -1px;
509
517
  }
@@ -39,6 +39,6 @@ var UiButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
39
39
  }), [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 16, _hoisted_1);
40
40
  };
41
41
  }
42
- }), [["__scopeId", "data-v-44d2f337"]]);
42
+ }), [["__scopeId", "data-v-d0355403"]]);
43
43
  //#endregion
44
44
  export { UiButton_default as t };
@@ -103,6 +103,6 @@ var UiCallout_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
103
103
  ]), createElementVNode("div", _hoisted_8, [renderSlot(_ctx.$slots, "default", {}, void 0, true)])], 16, _hoisted_1);
104
104
  };
105
105
  }
106
- }), [["__scopeId", "data-v-c6ed30ab"]]);
106
+ }), [["__scopeId", "data-v-31ee6589"]]);
107
107
  //#endregion
108
108
  export { UiCallout_default as t };
@@ -159,6 +159,6 @@ var UiCheckbox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
159
159
  }, null, 40, _hoisted_2), createElementVNode("span", _hoisted_3, [renderSlot(_ctx.$slots, "default", {}, void 0, true)])], 16, _hoisted_1);
160
160
  };
161
161
  }
162
- }), [["__scopeId", "data-v-1e598fdb"]]);
162
+ }), [["__scopeId", "data-v-acf71232"]]);
163
163
  //#endregion
164
164
  export { UiCheckbox_default as t };
@@ -19,6 +19,6 @@ var UiCluster_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
19
19
  return openBlock(), createElementBlock("div", mergeProps({ "data-component": "ui-cluster" }, _ctx.$attrs, { "data-ui-cluster-state": hostState.value || void 0 }), [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 16, _hoisted_1);
20
20
  };
21
21
  }
22
- }), [["__scopeId", "data-v-2a9e690c"]]);
22
+ }), [["__scopeId", "data-v-06d4310a"]]);
23
23
  //#endregion
24
24
  export { UiCluster_default as t };
@@ -637,6 +637,6 @@ var UiCombobox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
637
637
  ], 16, _hoisted_1);
638
638
  };
639
639
  }
640
- }), [["__scopeId", "data-v-7eb73ca2"]]);
640
+ }), [["__scopeId", "data-v-147b231f"]]);
641
641
  //#endregion
642
642
  export { UiCombobox_default as t };
@@ -19,6 +19,6 @@ var UiContainer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
19
19
  return openBlock(), createElementBlock("div", mergeProps({ "data-component": "ui-container" }, _ctx.$attrs, { "data-ui-container-state": hostState.value || void 0 }), [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 16, _hoisted_1);
20
20
  };
21
21
  }
22
- }), [["__scopeId", "data-v-bf6caa0d"]]);
22
+ }), [["__scopeId", "data-v-4c7bb81d"]]);
23
23
  //#endregion
24
24
  export { UiContainer_default as t };
@@ -153,6 +153,6 @@ var UiContextMenu_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
153
153
  }), [createElementVNode("div", _hoisted_1, [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 512)], 16);
154
154
  };
155
155
  }
156
- }), [["__scopeId", "data-v-9d2943e9"]]);
156
+ }), [["__scopeId", "data-v-39e418e5"]]);
157
157
  //#endregion
158
158
  export { UiContextMenu_default as t };
@@ -154,6 +154,6 @@ var UiDialog_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
154
154
  ], 16, _hoisted_1);
155
155
  };
156
156
  }
157
- }), [["__scopeId", "data-v-e78fa426"]]);
157
+ }), [["__scopeId", "data-v-05ac1756"]]);
158
158
  //#endregion
159
159
  export { UiDialog_default as t };
@@ -16,6 +16,7 @@ var UiDisclosure_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
16
16
  inheritAttrs: false,
17
17
  __name: "UiDisclosure",
18
18
  props: {
19
+ density: { default: "comfortable" },
19
20
  disabled: {
20
21
  type: Boolean,
21
22
  default: false
@@ -39,7 +40,7 @@ var UiDisclosure_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
39
40
  const internalOpen = ref(false);
40
41
  const contentId = ref("");
41
42
  /** The values the styles' :host-state() rules test. */
42
- const hostState = computed(() => [internalOpen.value && "internalOpen"].filter(Boolean).join(" "));
43
+ const hostState = computed(() => [props.density && `density density=${props.density}`, internalOpen.value && "internalOpen"].filter(Boolean).join(" "));
43
44
  /** Dispatches a component event to Vue listeners and, for controllers and page code, on the root. */
44
45
  function dispatch(name, detail) {
45
46
  const declared = {
@@ -175,6 +176,6 @@ var UiDisclosure_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
175
176
  }, [createElementVNode("div", _hoisted_4, [renderSlot(_ctx.$slots, "default", {}, void 0, true)])], 8, _hoisted_3)], 16, _hoisted_1);
176
177
  };
177
178
  }
178
- }), [["__scopeId", "data-v-283377cf"]]);
179
+ }), [["__scopeId", "data-v-d9a330a8"]]);
179
180
  //#endregion
180
181
  export { UiDisclosure_default as t };
@@ -216,6 +216,6 @@ var UiEditable_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
216
216
  }, "Cancel", -1)])])) : createCommentVNode("v-if", true)], 16, _hoisted_1);
217
217
  };
218
218
  }
219
- }), [["__scopeId", "data-v-f4bef809"]]);
219
+ }), [["__scopeId", "data-v-3707d050"]]);
220
220
  //#endregion
221
221
  export { UiEditable_default as t };