@milaboratories/uikit 2.2.95 → 2.2.96
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/.turbo/turbo-build.log +29 -24
- package/.turbo/turbo-type-check.log +1 -1
- package/CHANGELOG.md +9 -0
- package/dist/components/DataTable/TableComponent.vue.js +1 -1
- package/dist/components/PlAccordion/PlAccordionSection.vue2.js +21 -21
- package/dist/components/PlAccordion/PlAccordionSection.vue2.js.map +1 -1
- package/dist/components/PlAutocomplete/PlAutocomplete.vue.js.map +1 -1
- package/dist/components/PlDropdown/OptionList.vue.d.ts +77 -0
- package/dist/components/PlDropdown/OptionList.vue.d.ts.map +1 -0
- package/dist/components/PlDropdown/OptionList.vue.js +88 -0
- package/dist/components/PlDropdown/OptionList.vue.js.map +1 -0
- package/dist/components/PlDropdown/OptionList.vue2.js +5 -0
- package/dist/components/PlDropdown/OptionList.vue2.js.map +1 -0
- package/dist/components/PlDropdown/PlDropdown.vue.d.ts.map +1 -1
- package/dist/components/PlDropdown/PlDropdown.vue.js +110 -122
- package/dist/components/PlDropdown/PlDropdown.vue.js.map +1 -1
- package/dist/components/PlDropdown/types.d.ts +7 -0
- package/dist/components/PlDropdown/types.d.ts.map +1 -0
- package/dist/components/PlDropdown/useGroupBy.d.ts +7 -0
- package/dist/components/PlDropdown/useGroupBy.d.ts.map +1 -0
- package/dist/components/PlDropdown/useGroupBy.js +36 -0
- package/dist/components/PlDropdown/useGroupBy.js.map +1 -0
- package/dist/components/PlDropdownRef/PlDropdownRef.vue.d.ts +1 -1
- package/dist/components/PlDropdownRef/PlDropdownRef.vue.d.ts.map +1 -1
- package/dist/components/PlDropdownRef/PlDropdownRef.vue.js +11 -10
- package/dist/components/PlDropdownRef/PlDropdownRef.vue.js.map +1 -1
- package/dist/components/PlSlideModal/PlSlideModal.vue.js +1 -1
- package/dist/helpers/utils.d.ts +1 -0
- package/dist/helpers/utils.d.ts.map +1 -1
- package/dist/helpers/utils.js +2 -1
- package/dist/helpers/utils.js.map +1 -1
- package/dist/sdk/model/dist/index.js +1 -1
- package/dist/sdk/model/dist/index.js.map +1 -1
- package/dist/types.d.ts +4 -14
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/TextLabel.vue.d.ts +18 -0
- package/dist/utils/TextLabel.vue.d.ts.map +1 -0
- package/dist/utils/TextLabel.vue.js +26 -0
- package/dist/utils/TextLabel.vue.js.map +1 -0
- package/dist/utils/TextLabel.vue2.js +13 -0
- package/dist/utils/TextLabel.vue2.js.map +1 -0
- package/package.json +3 -3
- package/src/components/PlAccordion/PlAccordionSection.vue +3 -3
- package/src/components/PlAutocomplete/PlAutocomplete.vue +1 -1
- package/src/components/PlDropdown/OptionList.vue +71 -0
- package/src/components/PlDropdown/PlDropdown.vue +29 -25
- package/src/components/PlDropdown/pl-dropdown.scss +4 -0
- package/src/components/PlDropdown/types.ts +3 -0
- package/src/components/PlDropdown/useGroupBy.ts +63 -0
- package/src/components/PlDropdownRef/PlDropdownRef.vue +1 -0
- package/src/helpers/utils.ts +1 -0
- package/src/types.ts +5 -15
- package/src/utils/TextLabel.vue +43 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { LOption } from './types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
rootRef: HTMLElement;
|
|
4
|
+
groups: Map<string, LOption[]>;
|
|
5
|
+
rest: LOption[];
|
|
6
|
+
optionSize: 'small' | 'medium';
|
|
7
|
+
selectOption: (v: unknown) => void;
|
|
8
|
+
};
|
|
9
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
10
|
+
scrollIntoActive: () => void;
|
|
11
|
+
listRef: import('vue').ComputedRef<HTMLElement | undefined>;
|
|
12
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
13
|
+
overlay: ({
|
|
14
|
+
$: import('vue').ComponentInternalInstance;
|
|
15
|
+
$data: {};
|
|
16
|
+
$props: {
|
|
17
|
+
readonly root: HTMLElement | undefined;
|
|
18
|
+
readonly gap?: number | undefined;
|
|
19
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
20
|
+
$attrs: {
|
|
21
|
+
[x: string]: unknown;
|
|
22
|
+
};
|
|
23
|
+
$refs: {
|
|
24
|
+
[x: string]: unknown;
|
|
25
|
+
} & {
|
|
26
|
+
listRef: HTMLDivElement;
|
|
27
|
+
};
|
|
28
|
+
$slots: Readonly<{
|
|
29
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
30
|
+
}>;
|
|
31
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
32
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
33
|
+
$host: Element | null;
|
|
34
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
35
|
+
$el: any;
|
|
36
|
+
$options: import('vue').ComponentOptionsBase<Readonly<{
|
|
37
|
+
root: HTMLElement | undefined;
|
|
38
|
+
gap?: number;
|
|
39
|
+
}> & Readonly<{}>, {
|
|
40
|
+
scrollIntoActive: () => void;
|
|
41
|
+
listRef: import('vue').Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
42
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
43
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
44
|
+
created?: (() => void) | (() => void)[];
|
|
45
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
46
|
+
mounted?: (() => void) | (() => void)[];
|
|
47
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
48
|
+
updated?: (() => void) | (() => void)[];
|
|
49
|
+
activated?: (() => void) | (() => void)[];
|
|
50
|
+
deactivated?: (() => void) | (() => void)[];
|
|
51
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
52
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
53
|
+
destroyed?: (() => void) | (() => void)[];
|
|
54
|
+
unmounted?: (() => void) | (() => void)[];
|
|
55
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
56
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
57
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
58
|
+
};
|
|
59
|
+
$forceUpdate: () => void;
|
|
60
|
+
$nextTick: typeof import('vue').nextTick;
|
|
61
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
62
|
+
} & Readonly<{}> & Omit<Readonly<{
|
|
63
|
+
root: HTMLElement | undefined;
|
|
64
|
+
gap?: number;
|
|
65
|
+
}> & Readonly<{}>, "scrollIntoActive" | "listRef"> & import('vue').ShallowUnwrapRef<{
|
|
66
|
+
scrollIntoActive: () => void;
|
|
67
|
+
listRef: import('vue').Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
68
|
+
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
69
|
+
$slots: {
|
|
70
|
+
default?(_: {
|
|
71
|
+
ref: string;
|
|
72
|
+
}): any;
|
|
73
|
+
};
|
|
74
|
+
}) | null;
|
|
75
|
+
}, any>;
|
|
76
|
+
export default _default;
|
|
77
|
+
//# sourceMappingURL=OptionList.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OptionList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PlDropdown/OptionList.vue"],"names":[],"mappings":"AA6EA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,WAAW,CAAC;IACrB,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;IAC/B,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,UAAU,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC/B,YAAY,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CACpC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCA6MwygB,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;AAjBh6gB,wBASG"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { defineComponent as I, useTemplateRef as L, computed as c, createBlock as u, openBlock as o, unref as O, withCtx as f, createElementBlock as s, createCommentVNode as m, Fragment as a, renderList as p, normalizeClass as h, createVNode as g, createElementVNode as k, createTextVNode as V, toDisplayString as $, withModifiers as y } from "vue";
|
|
2
|
+
import z from "../DropdownListItem.vue.js";
|
|
3
|
+
import w from "../../utils/DropdownOverlay/DropdownOverlay.vue.js";
|
|
4
|
+
import _ from "../../utils/TextLabel.vue.js";
|
|
5
|
+
const B = {
|
|
6
|
+
key: 1,
|
|
7
|
+
class: "nothing-found"
|
|
8
|
+
}, M = /* @__PURE__ */ I({
|
|
9
|
+
__name: "OptionList",
|
|
10
|
+
props: {
|
|
11
|
+
rootRef: {},
|
|
12
|
+
groups: {},
|
|
13
|
+
rest: {},
|
|
14
|
+
optionSize: {},
|
|
15
|
+
selectOption: { type: Function }
|
|
16
|
+
},
|
|
17
|
+
setup(C, { expose: S }) {
|
|
18
|
+
const r = C, l = L("overlay"), A = c(() => {
|
|
19
|
+
var e;
|
|
20
|
+
return (e = l.value) == null ? void 0 : e.listRef;
|
|
21
|
+
}), d = c(() => r.groups.size > 0), N = c(() => {
|
|
22
|
+
let e = 0;
|
|
23
|
+
for (const v of r.groups.values())
|
|
24
|
+
e += v.length;
|
|
25
|
+
return e + r.rest.length;
|
|
26
|
+
});
|
|
27
|
+
return S({
|
|
28
|
+
scrollIntoActive: () => {
|
|
29
|
+
var e;
|
|
30
|
+
(e = l.value) == null || e.scrollIntoActive();
|
|
31
|
+
},
|
|
32
|
+
listRef: A
|
|
33
|
+
}), (e, v) => (o(), u(O(w), {
|
|
34
|
+
ref_key: "overlay",
|
|
35
|
+
ref: l,
|
|
36
|
+
root: e.rootRef,
|
|
37
|
+
class: "pl-dropdown__options",
|
|
38
|
+
tabindex: "-1",
|
|
39
|
+
gap: 3
|
|
40
|
+
}, {
|
|
41
|
+
default: f(() => [
|
|
42
|
+
(o(!0), s(a, null, p(e.groups.entries(), ([t, i]) => (o(), s("div", {
|
|
43
|
+
key: t,
|
|
44
|
+
class: h({ "group-container": d.value })
|
|
45
|
+
}, [
|
|
46
|
+
g(_, null, {
|
|
47
|
+
default: f(() => [
|
|
48
|
+
V($(t), 1)
|
|
49
|
+
]),
|
|
50
|
+
_: 2
|
|
51
|
+
}, 1024),
|
|
52
|
+
k("div", null, [
|
|
53
|
+
(o(!0), s(a, null, p(i, (n, R) => (o(), u(z, {
|
|
54
|
+
key: R,
|
|
55
|
+
option: n,
|
|
56
|
+
"is-selected": n.isSelected,
|
|
57
|
+
"is-hovered": n.isActive,
|
|
58
|
+
size: e.optionSize,
|
|
59
|
+
onClick: y((b) => e.selectOption(n.value), ["stop"])
|
|
60
|
+
}, null, 8, ["option", "is-selected", "is-hovered", "size", "onClick"]))), 128))
|
|
61
|
+
])
|
|
62
|
+
], 2))), 128)),
|
|
63
|
+
e.rest.length ? (o(), s("div", {
|
|
64
|
+
key: 0,
|
|
65
|
+
class: h({ "group-container": d.value })
|
|
66
|
+
}, [
|
|
67
|
+
g(_),
|
|
68
|
+
k("div", null, [
|
|
69
|
+
(o(!0), s(a, null, p(e.rest, (t, i) => (o(), u(z, {
|
|
70
|
+
key: i,
|
|
71
|
+
option: t,
|
|
72
|
+
"is-selected": t.isSelected,
|
|
73
|
+
"is-hovered": t.isActive,
|
|
74
|
+
size: e.optionSize,
|
|
75
|
+
onClick: y((n) => e.selectOption(t.value), ["stop"])
|
|
76
|
+
}, null, 8, ["option", "is-selected", "is-hovered", "size", "onClick"]))), 128))
|
|
77
|
+
])
|
|
78
|
+
], 2)) : m("", !0),
|
|
79
|
+
N.value ? m("", !0) : (o(), s("div", B, "Nothing found"))
|
|
80
|
+
]),
|
|
81
|
+
_: 1
|
|
82
|
+
}, 8, ["root"]));
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
export {
|
|
86
|
+
M as default
|
|
87
|
+
};
|
|
88
|
+
//# sourceMappingURL=OptionList.vue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OptionList.vue.js","sources":["../../../src/components/PlDropdown/OptionList.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport DropdownListItem from '../DropdownListItem.vue';\nimport { DropdownOverlay } from '../../utils/DropdownOverlay';\nimport TextLabel from '../../utils/TextLabel.vue';\nimport { computed, useTemplateRef } from 'vue';\nimport type { LOption } from './types';\n\nconst props = defineProps<{\n rootRef: HTMLElement;\n groups: Map<string, LOption[]>;\n rest: LOption[];\n optionSize: 'small' | 'medium';\n selectOption: (v: unknown) => void;\n}>();\n\nconst overlay = useTemplateRef('overlay');\n\nconst listRef = computed(() => overlay.value?.listRef);\n\nconst hasGroups = computed(() => props.groups.size > 0);\n\nconst optionsLength = computed(() => {\n let totalGroupItems = 0;\n for (const items of props.groups.values()) {\n totalGroupItems += items.length;\n }\n return totalGroupItems + props.rest.length;\n});\n\nconst scrollIntoActive = () => {\n overlay.value?.scrollIntoActive();\n};\n\ndefineExpose({\n scrollIntoActive,\n listRef,\n});\n</script>\n\n<template>\n <DropdownOverlay ref=\"overlay\" :root=\"rootRef\" class=\"pl-dropdown__options\" tabindex=\"-1\" :gap=\"3\">\n <div v-for=\"[group, items] in groups.entries()\" :key=\"group\" :class=\"{ 'group-container': hasGroups }\">\n <TextLabel>{{ group }}</TextLabel>\n <div>\n <DropdownListItem\n v-for=\"(item, index) in items\"\n :key=\"index\"\n :option=\"item\"\n :is-selected=\"item.isSelected\"\n :is-hovered=\"item.isActive\"\n :size=\"optionSize\"\n @click.stop=\"selectOption(item.value)\"\n />\n </div>\n </div>\n <div v-if=\"rest.length\" :class=\"{ 'group-container': hasGroups }\">\n <TextLabel />\n <div>\n <DropdownListItem\n v-for=\"(item, index) in rest\"\n :key=\"index\" :option=\"item\"\n :is-selected=\"item.isSelected\"\n :is-hovered=\"item.isActive\"\n :size=\"optionSize\"\n @click.stop=\"selectOption(item.value)\"\n />\n </div>\n </div>\n <div v-if=\"!optionsLength\" class=\"nothing-found\">Nothing found</div>\n </DropdownOverlay>\n</template>\n"],"names":["props","__props","overlay","useTemplateRef","listRef","computed","_a","hasGroups","optionsLength","totalGroupItems","items","__expose"],"mappings":";;;;;;;;;;;;;;;;;AAOA,UAAMA,IAAQC,GAQRC,IAAUC,EAAe,SAAS,GAElCC,IAAUC,EAAS,MAAM;;AAAA,cAAAC,IAAAJ,EAAQ,UAAR,gBAAAI,EAAe;AAAA,KAAO,GAE/CC,IAAYF,EAAS,MAAML,EAAM,OAAO,OAAO,CAAC,GAEhDQ,IAAgBH,EAAS,MAAM;AACnC,UAAII,IAAkB;AACtB,iBAAWC,KAASV,EAAM,OAAO,OAAA;AAC/B,QAAAS,KAAmBC,EAAM;AAEpB,aAAAD,IAAkBT,EAAM,KAAK;AAAA,IAAA,CACrC;AAMY,WAAAW,EAAA;AAAA,MACX,kBALuB,MAAM;;AAC7B,SAAAL,IAAAJ,EAAQ,UAAR,QAAAI,EAAe;AAAA,MACjB;AAAA,MAIE,SAAAF;AAAA,IAAA,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OptionList.vue2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlDropdown.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PlDropdown/PlDropdown.vue"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"PlDropdown.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PlDropdown/PlDropdown.vue"],"names":[],"mappings":"AAAA,OA8XO,oBAAoB,CAAC;AAM5B,OAAO,KAAK,EAAE,UAAU,EAAwB,MAAM,aAAa,CAAC;AAapE;;GAEG;yBACc,CAAC,yBACJ,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WA2jB1D,mBAAmB,CAAC;;;QAhjBxB;;WAEG;oBACS,CAAC;QACb;;WAEG;gBACK,MAAM;QACd;;WAEG;kBACO,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;QACnC;;WAEG;iBACM,MAAM;QACf;;WAEG;+BACoB,MAAM;QAC7B;;WAEG;gBACK,OAAO;QACf;;WAEG;sBACW,MAAM;QACpB;;WAEG;oBACS,OAAO;QACnB;;WAEG;mBACQ,OAAO;QAClB;;WAEG;mBACQ,OAAO;QAClB;;WAEG;oBACS,MAAM;QAClB;;WAEG;yBACc,MAAM;QACvB;;WAEG;qBACU,OAAO,GAAG,QAAQ;mBA6f2D,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;;;;;cAvjBL,mBAAmB,SAAS,CAAC,GAAG,SAAS,KAAG,IAAI;;;;YA4jBV,OAAO,CAAC,OAAO,WAAW,CAAC;;AArkBvE,wBAqkB4E;AAG5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
|
@@ -1,43 +1,40 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode(`.pl-dropdown__options{--option-hover-bg: var(--btn-sec-hover-grey);z-index:var(--z-dropdown-options);border:1px solid var(--border-color-div-grey);position:absolute;background-color:var(--pl-dropdown-options-bg);border-radius:6px;max-height:244px;box-shadow:0 4px 12px -2px #0f244d14,0 6px 24px -2px #0f244d14;--thumb-color: var(--ic-02);overflow-y:auto}.pl-dropdown__options::-webkit-scrollbar{width:var(--scrollbar-width, 6px);height:5px;background-color:transparent;display:block}.pl-dropdown__options::-webkit-scrollbar-thumb{background:var(--thumb-color);border-radius:5px}.pl-dropdown__options::-webkit-scrollbar-thumb:hover{--thumb-color: var(--border-color-focus)}.pl-dropdown__options .nothing-found{padding:0 10px;height:var(--control-height);line-height:var(--control-height);background-color:#fff;opacity:.5;font-style:italic}.pl-dropdown__options .option{position:relative;padding:0 30px 0 10px;height:var(--control-height);line-height:var(--control-height);cursor:pointer;-webkit-user-select:none;user-select:none}.pl-dropdown__options .option .checkmark{position:absolute;display:none;right:10px;top:50%;transform:translateY(-50%)}.pl-dropdown__options .option>span{display:block;overflow:hidden;white-space:nowrap;max-width:100%;text-overflow:ellipsis}.pl-dropdown__options .option.selected{background-color:var(--color-active-select)}.pl-dropdown__options .option.selected .checkmark{display:block}.pl-dropdown__options .option.active:not(.selected){background-color:var(--option-hover-bg)}.pl-dropdown__options .option:hover{background-color:var(--option-hover-bg)}.pl-dropdown{--contour-color: var(--txt-01);--contour-border-width: 1px;--label-offset-left-x: 8px;--label-offset-right-x: 8px;--label-color: var(--txt-01);position:relative;outline:none;min-height:var(--control-height);border-radius:6px;font-family:var(--font-family-base);font-size:var(--font-size-base);font-weight:var(--font-weigh-base)}.pl-dropdown__envelope{font-family:var(--control-font-family);min-width:160px}.pl-dropdown label{display:flex;align-items:center;gap:4px;position:absolute;top:0;transform:translateY(-60%);left:var(--label-offset-left-x);padding:0 4px;max-width:calc(100% - 16px);overflow:hidden;white-space:pre;text-overflow:ellipsis;cursor:inherit;color:var(--label-color);font-size:12px;font-weight:500;border-bottom-right-radius:4px;border-bottom-left-radius:4px;background:var(--bg-elevated-01)}.pl-dropdown label>span{overflow:hidden;white-space:pre;text-overflow:ellipsis}.pl-dropdown__container{position:absolute;top:0;left:0;right:0;border-radius:6px;min-height:var(--control-height);color:var(--txt-01)}.pl-dropdown__contour{border-radius:var(--border-radius-control);border:var(--contour-border-width) solid var(--contour-color);box-shadow:var(--contour-box-shadow);z-index:0;pointer-events:none}.pl-dropdown__field{position:relative;border-radius:6px;overflow:hidden;background:transparent;padding-left:11px;min-height:var(--control-height);line-height:var(--control-height);display:flex;flex-direction:row;align-items:center;cursor:pointer}.pl-dropdown__field .input-value{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;flex-direction:row;align-items:center;padding:0 60px 0 11px;pointer-events:none;line-height:20px;color:var(--txt-01);overflow:hidden;white-space:pre;text-overflow:ellipsis;cursor:inherit}.pl-dropdown__field input{min-height:calc(var(--control-height) - 2px);line-height:20px;font-family:inherit;font-size:inherit;background-color:transparent;border:none;padding:0;width:calc(100% - 40px);color:var(--txt-01);caret-color:var(--border-color-focus)}.pl-dropdown__field input:focus{outline:none}.pl-dropdown__field input:placeholder-shown{text-overflow:ellipsis}.pl-dropdown__field input::placeholder{color:var(--color-placeholder)}.pl-dropdown__helper{font-size:12px;color:var(--txt-03);padding:2px 0 0;white-space:pre-wrap;text-overflow:ellipsis;font-weight:500;line-height:16px;margin-top:6px}.pl-dropdown__error{font-size:12px;color:var(--txt-error);padding:2px 0 0;white-space:pre-wrap;text-overflow:ellipsis;font-weight:500;line-height:16px;margin-top:6px}.pl-dropdown__controls{display:flex;flex-direction:row;align-items:center;gap:6px;margin-left:auto}.pl-dropdown__controls .mask-16,.pl-dropdown__controls .mask-24{--icon-color: var(--control-mask-fill);cursor:pointer}.pl-dropdown__controls .clear{--icon-color: var(--ic-02)}.pl-dropdown__controls .mask-loading{--icon-color: var(--ic-accent);animation:spin 2.5s linear infinite}.pl-dropdown__arrow-wrapper{display:flex;align-items:center;min-height:var(--control-height);padding-right:11px}.pl-dropdown .arrow-icon{cursor:pointer}.pl-dropdown .arrow-icon.arrow-icon-default{transition:transform .2s;background-color:var(--control-mask-fill);mask-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.46967%206.53033L3.53033%205.46967L8%209.93934L12.4697%205.46967L13.5303%206.53033L8%2012.0607L2.46967%206.53033Z'%20fill='%23110529'/%3e%3c/svg%3e");-webkit-mask-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.46967%206.53033L3.53033%205.46967L8%209.93934L12.4697%205.46967L13.5303%206.53033L8%2012.0607L2.46967%206.53033Z'%20fill='%23110529'/%3e%3c/svg%3e");mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-position:center;-webkit-mask-position:center;mask-size:16px;-webkit-mask-size:16px;width:16px;height:16px}.pl-dropdown.open,.pl-dropdown:focus-within{z-index:1;--label-color: var(--txt-focus)}.pl-dropdown.open .pl-dropdown__container{z-index:1000}.pl-dropdown.open .pl-dropdown__field{border-radius:6px 6px 0 0}.pl-dropdown.open .arrow-icon.arrow-icon-default{background-color:var(--control-mask-fill);transform:rotate(-180deg)}.pl-dropdown:hover{--contour-color: var(--control-hover-color)}.pl-dropdown:focus-within:not(.error){--label-color: var(--txt-focus);--contour-color: var(--border-color-focus);--contour-border-width: 2px;--contour-box-shadow: 0 0 0 4px var(--border-color-focus-shadow)}.pl-dropdown:focus-within.error{--contour-border-width: 2px;--contour-box-shadow: 0 0 0 4px var(--color-error-shadow)}.pl-dropdown.error{--contour-color: var(--txt-error);--label-color: var(--txt-error)}.pl-dropdown.disabled{--contour-color: var(--color-dis-01);--control-mask-fill: var(--color-dis-01);--label-color: var(--color-dis-01);cursor:not-allowed;pointer-events:none;-webkit-user-select:none;user-select:none}.pl-dropdown.disabled .input-value{color:var(--dis-01)}
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode(`.pl-dropdown__options{--option-hover-bg: var(--btn-sec-hover-grey);z-index:var(--z-dropdown-options);border:1px solid var(--border-color-div-grey);position:absolute;background-color:var(--pl-dropdown-options-bg);border-radius:6px;max-height:244px;box-shadow:0 4px 12px -2px #0f244d14,0 6px 24px -2px #0f244d14;--thumb-color: var(--ic-02);overflow-y:auto}.pl-dropdown__options::-webkit-scrollbar{width:var(--scrollbar-width, 6px);height:5px;background-color:transparent;display:block}.pl-dropdown__options::-webkit-scrollbar-thumb{background:var(--thumb-color);border-radius:5px}.pl-dropdown__options::-webkit-scrollbar-thumb:hover{--thumb-color: var(--border-color-focus)}.pl-dropdown__options .nothing-found{padding:0 10px;height:var(--control-height);line-height:var(--control-height);background-color:#fff;opacity:.5;font-style:italic}.pl-dropdown__options .group-container{padding:4px 0}.pl-dropdown__options .option{position:relative;padding:0 30px 0 10px;height:var(--control-height);line-height:var(--control-height);cursor:pointer;-webkit-user-select:none;user-select:none}.pl-dropdown__options .option .checkmark{position:absolute;display:none;right:10px;top:50%;transform:translateY(-50%)}.pl-dropdown__options .option>span{display:block;overflow:hidden;white-space:nowrap;max-width:100%;text-overflow:ellipsis}.pl-dropdown__options .option.selected{background-color:var(--color-active-select)}.pl-dropdown__options .option.selected .checkmark{display:block}.pl-dropdown__options .option.active:not(.selected){background-color:var(--option-hover-bg)}.pl-dropdown__options .option:hover{background-color:var(--option-hover-bg)}.pl-dropdown{--contour-color: var(--txt-01);--contour-border-width: 1px;--label-offset-left-x: 8px;--label-offset-right-x: 8px;--label-color: var(--txt-01);position:relative;outline:none;min-height:var(--control-height);border-radius:6px;font-family:var(--font-family-base);font-size:var(--font-size-base);font-weight:var(--font-weigh-base)}.pl-dropdown__envelope{font-family:var(--control-font-family);min-width:160px}.pl-dropdown label{display:flex;align-items:center;gap:4px;position:absolute;top:0;transform:translateY(-60%);left:var(--label-offset-left-x);padding:0 4px;max-width:calc(100% - 16px);overflow:hidden;white-space:pre;text-overflow:ellipsis;cursor:inherit;color:var(--label-color);font-size:12px;font-weight:500;border-bottom-right-radius:4px;border-bottom-left-radius:4px;background:var(--bg-elevated-01)}.pl-dropdown label>span{overflow:hidden;white-space:pre;text-overflow:ellipsis}.pl-dropdown__container{position:absolute;top:0;left:0;right:0;border-radius:6px;min-height:var(--control-height);color:var(--txt-01)}.pl-dropdown__contour{border-radius:var(--border-radius-control);border:var(--contour-border-width) solid var(--contour-color);box-shadow:var(--contour-box-shadow);z-index:0;pointer-events:none}.pl-dropdown__field{position:relative;border-radius:6px;overflow:hidden;background:transparent;padding-left:11px;min-height:var(--control-height);line-height:var(--control-height);display:flex;flex-direction:row;align-items:center;cursor:pointer}.pl-dropdown__field .input-value{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;flex-direction:row;align-items:center;padding:0 60px 0 11px;pointer-events:none;line-height:20px;color:var(--txt-01);overflow:hidden;white-space:pre;text-overflow:ellipsis;cursor:inherit}.pl-dropdown__field input{min-height:calc(var(--control-height) - 2px);line-height:20px;font-family:inherit;font-size:inherit;background-color:transparent;border:none;padding:0;width:calc(100% - 40px);color:var(--txt-01);caret-color:var(--border-color-focus)}.pl-dropdown__field input:focus{outline:none}.pl-dropdown__field input:placeholder-shown{text-overflow:ellipsis}.pl-dropdown__field input::placeholder{color:var(--color-placeholder)}.pl-dropdown__helper{font-size:12px;color:var(--txt-03);padding:2px 0 0;white-space:pre-wrap;text-overflow:ellipsis;font-weight:500;line-height:16px;margin-top:6px}.pl-dropdown__error{font-size:12px;color:var(--txt-error);padding:2px 0 0;white-space:pre-wrap;text-overflow:ellipsis;font-weight:500;line-height:16px;margin-top:6px}.pl-dropdown__controls{display:flex;flex-direction:row;align-items:center;gap:6px;margin-left:auto}.pl-dropdown__controls .mask-16,.pl-dropdown__controls .mask-24{--icon-color: var(--control-mask-fill);cursor:pointer}.pl-dropdown__controls .clear{--icon-color: var(--ic-02)}.pl-dropdown__controls .mask-loading{--icon-color: var(--ic-accent);animation:spin 2.5s linear infinite}.pl-dropdown__arrow-wrapper{display:flex;align-items:center;min-height:var(--control-height);padding-right:11px}.pl-dropdown .arrow-icon{cursor:pointer}.pl-dropdown .arrow-icon.arrow-icon-default{transition:transform .2s;background-color:var(--control-mask-fill);mask-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.46967%206.53033L3.53033%205.46967L8%209.93934L12.4697%205.46967L13.5303%206.53033L8%2012.0607L2.46967%206.53033Z'%20fill='%23110529'/%3e%3c/svg%3e");-webkit-mask-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.46967%206.53033L3.53033%205.46967L8%209.93934L12.4697%205.46967L13.5303%206.53033L8%2012.0607L2.46967%206.53033Z'%20fill='%23110529'/%3e%3c/svg%3e");mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-position:center;-webkit-mask-position:center;mask-size:16px;-webkit-mask-size:16px;width:16px;height:16px}.pl-dropdown.open,.pl-dropdown:focus-within{z-index:1;--label-color: var(--txt-focus)}.pl-dropdown.open .pl-dropdown__container{z-index:1000}.pl-dropdown.open .pl-dropdown__field{border-radius:6px 6px 0 0}.pl-dropdown.open .arrow-icon.arrow-icon-default{background-color:var(--control-mask-fill);transform:rotate(-180deg)}.pl-dropdown:hover{--contour-color: var(--control-hover-color)}.pl-dropdown:focus-within:not(.error){--label-color: var(--txt-focus);--contour-color: var(--border-color-focus);--contour-border-width: 2px;--contour-box-shadow: 0 0 0 4px var(--border-color-focus-shadow)}.pl-dropdown:focus-within.error{--contour-border-width: 2px;--contour-box-shadow: 0 0 0 4px var(--color-error-shadow)}.pl-dropdown.error{--contour-color: var(--txt-error);--label-color: var(--txt-error)}.pl-dropdown.disabled{--contour-color: var(--color-dis-01);--control-mask-fill: var(--color-dis-01);--label-color: var(--color-dis-01);cursor:not-allowed;pointer-events:none;-webkit-user-select:none;user-select:none}.pl-dropdown.disabled .input-value{color:var(--dis-01)}
|
|
2
2
|
.ui-lt-container{min-width:0;white-space:nowrap;overflow:hidden;position:relative;border-radius:5px}.ui-lt-container span{display:inline-block;overflow:hidden;text-overflow:ellipsis;width:100%;vertical-align:bottom;pointer-events:all!important}.ui-lt-container .ui-lt-animate{position:relative;animation:left-to-right var(--5deba9de) infinite alternate linear;overflow:unset!important;text-overflow:unset!important;width:fit-content!important}@keyframes left-to-right{0%{transform:translate(0);left:0%}to{transform:translate(-101%);left:101%}}`)),document.head.appendChild(o)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
|
|
3
|
-
import { defineComponent as
|
|
3
|
+
import { defineComponent as le, useSlots as se, ref as D, useTemplateRef as ae, reactive as ie, computed as s, unref as f, watch as S, watchPostEffect as de, createElementBlock as a, openBlock as n, createElementVNode as u, createCommentVNode as d, normalizeClass as g, createBlock as v, createVNode as B, withDirectives as ce, vModelText as ue, withCtx as $, createTextVNode as pe, toDisplayString as m, renderSlot as z, withModifiers as M } from "vue";
|
|
4
4
|
|
|
5
|
-
import { tap as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { useLabelNotch as
|
|
9
|
-
import { deepEqual as
|
|
10
|
-
import
|
|
11
|
-
import he from "../LongText.vue.js";
|
|
5
|
+
import { tap as fe } from "../../helpers/functions.js";
|
|
6
|
+
import ve from "../PlTooltip/PlTooltip.vue.js";
|
|
7
|
+
import me from "../../utils/DoubleContour.vue.js";
|
|
8
|
+
import { useLabelNotch as he } from "../../utils/useLabelNotch.js";
|
|
9
|
+
import { deepEqual as I } from "../../helpers/objects.js";
|
|
10
|
+
import we from "../LongText.vue.js";
|
|
12
11
|
|
|
13
12
|
import { normalizeListOptions as _e } from "../../helpers/utils.js";
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import ye from "../../utils/DropdownOverlay/DropdownOverlay.vue.js";
|
|
13
|
+
import ke from "../PlIcon16/PlIcon16.vue.js";
|
|
14
|
+
import ye from "../PlIcon24/PlIcon24.vue.js";
|
|
17
15
|
import ge from "../../generated/components/svg/images/SvgRequired.vue2.js";
|
|
18
16
|
import { getErrorMessage as Ie } from "../../helpers/error.js";
|
|
19
|
-
|
|
17
|
+
import be from "./OptionList.vue.js";
|
|
18
|
+
import { useGroupBy as Ve } from "./useGroupBy.js";
|
|
19
|
+
const Le = ["tabindex"], Ce = { class: "pl-dropdown__container" }, Ee = { class: "pl-dropdown__field" }, Re = ["disabled", "placeholder"], Oe = {
|
|
20
20
|
key: 0,
|
|
21
21
|
class: "input-value"
|
|
22
22
|
}, xe = { class: "pl-dropdown__controls" }, Ae = {
|
|
23
23
|
key: 2,
|
|
24
24
|
class: "arrow-icon arrow-icon-default"
|
|
25
|
-
},
|
|
26
|
-
key: 0,
|
|
27
|
-
class: "nothing-found"
|
|
28
|
-
}, $e = {
|
|
25
|
+
}, De = { key: 0 }, Se = {
|
|
29
26
|
key: 0,
|
|
30
27
|
class: "pl-dropdown__error"
|
|
31
|
-
},
|
|
28
|
+
}, Be = {
|
|
32
29
|
key: 1,
|
|
33
30
|
class: "pl-dropdown__helper"
|
|
34
|
-
},
|
|
31
|
+
}, $e = {
|
|
35
32
|
key: 2,
|
|
36
33
|
class: "pl-dropdown__helper"
|
|
37
|
-
},
|
|
34
|
+
}, ze = {
|
|
38
35
|
name: "PlDropdown"
|
|
39
|
-
},
|
|
40
|
-
...
|
|
36
|
+
}, Ze = /* @__PURE__ */ le({
|
|
37
|
+
...ze,
|
|
41
38
|
props: {
|
|
42
39
|
modelValue: {},
|
|
43
40
|
label: { default: "" },
|
|
@@ -54,183 +51,174 @@ const be = ["tabindex"], Ve = { class: "pl-dropdown__container" }, Ce = { class:
|
|
|
54
51
|
optionSize: { default: "small" }
|
|
55
52
|
},
|
|
56
53
|
emits: ["update:modelValue"],
|
|
57
|
-
setup(
|
|
58
|
-
const
|
|
54
|
+
setup(T, { emit: F }) {
|
|
55
|
+
const b = F, r = T, N = se(), i = D(), w = D(), _ = ae("optionListRef"), o = ie({
|
|
59
56
|
search: "",
|
|
60
57
|
activeIndex: -1,
|
|
61
58
|
open: !1,
|
|
62
59
|
optionsHeight: 0
|
|
63
|
-
}), P = () =>
|
|
64
|
-
|
|
60
|
+
}), P = () => fe(
|
|
61
|
+
R.value.findIndex((e) => I(e.value, r.modelValue)),
|
|
65
62
|
(e) => e < 0 ? 0 : e
|
|
66
|
-
), q = () => o.activeIndex = P(),
|
|
67
|
-
if (!
|
|
68
|
-
if (
|
|
69
|
-
return Ie(
|
|
70
|
-
if (
|
|
63
|
+
), q = () => o.activeIndex = P(), h = s(() => r.options === void 0), k = s(() => h.value ? !0 : r.disabled), V = s(() => (r.options ?? []).findIndex((e) => I(e.value, r.modelValue))), L = s(() => {
|
|
64
|
+
if (!h.value) {
|
|
65
|
+
if (r.error)
|
|
66
|
+
return Ie(r.error);
|
|
67
|
+
if (r.modelValue !== void 0 && V.value === -1)
|
|
71
68
|
return "The selected value is not one of the options";
|
|
72
69
|
}
|
|
73
|
-
}),
|
|
74
|
-
() => _e(
|
|
70
|
+
}), C = s(
|
|
71
|
+
() => _e(r.options ?? []).map((e, t) => ({
|
|
75
72
|
...e,
|
|
76
73
|
index: t,
|
|
77
|
-
isSelected: t ===
|
|
74
|
+
isSelected: t === V.value,
|
|
78
75
|
isActive: t === o.activeIndex
|
|
79
76
|
}))
|
|
80
|
-
),
|
|
81
|
-
const t = f(
|
|
82
|
-
return (t == null ? void 0 : t.label) ||
|
|
83
|
-
}), H = s(() => !o.open &&
|
|
84
|
-
const e =
|
|
77
|
+
), E = s(() => {
|
|
78
|
+
const t = f(C).find((l) => I(l.value, r.modelValue));
|
|
79
|
+
return (t == null ? void 0 : t.label) || r.modelValue;
|
|
80
|
+
}), H = s(() => !o.open && r.modelValue ? "" : r.modelValue ? String(E.value) : r.placeholder), U = s(() => r.modelValue !== void 0 && r.modelValue !== null), K = s(() => {
|
|
81
|
+
const e = C.value;
|
|
85
82
|
return o.search ? e.filter((t) => {
|
|
86
|
-
const
|
|
87
|
-
return t.label.toLowerCase().includes(
|
|
83
|
+
const l = o.search.toLowerCase();
|
|
84
|
+
return t.label.toLowerCase().includes(l) || t.description && t.description.toLowerCase().includes(l) ? !0 : typeof t.value == "string" ? t.value.toLowerCase().includes(l) : t.value === o.search;
|
|
88
85
|
}) : e;
|
|
89
|
-
}), K = s(() => k.value ? void 0 : "0"),
|
|
86
|
+
}), { orderedRef: R, groupsRef: G, restRef: W } = Ve(K, "group"), j = s(() => k.value ? void 0 : "0"), O = (e) => {
|
|
90
87
|
var t;
|
|
91
|
-
|
|
92
|
-
},
|
|
88
|
+
b("update:modelValue", e), o.search = "", o.open = !1, (t = i == null ? void 0 : i.value) == null || t.focus();
|
|
89
|
+
}, J = (e) => {
|
|
90
|
+
O(e);
|
|
91
|
+
}, Q = () => b("update:modelValue", void 0), X = () => {
|
|
93
92
|
var e;
|
|
94
93
|
return (e = w.value) == null ? void 0 : e.focus();
|
|
95
|
-
},
|
|
94
|
+
}, Y = () => {
|
|
96
95
|
o.open = !o.open, o.open || (o.search = "");
|
|
97
|
-
},
|
|
98
|
-
var
|
|
96
|
+
}, Z = () => o.open = !0, ee = (e) => {
|
|
97
|
+
var l, c, p;
|
|
99
98
|
const t = e.relatedTarget;
|
|
100
|
-
!((
|
|
101
|
-
},
|
|
102
|
-
var
|
|
99
|
+
!((l = i.value) != null && l.contains(t)) && !((p = (c = _.value) == null ? void 0 : c.listRef) != null && p.contains(t)) && (o.search = "", o.open = !1);
|
|
100
|
+
}, oe = (e) => {
|
|
101
|
+
var x, A;
|
|
103
102
|
if (["ArrowDown", "ArrowUp", "Enter", "Escape"].includes(e.code))
|
|
104
103
|
e.preventDefault();
|
|
105
104
|
else
|
|
106
105
|
return;
|
|
107
|
-
const { open: t, activeIndex:
|
|
106
|
+
const { open: t, activeIndex: l } = o;
|
|
108
107
|
if (!t) {
|
|
109
108
|
e.code === "Enter" && (o.open = !0);
|
|
110
109
|
return;
|
|
111
110
|
}
|
|
112
|
-
e.code === "Escape" && (o.open = !1, (
|
|
113
|
-
const c =
|
|
114
|
-
if (!
|
|
111
|
+
e.code === "Escape" && (o.open = !1, (x = i.value) == null || x.focus());
|
|
112
|
+
const c = R.value, { length: p } = c;
|
|
113
|
+
if (!p)
|
|
115
114
|
return;
|
|
116
|
-
e.code === "Enter" &&
|
|
117
|
-
const
|
|
118
|
-
o.activeIndex =
|
|
115
|
+
e.code === "Enter" && O((A = c.find((y) => y.index === l)) == null ? void 0 : A.value);
|
|
116
|
+
const te = c.findIndex((y) => y.index === l) ?? -1, re = e.code === "ArrowDown" ? 1 : e.code === "ArrowUp" ? -1 : 0, ne = Math.abs(te + re + p) % p;
|
|
117
|
+
o.activeIndex = c[ne].index ?? -1;
|
|
119
118
|
};
|
|
120
|
-
return
|
|
119
|
+
return he(i), S(() => r.modelValue, q, { immediate: !0 }), S(
|
|
121
120
|
() => o.open,
|
|
122
121
|
(e) => {
|
|
123
122
|
var t;
|
|
124
123
|
return e ? (t = w.value) == null ? void 0 : t.focus() : "";
|
|
125
124
|
}
|
|
126
|
-
),
|
|
125
|
+
), de(() => {
|
|
127
126
|
var e;
|
|
128
|
-
o.search, o.activeIndex >= 0 && o.open && ((e =
|
|
129
|
-
}), (e, t) => (
|
|
127
|
+
o.search, o.activeIndex >= 0 && o.open && ((e = _.value) == null || e.scrollIntoActive());
|
|
128
|
+
}), (e, t) => (n(), a("div", {
|
|
130
129
|
class: "pl-dropdown__envelope",
|
|
131
|
-
onClick:
|
|
130
|
+
onClick: X
|
|
132
131
|
}, [
|
|
133
|
-
|
|
132
|
+
u("div", {
|
|
134
133
|
ref_key: "rootRef",
|
|
135
|
-
ref:
|
|
136
|
-
tabindex:
|
|
134
|
+
ref: i,
|
|
135
|
+
tabindex: j.value,
|
|
137
136
|
class: g(["pl-dropdown", { open: o.open, error: e.error, disabled: k.value }]),
|
|
138
|
-
onKeydown:
|
|
139
|
-
onFocusout:
|
|
137
|
+
onKeydown: oe,
|
|
138
|
+
onFocusout: ee
|
|
140
139
|
}, [
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
140
|
+
u("div", Ce, [
|
|
141
|
+
u("div", Ee, [
|
|
142
|
+
ce(u("input", {
|
|
144
143
|
ref_key: "input",
|
|
145
144
|
ref: w,
|
|
146
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
145
|
+
"onUpdate:modelValue": t[0] || (t[0] = (l) => o.search = l),
|
|
147
146
|
type: "text",
|
|
148
147
|
tabindex: "-1",
|
|
149
148
|
disabled: k.value,
|
|
150
149
|
placeholder: H.value,
|
|
151
150
|
spellcheck: "false",
|
|
152
151
|
autocomplete: "chrome-off",
|
|
153
|
-
onFocus:
|
|
154
|
-
}, null, 40,
|
|
155
|
-
[
|
|
152
|
+
onFocus: Z
|
|
153
|
+
}, null, 40, Re), [
|
|
154
|
+
[ue, o.search]
|
|
156
155
|
]),
|
|
157
|
-
o.open ?
|
|
158
|
-
|
|
159
|
-
default:
|
|
160
|
-
|
|
156
|
+
o.open ? d("", !0) : (n(), a("div", Oe, [
|
|
157
|
+
B(we, null, {
|
|
158
|
+
default: $(() => [
|
|
159
|
+
pe(m(E.value), 1)
|
|
161
160
|
]),
|
|
162
161
|
_: 1
|
|
163
162
|
})
|
|
164
163
|
])),
|
|
165
|
-
|
|
166
|
-
|
|
164
|
+
u("div", xe, [
|
|
165
|
+
h.value ? (n(), v(f(ye), {
|
|
167
166
|
key: 0,
|
|
168
167
|
name: "loading"
|
|
169
|
-
})) :
|
|
170
|
-
e.clearable && U.value ? (
|
|
168
|
+
})) : d("", !0),
|
|
169
|
+
e.clearable && U.value ? (n(), v(f(ke), {
|
|
171
170
|
key: 1,
|
|
172
171
|
class: "clear",
|
|
173
172
|
name: "delete-clear",
|
|
174
|
-
onClick:
|
|
175
|
-
})) :
|
|
176
|
-
|
|
177
|
-
|
|
173
|
+
onClick: M(Q, ["stop"])
|
|
174
|
+
})) : d("", !0),
|
|
175
|
+
z(e.$slots, "append"),
|
|
176
|
+
u("div", {
|
|
178
177
|
class: "pl-dropdown__arrow-wrapper",
|
|
179
|
-
onClick:
|
|
178
|
+
onClick: M(Y, ["stop"])
|
|
180
179
|
}, [
|
|
181
|
-
e.arrowIconLarge ? (
|
|
180
|
+
e.arrowIconLarge ? (n(), a("div", {
|
|
182
181
|
key: 0,
|
|
183
182
|
class: g(["arrow-icon", [`icon-24 ${e.arrowIconLarge}`]])
|
|
184
|
-
}, null, 2)) : e.arrowIcon ? (
|
|
183
|
+
}, null, 2)) : e.arrowIcon ? (n(), a("div", {
|
|
185
184
|
key: 1,
|
|
186
185
|
class: g(["arrow-icon", [`icon-16 ${e.arrowIcon}`]])
|
|
187
|
-
}, null, 2)) : (
|
|
186
|
+
}, null, 2)) : (n(), a("div", Ae))
|
|
188
187
|
])
|
|
189
188
|
])
|
|
190
189
|
]),
|
|
191
|
-
e.label ? (
|
|
192
|
-
e.required ? (
|
|
193
|
-
|
|
194
|
-
|
|
190
|
+
e.label ? (n(), a("label", De, [
|
|
191
|
+
e.required ? (n(), v(ge, { key: 0 })) : d("", !0),
|
|
192
|
+
u("span", null, m(e.label), 1),
|
|
193
|
+
N.tooltip ? (n(), v(f(ve), {
|
|
195
194
|
key: 1,
|
|
196
195
|
class: "info",
|
|
197
196
|
position: "top"
|
|
198
197
|
}, {
|
|
199
|
-
tooltip:
|
|
200
|
-
|
|
198
|
+
tooltip: $(() => [
|
|
199
|
+
z(e.$slots, "tooltip")
|
|
201
200
|
]),
|
|
202
201
|
_: 3
|
|
203
|
-
})) :
|
|
204
|
-
])) :
|
|
205
|
-
o.open ? (
|
|
202
|
+
})) : d("", !0)
|
|
203
|
+
])) : d("", !0),
|
|
204
|
+
o.open ? (n(), v(be, {
|
|
206
205
|
key: 1,
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
option: n,
|
|
217
|
-
"is-selected": n.isSelected,
|
|
218
|
-
"is-hovered": n.isActive,
|
|
219
|
-
size: e.optionSize,
|
|
220
|
-
onClick: b((u) => S(n.value), ["stop"])
|
|
221
|
-
}, null, 8, ["option", "is-selected", "is-hovered", "size", "onClick"]))), 128)),
|
|
222
|
-
m.value.length ? i("", !0) : (r(), a("div", Se, "Nothing found"))
|
|
223
|
-
]),
|
|
224
|
-
_: 1
|
|
225
|
-
}, 8, ["root"])) : i("", !0),
|
|
226
|
-
F(fe, { class: "pl-dropdown__contour" })
|
|
206
|
+
ref_key: "optionListRef",
|
|
207
|
+
ref: _,
|
|
208
|
+
"root-ref": i.value,
|
|
209
|
+
groups: f(G),
|
|
210
|
+
rest: f(W),
|
|
211
|
+
"option-size": e.optionSize,
|
|
212
|
+
"select-option": J
|
|
213
|
+
}, null, 8, ["root-ref", "groups", "rest", "option-size"])) : d("", !0),
|
|
214
|
+
B(me, { class: "pl-dropdown__contour" })
|
|
227
215
|
])
|
|
228
|
-
], 42,
|
|
229
|
-
|
|
216
|
+
], 42, Le),
|
|
217
|
+
L.value ? (n(), a("div", Se, m(L.value), 1)) : h.value && e.loadingOptionsHelper ? (n(), a("div", Be, m(e.loadingOptionsHelper), 1)) : e.helper ? (n(), a("div", $e, m(e.helper), 1)) : d("", !0)
|
|
230
218
|
]));
|
|
231
219
|
}
|
|
232
220
|
});
|
|
233
221
|
export {
|
|
234
|
-
|
|
222
|
+
Ze as default
|
|
235
223
|
};
|
|
236
224
|
//# sourceMappingURL=PlDropdown.vue.js.map
|