@threadlabs/looma 0.6.4 → 0.7.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 (259) hide show
  1. package/components/ui-button/ui-button.html +103 -81
  2. package/components/ui-checkbox/ui-checkbox.html +4 -1
  3. package/components/ui-combobox/ui-combobox.html +40 -3
  4. package/components/ui-combobox/ui-combobox.js +27 -5
  5. package/components/ui-select/ui-select.html +3 -5
  6. package/dist/index.js +1 -1
  7. package/package.json +2 -2
  8. package/styles/ui-affordance-scope.css +1 -1
  9. package/styles/ui-avatar-group.css +1 -1
  10. package/styles/ui-avatar.css +1 -1
  11. package/styles/ui-badge.css +1 -1
  12. package/styles/ui-button.css +112 -80
  13. package/styles/ui-callout.css +1 -1
  14. package/styles/ui-checkbox.css +5 -2
  15. package/styles/ui-cluster.css +1 -1
  16. package/styles/ui-combobox.css +38 -1
  17. package/styles/ui-container.css +1 -1
  18. package/styles/ui-context-menu.css +1 -1
  19. package/styles/ui-dialog.css +1 -1
  20. package/styles/ui-disclosure.css +1 -1
  21. package/styles/ui-editable.css +1 -1
  22. package/styles/ui-editor-insert-table-grid.css +1 -1
  23. package/styles/ui-editor-mention-menu.css +1 -1
  24. package/styles/ui-editor-slash-menu.css +1 -1
  25. package/styles/ui-editor-table-context-menu.css +1 -1
  26. package/styles/ui-editor-table-overlay.css +1 -1
  27. package/styles/ui-editor-table-toolbar.css +1 -1
  28. package/styles/ui-editor-toolbar.css +1 -1
  29. package/styles/ui-floating-action-button.css +1 -1
  30. package/styles/ui-form-field.css +1 -1
  31. package/styles/ui-grid.css +1 -1
  32. package/styles/ui-icon-button.css +1 -1
  33. package/styles/ui-icon.css +1 -1
  34. package/styles/ui-input.css +1 -1
  35. package/styles/ui-menu-item.css +1 -1
  36. package/styles/ui-menu.css +1 -1
  37. package/styles/ui-popover.css +1 -1
  38. package/styles/ui-radio-group.css +1 -1
  39. package/styles/ui-radio.css +1 -1
  40. package/styles/ui-reel.css +1 -1
  41. package/styles/ui-search-result-row.css +1 -1
  42. package/styles/ui-search-shell.css +1 -1
  43. package/styles/ui-select.css +4 -5
  44. package/styles/ui-separator.css +1 -1
  45. package/styles/ui-sidebar.css +1 -1
  46. package/styles/ui-stack.css +1 -1
  47. package/styles/ui-switch.css +1 -1
  48. package/styles/ui-switcher.css +1 -1
  49. package/styles/ui-tabs.css +1 -1
  50. package/styles/ui-textarea.css +1 -1
  51. package/styles/ui-toast-region.css +1 -1
  52. package/styles/ui-tooltip.css +1 -1
  53. package/styles/ui-top-bar.css +1 -1
  54. package/styles/ui-tree-item.css +1 -1
  55. package/styles/ui-tree.css +1 -1
  56. package/theme-dark.css +6 -30
  57. package/theme-high-contrast.css +30 -20
  58. package/theme-light.css +2 -16
  59. package/tokens.css +33 -24
  60. package/vanilla/UiAffordanceScope.d.ts +1 -1
  61. package/vanilla/UiAffordanceScope.js +1 -1
  62. package/vanilla/UiAvatar.d.ts +1 -1
  63. package/vanilla/UiAvatar.js +1 -1
  64. package/vanilla/UiAvatarGroup.d.ts +1 -1
  65. package/vanilla/UiAvatarGroup.js +1 -1
  66. package/vanilla/UiBadge.d.ts +1 -1
  67. package/vanilla/UiBadge.js +1 -1
  68. package/vanilla/UiButton.d.ts +2 -2
  69. package/vanilla/UiButton.js +2 -2
  70. package/vanilla/UiCallout.d.ts +1 -1
  71. package/vanilla/UiCallout.js +1 -1
  72. package/vanilla/UiCheckbox.d.ts +1 -1
  73. package/vanilla/UiCheckbox.js +1 -1
  74. package/vanilla/UiCluster.d.ts +1 -1
  75. package/vanilla/UiCluster.js +1 -1
  76. package/vanilla/UiCombobox.d.ts +1 -1
  77. package/vanilla/UiCombobox.js +2 -2
  78. package/vanilla/UiContainer.d.ts +1 -1
  79. package/vanilla/UiContainer.js +1 -1
  80. package/vanilla/UiContextMenu.d.ts +1 -1
  81. package/vanilla/UiContextMenu.js +1 -1
  82. package/vanilla/UiDialog.d.ts +1 -1
  83. package/vanilla/UiDialog.js +1 -1
  84. package/vanilla/UiDisclosure.d.ts +1 -1
  85. package/vanilla/UiDisclosure.js +1 -1
  86. package/vanilla/UiEditable.d.ts +1 -1
  87. package/vanilla/UiEditable.js +1 -1
  88. package/vanilla/UiEditorInsertTableGrid.d.ts +1 -1
  89. package/vanilla/UiEditorInsertTableGrid.js +1 -1
  90. package/vanilla/UiEditorMentionMenu.d.ts +1 -1
  91. package/vanilla/UiEditorMentionMenu.js +1 -1
  92. package/vanilla/UiEditorSlashMenu.d.ts +1 -1
  93. package/vanilla/UiEditorSlashMenu.js +1 -1
  94. package/vanilla/UiEditorTableContextMenu.d.ts +1 -1
  95. package/vanilla/UiEditorTableContextMenu.js +1 -1
  96. package/vanilla/UiEditorTableOverlay.d.ts +1 -1
  97. package/vanilla/UiEditorTableOverlay.js +1 -1
  98. package/vanilla/UiEditorTableToolbar.d.ts +1 -1
  99. package/vanilla/UiEditorTableToolbar.js +1 -1
  100. package/vanilla/UiEditorToolbar.d.ts +1 -1
  101. package/vanilla/UiEditorToolbar.js +1 -1
  102. package/vanilla/UiFloatingActionButton.d.ts +1 -1
  103. package/vanilla/UiFloatingActionButton.js +1 -1
  104. package/vanilla/UiFormField.d.ts +1 -1
  105. package/vanilla/UiFormField.js +1 -1
  106. package/vanilla/UiGrid.d.ts +1 -1
  107. package/vanilla/UiGrid.js +1 -1
  108. package/vanilla/UiIcon.d.ts +1 -1
  109. package/vanilla/UiIcon.js +1 -1
  110. package/vanilla/UiIconButton.d.ts +1 -1
  111. package/vanilla/UiIconButton.js +1 -1
  112. package/vanilla/UiInput.d.ts +1 -1
  113. package/vanilla/UiInput.js +1 -1
  114. package/vanilla/UiMenu.d.ts +1 -1
  115. package/vanilla/UiMenu.js +1 -1
  116. package/vanilla/UiMenuItem.d.ts +1 -1
  117. package/vanilla/UiMenuItem.js +1 -1
  118. package/vanilla/UiPopover.d.ts +1 -1
  119. package/vanilla/UiPopover.js +1 -1
  120. package/vanilla/UiRadio.d.ts +1 -1
  121. package/vanilla/UiRadio.js +1 -1
  122. package/vanilla/UiRadioGroup.d.ts +1 -1
  123. package/vanilla/UiRadioGroup.js +1 -1
  124. package/vanilla/UiReel.d.ts +1 -1
  125. package/vanilla/UiReel.js +1 -1
  126. package/vanilla/UiSearchResultRow.d.ts +1 -1
  127. package/vanilla/UiSearchResultRow.js +1 -1
  128. package/vanilla/UiSearchShell.d.ts +1 -1
  129. package/vanilla/UiSearchShell.js +1 -1
  130. package/vanilla/UiSelect.d.ts +1 -2
  131. package/vanilla/UiSelect.js +4 -7
  132. package/vanilla/UiSeparator.d.ts +1 -1
  133. package/vanilla/UiSeparator.js +1 -1
  134. package/vanilla/UiSidebar.d.ts +1 -1
  135. package/vanilla/UiSidebar.js +1 -1
  136. package/vanilla/UiStack.d.ts +1 -1
  137. package/vanilla/UiStack.js +1 -1
  138. package/vanilla/UiSwitch.d.ts +1 -1
  139. package/vanilla/UiSwitch.js +1 -1
  140. package/vanilla/UiSwitcher.d.ts +1 -1
  141. package/vanilla/UiSwitcher.js +1 -1
  142. package/vanilla/UiTabs.d.ts +1 -1
  143. package/vanilla/UiTabs.js +1 -1
  144. package/vanilla/UiTextarea.d.ts +1 -1
  145. package/vanilla/UiTextarea.js +1 -1
  146. package/vanilla/UiToastRegion.d.ts +1 -1
  147. package/vanilla/UiToastRegion.js +1 -1
  148. package/vanilla/UiTooltip.d.ts +1 -1
  149. package/vanilla/UiTooltip.js +1 -1
  150. package/vanilla/UiTopBar.d.ts +1 -1
  151. package/vanilla/UiTopBar.js +1 -1
  152. package/vanilla/UiTree.d.ts +1 -1
  153. package/vanilla/UiTree.js +1 -1
  154. package/vanilla/UiTreeItem.d.ts +1 -1
  155. package/vanilla/UiTreeItem.js +1 -1
  156. package/vue/UiAffordanceScope.vue +8 -84
  157. package/vue/UiAvatar.d.ts +1 -1
  158. package/vue/UiAvatar.vue +9 -106
  159. package/vue/UiAvatarGroup.vue +9 -96
  160. package/vue/UiBadge.vue +1 -1
  161. package/vue/UiButton.d.ts +2 -2
  162. package/vue/UiButton.vue +104 -97
  163. package/vue/UiCallout.vue +1 -1
  164. package/vue/UiCheckbox.vue +26 -124
  165. package/vue/UiCluster.vue +1 -1
  166. package/vue/UiCombobox.d.ts +1 -1
  167. package/vue/UiCombobox.vue +270 -479
  168. package/vue/UiContainer.vue +1 -1
  169. package/vue/UiContextMenu.vue +34 -141
  170. package/vue/UiDialog.vue +25 -126
  171. package/vue/UiDisclosure.vue +26 -138
  172. package/vue/UiEditable.vue +46 -158
  173. package/vue/UiEditorInsertTableGrid.vue +19 -138
  174. package/vue/UiEditorMentionMenu.vue +17 -124
  175. package/vue/UiEditorSlashMenu.vue +17 -109
  176. package/vue/UiEditorTableContextMenu.vue +34 -122
  177. package/vue/UiEditorTableOverlay.vue +61 -167
  178. package/vue/UiEditorTableToolbar.vue +34 -142
  179. package/vue/UiEditorToolbar.vue +1 -1
  180. package/vue/UiFloatingActionButton.vue +1 -1
  181. package/vue/UiFormField.vue +7 -79
  182. package/vue/UiGrid.vue +1 -1
  183. package/vue/UiIcon.vue +8 -84
  184. package/vue/UiIconButton.vue +7 -79
  185. package/vue/UiInput.vue +7 -79
  186. package/vue/UiMenu.vue +42 -127
  187. package/vue/UiMenuItem.vue +1 -1
  188. package/vue/UiPopover.vue +25 -121
  189. package/vue/UiRadio.vue +22 -123
  190. package/vue/UiRadioGroup.d.ts +1 -1
  191. package/vue/UiRadioGroup.vue +32 -119
  192. package/vue/UiReel.vue +1 -1
  193. package/vue/UiSearchResultRow.vue +1 -1
  194. package/vue/UiSearchShell.vue +25 -121
  195. package/vue/UiSelect.d.ts +0 -2
  196. package/vue/UiSelect.vue +9 -85
  197. package/vue/UiSeparator.vue +1 -1
  198. package/vue/UiSidebar.vue +32 -133
  199. package/vue/UiStack.vue +1 -1
  200. package/vue/UiSwitch.vue +22 -123
  201. package/vue/UiSwitcher.vue +1 -1
  202. package/vue/UiTabs.vue +24 -128
  203. package/vue/UiTextarea.vue +7 -79
  204. package/vue/UiToastRegion.vue +37 -126
  205. package/vue/UiTooltip.vue +25 -124
  206. package/vue/UiTopBar.vue +1 -1
  207. package/vue/UiTree.vue +56 -137
  208. package/vue/UiTreeItem.vue +28 -144
  209. package/vue/chunks/UiAffordanceScope.js +9 -78
  210. package/vue/chunks/UiAvatar.js +13 -89
  211. package/vue/chunks/UiAvatarGroup.js +10 -80
  212. package/vue/chunks/UiBadge.js +1 -1
  213. package/vue/chunks/UiButton.js +3 -3
  214. package/vue/chunks/UiCallout.js +1 -1
  215. package/vue/chunks/UiCheckbox.js +17 -95
  216. package/vue/chunks/UiCluster.js +1 -1
  217. package/vue/chunks/UiCombobox.js +115 -326
  218. package/vue/chunks/UiContainer.js +1 -1
  219. package/vue/chunks/UiContextMenu.js +21 -113
  220. package/vue/chunks/UiDialog.js +20 -99
  221. package/vue/chunks/UiDisclosure.js +22 -112
  222. package/vue/chunks/UiEditable.js +32 -128
  223. package/vue/chunks/UiEditorInsertTableGrid.js +22 -116
  224. package/vue/chunks/UiEditorMentionMenu.js +18 -116
  225. package/vue/chunks/UiEditorSlashMenu.js +15 -101
  226. package/vue/chunks/UiEditorTableContextMenu.js +12 -91
  227. package/vue/chunks/UiEditorTableOverlay.js +29 -120
  228. package/vue/chunks/UiEditorTableToolbar.js +16 -111
  229. package/vue/chunks/UiEditorToolbar.js +1 -1
  230. package/vue/chunks/UiFloatingActionButton.js +1 -1
  231. package/vue/chunks/UiFormField.js +8 -73
  232. package/vue/chunks/UiGrid.js +1 -1
  233. package/vue/chunks/UiIcon.js +9 -78
  234. package/vue/chunks/UiIconButton.js +8 -73
  235. package/vue/chunks/UiInput.js +8 -73
  236. package/vue/chunks/UiMenu.js +25 -111
  237. package/vue/chunks/UiMenuItem.js +1 -1
  238. package/vue/chunks/UiPopover.js +18 -105
  239. package/vue/chunks/UiRadio.js +17 -95
  240. package/vue/chunks/UiRadioGroup.js +23 -105
  241. package/vue/chunks/UiReel.js +1 -1
  242. package/vue/chunks/UiSearchResultRow.js +1 -1
  243. package/vue/chunks/UiSearchShell.js +17 -94
  244. package/vue/chunks/UiSelect.js +8 -79
  245. package/vue/chunks/UiSeparator.js +1 -1
  246. package/vue/chunks/UiSidebar.js +23 -108
  247. package/vue/chunks/UiStack.js +1 -1
  248. package/vue/chunks/UiSwitch.js +17 -95
  249. package/vue/chunks/UiSwitcher.js +1 -1
  250. package/vue/chunks/UiTabs.js +22 -103
  251. package/vue/chunks/UiTextarea.js +8 -73
  252. package/vue/chunks/UiToastRegion.js +27 -112
  253. package/vue/chunks/UiTooltip.js +18 -106
  254. package/vue/chunks/UiTopBar.js +1 -1
  255. package/vue/chunks/UiTree.js +31 -109
  256. package/vue/chunks/UiTreeItem.js +29 -119
  257. package/vue/chunks/host.js +101 -0
  258. package/vue/components.css +844 -797
  259. package/vue/host.ts +154 -0
@@ -1,4 +1,4 @@
1
- /* Generated by HTML Next 1.0.0-alpha.2. Do not edit. */
1
+ /* Generated by HTML Next 1.0.0-alpha.3. Do not edit. */
2
2
  @scope ([data-component~="ui-select"]) to ([data-component], [data-slotted]) {
3
3
  :scope {
4
4
  box-sizing: border-box;
@@ -22,9 +22,9 @@
22
22
  background-color var(--ui-motion-fast) var(--ui-motion-ease);
23
23
  }
24
24
 
25
- /* Single selects draw their own chevron: the native caret cannot be inset or sized consistently.
25
+ /* The select draws its own chevron: the native caret cannot be inset or sized consistently.
26
26
  * The root stays a native <s-lect>, so the icon is a background image rather than an element. */
27
- :scope:not([multiple]) {
27
+ :scope {
28
28
  appearance: none;
29
29
  padding-inline-end: calc(var(--ui-space-3) + 1.5rem);
30
30
  background-image: var(
@@ -65,7 +65,6 @@
65
65
  cursor: not-allowed;
66
66
  }
67
67
 
68
- :scope[multiple],
69
68
  :scope[size]:not([size="1"]) {
70
69
  min-block-size: 7rem;
71
70
  padding: var(--ui-space-2);
@@ -77,7 +76,7 @@
77
76
  }
78
77
  }
79
78
  @scope ([data-component~="ui-select"]) to ([data-component]) {
80
- /* Single selects draw their own chevron: the native caret cannot be inset or sized consistently.
79
+ /* The select draws its own chevron: the native caret cannot be inset or sized consistently.
81
80
  * The root stays a native <s-lect>, so the icon is a background image rather than an element. */
82
81
 
83
82
  /* The app's invalid flag, or the browser's own verdict once the user has left an invalid field. */
@@ -1,4 +1,4 @@
1
- /* Generated by HTML Next 1.0.0-alpha.2. Do not edit. */
1
+ /* Generated by HTML Next 1.0.0-alpha.3. Do not edit. */
2
2
  @scope ([data-component~="ui-separator"]) to ([data-component], [data-slotted]) {
3
3
  hr {
4
4
  box-sizing: border-box;
@@ -1,4 +1,4 @@
1
- /* Generated by HTML Next 1.0.0-alpha.2. Do not edit. */
1
+ /* Generated by HTML Next 1.0.0-alpha.3. Do not edit. */
2
2
  @scope ([data-component~="ui-sidebar"]) to ([data-component], [data-slotted]) {
3
3
  :scope {
4
4
  position: relative;
@@ -1,4 +1,4 @@
1
- /* Generated by HTML Next 1.0.0-alpha.2. Do not edit. */
1
+ /* Generated by HTML Next 1.0.0-alpha.3. Do not edit. */
2
2
  @scope ([data-component~="ui-stack"]) to ([data-component], [data-slotted]) {
3
3
  :scope {
4
4
  --_layout-gap: var(--ui-space-4);
@@ -1,4 +1,4 @@
1
- /* Generated by HTML Next 1.0.0-alpha.2. Do not edit. */
1
+ /* Generated by HTML Next 1.0.0-alpha.3. Do not edit. */
2
2
  @scope ([data-component~="ui-switch"]) to ([data-component], [data-slotted]) {
3
3
  :scope {
4
4
  display: inline-flex;
@@ -1,4 +1,4 @@
1
- /* Generated by HTML Next 1.0.0-alpha.2. Do not edit. */
1
+ /* Generated by HTML Next 1.0.0-alpha.3. Do not edit. */
2
2
  @scope ([data-component~="ui-switcher"]) to ([data-component], [data-slotted]) {
3
3
  :scope {
4
4
  --_switcher-gap: var(--ui-space-4);
@@ -1,4 +1,4 @@
1
- /* Generated by HTML Next 1.0.0-alpha.2. Do not edit. */
1
+ /* Generated by HTML Next 1.0.0-alpha.3. Do not edit. */
2
2
  @scope ([data-component~="ui-tabs"]) to ([data-component], [data-slotted]) {
3
3
  /* Density resolves into the tab row's own values; the public tokens still override them. */
4
4
  :scope {
@@ -1,4 +1,4 @@
1
- /* Generated by HTML Next 1.0.0-alpha.2. Do not edit. */
1
+ /* Generated by HTML Next 1.0.0-alpha.3. Do not edit. */
2
2
  @scope ([data-component~="ui-textarea"]) to ([data-component], [data-slotted]) {
3
3
  :scope {
4
4
  box-sizing: border-box;
@@ -1,4 +1,4 @@
1
- /* Generated by HTML Next 1.0.0-alpha.2. Do not edit. */
1
+ /* Generated by HTML Next 1.0.0-alpha.3. Do not edit. */
2
2
  @keyframes ui-toast-enter {
3
3
  from {
4
4
  opacity: 0;
@@ -1,4 +1,4 @@
1
- /* Generated by HTML Next 1.0.0-alpha.2. Do not edit. */
1
+ /* Generated by HTML Next 1.0.0-alpha.3. Do not edit. */
2
2
  @scope ([data-component~="ui-tooltip"]) to ([data-component], [data-slotted]) {
3
3
  :scope {
4
4
  position: fixed;
@@ -1,4 +1,4 @@
1
- /* Generated by HTML Next 1.0.0-alpha.2. Do not edit. */
1
+ /* Generated by HTML Next 1.0.0-alpha.3. Do not edit. */
2
2
  @scope ([data-component~="ui-top-bar"]) to ([data-component], [data-slotted]) {
3
3
  :scope {
4
4
  position: sticky;
@@ -1,4 +1,4 @@
1
- /* Generated by HTML Next 1.0.0-alpha.2. Do not edit. */
1
+ /* Generated by HTML Next 1.0.0-alpha.3. Do not edit. */
2
2
  @scope ([data-component~="ui-tree-item"]) to ([data-component], [data-slotted]) {
3
3
  :scope {
4
4
  --_tree-row-min-height: 32px;
@@ -1,4 +1,4 @@
1
- /* Generated by HTML Next 1.0.0-alpha.2. Do not edit. */
1
+ /* Generated by HTML Next 1.0.0-alpha.3. Do not edit. */
2
2
  @scope ([data-component~="ui-tree"]) to ([data-component], [data-slotted]) {
3
3
  :scope[data-ui-tree-state~="density=compact"] {
4
4
  --ui-tree-item-min-block-size: var(--ui-control-size-sm);
package/theme-dark.css CHANGED
@@ -2,30 +2,18 @@
2
2
  @media (prefers-color-scheme: dark) {
3
3
  :root:not([data-theme]) {
4
4
  color-scheme: dark;
5
+ /* The same eleven seeds the light theme sets. Every neutral, tint, hover, and disabled
6
+ colour is mixed from these, and the mixes read the scheme from them: toward this ink
7
+ brightens here, where it darkened there. */
5
8
  --ui-surface: #1a1a1a;
6
9
  --ui-surface-raised: #2a2a2a;
7
10
  --ui-surface-sunken: #2e2e2e;
8
-
9
11
  --ui-text: #f0f0ec;
10
- --ui-text-secondary: #a0a09c;
11
- --ui-text-muted: #6a6a66;
12
- --ui-disabled-surface: #242424;
13
- --ui-disabled-text: #6a6a66;
14
12
  --ui-on-accent: #1a1a1a;
15
13
  --ui-on-danger: #1a1a1a;
16
14
 
17
- --ui-border: #333330;
18
- --ui-border-strong: #4a4a46;
19
- --ui-focus-ring: #a99bf5;
20
- --ui-control-border: #6f6f69;
21
-
22
15
  --ui-accent: #a99bf5;
23
- --ui-accent-hover: #b9adff;
24
- --ui-accent-active: #c8beff;
25
- --ui-accent-subtle: #282342;
26
-
27
16
  --ui-danger: #ef6f86;
28
- --ui-danger-hover: #f58a9d;
29
17
  --ui-success: #33cc66;
30
18
  --ui-warning: #ffaa22;
31
19
  --ui-info: #4d9fff;
@@ -42,30 +30,18 @@
42
30
 
43
31
  [data-theme="dark"] {
44
32
  color-scheme: dark;
33
+ /* The same eleven seeds the light theme sets. Every neutral, tint, hover, and disabled
34
+ colour is mixed from these, and the mixes read the scheme from them: toward this ink
35
+ brightens here, where it darkened there. */
45
36
  --ui-surface: #1a1a1a;
46
37
  --ui-surface-raised: #2a2a2a;
47
38
  --ui-surface-sunken: #2e2e2e;
48
-
49
39
  --ui-text: #f0f0ec;
50
- --ui-text-secondary: #a0a09c;
51
- --ui-text-muted: #6a6a66;
52
- --ui-disabled-surface: #242424;
53
- --ui-disabled-text: #6a6a66;
54
40
  --ui-on-accent: #1a1a1a;
55
41
  --ui-on-danger: #1a1a1a;
56
42
 
57
- --ui-border: #333330;
58
- --ui-border-strong: #4a4a46;
59
- --ui-focus-ring: #a99bf5;
60
- --ui-control-border: #6f6f69;
61
-
62
43
  --ui-accent: #a99bf5;
63
- --ui-accent-hover: #b9adff;
64
- --ui-accent-active: #c8beff;
65
- --ui-accent-subtle: #282342;
66
-
67
44
  --ui-danger: #ef6f86;
68
- --ui-danger-hover: #f58a9d;
69
45
  --ui-success: #33cc66;
70
46
  --ui-warning: #ffaa22;
71
47
  --ui-info: #4d9fff;
@@ -2,46 +2,56 @@
2
2
  @media (prefers-contrast: more) {
3
3
  :root:not([data-contrast]) {
4
4
  color-scheme: light;
5
+ /* The seeds, as in every theme. */
5
6
  --ui-surface: #ffffff;
6
7
  --ui-surface-raised: #ffffff;
7
8
  --ui-surface-sunken: #f0f0ec;
8
9
  --ui-text: #000000;
9
- --ui-text-secondary: #111111;
10
- --ui-text-muted: #222222;
11
- --ui-disabled-surface: #e6e6e6;
12
- --ui-disabled-text: #333333;
10
+ --ui-on-accent: #ffffff;
11
+ --ui-on-danger: #ffffff;
12
+ --ui-accent: #0000cc;
13
+ --ui-danger: #8b0000;
14
+ --ui-success: #006400;
15
+ --ui-warning: #7a3d00;
16
+ --ui-info: #00008b;
17
+
18
+ /* The deliberate divergence, and the whole point of this theme: a mixed border is a grey
19
+ one, and high contrast asks for an edge that is drawn rather than implied. Text steps
20
+ stay closer to the ink than the mixes put them. */
13
21
  --ui-border: #000000;
14
22
  --ui-border-strong: #000000;
15
23
  --ui-control-border: #000000;
24
+ --ui-text-secondary: #111111;
25
+ --ui-text-muted: #222222;
26
+ --ui-disabled-text: #333333;
16
27
  --ui-focus-ring: #0000ff;
17
- --ui-accent: #0000cc;
18
- --ui-accent-hover: #000080;
19
- --ui-accent-active: #000066;
20
- --ui-accent-subtle: #e6e6ff;
21
- --ui-danger: #8b0000;
22
- --ui-danger-hover: #5c0000;
23
28
  }
24
29
  }
25
30
 
26
31
  [data-contrast="high"] {
27
32
  color-scheme: light;
33
+ /* The seeds, as in every theme. */
28
34
  --ui-surface: #ffffff;
29
35
  --ui-surface-raised: #ffffff;
30
36
  --ui-surface-sunken: #f0f0ec;
31
37
  --ui-text: #000000;
32
- --ui-text-secondary: #111111;
33
- --ui-text-muted: #222222;
34
- --ui-disabled-surface: #e6e6e6;
35
- --ui-disabled-text: #333333;
38
+ --ui-on-accent: #ffffff;
39
+ --ui-on-danger: #ffffff;
40
+ --ui-accent: #0000cc;
41
+ --ui-danger: #8b0000;
42
+ --ui-success: #006400;
43
+ --ui-warning: #7a3d00;
44
+ --ui-info: #00008b;
45
+
46
+ /* The deliberate divergence, and the whole point of this theme: a mixed border is a grey
47
+ one, and high contrast asks for an edge that is drawn rather than implied. Text steps
48
+ stay closer to the ink than the mixes put them. */
36
49
  --ui-border: #000000;
37
50
  --ui-border-strong: #000000;
38
51
  --ui-control-border: #000000;
52
+ --ui-text-secondary: #111111;
53
+ --ui-text-muted: #222222;
54
+ --ui-disabled-text: #333333;
39
55
  --ui-focus-ring: #0000ff;
40
- --ui-accent: #0000cc;
41
- --ui-accent-hover: #000080;
42
- --ui-accent-active: #000066;
43
- --ui-accent-subtle: #e6e6ff;
44
- --ui-danger: #8b0000;
45
- --ui-danger-hover: #5c0000;
46
56
  }
47
57
  }
package/theme-light.css CHANGED
@@ -2,31 +2,17 @@
2
2
  :root:not([data-theme]),
3
3
  [data-theme="light"] {
4
4
  color-scheme: light;
5
+ /* The seeds, and only the seeds. Neutrals, hovers, tints, and disabled colours are mixed from
6
+ these in tokens.css, so a product themes Looma by changing these eleven values. */
5
7
  --ui-surface: #ffffff;
6
8
  --ui-surface-raised: #ffffff;
7
9
  --ui-surface-sunken: #f0f0ec;
8
-
9
10
  --ui-text: #1a1a1a;
10
- --ui-text-secondary: #5c5c5c;
11
- --ui-text-muted: #9b9b9b;
12
- --ui-disabled-surface: #f0f0ec;
13
- --ui-disabled-text: #8a8a86;
14
11
  --ui-on-accent: #ffffff;
15
12
  --ui-on-danger: #ffffff;
16
13
 
17
- --ui-border: #e4e4e0;
18
- --ui-border-strong: #c8c8c4;
19
- --ui-focus-ring: #5b55d6;
20
- /* A control needs a visible 3:1 boundary; general dividers stay quieter. */
21
- --ui-control-border: #858580;
22
-
23
14
  --ui-accent: #5b55d6;
24
- --ui-accent-hover: #4b45bd;
25
- --ui-accent-active: #3e399e;
26
- --ui-accent-subtle: #efeffc;
27
-
28
15
  --ui-danger: #b4233f;
29
- --ui-danger-hover: #941d35;
30
16
  --ui-success: #007a33;
31
17
  /* Deep amber, so a solid warning surface carries white text like the other tones (5:1). */
32
18
  --ui-warning: #b45309;
package/tokens.css CHANGED
@@ -4,37 +4,22 @@
4
4
  from them, so a theme that sets only these still looks coherent. A component reads a derived
5
5
  value or its own `--ui-<component>-*` token; it never needs the product to set either. */
6
6
  :root {
7
- /* Colour: intent and neutrals. */
7
+ /* Colour: the whole palette comes from these. An intent, its readable foreground, the page,
8
+ the two surfaces either side of it, and the ink. Everything else — hovers, tints, borders,
9
+ muted text, disabled — is mixed from them further down, so a theme sets these and stops. */
8
10
  --ui-accent: #5b55d6;
9
- --ui-accent-hover: #4b45bd;
10
- --ui-accent-active: #3e399e;
11
- --ui-accent-subtle: #efeffc;
12
- --ui-on-accent: #ffffff;
13
11
  --ui-danger: #b4233f;
14
- --ui-danger-hover: #941d35;
15
- --ui-on-danger: #ffffff;
16
12
  --ui-success: #007a33;
17
13
  --ui-warning: #b45309;
18
14
  --ui-info: #0066cc;
15
+ --ui-on-accent: #ffffff;
16
+ --ui-on-danger: #ffffff;
19
17
  --ui-surface: #ffffff;
18
+ /* Raised and sunken are seeded rather than mixed: which direction reads as "lifted" flips
19
+ between a light and a dark scheme, and only the theme knows which one it is. */
20
20
  --ui-surface-raised: #ffffff;
21
21
  --ui-surface-sunken: #f0f0ec;
22
- /* The middle neutral step. It defaults to a mix of the two either side, but a palette with its
23
- own value for it sets this rather than accepting the mix. */
24
- --ui-surface-muted: color-mix(in srgb, var(--ui-surface-sunken) 50%, var(--ui-surface));
25
22
  --ui-text: #1a1a1a;
26
- --ui-text-secondary: #5c5c5c;
27
- --ui-text-muted: #9b9b9b;
28
- --ui-border: #e4e4e0;
29
- --ui-border-strong: #c8c8c4;
30
-
31
- /* Disabled is one decision, not a per-component one: a neutral surface and text, at full
32
- opacity, so a disabled control reads as unavailable rather than as a faded variant. */
33
- --ui-disabled-surface: #f0f0ec;
34
- --ui-disabled-text: #9b9b9b;
35
-
36
- /* Focus. */
37
- --ui-focus-ring: #5b55d6;
38
23
  --ui-focus-halo: 0 0 0 3px color-mix(in srgb, var(--ui-focus-ring) 40%, transparent);
39
24
 
40
25
  /* Type. */
@@ -83,7 +68,6 @@
83
68
  /* WCAG 2.5.5 counts CSS pixels, so this one stays in px: a smaller root font must not shrink
84
69
  a touch target below 44. */
85
70
  --ui-control-min-block-size: 44px;
86
- --ui-control-border: #858580;
87
71
  }
88
72
 
89
73
  /* Derived values.
@@ -127,12 +111,37 @@
127
111
  --ui-overlay-backdrop: rgba(0, 0, 0, 0.4);
128
112
  --ui-control-inset: inset 0 1px 2px rgb(0 0 0 / 0.07), inset 0 1px 0 rgb(0 0 0 / 0.02);
129
113
  --ui-raised: 0 1px 2px rgb(0 0 0 / 0.07), 0 1px 1px rgb(0 0 0 / 0.04);
130
- --ui-raised-highlight: linear-gradient(rgb(255 255 255 / 0.5), rgb(255 255 255 / 0));
114
+ --ui-raised-highlight: linear-gradient(rgb(255 255 255 / 0.16), rgb(255 255 255 / 0));
115
+ /* The counterpart to --ui-raised: a pressed control takes its shadow inside. */
116
+ --ui-pressed: inset 0 1px 2px rgb(0 0 0 / 0.12);
131
117
 
132
118
  --ui-motion-base: calc(var(--ui-motion-fast) * 1.5);
133
119
  /* Fast start, gentle settle: for reveals that should feel immediate. */
134
120
  --ui-motion-ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
135
121
 
122
+ /* Neutrals: the ink mixed into the page. One ramp, so a theme that changes either end moves
123
+ every step with it. */
124
+ --ui-surface-muted: color-mix(in oklab, var(--ui-surface-sunken) 50%, var(--ui-surface));
125
+ --ui-text-secondary: color-mix(in oklab, var(--ui-text) 72%, var(--ui-surface));
126
+ --ui-text-muted: color-mix(in oklab, var(--ui-text) 45%, var(--ui-surface));
127
+ --ui-border: color-mix(in oklab, var(--ui-text) 12%, var(--ui-surface));
128
+ --ui-border-strong: color-mix(in oklab, var(--ui-text) 25%, var(--ui-surface));
129
+ --ui-control-border: color-mix(in oklab, var(--ui-text) 48%, var(--ui-surface));
130
+
131
+ /* States: toward the ink for pressure, toward the page for a tint. In a dark theme the ink is
132
+ light, so the same mixes brighten instead of darkening, without a second set of values. */
133
+ --ui-accent-hover: color-mix(in oklab, var(--ui-accent) 86%, var(--ui-text));
134
+ --ui-accent-active: color-mix(in oklab, var(--ui-accent) 74%, var(--ui-text));
135
+ --ui-accent-subtle: color-mix(in oklab, var(--ui-accent) 12%, var(--ui-surface));
136
+ --ui-danger-hover: color-mix(in oklab, var(--ui-danger) 86%, var(--ui-text));
137
+
138
+ /* Disabled is one decision, not a per-component one: the sunken surface and the muted ink, at
139
+ full opacity, so a disabled control reads as unavailable rather than as a faded variant. */
140
+ --ui-disabled-surface: var(--ui-surface-sunken);
141
+ --ui-disabled-text: var(--ui-text-muted);
142
+
143
+ --ui-focus-ring: var(--ui-accent);
144
+
136
145
  /* Surfaces and text, in the names components use. */
137
146
  --ui-surface-canvas: var(--ui-surface);
138
147
  --ui-surface-default: var(--ui-surface);
@@ -1,4 +1,4 @@
1
- // Generated by HTML Next 1.0.0-alpha.2 for Vanilla DOM. Do not edit.
1
+ // Generated by HTML Next 1.0.0-alpha.3 for Vanilla DOM. Do not edit.
2
2
  export interface UiAffordanceScopeEventMap {
3
3
  }
4
4
  export interface UiAffordanceScopeElement extends HTMLSpanElement {
@@ -1,4 +1,4 @@
1
- // Generated by HTML Next 1.0.0-alpha.2 for Vanilla DOM. Do not edit.
1
+ // Generated by HTML Next 1.0.0-alpha.3 for Vanilla DOM. Do not edit.
2
2
  import { manageComponentLifecycle } from "@nextwebwg/html-next/runtime";
3
3
  import * as controller from "../components/ui-affordance-scope/ui-affordance-scope.js";
4
4
  import "../styles/ui-affordance-scope.css";
@@ -1,4 +1,4 @@
1
- // Generated by HTML Next 1.0.0-alpha.2 for Vanilla DOM. Do not edit.
1
+ // Generated by HTML Next 1.0.0-alpha.3 for Vanilla DOM. Do not edit.
2
2
  export interface UiAvatarEventMap {
3
3
  }
4
4
  export interface UiAvatarElement extends HTMLSpanElement {
@@ -1,4 +1,4 @@
1
- // Generated by HTML Next 1.0.0-alpha.2 for Vanilla DOM. Do not edit.
1
+ // Generated by HTML Next 1.0.0-alpha.3 for Vanilla DOM. Do not edit.
2
2
  import { manageComponentLifecycle } from "@nextwebwg/html-next/runtime";
3
3
  import * as controller from "../components/ui-avatar/ui-avatar.js";
4
4
  import "../styles/ui-avatar.css";
@@ -1,4 +1,4 @@
1
- // Generated by HTML Next 1.0.0-alpha.2 for Vanilla DOM. Do not edit.
1
+ // Generated by HTML Next 1.0.0-alpha.3 for Vanilla DOM. Do not edit.
2
2
  export interface UiAvatarGroupEventMap {
3
3
  }
4
4
  export interface UiAvatarGroupElement extends HTMLDivElement {
@@ -1,4 +1,4 @@
1
- // Generated by HTML Next 1.0.0-alpha.2 for Vanilla DOM. Do not edit.
1
+ // Generated by HTML Next 1.0.0-alpha.3 for Vanilla DOM. Do not edit.
2
2
  import { manageComponentLifecycle } from "@nextwebwg/html-next/runtime";
3
3
  import * as controller from "../components/ui-avatar-group/ui-avatar-group.js";
4
4
  import "../styles/ui-avatar-group.css";
@@ -1,4 +1,4 @@
1
- // Generated by HTML Next 1.0.0-alpha.2 for Vanilla DOM. Do not edit.
1
+ // Generated by HTML Next 1.0.0-alpha.3 for Vanilla DOM. Do not edit.
2
2
  export interface UiBadgeEventMap {
3
3
  }
4
4
  export interface UiBadgeElement extends HTMLSpanElement {
@@ -1,4 +1,4 @@
1
- // Generated by HTML Next 1.0.0-alpha.2 for Vanilla DOM. Do not edit.
1
+ // Generated by HTML Next 1.0.0-alpha.3 for Vanilla DOM. Do not edit.
2
2
  import { manageGeneratedProps } from "@nextwebwg/html-next/generated-runtime";
3
3
  import "../styles/ui-badge.css";
4
4
 
@@ -1,4 +1,4 @@
1
- // Generated by HTML Next 1.0.0-alpha.2 for Vanilla DOM. Do not edit.
1
+ // Generated by HTML Next 1.0.0-alpha.3 for Vanilla DOM. Do not edit.
2
2
  export interface UiButtonEventMap {
3
3
  }
4
4
  export interface UiButtonElement extends HTMLButtonElement {
@@ -10,7 +10,7 @@ export interface UiButtonProps {
10
10
  disabled?: boolean | null;
11
11
  size?: "sm" | "md" | "lg" | null;
12
12
  stretch?: boolean | null;
13
- tone?: "neutral" | "accent" | null;
13
+ tone?: "accent" | "neutral" | "danger" | "success" | "warning" | "info" | null;
14
14
  variant?: "outline" | "solid" | "danger" | "ghost" | "link" | null;
15
15
  attributes?: Readonly<Record<string, string | number | boolean | null | undefined>>;
16
16
  children?: readonly (string | Node)[];
@@ -1,8 +1,8 @@
1
- // Generated by HTML Next 1.0.0-alpha.2 for Vanilla DOM. Do not edit.
1
+ // Generated by HTML Next 1.0.0-alpha.3 for Vanilla DOM. Do not edit.
2
2
  import { manageComponentLifecycle } from "@nextwebwg/html-next/runtime";
3
3
  import "../styles/ui-button.css";
4
4
 
5
- const definition = {...{"contract":{"tag":"ui-button","props":{"align":{"type":{"enum":["center","start"]},"required":false,"target":{"attribute":"align"},"default":"center"},"disabled":{"type":"boolean","required":false,"target":{"attribute":"disabled"},"default":false},"size":{"type":{"enum":["sm","md","lg"]},"required":false,"target":{"attribute":"size"},"default":"md"},"stretch":{"type":"boolean","required":false,"target":{"attribute":"stretch"},"default":false},"tone":{"type":{"enum":["neutral","accent"]},"required":false,"target":{"attribute":"tone"},"default":"neutral"},"variant":{"type":{"enum":["outline","solid","danger","ghost","link"]},"required":false,"target":{"attribute":"variant"},"default":"outline"}}},"template":{"kind":"element","name":"button","attributes":[{"kind":"literal","name":"type","value":"button"},{"kind":"attribute","name":"disabled","expression":"disabled","expressionPlan":{"source":"disabled","ast":{"kind":"id","name":"disabled"},"dependencies":["disabled"]}}],"children":[{"kind":"slot"}]},"declarations":[],"root":{"kind":"native","element":"button","choices":["button"]}},source:{file:import.meta.url},css:""};
5
+ const definition = {...{"contract":{"tag":"ui-button","props":{"align":{"type":{"enum":["center","start"]},"required":false,"target":{"attribute":"align"},"default":"center"},"disabled":{"type":"boolean","required":false,"target":{"attribute":"disabled"},"default":false},"size":{"type":{"enum":["sm","md","lg"]},"required":false,"target":{"attribute":"size"},"default":"md"},"stretch":{"type":"boolean","required":false,"target":{"attribute":"stretch"},"default":false},"tone":{"type":{"enum":["accent","neutral","danger","success","warning","info"]},"required":false,"target":{"attribute":"tone"},"default":"accent"},"variant":{"type":{"enum":["outline","solid","danger","ghost","link"]},"required":false,"target":{"attribute":"variant"},"default":"outline"}}},"template":{"kind":"element","name":"button","attributes":[{"kind":"literal","name":"type","value":"button"},{"kind":"attribute","name":"disabled","expression":"disabled","expressionPlan":{"source":"disabled","ast":{"kind":"id","name":"disabled"},"dependencies":["disabled"]}}],"children":[{"kind":"slot"}]},"declarations":[],"root":{"kind":"native","element":"button","choices":["button"]}},source:{file:import.meta.url},css:""};
6
6
 
7
7
  export function createUiButton(options = {}) {
8
8
  const { attributes = {}, children = [], slots = {}, as, ...componentProps } = options;
@@ -1,4 +1,4 @@
1
- // Generated by HTML Next 1.0.0-alpha.2 for Vanilla DOM. Do not edit.
1
+ // Generated by HTML Next 1.0.0-alpha.3 for Vanilla DOM. Do not edit.
2
2
  export interface UiCalloutEventMap {
3
3
  }
4
4
  export interface UiCalloutElement extends HTMLDivElement {
@@ -1,4 +1,4 @@
1
- // Generated by HTML Next 1.0.0-alpha.2 for Vanilla DOM. Do not edit.
1
+ // Generated by HTML Next 1.0.0-alpha.3 for Vanilla DOM. Do not edit.
2
2
  import { manageComponentLifecycle } from "@nextwebwg/html-next/runtime";
3
3
  import "../styles/ui-callout.css";
4
4
 
@@ -1,4 +1,4 @@
1
- // Generated by HTML Next 1.0.0-alpha.2 for Vanilla DOM. Do not edit.
1
+ // Generated by HTML Next 1.0.0-alpha.3 for Vanilla DOM. Do not edit.
2
2
  export interface UiCheckboxEventMap {
3
3
  change: CustomEvent<{ readonly checked: boolean; readonly value: string; readonly trigger: "keyboard" | "pointer" | "programmatic" }>;
4
4
  }
@@ -1,4 +1,4 @@
1
- // Generated by HTML Next 1.0.0-alpha.2 for Vanilla DOM. Do not edit.
1
+ // Generated by HTML Next 1.0.0-alpha.3 for Vanilla DOM. Do not edit.
2
2
  import { manageComponentLifecycle } from "@nextwebwg/html-next/runtime";
3
3
  import * as controller from "../components/ui-checkbox/ui-checkbox.js";
4
4
  import "../styles/ui-checkbox.css";
@@ -1,4 +1,4 @@
1
- // Generated by HTML Next 1.0.0-alpha.2 for Vanilla DOM. Do not edit.
1
+ // Generated by HTML Next 1.0.0-alpha.3 for Vanilla DOM. Do not edit.
2
2
  export interface UiClusterEventMap {
3
3
  }
4
4
  export interface UiClusterElement extends HTMLDivElement {
@@ -1,4 +1,4 @@
1
- // Generated by HTML Next 1.0.0-alpha.2 for Vanilla DOM. Do not edit.
1
+ // Generated by HTML Next 1.0.0-alpha.3 for Vanilla DOM. Do not edit.
2
2
  import { manageGeneratedProps } from "@nextwebwg/html-next/generated-runtime";
3
3
  import "../styles/ui-cluster.css";
4
4
 
@@ -1,4 +1,4 @@
1
- // Generated by HTML Next 1.0.0-alpha.2 for Vanilla DOM. Do not edit.
1
+ // Generated by HTML Next 1.0.0-alpha.3 for Vanilla DOM. Do not edit.
2
2
  export interface UiComboboxEventMap {
3
3
  "query-change": CustomEvent<{ readonly query: string; readonly display: string; readonly trigger: "keyboard" | "pointer" | "programmatic" }>;
4
4
  "value-change": CustomEvent<{ readonly value: string | null; readonly query: string; readonly option: { readonly id: string; readonly value: string; readonly label: string; readonly group?: string; readonly disabled?: boolean } | null; readonly kind: "selection" | "clear" | "free-entry" | "create"; readonly trigger: "keyboard" | "pointer" | "programmatic" } | readonly ({ readonly id: string; readonly value: string; readonly label: string; readonly group?: string; readonly disabled?: boolean })[]>;