@soybeanjs/ui 0.0.7 → 0.0.9
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/README.md +1 -1
- package/README.zh-CN.md +1 -1
- package/dist/components/accordion/accordion.vue.d.ts +8 -8
- package/dist/components/alert/alert.vue.d.ts +4 -4
- package/dist/components/alert-dialog/alert-dialog-action.vue.d.ts +5 -5
- package/dist/components/alert-dialog/alert-dialog-cancel.vue.d.ts +5 -5
- package/dist/components/alert-dialog/alert-dialog.vue.d.ts +12 -12
- package/dist/components/avatar/avatar.vue.d.ts +9 -9
- package/dist/components/badge/badge.js +1 -1
- package/dist/components/badge/badge.vue.d.ts +4 -4
- package/dist/components/breadcrumb/breadcrumb.vue.d.ts +4 -4
- package/dist/components/button/button-group.vue.d.ts +3 -3
- package/dist/components/button/button-link.vue.d.ts +5 -5
- package/dist/components/button/button-loading.vue.d.ts +10 -10
- package/dist/components/button/button.vue.d.ts +4 -4
- package/dist/components/button/types.d.ts +2 -2
- package/dist/components/card/card.vue.d.ts +3 -3
- package/dist/components/checkbox/checkbox-card-group.vue.d.ts +4 -4
- package/dist/components/checkbox/checkbox-card.vue.d.ts +8 -8
- package/dist/components/checkbox/checkbox-group.vue.d.ts +4 -4
- package/dist/components/checkbox/checkbox.vue.d.ts +12 -12
- package/dist/components/collapsible/collapsible.vue.d.ts +4 -4
- package/dist/components/command/command.vue.d.ts +2 -2
- package/dist/components/config-provider/config-provider.vue.d.ts +7 -7
- package/dist/components/context-menu/context-menu-checkbox.js +1 -1
- package/dist/components/context-menu/context-menu-checkbox.vue.d.ts +9 -9
- package/dist/components/context-menu/context-menu-radio.js +1 -1
- package/dist/components/context-menu/context-menu-radio.vue.d.ts +9 -9
- package/dist/components/context-menu/context-menu-wrapper.js +1 -1
- package/dist/components/context-menu/context-menu-wrapper.vue.d.ts +11 -11
- package/dist/components/context-menu/context-menu.js +1 -1
- package/dist/components/context-menu/context-menu.vue.d.ts +9 -9
- package/dist/components/context-menu/index.d.ts +2 -2
- package/dist/components/context-menu/types.d.ts +2 -1
- package/dist/components/dialog/dialog-close.vue.d.ts +2 -2
- package/dist/components/dialog/dialog-pure.js +1 -1
- package/dist/components/dialog/dialog-pure.vue.d.ts +16 -16
- package/dist/components/dialog/dialog.vue.d.ts +21 -21
- package/dist/components/drawer/drawer-close.vue.d.ts +2 -2
- package/dist/components/drawer/drawer.vue.d.ts +21 -21
- package/dist/components/dropdown-menu/dropdown-menu-checkbox.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-checkbox.vue.d.ts +9 -9
- package/dist/components/dropdown-menu/dropdown-menu-radio.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-radio.vue.d.ts +9 -9
- package/dist/components/dropdown-menu/dropdown-menu-wrapper.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-wrapper.vue.d.ts +11 -11
- package/dist/components/dropdown-menu/dropdown-menu.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu.vue.d.ts +9 -9
- package/dist/components/dropdown-menu/index.d.ts +2 -2
- package/dist/components/dropdown-menu/types.d.ts +3 -1
- package/dist/components/form/form-field-array.vue.d.ts +2 -2
- package/dist/components/form/form-field.vue.d.ts +2 -2
- package/dist/components/form/form.vue.d.ts +2 -2
- package/dist/components/icon/icon.vue.d.ts +3 -3
- package/dist/components/input/input.vue.d.ts +6 -6
- package/dist/components/kbd/kbd.vue.d.ts +3 -3
- package/dist/components/label/label.vue.d.ts +2 -2
- package/dist/components/layout/layout-trigger.vue.d.ts +2 -2
- package/dist/components/layout/layout.vue.d.ts +9 -9
- package/dist/components/link/link.js +1 -1
- package/dist/components/link/link.vue.d.ts +3 -3
- package/dist/components/link/types.d.ts +2 -2
- package/dist/components/list/list-item.vue.d.ts +2 -2
- package/dist/components/list/list.vue.d.ts +2 -2
- package/dist/components/menu/menu-checkbox-options.vue.d.ts +4 -4
- package/dist/components/menu/menu-option.vue.d.ts +9 -9
- package/dist/components/menu/menu-options.vue.d.ts +9 -9
- package/dist/components/menu/menu-radio-options.vue.d.ts +4 -4
- package/dist/components/menu/types.d.ts +2 -2
- package/dist/components/navigation-menu/navigation-menu.js +1 -1
- package/dist/components/navigation-menu/navigation-menu.vue.d.ts +11 -11
- package/dist/components/number-input/number-input.vue.d.ts +8 -8
- package/dist/components/pagination/pagination.vue.d.ts +8 -8
- package/dist/components/password/password.vue.d.ts +7 -7
- package/dist/components/popover/index.d.ts +2 -2
- package/dist/components/popover/popover.js +1 -1
- package/dist/components/popover/popover.vue.d.ts +14 -14
- package/dist/components/popover/types.d.ts +4 -3
- package/dist/components/radio-group/radio-card-group.vue.d.ts +4 -4
- package/dist/components/radio-group/radio-card.vue.d.ts +2 -2
- package/dist/components/radio-group/radio-group.vue.d.ts +4 -4
- package/dist/components/radio-group/radio.vue.d.ts +4 -4
- package/dist/components/segment/segment.vue.d.ts +7 -5
- package/dist/components/select/select.js +1 -1
- package/dist/components/select/select.vue.d.ts +8 -8
- package/dist/components/select/types.d.ts +9 -1
- package/dist/components/separator/separator.vue.d.ts +5 -5
- package/dist/components/switch/switch.vue.d.ts +638 -7
- package/dist/components/tabs/tabs.vue.d.ts +10 -6
- package/dist/components/tag/tag.vue.d.ts +4 -4
- package/dist/components/textarea/textarea.vue.d.ts +8 -8
- package/dist/components/tooltip/index.d.ts +2 -2
- package/dist/components/tooltip/tooltip.js +1 -1
- package/dist/components/tooltip/tooltip.vue.d.ts +9 -9
- package/dist/components/tooltip/types.d.ts +4 -3
- package/dist/components/tree/tree-virtualizer.vue.d.ts +10 -8
- package/dist/components/tree/tree.vue.d.ts +9 -8
- package/dist/components/tree-menu/context.js +1 -1
- package/dist/components/tree-menu/index.d.ts +2 -2
- package/dist/components/tree-menu/shared.js +1 -1
- package/dist/components/tree-menu/tree-menu-option-slot.js +1 -0
- package/dist/components/tree-menu/tree-menu-option.js +1 -0
- package/dist/components/tree-menu/tree-menu-styled-item.js +1 -0
- package/dist/components/tree-menu/tree-menu-styled-item.vue.d.ts +17 -0
- package/dist/components/tree-menu/tree-menu.js +1 -1
- package/dist/components/tree-menu/tree-menu.vue.d.ts +12 -23
- package/dist/components/tree-menu/types.d.ts +79 -45
- package/dist/components/virtualizer/virtualizer.vue.d.ts +3 -3
- package/dist/constants/components.js +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/index.js +1 -1
- package/dist/styles.css +53 -28
- package/dist/theme/shared.js +1 -1
- package/dist/variants/alert.d.ts +3 -3
- package/dist/variants/badge.d.ts +3 -3
- package/dist/variants/button.d.ts +3 -3
- package/dist/variants/checkbox.d.ts +3 -3
- package/dist/variants/kbd.d.ts +3 -3
- package/dist/variants/menu.js +1 -1
- package/dist/variants/navigation-menu.js +1 -1
- package/dist/variants/pagination.d.ts +3 -3
- package/dist/variants/popover.js +1 -1
- package/dist/variants/radio-group.d.ts +3 -3
- package/dist/variants/select.js +1 -1
- package/dist/variants/separator.d.ts +3 -3
- package/dist/variants/switch.d.ts +3 -3
- package/dist/variants/tabs.d.ts +3 -3
- package/dist/variants/tag.d.ts +3 -3
- package/dist/variants/textarea.d.ts +3 -3
- package/dist/variants/toast.d.ts +3 -3
- package/dist/variants/tooltip.js +1 -1
- package/dist/variants/tree-menu.js +1 -1
- package/package.json +15 -15
- package/dist/components/tree-menu/tree-menu-item-wrapper.js +0 -1
- package/dist/components/tree-menu/tree-menu-item-wrapper.vue.d.ts +0 -17
- package/dist/components/tree-menu/tree-menu-item.js +0 -1
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
import { TabsOptionData, TabsProps } from "./types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue291 from "vue";
|
|
3
3
|
import { AcceptableValue } from "@soybeanjs/headless";
|
|
4
4
|
|
|
5
5
|
//#region src/components/tabs/tabs.vue.d.ts
|
|
6
6
|
declare const __VLS_export: <T extends AcceptableValue = AcceptableValue, S extends TabsOptionData<NonNullable<T>> = TabsOptionData<NonNullable<T>>>(__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<{
|
|
7
|
-
props: __VLS_PrettifyLocal<TabsProps<T, S> & {
|
|
7
|
+
props: vue291.PublicProps & __VLS_PrettifyLocal<TabsProps<T, S> & {
|
|
8
8
|
"onUpdate:modelValue"?: ((payload: NonNullable<T>) => any) | undefined;
|
|
9
|
-
}> &
|
|
9
|
+
}> & (typeof globalThis extends {
|
|
10
10
|
__VLS_PROPS_FALLBACK: infer P;
|
|
11
11
|
} ? P : {});
|
|
12
12
|
expose: (exposed: {}) => void;
|
|
13
13
|
attrs: any;
|
|
14
14
|
slots: {
|
|
15
|
-
trigger?: (props:
|
|
15
|
+
trigger?: (props: S & {
|
|
16
|
+
active: boolean;
|
|
17
|
+
}) => any;
|
|
16
18
|
} & {
|
|
17
|
-
content?: (props:
|
|
19
|
+
content?: (props: S & {
|
|
20
|
+
active: boolean;
|
|
21
|
+
}) => any;
|
|
18
22
|
};
|
|
19
23
|
emit: (evt: "update:modelValue", payload: NonNullable<T>) => void;
|
|
20
|
-
}>) =>
|
|
24
|
+
}>) => vue291.VNode & {
|
|
21
25
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
22
26
|
};
|
|
23
27
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TagProps } from "./types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue286 from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/tag/tag.vue.d.ts
|
|
5
5
|
declare var __VLS_10: {}, __VLS_12: {}, __VLS_14: {}, __VLS_16: {
|
|
@@ -14,13 +14,13 @@ type __VLS_Slots = {} & {
|
|
|
14
14
|
} & {
|
|
15
15
|
close?: (props: typeof __VLS_16) => any;
|
|
16
16
|
};
|
|
17
|
-
declare const __VLS_base:
|
|
17
|
+
declare const __VLS_base: vue286.DefineComponent<TagProps, {}, {}, {}, {}, vue286.ComponentOptionsMixin, vue286.ComponentOptionsMixin, {
|
|
18
18
|
"update:open": (open: boolean) => any;
|
|
19
|
-
}, string,
|
|
19
|
+
}, string, vue286.PublicProps, Readonly<TagProps> & Readonly<{
|
|
20
20
|
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
|
21
21
|
}>, {
|
|
22
22
|
open: boolean;
|
|
23
|
-
}, {}, {}, {}, string,
|
|
23
|
+
}, {}, {}, {}, string, vue286.ComponentProvideOptions, false, {}, any>;
|
|
24
24
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
25
25
|
declare const _default: typeof __VLS_export;
|
|
26
26
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { TextareaProps } from "./types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue150 from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/textarea/textarea.vue.d.ts
|
|
5
|
-
declare var
|
|
5
|
+
declare var __VLS_28: {
|
|
6
6
|
count: number;
|
|
7
7
|
maxlength: number | undefined;
|
|
8
|
-
},
|
|
8
|
+
}, __VLS_30: {};
|
|
9
9
|
type __VLS_Slots = {} & {
|
|
10
|
-
counter?: (props: typeof
|
|
10
|
+
counter?: (props: typeof __VLS_28) => any;
|
|
11
11
|
} & {
|
|
12
|
-
footer?: (props: typeof
|
|
12
|
+
footer?: (props: typeof __VLS_30) => any;
|
|
13
13
|
};
|
|
14
|
-
declare const __VLS_base:
|
|
14
|
+
declare const __VLS_base: vue150.DefineComponent<TextareaProps, {}, {}, {}, {}, vue150.ComponentOptionsMixin, vue150.ComponentOptionsMixin, {
|
|
15
15
|
"update:modelValue": (value: string) => any;
|
|
16
|
-
}, string,
|
|
16
|
+
}, string, vue150.PublicProps, Readonly<TextareaProps> & Readonly<{
|
|
17
17
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
18
|
-
}>, {}, {}, {}, {}, string,
|
|
18
|
+
}>, {}, {}, {}, {}, string, vue150.ComponentProvideOptions, false, {}, any>;
|
|
19
19
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
20
20
|
declare const _default: typeof __VLS_export;
|
|
21
21
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { TooltipEmits, TooltipProps } from "./types.js";
|
|
2
2
|
import { _default } from "./tooltip.vue.js";
|
|
3
|
-
import { TooltipArrowProps,
|
|
4
|
-
export { type TooltipArrowProps, type
|
|
3
|
+
import { TooltipArrowProps, TooltipPopupProps, TooltipPortalProps, TooltipPositionerEmits, TooltipPositionerProps, TooltipProviderProps, TooltipRootEmits, TooltipRootProps, TooltipTriggerProps } from "@soybeanjs/headless/tooltip";
|
|
4
|
+
export { type TooltipArrowProps, type TooltipPopupProps, type TooltipPortalProps, type TooltipPositionerEmits, type TooltipPositionerProps, type TooltipProviderProps, type TooltipRootEmits, type TooltipRootProps, type TooltipTriggerProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mergeSlotVariants as e}from"../../theme/shared.js";import{tooltipVariants as t}from"../../variants/tooltip.js";import{computed as n,createBlock as r,createCommentVNode as i,createTextVNode as a,createVNode as o,defineComponent as s,guardReactiveProps as c,mergeProps as l,normalizeProps as u,openBlock as d,renderSlot as f,toDisplayString as p,toHandlers as m,unref as h,withCtx as g}from"vue";import{useForwardListeners as _,useOmitProps as v}from"@soybeanjs/headless/composables";import{TooltipArrow as y,
|
|
1
|
+
import{mergeSlotVariants as e}from"../../theme/shared.js";import{tooltipVariants as t}from"../../variants/tooltip.js";import{computed as n,createBlock as r,createCommentVNode as i,createTextVNode as a,createVNode as o,defineComponent as s,guardReactiveProps as c,mergeProps as l,normalizeProps as u,openBlock as d,renderSlot as f,toDisplayString as p,toHandlers as m,unref as h,withCtx as g}from"vue";import{useForwardListeners as _,useOmitProps as v}from"@soybeanjs/headless/composables";import{TooltipArrow as y,TooltipPopup as b,TooltipPortal as x,TooltipPositioner as S,TooltipRoot as C,TooltipTrigger as w,provideTooltipThemeContext as T}from"@soybeanjs/headless";var E=s({name:`STooltip`,__name:`tooltip`,props:{size:{},ui:{},content:{},placement:{},showArrow:{type:Boolean,default:!0},popupProps:{},positionerProps:{},triggerProps:{},portalProps:{},arrowProps:{},defaultOpen:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},delayDuration:{},skipDelayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},emits:[`update:open`,`escapeKeyDown`,`pointerDownOutside`],setup(s,{emit:E}){let D=s,O=E,k=v(D,[`size`,`ui`,`content`,`showArrow`,`popupProps`,`positionerProps`,`triggerProps`,`portalProps`,`arrowProps`]),A=_(O),j=n(()=>e(t({size:D.size}),D.ui)),M=n(()=>({placement:D.placement,...D.positionerProps}));return T({ui:j}),(e,t)=>(d(),r(h(C),l(h(k),{"onUpdate:open":t[0]||=e=>O(`update:open`,e)}),{default:g(()=>[o(h(w),{"as-child":``},{default:g(()=>[f(e.$slots,`trigger`)]),_:3}),o(h(x),u(c(s.portalProps)),{default:g(()=>[o(h(S),l(M.value,m(h(A))),{default:g(()=>[o(h(b),u(c(s.popupProps)),{default:g(()=>[f(e.$slots,`default`,{},()=>[a(p(s.content),1)]),s.showArrow?(d(),r(h(y),u(l({key:0},s.arrowProps)),null,16)):i(`v-if`,!0)]),_:3},16)]),_:3},16)]),_:3},16)]),_:3},16))}});export{E as default};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { TooltipProps } from "./types.js";
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
2
|
+
import * as vue305 from "vue";
|
|
3
|
+
import * as _soybeanjs_headless154 from "@soybeanjs/headless";
|
|
4
4
|
|
|
5
5
|
//#region src/components/tooltip/tooltip.vue.d.ts
|
|
6
|
-
declare var __VLS_16: {},
|
|
6
|
+
declare var __VLS_16: {}, __VLS_36: {};
|
|
7
7
|
type __VLS_Slots = {} & {
|
|
8
8
|
trigger?: (props: typeof __VLS_16) => any;
|
|
9
9
|
} & {
|
|
10
|
-
default?: (props: typeof
|
|
10
|
+
default?: (props: typeof __VLS_36) => any;
|
|
11
11
|
};
|
|
12
|
-
declare const __VLS_base:
|
|
12
|
+
declare const __VLS_base: vue305.DefineComponent<TooltipProps, {}, {}, {}, {}, vue305.ComponentOptionsMixin, vue305.ComponentOptionsMixin, {
|
|
13
13
|
"update:open": (value: boolean) => any;
|
|
14
14
|
escapeKeyDown: (event: KeyboardEvent) => any;
|
|
15
|
-
pointerDownOutside: (event:
|
|
16
|
-
}, string,
|
|
15
|
+
pointerDownOutside: (event: _soybeanjs_headless154.PointerDownOutsideEvent) => any;
|
|
16
|
+
}, string, vue305.PublicProps, Readonly<TooltipProps> & Readonly<{
|
|
17
17
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
18
18
|
onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
|
|
19
|
-
onPointerDownOutside?: ((event:
|
|
19
|
+
onPointerDownOutside?: ((event: _soybeanjs_headless154.PointerDownOutsideEvent) => any) | undefined;
|
|
20
20
|
}>, {
|
|
21
21
|
open: boolean;
|
|
22
22
|
defaultOpen: boolean;
|
|
23
23
|
showArrow: boolean;
|
|
24
|
-
}, {}, {}, {}, string,
|
|
24
|
+
}, {}, {}, {}, string, vue305.ComponentProvideOptions, false, {}, any>;
|
|
25
25
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
26
26
|
declare const _default: typeof __VLS_export;
|
|
27
27
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ThemeSize } from "../../theme/types.js";
|
|
2
2
|
import "../../theme/index.js";
|
|
3
|
-
import { Placement, TooltipArrowProps,
|
|
3
|
+
import { Placement, TooltipArrowProps, TooltipPopupProps, TooltipPortalProps, TooltipPositionerEmits, TooltipPositionerProps, TooltipRootEmits, TooltipRootProps, TooltipTriggerProps, TooltipUi } from "@soybeanjs/headless";
|
|
4
4
|
|
|
5
5
|
//#region src/components/tooltip/types.d.ts
|
|
6
6
|
interface TooltipProps extends TooltipRootProps {
|
|
@@ -9,11 +9,12 @@ interface TooltipProps extends TooltipRootProps {
|
|
|
9
9
|
content?: string;
|
|
10
10
|
placement?: Placement;
|
|
11
11
|
showArrow?: boolean;
|
|
12
|
-
|
|
12
|
+
popupProps?: TooltipPopupProps;
|
|
13
|
+
positionerProps?: TooltipPositionerProps;
|
|
13
14
|
triggerProps?: TooltipTriggerProps;
|
|
14
15
|
portalProps?: TooltipPortalProps;
|
|
15
16
|
arrowProps?: TooltipArrowProps;
|
|
16
17
|
}
|
|
17
|
-
type TooltipEmits = TooltipRootEmits &
|
|
18
|
+
type TooltipEmits = TooltipRootEmits & TooltipPositionerEmits;
|
|
18
19
|
//#endregion
|
|
19
20
|
export { TooltipEmits, TooltipProps };
|
|
@@ -1,28 +1,30 @@
|
|
|
1
1
|
import { TreeVirtualizerProps } from "./types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue3 from "vue";
|
|
3
|
+
import * as _soybeanjs_headless0 from "@soybeanjs/headless";
|
|
3
4
|
import { MaybeArray, TreeItemData } from "@soybeanjs/headless";
|
|
5
|
+
import * as _tanstack_vue_virtual0 from "@tanstack/vue-virtual";
|
|
4
6
|
|
|
5
7
|
//#region src/components/tree/tree-virtualizer.vue.d.ts
|
|
6
8
|
declare const __VLS_export: <T extends TreeItemData, U extends MaybeArray<string> | undefined, 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<{
|
|
7
|
-
props: __VLS_PrettifyLocal<TreeVirtualizerProps<T, U, M> & {
|
|
9
|
+
props: vue3.PublicProps & __VLS_PrettifyLocal<TreeVirtualizerProps<T, U, M> & {
|
|
8
10
|
"onUpdate:modelValue"?: ((value: string | ((U extends string ? false : M extends true ? true : false) extends infer T_1 ? T_1 extends (U extends string ? false : M extends true ? true : false) ? T_1 extends true ? string[] : string : never : never)) => any) | undefined;
|
|
9
11
|
"onUpdate:expanded"?: ((value: string[]) => any) | undefined;
|
|
10
|
-
}> &
|
|
12
|
+
}> & (typeof globalThis extends {
|
|
11
13
|
__VLS_PROPS_FALLBACK: infer P;
|
|
12
14
|
} ? P : {});
|
|
13
15
|
expose: (exposed: {}) => void;
|
|
14
16
|
attrs: any;
|
|
15
17
|
slots: {
|
|
16
18
|
item?: (props: {
|
|
17
|
-
key:
|
|
18
|
-
virtualItem:
|
|
19
|
-
item:
|
|
19
|
+
key: number;
|
|
20
|
+
virtualItem: _tanstack_vue_virtual0.VirtualItem;
|
|
21
|
+
item: _soybeanjs_headless0.FlattenedItem<T>;
|
|
20
22
|
modelValue: U;
|
|
21
|
-
expanded:
|
|
23
|
+
expanded: string[];
|
|
22
24
|
}) => any;
|
|
23
25
|
};
|
|
24
26
|
emit: ((evt: "update:modelValue", value: string | ((U extends string ? false : M extends true ? true : false) extends infer T_1 ? T_1 extends (U extends string ? false : M extends true ? true : false) ? T_1 extends true ? string[] : string : never : never)) => void) & ((evt: "update:expanded", value: string[]) => void);
|
|
25
|
-
}>) =>
|
|
27
|
+
}>) => vue3.VNode & {
|
|
26
28
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
27
29
|
};
|
|
28
30
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as vue1 from "vue";
|
|
2
|
+
import * as _soybeanjs_headless0 from "@soybeanjs/headless";
|
|
2
3
|
import { MaybeArray, TreeItemData, TreeRootProps } from "@soybeanjs/headless";
|
|
3
4
|
|
|
4
5
|
//#region src/components/tree/tree.vue.d.ts
|
|
5
6
|
declare const __VLS_export: <T extends TreeItemData, U extends MaybeArray<string> | undefined, 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<{
|
|
6
|
-
props: __VLS_PrettifyLocal<TreeRootProps<T, U, M> & {
|
|
7
|
+
props: vue1.PublicProps & __VLS_PrettifyLocal<TreeRootProps<T, U, M> & {
|
|
7
8
|
"onUpdate:modelValue"?: ((value: string | ((U extends string ? false : M extends true ? true : false) extends infer T_1 ? T_1 extends (U extends string ? false : M extends true ? true : false) ? T_1 extends true ? string[] : string : never : never)) => any) | undefined;
|
|
8
9
|
"onUpdate:expanded"?: ((value: string[]) => any) | undefined;
|
|
9
|
-
}> &
|
|
10
|
+
}> & (typeof globalThis extends {
|
|
10
11
|
__VLS_PROPS_FALLBACK: infer P;
|
|
11
12
|
} ? P : {});
|
|
12
13
|
expose: (exposed: {}) => void;
|
|
@@ -15,16 +16,16 @@ declare const __VLS_export: <T extends TreeItemData, U extends MaybeArray<string
|
|
|
15
16
|
top?: (props: {}) => any;
|
|
16
17
|
} & {
|
|
17
18
|
item?: (props: {
|
|
18
|
-
key:
|
|
19
|
-
item:
|
|
20
|
-
modelValue:
|
|
21
|
-
expanded:
|
|
19
|
+
key: string;
|
|
20
|
+
item: _soybeanjs_headless0.FlattenedItem<T>;
|
|
21
|
+
modelValue: U | undefined;
|
|
22
|
+
expanded: string[];
|
|
22
23
|
}) => any;
|
|
23
24
|
} & {
|
|
24
25
|
bottom?: (props: {}) => any;
|
|
25
26
|
};
|
|
26
27
|
emit: ((evt: "update:modelValue", value: string | ((U extends string ? false : M extends true ? true : false) extends infer T_1 ? T_1 extends (U extends string ? false : M extends true ? true : false) ? T_1 extends true ? string[] : string : never : never)) => void) & ((evt: "update:expanded", value: string[]) => void);
|
|
27
|
-
}>) =>
|
|
28
|
+
}>) => vue1.VNode & {
|
|
28
29
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
29
30
|
};
|
|
30
31
|
declare const _default: typeof __VLS_export;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useContext as e}from"@soybeanjs/headless/composables";const[t,n]=e(`TreeMenu`,e=>e),[r,i]=e(`
|
|
1
|
+
import{useContext as e}from"@soybeanjs/headless/composables";const[t,n]=e(`TreeMenu`,e=>e),[r,i]=e(`TreeMenuExtraTheme`,e=>e);export{t as provideTreeMenuContext,r as provideTreeMenuExtraThemeContext,n as useTreeMenuContext,i as useTreeMenuExtraThemeContext};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { TreeMenuBaseOptionData, TreeMenuContextParams, TreeMenuEmits,
|
|
1
|
+
import { TreeMenuBaseOptionData, TreeMenuContextParams, TreeMenuEmits, TreeMenuExtendedUi, TreeMenuExtraThemeContextParams, TreeMenuExtraThemeSlot, TreeMenuGroupOptionData, TreeMenuItemEmits, TreeMenuOptionData, TreeMenuOptionProps, TreeMenuOptionSlotProps, TreeMenuProps } from "./types.js";
|
|
2
2
|
import { _default } from "./tree-menu.vue.js";
|
|
3
|
-
import { _default as _default$1 } from "./tree-menu-item
|
|
3
|
+
import { _default as _default$1 } from "./tree-menu-styled-item.vue.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={collapsedWidth:`--soybean-tree-menu-collapsed-width`,indent:`--soybean-tree-menu-indent`};function t(e){return`isGroup`in e&&e.isGroup}function n(e){
|
|
1
|
+
const e={collapsedWidth:`--soybean-tree-menu-collapsed-width`,indent:`--soybean-tree-menu-indent`};function t(e){return`isGroup`in e&&e.isGroup}function n(e,t,r=!0){return!r&&e.value===t?!0:e?.children?.some(e=>n(e,t,!1))??!1}export{n as isChildActive,t as isGroupTreeMenu,e as treeMenuCssVars};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"../button/button-icon.js";import t from"../icon/icon.js";import n from"../badge/badge.js";import r from"../dropdown-menu/dropdown-menu.js";import i from"../tag/tag.js";import{useTreeMenuContext as a,useTreeMenuExtraThemeContext as o}from"./context.js";import{Fragment as s,computed as c,createBlock as l,createCommentVNode as u,createElementBlock as d,createElementVNode as f,createVNode as p,defineComponent as m,mergeProps as h,normalizeClass as g,openBlock as _,renderSlot as v,toDisplayString as y,unref as b,withCtx as x,withModifiers as S}from"vue";import{useTreeMenuRootContext as C}from"@soybeanjs/headless";var w=m({name:`STreeMenuOptionSlot`,__name:`tree-menu-option-slot`,props:{showLinkIcon:{type:Boolean},item:{}},setup(m){let w=m,{collapsed:T}=C(`TreeMenuOptionSlot`),{size:E}=a(`TreeMenuOptionSlot`),D=o(`TreeMenuOptionSlot`),O=c(()=>!!w.item.children?.length),k=c(()=>({color:`accent`,variant:`raw`,...w.item.tagProps,content:w.item.tag}));return(a,o)=>(_(),d(s,null,[v(a.$slots,`leading`,{item:m.item},()=>[m.item.icon?(_(),l(t,{key:0,icon:m.item.icon},null,8,[`icon`])):u(`v-if`,!0)]),v(a.$slots,`default`,{item:m.item},()=>[m.item.badge?(_(),l(n,h({key:0},m.item.badgeProps,{size:b(E),content:m.item.badge,class:b(D).itemBadge}),{default:x(()=>[f(`span`,{class:g(b(D).itemLabel)},y(m.item.label),3)]),_:1},16,[`size`,`content`,`class`])):(_(),d(`span`,{key:1,class:g(b(D).itemLabel)},y(m.item.label),3))]),m.showLinkIcon?(_(),l(t,{key:0,icon:`lucide:arrow-up-right`,class:g(b(D).itemLinkIcon)},null,8,[`class`])):u(`v-if`,!0),m.item.tag?(_(),l(i,h({key:1},k.value,{size:b(E),content:m.item.tag,class:b(D).itemTag}),null,16,[`size`,`content`,`class`])):u(`v-if`,!0),!b(T)&&m.item.actions?.length?(_(),l(r,h({key:2},m.item.actionMenuProps,{size:b(E),items:m.item.actions,onSelect:m.item.onActionSelect}),{trigger:x(()=>[p(e,{icon:`lucide:ellipsis`,size:b(E),class:g(b(D).itemAction),onClick:o[0]||=S(()=>{},[`stop`])},null,8,[`size`,`class`])]),_:1},16,[`size`,`items`,`onSelect`])):u(`v-if`,!0),v(a.$slots,`trailing`,{item:m.item}),O.value?(_(),l(t,{key:3,icon:`lucide:chevron-right`,class:g(b(D).collapsibleIcon)},null,8,[`class`])):u(`v-if`,!0)],64))}});export{w as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"../link/link.js";import t from"../dropdown-menu/dropdown-menu.js";import n from"../tooltip/tooltip.js";import{useTreeMenuContext as r,useTreeMenuExtraThemeContext as i}from"./context.js";import a from"./tree-menu-option-slot.js";import{isChildActive as o}from"./shared.js";import{Fragment as s,computed as c,createBlock as l,createCommentVNode as u,createElementBlock as d,createElementVNode as f,createSlots as p,createVNode as m,defineComponent as h,guardReactiveProps as g,mergeProps as _,normalizeClass as v,normalizeProps as y,openBlock as b,renderList as x,renderSlot as S,resolveComponent as C,resolveDynamicComponent as w,unref as T,useSlots as E,withCtx as D}from"vue";import{TreeMenuButton as O,TreeMenuCollapsible as k,TreeMenuItem as A,TreeMenuSub as j,useTreeMenuRootContext as M}from"@soybeanjs/headless";var N=h({name:`STreeMenuOption`,__name:`tree-menu-option`,props:{item:{}},emits:[`selectDropdown`],setup(h,{emit:N}){let P=h,F=N,I=E(),{collapsed:L,modelValue:R,onModelValueChange:z}=M(`TreeMenuOption`),{size:B,side:V}=r(`TreeMenuOption`),H=i(`TreeMenuOption`),U=c(()=>Object.keys(I)),W=c(()=>!!P.item.children?.length),G=c(()=>o(P.item,R.value)),K=c(()=>!!(P.item.to||P.item.href)),q=c(()=>{let{disabled:e,to:t,href:n,target:r,external:i}=P.item;return K.value?{disabled:e,to:t,href:n,target:r,external:i}:{}}),J=c(()=>L.value&&W.value),Y=c(()=>L.value&&!J.value?P.item.label:void 0),X=c(()=>V.value===`left`?`right`:`left`),Z=c(()=>({...P.item.tooltipProps,placement:P.item.tooltipProps?.placement??X.value})),Q=c(()=>({...P.item.dropdownMenuProps,trigger:P.item.dropdownMenuProps?.trigger??`hover`,placement:P.item.dropdownMenuProps?.placement??X.value})),$=()=>{P.item.disabled||z(P.item.value)},ee=e=>{P.item.disabled||(z(e.value),F(`selectDropdown`,e.value))};return(r,i)=>{let o=C(`STreeMenuOption`);return W.value?(b(),l(T(A),{key:1,"as-child":``,value:h.item.value,disabled:h.item.disabled},{default:D(()=>[m(T(k),{as:`li`,"disabled-collapsible":T(L)},{trigger:D(()=>[m(T(O),{"disabled-active":``,"data-child-active":G.value},{default:D(()=>[m(a,{item:h.item},p({_:2},[x(U.value,e=>({name:e,fn:D(t=>[S(r.$slots,e,y(g(t)))])}))]),1032,[`item`])]),_:3},8,[`data-child-active`])]),extra:D(()=>[J.value?(b(),l(t,_({key:0},Q.value,{items:h.item.children??[],disabled:h.item.disabled,size:T(B),"data-menu":h.item.label,onSelect:ee}),{trigger:D(()=>[f(`div`,{class:v(T(H).itemAbsolute)},null,2)]),_:1},16,[`items`,`disabled`,`size`,`data-menu`])):u(`v-if`,!0)]),default:D(()=>[m(T(j),null,{default:D(()=>[(b(!0),d(s,null,x(h.item.children,e=>(b(),l(o,{key:e.value,item:e},p({_:2},[x(U.value,e=>({name:e,fn:D(t=>[S(r.$slots,e,_({ref_for:!0},t))])}))]),1032,[`item`]))),128))]),_:3})]),_:3},8,[`disabled-collapsible`])]),_:3},8,[`value`,`disabled`])):(b(),l(T(A),{key:0,value:h.item.value,disabled:h.item.disabled},{default:D(()=>[K.value?(b(),l(T(O),{key:0,"as-child":``},{default:D(()=>[m(e,y(g(q.value)),{default:D(({isHref:e})=>[m(a,{item:h.item,"show-link-icon":e},p({_:2},[x(U.value,e=>({name:e,fn:D(t=>[S(r.$slots,e,y(g(t)))])}))]),1032,[`item`,`show-link-icon`])]),_:3},16)]),_:3})):(b(),l(T(O),{key:1},{default:D(()=>[m(a,{item:h.item},p({_:2},[x(U.value,e=>({name:e,fn:D(t=>[S(r.$slots,e,y(g(t)))])}))]),1032,[`item`])]),_:3})),Y.value?(b(),l(n,_({key:2},Z.value,{size:T(B),content:Y.value}),{trigger:D(()=>[(b(),l(w(K.value?e:`div`),_(q.value,{class:T(H).itemAbsolute,onClick:$}),null,16,[`class`]))]),_:1},16,[`size`,`content`])):u(`v-if`,!0)]),_:3},8,[`value`,`disabled`]))}}});export{N as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createElementBlock as e,createElementVNode as t,defineComponent as n,normalizeClass as r,openBlock as i,renderSlot as a,unref as o}from"vue";import{useTreeMenuThemeContext as s}from"@soybeanjs/headless";var c=n({name:`STreeMenuStyledItem`,__name:`tree-menu-styled-item`,setup(n){let c=s(`TreeMenuStyledItem`);return(n,s)=>(i(),e(`li`,{class:r(o(c).item)},[t(`button`,{class:r(o(c).button)},[a(n.$slots,`default`)],2)],2))}});export{c as default};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as vue157 from "vue";
|
|
2
|
+
|
|
3
|
+
//#region src/components/tree-menu/tree-menu-styled-item.vue.d.ts
|
|
4
|
+
declare var __VLS_1: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
default?: (props: typeof __VLS_1) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: vue157.DefineComponent<{}, {}, {}, {}, {}, vue157.ComponentOptionsMixin, vue157.ComponentOptionsMixin, {}, string, vue157.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue157.ComponentProvideOptions, true, {}, any>;
|
|
9
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
12
|
+
new (): {
|
|
13
|
+
$slots: S;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { _default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mergeSlotVariants as e}from"../../theme/shared.js";import{themeSizeMap as t,themeSizeRatio as n}from"../../theme/config.js";import{treeMenuVariants as r}from"../../variants/tree-menu.js";import{provideTreeMenuContext as i,
|
|
1
|
+
import{mergeSlotVariants as e}from"../../theme/shared.js";import{themeSizeMap as t,themeSizeRatio as n}from"../../theme/config.js";import{treeMenuVariants as r}from"../../variants/tree-menu.js";import{provideTreeMenuContext as i,provideTreeMenuExtraThemeContext as a}from"./context.js";import{isGroupTreeMenu as o,treeMenuCssVars as s}from"./shared.js";import c from"./tree-menu-option.js";import{Fragment as l,computed as u,createBlock as d,createElementBlock as f,createSlots as p,createTextVNode as m,createVNode as h,defineComponent as g,mergeProps as _,openBlock as v,renderList as y,renderSlot as b,toDisplayString as x,toHandlers as S,unref as C,useSlots as w,withCtx as T}from"vue";import{useForwardListeners as E,useOmitProps as D}from"@soybeanjs/headless/composables";import{TreeMenuGroup as O,TreeMenuGroupLabel as k,TreeMenuGroupRoot as A,TreeMenuRoot as j,provideTreeMenuThemeContext as M}from"@soybeanjs/headless";import{transformPropsToContext as N}from"@soybeanjs/headless/shared";var P=g({name:`STreeMenu`,__name:`tree-menu`,props:{size:{default:`md`},ui:{},side:{default:`left`},items:{},collapsedWidth:{default:50},indent:{default:16},groupRootProps:{},groupProps:{},groupLabelProps:{},buttonProps:{},collapsibleProps:{},subProps:{},modelValue:{},defaultValue:{},expanded:{},defaultExpanded:{},collapsed:{type:Boolean,default:void 0},defaultCollapsed:{type:Boolean}},emits:[`update:modelValue`,`update:expanded`,`update:collapsed`,`selectDropdown`],setup(g,{emit:P}){let F=g,I=P,L=w(),R=u(()=>Object.keys(L).filter(e=>e.startsWith(`item-`))),z=D(F,[`size`,`side`,`ui`,`items`,`collapsedWidth`,`indent`,`groupRootProps`,`groupProps`,`groupLabelProps`,`buttonProps`,`collapsibleProps`,`subProps`]),B=E(I),V=u(()=>{let e=F.collapsedWidth*n[F.size],r=F.indent*n[F.size];return{[s.collapsedWidth]:`${e/t.md}rem`,[s.indent]:`${r/t.md}rem`}}),H=u(()=>e(r({size:F.size}),F.ui));return M(H),a(H),i(N(F,[`size`,`side`])),(e,t)=>(v(),d(C(j),_(C(z),{style:V.value},S(C(B))),{default:T(()=>[b(e.$slots,`top`),(v(!0),f(l,null,y(g.items,t=>(v(),f(l,{key:t.value},[C(o)(t)?(v(),d(C(A),{key:0},{default:T(()=>[h(C(k),null,{default:T(()=>[m(x(t.label),1)]),_:2},1024),h(C(O),null,{default:T(()=>[(v(!0),f(l,null,y(t.children,t=>(v(),d(c,{key:t.value,item:t},p({_:2},[y(R.value,t=>({name:t,fn:T(n=>[b(e.$slots,t,_({ref_for:!0},n))])}))]),1032,[`item`]))),128))]),_:2},1024)]),_:2},1024)):(v(),d(c,{key:1,item:t},p({_:2},[y(R.value,t=>({name:t,fn:T(n=>[b(e.$slots,t,_({ref_for:!0},n))])}))]),1032,[`item`]))],64))),128)),b(e.$slots,`bottom`)]),_:3},16,[`style`]))}});export{P as default};
|
|
@@ -1,44 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as
|
|
1
|
+
import { TreeMenuOptionData, TreeMenuProps } from "./types.js";
|
|
2
|
+
import * as vue155 from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/tree-menu/tree-menu.vue.d.ts
|
|
5
5
|
declare const __VLS_export: <T extends TreeMenuOptionData = TreeMenuOptionData>(__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
|
-
props: __VLS_PrettifyLocal<TreeMenuProps<T> & {
|
|
6
|
+
props: vue155.PublicProps & __VLS_PrettifyLocal<TreeMenuProps<T> & {
|
|
7
7
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
8
8
|
"onUpdate:expanded"?: ((value: string[]) => any) | undefined;
|
|
9
|
-
onSelectDropdown?: ((value: string) => any) | undefined;
|
|
10
9
|
"onUpdate:collapsed"?: ((value: boolean) => any) | undefined;
|
|
11
|
-
|
|
10
|
+
onSelectDropdown?: ((value: string) => any) | undefined;
|
|
11
|
+
}> & (typeof globalThis extends {
|
|
12
12
|
__VLS_PROPS_FALLBACK: infer P;
|
|
13
13
|
} ? P : {});
|
|
14
14
|
expose: (exposed: {}) => void;
|
|
15
15
|
attrs: any;
|
|
16
16
|
slots: {
|
|
17
|
-
top
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
item: T & TreeMenuGroupOptionData;
|
|
21
|
-
}) => any;
|
|
22
|
-
} & {
|
|
23
|
-
item?: (props: {
|
|
17
|
+
top: () => any;
|
|
18
|
+
bottom: () => any;
|
|
19
|
+
item: (props: {
|
|
24
20
|
item: T;
|
|
25
|
-
level: number;
|
|
26
21
|
}) => any;
|
|
27
|
-
|
|
28
|
-
'item-leading'?: (props: {
|
|
22
|
+
'item-leading': (props: {
|
|
29
23
|
item: T;
|
|
30
|
-
level: number;
|
|
31
24
|
}) => any;
|
|
32
|
-
|
|
33
|
-
'item-trailing'?: (props: {
|
|
25
|
+
'item-trailing': (props: {
|
|
34
26
|
item: T;
|
|
35
|
-
level: number;
|
|
36
27
|
}) => any;
|
|
37
|
-
} & {
|
|
38
|
-
bottom?: (props: {}) => any;
|
|
39
28
|
};
|
|
40
|
-
emit: ((evt: "update:modelValue", value: string) => void) & ((evt: "update:expanded", value: string[]) => void) & ((evt: "
|
|
41
|
-
}>) =>
|
|
29
|
+
emit: ((evt: "update:modelValue", value: string) => void) & ((evt: "update:expanded", value: string[]) => void) & ((evt: "update:collapsed", value: boolean) => void) & ((evt: "selectDropdown", value: string) => void);
|
|
30
|
+
}>) => vue155.VNode & {
|
|
42
31
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
43
32
|
};
|
|
44
33
|
declare const _default: typeof __VLS_export;
|
|
@@ -6,75 +6,109 @@ import { MenuOptionData } from "../menu/types.js";
|
|
|
6
6
|
import { DropdownMenuProps } from "../dropdown-menu/types.js";
|
|
7
7
|
import { TagProps as TagProps$1 } from "../tag/types.js";
|
|
8
8
|
import { TooltipProps } from "../tooltip/types.js";
|
|
9
|
-
import { ComputedRef
|
|
10
|
-
import { ClassValue,
|
|
9
|
+
import { ComputedRef } from "vue";
|
|
10
|
+
import { ClassValue, HorizontalSide, LinkBaseProps, PropsToContext, TreeMenuBaseItemProps, TreeMenuButtonProps, TreeMenuCollapsibleProps, TreeMenuGroupLabelProps, TreeMenuGroupProps, TreeMenuGroupRootProps, TreeMenuRootEmits, TreeMenuRootProps, TreeMenuSubProps, TreeMenuUi } from "@soybeanjs/headless";
|
|
11
11
|
|
|
12
12
|
//#region src/components/tree-menu/types.d.ts
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
interface TreeMenuBaseOptionData extends TreeMenuBaseItemProps, LinkBaseProps {
|
|
14
|
+
/**
|
|
15
|
+
* The label of the option.
|
|
16
|
+
*/
|
|
15
17
|
label: string;
|
|
16
|
-
|
|
18
|
+
/**
|
|
19
|
+
* The icon of the option.
|
|
20
|
+
*/
|
|
17
21
|
icon?: IconValue;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
linkProps?: LinkProps;
|
|
22
|
+
/**
|
|
23
|
+
* The badge of the option.
|
|
24
|
+
*/
|
|
22
25
|
badge?: string;
|
|
23
|
-
|
|
26
|
+
/**
|
|
27
|
+
* The badge props of the option.
|
|
28
|
+
*/
|
|
29
|
+
badgeProps?: Omit<BadgeProps, 'content'>;
|
|
30
|
+
/**
|
|
31
|
+
* The tag of the option.
|
|
32
|
+
*/
|
|
24
33
|
tag?: string;
|
|
25
|
-
|
|
34
|
+
/**
|
|
35
|
+
* The tag props of the option.
|
|
36
|
+
*/
|
|
37
|
+
tagProps?: Omit<TagProps$1, 'content'>;
|
|
38
|
+
/**
|
|
39
|
+
* The tooltip props of the option.
|
|
40
|
+
*/
|
|
41
|
+
tooltipProps?: TooltipProps;
|
|
42
|
+
/**
|
|
43
|
+
* The dropdown menu props of the option.
|
|
44
|
+
*/
|
|
45
|
+
dropdownMenuProps?: Omit<DropdownMenuProps, 'items'>;
|
|
46
|
+
/**
|
|
47
|
+
* The actions of the option.
|
|
48
|
+
*/
|
|
26
49
|
actions?: MenuOptionData[];
|
|
50
|
+
/**
|
|
51
|
+
* The action menu props of the option.
|
|
52
|
+
*/
|
|
53
|
+
actionMenuProps?: Omit<DropdownMenuProps, 'items'>;
|
|
54
|
+
/**
|
|
55
|
+
* The callback function when an action is selected.
|
|
56
|
+
*/
|
|
27
57
|
onActionSelect?: (action: MenuOptionData) => void;
|
|
58
|
+
/**
|
|
59
|
+
* The children of the option.
|
|
60
|
+
*/
|
|
28
61
|
children?: TreeMenuBaseOptionData[];
|
|
29
62
|
}
|
|
30
|
-
interface TreeMenuGroupOptionData
|
|
63
|
+
interface TreeMenuGroupOptionData {
|
|
31
64
|
isGroup: true;
|
|
65
|
+
label: string;
|
|
66
|
+
value: string;
|
|
67
|
+
children: TreeMenuBaseOptionData[];
|
|
32
68
|
}
|
|
33
69
|
type TreeMenuOptionData = TreeMenuBaseOptionData | TreeMenuGroupOptionData;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
interface TreeMenuItemProps extends TreeItemProps, TreeMenuBaseOptionData {
|
|
37
|
-
actionMenuProps?: Omit<DropdownMenuProps, 'items'>;
|
|
38
|
-
tooltipProps?: TooltipProps;
|
|
39
|
-
dropdownMenuProps?: Omit<DropdownMenuProps, 'items'>;
|
|
70
|
+
interface TreeMenuOptionProps {
|
|
71
|
+
item: TreeMenuBaseOptionData;
|
|
40
72
|
}
|
|
41
|
-
type
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
interface TreeMenuProps<T extends TreeMenuOptionData = TreeMenuOptionData> extends TreeRootProps<T, string, false> {
|
|
73
|
+
type TreeMenuExtraThemeSlot = 'itemLabel' | 'itemAbsolute' | 'itemBadge' | 'itemTag' | 'itemAction' | 'itemLinkIcon' | 'collapsibleIcon';
|
|
74
|
+
type TreeMenuExtendedUi = TreeMenuUi & Record<TreeMenuExtraThemeSlot, ClassValue>;
|
|
75
|
+
interface TreeMenuProps<T extends TreeMenuOptionData = TreeMenuOptionData> extends TreeMenuRootProps {
|
|
45
76
|
size?: ThemeSize;
|
|
46
|
-
ui?: Partial<
|
|
77
|
+
ui?: Partial<TreeMenuExtendedUi>;
|
|
47
78
|
/**
|
|
48
|
-
*
|
|
79
|
+
* The side of the tree menu.
|
|
49
80
|
*
|
|
50
|
-
* @default
|
|
51
|
-
*/
|
|
52
|
-
collapsed?: boolean;
|
|
53
|
-
/**
|
|
54
|
-
* The value of the sidebar menu when it's collapsed.
|
|
81
|
+
* @default 'left'
|
|
55
82
|
*/
|
|
56
|
-
|
|
83
|
+
side?: HorizontalSide;
|
|
84
|
+
items?: T[];
|
|
57
85
|
/**
|
|
58
86
|
* The width of the sidebar menu when it's collapsed.
|
|
59
87
|
*
|
|
60
88
|
* @default 50
|
|
61
89
|
*/
|
|
62
90
|
collapsedWidth?: number;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
91
|
+
/**
|
|
92
|
+
* The width of the indent.
|
|
93
|
+
*
|
|
94
|
+
* @default 16
|
|
95
|
+
*/
|
|
96
|
+
indent?: number;
|
|
97
|
+
groupRootProps?: TreeMenuGroupRootProps;
|
|
98
|
+
groupProps?: TreeMenuGroupProps;
|
|
99
|
+
groupLabelProps?: TreeMenuGroupLabelProps;
|
|
100
|
+
buttonProps?: Omit<TreeMenuButtonProps, 'disabledActive'>;
|
|
101
|
+
collapsibleProps?: Omit<TreeMenuCollapsibleProps, 'as' | 'asChild'>;
|
|
102
|
+
subProps?: Omit<TreeMenuSubProps, 'as' | 'asChild'>;
|
|
75
103
|
}
|
|
76
|
-
interface
|
|
77
|
-
|
|
104
|
+
interface TreeMenuOptionSlotProps extends TreeMenuOptionProps {
|
|
105
|
+
showLinkIcon?: boolean;
|
|
78
106
|
}
|
|
107
|
+
type TreeMenuItemEmits = {
|
|
108
|
+
selectDropdown: [value: string];
|
|
109
|
+
};
|
|
110
|
+
interface TreeMenuContextParams extends PropsToContext<TreeMenuProps, 'size' | 'side'> {}
|
|
111
|
+
type TreeMenuEmits = TreeMenuRootEmits & TreeMenuItemEmits;
|
|
112
|
+
type TreeMenuExtraThemeContextParams = ComputedRef<Partial<TreeMenuExtendedUi>>;
|
|
79
113
|
//#endregion
|
|
80
|
-
export { TreeMenuBaseOptionData, TreeMenuContextParams, TreeMenuEmits,
|
|
114
|
+
export { TreeMenuBaseOptionData, TreeMenuContextParams, TreeMenuEmits, TreeMenuExtendedUi, TreeMenuExtraThemeContextParams, TreeMenuExtraThemeSlot, TreeMenuGroupOptionData, TreeMenuItemEmits, TreeMenuOptionData, TreeMenuOptionProps, TreeMenuOptionSlotProps, TreeMenuProps };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { VirtualizerProps } from "./types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue0 from "vue";
|
|
3
3
|
import * as _tanstack_vue_virtual0 from "@tanstack/vue-virtual";
|
|
4
4
|
|
|
5
5
|
//#region src/components/virtualizer/virtualizer.vue.d.ts
|
|
6
6
|
declare const __VLS_export: <T extends Record<string, any>>(__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<{
|
|
7
|
-
props: __VLS_PrettifyLocal<VirtualizerProps<T>> &
|
|
7
|
+
props: vue0.PublicProps & __VLS_PrettifyLocal<VirtualizerProps<T>> & (typeof globalThis extends {
|
|
8
8
|
__VLS_PROPS_FALLBACK: infer P;
|
|
9
9
|
} ? P : {});
|
|
10
10
|
expose: (exposed: {}) => void;
|
|
@@ -17,7 +17,7 @@ declare const __VLS_export: <T extends Record<string, any>>(__VLS_props: NonNull
|
|
|
17
17
|
}) => any;
|
|
18
18
|
};
|
|
19
19
|
emit: {};
|
|
20
|
-
}>) =>
|
|
20
|
+
}>) => vue0.VNode & {
|
|
21
21
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
22
22
|
};
|
|
23
23
|
declare const _default: typeof __VLS_export;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={accordion:[`SAccordion`],alertDialog:[`SAlertDialog`,`SAlertDialogCancel`,`SAlertDialogAction`],alert:[`SAlert`],arrow:[`SArrow`],avatar:[`SAvatar`],card:[`SCard`],breadcrumb:[`SBreadcrumb`,`SBreadcrumbPage`,`SBreadcrumbEllipsis`],checkbox:[`SCheckboxGroup`,`SCheckbox`,`SCheckboxCardGroup`,`SCheckboxCard`],badge:[`SBadge`],collapsible:[`SCollapsible`,`SCollapsibleContent`,`SCollapsibleTrigger`],configProvider:[`SConfigProvider`],button:[`SButton`,`SButtonLoading`,`SButtonIcon`,`SButtonLink`,`SButtonGroup`],command:[`SCommand`],dialog:[`SDialog`,`SDialogClose`,`SDialogPure`],aspectRatio:[`SAspectRatio`],contextMenu:[`SContextMenu`,`SContextMenuCheckbox`,`SContextMenuRadio`,`SContextMenuWrapper`],drawer:[`SDrawer`,`SDrawerClose`],form:[`SForm`,`SFormField`,`SFormFieldArray`],dropdownMenu:[`SDropdownMenu`,`SDropdownMenuCheckbox`,`SDropdownMenuRadio`,`SDropdownMenuWrapper`],input:[`SInput`],kbd:[`SKbd`],label:[`SLabel`],icon:[`SIcon`],layout:[`SLayout`,`SLayoutTrigger`],link:[`SLink`],list:[`SList`,`SListItem`],menu:[`SMenuOption`,`SMenuOptions`,`SMenuCheckboxOptions`,`SMenuRadioOptions`],navigationMenu:[`SNavigationMenu`],pagination:[`SPagination`],numberInput:[`SNumberInput`],password:[`SPassword`],popover:[`SPopover`],radioGroup:[`SRadioGroup`,`SRadio`,`SRadioCard`,`SRadioCardGroup`],segment:[`SSegment`],separator:[`SSeparator`],switch:[`SSwitch`],tabs:[`STabs`],select:[`SSelect`],textarea:[`STextarea`],tag:[`STag`],toast:[`SToast`,`SToastAction`,`SToastClose`],tooltip:[`STooltip`],treeMenu:[`STreeMenu`,`
|
|
1
|
+
const e={accordion:[`SAccordion`],alertDialog:[`SAlertDialog`,`SAlertDialogCancel`,`SAlertDialogAction`],alert:[`SAlert`],arrow:[`SArrow`],avatar:[`SAvatar`],card:[`SCard`],breadcrumb:[`SBreadcrumb`,`SBreadcrumbPage`,`SBreadcrumbEllipsis`],checkbox:[`SCheckboxGroup`,`SCheckbox`,`SCheckboxCardGroup`,`SCheckboxCard`],badge:[`SBadge`],collapsible:[`SCollapsible`,`SCollapsibleContent`,`SCollapsibleTrigger`],configProvider:[`SConfigProvider`],button:[`SButton`,`SButtonLoading`,`SButtonIcon`,`SButtonLink`,`SButtonGroup`],command:[`SCommand`],dialog:[`SDialog`,`SDialogClose`,`SDialogPure`],aspectRatio:[`SAspectRatio`],contextMenu:[`SContextMenu`,`SContextMenuCheckbox`,`SContextMenuRadio`,`SContextMenuWrapper`],drawer:[`SDrawer`,`SDrawerClose`],form:[`SForm`,`SFormField`,`SFormFieldArray`],dropdownMenu:[`SDropdownMenu`,`SDropdownMenuCheckbox`,`SDropdownMenuRadio`,`SDropdownMenuWrapper`],input:[`SInput`],kbd:[`SKbd`],label:[`SLabel`],icon:[`SIcon`],layout:[`SLayout`,`SLayoutTrigger`],link:[`SLink`],list:[`SList`,`SListItem`],menu:[`SMenuOption`,`SMenuOptions`,`SMenuCheckboxOptions`,`SMenuRadioOptions`],navigationMenu:[`SNavigationMenu`],pagination:[`SPagination`],numberInput:[`SNumberInput`],password:[`SPassword`],popover:[`SPopover`],radioGroup:[`SRadioGroup`,`SRadio`,`SRadioCard`,`SRadioCardGroup`],segment:[`SSegment`],separator:[`SSeparator`],switch:[`SSwitch`],tabs:[`STabs`],select:[`SSelect`],textarea:[`STextarea`],tag:[`STag`],toast:[`SToast`,`SToastAction`,`SToastClose`],tooltip:[`STooltip`],treeMenu:[`STreeMenu`,`STreeMenuStyledItem`],tree:[`STree`,`STreeVirtualizer`],virtualizer:[`SVirtualizer`]};export{e as components};
|