@soybeanjs/headless 0.9.1 → 0.9.2
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/accordion/accordion-root.js +1 -1
- package/dist/components/alert-dialog/alert-dialog-content.vue.d.ts +2 -2
- package/dist/components/checkbox/checkbox-root.vue.d.ts +1 -1
- package/dist/components/collapsible/collapsible-root.vue.d.ts +1 -1
- package/dist/components/context-menu/context-menu-content.vue.d.ts +4 -4
- package/dist/components/dialog/dialog-content.vue.d.ts +2 -2
- package/dist/components/dialog/dialog-root.vue.d.ts +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-content.vue.d.ts +4 -4
- package/dist/components/dropdown-menu/dropdown-menu-root.vue.d.ts +1 -1
- package/dist/components/form/form-control.js +1 -0
- package/dist/components/form/form-control.vue.d.ts +18 -0
- package/dist/components/form/index.d.ts +7 -6
- package/dist/components/form/index.js +1 -1
- package/dist/components/form/types.d.ts +3 -2
- package/dist/components/link/link.vue.d.ts +2 -2
- package/dist/components/listbox/listbox-root.js +1 -1
- package/dist/components/listbox/listbox-root.vue.d.ts +2 -2
- package/dist/components/menu/menu-content.vue.d.ts +4 -4
- package/dist/components/menu/menu-sub-content.vue.d.ts +4 -4
- package/dist/components/navigation-menu/navigation-menu-root.vue.d.ts +1 -1
- package/dist/components/popover/popover-positioner.vue.d.ts +2 -2
- package/dist/components/popover/popover-root.vue.d.ts +1 -1
- package/dist/components/popper/popper-positioner.vue.d.ts +9 -9
- package/dist/components/roving-focus/roving-focus-group.vue.d.ts +1 -1
- package/dist/components/select/select-content.vue.d.ts +4 -4
- package/dist/components/select/select-root.js +1 -1
- package/dist/components/tabs/tabs-root.vue.d.ts +1 -1
- package/dist/components/tabs/tabs-trigger.vue.d.ts +1 -1
- package/dist/components/toast/toast-root.vue.d.ts +3 -3
- package/dist/components/tree-menu/tree-menu-root.vue.d.ts +1 -1
- package/dist/composables/use-dismissable-layer.d.ts +1 -1
- package/dist/composables/use-selection.js +1 -1
- package/dist/index.d.ts +142 -141
- package/dist/index.js +1 -1
- package/dist/types/common.d.ts +6 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{transformPropsToContext as e}from"../../shared/vue.js";import"../../shared/index.js";import{useSelection as t}from"../../composables/use-selection.js";import"../../composables/index.js";import{provideAccordionRootContext as n,useAccordionUi as r}from"./context.js";import{computed as i,createElementBlock as a,defineComponent as o,normalizeClass as s,openBlock as c,renderSlot as l,shallowRef as u,unref as d}from"vue";const f=o({name:`AccordionRoot`,__name:`accordion-root`,props:{collapsible:{type:Boolean,default:!1},dir:{},disabled:{type:Boolean,default:!1},orientation:{default:`vertical`},unmountOnHide:{type:Boolean,default:!0},modelValue:{},defaultValue:{},multiple:{}},emits:[`update:modelValue`],setup(o,{emit:f}){let p=o,m=f,h=r(),g=i(()=>h?.value?.root),_=u(),{modelValue:v,isMultiple:y,onModelValueChange:b}=t(p,e=>{m(`update:modelValue`,e)});return n({rootElement:_,modelValue:v,isMultiple:y,onModelValueChange:b,...e(p,[`collapsible`,`disabled`,`orientation`,`dir`,`unmountOnHide`])}),(e,t)=>(c(),a(`div`,{ref_key:`rootElement`,ref:_,class:s(g.value)},[l(e.$slots,`default`,{modelValue:d(v)})],2))}});export{f as default};
|
|
1
|
+
import{transformPropsToContext as e}from"../../shared/vue.js";import"../../shared/index.js";import{useSelection as t}from"../../composables/use-selection.js";import"../../composables/index.js";import{provideAccordionRootContext as n,useAccordionUi as r}from"./context.js";import{computed as i,createElementBlock as a,defineComponent as o,normalizeClass as s,openBlock as c,renderSlot as l,shallowRef as u,unref as d}from"vue";const f=o({name:`AccordionRoot`,__name:`accordion-root`,props:{collapsible:{type:Boolean,default:!1},dir:{},disabled:{type:Boolean,default:!1},orientation:{default:`vertical`},unmountOnHide:{type:Boolean,default:!0},modelValue:{},defaultValue:{},multiple:{},singleClearable:{type:Boolean}},emits:[`update:modelValue`],setup(o,{emit:f}){let p=o,m=f,h=r(),g=i(()=>h?.value?.root),_=u(),{modelValue:v,isMultiple:y,onModelValueChange:b}=t(p,e=>{m(`update:modelValue`,e)});return n({rootElement:_,modelValue:v,isMultiple:y,onModelValueChange:b,...e(p,[`collapsible`,`disabled`,`orientation`,`dir`,`unmountOnHide`])}),(e,t)=>(c(),a(`div`,{ref_key:`rootElement`,ref:_,class:s(g.value)},[l(e.$slots,`default`,{modelValue:d(v)})],2))}});export{f as default};
|
|
@@ -10,19 +10,19 @@ type __VLS_Slots = {} & {
|
|
|
10
10
|
default?: (props: typeof __VLS_12) => any;
|
|
11
11
|
};
|
|
12
12
|
declare const __VLS_base: vue.DefineComponent<DialogContentProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
13
|
+
closeAutoFocus: (event: Event) => any;
|
|
13
14
|
escapeKeyDown: (event: KeyboardEvent) => any;
|
|
14
15
|
pointerDownOutside: (event: PointerDownOutsideEvent) => any;
|
|
15
16
|
focusOutside: (event: FocusOutsideEvent) => any;
|
|
16
17
|
interactOutside: (event: PointerDownOutsideEvent | FocusOutsideEvent) => any;
|
|
17
18
|
openAutoFocus: (event: Event) => any;
|
|
18
|
-
closeAutoFocus: (event: Event) => any;
|
|
19
19
|
}, string, vue.PublicProps, Readonly<DialogContentProps> & Readonly<{
|
|
20
|
+
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
20
21
|
onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
|
|
21
22
|
onPointerDownOutside?: ((event: PointerDownOutsideEvent) => any) | undefined;
|
|
22
23
|
onFocusOutside?: ((event: FocusOutsideEvent) => any) | undefined;
|
|
23
24
|
onInteractOutside?: ((event: PointerDownOutsideEvent | FocusOutsideEvent) => any) | undefined;
|
|
24
25
|
onOpenAutoFocus?: ((event: Event) => any) | undefined;
|
|
25
|
-
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
26
26
|
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
27
27
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
28
28
|
declare const _default: typeof __VLS_export;
|
|
@@ -17,8 +17,8 @@ declare const __VLS_base: vue.DefineComponent<CheckboxRootProps, {}, {}, {}, {},
|
|
|
17
17
|
}, string, vue.PublicProps, Readonly<CheckboxRootProps> & Readonly<{
|
|
18
18
|
"onUpdate:modelValue"?: ((value: CheckedState | null) => any) | undefined;
|
|
19
19
|
}>, {
|
|
20
|
-
value: DefinedValue;
|
|
21
20
|
modelValue: CheckedState | null;
|
|
21
|
+
value: DefinedValue;
|
|
22
22
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
23
23
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
24
24
|
declare const _default: typeof __VLS_export;
|
|
@@ -15,9 +15,9 @@ declare const __VLS_base: vue.DefineComponent<CollapsibleRootProps, {
|
|
|
15
15
|
}, string, vue.PublicProps, Readonly<CollapsibleRootProps> & Readonly<{
|
|
16
16
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
17
17
|
}>, {
|
|
18
|
+
unmountOnHide: boolean;
|
|
18
19
|
open: boolean;
|
|
19
20
|
defaultOpen: boolean;
|
|
20
|
-
unmountOnHide: boolean;
|
|
21
21
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
22
22
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
23
23
|
declare const _default: typeof __VLS_export;
|
|
@@ -9,21 +9,21 @@ type __VLS_Slots = {} & {
|
|
|
9
9
|
default?: (props: typeof __VLS_11) => any;
|
|
10
10
|
};
|
|
11
11
|
declare const __VLS_base: vue.DefineComponent<ContextMenuContentProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
12
|
+
closeAutoFocus: (event: Event) => any;
|
|
12
13
|
escapeKeyDown: (event: KeyboardEvent) => any;
|
|
13
14
|
pointerDownOutside: (event: PointerDownOutsideEvent) => any;
|
|
15
|
+
entryFocus: (event: Event) => any;
|
|
14
16
|
focusOutside: (event: FocusOutsideEvent) => any;
|
|
15
17
|
interactOutside: (event: PointerDownOutsideEvent | FocusOutsideEvent) => any;
|
|
16
18
|
openAutoFocus: (event: Event) => any;
|
|
17
|
-
closeAutoFocus: (event: Event) => any;
|
|
18
|
-
entryFocus: (event: Event) => any;
|
|
19
19
|
}, string, vue.PublicProps, Readonly<ContextMenuContentProps> & Readonly<{
|
|
20
|
+
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
20
21
|
onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
|
|
21
22
|
onPointerDownOutside?: ((event: PointerDownOutsideEvent) => any) | undefined;
|
|
23
|
+
onEntryFocus?: ((event: Event) => any) | undefined;
|
|
22
24
|
onFocusOutside?: ((event: FocusOutsideEvent) => any) | undefined;
|
|
23
25
|
onInteractOutside?: ((event: PointerDownOutsideEvent | FocusOutsideEvent) => any) | undefined;
|
|
24
26
|
onOpenAutoFocus?: ((event: Event) => any) | undefined;
|
|
25
|
-
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
26
|
-
onEntryFocus?: ((event: Event) => any) | undefined;
|
|
27
27
|
}>, {
|
|
28
28
|
avoidCollisions: boolean;
|
|
29
29
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
@@ -9,19 +9,19 @@ type __VLS_Slots = {} & {
|
|
|
9
9
|
default?: (props: typeof __VLS_13) => any;
|
|
10
10
|
};
|
|
11
11
|
declare const __VLS_base: vue.DefineComponent<DialogContentProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
12
|
+
closeAutoFocus: (event: Event) => any;
|
|
12
13
|
escapeKeyDown: (event: KeyboardEvent) => any;
|
|
13
14
|
pointerDownOutside: (event: PointerDownOutsideEvent) => any;
|
|
14
15
|
focusOutside: (event: FocusOutsideEvent) => any;
|
|
15
16
|
interactOutside: (event: PointerDownOutsideEvent | FocusOutsideEvent) => any;
|
|
16
17
|
openAutoFocus: (event: Event) => any;
|
|
17
|
-
closeAutoFocus: (event: Event) => any;
|
|
18
18
|
}, string, vue.PublicProps, Readonly<DialogContentProps> & Readonly<{
|
|
19
|
+
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
19
20
|
onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
|
|
20
21
|
onPointerDownOutside?: ((event: PointerDownOutsideEvent) => any) | undefined;
|
|
21
22
|
onFocusOutside?: ((event: FocusOutsideEvent) => any) | undefined;
|
|
22
23
|
onInteractOutside?: ((event: PointerDownOutsideEvent | FocusOutsideEvent) => any) | undefined;
|
|
23
24
|
onOpenAutoFocus?: ((event: Event) => any) | undefined;
|
|
24
|
-
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
25
25
|
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
26
26
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
27
27
|
declare const _default: typeof __VLS_export;
|
|
@@ -15,8 +15,8 @@ declare const __VLS_base: vue.DefineComponent<DialogRootProps, {}, {}, {}, {}, v
|
|
|
15
15
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
16
16
|
}>, {
|
|
17
17
|
open: boolean;
|
|
18
|
-
modal: boolean;
|
|
19
18
|
defaultOpen: boolean;
|
|
19
|
+
modal: boolean;
|
|
20
20
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
21
21
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
22
22
|
declare const _default: typeof __VLS_export;
|
|
@@ -10,21 +10,21 @@ type __VLS_Slots = {} & {
|
|
|
10
10
|
default?: (props: typeof __VLS_11) => any;
|
|
11
11
|
};
|
|
12
12
|
declare const __VLS_base: vue.DefineComponent<MenuContentProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
13
|
+
closeAutoFocus: (event: Event) => any;
|
|
13
14
|
escapeKeyDown: (event: KeyboardEvent) => any;
|
|
14
15
|
pointerDownOutside: (event: PointerDownOutsideEvent) => any;
|
|
16
|
+
entryFocus: (event: Event) => any;
|
|
15
17
|
focusOutside: (event: FocusOutsideEvent) => any;
|
|
16
18
|
interactOutside: (event: PointerDownOutsideEvent | FocusOutsideEvent) => any;
|
|
17
19
|
openAutoFocus: (event: Event) => any;
|
|
18
|
-
closeAutoFocus: (event: Event) => any;
|
|
19
|
-
entryFocus: (event: Event) => any;
|
|
20
20
|
}, string, vue.PublicProps, Readonly<MenuContentProps> & Readonly<{
|
|
21
|
+
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
21
22
|
onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
|
|
22
23
|
onPointerDownOutside?: ((event: PointerDownOutsideEvent) => any) | undefined;
|
|
24
|
+
onEntryFocus?: ((event: Event) => any) | undefined;
|
|
23
25
|
onFocusOutside?: ((event: FocusOutsideEvent) => any) | undefined;
|
|
24
26
|
onInteractOutside?: ((event: PointerDownOutsideEvent | FocusOutsideEvent) => any) | undefined;
|
|
25
27
|
onOpenAutoFocus?: ((event: Event) => any) | undefined;
|
|
26
|
-
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
27
|
-
onEntryFocus?: ((event: Event) => any) | undefined;
|
|
28
28
|
}>, {
|
|
29
29
|
sideOffset: number;
|
|
30
30
|
sideFlip: boolean;
|
|
@@ -13,11 +13,11 @@ declare const __VLS_base: vue.DefineComponent<DropdownMenuRootProps, {}, {}, {},
|
|
|
13
13
|
}, string, vue.PublicProps, Readonly<DropdownMenuRootProps> & Readonly<{
|
|
14
14
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
15
15
|
}>, {
|
|
16
|
+
trigger: DropdownMenuTriggerType;
|
|
16
17
|
open: boolean;
|
|
17
18
|
delayDuration: number;
|
|
18
19
|
skipDelayDuration: number;
|
|
19
20
|
modal: boolean;
|
|
20
|
-
trigger: DropdownMenuTriggerType;
|
|
21
21
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
22
22
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
23
23
|
declare const _default: typeof __VLS_export;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useFormFieldUi as e}from"./context.js";import{createElementBlock as t,defineComponent as n,normalizeClass as r,openBlock as i,renderSlot as a,unref as o}from"vue";const s=n({name:`FormControl`,__name:`form-control`,setup(n){let s=e(`control`);return(e,n)=>(i(),t(`div`,{class:r(o(s))},[a(e.$slots,`default`)],2))}});export{s as default};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FormControlProps } from "./types.js";
|
|
2
|
+
import * as vue from "vue";
|
|
3
|
+
|
|
4
|
+
//#region src/components/form/form-control.vue.d.ts
|
|
5
|
+
declare var __VLS_1: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_1) => any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_base: vue.DefineComponent<FormControlProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<FormControlProps> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
export { _default };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { FormDescriptionProps, FormErrorProps, FormFieldProps, FormFieldUi, FormFieldUiSlot, FormLabelProps } from "./types.js";
|
|
2
|
-
import { _default as _default$
|
|
3
|
-
import { _default as _default$
|
|
4
|
-
import { _default } from "./form-
|
|
5
|
-
import { _default as _default$1 } from "./form-
|
|
1
|
+
import { FormControlProps, FormDescriptionProps, FormErrorProps, FormFieldProps, FormFieldUi, FormFieldUiSlot, FormLabelProps } from "./types.js";
|
|
2
|
+
import { _default as _default$3 } from "./form-field.vue.js";
|
|
3
|
+
import { _default as _default$4 } from "./form-label.vue.js";
|
|
4
|
+
import { _default } from "./form-control.vue.js";
|
|
5
|
+
import { _default as _default$1 } from "./form-description.vue.js";
|
|
6
|
+
import { _default as _default$2 } from "./form-error.vue.js";
|
|
6
7
|
import { provideFormFieldUi } from "./context.js";
|
|
7
8
|
import { FormContext, FormErrors, FormEventHandler, FormFieldArrayState, FormFieldArrayStates, FormFieldMeta, FormFieldState, FormFieldValidator, FormMessage, FormRegisterOptions, FormResetState, FormState, FormSubmitHelper, FormTouched, FormValidateMode, FormValues, InferStandardSchemaInput, UseFormOptions, UseFormStateReturn, UseRegisterFieldArrayOptions } from "./core/types.js";
|
|
8
9
|
import { useForm } from "./core/use-form.js";
|
|
9
10
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
10
|
-
export { type FormContext, _default as FormDescription, type FormDescriptionProps, _default$
|
|
11
|
+
export { type FormContext, _default as FormControl, type FormControlProps, _default$1 as FormDescription, type FormDescriptionProps, _default$2 as FormError, type FormErrorProps, type FormErrors, type FormEventHandler, _default$3 as FormField, type FormFieldArrayState, type FormFieldArrayStates, type FormFieldMeta, type FormFieldProps, type FormFieldState, type FormFieldUi, type FormFieldUiSlot, type FormFieldValidator, _default$4 as FormLabel, type FormLabelProps, type FormMessage, type FormRegisterOptions, type FormResetState, type FormState, type FormSubmitHelper, type FormTouched, type FormValidateMode, type FormValues, type InferStandardSchemaInput, type StandardSchemaV1, type UseFormOptions, type UseFormStateReturn, type UseRegisterFieldArrayOptions, provideFormFieldUi, useForm };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{provideFormFieldUi as e}from"./context.js";import t from"./form-field.js";import n from"./form-label.js";import r from"./form-
|
|
1
|
+
import{provideFormFieldUi as e}from"./context.js";import t from"./form-field.js";import n from"./form-label.js";import r from"./form-control.js";import i from"./form-description.js";import a from"./form-error.js";import{useForm as o}from"./core/use-form.js";export{r as FormControl,i as FormDescription,a as FormError,t as FormField,n as FormLabel,e as provideFormFieldUi,o as useForm};
|
|
@@ -9,9 +9,10 @@ interface FormFieldProps extends /** @vue-ignore */HTMLAttributes {
|
|
|
9
9
|
isFieldArray?: boolean;
|
|
10
10
|
}
|
|
11
11
|
interface FormLabelProps extends LabelProps {}
|
|
12
|
+
interface FormControlProps extends /** @vue-ignore */HTMLAttributes {}
|
|
12
13
|
interface FormDescriptionProps extends /** @vue-ignore */HTMLAttributes {}
|
|
13
14
|
interface FormErrorProps extends /** @vue-ignore */HTMLAttributes {}
|
|
14
|
-
type FormFieldUiSlot = 'field' | 'fieldArray' | 'label' | 'description' | 'error';
|
|
15
|
+
type FormFieldUiSlot = 'field' | 'fieldArray' | 'label' | 'control' | 'description' | 'error';
|
|
15
16
|
type FormFieldUi = UiClass<FormFieldUiSlot>;
|
|
16
17
|
//#endregion
|
|
17
|
-
export { FormDescriptionProps, FormErrorProps, FormFieldProps, FormFieldUi, FormFieldUiSlot, FormLabelProps };
|
|
18
|
+
export { FormControlProps, FormDescriptionProps, FormErrorProps, FormFieldProps, FormFieldUi, FormFieldUiSlot, FormLabelProps };
|
|
@@ -13,9 +13,9 @@ type Slots = {
|
|
|
13
13
|
};
|
|
14
14
|
type __VLS_Slots = Slots;
|
|
15
15
|
declare const __VLS_base: vue.DefineComponent<LinkProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<LinkProps> & Readonly<{}>, {
|
|
16
|
-
replace: boolean;
|
|
17
|
-
as: AsTag | vue.Component;
|
|
18
16
|
disabled: boolean;
|
|
17
|
+
as: AsTag | vue.Component;
|
|
18
|
+
replace: boolean;
|
|
19
19
|
external: boolean;
|
|
20
20
|
viewTransition: boolean;
|
|
21
21
|
rel: "noopener" | "noreferrer" | "nofollow" | "sponsored" | "ugc" | (string & {}) | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isFormControl as e,transformPropsToContext as t}from"../../shared/vue.js";import"../../shared/index.js";import{useSelection as n}from"../../composables/use-selection.js";import"../../composables/index.js";import r from"../visually-hidden/visually-hidden-input.js";import{provideListboxRootContext as i,useListboxUi as a}from"./context.js";import{computed as o,createBlock as s,createCommentVNode as c,createElementBlock as l,defineComponent as u,nextTick as d,normalizeClass as f,openBlock as p,renderSlot as m,unref as h,watch as g}from"vue";const _=[`data-disabled`,`dir`],v=u({name:`ListboxRoot`,__name:`listbox-root`,props:{orientation:{default:`vertical`},dir:{},disabled:{type:Boolean},selectionBehavior:{default:`toggle`},highlightOnHover:{type:Boolean},modelValue:{default:void 0},defaultValue:{},multiple:{},name:{},required:{type:Boolean}},emits:[`update:modelValue`,`highlight`,`entryFocus`,`leave`],setup(u,{expose:v,emit:y}){let b=u,x=y,S=a(`root`),{modelValue:C,isMultiple:w}=n(b,e=>{x(`update:modelValue`,e)}),{rootElement:T,setRootElement:E,isUserAction:D,highlightedElement:O,highlightSelected:k,highlightFirstItem:A,highlightItem:j,getItems:M}=i({...t(b,[`dir`,`orientation`,`disabled`,`highlightOnHover`,`selectionBehavior`]),modelValue:C,isMultiple:w,onHighlight(e){x(`highlight`,e)},onEntryFocus(e){x(`entryFocus`,e)},onLeave(e){x(`leave`,e)}}),N=o(()=>e(T.value));return g(C,()=>{D.value||d(()=>{k()})},{immediate:!0,deep:!0}),v({highlightedElement:O,highlightItem:j,highlightFirstItem:A,highlightSelected:k,getItems:M}),(e,t)=>(p(),l(`div`,{ref:h(E),class:f(h(S)),"data-disabled":u.disabled?``:void 0,dir:u.dir,onPointerleave:t[0]||(t[0]=(...t)=>e.onLeave&&e.onLeave(...t)),onFocusout:t[1]||(t[1]=(...t)=>e.onFocusout&&e.onFocusout(...t))},[m(e.$slots,`default`,{modelValue:h(C)}),N.value&&u.name?(p(),s(r,{key:0,name:u.name,value:h(C),disabled:u.disabled,required:u.required},null,8,[`name`,`value`,`disabled`,`required`])):c(`v-if`,!0)],42,_))}});export{v as default};
|
|
1
|
+
import{isFormControl as e,transformPropsToContext as t}from"../../shared/vue.js";import"../../shared/index.js";import{useSelection as n}from"../../composables/use-selection.js";import"../../composables/index.js";import r from"../visually-hidden/visually-hidden-input.js";import{provideListboxRootContext as i,useListboxUi as a}from"./context.js";import{computed as o,createBlock as s,createCommentVNode as c,createElementBlock as l,defineComponent as u,nextTick as d,normalizeClass as f,openBlock as p,renderSlot as m,unref as h,watch as g}from"vue";const _=[`data-disabled`,`dir`],v=u({name:`ListboxRoot`,__name:`listbox-root`,props:{orientation:{default:`vertical`},dir:{},disabled:{type:Boolean},selectionBehavior:{default:`toggle`},highlightOnHover:{type:Boolean},modelValue:{default:void 0},defaultValue:{},multiple:{},singleClearable:{type:Boolean},name:{},required:{type:Boolean}},emits:[`update:modelValue`,`highlight`,`entryFocus`,`leave`],setup(u,{expose:v,emit:y}){let b=u,x=y,S=a(`root`),{modelValue:C,isMultiple:w}=n(b,e=>{x(`update:modelValue`,e)}),{rootElement:T,setRootElement:E,isUserAction:D,highlightedElement:O,highlightSelected:k,highlightFirstItem:A,highlightItem:j,getItems:M}=i({...t(b,[`dir`,`orientation`,`disabled`,`highlightOnHover`,`selectionBehavior`]),modelValue:C,isMultiple:w,onHighlight(e){x(`highlight`,e)},onEntryFocus(e){x(`entryFocus`,e)},onLeave(e){x(`leave`,e)}}),N=o(()=>e(T.value));return g(C,()=>{D.value||d(()=>{k()})},{immediate:!0,deep:!0}),v({highlightedElement:O,highlightItem:j,highlightFirstItem:A,highlightSelected:k,getItems:M}),(e,t)=>(p(),l(`div`,{ref:h(E),class:f(h(S)),"data-disabled":u.disabled?``:void 0,dir:u.dir,onPointerleave:t[0]||(t[0]=(...t)=>e.onLeave&&e.onLeave(...t)),onFocusout:t[1]||(t[1]=(...t)=>e.onFocusout&&e.onFocusout(...t))},[m(e.$slots,`default`,{modelValue:h(C)}),N.value&&u.name?(p(),s(r,{key:0,name:u.name,value:h(C),disabled:u.disabled,required:u.required},null,8,[`name`,`value`,`disabled`,`required`])):c(`v-if`,!0)],42,_))}});export{v as default};
|
|
@@ -7,8 +7,8 @@ import * as vue from "vue";
|
|
|
7
7
|
declare const __VLS_export: <M extends boolean>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
8
8
|
props: vue.PublicProps & __VLS_PrettifyLocal<ListboxRootProps<M> & {
|
|
9
9
|
"onUpdate:modelValue"?: ((value: M extends true ? string[] : string) => any) | undefined;
|
|
10
|
-
onHighlight?: ((payload?: CollectionItemData<ListboxCollectionItemData> | undefined) => any) | undefined;
|
|
11
10
|
onEntryFocus?: ((event: CustomEvent<any>) => any) | undefined;
|
|
11
|
+
onHighlight?: ((payload?: CollectionItemData<ListboxCollectionItemData> | undefined) => any) | undefined;
|
|
12
12
|
onLeave?: ((event: Event) => any) | undefined;
|
|
13
13
|
}> & (typeof globalThis extends {
|
|
14
14
|
__VLS_PROPS_FALLBACK: infer P;
|
|
@@ -26,7 +26,7 @@ declare const __VLS_export: <M extends boolean>(__VLS_props: NonNullable<Awaited
|
|
|
26
26
|
modelValue: (M extends true ? string[] : string) | undefined;
|
|
27
27
|
}) => any;
|
|
28
28
|
};
|
|
29
|
-
emit: ((evt: "update:modelValue", value: M extends true ? string[] : string) => void) & ((evt: "
|
|
29
|
+
emit: ((evt: "update:modelValue", value: M extends true ? string[] : string) => void) & ((evt: "entryFocus", event: CustomEvent<any>) => void) & ((evt: "highlight", payload?: CollectionItemData<ListboxCollectionItemData> | undefined) => void) & ((evt: "leave", event: Event) => void);
|
|
30
30
|
}>) => vue.VNode & {
|
|
31
31
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
32
32
|
};
|
|
@@ -10,21 +10,21 @@ type __VLS_Slots = {} & {
|
|
|
10
10
|
default?: (props: typeof __VLS_10) => any;
|
|
11
11
|
};
|
|
12
12
|
declare const __VLS_base: vue.DefineComponent<MenuContentProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
13
|
+
closeAutoFocus: (event: Event) => any;
|
|
13
14
|
escapeKeyDown: (event: KeyboardEvent) => any;
|
|
14
15
|
pointerDownOutside: (event: PointerDownOutsideEvent) => any;
|
|
16
|
+
entryFocus: (event: Event) => any;
|
|
15
17
|
focusOutside: (event: FocusOutsideEvent) => any;
|
|
16
18
|
interactOutside: (event: PointerDownOutsideEvent | FocusOutsideEvent) => any;
|
|
17
19
|
openAutoFocus: (event: Event) => any;
|
|
18
|
-
closeAutoFocus: (event: Event) => any;
|
|
19
|
-
entryFocus: (event: Event) => any;
|
|
20
20
|
}, string, vue.PublicProps, Readonly<MenuContentProps> & Readonly<{
|
|
21
|
+
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
21
22
|
onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
|
|
22
23
|
onPointerDownOutside?: ((event: PointerDownOutsideEvent) => any) | undefined;
|
|
24
|
+
onEntryFocus?: ((event: Event) => any) | undefined;
|
|
23
25
|
onFocusOutside?: ((event: FocusOutsideEvent) => any) | undefined;
|
|
24
26
|
onInteractOutside?: ((event: PointerDownOutsideEvent | FocusOutsideEvent) => any) | undefined;
|
|
25
27
|
onOpenAutoFocus?: ((event: Event) => any) | undefined;
|
|
26
|
-
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
27
|
-
onEntryFocus?: ((event: Event) => any) | undefined;
|
|
28
28
|
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
29
29
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
30
30
|
declare const _default: typeof __VLS_export;
|
|
@@ -10,21 +10,21 @@ type __VLS_Slots = {} & {
|
|
|
10
10
|
default?: (props: typeof __VLS_14) => any;
|
|
11
11
|
};
|
|
12
12
|
declare const __VLS_base: vue.DefineComponent<MenuSubContentProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
13
|
+
closeAutoFocus: (event: Event) => any;
|
|
13
14
|
escapeKeyDown: (event: KeyboardEvent) => any;
|
|
14
15
|
pointerDownOutside: (event: PointerDownOutsideEvent) => any;
|
|
16
|
+
entryFocus: (event: Event) => any;
|
|
15
17
|
focusOutside: (event: FocusOutsideEvent) => any;
|
|
16
18
|
interactOutside: (event: PointerDownOutsideEvent | FocusOutsideEvent) => any;
|
|
17
19
|
openAutoFocus: (event: Event) => any;
|
|
18
|
-
closeAutoFocus: (event: Event) => any;
|
|
19
|
-
entryFocus: (event: Event) => any;
|
|
20
20
|
}, string, vue.PublicProps, Readonly<MenuSubContentProps> & Readonly<{
|
|
21
|
+
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
21
22
|
onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
|
|
22
23
|
onPointerDownOutside?: ((event: PointerDownOutsideEvent) => any) | undefined;
|
|
24
|
+
onEntryFocus?: ((event: Event) => any) | undefined;
|
|
23
25
|
onFocusOutside?: ((event: FocusOutsideEvent) => any) | undefined;
|
|
24
26
|
onInteractOutside?: ((event: PointerDownOutsideEvent | FocusOutsideEvent) => any) | undefined;
|
|
25
27
|
onOpenAutoFocus?: ((event: Event) => any) | undefined;
|
|
26
|
-
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
27
|
-
onEntryFocus?: ((event: Event) => any) | undefined;
|
|
28
28
|
}>, {
|
|
29
29
|
prioritizePosition: boolean;
|
|
30
30
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
@@ -17,9 +17,9 @@ declare const __VLS_base: vue.DefineComponent<NavigationMenuRootProps, {}, {}, {
|
|
|
17
17
|
}>, {
|
|
18
18
|
orientation: DataOrientation;
|
|
19
19
|
dir: Direction;
|
|
20
|
+
unmountOnHide: boolean;
|
|
20
21
|
delayDuration: number;
|
|
21
22
|
skipDelayDuration: number;
|
|
22
|
-
unmountOnHide: boolean;
|
|
23
23
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
24
24
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
25
25
|
declare const _default: typeof __VLS_export;
|
|
@@ -9,19 +9,19 @@ type __VLS_Slots = {} & {
|
|
|
9
9
|
default?: (props: typeof __VLS_13) => any;
|
|
10
10
|
};
|
|
11
11
|
declare const __VLS_base: vue.DefineComponent<PopoverPositionerProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
12
|
+
closeAutoFocus: (event: Event) => any;
|
|
12
13
|
escapeKeyDown: (event: KeyboardEvent) => any;
|
|
13
14
|
pointerDownOutside: (event: PointerDownOutsideEvent) => any;
|
|
14
15
|
focusOutside: (event: FocusOutsideEvent) => any;
|
|
15
16
|
interactOutside: (event: PointerDownOutsideEvent | FocusOutsideEvent) => any;
|
|
16
17
|
openAutoFocus: (event: Event) => any;
|
|
17
|
-
closeAutoFocus: (event: Event) => any;
|
|
18
18
|
}, string, vue.PublicProps, Readonly<PopoverPositionerProps> & Readonly<{
|
|
19
|
+
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
19
20
|
onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
|
|
20
21
|
onPointerDownOutside?: ((event: PointerDownOutsideEvent) => any) | undefined;
|
|
21
22
|
onFocusOutside?: ((event: FocusOutsideEvent) => any) | undefined;
|
|
22
23
|
onInteractOutside?: ((event: PointerDownOutsideEvent | FocusOutsideEvent) => any) | undefined;
|
|
23
24
|
onOpenAutoFocus?: ((event: Event) => any) | undefined;
|
|
24
|
-
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
25
25
|
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
26
26
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
27
27
|
declare const _default: typeof __VLS_export;
|
|
@@ -15,8 +15,8 @@ declare const __VLS_base: vue.DefineComponent<PopoverRootProps, {}, {}, {}, {},
|
|
|
15
15
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
16
16
|
}>, {
|
|
17
17
|
open: boolean;
|
|
18
|
-
modal: boolean;
|
|
19
18
|
defaultOpen: boolean;
|
|
19
|
+
modal: boolean;
|
|
20
20
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
21
21
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
22
22
|
declare const _default: typeof __VLS_export;
|
|
@@ -147,7 +147,7 @@ declare const __VLS_base: vue.DefineComponent<PopperPositionerProps, {}, {}, {},
|
|
|
147
147
|
'aria-modal': boolean | "true" | "false";
|
|
148
148
|
'aria-multiline': boolean | "true" | "false";
|
|
149
149
|
'aria-multiselectable': boolean | "true" | "false";
|
|
150
|
-
'aria-orientation': "
|
|
150
|
+
'aria-orientation': "horizontal" | "vertical";
|
|
151
151
|
'aria-owns': string;
|
|
152
152
|
'aria-placeholder': string;
|
|
153
153
|
'aria-posinset': string | number;
|
|
@@ -171,8 +171,8 @@ declare const __VLS_base: vue.DefineComponent<PopperPositionerProps, {}, {}, {},
|
|
|
171
171
|
contextmenu: string;
|
|
172
172
|
dir: string;
|
|
173
173
|
draggable: boolean | "true" | "false";
|
|
174
|
-
enterkeyhint: "done" | "next" | "
|
|
175
|
-
enterKeyHint: "done" | "next" | "
|
|
174
|
+
enterkeyhint: "done" | "next" | "enter" | "go" | "previous" | "search" | "send";
|
|
175
|
+
enterKeyHint: "done" | "next" | "enter" | "go" | "previous" | "search" | "send";
|
|
176
176
|
hidden: "" | "hidden" | (boolean | "true" | "false") | "until-found";
|
|
177
177
|
inert: boolean | "true" | "false";
|
|
178
178
|
placeholder: string;
|
|
@@ -199,27 +199,27 @@ declare const __VLS_base: vue.DefineComponent<PopperPositionerProps, {}, {}, {},
|
|
|
199
199
|
results: string | number;
|
|
200
200
|
security: string;
|
|
201
201
|
unselectable: "off" | "on";
|
|
202
|
-
inputmode: "
|
|
202
|
+
inputmode: "none" | "text" | "search" | "tel" | "url" | "email" | "numeric" | "decimal";
|
|
203
203
|
is: string;
|
|
204
204
|
exportparts: string;
|
|
205
205
|
part: string;
|
|
206
|
-
side: _floating_ui_utils0.Side;
|
|
207
206
|
reference: _floating_ui_dom0.ReferenceElement;
|
|
208
|
-
sideOffset: number;
|
|
209
|
-
align: Align;
|
|
210
|
-
arrowPadding: number;
|
|
211
|
-
updatePositionStrategy: "optimized" | "always";
|
|
212
207
|
placement: Placement$1;
|
|
208
|
+
side: _floating_ui_utils0.Side;
|
|
209
|
+
sideOffset: number;
|
|
213
210
|
sideFlip: boolean;
|
|
211
|
+
align: Align;
|
|
214
212
|
alignOffset: number;
|
|
215
213
|
alignFlip: boolean;
|
|
216
214
|
avoidCollisions: boolean;
|
|
217
215
|
collisionBoundary: Element | null | Array<Element | null>;
|
|
218
216
|
collisionPadding: _floating_ui_utils0.Padding;
|
|
217
|
+
arrowPadding: number;
|
|
219
218
|
hideShiftedArrow: boolean;
|
|
220
219
|
sticky: "partial" | "always";
|
|
221
220
|
hideWhenDetached: boolean;
|
|
222
221
|
positionStrategy: "absolute" | "fixed";
|
|
222
|
+
updatePositionStrategy: "optimized" | "always";
|
|
223
223
|
disableUpdateOnLayoutShift: boolean;
|
|
224
224
|
prioritizePosition: boolean;
|
|
225
225
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
@@ -20,8 +20,8 @@ declare const __VLS_base: vue.DefineComponent<RovingFocusGroupProps, {
|
|
|
20
20
|
"onUpdate:currentTabStopId"?: ((value: string | null | undefined) => any) | undefined;
|
|
21
21
|
}>, {
|
|
22
22
|
orientation: DataOrientation;
|
|
23
|
-
preventScrollOnEntryFocus: boolean;
|
|
24
23
|
loop: boolean;
|
|
24
|
+
preventScrollOnEntryFocus: boolean;
|
|
25
25
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
26
26
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
27
27
|
declare const _default: typeof __VLS_export;
|
|
@@ -11,18 +11,18 @@ type __VLS_Slots = {} & {
|
|
|
11
11
|
default?: (props: typeof __VLS_22) => any;
|
|
12
12
|
};
|
|
13
13
|
declare const __VLS_base: vue.DefineComponent<SelectContentProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
14
|
+
closeAutoFocus: (event: Event) => any;
|
|
14
15
|
escapeKeyDown: (event: KeyboardEvent) => any;
|
|
15
16
|
pointerDownOutside: (event: PointerDownOutsideEvent) => any;
|
|
16
|
-
closeAutoFocus: (event: Event) => any;
|
|
17
17
|
}, string, vue.PublicProps, Readonly<SelectContentProps> & Readonly<{
|
|
18
|
+
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
18
19
|
onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
|
|
19
20
|
onPointerDownOutside?: ((event: PointerDownOutsideEvent) => any) | undefined;
|
|
20
|
-
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
21
21
|
}>, {
|
|
22
|
-
avoidCollisions: boolean;
|
|
23
|
-
prioritizePosition: boolean;
|
|
24
22
|
position: SelectPosition;
|
|
25
23
|
bodyLock: boolean;
|
|
24
|
+
avoidCollisions: boolean;
|
|
25
|
+
prioritizePosition: boolean;
|
|
26
26
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
27
27
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
28
28
|
declare const _default: typeof __VLS_export;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isNullish as e}from"../../shared/guard.js";import{isFormControl as t,transformPropsToContext as n}from"../../shared/vue.js";import"../../shared/index.js";import{useControllableState as r}from"../../composables/use-controllable-state.js";import{useSelection as i}from"../../composables/use-selection.js";import"../../composables/index.js";import a from"../popper/popper-root.js";import"../popper/index.js";import{provideCollectionContext as o,provideSelectRootContext as s}from"./context.js";import c from"./select-bubble-select.js";import{Fragment as l,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,defineComponent as m,mergeProps as h,openBlock as g,renderList as _,renderSlot as v,unref as y,withCtx as b}from"vue";const x={key:0,value:``},S=m({name:`SelectRoot`,inheritAttrs:!1,__name:`select-root`,props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},dir:{},autocomplete:{},disabled:{type:Boolean},modelValue:{default:void 0},defaultValue:{},multiple:{},name:{},required:{type:Boolean}},emits:[`update:modelValue`,`update:open`],setup(m,{emit:S}){let C=m,w=S,{modelValue:T,isMultiple:E,onModelValueChange:D,isEmptyModelValue:O}=i(C,e=>{w(`update:modelValue`,e)}),k=r(()=>C.open,e=>{w(`update:open`,e)},C.defaultOpen),{triggerElement:A,options:j,nativeSelectKey:M}=s({...n(C,[`dir`,`autocomplete`,`disabled`,`required`]),open:k,modelValue:T,onModelValueChange:D,isMultiple:E,isEmptyModelValue:O});o();let N=u(()=>t(A.value));return(t,n)=>(g(),d(y(a),null,{default:b(()=>[v(t.$slots,`default`,{modelValue:y(T),open:!!y(k)}),N.value?(g(),d(c,{key:y(M),"aria-hidden":`true`,tabindex:`-1`,multiple:m.multiple,required:m.required,name:m.name,autocomplete:m.autocomplete,disabled:m.disabled,value:y(T)},{default:b(()=>[y(e)(y(T))?(g(),p(`option`,x)):f(`v-if`,!0),(g(!0),p(l,null,_(y(j),e=>(g(),p(`option`,h({key:e.value??``},{ref_for:!0},e),null,16))),128))]),_:1},8,[`multiple`,`required`,`name`,`autocomplete`,`disabled`,`value`])):f(`v-if`,!0)]),_:3}))}});export{S as default};
|
|
1
|
+
import{isNullish as e}from"../../shared/guard.js";import{isFormControl as t,transformPropsToContext as n}from"../../shared/vue.js";import"../../shared/index.js";import{useControllableState as r}from"../../composables/use-controllable-state.js";import{useSelection as i}from"../../composables/use-selection.js";import"../../composables/index.js";import a from"../popper/popper-root.js";import"../popper/index.js";import{provideCollectionContext as o,provideSelectRootContext as s}from"./context.js";import c from"./select-bubble-select.js";import{Fragment as l,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,defineComponent as m,mergeProps as h,openBlock as g,renderList as _,renderSlot as v,unref as y,withCtx as b}from"vue";const x={key:0,value:``},S=m({name:`SelectRoot`,inheritAttrs:!1,__name:`select-root`,props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},dir:{},autocomplete:{},disabled:{type:Boolean},modelValue:{default:void 0},defaultValue:{},multiple:{},singleClearable:{type:Boolean},name:{},required:{type:Boolean}},emits:[`update:modelValue`,`update:open`],setup(m,{emit:S}){let C=m,w=S,{modelValue:T,isMultiple:E,onModelValueChange:D,isEmptyModelValue:O}=i(C,e=>{w(`update:modelValue`,e)}),k=r(()=>C.open,e=>{w(`update:open`,e)},C.defaultOpen),{triggerElement:A,options:j,nativeSelectKey:M}=s({...n(C,[`dir`,`autocomplete`,`disabled`,`required`,`singleClearable`]),open:k,modelValue:T,onModelValueChange:D,isMultiple:E,isEmptyModelValue:O});o();let N=u(()=>t(A.value));return(t,n)=>(g(),d(y(a),null,{default:b(()=>[v(t.$slots,`default`,{modelValue:y(T),open:!!y(k)}),N.value?(g(),d(c,{key:y(M),"aria-hidden":`true`,tabindex:`-1`,multiple:m.multiple,required:m.required,name:m.name,autocomplete:m.autocomplete,disabled:m.disabled,value:y(T)},{default:b(()=>[y(e)(y(T))?(g(),p(`option`,x)):f(`v-if`,!0),(g(!0),p(l,null,_(y(j),e=>(g(),p(`option`,h({key:e.value??``},{ref_for:!0},e),null,16))),128))]),_:1},8,[`multiple`,`required`,`name`,`autocomplete`,`disabled`,`value`])):f(`v-if`,!0)]),_:3}))}});export{S as default};
|
|
@@ -19,8 +19,8 @@ declare const __VLS_base: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.C
|
|
|
19
19
|
orientation: DataOrientation;
|
|
20
20
|
modelValue: DefinedValue | null;
|
|
21
21
|
loop: boolean;
|
|
22
|
-
unmountOnHide: boolean;
|
|
23
22
|
activationMode: TabsActivationMode;
|
|
23
|
+
unmountOnHide: boolean;
|
|
24
24
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
25
25
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
26
26
|
declare const _default: typeof __VLS_export;
|
|
@@ -11,8 +11,8 @@ type __VLS_Slots = {} & {
|
|
|
11
11
|
default?: (props: typeof __VLS_18) => any;
|
|
12
12
|
};
|
|
13
13
|
declare const __VLS_base: vue.DefineComponent<TabsTriggerProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<TabsTriggerProps> & Readonly<{}>, {
|
|
14
|
-
as: AsTag | vue.Component;
|
|
15
14
|
disabled: boolean;
|
|
15
|
+
as: AsTag | vue.Component;
|
|
16
16
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
17
17
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
18
|
declare const _default: typeof __VLS_export;
|
|
@@ -14,26 +14,26 @@ type __VLS_Slots = {} & {
|
|
|
14
14
|
default?: (props: typeof __VLS_23) => any;
|
|
15
15
|
};
|
|
16
16
|
declare const __VLS_base: vue.DefineComponent<ToastRootProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
17
|
+
pause: () => any;
|
|
17
18
|
"update:open": (value: boolean) => any;
|
|
18
19
|
escapeKeyDown: (event: KeyboardEvent) => any;
|
|
19
|
-
pause: () => any;
|
|
20
20
|
resume: () => any;
|
|
21
21
|
swipeStart: (event: SwipeEvent) => any;
|
|
22
22
|
swipeMove: (event: SwipeEvent) => any;
|
|
23
23
|
swipeCancel: (event: SwipeEvent) => any;
|
|
24
24
|
swipeEnd: (event: SwipeEvent) => any;
|
|
25
25
|
}, string, vue.PublicProps, Readonly<ToastRootProps> & Readonly<{
|
|
26
|
+
onPause?: (() => any) | undefined;
|
|
26
27
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
27
28
|
onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
|
|
28
|
-
onPause?: (() => any) | undefined;
|
|
29
29
|
onResume?: (() => any) | undefined;
|
|
30
30
|
onSwipeStart?: ((event: SwipeEvent) => any) | undefined;
|
|
31
31
|
onSwipeMove?: ((event: SwipeEvent) => any) | undefined;
|
|
32
32
|
onSwipeCancel?: ((event: SwipeEvent) => any) | undefined;
|
|
33
33
|
onSwipeEnd?: ((event: SwipeEvent) => any) | undefined;
|
|
34
34
|
}>, {
|
|
35
|
-
open: boolean;
|
|
36
35
|
as: AsTag | vue.Component;
|
|
36
|
+
open: boolean;
|
|
37
37
|
defaultOpen: boolean;
|
|
38
38
|
liveType: ToastLiveType;
|
|
39
39
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
@@ -16,8 +16,8 @@ declare const __VLS_base: vue.DefineComponent<TreeMenuRootProps, {}, {}, {}, {},
|
|
|
16
16
|
"onUpdate:collapsed"?: ((value: boolean) => any) | undefined;
|
|
17
17
|
}>, {
|
|
18
18
|
defaultValue: string;
|
|
19
|
-
collapsed: boolean;
|
|
20
19
|
defaultExpanded: string[];
|
|
20
|
+
collapsed: boolean;
|
|
21
21
|
defaultCollapsed: boolean;
|
|
22
22
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
23
23
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -24,7 +24,7 @@ interface UseDismissableLayerOptions extends EmitsToHookProps<DismissableLayerEm
|
|
|
24
24
|
* @returns Properties and handlers for the dismissable layer
|
|
25
25
|
*/
|
|
26
26
|
declare function useDismissableLayer(layerElement: ShallowRef<HTMLElement | undefined>, options?: UseDismissableLayerOptions): {
|
|
27
|
-
pointerEvents: vue.ComputedRef<"
|
|
27
|
+
pointerEvents: vue.ComputedRef<"none" | "auto" | undefined>;
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
30
|
* Composable for creating dismissable layer branches that don't trigger dismissal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isNullish as e}from"../shared/guard.js";import"../shared/index.js";import{useControllableState as t}from"./use-controllable-state.js";import{computed as n,toValue as r}from"vue";function i(i,a){let o=n(()=>r(i)),s=n(()=>!!o.value.multiple||o.value.multiple===``),c=t(()=>o.value.modelValue,e=>{a(e)},
|
|
1
|
+
import{isNullish as e}from"../shared/guard.js";import"../shared/index.js";import{useControllableState as t}from"./use-controllable-state.js";import{computed as n,toValue as r}from"vue";function i(i,a){let o=n(()=>r(i)),s=n(()=>!!o.value.multiple||o.value.multiple===``),c=n(()=>o.value.singleClearable??!0),l=t(()=>o.value.modelValue,e=>{a(e)},u());function u(){return e(o.value.defaultValue)?s.value?[]:void 0:o.value.defaultValue}return{modelValue:l,onModelValueChange:e=>{if(!s.value){let t=l.value===e?void 0:e;if(t===void 0&&!c.value)return;l.value=t,t===void 0&&a(t);return}let t=[...l.value??[]];t=t.includes(e)?t.filter(t=>t!==e):[...t,e],l.value=t},setModelValue:e=>{if(s.value&&Array.isArray(e)){l.value=e;return}!s.value&&!Array.isArray(e)&&(l.value=e)},resetModelValue:()=>{l.value=s.value?[]:void 0},isValueSelected:e=>s.value&&Array.isArray(l.value)?l.value.includes(e):l.value===e,isMultiple:s,isEmptyModelValue:n(()=>s.value&&Array.isArray(l.value)?l.value?.length===0:e(l.value))}}export{i as useSelection};
|