@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,412 @@
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, useTemplateRef, 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 UiNumberInput from './UiNumberInput.vue'
33
+
34
+ defineOptions({ inheritAttrs: false })
35
+
36
+ const propValidityContract = {
37
+ props: {
38
+ disabled: {
39
+ type: { kind: 'terminal', name: 'boolean' },
40
+ required: false,
41
+ target: { attribute: 'disabled' },
42
+ description:
43
+ 'Prevents typing, stepping and pointer or keyboard changes while keeping the value visible.',
44
+ default: false,
45
+ },
46
+ label: {
47
+ type: { kind: 'terminal', name: 'string' },
48
+ required: false,
49
+ target: { attribute: 'aria-label' },
50
+ description: 'Accessible name for the editing control.',
51
+ default: 'Value',
52
+ },
53
+ max: {
54
+ type: { kind: 'terminal', name: 'number' },
55
+ required: false,
56
+ target: { attribute: 'max' },
57
+ description: 'Inclusive upper bound for dragging, keyboard steps and exact entry.',
58
+ default: 100,
59
+ },
60
+ min: {
61
+ type: { kind: 'terminal', name: 'number' },
62
+ required: false,
63
+ target: { attribute: 'min' },
64
+ description: 'Inclusive lower bound for dragging, keyboard steps and exact entry.',
65
+ default: 0,
66
+ },
67
+ name: {
68
+ type: { kind: 'terminal', name: 'string' },
69
+ required: false,
70
+ target: { attribute: 'name' },
71
+ description: 'Optional numeric form field name.',
72
+ default: '',
73
+ },
74
+ size: {
75
+ type: { kind: 'terminal', name: 'keyword' },
76
+ required: false,
77
+ target: { attribute: 'size' },
78
+ description: 'Shared field and button height.',
79
+ values: ['sm', 'md', 'lg'],
80
+ default: 'md',
81
+ },
82
+ step: {
83
+ type: { kind: 'terminal', name: 'number' },
84
+ required: false,
85
+ target: { attribute: 'step' },
86
+ description: 'Positive native range and exact entry increment.',
87
+ default: 1,
88
+ },
89
+ unit: {
90
+ type: { kind: 'terminal', name: 'string' },
91
+ required: false,
92
+ target: { attribute: 'unit' },
93
+ description: 'Unit shown by the exact editor.',
94
+ default: '',
95
+ },
96
+ value: {
97
+ type: { kind: 'terminal', name: 'number' },
98
+ required: false,
99
+ target: { attribute: 'value' },
100
+ description: 'Current numeric value. Native range and exact entry share bounds.',
101
+ default: 0,
102
+ },
103
+ },
104
+ } as const
105
+ const props = defineProps({
106
+ disabled: { type: null as unknown as PropType<boolean | null> },
107
+ label: { type: null as unknown as PropType<string | null> },
108
+ max: { type: null as unknown as PropType<number | null> },
109
+ min: { type: null as unknown as PropType<number | null> },
110
+ name: { type: null as unknown as PropType<string | null> },
111
+ size: { type: null as unknown as PropType<'sm' | 'md' | 'lg' | null> },
112
+ step: { type: null as unknown as PropType<number | null> },
113
+ unit: { type: null as unknown as PropType<string | null> },
114
+ value: { type: null as unknown as PropType<number | null> },
115
+ [BINDING_INPUTS_PROP]: { type: null as unknown as PropType<InputBindings> },
116
+ })
117
+ const acceptedProps: Record<string, unknown> = {
118
+ disabled: false,
119
+ label: 'Value',
120
+ max: 100,
121
+ min: 0,
122
+ name: '',
123
+ size: 'md',
124
+ step: 1,
125
+ unit: '',
126
+ value: 0,
127
+ }
128
+ const inputTracking = vuePropInputs(acceptedProps, {
129
+ disabled: false,
130
+ label: 'Value',
131
+ max: 100,
132
+ min: 0,
133
+ name: '',
134
+ size: 'md',
135
+ step: 1,
136
+ unit: '',
137
+ value: 0,
138
+ }, (name, value, source, values) => {
139
+ switch (name) {
140
+ case 'disabled':
141
+ return checkPropInput(value, { kind: 'terminal', name: 'boolean' }, true, true)
142
+ case 'label':
143
+ return checkPropInput(value, { kind: 'terminal', name: 'string' }, true, true)
144
+ case 'max':
145
+ return checkPropInput(value, { kind: 'terminal', name: 'number' }, true, true)
146
+ case 'min':
147
+ return checkPropInput(value, { kind: 'terminal', name: 'number' }, true, true)
148
+ case 'name':
149
+ return checkPropInput(value, { kind: 'terminal', name: 'string' }, true, true)
150
+ case 'size':
151
+ return checkPropInput(value, { kind: 'terminal', name: 'keyword' }, true, true)
152
+ case 'step':
153
+ return checkPropInput(value, { kind: 'terminal', name: 'number' }, true, true)
154
+ case 'unit':
155
+ return checkPropInput(value, { kind: 'terminal', name: 'string' }, true, true)
156
+ case 'value':
157
+ return checkPropInput(value, { kind: 'terminal', name: 'number' }, true, true)
158
+ default:
159
+ return { ok: false }
160
+ }
161
+ }, () => {
162
+ void checkedProps.value
163
+ })
164
+ const propInputs = inputTracking.inputs
165
+ const checkedProps = computed(() => {
166
+ void inputTracking.version.value
167
+ return ({
168
+ disabled: propInputs.value<boolean | null>(
169
+ 'disabled',
170
+ props['disabled'],
171
+ props[BINDING_INPUTS_PROP],
172
+ ) as boolean,
173
+ label: propInputs.value<string | null>(
174
+ 'label',
175
+ props['label'],
176
+ props[BINDING_INPUTS_PROP],
177
+ ) as string,
178
+ max: propInputs.value<number | null>('max', props['max'], props[BINDING_INPUTS_PROP]) as number,
179
+ min: propInputs.value<number | null>('min', props['min'], props[BINDING_INPUTS_PROP]) as number,
180
+ name: propInputs.value<string | null>(
181
+ 'name',
182
+ props['name'],
183
+ props[BINDING_INPUTS_PROP],
184
+ ) as string,
185
+ size: propInputs.value<'sm' | 'md' | 'lg' | null>(
186
+ 'size',
187
+ props['size'],
188
+ props[BINDING_INPUTS_PROP],
189
+ ) as 'sm' | 'md' | 'lg',
190
+ step: propInputs.value<number | null>(
191
+ 'step',
192
+ props['step'],
193
+ props[BINDING_INPUTS_PROP],
194
+ ) as number,
195
+ unit: propInputs.value<string | null>(
196
+ 'unit',
197
+ props['unit'],
198
+ props[BINDING_INPUTS_PROP],
199
+ ) as string,
200
+ value: propInputs.value<number | null>(
201
+ 'value',
202
+ props['value'],
203
+ props[BINDING_INPUTS_PROP],
204
+ ) as number,
205
+ })
206
+ })
207
+ const inputStatus = (name: string, handlesError: boolean) => {
208
+ void checkedProps.value
209
+ void inputTracking.version.value
210
+ return requireInputStatus(propInputs.status(name), handlesError)
211
+ }
212
+ void checkedProps.value
213
+ watchSyncEffect(() => {
214
+ void checkedProps.value
215
+ })
216
+ const reflectedProp = useReflectedProp()
217
+ const hydrationInstance = getCurrentInstance()
218
+ const emit = defineEmits<{
219
+ 'update:value': [value: number]
220
+ input: [event: CustomEvent<{ readonly value: number }>]
221
+ change: [event: CustomEvent<{ readonly value: number }>]
222
+ }>()
223
+
224
+ const root = ref<HTMLElement | null>(null)
225
+ const rangeElement = useTemplateRef<HTMLElement>('rangeElement')
226
+ const current = initializedState<number>(
227
+ () =>
228
+ evaluateInput(() => {
229
+ return inputRead(checkedProps.value.value, propInputs.status('value'))
230
+ }),
231
+ (next: unknown) => (typeof next === 'number' && Number.isFinite(next)),
232
+ copyStateSeed,
233
+ () =>
234
+ warnUnless(false, 'initializer:current', 'State `current` does not satisfy its declared type.'),
235
+ )
236
+ let guardedPrevious: any = null
237
+ const guarded = computed(() => {
238
+ const candidate: any = concat(current.value, checkedProps.value.unit)
239
+ if (candidate === Symbol.for('html-next.invalid-result')) return guardedPrevious
240
+ return guardedPrevious = candidate
241
+ })
242
+ provide('html-next:ui-slider:current', current)
243
+ const declarationStatuses = { current: () => current.status() } as Record<
244
+ string,
245
+ () => typeof READY_INPUT
246
+ >
247
+ const declarationStatus = (name: string) => declarationStatuses[name]!()
248
+ current.start()
249
+ checkHydratedRoot('span', 'ui-slider')
250
+
251
+ /** The values the styles' :host() and :state() rules test. */
252
+ const hostState = computed(() =>
253
+ [
254
+ checkedProps.value.size && 'size',
255
+ checkedProps.value.size != null && `size=${encodeURIComponent(checkedProps.value.size)}`,
256
+ ].filter(Boolean).join(' ')
257
+ )
258
+
259
+ const isInputDetail = (
260
+ detail: unknown,
261
+ ): boolean => (detail !== null && typeof detail === 'object' && !Array.isArray(detail)
262
+ && (typeof (detail as Record<string, unknown>)['value'] === 'number'
263
+ && Number.isFinite((detail as Record<string, unknown>)['value']))
264
+ && Object.keys(detail as object).every((key) => ['value'].includes(key)))
265
+ const dispatch = createDispatch(root, emit as (name: string, detail: unknown) => void, {
266
+ checks: {
267
+ input: isInputDetail,
268
+ change: isInputDetail,
269
+ },
270
+ modeled: ['value'],
271
+ })
272
+
273
+ useComponentHost(() => import('../components/ui-slider/ui-slider.js'), {
274
+ root,
275
+ module: true,
276
+ dispatch,
277
+ acceptsState: (name: string, keys: readonly string[], value: unknown) =>
278
+ acceptsControllerWrite(
279
+ value,
280
+ ({ current: { kind: 'terminal', name: 'number' } } as Record<string, any>)[name],
281
+ keys,
282
+ ),
283
+ controllerSource: {
284
+ specifier: '../components/ui-slider/ui-slider.js',
285
+ definition: './components/ui-slider/ui-slider.html',
286
+ },
287
+ props: checkedProps,
288
+ inputs: propInputs,
289
+ inputTracking,
290
+ propInputs: (name: string) => {
291
+ const incoming = hydrationInstance?.vnode.props
292
+ const kebab = name.replace(/[A-Z]/g, (letter) => '-' + letter.toLowerCase())
293
+ return incoming !== null && incoming !== undefined
294
+ ? (incoming[name] ?? incoming[kebab] ?? null)
295
+ : null
296
+ },
297
+ propNames: ['disabled', 'label', 'max', 'min', 'name', 'size', 'step', 'unit', 'value'],
298
+ propValidity: (name: string) =>
299
+ propValidityState({ contract: propValidityContract, values: { ...props } }, name),
300
+ refs: { range: rangeElement },
301
+ state: { current },
302
+ availability: { current: () => declarationStatus('current') },
303
+ })
304
+ </script>
305
+
306
+ <template>
307
+ <span
308
+ class="ui-slider"
309
+ v-bind="nativeAttrs($attrs)"
310
+ data-hn
311
+ v-prop-validity="{ contract: propValidityContract, values: { ...props } }"
312
+ :data-ui-slider-prop-disabled="reflectedProp('disabled', 'disabled', checkedProps.disabled, undefined, false)"
313
+ :data-ui-slider-prop-label="reflectedProp('label', 'label', checkedProps.label, undefined, false)"
314
+ :data-ui-slider-prop-max="reflectedProp('max', 'max', checkedProps.max, undefined, false)"
315
+ :data-ui-slider-prop-min="reflectedProp('min', 'min', checkedProps.min, undefined, false)"
316
+ :data-ui-slider-prop-name="reflectedProp('name', 'name', checkedProps.name, undefined, false)"
317
+ :data-ui-slider-prop-size="reflectedProp('size', 'size', checkedProps.size, undefined, false)"
318
+ :data-ui-slider-prop-step="reflectedProp('step', 'step', checkedProps.step, undefined, false)"
319
+ :data-ui-slider-prop-unit="reflectedProp('unit', 'unit', checkedProps.unit, undefined, false)"
320
+ :data-ui-slider-prop-value="reflectedProp('value', 'value', checkedProps.value, undefined, false)"
321
+ :data-ui-slider-state="hostState || undefined"
322
+ ref="root"
323
+ ><input
324
+ type="range"
325
+ data-ui-field-control=""
326
+ :aria-label="checkedProps.label ?? undefined"
327
+ :aria-valuetext="guarded"
328
+ :value.attr="checkedProps.value?.toString()"
329
+ :min="checkedProps.min?.toString()"
330
+ :max="checkedProps.max?.toString()"
331
+ :step="checkedProps.step?.toString()"
332
+ :disabled="checkedProps.disabled ?? undefined"
333
+ :name="checkedProps.name ?? undefined"
334
+ ref="rangeElement"
335
+ >{{ ' ' }}<template
336
+ v-for="boundInput in [evaluateInput(
337
+ () =>
338
+ (concat(
339
+ inputRead(current, declarationStatus('current')),
340
+ inputRead(checkedProps.unit, inputStatus('unit', true)),
341
+ )) as any,
342
+ READY_INPUT,
343
+ )]"
344
+ ><UiNumberInput
345
+ class="ui-number-input"
346
+ data-slider-exact=""
347
+ :value="boundInput.value"
348
+ :unit="checkedProps.unit"
349
+ :min="checkedProps.min"
350
+ :max="checkedProps.max"
351
+ :step="checkedProps.step"
352
+ :size="checkedProps.size"
353
+ :disabled="checkedProps.disabled"
354
+ :label="checkedProps.label"
355
+ v-bind="{
356
+ [BINDING_INPUTS_PROP]: {
357
+ value: () => boundInput,
358
+ unit: () => ({ value: checkedProps.unit, status: inputStatus('unit', true) }),
359
+ min: () => ({ value: checkedProps.min, status: inputStatus('min', true) }),
360
+ max: () => ({ value: checkedProps.max, status: inputStatus('max', true) }),
361
+ step: () => ({ value: checkedProps.step, status: inputStatus('step', true) }),
362
+ size: () => ({ value: checkedProps.size, status: inputStatus('size', true) }),
363
+ disabled: () => ({ value: checkedProps.disabled, status: inputStatus('disabled', true) }),
364
+ label: () => ({ value: checkedProps.label, status: inputStatus('label', true) }),
365
+ },
366
+ }"
367
+ /></template></span>
368
+ </template>
369
+
370
+ <style scoped>
371
+ @scope (.ui-slider) to ([data-hn]) {
372
+ :global(:scope) {
373
+ display: grid !important;
374
+ grid-template-columns: minmax(4rem, 1fr) minmax(8rem, 1fr) !important;
375
+ align-items: center !important;
376
+ gap: var(--ui-space-2) !important;
377
+ margin: 0 !important;
378
+ padding: 0 !important;
379
+ min-inline-size: 0;
380
+ }
381
+ :global(input) {
382
+ inline-size: 100%;
383
+ min-inline-size: 0;
384
+ min-block-size: var(--ui-control-size-md);
385
+ margin: 0 !important;
386
+ accent-color: var(--ui-accent-solid);
387
+ cursor: pointer;
388
+ }
389
+ :global(:scope[data-ui-slider-state~="size=sm"] input) {
390
+ min-block-size: var(--ui-control-size-sm);
391
+ }
392
+ :global(:scope[data-ui-slider-state~="size=lg"] input) {
393
+ min-block-size: var(--ui-control-size-lg);
394
+ }
395
+ :global(input:focus-visible) {
396
+ outline: var(--ui-focus-width) solid var(--ui-control-focus, var(--ui-accent-solid));
397
+ outline-offset: var(--ui-space-1);
398
+ border-radius: var(--ui-radius-sm);
399
+ }
400
+ :global(input:disabled) {
401
+ cursor: not-allowed;
402
+ }
403
+ @media (pointer: coarse) {
404
+ :global(input) {
405
+ min-block-size: max(var(--ui-control-size-md), var(--ui-control-min-block-size));
406
+ }
407
+ }
408
+ :global(:scope[hidden]) {
409
+ display: none !important;
410
+ }
411
+ }
412
+ </style>
package/vue/UiSwitch.vue CHANGED
@@ -375,6 +375,7 @@ useComponentHost(() => import('../components/ui-switch/ui-switch.js'), {
375
375
  border: var(--ui-border-width) solid var(--ui-control-border, var(--ui-border-strong));
376
376
  border-radius: var(--ui-radius-round);
377
377
  background-color: var(--ui-control-surface, var(--ui-surface-default));
378
+ background-image: var(--ui-surface-highlight, none);
378
379
  box-shadow: var(--ui-control-inset);
379
380
  cursor: pointer;
380
381
  transition:
@@ -400,6 +401,7 @@ useComponentHost(() => import('../components/ui-switch/ui-switch.js'), {
400
401
 
401
402
  :global(input:checked:where([data-hn-ui-switch])) {
402
403
  background-color: var(--ui-accent-solid);
404
+ background-image: var(--ui-accent-highlight, none);
403
405
  border-color: var(--ui-accent-solid);
404
406
  }
405
407
 
@@ -423,6 +425,7 @@ useComponentHost(() => import('../components/ui-switch/ui-switch.js'), {
423
425
  :global(:scope[data-ui-switch-state~="disabled"] input:where([data-hn-ui-switch])) {
424
426
  border-color: var(--ui-disabled-border);
425
427
  background-color: var(--ui-disabled-surface);
428
+ background-image: none;
426
429
  box-shadow: none;
427
430
  cursor: not-allowed;
428
431
  }
package/vue/UiTabs.vue CHANGED
@@ -348,6 +348,10 @@ useComponentHost(() => import('../components/ui-tabs/ui-tabs.js'), {
348
348
  syntax: "*";
349
349
  inherits: false;
350
350
  }
351
+ @property --ui-tabs-panel-padding {
352
+ syntax: "*";
353
+ inherits: false;
354
+ }
351
355
 
352
356
  /* Density resolves into the tab row's own values; the public tokens still override them. */
353
357
 
@@ -363,6 +367,7 @@ useComponentHost(() => import('../components/ui-tabs/ui-tabs.js'), {
363
367
  --_ui-tabs-tab-min-block-size: var(--ui-tabs-tab-min-block-size);
364
368
  --_ui-tabs-tab-padding-block: var(--ui-tabs-tab-padding-block);
365
369
  --_ui-tabs-tab-padding-inline: var(--ui-tabs-tab-padding-inline);
370
+ --_ui-tabs-panel-padding: var(--ui-tabs-panel-padding);
366
371
 
367
372
  --_tab-min-block-size: var(--ui-control-size);
368
373
  --_tab-padding-block: var(--ui-space-2);
@@ -460,7 +465,7 @@ useComponentHost(() => import('../components/ui-tabs/ui-tabs.js'), {
460
465
  min-inline-size: 0;
461
466
  }
462
467
  :global(.panels > :where(:not([data-hn-ui-tabs])):is(*)) {
463
- padding: var(--ui-space-4) !important;
468
+ padding: var(--_ui-tabs-panel-padding, var(--ui-space-4)) !important;
464
469
  }
465
470
 
466
471
  :global(:scope[data-ui-tabs-state~="orientation=vertical"]:where([data-hn-ui-tabs])) {
package/vue/UiText.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { PropType } from 'vue';
2
2
  import { type InputBindings } from './props.js';
3
- declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {}, __VLS_7: {}, __VLS_9: {}, __VLS_11: {}, __VLS_13: {}, __VLS_15: {}, __VLS_17: {}, __VLS_19: {}, __VLS_21: {};
3
+ declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {}, __VLS_7: {}, __VLS_9: {}, __VLS_11: {}, __VLS_13: {}, __VLS_15: {}, __VLS_17: {}, __VLS_19: {}, __VLS_21: {}, __VLS_23: {};
4
4
  type __VLS_Slots = {} & {
5
5
  default?: (props: typeof __VLS_1) => any;
6
6
  } & {
@@ -23,13 +23,15 @@ type __VLS_Slots = {} & {
23
23
  default?: (props: typeof __VLS_19) => any;
24
24
  } & {
25
25
  default?: (props: typeof __VLS_21) => any;
26
+ } & {
27
+ default?: (props: typeof __VLS_23) => any;
26
28
  };
27
29
  declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
28
30
  align: {
29
31
  type: PropType<"start" | "center" | null>;
30
32
  };
31
33
  as: {
32
- type: PropType<"p" | "span" | "div" | "small" | "strong" | "label" | "h2" | "h3" | "h4" | "h5" | "h6" | null>;
34
+ type: PropType<"p" | "span" | "div" | "small" | "strong" | "label" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | null>;
33
35
  };
34
36
  font: {
35
37
  type: PropType<"inherit" | "sans" | null>;
@@ -50,7 +52,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
50
52
  type: PropType<boolean | null>;
51
53
  };
52
54
  variant: {
53
- type: PropType<"body" | "eyebrow" | "code" | null>;
55
+ type: PropType<"body" | "display" | "heading" | "label" | "caption" | "eyebrow" | "code" | null>;
54
56
  };
55
57
  weight: {
56
58
  type: PropType<"inherit" | "normal" | "medium" | "semibold" | null>;
@@ -66,7 +68,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
66
68
  type: PropType<"start" | "center" | null>;
67
69
  };
68
70
  as: {
69
- type: PropType<"p" | "span" | "div" | "small" | "strong" | "label" | "h2" | "h3" | "h4" | "h5" | "h6" | null>;
71
+ type: PropType<"p" | "span" | "div" | "small" | "strong" | "label" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | null>;
70
72
  };
71
73
  font: {
72
74
  type: PropType<"inherit" | "sans" | null>;
@@ -87,7 +89,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
87
89
  type: PropType<boolean | null>;
88
90
  };
89
91
  variant: {
90
- type: PropType<"body" | "eyebrow" | "code" | null>;
92
+ type: PropType<"body" | "display" | "heading" | "label" | "caption" | "eyebrow" | "code" | null>;
91
93
  };
92
94
  weight: {
93
95
  type: PropType<"inherit" | "normal" | "medium" | "semibold" | null>;