@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
@@ -9,10 +9,19 @@
9
9
  </div>
10
10
  </div>
11
11
  <style>
12
+ /* This component's hooks style the element they are set on, and never a nested one. */
13
+ @property --ui-action-bar-gap {
14
+ syntax: "*";
15
+ inherits: false;
16
+ }
17
+
12
18
  /* The action row of a form or dialog. Tertiary actions (Back, Cancel, Discard) sit at the start
13
19
  edge; secondary actions (Save as draft, Preview) sit just before the primary one, which ends the
14
20
  row. The bar arranges its actions and leaves their look to them. */
15
21
  :host {
22
+ /* Hooks do not inherit, so the parts below read them from the root. */
23
+ --_ui-action-bar-gap: var(--ui-action-bar-gap);
24
+
16
25
  --_gap: var(--ui-space-2);
17
26
  display: block;
18
27
  /* A size container sizes itself from its container, never its content. */
@@ -28,7 +37,7 @@
28
37
  display: flex;
29
38
  flex-wrap: wrap;
30
39
  align-items: center;
31
- gap: var(--ui-action-bar-gap, var(--_gap));
40
+ gap: var(--_ui-action-bar-gap, var(--_gap));
32
41
  }
33
42
 
34
43
  /* The tertiary group takes the spare space, pushing the rest to the end edge; without it, the
@@ -27,6 +27,24 @@
27
27
  <span class="fallback" :aria-hidden="hasImage" :hidden="hasImage" $value="initials"></span>
28
28
  </span>
29
29
  <style>
30
+ /* This component's hooks style the element they are set on, and never a nested one. */
31
+ @property --ui-avatar-border {
32
+ syntax: "*";
33
+ inherits: false;
34
+ }
35
+ @property --ui-avatar-surface {
36
+ syntax: "*";
37
+ inherits: false;
38
+ }
39
+ @property --ui-avatar-text {
40
+ syntax: "*";
41
+ inherits: false;
42
+ }
43
+ @property --ui-avatar-active-ring {
44
+ syntax: "*";
45
+ inherits: false;
46
+ }
47
+
30
48
  :host {
31
49
  display: inline-grid;
32
50
  place-items: center;
@@ -14,7 +14,21 @@
14
14
  ></template></span>
15
15
  </div>
16
16
  <style>
17
+ /* This component's hooks style the element they are set on, and never a nested one. */
18
+ @property --ui-avatar-group-edge-ring {
19
+ syntax: "*";
20
+ inherits: false;
21
+ }
22
+ @property --ui-avatar-group-overlap-shadow {
23
+ syntax: "*";
24
+ inherits: false;
25
+ }
26
+
17
27
  :host {
28
+ /* Hooks do not inherit, so the parts below read them from the root. */
29
+ --_ui-avatar-group-overlap-shadow: var(--ui-avatar-group-overlap-shadow);
30
+ --_ui-avatar-group-edge-ring: var(--ui-avatar-group-edge-ring);
31
+
18
32
  /* Each avatar is ringed in the surface colour, so where one overlaps the next it reads as a
19
33
  * whole circle set on top, not a shape cut into the one beneath. */
20
34
  --_overlap-shadow: 0 0 0 0 transparent;
@@ -50,8 +64,8 @@
50
64
  background: var(--ui-surface-elevated);
51
65
  color: var(--ui-text-primary);
52
66
  box-shadow:
53
- var(--ui-avatar-group-overlap-shadow, var(--_overlap-shadow)),
54
- var(--ui-avatar-group-edge-ring, var(--_edge-ring));
67
+ var(--_ui-avatar-group-overlap-shadow, var(--_overlap-shadow)),
68
+ var(--_ui-avatar-group-edge-ring, var(--_edge-ring));
55
69
  font: inherit;
56
70
  font-size: var(--ui-font-size-xs);
57
71
  font-weight: 600;
@@ -11,6 +11,48 @@
11
11
  </defs>
12
12
  <span><slot></slot></span>
13
13
  <style>
14
+ /* This component's hooks style the element they are set on, and never a nested one. */
15
+ @property --ui-badge-border {
16
+ syntax: "*";
17
+ inherits: false;
18
+ }
19
+ @property --ui-badge-font-size {
20
+ syntax: "*";
21
+ inherits: false;
22
+ }
23
+ @property --ui-badge-font-weight {
24
+ syntax: "*";
25
+ inherits: false;
26
+ }
27
+ @property --ui-badge-line-height {
28
+ syntax: "*";
29
+ inherits: false;
30
+ }
31
+ @property --ui-badge-min-block-size {
32
+ syntax: "*";
33
+ inherits: false;
34
+ }
35
+ @property --ui-badge-padding-block {
36
+ syntax: "*";
37
+ inherits: false;
38
+ }
39
+ @property --ui-badge-padding-inline {
40
+ syntax: "*";
41
+ inherits: false;
42
+ }
43
+ @property --ui-badge-point {
44
+ syntax: "*";
45
+ inherits: false;
46
+ }
47
+ @property --ui-badge-surface {
48
+ syntax: "*";
49
+ inherits: false;
50
+ }
51
+ @property --ui-badge-text {
52
+ syntax: "*";
53
+ inherits: false;
54
+ }
55
+
14
56
  :host {
15
57
  --_badge-surface: var(--ui-surface-subtle);
16
58
  --_badge-text: var(--ui-text-secondary);
@@ -38,6 +38,76 @@
38
38
  <slot></slot>
39
39
  </button>
40
40
  <style>
41
+ /* This component's hooks style the element they are set on, and never a nested one. */
42
+ @property --ui-button-active-surface {
43
+ syntax: "*";
44
+ inherits: false;
45
+ }
46
+ @property --ui-button-border {
47
+ syntax: "*";
48
+ inherits: false;
49
+ }
50
+ @property --ui-button-disabled-filter {
51
+ syntax: "*";
52
+ inherits: false;
53
+ }
54
+ @property --ui-button-disabled-opacity {
55
+ syntax: "*";
56
+ inherits: false;
57
+ }
58
+ @property --ui-button-ghost-active-surface {
59
+ syntax: "*";
60
+ inherits: false;
61
+ }
62
+ @property --ui-button-ghost-hover-surface {
63
+ syntax: "*";
64
+ inherits: false;
65
+ }
66
+ @property --ui-button-ghost-text {
67
+ syntax: "*";
68
+ inherits: false;
69
+ }
70
+ @property --ui-button-hover-border {
71
+ syntax: "*";
72
+ inherits: false;
73
+ }
74
+ @property --ui-button-hover-surface {
75
+ syntax: "*";
76
+ inherits: false;
77
+ }
78
+ @property --ui-button-link-hover-text {
79
+ syntax: "*";
80
+ inherits: false;
81
+ }
82
+ @property --ui-button-link-text {
83
+ syntax: "*";
84
+ inherits: false;
85
+ }
86
+ @property --ui-button-min-block-size {
87
+ syntax: "*";
88
+ inherits: false;
89
+ }
90
+ @property --ui-button-radius {
91
+ syntax: "*";
92
+ inherits: false;
93
+ }
94
+ @property --ui-button-shadow {
95
+ syntax: "*";
96
+ inherits: false;
97
+ }
98
+ @property --ui-button-solid-shadow {
99
+ syntax: "*";
100
+ inherits: false;
101
+ }
102
+ @property --ui-button-surface {
103
+ syntax: "*";
104
+ inherits: false;
105
+ }
106
+ @property --ui-button-text {
107
+ syntax: "*";
108
+ inherits: false;
109
+ }
110
+
41
111
  :host {
42
112
  --_hue: var(--ui-accent);
43
113
  --_hue-hover: var(--ui-accent-hover);
@@ -34,7 +34,58 @@
34
34
  <div class="content"><slot></slot></div>
35
35
  </div>
36
36
  <style>
37
+ /* This component's hooks style the element they are set on, and never a nested one. */
38
+ @property --ui-callout-border {
39
+ syntax: "*";
40
+ inherits: false;
41
+ }
42
+ @property --ui-callout-border-width {
43
+ syntax: "*";
44
+ inherits: false;
45
+ }
46
+ @property --ui-callout-gap {
47
+ syntax: "*";
48
+ inherits: false;
49
+ }
50
+ @property --ui-callout-icon {
51
+ syntax: "*";
52
+ inherits: false;
53
+ }
54
+ @property --ui-callout-icon-column {
55
+ syntax: "*";
56
+ inherits: false;
57
+ }
58
+ @property --ui-callout-icon-size {
59
+ syntax: "*";
60
+ inherits: false;
61
+ }
62
+ @property --ui-callout-leading-border-width {
63
+ syntax: "*";
64
+ inherits: false;
65
+ }
66
+ @property --ui-callout-padding-block {
67
+ syntax: "*";
68
+ inherits: false;
69
+ }
70
+ @property --ui-callout-padding-inline {
71
+ syntax: "*";
72
+ inherits: false;
73
+ }
74
+ @property --ui-callout-surface {
75
+ syntax: "*";
76
+ inherits: false;
77
+ }
78
+ @property --ui-callout-text {
79
+ syntax: "*";
80
+ inherits: false;
81
+ }
82
+
37
83
  :host {
84
+ /* Hooks do not inherit, so the parts below read them from the root. */
85
+ --_ui-callout-icon-column: var(--ui-callout-icon-column);
86
+ --_ui-callout-icon: var(--ui-callout-icon);
87
+ --_ui-callout-icon-size: var(--ui-callout-icon-size);
88
+
38
89
  --_callout-surface: var(--ui-info-soft);
39
90
  --_callout-border: var(--ui-info-solid);
40
91
  --_callout-icon: var(--ui-info-solid);
@@ -60,14 +111,14 @@
60
111
  .icon {
61
112
  display: grid;
62
113
  place-items: center;
63
- inline-size: var(--ui-callout-icon-column, 1.125rem);
114
+ inline-size: var(--_ui-callout-icon-column, 1.125rem);
64
115
  block-size: 1lh;
65
- color: var(--ui-callout-icon, var(--_callout-icon));
116
+ color: var(--_ui-callout-icon, var(--_callout-icon));
66
117
  }
67
118
 
68
119
  .icon svg {
69
- inline-size: var(--ui-callout-icon-size, 1.125rem);
70
- block-size: var(--ui-callout-icon-size, 1.125rem);
120
+ inline-size: var(--_ui-callout-icon-size, 1.125rem);
121
+ block-size: var(--_ui-callout-icon-size, 1.125rem);
71
122
  }
72
123
 
73
124
  .content {
@@ -34,7 +34,20 @@
34
34
  </span>
35
35
  </label>
36
36
  <style>
37
+ /* This component's hooks style the element they are set on, and never a nested one. */
38
+ @property --ui-checkbox-gap {
39
+ syntax: "*";
40
+ inherits: false;
41
+ }
42
+ @property --ui-checkbox-size {
43
+ syntax: "*";
44
+ inherits: false;
45
+ }
46
+
37
47
  :host {
48
+ /* Hooks do not inherit, so the parts below read them from the root. */
49
+ --_ui-checkbox-size: var(--ui-checkbox-size);
50
+
38
51
  display: inline-flex;
39
52
  align-items: flex-start;
40
53
  gap: var(--ui-checkbox-gap, var(--ui-space-2));
@@ -71,8 +84,8 @@
71
84
  -webkit-appearance: none;
72
85
  position: relative;
73
86
  flex: 0 0 auto;
74
- inline-size: var(--ui-checkbox-size, 1.125rem);
75
- block-size: var(--ui-checkbox-size, 1.125rem);
87
+ inline-size: var(--_ui-checkbox-size, 1.125rem);
88
+ block-size: var(--_ui-checkbox-size, 1.125rem);
76
89
  margin: 0.125em 0 0;
77
90
  border: 1px solid var(--ui-control-border-hover, var(--ui-border-strong));
78
91
  border-radius: var(--ui-radius-sm);
@@ -132,7 +145,7 @@
132
145
  }
133
146
 
134
147
  :host-state([disabled]) {
135
- color: var(--ui-text-muted);
148
+ color: var(--ui-disabled-text);
136
149
  cursor: not-allowed;
137
150
  }
138
151
  :host-state([disabled]) input {
@@ -2,13 +2,19 @@
2
2
  <defs>
3
3
  <prop name="gap" type="xs | s | m | l | xl"
4
4
  >Space between items, on the spacing scale: xs is 0.5rem, s 0.75rem (also the default), m 1rem, l 1.5rem, and xl 2rem. The --ui-cluster-gap custom property,
5
- when set, overrides it.</prop>
5
+ set on the cluster itself, overrides it; set on an ancestor, it does nothing.</prop>
6
6
  <prop name="align" type="start | center | end | stretch"
7
7
  >How items line up within each row: center (the default) aligns their middles, start their tops, end their bottoms, and stretch makes every item as tall as
8
8
  its row.</prop>
9
9
  </defs>
10
10
  <div><slot></slot></div>
11
11
  <style>
12
+ /* This component's hooks style the element they are set on, and never a nested one. */
13
+ @property --ui-cluster-gap {
14
+ syntax: "*";
15
+ inherits: false;
16
+ }
17
+
12
18
  :host {
13
19
  --_layout-gap: var(--ui-space-3);
14
20
  display: flex;
@@ -239,7 +239,61 @@
239
239
  <div class="authored-options" $ref="options" hidden aria-hidden="true"><slot></slot></div>
240
240
  </div>
241
241
  <style>
242
+ /* This component's hooks style the element they are set on, and never a nested one. */
243
+ @property --ui-combobox-affordance-text {
244
+ syntax: "*";
245
+ inherits: false;
246
+ }
247
+ @property --ui-combobox-item-input-min-inline-size {
248
+ syntax: "*";
249
+ inherits: false;
250
+ }
251
+ @property --ui-combobox-item-item-max-inline-size {
252
+ syntax: "*";
253
+ inherits: false;
254
+ }
255
+ @property --ui-combobox-item-min-block-size {
256
+ syntax: "*";
257
+ inherits: false;
258
+ }
259
+ @property --ui-combobox-label-font-size {
260
+ syntax: "*";
261
+ inherits: false;
262
+ }
263
+ @property --ui-combobox-label-text {
264
+ syntax: "*";
265
+ inherits: false;
266
+ }
267
+ @property --ui-combobox-max-block-size {
268
+ syntax: "*";
269
+ inherits: false;
270
+ }
271
+ @property --ui-combobox-message-text {
272
+ syntax: "*";
273
+ inherits: false;
274
+ }
275
+ @property --ui-combobox-option-check {
276
+ syntax: "*";
277
+ inherits: false;
278
+ }
279
+ @property --ui-combobox-option-text {
280
+ syntax: "*";
281
+ inherits: false;
282
+ }
283
+
242
284
  :host {
285
+ /* Hooks do not inherit, so the parts below read them from the root. */
286
+ --_ui-combobox-label-text: var(--ui-combobox-label-text);
287
+ --_ui-combobox-label-font-size: var(--ui-combobox-label-font-size);
288
+ --_ui-combobox-affordance-text: var(--ui-combobox-affordance-text);
289
+ --_ui-combobox-max-block-size: var(--ui-combobox-max-block-size);
290
+ --_ui-combobox-option-text: var(--ui-combobox-option-text);
291
+ --_ui-combobox-message-text: var(--ui-combobox-message-text);
292
+ --_ui-combobox-option-check: var(--ui-combobox-option-check);
293
+ --_ui-combobox-item-min-block-size: var(--ui-combobox-item-min-block-size);
294
+ --_ui-combobox-item-input-min-inline-size: var(--ui-combobox-item-input-min-inline-size);
295
+ --_ui-combobox-item-item-max-inline-size: var(--ui-combobox-item-item-max-inline-size);
296
+
243
297
  display: grid;
244
298
  gap: var(--ui-space-1);
245
299
  min-inline-size: 0;
@@ -247,8 +301,8 @@
247
301
  font: inherit;
248
302
  }
249
303
  label {
250
- color: var(--ui-combobox-label-text, var(--ui-text-primary));
251
- font-size: var(--ui-combobox-label-font-size, var(--ui-font-size-sm));
304
+ color: var(--_ui-combobox-label-text, var(--ui-text-primary));
305
+ font-size: var(--_ui-combobox-label-font-size, var(--ui-font-size-sm));
252
306
  font-weight: 500;
253
307
  }
254
308
  /* The field and anything that annotates it sit on one row; the help button is beside the box,
@@ -346,7 +400,7 @@
346
400
  border: 0;
347
401
  border-radius: var(--ui-radius-md);
348
402
  background: transparent;
349
- color: var(--ui-combobox-affordance-text, var(--ui-text-secondary));
403
+ color: var(--_ui-combobox-affordance-text, var(--ui-text-secondary));
350
404
  font: inherit;
351
405
  font-weight: 400;
352
406
  min-inline-size: 2rem;
@@ -368,7 +422,7 @@
368
422
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ui-focus-ring) 45%, transparent);
369
423
  }
370
424
  input:disabled, button:disabled {
371
- color: var(--ui-text-muted);
425
+ color: var(--ui-disabled-text);
372
426
  cursor: not-allowed;
373
427
  }
374
428
  .field:has(input:disabled) {
@@ -381,7 +435,7 @@
381
435
  box-sizing: border-box;
382
436
  min-inline-size: 12rem;
383
437
  max-inline-size: calc(100vw - 1rem);
384
- max-block-size: var(--ui-combobox-max-block-size, 18rem);
438
+ max-block-size: var(--_ui-combobox-max-block-size, 18rem);
385
439
  overflow: auto;
386
440
  margin: 0;
387
441
  padding: var(--ui-space-1);
@@ -406,16 +460,16 @@
406
460
  outline-offset: -1px;
407
461
  }
408
462
  .option[aria-disabled="true"] {
409
- color: var(--ui-text-muted);
463
+ color: var(--ui-disabled-text);
410
464
  cursor: not-allowed;
411
465
  }
412
466
  .primary {
413
467
  display: block;
414
- color: var(--ui-combobox-option-text, var(--ui-text-primary));
468
+ color: var(--_ui-combobox-option-text, var(--ui-text-primary));
415
469
  font-weight: 500;
416
470
  }
417
471
  .message, .group {
418
- color: var(--ui-combobox-message-text, var(--ui-text-secondary));
472
+ color: var(--_ui-combobox-message-text, var(--ui-text-secondary));
419
473
  font-weight: 400;
420
474
  font-size: var(--ui-font-size-sm);
421
475
  line-height: var(--ui-line-height-md);
@@ -475,7 +529,7 @@
475
529
  border-color: var(--ui-accent-solid);
476
530
  background-color: var(--ui-accent-solid);
477
531
  background-image: var(
478
- --ui-combobox-option-check,
532
+ --_ui-combobox-option-check,
479
533
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-9'/%3E%3C/svg%3E")
480
534
  );
481
535
  }
@@ -485,11 +539,11 @@
485
539
  flex-wrap: wrap;
486
540
  align-items: center;
487
541
  gap: var(--ui-space-1);
488
- min-block-size: var(--ui-combobox-item-min-block-size, 2.5rem);
542
+ min-block-size: var(--_ui-combobox-item-min-block-size, 2.5rem);
489
543
  padding: var(--ui-space-1);
490
544
  }
491
545
  :host-state([multiple]) input {
492
- flex: 1 0 var(--ui-combobox-item-input-min-inline-size, 5rem);
546
+ flex: 1 0 var(--_ui-combobox-item-input-min-inline-size, 5rem);
493
547
  width: auto;
494
548
  min-block-size: 1.75rem;
495
549
  padding: var(--ui-space-0-5) var(--ui-space-1);
@@ -498,7 +552,7 @@
498
552
  appearance: none;
499
553
  display: inline-flex;
500
554
  min-inline-size: 0;
501
- max-inline-size: min(100%, var(--ui-combobox-item-item-max-inline-size, 12rem));
555
+ max-inline-size: min(100%, var(--_ui-combobox-item-item-max-inline-size, 12rem));
502
556
  overflow: hidden;
503
557
  padding: 0;
504
558
  border: 0;
@@ -2,12 +2,23 @@
2
2
  <defs>
3
3
  <prop name="measure" type="narrow | wide"
4
4
  >The container's maximum width, in characters of the current font: narrow is 45ch, wide is 80ch, and unset is 65ch, a comfortable reading line. The
5
- container centres itself when its parent is wider. The --ui-container-measure custom property, when set, overrides it.</prop>
5
+ container centres itself when its parent is wider. The --ui-container-measure custom property, set on the container itself, overrides it; set on an
6
+ ancestor, it does nothing.</prop>
6
7
  <prop name="gutters" type="s | m | l"
7
8
  >Inline padding on both sides, which keeps content off the edges of a narrow screen: s is 0.75rem, m is 1rem (also the default), and l is 1.5rem.</prop>
8
9
  </defs>
9
10
  <div><slot></slot></div>
10
11
  <style>
12
+ /* This component's hooks style the element they are set on, and never a nested one. */
13
+ @property --ui-container-gutters {
14
+ syntax: "*";
15
+ inherits: false;
16
+ }
17
+ @property --ui-container-measure {
18
+ syntax: "*";
19
+ inherits: false;
20
+ }
21
+
11
22
  :host {
12
23
  --_container-measure: 65ch;
13
24
  --_container-gutters: var(--ui-space-4);
@@ -15,7 +15,16 @@
15
15
  </defs>
16
16
  <span><div class="menu" $ref="menu" role="menu" aria-orientation="vertical"><slot></slot></div></span>
17
17
  <style>
18
+ /* This component's hooks style the element they are set on, and never a nested one. */
19
+ @property --ui-context-menu-z-index {
20
+ syntax: "*";
21
+ inherits: false;
22
+ }
23
+
18
24
  :host {
25
+ /* Hooks do not inherit, so the parts below read them from the root. */
26
+ --_ui-context-menu-z-index: var(--ui-context-menu-z-index);
27
+
19
28
  display: contents;
20
29
  }
21
30
 
@@ -33,7 +42,7 @@
33
42
  box-shadow: var(--ui-elevation-overlay, var(--ui-shadow-lg));
34
43
  outline: 0;
35
44
  overflow: auto;
36
- z-index: var(--ui-context-menu-z-index, 1000);
45
+ z-index: var(--_ui-context-menu-z-index, 1000);
37
46
  min-width: 12rem;
38
47
  opacity: 0;
39
48
  transform: translateY(-4px) scale(0.99);
@@ -22,7 +22,24 @@
22
22
  <footer><slot name="actions"></slot></footer>
23
23
  </dialog>
24
24
  <style>
25
+ /* This component's hooks style the element they are set on, and never a nested one. */
26
+ @property --ui-dialog-duration {
27
+ syntax: "*";
28
+ inherits: false;
29
+ }
30
+ @property --ui-dialog-max-width {
31
+ syntax: "*";
32
+ inherits: false;
33
+ }
34
+ @property --ui-dialog-viewport-gap {
35
+ syntax: "*";
36
+ inherits: false;
37
+ }
38
+
25
39
  :host {
40
+ /* Hooks do not inherit, so the parts below read them from the root. */
41
+ --_ui-dialog-duration: var(--ui-dialog-duration);
42
+
26
43
  position: fixed;
27
44
  inset: 0;
28
45
  box-sizing: border-box;
@@ -189,14 +206,14 @@
189
206
  :host::backdrop {
190
207
  background-color: transparent;
191
208
  transition:
192
- background-color var(--ui-dialog-duration, var(--ui-motion-base)) var(--ui-motion-ease),
193
- display var(--ui-dialog-duration, var(--ui-motion-base)) var(--ui-motion-ease) allow-discrete,
194
- overlay var(--ui-dialog-duration, var(--ui-motion-base)) var(--ui-motion-ease) allow-discrete;
209
+ background-color var(--_ui-dialog-duration, var(--ui-motion-base)) var(--ui-motion-ease),
210
+ display var(--_ui-dialog-duration, var(--ui-motion-base)) var(--ui-motion-ease) allow-discrete,
211
+ overlay var(--_ui-dialog-duration, var(--ui-motion-base)) var(--ui-motion-ease) allow-discrete;
195
212
  }
196
213
 
197
214
  :host[open]::backdrop {
198
215
  background-color: var(--ui-overlay-backdrop);
199
- animation: ui-dialog-backdrop-enter var(--ui-dialog-duration, var(--ui-motion-base)) var(--ui-motion-ease);
216
+ animation: ui-dialog-backdrop-enter var(--_ui-dialog-duration, var(--ui-motion-base)) var(--ui-motion-ease);
200
217
  }
201
218
 
202
219
  @keyframes ui-dialog-backdrop-enter {
@@ -26,8 +26,27 @@
26
26
  <div class="panel" :id="contentId" :inert="not internalOpen"><div class="panel-inner"><slot></slot></div></div>
27
27
  </div>
28
28
  <style>
29
+ /* This component's hooks style the element they are set on, and never a nested one. */
30
+ @property --ui-disclosure-trigger-min-block-size {
31
+ syntax: "*";
32
+ inherits: false;
33
+ }
34
+ @property --ui-disclosure-trigger-padding-block {
35
+ syntax: "*";
36
+ inherits: false;
37
+ }
38
+ @property --ui-disclosure-trigger-padding-inline {
39
+ syntax: "*";
40
+ inherits: false;
41
+ }
42
+
29
43
  /* Density resolves into the summary row's own values; the public tokens still override them. */
30
44
  :host {
45
+ /* Hooks do not inherit, so the parts below read them from the root. */
46
+ --_ui-disclosure-trigger-min-block-size: var(--ui-disclosure-trigger-min-block-size);
47
+ --_ui-disclosure-trigger-padding-block: var(--ui-disclosure-trigger-padding-block);
48
+ --_ui-disclosure-trigger-padding-inline: var(--ui-disclosure-trigger-padding-inline);
49
+
31
50
  --_trigger-min-block-size: var(--ui-control-size);
32
51
  --_trigger-padding-block: var(--ui-space-2);
33
52
  --_trigger-padding-inline: var(--ui-space-3);
@@ -55,9 +74,9 @@
55
74
  gap: var(--ui-space-3);
56
75
  align-items: center;
57
76
  inline-size: 100%;
58
- min-block-size: var(--ui-disclosure-trigger-min-block-size, var(--_trigger-min-block-size));
59
- padding: var(--ui-disclosure-trigger-padding-block, var(--_trigger-padding-block))
60
- var(--ui-disclosure-trigger-padding-inline, var(--_trigger-padding-inline));
77
+ min-block-size: var(--_ui-disclosure-trigger-min-block-size, var(--_trigger-min-block-size));
78
+ padding: var(--_ui-disclosure-trigger-padding-block, var(--_trigger-padding-block))
79
+ var(--_ui-disclosure-trigger-padding-inline, var(--_trigger-padding-inline));
61
80
  border: 0;
62
81
  background: transparent;
63
82
  color: inherit;
@@ -77,7 +96,7 @@
77
96
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ui-focus-ring) 45%, transparent);
78
97
  }
79
98
  .trigger:disabled {
80
- color: var(--ui-text-muted);
99
+ color: var(--ui-disabled-text);
81
100
  cursor: not-allowed;
82
101
  }
83
102
 
@@ -153,7 +153,7 @@
153
153
  }
154
154
 
155
155
  :host-state([disabled]) .preview {
156
- color: var(--ui-text-muted);
156
+ color: var(--ui-disabled-text);
157
157
  cursor: not-allowed;
158
158
  }
159
159
 
@@ -154,8 +154,8 @@
154
154
  }
155
155
 
156
156
  .icon {
157
- --ui-icon-size: 1rem;
158
- --ui-icon-stroke-width: var(--ui-editor-toolbar-icon-stroke-width, 1.75);
157
+ --_ui-default-icon-size: 1rem;
158
+ --_ui-default-icon-stroke-width: var(--ui-editor-toolbar-icon-stroke-width, 1.75);
159
159
  }
160
160
 
161
161
  .body {
@@ -91,8 +91,8 @@
91
91
  }
92
92
 
93
93
  :host button {
94
- --ui-icon-size: 1rem;
95
- --ui-icon-stroke-width: var(--ui-editor-toolbar-icon-stroke-width, 1.75);
94
+ --_ui-default-icon-size: 1rem;
95
+ --_ui-default-icon-stroke-width: var(--ui-editor-toolbar-icon-stroke-width, 1.75);
96
96
  }
97
97
 
98
98
  :host button:hover:not(:disabled) {