@threadlabs/looma 0.5.2 → 0.6.0-rc.2

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 (177) hide show
  1. package/components/shared/overlay.js +3 -0
  2. package/components/ui-button/ui-button.html +46 -26
  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 +45 -40
  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 +47 -26
  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 +45 -40
  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 +46 -103
  81. package/theme-high-contrast.css +22 -22
  82. package/theme-light.css +17 -41
  83. package/tokens.css +154 -201
  84. package/vanilla/UiButton.d.ts +1 -0
  85. package/vanilla/UiButton.js +1 -1
  86. package/vanilla/UiDisclosure.d.ts +1 -0
  87. package/vanilla/UiDisclosure.js +1 -1
  88. package/vanilla/UiMenu.d.ts +1 -0
  89. package/vanilla/UiMenu.js +1 -1
  90. package/vanilla/UiTabs.d.ts +1 -0
  91. package/vanilla/UiTabs.js +1 -1
  92. package/vanilla/UiTree.d.ts +1 -0
  93. package/vanilla/UiTree.js +1 -1
  94. package/vue/UiButton.d.ts +2 -0
  95. package/vue/UiButton.vue +56 -41
  96. package/vue/UiCallout.vue +1 -1
  97. package/vue/UiCheckbox.vue +1 -1
  98. package/vue/UiCluster.vue +6 -6
  99. package/vue/UiCombobox.vue +23 -23
  100. package/vue/UiContainer.vue +4 -4
  101. package/vue/UiContextMenu.vue +2 -2
  102. package/vue/UiDialog.vue +12 -12
  103. package/vue/UiDisclosure.d.ts +2 -0
  104. package/vue/UiDisclosure.vue +21 -4
  105. package/vue/UiEditable.vue +6 -6
  106. package/vue/UiEditorInsertTableGrid.vue +20 -20
  107. package/vue/UiEditorMentionMenu.vue +25 -25
  108. package/vue/UiEditorSlashMenu.vue +39 -39
  109. package/vue/UiEditorTableContextMenu.vue +20 -20
  110. package/vue/UiEditorTableOverlay.vue +48 -57
  111. package/vue/UiEditorTableToolbar.vue +34 -34
  112. package/vue/UiEditorToolbar.vue +9 -9
  113. package/vue/UiFloatingActionButton.vue +17 -22
  114. package/vue/UiGrid.vue +6 -6
  115. package/vue/UiIconButton.vue +45 -55
  116. package/vue/UiInput.vue +2 -2
  117. package/vue/UiMenu.d.ts +2 -0
  118. package/vue/UiMenu.vue +17 -7
  119. package/vue/UiMenuItem.vue +6 -5
  120. package/vue/UiPopover.vue +3 -3
  121. package/vue/UiReel.vue +6 -6
  122. package/vue/UiSearchResultRow.vue +10 -13
  123. package/vue/UiSearchShell.vue +3 -3
  124. package/vue/UiSelect.vue +2 -2
  125. package/vue/UiSidebar.vue +11 -16
  126. package/vue/UiStack.vue +6 -6
  127. package/vue/UiSwitcher.vue +6 -6
  128. package/vue/UiTabs.d.ts +2 -0
  129. package/vue/UiTabs.vue +21 -4
  130. package/vue/UiTextarea.vue +2 -2
  131. package/vue/UiToastRegion.vue +2 -2
  132. package/vue/UiTooltip.vue +1 -1
  133. package/vue/UiTopBar.vue +5 -5
  134. package/vue/UiTree.d.ts +2 -0
  135. package/vue/UiTree.vue +24 -1
  136. package/vue/UiTreeItem.vue +16 -8
  137. package/vue/chunks/UiButton.js +4 -2
  138. package/vue/chunks/UiCallout.js +1 -1
  139. package/vue/chunks/UiCheckbox.js +1 -1
  140. package/vue/chunks/UiCluster.js +1 -1
  141. package/vue/chunks/UiCombobox.js +1 -1
  142. package/vue/chunks/UiContainer.js +1 -1
  143. package/vue/chunks/UiContextMenu.js +1 -1
  144. package/vue/chunks/UiDialog.js +1 -1
  145. package/vue/chunks/UiDisclosure.js +3 -2
  146. package/vue/chunks/UiEditable.js +1 -1
  147. package/vue/chunks/UiEditorInsertTableGrid.js +1 -1
  148. package/vue/chunks/UiEditorMentionMenu.js +1 -1
  149. package/vue/chunks/UiEditorSlashMenu.js +1 -1
  150. package/vue/chunks/UiEditorTableContextMenu.js +1 -1
  151. package/vue/chunks/UiEditorTableOverlay.js +1 -1
  152. package/vue/chunks/UiEditorTableToolbar.js +1 -1
  153. package/vue/chunks/UiEditorToolbar.js +1 -1
  154. package/vue/chunks/UiFloatingActionButton.js +1 -1
  155. package/vue/chunks/UiGrid.js +1 -1
  156. package/vue/chunks/UiIconButton.js +1 -1
  157. package/vue/chunks/UiInput.js +1 -1
  158. package/vue/chunks/UiMenu.js +3 -2
  159. package/vue/chunks/UiMenuItem.js +1 -1
  160. package/vue/chunks/UiPopover.js +1 -1
  161. package/vue/chunks/UiReel.js +1 -1
  162. package/vue/chunks/UiSearchResultRow.js +1 -1
  163. package/vue/chunks/UiSearchShell.js +1 -1
  164. package/vue/chunks/UiSelect.js +1 -1
  165. package/vue/chunks/UiSidebar.js +1 -1
  166. package/vue/chunks/UiStack.js +1 -1
  167. package/vue/chunks/UiSwitcher.js +1 -1
  168. package/vue/chunks/UiTabs.js +7 -2
  169. package/vue/chunks/UiTextarea.js +1 -1
  170. package/vue/chunks/UiToastRegion.js +1 -1
  171. package/vue/chunks/UiTooltip.js +1 -1
  172. package/vue/chunks/UiTopBar.js +1 -1
  173. package/vue/chunks/UiTree.js +8 -2
  174. package/vue/chunks/UiTreeItem.js +1 -1
  175. package/vue/components.css +1114 -1090
  176. package/vue/editor/LoomaEditor.d.ts +11 -0
  177. package/vue/editor/index.js +17 -0
@@ -5,18 +5,18 @@
5
5
  inline-size: 100%;
6
6
  min-block-size: var(--ui-search-result-row-min-height, 56px);
7
7
  margin: 0;
8
- padding-block: var(--ui-search-result-row-padding-block, var(--ui-space-3, 0.75rem));
9
- padding-inline: var(--ui-search-result-row-padding-inline, var(--ui-space-4, 1rem));
8
+ padding-block: var(--ui-search-result-row-padding-block, var(--ui-space-3));
9
+ padding-inline: var(--ui-search-result-row-padding-inline, var(--ui-space-4));
10
10
  display: flex;
11
11
  align-items: flex-start;
12
- gap: var(--ui-search-result-row-gap, var(--ui-space-3, 0.75rem));
13
- background: var(--ui-search-result-row-bg, transparent);
12
+ gap: var(--ui-search-result-row-gap, var(--ui-space-3));
13
+ background: var(--ui-search-result-row-surface, transparent);
14
14
  border: none;
15
- border-block-end: 1px solid var(--ui-search-result-row-border, var(--ui-border, #e5e7eb));
15
+ border-block-end: 1px solid var(--ui-search-result-row-border, var(--ui-border));
16
16
  color: inherit;
17
17
  cursor: pointer;
18
18
  text-align: left;
19
- transition: background-color var(--ui-motion-fast, 160ms) var(--ui-motion-ease, ease);
19
+ transition: background-color var(--ui-motion-fast) var(--ui-motion-ease);
20
20
  }
21
21
 
22
22
  :scope:last-child {
@@ -24,18 +24,18 @@
24
24
  }
25
25
 
26
26
  :scope:hover:enabled {
27
- background: var(--ui-search-result-row-hover-bg, color-mix(in srgb, var(--ui-surface, #ffffff) 85%, black 3%));
27
+ background: var(--ui-search-result-row-hover-surface, color-mix(in srgb, var(--ui-surface) 85%, black 3%));
28
28
  }
29
29
 
30
30
  :scope[data-ui-search-result-row-state~="selected"] {
31
31
  background: var(
32
32
  --ui-search-result-row-selected-bg,
33
- var(--ui-search-result-row-hover-bg, color-mix(in srgb, var(--ui-surface, #ffffff) 85%, black 3%))
33
+ var(--ui-search-result-row-hover-surface, color-mix(in srgb, var(--ui-surface) 85%, black 3%))
34
34
  );
35
35
  }
36
36
 
37
37
  :scope:focus-visible {
38
- outline: 2px solid var(--ui-focus-ring, #2563eb);
38
+ outline: 2px solid var(--ui-focus-ring);
39
39
  outline-offset: -2px;
40
40
  }
41
41
 
@@ -34,7 +34,7 @@
34
34
  max-block-size: var(--ui-search-shell-max-height, 80vh);
35
35
  margin-inline: auto;
36
36
  overflow: hidden;
37
- background: var(--ui-search-shell-bg, var(--ui-surface-elevated));
37
+ background: var(--ui-search-shell-surface, var(--ui-surface-elevated));
38
38
  border: 1px solid var(--ui-search-shell-border, var(--ui-border-default));
39
39
  border-radius: var(--ui-search-shell-radius, var(--ui-radius-dialog));
40
40
  box-shadow: var(--ui-search-shell-shadow, var(--ui-elevation-dialog, var(--ui-shadow-xl)));
@@ -115,7 +115,7 @@
115
115
  min-block-size: var(--ui-control-min-block-size);
116
116
  padding: var(--ui-space-2) var(--ui-space-3);
117
117
  border: 1px solid var(--ui-control-border);
118
- border-radius: var(--ui-radius-2);
118
+ border-radius: var(--ui-radius-md);
119
119
  background: var(--ui-control-surface);
120
120
  color: var(--ui-text-primary);
121
121
  font: inherit;
@@ -124,7 +124,7 @@
124
124
 
125
125
  :where([data-slotted], [data-slotted] *):is(input[slot="search"]:focus-visible) {
126
126
  border-color: var(--ui-control-focus);
127
- outline: 2px solid var(--ui-focus-ring, currentColor);
127
+ outline: 2px solid var(--ui-focus-ring);
128
128
  outline-offset: 2px;
129
129
  }
130
130
 
@@ -5,11 +5,11 @@
5
5
  display: inline-block;
6
6
  inline-size: 100%;
7
7
  min-inline-size: 0;
8
- min-block-size: var(--ui-control-size-md, 2.5rem);
8
+ min-block-size: var(--ui-control-size-md);
9
9
  margin: 0;
10
10
  padding: var(--ui-space-2) var(--ui-space-3);
11
11
  border: 1px solid var(--ui-control-border, var(--ui-border-strong));
12
- border-radius: var(--ui-select-radius, var(--ui-radius-2));
12
+ border-radius: var(--ui-select-radius, var(--ui-radius-md));
13
13
  background-color: var(--ui-control-surface, var(--ui-surface-elevated));
14
14
  color: var(--ui-text-primary);
15
15
  color-scheme: light dark;
@@ -60,10 +60,10 @@
60
60
  inset-inline-start: 3px;
61
61
  inline-size: 2px;
62
62
  background: color-mix(in srgb, var(--ui-affordance-guide-color, var(--ui-border-strong)) 45%, transparent);
63
- opacity: var(--ui-affordance-guide-opacity, 0.42);
63
+ opacity: var(--ui-affordance-guide-opacity);
64
64
  transition:
65
- background-color var(--ui-affordance-motion, var(--ui-motion-fast, 120ms)) var(--ui-motion-ease, ease),
66
- opacity var(--ui-affordance-motion, var(--ui-motion-fast, 120ms)) var(--ui-motion-ease, ease);
65
+ background-color var(--ui-affordance-motion, var(--ui-motion-fast)) var(--ui-motion-ease),
66
+ opacity var(--ui-affordance-motion, var(--ui-motion-fast)) var(--ui-motion-ease);
67
67
  }
68
68
 
69
69
  .guide {
@@ -72,17 +72,17 @@
72
72
  inset-inline-start: 50%;
73
73
  inline-size: 6px;
74
74
  block-size: 22px;
75
- border: 1px solid var(--ui-border-strong, #c8c8c4);
76
- border-radius: var(--ui-radius-round, 999px);
77
- background: var(--ui-surface-elevated, #fff);
75
+ border: 1px solid var(--ui-border-strong);
76
+ border-radius: var(--ui-radius-round);
77
+ background: var(--ui-surface-elevated);
78
78
  opacity: 0;
79
79
  transform: translate(-50%, -50%);
80
- transition: opacity var(--ui-affordance-motion, var(--ui-motion-fast, 120ms)) var(--ui-motion-ease, ease);
80
+ transition: opacity var(--ui-affordance-motion, var(--ui-motion-fast)) var(--ui-motion-ease);
81
81
  pointer-events: none;
82
82
  }
83
83
 
84
84
  .resizer:is(:hover, :focus-visible)::after {
85
- background: var(--ui-affordance-direct-color, var(--ui-accent-solid, var(--ui-color-focus, Highlight)));
85
+ background: var(--ui-affordance-direct-color, var(--ui-accent-solid, var(--ui-focus-ring)));
86
86
  opacity: 1;
87
87
  }
88
88
 
@@ -105,9 +105,9 @@
105
105
  box-shadow: var(--ui-elevation-overlay, var(--ui-shadow-lg));
106
106
  transform: translateX(0);
107
107
  transition:
108
- transform var(--ui-motion-base, 0.2s) var(--ui-motion-ease-out, ease-out),
109
- display var(--ui-motion-base, 0.2s) allow-discrete,
110
- overlay var(--ui-motion-base, 0.2s) allow-discrete;
108
+ transform var(--ui-motion-base) var(--ui-motion-ease-out),
109
+ display var(--ui-motion-base) allow-discrete,
110
+ overlay var(--ui-motion-base) allow-discrete;
111
111
  }
112
112
 
113
113
  /* The author display above would otherwise override the UA rule that hides a closed popover. */
@@ -1,7 +1,7 @@
1
1
  /* Generated by HTML Next 1.0.0-alpha.2. Do not edit. */
2
2
  @scope ([data-component~="ui-stack"]) to ([data-component], [data-slotted]) {
3
3
  :scope {
4
- --_layout-gap: var(--ui-space-4, 1rem);
4
+ --_layout-gap: var(--ui-space-4);
5
5
  display: flex;
6
6
  flex-direction: column;
7
7
  align-items: stretch;
@@ -12,19 +12,19 @@
12
12
  }
13
13
 
14
14
  :scope[data-ui-stack-state~="gap=xs"] {
15
- --_layout-gap: var(--ui-space-2, 0.5rem);
15
+ --_layout-gap: var(--ui-space-2);
16
16
  }
17
17
  :scope[data-ui-stack-state~="gap=s"] {
18
- --_layout-gap: var(--ui-space-3, 0.75rem);
18
+ --_layout-gap: var(--ui-space-3);
19
19
  }
20
20
  :scope[data-ui-stack-state~="gap=m"] {
21
- --_layout-gap: var(--ui-space-4, 1rem);
21
+ --_layout-gap: var(--ui-space-4);
22
22
  }
23
23
  :scope[data-ui-stack-state~="gap=l"] {
24
- --_layout-gap: var(--ui-space-5, 1.5rem);
24
+ --_layout-gap: var(--ui-space-5);
25
25
  }
26
26
  :scope[data-ui-stack-state~="gap=xl"] {
27
- --_layout-gap: var(--ui-space-6, 2rem);
27
+ --_layout-gap: var(--ui-space-6);
28
28
  }
29
29
  :scope[data-ui-stack-state~="align=start"] {
30
30
  align-items: flex-start;
@@ -1,7 +1,7 @@
1
1
  /* Generated by HTML Next 1.0.0-alpha.2. Do not edit. */
2
2
  @scope ([data-component~="ui-switcher"]) to ([data-component], [data-slotted]) {
3
3
  :scope {
4
- --_switcher-gap: var(--ui-space-4, 1rem);
4
+ --_switcher-gap: var(--ui-space-4);
5
5
  display: flex;
6
6
  flex-wrap: wrap;
7
7
  gap: var(--ui-switcher-gap, var(--_switcher-gap));
@@ -11,19 +11,19 @@
11
11
  }
12
12
 
13
13
  :scope[data-ui-switcher-state~="gap=xs"] {
14
- --_switcher-gap: var(--ui-space-2, 0.5rem);
14
+ --_switcher-gap: var(--ui-space-2);
15
15
  }
16
16
  :scope[data-ui-switcher-state~="gap=s"] {
17
- --_switcher-gap: var(--ui-space-3, 0.75rem);
17
+ --_switcher-gap: var(--ui-space-3);
18
18
  }
19
19
  :scope[data-ui-switcher-state~="gap=m"] {
20
- --_switcher-gap: var(--ui-space-4, 1rem);
20
+ --_switcher-gap: var(--ui-space-4);
21
21
  }
22
22
  :scope[data-ui-switcher-state~="gap=l"] {
23
- --_switcher-gap: var(--ui-space-5, 1.5rem);
23
+ --_switcher-gap: var(--ui-space-5);
24
24
  }
25
25
  :scope[data-ui-switcher-state~="gap=xl"] {
26
- --_switcher-gap: var(--ui-space-6, 2rem);
26
+ --_switcher-gap: var(--ui-space-6);
27
27
  }
28
28
  :scope[data-ui-switcher-state~="align=start"] {
29
29
  align-items: flex-start;
@@ -1,6 +1,19 @@
1
1
  /* Generated by HTML Next 1.0.0-alpha.2. Do not edit. */
2
2
  @scope ([data-component~="ui-tabs"]) to ([data-component], [data-slotted]) {
3
- :scope {
3
+ /* Density resolves into the tab row's own values; the public tokens still override them. */
4
+ :scope {
5
+ --_tab-min-block-size: var(--ui-control-size);
6
+ --_tab-padding-block: var(--ui-space-2);
7
+ --_tab-padding-inline: var(--ui-space-3);
8
+ }
9
+
10
+ :scope[data-ui-tabs-state~="density=compact"] {
11
+ --_tab-min-block-size: var(--ui-control-size-sm);
12
+ --_tab-padding-block: var(--ui-space-1);
13
+ --_tab-padding-inline: var(--ui-space-2);
14
+ }
15
+
16
+ :scope {
4
17
  display: grid;
5
18
  inline-size: 100%;
6
19
  min-inline-size: 0;
@@ -24,16 +37,16 @@
24
37
  }
25
38
 
26
39
  .list button {
27
- min-block-size: 2.5rem;
40
+ min-block-size: var(--ui-tabs-tab-min-block-size, var(--_tab-min-block-size));
28
41
  margin: 0 0 -1px;
29
- padding: var(--ui-space-2) var(--ui-space-3);
42
+ padding: var(--ui-tabs-tab-padding-block, var(--_tab-padding-block)) var(--ui-tabs-tab-padding-inline, var(--_tab-padding-inline));
30
43
  border: 0;
31
44
  border-block-end: 2px solid transparent;
32
45
  background: transparent;
33
46
  color: var(--ui-text-secondary);
34
47
  font: inherit;
35
48
  font-size: var(--ui-font-size-sm);
36
- font-weight: var(--ui-font-medium, 500);
49
+ font-weight: var(--ui-font-medium);
37
50
  cursor: pointer;
38
51
  transition:
39
52
  color var(--ui-motion-fast) var(--ui-motion-ease),
@@ -61,7 +74,7 @@
61
74
  position: relative;
62
75
  outline: none;
63
76
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ui-focus-ring) 45%, transparent);
64
- border-radius: var(--ui-radius-1);
77
+ border-radius: var(--ui-radius-sm);
65
78
  }
66
79
 
67
80
  .panels {
@@ -103,7 +116,8 @@
103
116
  }
104
117
  }
105
118
  @scope ([data-component~="ui-tabs"]) to ([data-component]) {
106
- :where([data-slotted], [data-slotted] *):is(*) {
119
+ /* Density resolves into the tab row's own values; the public tokens still override them. */
120
+ :where([data-slotted], [data-slotted] *):is(*) {
107
121
  padding: var(--ui-space-4);
108
122
  }
109
123
 
@@ -5,13 +5,13 @@
5
5
  display: inline-block;
6
6
  inline-size: 100%;
7
7
  min-inline-size: 0;
8
- min-block-size: calc(var(--ui-space-12, 3rem) * 2);
8
+ min-block-size: calc(3rem * 2);
9
9
  margin: 0;
10
10
  padding: var(--ui-space-2) var(--ui-space-3);
11
11
  appearance: none;
12
12
  resize: vertical;
13
13
  border: 1px solid var(--ui-control-border, var(--ui-border-strong));
14
- border-radius: var(--ui-textarea-radius, var(--ui-radius-2));
14
+ border-radius: var(--ui-textarea-radius, var(--ui-radius-md));
15
15
  background: var(--ui-control-surface, var(--ui-surface-elevated));
16
16
  color: var(--ui-text-primary);
17
17
  font: inherit;
@@ -53,7 +53,7 @@
53
53
  gap: var(--ui-space-2);
54
54
  align-items: start;
55
55
  border: 1px solid var(--ui-border-default);
56
- border-radius: var(--ui-radius-3);
56
+ border-radius: var(--ui-radius-lg);
57
57
  padding: var(--ui-space-3) var(--ui-space-4);
58
58
  background: var(--ui-surface-elevated);
59
59
  color: var(--ui-text-primary);
@@ -63,7 +63,7 @@
63
63
 
64
64
  /* Leaving slides on down and fades; the controller removes the toast when this ends. */
65
65
  .toast.closing {
66
- animation: ui-toast-exit var(--ui-toast-exit-duration, 0.22s) var(--ui-motion-ease, ease) both;
66
+ animation: ui-toast-exit var(--ui-toast-exit-duration, 0.22s) var(--ui-motion-ease) both;
67
67
  pointer-events: none;
68
68
  }
69
69
 
@@ -28,7 +28,7 @@
28
28
  box-sizing: border-box;
29
29
  max-inline-size: var(--ui-tooltip-max-inline-size, 18rem);
30
30
  border: 1px solid var(--_tooltip-line);
31
- border-radius: var(--ui-tooltip-radius, var(--ui-radius-1));
31
+ border-radius: var(--ui-tooltip-radius, var(--ui-radius-sm));
32
32
  background: var(--ui-tooltip-surface, var(--ui-surface-elevated));
33
33
  color: var(--ui-tooltip-text, var(--ui-text-primary));
34
34
  padding: var(--ui-space-1) var(--ui-space-2);
@@ -7,11 +7,11 @@
7
7
  min-block-size: calc(var(--ui-top-bar-height, 56px) + env(safe-area-inset-top));
8
8
  display: flex;
9
9
  align-items: center;
10
- gap: var(--ui-top-bar-gap, var(--ui-space-3, 0.75rem));
10
+ gap: var(--ui-top-bar-gap, var(--ui-space-3));
11
11
  padding-block-start: env(safe-area-inset-top);
12
- padding-inline-start: max(var(--ui-top-bar-padding-inline, var(--ui-space-4, 1rem)), env(safe-area-inset-left));
13
- padding-inline-end: max(var(--ui-top-bar-padding-inline, var(--ui-space-4, 1rem)), env(safe-area-inset-right));
14
- background: var(--ui-top-bar-bg, var(--ui-surface-elevated));
12
+ padding-inline-start: max(var(--ui-top-bar-padding-inline, var(--ui-space-4)), env(safe-area-inset-left));
13
+ padding-inline-end: max(var(--ui-top-bar-padding-inline, var(--ui-space-4)), env(safe-area-inset-right));
14
+ background: var(--ui-top-bar-surface, var(--ui-surface-elevated));
15
15
  border-block-end: 1px solid var(--ui-top-bar-border, var(--ui-border-default));
16
16
  }
17
17
 
@@ -24,7 +24,7 @@
24
24
  }
25
25
 
26
26
  .actions {
27
- gap: var(--ui-top-bar-actions-gap, var(--ui-space-1, 0.25rem));
27
+ gap: var(--ui-top-bar-actions-gap, var(--ui-space-1));
28
28
  }
29
29
 
30
30
  .title {
@@ -14,9 +14,9 @@
14
14
  display: grid;
15
15
  grid-template-columns: 20px auto minmax(0, 1fr) auto;
16
16
  align-items: center;
17
- min-block-size: var(--ui-tree-row-min-height, var(--_tree-row-min-height));
17
+ min-block-size: var(--ui-tree-item-min-block-size, var(--_tree-row-min-height));
18
18
  min-inline-size: 0;
19
- font-size: var(--ui-tree-font-size, var(--ui-font-size-ui, 0.9375rem));
19
+ font-size: var(--ui-tree-item-font-size, var(--ui-font-size-ui));
20
20
  border-radius: var(--ui-radius-md);
21
21
  color: var(--ui-text-secondary);
22
22
  transition:
@@ -50,7 +50,8 @@
50
50
  box-shadow: 0 0 0 2px var(--ui-focus-ring);
51
51
  }
52
52
 
53
- :scope[data-drop-position="inside"] .row {
53
+ /* Child combinators: drop feedback belongs to this item's own row, not the rows nested in it. */
54
+ :scope[data-drop-position="inside"] > .row {
54
55
  background: var(--ui-accent-subtle);
55
56
  box-shadow: inset 0 0 0 1px var(--ui-tree-drop-color, var(--ui-accent-solid));
56
57
  }
@@ -141,9 +142,12 @@
141
142
  display: flex;
142
143
  align-items: center;
143
144
  min-inline-size: 0;
144
- padding: var(--ui-tree-label-padding-block, var(--ui-space-1)) var(--ui-tree-label-padding-inline, var(--ui-space-2));
145
+ padding: var(--ui-tree-item-label-padding-block, var(--ui-space-1)) var(--ui-tree-item-label-padding-inline, var(--ui-space-2));
145
146
  }
146
147
 
148
+ /* Slotted label content fills the cell, so a link is the row's hit area rather than sizing to
149
+ its own text and reading as overflow. */
150
+
147
151
  .actions {
148
152
  grid-column: 4;
149
153
  grid-row: 1;
@@ -177,7 +181,7 @@
177
181
  .row:hover .drag-handle,
178
182
  .drag-handle:hover,
179
183
  .drag-handle:focus-visible,
180
- :scope[data-dragging] .drag-handle {
184
+ :scope[data-dragging] > .row > .drag-handle {
181
185
  opacity: 1;
182
186
  }
183
187
 
@@ -216,12 +220,12 @@
216
220
  inset-inline-end: -1px;
217
221
  }
218
222
 
219
- :scope[data-drop-position="before"] .row-drop-indicator {
223
+ :scope[data-drop-position="before"] > .row > .row-drop-indicator {
220
224
  display: block;
221
225
  inset-block-start: -1px;
222
226
  }
223
227
 
224
- :scope[data-drop-position="after"] .subtree-drop-indicator {
228
+ :scope[data-drop-position="after"] > .subtree-drop-indicator {
225
229
  display: block;
226
230
  inset-block-end: -1px;
227
231
  }
@@ -252,7 +256,9 @@
252
256
  }
253
257
  }
254
258
  @scope ([data-component~="ui-tree-item"]) to ([data-component]) {
255
- /* Lucide grip-vertical, filling the handle as in Looma 0.2. */
259
+ /* Child combinators: drop feedback belongs to this item's own row, not the rows nested in it. */
260
+
261
+ /* Lucide grip-vertical, filling the handle as in Looma 0.2. */
256
262
 
257
263
  /* Slotted content is outside this scope, so :has() cannot see it; hide only a truly empty slot. */
258
264
 
@@ -268,6 +274,13 @@
268
274
  /* The label spans the row's height and centres its content, so slotted content (a link) can
269
275
  stretch to fill the row as its own hit area; the padding tokens remove the inset. */
270
276
 
277
+ /* Slotted label content fills the cell, so a link is the row's hit area rather than sizing to
278
+ its own text and reading as overflow. */
279
+ .label > :where([data-slotted], [data-slotted] *):is(*) {
280
+ flex: 1 1 auto;
281
+ min-inline-size: 0;
282
+ }
283
+
271
284
  @media (prefers-reduced-motion: reduce) {
272
285
  }
273
286
 
@@ -1,6 +1,12 @@
1
1
  /* Generated by HTML Next 1.0.0-alpha.2. Do not edit. */
2
2
  @scope ([data-component~="ui-tree"]) to ([data-component], [data-slotted]) {
3
- :scope {
3
+ :scope[data-ui-tree-state~="density=compact"] {
4
+ --ui-tree-item-min-block-size: var(--ui-control-size-sm);
5
+ --ui-tree-item-font-size: var(--ui-font-size-sm);
6
+ --ui-tree-item-label-padding-block: 0;
7
+ }
8
+
9
+ :scope {
4
10
  display: block;
5
11
  min-inline-size: 0;
6
12
  padding-inline-start: var(--ui-tree-gutter, 0px);
package/theme-dark.css CHANGED
@@ -2,137 +2,80 @@
2
2
  @media (prefers-color-scheme: dark) {
3
3
  :root:not([data-theme]) {
4
4
  color-scheme: dark;
5
- --ui-surface-canvas: #1a1a1a;
6
- --ui-surface-default: #1a1a1a;
7
- --ui-surface-muted: #242424;
8
- --ui-surface-subtle: #2e2e2e;
9
- --ui-surface-elevated: #2a2a2a;
10
- --ui-control-inset: inset 0 1px 2px rgb(0 0 0 / 0.35);
11
- --ui-raised: 0 1px 2px rgb(0 0 0 / 0.4), inset 0 1px 0 rgb(255 255 255 / 0.06);
12
- --ui-raised-highlight: linear-gradient(rgb(255 255 255 / 0.04), rgb(255 255 255 / 0));
13
- --ui-control-focus-halo: color-mix(in srgb, var(--ui-accent-solid) 30%, transparent);
14
- --ui-select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a0a09c' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
5
+ --ui-surface: #1a1a1a;
6
+ --ui-surface-raised: #2a2a2a;
7
+ --ui-surface-sunken: #2e2e2e;
15
8
 
16
- --ui-shadow-xs: 0 1px 2px rgb(0 0 0 / 0.4);
17
- --ui-shadow-sm: 0 1px 3px rgb(0 0 0 / 0.45), 0 1px 2px rgb(0 0 0 / 0.3);
18
- --ui-shadow-md: 0 4px 12px rgb(0 0 0 / 0.5), 0 2px 4px rgb(0 0 0 / 0.3);
19
- --ui-shadow-lg: 0 10px 28px rgb(0 0 0 / 0.55), 0 4px 10px rgb(0 0 0 / 0.35);
20
- --ui-shadow-xl: 0 18px 48px rgb(0 0 0 / 0.6), 0 8px 18px rgb(0 0 0 / 0.4);
21
-
22
- --ui-text-primary: #f0f0ec;
9
+ --ui-text: #f0f0ec;
23
10
  --ui-text-secondary: #a0a09c;
24
11
  --ui-text-muted: #6a6a66;
25
- --ui-text-on-accent: #1a1a1a;
12
+ --ui-disabled-surface: #242424;
13
+ --ui-disabled-text: #6a6a66;
14
+ --ui-on-accent: #1a1a1a;
15
+ --ui-on-danger: #1a1a1a;
26
16
 
27
- --ui-border-subtle: #2b2b28;
28
- --ui-border-default: #333330;
17
+ --ui-border: #333330;
29
18
  --ui-border-strong: #4a4a46;
30
19
  --ui-focus-ring: #a99bf5;
31
-
32
- /* Form controls need a visible 3:1 boundary and 4.5:1 placeholder text;
33
- general dividers intentionally remain quieter. */
34
- --ui-control-surface: #202020;
35
- --ui-control-surface-disabled: #242424;
36
20
  --ui-control-border: #6f6f69;
37
- --ui-control-border-hover: #92928c;
38
- --ui-control-placeholder: #a0a09c;
39
21
 
40
- --ui-accent-solid: #a99bf5;
22
+ --ui-accent: #a99bf5;
41
23
  --ui-accent-hover: #b9adff;
42
24
  --ui-accent-active: #c8beff;
43
- --ui-accent-soft: #282342;
25
+ --ui-accent-subtle: #282342;
44
26
 
45
- --ui-danger-solid: #ef6f86;
27
+ --ui-danger: #ef6f86;
46
28
  --ui-danger-hover: #f58a9d;
47
- --ui-danger-soft: #321b22;
48
- --ui-success-solid: #33cc66;
49
- --ui-success-soft: #162a1f;
50
- --ui-warning-solid: #ffaa22;
51
- --ui-warning-soft: #2d2410;
52
- --ui-info-solid: #4d9fff;
53
- --ui-info-soft: #1a2a3d;
54
- --ui-accent-strong-surface: #5148c8;
55
- --ui-accent-on-strong: #ffffff;
56
- --ui-accent-subtle-text: #b8b3ff;
57
- --ui-danger-strong-surface: #a61b3c;
58
- --ui-danger-on-strong: #ffffff;
59
- --ui-danger-subtle-text: #ff9aae;
60
- --ui-success-strong-surface: #006b2d;
61
- --ui-success-on-strong: #ffffff;
62
- --ui-success-subtle-text: #62dc89;
63
- --ui-warning-strong-surface: #d69a0a;
64
- --ui-warning-on-strong: #1f1500;
65
- --ui-warning-subtle-text: #ffc45c;
66
- --ui-info-strong-surface: #075cad;
67
- --ui-info-on-strong: #ffffff;
68
- --ui-info-subtle-text: #7eb8ff;
29
+ --ui-success: #33cc66;
30
+ --ui-warning: #ffaa22;
31
+ --ui-info: #4d9fff;
32
+
33
+ /* Depth reads differently on a dark surface: deeper shadows, a lit top edge. */
34
+ --ui-shadow-sm: 0 1px 3px rgb(0 0 0 / 0.45), 0 1px 2px rgb(0 0 0 / 0.3);
35
+ --ui-shadow-lg: 0 10px 28px rgb(0 0 0 / 0.55), 0 4px 10px rgb(0 0 0 / 0.35);
36
+ --ui-control-inset: inset 0 1px 2px rgb(0 0 0 / 0.35);
37
+ --ui-raised: 0 1px 2px rgb(0 0 0 / 0.4), inset 0 1px 0 rgb(255 255 255 / 0.06);
38
+ --ui-raised-highlight: linear-gradient(rgb(255 255 255 / 0.04), rgb(255 255 255 / 0));
39
+ --ui-select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a0a09c' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
69
40
  }
70
41
  }
71
42
 
72
43
  [data-theme="dark"] {
73
44
  color-scheme: dark;
74
- --ui-surface-canvas: #1a1a1a;
75
- --ui-surface-default: #1a1a1a;
76
- --ui-surface-muted: #242424;
77
- --ui-surface-subtle: #2e2e2e;
78
- --ui-surface-elevated: #2a2a2a;
79
- --ui-control-inset: inset 0 1px 2px rgb(0 0 0 / 0.35);
80
- --ui-raised: 0 1px 2px rgb(0 0 0 / 0.4), inset 0 1px 0 rgb(255 255 255 / 0.06);
81
- --ui-raised-highlight: linear-gradient(rgb(255 255 255 / 0.04), rgb(255 255 255 / 0));
82
- --ui-control-focus-halo: color-mix(in srgb, var(--ui-accent-solid) 30%, transparent);
83
- --ui-select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a0a09c' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
45
+ --ui-surface: #1a1a1a;
46
+ --ui-surface-raised: #2a2a2a;
47
+ --ui-surface-sunken: #2e2e2e;
84
48
 
85
- --ui-shadow-xs: 0 1px 2px rgb(0 0 0 / 0.4);
86
- --ui-shadow-sm: 0 1px 3px rgb(0 0 0 / 0.45), 0 1px 2px rgb(0 0 0 / 0.3);
87
- --ui-shadow-md: 0 4px 12px rgb(0 0 0 / 0.5), 0 2px 4px rgb(0 0 0 / 0.3);
88
- --ui-shadow-lg: 0 10px 28px rgb(0 0 0 / 0.55), 0 4px 10px rgb(0 0 0 / 0.35);
89
- --ui-shadow-xl: 0 18px 48px rgb(0 0 0 / 0.6), 0 8px 18px rgb(0 0 0 / 0.4);
90
-
91
- --ui-text-primary: #f0f0ec;
49
+ --ui-text: #f0f0ec;
92
50
  --ui-text-secondary: #a0a09c;
93
51
  --ui-text-muted: #6a6a66;
94
- --ui-text-on-accent: #1a1a1a;
52
+ --ui-disabled-surface: #242424;
53
+ --ui-disabled-text: #6a6a66;
54
+ --ui-on-accent: #1a1a1a;
55
+ --ui-on-danger: #1a1a1a;
95
56
 
96
- --ui-border-subtle: #2b2b28;
97
- --ui-border-default: #333330;
57
+ --ui-border: #333330;
98
58
  --ui-border-strong: #4a4a46;
99
59
  --ui-focus-ring: #a99bf5;
100
-
101
- /* Keep explicit dark mode identical to the system-dark palette. */
102
- --ui-control-surface: #202020;
103
- --ui-control-surface-disabled: #242424;
104
60
  --ui-control-border: #6f6f69;
105
- --ui-control-border-hover: #92928c;
106
- --ui-control-placeholder: #a0a09c;
107
61
 
108
- --ui-accent-solid: #a99bf5;
62
+ --ui-accent: #a99bf5;
109
63
  --ui-accent-hover: #b9adff;
110
64
  --ui-accent-active: #c8beff;
111
- --ui-accent-soft: #282342;
65
+ --ui-accent-subtle: #282342;
112
66
 
113
- --ui-danger-solid: #ef6f86;
67
+ --ui-danger: #ef6f86;
114
68
  --ui-danger-hover: #f58a9d;
115
- --ui-danger-soft: #321b22;
116
- --ui-success-solid: #33cc66;
117
- --ui-success-soft: #162a1f;
118
- --ui-warning-solid: #ffaa22;
119
- --ui-warning-soft: #2d2410;
120
- --ui-info-solid: #4d9fff;
121
- --ui-info-soft: #1a2a3d;
122
- --ui-accent-strong-surface: #5148c8;
123
- --ui-accent-on-strong: #ffffff;
124
- --ui-accent-subtle-text: #b8b3ff;
125
- --ui-danger-strong-surface: #a61b3c;
126
- --ui-danger-on-strong: #ffffff;
127
- --ui-danger-subtle-text: #ff9aae;
128
- --ui-success-strong-surface: #006b2d;
129
- --ui-success-on-strong: #ffffff;
130
- --ui-success-subtle-text: #62dc89;
131
- --ui-warning-strong-surface: #d69a0a;
132
- --ui-warning-on-strong: #1f1500;
133
- --ui-warning-subtle-text: #ffc45c;
134
- --ui-info-strong-surface: #075cad;
135
- --ui-info-on-strong: #ffffff;
136
- --ui-info-subtle-text: #7eb8ff;
69
+ --ui-success: #33cc66;
70
+ --ui-warning: #ffaa22;
71
+ --ui-info: #4d9fff;
72
+
73
+ /* Depth reads differently on a dark surface: deeper shadows, a lit top edge. */
74
+ --ui-shadow-sm: 0 1px 3px rgb(0 0 0 / 0.45), 0 1px 2px rgb(0 0 0 / 0.3);
75
+ --ui-shadow-lg: 0 10px 28px rgb(0 0 0 / 0.55), 0 4px 10px rgb(0 0 0 / 0.35);
76
+ --ui-control-inset: inset 0 1px 2px rgb(0 0 0 / 0.35);
77
+ --ui-raised: 0 1px 2px rgb(0 0 0 / 0.4), inset 0 1px 0 rgb(255 255 255 / 0.06);
78
+ --ui-raised-highlight: linear-gradient(rgb(255 255 255 / 0.04), rgb(255 255 255 / 0));
79
+ --ui-select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a0a09c' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
137
80
  }
138
81
  }