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,55 @@
|
|
|
1
|
+
import { defineComponent as n, openBlock as d, createBlock as r, unref as c, withCtx as l, createElementVNode as m, createVNode as a, mergeProps as u } from "vue";
|
|
2
|
+
import f from "../Dropdown/Dropdown.vue.js";
|
|
3
|
+
import "@iconify/vue";
|
|
4
|
+
import p from "../Button.vue.js";
|
|
5
|
+
import h from "./ColorIro.vue.js";
|
|
6
|
+
/* empty css */
|
|
7
|
+
const g = { class: "p-1.5" }, w = /* @__PURE__ */ n({
|
|
8
|
+
__name: "ColorPicker",
|
|
9
|
+
props: {
|
|
10
|
+
modelValue: { default: "#000000" },
|
|
11
|
+
disabled: { type: Boolean, default: !1 },
|
|
12
|
+
size: { default: "md" },
|
|
13
|
+
position: { default: "right-start" },
|
|
14
|
+
btnProps: {}
|
|
15
|
+
},
|
|
16
|
+
emits: ["update:modelValue", "change"],
|
|
17
|
+
setup(e, { emit: i }) {
|
|
18
|
+
const t = i, s = (o) => {
|
|
19
|
+
t("update:modelValue", o), t("change", o);
|
|
20
|
+
};
|
|
21
|
+
return (o, b) => (d(), r(c(f), {
|
|
22
|
+
disabled: e.disabled,
|
|
23
|
+
class: "w-auto",
|
|
24
|
+
position: e.position,
|
|
25
|
+
offset: [0, 8],
|
|
26
|
+
"close-on-select": !1
|
|
27
|
+
}, {
|
|
28
|
+
trigger: l(({ isOpen: V }) => [
|
|
29
|
+
a(p, u({
|
|
30
|
+
style: { backgroundColor: e.modelValue }
|
|
31
|
+
}, {
|
|
32
|
+
rounded: "full",
|
|
33
|
+
size: "xs",
|
|
34
|
+
icon: " ",
|
|
35
|
+
variant: "outline",
|
|
36
|
+
...e.btnProps || {}
|
|
37
|
+
}), null, 16, ["style"])
|
|
38
|
+
]),
|
|
39
|
+
default: l(() => [
|
|
40
|
+
m("div", g, [
|
|
41
|
+
a(h, {
|
|
42
|
+
color: e.modelValue,
|
|
43
|
+
"show-header": !1,
|
|
44
|
+
size: e.size,
|
|
45
|
+
"onUpdate:color": s
|
|
46
|
+
}, null, 8, ["color", "size"])
|
|
47
|
+
])
|
|
48
|
+
]),
|
|
49
|
+
_: 1
|
|
50
|
+
}, 8, ["disabled", "position"]));
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
export {
|
|
54
|
+
w as default
|
|
55
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
show: boolean;
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
confirmText?: string;
|
|
7
|
+
cancelText?: string;
|
|
8
|
+
variant?: 'danger' | 'primary' | 'warning' | 'success' | 'info';
|
|
9
|
+
}
|
|
10
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
11
|
+
cancel: () => any;
|
|
12
|
+
confirm: () => any;
|
|
13
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
14
|
+
onCancel?: () => any;
|
|
15
|
+
onConfirm?: () => any;
|
|
16
|
+
}>, {
|
|
17
|
+
variant: "danger" | "primary" | "warning" | "success" | "info";
|
|
18
|
+
loading: boolean;
|
|
19
|
+
show: boolean;
|
|
20
|
+
confirmText: string;
|
|
21
|
+
cancelText: string;
|
|
22
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { defineComponent as d, openBlock as s, createBlock as f, withCtx as r, createElementVNode as m, createVNode as l } from "vue";
|
|
2
|
+
import x from "./Modal.vue.js";
|
|
3
|
+
import o from "./Button.vue.js";
|
|
4
|
+
const u = { class: "flex w-full items-center justify-end space-x-2 pt-4" }, h = /* @__PURE__ */ d({
|
|
5
|
+
__name: "ConfirmationModal",
|
|
6
|
+
props: {
|
|
7
|
+
show: { type: Boolean, default: !1 },
|
|
8
|
+
title: {},
|
|
9
|
+
description: {},
|
|
10
|
+
loading: { type: Boolean, default: !1 },
|
|
11
|
+
confirmText: { default: "Delete" },
|
|
12
|
+
cancelText: { default: "Cancel" },
|
|
13
|
+
variant: { default: "danger" }
|
|
14
|
+
},
|
|
15
|
+
emits: ["cancel", "confirm"],
|
|
16
|
+
setup(e, { emit: c }) {
|
|
17
|
+
const i = c, n = () => {
|
|
18
|
+
i("cancel");
|
|
19
|
+
};
|
|
20
|
+
return (w, t) => (s(), f(x, {
|
|
21
|
+
show: e.show,
|
|
22
|
+
title: e.title,
|
|
23
|
+
description: e.description,
|
|
24
|
+
"max-width": "max-w-[400px]",
|
|
25
|
+
onClose: n,
|
|
26
|
+
"onUpdate:show": t[1] || (t[1] = (a) => !a && n())
|
|
27
|
+
}, {
|
|
28
|
+
default: r(() => [
|
|
29
|
+
m("div", u, [
|
|
30
|
+
l(o, {
|
|
31
|
+
variant: "outline",
|
|
32
|
+
text: e.cancelText,
|
|
33
|
+
disabled: e.loading,
|
|
34
|
+
onClick: n
|
|
35
|
+
}, null, 8, ["text", "disabled"]),
|
|
36
|
+
l(o, {
|
|
37
|
+
variant: e.variant,
|
|
38
|
+
text: e.confirmText,
|
|
39
|
+
loading: e.loading,
|
|
40
|
+
onClick: t[0] || (t[0] = (a) => i("confirm"))
|
|
41
|
+
}, null, 8, ["variant", "text", "loading"])
|
|
42
|
+
])
|
|
43
|
+
]),
|
|
44
|
+
_: 1
|
|
45
|
+
}, 8, ["show", "title", "description"]));
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
export {
|
|
49
|
+
h as default
|
|
50
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { DatePickerMode } from 'v-datepicker-lite/types';
|
|
2
|
+
import { ButtonSize, ButtonVariant } from '../types';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
modelValue?: any;
|
|
6
|
+
value?: any;
|
|
7
|
+
mode: DatePickerMode;
|
|
8
|
+
minDate?: string;
|
|
9
|
+
icon?: string;
|
|
10
|
+
size?: ButtonSize;
|
|
11
|
+
variant?: ButtonVariant;
|
|
12
|
+
btnProps?: any;
|
|
13
|
+
teleport?: boolean;
|
|
14
|
+
minuteInterval?: number;
|
|
15
|
+
};
|
|
16
|
+
declare function __VLS_template(): {
|
|
17
|
+
attrs: Partial<{}>;
|
|
18
|
+
slots: {
|
|
19
|
+
default?(_: {
|
|
20
|
+
value: any;
|
|
21
|
+
displayValue: string;
|
|
22
|
+
}): any;
|
|
23
|
+
};
|
|
24
|
+
refs: {};
|
|
25
|
+
rootEl: HTMLDivElement;
|
|
26
|
+
};
|
|
27
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
28
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
29
|
+
onChange: (...args: any[]) => void;
|
|
30
|
+
"update:modelValue": (...args: any[]) => void;
|
|
31
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
32
|
+
onOnChange?: (...args: any[]) => any;
|
|
33
|
+
"onUpdate:modelValue"?: (...args: any[]) => any;
|
|
34
|
+
}>, {
|
|
35
|
+
teleport: boolean;
|
|
36
|
+
minuteInterval: number;
|
|
37
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
38
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
39
|
+
export default _default;
|
|
40
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
41
|
+
new (): {
|
|
42
|
+
$slots: S;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { defineComponent as v, computed as i, openBlock as g, createBlock as h, unref as u, withCtx as m, createElementVNode as p, createVNode as s, renderSlot as V, mergeProps as w } from "vue";
|
|
2
|
+
import x from "./Button.vue.js";
|
|
3
|
+
import y from "./Dropdown/Dropdown.vue.js";
|
|
4
|
+
import "@iconify/vue";
|
|
5
|
+
import D from "v-datepicker-lite";
|
|
6
|
+
import "v-datepicker-lite/style.css";
|
|
7
|
+
const C = { class: "min-w-[300px] overflow-hidden" }, I = /* @__PURE__ */ v({
|
|
8
|
+
__name: "DatePicker",
|
|
9
|
+
props: {
|
|
10
|
+
placeholder: {},
|
|
11
|
+
modelValue: {},
|
|
12
|
+
value: {},
|
|
13
|
+
mode: {},
|
|
14
|
+
minDate: {},
|
|
15
|
+
icon: {},
|
|
16
|
+
size: {},
|
|
17
|
+
variant: {},
|
|
18
|
+
btnProps: {},
|
|
19
|
+
teleport: { type: Boolean, default: !0 },
|
|
20
|
+
minuteInterval: { default: 5 }
|
|
21
|
+
},
|
|
22
|
+
emits: ["update:modelValue", "onChange"],
|
|
23
|
+
setup(t, { emit: c }) {
|
|
24
|
+
const n = t, l = c, a = i({
|
|
25
|
+
get: () => n.modelValue ?? n.value,
|
|
26
|
+
set: (e) => {
|
|
27
|
+
l("update:modelValue", e), l("onChange", e);
|
|
28
|
+
}
|
|
29
|
+
}), d = (e) => e instanceof Date ? e.getHours() !== 0 || e.getMinutes() !== 0 : typeof e == "string" ? e.includes("T") || /\d{2}:\d{2}/.test(e) : !1, o = i(() => {
|
|
30
|
+
if (!a.value) return "";
|
|
31
|
+
try {
|
|
32
|
+
console.log("actualValue.value :>> ", a.value);
|
|
33
|
+
const e = new Date(a.value);
|
|
34
|
+
if (isNaN(e.getTime())) return String(a.value);
|
|
35
|
+
console.log("d :>> ", e);
|
|
36
|
+
const r = n.mode === "dateTime" && d(a.value);
|
|
37
|
+
return e.toLocaleDateString("en-US", {
|
|
38
|
+
month: "short",
|
|
39
|
+
day: "numeric",
|
|
40
|
+
year: "numeric",
|
|
41
|
+
...r ? { hour: "2-digit", minute: "2-digit" } : {}
|
|
42
|
+
});
|
|
43
|
+
} catch {
|
|
44
|
+
return String(a.value);
|
|
45
|
+
}
|
|
46
|
+
}), f = (e) => {
|
|
47
|
+
a.value = e;
|
|
48
|
+
};
|
|
49
|
+
return (e, r) => (g(), h(u(y), {
|
|
50
|
+
position: "bottom-start",
|
|
51
|
+
class: "w-full",
|
|
52
|
+
teleport: t.teleport
|
|
53
|
+
}, {
|
|
54
|
+
trigger: m(() => [
|
|
55
|
+
V(e.$slots, "default", {
|
|
56
|
+
value: a.value,
|
|
57
|
+
displayValue: o.value
|
|
58
|
+
}, () => [
|
|
59
|
+
s(x, w({
|
|
60
|
+
text: o.value || t.placeholder || "Select date",
|
|
61
|
+
variant: t.variant || "transparent",
|
|
62
|
+
size: t.size || "sm",
|
|
63
|
+
icon: t.icon || "lucide:calendar"
|
|
64
|
+
}, t.btnProps, {
|
|
65
|
+
class: ["w-full justify-start! text-sm font-normal hover:border-input text-foreground", { "text-muted-foreground": !o.value }]
|
|
66
|
+
}), null, 16, ["text", "variant", "size", "icon", "class"])
|
|
67
|
+
])
|
|
68
|
+
]),
|
|
69
|
+
default: m(() => [
|
|
70
|
+
p("div", C, [
|
|
71
|
+
s(u(D), {
|
|
72
|
+
value: a.value,
|
|
73
|
+
mode: t.mode,
|
|
74
|
+
"min-date": t.minDate,
|
|
75
|
+
class: "w-full",
|
|
76
|
+
minuteInterval: t.minuteInterval,
|
|
77
|
+
timeFormat: "12h",
|
|
78
|
+
onChange: f
|
|
79
|
+
}, null, 8, ["value", "mode", "min-date", "minuteInterval"])
|
|
80
|
+
])
|
|
81
|
+
]),
|
|
82
|
+
_: 3
|
|
83
|
+
}, 8, ["teleport"]));
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
export {
|
|
87
|
+
I as default
|
|
88
|
+
};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { IDropdownOptions, IDropdownOption } from '../../types/styles';
|
|
2
|
+
import { TooltTipPlacement } from 'v-tooltip-lite/types';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
selected?: any;
|
|
5
|
+
modelValue?: any;
|
|
6
|
+
className?: string;
|
|
7
|
+
emptyMessage?: string;
|
|
8
|
+
position?: TooltTipPlacement;
|
|
9
|
+
closeOnSelect?: boolean;
|
|
10
|
+
toggleSelection?: boolean;
|
|
11
|
+
options?: IDropdownOptions;
|
|
12
|
+
canCloseOutside?: boolean;
|
|
13
|
+
caret?: boolean;
|
|
14
|
+
offset?: [number, number];
|
|
15
|
+
isOpen?: boolean;
|
|
16
|
+
teleport?: boolean;
|
|
17
|
+
selectedIndex?: number | null;
|
|
18
|
+
maxHeight?: string;
|
|
19
|
+
width?: string;
|
|
20
|
+
ignoreClickOutside?: string[];
|
|
21
|
+
menuId?: string;
|
|
22
|
+
nestedPosition?: TooltTipPlacement;
|
|
23
|
+
nestedOffset?: [number, number];
|
|
24
|
+
showSelectedLabel?: boolean;
|
|
25
|
+
selectable?: boolean;
|
|
26
|
+
doubleConfirmation?: boolean;
|
|
27
|
+
layout?: 'default' | 'grouped';
|
|
28
|
+
columns?: number | string;
|
|
29
|
+
loading?: boolean;
|
|
30
|
+
hasMore?: boolean;
|
|
31
|
+
searchable?: boolean;
|
|
32
|
+
remote?: boolean;
|
|
33
|
+
};
|
|
34
|
+
declare function __VLS_template(): {
|
|
35
|
+
attrs: Partial<{}>;
|
|
36
|
+
slots: {
|
|
37
|
+
trigger?(_: {
|
|
38
|
+
selectedLabel: string;
|
|
39
|
+
isOpen: boolean;
|
|
40
|
+
}): any;
|
|
41
|
+
default?(_: {}): any;
|
|
42
|
+
menu?(_: {}): any;
|
|
43
|
+
item?(_: {
|
|
44
|
+
option: IDropdownOption;
|
|
45
|
+
index: number;
|
|
46
|
+
selected: boolean;
|
|
47
|
+
}): any;
|
|
48
|
+
header?(_: {}): any;
|
|
49
|
+
footer?(_: {}): any;
|
|
50
|
+
};
|
|
51
|
+
refs: {};
|
|
52
|
+
rootEl: HTMLDivElement;
|
|
53
|
+
};
|
|
54
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
55
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
56
|
+
search: (query: string) => any;
|
|
57
|
+
onSelect: (payload: {
|
|
58
|
+
value: any;
|
|
59
|
+
data?: any;
|
|
60
|
+
}) => any;
|
|
61
|
+
"update:modelValue": (value: any) => any;
|
|
62
|
+
onClose: () => any;
|
|
63
|
+
onOpen: () => any;
|
|
64
|
+
"update:isOpen": (value: boolean) => any;
|
|
65
|
+
"load-more": () => any;
|
|
66
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
67
|
+
onSearch?: (query: string) => any;
|
|
68
|
+
onOnSelect?: (payload: {
|
|
69
|
+
value: any;
|
|
70
|
+
data?: any;
|
|
71
|
+
}) => any;
|
|
72
|
+
"onUpdate:modelValue"?: (value: any) => any;
|
|
73
|
+
onOnClose?: () => any;
|
|
74
|
+
onOnOpen?: () => any;
|
|
75
|
+
"onUpdate:isOpen"?: (value: boolean) => any;
|
|
76
|
+
"onLoad-more"?: () => any;
|
|
77
|
+
}>, {
|
|
78
|
+
isOpen: boolean;
|
|
79
|
+
loading: boolean;
|
|
80
|
+
selectable: boolean;
|
|
81
|
+
columns: number | string;
|
|
82
|
+
canCloseOutside: boolean;
|
|
83
|
+
closeOnSelect: boolean;
|
|
84
|
+
toggleSelection: boolean;
|
|
85
|
+
position: TooltTipPlacement;
|
|
86
|
+
emptyMessage: string;
|
|
87
|
+
offset: [number, number];
|
|
88
|
+
teleport: boolean;
|
|
89
|
+
selectedIndex: number | null;
|
|
90
|
+
maxHeight: string;
|
|
91
|
+
showSelectedLabel: boolean;
|
|
92
|
+
doubleConfirmation: boolean;
|
|
93
|
+
layout: "default" | "grouped";
|
|
94
|
+
hasMore: boolean;
|
|
95
|
+
searchable: boolean;
|
|
96
|
+
remote: boolean;
|
|
97
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
98
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
99
|
+
export default _default;
|
|
100
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
101
|
+
new (): {
|
|
102
|
+
$slots: S;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { defineComponent as L, ref as d, watch as b, reactive as A, toRefs as V, computed as D, openBlock as $, createElementBlock as R, createVNode as C, unref as v, withCtx as r, renderSlot as c, createBlock as j, normalizeClass as z, createSlots as E, normalizeProps as k, guardReactiveProps as w, createCommentVNode as U } from "vue";
|
|
2
|
+
import q from "v-tooltip-lite";
|
|
3
|
+
import "v-tooltip-lite/style.css";
|
|
4
|
+
import F from "./DropdownMenu.vue.js";
|
|
5
|
+
import G from "./DropdownTrigger.vue.js";
|
|
6
|
+
import J from "../ConfirmationModal.vue.js";
|
|
7
|
+
import { useDropdownIds as K } from "./composables/useDropdownIds.js";
|
|
8
|
+
import { useDropdownSelection as Q } from "./composables/useDropdownSelection.js";
|
|
9
|
+
const W = { class: "relative inline-block text-left" }, ae = /* @__PURE__ */ L({
|
|
10
|
+
__name: "Dropdown",
|
|
11
|
+
props: {
|
|
12
|
+
selected: {},
|
|
13
|
+
modelValue: {},
|
|
14
|
+
className: {},
|
|
15
|
+
emptyMessage: { default: "No options found" },
|
|
16
|
+
position: { default: "bottom-end" },
|
|
17
|
+
closeOnSelect: { type: Boolean, default: !0 },
|
|
18
|
+
toggleSelection: { type: Boolean, default: !0 },
|
|
19
|
+
options: {},
|
|
20
|
+
canCloseOutside: { type: Boolean, default: !0 },
|
|
21
|
+
caret: { type: Boolean },
|
|
22
|
+
offset: { default: () => [0, 8] },
|
|
23
|
+
isOpen: { type: Boolean, default: void 0 },
|
|
24
|
+
teleport: { type: Boolean, default: !0 },
|
|
25
|
+
selectedIndex: { default: null },
|
|
26
|
+
maxHeight: { default: "300px" },
|
|
27
|
+
width: {},
|
|
28
|
+
ignoreClickOutside: {},
|
|
29
|
+
menuId: {},
|
|
30
|
+
nestedPosition: {},
|
|
31
|
+
nestedOffset: {},
|
|
32
|
+
showSelectedLabel: { type: Boolean, default: !0 },
|
|
33
|
+
selectable: { type: Boolean, default: !0 },
|
|
34
|
+
doubleConfirmation: { type: Boolean, default: !1 },
|
|
35
|
+
layout: { default: "default" },
|
|
36
|
+
columns: { default: 3 },
|
|
37
|
+
loading: { type: Boolean, default: !1 },
|
|
38
|
+
hasMore: { type: Boolean, default: !1 },
|
|
39
|
+
searchable: { type: Boolean, default: !0 },
|
|
40
|
+
remote: { type: Boolean, default: !1 }
|
|
41
|
+
},
|
|
42
|
+
emits: ["onSelect", "update:modelValue", "onOpen", "onClose", "update:isOpen", "load-more", "search"],
|
|
43
|
+
setup(t, { emit: S }) {
|
|
44
|
+
const n = t, f = S, m = d(!1), u = d(null), s = d({
|
|
45
|
+
title: "Confirm Selection",
|
|
46
|
+
description: "Are you sure you want to select this option?",
|
|
47
|
+
confirmText: "Confirm",
|
|
48
|
+
cancelText: "Cancel",
|
|
49
|
+
variant: "primary"
|
|
50
|
+
}), p = d(n.isOpen || !1);
|
|
51
|
+
b(
|
|
52
|
+
() => n.isOpen,
|
|
53
|
+
(e) => {
|
|
54
|
+
e !== void 0 && (p.value = e);
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
const h = (e) => {
|
|
58
|
+
p.value = e, f("update:isOpen", e), f(e ? "onOpen" : "onClose");
|
|
59
|
+
}, i = d([]);
|
|
60
|
+
b(
|
|
61
|
+
() => n.options,
|
|
62
|
+
(e) => {
|
|
63
|
+
if (e)
|
|
64
|
+
if (n.remote) {
|
|
65
|
+
const l = [...i.value];
|
|
66
|
+
e.forEach((o) => {
|
|
67
|
+
l.some((a) => a.value !== void 0 && o.value !== void 0 ? typeof a.value == "object" && a.key && o.key ? a.key === o.key && a.value[a.key] === o.value[o.key] : a.value === o.value : a.label === o.label) || l.push(o);
|
|
68
|
+
}), i.value = l;
|
|
69
|
+
} else
|
|
70
|
+
i.value = e;
|
|
71
|
+
},
|
|
72
|
+
{ immediate: !0, deep: !0 }
|
|
73
|
+
);
|
|
74
|
+
const { getAllRecursiveIds: B } = K(), I = A({
|
|
75
|
+
...V(n),
|
|
76
|
+
options: i
|
|
77
|
+
}), { currentValue: T, selectedLabel: O, selectOption: x } = Q(
|
|
78
|
+
I,
|
|
79
|
+
// Cast to any to satisfy strict prop types if needed, or define interface
|
|
80
|
+
f
|
|
81
|
+
), N = D(() => {
|
|
82
|
+
const e = n.ignoreClickOutside || [], l = B(i.value);
|
|
83
|
+
return [.../* @__PURE__ */ new Set([...e, ...l])];
|
|
84
|
+
}), P = (e) => {
|
|
85
|
+
n.doubleConfirmation || !!e.confirmation ? (u.value = e, typeof e.confirmation == "object" ? s.value = {
|
|
86
|
+
title: e.confirmation.title || "Confirm Selection",
|
|
87
|
+
description: e.confirmation.description || "Are you sure you want to select this option?",
|
|
88
|
+
confirmText: e.confirmation.confirmText || "Confirm",
|
|
89
|
+
cancelText: e.confirmation.cancelText || "Cancel",
|
|
90
|
+
variant: e.confirmation.variant || "primary"
|
|
91
|
+
} : s.value = {
|
|
92
|
+
title: "Confirm Selection",
|
|
93
|
+
description: `Are you sure you want to select "${e.label}"?`,
|
|
94
|
+
confirmText: "Confirm",
|
|
95
|
+
cancelText: "Cancel",
|
|
96
|
+
variant: "primary"
|
|
97
|
+
}, m.value = !0, y()) : (g(e), n.closeOnSelect && y());
|
|
98
|
+
}, g = (e) => {
|
|
99
|
+
x(e);
|
|
100
|
+
}, M = () => {
|
|
101
|
+
u.value && (g(u.value), u.value = null, m.value = !1);
|
|
102
|
+
}, H = () => {
|
|
103
|
+
u.value = null, m.value = !1;
|
|
104
|
+
}, y = () => {
|
|
105
|
+
h(!1);
|
|
106
|
+
};
|
|
107
|
+
return (e, l) => ($(), R("div", W, [
|
|
108
|
+
C(v(q), {
|
|
109
|
+
content: "",
|
|
110
|
+
trigger: "click",
|
|
111
|
+
arrow: !1,
|
|
112
|
+
teleport: t.teleport,
|
|
113
|
+
offset: t.offset,
|
|
114
|
+
placement: t.position,
|
|
115
|
+
isOpen: p.value,
|
|
116
|
+
menuId: t.menuId,
|
|
117
|
+
ignoreClickOutside: N.value,
|
|
118
|
+
class: "w-full",
|
|
119
|
+
className: "dropdown " + (t.className || ""),
|
|
120
|
+
onOnShow: l[2] || (l[2] = (o) => e.$emit("onOpen")),
|
|
121
|
+
onOnHide: l[3] || (l[3] = (o) => e.$emit("onClose")),
|
|
122
|
+
"onUpdate:isOpen": h,
|
|
123
|
+
triggerClass: "w-full",
|
|
124
|
+
styles: { padding: "0" }
|
|
125
|
+
}, {
|
|
126
|
+
trigger: r(({ isOpen: o }) => [
|
|
127
|
+
c(e.$slots, "trigger", k(w({ selectedLabel: v(O), isOpen: o })), () => [
|
|
128
|
+
C(G, {
|
|
129
|
+
"selected-label": v(O),
|
|
130
|
+
"is-open": o,
|
|
131
|
+
class: "w-full"
|
|
132
|
+
}, null, 8, ["selected-label", "is-open"])
|
|
133
|
+
])
|
|
134
|
+
]),
|
|
135
|
+
default: r(() => [
|
|
136
|
+
c(e.$slots, "default"),
|
|
137
|
+
t.options?.length || i.value.length || e.$slots.menu || e.$slots.item || t.remote || t.searchable ? ($(), j(F, {
|
|
138
|
+
key: 0,
|
|
139
|
+
options: t.options,
|
|
140
|
+
cachedOptions: i.value,
|
|
141
|
+
class: z(t.className),
|
|
142
|
+
selected: v(T),
|
|
143
|
+
selectedIndex: t.selectedIndex,
|
|
144
|
+
maxHeight: t.maxHeight,
|
|
145
|
+
nestedPosition: t.nestedPosition,
|
|
146
|
+
nestedOffset: t.nestedOffset,
|
|
147
|
+
selectable: t.selectable,
|
|
148
|
+
layout: t.layout,
|
|
149
|
+
columns: t.columns,
|
|
150
|
+
loading: t.loading,
|
|
151
|
+
hasMore: t.hasMore,
|
|
152
|
+
searchable: t.searchable,
|
|
153
|
+
remote: t.remote,
|
|
154
|
+
onSelect: P,
|
|
155
|
+
onClose: y,
|
|
156
|
+
onLoadMore: l[0] || (l[0] = (o) => e.$emit("load-more")),
|
|
157
|
+
onSearch: l[1] || (l[1] = (o) => e.$emit("search", o))
|
|
158
|
+
}, E({
|
|
159
|
+
menu: r(() => [
|
|
160
|
+
c(e.$slots, "menu")
|
|
161
|
+
]),
|
|
162
|
+
item: r((o) => [
|
|
163
|
+
c(e.$slots, "item", k(w(o)))
|
|
164
|
+
]),
|
|
165
|
+
_: 2
|
|
166
|
+
}, [
|
|
167
|
+
e.$slots.header ? {
|
|
168
|
+
name: "header",
|
|
169
|
+
fn: r(() => [
|
|
170
|
+
c(e.$slots, "header")
|
|
171
|
+
]),
|
|
172
|
+
key: "0"
|
|
173
|
+
} : void 0,
|
|
174
|
+
e.$slots.footer ? {
|
|
175
|
+
name: "footer",
|
|
176
|
+
fn: r(() => [
|
|
177
|
+
c(e.$slots, "footer")
|
|
178
|
+
]),
|
|
179
|
+
key: "1"
|
|
180
|
+
} : void 0
|
|
181
|
+
]), 1032, ["options", "cachedOptions", "class", "selected", "selectedIndex", "maxHeight", "nestedPosition", "nestedOffset", "selectable", "layout", "columns", "loading", "hasMore", "searchable", "remote"])) : U("", !0)
|
|
182
|
+
]),
|
|
183
|
+
_: 3
|
|
184
|
+
}, 8, ["teleport", "offset", "placement", "isOpen", "menuId", "ignoreClickOutside", "className"]),
|
|
185
|
+
C(J, {
|
|
186
|
+
show: m.value,
|
|
187
|
+
title: s.value.title,
|
|
188
|
+
description: s.value.description,
|
|
189
|
+
"confirm-text": s.value.confirmText,
|
|
190
|
+
"cancel-text": s.value.cancelText,
|
|
191
|
+
variant: s.value.variant,
|
|
192
|
+
onConfirm: M,
|
|
193
|
+
onCancel: H
|
|
194
|
+
}, null, 8, ["show", "title", "description", "confirm-text", "cancel-text", "variant"])
|
|
195
|
+
]));
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
export {
|
|
199
|
+
ae as default
|
|
200
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IDropdownOptions, IDropdownOption } from '../../types';
|
|
2
|
+
interface Props {
|
|
3
|
+
options: IDropdownOptions;
|
|
4
|
+
selected?: any;
|
|
5
|
+
selectable?: boolean;
|
|
6
|
+
columns?: number | string;
|
|
7
|
+
itemsClass?: string;
|
|
8
|
+
headerClass?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
11
|
+
select: (option: IDropdownOption) => any;
|
|
12
|
+
mouseenter: (payload: any) => any;
|
|
13
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
14
|
+
onSelect?: (option: IDropdownOption) => any;
|
|
15
|
+
onMouseenter?: (payload: any) => any;
|
|
16
|
+
}>, {
|
|
17
|
+
options: IDropdownOptions;
|
|
18
|
+
selectable: boolean;
|
|
19
|
+
columns: number | string;
|
|
20
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { defineComponent as v, computed as _, openBlock as t, createElementBlock as n, normalizeStyle as C, Fragment as a, renderList as i, createElementVNode as m, normalizeClass as $, toDisplayString as h, createBlock as d, createCommentVNode as f, createVNode as w } from "vue";
|
|
2
|
+
import B from "../Icon.vue.js";
|
|
3
|
+
import y from "./DropdownItem.vue.js";
|
|
4
|
+
const N = { class: "font-semibold text-sm text-foreground" }, S = { class: "flex flex-col space-y-1" }, V = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "flex flex-col space-y-1 ml-3 pl-3 border-l border-border mt-0.5 mb-1.5"
|
|
7
|
+
}, g = {
|
|
8
|
+
key: 1,
|
|
9
|
+
class: "px-2 text-xs text-muted-foreground italic"
|
|
10
|
+
}, j = /* @__PURE__ */ v({
|
|
11
|
+
__name: "DropdownGroupedLayout",
|
|
12
|
+
props: {
|
|
13
|
+
options: { default: () => [] },
|
|
14
|
+
selected: {},
|
|
15
|
+
selectable: { type: Boolean, default: !0 },
|
|
16
|
+
columns: { default: 3 },
|
|
17
|
+
itemsClass: {},
|
|
18
|
+
headerClass: {}
|
|
19
|
+
},
|
|
20
|
+
emits: ["select", "mouseenter"],
|
|
21
|
+
setup(o, { emit: z }) {
|
|
22
|
+
const l = o, k = _(() => {
|
|
23
|
+
const e = l.columns;
|
|
24
|
+
return typeof e == "number" ? { gridTemplateColumns: `repeat(${e}, minmax(0, 1fr))` } : { gridTemplateColumns: e };
|
|
25
|
+
}), u = (e) => l.selected ? Array.isArray(l.selected) ? l.selected.includes(e.value) : typeof l.selected == "object" && l.selected !== null && e.key && e.key in l.selected ? l.selected[e.key] === e.value : l.selected === e.value : !1;
|
|
26
|
+
return (e, A) => (t(), n("div", {
|
|
27
|
+
class: "grid gap-6 p-4",
|
|
28
|
+
style: C(k.value)
|
|
29
|
+
}, [
|
|
30
|
+
(t(!0), n(a, null, i(o.options, (s, p) => (t(), n("div", {
|
|
31
|
+
key: s.key || s.value || p,
|
|
32
|
+
class: "flex flex-col space-y-2 min-w-[150px]"
|
|
33
|
+
}, [
|
|
34
|
+
m("div", {
|
|
35
|
+
class: $(["flex items-center gap-2 px-2 py-1 mb-1", o.headerClass])
|
|
36
|
+
}, [
|
|
37
|
+
m("span", N, h(s.label), 1),
|
|
38
|
+
s.icon ? (t(), d(B, {
|
|
39
|
+
key: 0,
|
|
40
|
+
icon: s.icon,
|
|
41
|
+
class: "w-4 h-4 text-muted-foreground"
|
|
42
|
+
}, null, 8, ["icon"])) : f("", !0)
|
|
43
|
+
], 2),
|
|
44
|
+
m("div", S, [
|
|
45
|
+
s.children && s.children.length ? (t(!0), n(a, { key: 0 }, i(s.children, (c, x) => (t(), n(a, {
|
|
46
|
+
key: c.key || c.value || x
|
|
47
|
+
}, [
|
|
48
|
+
w(y, {
|
|
49
|
+
option: c,
|
|
50
|
+
selected: u(c),
|
|
51
|
+
selectable: o.selectable,
|
|
52
|
+
class: "w-full",
|
|
53
|
+
onClick: (r) => e.$emit("select", c)
|
|
54
|
+
}, null, 8, ["option", "selected", "selectable", "onClick"]),
|
|
55
|
+
c.children && c.children.length ? (t(), n("div", V, [
|
|
56
|
+
(t(!0), n(a, null, i(c.children, (r, b) => (t(), d(y, {
|
|
57
|
+
key: r.key || r.value || b,
|
|
58
|
+
option: r,
|
|
59
|
+
selected: u(r),
|
|
60
|
+
selectable: o.selectable,
|
|
61
|
+
class: "w-full text-xs",
|
|
62
|
+
onClick: (D) => e.$emit("select", r)
|
|
63
|
+
}, null, 8, ["option", "selected", "selectable", "onClick"]))), 128))
|
|
64
|
+
])) : f("", !0)
|
|
65
|
+
], 64))), 128)) : (t(), n("div", g, " No items "))
|
|
66
|
+
])
|
|
67
|
+
]))), 128))
|
|
68
|
+
], 4));
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
export {
|
|
72
|
+
j as default
|
|
73
|
+
};
|