@threadlabs/looma 0.33.0 → 0.34.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 (207) hide show
  1. package/README.md +15 -0
  2. package/bin/looma-docs.mjs +3 -0
  3. package/components/shared/overlay.js +8 -2
  4. package/components/shared/surface-material.js +21 -0
  5. package/components/ui-button/ui-button.html +63 -47
  6. package/components/ui-card/ui-card.html +44 -2
  7. package/components/ui-curve-editor/curve.js +10 -0
  8. package/components/ui-curve-editor/ui-curve-editor.html +181 -0
  9. package/components/ui-curve-editor/ui-curve-editor.js +51 -0
  10. package/components/ui-dialog/ui-dialog.html +62 -1
  11. package/components/ui-dialog/ui-dialog.js +9 -1
  12. package/components/ui-icon-button/ui-icon-button.html +75 -23
  13. package/components/ui-menu/ui-menu.html +60 -0
  14. package/components/ui-menu/ui-menu.js +1 -1
  15. package/components/ui-number-input/arithmetic.js +47 -0
  16. package/components/ui-number-input/ui-number-input.html +62 -0
  17. package/components/ui-number-input/ui-number-input.js +44 -0
  18. package/components/ui-popover/ui-popover.html +64 -1
  19. package/components/ui-popover/ui-popover.js +1 -1
  20. package/components/ui-slider/ui-slider.html +84 -0
  21. package/components/ui-slider/ui-slider.js +29 -0
  22. package/components/ui-tabs/ui-tabs.html +6 -1
  23. package/components/ui-text/ui-text.html +31 -6
  24. package/components/ui-tooltip/ui-tooltip.html +60 -0
  25. package/components/ui-tooltip/ui-tooltip.js +1 -1
  26. package/dist/index.js +46 -43
  27. package/docs/README.md +146 -0
  28. package/docs/card.html +77 -0
  29. package/docs/card.js +47 -0
  30. package/docs/catalog-view.js +18 -0
  31. package/docs/catalog-view.mjs +11 -0
  32. package/docs/catalog.json +23984 -0
  33. package/docs/catalog.mjs +131 -0
  34. package/docs/cli.mjs +26 -0
  35. package/docs/commands.mjs +94 -0
  36. package/docs/customizer-render.mjs +66 -0
  37. package/docs/customizer.js +181 -0
  38. package/docs/documentation.css +16 -0
  39. package/docs/examples/ui-action-bar/examples/01-form-footer.behavior.js +7 -0
  40. package/docs/examples/ui-button/examples/08-loading.behavior.js +21 -0
  41. package/docs/examples/ui-checkbox/examples/02-checked-indeterminate-and-disabled.behavior.js +30 -0
  42. package/docs/examples/ui-combobox/examples/06-selected-values.behavior.js +11 -0
  43. package/docs/examples/ui-search-shell/examples/02-label-dismissible-status-and-footer.behavior.js +34 -0
  44. package/docs/examples/ui-toast/examples/01-authored.behavior.js +15 -0
  45. package/docs/examples/ui-toast/examples/02-danger.behavior.js +2 -0
  46. package/docs/examples/ui-tree/examples/03-max-depth-2-and-hover-expand-delay-300.behavior.js +30 -0
  47. package/docs/examples/ui-tree/examples/06-move-without-dragging.behavior.js +2 -0
  48. package/docs/examples/ui-tree/examples/07-multiple-selection.behavior.js +16 -0
  49. package/docs/examples/ui-tree-item/examples/02-container.behavior.js +1 -0
  50. package/docs/index.d.ts +56 -0
  51. package/docs/index.mjs +4 -0
  52. package/docs/local-server.mjs +68 -0
  53. package/docs/preview.js +22 -0
  54. package/docs/reference.html +1 -0
  55. package/docs/reference.js +36 -0
  56. package/docs/render.mjs +93 -0
  57. package/docs/site.mjs +239 -0
  58. package/docs/store.mjs +92 -0
  59. package/docs/theme-session.mjs +51 -0
  60. package/docs/theme.mjs +219 -0
  61. package/docs/value-editors.mjs +33 -0
  62. package/docs/workspace.mjs +32 -0
  63. package/package.json +28 -4
  64. package/styles/ui-button.css +45 -45
  65. package/styles/ui-card.css +47 -0
  66. package/styles/ui-curve-editor.css +109 -0
  67. package/styles/ui-dialog.css +132 -0
  68. package/styles/ui-icon-button.css +63 -20
  69. package/styles/ui-menu.css +72 -0
  70. package/styles/ui-number-input.css +34 -0
  71. package/styles/ui-popover.css +74 -0
  72. package/styles/ui-slider.css +53 -0
  73. package/styles/ui-tabs.css +6 -1
  74. package/styles/ui-text.css +23 -1
  75. package/styles/ui-tooltip.css +72 -0
  76. package/theme-system.css +26 -10
  77. package/tokens.css +8 -2
  78. package/vanilla/UiButton.d.ts +1 -0
  79. package/vanilla/UiButton.js +195 -130
  80. package/vanilla/UiCard.d.ts +1 -1
  81. package/vanilla/UiCard.js +1 -1
  82. package/vanilla/UiCurveEditor.d.ts +28 -0
  83. package/vanilla/UiCurveEditor.js +134 -0
  84. package/vanilla/UiIconButton.d.ts +2 -1
  85. package/vanilla/UiIconButton.js +58 -31
  86. package/vanilla/UiNumberInput.d.ts +33 -0
  87. package/vanilla/UiNumberInput.js +79 -0
  88. package/vanilla/UiSlider.d.ts +33 -0
  89. package/vanilla/UiSlider.js +125 -0
  90. package/vanilla/UiText.d.ts +2 -2
  91. package/vanilla/UiText.js +45 -11
  92. package/vanilla/index.js +3 -0
  93. package/vue/UiButton.d.ts +6 -0
  94. package/vue/UiButton.vue +155 -56
  95. package/vue/UiCard.d.ts +2 -2
  96. package/vue/UiCard.vue +55 -5
  97. package/vue/UiCurveEditor.d.ts +53 -0
  98. package/vue/UiCurveEditor.js +2 -0
  99. package/vue/UiCurveEditor.vue +427 -0
  100. package/vue/UiDialog.vue +177 -1
  101. package/vue/UiIconButton.d.ts +8 -2
  102. package/vue/UiIconButton.vue +164 -34
  103. package/vue/UiMenu.vue +89 -0
  104. package/vue/UiNumberInput.d.ts +83 -0
  105. package/vue/UiNumberInput.js +2 -0
  106. package/vue/UiNumberInput.vue +370 -0
  107. package/vue/UiPopover.vue +92 -1
  108. package/vue/UiSlider.d.ts +83 -0
  109. package/vue/UiSlider.js +2 -0
  110. package/vue/UiSlider.vue +412 -0
  111. package/vue/UiTabs.vue +6 -1
  112. package/vue/UiText.d.ts +7 -5
  113. package/vue/UiText.vue +104 -22
  114. package/vue/UiTooltip.vue +89 -0
  115. package/vue/chunks/UiActionBar.js +1 -1
  116. package/vue/chunks/UiAffordanceScope.js +2 -2
  117. package/vue/chunks/UiAvatar.js +2 -2
  118. package/vue/chunks/UiAvatarGroup.js +2 -2
  119. package/vue/chunks/UiBadge.js +2 -2
  120. package/vue/chunks/UiBreadcrumbItem.js +2 -2
  121. package/vue/chunks/UiBreadcrumbs.js +2 -2
  122. package/vue/chunks/UiButton.js +94 -11
  123. package/vue/chunks/UiCallout.js +2 -2
  124. package/vue/chunks/UiCard.js +6 -5
  125. package/vue/chunks/UiCheckbox.js +2 -2
  126. package/vue/chunks/UiCluster.js +2 -2
  127. package/vue/chunks/UiColorPicker.js +2 -2
  128. package/vue/chunks/UiCombobox.js +2 -2
  129. package/vue/chunks/UiContainer.js +2 -2
  130. package/vue/chunks/UiContextMenu.js +2 -2
  131. package/vue/chunks/UiCover.js +2 -2
  132. package/vue/chunks/UiCurveEditor.js +413 -0
  133. package/vue/chunks/UiDescriptionItem.js +2 -2
  134. package/vue/chunks/UiDescriptionList.js +2 -2
  135. package/vue/chunks/UiDialog.js +4 -4
  136. package/vue/chunks/UiDisclosure.js +2 -2
  137. package/vue/chunks/UiEditable.js +2 -2
  138. package/vue/chunks/UiEditorBlockActions.js +2 -2
  139. package/vue/chunks/UiEditorChipEditor.js +2 -2
  140. package/vue/chunks/UiEditorCodeLanguage.js +2 -2
  141. package/vue/chunks/UiEditorFootnoteEditor.js +2 -2
  142. package/vue/chunks/UiEditorImageToolbar.js +3 -3
  143. package/vue/chunks/UiEditorInsertTableGrid.js +2 -2
  144. package/vue/chunks/UiEditorLinkCard.js +3 -3
  145. package/vue/chunks/UiEditorLinkForm.js +3 -3
  146. package/vue/chunks/UiEditorMentionMenu.js +2 -2
  147. package/vue/chunks/UiEditorMentionMenuItem.js +2 -2
  148. package/vue/chunks/UiEditorSlashMenu.js +2 -2
  149. package/vue/chunks/UiEditorSlashMenuGroup.js +2 -2
  150. package/vue/chunks/UiEditorSlashMenuItem.js +2 -2
  151. package/vue/chunks/UiEditorSurface.js +2 -2
  152. package/vue/chunks/UiEditorTableContextMenu.js +2 -2
  153. package/vue/chunks/UiEditorTableOverlay.js +2 -2
  154. package/vue/chunks/UiEditorTableToolbar.js +2 -2
  155. package/vue/chunks/UiEditorToolbar.js +2 -2
  156. package/vue/chunks/UiFloatingActionButton.js +2 -2
  157. package/vue/chunks/UiFormField.js +2 -2
  158. package/vue/chunks/UiGrid.js +2 -2
  159. package/vue/chunks/UiIcon.js +2 -2
  160. package/vue/chunks/UiIconButton.js +77 -11
  161. package/vue/chunks/UiImage.js +2 -2
  162. package/vue/chunks/UiInput.js +2 -2
  163. package/vue/chunks/UiInputGroup.js +2 -2
  164. package/vue/chunks/UiList.js +2 -2
  165. package/vue/chunks/UiListItem.js +2 -2
  166. package/vue/chunks/UiListbox.js +2 -2
  167. package/vue/chunks/UiMenu.js +3 -3
  168. package/vue/chunks/UiMenuGroup.js +2 -2
  169. package/vue/chunks/UiMenuItem.js +2 -2
  170. package/vue/chunks/UiMeter.js +2 -2
  171. package/vue/chunks/UiNavItem.js +2 -2
  172. package/vue/chunks/UiNumberInput.js +390 -0
  173. package/vue/chunks/UiPageHeader.js +2 -2
  174. package/vue/chunks/UiPopover.js +4 -4
  175. package/vue/chunks/UiRadio.js +2 -2
  176. package/vue/chunks/UiRadioGroup.js +2 -2
  177. package/vue/chunks/UiReel.js +2 -2
  178. package/vue/chunks/UiScrollArea.js +2 -2
  179. package/vue/chunks/UiSearchResultRow.js +2 -2
  180. package/vue/chunks/UiSearchShell.js +2 -2
  181. package/vue/chunks/UiSection.js +2 -2
  182. package/vue/chunks/UiSelect.js +2 -2
  183. package/vue/chunks/UiSeparator.js +2 -2
  184. package/vue/chunks/UiSidebar.js +2 -2
  185. package/vue/chunks/UiSlider.js +396 -0
  186. package/vue/chunks/UiSpinner.js +2 -2
  187. package/vue/chunks/UiStack.js +2 -2
  188. package/vue/chunks/UiStatusMessage.js +2 -2
  189. package/vue/chunks/UiSwatch.js +2 -2
  190. package/vue/chunks/UiSwitch.js +2 -2
  191. package/vue/chunks/UiSwitcher.js +2 -2
  192. package/vue/chunks/UiTable.js +2 -2
  193. package/vue/chunks/UiTabs.js +3 -3
  194. package/vue/chunks/UiText.js +53 -12
  195. package/vue/chunks/UiTextarea.js +2 -2
  196. package/vue/chunks/UiToast.js +2 -2
  197. package/vue/chunks/UiToastRegion.js +2 -2
  198. package/vue/chunks/UiTooltip.js +3 -3
  199. package/vue/chunks/UiTopBar.js +1 -1
  200. package/vue/chunks/UiTree.js +2 -2
  201. package/vue/chunks/UiTreeItem.js +2 -2
  202. package/vue/chunks/_plugin-vue_export-helper.js +68 -2
  203. package/vue/chunks/props.js +24 -1
  204. package/vue/components.css +2215 -1203
  205. package/vue/editor/index.js +623 -211
  206. package/vue/index.d.ts +3 -0
  207. package/vue/index.js +5 -2
@@ -23,7 +23,7 @@
23
23
 
24
24
  /* A heading drops the browser's heading size and weight, so size and weight set it as they set
25
25
  any text, and inherit keeps the text around it. */
26
- :scope:where([data-component~="ui-text"]):is(h2, h3, h4, h5, h6) {
26
+ :scope:where([data-component~="ui-text"]):is(h1, h2, h3, h4, h5, h6) {
27
27
  font-family: var(--ui-font-display, inherit);
28
28
  font-size: inherit;
29
29
  font-weight: inherit;
@@ -86,10 +86,32 @@
86
86
  font-weight: var(--ui-font-semibold);
87
87
  }
88
88
 
89
+ :scope:where([data-component~="ui-text"])[data-ui-text-state~="variant=display"], :scope:where([data-component~="ui-text"])[data-ui-text-state~="variant=heading"] {
90
+ font-family: var(--ui-font-display, var(--ui-font-family-sans));
91
+ font-weight: var(--ui-font-semibold);
92
+ line-height: var(--ui-line-height-tight);
93
+ }
94
+ :scope:where([data-component~="ui-text"])[data-ui-text-state~="variant=display"] {
95
+ font-size: var(--ui-font-size-2xl);
96
+ }
97
+ :scope:where([data-component~="ui-text"])[data-ui-text-state~="variant=heading"] {
98
+ font-size: var(--ui-font-size-xl);
99
+ }
100
+ :scope:where([data-component~="ui-text"])[data-ui-text-state~="variant=label"] {
101
+ font-size: var(--ui-font-size-sm);
102
+ font-weight: var(--ui-font-medium);
103
+ line-height: var(--ui-line-height);
104
+ }
105
+ :scope:where([data-component~="ui-text"])[data-ui-text-state~="variant=caption"] {
106
+ font-size: var(--ui-font-size-sm);
107
+ line-height: var(--ui-line-height);
108
+ }
109
+
89
110
  :scope:where([data-component~="ui-text"])[data-ui-text-state~="variant=eyebrow"] {
90
111
  font-size: var(--ui-font-size-xs);
91
112
  font-weight: var(--ui-font-semibold);
92
113
  letter-spacing: 0.06em;
114
+ line-height: var(--ui-line-height);
93
115
  text-transform: uppercase;
94
116
  }
95
117
  :scope:where([data-component~="ui-text"])[data-ui-text-state~="variant=code"] {
@@ -50,6 +50,7 @@
50
50
  }
51
51
 
52
52
  :scope:where([data-component~="ui-tooltip"]) {
53
+ --_ui-material-scale: 0.08;
53
54
  /* Hooks do not inherit, so the parts below read them from the root. */
54
55
  --_ui-tooltip-border: var(--ui-tooltip-border);
55
56
  --_ui-tooltip-max-inline-size: var(--ui-tooltip-max-inline-size);
@@ -102,6 +103,65 @@
102
103
  box-shadow: var(--_ui-tooltip-shadow, var(--ui-overlay-shadow, var(--ui-elevation-tooltip, var(--ui-shadow-md))));
103
104
  }
104
105
 
106
+ /* Purpose and measured size shape one shared separation lever. The content plane stays opaque;
107
+ transparency, saturation and edge light belong to the surrounding decorative material. */
108
+ .surface {
109
+ --_ui-material-glassiness: clamp(0, var(--ui-glassiness, 0), 1);
110
+ --_ui-material-separation: clamp(0, var(--ui-surface-separation, 0), 1);
111
+ --_ui-material-active: clamp(0, calc((var(--_ui-material-glassiness) + var(--_ui-material-separation)) * 100000), 1);
112
+ --_ui-material-rim: calc((var(--_ui-material-separation) + var(--_ui-material-glassiness) * 0.25) * var(--_ui-material-scale, 0.08) * 8px);
113
+ --_ui-material-content-color: var(--_ui-tooltip-surface, var(--ui-material-content, var(--ui-overlay-surface, var(--ui-surface-elevated))));
114
+ --_ui-material-rim-color: color-mix(in srgb, var(--ui-material-glass, var(--ui-surface-elevated)) calc(var(--_ui-material-active) * 100%), transparent);
115
+ background:
116
+ linear-gradient(var(--_ui-material-content-color), var(--_ui-material-content-color)) padding-box,
117
+ linear-gradient(var(--_ui-material-rim-color), var(--_ui-material-rim-color)) border-box,
118
+ var(--_ui-material-content-color) padding-box;
119
+ border-width: calc(var(--ui-border-width) + var(--_ui-material-rim));
120
+ border-color: var(
121
+ --_ui-tooltip-border,
122
+ color-mix(in oklab, var(--ui-overlay-border, var(--ui-border-strong)) calc((1 - var(--_ui-material-active)) * 100%), transparent)
123
+ );
124
+ box-shadow: var(
125
+ --_ui-tooltip-shadow,
126
+ var(
127
+ --ui-overlay-shadow,
128
+ 0 calc(var(--_ui-material-separation) * var(--_ui-material-scale, 0.08) * 8px) calc(
129
+ var(--_ui-material-separation) * var(--_ui-material-scale, 0.08) * 24px
130
+ ) color-mix(in oklab, var(--ui-text-primary) 15%, transparent),
131
+ inset 0 0 0 calc(var(--_ui-material-active) * var(--ui-border-width)) var(--ui-material-edge, var(--ui-border-strong)),
132
+ var(--ui-elevation-tooltip, var(--ui-shadow-md))
133
+ )
134
+ );
135
+ backdrop-filter: blur(calc(var(--_ui-material-glassiness) * var(--_ui-material-scale, 0.08) * 18px))
136
+ saturate(calc(1 + var(--_ui-material-glassiness) * var(--_ui-material-scale, 0.08) * 0.18));
137
+ -webkit-backdrop-filter: blur(calc(var(--_ui-material-glassiness) * var(--_ui-material-scale, 0.08) * 18px))
138
+ saturate(calc(1 + var(--_ui-material-glassiness) * var(--_ui-material-scale, 0.08) * 0.18));
139
+ }
140
+
141
+ @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
142
+ .surface {
143
+ background: var(--_ui-material-content-color);
144
+ }
145
+ }
146
+
147
+ @media (prefers-reduced-transparency: reduce) {
148
+ .surface {
149
+ background: var(--_ui-material-content-color);
150
+ backdrop-filter: none;
151
+ -webkit-backdrop-filter: none;
152
+ }
153
+ }
154
+
155
+ @media (forced-colors: active) {
156
+ .surface {
157
+ background: Canvas;
158
+ border-color: CanvasText;
159
+ box-shadow: none;
160
+ backdrop-filter: none;
161
+ -webkit-backdrop-filter: none;
162
+ }
163
+ }
164
+
105
165
  /* A keyboard shortcut follows the label after a thin divider, smaller and quieter, as menus show
106
166
  it. The label stays first in the description, so a screen reader hears the name, then the keys. */
107
167
  .shortcut {
@@ -226,6 +286,18 @@
226
286
 
227
287
  /* The label and the shortcut sit side by side, a gap apart, with the label wrapping on its own. */
228
288
 
289
+ /* Purpose and measured size shape one shared separation lever. The content plane stays opaque;
290
+ transparency, saturation and edge light belong to the surrounding decorative material. */
291
+
292
+ @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
293
+ }
294
+
295
+ @media (prefers-reduced-transparency: reduce) {
296
+ }
297
+
298
+ @media (forced-colors: active) {
299
+ }
300
+
229
301
  /* A keyboard shortcut follows the label after a thin divider, smaller and quieter, as menus show
230
302
  it. The label stays first in the description, so a screen reader hears the name, then the keys. */
231
303
 
package/theme-system.css CHANGED
@@ -1,5 +1,12 @@
1
1
  /* Optional shared recipe. Load after tokens.css and the chosen palette.
2
2
  Existing public roles remain the customization interface; no component selectors. */
3
+ /* Resolve shared geometry once where it is declared, rather than once per consuming
4
+ control's font. Palette roles remain unregistered so light-dark resolves locally. */
5
+ @property --ui-font-size { syntax: "<length>"; inherits: true; initial-value: 16px; }
6
+ @property --ui-control-size { syntax: "<length>"; inherits: true; initial-value: 40px; }
7
+ @property --ui-radius-md { syntax: "<length>"; inherits: true; initial-value: 8px; }
8
+ @property --ui-border-width { syntax: "<length>"; inherits: true; initial-value: 1px; }
9
+
3
10
  @layer theme {
4
11
  :root {
5
12
  --ui-density: 1;
@@ -9,6 +16,8 @@
9
16
  --ui-inner-depth: 0.3;
10
17
  --ui-edge-light: 0;
11
18
  --ui-overlay-translucency: 0;
19
+ --ui-glassiness: 0;
20
+ --ui-surface-separation: 0;
12
21
  }
13
22
 
14
23
  :where(:root, [data-theme], [data-contrast]) {
@@ -20,21 +29,23 @@
20
29
  --ui-control-size-sm: calc(var(--ui-control-size) / var(--_ui-theme-ratio));
21
30
  --ui-control-size-md: var(--ui-control-size);
22
31
  --ui-control-size-lg: calc(var(--ui-control-size) * var(--_ui-theme-ratio));
32
+ /* Bend the interior of the family while keeping its endpoints stable. */
23
33
  --ui-space-1: var(--_ui-theme-unit);
24
- --ui-space-2: calc(var(--_ui-theme-unit) * pow(2, var(--_ui-theme-curve)));
25
- --ui-space-3: calc(var(--_ui-theme-unit) * pow(3, var(--_ui-theme-curve)));
26
- --ui-space-4: calc(var(--_ui-theme-unit) * pow(4, var(--_ui-theme-curve)));
34
+ --ui-space-2: calc(var(--_ui-theme-unit) * (1 + 7 * pow(1 / 7, var(--_ui-theme-curve))));
35
+ --ui-space-3: calc(var(--_ui-theme-unit) * (1 + 7 * pow(2 / 7, var(--_ui-theme-curve))));
36
+ --ui-space-4: calc(var(--_ui-theme-unit) * (1 + 7 * pow(3 / 7, var(--_ui-theme-curve))));
27
37
  --ui-space-0-5: calc(var(--ui-space-1) * 0.5);
28
- --ui-space-5: calc(var(--_ui-theme-unit) * pow(6, var(--_ui-theme-curve)));
29
- --ui-space-6: calc(var(--_ui-theme-unit) * pow(8, var(--_ui-theme-curve)));
38
+ --ui-space-5: calc(var(--_ui-theme-unit) * (1 + 7 * pow(5 / 7, var(--_ui-theme-curve))));
39
+ --ui-space-6: calc(var(--_ui-theme-unit) * (1 + 7 * pow(7 / 7, var(--_ui-theme-curve))));
30
40
  /* Vertical editing/action insets fit the shared box instead of growing with the
31
41
  page spacing curve. Multi-line content can still grow intrinsically. */
32
42
  --ui-control-inset-block-sm: max(0px, calc((var(--ui-control-size-sm) - var(--ui-font-size-sm) * var(--ui-line-height-tight) - 2 * var(--ui-border-width)) / 2));
33
43
  --ui-control-inset-block-md: max(0px, calc((var(--ui-control-size-md) - var(--ui-font-size-md) * var(--ui-line-height-tight) - 2 * var(--ui-border-width)) / 2));
34
44
  --ui-control-inset-block-lg: max(0px, calc((var(--ui-control-size-lg) - var(--ui-font-size-md) * var(--ui-line-height-tight) - 2 * var(--ui-border-width)) / 2));
35
- --ui-action-inset-sm: calc(var(--ui-control-size-sm) * 0.625 * var(--ui-density));
36
- --ui-action-inset-md: calc(var(--ui-control-size-md) * 0.625 * var(--ui-density));
37
- --ui-action-inset-lg: calc(var(--ui-control-size-lg) * 0.625 * var(--ui-density));
45
+ --ui-font-size-xs: max(12px, calc(var(--ui-font-size) * 0.75));
46
+ --ui-action-inset-sm: var(--ui-space-2);
47
+ --ui-action-inset-md: var(--ui-space-3);
48
+ --ui-action-inset-lg: var(--ui-space-4);
38
49
 
39
50
  --ui-radius-sm: calc(var(--ui-radius-md) * 0.5);
40
51
  --ui-radius-lg: calc(var(--ui-radius-md) * 1.5);
@@ -62,10 +73,15 @@
62
73
  --ui-control-inset: inset 0 calc(1px * var(--_ui-theme-inner)) calc(3px * var(--_ui-theme-inner)) rgb(0 0 0 / 0.15), inset 0 -1px 0 rgb(255 255 255 / calc(var(--_ui-theme-edge) * 0.18));
63
74
  --ui-pressed: inset 0 calc(2px * var(--_ui-theme-inner)) calc(4px * var(--_ui-theme-inner)) rgb(0 0 0 / 0.2);
64
75
  --ui-overlay-surface: color-mix(in srgb, var(--ui-surface-raised) calc((1 - clamp(0, var(--ui-overlay-translucency), 1)) * 100%), transparent);
76
+ /* Decorative outer material is allowed to transmit the scene. Content keeps
77
+ its own opaque plane; changing the scene cannot undermine text contrast. */
78
+ --ui-material-content: var(--ui-surface-raised);
79
+ --ui-material-glass: color-mix(in srgb, var(--ui-surface-raised) calc((1 - clamp(0, var(--ui-overlay-translucency), 1)) * 35%), transparent);
80
+ --ui-material-edge: color-mix(in srgb, var(--ui-surface-raised) 80%, var(--ui-text));
65
81
 
66
82
  /* Existing timing and easing names stay canonical. */
67
- --ui-motion-press: calc(var(--ui-motion-fast) / 3);
68
- --ui-motion-base: calc(var(--ui-motion-fast) * 1.2);
83
+ --ui-motion-press: var(--ui-motion-fast);
84
+ --ui-motion-base: calc(var(--ui-motion-fast) * 1.5);
69
85
  --ui-motion-ease-out: var(--ui-motion-ease);
70
86
  --ui-press-scale: 0.98;
71
87
  }
package/tokens.css CHANGED
@@ -161,6 +161,12 @@
161
161
  --ui-accent-active: color-mix(in oklab, var(--ui-accent) 74%, var(--ui-text));
162
162
  --ui-accent-subtle: color-mix(in oklab, var(--ui-accent) 12%, var(--ui-surface));
163
163
  --ui-danger-hover: color-mix(in oklab, var(--ui-danger) 86%, var(--ui-text));
164
+ --ui-danger-active: color-mix(in oklab, var(--ui-danger) 74%, var(--ui-text));
165
+ --ui-success-active: color-mix(in oklab, var(--ui-success) 74%, var(--ui-text));
166
+ --ui-warning-active: color-mix(in oklab, var(--ui-warning) 74%, var(--ui-text));
167
+ --ui-info-active: color-mix(in oklab, var(--ui-info) 74%, var(--ui-text));
168
+ --ui-warning-hover: color-mix(in oklab, var(--ui-warning) 86%, var(--ui-text));
169
+ --ui-info-hover: color-mix(in oklab, var(--ui-info) 86%, var(--ui-text));
164
170
 
165
171
  /* Disabled is one decision, not a per-component one: the sunken surface and a pale ink, at
166
172
  full opacity, so a disabled control reads as unavailable rather than as a faded variant.
@@ -340,7 +346,7 @@
340
346
 
341
347
  [data-ui-choice-option]:is(:hover, .active) {
342
348
  background: var(--ui-surface-muted);
343
- outline: var(--ui-border-width) solid var(--ui-focus-ring);
349
+ outline: var(--ui-focus-width) solid var(--ui-focus-ring);
344
350
  outline-offset: calc(-1 * var(--ui-border-width));
345
351
  }
346
352
 
@@ -390,7 +396,7 @@
390
396
 
391
397
  @media (forced-colors: active) {
392
398
  [data-ui-choice-option][aria-selected="true"]:not([aria-disabled="true"]):not(.active) {
393
- outline: var(--ui-border-width) solid Highlight;
399
+ outline: var(--ui-focus-width) solid Highlight;
394
400
  outline-offset: calc(-1 * var(--ui-border-width));
395
401
  }
396
402
  }
@@ -16,6 +16,7 @@ export interface UiButtonProps {
16
16
  href?: string | null;
17
17
  loading?: boolean | null;
18
18
  pending?: boolean | null;
19
+ preset?: "none" | "primary" | "standard" | "quiet" | "destructive" | null;
19
20
  rel?: string | null;
20
21
  shape?: "rounded" | "pill" | null;
21
22
  size?: "xs" | "sm" | "md" | "lg" | null;