mc-plus 1.0.112 → 1.0.113

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/dist/es/index.js CHANGED
@@ -69,18 +69,18 @@ import { M as Cs } from "./mc-removable-tag-BI8IR6RR.js";
69
69
  import { a as a30 } from "./mc-removable-tag-BI8IR6RR.js";
70
70
  import { M as is } from "./mc-reset-2g3HidL0.js";
71
71
  import { a as a31 } from "./mc-reset-2g3HidL0.js";
72
- import { M as fs } from "./mc-richtext-P55Ayxwm.js";
73
- import { F as F3, a as a32, b as b6, T } from "./mc-richtext-P55Ayxwm.js";
72
+ import { M as fs } from "./mc-richtext-e9cv6k8U.js";
73
+ import { F as F3, a as a32, b as b6, T } from "./mc-richtext-e9cv6k8U.js";
74
74
  import { M as Es } from "./mc-secondary-menu-DXNC7YoQ.js";
75
75
  import { a as a33 } from "./mc-secondary-menu-DXNC7YoQ.js";
76
- import { M as Ts } from "./mc-select-Qx9E7sCU.js";
77
- import { a as a34, S } from "./mc-select-Qx9E7sCU.js";
78
- import { M as js } from "./mc-select-plus-XpvjLcLZ.js";
79
- import { b as b7, a as a35 } from "./mc-select-plus-XpvjLcLZ.js";
80
- import { a as Os } from "./mc-select-group-plus-CyHGIZbm.js";
81
- import { M as M4 } from "./mc-select-group-plus-CyHGIZbm.js";
82
- import { M as ls } from "./mc-select-option-plus-pqkFz-tF.js";
83
- import { a as a36 } from "./mc-select-option-plus-pqkFz-tF.js";
76
+ import { M as Ts } from "./mc-select-_7JETBe4.js";
77
+ import { a as a34, S } from "./mc-select-_7JETBe4.js";
78
+ import { M as js } from "./mc-select-plus-BCXSB6Zz.js";
79
+ import { b as b7, a as a35 } from "./mc-select-plus-BCXSB6Zz.js";
80
+ import { a as Os } from "./mc-select-group-plus-B34QgN1U.js";
81
+ import { M as M4 } from "./mc-select-group-plus-B34QgN1U.js";
82
+ import { M as ls } from "./mc-select-option-plus-Dduwb3SR.js";
83
+ import { a as a36 } from "./mc-select-option-plus-Dduwb3SR.js";
84
84
  import { M as Ls } from "./mc-select-multi-option-D7hD1igO.js";
85
85
  import { a as a37 } from "./mc-select-multi-option-D7hD1igO.js";
86
86
  import { M as As } from "./mc-status-Bw9-cSOb.js";
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as e, createElementBlock as t, openBlock as l, normalizeClass as a, renderSlot as o, createBlock as i, ref as s, watch as c, watchEffect as n, normalizeStyle as r, unref as m, createElementVNode as u, createVNode as d, withCtx as v, toDisplayString as p, createTextVNode as L } from "vue";
2
2
  import { M as h, u as f, i as A, a as g, E as M } from "./vendor-D-KjTj5_.js";
3
3
  import { useWidthHeight as x } from "@mc-plus/hooks";
4
- import { M as O } from "./mc-select-plus-XpvjLcLZ.js";
5
- import { M as T } from "./mc-select-option-plus-pqkFz-tF.js";
4
+ import { M as O } from "./mc-select-plus-BCXSB6Zz.js";
5
+ import { M as T } from "./mc-select-option-plus-Dduwb3SR.js";
6
6
  import { a as k, M as I } from "./mc-icon-plus-YMAi6EZM.js";
7
7
  import { M as R } from "./mc-tooltip-BlsZG-T8.js";
8
8
  import { M as b } from "./mc-input-BGgdD1HJ.js";
@@ -4,7 +4,7 @@ import { useProp as k, useFocus as S, useHover as B, useWidthHeight as T, useCli
4
4
  import { M } from "./mc-popper-plus-CTKgoEEE.js";
5
5
  import { M as j } from "./mc-icon-plus-YMAi6EZM.js";
6
6
  import { isEmpty as E, filter as C, toLower as D, includes as P } from "lodash-es";
7
- import { u as L } from "./mc-select-plus-XpvjLcLZ.js";
7
+ import { u as L } from "./mc-select-plus-BCXSB6Zz.js";
8
8
  import { u as z } from "./mc-form-DCKlCcDs.js";
9
9
  import { I as F } from "./mc-input-group-BPpVTTHQ.js";
10
10
  const R = Symbol("mc-select-context"), H = "mc-select", U = ["value", "placeholder", "disabled", "readonly", "onKeydown"], Y = { class: "mc-select-selected-label" }, K = { class: "mc-select-trigger-toolbar" }, J = e(s({ name: "mc-select-trigger-virtual", __name: "index", props: { search: { type: Boolean, default: false }, clearable: { type: Boolean, default: false }, placeholder: { default: "Please select" }, searchValue: { default: void 0 }, isExpanded: { type: Boolean, default: false }, hideValidationIcon: { type: Boolean, default: false } }, emits: ["update:searchValue", "update:isExpanded", "press:arrow", "search", "focus", "blur", "clear"], setup(e2, { emit: l2 }) {
@@ -2,7 +2,7 @@ import { _ as l, u as s } from "./utils-dWwt4JKv.js";
2
2
  import { defineComponent as e, inject as t, computed as o, withDirectives as a, createElementBlock as u, openBlock as p, createElementVNode as r, normalizeStyle as c, unref as m, toDisplayString as i, renderSlot as d, vShow as h } from "vue";
3
3
  import { includes as f } from "lodash-es";
4
4
  import { useWidthHeight as g } from "@mc-plus/hooks";
5
- import { a as n } from "./mc-select-plus-XpvjLcLZ.js";
5
+ import { a as n } from "./mc-select-plus-BCXSB6Zz.js";
6
6
  const v = "mc-select-group-plus", _ = { class: "mc-select-group" }, b = { class: "mc-select-option-list" }, w = s(l(e({ name: v, __name: "mc-select-group-plus", props: { label: {}, height: { default: 40 }, width: { default: "100%" } }, setup(l2) {
7
7
  const s2 = l2, { filteredGroups: e2 } = t(n), { height: v2, width: w2 } = g(), j = o(() => f(e2.value, s2.label));
8
8
  return (s3, e3) => a((p(), u("ul", _, [r("li", { class: "mc-select-group-label", style: c({ height: m(v2), width: m(w2) }) }, i(l2.label), 5), r("li", null, [r("ul", b, [d(s3.$slots, "default", {}, void 0, true)])])], 512)), [[h, j.value]]);
@@ -3,7 +3,7 @@ import { defineComponent as a, inject as t, computed as s, ref as o, withDirecti
3
3
  import { find as h, some as f } from "lodash-es";
4
4
  import { useWidthHeight as y } from "@mc-plus/hooks";
5
5
  import { M as _ } from "./mc-select-multi-option-D7hD1igO.js";
6
- import { a as g } from "./mc-select-plus-XpvjLcLZ.js";
6
+ import { a as g } from "./mc-select-plus-BCXSB6Zz.js";
7
7
  const k = "mc-select-option-plus", M = ["aria-selected"], O = { key: 1, class: "mc-select-option-label" }, j = l(e(a({ name: k, __name: "mc-select-option-plus", props: { label: {}, value: { type: [String, Number, Boolean] }, height: { default: 40 }, width: { default: "100%" }, disabled: { type: Boolean } }, setup(e2) {
8
8
  const l2 = e2, { height: a2, width: k2 } = y(), { isMulti: j2, selectedOptions: w, filteredOptions: B, hoverOption: x, select: A, hover: C } = t(g), D = s(() => !!h(B.value, (e3) => e3.value === l2.value)), I = s(() => f(w.value, (e3) => e3.value === l2.value)), J = o(false), N = s(() => l2.label), S = () => {
9
9
  C(l2.value);
@@ -1,29 +1,29 @@
1
1
  import { defineComponent as e, inject as l, computed as a, createElementBlock as t, openBlock as s, normalizeClass as o, unref as i, renderSlot as r, createBlock as n, resolveDynamicComponent as c, toDisplayString as u, Fragment as d, renderList as p, createVNode as v, withCtx as m, createTextVNode as h, ref as f, createElementVNode as y, normalizeStyle as b, withDirectives as g, withKeys as w, withModifiers as x, vShow as O, createSlots as _, watchEffect as V, createCommentVNode as k, getCurrentInstance as $, watch as B, provide as S, isRef as D } from "vue";
2
- import { useProp as I, useFocus as P, useHover as T, useWidthHeight as E } from "@mc-plus/hooks";
3
- import { _ as A, u as M } from "./utils-dWwt4JKv.js";
4
- import { o as j } from "./vendor-D-KjTj5_.js";
5
- import { isEmpty as F, isNumber as H, map as C, isArray as U, isString as z, isFunction as L, isNil as G, includes as R, filter as K, toLower as N, uniqBy as q, findIndex as J, difference as Q } from "lodash-es";
2
+ import { _ as I, u as P } from "./utils-dWwt4JKv.js";
3
+ import { o as T } from "./vendor-D-KjTj5_.js";
4
+ import { isEmpty as E, isNumber as A, map as M, isArray as j, isString as F, isFunction as H, isNil as C, includes as U, filter as z, toLower as L, uniqBy as G, findIndex as R, difference as K } from "lodash-es";
5
+ import { useProp as N, useFocus as q, useHover as J, useWidthHeight as Q } from "@mc-plus/hooks";
6
6
  import { M as W } from "./mc-popper-plus-CTKgoEEE.js";
7
7
  import { M as X } from "./mc-icon-plus-YMAi6EZM.js";
8
8
  import { M as Y } from "./mc-tag-nPl6YzbM.js";
9
9
  import { M as Z } from "./mc-checkbox-BN4P6-DK.js";
10
- import { M as ee } from "./mc-select-group-plus-CyHGIZbm.js";
11
- import { a as le } from "./mc-select-option-plus-pqkFz-tF.js";
10
+ import { M as ee } from "./mc-select-group-plus-B34QgN1U.js";
11
+ import { a as le } from "./mc-select-option-plus-Dduwb3SR.js";
12
12
  import { u as ae } from "./mc-form-DCKlCcDs.js";
13
13
  import { I as te } from "./mc-input-group-BPpVTTHQ.js";
14
- const se = Symbol("mc-select-plus-context"), oe = "mc-select-plus", ie = { key: 1 }, re = A(e({ name: "mc-select-selected-content", __name: "index", setup(e2) {
15
- const { selectedOptions: d2, isDisabled: p2 } = l(se), v2 = a(() => F(d2.value) ? void 0 : d2.value[0]), m2 = a(() => {
14
+ const se = Symbol("mc-select-plus-context"), oe = "mc-select-plus", ie = { key: 1 }, re = I(e({ name: "mc-select-selected-content", __name: "index", setup(e2) {
15
+ const { selectedOptions: d2, isDisabled: p2 } = l(se), v2 = a(() => E(d2.value) ? void 0 : d2.value[0]), m2 = a(() => {
16
16
  var _a, _b;
17
- return F(v2.value) ? void 0 : v2.value.label ?? ((_b = (_a = v2.value) == null ? void 0 : _a.value) == null ? void 0 : _b.toString());
18
- }), h2 = a(() => F(v2.value) ? void 0 : v2.value.context);
17
+ return E(v2.value) ? void 0 : v2.value.label ?? ((_b = (_a = v2.value) == null ? void 0 : _a.value) == null ? void 0 : _b.toString());
18
+ }), h2 = a(() => E(v2.value) ? void 0 : v2.value.context);
19
19
  return (e3, l2) => {
20
20
  var _a;
21
21
  return s(), t("div", { class: o(["mc-select-selected-content", { "is-disabled": i(p2) }]) }, [h2.value || e3.$slots.default ? r(e3.$slots, "default", { key: 0, selectedOption: (_a = v2.value) == null ? void 0 : _a.value, selectedOptionLabel: m2.value, isDisabled: i(p2) }, () => [(s(), n(c(h2.value)))], true) : (s(), t("span", ie, u(m2.value), 1))], 2);
22
22
  };
23
- } }), [["__scopeId", "data-v-2417c622"]]), ne = { class: "mc-select-selected-content-multi" }, ce = A(e({ name: "mc-select-selected-content-multi", __name: "index", props: { isFocused: { type: Boolean, default: false }, isHovering: { type: Boolean, default: false }, maxTags: { default: void 0 } }, setup(e2) {
23
+ } }), [["__scopeId", "data-v-2417c622"]]), ne = { class: "mc-select-selected-content-multi" }, ce = I(e({ name: "mc-select-selected-content-multi", __name: "index", props: { isFocused: { type: Boolean, default: false }, isHovering: { type: Boolean, default: false }, maxTags: { default: void 0 } }, setup(e2) {
24
24
  const { isMulti: o2, selectedOptions: r2, isDisabled: n2, deleteTag: c2 } = l(se), f2 = e2, y2 = a(() => {
25
25
  const e3 = f2.maxTags, l2 = r2.value;
26
- if (H(e3)) {
26
+ if (A(e3)) {
27
27
  const a2 = l2.length - e3, t2 = [];
28
28
  for (let a3 = 0; a3 < e3 && a3 < l2.length; a3++) {
29
29
  const e4 = l2[a3];
@@ -31,34 +31,34 @@ const se = Symbol("mc-select-plus-context"), oe = "mc-select-plus", ie = { key:
31
31
  }
32
32
  return a2 > 0 && t2.push({ label: `+${a2}`, item: "rest", selectable: false }), t2;
33
33
  }
34
- return C(l2, (e4) => ({ label: `${e4.label ?? e4.value}`, item: e4.value, selectable: true }));
34
+ return M(l2, (e4) => ({ label: `${e4.label ?? e4.value}`, item: e4.value, selectable: true }));
35
35
  }), b2 = a(() => f2.isFocused || f2.isHovering ? "minimal" : "bold");
36
36
  return (e3, l2) => (s(), t("ul", ne, [(s(true), t(d, null, p(y2.value, (e4) => (s(), t("li", { key: `${e4.item}`, class: "mc-select-selected-tag" }, [v(i(Y), { size: "x-small", type: "selectable", deletable: e4.selectable, emphasis: b2.value, disabled: i(n2), onDelete: (l3) => {
37
37
  return a2 = e4.item, void (o2.value && c2(a2));
38
38
  var a2;
39
39
  } }, { default: m(() => [h(u(e4.label), 1)]), _: 2 }, 1032, ["deletable", "emphasis", "disabled", "onDelete"])]))), 128))]));
40
- } }), [["__scopeId", "data-v-aac507b5"]]), ue = ["value", "placeholder", "disabled", "readonly", "onKeydown"], de = { class: "mc-select-placeholder" }, pe = { class: "mc-select-trigger-toolbar" }, ve = A(e({ name: "mc-select-trigger", __name: "index", props: { search: { type: Boolean, default: false }, clearable: { type: Boolean, default: false }, placeholder: { default: "Please select" }, searchValue: { default: void 0 }, isExpanded: { type: Boolean, default: false }, maxTags: { default: void 0 }, hideValidationIcon: { type: Boolean } }, emits: ["update:searchValue", "update:isExpanded", "press:arrow", "search", "focus", "blur", "clear"], setup(e2, { emit: c2 }) {
41
- const d2 = e2, p2 = c2, h2 = f(), { wrapperRef: V2, isFocused: k2, handleFocus: $2, handleBlur: B2 } = P(h2), { isHovering: S2 } = T(V2), { selectedOptions: D2, isMulti: E2, isDisabled: A2, validateStatus: M2, isTopPlacement: j2 } = l(se), F2 = a(() => U(D2.value) ? D2.value.length > 0 : !!D2.value), H2 = (e3) => {
40
+ } }), [["__scopeId", "data-v-aac507b5"]]), ue = ["value", "placeholder", "disabled", "readonly", "onKeydown"], de = { class: "mc-select-placeholder" }, pe = { class: "mc-select-trigger-toolbar" }, ve = I(e({ name: "mc-select-trigger", __name: "index", props: { search: { type: Boolean, default: false }, clearable: { type: Boolean, default: false }, placeholder: { default: "Please select" }, searchValue: { default: void 0 }, isExpanded: { type: Boolean, default: false }, maxTags: { default: void 0 }, hideValidationIcon: { type: Boolean } }, emits: ["update:searchValue", "update:isExpanded", "press:arrow", "search", "focus", "blur", "clear"], setup(e2, { emit: c2 }) {
41
+ const d2 = e2, p2 = c2, h2 = f(), { wrapperRef: V2, isFocused: k2, handleFocus: $2, handleBlur: B2 } = q(h2), { isHovering: S2 } = J(V2), { selectedOptions: D2, isMulti: I2, isDisabled: P2, validateStatus: T2, isTopPlacement: E2 } = l(se), A2 = a(() => j(D2.value) ? D2.value.length > 0 : !!D2.value), M2 = (e3) => {
42
42
  const { value: l2 } = e3.target;
43
43
  p2("update:searchValue", l2), p2("search");
44
- }, C2 = () => {
45
- A2.value || p2("update:isExpanded", !d2.isExpanded);
46
- }, { showClearIcon: z2, mouseOverIcon: L2 } = (() => {
47
- const e3 = f(false), l2 = I("clearable"), t2 = I("isDisabled");
44
+ }, F2 = () => {
45
+ P2.value || p2("update:isExpanded", !d2.isExpanded);
46
+ }, { showClearIcon: H2, mouseOverIcon: C2 } = (() => {
47
+ const e3 = f(false), l2 = N("clearable"), t2 = N("isDisabled");
48
48
  return { showClearIcon: a(() => !!l2.value && e3.value && !t2.value), mouseOverIcon: (l3) => {
49
49
  e3.value = l3;
50
50
  } };
51
- })(), G2 = a(() => F2.value && z2.value && !A2.value), R2 = () => {
51
+ })(), U2 = a(() => A2.value && H2.value && !P2.value), z2 = () => {
52
52
  p2("clear");
53
- }, K2 = a(() => A2.value ? "not-allowed" : d2.search ? "text" : "pointer"), N2 = () => {
54
- A2.value || p2("update:isExpanded", !d2.isExpanded);
55
- }, q2 = (e3) => {
56
- A2.value || p2("press:arrow", e3);
53
+ }, L2 = a(() => P2.value ? "not-allowed" : d2.search ? "text" : "pointer"), G2 = () => {
54
+ P2.value || p2("update:isExpanded", !d2.isExpanded);
55
+ }, R2 = (e3) => {
56
+ P2.value || p2("press:arrow", e3);
57
57
  };
58
- return (l2, a2) => (s(), t("div", { ref_key: "triggerRef", ref: V2, class: o(["mc-select-trigger", { "is-hovering": i(S2), "is-focused": i(k2), "is-expanded": e2.isExpanded, "is-disabled": i(A2), "is-error": "error" === i(M2), "is-success": "success" === i(M2), "is-top-placement": i(j2) }]), onClick: C2 }, [y("div", { class: "mc-select-trigger-selected-content", style: b({ cursor: K2.value }) }, [y("div", { class: "mc-select-trigger-input-wrapper", style: b({ width: e2.searchValue || !F2.value ? "100%" : "1em" }) }, [y("input", { value: e2.searchValue, ref_key: "inputRef", ref: h2, class: "mc-select-input", placeholder: e2.placeholder, disabled: i(A2), readonly: !e2.search || i(A2), onInput: H2, onFocus: a2[0] || (a2[0] = (...e3) => i($2) && i($2)(...e3)), onBlur: a2[1] || (a2[1] = (...e3) => i(B2) && i(B2)(...e3)), onKeydown: [w(x(N2, ["stop", "prevent"]), ["enter"]), w(x(q2, ["stop", "prevent"]), ["arrow-down"]), w(x(q2, ["stop", "prevent"]), ["arrow-up"])] }, null, 40, ue), g(y("div", de, [r(l2.$slots, "placeholder", { placeholder: e2.placeholder, isDisabled: i(A2) }, () => [y("span", null, u(e2.placeholder), 1)], true)], 512), [[O, !e2.searchValue && !F2.value]])], 4), i(E2) ? g((s(), n(ce, { key: 0, "max-tags": e2.maxTags, "is-focused": i(k2), "is-hovering": i(S2) }, null, 8, ["max-tags", "is-focused", "is-hovering"])), [[O, F2.value && !e2.searchValue]]) : g((s(), n(re, { key: 1 }, _({ _: 2 }, [l2.$slots["selected-content"] ? { name: "default", fn: m(({ selectedOption: e3, selectedOptionLabel: a3, isDisabled: t2 }) => [r(l2.$slots, "selected-content", { selectedOption: e3, selectedOptionLabel: a3, isDisabled: t2 }, void 0, true)]), key: "0" } : void 0]), 1536)), [[O, F2.value && !e2.searchValue]])], 4), y("div", pe, [g(v(i(X), { class: "mc-select-status-icon", name: "error" === i(M2) ? "reject-fail-rev" : "accept-success-rev", size: 24 }, null, 8, ["name"]), [[O, "init" !== i(M2) && !e2.hideValidationIcon]]), y("div", { class: "mc-select-icon-wrapper", onMouseenter: a2[3] || (a2[3] = (e3) => i(L2)(true)), onMouseleave: a2[4] || (a2[4] = (e3) => i(L2)(false)) }, [g(v(i(X), { class: "mc-select-chevron-icon", name: "down-chevron", size: 24, cursor: i(A2) ? "not-allowed" : "pointer" }, null, 8, ["cursor"]), [[O, !G2.value]]), g(y("div", { onClick: a2[2] || (a2[2] = x(() => {
59
- }, ["stop"])) }, [v(i(X), { class: "mc-select-clear-icon", name: "rejectfail", size: 16, cursor: "pointer", onClick: R2 })], 512), [[O, G2.value]])], 32)])], 2));
60
- } }), [["__scopeId", "data-v-61e04dfa"]]), me = { class: "mc-select-list-wrapper" }, he = { key: 0, class: "mc-select-list-header" }, fe = { key: 0, class: "mc-select-list-header-content" }, ye = { class: "mc-select-list-content" }, be = { key: 0, class: "mc-select-list-empty" }, ge = { key: 1, class: "mc-select-list-footer" }, we = A(e({ name: "mc-select-list", __name: "index", props: { showFooter: { type: Boolean }, showHeader: { type: Boolean } }, setup(e2) {
61
- const { filteredOptions: n2, isMulti: c2, isTopPlacement: u2 } = l(se), d2 = a(() => !F(n2.value)), { isSelectAll: p2, isSelectPartial: m2, selectAll: h2 } = (() => {
58
+ return (l2, a2) => (s(), t("div", { ref_key: "triggerRef", ref: V2, class: o(["mc-select-trigger", { "is-hovering": i(S2), "is-focused": i(k2), "is-expanded": e2.isExpanded, "is-disabled": i(P2), "is-error": "error" === i(T2), "is-success": "success" === i(T2), "is-top-placement": i(E2) }]), onClick: F2 }, [y("div", { class: "mc-select-trigger-selected-content", style: b({ cursor: L2.value }) }, [y("div", { class: "mc-select-trigger-input-wrapper", style: b({ width: e2.searchValue || !A2.value ? "100%" : "1em" }) }, [y("input", { value: e2.searchValue, ref_key: "inputRef", ref: h2, class: "mc-select-input", placeholder: e2.placeholder, disabled: i(P2), readonly: !e2.search || i(P2), onInput: M2, onFocus: a2[0] || (a2[0] = (...e3) => i($2) && i($2)(...e3)), onBlur: a2[1] || (a2[1] = (...e3) => i(B2) && i(B2)(...e3)), onKeydown: [w(x(G2, ["stop", "prevent"]), ["enter"]), w(x(R2, ["stop", "prevent"]), ["arrow-down"]), w(x(R2, ["stop", "prevent"]), ["arrow-up"])] }, null, 40, ue), g(y("div", de, [r(l2.$slots, "placeholder", { placeholder: e2.placeholder, isDisabled: i(P2) }, () => [y("span", null, u(e2.placeholder), 1)], true)], 512), [[O, !e2.searchValue && !A2.value]])], 4), i(I2) ? g((s(), n(ce, { key: 0, "max-tags": e2.maxTags, "is-focused": i(k2), "is-hovering": i(S2) }, null, 8, ["max-tags", "is-focused", "is-hovering"])), [[O, A2.value && !e2.searchValue]]) : g((s(), n(re, { key: 1 }, _({ _: 2 }, [l2.$slots["selected-content"] ? { name: "default", fn: m(({ selectedOption: e3, selectedOptionLabel: a3, isDisabled: t2 }) => [r(l2.$slots, "selected-content", { selectedOption: e3, selectedOptionLabel: a3, isDisabled: t2 }, void 0, true)]), key: "0" } : void 0]), 1536)), [[O, A2.value && !e2.searchValue]])], 4), y("div", pe, [g(v(i(X), { class: "mc-select-status-icon", name: "error" === i(T2) ? "reject-fail-rev" : "accept-success-rev", size: 24 }, null, 8, ["name"]), [[O, "init" !== i(T2) && !e2.hideValidationIcon]]), y("div", { class: "mc-select-icon-wrapper", onMouseenter: a2[3] || (a2[3] = (e3) => i(C2)(true)), onMouseleave: a2[4] || (a2[4] = (e3) => i(C2)(false)) }, [g(v(i(X), { class: "mc-select-chevron-icon", name: "down-chevron", size: 24, cursor: i(P2) ? "not-allowed" : "pointer" }, null, 8, ["cursor"]), [[O, !U2.value]]), g(y("div", { onClick: a2[2] || (a2[2] = x(() => {
59
+ }, ["stop"])) }, [v(i(X), { class: "mc-select-clear-icon", name: "rejectfail", size: 16, cursor: "pointer", onClick: z2 })], 512), [[O, U2.value]])], 32)])], 2));
60
+ } }), [["__scopeId", "data-v-61e04dfa"]]), me = { class: "mc-select-list-wrapper" }, he = { key: 0, class: "mc-select-list-header" }, fe = { key: 0, class: "mc-select-list-header-content" }, ye = { class: "mc-select-list-content" }, be = { key: 0, class: "mc-select-list-empty" }, ge = { key: 1, class: "mc-select-list-footer" }, we = I(e({ name: "mc-select-list", __name: "index", props: { showFooter: { type: Boolean }, showHeader: { type: Boolean } }, setup(e2) {
61
+ const { filteredOptions: n2, isMulti: c2, isTopPlacement: u2 } = l(se), d2 = a(() => !E(n2.value)), { isSelectAll: p2, isSelectPartial: m2, selectAll: h2 } = (() => {
62
62
  const { isMulti: e3, selectedOptions: a2, selectOptions: t2, selectAll: s2 } = l(se), o2 = f(false), i2 = f(false);
63
63
  return V(() => {
64
64
  var _a, _b;
@@ -71,7 +71,7 @@ const se = Symbol("mc-select-plus-context"), oe = "mc-select-plus", ie = { key:
71
71
  } }), [["__scopeId", "data-v-359e20b8"]]), xe = () => {
72
72
  const e2 = f("bottom-start"), l2 = a(() => "top-start" === e2.value);
73
73
  return { placement: e2, isTopPlacement: l2 };
74
- }, Oe = ["id"], _e = M(A(e({ name: oe, __name: "mc-select-plus", props: { width: { default: 320 }, height: { default: 40 }, placeholder: { default: "Please select" }, disabled: { type: Boolean, default: false }, clearable: { type: Boolean, default: false }, multiple: { type: Boolean, default: false }, maxTags: {}, search: { type: Boolean, default: false }, options: {}, showHeader: { type: Boolean, default: false }, showFooter: { type: Boolean, default: false }, modelValue: { type: [String, Number, Boolean, Array] }, inputGroupPosition: {}, disableValidation: { type: Boolean, default: false }, hideValidationIcon: { type: Boolean, default: false }, validateProp: {}, positionStrategy: { default: "absolute" }, teleportTo: {} }, emits: ["update:modelValue", "change", "focus", "blur", "expand"], setup(e2, { emit: o2 }) {
74
+ }, Oe = ["id"], _e = P(I(e({ name: oe, __name: "mc-select-plus", props: { width: { default: 320 }, height: { default: 40 }, placeholder: { default: "Please select" }, disabled: { type: Boolean, default: false }, clearable: { type: Boolean, default: false }, multiple: { type: Boolean, default: false }, maxTags: {}, search: { type: Boolean, default: false }, options: {}, showHeader: { type: Boolean, default: false }, showFooter: { type: Boolean, default: false }, modelValue: { type: [String, Number, Boolean, Array] }, inputGroupPosition: {}, disableValidation: { type: Boolean, default: false }, hideValidationIcon: { type: Boolean, default: false }, validateProp: {}, positionStrategy: { default: "absolute" }, teleportTo: {} }, emits: ["update:modelValue", "change", "focus", "blur", "expand"], setup(e2, { emit: o2 }) {
75
75
  const n2 = e2, c2 = o2, u2 = f(false);
76
76
  B(u2, (e3) => {
77
77
  c2("expand", e3);
@@ -86,11 +86,11 @@ const se = Symbol("mc-select-plus-context"), oe = "mc-select-plus", ie = { key:
86
86
  if (t2.length) {
87
87
  const e4 = ((e5) => {
88
88
  const l3 = [], a3 = (e6, t3) => {
89
- U(e6) && e6.forEach((e7) => {
89
+ j(e6) && e6.forEach((e7) => {
90
90
  var _a2, _b2, _c, _d, _e2, _f, _g, _h;
91
91
  const s2 = (_a2 = (e7 == null ? void 0 : e7.type) || {}) == null ? void 0 : _a2.name;
92
92
  if (s2 === ee) {
93
- const l4 = z(e7.children) || U(e7.children) || !L((_b2 = e7.children) == null ? void 0 : _b2.default) ? e7.children : (_c = e7.children) == null ? void 0 : _c.default();
93
+ const l4 = F(e7.children) || j(e7.children) || !H((_b2 = e7.children) == null ? void 0 : _b2.default) ? e7.children : (_c = e7.children) == null ? void 0 : _c.default();
94
94
  a3(l4, (_d = e7.props) == null ? void 0 : _d.label);
95
95
  } else s2 === le ? l3.push({ label: (_e2 = e7.props) == null ? void 0 : _e2.label, value: (_f = e7.props) == null ? void 0 : _f.value, disabled: (_g = e7.props) == null ? void 0 : _g.disabled, group: t3, context: (_h = e7.children) == null ? void 0 : _h.default }) : Array.isArray(e7.children) && a3(e7.children, t3);
96
96
  });
@@ -106,29 +106,29 @@ const se = Symbol("mc-select-plus-context"), oe = "mc-select-plus", ie = { key:
106
106
  })(l2.value, e3) || (e3 = l2.value);
107
107
  }), { selectOptions: l2 };
108
108
  })(), { selectedOptions: p2 } = ((e3) => {
109
- const l2 = I("modelValue"), t2 = I("multiple");
109
+ const l2 = N("modelValue"), t2 = N("multiple");
110
110
  return { selectedOptions: a(() => {
111
- if (G(l2.value)) return [];
112
- if (t2.value && U(l2.value)) return e3.value.filter((e4) => R(l2.value, e4.value));
111
+ if (C(l2.value)) return [];
112
+ if (t2.value && j(l2.value)) return e3.value.filter((e4) => U(l2.value, e4.value));
113
113
  {
114
114
  const a2 = e3.value.find((e4) => e4.value === l2.value);
115
115
  return a2 ? [a2] : [];
116
116
  }
117
117
  }) };
118
118
  })(d2), { searchValue: h2, isSearch: y2, filteredOptions: g2, filteredGroups: w2, clearSearchValue: x2 } = ((e3) => {
119
- const l2 = f(""), t2 = I("search"), s2 = a(() => !!t2.value), o3 = a(() => (e3 == null ? void 0 : e3.value.length) ? C(K(e3.value, (e4) => R(N(e4.label), N(l2.value))), (e4) => ({ value: e4.value, group: e4.group })) : []), i2 = a(() => o3.value.length ? C(q(o3.value, "group"), (e4) => e4.group) : []);
119
+ const l2 = f(""), t2 = N("search"), s2 = a(() => !!t2.value), o3 = a(() => (e3 == null ? void 0 : e3.value.length) ? M(z(e3.value, (e4) => U(L(e4.label), L(l2.value))), (e4) => ({ value: e4.value, group: e4.group })) : []), i2 = a(() => o3.value.length ? M(G(o3.value, "group"), (e4) => e4.group) : []);
120
120
  return { searchValue: l2, isSearch: s2, filteredOptions: o3, filteredGroups: i2, clearSearchValue: () => {
121
121
  l2.value = "";
122
122
  } };
123
123
  })(d2), O2 = async () => {
124
124
  n2.search && (u2.value || (u2.value = true));
125
125
  }, k2 = f();
126
- j(k2, () => {
126
+ T(k2, () => {
127
127
  x2(), u2.value = false;
128
128
  });
129
- const P2 = () => {
129
+ const I2 = () => {
130
130
  u2.value = false, x2(), ue2(n2.multiple ? [] : void 0);
131
- }, { hoverOption: T2, setHoverOption: A2, handlePressArrow: M2 } = ((e3) => {
131
+ }, { hoverOption: P2, setHoverOption: A2, handlePressArrow: q2 } = ((e3) => {
132
132
  const l2 = f(), a2 = () => {
133
133
  l2.value = void 0;
134
134
  };
@@ -138,10 +138,10 @@ const se = Symbol("mc-select-plus-context"), oe = "mc-select-plus", ie = { key:
138
138
  var _a, _b, _c, _d, _e2;
139
139
  if (!(e3 == null ? void 0 : e3.value.length)) return void a2();
140
140
  if (!l2.value) return void (l2.value = (_a = e3.value[0]) == null ? void 0 : _a.value);
141
- const s2 = J(e3 == null ? void 0 : e3.value, (e4) => e4.value === l2.value);
141
+ const s2 = R(e3 == null ? void 0 : e3.value, (e4) => e4.value === l2.value);
142
142
  "ArrowDown" === t2.key ? l2.value = ((_b = e3.value[s2 + 1]) == null ? void 0 : _b.value) || ((_c = e3.value[0]) == null ? void 0 : _c.value) : "ArrowUp" === t2.key && (l2.value = ((_d = e3.value[s2 - 1]) == null ? void 0 : _d.value) || ((_e2 = e3.value[e3.value.length - 1]) == null ? void 0 : _e2.value));
143
143
  }, clearHoverOption: a2 };
144
- })(g2), { width: H2, height: X2 } = E(), Y2 = l(te, void 0), { formId: Z2, formDisabled: oe2, validateStatus: ie2, validateByTrigger: re2 } = ae({ externalDisabled: a(() => !!(Y2 == null ? void 0 : Y2.disabled.value)) });
144
+ })(g2), { width: J2, height: X2 } = Q(), Y2 = l(te, void 0), { formId: Z2, formDisabled: oe2, validateStatus: ie2, validateByTrigger: re2 } = ae({ externalDisabled: a(() => !!(Y2 == null ? void 0 : Y2.disabled.value)) });
145
145
  B(oe2, (e3) => {
146
146
  e3 && (u2.value = false, x2());
147
147
  }), B(ie2, (e3) => {
@@ -154,15 +154,15 @@ const se = Symbol("mc-select-plus-context"), oe = "mc-select-plus", ie = { key:
154
154
  }, ue2 = (e3) => {
155
155
  c2("update:modelValue", e3), c2("change", e3);
156
156
  }, { placement: de2, isTopPlacement: pe2 } = xe();
157
- return S(se, { isMulti: a(() => n2.multiple), isDisabled: a(() => oe2.value), validateStatus: ie2, selectOptions: d2, selectedOptions: p2, filteredOptions: g2, filteredGroups: w2, hoverOption: T2, isTopPlacement: pe2, deleteTag: async (e3) => {
157
+ return S(se, { isMulti: a(() => n2.multiple), isDisabled: a(() => oe2.value), validateStatus: ie2, selectOptions: d2, selectedOptions: p2, filteredOptions: g2, filteredGroups: w2, hoverOption: P2, isTopPlacement: pe2, deleteTag: async (e3) => {
158
158
  if (!n2.multiple) return;
159
- const l2 = C(p2.value, (e4) => e4.value), a2 = Q(l2, [e3]);
159
+ const l2 = M(p2.value, (e4) => e4.value), a2 = K(l2, [e3]);
160
160
  ue2(a2);
161
161
  }, select: async (e3) => {
162
162
  if (x2(), n2.multiple) {
163
163
  const l2 = n2.modelValue;
164
- if (U(l2) && !F(l2)) if (R(l2, e3)) {
165
- const a2 = Q([...l2], [e3]);
164
+ if (j(l2) && !E(l2)) if (U(l2, e3)) {
165
+ const a2 = K([...l2], [e3]);
166
166
  ue2(a2);
167
167
  } else ue2([...l2, e3]);
168
168
  else ue2([e3]);
@@ -172,7 +172,7 @@ const se = Symbol("mc-select-plus-context"), oe = "mc-select-plus", ie = { key:
172
172
  x2();
173
173
  const l2 = e3 ? d2.value.map((e4) => e4.value) : [];
174
174
  ue2(l2);
175
- }, hover: A2 }), (l2, a2) => (s(), t("div", { ref_key: "selectRef", ref: k2, id: i(Z2), class: "mc-select", style: b({ width: i(H2) }) }, [v(i(W), { "is-show": u2.value, placement: i(de2), "onUpdate:placement": a2[2] || (a2[2] = (e3) => D(de2) ? de2.value = e3 : null), strategy: e2.positionStrategy, "teleport-to": e2.teleportTo }, { content: m(() => [v(we, { "show-header": e2.showHeader, "show-footer": e2.showFooter }, _({ default: m(() => [r(l2.$slots, "default", {}, void 0, true)]), _: 2 }, [l2.$slots["option-header"] ? { name: "header", fn: m(({ isEmpty: e3 }) => [r(l2.$slots, "option-header", { isEmpty: e3 }, void 0, true)]), key: "0" } : void 0, l2.$slots["option-footer"] ? { name: "footer", fn: m(({ isEmpty: e3 }) => [r(l2.$slots, "option-footer", { isEmpty: e3 }, void 0, true)]), key: "1" } : void 0, l2.$slots.empty ? { name: "empty", fn: m(() => [r(l2.$slots, "empty", {}, void 0, true)]), key: "2" } : void 0]), 1032, ["show-header", "show-footer"])]), default: m(() => [v(ve, { "search-value": i(h2), "onUpdate:searchValue": a2[0] || (a2[0] = (e3) => D(h2) ? h2.value = e3 : null), "is-expanded": u2.value, "onUpdate:isExpanded": a2[1] || (a2[1] = (e3) => u2.value = e3), search: i(y2), clearable: e2.clearable, placeholder: e2.placeholder, "max-tags": e2.maxTags, "hide-validation-icon": e2.hideValidationIcon, onSearch: O2, onClear: P2, "onPress:arrow": i(M2), onFocus: ne2, onBlur: ce2, style: b({ height: i(X2) }) }, _({ _: 2 }, [l2.$slots.placeholder ? { name: "placeholder", fn: m(({ placeholder: e3, isDisabled: a3 }) => [r(l2.$slots, "placeholder", { placeholder: e3, isDisabled: a3 }, void 0, true)]), key: "0" } : void 0, l2.$slots["selected-content"] ? { name: "selected-content", fn: m(({ selectedOption: e3, selectedOptionLabel: a3, isDisabled: t2 }) => [r(l2.$slots, "selected-content", { selectedOption: e3, selectedOptionLabel: a3, isDisabled: t2 }, void 0, true)]), key: "1" } : void 0]), 1032, ["search-value", "is-expanded", "search", "clearable", "placeholder", "max-tags", "hide-validation-icon", "onPress:arrow", "style"])]), _: 3 }, 8, ["is-show", "placement", "strategy", "teleport-to"])], 12, Oe));
175
+ }, hover: A2 }), (l2, a2) => (s(), t("div", { ref_key: "selectRef", ref: k2, id: i(Z2), class: "mc-select", style: b({ width: i(J2) }) }, [v(i(W), { "is-show": u2.value, placement: i(de2), "onUpdate:placement": a2[2] || (a2[2] = (e3) => D(de2) ? de2.value = e3 : null), strategy: e2.positionStrategy, "teleport-to": e2.teleportTo }, { content: m(() => [v(we, { "show-header": e2.showHeader, "show-footer": e2.showFooter }, _({ default: m(() => [r(l2.$slots, "default", {}, void 0, true)]), _: 2 }, [l2.$slots["option-header"] ? { name: "header", fn: m(({ isEmpty: e3 }) => [r(l2.$slots, "option-header", { isEmpty: e3 }, void 0, true)]), key: "0" } : void 0, l2.$slots["option-footer"] ? { name: "footer", fn: m(({ isEmpty: e3 }) => [r(l2.$slots, "option-footer", { isEmpty: e3 }, void 0, true)]), key: "1" } : void 0, l2.$slots.empty ? { name: "empty", fn: m(() => [r(l2.$slots, "empty", {}, void 0, true)]), key: "2" } : void 0]), 1032, ["show-header", "show-footer"])]), default: m(() => [v(ve, { "search-value": i(h2), "onUpdate:searchValue": a2[0] || (a2[0] = (e3) => D(h2) ? h2.value = e3 : null), "is-expanded": u2.value, "onUpdate:isExpanded": a2[1] || (a2[1] = (e3) => u2.value = e3), search: i(y2), clearable: e2.clearable, placeholder: e2.placeholder, "max-tags": e2.maxTags, "hide-validation-icon": e2.hideValidationIcon, onSearch: O2, onClear: I2, "onPress:arrow": i(q2), onFocus: ne2, onBlur: ce2, style: b({ height: i(X2) }) }, _({ _: 2 }, [l2.$slots.placeholder ? { name: "placeholder", fn: m(({ placeholder: e3, isDisabled: a3 }) => [r(l2.$slots, "placeholder", { placeholder: e3, isDisabled: a3 }, void 0, true)]), key: "0" } : void 0, l2.$slots["selected-content"] ? { name: "selected-content", fn: m(({ selectedOption: e3, selectedOptionLabel: a3, isDisabled: t2 }) => [r(l2.$slots, "selected-content", { selectedOption: e3, selectedOptionLabel: a3, isDisabled: t2 }, void 0, true)]), key: "1" } : void 0]), 1032, ["search-value", "is-expanded", "search", "clearable", "placeholder", "max-tags", "hide-validation-icon", "onPress:arrow", "style"])]), _: 3 }, 8, ["is-show", "placement", "strategy", "teleport-to"])], 12, Oe));
176
176
  } }), [["__scopeId", "data-v-2425910a"]]));
177
177
  export {
178
178
  _e as M,
@@ -1,6 +1,5 @@
1
1
  export { default as useSelectOptions } from './re_useSelectOptions';
2
2
  export { default as useSelected } from './re_useSelected';
3
- export { default as useClickOutside } from './re_useClickOutside';
4
3
  export { default as useSearch } from './re_useSearch';
5
4
  export { default as useOptionHover } from './re_useOptionHover';
6
5
  export { default as usePlacement } from './re_usePlacement';