vlite3 0.4.8 → 0.5.2
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 +201 -100
- package/_virtual/Barcode.js +4 -0
- package/_virtual/CODE128.js +4 -0
- package/_virtual/CODE128A.js +4 -0
- package/_virtual/CODE128B.js +4 -0
- package/_virtual/CODE128C.js +4 -0
- package/_virtual/CODE128_AUTO.js +4 -0
- package/_virtual/CODE93.js +4 -0
- package/_virtual/CODE93FullASCII.js +4 -0
- package/_virtual/EAN.js +4 -0
- package/_virtual/EAN13.js +4 -0
- package/_virtual/EAN2.js +4 -0
- package/_virtual/EAN5.js +4 -0
- package/_virtual/EAN8.js +4 -0
- package/_virtual/ErrorHandler.js +4 -0
- package/_virtual/FileSaver.min.js +5 -0
- package/_virtual/FileSaver.min2.js +4 -0
- package/_virtual/ITF.js +4 -0
- package/_virtual/ITF14.js +4 -0
- package/_virtual/JsBarcode.js +7 -0
- package/_virtual/MSI.js +4 -0
- package/_virtual/MSI10.js +4 -0
- package/_virtual/MSI1010.js +4 -0
- package/_virtual/MSI11.js +4 -0
- package/_virtual/MSI1110.js +4 -0
- package/_virtual/UPC.js +4 -0
- package/_virtual/UPCE.js +4 -0
- package/_virtual/_commonjsHelpers.js +8 -0
- package/_virtual/alignment-pattern.js +4 -0
- package/_virtual/auto.js +4 -0
- package/_virtual/browser.js +7 -0
- package/_virtual/browser2.js +4 -0
- package/_virtual/canvas.js +4 -0
- package/_virtual/canvas2.js +4 -0
- package/_virtual/checksums.js +4 -0
- package/_virtual/constants.js +4 -0
- package/_virtual/constants2.js +4 -0
- package/_virtual/constants3.js +4 -0
- package/_virtual/constants4.js +4 -0
- package/_virtual/defaults.js +4 -0
- package/_virtual/dijkstra.js +4 -0
- package/_virtual/encoder.js +4 -0
- package/_virtual/error-correction-code.js +4 -0
- package/_virtual/error-correction-level.js +4 -0
- package/_virtual/exceptions.js +4 -0
- package/_virtual/finder-pattern.js +4 -0
- package/_virtual/fixOptions.js +4 -0
- package/_virtual/format-info.js +4 -0
- package/_virtual/galois-field.js +4 -0
- package/_virtual/getOptionsFromElement.js +4 -0
- package/_virtual/getRenderProperties.js +4 -0
- package/_virtual/index.js +4 -0
- package/_virtual/index10.js +4 -0
- package/_virtual/index11.js +4 -0
- package/_virtual/index2.js +4 -0
- package/_virtual/index3.js +4 -0
- package/_virtual/index4.js +4 -0
- package/_virtual/index5.js +4 -0
- package/_virtual/index6.js +4 -0
- package/_virtual/index7.js +4 -0
- package/_virtual/index8.js +4 -0
- package/_virtual/index9.js +4 -0
- package/_virtual/linearizeEncodings.js +4 -0
- package/_virtual/mask-pattern.js +4 -0
- package/_virtual/merge.js +4 -0
- package/_virtual/mode.js +4 -0
- package/_virtual/object.js +4 -0
- package/_virtual/optionsFromStrings.js +4 -0
- package/_virtual/papaparse.min.js +7 -0
- package/_virtual/papaparse.min2.js +4 -0
- package/_virtual/polynomial.js +4 -0
- package/_virtual/qrcode.js +4 -0
- package/_virtual/regex.js +4 -0
- package/_virtual/segments.js +4 -0
- package/_virtual/shared.js +4 -0
- package/_virtual/svg-tag.js +4 -0
- package/_virtual/svg.js +4 -0
- package/_virtual/utils.js +4 -0
- package/_virtual/utils2.js +4 -0
- package/_virtual/version-check.js +4 -0
- package/_virtual/version.js +4 -0
- package/components/Accordion/Accordion.vue.d.ts +7 -7
- package/components/Accordion/AccordionItem.vue.d.ts +4 -4
- package/components/Accordion/AccordionTrigger.vue.d.ts +2 -2
- package/components/Alert.vue.d.ts +1 -1
- package/components/Avatar.vue.d.ts +2 -2
- package/components/Avatar.vue.js +2 -2
- package/components/AvatarUploader/AvatarUploader.vue.d.ts +5 -5
- package/components/Badge.vue.d.ts +1 -1
- package/components/Barcode/Barcode.vue.d.ts +22 -0
- package/components/Barcode/Barcode.vue.js +58 -0
- package/components/Barcode/Barcode.vue2.js +4 -0
- package/components/Barcode/index.d.ts +2 -0
- package/components/Barcode/types.d.ts +5 -0
- package/components/Barcode/types.js +15 -0
- package/components/Breadcrumb/Breadcrumb.vue.d.ts +23 -0
- package/components/Breadcrumb/Breadcrumb.vue.js +7 -0
- package/components/Breadcrumb/Breadcrumb.vue2.js +84 -0
- package/components/Breadcrumb/BreadcrumbItem.vue.d.ts +27 -0
- package/components/Breadcrumb/BreadcrumbItem.vue.js +7 -0
- package/components/Breadcrumb/BreadcrumbItem.vue2.js +50 -0
- package/components/Breadcrumb/index.d.ts +3 -0
- package/components/Breadcrumb/types.d.ts +19 -0
- package/components/Button.vue.d.ts +4 -4
- package/components/Button.vue.js +32 -29
- package/components/ButtonGroup.vue.d.ts +1 -1
- package/components/Carousel/Carousel.vue.d.ts +58 -58
- package/components/CheckBox.vue.d.ts +2 -2
- package/components/Chip/Chip.vue.d.ts +3 -3
- package/components/ChoiceBox/ChoiceBox.vue.d.ts +4 -4
- package/components/ColorPicker/ColorPicker.vue.d.ts +3 -3
- package/components/ColorPicker/index.d.ts +1 -0
- package/components/CommandPaletteContent.vue.d.ts +15 -0
- package/components/CommandPaletteContent.vue.js +7 -0
- package/components/CommandPaletteContent.vue2.js +287 -0
- package/components/ConfirmationModal.vue.js +12 -10
- package/components/DataList/DataList.vue.d.ts +2 -2
- package/components/DataTable/DataTable.vue.d.ts +6 -6
- package/components/DataTable/DataTableRow.vue.d.ts +3 -3
- package/components/DatePicker.vue.d.ts +2 -2
- package/components/DatePicker.vue.js +7 -7
- package/components/DateRangePicker.vue.d.ts +29 -0
- package/components/DateRangePicker.vue.js +231 -0
- package/components/DateRangePicker.vue2.js +4 -0
- package/components/Dropdown/Dropdown.vue.d.ts +11 -6
- package/components/Dropdown/Dropdown.vue.js +147 -109
- package/components/Dropdown/DropdownBooleanItem.vue.js +9 -8
- package/components/Dropdown/DropdownGroupedLayout.vue.d.ts +1 -1
- package/components/Dropdown/DropdownGroupedLayout.vue.js +35 -34
- package/components/Dropdown/DropdownItem.vue.js +11 -10
- package/components/Dropdown/DropdownMenu.vue.d.ts +5 -3
- package/components/Dropdown/DropdownMenu.vue.js +114 -111
- package/components/Dropdown/DropdownTrigger.vue.d.ts +2 -0
- package/components/Dropdown/DropdownTrigger.vue.js +9 -7
- package/components/ExportData/ExportData.vue.d.ts +16 -0
- package/components/ExportData/ExportData.vue.js +135 -0
- package/components/ExportData/ExportData.vue2.js +4 -0
- package/components/ExportData/index.d.ts +2 -0
- package/components/ExportData/types.d.ts +17 -0
- package/components/FilePicker/FilePicker.vue.d.ts +5 -5
- package/components/Form/CustomFields.vue.d.ts +6 -6
- package/components/Form/CustomFields.vue.js +1 -1
- package/components/Form/Form.vue.d.ts +4 -5
- package/components/Form/Form.vue.js +2 -2
- package/components/Form/Form.vue2.js +221 -178
- package/components/Form/FormField.vue.d.ts +4 -3
- package/components/Form/FormField.vue.js +70 -62
- package/components/Form/FormFields.vue.d.ts +3 -1
- package/components/Form/FormFields.vue.js +2 -2
- package/components/Form/FormFields.vue2.js +105 -59
- package/components/GoogleLogin.vue.d.ts +2 -2
- package/components/Icon.vue.d.ts +2 -0
- package/components/Icon.vue.js +12 -11
- package/components/ImportData/ImportData.vue.d.ts +31 -0
- package/components/ImportData/ImportData.vue.js +242 -0
- package/components/ImportData/ImportData.vue2.js +4 -0
- package/components/ImportData/ImportStep1.vue.d.ts +23 -0
- package/components/ImportData/ImportStep1.vue.js +162 -0
- package/components/ImportData/ImportStep1.vue2.js +4 -0
- package/components/ImportData/ImportStep2.vue.d.ts +20 -0
- package/components/ImportData/ImportStep2.vue.js +98 -0
- package/components/ImportData/ImportStep2.vue2.js +4 -0
- package/components/ImportData/ImportStep3.vue.d.ts +6 -0
- package/components/ImportData/ImportStep3.vue.js +98 -0
- package/components/ImportData/ImportStep3.vue2.js +4 -0
- package/components/ImportData/ImportStep4.vue.d.ts +6 -0
- package/components/ImportData/ImportStep4.vue.js +139 -0
- package/components/ImportData/ImportStep4.vue2.js +4 -0
- package/components/ImportData/index.d.ts +2 -0
- package/components/ImportData/types.d.ts +51 -0
- package/components/Input.vue.d.ts +9 -9
- package/components/Input.vue.js +137 -120
- package/components/List/List.vue.d.ts +18 -0
- package/components/List/List.vue.js +189 -0
- package/components/List/List.vue2.js +4 -0
- package/components/List/ListFieldRow.vue.d.ts +35 -0
- package/components/List/ListFieldRow.vue.js +119 -0
- package/components/List/ListFieldRow.vue2.js +4 -0
- package/components/List/index.d.ts +4 -0
- package/components/List/types.d.ts +1 -0
- package/components/List/utils.d.ts +9 -0
- package/components/List/utils.js +64 -0
- package/components/Masonry/Masonry.vue.d.ts +2 -2
- package/components/Modal.vue.js +5 -122
- package/components/Modal.vue2.js +133 -2
- package/components/MultiSelect/MultiSelect.vue.d.ts +12 -9
- package/components/MultiSelect/MultiSelect.vue.js +101 -64
- package/components/Navbar/Navbar.vue.d.ts +48 -9
- package/components/Navbar/Navbar.vue.js +418 -146
- package/components/Navbar/NavbarItem.vue.d.ts +2 -2
- package/components/Navbar/NavbarTabs.vue.d.ts +21 -0
- package/components/Navbar/NavbarTabs.vue.js +179 -0
- package/components/Navbar/NavbarTabs.vue3.js +5 -0
- package/components/Navbar/index.d.ts +3 -0
- package/components/NavbarCommandPalette.vue.d.ts +48 -0
- package/components/NumberInput.vue.d.ts +8 -8
- package/components/OTPInput/OTPInput.vue.d.ts +7 -7
- package/components/Pagination/Pagination.vue.d.ts +1 -1
- package/components/PermissionMatrix/PermissionEditor.vue.d.ts +36 -0
- package/components/PermissionMatrix/PermissionEditor.vue.js +323 -0
- package/components/PermissionMatrix/PermissionEditor.vue2.js +4 -0
- package/components/PermissionMatrix/PermissionMatrix.vue.d.ts +15 -0
- package/components/PermissionMatrix/PermissionMatrix.vue.js +7 -0
- package/components/PermissionMatrix/PermissionMatrix.vue2.js +245 -0
- package/components/PermissionMatrix/index.d.ts +3 -0
- package/components/PermissionMatrix/types.d.ts +59 -0
- package/components/PricingPlan/PricingPlan.vue.d.ts +3 -3
- package/components/ProgressBar/ProgressBar.vue.d.ts +3 -3
- package/components/QRCode/QRCode.vue.d.ts +15 -0
- package/components/QRCode/QRCode.vue.js +38 -0
- package/components/QRCode/QRCode.vue2.js +4 -0
- package/components/QRCode/index.d.ts +1 -0
- package/components/Screen/Screen.vue.d.ts +232 -5
- package/components/Screen/Screen.vue.js +423 -271
- package/components/Screen/ScreenFilter.vue.d.ts +2 -2
- package/components/Screen/ScreenFilter.vue.js +9 -9
- package/components/Screen/types.d.ts +12 -0
- package/components/SidePanel.vue.d.ts +2 -2
- package/components/SidebarMenu/SidebarMenu.vue.d.ts +15 -2
- package/components/SidebarMenu/SidebarMenu.vue.js +117 -47
- package/components/SidebarMenu/SidebarMenuItem.vue.d.ts +2 -0
- package/components/SidebarMenu/SidebarMenuItem.vue.js +192 -175
- package/components/SidebarMenu/types.d.ts +32 -5
- package/components/Slider.vue.d.ts +2 -2
- package/components/Spinner/Spinner.vue.d.ts +2 -2
- package/components/Stats/Stats.vue.d.ts +14 -0
- package/components/Stats/Stats.vue.js +307 -0
- package/components/Stats/Stats.vue2.js +4 -0
- package/components/Stats/index.d.ts +2 -0
- package/components/Stats/types.d.ts +32 -0
- package/components/Switch.vue.d.ts +2 -1
- package/components/Switch.vue.js +4 -2
- package/components/Tabes/Tabes.vue.d.ts +3 -3
- package/components/Tabes/Tabes.vue.js +60 -57
- package/components/Tabes/types.d.ts +5 -0
- package/components/Textarea.vue.d.ts +3 -3
- package/components/{Timeline.vue.d.ts → Timeline/Timeline.vue.d.ts} +23 -2
- package/components/Timeline/Timeline.vue.js +92 -0
- package/components/Timeline/TimelineIndicator.vue.d.ts +9 -0
- package/components/Timeline/TimelineIndicator.vue.js +68 -0
- package/components/Timeline/TimelineIndicator.vue2.js +4 -0
- package/components/Timeline/TimelineItem.vue.d.ts +56 -0
- package/components/Timeline/TimelineItem.vue.js +173 -0
- package/components/Timeline/TimelineItem.vue2.js +4 -0
- package/components/Timeline/index.d.ts +3 -0
- package/components/Tooltip.vue.d.ts +2 -2
- package/components/Workbook/Sheet.vue.d.ts +2 -2
- package/components/Workbook/Workbook.vue.d.ts +3 -3
- package/components/index.d.ts +62 -0
- package/composables/useBreadcrumb.d.ts +17 -0
- package/composables/useBreadcrumb.js +27 -0
- package/core/config.d.ts +34 -0
- package/core/config.js +10 -7
- package/core/index.js +15 -8
- package/index.d.ts +55 -44
- package/index.js +243 -200
- package/package.json +12 -2
- package/router.d.ts +2 -0
- package/style.css +7 -5
- package/types/button.d.ts +1 -1
- package/types/config.type.d.ts +35 -0
- package/types/form.type.d.ts +3 -1
- package/types/index.d.ts +2 -1
- package/types/list.type.d.ts +57 -0
- package/types/navbar.type.d.ts +38 -1
- package/types/timeline.type.d.ts +14 -4
- package/components/Timeline.vue.js +0 -160
- /package/components/{Timeline.vue2.js → Timeline/Timeline.vue2.js} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as r, computed as d, openBlock as l, createElementBlock as u, withModifiers as p, normalizeClass as f, createElementVNode as a, createBlock as g, createCommentVNode as v, toDisplayString as h, createVNode as x } from "vue";
|
|
2
2
|
import y from "../Switch.vue.js";
|
|
3
3
|
import b 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" }, B = { class: "truncate font-medium" },
|
|
5
|
+
const w = { class: "flex items-center gap-2 flex-1 min-w-0" }, B = { class: "truncate font-medium" }, N = /* @__PURE__ */ r({
|
|
6
6
|
__name: "DropdownBooleanItem",
|
|
7
7
|
props: {
|
|
8
8
|
option: {},
|
|
@@ -11,7 +11,7 @@ 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, m = d(() => o.option.labelI18n ? k(o.option.labelI18n) : o.option.label), t = (n) => {
|
|
15
15
|
s("change", n, o.option);
|
|
16
16
|
};
|
|
17
17
|
return (n, i) => (l(), u("div", {
|
|
@@ -19,15 +19,16 @@ const w = { class: "flex items-center gap-2 flex-1 min-w-0" }, B = { class: "tru
|
|
|
19
19
|
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", [
|
|
20
20
|
e.focused ? "bg-accent text-accent-foreground" : "hover:bg-accent hover:text-accent-foreground"
|
|
21
21
|
]]),
|
|
22
|
-
onClick: i[0] || (i[0] = p((
|
|
22
|
+
onClick: i[0] || (i[0] = p((j) => t(!e.value), ["stop"]))
|
|
23
23
|
}, [
|
|
24
24
|
a("div", w, [
|
|
25
|
-
e.option.icon ? (l(), g(b, {
|
|
25
|
+
e.option.icon || e.option.emoji ? (l(), g(b, {
|
|
26
26
|
key: 0,
|
|
27
27
|
icon: e.option.icon,
|
|
28
|
+
emoji: e.option.emoji,
|
|
28
29
|
class: "h-4 w-4 shrink-0 opacity-70"
|
|
29
|
-
}, null, 8, ["icon"])) : v("", !0),
|
|
30
|
-
a("span", B, h(
|
|
30
|
+
}, null, 8, ["icon", "emoji"])) : v("", !0),
|
|
31
|
+
a("span", B, h(m.value), 1)
|
|
31
32
|
]),
|
|
32
33
|
x(y, {
|
|
33
34
|
"model-value": e.value,
|
|
@@ -38,5 +39,5 @@ const w = { class: "flex items-center gap-2 flex-1 min-w-0" }, B = { class: "tru
|
|
|
38
39
|
}
|
|
39
40
|
});
|
|
40
41
|
export {
|
|
41
|
-
|
|
42
|
+
N as default
|
|
42
43
|
};
|
|
@@ -14,8 +14,8 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
14
14
|
onSelect?: (option: IDropdownOption) => any;
|
|
15
15
|
onMouseenter?: (payload: any) => any;
|
|
16
16
|
}>, {
|
|
17
|
-
options: IDropdownOptions;
|
|
18
17
|
selectable: boolean;
|
|
18
|
+
options: IDropdownOptions;
|
|
19
19
|
columns: number | string;
|
|
20
20
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
21
21
|
export default _default;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as _, computed as C, openBlock as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as _, computed as C, openBlock as l, createElementBlock as c, normalizeStyle as $, Fragment as a, renderList as i, createElementVNode as m, normalizeClass as h, toDisplayString as j, createBlock as u, createCommentVNode as f, createVNode as w } from "vue";
|
|
2
|
+
import B from "../Icon.vue.js";
|
|
3
3
|
import y from "./DropdownItem.vue.js";
|
|
4
|
-
import { $t as
|
|
5
|
-
const
|
|
4
|
+
import { $t as N } from "../../utils/i18n.js";
|
|
5
|
+
const S = { class: "font-semibold text-sm text-foreground" }, L = { class: "flex flex-col space-y-1" }, V = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "flex flex-col space-y-1 ml-3 pl-3 border-l border-border mt-0.5 mb-1.5"
|
|
8
|
-
},
|
|
8
|
+
}, z = {
|
|
9
9
|
key: 1,
|
|
10
10
|
class: "px-2 text-xs text-muted-foreground italic"
|
|
11
|
-
},
|
|
11
|
+
}, q = /* @__PURE__ */ _({
|
|
12
12
|
__name: "DropdownGroupedLayout",
|
|
13
13
|
props: {
|
|
14
14
|
options: { default: () => [] },
|
|
@@ -19,56 +19,57 @@ const L = { class: "font-semibold text-sm text-foreground" }, V = { class: "flex
|
|
|
19
19
|
headerClass: {}
|
|
20
20
|
},
|
|
21
21
|
emits: ["select", "mouseenter"],
|
|
22
|
-
setup(
|
|
23
|
-
const
|
|
24
|
-
const e =
|
|
22
|
+
setup(r, { emit: A }) {
|
|
23
|
+
const s = r, k = C(() => {
|
|
24
|
+
const e = s.columns;
|
|
25
25
|
return typeof e == "number" ? { gridTemplateColumns: `repeat(${e}, minmax(0, 1fr))` } : { gridTemplateColumns: e };
|
|
26
|
-
}),
|
|
27
|
-
return (e,
|
|
26
|
+
}), d = (e) => s.selected ? Array.isArray(s.selected) ? s.selected.includes(e.value) : typeof s.selected == "object" && s.selected !== null && e.key && e.key in s.selected ? s.selected[e.key] === e.value : s.selected === e.value : !1, b = (e) => e.labelI18n ? N(e.labelI18n) : e.label;
|
|
27
|
+
return (e, D) => (l(), c("div", {
|
|
28
28
|
class: "grid gap-6 p-4",
|
|
29
29
|
style: $(k.value)
|
|
30
30
|
}, [
|
|
31
|
-
(
|
|
32
|
-
key:
|
|
31
|
+
(l(!0), c(a, null, i(r.options, (t, x) => (l(), c("div", {
|
|
32
|
+
key: t.key || t.value || x,
|
|
33
33
|
class: "flex flex-col space-y-2 min-w-[150px]"
|
|
34
34
|
}, [
|
|
35
35
|
m("div", {
|
|
36
|
-
class: h(["flex items-center gap-2 px-2 py-1 mb-1",
|
|
36
|
+
class: h(["flex items-center gap-2 px-2 py-1 mb-1", r.headerClass])
|
|
37
37
|
}, [
|
|
38
|
-
m("span",
|
|
39
|
-
|
|
38
|
+
m("span", S, j(b(t)), 1),
|
|
39
|
+
t.icon || t.emoji ? (l(), u(B, {
|
|
40
40
|
key: 0,
|
|
41
|
-
icon:
|
|
41
|
+
icon: t.icon,
|
|
42
|
+
emoji: t.emoji,
|
|
42
43
|
class: "w-4 h-4 text-muted-foreground"
|
|
43
|
-
}, null, 8, ["icon"])) : f("", !0)
|
|
44
|
+
}, null, 8, ["icon", "emoji"])) : f("", !0)
|
|
44
45
|
], 2),
|
|
45
|
-
m("div",
|
|
46
|
-
|
|
47
|
-
key: n.key || n.value ||
|
|
46
|
+
m("div", L, [
|
|
47
|
+
t.children && t.children.length ? (l(!0), c(a, { key: 0 }, i(t.children, (n, p) => (l(), c(a, {
|
|
48
|
+
key: n.key || n.value || p
|
|
48
49
|
}, [
|
|
49
|
-
|
|
50
|
+
w(y, {
|
|
50
51
|
option: n,
|
|
51
|
-
selected:
|
|
52
|
-
selectable:
|
|
52
|
+
selected: d(n),
|
|
53
|
+
selectable: r.selectable,
|
|
53
54
|
class: "w-full",
|
|
54
|
-
onClick: (
|
|
55
|
+
onClick: (o) => e.$emit("select", n)
|
|
55
56
|
}, null, 8, ["option", "selected", "selectable", "onClick"]),
|
|
56
|
-
n.children && n.children.length ? (
|
|
57
|
-
(
|
|
58
|
-
key:
|
|
59
|
-
option:
|
|
60
|
-
selected:
|
|
61
|
-
selectable:
|
|
57
|
+
n.children && n.children.length ? (l(), c("div", V, [
|
|
58
|
+
(l(!0), c(a, null, i(n.children, (o, v) => (l(), u(y, {
|
|
59
|
+
key: o.key || o.value || v,
|
|
60
|
+
option: o,
|
|
61
|
+
selected: d(o),
|
|
62
|
+
selectable: r.selectable,
|
|
62
63
|
class: "w-full text-xs",
|
|
63
|
-
onClick: (
|
|
64
|
+
onClick: (E) => e.$emit("select", o)
|
|
64
65
|
}, null, 8, ["option", "selected", "selectable", "onClick"]))), 128))
|
|
65
66
|
])) : f("", !0)
|
|
66
|
-
], 64))), 128)) : (
|
|
67
|
+
], 64))), 128)) : (l(), c("div", z, "No items"))
|
|
67
68
|
])
|
|
68
69
|
]))), 128))
|
|
69
70
|
], 4));
|
|
70
71
|
}
|
|
71
72
|
});
|
|
72
73
|
export {
|
|
73
|
-
|
|
74
|
+
q as default
|
|
74
75
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent as k, computed as l, openBlock as o, createElementBlock as s, normalizeClass as h, renderSlot as g, normalizeProps as w, guardReactiveProps as I, createBlock as p, createCommentVNode as i, createElementVNode as a, toDisplayString as c } from "vue";
|
|
2
2
|
import f from "../Icon.vue.js";
|
|
3
3
|
import { $t as d } from "../../utils/i18n.js";
|
|
4
|
-
const B = ["data-disabled"], $ = { class: "flex flex-col flex-1 min-w-0" },
|
|
4
|
+
const B = ["data-disabled"], $ = { class: "flex flex-col flex-1 min-w-0" }, j = { class: "flex items-center justify-between gap-2" }, C = { class: "truncate font-medium" }, D = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "text-xs text-muted-foreground whitespace-nowrap opacity-90"
|
|
7
|
-
},
|
|
7
|
+
}, S = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "text-[10px] text-muted-foreground truncate opacity-70"
|
|
10
|
-
},
|
|
10
|
+
}, P = /* @__PURE__ */ k({
|
|
11
11
|
__name: "DropdownItem",
|
|
12
12
|
props: {
|
|
13
13
|
option: {},
|
|
@@ -31,17 +31,18 @@ const B = ["data-disabled"], $ = { class: "flex flex-col flex-1 min-w-0" }, C =
|
|
|
31
31
|
onMouseenter: n[1] || (n[1] = (v) => m.$emit("mouseenter", e.index ?? -1))
|
|
32
32
|
}, [
|
|
33
33
|
g(m.$slots, "default", w(I({ option: e.option, index: e.index, selected: e.selected })), () => [
|
|
34
|
-
e.option.icon ? (o(), p(f, {
|
|
34
|
+
e.option.icon || e.option.emoji ? (o(), p(f, {
|
|
35
35
|
key: 0,
|
|
36
36
|
icon: e.option.icon,
|
|
37
|
+
emoji: e.option.emoji,
|
|
37
38
|
class: "mr-2 h-4 w-4 shrink-0 mt-0.5"
|
|
38
|
-
}, null, 8, ["icon"])) : i("", !0),
|
|
39
|
+
}, null, 8, ["icon", "emoji"])) : i("", !0),
|
|
39
40
|
a("div", $, [
|
|
40
|
-
a("div",
|
|
41
|
-
a("span",
|
|
42
|
-
r.value ? (o(), s("span",
|
|
41
|
+
a("div", j, [
|
|
42
|
+
a("span", C, c(y.value), 1),
|
|
43
|
+
r.value ? (o(), s("span", D, c(r.value), 1)) : i("", !0)
|
|
43
44
|
]),
|
|
44
|
-
u.value ? (o(), s("span",
|
|
45
|
+
u.value ? (o(), s("span", S, c(u.value), 1)) : i("", !0)
|
|
45
46
|
]),
|
|
46
47
|
e.selectable && e.selected ? (o(), p(f, {
|
|
47
48
|
key: 1,
|
|
@@ -53,5 +54,5 @@ const B = ["data-disabled"], $ = { class: "flex flex-col flex-1 min-w-0" }, C =
|
|
|
53
54
|
}
|
|
54
55
|
});
|
|
55
56
|
export {
|
|
56
|
-
|
|
57
|
+
P as default
|
|
57
58
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IDropdownOptions, IDropdownOption } from '../../types';
|
|
2
2
|
interface Props {
|
|
3
|
-
options?:
|
|
3
|
+
options?: (IDropdownOption | string | number)[];
|
|
4
4
|
cachedOptions?: IDropdownOptions;
|
|
5
5
|
selected?: any;
|
|
6
6
|
selectedIndex?: number | null;
|
|
@@ -15,6 +15,7 @@ interface Props {
|
|
|
15
15
|
hasMore?: boolean;
|
|
16
16
|
searchable?: boolean;
|
|
17
17
|
remote?: boolean;
|
|
18
|
+
debounceTime?: number;
|
|
18
19
|
direction?: 'ltr' | 'rtl';
|
|
19
20
|
}
|
|
20
21
|
declare function __VLS_template(): {
|
|
@@ -48,9 +49,8 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
|
|
|
48
49
|
}>, {
|
|
49
50
|
class: string;
|
|
50
51
|
loading: boolean;
|
|
51
|
-
direction: "ltr" | "rtl";
|
|
52
|
-
options: IDropdownOptions;
|
|
53
52
|
selectable: boolean;
|
|
53
|
+
options: (IDropdownOption | string | number)[];
|
|
54
54
|
columns: number | string;
|
|
55
55
|
selectedIndex: number | null;
|
|
56
56
|
maxHeight: string;
|
|
@@ -58,6 +58,8 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
|
|
|
58
58
|
hasMore: boolean;
|
|
59
59
|
searchable: boolean;
|
|
60
60
|
remote: boolean;
|
|
61
|
+
debounceTime: number;
|
|
62
|
+
direction: "ltr" | "rtl";
|
|
61
63
|
nestedPosition: any;
|
|
62
64
|
nestedOffset: [number, number];
|
|
63
65
|
cachedOptions: IDropdownOptions;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as Z, defineAsyncComponent as ee, ref as j, computed as h, watch as T, onMounted as te, onBeforeUnmount as le, openBlock as n, createElementBlock as d, createVNode as S, createCommentVNode as u, renderSlot as b, unref as o, normalizeStyle as se, normalizeClass as _, toDisplayString as D, createBlock as v, Fragment as E, renderList as ne, withCtx as N, createElementVNode as $, createSlots as oe, mergeProps as re, nextTick as ae } from "vue";
|
|
2
|
+
import I from "../Icon.vue.js";
|
|
3
|
+
import de from "../Input.vue.js";
|
|
4
|
+
import ce from "./DropdownItem.vue.js";
|
|
5
5
|
import ie from "./DropdownBooleanItem.vue.js";
|
|
6
6
|
import ue from "./DropdownGroupedLayout.vue.js";
|
|
7
7
|
import { useDropdownNavigation as fe } from "./composables/useDropdownNavigation.js";
|
|
8
8
|
import { useDropdownIds as me } from "./composables/useDropdownIds.js";
|
|
9
|
-
import { $t as
|
|
10
|
-
const he = ["dir"],
|
|
9
|
+
import { $t as M } from "../../utils/i18n.js";
|
|
10
|
+
const he = ["dir"], ve = {
|
|
11
11
|
key: 0,
|
|
12
|
-
class: "bg-body border-b
|
|
13
|
-
},
|
|
12
|
+
class: "bg-body border-b z-10 rounded-t-md shrink-0"
|
|
13
|
+
}, ye = {
|
|
14
14
|
key: 1,
|
|
15
15
|
class: "shrink-0"
|
|
16
16
|
}, ge = {
|
|
17
17
|
key: 0,
|
|
18
18
|
class: "px-2 py-6 text-center text-sm text-muted-foreground"
|
|
19
|
-
},
|
|
19
|
+
}, be = {
|
|
20
20
|
key: 0,
|
|
21
21
|
class: "h-px bg-border my-1 mx-1"
|
|
22
|
-
},
|
|
22
|
+
}, ke = ["onMouseenter"], we = { class: "flex items-center gap-2 flex-1 min-w-0" }, pe = { class: "truncate" }, xe = {
|
|
23
23
|
key: 3,
|
|
24
24
|
class: "flex justify-center py-2"
|
|
25
25
|
}, Se = {
|
|
26
26
|
key: 3,
|
|
27
|
-
class: "shrink-0
|
|
28
|
-
},
|
|
27
|
+
class: "shrink-0"
|
|
28
|
+
}, De = /* @__PURE__ */ Z({
|
|
29
29
|
__name: "DropdownMenu",
|
|
30
30
|
props: {
|
|
31
31
|
options: { default: () => [] },
|
|
@@ -43,47 +43,47 @@ const he = ["dir"], ye = {
|
|
|
43
43
|
hasMore: { type: Boolean, default: !1 },
|
|
44
44
|
searchable: { type: Boolean, default: !0 },
|
|
45
45
|
remote: { type: Boolean, default: !1 },
|
|
46
|
+
debounceTime: { default: 300 },
|
|
46
47
|
direction: { default: "ltr" }
|
|
47
48
|
},
|
|
48
49
|
emits: ["select", "close", "load-more", "search"],
|
|
49
|
-
setup(r, { emit:
|
|
50
|
-
const P =
|
|
51
|
-
const e =
|
|
50
|
+
setup(r, { emit: V }) {
|
|
51
|
+
const P = ee(() => import("./Dropdown.vue2.js")), t = r, f = V, O = j(null), m = j(""), { getMenuId: z, getAllRecursiveIds: H } = me(), A = h(() => {
|
|
52
|
+
const e = M("vlite.dropdown.empty");
|
|
52
53
|
return e !== "vlite.dropdown.empty" ? e : "No options found";
|
|
53
|
-
}),
|
|
54
|
-
const e =
|
|
54
|
+
}), L = h(() => {
|
|
55
|
+
const e = M("vlite.dropdown.search");
|
|
55
56
|
return e !== "vlite.dropdown.search" ? e : "Search...";
|
|
56
|
-
}),
|
|
57
|
+
}), c = h(() => t.options ? t.options.map((e) => typeof e == "string" || typeof e == "number" ? { label: String(e), value: String(e) } : e) : []), R = h(() => t.remote ? t.searchable : t.searchable && (c.value.length || 0) > 9);
|
|
57
58
|
let k = null;
|
|
58
|
-
T(
|
|
59
|
+
T(m, (e) => {
|
|
59
60
|
t.remote && (k && clearTimeout(k), k = setTimeout(() => {
|
|
60
|
-
e &&
|
|
61
|
-
},
|
|
61
|
+
e !== void 0 && f("search", e);
|
|
62
|
+
}, t.debounceTime));
|
|
62
63
|
});
|
|
63
|
-
const
|
|
64
|
+
const F = (e) => {
|
|
64
65
|
const s = e.target;
|
|
65
|
-
s.scrollTop + s.clientHeight >= s.scrollHeight - 50 && t.hasMore && !t.loading &&
|
|
66
|
-
},
|
|
67
|
-
e.disabled ||
|
|
66
|
+
s.scrollTop + s.clientHeight >= s.scrollHeight - 50 && t.hasMore && !t.loading && f("load-more");
|
|
67
|
+
}, w = (e, s) => {
|
|
68
|
+
e.disabled || f("select", e);
|
|
68
69
|
}, {
|
|
69
|
-
focusedIndex:
|
|
70
|
-
isKeyboardMode:
|
|
71
|
-
filteredOptions:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
scrollToIndex: K
|
|
70
|
+
focusedIndex: y,
|
|
71
|
+
isKeyboardMode: p,
|
|
72
|
+
filteredOptions: K,
|
|
73
|
+
handleKeyDown: B,
|
|
74
|
+
handleMouseMove: C,
|
|
75
|
+
onMouseEnterItem: x,
|
|
76
|
+
scrollToIndex: U
|
|
77
77
|
} = fe({
|
|
78
|
-
options:
|
|
79
|
-
searchQuery:
|
|
80
|
-
containerRef:
|
|
81
|
-
emit: (e, ...s) =>
|
|
82
|
-
handleSelect: (e, s) =>
|
|
83
|
-
}),
|
|
78
|
+
options: c,
|
|
79
|
+
searchQuery: m,
|
|
80
|
+
containerRef: O,
|
|
81
|
+
emit: (e, ...s) => f(e, ...s),
|
|
82
|
+
handleSelect: (e, s) => w(e)
|
|
83
|
+
}), g = h(() => t.remote ? m.value ? c.value : t.cachedOptions.length ? t.cachedOptions : c.value : K.value), q = (e) => {
|
|
84
84
|
if (!(!t.selected || typeof t.selected != "object") && e.key && e.key in t.selected)
|
|
85
85
|
return t.selected[e.key];
|
|
86
|
-
},
|
|
86
|
+
}, G = (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, J = (e) => !e.key || !t.selected || typeof t.selected != "object" ? !1 : !!t.selected[e.key], Q = (e, s) => {
|
|
87
87
|
if (!s.key) return;
|
|
88
88
|
const l = {
|
|
89
89
|
label: s.label,
|
|
@@ -91,155 +91,158 @@ const he = ["dir"], ye = {
|
|
|
91
91
|
key: s.key,
|
|
92
92
|
data: s.data
|
|
93
93
|
};
|
|
94
|
-
|
|
95
|
-
},
|
|
94
|
+
f("select", l);
|
|
95
|
+
}, W = (e, s) => {
|
|
96
96
|
let l = s.value;
|
|
97
97
|
e.key && (l = { [e.key]: l });
|
|
98
|
-
const
|
|
98
|
+
const a = {
|
|
99
99
|
label: e.label,
|
|
100
100
|
value: l,
|
|
101
101
|
data: s.data,
|
|
102
102
|
key: e.key
|
|
103
103
|
};
|
|
104
|
-
|
|
105
|
-
},
|
|
106
|
-
await
|
|
104
|
+
f("select", a);
|
|
105
|
+
}, X = async () => {
|
|
106
|
+
await ae();
|
|
107
107
|
let e = -1;
|
|
108
|
-
t.layout !== "grouped" && (t.selectedIndex !== null && t.selectedIndex >= 0 ? e = t.selectedIndex : t.selected !== void 0 && typeof t.selected != "object" && (e =
|
|
108
|
+
t.layout !== "grouped" && (t.selectedIndex !== null && t.selectedIndex >= 0 ? e = t.selectedIndex : t.selected !== void 0 && typeof t.selected != "object" && (e = c.value.findIndex((s) => s.value === t.selected)), e !== -1 && U(e));
|
|
109
109
|
};
|
|
110
110
|
T(
|
|
111
|
-
() =>
|
|
111
|
+
() => g.value,
|
|
112
112
|
() => {
|
|
113
|
-
|
|
113
|
+
y.value = -1;
|
|
114
114
|
}
|
|
115
115
|
), te(() => {
|
|
116
|
-
|
|
116
|
+
X(), window.addEventListener("keydown", B);
|
|
117
117
|
}), le(() => {
|
|
118
|
-
window.removeEventListener("keydown",
|
|
118
|
+
window.removeEventListener("keydown", B);
|
|
119
119
|
});
|
|
120
|
-
const
|
|
121
|
-
return (e, s) => (
|
|
120
|
+
const Y = (e) => e.labelI18n ? M(e.labelI18n) : e.label;
|
|
121
|
+
return (e, s) => (n(), d("div", {
|
|
122
122
|
class: "dropdown-menu w-full min-w-[150px] flex flex-col",
|
|
123
123
|
dir: r.direction
|
|
124
124
|
}, [
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
modelValue:
|
|
128
|
-
"onUpdate:modelValue": s[0] || (s[0] = (l) =>
|
|
129
|
-
placeholder:
|
|
125
|
+
R.value ? (n(), d("div", ve, [
|
|
126
|
+
S(de, {
|
|
127
|
+
modelValue: m.value,
|
|
128
|
+
"onUpdate:modelValue": s[0] || (s[0] = (l) => m.value = l),
|
|
129
|
+
placeholder: L.value,
|
|
130
130
|
icon: "lucide:search",
|
|
131
131
|
size: "sm",
|
|
132
132
|
class: "font-medium!",
|
|
133
|
+
"input-class": "-ml-1",
|
|
133
134
|
variant: "transparent",
|
|
135
|
+
"icon-class": "h-3.5! w-3.5!",
|
|
134
136
|
"show-clear-button": !1
|
|
135
137
|
}, null, 8, ["modelValue", "placeholder"])
|
|
136
|
-
])) :
|
|
137
|
-
e.$slots.header ? (
|
|
138
|
-
|
|
139
|
-
])) :
|
|
140
|
-
|
|
138
|
+
])) : u("", !0),
|
|
139
|
+
e.$slots.header ? (n(), d("div", ye, [
|
|
140
|
+
b(e.$slots, "header")
|
|
141
|
+
])) : u("", !0),
|
|
142
|
+
c.value.length > 0 || e.$slots.menu ? (n(), d("div", {
|
|
141
143
|
key: 2,
|
|
142
144
|
ref_key: "containerRef",
|
|
143
|
-
ref:
|
|
145
|
+
ref: O,
|
|
144
146
|
tabindex: "0",
|
|
145
147
|
role: "menu",
|
|
146
|
-
class:
|
|
148
|
+
class: _([
|
|
147
149
|
"w-full p-1 space-y-0.5 overflow-y-auto overflow-x-hidden focus:outline-none flex-1",
|
|
148
150
|
t.class
|
|
149
151
|
]),
|
|
150
152
|
style: se({ maxHeight: t.maxHeight }),
|
|
151
153
|
onMousemove: s[1] || (s[1] = //@ts-ignore
|
|
152
|
-
(...l) =>
|
|
153
|
-
onScroll:
|
|
154
|
+
(...l) => o(C) && o(C)(...l)),
|
|
155
|
+
onScroll: F
|
|
154
156
|
}, [
|
|
155
|
-
|
|
156
|
-
r.layout === "grouped" ? (
|
|
157
|
+
g.value.length === 0 && c.value.length > 0 && !r.loading ? (n(), d("div", ge, D(A.value), 1)) : u("", !0),
|
|
158
|
+
r.layout === "grouped" ? (n(), v(ue, {
|
|
157
159
|
key: 1,
|
|
158
|
-
options:
|
|
160
|
+
options: g.value,
|
|
159
161
|
selected: r.selected,
|
|
160
162
|
selectable: r.selectable,
|
|
161
163
|
columns: r.columns,
|
|
162
|
-
onSelect:
|
|
163
|
-
}, null, 8, ["options", "selected", "selectable", "columns"])) : (
|
|
164
|
-
l.label === "---" ? (
|
|
164
|
+
onSelect: w
|
|
165
|
+
}, null, 8, ["options", "selected", "selectable", "columns"])) : (n(!0), d(E, { key: 2 }, ne(g.value, (l, a) => (n(), d(E, { key: a }, [
|
|
166
|
+
l.label === "---" ? (n(), d("div", be)) : l.data?.isBoolean ? (n(), v(ie, {
|
|
165
167
|
key: 1,
|
|
166
168
|
option: l,
|
|
167
|
-
value:
|
|
168
|
-
focused:
|
|
169
|
-
onChange:
|
|
170
|
-
onMouseenter: (
|
|
171
|
-
}, null, 8, ["option", "value", "focused", "onMouseenter"])) : l.children && l.children.length > 0 ? (
|
|
169
|
+
value: J(l),
|
|
170
|
+
focused: o(p) && o(y) === a,
|
|
171
|
+
onChange: Q,
|
|
172
|
+
onMouseenter: (i) => o(x)(a)
|
|
173
|
+
}, null, 8, ["option", "value", "focused", "onMouseenter"])) : l.children && l.children.length > 0 ? (n(), v(o(P), {
|
|
172
174
|
key: 2,
|
|
173
175
|
position: l.position || t.nestedPosition,
|
|
174
176
|
offset: l.offset || t.nestedOffset,
|
|
175
177
|
class: "w-full",
|
|
176
178
|
options: l.children,
|
|
177
|
-
selected:
|
|
178
|
-
menuId:
|
|
179
|
+
selected: q(l),
|
|
180
|
+
menuId: o(z)(l),
|
|
179
181
|
nestedPosition: t.nestedPosition,
|
|
180
182
|
nestedOffset: t.nestedOffset,
|
|
181
183
|
selectable: t.selectable,
|
|
182
|
-
ignoreClickOutside:
|
|
184
|
+
ignoreClickOutside: o(H)(l.children),
|
|
183
185
|
direction: r.direction,
|
|
184
|
-
onOnSelect: (
|
|
186
|
+
onOnSelect: (i) => W(l, i)
|
|
185
187
|
}, {
|
|
186
|
-
trigger:
|
|
187
|
-
|
|
188
|
+
trigger: N(() => [
|
|
189
|
+
$("div", {
|
|
188
190
|
"data-dropdown-item": "",
|
|
189
|
-
class:
|
|
190
|
-
|
|
191
|
+
class: _(["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", [
|
|
192
|
+
o(p) && o(y) === a ? "bg-accent text-accent-foreground" : "hover:bg-accent hover:text-accent-foreground",
|
|
191
193
|
l.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
192
194
|
]]),
|
|
193
|
-
onMouseenter: (
|
|
195
|
+
onMouseenter: (i) => o(x)(a)
|
|
194
196
|
}, [
|
|
195
|
-
|
|
196
|
-
l.icon ? (
|
|
197
|
+
$("div", we, [
|
|
198
|
+
l.icon || l.emoji ? (n(), v(I, {
|
|
197
199
|
key: 0,
|
|
198
200
|
icon: l.icon,
|
|
201
|
+
emoji: l.emoji,
|
|
199
202
|
class: "mr-2 h-4 w-4 shrink-0 mt-0.5"
|
|
200
|
-
}, null, 8, ["icon"])) :
|
|
201
|
-
|
|
203
|
+
}, null, 8, ["icon", "emoji"])) : u("", !0),
|
|
204
|
+
$("span", pe, D(Y(l)), 1)
|
|
202
205
|
]),
|
|
203
|
-
|
|
206
|
+
S(I, {
|
|
204
207
|
icon: r.direction === "rtl" ? "lucide:chevron-left" : "lucide:chevron-right",
|
|
205
208
|
class: "h-4 w-4 text-muted-foreground shrink-0 ml-2"
|
|
206
209
|
}, null, 8, ["icon"])
|
|
207
|
-
], 42,
|
|
210
|
+
], 42, ke)
|
|
208
211
|
]),
|
|
209
212
|
_: 2
|
|
210
|
-
}, 1032, ["position", "offset", "options", "selected", "menuId", "nestedPosition", "nestedOffset", "selectable", "ignoreClickOutside", "direction", "onOnSelect"])) : (
|
|
213
|
+
}, 1032, ["position", "offset", "options", "selected", "menuId", "nestedPosition", "nestedOffset", "selectable", "ignoreClickOutside", "direction", "onOnSelect"])) : (n(), v(ce, {
|
|
211
214
|
key: 3,
|
|
212
215
|
option: l,
|
|
213
|
-
index:
|
|
214
|
-
selected:
|
|
215
|
-
focused:
|
|
216
|
+
index: a,
|
|
217
|
+
selected: G(l),
|
|
218
|
+
focused: o(p) && o(y) === a,
|
|
216
219
|
selectable: r.selectable,
|
|
217
|
-
onClick: (
|
|
218
|
-
onMouseenter: (
|
|
219
|
-
},
|
|
220
|
+
onClick: (i) => w(l),
|
|
221
|
+
onMouseenter: (i) => o(x)(a)
|
|
222
|
+
}, oe({ _: 2 }, [
|
|
220
223
|
e.$slots.item ? {
|
|
221
224
|
name: "default",
|
|
222
|
-
fn:
|
|
223
|
-
|
|
225
|
+
fn: N((i) => [
|
|
226
|
+
b(e.$slots, "item", re({ ref_for: !0 }, i))
|
|
224
227
|
]),
|
|
225
228
|
key: "0"
|
|
226
229
|
} : void 0
|
|
227
230
|
]), 1032, ["option", "index", "selected", "focused", "selectable", "onClick", "onMouseenter"]))
|
|
228
231
|
], 64))), 128)),
|
|
229
|
-
r.loading ? (
|
|
230
|
-
|
|
232
|
+
r.loading ? (n(), d("div", xe, [
|
|
233
|
+
S(I, {
|
|
231
234
|
icon: "lucide:loader-2",
|
|
232
235
|
class: "w-4 h-4 animate-spin text-muted-foreground"
|
|
233
236
|
})
|
|
234
|
-
])) :
|
|
235
|
-
|
|
236
|
-
], 38)) :
|
|
237
|
-
e.$slots.footer ? (
|
|
238
|
-
|
|
239
|
-
])) :
|
|
237
|
+
])) : u("", !0),
|
|
238
|
+
b(e.$slots, "menu")
|
|
239
|
+
], 38)) : u("", !0),
|
|
240
|
+
e.$slots.footer ? (n(), d("div", Se, [
|
|
241
|
+
b(e.$slots, "footer")
|
|
242
|
+
])) : u("", !0)
|
|
240
243
|
], 8, he));
|
|
241
244
|
}
|
|
242
245
|
});
|
|
243
246
|
export {
|
|
244
|
-
|
|
247
|
+
De as default
|
|
245
248
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ButtonProps } from '../../types';
|
|
1
2
|
interface Props {
|
|
2
3
|
selectedLabel?: string;
|
|
3
4
|
placeholder?: string;
|
|
@@ -5,6 +6,7 @@ interface Props {
|
|
|
5
6
|
disabled?: boolean;
|
|
6
7
|
className?: string;
|
|
7
8
|
direction?: 'ltr' | 'rtl';
|
|
9
|
+
triggerProps?: ButtonProps;
|
|
8
10
|
}
|
|
9
11
|
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
10
12
|
disabled: boolean;
|