@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.
Files changed (199) hide show
  1. package/components/ui-action-bar/ui-action-bar.html +10 -1
  2. package/components/ui-avatar/ui-avatar.html +18 -0
  3. package/components/ui-avatar-group/ui-avatar-group.html +16 -2
  4. package/components/ui-badge/ui-badge.html +42 -0
  5. package/components/ui-button/ui-button.html +70 -0
  6. package/components/ui-callout/ui-callout.html +55 -4
  7. package/components/ui-checkbox/ui-checkbox.html +16 -3
  8. package/components/ui-cluster/ui-cluster.html +7 -1
  9. package/components/ui-combobox/ui-combobox.html +66 -12
  10. package/components/ui-container/ui-container.html +12 -1
  11. package/components/ui-context-menu/ui-context-menu.html +10 -1
  12. package/components/ui-dialog/ui-dialog.html +21 -4
  13. package/components/ui-disclosure/ui-disclosure.html +23 -4
  14. package/components/ui-editable/ui-editable.html +1 -1
  15. package/components/ui-editor-slash-menu/ui-editor-slash-menu.html +2 -2
  16. package/components/ui-editor-table-context-menu/ui-editor-table-context-menu.html +2 -2
  17. package/components/ui-editor-table-overlay/ui-editor-table-overlay.html +8 -8
  18. package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.html +3 -3
  19. package/components/ui-floating-action-button/ui-floating-action-button.html +14 -0
  20. package/components/ui-form-field/ui-form-field.html +10 -1
  21. package/components/ui-grid/ui-grid.html +11 -1
  22. package/components/ui-icon/ui-icon.html +17 -3
  23. package/components/ui-icon-button/ui-icon-button.html +81 -3
  24. package/components/ui-input/ui-input.html +68 -13
  25. package/components/ui-input-group/ui-input-group.html +14 -13
  26. package/components/ui-list/ui-list.html +10 -0
  27. package/components/ui-list-item/ui-list-item.html +22 -1
  28. package/components/ui-menu/ui-menu.html +17 -5
  29. package/components/ui-menu-item/ui-menu-item.html +30 -3
  30. package/components/ui-nav-item/ui-nav-item.html +14 -0
  31. package/components/ui-popover/ui-popover.html +6 -0
  32. package/components/ui-radio/ui-radio.html +16 -3
  33. package/components/ui-reel/ui-reel.html +15 -2
  34. package/components/ui-search-result-row/ui-search-result-row.html +34 -0
  35. package/components/ui-search-shell/ui-search-shell.html +65 -11
  36. package/components/ui-select/ui-select.html +15 -1
  37. package/components/ui-separator/ui-separator.html +9 -2
  38. package/components/ui-sidebar/ui-sidebar.html +22 -1
  39. package/components/ui-stack/ui-stack.html +7 -1
  40. package/components/ui-switch/ui-switch.html +21 -3
  41. package/components/ui-switcher/ui-switcher.html +18 -5
  42. package/components/ui-tabs/ui-tabs.html +21 -2
  43. package/components/ui-textarea/ui-textarea.html +15 -1
  44. package/components/ui-toast-region/ui-toast-region.html +16 -2
  45. package/components/ui-tooltip/ui-tooltip.html +62 -13
  46. package/components/ui-top-bar/ui-top-bar.html +34 -1
  47. package/components/ui-tree/ui-tree.html +27 -4
  48. package/components/ui-tree-item/ui-tree-item.html +39 -10
  49. package/components/ui-tree-item/ui-tree-item.js +1 -1
  50. package/dist/index.js +1 -1
  51. package/package.json +1 -1
  52. package/styles/ui-action-bar.css +14 -3
  53. package/styles/ui-avatar-group.css +20 -4
  54. package/styles/ui-avatar.css +22 -2
  55. package/styles/ui-badge.css +46 -2
  56. package/styles/ui-button.css +74 -2
  57. package/styles/ui-callout.css +59 -6
  58. package/styles/ui-checkbox.css +20 -5
  59. package/styles/ui-cluster.css +10 -2
  60. package/styles/ui-combobox.css +69 -14
  61. package/styles/ui-container.css +14 -2
  62. package/styles/ui-context-menu.css +14 -3
  63. package/styles/ui-dialog.css +25 -6
  64. package/styles/ui-disclosure.css +27 -6
  65. package/styles/ui-editable.css +1 -1
  66. package/styles/ui-editor-slash-menu.css +2 -2
  67. package/styles/ui-editor-table-context-menu.css +2 -2
  68. package/styles/ui-editor-table-overlay.css +8 -8
  69. package/styles/ui-editor-table-toolbar.css +3 -3
  70. package/styles/ui-floating-action-button.css +18 -2
  71. package/styles/ui-form-field.css +14 -3
  72. package/styles/ui-grid.css +14 -2
  73. package/styles/ui-icon-button.css +85 -5
  74. package/styles/ui-icon.css +21 -5
  75. package/styles/ui-input-group.css +14 -13
  76. package/styles/ui-input.css +73 -15
  77. package/styles/ui-list-item.css +26 -3
  78. package/styles/ui-list.css +14 -2
  79. package/styles/ui-menu-item.css +34 -5
  80. package/styles/ui-menu.css +21 -6
  81. package/styles/ui-nav-item.css +18 -2
  82. package/styles/ui-popover.css +10 -2
  83. package/styles/ui-radio.css +20 -5
  84. package/styles/ui-reel.css +18 -3
  85. package/styles/ui-search-result-row.css +38 -2
  86. package/styles/ui-search-shell.css +69 -13
  87. package/styles/ui-select.css +19 -3
  88. package/styles/ui-separator.css +14 -2
  89. package/styles/ui-sidebar.css +26 -3
  90. package/styles/ui-stack.css +10 -2
  91. package/styles/ui-switch.css +25 -5
  92. package/styles/ui-switcher.css +21 -6
  93. package/styles/ui-tabs.css +25 -4
  94. package/styles/ui-textarea.css +19 -3
  95. package/styles/ui-toast-region.css +20 -4
  96. package/styles/ui-tooltip.css +66 -15
  97. package/styles/ui-top-bar.css +38 -3
  98. package/styles/ui-tree-item.css +43 -12
  99. package/styles/ui-tree.css +33 -6
  100. package/theme-dark.css +1 -1
  101. package/theme-light.css +1 -1
  102. package/tokens.css +8 -6
  103. package/vue/UiActionBar.vue +12 -3
  104. package/vue/UiAvatar.vue +18 -0
  105. package/vue/UiAvatarGroup.vue +16 -2
  106. package/vue/UiBadge.vue +42 -0
  107. package/vue/UiButton.vue +70 -0
  108. package/vue/UiCallout.vue +55 -4
  109. package/vue/UiCheckbox.vue +16 -3
  110. package/vue/UiCluster.vue +6 -0
  111. package/vue/UiCombobox.vue +66 -12
  112. package/vue/UiContainer.vue +10 -0
  113. package/vue/UiContextMenu.vue +10 -1
  114. package/vue/UiDialog.vue +21 -4
  115. package/vue/UiDisclosure.vue +23 -4
  116. package/vue/UiEditable.vue +1 -1
  117. package/vue/UiEditorSlashMenu.vue +2 -2
  118. package/vue/UiEditorTableContextMenu.vue +2 -2
  119. package/vue/UiEditorTableOverlay.vue +8 -8
  120. package/vue/UiEditorTableToolbar.vue +3 -3
  121. package/vue/UiFloatingActionButton.vue +14 -0
  122. package/vue/UiFormField.vue +10 -1
  123. package/vue/UiGrid.vue +10 -0
  124. package/vue/UiIcon.vue +17 -3
  125. package/vue/UiIconButton.vue +81 -3
  126. package/vue/UiInput.vue +90 -15
  127. package/vue/UiInputGroup.vue +14 -13
  128. package/vue/UiList.vue +12 -2
  129. package/vue/UiListItem.vue +30 -9
  130. package/vue/UiMenu.vue +17 -5
  131. package/vue/UiMenuItem.vue +42 -4
  132. package/vue/UiNavItem.vue +17 -3
  133. package/vue/UiPopover.vue +6 -0
  134. package/vue/UiRadio.vue +16 -3
  135. package/vue/UiReel.vue +14 -1
  136. package/vue/UiSearchResultRow.vue +34 -0
  137. package/vue/UiSearchShell.vue +66 -12
  138. package/vue/UiSelect.vue +15 -1
  139. package/vue/UiSeparator.vue +9 -2
  140. package/vue/UiSidebar.vue +22 -1
  141. package/vue/UiStack.vue +6 -0
  142. package/vue/UiSwitch.vue +21 -3
  143. package/vue/UiSwitcher.vue +17 -4
  144. package/vue/UiTabs.vue +22 -3
  145. package/vue/UiTextarea.vue +15 -1
  146. package/vue/UiToastRegion.vue +16 -2
  147. package/vue/UiTooltip.vue +62 -13
  148. package/vue/UiTopBar.vue +34 -1
  149. package/vue/UiTree.vue +28 -5
  150. package/vue/UiTreeItem.vue +46 -11
  151. package/vue/chunks/UiActionBar.js +1 -1
  152. package/vue/chunks/UiAvatar.js +1 -1
  153. package/vue/chunks/UiAvatarGroup.js +1 -1
  154. package/vue/chunks/UiBadge.js +1 -1
  155. package/vue/chunks/UiButton.js +1 -1
  156. package/vue/chunks/UiCallout.js +1 -1
  157. package/vue/chunks/UiCheckbox.js +1 -1
  158. package/vue/chunks/UiCluster.js +1 -1
  159. package/vue/chunks/UiCombobox.js +1 -1
  160. package/vue/chunks/UiContainer.js +1 -1
  161. package/vue/chunks/UiContextMenu.js +1 -1
  162. package/vue/chunks/UiDialog.js +1 -1
  163. package/vue/chunks/UiDisclosure.js +1 -1
  164. package/vue/chunks/UiEditable.js +1 -1
  165. package/vue/chunks/UiEditorSlashMenu.js +1 -1
  166. package/vue/chunks/UiEditorTableContextMenu.js +1 -1
  167. package/vue/chunks/UiEditorTableOverlay.js +1 -1
  168. package/vue/chunks/UiEditorTableToolbar.js +1 -1
  169. package/vue/chunks/UiFloatingActionButton.js +1 -1
  170. package/vue/chunks/UiFormField.js +1 -1
  171. package/vue/chunks/UiGrid.js +1 -1
  172. package/vue/chunks/UiIcon.js +1 -1
  173. package/vue/chunks/UiIconButton.js +1 -1
  174. package/vue/chunks/UiInput.js +1 -1
  175. package/vue/chunks/UiInputGroup.js +1 -1
  176. package/vue/chunks/UiList.js +1 -1
  177. package/vue/chunks/UiListItem.js +1 -1
  178. package/vue/chunks/UiMenu.js +1 -1
  179. package/vue/chunks/UiMenuItem.js +1 -1
  180. package/vue/chunks/UiNavItem.js +1 -1
  181. package/vue/chunks/UiPopover.js +1 -1
  182. package/vue/chunks/UiRadio.js +1 -1
  183. package/vue/chunks/UiReel.js +1 -1
  184. package/vue/chunks/UiSearchResultRow.js +1 -1
  185. package/vue/chunks/UiSearchShell.js +1 -1
  186. package/vue/chunks/UiSelect.js +1 -1
  187. package/vue/chunks/UiSeparator.js +1 -1
  188. package/vue/chunks/UiSidebar.js +1 -1
  189. package/vue/chunks/UiStack.js +1 -1
  190. package/vue/chunks/UiSwitch.js +1 -1
  191. package/vue/chunks/UiSwitcher.js +1 -1
  192. package/vue/chunks/UiTabs.js +1 -1
  193. package/vue/chunks/UiTextarea.js +1 -1
  194. package/vue/chunks/UiToastRegion.js +1 -1
  195. package/vue/chunks/UiTooltip.js +1 -1
  196. package/vue/chunks/UiTopBar.js +1 -1
  197. package/vue/chunks/UiTree.js +1 -1
  198. package/vue/chunks/UiTreeItem.js +1 -1
  199. package/vue/components.css +1959 -927
@@ -1,6 +1,24 @@
1
1
  /* Generated by HTML Next 1.0.0-alpha.5. Do not edit. */
2
+ @property --ui-switch-gap {
3
+ syntax: "*";
4
+ inherits: false;
5
+ }
6
+ @property --ui-switch-track-height {
7
+ syntax: "*";
8
+ inherits: false;
9
+ }
10
+ @property --ui-switch-track-width {
11
+ syntax: "*";
12
+ inherits: false;
13
+ }
2
14
  @scope ([data-component~="ui-switch"]) to ([data-component], [data-slotted]) {
3
- :scope {
15
+ /* This component's hooks style the element they are set on, and never a nested one. */
16
+
17
+ :scope {
18
+ /* Hooks do not inherit, so the parts below read them from the root. */
19
+ --_ui-switch-track-width: var(--ui-switch-track-width);
20
+ --_ui-switch-track-height: var(--ui-switch-track-height);
21
+
4
22
  display: inline-flex;
5
23
  align-items: flex-start;
6
24
  gap: var(--ui-switch-gap, var(--ui-space-2));
@@ -37,8 +55,8 @@
37
55
  -webkit-appearance: none;
38
56
  position: relative;
39
57
  flex: 0 0 auto;
40
- width: var(--ui-switch-track-width, 2.5rem);
41
- height: var(--ui-switch-track-height, 1.5rem);
58
+ width: var(--_ui-switch-track-width, 2.5rem);
59
+ height: var(--_ui-switch-track-height, 1.5rem);
42
60
  padding: 0;
43
61
  border: 1px solid var(--ui-control-border-hover, var(--ui-border-strong));
44
62
  border-radius: 999px;
@@ -78,7 +96,7 @@
78
96
  }
79
97
 
80
98
  :scope[data-ui-switch-state~="disabled"] {
81
- color: var(--ui-text-muted);
99
+ color: var(--ui-disabled-text);
82
100
  cursor: not-allowed;
83
101
  }
84
102
  :scope[data-ui-switch-state~="disabled"] input {
@@ -99,7 +117,9 @@
99
117
  }
100
118
  }
101
119
  @scope ([data-component~="ui-switch"]) to ([data-component]) {
102
- /* The label, and under it an optional line saying what the choice means. */
120
+ /* This component's hooks style the element they are set on, and never a nested one. */
121
+
122
+ /* The label, and under it an optional line saying what the choice means. */
103
123
 
104
124
  @media (prefers-reduced-motion: reduce) {
105
125
  }
@@ -1,6 +1,19 @@
1
1
  /* Generated by HTML Next 1.0.0-alpha.5. Do not edit. */
2
+ @property --ui-switcher-gap {
3
+ syntax: "*";
4
+ inherits: false;
5
+ }
6
+ @property --ui-switcher-threshold {
7
+ syntax: "*";
8
+ inherits: false;
9
+ }
2
10
  @scope ([data-component~="ui-switcher"]) to ([data-component], [data-slotted]) {
3
- :scope {
11
+ /* This component's hooks style the element they are set on, and never a nested one. */
12
+
13
+ :scope {
14
+ /* Hooks do not inherit, so the parts below read them from the root. */
15
+ --_ui-switcher-threshold: var(--ui-switcher-threshold);
16
+
4
17
  --_switcher-gap: var(--ui-space-4);
5
18
  display: flex;
6
19
  flex-wrap: wrap;
@@ -41,20 +54,22 @@
41
54
  }
42
55
  }
43
56
  @scope ([data-component~="ui-switcher"]) to ([data-component]) {
44
- :scope > :where([data-slotted], [data-slotted] *):is(*) {
57
+ /* This component's hooks style the element they are set on, and never a nested one. */
58
+
59
+ :scope > :where([data-slotted], [data-slotted] *):is(*) {
45
60
  min-inline-size: 0;
46
61
  flex-grow: 1;
47
62
  /* The large multiplier makes the basis flip as a group at the intrinsic threshold. */
48
- flex-basis: calc((var(--ui-switcher-threshold, 30rem) - 100%) * 999);
63
+ flex-basis: calc((var(--_ui-switcher-threshold, 30rem) - 100%) * 999);
49
64
  }
50
65
  :scope[data-ui-switcher-state~="threshold=xs"] > :where([data-slotted], [data-slotted] *):is(*) {
51
- flex-basis: calc((var(--ui-switcher-threshold, 20rem) - 100%) * 999);
66
+ flex-basis: calc((var(--_ui-switcher-threshold, 20rem) - 100%) * 999);
52
67
  }
53
68
  :scope[data-ui-switcher-state~="threshold=md"] > :where([data-slotted], [data-slotted] *):is(*) {
54
- flex-basis: calc((var(--ui-switcher-threshold, 45rem) - 100%) * 999);
69
+ flex-basis: calc((var(--_ui-switcher-threshold, 45rem) - 100%) * 999);
55
70
  }
56
71
  :scope[data-ui-switcher-state~="threshold=lg"] > :where([data-slotted], [data-slotted] *):is(*) {
57
- flex-basis: calc((var(--ui-switcher-threshold, 60rem) - 100%) * 999);
72
+ flex-basis: calc((var(--_ui-switcher-threshold, 60rem) - 100%) * 999);
58
73
  }
59
74
 
60
75
  /* A component that sets its display still honours the hidden attribute on its root. */
@@ -1,7 +1,26 @@
1
1
  /* Generated by HTML Next 1.0.0-alpha.5. Do not edit. */
2
+ @property --ui-tabs-tab-min-block-size {
3
+ syntax: "*";
4
+ inherits: false;
5
+ }
6
+ @property --ui-tabs-tab-padding-block {
7
+ syntax: "*";
8
+ inherits: false;
9
+ }
10
+ @property --ui-tabs-tab-padding-inline {
11
+ syntax: "*";
12
+ inherits: false;
13
+ }
2
14
  @scope ([data-component~="ui-tabs"]) to ([data-component], [data-slotted]) {
3
- /* Density resolves into the tab row's own values; the public tokens still override them. */
15
+ /* This component's hooks style the element they are set on, and never a nested one. */
16
+
17
+ /* Density resolves into the tab row's own values; the public tokens still override them. */
4
18
  :scope {
19
+ /* Hooks do not inherit, so the parts below read them from the root. */
20
+ --_ui-tabs-tab-min-block-size: var(--ui-tabs-tab-min-block-size);
21
+ --_ui-tabs-tab-padding-block: var(--ui-tabs-tab-padding-block);
22
+ --_ui-tabs-tab-padding-inline: var(--ui-tabs-tab-padding-inline);
23
+
5
24
  --_tab-min-block-size: var(--ui-control-size);
6
25
  --_tab-padding-block: var(--ui-space-2);
7
26
  --_tab-padding-inline: var(--ui-space-3);
@@ -37,9 +56,9 @@
37
56
  }
38
57
 
39
58
  .list button {
40
- min-block-size: var(--ui-tabs-tab-min-block-size, var(--_tab-min-block-size));
59
+ min-block-size: var(--_ui-tabs-tab-min-block-size, var(--_tab-min-block-size));
41
60
  margin: 0 0 -1px;
42
- padding: var(--ui-tabs-tab-padding-block, var(--_tab-padding-block)) var(--ui-tabs-tab-padding-inline, var(--_tab-padding-inline));
61
+ padding: var(--_ui-tabs-tab-padding-block, var(--_tab-padding-block)) var(--_ui-tabs-tab-padding-inline, var(--_tab-padding-inline));
43
62
  border: 0;
44
63
  border-block-end: 2px solid transparent;
45
64
  background: transparent;
@@ -129,7 +148,9 @@
129
148
  }
130
149
  }
131
150
  @scope ([data-component~="ui-tabs"]) to ([data-component]) {
132
- /* Density resolves into the tab row's own values; the public tokens still override them. */
151
+ /* This component's hooks style the element they are set on, and never a nested one. */
152
+
153
+ /* Density resolves into the tab row's own values; the public tokens still override them. */
133
154
 
134
155
  /* Centre the glyphs, not the line box: a label without descenders otherwise reads high. */
135
156
  /* Centre the glyphs, not the line box: a label without descenders otherwise reads high.
@@ -1,6 +1,20 @@
1
1
  /* Generated by HTML Next 1.0.0-alpha.5. Do not edit. */
2
+ @property --ui-textarea-focus-shadow {
3
+ syntax: "*";
4
+ inherits: false;
5
+ }
6
+ @property --ui-textarea-radius {
7
+ syntax: "*";
8
+ inherits: false;
9
+ }
10
+ @property --ui-textarea-shadow {
11
+ syntax: "*";
12
+ inherits: false;
13
+ }
2
14
  @scope ([data-component~="ui-textarea"]) to ([data-component], [data-slotted]) {
3
- :scope {
15
+ /* This component's hooks style the element they are set on, and never a nested one. */
16
+
17
+ :scope {
4
18
  box-sizing: border-box;
5
19
  display: inline-block;
6
20
  inline-size: 100%;
@@ -58,7 +72,7 @@
58
72
 
59
73
  :scope:disabled {
60
74
  background: var(--ui-control-surface-disabled, var(--ui-surface-muted));
61
- color: var(--ui-text-muted);
75
+ color: var(--ui-disabled-text);
62
76
  box-shadow: none;
63
77
  cursor: not-allowed;
64
78
  }
@@ -69,7 +83,9 @@
69
83
  }
70
84
  }
71
85
  @scope ([data-component~="ui-textarea"]) to ([data-component]) {
72
- /* Tabbing into a field selects its text; tint that selection softly instead of the page highlight. */
86
+ /* This component's hooks style the element they are set on, and never a nested one. */
87
+
88
+ /* Tabbing into a field selects its text; tint that selection softly instead of the page highlight. */
73
89
 
74
90
  /* The app's invalid flag, or the browser's own verdict once the user has left an invalid field. */
75
91
 
@@ -1,4 +1,12 @@
1
1
  /* Generated by HTML Next 1.0.0-alpha.5. Do not edit. */
2
+ @property --ui-toast-region-enter-duration {
3
+ syntax: "*";
4
+ inherits: false;
5
+ }
6
+ @property --ui-toast-region-exit-duration {
7
+ syntax: "*";
8
+ inherits: false;
9
+ }
2
10
  @keyframes ui-toast-enter {
3
11
  from {
4
12
  opacity: 0;
@@ -20,7 +28,13 @@
20
28
  }
21
29
  }
22
30
  @scope ([data-component~="ui-toast-region"]) to ([data-component], [data-slotted]) {
23
- :scope {
31
+ /* This component's hooks style the element they are set on, and never a nested one. */
32
+
33
+ :scope {
34
+ /* Hooks do not inherit, so the parts below read them from the root. */
35
+ --_ui-toast-region-enter-duration: var(--ui-toast-region-enter-duration);
36
+ --_ui-toast-region-exit-duration: var(--ui-toast-region-exit-duration);
37
+
24
38
  position: fixed;
25
39
  top: calc(var(--ui-space-4) + env(safe-area-inset-top));
26
40
  right: auto;
@@ -58,12 +72,12 @@
58
72
  background: var(--ui-surface-elevated);
59
73
  color: var(--ui-text-primary);
60
74
  box-shadow: var(--ui-elevation-overlay, var(--ui-shadow-lg));
61
- animation: ui-toast-enter var(--ui-toast-region-enter-duration, 0.32s) var(--ui-motion-ease-out, cubic-bezier(0.16, 1, 0.3, 1)) both;
75
+ animation: ui-toast-enter var(--_ui-toast-region-enter-duration, 0.32s) var(--ui-motion-ease-out, cubic-bezier(0.16, 1, 0.3, 1)) both;
62
76
  }
63
77
 
64
78
  /* Leaving slides on down and fades; the controller removes the toast when this ends. */
65
79
  .toast.closing {
66
- animation: ui-toast-exit var(--ui-toast-region-exit-duration, 0.22s) var(--ui-motion-ease) both;
80
+ animation: ui-toast-exit var(--_ui-toast-region-exit-duration, 0.22s) var(--ui-motion-ease) both;
67
81
  pointer-events: none;
68
82
  }
69
83
 
@@ -89,7 +103,9 @@
89
103
  }
90
104
  }
91
105
  @scope ([data-component~="ui-toast-region"]) to ([data-component]) {
92
- :scope > .toast,
106
+ /* This component's hooks style the element they are set on, and never a nested one. */
107
+
108
+ :scope > .toast,
93
109
  :scope > :where([data-slotted], [data-slotted] *):is(*) {
94
110
  pointer-events: auto;
95
111
  }
@@ -1,6 +1,55 @@
1
1
  /* Generated by HTML Next 1.0.0-alpha.5. Do not edit. */
2
+ @property --ui-tooltip-arrow-size {
3
+ syntax: "*";
4
+ inherits: false;
5
+ }
6
+ @property --ui-tooltip-border {
7
+ syntax: "*";
8
+ inherits: false;
9
+ }
10
+ @property --ui-tooltip-inverse-surface {
11
+ syntax: "*";
12
+ inherits: false;
13
+ }
14
+ @property --ui-tooltip-inverse-text {
15
+ syntax: "*";
16
+ inherits: false;
17
+ }
18
+ @property --ui-tooltip-max-inline-size {
19
+ syntax: "*";
20
+ inherits: false;
21
+ }
22
+ @property --ui-tooltip-radius {
23
+ syntax: "*";
24
+ inherits: false;
25
+ }
26
+ @property --ui-tooltip-shadow {
27
+ syntax: "*";
28
+ inherits: false;
29
+ }
30
+ @property --ui-tooltip-surface {
31
+ syntax: "*";
32
+ inherits: false;
33
+ }
34
+ @property --ui-tooltip-text {
35
+ syntax: "*";
36
+ inherits: false;
37
+ }
2
38
  @scope ([data-component~="ui-tooltip"]) to ([data-component], [data-slotted]) {
3
- :scope {
39
+ /* This component's hooks style the element they are set on, and never a nested one. */
40
+
41
+ :scope {
42
+ /* Hooks do not inherit, so the parts below read them from the root. */
43
+ --_ui-tooltip-border: var(--ui-tooltip-border);
44
+ --_ui-tooltip-max-inline-size: var(--ui-tooltip-max-inline-size);
45
+ --_ui-tooltip-radius: var(--ui-tooltip-radius);
46
+ --_ui-tooltip-surface: var(--ui-tooltip-surface);
47
+ --_ui-tooltip-text: var(--ui-tooltip-text);
48
+ --_ui-tooltip-shadow: var(--ui-tooltip-shadow);
49
+ --_ui-tooltip-inverse-surface: var(--ui-tooltip-inverse-surface);
50
+ --_ui-tooltip-inverse-text: var(--ui-tooltip-inverse-text);
51
+ --_ui-tooltip-arrow-size: var(--ui-tooltip-arrow-size);
52
+
4
53
  position: fixed;
5
54
  inset: auto;
6
55
  margin: 0;
@@ -23,25 +72,25 @@
23
72
  }
24
73
 
25
74
  .surface {
26
- --_tooltip-line: var(--ui-tooltip-border, var(--ui-border-default));
75
+ --_tooltip-line: var(--_ui-tooltip-border, var(--ui-border-default));
27
76
  position: relative;
28
77
  box-sizing: border-box;
29
- max-inline-size: var(--ui-tooltip-max-inline-size, 18rem);
78
+ max-inline-size: var(--_ui-tooltip-max-inline-size, 18rem);
30
79
  border: 1px solid var(--_tooltip-line);
31
- border-radius: var(--ui-tooltip-radius, var(--ui-radius-sm));
32
- background: var(--ui-tooltip-surface, var(--ui-surface-elevated));
33
- color: var(--ui-tooltip-text, var(--ui-text-primary));
80
+ border-radius: var(--_ui-tooltip-radius, var(--ui-radius-sm));
81
+ background: var(--_ui-tooltip-surface, var(--ui-surface-elevated));
82
+ color: var(--_ui-tooltip-text, var(--ui-text-primary));
34
83
  padding: var(--ui-space-1) var(--ui-space-2);
35
84
  font-family: var(--ui-font-family-sans);
36
85
  font-size: var(--ui-font-size-sm);
37
86
  line-height: var(--ui-line-height-tight);
38
- box-shadow: var(--ui-tooltip-shadow, var(--ui-elevation-tooltip, var(--ui-shadow-md)));
87
+ box-shadow: var(--_ui-tooltip-shadow, var(--ui-elevation-tooltip, var(--ui-shadow-md)));
39
88
  }
40
89
 
41
90
  :scope[data-ui-tooltip-state~="inverse"] .surface {
42
- --_tooltip-line: var(--ui-tooltip-inverse-surface, var(--ui-text-primary));
43
- background: var(--ui-tooltip-inverse-surface, var(--ui-text-primary));
44
- color: var(--ui-tooltip-inverse-text, var(--ui-surface-default));
91
+ --_tooltip-line: var(--_ui-tooltip-inverse-surface, var(--ui-text-primary));
92
+ background: var(--_ui-tooltip-inverse-surface, var(--ui-text-primary));
93
+ color: var(--_ui-tooltip-inverse-text, var(--ui-surface-default));
45
94
  }
46
95
 
47
96
  /* A rotated square shares the surface fill and draws the two outward border edges. Its centre sits on
@@ -51,9 +100,9 @@
51
100
  position: absolute;
52
101
  z-index: 1;
53
102
  inset-inline-start: var(--ui-space-3);
54
- inset-block-end: calc(var(--ui-tooltip-arrow-size, 0.5rem) / -2 - 0.5px);
55
- inline-size: var(--ui-tooltip-arrow-size, 0.5rem);
56
- block-size: var(--ui-tooltip-arrow-size, 0.5rem);
103
+ inset-block-end: calc(var(--_ui-tooltip-arrow-size, 0.5rem) / -2 - 0.5px);
104
+ inline-size: var(--_ui-tooltip-arrow-size, 0.5rem);
105
+ block-size: var(--_ui-tooltip-arrow-size, 0.5rem);
57
106
  box-sizing: border-box;
58
107
  background: inherit;
59
108
  border: 0 solid var(--_tooltip-line);
@@ -64,7 +113,7 @@
64
113
  }
65
114
 
66
115
  :is(:scope[data-ui-tooltip-state~="placement=bottom"], :scope[data-ui-tooltip-state~="placement=bottom-start"], :scope[data-ui-tooltip-state~="placement=bottom-end"]) .surface::after {
67
- inset-block-start: calc(var(--ui-tooltip-arrow-size, 0.5rem) / -2 - 0.5px);
116
+ inset-block-start: calc(var(--_ui-tooltip-arrow-size, 0.5rem) / -2 - 0.5px);
68
117
  inset-block-end: auto;
69
118
  border-inline-end-width: 0;
70
119
  border-block-end-width: 0;
@@ -102,7 +151,9 @@
102
151
  }
103
152
  }
104
153
  @scope ([data-component~="ui-tooltip"]) to ([data-component]) {
105
- /* A rotated square shares the surface fill and draws the two outward border edges. Its centre sits on
154
+ /* This component's hooks style the element they are set on, and never a nested one. */
155
+
156
+ /* A rotated square shares the surface fill and draws the two outward border edges. Its centre sits on
106
157
  * the surface border line, so the fill covers that stretch of border and the outline runs unbroken. */
107
158
 
108
159
  @starting-style {
@@ -1,6 +1,39 @@
1
1
  /* Generated by HTML Next 1.0.0-alpha.5. Do not edit. */
2
+ @property --ui-top-bar-actions-gap {
3
+ syntax: "*";
4
+ inherits: false;
5
+ }
6
+ @property --ui-top-bar-border {
7
+ syntax: "*";
8
+ inherits: false;
9
+ }
10
+ @property --ui-top-bar-gap {
11
+ syntax: "*";
12
+ inherits: false;
13
+ }
14
+ @property --ui-top-bar-height {
15
+ syntax: "*";
16
+ inherits: false;
17
+ }
18
+ @property --ui-top-bar-padding-inline {
19
+ syntax: "*";
20
+ inherits: false;
21
+ }
22
+ @property --ui-top-bar-surface {
23
+ syntax: "*";
24
+ inherits: false;
25
+ }
26
+ @property --ui-top-bar-z-index {
27
+ syntax: "*";
28
+ inherits: false;
29
+ }
2
30
  @scope ([data-component~="ui-top-bar"]) to ([data-component], [data-slotted]) {
3
- :scope {
31
+ /* This component's hooks style the element they are set on, and never a nested one. */
32
+
33
+ :scope {
34
+ /* Hooks do not inherit, so the parts below read them from the root. */
35
+ --_ui-top-bar-actions-gap: var(--ui-top-bar-actions-gap);
36
+
4
37
  position: sticky;
5
38
  inset-block-start: 0;
6
39
  z-index: var(--ui-top-bar-z-index, 100);
@@ -24,7 +57,7 @@
24
57
  }
25
58
 
26
59
  .actions {
27
- gap: var(--ui-top-bar-actions-gap, var(--ui-space-1));
60
+ gap: var(--_ui-top-bar-actions-gap, var(--ui-space-1));
28
61
  }
29
62
 
30
63
  .title {
@@ -45,7 +78,9 @@
45
78
  }
46
79
  }
47
80
  @scope ([data-component~="ui-top-bar"]) to ([data-component]) {
48
- /* An unused region takes no space, so it adds no gap. */
81
+ /* This component's hooks style the element they are set on, and never a nested one. */
82
+
83
+ /* An unused region takes no space, so it adds no gap. */
49
84
 
50
85
  /* A component that sets its display still honours the hidden attribute on its root. */
51
86
  }
@@ -1,4 +1,24 @@
1
1
  /* Generated by HTML Next 1.0.0-alpha.5. Do not edit. */
2
+ @property --ui-tree-item-depth {
3
+ syntax: "*";
4
+ inherits: false;
5
+ }
6
+ @property --ui-tree-item-font-size {
7
+ syntax: "*";
8
+ inherits: false;
9
+ }
10
+ @property --ui-tree-item-label-padding-block {
11
+ syntax: "*";
12
+ inherits: false;
13
+ }
14
+ @property --ui-tree-item-label-padding-inline {
15
+ syntax: "*";
16
+ inherits: false;
17
+ }
18
+ @property --ui-tree-item-min-block-size {
19
+ syntax: "*";
20
+ inherits: false;
21
+ }
2
22
  @keyframes ui-tree-item-marquee {
3
23
  from {
4
24
  transform: translateX(0);
@@ -9,14 +29,23 @@
9
29
  }
10
30
  }
11
31
  @scope ([data-component~="ui-tree-item"]) to ([data-component], [data-slotted]) {
12
- :scope {
32
+ /* This component's hooks style the element they are set on, and never a nested one. */
33
+
34
+ :scope {
35
+ /* Hooks do not inherit, so the parts below read them from the root. The tree's density
36
+ sets the defaults, in --_ui-default-*. */
37
+ --_ui-tree-item-min-block-size: var(--ui-tree-item-min-block-size, var(--_ui-default-tree-item-min-block-size));
38
+ --_ui-tree-item-font-size: var(--ui-tree-item-font-size, var(--_ui-default-tree-item-font-size));
39
+ --_ui-tree-item-label-padding-block: var(--ui-tree-item-label-padding-block, var(--_ui-default-tree-item-label-padding-block));
40
+ --_ui-tree-item-label-padding-inline: var(--ui-tree-item-label-padding-inline);
41
+
13
42
  --_tree-row-min-height: 32px;
14
43
  --_tree-disclosure-size: 16px;
15
44
 
16
45
  position: relative;
17
46
  display: block;
18
47
  min-inline-size: 0;
19
- margin-inline-start: calc(var(--ui-tree-item-depth, 0) * var(--ui-tree-indent, 16px));
48
+ margin-inline-start: calc(var(--ui-tree-item-depth, 0) * var(--_ui-tree-indent, 16px));
20
49
  }
21
50
 
22
51
  .row {
@@ -24,9 +53,9 @@
24
53
  display: grid;
25
54
  grid-template-columns: var(--_tree-disclosure-size) auto minmax(0, 1fr);
26
55
  align-items: center;
27
- min-block-size: var(--ui-tree-item-min-block-size, var(--_tree-row-min-height));
56
+ min-block-size: var(--_ui-tree-item-min-block-size, var(--_tree-row-min-height));
28
57
  min-inline-size: 0;
29
- font-size: var(--ui-tree-item-font-size, var(--ui-font-size-sm));
58
+ font-size: var(--_ui-tree-item-font-size, var(--ui-font-size-sm));
30
59
  border-radius: var(--ui-radius-md);
31
60
  color: var(--ui-text-secondary);
32
61
  transition:
@@ -63,7 +92,7 @@
63
92
  /* Child combinators: drop feedback belongs to this item's own row, not the rows nested in it. */
64
93
  :scope[data-drop-position="inside"] > .row {
65
94
  background: var(--ui-accent-subtle);
66
- box-shadow: inset 0 0 0 1px var(--ui-tree-drop-color, var(--ui-accent-solid));
95
+ box-shadow: inset 0 0 0 1px var(--_ui-tree-drop-color, var(--ui-accent-solid));
67
96
  }
68
97
 
69
98
  .disclosure,
@@ -158,7 +187,7 @@
158
187
  min-inline-size: 0;
159
188
  /* The cell clips: a name longer than the row slides inside it rather than over its icons. */
160
189
  overflow: hidden;
161
- padding: var(--ui-tree-item-label-padding-block, var(--ui-space-1)) var(--ui-tree-item-label-padding-inline, var(--ui-space-2));
190
+ padding: var(--_ui-tree-item-label-padding-block, var(--ui-space-1)) var(--_ui-tree-item-label-padding-inline, var(--ui-space-2));
162
191
  /* The length of the fade before the controls. The label's one flex child lays out no gap; this
163
192
  is where the controller reads the length in pixels to stop a sliding name before the fade. */
164
193
  column-gap: var(--ui-space-3);
@@ -215,11 +244,11 @@
215
244
  under the icon rather than stopping at a hard edge beside it. */
216
245
  .row[data-ui-marquee] > .label {
217
246
  margin-inline-start: calc(-1 * var(--_marquee-lead, 0px));
218
- padding-inline-start: calc(var(--_marquee-lead, 0px) + var(--ui-tree-item-label-padding-inline, var(--ui-space-2)));
247
+ padding-inline-start: calc(var(--_marquee-lead, 0px) + var(--_ui-tree-item-label-padding-inline, var(--ui-space-2)));
219
248
  mask-image: linear-gradient(
220
249
  to right,
221
250
  transparent calc(var(--_marquee-lead, 0px) / 2),
222
- #000 calc(var(--_marquee-lead, 0px) + var(--ui-tree-item-label-padding-inline, var(--ui-space-2))),
251
+ #000 calc(var(--_marquee-lead, 0px) + var(--_ui-tree-item-label-padding-inline, var(--ui-space-2))),
223
252
  #000 calc(100% - var(--_tree-actions-width, 1.75rem) - var(--ui-space-3)),
224
253
  transparent calc(100% - var(--_tree-actions-width, 1.75rem))
225
254
  );
@@ -229,7 +258,7 @@
229
258
  mask-image: linear-gradient(
230
259
  to left,
231
260
  transparent calc(var(--_marquee-lead, 0px) / 2),
232
- #000 calc(var(--_marquee-lead, 0px) + var(--ui-tree-item-label-padding-inline, var(--ui-space-2))),
261
+ #000 calc(var(--_marquee-lead, 0px) + var(--_ui-tree-item-label-padding-inline, var(--ui-space-2))),
233
262
  #000 calc(100% - var(--_tree-actions-width, 1.75rem) - var(--ui-space-3)),
234
263
  transparent calc(100% - var(--_tree-actions-width, 1.75rem))
235
264
  );
@@ -332,7 +361,7 @@
332
361
  display: none;
333
362
  block-size: 2px;
334
363
  border-radius: 999px;
335
- background: var(--ui-tree-drop-color, var(--ui-accent-solid));
364
+ background: var(--_ui-tree-drop-color, var(--ui-accent-solid));
336
365
  pointer-events: none;
337
366
  }
338
367
 
@@ -343,7 +372,7 @@
343
372
  inset-block-start: 50%;
344
373
  inline-size: 7px;
345
374
  block-size: 7px;
346
- border: 2px solid var(--ui-tree-drop-color, var(--ui-accent-solid));
375
+ border: 2px solid var(--_ui-tree-drop-color, var(--ui-accent-solid));
347
376
  border-radius: 999px;
348
377
  background: var(--ui-surface-elevated);
349
378
  transform: translateY(-50%);
@@ -392,7 +421,9 @@
392
421
  }
393
422
  }
394
423
  @scope ([data-component~="ui-tree-item"]) to ([data-component]) {
395
- /* Child combinators: drop feedback belongs to this item's own row, not the rows nested in it. */
424
+ /* This component's hooks style the element they are set on, and never a nested one. */
425
+
426
+ /* Child combinators: drop feedback belongs to this item's own row, not the rows nested in it. */
396
427
 
397
428
  /* Lucide grip-vertical, filling the handle as in Looma 0.2. */
398
429
 
@@ -1,18 +1,41 @@
1
1
  /* Generated by HTML Next 1.0.0-alpha.5. Do not edit. */
2
+ @property --ui-tree-drop-color {
3
+ syntax: "*";
4
+ inherits: false;
5
+ }
6
+ @property --ui-tree-gutter {
7
+ syntax: "*";
8
+ inherits: false;
9
+ }
10
+ @property --ui-tree-indent {
11
+ syntax: "*";
12
+ inherits: false;
13
+ }
2
14
  @scope ([data-component~="ui-tree"]) to ([data-component], [data-slotted]) {
3
- /* Reaches the items the way density does, so the setting lives on the tree the way a reader
15
+ /* This component's hooks style the element they are set on, and never a nested one. */
16
+
17
+ /* Reaches the items the way density does, so the setting lives on the tree the way a reader
4
18
  thinks about it: this list scrolls its long names. */
5
19
  :scope[data-ui-tree-state~="marquee"] {
6
- --ui-tree-item-marquee: 1;
20
+ --_ui-default-tree-item-marquee: 1;
7
21
  }
8
22
 
23
+ /* The items' defaults for this density: an item's own hook still wins. */
9
24
  :scope[data-ui-tree-state~="density=compact"] {
10
- --ui-tree-item-min-block-size: var(--ui-control-size-sm);
11
- --ui-tree-item-font-size: var(--ui-font-size-sm);
12
- --ui-tree-item-label-padding-block: 0;
25
+ --_ui-default-tree-item-min-block-size: var(--ui-control-size-sm);
26
+ --_ui-default-tree-item-font-size: var(--ui-font-size-sm);
27
+ --_ui-default-tree-item-label-padding-block: 0;
13
28
  }
14
29
 
15
30
  :scope {
31
+ /* Hooks do not inherit: the tree hands its own to its items here, and a tree nested in an item
32
+ starts again from its own settings. */
33
+ --_ui-tree-indent: var(--ui-tree-indent);
34
+ --_ui-tree-drop-color: var(--ui-tree-drop-color);
35
+ --_ui-default-tree-item-marquee: initial;
36
+ --_ui-default-tree-item-min-block-size: initial;
37
+ --_ui-default-tree-item-font-size: initial;
38
+ --_ui-default-tree-item-label-padding-block: initial;
16
39
  display: block;
17
40
  min-inline-size: 0;
18
41
  padding-inline-start: var(--ui-tree-gutter, 0px);
@@ -24,8 +47,12 @@
24
47
  }
25
48
  }
26
49
  @scope ([data-component~="ui-tree"]) to ([data-component]) {
27
- /* Reaches the items the way density does, so the setting lives on the tree the way a reader
50
+ /* This component's hooks style the element they are set on, and never a nested one. */
51
+
52
+ /* Reaches the items the way density does, so the setting lives on the tree the way a reader
28
53
  thinks about it: this list scrolls its long names. */
29
54
 
55
+ /* The items' defaults for this density: an item's own hook still wins. */
56
+
30
57
  /* A component that sets its display still honours the hidden attribute on its root. */
31
58
  }
package/theme-dark.css CHANGED
@@ -1,6 +1,6 @@
1
1
  @layer base {
2
2
  @media (prefers-color-scheme: dark) {
3
- :root:not([data-theme]) {
3
+ :root:not([data-theme], [data-contrast="high"]) {
4
4
  color-scheme: dark;
5
5
  /* The same eleven seeds the light theme sets. Every neutral, tint, hover, and disabled
6
6
  colour is mixed from these, and the mixes read the scheme from them: toward this ink
package/theme-light.css CHANGED
@@ -1,5 +1,5 @@
1
1
  @layer base {
2
- :root:not([data-theme]),
2
+ :root:not([data-theme], [data-contrast="high"]),
3
3
  [data-theme="light"] {
4
4
  color-scheme: light;
5
5
  /* The seeds, and only the seeds. Neutrals, hovers, tints, and disabled colours are mixed from