vlite3 0.0.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/README.md +72 -0
- package/_virtual/_plugin-vue_export-helper.js +9 -0
- package/components/Accordion/Accordion.vue.d.ts +42 -0
- package/components/Accordion/Accordion.vue.js +102 -0
- package/components/Accordion/Accordion.vue2.js +4 -0
- package/components/Accordion/AccordionContent.vue.d.ts +22 -0
- package/components/Accordion/AccordionContent.vue.js +7 -0
- package/components/Accordion/AccordionContent.vue2.js +47 -0
- package/components/Accordion/AccordionItem.vue.d.ts +54 -0
- package/components/Accordion/AccordionItem.vue.js +102 -0
- package/components/Accordion/AccordionItem.vue2.js +4 -0
- package/components/Accordion/AccordionTrigger.vue.d.ts +40 -0
- package/components/Accordion/AccordionTrigger.vue.js +72 -0
- package/components/Accordion/AccordionTrigger.vue2.js +4 -0
- package/components/Accordion/index.d.ts +5 -0
- package/components/Accordion/types.d.ts +30 -0
- package/components/Alert.vue.d.ts +36 -0
- package/components/Alert.vue.js +84 -0
- package/components/Alert.vue2.js +4 -0
- package/components/Avatar.vue.d.ts +32 -0
- package/components/Avatar.vue.js +78 -0
- package/components/Avatar.vue2.js +4 -0
- package/components/AvatarUploader/AvatarUploader.vue.d.ts +31 -0
- package/components/AvatarUploader/AvatarUploader.vue.js +104 -0
- package/components/AvatarUploader/AvatarUploader.vue2.js +4 -0
- package/components/AvatarUploader/index.d.ts +2 -0
- package/components/Badge.vue.d.ts +25 -0
- package/components/Badge.vue.js +31 -0
- package/components/Badge.vue2.js +4 -0
- package/components/Button.vue.d.ts +26 -0
- package/components/Button.vue.js +108 -0
- package/components/Button.vue2.js +4 -0
- package/components/ButtonGroup.vue.d.ts +29 -0
- package/components/ButtonGroup.vue.js +7 -0
- package/components/ButtonGroup.vue2.js +33 -0
- package/components/CheckBox.vue.d.ts +28 -0
- package/components/CheckBox.vue.js +114 -0
- package/components/CheckBox.vue2.js +4 -0
- package/components/Chip/Chip.vue.d.ts +33 -0
- package/components/Chip/Chip.vue.js +118 -0
- package/components/Chip/Chip.vue2.js +4 -0
- package/components/Chip/index.d.ts +2 -0
- package/components/Chip/types.d.ts +12 -0
- package/components/ChoiceBox/ChoiceBox.vue.d.ts +32 -0
- package/components/ChoiceBox/ChoiceBox.vue.js +141 -0
- package/components/ChoiceBox/ChoiceBox.vue2.js +4 -0
- package/components/ChoiceBox/index.d.ts +2 -0
- package/components/ColorPicker/ColorIro.vue.d.ts +18 -0
- package/components/ColorPicker/ColorIro.vue.js +142 -0
- package/components/ColorPicker/ColorIro.vue3.js +5 -0
- package/components/ColorPicker/ColorPicker.vue.d.ts +22 -0
- package/components/ColorPicker/ColorPicker.vue.js +55 -0
- package/components/ColorPicker/ColorPicker.vue2.js +4 -0
- package/components/ConfirmationModal.vue.d.ts +23 -0
- package/components/ConfirmationModal.vue.js +50 -0
- package/components/ConfirmationModal.vue2.js +4 -0
- package/components/DatePicker.vue.d.ts +44 -0
- package/components/DatePicker.vue.js +88 -0
- package/components/DatePicker.vue2.js +4 -0
- package/components/Dropdown/Dropdown.vue.d.ts +104 -0
- package/components/Dropdown/Dropdown.vue.js +200 -0
- package/components/Dropdown/Dropdown.vue2.js +4 -0
- package/components/Dropdown/DropdownGroupedLayout.vue.d.ts +21 -0
- package/components/Dropdown/DropdownGroupedLayout.vue.js +73 -0
- package/components/Dropdown/DropdownGroupedLayout.vue2.js +4 -0
- package/components/Dropdown/DropdownItem.vue.d.ts +35 -0
- package/components/Dropdown/DropdownItem.vue.js +56 -0
- package/components/Dropdown/DropdownItem.vue2.js +4 -0
- package/components/Dropdown/DropdownMenu.vue.d.ts +71 -0
- package/components/Dropdown/DropdownMenu.vue.js +211 -0
- package/components/Dropdown/DropdownMenu.vue2.js +4 -0
- package/components/Dropdown/DropdownTrigger.vue.d.ts +13 -0
- package/components/Dropdown/DropdownTrigger.vue.js +24 -0
- package/components/Dropdown/DropdownTrigger.vue2.js +4 -0
- package/components/Dropdown/composables/useDropdownIds.d.ts +5 -0
- package/components/Dropdown/composables/useDropdownIds.js +20 -0
- package/components/Dropdown/composables/useDropdownNavigation.d.ts +19 -0
- package/components/Dropdown/composables/useDropdownNavigation.js +53 -0
- package/components/Dropdown/composables/useDropdownSelection.d.ts +16 -0
- package/components/Dropdown/composables/useDropdownSelection.js +41 -0
- package/components/Dropdown/index.d.ts +6 -0
- package/components/FilePicker/FilePicker.vue.d.ts +57 -0
- package/components/FilePicker/FilePicker.vue.js +205 -0
- package/components/FilePicker/FilePicker.vue2.js +4 -0
- package/components/FilePicker/index.d.ts +2 -0
- package/components/FileTree/FileTree.vue.d.ts +20 -0
- package/components/FileTree/FileTree.vue.js +143 -0
- package/components/FileTree/FileTree.vue2.js +4 -0
- package/components/FileTree/FileTreeNode.vue.d.ts +28 -0
- package/components/FileTree/FileTreeNode.vue.js +157 -0
- package/components/FileTree/FileTreeNode.vue2.js +4 -0
- package/components/FileTree/index.d.ts +2 -0
- package/components/FileTree/types.d.ts +28 -0
- package/components/FileTree/useTreeSelection.d.ts +12 -0
- package/components/Heatmap/Heatmap.vue.d.ts +26 -0
- package/components/Heatmap/Heatmap.vue.js +7 -0
- package/components/Heatmap/Heatmap.vue2.js +338 -0
- package/components/Heatmap/index.d.ts +2 -0
- package/components/Heatmap/types.d.ts +66 -0
- package/components/Icon.vue.d.ts +7 -0
- package/components/Icon.vue.js +34 -0
- package/components/Icon.vue2.js +4 -0
- package/components/IconPicker.vue.d.ts +38 -0
- package/components/IconPicker.vue.js +124 -0
- package/components/IconPicker.vue2.js +4 -0
- package/components/Input.vue.d.ts +54 -0
- package/components/Input.vue.js +250 -0
- package/components/Input.vue2.js +4 -0
- package/components/Label.vue.d.ts +23 -0
- package/components/Label.vue.js +23 -0
- package/components/Label.vue2.js +4 -0
- package/components/Logo.vue.d.ts +2 -0
- package/components/Logo.vue.js +10 -0
- package/components/Logo.vue2.js +4 -0
- package/components/Masonry/Masonry.vue.d.ts +31 -0
- package/components/Masonry/Masonry.vue.js +7 -0
- package/components/Masonry/Masonry.vue2.js +77 -0
- package/components/Masonry/index.d.ts +2 -0
- package/components/Masonry/types.d.ts +33 -0
- package/components/Masonry/types.js +10 -0
- package/components/Modal.vue.d.ts +43 -0
- package/components/Modal.vue.js +100 -0
- package/components/Modal.vue2.js +4 -0
- package/components/MultiSelect/MultiSelect.vue.d.ts +40 -0
- package/components/MultiSelect/MultiSelect.vue.js +126 -0
- package/components/MultiSelect/MultiSelect.vue2.js +4 -0
- package/components/MultiSelect/index.d.ts +1 -0
- package/components/Navbar/Navbar.vue.d.ts +50 -0
- package/components/Navbar/Navbar.vue.js +201 -0
- package/components/Navbar/Navbar.vue2.js +4 -0
- package/components/Navbar/NavbarGroup.vue.d.ts +24 -0
- package/components/Navbar/NavbarGroup.vue.js +23 -0
- package/components/Navbar/NavbarGroup.vue2.js +4 -0
- package/components/Navbar/NavbarItem.vue.d.ts +40 -0
- package/components/Navbar/NavbarItem.vue.js +92 -0
- package/components/Navbar/NavbarItem.vue2.js +4 -0
- package/components/Navbar/index.d.ts +3 -0
- package/components/OTPInput/OTPInput.vue.d.ts +33 -0
- package/components/OTPInput/OTPInput.vue.js +123 -0
- package/components/OTPInput/OTPInput.vue2.js +4 -0
- package/components/OTPInput/index.d.ts +1 -0
- package/components/Pagination/Pagination.vue.d.ts +34 -0
- package/components/Pagination/Pagination.vue.js +198 -0
- package/components/Pagination/Pagination.vue2.js +4 -0
- package/components/Pagination/index.d.ts +1 -0
- package/components/PricingPlan/PricingPlan.vue.d.ts +22 -0
- package/components/PricingPlan/PricingPlan.vue.js +55 -0
- package/components/PricingPlan/PricingPlan.vue2.js +4 -0
- package/components/PricingPlan/PricingPlanItem.vue.d.ts +17 -0
- package/components/PricingPlan/PricingPlanItem.vue.js +92 -0
- package/components/PricingPlan/PricingPlanItem.vue2.js +4 -0
- package/components/PricingPlan/index.d.ts +3 -0
- package/components/PricingPlan/types.d.ts +25 -0
- package/components/SidePanel.vue.d.ts +58 -0
- package/components/SidePanel.vue.js +7 -0
- package/components/SidePanel.vue2.js +123 -0
- package/components/SidebarMenu/SidebarMenu.vue.d.ts +9 -0
- package/components/SidebarMenu/SidebarMenu.vue.js +65 -0
- package/components/SidebarMenu/SidebarMenu.vue2.js +4 -0
- package/components/SidebarMenu/SidebarMenuItem.vue.d.ts +9 -0
- package/components/SidebarMenu/SidebarMenuItem.vue.js +7 -0
- package/components/SidebarMenu/SidebarMenuItem.vue2.js +222 -0
- package/components/SidebarMenu/index.d.ts +3 -0
- package/components/SidebarMenu/types.d.ts +52 -0
- package/components/Slider.vue.d.ts +29 -0
- package/components/Slider.vue.js +124 -0
- package/components/Slider.vue2.js +4 -0
- package/components/Switch.vue.d.ts +16 -0
- package/components/Switch.vue.js +43 -0
- package/components/Switch.vue2.js +4 -0
- package/components/Tabes/Tabes.vue.d.ts +20 -0
- package/components/Tabes/Tabes.vue.js +86 -0
- package/components/Tabes/Tabes.vue2.js +4 -0
- package/components/Tabes/index.d.ts +2 -0
- package/components/Tabes/types.d.ts +8 -0
- package/components/Textarea.vue.d.ts +22 -0
- package/components/Textarea.vue.js +34 -0
- package/components/Textarea.vue2.js +4 -0
- package/components/ThemeToggle.vue.d.ts +2 -0
- package/components/ThemeToggle.vue.js +18 -0
- package/components/ThemeToggle.vue2.js +4 -0
- package/components/Timeline.vue.d.ts +39 -0
- package/components/Timeline.vue.js +174 -0
- package/components/Timeline.vue2.js +4 -0
- package/components/ToastNotification.vue.d.ts +7 -0
- package/components/ToastNotification.vue.js +7 -0
- package/components/ToastNotification.vue2.js +163 -0
- package/components/Tooltip.vue.d.ts +25 -0
- package/components/Tooltip.vue.js +39 -0
- package/components/Tooltip.vue2.js +4 -0
- package/components/Workbook/Sheet.vue.d.ts +38 -0
- package/components/Workbook/Sheet.vue.js +141 -0
- package/components/Workbook/Sheet.vue2.js +4 -0
- package/components/Workbook/Workbook.vue.d.ts +54 -0
- package/components/Workbook/Workbook.vue.js +7 -0
- package/components/Workbook/Workbook.vue2.js +146 -0
- package/components/Workbook/WorkbookAddButton.vue.d.ts +6 -0
- package/components/Workbook/WorkbookAddButton.vue.js +20 -0
- package/components/Workbook/WorkbookAddButton.vue2.js +4 -0
- package/components/Workbook/index.d.ts +3 -0
- package/components/Workbook/types.d.ts +34 -0
- package/composables/useKeyStroke.d.ts +21 -0
- package/composables/useKeyStroke.js +37 -0
- package/composables/useNotifications.d.ts +93 -0
- package/composables/useNotifications.js +88 -0
- package/composables/useTheme.d.ts +6 -0
- package/composables/useTheme.js +32 -0
- package/directives/vRipple.d.ts +4 -0
- package/directives/vRipple.js +17 -0
- package/index.css +1 -0
- package/index.d.ts +40 -0
- package/index.js +110 -0
- package/package.json +57 -0
- package/types/alert.type.d.ts +10 -0
- package/types/avatar.type.d.ts +10 -0
- package/types/button.d.ts +15 -0
- package/types/buttongroup.type.d.ts +1 -0
- package/types/form.type.d.ts +45 -0
- package/types/index.d.ts +9 -0
- package/types/navbar.type.d.ts +26 -0
- package/types/sidepanel.type.d.ts +13 -0
- package/types/styles.d.ts +28 -0
- package/types/timeline.type.d.ts +9 -0
- package/utils/functions.d.ts +9 -0
- package/utils/functions.js +11 -0
- package/utils/index.d.ts +2 -0
- package/utils/object.d.ts +6 -0
- package/utils/object.js +14 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { IDropdownOption } from '../../types';
|
|
2
|
+
interface Props {
|
|
3
|
+
option: IDropdownOption;
|
|
4
|
+
selected?: boolean;
|
|
5
|
+
focused?: boolean;
|
|
6
|
+
selectable?: boolean;
|
|
7
|
+
index?: number;
|
|
8
|
+
}
|
|
9
|
+
declare function __VLS_template(): {
|
|
10
|
+
attrs: Partial<{}>;
|
|
11
|
+
slots: {
|
|
12
|
+
default?(_: {
|
|
13
|
+
option: IDropdownOption;
|
|
14
|
+
index: number;
|
|
15
|
+
selected: boolean;
|
|
16
|
+
}): any;
|
|
17
|
+
};
|
|
18
|
+
refs: {};
|
|
19
|
+
rootEl: HTMLDivElement;
|
|
20
|
+
};
|
|
21
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
22
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
23
|
+
click: (option: IDropdownOption) => any;
|
|
24
|
+
mouseenter: (index: number) => any;
|
|
25
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
26
|
+
onClick?: (option: IDropdownOption) => any;
|
|
27
|
+
onMouseenter?: (index: number) => any;
|
|
28
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
29
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
30
|
+
export default _default;
|
|
31
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
32
|
+
new (): {
|
|
33
|
+
$slots: S;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { defineComponent as f, openBlock as t, createElementBlock as i, normalizeClass as x, renderSlot as b, normalizeProps as y, guardReactiveProps as k, createBlock as s, createCommentVNode as n, createElementVNode as c, toDisplayString as a } from "vue";
|
|
2
|
+
import d from "../Icon.vue.js";
|
|
3
|
+
const h = ["data-disabled"], v = { class: "flex flex-col flex-1 min-w-0" }, g = { class: "flex items-center justify-between gap-2" }, p = { class: "truncate font-medium" }, w = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "text-xs text-muted-foreground whitespace-nowrap opacity-90"
|
|
6
|
+
}, B = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "text-[10px] text-muted-foreground truncate opacity-70"
|
|
9
|
+
}, z = /* @__PURE__ */ f({
|
|
10
|
+
__name: "DropdownItem",
|
|
11
|
+
props: {
|
|
12
|
+
option: {},
|
|
13
|
+
selected: { type: Boolean },
|
|
14
|
+
focused: { type: Boolean },
|
|
15
|
+
selectable: { type: Boolean },
|
|
16
|
+
index: {}
|
|
17
|
+
},
|
|
18
|
+
emits: ["click", "mouseenter"],
|
|
19
|
+
setup(e, { emit: r }) {
|
|
20
|
+
const u = r;
|
|
21
|
+
return (l, o) => (t(), i("div", {
|
|
22
|
+
"data-dropdown-item": "",
|
|
23
|
+
class: x(["relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-disabled:pointer-events-none data-disabled:opacity-50", [
|
|
24
|
+
e.selectable && e.selected && !e.option.children ? "bg-accent" : "",
|
|
25
|
+
e.focused ? "bg-accent text-accent-foreground" : "hover:bg-accent hover:text-accent-foreground",
|
|
26
|
+
e.option.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
|
|
27
|
+
]]),
|
|
28
|
+
"data-disabled": e.option.disabled ? !0 : void 0,
|
|
29
|
+
onClick: o[0] || (o[0] = (m) => u("click", e.option)),
|
|
30
|
+
onMouseenter: o[1] || (o[1] = (m) => l.$emit("mouseenter", e.index ?? -1))
|
|
31
|
+
}, [
|
|
32
|
+
b(l.$slots, "default", y(k({ option: e.option, index: e.index, selected: e.selected })), () => [
|
|
33
|
+
e.option.icon ? (t(), s(d, {
|
|
34
|
+
key: 0,
|
|
35
|
+
icon: e.option.icon,
|
|
36
|
+
class: "mr-2 h-4 w-4 shrink-0 mt-0.5"
|
|
37
|
+
}, null, 8, ["icon"])) : n("", !0),
|
|
38
|
+
c("div", v, [
|
|
39
|
+
c("div", g, [
|
|
40
|
+
c("span", p, a(e.option.label), 1),
|
|
41
|
+
e.option.subtitle ? (t(), i("span", w, a(e.option.subtitle), 1)) : n("", !0)
|
|
42
|
+
]),
|
|
43
|
+
e.option.description ? (t(), i("span", B, a(e.option.description), 1)) : n("", !0)
|
|
44
|
+
]),
|
|
45
|
+
e.selectable && e.selected ? (t(), s(d, {
|
|
46
|
+
key: 1,
|
|
47
|
+
icon: "lucide:check",
|
|
48
|
+
class: "ml-2 h-4 w-4 shrink-0 text-primary"
|
|
49
|
+
})) : n("", !0)
|
|
50
|
+
])
|
|
51
|
+
], 42, h));
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
export {
|
|
55
|
+
z as default
|
|
56
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { IDropdownOptions, IDropdownOption } from '../../types';
|
|
2
|
+
interface Props {
|
|
3
|
+
options?: IDropdownOptions;
|
|
4
|
+
cachedOptions?: IDropdownOptions;
|
|
5
|
+
selected?: any;
|
|
6
|
+
selectedIndex?: number | null;
|
|
7
|
+
class?: string;
|
|
8
|
+
maxHeight?: string;
|
|
9
|
+
nestedPosition?: any;
|
|
10
|
+
nestedOffset?: [number, number];
|
|
11
|
+
selectable?: boolean;
|
|
12
|
+
layout?: 'default' | 'grouped';
|
|
13
|
+
columns?: number | string;
|
|
14
|
+
loading?: boolean;
|
|
15
|
+
hasMore?: boolean;
|
|
16
|
+
searchable?: boolean;
|
|
17
|
+
remote?: boolean;
|
|
18
|
+
}
|
|
19
|
+
declare function __VLS_template(): {
|
|
20
|
+
attrs: Partial<{}>;
|
|
21
|
+
slots: {
|
|
22
|
+
header?(_: {}): any;
|
|
23
|
+
item?(_: {
|
|
24
|
+
option: IDropdownOption;
|
|
25
|
+
index: number;
|
|
26
|
+
selected: boolean;
|
|
27
|
+
}): any;
|
|
28
|
+
menu?(_: {}): any;
|
|
29
|
+
footer?(_: {}): any;
|
|
30
|
+
};
|
|
31
|
+
refs: {
|
|
32
|
+
containerRef: HTMLDivElement;
|
|
33
|
+
};
|
|
34
|
+
rootEl: HTMLDivElement;
|
|
35
|
+
};
|
|
36
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
37
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
38
|
+
search: (query: string) => any;
|
|
39
|
+
select: (option: IDropdownOption) => any;
|
|
40
|
+
close: () => any;
|
|
41
|
+
"load-more": () => any;
|
|
42
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
43
|
+
onSearch?: (query: string) => any;
|
|
44
|
+
onSelect?: (option: IDropdownOption) => any;
|
|
45
|
+
onClose?: () => any;
|
|
46
|
+
"onLoad-more"?: () => any;
|
|
47
|
+
}>, {
|
|
48
|
+
class: string;
|
|
49
|
+
loading: boolean;
|
|
50
|
+
options: IDropdownOptions;
|
|
51
|
+
selectable: boolean;
|
|
52
|
+
columns: number | string;
|
|
53
|
+
selectedIndex: number | null;
|
|
54
|
+
maxHeight: string;
|
|
55
|
+
layout: "default" | "grouped";
|
|
56
|
+
hasMore: boolean;
|
|
57
|
+
searchable: boolean;
|
|
58
|
+
remote: boolean;
|
|
59
|
+
nestedPosition: any;
|
|
60
|
+
nestedOffset: [number, number];
|
|
61
|
+
cachedOptions: IDropdownOptions;
|
|
62
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
63
|
+
containerRef: HTMLDivElement;
|
|
64
|
+
}, HTMLDivElement>;
|
|
65
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
66
|
+
export default _default;
|
|
67
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
68
|
+
new (): {
|
|
69
|
+
$slots: S;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { defineComponent as U, defineAsyncComponent as q, ref as $, computed as _, watch as B, toRef as G, onMounted as J, onBeforeUnmount as Q, openBlock as o, createElementBlock as c, createVNode as p, createCommentVNode as i, renderSlot as h, createElementVNode as y, unref as n, normalizeStyle as W, normalizeClass as C, createBlock as v, Fragment as T, renderList as X, withCtx as N, toDisplayString as Y, mergeProps as Z, nextTick as ee } from "vue";
|
|
2
|
+
import x from "../Icon.vue.js";
|
|
3
|
+
import te from "../Input.vue.js";
|
|
4
|
+
import le from "./DropdownItem.vue.js";
|
|
5
|
+
import se from "./DropdownGroupedLayout.vue.js";
|
|
6
|
+
import { useDropdownNavigation as oe } from "./composables/useDropdownNavigation.js";
|
|
7
|
+
import { useDropdownIds as ne } from "./composables/useDropdownIds.js";
|
|
8
|
+
const re = { class: "w-full min-w-[150px] flex flex-col" }, de = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "bg-body border-b mb-1 z-10 rounded-t-md shrink-0"
|
|
11
|
+
}, ce = {
|
|
12
|
+
key: 1,
|
|
13
|
+
class: "shrink-0"
|
|
14
|
+
}, ae = {
|
|
15
|
+
key: 0,
|
|
16
|
+
class: "px-2 py-6 text-center text-sm text-muted-foreground"
|
|
17
|
+
}, ie = {
|
|
18
|
+
key: 0,
|
|
19
|
+
class: "h-px bg-border my-1 mx-1"
|
|
20
|
+
}, ue = ["onMouseenter"], fe = { class: "flex items-center gap-2 flex-1 min-w-0" }, me = { class: "truncate" }, he = {
|
|
21
|
+
key: 3,
|
|
22
|
+
class: "flex justify-center py-2"
|
|
23
|
+
}, ye = {
|
|
24
|
+
key: 2,
|
|
25
|
+
class: "shrink-0 border-t mt-1 pt-1"
|
|
26
|
+
}, Se = /* @__PURE__ */ U({
|
|
27
|
+
__name: "DropdownMenu",
|
|
28
|
+
props: {
|
|
29
|
+
options: { default: () => [] },
|
|
30
|
+
cachedOptions: { default: () => [] },
|
|
31
|
+
selected: {},
|
|
32
|
+
selectedIndex: { default: null },
|
|
33
|
+
class: { default: "" },
|
|
34
|
+
maxHeight: { default: "300px" },
|
|
35
|
+
nestedPosition: { default: "right-start" },
|
|
36
|
+
nestedOffset: { default: () => [0, -5] },
|
|
37
|
+
selectable: { type: Boolean, default: !0 },
|
|
38
|
+
layout: { default: "default" },
|
|
39
|
+
columns: { default: 3 },
|
|
40
|
+
loading: { type: Boolean, default: !1 },
|
|
41
|
+
hasMore: { type: Boolean, default: !1 },
|
|
42
|
+
searchable: { type: Boolean, default: !0 },
|
|
43
|
+
remote: { type: Boolean, default: !1 }
|
|
44
|
+
},
|
|
45
|
+
emits: ["select", "close", "load-more", "search"],
|
|
46
|
+
setup(r, { emit: D }) {
|
|
47
|
+
const E = q(() => import("./Dropdown.vue2.js")), t = r, u = D, w = $(null), f = $(""), { getMenuId: P, getAllRecursiveIds: V } = ne(), j = _(() => t.remote ? t.searchable : t.searchable && (t.options?.length || 0) > 9);
|
|
48
|
+
let g = null;
|
|
49
|
+
B(f, (e) => {
|
|
50
|
+
t.remote && (g && clearTimeout(g), g = setTimeout(() => {
|
|
51
|
+
e && u("search", e);
|
|
52
|
+
}, 100));
|
|
53
|
+
});
|
|
54
|
+
const H = (e) => {
|
|
55
|
+
const s = e.target;
|
|
56
|
+
s.scrollTop + s.clientHeight >= s.scrollHeight - 50 && t.hasMore && !t.loading && u("load-more");
|
|
57
|
+
}, b = (e, s) => {
|
|
58
|
+
e.disabled || u("select", e);
|
|
59
|
+
}, {
|
|
60
|
+
focusedIndex: k,
|
|
61
|
+
isKeyboardMode: S,
|
|
62
|
+
filteredOptions: R,
|
|
63
|
+
// rename
|
|
64
|
+
handleKeyDown: I,
|
|
65
|
+
handleMouseMove: M,
|
|
66
|
+
onMouseEnterItem: O,
|
|
67
|
+
scrollToIndex: z
|
|
68
|
+
} = oe({
|
|
69
|
+
options: G(t, "options"),
|
|
70
|
+
searchQuery: f,
|
|
71
|
+
containerRef: w,
|
|
72
|
+
emit: (e, ...s) => u(e, ...s),
|
|
73
|
+
handleSelect: (e, s) => b(e)
|
|
74
|
+
}), m = _(() => t.remote ? f.value ? t.options : t.cachedOptions.length ? t.cachedOptions : t.options : R.value), A = (e) => {
|
|
75
|
+
if (!(!t.selected || typeof t.selected != "object") && e.key && e.key in t.selected)
|
|
76
|
+
return t.selected[e.key];
|
|
77
|
+
}, L = (e) => e.disabled ? !1 : Array.isArray(t.selected) ? t.selected.includes(e.value) : t.selected && typeof t.selected == "object" && e.key ? t.selected[e.key] === e.value : t.selected === e.value, F = (e, s) => {
|
|
78
|
+
let l = s.value;
|
|
79
|
+
e.key && (l = { [e.key]: l });
|
|
80
|
+
const d = {
|
|
81
|
+
label: e.label,
|
|
82
|
+
value: l,
|
|
83
|
+
data: s.data,
|
|
84
|
+
key: e.key
|
|
85
|
+
};
|
|
86
|
+
u("select", d);
|
|
87
|
+
}, K = async () => {
|
|
88
|
+
await ee();
|
|
89
|
+
let e = -1;
|
|
90
|
+
t.layout !== "grouped" && (t.selectedIndex !== null && t.selectedIndex >= 0 ? e = t.selectedIndex : t.selected !== void 0 && typeof t.selected != "object" && (e = t.options.findIndex(
|
|
91
|
+
(s) => s.value === t.selected
|
|
92
|
+
)), e !== -1 && z(e));
|
|
93
|
+
};
|
|
94
|
+
return B(
|
|
95
|
+
() => m.value,
|
|
96
|
+
() => {
|
|
97
|
+
k.value = -1;
|
|
98
|
+
}
|
|
99
|
+
), J(() => {
|
|
100
|
+
K(), window.addEventListener("keydown", I);
|
|
101
|
+
}), Q(() => {
|
|
102
|
+
window.removeEventListener("keydown", I);
|
|
103
|
+
}), (e, s) => (o(), c("div", re, [
|
|
104
|
+
j.value ? (o(), c("div", de, [
|
|
105
|
+
p(te, {
|
|
106
|
+
modelValue: f.value,
|
|
107
|
+
"onUpdate:modelValue": s[0] || (s[0] = (l) => f.value = l),
|
|
108
|
+
placeholder: "Search...",
|
|
109
|
+
icon: "lucide:search",
|
|
110
|
+
size: "sm",
|
|
111
|
+
variant: "transparent",
|
|
112
|
+
"show-clear-button": !1
|
|
113
|
+
}, null, 8, ["modelValue"])
|
|
114
|
+
])) : i("", !0),
|
|
115
|
+
e.$slots.header ? (o(), c("div", ce, [
|
|
116
|
+
h(e.$slots, "header")
|
|
117
|
+
])) : i("", !0),
|
|
118
|
+
y("div", {
|
|
119
|
+
ref_key: "containerRef",
|
|
120
|
+
ref: w,
|
|
121
|
+
tabindex: "0",
|
|
122
|
+
role: "menu",
|
|
123
|
+
class: C([
|
|
124
|
+
"w-full p-1 space-y-0.5 overflow-y-auto overflow-x-hidden focus:outline-none flex-1",
|
|
125
|
+
t.class
|
|
126
|
+
]),
|
|
127
|
+
style: W({ maxHeight: t.maxHeight }),
|
|
128
|
+
onMousemove: s[1] || (s[1] = //@ts-ignore
|
|
129
|
+
(...l) => n(M) && n(M)(...l)),
|
|
130
|
+
onScroll: H
|
|
131
|
+
}, [
|
|
132
|
+
m.value.length === 0 && r.options?.length > 0 && !r.loading ? (o(), c("div", ae, " No options found ")) : i("", !0),
|
|
133
|
+
r.layout === "grouped" ? (o(), v(se, {
|
|
134
|
+
key: 1,
|
|
135
|
+
options: m.value,
|
|
136
|
+
selected: r.selected,
|
|
137
|
+
selectable: r.selectable,
|
|
138
|
+
columns: r.columns,
|
|
139
|
+
onSelect: b
|
|
140
|
+
}, null, 8, ["options", "selected", "selectable", "columns"])) : (o(!0), c(T, { key: 2 }, X(m.value, (l, d) => (o(), c(T, { key: d }, [
|
|
141
|
+
l.label === "---" ? (o(), c("div", ie)) : l.children && l.children.length > 0 ? (o(), v(n(E), {
|
|
142
|
+
key: 1,
|
|
143
|
+
position: l.position || t.nestedPosition,
|
|
144
|
+
offset: l.offset || t.nestedOffset,
|
|
145
|
+
class: "w-full",
|
|
146
|
+
options: l.children,
|
|
147
|
+
selected: A(l),
|
|
148
|
+
menuId: n(P)(l),
|
|
149
|
+
nestedPosition: t.nestedPosition,
|
|
150
|
+
nestedOffset: t.nestedOffset,
|
|
151
|
+
selectable: t.selectable,
|
|
152
|
+
ignoreClickOutside: n(V)(l.children),
|
|
153
|
+
onOnSelect: (a) => F(l, a)
|
|
154
|
+
}, {
|
|
155
|
+
trigger: N(() => [
|
|
156
|
+
y("div", {
|
|
157
|
+
"data-dropdown-item": "",
|
|
158
|
+
class: C(["relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors justify-between w-full", [
|
|
159
|
+
n(S) && n(k) === d ? "bg-accent text-accent-foreground" : "hover:bg-accent hover:text-accent-foreground",
|
|
160
|
+
l.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
161
|
+
]]),
|
|
162
|
+
onMouseenter: (a) => n(O)(d)
|
|
163
|
+
}, [
|
|
164
|
+
y("div", fe, [
|
|
165
|
+
l.icon ? (o(), v(x, {
|
|
166
|
+
key: 0,
|
|
167
|
+
icon: l.icon,
|
|
168
|
+
class: "h-4 w-4 shrink-0 opacity-70"
|
|
169
|
+
}, null, 8, ["icon"])) : i("", !0),
|
|
170
|
+
y("span", me, Y(l.label), 1)
|
|
171
|
+
]),
|
|
172
|
+
p(x, {
|
|
173
|
+
icon: "lucide:chevron-right",
|
|
174
|
+
class: "h-4 w-4 text-muted-foreground shrink-0 ml-2"
|
|
175
|
+
})
|
|
176
|
+
], 42, ue)
|
|
177
|
+
]),
|
|
178
|
+
_: 2
|
|
179
|
+
}, 1032, ["position", "offset", "options", "selected", "menuId", "nestedPosition", "nestedOffset", "selectable", "ignoreClickOutside", "onOnSelect"])) : (o(), v(le, {
|
|
180
|
+
key: 2,
|
|
181
|
+
option: l,
|
|
182
|
+
index: d,
|
|
183
|
+
selected: L(l),
|
|
184
|
+
focused: n(S) && n(k) === d,
|
|
185
|
+
selectable: r.selectable,
|
|
186
|
+
onClick: (a) => b(l),
|
|
187
|
+
onMouseenter: (a) => n(O)(d)
|
|
188
|
+
}, {
|
|
189
|
+
default: N((a) => [
|
|
190
|
+
h(e.$slots, "item", Z({ ref_for: !0 }, a))
|
|
191
|
+
]),
|
|
192
|
+
_: 3
|
|
193
|
+
}, 8, ["option", "index", "selected", "focused", "selectable", "onClick", "onMouseenter"]))
|
|
194
|
+
], 64))), 128)),
|
|
195
|
+
r.loading ? (o(), c("div", he, [
|
|
196
|
+
p(x, {
|
|
197
|
+
icon: "lucide:loader-2",
|
|
198
|
+
class: "w-4 h-4 animate-spin text-muted-foreground"
|
|
199
|
+
})
|
|
200
|
+
])) : i("", !0),
|
|
201
|
+
h(e.$slots, "menu")
|
|
202
|
+
], 38),
|
|
203
|
+
e.$slots.footer ? (o(), c("div", ye, [
|
|
204
|
+
h(e.$slots, "footer")
|
|
205
|
+
])) : i("", !0)
|
|
206
|
+
]));
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
export {
|
|
210
|
+
Se as default
|
|
211
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
selectedLabel?: string;
|
|
3
|
+
placeholder?: string;
|
|
4
|
+
isOpen?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
placeholder: string;
|
|
11
|
+
selectedLabel: string;
|
|
12
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLButtonElement>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { defineComponent as l, openBlock as a, createBlock as t, normalizeClass as n } from "vue";
|
|
2
|
+
import o from "../Button.vue.js";
|
|
3
|
+
const r = /* @__PURE__ */ l({
|
|
4
|
+
__name: "DropdownTrigger",
|
|
5
|
+
props: {
|
|
6
|
+
selectedLabel: { default: "" },
|
|
7
|
+
placeholder: { default: "Select an option" },
|
|
8
|
+
isOpen: { type: Boolean },
|
|
9
|
+
disabled: { type: Boolean, default: !1 },
|
|
10
|
+
className: {}
|
|
11
|
+
},
|
|
12
|
+
setup(e) {
|
|
13
|
+
return (s, c) => (a(), t(o, {
|
|
14
|
+
text: e.selectedLabel || e.placeholder,
|
|
15
|
+
iconRight: "lucide:chevrons-up-down",
|
|
16
|
+
variant: "outline",
|
|
17
|
+
disabled: e.disabled,
|
|
18
|
+
class: n(["w-full justify-between font-normal", e.className])
|
|
19
|
+
}, null, 8, ["text", "disabled", "class"]));
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
export {
|
|
23
|
+
r as default
|
|
24
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
function d() {
|
|
2
|
+
const r = (e) => e.key ? `nested-${e.key}` : `nested-${e.label ? e.label.replace(/\s+/g, "-").toLowerCase() : "menu"}`, c = (e = []) => {
|
|
3
|
+
const n = [];
|
|
4
|
+
return e.forEach((s) => {
|
|
5
|
+
if (s.children?.length) {
|
|
6
|
+
const l = r(s);
|
|
7
|
+
n.push(`#${l}`);
|
|
8
|
+
const t = c(s.children);
|
|
9
|
+
n.push(...t);
|
|
10
|
+
}
|
|
11
|
+
}), n;
|
|
12
|
+
};
|
|
13
|
+
return {
|
|
14
|
+
getMenuId: r,
|
|
15
|
+
getAllRecursiveIds: c
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
d as useDropdownIds
|
|
20
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { IDropdownOption, IDropdownOptions } from '../../../types';
|
|
3
|
+
interface UseDropdownNavigationProps {
|
|
4
|
+
options: Ref<IDropdownOptions>;
|
|
5
|
+
searchQuery: Ref<string>;
|
|
6
|
+
containerRef: Ref<HTMLElement | null>;
|
|
7
|
+
emit: (event: 'select' | 'close', ...args: any[]) => void;
|
|
8
|
+
handleSelect: (option: IDropdownOption, index: number) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function useDropdownNavigation(props: UseDropdownNavigationProps): {
|
|
11
|
+
focusedIndex: Ref<number, number>;
|
|
12
|
+
isKeyboardMode: Ref<boolean, boolean>;
|
|
13
|
+
filteredOptions: import('vue').ComputedRef<IDropdownOption[]>;
|
|
14
|
+
handleKeyDown: (e: KeyboardEvent) => void;
|
|
15
|
+
handleMouseMove: () => void;
|
|
16
|
+
onMouseEnterItem: (index: number) => void;
|
|
17
|
+
scrollToIndex: (index: number) => void;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ref as s, computed as i } from "vue";
|
|
2
|
+
function h(a) {
|
|
3
|
+
const t = s(-1), l = s(!1), u = i(() => {
|
|
4
|
+
const e = a.options.value;
|
|
5
|
+
if (!a.searchQuery.value) return e;
|
|
6
|
+
const o = a.searchQuery.value.toLowerCase();
|
|
7
|
+
return e.filter(
|
|
8
|
+
(n) => n.label.toLowerCase().includes(o)
|
|
9
|
+
);
|
|
10
|
+
}), r = (e) => {
|
|
11
|
+
if (!a.containerRef.value || e < 0) return;
|
|
12
|
+
const n = a.containerRef.value.querySelectorAll(
|
|
13
|
+
"[data-dropdown-item]"
|
|
14
|
+
)[e];
|
|
15
|
+
n && n.scrollIntoView({ block: "nearest" });
|
|
16
|
+
};
|
|
17
|
+
return {
|
|
18
|
+
focusedIndex: t,
|
|
19
|
+
isKeyboardMode: l,
|
|
20
|
+
filteredOptions: u,
|
|
21
|
+
handleKeyDown: (e) => {
|
|
22
|
+
const o = u.value;
|
|
23
|
+
if (o.length !== 0)
|
|
24
|
+
switch (["ArrowDown", "ArrowUp", "Enter"].includes(e.key) && (l.value = !0), e.key) {
|
|
25
|
+
case "ArrowDown":
|
|
26
|
+
e.preventDefault(), e.stopPropagation(), t.value < o.length - 1 ? t.value++ : t.value = 0, r(t.value);
|
|
27
|
+
break;
|
|
28
|
+
case "ArrowUp":
|
|
29
|
+
e.preventDefault(), e.stopPropagation(), t.value > 0 ? t.value-- : (t.value, t.value = o.length - 1), r(t.value);
|
|
30
|
+
break;
|
|
31
|
+
case "Enter":
|
|
32
|
+
if (e.preventDefault(), e.stopPropagation(), t.value >= 0 && t.value < o.length) {
|
|
33
|
+
const n = o[t.value];
|
|
34
|
+
n.children || a.handleSelect(n, t.value);
|
|
35
|
+
}
|
|
36
|
+
break;
|
|
37
|
+
case "Escape":
|
|
38
|
+
e.preventDefault(), e.stopPropagation(), a.emit("close");
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
handleMouseMove: () => {
|
|
43
|
+
l.value && (l.value = !1);
|
|
44
|
+
},
|
|
45
|
+
onMouseEnterItem: (e) => {
|
|
46
|
+
t.value = e;
|
|
47
|
+
},
|
|
48
|
+
scrollToIndex: r
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export {
|
|
52
|
+
h as useDropdownNavigation
|
|
53
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IDropdownOption, IDropdownOptions } from '../../../types';
|
|
2
|
+
interface UseDropdownSelectionProps {
|
|
3
|
+
modelValue: any;
|
|
4
|
+
selected?: any;
|
|
5
|
+
toggleSelection?: boolean;
|
|
6
|
+
showSelectedLabel?: boolean;
|
|
7
|
+
selectable?: boolean;
|
|
8
|
+
options?: IDropdownOptions;
|
|
9
|
+
}
|
|
10
|
+
type EmitFn = (event: 'update:modelValue' | 'onSelect', ...args: any[]) => void;
|
|
11
|
+
export declare function useDropdownSelection(props: UseDropdownSelectionProps, emit: EmitFn): {
|
|
12
|
+
currentValue: import('vue').ComputedRef<any>;
|
|
13
|
+
selectedLabel: import('vue').ComputedRef<string>;
|
|
14
|
+
selectOption: (option: IDropdownOption) => void;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { computed as s } from "vue";
|
|
2
|
+
import { deepMerge as g } from "../../../utils/object.js";
|
|
3
|
+
function S(a, r) {
|
|
4
|
+
const n = s(() => a.modelValue !== void 0 ? a.modelValue : a.selected), o = (l = [], t) => {
|
|
5
|
+
for (const e of l) {
|
|
6
|
+
if (e.value === t) return e.label;
|
|
7
|
+
if (e.key && typeof t == "object" && t !== null && e.key in t) {
|
|
8
|
+
if (e.children) {
|
|
9
|
+
const c = o(e.children, t[e.key]);
|
|
10
|
+
if (c) return `${e.label} / ${c}`;
|
|
11
|
+
}
|
|
12
|
+
return e.value === t[e.key], e.label;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return "";
|
|
16
|
+
}, i = s(() => !a.showSelectedLabel || !a.selectable || !a.options?.length ? "" : o(a.options, n.value));
|
|
17
|
+
return {
|
|
18
|
+
currentValue: n,
|
|
19
|
+
selectedLabel: i,
|
|
20
|
+
selectOption: (l) => {
|
|
21
|
+
if (typeof l != "string" && l?.disabled) return;
|
|
22
|
+
const t = n.value;
|
|
23
|
+
let e = l?.value ?? l?.label;
|
|
24
|
+
const c = l.data;
|
|
25
|
+
if (l.key && (typeof e == "object" && e !== null && l.key in e || (e = { [l.key]: e })), t && typeof t == "object" && !Array.isArray(t) && l.key) {
|
|
26
|
+
const u = l.key, b = l.value ?? l.label, y = t[u] === b;
|
|
27
|
+
if (a.toggleSelection && y) {
|
|
28
|
+
const d = { ...t };
|
|
29
|
+
delete d[u], r("update:modelValue", d), r("onSelect", { value: d, data: c });
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const f = g(t, e);
|
|
33
|
+
r("update:modelValue", f), r("onSelect", { value: f, data: c });
|
|
34
|
+
} else
|
|
35
|
+
a.toggleSelection && t === (l.value ?? l.label) ? (r("update:modelValue", void 0), r("onSelect", { value: void 0, data: c })) : (r("update:modelValue", e), r("onSelect", { value: e, data: c }));
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export {
|
|
40
|
+
S as useDropdownSelection
|
|
41
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as Dropdown } from './Dropdown.vue';
|
|
2
|
+
export { default as DropdownMenu } from './DropdownMenu.vue';
|
|
3
|
+
export { default as DropdownTrigger } from './DropdownTrigger.vue';
|
|
4
|
+
export { default as DropdownItem } from './DropdownItem.vue';
|
|
5
|
+
export * from './composables/useDropdownSelection';
|
|
6
|
+
export * from './composables/useDropdownIds';
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export interface FilePickerValue {
|
|
2
|
+
fileName: string;
|
|
3
|
+
fileType: string;
|
|
4
|
+
fileSize: number;
|
|
5
|
+
file: File;
|
|
6
|
+
base64: string;
|
|
7
|
+
}
|
|
8
|
+
interface Props {
|
|
9
|
+
modelValue?: FilePickerValue | FilePickerValue[] | null;
|
|
10
|
+
multiSelect?: boolean;
|
|
11
|
+
fileTypes?: string[];
|
|
12
|
+
returnFormat?: 'file' | 'base64';
|
|
13
|
+
loading?: boolean;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
maxSize?: number;
|
|
16
|
+
}
|
|
17
|
+
declare function __VLS_template(): {
|
|
18
|
+
attrs: Partial<{}>;
|
|
19
|
+
slots: {
|
|
20
|
+
trigger?(_: {
|
|
21
|
+
trigger: () => void;
|
|
22
|
+
isDragging: boolean;
|
|
23
|
+
isLoading: boolean;
|
|
24
|
+
files: FilePickerValue[];
|
|
25
|
+
}): any;
|
|
26
|
+
};
|
|
27
|
+
refs: {
|
|
28
|
+
fileInput: HTMLInputElement;
|
|
29
|
+
};
|
|
30
|
+
rootEl: HTMLDivElement;
|
|
31
|
+
};
|
|
32
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
33
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
34
|
+
"update:modelValue": (value: FilePickerValue | FilePickerValue[]) => any;
|
|
35
|
+
change: (value: FilePickerValue | FilePickerValue[]) => any;
|
|
36
|
+
error: (error: string) => any;
|
|
37
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
38
|
+
"onUpdate:modelValue"?: (value: FilePickerValue | FilePickerValue[]) => any;
|
|
39
|
+
onChange?: (value: FilePickerValue | FilePickerValue[]) => any;
|
|
40
|
+
onError?: (error: string) => any;
|
|
41
|
+
}>, {
|
|
42
|
+
disabled: boolean;
|
|
43
|
+
modelValue: FilePickerValue | FilePickerValue[] | null;
|
|
44
|
+
loading: boolean;
|
|
45
|
+
multiSelect: boolean;
|
|
46
|
+
fileTypes: string[];
|
|
47
|
+
returnFormat: "file" | "base64";
|
|
48
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
49
|
+
fileInput: HTMLInputElement;
|
|
50
|
+
}, HTMLDivElement>;
|
|
51
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
52
|
+
export default _default;
|
|
53
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
54
|
+
new (): {
|
|
55
|
+
$slots: S;
|
|
56
|
+
};
|
|
57
|
+
};
|