@ark-ui/vue 5.29.0 → 5.30.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.
- package/dist/components/anatomy.cjs +5 -0
- package/dist/components/anatomy.d.cts +1 -0
- package/dist/components/anatomy.d.ts +1 -0
- package/dist/components/anatomy.js +1 -0
- package/dist/components/checkbox/use-checkbox-group.cjs +10 -5
- package/dist/components/checkbox/use-checkbox-group.d.cts +2 -2
- package/dist/components/checkbox/use-checkbox-group.d.ts +2 -2
- package/dist/components/checkbox/use-checkbox-group.js +10 -5
- package/dist/components/color-picker/color-picker-root.vue.d.cts +1 -1
- package/dist/components/color-picker/color-picker-root.vue.d.ts +1 -1
- package/dist/components/combobox/combobox-root.vue.d.cts +1 -1
- package/dist/components/combobox/combobox-root.vue.d.ts +1 -1
- package/dist/components/date-picker/date-picker-root.vue.cjs +6 -2
- package/dist/components/date-picker/date-picker-root.vue.d.cts +3 -2
- package/dist/components/date-picker/date-picker-root.vue.d.ts +3 -2
- package/dist/components/date-picker/date-picker-root.vue.js +6 -2
- package/dist/components/date-picker/date-picker.types.d.cts +8 -0
- package/dist/components/date-picker/date-picker.types.d.ts +8 -0
- package/dist/components/dialog/dialog-root.vue.d.cts +1 -1
- package/dist/components/dialog/dialog-root.vue.d.ts +1 -1
- package/dist/components/editable/editable-root.vue.d.cts +1 -1
- package/dist/components/editable/editable-root.vue.d.ts +1 -1
- package/dist/components/fieldset/fieldset-root.vue.cjs +4 -1
- package/dist/components/fieldset/fieldset-root.vue.js +4 -1
- package/dist/components/fieldset/use-fieldset.cjs +16 -9
- package/dist/components/fieldset/use-fieldset.d.cts +5 -0
- package/dist/components/fieldset/use-fieldset.d.ts +5 -0
- package/dist/components/fieldset/use-fieldset.js +16 -9
- package/dist/components/floating-panel/floating-panel-root.vue.d.cts +1 -2
- package/dist/components/floating-panel/floating-panel-root.vue.d.ts +1 -2
- package/dist/components/hover-card/hover-card-root.vue.d.cts +1 -1
- package/dist/components/hover-card/hover-card-root.vue.d.ts +1 -1
- package/dist/components/index.cjs +4 -0
- package/dist/components/index.js +2 -0
- package/dist/components/menu/menu-root.vue.d.cts +1 -1
- package/dist/components/menu/menu-root.vue.d.ts +1 -1
- package/dist/components/navigation-menu/index.cjs +44 -0
- package/dist/components/navigation-menu/index.d.cts +18 -0
- package/dist/components/navigation-menu/index.d.ts +18 -0
- package/dist/components/navigation-menu/index.js +18 -0
- package/dist/components/navigation-menu/navigation-menu-arrow.vue.cjs +29 -0
- package/dist/components/navigation-menu/navigation-menu-arrow.vue.d.cts +19 -0
- package/dist/components/navigation-menu/navigation-menu-arrow.vue.d.ts +19 -0
- package/dist/components/navigation-menu/navigation-menu-arrow.vue.js +25 -0
- package/dist/components/navigation-menu/navigation-menu-arrow.vue2.cjs +9 -0
- package/dist/components/navigation-menu/navigation-menu-arrow.vue2.js +5 -0
- package/dist/components/navigation-menu/navigation-menu-content.vue.cjs +57 -0
- package/dist/components/navigation-menu/navigation-menu-content.vue.d.cts +21 -0
- package/dist/components/navigation-menu/navigation-menu-content.vue.d.ts +21 -0
- package/dist/components/navigation-menu/navigation-menu-content.vue.js +53 -0
- package/dist/components/navigation-menu/navigation-menu-content.vue2.cjs +9 -0
- package/dist/components/navigation-menu/navigation-menu-content.vue2.js +5 -0
- package/dist/components/navigation-menu/navigation-menu-context.vue.cjs +18 -0
- package/dist/components/navigation-menu/navigation-menu-context.vue.d.cts +17 -0
- package/dist/components/navigation-menu/navigation-menu-context.vue.d.ts +17 -0
- package/dist/components/navigation-menu/navigation-menu-context.vue.js +14 -0
- package/dist/components/navigation-menu/navigation-menu-context.vue2.cjs +9 -0
- package/dist/components/navigation-menu/navigation-menu-context.vue2.js +5 -0
- package/dist/components/navigation-menu/navigation-menu-indicator.vue.cjs +35 -0
- package/dist/components/navigation-menu/navigation-menu-indicator.vue.d.cts +19 -0
- package/dist/components/navigation-menu/navigation-menu-indicator.vue.d.ts +19 -0
- package/dist/components/navigation-menu/navigation-menu-indicator.vue.js +31 -0
- package/dist/components/navigation-menu/navigation-menu-indicator.vue2.cjs +9 -0
- package/dist/components/navigation-menu/navigation-menu-indicator.vue2.js +5 -0
- package/dist/components/navigation-menu/navigation-menu-item-indicator.vue.cjs +34 -0
- package/dist/components/navigation-menu/navigation-menu-item-indicator.vue.d.cts +19 -0
- package/dist/components/navigation-menu/navigation-menu-item-indicator.vue.d.ts +19 -0
- package/dist/components/navigation-menu/navigation-menu-item-indicator.vue.js +30 -0
- package/dist/components/navigation-menu/navigation-menu-item-indicator.vue2.cjs +9 -0
- package/dist/components/navigation-menu/navigation-menu-item-indicator.vue2.js +5 -0
- package/dist/components/navigation-menu/navigation-menu-item.vue.cjs +35 -0
- package/dist/components/navigation-menu/navigation-menu-item.vue.d.cts +20 -0
- package/dist/components/navigation-menu/navigation-menu-item.vue.d.ts +20 -0
- package/dist/components/navigation-menu/navigation-menu-item.vue.js +31 -0
- package/dist/components/navigation-menu/navigation-menu-item.vue2.cjs +9 -0
- package/dist/components/navigation-menu/navigation-menu-item.vue2.js +5 -0
- package/dist/components/navigation-menu/navigation-menu-link.vue.cjs +38 -0
- package/dist/components/navigation-menu/navigation-menu-link.vue.d.cts +20 -0
- package/dist/components/navigation-menu/navigation-menu-link.vue.d.ts +20 -0
- package/dist/components/navigation-menu/navigation-menu-link.vue.js +34 -0
- package/dist/components/navigation-menu/navigation-menu-link.vue2.cjs +9 -0
- package/dist/components/navigation-menu/navigation-menu-link.vue2.js +5 -0
- package/dist/components/navigation-menu/navigation-menu-list.vue.cjs +29 -0
- package/dist/components/navigation-menu/navigation-menu-list.vue.d.cts +19 -0
- package/dist/components/navigation-menu/navigation-menu-list.vue.d.ts +19 -0
- package/dist/components/navigation-menu/navigation-menu-list.vue.js +25 -0
- package/dist/components/navigation-menu/navigation-menu-list.vue2.cjs +9 -0
- package/dist/components/navigation-menu/navigation-menu-list.vue2.js +5 -0
- package/dist/components/navigation-menu/navigation-menu-root-provider.vue.cjs +35 -0
- package/dist/components/navigation-menu/navigation-menu-root-provider.vue.d.cts +19 -0
- package/dist/components/navigation-menu/navigation-menu-root-provider.vue.d.ts +19 -0
- package/dist/components/navigation-menu/navigation-menu-root-provider.vue.js +31 -0
- package/dist/components/navigation-menu/navigation-menu-root-provider.vue2.cjs +9 -0
- package/dist/components/navigation-menu/navigation-menu-root-provider.vue2.js +5 -0
- package/dist/components/navigation-menu/navigation-menu-root.vue.cjs +51 -0
- package/dist/components/navigation-menu/navigation-menu-root.vue.d.cts +29 -0
- package/dist/components/navigation-menu/navigation-menu-root.vue.d.ts +29 -0
- package/dist/components/navigation-menu/navigation-menu-root.vue.js +47 -0
- package/dist/components/navigation-menu/navigation-menu-root.vue2.cjs +9 -0
- package/dist/components/navigation-menu/navigation-menu-root.vue2.js +5 -0
- package/dist/components/navigation-menu/navigation-menu-trigger.vue.cjs +40 -0
- package/dist/components/navigation-menu/navigation-menu-trigger.vue.d.cts +20 -0
- package/dist/components/navigation-menu/navigation-menu-trigger.vue.d.ts +20 -0
- package/dist/components/navigation-menu/navigation-menu-trigger.vue.js +36 -0
- package/dist/components/navigation-menu/navigation-menu-trigger.vue2.cjs +9 -0
- package/dist/components/navigation-menu/navigation-menu-trigger.vue2.js +5 -0
- package/dist/components/navigation-menu/navigation-menu-viewport-positioner.vue.cjs +31 -0
- package/dist/components/navigation-menu/navigation-menu-viewport-positioner.vue.d.cts +20 -0
- package/dist/components/navigation-menu/navigation-menu-viewport-positioner.vue.d.ts +20 -0
- package/dist/components/navigation-menu/navigation-menu-viewport-positioner.vue.js +27 -0
- package/dist/components/navigation-menu/navigation-menu-viewport-positioner.vue2.cjs +9 -0
- package/dist/components/navigation-menu/navigation-menu-viewport-positioner.vue2.js +5 -0
- package/dist/components/navigation-menu/navigation-menu-viewport.vue.cjs +39 -0
- package/dist/components/navigation-menu/navigation-menu-viewport.vue.d.cts +20 -0
- package/dist/components/navigation-menu/navigation-menu-viewport.vue.d.ts +20 -0
- package/dist/components/navigation-menu/navigation-menu-viewport.vue.js +35 -0
- package/dist/components/navigation-menu/navigation-menu-viewport.vue2.cjs +9 -0
- package/dist/components/navigation-menu/navigation-menu-viewport.vue2.js +5 -0
- package/dist/components/navigation-menu/navigation-menu.anatomy.d.cts +1 -0
- package/dist/components/navigation-menu/navigation-menu.anatomy.d.ts +1 -0
- package/dist/components/navigation-menu/navigation-menu.cjs +33 -0
- package/dist/components/navigation-menu/navigation-menu.d.cts +14 -0
- package/dist/components/navigation-menu/navigation-menu.d.ts +14 -0
- package/dist/components/navigation-menu/navigation-menu.js +13 -0
- package/dist/components/navigation-menu/navigation-menu.types.d.cts +64 -0
- package/dist/components/navigation-menu/navigation-menu.types.d.ts +64 -0
- package/dist/components/navigation-menu/use-navigation-menu-context.cjs +10 -0
- package/dist/components/navigation-menu/use-navigation-menu-context.d.cts +4 -0
- package/dist/components/navigation-menu/use-navigation-menu-context.d.ts +4 -0
- package/dist/components/navigation-menu/use-navigation-menu-context.js +5 -0
- package/dist/components/navigation-menu/use-navigation-menu-item-props-context.cjs +10 -0
- package/dist/components/navigation-menu/use-navigation-menu-item-props-context.d.cts +3 -0
- package/dist/components/navigation-menu/use-navigation-menu-item-props-context.d.ts +3 -0
- package/dist/components/navigation-menu/use-navigation-menu-item-props-context.js +5 -0
- package/dist/components/navigation-menu/use-navigation-menu.cjs +53 -0
- package/dist/components/navigation-menu/use-navigation-menu.d.cts +10 -0
- package/dist/components/navigation-menu/use-navigation-menu.d.ts +10 -0
- package/dist/components/navigation-menu/use-navigation-menu.js +30 -0
- package/dist/components/pagination/index.cjs +4 -0
- package/dist/components/pagination/index.d.cts +2 -0
- package/dist/components/pagination/index.d.ts +2 -0
- package/dist/components/pagination/index.js +2 -0
- package/dist/components/pagination/pagination-first-trigger.vue.cjs +29 -0
- package/dist/components/pagination/pagination-first-trigger.vue.d.cts +19 -0
- package/dist/components/pagination/pagination-first-trigger.vue.d.ts +19 -0
- package/dist/components/pagination/pagination-first-trigger.vue.js +25 -0
- package/dist/components/pagination/pagination-first-trigger.vue2.cjs +9 -0
- package/dist/components/pagination/pagination-first-trigger.vue2.js +5 -0
- package/dist/components/pagination/pagination-last-trigger.vue.cjs +29 -0
- package/dist/components/pagination/pagination-last-trigger.vue.d.cts +19 -0
- package/dist/components/pagination/pagination-last-trigger.vue.d.ts +19 -0
- package/dist/components/pagination/pagination-last-trigger.vue.js +25 -0
- package/dist/components/pagination/pagination-last-trigger.vue2.cjs +9 -0
- package/dist/components/pagination/pagination-last-trigger.vue2.js +5 -0
- package/dist/components/pagination/pagination.cjs +4 -0
- package/dist/components/pagination/pagination.d.cts +2 -0
- package/dist/components/pagination/pagination.d.ts +2 -0
- package/dist/components/pagination/pagination.js +2 -0
- package/dist/components/popover/popover-root.vue.d.cts +1 -1
- package/dist/components/popover/popover-root.vue.d.ts +1 -1
- package/dist/components/radio-group/radio-group-root.vue.cjs +5 -1
- package/dist/components/radio-group/radio-group-root.vue.d.cts +2 -0
- package/dist/components/radio-group/radio-group-root.vue.d.ts +2 -0
- package/dist/components/radio-group/radio-group-root.vue.js +5 -1
- package/dist/components/radio-group/radio-group.types.d.cts +8 -0
- package/dist/components/radio-group/radio-group.types.d.ts +8 -0
- package/dist/components/radio-group/use-radio-group.cjs +9 -0
- package/dist/components/radio-group/use-radio-group.js +9 -0
- package/dist/components/select/select-root.vue.d.cts +1 -1
- package/dist/components/select/select-root.vue.d.ts +1 -1
- package/dist/components/tags-input/tags-input-root.vue.d.cts +1 -1
- package/dist/components/tags-input/tags-input-root.vue.d.ts +1 -1
- package/dist/index.cjs +4 -0
- package/dist/index.js +2 -0
- package/dist/utils/boolean.cjs +9 -0
- package/dist/utils/boolean.d.cts +2 -0
- package/dist/utils/boolean.d.ts +2 -0
- package/dist/utils/boolean.js +5 -0
- package/package.json +72 -71
|
@@ -28,6 +28,7 @@ const floatingPanel = require('@zag-js/floating-panel');
|
|
|
28
28
|
const hoverCard = require('@zag-js/hover-card');
|
|
29
29
|
const marquee = require('@zag-js/marquee');
|
|
30
30
|
const menu = require('@zag-js/menu');
|
|
31
|
+
const navigationMenu = require('@zag-js/navigation-menu');
|
|
31
32
|
const numberInput = require('@zag-js/number-input');
|
|
32
33
|
const pagination = require('@zag-js/pagination');
|
|
33
34
|
const passwordInput = require('@zag-js/password-input');
|
|
@@ -118,6 +119,10 @@ Object.defineProperty(exports, "menuAnatomy", {
|
|
|
118
119
|
enumerable: true,
|
|
119
120
|
get: () => menu.anatomy
|
|
120
121
|
});
|
|
122
|
+
Object.defineProperty(exports, "navigationMenuAnatomy", {
|
|
123
|
+
enumerable: true,
|
|
124
|
+
get: () => navigationMenu.anatomy
|
|
125
|
+
});
|
|
121
126
|
Object.defineProperty(exports, "numberInputAnatomy", {
|
|
122
127
|
enumerable: true,
|
|
123
128
|
get: () => numberInput.anatomy
|
|
@@ -21,6 +21,7 @@ export { imageCropperAnatomy } from './image-cropper/image-cropper.anatomy';
|
|
|
21
21
|
export { listboxAnatomy } from './listbox/listbox.anatomy';
|
|
22
22
|
export { marqueeAnatomy } from './marquee/marquee.anatomy';
|
|
23
23
|
export { menuAnatomy } from './menu/menu.anatomy';
|
|
24
|
+
export { navigationMenuAnatomy } from './navigation-menu/navigation-menu.anatomy';
|
|
24
25
|
export { numberInputAnatomy } from './number-input/number-input.anatomy';
|
|
25
26
|
export { paginationAnatomy } from './pagination/pagination.anatomy';
|
|
26
27
|
export { passwordInputAnatomy } from './password-input/password-input.anatomy';
|
|
@@ -21,6 +21,7 @@ export { imageCropperAnatomy } from './image-cropper/image-cropper.anatomy';
|
|
|
21
21
|
export { listboxAnatomy } from './listbox/listbox.anatomy';
|
|
22
22
|
export { marqueeAnatomy } from './marquee/marquee.anatomy';
|
|
23
23
|
export { menuAnatomy } from './menu/menu.anatomy';
|
|
24
|
+
export { navigationMenuAnatomy } from './navigation-menu/navigation-menu.anatomy';
|
|
24
25
|
export { numberInputAnatomy } from './number-input/number-input.anatomy';
|
|
25
26
|
export { paginationAnatomy } from './pagination/pagination.anatomy';
|
|
26
27
|
export { passwordInputAnatomy } from './password-input/password-input.anatomy';
|
|
@@ -24,6 +24,7 @@ export { anatomy as floatingPanelAnatomy } from '@zag-js/floating-panel';
|
|
|
24
24
|
export { anatomy as hoverCardAnatomy } from '@zag-js/hover-card';
|
|
25
25
|
export { anatomy as marqueeAnatomy } from '@zag-js/marquee';
|
|
26
26
|
export { anatomy as menuAnatomy } from '@zag-js/menu';
|
|
27
|
+
export { anatomy as navigationMenuAnatomy } from '@zag-js/navigation-menu';
|
|
27
28
|
export { anatomy as numberInputAnatomy } from '@zag-js/number-input';
|
|
28
29
|
export { anatomy as paginationAnatomy } from '@zag-js/pagination';
|
|
29
30
|
export { anatomy as passwordInputAnatomy } from '@zag-js/password-input';
|
|
@@ -3,10 +3,15 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
5
|
const vue = require('vue');
|
|
6
|
+
const boolean = require('../../utils/boolean.cjs');
|
|
7
|
+
const useFieldsetContext = require('../fieldset/use-fieldset-context.cjs');
|
|
6
8
|
const useVModel = require('../use-v-model.cjs');
|
|
7
9
|
|
|
8
10
|
function useCheckboxGroup(props, emit) {
|
|
9
|
-
const
|
|
11
|
+
const fieldset = useFieldsetContext.useFieldsetContext();
|
|
12
|
+
const disabled = vue.computed(() => props.disabled ?? fieldset?.value?.disabled);
|
|
13
|
+
const invalid = vue.computed(() => props.invalid ?? fieldset?.value?.invalid);
|
|
14
|
+
const interactive = vue.computed(() => !(disabled.value || props.readOnly));
|
|
10
15
|
const { defaultValue } = vue.toRefs(props);
|
|
11
16
|
const valueRef = useVModel.useVModel(props, "modelValue", emit, {
|
|
12
17
|
defaultValue: defaultValue?.value ?? [],
|
|
@@ -37,9 +42,9 @@ function useCheckboxGroup(props, emit) {
|
|
|
37
42
|
}
|
|
38
43
|
},
|
|
39
44
|
name: props.name,
|
|
40
|
-
disabled:
|
|
45
|
+
disabled: boolean.toBooleanValue(disabled.value),
|
|
41
46
|
readOnly: props.readOnly,
|
|
42
|
-
invalid:
|
|
47
|
+
invalid: invalid.value
|
|
43
48
|
};
|
|
44
49
|
};
|
|
45
50
|
const setValue = (value) => {
|
|
@@ -49,9 +54,9 @@ function useCheckboxGroup(props, emit) {
|
|
|
49
54
|
isChecked,
|
|
50
55
|
value: valueRef.value,
|
|
51
56
|
name: props.name,
|
|
52
|
-
disabled:
|
|
57
|
+
disabled: boolean.toBooleanValue(disabled.value),
|
|
53
58
|
readOnly: props.readOnly,
|
|
54
|
-
invalid:
|
|
59
|
+
invalid: invalid.value,
|
|
55
60
|
addValue,
|
|
56
61
|
setValue,
|
|
57
62
|
toggleValue,
|
|
@@ -11,7 +11,7 @@ export declare function useCheckboxGroup(props: GroupProps, emit?: EmitFn<GroupE
|
|
|
11
11
|
isChecked: (val: string | undefined) => boolean;
|
|
12
12
|
value: string[];
|
|
13
13
|
name: string | undefined;
|
|
14
|
-
disabled: boolean
|
|
14
|
+
disabled: boolean;
|
|
15
15
|
readOnly: boolean | undefined;
|
|
16
16
|
invalid: boolean | undefined;
|
|
17
17
|
addValue: (val: string) => void;
|
|
@@ -21,7 +21,7 @@ export declare function useCheckboxGroup(props: GroupProps, emit?: EmitFn<GroupE
|
|
|
21
21
|
checked: boolean | undefined;
|
|
22
22
|
onCheckedChange(): void;
|
|
23
23
|
name: string | undefined;
|
|
24
|
-
disabled: boolean
|
|
24
|
+
disabled: boolean;
|
|
25
25
|
readOnly: boolean | undefined;
|
|
26
26
|
invalid: boolean | undefined;
|
|
27
27
|
};
|
|
@@ -11,7 +11,7 @@ export declare function useCheckboxGroup(props: GroupProps, emit?: EmitFn<GroupE
|
|
|
11
11
|
isChecked: (val: string | undefined) => boolean;
|
|
12
12
|
value: string[];
|
|
13
13
|
name: string | undefined;
|
|
14
|
-
disabled: boolean
|
|
14
|
+
disabled: boolean;
|
|
15
15
|
readOnly: boolean | undefined;
|
|
16
16
|
invalid: boolean | undefined;
|
|
17
17
|
addValue: (val: string) => void;
|
|
@@ -21,7 +21,7 @@ export declare function useCheckboxGroup(props: GroupProps, emit?: EmitFn<GroupE
|
|
|
21
21
|
checked: boolean | undefined;
|
|
22
22
|
onCheckedChange(): void;
|
|
23
23
|
name: string | undefined;
|
|
24
|
-
disabled: boolean
|
|
24
|
+
disabled: boolean;
|
|
25
25
|
readOnly: boolean | undefined;
|
|
26
26
|
invalid: boolean | undefined;
|
|
27
27
|
};
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { computed, toRefs } from 'vue';
|
|
2
|
+
import { toBooleanValue } from '../../utils/boolean.js';
|
|
3
|
+
import { useFieldsetContext } from '../fieldset/use-fieldset-context.js';
|
|
2
4
|
import { useVModel } from '../use-v-model.js';
|
|
3
5
|
|
|
4
6
|
function useCheckboxGroup(props, emit) {
|
|
5
|
-
const
|
|
7
|
+
const fieldset = useFieldsetContext();
|
|
8
|
+
const disabled = computed(() => props.disabled ?? fieldset?.value?.disabled);
|
|
9
|
+
const invalid = computed(() => props.invalid ?? fieldset?.value?.invalid);
|
|
10
|
+
const interactive = computed(() => !(disabled.value || props.readOnly));
|
|
6
11
|
const { defaultValue } = toRefs(props);
|
|
7
12
|
const valueRef = useVModel(props, "modelValue", emit, {
|
|
8
13
|
defaultValue: defaultValue?.value ?? [],
|
|
@@ -33,9 +38,9 @@ function useCheckboxGroup(props, emit) {
|
|
|
33
38
|
}
|
|
34
39
|
},
|
|
35
40
|
name: props.name,
|
|
36
|
-
disabled:
|
|
41
|
+
disabled: toBooleanValue(disabled.value),
|
|
37
42
|
readOnly: props.readOnly,
|
|
38
|
-
invalid:
|
|
43
|
+
invalid: invalid.value
|
|
39
44
|
};
|
|
40
45
|
};
|
|
41
46
|
const setValue = (value) => {
|
|
@@ -45,9 +50,9 @@ function useCheckboxGroup(props, emit) {
|
|
|
45
50
|
isChecked,
|
|
46
51
|
value: valueRef.value,
|
|
47
52
|
name: props.name,
|
|
48
|
-
disabled:
|
|
53
|
+
disabled: toBooleanValue(disabled.value),
|
|
49
54
|
readOnly: props.readOnly,
|
|
50
|
-
invalid:
|
|
55
|
+
invalid: invalid.value,
|
|
51
56
|
addValue,
|
|
52
57
|
setValue,
|
|
53
58
|
toggleValue,
|
|
@@ -4,7 +4,7 @@ import { PolymorphicProps } from '../factory';
|
|
|
4
4
|
import { RootEmits, RootProps } from './color-picker.types';
|
|
5
5
|
import { ValueChangeDetails, OpenChangeDetails, FormatChangeDetails } from '@zag-js/color-picker';
|
|
6
6
|
import { Color, ColorFormat } from '@zag-js/color-utils';
|
|
7
|
-
import { FocusOutsideEvent, InteractOutsideEvent, PointerDownOutsideEvent } from '@zag-js/
|
|
7
|
+
import { FocusOutsideEvent, InteractOutsideEvent, PointerDownOutsideEvent } from '@zag-js/bottom-sheet';
|
|
8
8
|
export interface ColorPickerRootBaseProps extends RootProps, RenderStrategyProps, PolymorphicProps {
|
|
9
9
|
}
|
|
10
10
|
export interface ColorPickerRootProps extends ColorPickerRootBaseProps,
|
|
@@ -4,7 +4,7 @@ import { PolymorphicProps } from '../factory';
|
|
|
4
4
|
import { RootEmits, RootProps } from './color-picker.types';
|
|
5
5
|
import { ValueChangeDetails, OpenChangeDetails, FormatChangeDetails } from '@zag-js/color-picker';
|
|
6
6
|
import { Color, ColorFormat } from '@zag-js/color-utils';
|
|
7
|
-
import { FocusOutsideEvent, InteractOutsideEvent, PointerDownOutsideEvent } from '@zag-js/
|
|
7
|
+
import { FocusOutsideEvent, InteractOutsideEvent, PointerDownOutsideEvent } from '@zag-js/bottom-sheet';
|
|
8
8
|
export interface ColorPickerRootBaseProps extends RootProps, RenderStrategyProps, PolymorphicProps {
|
|
9
9
|
}
|
|
10
10
|
export interface ColorPickerRootProps extends ColorPickerRootBaseProps,
|
|
@@ -5,7 +5,7 @@ import { CollectionItem } from '../collection';
|
|
|
5
5
|
import { PolymorphicProps } from '../factory';
|
|
6
6
|
import { RootProps } from './combobox.types';
|
|
7
7
|
import { ValueChangeDetails, OpenChangeDetails, HighlightChangeDetails, InputValueChangeDetails } from '@zag-js/combobox';
|
|
8
|
-
import { FocusOutsideEvent, InteractOutsideEvent, PointerDownOutsideEvent } from '@zag-js/
|
|
8
|
+
import { FocusOutsideEvent, InteractOutsideEvent, PointerDownOutsideEvent } from '@zag-js/bottom-sheet';
|
|
9
9
|
export interface ComboboxRootBaseProps<T extends CollectionItem> extends RootProps<T>, RenderStrategyProps, PolymorphicProps {
|
|
10
10
|
}
|
|
11
11
|
export interface ComboboxRootProps<T extends CollectionItem> extends ComboboxRootBaseProps<T>,
|
|
@@ -5,7 +5,7 @@ import { CollectionItem } from '../collection';
|
|
|
5
5
|
import { PolymorphicProps } from '../factory';
|
|
6
6
|
import { RootProps } from './combobox.types';
|
|
7
7
|
import { ValueChangeDetails, OpenChangeDetails, HighlightChangeDetails, InputValueChangeDetails } from '@zag-js/combobox';
|
|
8
|
-
import { FocusOutsideEvent, InteractOutsideEvent, PointerDownOutsideEvent } from '@zag-js/
|
|
8
|
+
import { FocusOutsideEvent, InteractOutsideEvent, PointerDownOutsideEvent } from '@zag-js/bottom-sheet';
|
|
9
9
|
export interface ComboboxRootBaseProps<T extends CollectionItem> extends RootProps<T>, RenderStrategyProps, PolymorphicProps {
|
|
10
10
|
}
|
|
11
11
|
export interface ComboboxRootProps<T extends CollectionItem> extends ComboboxRootBaseProps<T>,
|
|
@@ -44,6 +44,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
44
44
|
translations: {},
|
|
45
45
|
view: {},
|
|
46
46
|
inline: { type: Boolean },
|
|
47
|
+
invalid: { type: Boolean },
|
|
48
|
+
required: { type: Boolean },
|
|
47
49
|
lazyMount: { type: Boolean },
|
|
48
50
|
unmountOnExit: { type: Boolean },
|
|
49
51
|
asChild: { type: Boolean }
|
|
@@ -52,10 +54,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
52
54
|
defaultOpen: void 0,
|
|
53
55
|
disabled: void 0,
|
|
54
56
|
fixedWeeks: void 0,
|
|
57
|
+
inline: void 0,
|
|
58
|
+
invalid: void 0,
|
|
55
59
|
open: void 0,
|
|
56
|
-
readOnly: void 0,
|
|
57
60
|
outsideDaySelectable: void 0,
|
|
58
|
-
|
|
61
|
+
readOnly: void 0,
|
|
62
|
+
required: void 0
|
|
59
63
|
}),
|
|
60
64
|
emits: ["focusChange", "openChange", "valueChange", "viewChange", "update:modelValue", "update:open", "update:view", "update:focusedValue"],
|
|
61
65
|
setup(__props, { emit: __emit }) {
|
|
@@ -2,8 +2,7 @@ import { HTMLAttributes, DefineComponent, ComponentOptionsMixin, PublicProps, Co
|
|
|
2
2
|
import { RenderStrategyProps } from '../../utils/use-render-strategy';
|
|
3
3
|
import { PolymorphicProps } from '../factory';
|
|
4
4
|
import { RootEmits, RootProps } from './date-picker.types';
|
|
5
|
-
import { FocusChangeDetails, ValueChangeDetails, OpenChangeDetails, ViewChangeDetails, DateView } from '@zag-js/date-picker';
|
|
6
|
-
import { DateValue } from '@internationalized/date';
|
|
5
|
+
import { FocusChangeDetails, ValueChangeDetails, DateValue, OpenChangeDetails, ViewChangeDetails, DateView } from '@zag-js/date-picker';
|
|
7
6
|
export interface DatePickerRootBaseProps extends RootProps, RenderStrategyProps, PolymorphicProps {
|
|
8
7
|
}
|
|
9
8
|
export interface DatePickerRootProps extends DatePickerRootBaseProps,
|
|
@@ -33,7 +32,9 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<DatePickerRootP
|
|
|
33
32
|
"onUpdate:view"?: ((view: DateView) => any) | undefined;
|
|
34
33
|
"onUpdate:focusedValue"?: ((focusedValue: DateValue) => any) | undefined;
|
|
35
34
|
}>, {
|
|
35
|
+
invalid: boolean;
|
|
36
36
|
disabled: boolean;
|
|
37
|
+
required: boolean;
|
|
37
38
|
open: boolean;
|
|
38
39
|
inline: boolean;
|
|
39
40
|
defaultOpen: boolean;
|
|
@@ -2,8 +2,7 @@ import { HTMLAttributes, DefineComponent, ComponentOptionsMixin, PublicProps, Co
|
|
|
2
2
|
import { RenderStrategyProps } from '../../utils/use-render-strategy';
|
|
3
3
|
import { PolymorphicProps } from '../factory';
|
|
4
4
|
import { RootEmits, RootProps } from './date-picker.types';
|
|
5
|
-
import { FocusChangeDetails, ValueChangeDetails, OpenChangeDetails, ViewChangeDetails, DateView } from '@zag-js/date-picker';
|
|
6
|
-
import { DateValue } from '@internationalized/date';
|
|
5
|
+
import { FocusChangeDetails, ValueChangeDetails, DateValue, OpenChangeDetails, ViewChangeDetails, DateView } from '@zag-js/date-picker';
|
|
7
6
|
export interface DatePickerRootBaseProps extends RootProps, RenderStrategyProps, PolymorphicProps {
|
|
8
7
|
}
|
|
9
8
|
export interface DatePickerRootProps extends DatePickerRootBaseProps,
|
|
@@ -33,7 +32,9 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<DatePickerRootP
|
|
|
33
32
|
"onUpdate:view"?: ((view: DateView) => any) | undefined;
|
|
34
33
|
"onUpdate:focusedValue"?: ((focusedValue: DateValue) => any) | undefined;
|
|
35
34
|
}>, {
|
|
35
|
+
invalid: boolean;
|
|
36
36
|
disabled: boolean;
|
|
37
|
+
required: boolean;
|
|
37
38
|
open: boolean;
|
|
38
39
|
inline: boolean;
|
|
39
40
|
defaultOpen: boolean;
|
|
@@ -40,6 +40,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
40
40
|
translations: {},
|
|
41
41
|
view: {},
|
|
42
42
|
inline: { type: Boolean },
|
|
43
|
+
invalid: { type: Boolean },
|
|
44
|
+
required: { type: Boolean },
|
|
43
45
|
lazyMount: { type: Boolean },
|
|
44
46
|
unmountOnExit: { type: Boolean },
|
|
45
47
|
asChild: { type: Boolean }
|
|
@@ -48,10 +50,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
48
50
|
defaultOpen: void 0,
|
|
49
51
|
disabled: void 0,
|
|
50
52
|
fixedWeeks: void 0,
|
|
53
|
+
inline: void 0,
|
|
54
|
+
invalid: void 0,
|
|
51
55
|
open: void 0,
|
|
52
|
-
readOnly: void 0,
|
|
53
56
|
outsideDaySelectable: void 0,
|
|
54
|
-
|
|
57
|
+
readOnly: void 0,
|
|
58
|
+
required: void 0
|
|
55
59
|
}),
|
|
56
60
|
emits: ["focusChange", "openChange", "valueChange", "viewChange", "update:modelValue", "update:open", "update:view", "update:focusedValue"],
|
|
57
61
|
setup(__props, { emit: __emit }) {
|
|
@@ -171,6 +171,14 @@ export interface RootProps {
|
|
|
171
171
|
* Whether the date picker is inline
|
|
172
172
|
*/
|
|
173
173
|
inline?: boolean;
|
|
174
|
+
/**
|
|
175
|
+
* Whether the date picker is in an invalid state
|
|
176
|
+
*/
|
|
177
|
+
invalid?: boolean;
|
|
178
|
+
/**
|
|
179
|
+
* Whether the date picker is required
|
|
180
|
+
*/
|
|
181
|
+
required?: boolean;
|
|
174
182
|
}
|
|
175
183
|
export type RootEmits = {
|
|
176
184
|
/**
|
|
@@ -171,6 +171,14 @@ export interface RootProps {
|
|
|
171
171
|
* Whether the date picker is inline
|
|
172
172
|
*/
|
|
173
173
|
inline?: boolean;
|
|
174
|
+
/**
|
|
175
|
+
* Whether the date picker is in an invalid state
|
|
176
|
+
*/
|
|
177
|
+
invalid?: boolean;
|
|
178
|
+
/**
|
|
179
|
+
* Whether the date picker is required
|
|
180
|
+
*/
|
|
181
|
+
required?: boolean;
|
|
174
182
|
}
|
|
175
183
|
export type RootEmits = {
|
|
176
184
|
/**
|
|
@@ -2,7 +2,7 @@ import { RenderStrategyProps } from '../../utils/use-render-strategy';
|
|
|
2
2
|
import { RootEmits, RootProps } from './dialog.types';
|
|
3
3
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
4
4
|
import { OpenChangeDetails } from '@zag-js/dialog';
|
|
5
|
-
import { FocusOutsideEvent, InteractOutsideEvent, PointerDownOutsideEvent } from '@zag-js/
|
|
5
|
+
import { FocusOutsideEvent, InteractOutsideEvent, PointerDownOutsideEvent } from '@zag-js/bottom-sheet';
|
|
6
6
|
export interface DialogRootBaseProps extends RootProps, RenderStrategyProps {
|
|
7
7
|
}
|
|
8
8
|
export interface DialogRootProps extends DialogRootBaseProps {
|
|
@@ -2,7 +2,7 @@ import { RenderStrategyProps } from '../../utils/use-render-strategy';
|
|
|
2
2
|
import { RootEmits, RootProps } from './dialog.types';
|
|
3
3
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
4
4
|
import { OpenChangeDetails } from '@zag-js/dialog';
|
|
5
|
-
import { FocusOutsideEvent, InteractOutsideEvent, PointerDownOutsideEvent } from '@zag-js/
|
|
5
|
+
import { FocusOutsideEvent, InteractOutsideEvent, PointerDownOutsideEvent } from '@zag-js/bottom-sheet';
|
|
6
6
|
export interface DialogRootBaseProps extends RootProps, RenderStrategyProps {
|
|
7
7
|
}
|
|
8
8
|
export interface DialogRootProps extends DialogRootBaseProps {
|
|
@@ -2,7 +2,7 @@ import { HTMLAttributes, DefineComponent, ComponentOptionsMixin, PublicProps, Co
|
|
|
2
2
|
import { PolymorphicProps } from '../factory';
|
|
3
3
|
import { RootEmits, RootProps } from './editable.types';
|
|
4
4
|
import { ValueChangeDetails, EditChangeDetails } from '@zag-js/editable';
|
|
5
|
-
import { FocusOutsideEvent, InteractOutsideEvent, PointerDownOutsideEvent } from '@zag-js/
|
|
5
|
+
import { FocusOutsideEvent, InteractOutsideEvent, PointerDownOutsideEvent } from '@zag-js/bottom-sheet';
|
|
6
6
|
export interface EditableRootBaseProps extends RootProps, PolymorphicProps {
|
|
7
7
|
}
|
|
8
8
|
export interface EditableRootProps extends EditableRootBaseProps,
|
|
@@ -2,7 +2,7 @@ import { HTMLAttributes, DefineComponent, ComponentOptionsMixin, PublicProps, Co
|
|
|
2
2
|
import { PolymorphicProps } from '../factory';
|
|
3
3
|
import { RootEmits, RootProps } from './editable.types';
|
|
4
4
|
import { ValueChangeDetails, EditChangeDetails } from '@zag-js/editable';
|
|
5
|
-
import { FocusOutsideEvent, InteractOutsideEvent, PointerDownOutsideEvent } from '@zag-js/
|
|
5
|
+
import { FocusOutsideEvent, InteractOutsideEvent, PointerDownOutsideEvent } from '@zag-js/bottom-sheet';
|
|
6
6
|
export interface EditableRootBaseProps extends RootProps, PolymorphicProps {
|
|
7
7
|
}
|
|
8
8
|
export interface EditableRootProps extends EditableRootBaseProps,
|
|
@@ -25,7 +25,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
25
25
|
useFieldsetContext.FieldsetProvider(fieldset);
|
|
26
26
|
useForwardExpose.useForwardExpose();
|
|
27
27
|
return (_ctx, _cache) => {
|
|
28
|
-
return vue.openBlock(), vue.createBlock(vue.unref(factory.ark).fieldset, vue.mergeProps(vue.unref(fieldset).getRootProps(), {
|
|
28
|
+
return vue.openBlock(), vue.createBlock(vue.unref(factory.ark).fieldset, vue.mergeProps(vue.unref(fieldset).getRootProps(), {
|
|
29
|
+
ref: vue.unref(fieldset).refs.rootRef,
|
|
30
|
+
"as-child": __props.asChild
|
|
31
|
+
}), {
|
|
29
32
|
default: vue.withCtx(() => [
|
|
30
33
|
vue.renderSlot(_ctx.$slots, "default")
|
|
31
34
|
]),
|
|
@@ -21,7 +21,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
21
21
|
FieldsetProvider(fieldset);
|
|
22
22
|
useForwardExpose();
|
|
23
23
|
return (_ctx, _cache) => {
|
|
24
|
-
return openBlock(), createBlock(unref(ark).fieldset, mergeProps(unref(fieldset).getRootProps(), {
|
|
24
|
+
return openBlock(), createBlock(unref(ark).fieldset, mergeProps(unref(fieldset).getRootProps(), {
|
|
25
|
+
ref: unref(fieldset).refs.rootRef,
|
|
26
|
+
"as-child": __props.asChild
|
|
27
|
+
}), {
|
|
25
28
|
default: withCtx(() => [
|
|
26
29
|
renderSlot(_ctx.$slots, "default")
|
|
27
30
|
]),
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
5
5
|
const domQuery = require('@zag-js/dom-query');
|
|
6
6
|
const vue = require('vue');
|
|
7
7
|
const useEnvironmentContext = require('../../providers/environment/use-environment-context.cjs');
|
|
8
|
+
const unrefElement = require('../../utils/unref-element.cjs');
|
|
8
9
|
const fieldset_anatomy = require('./fieldset.anatomy.cjs');
|
|
9
10
|
|
|
10
11
|
const useFieldset = (props = {}) => {
|
|
@@ -19,13 +20,13 @@ const useFieldset = (props = {}) => {
|
|
|
19
20
|
const fieldsetProps = vue.toValue(props);
|
|
20
21
|
const id = fieldsetProps.id ?? uuid;
|
|
21
22
|
return {
|
|
22
|
-
|
|
23
|
+
legendId: `fieldset::${id}::legend`,
|
|
23
24
|
errorTextId: `fieldset::${id}::error-text`,
|
|
24
25
|
helperTextId: `fieldset::${id}::helper-text`
|
|
25
26
|
};
|
|
26
27
|
});
|
|
27
28
|
vue.onMounted(() => {
|
|
28
|
-
const rootNode = rootRef
|
|
29
|
+
const rootNode = unrefElement.unrefElement(rootRef);
|
|
29
30
|
if (!rootNode) return;
|
|
30
31
|
const checkTextElements = () => {
|
|
31
32
|
const { errorTextId, helperTextId } = ids.value;
|
|
@@ -43,20 +44,21 @@ const useFieldset = (props = {}) => {
|
|
|
43
44
|
});
|
|
44
45
|
return vue.computed(() => {
|
|
45
46
|
const { disabled, invalid } = vue.toValue(props);
|
|
46
|
-
const {
|
|
47
|
-
const
|
|
48
|
-
if (state.hasErrorText && invalid)
|
|
49
|
-
if (state.hasHelperText)
|
|
47
|
+
const { legendId, errorTextId, helperTextId } = ids.value;
|
|
48
|
+
const describedByIds = [];
|
|
49
|
+
if (state.hasErrorText && invalid) describedByIds.push(errorTextId);
|
|
50
|
+
if (state.hasHelperText) describedByIds.push(helperTextId);
|
|
51
|
+
const describedBy = describedByIds.length > 0 ? describedByIds.join(" ") : void 0;
|
|
50
52
|
const getRootProps = () => ({
|
|
51
53
|
...fieldset_anatomy.parts.root.attrs,
|
|
52
54
|
disabled,
|
|
53
55
|
"data-disabled": domQuery.dataAttr(!!disabled),
|
|
54
56
|
"data-invalid": domQuery.dataAttr(invalid),
|
|
55
|
-
"aria-labelledby":
|
|
56
|
-
"aria-describedby":
|
|
57
|
+
"aria-labelledby": legendId,
|
|
58
|
+
"aria-describedby": describedBy
|
|
57
59
|
});
|
|
58
60
|
const getLegendProps = () => ({
|
|
59
|
-
id:
|
|
61
|
+
id: legendId,
|
|
60
62
|
...fieldset_anatomy.parts.legend.attrs,
|
|
61
63
|
"data-disabled": domQuery.dataAttr(!!disabled),
|
|
62
64
|
"data-invalid": domQuery.dataAttr(invalid)
|
|
@@ -74,6 +76,11 @@ const useFieldset = (props = {}) => {
|
|
|
74
76
|
refs: {
|
|
75
77
|
rootRef
|
|
76
78
|
},
|
|
79
|
+
ids: {
|
|
80
|
+
legend: legendId,
|
|
81
|
+
errorText: errorTextId,
|
|
82
|
+
helperText: helperTextId
|
|
83
|
+
},
|
|
77
84
|
disabled,
|
|
78
85
|
invalid,
|
|
79
86
|
getRootProps,
|
|
@@ -18,6 +18,11 @@ export declare const useFieldset: (props?: MaybeRef<UseFieldsetProps>) => Comput
|
|
|
18
18
|
refs: {
|
|
19
19
|
rootRef: Ref<null, null>;
|
|
20
20
|
};
|
|
21
|
+
ids: {
|
|
22
|
+
legend: string;
|
|
23
|
+
errorText: string;
|
|
24
|
+
helperText: string;
|
|
25
|
+
};
|
|
21
26
|
disabled: boolean | "false" | "true" | undefined;
|
|
22
27
|
invalid: boolean | undefined;
|
|
23
28
|
getRootProps: () => FieldsetHTMLAttributes;
|
|
@@ -18,6 +18,11 @@ export declare const useFieldset: (props?: MaybeRef<UseFieldsetProps>) => Comput
|
|
|
18
18
|
refs: {
|
|
19
19
|
rootRef: Ref<null, null>;
|
|
20
20
|
};
|
|
21
|
+
ids: {
|
|
22
|
+
legend: string;
|
|
23
|
+
errorText: string;
|
|
24
|
+
helperText: string;
|
|
25
|
+
};
|
|
21
26
|
disabled: boolean | "false" | "true" | undefined;
|
|
22
27
|
invalid: boolean | undefined;
|
|
23
28
|
getRootProps: () => FieldsetHTMLAttributes;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { dataAttr } from '@zag-js/dom-query';
|
|
2
2
|
import { reactive, ref, useId, computed, toValue, onMounted, onBeforeUnmount } from 'vue';
|
|
3
3
|
import { useEnvironmentContext, DEFAULT_ENVIRONMENT } from '../../providers/environment/use-environment-context.js';
|
|
4
|
+
import { unrefElement } from '../../utils/unref-element.js';
|
|
4
5
|
import { parts } from './fieldset.anatomy.js';
|
|
5
6
|
|
|
6
7
|
const useFieldset = (props = {}) => {
|
|
@@ -15,13 +16,13 @@ const useFieldset = (props = {}) => {
|
|
|
15
16
|
const fieldsetProps = toValue(props);
|
|
16
17
|
const id = fieldsetProps.id ?? uuid;
|
|
17
18
|
return {
|
|
18
|
-
|
|
19
|
+
legendId: `fieldset::${id}::legend`,
|
|
19
20
|
errorTextId: `fieldset::${id}::error-text`,
|
|
20
21
|
helperTextId: `fieldset::${id}::helper-text`
|
|
21
22
|
};
|
|
22
23
|
});
|
|
23
24
|
onMounted(() => {
|
|
24
|
-
const rootNode = rootRef
|
|
25
|
+
const rootNode = unrefElement(rootRef);
|
|
25
26
|
if (!rootNode) return;
|
|
26
27
|
const checkTextElements = () => {
|
|
27
28
|
const { errorTextId, helperTextId } = ids.value;
|
|
@@ -39,20 +40,21 @@ const useFieldset = (props = {}) => {
|
|
|
39
40
|
});
|
|
40
41
|
return computed(() => {
|
|
41
42
|
const { disabled, invalid } = toValue(props);
|
|
42
|
-
const {
|
|
43
|
-
const
|
|
44
|
-
if (state.hasErrorText && invalid)
|
|
45
|
-
if (state.hasHelperText)
|
|
43
|
+
const { legendId, errorTextId, helperTextId } = ids.value;
|
|
44
|
+
const describedByIds = [];
|
|
45
|
+
if (state.hasErrorText && invalid) describedByIds.push(errorTextId);
|
|
46
|
+
if (state.hasHelperText) describedByIds.push(helperTextId);
|
|
47
|
+
const describedBy = describedByIds.length > 0 ? describedByIds.join(" ") : void 0;
|
|
46
48
|
const getRootProps = () => ({
|
|
47
49
|
...parts.root.attrs,
|
|
48
50
|
disabled,
|
|
49
51
|
"data-disabled": dataAttr(!!disabled),
|
|
50
52
|
"data-invalid": dataAttr(invalid),
|
|
51
|
-
"aria-labelledby":
|
|
52
|
-
"aria-describedby":
|
|
53
|
+
"aria-labelledby": legendId,
|
|
54
|
+
"aria-describedby": describedBy
|
|
53
55
|
});
|
|
54
56
|
const getLegendProps = () => ({
|
|
55
|
-
id:
|
|
57
|
+
id: legendId,
|
|
56
58
|
...parts.legend.attrs,
|
|
57
59
|
"data-disabled": dataAttr(!!disabled),
|
|
58
60
|
"data-invalid": dataAttr(invalid)
|
|
@@ -70,6 +72,11 @@ const useFieldset = (props = {}) => {
|
|
|
70
72
|
refs: {
|
|
71
73
|
rootRef
|
|
72
74
|
},
|
|
75
|
+
ids: {
|
|
76
|
+
legend: legendId,
|
|
77
|
+
errorText: errorTextId,
|
|
78
|
+
helperText: helperTextId
|
|
79
|
+
},
|
|
73
80
|
disabled,
|
|
74
81
|
invalid,
|
|
75
82
|
getRootProps,
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { RootEmits, RootProps } from './floating-panel.types';
|
|
2
2
|
import { RenderStrategyProps } from '../../utils/use-render-strategy';
|
|
3
3
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
4
|
-
import { OpenChangeDetails, PositionChangeDetails, SizeChangeDetails, StageChangeDetails } from '@zag-js/floating-panel';
|
|
5
|
-
import { Point, Size } from '@zag-js/rect-utils';
|
|
4
|
+
import { OpenChangeDetails, PositionChangeDetails, Point, SizeChangeDetails, Size, StageChangeDetails } from '@zag-js/floating-panel';
|
|
6
5
|
export interface FloatingPanelRootBaseProps extends RootProps, RenderStrategyProps {
|
|
7
6
|
}
|
|
8
7
|
export interface FloatingPanelRootEmits extends RootEmits {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { RootEmits, RootProps } from './floating-panel.types';
|
|
2
2
|
import { RenderStrategyProps } from '../../utils/use-render-strategy';
|
|
3
3
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
4
|
-
import { OpenChangeDetails, PositionChangeDetails, SizeChangeDetails, StageChangeDetails } from '@zag-js/floating-panel';
|
|
5
|
-
import { Point, Size } from '@zag-js/rect-utils';
|
|
4
|
+
import { OpenChangeDetails, PositionChangeDetails, Point, SizeChangeDetails, Size, StageChangeDetails } from '@zag-js/floating-panel';
|
|
6
5
|
export interface FloatingPanelRootBaseProps extends RootProps, RenderStrategyProps {
|
|
7
6
|
}
|
|
8
7
|
export interface FloatingPanelRootEmits extends RootEmits {
|
|
@@ -2,7 +2,7 @@ import { RenderStrategyProps } from '../../utils/use-render-strategy';
|
|
|
2
2
|
import { RootEmits, RootProps } from './hover-card.types';
|
|
3
3
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
4
4
|
import { OpenChangeDetails } from '@zag-js/hover-card';
|
|
5
|
-
import { FocusOutsideEvent, InteractOutsideEvent, PointerDownOutsideEvent } from '@zag-js/
|
|
5
|
+
import { FocusOutsideEvent, InteractOutsideEvent, PointerDownOutsideEvent } from '@zag-js/bottom-sheet';
|
|
6
6
|
export interface HoverCardRootBaseProps extends RootProps, RenderStrategyProps {
|
|
7
7
|
}
|
|
8
8
|
export interface HoverCardRootProps extends HoverCardRootBaseProps {
|
|
@@ -2,7 +2,7 @@ import { RenderStrategyProps } from '../../utils/use-render-strategy';
|
|
|
2
2
|
import { RootEmits, RootProps } from './hover-card.types';
|
|
3
3
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
4
4
|
import { OpenChangeDetails } from '@zag-js/hover-card';
|
|
5
|
-
import { FocusOutsideEvent, InteractOutsideEvent, PointerDownOutsideEvent } from '@zag-js/
|
|
5
|
+
import { FocusOutsideEvent, InteractOutsideEvent, PointerDownOutsideEvent } from '@zag-js/bottom-sheet';
|
|
6
6
|
export interface HoverCardRootBaseProps extends RootProps, RenderStrategyProps {
|
|
7
7
|
}
|
|
8
8
|
export interface HoverCardRootProps extends HoverCardRootBaseProps {
|
|
@@ -389,7 +389,9 @@ const useNumberInputContext = require('./number-input/use-number-input-context.c
|
|
|
389
389
|
const numberInput$1 = require('./number-input/number-input.cjs');
|
|
390
390
|
const paginationContext_vue_vue_type_script_setup_true_lang = require('./pagination/pagination-context.vue.cjs');
|
|
391
391
|
const paginationEllipsis_vue_vue_type_script_setup_true_lang = require('./pagination/pagination-ellipsis.vue.cjs');
|
|
392
|
+
const paginationFirstTrigger_vue_vue_type_script_setup_true_lang = require('./pagination/pagination-first-trigger.vue.cjs');
|
|
392
393
|
const paginationItem_vue_vue_type_script_setup_true_lang = require('./pagination/pagination-item.vue.cjs');
|
|
394
|
+
const paginationLastTrigger_vue_vue_type_script_setup_true_lang = require('./pagination/pagination-last-trigger.vue.cjs');
|
|
393
395
|
const paginationNextTrigger_vue_vue_type_script_setup_true_lang = require('./pagination/pagination-next-trigger.vue.cjs');
|
|
394
396
|
const paginationPrevTrigger_vue_vue_type_script_setup_true_lang = require('./pagination/pagination-prev-trigger.vue.cjs');
|
|
395
397
|
const paginationRootProvider_vue_vue_type_script_setup_true_lang = require('./pagination/pagination-root-provider.vue.cjs');
|
|
@@ -1152,7 +1154,9 @@ exports.useNumberInputContext = useNumberInputContext.useNumberInputContext;
|
|
|
1152
1154
|
exports.NumberInput = numberInput$1;
|
|
1153
1155
|
exports.PaginationContext = paginationContext_vue_vue_type_script_setup_true_lang.default;
|
|
1154
1156
|
exports.PaginationEllipsis = paginationEllipsis_vue_vue_type_script_setup_true_lang.default;
|
|
1157
|
+
exports.PaginationFirstTrigger = paginationFirstTrigger_vue_vue_type_script_setup_true_lang.default;
|
|
1155
1158
|
exports.PaginationItem = paginationItem_vue_vue_type_script_setup_true_lang.default;
|
|
1159
|
+
exports.PaginationLastTrigger = paginationLastTrigger_vue_vue_type_script_setup_true_lang.default;
|
|
1156
1160
|
exports.PaginationNextTrigger = paginationNextTrigger_vue_vue_type_script_setup_true_lang.default;
|
|
1157
1161
|
exports.PaginationPrevTrigger = paginationPrevTrigger_vue_vue_type_script_setup_true_lang.default;
|
|
1158
1162
|
exports.PaginationRootProvider = paginationRootProvider_vue_vue_type_script_setup_true_lang.default;
|
package/dist/components/index.js
CHANGED
|
@@ -410,7 +410,9 @@ import * as numberInput from './number-input/number-input.js';
|
|
|
410
410
|
export { numberInput as NumberInput };
|
|
411
411
|
export { default as PaginationContext } from './pagination/pagination-context.vue.js';
|
|
412
412
|
export { default as PaginationEllipsis } from './pagination/pagination-ellipsis.vue.js';
|
|
413
|
+
export { default as PaginationFirstTrigger } from './pagination/pagination-first-trigger.vue.js';
|
|
413
414
|
export { default as PaginationItem } from './pagination/pagination-item.vue.js';
|
|
415
|
+
export { default as PaginationLastTrigger } from './pagination/pagination-last-trigger.vue.js';
|
|
414
416
|
export { default as PaginationNextTrigger } from './pagination/pagination-next-trigger.vue.js';
|
|
415
417
|
export { default as PaginationPrevTrigger } from './pagination/pagination-prev-trigger.vue.js';
|
|
416
418
|
export { default as PaginationRootProvider } from './pagination/pagination-root-provider.vue.js';
|