@soybeanjs/headless 0.28.2 → 0.29.0-beta.1
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/alert/alert-compact.vue.d.ts +2 -2
- package/dist/components/autocomplete/autocomplete-compact.vue.d.ts +2 -2
- package/dist/components/autocomplete/autocomplete-input.js +1 -1
- package/dist/components/autocomplete/autocomplete-input.vue.d.ts +2 -2
- package/dist/components/autocomplete/autocomplete-root.vue.d.ts +3 -3
- package/dist/components/backtop/backtop.vue.d.ts +2 -2
- package/dist/components/bottom-sheet/bottom-sheet-popup.vue.d.ts +2 -2
- package/dist/components/bottom-sheet/bottom-sheet-root-nested.vue.d.ts +4 -4
- package/dist/components/calendar/calendar-root.js +1 -1
- package/dist/components/checkbox/checkbox-control.vue.d.ts +2 -2
- package/dist/components/clipboard/clipboard.vue.d.ts +4 -4
- package/dist/components/collapsible/collapsible-root.vue.d.ts +1 -1
- package/dist/components/color-area/color-area-area.vue.d.ts +2 -2
- package/dist/components/color-area/color-area-compact.vue.d.ts +2 -2
- package/dist/components/color-area/color-area-root.vue.d.ts +3 -3
- package/dist/components/color-field/color-field-root.vue.d.ts +2 -2
- package/dist/components/color-picker/color-picker-compact.vue.d.ts +3 -3
- package/dist/components/color-picker/color-picker-root.vue.d.ts +3 -3
- package/dist/components/color-slider/color-slider-compact.vue.d.ts +2 -2
- package/dist/components/color-slider/color-slider-root.vue.d.ts +4 -4
- package/dist/components/color-swatch-picker/color-swatch-picker-compact.vue.d.ts +2 -2
- package/dist/components/color-swatch-picker/color-swatch-picker-root.vue.d.ts +2 -2
- package/dist/components/combobox/combobox-compact.vue.d.ts +2 -2
- package/dist/components/combobox/combobox-root.vue.d.ts +2 -2
- package/dist/components/command/command-compact.vue.d.ts +2 -2
- package/dist/components/context-menu/context-menu-checkbox-compact.vue.d.ts +2 -2
- package/dist/components/context-menu/context-menu-content.vue.d.ts +2 -2
- package/dist/components/context-menu/context-menu-radio-compact.vue.d.ts +2 -2
- package/dist/components/context-menu/context-menu-trigger.vue.d.ts +2 -2
- package/dist/components/date-field/date-field-root.vue.d.ts +2 -2
- package/dist/components/date-picker/date-picker-compact.js +1 -1
- package/dist/components/date-picker/date-picker-compact.vue.d.ts +5 -5
- package/dist/components/date-range-field/date-range-field-root.vue.d.ts +2 -2
- package/dist/components/date-range-picker/date-range-picker-compact.vue.d.ts +5 -5
- package/dist/components/dialog/dialog-compact.vue.d.ts +5 -5
- package/dist/components/dialog/dialog-popup.vue.d.ts +2 -2
- package/dist/components/dialog/dialog-provider.vue.d.ts +2 -2
- package/dist/components/dropdown-menu/dropdown-menu-checkbox-compact.vue.d.ts +2 -2
- package/dist/components/dropdown-menu/dropdown-menu-content.vue.d.ts +2 -2
- package/dist/components/dropdown-menu/dropdown-menu-radio-compact.vue.d.ts +2 -2
- package/dist/components/dropdown-menu/dropdown-menu-root.vue.d.ts +1 -1
- package/dist/components/editable/editable-compact.vue.d.ts +2 -2
- package/dist/components/editable/editable-input.vue.d.ts +2 -2
- package/dist/components/editable/editable-preview.vue.d.ts +2 -2
- package/dist/components/editable/editable-root.vue.d.ts +4 -4
- package/dist/components/hover-card/hover-card-popup.vue.d.ts +2 -2
- package/dist/components/hover-card/hover-card-trigger.vue.d.ts +2 -2
- package/dist/components/input-number/input-number-root.vue.d.ts +1 -1
- package/dist/components/input-otp/input-otp-compact.vue.d.ts +4 -4
- package/dist/components/input-otp/input-otp-root.vue.d.ts +5 -5
- package/dist/components/listbox/listbox-filter.js +1 -1
- package/dist/components/listbox/listbox-filter.vue.d.ts +2 -2
- package/dist/components/listbox/listbox-item.vue.d.ts +2 -2
- package/dist/components/listbox/listbox-root.vue.d.ts +2 -2
- package/dist/components/menu/menu-checkbox-item.vue.d.ts +2 -2
- package/dist/components/menu/menu-item.vue.d.ts +2 -2
- package/dist/components/menu/menu-radio-item.vue.d.ts +2 -2
- package/dist/components/menu/menu-sub-content.vue.d.ts +2 -2
- package/dist/components/menu/menu-sub-trigger.vue.d.ts +2 -2
- package/dist/components/menubar/menubar-compact.vue.d.ts +2 -2
- package/dist/components/menubar/menubar-content.vue.d.ts +2 -2
- package/dist/components/menubar/menubar-root.vue.d.ts +1 -1
- package/dist/components/menubar/menubar-trigger.vue.d.ts +2 -2
- package/dist/components/navigation-menu/navigation-menu-content.vue.d.ts +2 -2
- package/dist/components/navigation-menu/navigation-menu-root.vue.d.ts +1 -1
- package/dist/components/navigation-menu/navigation-menu-trigger.vue.d.ts +2 -2
- package/dist/components/page-tabs/page-tabs-compact.vue.d.ts +1 -1
- package/dist/components/page-tabs/page-tabs-item.js +1 -1
- package/dist/components/page-tabs/page-tabs-item.vue.d.ts +2 -2
- package/dist/components/page-tabs/page-tabs-root.vue.d.ts +1 -1
- package/dist/components/popconfirm/popconfirm-compact.vue.d.ts +2 -2
- package/dist/components/popover/popover-positioner.vue.d.ts +2 -2
- package/dist/components/radio-group/radio-group-control.vue.d.ts +2 -2
- package/dist/components/scroll-area/scroll-area-root.vue.d.ts +2 -2
- package/dist/components/scroll-area/scroll-area-thumb.vue.d.ts +2 -2
- package/dist/components/select/select-compact.vue.d.ts +2 -2
- package/dist/components/select/select-item.vue.d.ts +2 -2
- package/dist/components/select/select-root.vue.d.ts +2 -2
- package/dist/components/select/select-trigger.vue.d.ts +2 -2
- package/dist/components/slider/slider-root.vue.d.ts +2 -2
- package/dist/components/slider/slider-thumb.vue.d.ts +2 -2
- package/dist/components/splitter/splitter-panel.vue.d.ts +2 -2
- package/dist/components/splitter/splitter-resize-handle.vue.d.ts +2 -2
- package/dist/components/stepper/stepper-root.vue.d.ts +1 -1
- package/dist/components/stepper/stepper-trigger.vue.d.ts +2 -2
- package/dist/components/switch/switch-control.vue.d.ts +2 -2
- package/dist/components/tabs/tabs-root.vue.d.ts +1 -1
- package/dist/components/tabs/tabs-trigger.vue.d.ts +2 -2
- package/dist/components/tags-input/tags-input-compact.vue.d.ts +2 -2
- package/dist/components/tags-input/tags-input-root.vue.d.ts +3 -3
- package/dist/components/time-field/time-field-root.vue.d.ts +2 -2
- package/dist/components/time-range-field/time-range-field-root.vue.d.ts +3 -3
- package/dist/components/toast/toaster.vue.d.ts +2 -2
- package/dist/components/toggle/toggle.vue.d.ts +1 -1
- package/dist/components/tree/tree-item.js +1 -1
- package/dist/components/tree/tree-item.vue.d.ts +2 -2
- package/dist/components/tree/tree-root.js +1 -1
- package/dist/components/tree-menu/tree-menu-compact.vue.d.ts +2 -2
- package/dist/components/tree-menu/tree-menu-root.vue.d.ts +1 -1
- package/dist/components/visually-hidden/visually-hidden-input.vue.d.ts +1 -1
- package/dist/shared/env.d.ts +1 -2
- package/dist/shared/env.js +1 -1
- package/dist/shared/index.d.ts +2 -2
- package/dist/shared/index.js +1 -1
- package/package.json +8 -8
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { MenubarTriggerProps } from "./types.js";
|
|
2
2
|
|
|
3
3
|
//#region src/components/menubar/menubar-trigger.vue.d.ts
|
|
4
|
-
declare var
|
|
4
|
+
declare var __VLS_22: {};
|
|
5
5
|
type __VLS_Slots = {} & {
|
|
6
|
-
default?: (props: typeof
|
|
6
|
+
default?: (props: typeof __VLS_22) => any;
|
|
7
7
|
};
|
|
8
8
|
declare const __VLS_base: import("vue").DefineComponent<MenubarTriggerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MenubarTriggerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
9
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { FocusOutsideEvent, PointerDownOutsideEvent } from "../../types/event.js";
|
|
2
2
|
import { NavigationMenuContentProps } from "./types.js";
|
|
3
3
|
//#region src/components/navigation-menu/navigation-menu-content.vue.d.ts
|
|
4
|
-
declare var
|
|
4
|
+
declare var __VLS_16: {};
|
|
5
5
|
type __VLS_Slots = {} & {
|
|
6
|
-
default?: (props: typeof
|
|
6
|
+
default?: (props: typeof __VLS_16) => any;
|
|
7
7
|
};
|
|
8
8
|
declare const __VLS_base: import("vue").DefineComponent<NavigationMenuContentProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
9
|
escapeKeyDown: (event: KeyboardEvent) => any;
|
|
@@ -13,9 +13,9 @@ declare const __VLS_base: import("vue").DefineComponent<NavigationMenuRootProps,
|
|
|
13
13
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
14
14
|
}>, {
|
|
15
15
|
orientation: DataOrientation;
|
|
16
|
+
unmountOnHide: boolean;
|
|
16
17
|
delayDuration: number;
|
|
17
18
|
skipDelayDuration: number;
|
|
18
|
-
unmountOnHide: boolean;
|
|
19
19
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
20
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
21
21
|
declare const _default: typeof __VLS_export;
|
|
@@ -2,9 +2,9 @@ import { AsTag } from "../primitive/types.js";
|
|
|
2
2
|
import { NavigationMenuTriggerProps } from "./types.js";
|
|
3
3
|
|
|
4
4
|
//#region src/components/navigation-menu/navigation-menu-trigger.vue.d.ts
|
|
5
|
-
declare var
|
|
5
|
+
declare var __VLS_9: {};
|
|
6
6
|
type __VLS_Slots = {} & {
|
|
7
|
-
default?: (props: typeof
|
|
7
|
+
default?: (props: typeof __VLS_9) => any;
|
|
8
8
|
};
|
|
9
9
|
declare const __VLS_base: import("vue").DefineComponent<NavigationMenuTriggerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NavigationMenuTriggerProps> & Readonly<{}>, {
|
|
10
10
|
as: AsTag | import("vue").Component;
|
|
@@ -4,9 +4,9 @@ import { PageTabsCompactEmits, PageTabsCompactProps, PageTabsCompactSlots, PageT
|
|
|
4
4
|
declare const __VLS_export: <T extends PageTabsOptionData = PageTabsOptionData>(__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<{
|
|
5
5
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<PageTabsCompactProps<T> & {
|
|
6
6
|
onContextmenu?: ((tab: T) => any) | undefined;
|
|
7
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
7
8
|
onClick?: ((tab: T) => any) | undefined;
|
|
8
9
|
onClose?: ((tab: T) => any) | undefined;
|
|
9
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
10
10
|
onPin?: ((tab: T) => any) | undefined;
|
|
11
11
|
"onUpdate:items"?: ((items: T[]) => any) | undefined;
|
|
12
12
|
onSelectContextMenu?: ((menu: PageTabsContextMenuOptionData, tab: T) => any) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{transformPropsToContext as e}from"../../shared/vue.js";import"../../shared/index.js";import t from"../roving-focus/roving-focus-item.js";import{providePageTabsItemContext as n,usePageTabsRootContext as r,usePageTabsUi as i}from"./context.js";import{computed as a,createBlock as o,defineComponent as s,normalizeClass as c,openBlock as l,renderSlot as u,unref as d,withCtx as f,withKeys as p}from"vue";const m=s({name:`PageTabsItem`,__name:`page-tabs-item`,props:{value:{},pinned:{type:Boolean}},emits:[`click`,`close`,`pin`],setup(s,{emit:m}){let h=s,g=m,_=i(`item`),{middleClickClose:v,modelValue:y}=r(`PageTabsItem`),b=a(()=>h.value===y.value),x=a(()=>!h.pinned),S=()=>{b.value||(y.value=h.value,g(`click`))},C=async()=>{x.value&&g(`close`)},w=e=>{e.button===1&&v.value&&(e.preventDefault(),C())},
|
|
1
|
+
import{transformPropsToContext as e}from"../../shared/vue.js";import"../../shared/index.js";import t from"../roving-focus/roving-focus-item.js";import{providePageTabsItemContext as n,usePageTabsRootContext as r,usePageTabsUi as i}from"./context.js";import{computed as a,createBlock as o,defineComponent as s,normalizeClass as c,openBlock as l,renderSlot as u,unref as d,withCtx as f,withKeys as p}from"vue";const m=s({name:`PageTabsItem`,__name:`page-tabs-item`,props:{value:{},pinned:{type:Boolean}},emits:[`click`,`close`,`pin`],setup(s,{emit:m}){let h=s,g=m,_=i(`item`),{middleClickClose:v,modelValue:y}=r(`PageTabsItem`),b=a(()=>h.value===y.value),x=a(()=>!h.pinned),S=()=>{b.value||(y.value=h.value,g(`click`))},C=async()=>{x.value&&g(`close`)},w=e=>{if(e.key===`Enter`){S();return}e.key===`Backspace`&&C()},T=e=>{e.button===1&&v.value&&(e.preventDefault(),C())},E=()=>{g(`pin`,!h.pinned)};return n({...e(h,[`pinned`]),closable:x,onClose:C,onPin:E}),(e,n)=>(l(),o(t,{class:c(d(_)),"data-soybean-page-tabs-item":``,"data-value":s.value,"data-active":b.value,"data-pinned":s.pinned,active:b.value,focusable:!0,onClick:S,onMousedown:T,onKeydown:p(w,[`enter`,`backspace`])},{default:f(()=>[u(e.$slots,`default`)]),_:3},8,[`class`,`data-value`,`data-active`,`data-pinned`,`active`]))}});export{m as default};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { PageTabsItemProps } from "./types.js";
|
|
2
2
|
|
|
3
3
|
//#region src/components/page-tabs/page-tabs-item.vue.d.ts
|
|
4
|
-
declare var
|
|
4
|
+
declare var __VLS_10: {};
|
|
5
5
|
type __VLS_Slots = {} & {
|
|
6
|
-
default?: (props: typeof
|
|
6
|
+
default?: (props: typeof __VLS_10) => any;
|
|
7
7
|
};
|
|
8
8
|
declare const __VLS_base: import("vue").DefineComponent<PageTabsItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
9
9
|
click: () => any;
|
|
@@ -10,8 +10,8 @@ declare const __VLS_base: import("vue").DefineComponent<PageTabsRootProps, {}, {
|
|
|
10
10
|
}, string, import("vue").PublicProps, Readonly<PageTabsRootProps> & Readonly<{
|
|
11
11
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
12
12
|
}>, {
|
|
13
|
-
modelValue: string;
|
|
14
13
|
loop: boolean;
|
|
14
|
+
modelValue: string;
|
|
15
15
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
16
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
17
17
|
declare const _default: typeof __VLS_export;
|
|
@@ -3,8 +3,8 @@ import { PopconfirmCompactProps, PopconfirmCompactSlots } from "./types.js";
|
|
|
3
3
|
//#region src/components/popconfirm/popconfirm-compact.vue.d.ts
|
|
4
4
|
type __VLS_Slots = PopconfirmCompactSlots;
|
|
5
5
|
declare const __VLS_base: import("vue").DefineComponent<PopconfirmCompactProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
-
"update:open": (value: boolean) => any;
|
|
7
6
|
cancel: (event: PointerEvent) => any;
|
|
7
|
+
"update:open": (value: boolean) => any;
|
|
8
8
|
escapeKeyDown: (event: KeyboardEvent) => any;
|
|
9
9
|
pointerDownOutside: (event: PointerDownOutsideEvent) => any;
|
|
10
10
|
focusOutside: (event: FocusOutsideEvent) => any;
|
|
@@ -13,8 +13,8 @@ declare const __VLS_base: import("vue").DefineComponent<PopconfirmCompactProps,
|
|
|
13
13
|
closeAutoFocus: (event: Event) => any;
|
|
14
14
|
confirm: (event: PointerEvent) => any;
|
|
15
15
|
}, string, import("vue").PublicProps, Readonly<PopconfirmCompactProps> & Readonly<{
|
|
16
|
-
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
17
16
|
onCancel?: ((event: PointerEvent) => any) | undefined;
|
|
17
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
18
18
|
onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
|
|
19
19
|
onPointerDownOutside?: ((event: PointerDownOutsideEvent) => any) | undefined;
|
|
20
20
|
onFocusOutside?: ((event: FocusOutsideEvent) => any) | undefined;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { FocusOutsideEvent, PointerDownOutsideEvent } from "../../types/event.js";
|
|
2
2
|
import { PopoverPositionerProps } from "./types.js";
|
|
3
3
|
//#region src/components/popover/popover-positioner.vue.d.ts
|
|
4
|
-
declare var
|
|
4
|
+
declare var __VLS_10: {};
|
|
5
5
|
type __VLS_Slots = {} & {
|
|
6
|
-
default?: (props: typeof
|
|
6
|
+
default?: (props: typeof __VLS_10) => any;
|
|
7
7
|
};
|
|
8
8
|
declare const __VLS_base: import("vue").DefineComponent<PopoverPositionerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
9
|
escapeKeyDown: (event: KeyboardEvent) => any;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { RadioGroupControlProps } from "./types.js";
|
|
2
2
|
|
|
3
3
|
//#region src/components/radio-group/radio-group-control.vue.d.ts
|
|
4
|
-
declare var
|
|
4
|
+
declare var __VLS_18: {
|
|
5
5
|
checked: boolean;
|
|
6
6
|
required: boolean | undefined;
|
|
7
7
|
disabled: boolean | undefined;
|
|
8
8
|
};
|
|
9
9
|
type __VLS_Slots = {} & {
|
|
10
|
-
default?: (props: typeof
|
|
10
|
+
default?: (props: typeof __VLS_18) => any;
|
|
11
11
|
};
|
|
12
12
|
declare const __VLS_base: import("vue").DefineComponent<RadioGroupControlProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<RadioGroupControlProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
13
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ScrollAreaRootProps, ScrollAreaType } from "./types.js";
|
|
2
2
|
|
|
3
3
|
//#region src/components/scroll-area/scroll-area-root.vue.d.ts
|
|
4
|
-
declare var
|
|
4
|
+
declare var __VLS_10: {};
|
|
5
5
|
type __VLS_Slots = {} & {
|
|
6
|
-
default?: (props: typeof
|
|
6
|
+
default?: (props: typeof __VLS_10) => any;
|
|
7
7
|
};
|
|
8
8
|
declare const __VLS_base: import("vue").DefineComponent<ScrollAreaRootProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ScrollAreaRootProps> & Readonly<{}>, {
|
|
9
9
|
type: ScrollAreaType;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ScrollAreaThumbProps } from "./types.js";
|
|
2
2
|
|
|
3
3
|
//#region src/components/scroll-area/scroll-area-thumb.vue.d.ts
|
|
4
|
-
declare var
|
|
4
|
+
declare var __VLS_10: {};
|
|
5
5
|
type __VLS_Slots = {} & {
|
|
6
|
-
default?: (props: typeof
|
|
6
|
+
default?: (props: typeof __VLS_10) => any;
|
|
7
7
|
};
|
|
8
8
|
declare const __VLS_base: import("vue").DefineComponent<ScrollAreaThumbProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ScrollAreaThumbProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
9
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -5,8 +5,8 @@ import { SelectCompactProps, SelectCompactSlots, SelectItemEvent } from "./types
|
|
|
5
5
|
declare const __VLS_export: <T extends DefinedValue = DefinedValue, M extends boolean = false>(__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<{
|
|
6
6
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<SelectCompactProps<T, M> & {
|
|
7
7
|
onSelect?: ((event: SelectItemEvent<T>) => any) | undefined;
|
|
8
|
-
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
9
8
|
"onUpdate:modelValue"?: ((value: M extends true ? T[] : T) => any) | undefined;
|
|
9
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
10
10
|
onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
|
|
11
11
|
onPointerDownOutside?: ((event: PointerDownOutsideEvent) => any) | undefined;
|
|
12
12
|
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
@@ -16,7 +16,7 @@ declare const __VLS_export: <T extends DefinedValue = DefinedValue, M extends bo
|
|
|
16
16
|
expose: (exposed: {}) => void;
|
|
17
17
|
attrs: any;
|
|
18
18
|
slots: SelectCompactSlots<T, M>;
|
|
19
|
-
emit: ((evt: "select", event: SelectItemEvent<T>) => void) & ((evt: "update:
|
|
19
|
+
emit: ((evt: "select", event: SelectItemEvent<T>) => void) & ((evt: "update:modelValue", value: M extends true ? T[] : T) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "escapeKeyDown", event: KeyboardEvent) => void) & ((evt: "pointerDownOutside", event: PointerDownOutsideEvent) => void) & ((evt: "closeAutoFocus", event: Event) => void);
|
|
20
20
|
}>) => import("vue").VNode & {
|
|
21
21
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
22
22
|
};
|
|
@@ -2,9 +2,9 @@ import { DefinedValue } from "../../types/common.js";
|
|
|
2
2
|
import { SelectItemEvent, SelectItemProps } from "./types.js";
|
|
3
3
|
|
|
4
4
|
//#region src/components/select/select-item.vue.d.ts
|
|
5
|
-
declare var
|
|
5
|
+
declare var __VLS_10: {};
|
|
6
6
|
type __VLS_Slots = {} & {
|
|
7
|
-
default?: (props: typeof
|
|
7
|
+
default?: (props: typeof __VLS_10) => any;
|
|
8
8
|
};
|
|
9
9
|
declare const __VLS_base: import("vue").DefineComponent<SelectItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
10
|
select: (event: SelectItemEvent<DefinedValue>) => any;
|
|
@@ -4,8 +4,8 @@ import { SelectRootProps } from "./types.js";
|
|
|
4
4
|
//#region src/components/select/select-root.vue.d.ts
|
|
5
5
|
declare const __VLS_export: <T extends DefinedValue, M extends boolean = false>(__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<{
|
|
6
6
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<SelectRootProps<T, M> & {
|
|
7
|
-
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
8
7
|
"onUpdate:modelValue"?: ((value: M extends true ? T[] : T) => any) | undefined;
|
|
8
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
9
9
|
}> & (typeof globalThis extends {
|
|
10
10
|
__VLS_PROPS_FALLBACK: infer P;
|
|
11
11
|
} ? P : {});
|
|
@@ -17,7 +17,7 @@ declare const __VLS_export: <T extends DefinedValue, M extends boolean = false>(
|
|
|
17
17
|
open: boolean;
|
|
18
18
|
}) => any;
|
|
19
19
|
};
|
|
20
|
-
emit: ((evt: "update:
|
|
20
|
+
emit: ((evt: "update:modelValue", value: M extends true ? T[] : T) => void) & ((evt: "update:open", value: boolean) => void);
|
|
21
21
|
}>) => import("vue").VNode & {
|
|
22
22
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
23
23
|
};
|
|
@@ -2,9 +2,9 @@ import { AsTag } from "../primitive/types.js";
|
|
|
2
2
|
import { SelectTriggerProps } from "./types.js";
|
|
3
3
|
|
|
4
4
|
//#region src/components/select/select-trigger.vue.d.ts
|
|
5
|
-
declare var
|
|
5
|
+
declare var __VLS_16: {};
|
|
6
6
|
type __VLS_Slots = {} & {
|
|
7
|
-
default?: (props: typeof
|
|
7
|
+
default?: (props: typeof __VLS_16) => any;
|
|
8
8
|
};
|
|
9
9
|
declare const __VLS_base: import("vue").DefineComponent<SelectTriggerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SelectTriggerProps> & Readonly<{}>, {
|
|
10
10
|
as: AsTag | import("vue").Component;
|
|
@@ -19,9 +19,9 @@ declare const __VLS_base: import("vue").DefineComponent<SliderRootProps, {}, {},
|
|
|
19
19
|
max: number;
|
|
20
20
|
min: number;
|
|
21
21
|
orientation: DataOrientation;
|
|
22
|
-
step: number;
|
|
23
|
-
defaultValue: number[];
|
|
24
22
|
modelValue: number[];
|
|
23
|
+
defaultValue: number[];
|
|
24
|
+
step: number;
|
|
25
25
|
inverted: boolean;
|
|
26
26
|
minStepsBetweenThumbs: number;
|
|
27
27
|
thumbAlignment: SliderThumbAlignment;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { SliderThumbProps } from "./types.js";
|
|
2
2
|
|
|
3
3
|
//#region src/components/slider/slider-thumb.vue.d.ts
|
|
4
|
-
declare var
|
|
4
|
+
declare var __VLS_10: {};
|
|
5
5
|
type __VLS_Slots = {} & {
|
|
6
|
-
default?: (props: typeof
|
|
6
|
+
default?: (props: typeof __VLS_10) => any;
|
|
7
7
|
};
|
|
8
8
|
declare const __VLS_base: import("vue").DefineComponent<SliderThumbProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SliderThumbProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
9
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -33,9 +33,9 @@ declare const __VLS_base: import("vue").DefineComponent<SplitterPanelProps, {
|
|
|
33
33
|
collapsible: boolean;
|
|
34
34
|
order: number;
|
|
35
35
|
defaultSize: number;
|
|
36
|
-
minSize: number;
|
|
37
|
-
maxSize: number;
|
|
38
36
|
collapsedSize: number;
|
|
37
|
+
maxSize: number;
|
|
38
|
+
minSize: number;
|
|
39
39
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
40
40
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
41
41
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { SplitterResizeHandleProps } from "./types.js";
|
|
2
2
|
|
|
3
3
|
//#region src/components/splitter/splitter-resize-handle.vue.d.ts
|
|
4
|
-
declare var
|
|
4
|
+
declare var __VLS_10: {
|
|
5
5
|
active: boolean;
|
|
6
6
|
focused: boolean;
|
|
7
7
|
};
|
|
8
8
|
type __VLS_Slots = {} & {
|
|
9
|
-
default?: (props: typeof
|
|
9
|
+
default?: (props: typeof __VLS_10) => any;
|
|
10
10
|
};
|
|
11
11
|
declare const __VLS_base: import("vue").DefineComponent<SplitterResizeHandleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
12
|
dragging: (value: boolean) => any;
|
|
@@ -37,8 +37,8 @@ declare const __VLS_base: import("vue").DefineComponent<StepperRootProps, {
|
|
|
37
37
|
"onUpdate:modelValue"?: ((payload: number) => any) | undefined;
|
|
38
38
|
}>, {
|
|
39
39
|
orientation: DataOrientation;
|
|
40
|
-
defaultValue: number;
|
|
41
40
|
modelValue: number;
|
|
41
|
+
defaultValue: number;
|
|
42
42
|
linear: boolean;
|
|
43
43
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
44
44
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -2,9 +2,9 @@ import { AsTag } from "../primitive/types.js";
|
|
|
2
2
|
import { StepperTriggerProps } from "./types.js";
|
|
3
3
|
|
|
4
4
|
//#region src/components/stepper/stepper-trigger.vue.d.ts
|
|
5
|
-
declare var
|
|
5
|
+
declare var __VLS_10: {};
|
|
6
6
|
type __VLS_Slots = {} & {
|
|
7
|
-
default?: (props: typeof
|
|
7
|
+
default?: (props: typeof __VLS_10) => any;
|
|
8
8
|
};
|
|
9
9
|
declare const __VLS_base: import("vue").DefineComponent<StepperTriggerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<StepperTriggerProps> & Readonly<{}>, {
|
|
10
10
|
as: AsTag | import("vue").Component;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { AcceptableBooleanValue } from "../../types/common.js";
|
|
2
2
|
import { SwitchControlProps } from "./types.js";
|
|
3
3
|
//#region src/components/switch/switch-control.vue.d.ts
|
|
4
|
-
declare var
|
|
4
|
+
declare var __VLS_10: {
|
|
5
5
|
modelValue: AcceptableBooleanValue;
|
|
6
6
|
};
|
|
7
7
|
type __VLS_Slots = {} & {
|
|
8
|
-
default?: (props: typeof
|
|
8
|
+
default?: (props: typeof __VLS_10) => any;
|
|
9
9
|
};
|
|
10
10
|
declare const __VLS_base: import("vue").DefineComponent<SwitchControlProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SwitchControlProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
11
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -14,8 +14,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
14
14
|
"onUpdate:modelValue"?: ((payload: DefinedValue | null) => any) | undefined;
|
|
15
15
|
}>, {
|
|
16
16
|
orientation: DataOrientation;
|
|
17
|
-
modelValue: DefinedValue | null;
|
|
18
17
|
loop: boolean;
|
|
18
|
+
modelValue: DefinedValue | null;
|
|
19
19
|
activationMode: TabsActivationMode;
|
|
20
20
|
unmountOnHide: boolean;
|
|
21
21
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -2,11 +2,11 @@ import { AsTag } from "../primitive/types.js";
|
|
|
2
2
|
import { TabsTriggerProps } from "./types.js";
|
|
3
3
|
|
|
4
4
|
//#region src/components/tabs/tabs-trigger.vue.d.ts
|
|
5
|
-
declare var
|
|
5
|
+
declare var __VLS_16: {
|
|
6
6
|
active: boolean;
|
|
7
7
|
};
|
|
8
8
|
type __VLS_Slots = {} & {
|
|
9
|
-
default?: (props: typeof
|
|
9
|
+
default?: (props: typeof __VLS_16) => any;
|
|
10
10
|
};
|
|
11
11
|
declare const __VLS_base: import("vue").DefineComponent<TabsTriggerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TabsTriggerProps> & Readonly<{}>, {
|
|
12
12
|
disabled: boolean;
|
|
@@ -3,13 +3,13 @@ import { TagsInputCompactProps, TagsInputCompactSlots } from "./types.js";
|
|
|
3
3
|
//#region src/components/tags-input/tags-input-compact.vue.d.ts
|
|
4
4
|
type __VLS_Slots = TagsInputCompactSlots;
|
|
5
5
|
declare const __VLS_base: import("vue").DefineComponent<TagsInputCompactProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
-
invalid: (value: string) => any;
|
|
7
6
|
"update:modelValue": (value: string[]) => any;
|
|
7
|
+
invalid: (value: string) => any;
|
|
8
8
|
addTag: (value: string) => any;
|
|
9
9
|
removeTag: (value: string) => any;
|
|
10
10
|
}, string, import("vue").PublicProps, Readonly<TagsInputCompactProps> & Readonly<{
|
|
11
|
-
onInvalid?: ((value: string) => any) | undefined;
|
|
12
11
|
"onUpdate:modelValue"?: ((value: string[]) => any) | undefined;
|
|
12
|
+
onInvalid?: ((value: string) => any) | undefined;
|
|
13
13
|
onAddTag?: ((value: string) => any) | undefined;
|
|
14
14
|
onRemoveTag?: ((value: string) => any) | undefined;
|
|
15
15
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -9,19 +9,19 @@ type __VLS_Slots = {} & {
|
|
|
9
9
|
default?: (props: typeof __VLS_1) => any;
|
|
10
10
|
};
|
|
11
11
|
declare const __VLS_base: import("vue").DefineComponent<TagsInputRootProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
-
invalid: (value: string) => any;
|
|
13
12
|
"update:modelValue": (value: string[]) => any;
|
|
13
|
+
invalid: (value: string) => any;
|
|
14
14
|
addTag: (value: string) => any;
|
|
15
15
|
removeTag: (value: string) => any;
|
|
16
16
|
}, string, import("vue").PublicProps, Readonly<TagsInputRootProps> & Readonly<{
|
|
17
|
-
onInvalid?: ((value: string) => any) | undefined;
|
|
18
17
|
"onUpdate:modelValue"?: ((value: string[]) => any) | undefined;
|
|
18
|
+
onInvalid?: ((value: string) => any) | undefined;
|
|
19
19
|
onAddTag?: ((value: string) => any) | undefined;
|
|
20
20
|
onRemoveTag?: ((value: string) => any) | undefined;
|
|
21
21
|
}>, {
|
|
22
22
|
max: number;
|
|
23
|
-
defaultValue: string[];
|
|
24
23
|
modelValue: string[];
|
|
24
|
+
defaultValue: string[];
|
|
25
25
|
delimiter: string | RegExp;
|
|
26
26
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
27
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -12,12 +12,12 @@ declare const __VLS_base: import("vue").DefineComponent<TimeFieldRootProps, {},
|
|
|
12
12
|
}>, {
|
|
13
13
|
disabled: boolean;
|
|
14
14
|
placeholder: TimeValue;
|
|
15
|
-
step: DateStep;
|
|
16
15
|
defaultValue: TimeValue;
|
|
16
|
+
step: DateStep;
|
|
17
17
|
readonly: boolean;
|
|
18
18
|
defaultPlaceholder: TimeValue;
|
|
19
|
-
hourCycle: 12 | 24;
|
|
20
19
|
granularity: TimeGranularity;
|
|
20
|
+
hourCycle: 12 | 24;
|
|
21
21
|
hideTimeZone: boolean;
|
|
22
22
|
isTimeUnavailable: TimeMatcher;
|
|
23
23
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -16,16 +16,16 @@ declare const __VLS_base: import("vue").DefineComponent<TimeRangeFieldRootProps,
|
|
|
16
16
|
}>, {
|
|
17
17
|
disabled: boolean;
|
|
18
18
|
placeholder: TimeValue;
|
|
19
|
-
step: DateStep;
|
|
20
19
|
defaultValue: TimeRange;
|
|
20
|
+
step: DateStep;
|
|
21
21
|
readonly: boolean;
|
|
22
22
|
defaultPlaceholder: TimeValue;
|
|
23
|
-
hourCycle: 12 | 24;
|
|
24
23
|
granularity: TimeGranularity;
|
|
24
|
+
hourCycle: 12 | 24;
|
|
25
25
|
hideTimeZone: boolean;
|
|
26
|
+
isTimeUnavailable: TimeMatcher;
|
|
26
27
|
startName: string;
|
|
27
28
|
endName: string;
|
|
28
|
-
isTimeUnavailable: TimeMatcher;
|
|
29
29
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
30
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
31
31
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ToastOffset, ToastPosition, ToasterProps } from "./types.js";
|
|
2
2
|
|
|
3
3
|
//#region src/components/toast/toaster.vue.d.ts
|
|
4
|
-
declare var
|
|
4
|
+
declare var __VLS_8: {};
|
|
5
5
|
type __VLS_Slots = {} & {
|
|
6
|
-
default?: (props: typeof
|
|
6
|
+
default?: (props: typeof __VLS_8) => any;
|
|
7
7
|
};
|
|
8
8
|
declare const __VLS_base: import("vue").DefineComponent<ToasterProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ToasterProps> & Readonly<{}>, {
|
|
9
9
|
offset: ToastOffset;
|
|
@@ -15,8 +15,8 @@ declare const __VLS_base: import("vue").DefineComponent<ToggleProps, {}, {}, {},
|
|
|
15
15
|
}, string, import("vue").PublicProps, Readonly<ToggleProps> & Readonly<{
|
|
16
16
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
17
17
|
}>, {
|
|
18
|
-
defaultValue: boolean;
|
|
19
18
|
modelValue: boolean;
|
|
19
|
+
defaultValue: boolean;
|
|
20
20
|
}, {}, {}, {}, string, import("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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{flattenChildren as e}from"../../shared/object.js";import{getActiveElement as t}from"../../shared/dom.js";import{handleAndDispatchCustomEvent as n}from"../../shared/event.js";import"../../shared/index.js";import{Primitive as r}from"../primitive/primitive.js";import"../primitive/index.js";import i from"../roving-focus/roving-focus-item.js";import{TREE_SELECT as a,TREE_TOGGLE as o,recurseCheckChildren as s}from"./shared.js";import{useTreeRootContext as c}from"./context.js";import{computed as l,createBlock as u,createVNode as d,defineComponent as f,openBlock as p,renderSlot as m,unref as h,withCtx as g,withKeys as _,withModifiers as v}from"vue";const y=f({name:`TreeItem`,__name:`tree-item`,props:{value:{},level:{},disabled:{type:Boolean},disabledSelect:{type:Boolean},disabledToggle:{type:Boolean},asChild:{type:Boolean},as:{default:`li`}},emits:[`select`,`toggle`],setup(f,{emit:y}){let b=f,x=y,{modelValue:S,disabled:C,dir:w,selectedKeys:T,expanded:E,expandedItems:D,propagateSelect:O,bubbleSelect:k,onSelect:A,onToggle:j,getItems:M}=c(`TreeItem`),N={value:b.value},P=l(()=>D.value.find(e=>e.value===b.value)),F=l(()=>C.value||b.disabled),I=l(()=>!!P.value?.hasChildren),L=l(()=>E.value?.includes(b.value)??!1),R=l(()=>T.value.includes(b.value)),z=l(()=>s(T.value,P.value?.data?.children)),B=l(()=>{if(!P.value||!I.value||!Array.isArray(S.value))return;let t=e(P.value.data.children);if(k.value)return t.some(e=>T.value.includes(e.value))&&!t.every(e=>T.value.includes(e.value));if(O.value&&R.value)return!t.every(e=>T.value.includes(e.value))}),V=e=>{F.value||!I.value||(L.value?W(`right`)?.focus?.():J(e))},H=e=>{F.value||(L.value?J(e):W(`left`)?.focus?.())},U=(e,t)=>{if(!F.value){if(t===`right`){w.value===`ltr`?V(e):H(e);return}w.value===`ltr`?H(e):V(e)}};function W(e){let n=M?.()?.map(e=>e.element)??[],r=t(),i=n.indexOf(r),a=[...n];a=e===`left`?a.slice(0,i).reverse():a.slice(i);let o=e===`left`?b.level-1:b.level+1;return a.find(e=>Number(e.getAttribute(`data-indent`))===o)}async function G(e){x(`select`,e),!e?.defaultPrevented&&A(b.value)}function K(e){x(`toggle`,e),!e?.defaultPrevented&&j(b.value)}async function q(e){b.disabledSelect||e&&n(a,G,{originalEvent:e,value:b.value,isExpanded:L.value,isSelected:R.value})}function J(e){b.disabledToggle||e&&n(o,K,{originalEvent:e,value:b.value,isExpanded:L.value,isSelected:R.value})}let Y=e=>{F.value||(q(e),J(e))};return(e,t)=>(p(),u(i,{"as-child":``,"item-data":N,"allow-shift-key":``},{default:g(()=>[d(h(r),{as:f.as,"as-child":f.asChild,"data-soybean-tree-item":``,"aria-disabled":F.value?!0:void 0,"aria-selected":R.value,"aria-expanded":I.value?L.value:void 0,"aria-level":f.level,"data-disabled":F.value?``:void 0,"data-indent":f.level,"data-selected":R.value?``:void 0,"data-expanded":L.value?``:void 0,"data-contains-selected":z.value?``:void 0,role:`treeitem`,onKeydown:
|
|
1
|
+
import{flattenChildren as e}from"../../shared/object.js";import{getActiveElement as t}from"../../shared/dom.js";import{handleAndDispatchCustomEvent as n}from"../../shared/event.js";import"../../shared/index.js";import{Primitive as r}from"../primitive/primitive.js";import"../primitive/index.js";import i from"../roving-focus/roving-focus-item.js";import{TREE_SELECT as a,TREE_TOGGLE as o,recurseCheckChildren as s}from"./shared.js";import{useTreeRootContext as c}from"./context.js";import{computed as l,createBlock as u,createVNode as d,defineComponent as f,openBlock as p,renderSlot as m,unref as h,withCtx as g,withKeys as _,withModifiers as v}from"vue";const y=f({name:`TreeItem`,__name:`tree-item`,props:{value:{},level:{},disabled:{type:Boolean},disabledSelect:{type:Boolean},disabledToggle:{type:Boolean},asChild:{type:Boolean},as:{default:`li`}},emits:[`select`,`toggle`],setup(f,{emit:y}){let b=f,x=y,{modelValue:S,disabled:C,dir:w,selectedKeys:T,expanded:E,expandedItems:D,propagateSelect:O,bubbleSelect:k,onSelect:A,onToggle:j,getItems:M}=c(`TreeItem`),N={value:b.value},P=l(()=>D.value.find(e=>e.value===b.value)),F=l(()=>C.value||b.disabled),I=l(()=>!!P.value?.hasChildren),L=l(()=>E.value?.includes(b.value)??!1),R=l(()=>T.value.includes(b.value)),z=l(()=>s(T.value,P.value?.data?.children)),B=l(()=>{if(!P.value||!I.value||!Array.isArray(S.value))return;let t=e(P.value.data.children);if(k.value)return t.some(e=>T.value.includes(e.value))&&!t.every(e=>T.value.includes(e.value));if(O.value&&R.value)return!t.every(e=>T.value.includes(e.value))}),V=e=>{F.value||!I.value||(L.value?W(`right`)?.focus?.():J(e))},H=e=>{F.value||(L.value?J(e):W(`left`)?.focus?.())},U=(e,t)=>{if(!F.value){if(t===`right`){w.value===`ltr`?V(e):H(e);return}w.value===`ltr`?H(e):V(e)}};function W(e){let n=M?.()?.map(e=>e.element)??[],r=t(),i=n.indexOf(r),a=[...n];a=e===`left`?a.slice(0,i).reverse():a.slice(i);let o=e===`left`?b.level-1:b.level+1;return a.find(e=>Number(e.getAttribute(`data-indent`))===o)}async function G(e){x(`select`,e),!e?.defaultPrevented&&A(b.value)}function K(e){x(`toggle`,e),!e?.defaultPrevented&&j(b.value)}async function q(e){b.disabledSelect||e&&n(a,G,{originalEvent:e,value:b.value,isExpanded:L.value,isSelected:R.value})}function J(e){b.disabledToggle||e&&n(o,K,{originalEvent:e,value:b.value,isExpanded:L.value,isSelected:R.value})}let Y=e=>{F.value||(q(e),J(e))},X=e=>{if(e.key===`ArrowRight`){U(e,`right`);return}if(e.key===`ArrowLeft`){U(e,`left`);return}Y(e)};return(e,t)=>(p(),u(i,{"as-child":``,"item-data":N,"allow-shift-key":``},{default:g(()=>[d(h(r),{as:f.as,"as-child":f.asChild,"data-soybean-tree-item":``,"aria-disabled":F.value?!0:void 0,"aria-selected":R.value,"aria-expanded":I.value?L.value:void 0,"aria-level":f.level,"data-disabled":F.value?``:void 0,"data-indent":f.level,"data-selected":R.value?``:void 0,"data-expanded":L.value?``:void 0,"data-contains-selected":z.value?``:void 0,role:`treeitem`,onKeydown:_(v(X,[`self`,`prevent`]),[`enter`,`space`,`right`,`left`]),onClick:v(Y,[`stop`])},{default:g(()=>[m(e.$slots,`default`,{isExpanded:L.value,isSelected:R.value,isIndeterminate:B.value,hasChildren:I.value})]),_:3},8,[`as`,`as-child`,`aria-disabled`,`aria-selected`,`aria-expanded`,`aria-level`,`data-disabled`,`data-indent`,`data-selected`,`data-expanded`,`data-contains-selected`,`onKeydown`])]),_:3}))}});export{y as default};
|
|
@@ -3,14 +3,14 @@ import { AsTag } from "../primitive/types.js";
|
|
|
3
3
|
import { TreeItemProps } from "./types.js";
|
|
4
4
|
|
|
5
5
|
//#region src/components/tree/tree-item.vue.d.ts
|
|
6
|
-
declare var
|
|
6
|
+
declare var __VLS_16: {
|
|
7
7
|
isExpanded: boolean;
|
|
8
8
|
isSelected: boolean;
|
|
9
9
|
isIndeterminate: boolean | undefined;
|
|
10
10
|
hasChildren: boolean;
|
|
11
11
|
};
|
|
12
12
|
type __VLS_Slots = {} & {
|
|
13
|
-
default?: (props: typeof
|
|
13
|
+
default?: (props: typeof __VLS_16) => any;
|
|
14
14
|
};
|
|
15
15
|
declare const __VLS_base: import("vue").DefineComponent<TreeItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
16
|
select: (event: TreeSelectEvent<string>) => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{MAP_KEY_TO_FOCUS_INTENT as e}from"../../constants/common.js";import{isNullish as t}from"../../shared/guard.js";import{flattenChildren as n}from"../../shared/object.js";import{getActiveElement as r}from"../../shared/dom.js";import{transformPropsToContext as i}from"../../shared/vue.js";import"../../shared/index.js";import{useControllableState as a}from"../../composables/use-controllable-state.js";import{useTypeahead as o}from"../../composables/use-typeahead.js";import"../../composables/index.js";import{Primitive as s}from"../primitive/primitive.js";import"../primitive/index.js";import c from"../roving-focus/roving-focus-group.js";import{findParentPath as l,flattenItems as u}from"./shared.js";import{provideTreeRootContext as d}from"./context.js";import{useSelectionBehavior as f}from"./hooks.js";import{computed as p,createBlock as m,createVNode as h,defineComponent as g,nextTick as _,openBlock as v,renderSlot as y,shallowRef as b,unref as x,useTemplateRef as S,withCtx as C
|
|
1
|
+
import{MAP_KEY_TO_FOCUS_INTENT as e}from"../../constants/common.js";import{isNullish as t}from"../../shared/guard.js";import{flattenChildren as n}from"../../shared/object.js";import{getActiveElement as r}from"../../shared/dom.js";import{transformPropsToContext as i}from"../../shared/vue.js";import"../../shared/index.js";import{useControllableState as a}from"../../composables/use-controllable-state.js";import{useTypeahead as o}from"../../composables/use-typeahead.js";import"../../composables/index.js";import{Primitive as s}from"../primitive/primitive.js";import"../primitive/index.js";import c from"../roving-focus/roving-focus-group.js";import{findParentPath as l,flattenItems as u}from"./shared.js";import{provideTreeRootContext as d}from"./context.js";import{useSelectionBehavior as f}from"./hooks.js";import{computed as p,createBlock as m,createVNode as h,defineComponent as g,nextTick as _,openBlock as v,renderSlot as y,shallowRef as b,unref as x,useTemplateRef as S,withCtx as C}from"vue";import{createEventHook as w}from"@vueuse/core";const T=g({name:`TreeRoot`,__name:`tree-root`,props:{modelValue:{},defaultValue:{},multiple:{},items:{},expanded:{},defaultExpanded:{},selectionBehavior:{default:`toggle`},toggleBehavior:{default:`multiple`},dir:{},loop:{type:Boolean,default:!0},disabled:{type:Boolean},propagateSelect:{type:Boolean},bubbleSelect:{type:Boolean},allowParentSelect:{type:Boolean},asChild:{type:Boolean},as:{default:`ul`}},emits:[`update:modelValue`,`update:expanded`],setup(g,{emit:T}){let E=g,D=T,O=S(`rovingFocusGroupRef`),{handleTypeaheadSearch:k}=o(),A=b(!1),j=w(),M=a(()=>E.modelValue,e=>{D(`update:modelValue`,e)},I()),N=p(()=>E.multiple&&Array.isArray(M.value)?M.value:[M.value]),{onSelectItem:P,handleMultipleReplace:F}=f(M,()=>E.multiple,()=>E.selectionBehavior);function I(){return t(E.defaultValue)?E.multiple?[]:``:E.defaultValue}let L=a(()=>E.expanded,e=>{D(`update:expanded`,e??[])},E.defaultExpanded??[]),R=p(()=>u(E.items,L.value)),z=t=>{let n=e[t.key];_(()=>{F(n,r(),R.value.map(e=>e.value),O.value?.getItems)})},B=e=>{if(E.disabled)return;if(A.value){j.trigger(e);return}if([`ArrowUp`,`ArrowDown`,`Shift`].includes(e.key)){z(e);return}let t=O.value?.getItems()??[];k(e.key,t)},V=e=>{if(E.disabled||!e.parent||!E.multiple||!Array.isArray(M.value))return;let t=R.value.find(t=>e.parent&&t.value===e.parent.value);if(!t)return;let n=M.value;t.data.children?.every(e=>n.find(t=>t===e.value))?M.value=[...n,t.data.value]:M.value=n.filter(e=>e!==t.data.value),V(t)},H=e=>{if(E.disabled)return;let t=R.value.find(t=>t.value===e);if(!(t?.hasChildren&&!E.allowParentSelect)&&(P(e),E.bubbleSelect&&E.multiple&&Array.isArray(M.value)&&t&&V(t),E.propagateSelect&&E.multiple&&Array.isArray(M.value))){if(!t)return;let r=n(t.data.children);M.value.includes(e)?M.value=M.value.filter(e=>!r.some(t=>t.value===e)):M.value=[...M.value,...r]}},U=e=>{if(!E.disabled&&R.value.find(t=>t.value===e)?.data?.children){if(L.value.includes(e)){L.value=L.value.filter(t=>t!==e);return}if(E.toggleBehavior===`single`){let t=l(e,E.items);t?L.value=[...t,e]:L.value=[e]}else L.value=[...L.value,e]}};return d({modelValue:M,expanded:L,selectedKeys:N,onSelect:H,onToggle:U,expandedItems:R,isVirtual:A,virtualKeydownHook:j,getItems:()=>O.value?.getItems()??[],handleMultipleReplace:F,...i(E,[`items`,`multiple`,`disabled`,`dir`,`selectionBehavior`,`propagateSelect`,`bubbleSelect`])}),(e,t)=>(v(),m(c,{ref_key:`rovingFocusGroupRef`,ref:O,"as-child":``,orientation:`vertical`,dir:g.dir,loop:g.loop},{default:C(()=>[h(x(s),{as:g.as,"as-child":g.asChild,"data-soybean-tree-root":``,"aria-disabled":g.disabled?!0:void 0,"aria-multiselectable":g.multiple?!0:void 0,"data-disabled":g.disabled?``:void 0,role:`tree`,onKeydown:B},{default:C(()=>[y(e.$slots,`default`,{flattenItems:R.value,modelValue:x(M),expanded:x(L),select:H,toggle:U})]),_:3},8,[`as`,`as-child`,`aria-disabled`,`aria-multiselectable`,`data-disabled`])]),_:3},8,[`dir`,`loop`]))}});export{T as default};
|
|
@@ -5,15 +5,15 @@ declare const __VLS_export: <T extends TreeMenuBaseOptionData = TreeMenuBaseOpti
|
|
|
5
5
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<TreeMenuCompactProps<T> & {
|
|
6
6
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
7
7
|
"onUpdate:expanded"?: ((value: string[]) => any) | undefined;
|
|
8
|
-
onSelectDropdown?: ((value: string) => any) | undefined;
|
|
9
8
|
"onUpdate:collapsed"?: ((value: boolean) => any) | undefined;
|
|
9
|
+
onSelectDropdown?: ((value: string) => any) | undefined;
|
|
10
10
|
}> & (typeof globalThis extends {
|
|
11
11
|
__VLS_PROPS_FALLBACK: infer P;
|
|
12
12
|
} ? P : {});
|
|
13
13
|
expose: (exposed: {}) => void;
|
|
14
14
|
attrs: any;
|
|
15
15
|
slots: TreeMenuCompactSlots<T>;
|
|
16
|
-
emit: ((evt: "update:modelValue", value: string) => void) & ((evt: "update:expanded", value: string[]) => void) & ((evt: "
|
|
16
|
+
emit: ((evt: "update:modelValue", value: string) => void) & ((evt: "update:expanded", value: string[]) => void) & ((evt: "update:collapsed", value: boolean) => void) & ((evt: "selectDropdown", value: string) => void);
|
|
17
17
|
}>) => import("vue").VNode & {
|
|
18
18
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
19
19
|
};
|
|
@@ -15,8 +15,8 @@ declare const __VLS_base: import("vue").DefineComponent<TreeMenuRootProps, {}, {
|
|
|
15
15
|
"onUpdate:collapsed"?: ((value: boolean) => any) | undefined;
|
|
16
16
|
}>, {
|
|
17
17
|
defaultValue: string;
|
|
18
|
-
collapsed: boolean;
|
|
19
18
|
defaultExpanded: string[];
|
|
19
|
+
collapsed: boolean;
|
|
20
20
|
indent: number;
|
|
21
21
|
defaultCollapsed: boolean;
|
|
22
22
|
collapsedWidth: number;
|
|
@@ -2,8 +2,8 @@ import { VisuallyHiddenFeature, VisuallyHiddenInputProps } from "./types.js";
|
|
|
2
2
|
|
|
3
3
|
//#region src/components/visually-hidden/visually-hidden-input.vue.d.ts
|
|
4
4
|
declare const __VLS_export: import("vue").DefineComponent<VisuallyHiddenInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<VisuallyHiddenInputProps> & Readonly<{}>, {
|
|
5
|
-
checked: boolean;
|
|
6
5
|
feature: VisuallyHiddenFeature;
|
|
6
|
+
checked: boolean;
|
|
7
7
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
8
|
declare const _default: typeof __VLS_export;
|
|
9
9
|
//#endregion
|
package/dist/shared/env.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
//#region src/shared/env.d.ts
|
|
2
2
|
declare const isBrowser: boolean;
|
|
3
3
|
declare const isClient: boolean;
|
|
4
|
-
declare const isNuxt: boolean;
|
|
5
4
|
declare function isIOS(): boolean;
|
|
6
5
|
declare function refreshIOSDetection(): boolean;
|
|
7
6
|
//#endregion
|
|
8
|
-
export { isBrowser, isClient, isIOS,
|
|
7
|
+
export { isBrowser, isClient, isIOS, refreshIOSDetection };
|
package/dist/shared/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=typeof document<`u`,t=typeof window<`u`&&typeof document<`u
|
|
1
|
+
const e=typeof document<`u`,t=typeof window<`u`&&typeof document<`u`;let n=null;function r(){return!t||!window?.navigator?.userAgent?!1:/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||window.navigator.maxTouchPoints>2&&/iPad|Macintosh/.test(window.navigator.userAgent)}function i(){return n===null&&(n=r()),n}function a(){return n=null,i()}export{e as isBrowser,t as isClient,i as isIOS,a as refreshIOSDetection};
|