@threadlabs/looma 0.33.1 → 0.35.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 (215) hide show
  1. package/components/shared/overlay.js +8 -2
  2. package/components/shared/surface-material.js +21 -0
  3. package/components/ui-badge/ui-badge.html +11 -3
  4. package/components/ui-button/ui-button.html +92 -51
  5. package/components/ui-card/ui-card.html +50 -6
  6. package/components/ui-checkbox/ui-checkbox.html +4 -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 +64 -1
  11. package/components/ui-dialog/ui-dialog.js +9 -1
  12. package/components/ui-icon-button/ui-icon-button.html +97 -31
  13. package/components/ui-input/ui-input.html +2 -1
  14. package/components/ui-input-group/ui-input-group.html +4 -1
  15. package/components/ui-light-editor/ui-light-editor.html +45 -0
  16. package/components/ui-light-editor/ui-light-editor.js +53 -0
  17. package/components/ui-menu/ui-menu.html +62 -0
  18. package/components/ui-menu/ui-menu.js +1 -1
  19. package/components/ui-number-input/arithmetic.js +47 -0
  20. package/components/ui-number-input/ui-number-input.html +63 -0
  21. package/components/ui-number-input/ui-number-input.js +47 -0
  22. package/components/ui-popover/ui-popover.html +66 -1
  23. package/components/ui-popover/ui-popover.js +1 -1
  24. package/components/ui-select/ui-select.html +9 -7
  25. package/components/ui-slider/ui-slider.html +84 -0
  26. package/components/ui-slider/ui-slider.js +29 -0
  27. package/components/ui-switch/ui-switch.html +3 -0
  28. package/components/ui-tabs/ui-tabs.html +6 -1
  29. package/components/ui-text/ui-text.html +31 -6
  30. package/components/ui-textarea/ui-textarea.html +2 -1
  31. package/components/ui-tooltip/ui-tooltip.html +60 -0
  32. package/components/ui-tooltip/ui-tooltip.js +1 -1
  33. package/dist/index.js +47 -43
  34. package/docs/README.md +59 -5
  35. package/docs/card.html +16 -2
  36. package/docs/card.js +17 -2
  37. package/docs/catalog.json +1640 -108
  38. package/docs/customizer-render.mjs +50 -11
  39. package/docs/customizer.js +137 -24
  40. package/docs/documentation.css +9 -1
  41. package/docs/index.d.ts +8 -3
  42. package/docs/index.mjs +1 -1
  43. package/docs/preview.js +2 -0
  44. package/docs/render.mjs +16 -7
  45. package/docs/site.mjs +78 -27
  46. package/docs/theme-session.mjs +53 -0
  47. package/docs/theme.mjs +189 -18
  48. package/docs/value-editors.mjs +33 -0
  49. package/package.json +2 -2
  50. package/styles/ui-badge.css +11 -6
  51. package/styles/ui-button.css +74 -49
  52. package/styles/ui-card.css +51 -4
  53. package/styles/ui-checkbox.css +4 -2
  54. package/styles/ui-curve-editor.css +109 -0
  55. package/styles/ui-dialog.css +136 -0
  56. package/styles/ui-icon-button.css +85 -28
  57. package/styles/ui-input-group.css +4 -1
  58. package/styles/ui-input.css +2 -1
  59. package/styles/ui-light-editor.css +28 -0
  60. package/styles/ui-menu.css +74 -0
  61. package/styles/ui-number-input.css +34 -0
  62. package/styles/ui-popover.css +76 -0
  63. package/styles/ui-select.css +9 -7
  64. package/styles/ui-slider.css +53 -0
  65. package/styles/ui-switch.css +3 -0
  66. package/styles/ui-tabs.css +6 -1
  67. package/styles/ui-text.css +23 -1
  68. package/styles/ui-textarea.css +2 -1
  69. package/styles/ui-tooltip.css +72 -0
  70. package/theme-light.css +1 -0
  71. package/theme-system.css +69 -17
  72. package/tokens.css +12 -2
  73. package/vanilla/UiButton.d.ts +1 -0
  74. package/vanilla/UiButton.js +195 -130
  75. package/vanilla/UiCard.d.ts +1 -0
  76. package/vanilla/UiCard.js +12 -12
  77. package/vanilla/UiCurveEditor.d.ts +28 -0
  78. package/vanilla/UiCurveEditor.js +134 -0
  79. package/vanilla/UiIconButton.d.ts +2 -1
  80. package/vanilla/UiIconButton.js +58 -31
  81. package/vanilla/UiLightEditor.d.ts +29 -0
  82. package/vanilla/UiLightEditor.js +102 -0
  83. package/vanilla/UiNumberInput.d.ts +33 -0
  84. package/vanilla/UiNumberInput.js +86 -0
  85. package/vanilla/UiSlider.d.ts +33 -0
  86. package/vanilla/UiSlider.js +125 -0
  87. package/vanilla/UiText.d.ts +2 -2
  88. package/vanilla/UiText.js +45 -11
  89. package/vanilla/index.js +4 -0
  90. package/vue/UiBadge.vue +29 -4
  91. package/vue/UiButton.d.ts +6 -0
  92. package/vue/UiButton.vue +188 -60
  93. package/vue/UiCard.d.ts +6 -0
  94. package/vue/UiCard.vue +80 -6
  95. package/vue/UiCheckbox.vue +4 -2
  96. package/vue/UiCurveEditor.d.ts +53 -0
  97. package/vue/UiCurveEditor.js +2 -0
  98. package/vue/UiCurveEditor.vue +427 -0
  99. package/vue/UiDialog.vue +181 -1
  100. package/vue/UiIconButton.d.ts +8 -2
  101. package/vue/UiIconButton.vue +190 -45
  102. package/vue/UiInput.vue +2 -1
  103. package/vue/UiInputGroup.vue +4 -1
  104. package/vue/UiLightEditor.d.ts +75 -0
  105. package/vue/UiLightEditor.js +2 -0
  106. package/vue/UiLightEditor.vue +402 -0
  107. package/vue/UiMenu.vue +91 -0
  108. package/vue/UiNumberInput.d.ts +83 -0
  109. package/vue/UiNumberInput.js +2 -0
  110. package/vue/UiNumberInput.vue +399 -0
  111. package/vue/UiPopover.vue +94 -1
  112. package/vue/UiSelect.vue +16 -10
  113. package/vue/UiSlider.d.ts +83 -0
  114. package/vue/UiSlider.js +2 -0
  115. package/vue/UiSlider.vue +412 -0
  116. package/vue/UiSwitch.vue +3 -0
  117. package/vue/UiTabs.vue +6 -1
  118. package/vue/UiText.d.ts +7 -5
  119. package/vue/UiText.vue +104 -22
  120. package/vue/UiTextarea.vue +2 -1
  121. package/vue/UiTooltip.vue +89 -0
  122. package/vue/chunks/UiActionBar.js +1 -1
  123. package/vue/chunks/UiAffordanceScope.js +2 -2
  124. package/vue/chunks/UiAvatar.js +2 -2
  125. package/vue/chunks/UiAvatarGroup.js +2 -2
  126. package/vue/chunks/UiBadge.js +3 -3
  127. package/vue/chunks/UiBreadcrumbItem.js +2 -2
  128. package/vue/chunks/UiBreadcrumbs.js +2 -2
  129. package/vue/chunks/UiButton.js +94 -11
  130. package/vue/chunks/UiCallout.js +2 -2
  131. package/vue/chunks/UiCard.js +34 -5
  132. package/vue/chunks/UiCheckbox.js +3 -3
  133. package/vue/chunks/UiCluster.js +2 -2
  134. package/vue/chunks/UiColorPicker.js +2 -2
  135. package/vue/chunks/UiCombobox.js +2 -2
  136. package/vue/chunks/UiContainer.js +2 -2
  137. package/vue/chunks/UiContextMenu.js +2 -2
  138. package/vue/chunks/UiCover.js +2 -2
  139. package/vue/chunks/UiCurveEditor.js +413 -0
  140. package/vue/chunks/UiDescriptionItem.js +2 -2
  141. package/vue/chunks/UiDescriptionList.js +2 -2
  142. package/vue/chunks/UiDialog.js +4 -4
  143. package/vue/chunks/UiDisclosure.js +2 -2
  144. package/vue/chunks/UiEditable.js +2 -2
  145. package/vue/chunks/UiEditorBlockActions.js +2 -2
  146. package/vue/chunks/UiEditorChipEditor.js +2 -2
  147. package/vue/chunks/UiEditorCodeLanguage.js +2 -2
  148. package/vue/chunks/UiEditorFootnoteEditor.js +2 -2
  149. package/vue/chunks/UiEditorImageToolbar.js +3 -3
  150. package/vue/chunks/UiEditorInsertTableGrid.js +2 -2
  151. package/vue/chunks/UiEditorLinkCard.js +3 -3
  152. package/vue/chunks/UiEditorLinkForm.js +3 -3
  153. package/vue/chunks/UiEditorMentionMenu.js +2 -2
  154. package/vue/chunks/UiEditorMentionMenuItem.js +2 -2
  155. package/vue/chunks/UiEditorSlashMenu.js +2 -2
  156. package/vue/chunks/UiEditorSlashMenuGroup.js +2 -2
  157. package/vue/chunks/UiEditorSlashMenuItem.js +2 -2
  158. package/vue/chunks/UiEditorSurface.js +2 -2
  159. package/vue/chunks/UiEditorTableContextMenu.js +2 -2
  160. package/vue/chunks/UiEditorTableOverlay.js +2 -2
  161. package/vue/chunks/UiEditorTableToolbar.js +2 -2
  162. package/vue/chunks/UiEditorToolbar.js +2 -2
  163. package/vue/chunks/UiFloatingActionButton.js +2 -2
  164. package/vue/chunks/UiFormField.js +2 -2
  165. package/vue/chunks/UiGrid.js +2 -2
  166. package/vue/chunks/UiIcon.js +2 -2
  167. package/vue/chunks/UiIconButton.js +77 -11
  168. package/vue/chunks/UiImage.js +2 -2
  169. package/vue/chunks/UiInput.js +3 -3
  170. package/vue/chunks/UiInputGroup.js +3 -3
  171. package/vue/chunks/UiLightEditor.js +347 -0
  172. package/vue/chunks/UiList.js +2 -2
  173. package/vue/chunks/UiListItem.js +2 -2
  174. package/vue/chunks/UiListbox.js +2 -2
  175. package/vue/chunks/UiMenu.js +3 -3
  176. package/vue/chunks/UiMenuGroup.js +2 -2
  177. package/vue/chunks/UiMenuItem.js +2 -2
  178. package/vue/chunks/UiMeter.js +2 -2
  179. package/vue/chunks/UiNavItem.js +2 -2
  180. package/vue/chunks/UiNumberInput.js +403 -0
  181. package/vue/chunks/UiPageHeader.js +2 -2
  182. package/vue/chunks/UiPopover.js +4 -4
  183. package/vue/chunks/UiRadio.js +2 -2
  184. package/vue/chunks/UiRadioGroup.js +2 -2
  185. package/vue/chunks/UiReel.js +2 -2
  186. package/vue/chunks/UiScrollArea.js +2 -2
  187. package/vue/chunks/UiSearchResultRow.js +2 -2
  188. package/vue/chunks/UiSearchShell.js +2 -2
  189. package/vue/chunks/UiSection.js +2 -2
  190. package/vue/chunks/UiSelect.js +3 -3
  191. package/vue/chunks/UiSeparator.js +2 -2
  192. package/vue/chunks/UiSidebar.js +2 -2
  193. package/vue/chunks/UiSlider.js +396 -0
  194. package/vue/chunks/UiSpinner.js +2 -2
  195. package/vue/chunks/UiStack.js +2 -2
  196. package/vue/chunks/UiStatusMessage.js +2 -2
  197. package/vue/chunks/UiSwatch.js +2 -2
  198. package/vue/chunks/UiSwitch.js +3 -3
  199. package/vue/chunks/UiSwitcher.js +2 -2
  200. package/vue/chunks/UiTable.js +2 -2
  201. package/vue/chunks/UiTabs.js +3 -3
  202. package/vue/chunks/UiText.js +53 -12
  203. package/vue/chunks/UiTextarea.js +3 -3
  204. package/vue/chunks/UiToast.js +2 -2
  205. package/vue/chunks/UiToastRegion.js +2 -2
  206. package/vue/chunks/UiTooltip.js +3 -3
  207. package/vue/chunks/UiTopBar.js +1 -1
  208. package/vue/chunks/UiTree.js +2 -2
  209. package/vue/chunks/UiTreeItem.js +2 -2
  210. package/vue/chunks/_plugin-vue_export-helper.js +68 -2
  211. package/vue/chunks/props.js +24 -1
  212. package/vue/components.css +3391 -2139
  213. package/vue/editor/index.js +623 -211
  214. package/vue/index.d.ts +4 -0
  215. package/vue/index.js +6 -2
@@ -0,0 +1,399 @@
1
+ <!-- Generated by HTML Next 1.0.0-alpha.69 for Vue 3.5. Do not edit. -->
2
+ <script setup lang="ts">
3
+ import { computed, getCurrentInstance, provide, ref, watchSyncEffect } from 'vue'
4
+ import type { PropType } from 'vue'
5
+ import {
6
+ checkHydratedRoot,
7
+ concat,
8
+ createDispatch,
9
+ initializedState,
10
+ nativeAttrs,
11
+ useComponentHost,
12
+ useReflectedProp,
13
+ warnUnless,
14
+ } from './host'
15
+ import { acceptsControllerWrite } from './props'
16
+ import {
17
+ BINDING_INPUTS_PROP,
18
+ checkedProp,
19
+ checkPropInput,
20
+ copyStateSeed,
21
+ evaluateInput,
22
+ type InputBindings,
23
+ inputDefault,
24
+ inputRead,
25
+ propValidityState,
26
+ READY_INPUT,
27
+ requireInputStatus,
28
+ UNRESOLVED_INPUT,
29
+ vPropValidity,
30
+ vuePropInputs,
31
+ } from './props'
32
+ import UiIcon from './UiIcon.vue'
33
+ import UiIconButton from './UiIconButton.vue'
34
+ import UiInput from './UiInput.vue'
35
+
36
+ defineOptions({ inheritAttrs: false })
37
+
38
+ const propValidityContract = {
39
+ props: {
40
+ disabled: {
41
+ type: { kind: 'terminal', name: 'boolean' },
42
+ required: false,
43
+ target: { attribute: 'disabled' },
44
+ description:
45
+ 'Prevents typing, stepping and pointer or keyboard changes while keeping the value visible.',
46
+ default: false,
47
+ },
48
+ label: {
49
+ type: { kind: 'terminal', name: 'string' },
50
+ required: false,
51
+ target: { attribute: 'aria-label' },
52
+ description: 'Accessible name for the editing control.',
53
+ default: 'Value',
54
+ },
55
+ max: {
56
+ type: { kind: 'terminal', name: 'number' },
57
+ required: false,
58
+ target: { attribute: 'max' },
59
+ description: 'Inclusive upper bound applied to every editing path.',
60
+ default: 1000000,
61
+ },
62
+ min: {
63
+ type: { kind: 'terminal', name: 'number' },
64
+ required: false,
65
+ target: { attribute: 'min' },
66
+ description:
67
+ 'Inclusive lower bound applied to typing, arithmetic, stepping and external values.',
68
+ default: -1000000,
69
+ },
70
+ name: {
71
+ type: { kind: 'terminal', name: 'string' },
72
+ required: false,
73
+ target: { attribute: 'name' },
74
+ description: 'Optional form field name.',
75
+ default: '',
76
+ },
77
+ size: {
78
+ type: { kind: 'terminal', name: 'keyword' },
79
+ required: false,
80
+ target: { attribute: 'size' },
81
+ description: 'Shared field and button height.',
82
+ values: ['sm', 'md', 'lg'],
83
+ default: 'md',
84
+ },
85
+ step: {
86
+ type: { kind: 'terminal', name: 'number' },
87
+ required: false,
88
+ target: { attribute: 'step' },
89
+ description:
90
+ 'Positive increment used by arrows and step buttons; Shift multiplies it by ten.',
91
+ default: 1,
92
+ },
93
+ unit: {
94
+ type: { kind: 'terminal', name: 'string' },
95
+ required: false,
96
+ target: { attribute: 'unit' },
97
+ description:
98
+ 'One accepted unit, such as px, rem, ms or %. Bare numbers use this unit. No automatic unit conversion.',
99
+ default: '',
100
+ },
101
+ value: {
102
+ type: { kind: 'terminal', name: 'string' },
103
+ required: false,
104
+ target: { attribute: 'value' },
105
+ description:
106
+ 'Exact value. Arithmetic is calculated on Enter or blur; the resulting value includes unit. Invalid expressions stay visible and expose invalid\n state.',
107
+ default: '0',
108
+ },
109
+ },
110
+ } as const
111
+ const props = defineProps({
112
+ disabled: { type: null as unknown as PropType<boolean | null> },
113
+ label: { type: null as unknown as PropType<string | null> },
114
+ max: { type: null as unknown as PropType<number | null> },
115
+ min: { type: null as unknown as PropType<number | null> },
116
+ name: { type: null as unknown as PropType<string | null> },
117
+ size: { type: null as unknown as PropType<'sm' | 'md' | 'lg' | null> },
118
+ step: { type: null as unknown as PropType<number | null> },
119
+ unit: { type: null as unknown as PropType<string | null> },
120
+ value: { type: null as unknown as PropType<string | null> },
121
+ [BINDING_INPUTS_PROP]: { type: null as unknown as PropType<InputBindings> },
122
+ })
123
+ const acceptedProps: Record<string, unknown> = {
124
+ disabled: false,
125
+ label: 'Value',
126
+ max: 1000000,
127
+ min: -1000000,
128
+ name: '',
129
+ size: 'md',
130
+ step: 1,
131
+ unit: '',
132
+ value: '0',
133
+ }
134
+ const inputTracking = vuePropInputs(acceptedProps, {
135
+ disabled: false,
136
+ label: 'Value',
137
+ max: 1000000,
138
+ min: -1000000,
139
+ name: '',
140
+ size: 'md',
141
+ step: 1,
142
+ unit: '',
143
+ value: '0',
144
+ }, (name, value, source, values) => {
145
+ switch (name) {
146
+ case 'disabled':
147
+ return checkPropInput(value, { kind: 'terminal', name: 'boolean' }, true, true)
148
+ case 'label':
149
+ return checkPropInput(value, { kind: 'terminal', name: 'string' }, true, true)
150
+ case 'max':
151
+ return checkPropInput(value, { kind: 'terminal', name: 'number' }, true, true)
152
+ case 'min':
153
+ return checkPropInput(value, { kind: 'terminal', name: 'number' }, true, true)
154
+ case 'name':
155
+ return checkPropInput(value, { kind: 'terminal', name: 'string' }, true, true)
156
+ case 'size':
157
+ return checkPropInput(value, { kind: 'terminal', name: 'keyword' }, true, true)
158
+ case 'step':
159
+ return checkPropInput(value, { kind: 'terminal', name: 'number' }, true, true)
160
+ case 'unit':
161
+ return checkPropInput(value, { kind: 'terminal', name: 'string' }, true, true)
162
+ case 'value':
163
+ return checkPropInput(value, { kind: 'terminal', name: 'string' }, true, true)
164
+ default:
165
+ return { ok: false }
166
+ }
167
+ }, () => {
168
+ void checkedProps.value
169
+ })
170
+ const propInputs = inputTracking.inputs
171
+ const checkedProps = computed(() => {
172
+ void inputTracking.version.value
173
+ return ({
174
+ disabled: propInputs.value<boolean | null>(
175
+ 'disabled',
176
+ props['disabled'],
177
+ props[BINDING_INPUTS_PROP],
178
+ ) as boolean,
179
+ label: propInputs.value<string | null>(
180
+ 'label',
181
+ props['label'],
182
+ props[BINDING_INPUTS_PROP],
183
+ ) as string,
184
+ max: propInputs.value<number | null>('max', props['max'], props[BINDING_INPUTS_PROP]) as number,
185
+ min: propInputs.value<number | null>('min', props['min'], props[BINDING_INPUTS_PROP]) as number,
186
+ name: propInputs.value<string | null>(
187
+ 'name',
188
+ props['name'],
189
+ props[BINDING_INPUTS_PROP],
190
+ ) as string,
191
+ size: propInputs.value<'sm' | 'md' | 'lg' | null>(
192
+ 'size',
193
+ props['size'],
194
+ props[BINDING_INPUTS_PROP],
195
+ ) as 'sm' | 'md' | 'lg',
196
+ step: propInputs.value<number | null>(
197
+ 'step',
198
+ props['step'],
199
+ props[BINDING_INPUTS_PROP],
200
+ ) as number,
201
+ unit: propInputs.value<string | null>(
202
+ 'unit',
203
+ props['unit'],
204
+ props[BINDING_INPUTS_PROP],
205
+ ) as string,
206
+ value: propInputs.value<string | null>(
207
+ 'value',
208
+ props['value'],
209
+ props[BINDING_INPUTS_PROP],
210
+ ) as string,
211
+ })
212
+ })
213
+ const inputStatus = (name: string, handlesError: boolean) => {
214
+ void checkedProps.value
215
+ void inputTracking.version.value
216
+ return requireInputStatus(propInputs.status(name), handlesError)
217
+ }
218
+ void checkedProps.value
219
+ watchSyncEffect(() => {
220
+ void checkedProps.value
221
+ })
222
+ const reflectedProp = useReflectedProp()
223
+ const hydrationInstance = getCurrentInstance()
224
+ const emit = defineEmits<{
225
+ 'update:value': [value: string]
226
+ input: [event: CustomEvent<{ readonly value: string }>]
227
+ change: [event: CustomEvent<{ readonly value: string }>]
228
+ }>()
229
+
230
+ const root = ref<HTMLElement | null>(null)
231
+ const display = initializedState<string>(
232
+ () =>
233
+ evaluateInput(() => {
234
+ return inputRead(checkedProps.value.value, propInputs.status('value'))
235
+ }),
236
+ (next: unknown) => typeof next === 'string',
237
+ copyStateSeed,
238
+ () =>
239
+ warnUnless(false, 'initializer:display', 'State `display` does not satisfy its declared type.'),
240
+ )
241
+ provide('html-next:ui-number-input:display', display)
242
+ const declarationStatuses = { display: () => display.status() } as Record<
243
+ string,
244
+ () => typeof READY_INPUT
245
+ >
246
+ const declarationStatus = (name: string) => declarationStatuses[name]!()
247
+ display.start()
248
+ checkHydratedRoot('span', 'ui-number-input')
249
+
250
+ const isInputDetail = (
251
+ detail: unknown,
252
+ ): boolean => (detail !== null && typeof detail === 'object' && !Array.isArray(detail)
253
+ && typeof (detail as Record<string, unknown>)['value'] === 'string'
254
+ && Object.keys(detail as object).every((key) => ['value'].includes(key)))
255
+ const dispatch = createDispatch(root, emit as (name: string, detail: unknown) => void, {
256
+ checks: {
257
+ input: isInputDetail,
258
+ change: isInputDetail,
259
+ },
260
+ modeled: ['value'],
261
+ })
262
+
263
+ useComponentHost(() => import('../components/ui-number-input/ui-number-input.js'), {
264
+ root,
265
+ module: true,
266
+ dispatch,
267
+ acceptsState: (name: string, keys: readonly string[], value: unknown) =>
268
+ acceptsControllerWrite(
269
+ value,
270
+ ({ display: { kind: 'terminal', name: 'string' } } as Record<string, any>)[name],
271
+ keys,
272
+ ),
273
+ controllerSource: {
274
+ specifier: '../components/ui-number-input/ui-number-input.js',
275
+ definition: './components/ui-number-input/ui-number-input.html',
276
+ },
277
+ props: checkedProps,
278
+ inputs: propInputs,
279
+ inputTracking,
280
+ propInputs: (name: string) => {
281
+ const incoming = hydrationInstance?.vnode.props
282
+ const kebab = name.replace(/[A-Z]/g, (letter) => '-' + letter.toLowerCase())
283
+ return incoming !== null && incoming !== undefined
284
+ ? (incoming[name] ?? incoming[kebab] ?? null)
285
+ : null
286
+ },
287
+ propNames: ['disabled', 'label', 'max', 'min', 'name', 'size', 'step', 'unit', 'value'],
288
+ propValidity: (name: string) =>
289
+ propValidityState({ contract: propValidityContract, values: { ...props } }, name),
290
+ state: { display },
291
+ availability: { display: () => declarationStatus('display') },
292
+ })
293
+ </script>
294
+
295
+ <template>
296
+ <span
297
+ class="ui-number-input"
298
+ v-bind="nativeAttrs($attrs)"
299
+ data-hn
300
+ v-prop-validity="{ contract: propValidityContract, values: { ...props } }"
301
+ :data-ui-number-input-prop-disabled="reflectedProp('disabled', 'disabled', checkedProps.disabled, undefined, false)"
302
+ :data-ui-number-input-prop-label="reflectedProp('label', 'label', checkedProps.label, undefined, false)"
303
+ :data-ui-number-input-prop-max="reflectedProp('max', 'max', checkedProps.max, undefined, false)"
304
+ :data-ui-number-input-prop-min="reflectedProp('min', 'min', checkedProps.min, undefined, false)"
305
+ :data-ui-number-input-prop-name="reflectedProp('name', 'name', checkedProps.name, undefined, false)"
306
+ :data-ui-number-input-prop-size="reflectedProp('size', 'size', checkedProps.size, undefined, false)"
307
+ :data-ui-number-input-prop-step="reflectedProp('step', 'step', checkedProps.step, undefined, false)"
308
+ :data-ui-number-input-prop-unit="reflectedProp('unit', 'unit', checkedProps.unit, undefined, false)"
309
+ :data-ui-number-input-prop-value="reflectedProp('value', 'value', checkedProps.value, undefined, false)"
310
+ ref="root"
311
+ ><template
312
+ v-for="boundInput in [evaluateInput(
313
+ () => (concat('Decrease ', inputRead(checkedProps.label, inputStatus('label', true)))) as any,
314
+ READY_INPUT,
315
+ )]"
316
+ ><UiIconButton
317
+ class="ui-icon-button"
318
+ data-number-step="decrease"
319
+ :match-button="true"
320
+ type="button"
321
+ :size="checkedProps.size"
322
+ :disabled="checkedProps.disabled"
323
+ :label="boundInput.value"
324
+ v-bind="{
325
+ [BINDING_INPUTS_PROP]: {
326
+ size: () => ({ value: checkedProps.size, status: inputStatus('size', true) }),
327
+ disabled: () => ({ value: checkedProps.disabled, status: inputStatus('disabled', true) }),
328
+ label: () => boundInput,
329
+ },
330
+ }"
331
+ ><UiIcon class="ui-icon" name="minus" /></UiIconButton></template>{{ ' ' }}<UiInput
332
+ class="ui-input"
333
+ data-ui-field-control=""
334
+ inputmode="decimal"
335
+ spellcheck="false"
336
+ aria-description="Enter calculates arithmetic. Arrow keys step; Shift changes ten steps."
337
+ :size="checkedProps.size"
338
+ :disabled="checkedProps.disabled"
339
+ :value="display"
340
+ :aria-label="checkedProps.label"
341
+ :name="checkedProps.name"
342
+ v-bind="{
343
+ [BINDING_INPUTS_PROP]: {
344
+ size: () => ({ value: checkedProps.size, status: inputStatus('size', true) }),
345
+ disabled: () => ({ value: checkedProps.disabled, status: inputStatus('disabled', true) }),
346
+ value: () => ({ value: display, status: declarationStatus('display') }),
347
+ },
348
+ }"
349
+ />{{ ' ' }}<template
350
+ v-for="boundInputSnapshot in [evaluateInput(
351
+ () => (concat('Increase ', inputRead(checkedProps.label, inputStatus('label', true)))) as any,
352
+ READY_INPUT,
353
+ )]"
354
+ ><UiIconButton
355
+ class="ui-icon-button"
356
+ data-number-step="increase"
357
+ :match-button="true"
358
+ type="button"
359
+ :size="checkedProps.size"
360
+ :disabled="checkedProps.disabled"
361
+ :label="boundInputSnapshot.value"
362
+ v-bind="{
363
+ [BINDING_INPUTS_PROP]: {
364
+ size: () => ({ value: checkedProps.size, status: inputStatus('size', true) }),
365
+ disabled: () => ({ value: checkedProps.disabled, status: inputStatus('disabled', true) }),
366
+ label: () => boundInputSnapshot,
367
+ },
368
+ }"
369
+ ><UiIcon class="ui-icon" name="plus" /></UiIconButton></template></span>
370
+ </template>
371
+
372
+ <style scoped>
373
+ @scope (.ui-number-input) to ([data-hn]) {
374
+ :global(:scope) {
375
+ display: flex !important;
376
+ align-items: center !important;
377
+ gap: var(--ui-space-1) !important;
378
+ margin: 0 !important;
379
+ padding: 0 !important;
380
+ min-inline-size: 0;
381
+ }
382
+ :global(:scope[hidden]) {
383
+ display: none !important;
384
+ }
385
+ }
386
+ @scope ([data-slotted~="ui-number-input"]:not([data-hn])) to ([data-hn], [data-slotted]) {
387
+ :global(:where(.ui-number-input):where(:scope, :not([data-hn], [data-slotted]:not([data-slotted~="ui-number-input"])))) {
388
+ display: flex !important;
389
+ align-items: center !important;
390
+ gap: var(--ui-space-1) !important;
391
+ margin: 0 !important;
392
+ padding: 0 !important;
393
+ min-inline-size: 0;
394
+ }
395
+ :global(:where(.ui-number-input)[hidden]:where(:scope, :not([data-hn], [data-slotted]:not([data-slotted~="ui-number-input"])))) {
396
+ display: none !important;
397
+ }
398
+ }
399
+ </style>
package/vue/UiPopover.vue CHANGED
@@ -76,7 +76,7 @@ const propValidityContract = {
76
76
  required: false,
77
77
  target: { attribute: 'size' },
78
78
  description:
79
- 'Optional size preset. content keeps the existing intrinsic sizing; the other sizes constrain the surface for compact, medium, or large content.',
79
+ 'Optional size preset. content keeps the existing intrinsic sizing; the other sizes constrain the surface for compact, medium, or large content. Shared\n surface separation adapts to popover purpose and rendered size.',
80
80
  values: ['content', 'sm', 'md', 'lg'],
81
81
  default: 'content',
82
82
  },
@@ -334,10 +334,14 @@ useComponentHost(() => import('../components/ui-popover/ui-popover.js'), {
334
334
  inherits: false;
335
335
  }
336
336
 
337
+ /* Purpose and measured size shape one shared separation lever. The content plane stays opaque;
338
+ transparency, saturation and edge light belong to the surrounding decorative material. */
339
+
337
340
  /* A toolbar or card can supply its own surface, including an unclipped shadow. */
338
341
 
339
342
  @scope (.ui-popover) to ([data-hn]) {
340
343
  :global(:scope:where([data-hn-ui-popover])) {
344
+ --_ui-material-scale: 0.55;
341
345
  --_ui-popover-surface: var(--ui-popover-surface);
342
346
  --_ui-popover-border: var(--ui-popover-border);
343
347
  --_ui-popover-radius: var(--ui-popover-radius);
@@ -373,12 +377,101 @@ useComponentHost(() => import('../components/ui-popover/ui-popover.js'), {
373
377
  var(--ui-overlay-shadow, var(--ui-elevation-overlay, var(--ui-shadow-lg)))
374
378
  );
375
379
  }
380
+ :global(.surface:where([data-hn-ui-popover])) {
381
+ --_ui-material-glassiness: clamp(0, var(--ui-glassiness, 0), 1);
382
+ --_ui-material-separation: clamp(0, var(--ui-surface-separation, 0), 1);
383
+ --_ui-material-active: clamp(
384
+ 0,
385
+ calc((var(--_ui-material-glassiness) + var(--_ui-material-separation)) * 100000),
386
+ 1
387
+ );
388
+ --_ui-material-rim: calc(
389
+ (
390
+ var(--_ui-material-separation) + var(--_ui-material-glassiness) * 0.25
391
+ ) *
392
+ var(--_ui-material-scale, 0.55) *
393
+ 8px
394
+ );
395
+ --_ui-material-content-color: var(
396
+ --_ui-popover-surface,
397
+ var(--ui-material-content, var(--ui-overlay-surface, var(--ui-surface-elevated)))
398
+ );
399
+ --_ui-material-rim-color: color-mix(
400
+ in srgb,
401
+ var(--ui-material-glass, var(--ui-surface-elevated)) calc(var(--_ui-material-active) * 100%),
402
+ transparent
403
+ );
404
+ background:
405
+ var(--ui-surface-highlight, linear-gradient(transparent, transparent)) padding-box,
406
+ linear-gradient(var(--_ui-material-content-color), var(--_ui-material-content-color))
407
+ padding-box,
408
+ linear-gradient(var(--_ui-material-rim-color), var(--_ui-material-rim-color)) border-box,
409
+ var(--_ui-material-content-color) padding-box;
410
+ border-width: calc(var(--ui-border-width) + var(--_ui-material-rim));
411
+ border-color: var(
412
+ --_ui-popover-border,
413
+ color-mix(
414
+ in oklab,
415
+ var(--ui-overlay-border, var(--ui-border-strong)) calc(
416
+ (1 - var(--_ui-material-active)) * 100%
417
+ ),
418
+ transparent
419
+ )
420
+ );
421
+ box-shadow: var(
422
+ --_ui-popover-shadow,
423
+ var(
424
+ --ui-overlay-shadow,
425
+ 0 calc(var(--_ui-material-separation) * var(--_ui-material-scale, 0.55) * 8px) calc(
426
+ var(--_ui-material-separation) * var(--_ui-material-scale, 0.55) * 24px
427
+ ) color-mix(in oklab, var(--ui-text-primary) 15%, transparent),
428
+ var(--ui-material-glow, 0 0 transparent),
429
+ inset 0 0 0 calc(var(--_ui-material-active) * var(--ui-border-width)) var(
430
+ --ui-material-edge,
431
+ var(--ui-border-strong)
432
+ ),
433
+ var(--ui-elevation-overlay, var(--ui-shadow-lg))
434
+ )
435
+ );
436
+ backdrop-filter: blur(
437
+ calc(var(--_ui-material-glassiness) * var(--_ui-material-scale, 0.55) * 18px)
438
+ ) saturate(calc(1 + var(--_ui-material-glassiness) * var(--_ui-material-scale, 0.55) * 0.18));
439
+ -webkit-backdrop-filter: blur(
440
+ calc(var(--_ui-material-glassiness) * var(--_ui-material-scale, 0.55) * 18px)
441
+ ) saturate(calc(1 + var(--_ui-material-glassiness) * var(--_ui-material-scale, 0.55) * 0.18));
442
+ }
443
+
444
+ @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
445
+ :global(.surface:where([data-hn-ui-popover])) {
446
+ background: var(--_ui-material-content-color);
447
+ }
448
+ }
449
+
450
+ @media (prefers-reduced-transparency: reduce) {
451
+ :global(.surface:where([data-hn-ui-popover])) {
452
+ background: var(--_ui-material-content-color);
453
+ backdrop-filter: none;
454
+ -webkit-backdrop-filter: none;
455
+ }
456
+ }
457
+
458
+ @media (forced-colors: active) {
459
+ :global(.surface:where([data-hn-ui-popover])) {
460
+ background: Canvas;
461
+ border-color: CanvasText;
462
+ box-shadow: none;
463
+ backdrop-filter: none;
464
+ -webkit-backdrop-filter: none;
465
+ }
466
+ }
376
467
  :global(:scope[data-ui-popover-state~="bare"] .surface:where([data-hn-ui-popover])) {
377
468
  overflow: visible;
378
469
  padding: 0 !important;
379
470
  border: 0;
380
471
  background: transparent;
381
472
  box-shadow: none;
473
+ backdrop-filter: none;
474
+ -webkit-backdrop-filter: none;
382
475
  }
383
476
 
384
477
  :global(:scope:not([data-ui-popover-state~="internalOpen"]):where([data-hn-ui-popover])) {
package/vue/UiSelect.vue CHANGED
@@ -296,7 +296,7 @@ useComponentHost(() => import('../components/ui-select/ui-select.js'), {
296
296
  var(--ui-control-surface, var(--ui-surface-elevated))
297
297
  );
298
298
  color: var(--ui-text-primary);
299
- color-scheme: light dark;
299
+ color-scheme: inherit;
300
300
  font: inherit;
301
301
  line-height: var(--ui-line-height-tight);
302
302
  box-shadow: var(--ui-select-shadow, var(--ui-shadow-sm));
@@ -306,15 +306,18 @@ useComponentHost(() => import('../components/ui-select/ui-select.js'), {
306
306
  background-color var(--ui-motion-fast) var(--ui-motion-ease);
307
307
  }
308
308
  :global(:scope:where([data-hn-ui-select])) {
309
+ --_ui-select-highlight: var(--ui-surface-highlight, linear-gradient(transparent, transparent));
309
310
  appearance: none;
310
311
  padding-inline-end: calc(var(--ui-space-3) + 1.5rem) !important;
311
- background-image: var(
312
- --ui-select-chevron,
313
- url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c5c58' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
314
- );
312
+ background-image:
313
+ var(
314
+ --ui-select-chevron,
315
+ url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c5c58' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
316
+ ),
317
+ var(--_ui-select-highlight);
315
318
  background-repeat: no-repeat;
316
- background-position: right var(--ui-space-3) center;
317
- background-size: 1.125rem 1.125rem;
319
+ background-position: right var(--ui-space-3) center, center;
320
+ background-size: 1.125rem 1.125rem, 100% 100%;
318
321
  }
319
322
 
320
323
  :global(:scope:hover:not(:focus):not(:disabled):not([aria-invalid="true"]):not(:is(:user-invalid, [data-user-invalid])):where([data-hn-ui-select])) {
@@ -351,6 +354,7 @@ useComponentHost(() => import('../components/ui-select/ui-select.js'), {
351
354
  }
352
355
 
353
356
  :global(:scope:disabled:where([data-hn-ui-select])) {
357
+ --_ui-select-highlight: none;
354
358
  background-color: var(--ui-control-surface-disabled, var(--ui-surface-muted));
355
359
  color: var(--ui-disabled-text);
356
360
  box-shadow: none;
@@ -362,8 +366,10 @@ useComponentHost(() => import('../components/ui-select/ui-select.js'), {
362
366
  padding: var(--ui-control-inset-block-sm, var(--ui-space-1)) var(--ui-space-2) !important;
363
367
  padding-inline-end: calc(var(--ui-space-2) + var(--ui-icon-size-sm) + var(--ui-space-1))
364
368
  !important;
365
- background-position: right var(--ui-space-2) center;
366
- background-size: var(--ui-icon-size-sm) var(--ui-icon-size-sm);
369
+ background-position: right var(--ui-space-2) center, center;
370
+ background-size:
371
+ var(--ui-icon-size-sm) var(--ui-icon-size-sm),
372
+ 100% 100%;
367
373
  font-size: var(--ui-font-size-sm);
368
374
  }
369
375
 
@@ -371,7 +377,7 @@ useComponentHost(() => import('../components/ui-select/ui-select.js'), {
371
377
  min-block-size: var(--ui-control-size-lg);
372
378
  padding: var(--ui-control-inset-block-lg, var(--ui-space-3)) var(--ui-space-4) !important;
373
379
  padding-inline-end: calc(var(--ui-space-4) + 1.5rem) !important;
374
- background-position: right var(--ui-space-4) center;
380
+ background-position: right var(--ui-space-4) center, center;
375
381
  font-size: var(--ui-font-size-md);
376
382
  }
377
383
  @media (pointer: coarse) {
@@ -0,0 +1,83 @@
1
+ import type { PropType } from 'vue';
2
+ import { type InputBindings } from './props.js';
3
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ disabled: {
5
+ type: PropType<boolean | null>;
6
+ };
7
+ label: {
8
+ type: PropType<string | null>;
9
+ };
10
+ max: {
11
+ type: PropType<number | null>;
12
+ };
13
+ min: {
14
+ type: PropType<number | null>;
15
+ };
16
+ name: {
17
+ type: PropType<string | null>;
18
+ };
19
+ size: {
20
+ type: PropType<"sm" | "md" | "lg" | null>;
21
+ };
22
+ step: {
23
+ type: PropType<number | null>;
24
+ };
25
+ unit: {
26
+ type: PropType<string | null>;
27
+ };
28
+ value: {
29
+ type: PropType<number | null>;
30
+ };
31
+ "\0htmlNextInputStatus": {
32
+ type: PropType<InputBindings>;
33
+ };
34
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
35
+ input: (event: CustomEvent<{
36
+ readonly value: number;
37
+ }>) => any;
38
+ change: (event: CustomEvent<{
39
+ readonly value: number;
40
+ }>) => any;
41
+ "update:value": (value: number) => any;
42
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
43
+ disabled: {
44
+ type: PropType<boolean | null>;
45
+ };
46
+ label: {
47
+ type: PropType<string | null>;
48
+ };
49
+ max: {
50
+ type: PropType<number | null>;
51
+ };
52
+ min: {
53
+ type: PropType<number | null>;
54
+ };
55
+ name: {
56
+ type: PropType<string | null>;
57
+ };
58
+ size: {
59
+ type: PropType<"sm" | "md" | "lg" | null>;
60
+ };
61
+ step: {
62
+ type: PropType<number | null>;
63
+ };
64
+ unit: {
65
+ type: PropType<string | null>;
66
+ };
67
+ value: {
68
+ type: PropType<number | null>;
69
+ };
70
+ "\0htmlNextInputStatus": {
71
+ type: PropType<InputBindings>;
72
+ };
73
+ }>> & Readonly<{
74
+ onInput?: ((event: CustomEvent<{
75
+ readonly value: number;
76
+ }>) => any) | undefined;
77
+ onChange?: ((event: CustomEvent<{
78
+ readonly value: number;
79
+ }>) => any) | undefined;
80
+ "onUpdate:value"?: ((value: number) => any) | undefined;
81
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
82
+ declare const _default: typeof __VLS_export;
83
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import { t as UiSlider_default } from "./chunks/UiSlider.js";
2
+ export { UiSlider_default as default };