reka-ui 2.9.6 → 2.9.7
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.
- package/dist/Listbox/ListboxRoot.cjs +2 -0
- package/dist/Listbox/ListboxRoot.cjs.map +1 -1
- package/dist/Listbox/ListboxRoot.js +2 -0
- package/dist/Listbox/ListboxRoot.js.map +1 -1
- package/dist/Menu/MenuContentImpl.cjs +2 -1
- package/dist/Menu/MenuContentImpl.cjs.map +1 -1
- package/dist/Menu/MenuContentImpl.js +2 -1
- package/dist/Menu/MenuContentImpl.js.map +1 -1
- package/dist/Menu/MenuItemImpl.cjs +3 -1
- package/dist/Menu/MenuItemImpl.cjs.map +1 -1
- package/dist/Menu/MenuItemImpl.js +3 -1
- package/dist/Menu/MenuItemImpl.js.map +1 -1
- package/dist/Tabs/TabsIndicator.cjs +2 -1
- package/dist/Tabs/TabsIndicator.cjs.map +1 -1
- package/dist/Tabs/TabsIndicator.js +3 -2
- package/dist/Tabs/TabsIndicator.js.map +1 -1
- package/dist/Toast/ToastAnnounce.cjs +13 -4
- package/dist/Toast/ToastAnnounce.cjs.map +1 -1
- package/dist/Toast/ToastAnnounce.js +15 -6
- package/dist/Toast/ToastAnnounce.js.map +1 -1
- package/dist/Toast/ToastRootImpl.cjs +3 -1
- package/dist/Toast/ToastRootImpl.cjs.map +1 -1
- package/dist/Toast/ToastRootImpl.js +4 -2
- package/dist/Toast/ToastRootImpl.js.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index3.d.cts +15 -15
- package/dist/index3.d.ts +15 -15
- package/dist/index4.d.cts +642 -642
- package/dist/index4.d.cts.map +1 -1
- package/dist/index4.d.ts +647 -647
- package/dist/index4.d.ts.map +1 -1
- package/dist/internal.d.cts +2 -2
- package/dist/internal.d.cts.map +1 -1
- package/dist/internal.d.ts +2 -2
- package/dist/internal.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/Listbox/ListboxRoot.vue +7 -0
- package/src/Menu/MenuContentImpl.vue +3 -2
- package/src/Menu/MenuItemImpl.vue +9 -1
- package/src/Tabs/TabsIndicator.vue +4 -2
- package/src/Toast/ToastAnnounce.vue +17 -6
- package/src/Toast/ToastRootImpl.vue +14 -1
- package/src/index.ts +7 -0
package/dist/internal.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./index2.cjs";
|
|
2
2
|
import "./index3.cjs";
|
|
3
3
|
import { MenuArrowProps, MenuCheckboxItemEmits, MenuCheckboxItemProps, MenuContentEmits, MenuContentProps, MenuEmits, MenuGroupProps, MenuItemEmits, MenuItemIndicatorProps, MenuItemProps, MenuLabelProps, MenuPortalProps, MenuProps, MenuRadioGroupEmits, MenuRadioGroupProps, MenuRadioItemEmits, MenuRadioItemProps, MenuSeparatorProps, MenuSubContentEmits, MenuSubContentProps, MenuSubEmits, MenuSubProps, MenuSubTriggerProps, PopperAnchorProps, _default$277 as _default$13, _default$278 as _default$8, _default$279 as _default, _default$280 as _default$6, _default$281 as _default$10, _default$282 as _default$3, _default$283 as _default$14, _default$284 as _default$12, _default$285 as _default$2, _default$286 as _default$1, _default$287 as _default$11, _default$288 as _default$7, _default$290 as _default$9, _default$291 as _default$4, _default$292 as _default$5, injectMenuContext, injectMenuRootContext } from "./index4.cjs";
|
|
4
|
-
import * as
|
|
4
|
+
import * as vue785 from "vue";
|
|
5
5
|
|
|
6
6
|
//#region src/Menu/MenuAnchor.vue.d.ts
|
|
7
7
|
interface MenuAnchorProps extends PopperAnchorProps {}
|
|
@@ -9,7 +9,7 @@ declare var __VLS_8: {};
|
|
|
9
9
|
type __VLS_Slots = {} & {
|
|
10
10
|
default?: (props: typeof __VLS_8) => any;
|
|
11
11
|
};
|
|
12
|
-
declare const __VLS_base:
|
|
12
|
+
declare const __VLS_base: vue785.DefineComponent<MenuAnchorProps, {}, {}, {}, {}, vue785.ComponentOptionsMixin, vue785.ComponentOptionsMixin, {}, string, vue785.PublicProps, Readonly<MenuAnchorProps> & Readonly<{}>, {}, {}, {}, {}, string, vue785.ComponentProvideOptions, false, {}, any>;
|
|
13
13
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
14
|
declare const _default$15: typeof __VLS_export;
|
|
15
15
|
type __VLS_WithSlots<T, S> = T & {
|
package/dist/internal.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.cts","names":[],"sources":["../src/Menu/MenuAnchor.vue"],"sourcesContent":[],"mappings":";;;;;;UAoBU,eAAA,SAAwB;YAsC9B;KACC,WAAA;2BACwB;AA3CoB,CAAA;AAGE,cA2C7C,UALgB,EAKN,
|
|
1
|
+
{"version":3,"file":"internal.d.cts","names":[],"sources":["../src/Menu/MenuAnchor.vue"],"sourcesContent":[],"mappings":";;;;;;UAoBU,eAAA,SAAwB;YAsC9B;KACC,WAAA;2BACwB;AA3CoB,CAAA;AAGE,cA2C7C,UALgB,EAKN,MAAA,CAAA,eALM,CAKN,eALM,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAKN,MAAA,CAAA,qBAAA,EAAA,MAAA,CAAA,qBAAA,EALM,CAAA,CAAA,EAAA,MAAA,EAKN,MAAA,CAAA,WAAA,EAAA,QALM,CAKN,eALM,CAAA,GAKN,QALM,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,MAAA,EAKN,MAAA,CAAA,uBAAA,EALM,KAAA,EAAA,CAAA,CAAA,EAAA,GAAA,CAAA;AAAA,cAQhB,YAPU,EAOW,eANS,CAAA,OAMc,UANd,EAM0B,WAN1B,CAAA;AAAA,cAMM,WADxC,EAAA,OAE0B,YAF1B;KAGG,eALW,CAAA,CAAA,EAAA,CAAA,CAAA,GAKa,CALb,GAAA;EAAA,MAAA,EAAA;IAAA,MAAA,EAON,CAPM;EAAA,CAAA;CAAA"}
|
package/dist/internal.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./index2.js";
|
|
2
2
|
import "./index3.js";
|
|
3
3
|
import { MenuArrowProps, MenuCheckboxItemEmits, MenuCheckboxItemProps, MenuContentEmits, MenuContentProps, MenuEmits, MenuGroupProps, MenuItemEmits, MenuItemIndicatorProps, MenuItemProps, MenuLabelProps, MenuPortalProps, MenuProps, MenuRadioGroupEmits, MenuRadioGroupProps, MenuRadioItemEmits, MenuRadioItemProps, MenuSeparatorProps, MenuSubContentEmits, MenuSubContentProps, MenuSubEmits, MenuSubProps, MenuSubTriggerProps, PopperAnchorProps, _default$277 as _default$13, _default$278 as _default$8, _default$279 as _default, _default$280 as _default$6, _default$281 as _default$10, _default$282 as _default$3, _default$283 as _default$14, _default$284 as _default$12, _default$285 as _default$2, _default$286 as _default$1, _default$287 as _default$11, _default$288 as _default$7, _default$290 as _default$9, _default$291 as _default$4, _default$292 as _default$5, injectMenuContext, injectMenuRootContext } from "./index4.js";
|
|
4
|
-
import * as
|
|
4
|
+
import * as vue1111 from "vue";
|
|
5
5
|
|
|
6
6
|
//#region src/Menu/MenuAnchor.vue.d.ts
|
|
7
7
|
interface MenuAnchorProps extends PopperAnchorProps {}
|
|
@@ -9,7 +9,7 @@ declare var __VLS_8: {};
|
|
|
9
9
|
type __VLS_Slots = {} & {
|
|
10
10
|
default?: (props: typeof __VLS_8) => any;
|
|
11
11
|
};
|
|
12
|
-
declare const __VLS_base:
|
|
12
|
+
declare const __VLS_base: vue1111.DefineComponent<MenuAnchorProps, {}, {}, {}, {}, vue1111.ComponentOptionsMixin, vue1111.ComponentOptionsMixin, {}, string, vue1111.PublicProps, Readonly<MenuAnchorProps> & Readonly<{}>, {}, {}, {}, {}, string, vue1111.ComponentProvideOptions, false, {}, any>;
|
|
13
13
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
14
|
declare const _default$15: typeof __VLS_export;
|
|
15
15
|
type __VLS_WithSlots<T, S> = T & {
|
package/dist/internal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","names":[],"sources":["../src/Menu/MenuAnchor.vue"],"sourcesContent":[],"mappings":";;;;;;UAoBU,eAAA,SAAwB;YAsC9B;KACC,WAAA;2BACwB;AA3CoB,CAAA;AAGE,cA2C7C,UALgB,EAKN,
|
|
1
|
+
{"version":3,"file":"internal.d.ts","names":[],"sources":["../src/Menu/MenuAnchor.vue"],"sourcesContent":[],"mappings":";;;;;;UAoBU,eAAA,SAAwB;YAsC9B;KACC,WAAA;2BACwB;AA3CoB,CAAA;AAGE,cA2C7C,UALgB,EAKN,OAAA,CAAA,eALM,CAKN,eALM,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAKN,OAAA,CAAA,qBAAA,EAAA,OAAA,CAAA,qBAAA,EALM,CAAA,CAAA,EAAA,MAAA,EAKN,OAAA,CAAA,WAAA,EAAA,QALM,CAKN,eALM,CAAA,GAKN,QALM,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,MAAA,EAKN,OAAA,CAAA,uBAAA,EALM,KAAA,EAAA,CAAA,CAAA,EAAA,GAAA,CAAA;AAAA,cAQhB,YAPU,EAOW,eANS,CAAA,OAMc,UANd,EAM0B,WAN1B,CAAA;AAAA,cAMM,WADxC,EAAA,OAE0B,YAF1B;KAGG,eALW,CAAA,CAAA,EAAA,CAAA,CAAA,GAKa,CALb,GAAA;EAAA,MAAA,EAAA;IAAA,MAAA,EAON,CAPM;EAAA,CAAA;CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reka-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.9.
|
|
4
|
+
"version": "2.9.7",
|
|
5
5
|
"description": "Vue port for Radix UI Primitives.",
|
|
6
6
|
"author": "UnoVue Contributors (https://github.com/unovue)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -111,14 +111,14 @@
|
|
|
111
111
|
"@tsconfig/node24": "^24.0.0",
|
|
112
112
|
"@types/jsdom": "^28.0.0",
|
|
113
113
|
"@types/node": "^24.0.13",
|
|
114
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
114
|
+
"@vitejs/plugin-vue": "^6.0.6",
|
|
115
115
|
"@vitest/coverage-istanbul": "^3.2.4",
|
|
116
|
-
"@vue/test-utils": "^2.4.
|
|
116
|
+
"@vue/test-utils": "^2.4.10",
|
|
117
117
|
"@vue/tsconfig": "^0.7.0",
|
|
118
118
|
"jsdom": "^26.1.0",
|
|
119
119
|
"size-limit": "^12.0.1",
|
|
120
120
|
"tsdown": "^0.12.9",
|
|
121
|
-
"vite": "^8.0.
|
|
121
|
+
"vite": "^8.0.10",
|
|
122
122
|
"vitest": "^3.2.4",
|
|
123
123
|
"vitest-axe": "0.1.0",
|
|
124
124
|
"vitest-canvas-mock": "^0.3.3",
|
|
@@ -79,6 +79,7 @@ export type ListboxRootEmits<T = AcceptableValue> = {
|
|
|
79
79
|
import type { EventHook } from '@vueuse/core'
|
|
80
80
|
import type { Ref } from 'vue'
|
|
81
81
|
import { createEventHook, useVModel } from '@vueuse/core'
|
|
82
|
+
import { isClient } from '@vueuse/shared'
|
|
82
83
|
import { nextTick, ref, toRefs, watch } from 'vue'
|
|
83
84
|
import { useCollection } from '@/Collection'
|
|
84
85
|
import { VisuallyHiddenInput } from '@/VisuallyHidden'
|
|
@@ -324,6 +325,12 @@ function handleMultipleReplace(event: KeyboardEvent, targetEl: HTMLElement) {
|
|
|
324
325
|
}
|
|
325
326
|
|
|
326
327
|
async function highlightSelected(event?: Event) {
|
|
328
|
+
// highlightSelected is called inside a watch with immediate set to true.
|
|
329
|
+
// This results in code execution during SSR.
|
|
330
|
+
// Ensure this code only runs in a browser environment, since it performs
|
|
331
|
+
// DOM-only side effects (focus, scrollIntoView, synthetic KeyboardEvent).
|
|
332
|
+
if (!isClient)
|
|
333
|
+
return
|
|
327
334
|
await nextTick()
|
|
328
335
|
if (isVirtual.value) {
|
|
329
336
|
// Trigger on nextTick for Virtualizer to be mounted
|
|
@@ -24,7 +24,7 @@ import { useBodyScrollLock } from '@/shared/useBodyScrollLock'
|
|
|
24
24
|
|
|
25
25
|
export interface MenuContentContext {
|
|
26
26
|
onItemEnter: (event: PointerEvent) => boolean
|
|
27
|
-
onItemLeave: (event: PointerEvent) =>
|
|
27
|
+
onItemLeave: (event: PointerEvent) => boolean
|
|
28
28
|
onTriggerLeave: (event: PointerEvent) => boolean
|
|
29
29
|
searchRef: Ref<string>
|
|
30
30
|
highlightedElement: Ref<HTMLElement | undefined>
|
|
@@ -303,13 +303,14 @@ provideMenuContentContext({
|
|
|
303
303
|
},
|
|
304
304
|
onItemLeave: (event) => {
|
|
305
305
|
if (isPointerMovingToSubmenu(event))
|
|
306
|
-
return
|
|
306
|
+
return true
|
|
307
307
|
|
|
308
308
|
const isInputFocused = ['INPUT', 'TEXTAREA'].includes(getActiveElement()?.tagName || '')
|
|
309
309
|
if (!isInputFocused)
|
|
310
310
|
contentElement.value?.focus()
|
|
311
311
|
|
|
312
312
|
currentItemId.value = null
|
|
313
|
+
return false
|
|
313
314
|
},
|
|
314
315
|
onTriggerLeave: (event) => {
|
|
315
316
|
// event.preventDefault() we can't prevent pointerLeave event
|
|
@@ -60,7 +60,15 @@ async function handlePointerLeave(event: PointerEvent) {
|
|
|
60
60
|
if (!isMouseEvent(event))
|
|
61
61
|
return
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
// If the highlight was already claimed by another element (e.g. the pointer moved
|
|
64
|
+
// directly onto another item, whose synchronous `pointermove` ran before this
|
|
65
|
+
// `nextTick` resolved), this leave is stale and must not reset focus/roving state.
|
|
66
|
+
if (contentContext.highlightedElement.value !== currentElement.value)
|
|
67
|
+
return
|
|
68
|
+
|
|
69
|
+
const isMovingToSubmenu = contentContext.onItemLeave(event)
|
|
70
|
+
if (!isMovingToSubmenu && contentContext.highlightedElement.value === currentElement.value)
|
|
71
|
+
contentContext.highlightedElement.value = undefined
|
|
64
72
|
}
|
|
65
73
|
</script>
|
|
66
74
|
|
|
@@ -8,7 +8,7 @@ export interface TabsIndicatorProps extends PrimitiveProps {}
|
|
|
8
8
|
</script>
|
|
9
9
|
|
|
10
10
|
<script setup lang="ts">
|
|
11
|
-
import { useResizeObserver } from '@vueuse/core'
|
|
11
|
+
import { useMounted, useResizeObserver } from '@vueuse/core'
|
|
12
12
|
import { Primitive } from '@/Primitive'
|
|
13
13
|
|
|
14
14
|
const props = defineProps<TabsIndicatorProps>()
|
|
@@ -18,6 +18,8 @@ defineExpose({
|
|
|
18
18
|
})
|
|
19
19
|
useForwardExpose()
|
|
20
20
|
|
|
21
|
+
const isMounted = useMounted()
|
|
22
|
+
|
|
21
23
|
interface IndicatorStyle {
|
|
22
24
|
size: number | null
|
|
23
25
|
position: number | null
|
|
@@ -61,7 +63,7 @@ function updateIndicatorStyle() {
|
|
|
61
63
|
|
|
62
64
|
<template>
|
|
63
65
|
<Primitive
|
|
64
|
-
v-if="typeof indicatorStyle.size === 'number'"
|
|
66
|
+
v-if="isMounted && typeof indicatorStyle.size === 'number'"
|
|
65
67
|
v-bind="props"
|
|
66
68
|
:style="{
|
|
67
69
|
'--reka-tabs-indicator-size': `${indicatorStyle.size}px`,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { ref } from 'vue'
|
|
2
|
+
import { isClient, useTimeout } from '@vueuse/shared'
|
|
3
|
+
import { onScopeDispose, ref } from 'vue'
|
|
5
4
|
import { VisuallyHidden } from '@/VisuallyHidden'
|
|
6
5
|
import { injectToastProviderContext } from './ToastProvider.vue'
|
|
7
6
|
|
|
@@ -10,9 +9,21 @@ const providerContext = injectToastProviderContext()
|
|
|
10
9
|
const isAnnounced = useTimeout(1000)
|
|
11
10
|
const renderAnnounceText = ref(false)
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
// Render text content in the next frame to ensure toast is announced in NVDA.
|
|
13
|
+
// Double rAF mirrors Radix UI's `useNextFrame` behavior.
|
|
14
|
+
let raf1 = 0
|
|
15
|
+
let raf2 = 0
|
|
16
|
+
if (isClient) {
|
|
17
|
+
raf1 = requestAnimationFrame(() => {
|
|
18
|
+
raf2 = requestAnimationFrame(() => {
|
|
19
|
+
renderAnnounceText.value = true
|
|
20
|
+
})
|
|
21
|
+
})
|
|
22
|
+
onScopeDispose(() => {
|
|
23
|
+
cancelAnimationFrame(raf1)
|
|
24
|
+
cancelAnimationFrame(raf2)
|
|
25
|
+
})
|
|
26
|
+
}
|
|
16
27
|
</script>
|
|
17
28
|
|
|
18
29
|
<template>
|
|
@@ -183,7 +183,20 @@ provideToastRootContext({ onClose: handleClose })
|
|
|
183
183
|
role="alert"
|
|
184
184
|
:aria-live="type === 'foreground' ? 'assertive' : 'polite'"
|
|
185
185
|
>
|
|
186
|
-
|
|
186
|
+
<!--
|
|
187
|
+
Render each chunk as its own text node so screen readers get the
|
|
188
|
+
natural pause break between nodes (see comment in utils.ts).
|
|
189
|
+
Interpolating the array directly with `{{ announceTextContent }}`
|
|
190
|
+
would route through Vue's `toDisplayString`, which JSON-stringifies
|
|
191
|
+
arrays — the live region would then announce literal `[`, quotes
|
|
192
|
+
and commas instead of the toast title and description.
|
|
193
|
+
-->
|
|
194
|
+
<template
|
|
195
|
+
v-for="(text, i) in announceTextContent"
|
|
196
|
+
:key="i"
|
|
197
|
+
>
|
|
198
|
+
{{ text }}
|
|
199
|
+
</template>
|
|
187
200
|
</ToastAnnounce>
|
|
188
201
|
|
|
189
202
|
<Teleport
|
package/src/index.ts
CHANGED
|
@@ -96,7 +96,14 @@ export {
|
|
|
96
96
|
} from './shared/color'
|
|
97
97
|
export {
|
|
98
98
|
type AcceptableValue,
|
|
99
|
+
type DataOrientation,
|
|
100
|
+
type Direction,
|
|
101
|
+
type FormFieldProps,
|
|
99
102
|
type GenericComponentInstance,
|
|
103
|
+
type ScrollBodyOption,
|
|
104
|
+
type SingleOrMultipleProps,
|
|
105
|
+
type SingleOrMultipleType,
|
|
106
|
+
type StringOrNumber,
|
|
100
107
|
} from './shared/types'
|
|
101
108
|
export * from './Slider'
|
|
102
109
|
export * from './Splitter'
|