vlite3 1.1.2 → 1.1.5
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 +5 -0
- package/components/AttachmentsList/AttachmentsList.vue.d.ts +1 -1
- package/components/AttachmentsList/AttachmentsList.vue.js +237 -163
- package/components/Avatar.vue.js +1 -1
- package/components/AvatarUploader/AvatarUploader.vue.js +40 -37
- package/components/Button.vue.js +30 -28
- package/components/Carousel/Carousel.vue.d.ts +2 -2
- package/components/CategoryManager/CategoryManager.vue.d.ts +10 -2
- package/components/CategoryManager/CategoryManager.vue.js +138 -119
- package/components/CategoryManager/CategoryNode.vue.d.ts +2 -0
- package/components/CategoryManager/CategoryNode.vue.js +93 -88
- package/components/Chart/BarChart.vue.d.ts +48 -0
- package/components/Chart/CircleChart.vue.d.ts +47 -0
- package/components/Chart/LineChart.vue.d.ts +55 -0
- package/components/Chart/PieChart.vue.d.ts +49 -0
- package/components/Chart/index.d.ts +5 -0
- package/components/Chart/types.d.ts +135 -0
- package/components/Chart/utils.d.ts +40 -0
- package/components/Chat/ChatBubble.vue.js +22 -22
- package/components/CheckBox.vue.js +29 -28
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.js +2 -2
- package/components/Comment/CommentEditor.vue.d.ts +41 -0
- package/components/Comment/CommentEditor.vue.js +221 -0
- package/components/Comment/CommentEditor.vue2.js +4 -0
- package/components/Comment/CommentItem.vue.d.ts +70 -0
- package/components/Comment/CommentItem.vue.js +7 -0
- package/components/Comment/CommentItem.vue2.js +322 -0
- package/components/Comment/CommentThread.vue.d.ts +64 -0
- package/components/Comment/CommentThread.vue.js +185 -0
- package/components/Comment/CommentThread.vue2.js +4 -0
- package/components/Comment/index.d.ts +4 -0
- package/components/Comment/types.d.ts +34 -0
- package/components/ConfirmationModal.vue.js +30 -28
- package/components/CopyButton.vue.d.ts +50 -0
- package/components/CopyButton.vue.js +69 -0
- package/components/CopyButton.vue2.js +4 -0
- package/components/DataTable/DataTable.vue.d.ts +2 -4
- package/components/DataTable/DataTable.vue.js +184 -235
- package/components/DataTable/DataTableHeader.vue.d.ts +2 -0
- package/components/DataTable/DataTableHeader.vue.js +24 -23
- package/components/DataTable/DataTableRow.vue.d.ts +2 -0
- package/components/DataTable/DataTableRow.vue.js +32 -31
- package/components/DataTable/types.d.ts +2 -9
- package/components/DatePicker.vue.js +41 -35
- package/components/DateRangePicker.vue.js +18 -17
- package/components/Dropdown/Dropdown.vue.d.ts +5 -0
- package/components/Dropdown/Dropdown.vue.js +141 -137
- package/components/Dropdown/DropdownBooleanItem.vue.js +16 -15
- package/components/Dropdown/DropdownItem.vue.js +21 -20
- package/components/Dropdown/DropdownMenu.vue.js +1 -1
- package/components/Dropdown/DropdownMenu.vue2.js +13 -12
- package/components/Dropdown/DropdownTrigger.vue.d.ts +4 -0
- package/components/Dropdown/DropdownTrigger.vue.js +12 -7
- package/components/Dropdown/composables/useDropdownHydration.d.ts +2 -0
- package/components/Dropdown/composables/useDropdownSelection.d.ts +1 -0
- package/components/Dropdown/composables/useDropdownSelection.js +46 -31
- package/components/Empty/Empty.vue.js +7 -5
- package/components/Empty/index.d.ts +1 -1
- package/components/Empty/variants/Variant12.vue.d.ts +22 -0
- package/components/Empty/variants/Variant12.vue.js +35 -0
- package/components/Empty/variants/Variant12.vue2.js +4 -0
- package/components/FilePicker/FilePicker.vue.js +93 -90
- package/components/Footer/Footer.vue.d.ts +3 -0
- package/components/Footer/Variant1.vue.d.ts +20 -0
- package/components/Footer/Variant2.vue.d.ts +20 -0
- package/components/Footer/Variant3.vue.d.ts +12 -0
- package/components/Footer/index.d.ts +2 -0
- package/components/Footer/types.d.ts +73 -0
- package/components/Form/CustomFields.vue.d.ts +2 -0
- package/components/Form/CustomFields.vue.js +1 -1
- package/components/Form/CustomFields.vue2.js +125 -122
- package/components/Form/Form.vue.js +2 -2
- package/components/Form/Form.vue2.js +68 -64
- package/components/Form/FormField.vue.js +205 -149
- package/components/Form/FormFields.vue.js +2 -2
- package/components/Form/FormFields.vue2.js +28 -27
- package/components/Form/types.d.ts +2 -2
- package/components/Form/utils/form.utils.d.ts +3 -3
- package/components/Form/utils/form.utils.js +37 -37
- package/components/Input.vue.js +64 -62
- package/components/Invoice/Invoice.vue.js +9 -7
- package/components/Invoice/InvoiceTotals.vue.d.ts +14 -0
- package/components/Invoice/InvoiceTotals.vue.js +86 -0
- package/components/Invoice/InvoiceTotals.vue2.js +4 -0
- package/components/Invoice/InvoiceVariant1.vue.d.ts +3 -1
- package/components/Invoice/InvoiceVariant1.vue.js +194 -207
- package/components/Invoice/InvoiceVariant2.vue.d.ts +3 -1
- package/components/Invoice/InvoiceVariant2.vue.js +109 -118
- package/components/Invoice/InvoiceVariant3.vue.d.ts +3 -1
- package/components/Invoice/InvoiceVariant3.vue.js +157 -167
- package/components/Invoice/InvoiceVariant4.vue.d.ts +3 -1
- package/components/Invoice/InvoiceVariant4.vue.js +192 -202
- package/components/Invoice/index.d.ts +1 -0
- package/components/Invoice/types.d.ts +22 -0
- package/components/Masonry/Masonry.vue.d.ts +1 -1
- package/components/Modal.vue.js +1 -1
- package/components/Modal.vue2.js +60 -54
- package/components/MultiSelect/MultiSelect.vue.d.ts +2 -0
- package/components/MultiSelect/MultiSelect.vue.js +92 -90
- package/components/MultiSelect/composables/useMultiSelectHydration.d.ts +2 -0
- package/components/NumberInput.vue.js +2 -2
- package/components/NumberInput.vue2.js +127 -121
- package/components/PricingPlan/PricingPlan.vue.d.ts +1 -1
- package/components/RichTextEditor/RichTextLinkPopover.vue.d.ts +26 -0
- package/components/RichTextEditor/RichTextReader.vue.d.ts +7 -0
- package/components/RichTextEditor/RichTextToolbar.vue.d.ts +24 -0
- package/components/RichTextEditor/composables/useRichTextImageUpload.d.ts +14 -0
- package/components/RichTextEditor/composables/useRichTextLinks.d.ts +32 -0
- package/components/RichTextEditor/index.d.ts +2 -0
- package/components/Screen/Screen.vue.js +45 -46
- package/components/Screen/ScreenFilter.vue.js +1 -1
- package/components/SidePanel.vue.js +2 -2
- package/components/SidePanel.vue2.js +58 -52
- package/components/SidebarMenu/SidebarMenu.vue.d.ts +1 -1
- package/components/SidebarMenu/SidebarMenu.vue.js +192 -91
- package/components/SidebarMenu/SidebarMenu.vue3.js +5 -0
- package/components/SidebarMenu/SidebarMenuItem.vue.js +170 -157
- package/components/SidebarMenu/types.d.ts +12 -3
- package/components/{DataTable/DataTableToolbar.vue.d.ts → Splitter/Splitter.vue.d.ts} +18 -15
- package/components/Splitter/Splitter.vue.js +64 -0
- package/components/Splitter/Splitter.vue2.js +4 -0
- package/components/Splitter/index.d.ts +1 -0
- package/components/Stats/StatItem.vue.js +96 -91
- package/components/Stats/types.d.ts +1 -0
- package/components/StatusChip/status-map.js +34 -2
- package/components/Switch.vue.d.ts +6 -1
- package/components/Switch.vue.js +61 -24
- package/components/TagInput/TagInput.vue.d.ts +187 -0
- package/components/TagInput/TagInput.vue.js +113 -0
- package/components/TagInput/TagInput.vue2.js +4 -0
- package/components/TagInput/index.d.ts +1 -0
- package/components/Textarea.vue.js +19 -18
- package/components/ThumbnailSelector/ThumbnailSelector.vue.js +2 -2
- package/components/ThumbnailSelector/ThumbnailSelector.vue2.js +19 -16
- package/components/index.d.ts +4 -0
- package/core/config.d.ts +54 -0
- package/index.d.ts +4 -0
- package/index.js +300 -285
- package/package.json +1 -1
- package/style.css +657 -6
- package/types/button.d.ts +1 -1
- package/types/config.type.d.ts +2 -0
- package/types/styles.d.ts +1 -0
- package/utils/functions.js +9 -9
- package/components/DataTable/DataTableToolbar.vue.js +0 -60
- package/components/DataTable/DataTableToolbar.vue2.js +0 -4
- package/components/SidebarMenu/SidebarMenu.vue2.js +0 -4
- /package/components/ColorPicker/{ColorIro.vue2.js → ColorIro.vue.js} +0 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as oe, ref as i, computed as f, inject as ae, onMounted as ie, onUnmounted as se, watch as P, provide as R, reactive as re, toRefs as de, openBlock as x, createElementBlock as z, normalizeStyle as ue, createVNode as M, unref as u, withCtx as m, renderSlot as v, createCommentVNode as E, createBlock as ce, normalizeClass as fe, createSlots as me, normalizeProps as j, guardReactiveProps as U } from "vue";
|
|
2
|
+
import ve from "v-tooltip-lite";
|
|
3
3
|
import "v-tooltip-lite/style.css";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { useDropdownIds as
|
|
8
|
-
import { useDropdownSelection as
|
|
9
|
-
import { useDropdownHydration as
|
|
10
|
-
const
|
|
4
|
+
import he from "./DropdownMenu.vue.js";
|
|
5
|
+
import ye from "./DropdownTrigger.vue.js";
|
|
6
|
+
import ge from "../ConfirmationModal.vue.js";
|
|
7
|
+
import { useDropdownIds as pe } from "./composables/useDropdownIds.js";
|
|
8
|
+
import { useDropdownSelection as be } from "./composables/useDropdownSelection.js";
|
|
9
|
+
import { useDropdownHydration as Ce } from "./composables/useDropdownHydration.js";
|
|
10
|
+
const Oe = {
|
|
11
11
|
key: 0,
|
|
12
12
|
tabindex: "0"
|
|
13
|
-
},
|
|
13
|
+
}, Ne = /* @__PURE__ */ oe({
|
|
14
14
|
__name: "Dropdown",
|
|
15
15
|
props: {
|
|
16
16
|
selected: {},
|
|
@@ -34,6 +34,7 @@ const Ce = {
|
|
|
34
34
|
nestedPosition: {},
|
|
35
35
|
nestedOffset: {},
|
|
36
36
|
showSelectedLabel: { type: Boolean, default: !0 },
|
|
37
|
+
showSelectedIcon: { type: Boolean, default: !1 },
|
|
37
38
|
selectable: { type: Boolean, default: !0 },
|
|
38
39
|
doubleConfirmation: { type: Boolean, default: !1 },
|
|
39
40
|
layout: { default: "default" },
|
|
@@ -47,101 +48,102 @@ const Ce = {
|
|
|
47
48
|
triggerProps: {},
|
|
48
49
|
direction: { default: "ltr" },
|
|
49
50
|
isNested: { type: Boolean, default: !1 },
|
|
50
|
-
disabled: { type: Boolean, default: !1 }
|
|
51
|
+
disabled: { type: Boolean, default: !1 },
|
|
52
|
+
readonly: { type: Boolean, default: !1 }
|
|
51
53
|
},
|
|
52
54
|
emits: ["onSelect", "update:modelValue", "onOpen", "onClose", "update:isOpen", "load-more", "search"],
|
|
53
|
-
setup(
|
|
54
|
-
const
|
|
55
|
+
setup(t, { emit: q }) {
|
|
56
|
+
const l = t, h = q, p = i(!1), y = i(null), r = i({
|
|
55
57
|
title: "Confirm Selection",
|
|
56
58
|
description: "Are you sure you want to select this option?",
|
|
57
59
|
confirmText: "Confirm",
|
|
58
60
|
cancelText: "Cancel",
|
|
59
61
|
variant: "primary"
|
|
60
|
-
}),
|
|
61
|
-
|
|
62
|
-
},
|
|
63
|
-
|
|
62
|
+
}), F = f(() => l.position ? l.position : l.direction === "rtl" ? "bottom-end" : "bottom-start"), G = f(() => l.nestedPosition ? l.nestedPosition : l.direction === "rtl" ? "left-start" : "right-start"), b = i(l.isOpen || !1), C = i(0), J = `dropdown-${Math.random().toString(36).substring(2, 9)}`, w = f(() => l.menuId || J), g = i([]), s = ae("dropdown-context", null), K = (e) => {
|
|
63
|
+
g.value.includes(e) || g.value.push(e), s?.registerChildId?.(e);
|
|
64
|
+
}, Q = (e) => {
|
|
65
|
+
g.value = g.value.filter((o) => o !== e), s?.unregisterChildId?.(e);
|
|
64
66
|
};
|
|
65
|
-
|
|
66
|
-
s?.registerChildId && s.registerChildId(`#${
|
|
67
|
-
}),
|
|
68
|
-
s?.unregisterChildId && s.unregisterChildId(`#${
|
|
67
|
+
ie(() => {
|
|
68
|
+
s?.registerChildId && s.registerChildId(`#${w.value}`);
|
|
69
|
+
}), se(() => {
|
|
70
|
+
s?.unregisterChildId && s.unregisterChildId(`#${w.value}`);
|
|
69
71
|
}), P(
|
|
70
|
-
() =>
|
|
72
|
+
() => l.isOpen,
|
|
71
73
|
(e) => {
|
|
72
74
|
if (e !== void 0) {
|
|
73
|
-
if (
|
|
75
|
+
if ((l.disabled || l.readonly) && e) return;
|
|
74
76
|
b.value = e;
|
|
75
77
|
}
|
|
76
78
|
}
|
|
77
79
|
);
|
|
78
80
|
const N = (e) => {
|
|
79
|
-
if (
|
|
80
|
-
b.value = !1,
|
|
81
|
+
if (l.disabled || l.readonly) {
|
|
82
|
+
b.value = !1, h("update:isOpen", !1);
|
|
81
83
|
return;
|
|
82
84
|
}
|
|
83
|
-
b.value = e,
|
|
85
|
+
b.value = e, h("update:isOpen", e), h(e ? "onOpen" : "onClose"), s?.onChildToggle?.(e);
|
|
84
86
|
}, O = () => {
|
|
85
87
|
N(!1);
|
|
86
|
-
},
|
|
88
|
+
}, W = (e) => {
|
|
87
89
|
e ? C.value++ : C.value = Math.max(0, C.value - 1);
|
|
88
90
|
};
|
|
89
|
-
|
|
91
|
+
R("dropdown-context", {
|
|
90
92
|
close: O,
|
|
91
93
|
onChildToggle: (e) => {
|
|
92
|
-
|
|
94
|
+
W(e), s?.onChildToggle?.(e);
|
|
93
95
|
},
|
|
94
|
-
registerChildId:
|
|
95
|
-
unregisterChildId:
|
|
96
|
-
}),
|
|
97
|
-
const
|
|
96
|
+
registerChildId: K,
|
|
97
|
+
unregisterChildId: Q
|
|
98
|
+
}), R("modal-context", null);
|
|
99
|
+
const I = f(() => l.options ? l.options.map((e) => typeof e == "string" || typeof e == "number" ? { label: String(e), value: String(e) } : e) : []), S = i([]), A = i(!1), $ = i(!1);
|
|
98
100
|
P(
|
|
99
|
-
|
|
101
|
+
I,
|
|
100
102
|
(e) => {
|
|
101
103
|
if (e) {
|
|
102
|
-
if (
|
|
103
|
-
const
|
|
104
|
-
e.forEach((
|
|
105
|
-
|
|
106
|
-
}), S.value =
|
|
104
|
+
if (l.remote) {
|
|
105
|
+
const o = [...S.value];
|
|
106
|
+
e.forEach((n) => {
|
|
107
|
+
o.some((a) => a.value !== void 0 && n.value !== void 0 ? typeof a.value == "object" && a.key && n.key ? a.key === n.key && a.value[a.key] === n.value[n.key] : a.value === n.value : a.label === n.label) || o.push(n);
|
|
108
|
+
}), S.value = o;
|
|
107
109
|
} else
|
|
108
110
|
S.value = e;
|
|
109
111
|
!A.value && e.length > 0 && (A.value = !0, setTimeout(() => {
|
|
110
|
-
|
|
112
|
+
$.value = !0, H(B.value);
|
|
111
113
|
}, 10));
|
|
112
114
|
}
|
|
113
115
|
},
|
|
114
116
|
{ immediate: !0 }
|
|
115
117
|
);
|
|
116
|
-
const
|
|
117
|
-
const e = [...S.value],
|
|
118
|
-
return
|
|
119
|
-
|
|
118
|
+
const c = f(() => {
|
|
119
|
+
const e = [...S.value], o = new Set(e.map((n) => n.value ?? n.label));
|
|
120
|
+
return k.value.forEach((n, d) => {
|
|
121
|
+
o.has(d) || (e.unshift(n), o.add(d));
|
|
120
122
|
}), e;
|
|
121
|
-
}), { selectedBuffer:
|
|
122
|
-
fetchSelected:
|
|
123
|
-
getAvailableOptions: () =>
|
|
124
|
-
isReady: () =>
|
|
125
|
-
}), { getAllRecursiveIds:
|
|
126
|
-
...
|
|
127
|
-
options:
|
|
128
|
-
}), { currentValue:
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
),
|
|
132
|
-
const e =
|
|
133
|
-
return [.../* @__PURE__ */ new Set([...e, ...
|
|
123
|
+
}), { selectedBuffer: k, isHydrating: X, hydrateSelected: H } = Ce({
|
|
124
|
+
fetchSelected: l.fetchSelected,
|
|
125
|
+
getAvailableOptions: () => c.value,
|
|
126
|
+
isReady: () => $.value
|
|
127
|
+
}), { getAllRecursiveIds: Y } = pe(), Z = re({
|
|
128
|
+
...de(l),
|
|
129
|
+
options: c
|
|
130
|
+
}), { currentValue: B, selectedLabel: D, selectedIcon: L, selectOption: _ } = be(
|
|
131
|
+
Z,
|
|
132
|
+
h
|
|
133
|
+
), ee = f(() => {
|
|
134
|
+
const e = l.ignoreClickOutside || [], o = Y(c.value);
|
|
135
|
+
return [.../* @__PURE__ */ new Set([...e, ...o, ...g.value])];
|
|
134
136
|
});
|
|
135
137
|
P(
|
|
136
|
-
() =>
|
|
138
|
+
() => B.value,
|
|
137
139
|
(e) => {
|
|
138
|
-
|
|
140
|
+
$.value && H(e);
|
|
139
141
|
},
|
|
140
142
|
{ deep: !0 }
|
|
141
143
|
);
|
|
142
|
-
const
|
|
143
|
-
if (
|
|
144
|
-
|
|
144
|
+
const te = (e) => {
|
|
145
|
+
if (l.disabled || l.readonly || e.disabled) return;
|
|
146
|
+
l.doubleConfirmation || !!e.confirmation ? (y.value = e, typeof e.confirmation == "object" ? r.value = {
|
|
145
147
|
title: e.confirmation.title || "Confirm Selection",
|
|
146
148
|
description: e.confirmation.description || "Are you sure you want to select this option?",
|
|
147
149
|
confirmText: e.confirmation.confirmText || "Confirm",
|
|
@@ -153,136 +155,138 @@ const Ce = {
|
|
|
153
155
|
confirmText: "Confirm",
|
|
154
156
|
cancelText: "Cancel",
|
|
155
157
|
variant: "primary"
|
|
156
|
-
},
|
|
157
|
-
},
|
|
158
|
-
if (
|
|
159
|
-
const
|
|
160
|
-
|
|
161
|
-
const
|
|
162
|
-
if (!
|
|
158
|
+
}, p.value = !0, O()) : (V(e), l.closeOnSelect && O());
|
|
159
|
+
}, V = (e) => {
|
|
160
|
+
if (l.disabled || l.readonly || e.disabled) return;
|
|
161
|
+
const o = e.value ?? e.label;
|
|
162
|
+
k.value.has(o) || k.value.set(o, e);
|
|
163
|
+
const n = _(e);
|
|
164
|
+
if (!l.isNested) {
|
|
163
165
|
const d = e._originalOption || e, a = d.value ?? d.label;
|
|
164
|
-
(e._path || [d]).forEach((
|
|
165
|
-
typeof
|
|
166
|
+
(e._path || [d]).forEach((T) => {
|
|
167
|
+
typeof T.onSelect == "function" && T.onSelect({
|
|
166
168
|
value: a,
|
|
167
|
-
option:
|
|
168
|
-
data:
|
|
169
|
-
values:
|
|
169
|
+
option: T,
|
|
170
|
+
data: c.value || [],
|
|
171
|
+
values: n
|
|
170
172
|
});
|
|
171
173
|
});
|
|
172
174
|
}
|
|
173
|
-
}, te = () => {
|
|
174
|
-
h.value && (L(h.value), h.value = null, y.value = !1);
|
|
175
175
|
}, le = () => {
|
|
176
|
-
|
|
176
|
+
y.value && (V(y.value), y.value = null, p.value = !1);
|
|
177
|
+
}, ne = () => {
|
|
178
|
+
y.value = null, p.value = !1;
|
|
177
179
|
};
|
|
178
|
-
return (e,
|
|
180
|
+
return (e, o) => (x(), z("div", {
|
|
179
181
|
class: "relative inline-block text-left",
|
|
180
|
-
style:
|
|
182
|
+
style: ue({ direction: t.direction })
|
|
181
183
|
}, [
|
|
182
|
-
M(
|
|
184
|
+
M(u(ve), {
|
|
183
185
|
content: "",
|
|
184
186
|
trigger: "click",
|
|
185
187
|
arrow: !1,
|
|
186
|
-
teleport:
|
|
187
|
-
offset:
|
|
188
|
-
placement:
|
|
188
|
+
teleport: t.teleport,
|
|
189
|
+
offset: t.offset,
|
|
190
|
+
placement: F.value,
|
|
189
191
|
isOpen: b.value,
|
|
190
192
|
keepAlive: C.value > 0,
|
|
191
|
-
menuId:
|
|
192
|
-
ignoreClickOutside:
|
|
193
|
+
menuId: w.value,
|
|
194
|
+
ignoreClickOutside: ee.value,
|
|
193
195
|
class: "w-full",
|
|
194
|
-
className: "dropdown " + (
|
|
195
|
-
onOnShow:
|
|
196
|
-
onOnHide:
|
|
196
|
+
className: "dropdown " + (t.className || ""),
|
|
197
|
+
onOnShow: o[2] || (o[2] = (n) => e.$emit("onOpen")),
|
|
198
|
+
onOnHide: o[3] || (o[3] = (n) => e.$emit("onClose")),
|
|
197
199
|
"onUpdate:isOpen": N,
|
|
198
200
|
triggerClass: "w-full",
|
|
199
201
|
styles: { padding: "0" }
|
|
200
202
|
}, {
|
|
201
|
-
trigger:
|
|
202
|
-
|
|
203
|
-
M(
|
|
204
|
-
"selected-label":
|
|
205
|
-
"
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
203
|
+
trigger: m(({ isOpen: n }) => [
|
|
204
|
+
v(e.$slots, "trigger", j(U({ selectedLabel: u(D), selectedIcon: t.showSelectedIcon ? u(L) : void 0, isOpen: n })), () => [
|
|
205
|
+
M(ye, {
|
|
206
|
+
"selected-label": u(D),
|
|
207
|
+
"selected-icon": t.showSelectedIcon ? u(L) : void 0,
|
|
208
|
+
"is-open": n,
|
|
209
|
+
direction: t.direction,
|
|
210
|
+
disabled: t.disabled,
|
|
211
|
+
readonly: t.readonly,
|
|
212
|
+
triggerProps: t.triggerProps,
|
|
209
213
|
class: "w-full"
|
|
210
|
-
}, null, 8, ["selected-label", "is-open", "direction", "disabled", "triggerProps"])
|
|
214
|
+
}, null, 8, ["selected-label", "selected-icon", "is-open", "direction", "disabled", "readonly", "triggerProps"])
|
|
211
215
|
])
|
|
212
216
|
]),
|
|
213
|
-
default:
|
|
214
|
-
e.$slots?.default ? (x(),
|
|
215
|
-
|
|
216
|
-
])) :
|
|
217
|
-
!
|
|
217
|
+
default: m(() => [
|
|
218
|
+
e.$slots?.default ? (x(), z("span", Oe, [
|
|
219
|
+
v(e.$slots, "default")
|
|
220
|
+
])) : E("", !0),
|
|
221
|
+
!(t.disabled || t.readonly) && (I.value.length || c.value.length || e.$slots.menu || e.$slots.item || t.remote || t.searchable) ? (x(), ce(he, {
|
|
218
222
|
key: 1,
|
|
219
|
-
options:
|
|
220
|
-
cachedOptions:
|
|
221
|
-
class:
|
|
222
|
-
selected:
|
|
223
|
-
selectedIndex:
|
|
224
|
-
maxHeight:
|
|
225
|
-
nestedPosition:
|
|
226
|
-
nestedOffset:
|
|
227
|
-
selectable:
|
|
228
|
-
direction:
|
|
229
|
-
layout:
|
|
230
|
-
columns:
|
|
231
|
-
loading:
|
|
232
|
-
hasMore:
|
|
233
|
-
searchable:
|
|
234
|
-
remote:
|
|
235
|
-
debounceTime:
|
|
236
|
-
onSelect:
|
|
223
|
+
options: I.value,
|
|
224
|
+
cachedOptions: c.value,
|
|
225
|
+
class: fe(t.className),
|
|
226
|
+
selected: u(B),
|
|
227
|
+
selectedIndex: t.selectedIndex,
|
|
228
|
+
maxHeight: t.maxHeight,
|
|
229
|
+
nestedPosition: G.value,
|
|
230
|
+
nestedOffset: t.nestedOffset,
|
|
231
|
+
selectable: t.selectable,
|
|
232
|
+
direction: t.direction,
|
|
233
|
+
layout: t.layout,
|
|
234
|
+
columns: t.columns,
|
|
235
|
+
loading: t.loading || u(X),
|
|
236
|
+
hasMore: t.hasMore,
|
|
237
|
+
searchable: t.searchable,
|
|
238
|
+
remote: t.remote,
|
|
239
|
+
debounceTime: t.debounceTime,
|
|
240
|
+
onSelect: te,
|
|
237
241
|
onClose: O,
|
|
238
|
-
onLoadMore:
|
|
239
|
-
onSearch:
|
|
240
|
-
},
|
|
242
|
+
onLoadMore: o[0] || (o[0] = (n) => e.$emit("load-more")),
|
|
243
|
+
onSearch: o[1] || (o[1] = (n) => e.$emit("search", n))
|
|
244
|
+
}, me({ _: 2 }, [
|
|
241
245
|
e.$slots.menu ? {
|
|
242
246
|
name: "menu",
|
|
243
|
-
fn:
|
|
244
|
-
|
|
247
|
+
fn: m(() => [
|
|
248
|
+
v(e.$slots, "menu")
|
|
245
249
|
]),
|
|
246
250
|
key: "0"
|
|
247
251
|
} : void 0,
|
|
248
252
|
e.$slots.item ? {
|
|
249
253
|
name: "item",
|
|
250
|
-
fn:
|
|
251
|
-
|
|
254
|
+
fn: m((n) => [
|
|
255
|
+
v(e.$slots, "item", j(U(n)))
|
|
252
256
|
]),
|
|
253
257
|
key: "1"
|
|
254
258
|
} : void 0,
|
|
255
259
|
e.$slots.header ? {
|
|
256
260
|
name: "header",
|
|
257
|
-
fn:
|
|
258
|
-
|
|
261
|
+
fn: m(() => [
|
|
262
|
+
v(e.$slots, "header")
|
|
259
263
|
]),
|
|
260
264
|
key: "2"
|
|
261
265
|
} : void 0,
|
|
262
266
|
e.$slots.footer ? {
|
|
263
267
|
name: "footer",
|
|
264
|
-
fn:
|
|
265
|
-
|
|
268
|
+
fn: m(() => [
|
|
269
|
+
v(e.$slots, "footer")
|
|
266
270
|
]),
|
|
267
271
|
key: "3"
|
|
268
272
|
} : void 0
|
|
269
|
-
]), 1032, ["options", "cachedOptions", "class", "selected", "selectedIndex", "maxHeight", "nestedPosition", "nestedOffset", "selectable", "direction", "layout", "columns", "loading", "hasMore", "searchable", "remote", "debounceTime"])) :
|
|
273
|
+
]), 1032, ["options", "cachedOptions", "class", "selected", "selectedIndex", "maxHeight", "nestedPosition", "nestedOffset", "selectable", "direction", "layout", "columns", "loading", "hasMore", "searchable", "remote", "debounceTime"])) : E("", !0)
|
|
270
274
|
]),
|
|
271
275
|
_: 3
|
|
272
276
|
}, 8, ["teleport", "offset", "placement", "isOpen", "keepAlive", "menuId", "ignoreClickOutside", "className"]),
|
|
273
|
-
M(
|
|
274
|
-
show:
|
|
277
|
+
M(ge, {
|
|
278
|
+
show: p.value,
|
|
275
279
|
title: r.value.title,
|
|
276
280
|
description: r.value.description,
|
|
277
281
|
"confirm-text": r.value.confirmText,
|
|
278
282
|
"cancel-text": r.value.cancelText,
|
|
279
283
|
variant: r.value.variant,
|
|
280
|
-
onConfirm:
|
|
281
|
-
onCancel:
|
|
284
|
+
onConfirm: le,
|
|
285
|
+
onCancel: ne
|
|
282
286
|
}, null, 8, ["show", "title", "description", "confirm-text", "cancel-text", "variant"])
|
|
283
287
|
], 4));
|
|
284
288
|
}
|
|
285
289
|
});
|
|
286
290
|
export {
|
|
287
|
-
|
|
291
|
+
Ne as default
|
|
288
292
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as m, computed as d, openBlock as a, createElementBlock as u, withModifiers as p, normalizeClass as f, createElementVNode as l, createBlock as g, createCommentVNode as h, toDisplayString as v, createVNode as b } from "vue";
|
|
2
|
+
import x from "../Switch.vue.js";
|
|
3
3
|
import y from "../Icon.vue.js";
|
|
4
4
|
import { $t as k } from "../../utils/i18n.js";
|
|
5
|
-
const w = { class: "flex items-center gap-2 flex-1 min-w-0" },
|
|
5
|
+
const w = ["data-testid"], B = { class: "flex items-center gap-2 flex-1 min-w-0" }, $ = { class: "truncate font-medium" }, z = /* @__PURE__ */ m({
|
|
6
6
|
__name: "DropdownBooleanItem",
|
|
7
7
|
props: {
|
|
8
8
|
option: {},
|
|
@@ -11,36 +11,37 @@ const w = { class: "flex items-center gap-2 flex-1 min-w-0" }, B = { class: "tru
|
|
|
11
11
|
},
|
|
12
12
|
emits: ["change"],
|
|
13
13
|
setup(e, { emit: c }) {
|
|
14
|
-
const o = e, s = c,
|
|
14
|
+
const o = e, s = c, r = d(
|
|
15
15
|
() => o.option.labelI18n ? k(o.option.labelI18n) : o.option.label
|
|
16
|
-
),
|
|
17
|
-
s("change",
|
|
16
|
+
), n = (t) => {
|
|
17
|
+
s("change", t, o.option);
|
|
18
18
|
};
|
|
19
|
-
return (
|
|
19
|
+
return (t, i) => (a(), u("div", {
|
|
20
20
|
tabindex: "0",
|
|
21
21
|
"data-dropdown-item": "",
|
|
22
22
|
class: f(["relative flex cursor-pointer select-none items-center justify-between rounded-sm px-2 py-1.5 text-sm outline-none transition-colors", [
|
|
23
23
|
e.focused ? "bg-accent text-accent-foreground" : "hover:bg-accent hover:text-accent-foreground"
|
|
24
24
|
]]),
|
|
25
|
-
|
|
25
|
+
"data-testid": t.$attrs["data-testid"] || `dropdown-item-bool-${e.option.key || e.option.label}`.toLowerCase().replace(/[^a-z0-9]+/g, "-"),
|
|
26
|
+
onClick: i[0] || (i[0] = p((j) => n(!e.value), ["stop"]))
|
|
26
27
|
}, [
|
|
27
|
-
l("div",
|
|
28
|
+
l("div", B, [
|
|
28
29
|
e.option.icon || e.option.emoji ? (a(), g(y, {
|
|
29
30
|
key: 0,
|
|
30
31
|
icon: e.option.icon,
|
|
31
32
|
emoji: e.option.emoji,
|
|
32
33
|
class: "h-4 w-4 shrink-0 opacity-70"
|
|
33
|
-
}, null, 8, ["icon", "emoji"])) :
|
|
34
|
-
l("span",
|
|
34
|
+
}, null, 8, ["icon", "emoji"])) : h("", !0),
|
|
35
|
+
l("span", $, v(r.value), 1)
|
|
35
36
|
]),
|
|
36
|
-
x
|
|
37
|
+
b(x, {
|
|
37
38
|
"model-value": e.value,
|
|
38
39
|
class: "ml-3 shrink-0 scale-75 origin-right",
|
|
39
|
-
"onUpdate:modelValue":
|
|
40
|
+
"onUpdate:modelValue": n
|
|
40
41
|
}, null, 8, ["model-value"])
|
|
41
|
-
],
|
|
42
|
+
], 10, w));
|
|
42
43
|
}
|
|
43
44
|
});
|
|
44
45
|
export {
|
|
45
|
-
|
|
46
|
+
z as default
|
|
46
47
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as g, computed as
|
|
1
|
+
import { defineComponent as g, computed as a, openBlock as n, createElementBlock as s, withKeys as w, withModifiers as k, normalizeClass as h, renderSlot as $, normalizeProps as I, guardReactiveProps as B, createBlock as p, createCommentVNode as i, createElementVNode as c, toDisplayString as d } from "vue";
|
|
2
2
|
import v from "../Icon.vue.js";
|
|
3
|
-
import { $t as
|
|
4
|
-
const j = ["tabindex", "data-disabled"], C = { class: "flex flex-col flex-1 min-w-0" },
|
|
3
|
+
import { $t as r } from "../../utils/i18n.js";
|
|
4
|
+
const j = ["tabindex", "data-disabled", "data-testid"], C = { class: "flex flex-col flex-1 min-w-0" }, S = { class: "flex items-center justify-between gap-2" }, z = { class: "truncate font-medium" }, D = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "text-xs text-muted-foreground whitespace-nowrap opacity-90"
|
|
7
7
|
}, E = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "text-[10px] text-muted-foreground truncate opacity-70"
|
|
10
|
-
},
|
|
10
|
+
}, N = /* @__PURE__ */ g({
|
|
11
11
|
__name: "DropdownItem",
|
|
12
12
|
props: {
|
|
13
13
|
option: {},
|
|
@@ -18,14 +18,14 @@ const j = ["tabindex", "data-disabled"], C = { class: "flex flex-col flex-1 min-
|
|
|
18
18
|
},
|
|
19
19
|
emits: ["click", "mouseenter"],
|
|
20
20
|
setup(e, { emit: x }) {
|
|
21
|
-
const t = e,
|
|
22
|
-
() => t.option.labelI18n ?
|
|
23
|
-
),
|
|
24
|
-
() => t.option.subtitleI18n ?
|
|
25
|
-
),
|
|
26
|
-
() => t.option.descriptionI18n ?
|
|
21
|
+
const t = e, u = x, y = a(
|
|
22
|
+
() => t.option.labelI18n ? r(t.option.labelI18n) : t.option.label
|
|
23
|
+
), m = a(
|
|
24
|
+
() => t.option.subtitleI18n ? r(t.option.subtitleI18n) : t.option.subtitle
|
|
25
|
+
), f = a(
|
|
26
|
+
() => t.option.descriptionI18n ? r(t.option.descriptionI18n) : t.option.description
|
|
27
27
|
);
|
|
28
|
-
return (
|
|
28
|
+
return (l, o) => (n(), s("div", {
|
|
29
29
|
tabindex: e.option.disabled ? -1 : 0,
|
|
30
30
|
"data-dropdown-item": "",
|
|
31
31
|
class: h(["relative w-full flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:ring-1 focus-visible:ring-primary focus-visible:ring-offset-1 data-disabled:pointer-events-none data-disabled:opacity-50", [
|
|
@@ -35,11 +35,12 @@ const j = ["tabindex", "data-disabled"], C = { class: "flex flex-col flex-1 min-
|
|
|
35
35
|
e.option.class || ""
|
|
36
36
|
]]),
|
|
37
37
|
"data-disabled": e.option.disabled ? !0 : void 0,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
"data-testid": l.$attrs["data-testid"] || (e.option.value ? `dropdown-item-${e.option.value}` : `dropdown-item-${e.option.label}`).toString().toLowerCase().replace(/[^a-z0-9]+/g, "-"),
|
|
39
|
+
onClick: o[0] || (o[0] = (b) => u("click", e.option)),
|
|
40
|
+
onKeydown: o[1] || (o[1] = w(k((b) => u("click", e.option), ["prevent"]), ["enter"])),
|
|
41
|
+
onMouseenter: o[2] || (o[2] = (b) => l.$emit("mouseenter", e.index ?? -1))
|
|
41
42
|
}, [
|
|
42
|
-
|
|
43
|
+
$(l.$slots, "default", I(B({ option: e.option, index: e.index, selected: e.selected })), () => [
|
|
43
44
|
e.option.icon || e.option.emoji ? (n(), p(v, {
|
|
44
45
|
key: 0,
|
|
45
46
|
icon: e.option.icon,
|
|
@@ -47,11 +48,11 @@ const j = ["tabindex", "data-disabled"], C = { class: "flex flex-col flex-1 min-
|
|
|
47
48
|
class: "mr-2 h-4 w-4 shrink-0 mt-0.5"
|
|
48
49
|
}, null, 8, ["icon", "emoji"])) : i("", !0),
|
|
49
50
|
c("div", C, [
|
|
50
|
-
c("div",
|
|
51
|
-
c("span",
|
|
52
|
-
|
|
51
|
+
c("div", S, [
|
|
52
|
+
c("span", z, d(y.value), 1),
|
|
53
|
+
m.value ? (n(), s("span", D, d(m.value), 1)) : i("", !0)
|
|
53
54
|
]),
|
|
54
|
-
|
|
55
|
+
f.value ? (n(), s("span", E, d(f.value), 1)) : i("", !0)
|
|
55
56
|
]),
|
|
56
57
|
e.selectable && e.selected ? (n(), p(v, {
|
|
57
58
|
key: 1,
|
|
@@ -63,5 +64,5 @@ const j = ["tabindex", "data-disabled"], C = { class: "flex flex-col flex-1 min-
|
|
|
63
64
|
}
|
|
64
65
|
});
|
|
65
66
|
export {
|
|
66
|
-
|
|
67
|
+
N as default
|
|
67
68
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./DropdownMenu.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-77113fbb"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -21,7 +21,7 @@ const ve = ["dir"], ye = {
|
|
|
21
21
|
}, we = {
|
|
22
22
|
key: 0,
|
|
23
23
|
class: "h-px bg-border my-1 mx-1"
|
|
24
|
-
},
|
|
24
|
+
}, pe = ["onMouseenter"], xe = { class: "flex items-center flex-1 min-w-0" }, Se = { class: "truncate" }, Oe = {
|
|
25
25
|
key: 3,
|
|
26
26
|
class: "flex justify-center py-2"
|
|
27
27
|
}, _e = {
|
|
@@ -70,11 +70,11 @@ const ve = ["dir"], ye = {
|
|
|
70
70
|
e.disabled || f("select", e);
|
|
71
71
|
}, {
|
|
72
72
|
focusedIndex: y,
|
|
73
|
-
isKeyboardMode:
|
|
73
|
+
isKeyboardMode: p,
|
|
74
74
|
filteredOptions: F,
|
|
75
75
|
handleKeyDown: M,
|
|
76
76
|
handleMouseMove: B,
|
|
77
|
-
onMouseEnterItem:
|
|
77
|
+
onMouseEnterItem: x,
|
|
78
78
|
scrollToIndex: K
|
|
79
79
|
} = fe({
|
|
80
80
|
options: u,
|
|
@@ -140,7 +140,8 @@ const ve = ["dir"], ye = {
|
|
|
140
140
|
"input-class": "-ml-1",
|
|
141
141
|
variant: "transparent",
|
|
142
142
|
"icon-class": "h-3.5! w-3.5!",
|
|
143
|
-
"show-clear-button": !1
|
|
143
|
+
"show-clear-button": !1,
|
|
144
|
+
"data-testid": "dropdown-search-input"
|
|
144
145
|
}, null, 8, ["modelValue", "placeholder"])
|
|
145
146
|
])) : d("", !0),
|
|
146
147
|
e.$slots.header ? (o(), i("div", ge, [
|
|
@@ -174,9 +175,9 @@ const ve = ["dir"], ye = {
|
|
|
174
175
|
key: 1,
|
|
175
176
|
option: l,
|
|
176
177
|
value: G(l),
|
|
177
|
-
focused: r(
|
|
178
|
+
focused: r(p) && r(y) === n,
|
|
178
179
|
onChange: J,
|
|
179
|
-
onMouseenter: (c) => r(
|
|
180
|
+
onMouseenter: (c) => r(x)(n)
|
|
180
181
|
}, null, 8, ["option", "value", "focused", "onMouseenter"])) : l.children && l.children.length > 0 ? (o(), m(he, {
|
|
181
182
|
key: 2,
|
|
182
183
|
"is-nested": !0,
|
|
@@ -198,13 +199,13 @@ const ve = ["dir"], ye = {
|
|
|
198
199
|
tabindex: 0,
|
|
199
200
|
"data-dropdown-item": "",
|
|
200
201
|
class: E(["relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm font-medium outline-none transition-colors justify-between w-full focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:ring-1 focus-visible:ring-primary focus-visible:ring-offset-1", [
|
|
201
|
-
r(
|
|
202
|
+
r(p) && r(y) === n ? "bg-accent text-accent-foreground" : "hover:bg-accent hover:text-accent-foreground",
|
|
202
203
|
l.disabled ? "opacity-50 cursor-not-allowed" : "",
|
|
203
204
|
l.triggerClass || l.class || ""
|
|
204
205
|
]]),
|
|
205
|
-
onMouseenter: (c) => r(
|
|
206
|
+
onMouseenter: (c) => r(x)(n)
|
|
206
207
|
}, [
|
|
207
|
-
S("div",
|
|
208
|
+
S("div", xe, [
|
|
208
209
|
l.icon || l.emoji ? (o(), m(O, {
|
|
209
210
|
key: 0,
|
|
210
211
|
icon: l.icon,
|
|
@@ -218,7 +219,7 @@ const ve = ["dir"], ye = {
|
|
|
218
219
|
icon: a.direction === "rtl" ? "lucide:chevron-left" : "lucide:chevron-right",
|
|
219
220
|
class: "h-4 w-4 text-muted-foreground shrink-0 ml-2"
|
|
220
221
|
}, null, 8, ["icon"])) : d("", !0)
|
|
221
|
-
], 42,
|
|
222
|
+
], 42, pe)
|
|
222
223
|
]),
|
|
223
224
|
_: 2
|
|
224
225
|
}, 1032, ["position", "offset", "options", "selected", "menuId", "nestedPosition", "nestedOffset", "selectable", "ignoreClickOutside", "direction", "onOnSelect"])) : (o(), m(ce, {
|
|
@@ -226,10 +227,10 @@ const ve = ["dir"], ye = {
|
|
|
226
227
|
option: l,
|
|
227
228
|
index: n,
|
|
228
229
|
selected: q(l),
|
|
229
|
-
focused: r(
|
|
230
|
+
focused: r(p) && r(y) === n,
|
|
230
231
|
selectable: a.selectable,
|
|
231
232
|
onClick: (c) => w(l),
|
|
232
|
-
onMouseenter: (c) => r(
|
|
233
|
+
onMouseenter: (c) => r(x)(n)
|
|
233
234
|
}, ne({ _: 2 }, [
|
|
234
235
|
e.$slots.item ? {
|
|
235
236
|
name: "default",
|