@rft-rc/recycle-ui 0.0.2 → 0.0.3-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +38 -34
  2. package/dist/components/button/index.vue.d.ts +18 -6
  3. package/dist/components/button/index.vue.d.ts.map +1 -1
  4. package/dist/components/calendar/index.d.ts +5 -0
  5. package/dist/components/calendar/index.d.ts.map +1 -0
  6. package/dist/components/calendar/index.vue.d.ts +64 -0
  7. package/dist/components/calendar/index.vue.d.ts.map +1 -0
  8. package/dist/components/calendar/panel-content.vue.d.ts +38 -0
  9. package/dist/components/calendar/panel-content.vue.d.ts.map +1 -0
  10. package/dist/components/card/index.vue.d.ts +2 -2
  11. package/dist/components/card/index.vue.d.ts.map +1 -1
  12. package/dist/components/dropdown/index.d.ts +8 -0
  13. package/dist/components/dropdown/index.d.ts.map +1 -0
  14. package/dist/components/dropdown/index.vue.d.ts +49 -0
  15. package/dist/components/dropdown/index.vue.d.ts.map +1 -0
  16. package/dist/components/dropdown/item.vue.d.ts +24 -0
  17. package/dist/components/dropdown/item.vue.d.ts.map +1 -0
  18. package/dist/components/dropdown/menu.vue.d.ts +32 -0
  19. package/dist/components/dropdown/menu.vue.d.ts.map +1 -0
  20. package/dist/components/dropdown/types.d.ts +2 -0
  21. package/dist/components/dropdown/types.d.ts.map +1 -0
  22. package/dist/components/icon/index.d.ts +1 -1
  23. package/dist/components/icon/index.vue.d.ts +1 -1
  24. package/dist/components/icon/index.vue.d.ts.map +1 -1
  25. package/dist/components/input/index.d.ts +5 -0
  26. package/dist/components/input/index.d.ts.map +1 -0
  27. package/dist/components/input/index.vue.d.ts +139 -0
  28. package/dist/components/input/index.vue.d.ts.map +1 -0
  29. package/dist/components/popup/index.d.ts +5 -0
  30. package/dist/components/popup/index.d.ts.map +1 -0
  31. package/dist/components/popup/index.vue.d.ts +70 -0
  32. package/dist/components/popup/index.vue.d.ts.map +1 -0
  33. package/dist/components/search-area/index.vue.d.ts +51 -11
  34. package/dist/components/search-area/index.vue.d.ts.map +1 -1
  35. package/dist/index.cjs +1 -1
  36. package/dist/index.cjs.map +1 -1
  37. package/dist/index.d.ts +9 -0
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/index.mjs +2155 -477
  40. package/dist/index.mjs.map +1 -1
  41. package/dist/style.css +1 -1
  42. package/dist/types.d.ts +4 -0
  43. package/dist/types.d.ts.map +1 -1
  44. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -1,50 +1,119 @@
1
- import { defineComponent as B, computed as g, createElementBlock as m, openBlock as u, normalizeStyle as A, normalizeClass as V, createCommentVNode as $, renderSlot as w, createTextVNode as q, toDisplayString as C, inject as T, createElementVNode as k, ref as I, watchEffect as Le, provide as U, Fragment as O, renderList as K, createBlock as te, onMounted as be, onUnmounted as ke, Teleport as Ne, createVNode as E, Transition as le, withCtx as G, createApp as Be, reactive as We, TransitionGroup as Te, render as $e, watch as ie, nextTick as ue, unref as H } from "vue";
2
- const ze = ["disabled"], Me = {
1
+ import { defineComponent as re, inject as Ce, computed as R, onMounted as nt, createElementBlock as f, openBlock as s, normalizeStyle as le, normalizeClass as j, createCommentVNode as D, toDisplayString as P, renderSlot as q, Fragment as oe, createBlock as te, createTextVNode as _e, createElementVNode as C, ref as E, watchEffect as Et, provide as Ve, renderList as fe, onUnmounted as at, Teleport as it, createVNode as G, Transition as Ee, withCtx as ae, createApp as Bt, reactive as At, TransitionGroup as Ft, render as It, watch as Se, withModifiers as Fe, unref as Q, nextTick as Be, withDirectives as Mt, vModelText as Rt, useSlots as zt, resolveDynamicComponent as vt } from "vue";
2
+ const Yt = {
3
+ key: 0,
4
+ class: "rc-icon__unicode"
5
+ }, Lt = /* @__PURE__ */ re({
6
+ name: "rc-icon",
7
+ __name: "index",
8
+ props: {
9
+ name: {},
10
+ size: { default: 16 },
11
+ color: { default: "" },
12
+ spin: { type: Boolean, default: !1 },
13
+ code: { default: "" }
14
+ },
15
+ setup(e) {
16
+ const r = e, m = Ce(lt, {}), t = R(() => (m == null ? void 0 : m.iconClass) || "iconfont"), g = R(() => r.name || ""), k = R(() => typeof r.size == "number" ? `${r.size}px` : r.size || "16px"), v = R(() => ({
17
+ fontSize: k.value,
18
+ color: r.color || void 0,
19
+ lineHeight: 1,
20
+ fontFamily: (m == null ? void 0 : m.iconClass) || "iconfont"
21
+ })), d = R(() => {
22
+ const o = r.code;
23
+ if (o == null || o === "" || o === 0) return "";
24
+ if (typeof o == "number")
25
+ return String.fromCharCode(o);
26
+ const p = String(o).replace(/^0x/i, ""), B = parseInt(p, 16);
27
+ return Number.isNaN(B) ? "" : String.fromCharCode(B);
28
+ });
29
+ return nt(() => {
30
+ if (typeof window > "u") return;
31
+ const o = m && m.iconCssUrl || ct.iconCssUrl;
32
+ if (!o) return;
33
+ const p = `link[rel="stylesheet"][data-rcui-icon="true"][href="${o}"]`;
34
+ if (!document.head.querySelector(p)) {
35
+ const x = document.createElement("link");
36
+ x.rel = "stylesheet", x.href = o, x.setAttribute("data-rcui-icon", "true"), document.head.appendChild(x);
37
+ }
38
+ }), (o, p) => (s(), f("i", {
39
+ class: j(["rc-icon", [t.value, g.value, { "rc-icon--spin": e.spin }]]),
40
+ style: le(v.value),
41
+ "aria-hidden": "true"
42
+ }, [
43
+ d.value ? (s(), f("span", Yt, P(d.value), 1)) : D("", !0)
44
+ ], 6));
45
+ }
46
+ }), se = (e, r) => {
47
+ const m = e.__vccOpts || e;
48
+ for (const [t, g] of r)
49
+ m[t] = g;
50
+ return m;
51
+ }, Z = /* @__PURE__ */ se(Lt, [["__scopeId", "data-v-3857a892"]]), Pt = ["disabled"], Nt = {
3
52
  key: 0,
4
53
  class: "rc-button__spinner"
5
- }, Ue = /* @__PURE__ */ B({
54
+ }, Wt = {
55
+ key: 0,
56
+ class: "rc-button__icon rc-button__icon--prefix"
57
+ }, Ht = {
58
+ key: 2,
59
+ class: "rc-button__icon rc-button__icon--suffix"
60
+ }, Ot = /* @__PURE__ */ re({
6
61
  __name: "index",
7
62
  props: {
8
63
  type: { default: "default" },
9
64
  size: { default: "medium" },
10
- plain: { type: Boolean, default: !1 },
65
+ mode: { default: void 0 },
11
66
  block: { type: Boolean, default: !1 },
12
67
  label: { default: "" },
13
68
  round: { type: [Number, String, Boolean], default: 6 },
14
69
  disabled: { type: Boolean, default: !1 },
15
- loading: { type: Boolean, default: !1 }
70
+ loading: { type: Boolean, default: !1 },
71
+ preIcon: { default: "" },
72
+ suffixIcon: { default: "" }
16
73
  },
17
74
  emits: ["click"],
18
- setup(e, { emit: t }) {
19
- const s = e, c = t, f = (v) => {
20
- !s.disabled && !s.loading && c("click", v);
21
- }, d = g(() => {
22
- const v = s.round;
75
+ setup(e, { emit: r }) {
76
+ const m = e, t = r, g = (v) => {
77
+ !m.disabled && !m.loading && t("click", v);
78
+ }, k = R(() => {
79
+ const v = m.round;
23
80
  return typeof v == "boolean" ? v ? "999px" : "6px" : typeof v == "number" ? `${v}px` : String(v);
24
81
  });
25
- return (v, r) => (u(), m("button", {
26
- class: V(["rc-button", [`rc-button--${e.type}`, `rc-button--${e.size}`, { "is-plain": e.plain, "is-block": e.block, "is-disabled": e.disabled, "is-loading": e.loading }]]),
27
- style: A({ borderRadius: d.value }),
82
+ return (v, d) => (s(), f("button", {
83
+ class: j(["rc-button", [`rc-button--${e.type}`, `rc-button--${e.size}`, e.mode ? `rc-button--${e.mode}` : "", { "is-block": e.block, "is-disabled": e.disabled, "is-loading": e.loading }]]),
84
+ style: le({ borderRadius: k.value }),
28
85
  disabled: e.disabled || e.loading,
29
- onClick: f
86
+ onClick: g
30
87
  }, [
31
- e.loading ? (u(), m("span", Me)) : $("", !0),
32
- w(v.$slots, "default", {}, () => [
33
- q(C(e.label), 1)
34
- ], !0)
35
- ], 14, ze));
88
+ e.loading ? (s(), f("span", Nt)) : (s(), f(oe, { key: 1 }, [
89
+ e.preIcon || v.$slots.preIcon ? (s(), f("span", Wt, [
90
+ q(v.$slots, "preIcon", {}, () => [
91
+ e.preIcon ? (s(), te(Z, {
92
+ key: 0,
93
+ name: e.preIcon
94
+ }, null, 8, ["name"])) : D("", !0)
95
+ ], !0)
96
+ ])) : D("", !0)
97
+ ], 64)),
98
+ q(v.$slots, "default", {}, () => [
99
+ _e(P(e.label), 1)
100
+ ], !0),
101
+ !e.loading && (e.suffixIcon || v.$slots.suffixIcon) ? (s(), f("span", Ht, [
102
+ q(v.$slots, "suffixIcon", {}, () => [
103
+ e.suffixIcon ? (s(), te(Z, {
104
+ key: 0,
105
+ name: e.suffixIcon
106
+ }, null, 8, ["name"])) : D("", !0)
107
+ ], !0)
108
+ ])) : D("", !0)
109
+ ], 14, Pt));
36
110
  }
37
- }), W = (e, t) => {
38
- const s = e.__vccOpts || e;
39
- for (const [c, f] of t)
40
- s[c] = f;
41
- return s;
42
- }, J = /* @__PURE__ */ W(Ue, [["__scopeId", "data-v-a70e95bb"]]);
43
- J.name = "rc-button";
44
- function de(e) {
45
- return e.component(J.name, J), e;
111
+ }), xe = /* @__PURE__ */ se(Ot, [["__scopeId", "data-v-4c6a5e4f"]]);
112
+ xe.name = "rc-button";
113
+ function mt(e) {
114
+ return e.component(xe.name, xe), e;
46
115
  }
47
- const Fe = { class: "rc-desc-item__value" }, Ge = /* @__PURE__ */ B({
116
+ const Ut = { class: "rc-desc-item__value" }, Kt = /* @__PURE__ */ re({
48
117
  name: "rc-descriptions-item",
49
118
  __name: "item",
50
119
  props: {
@@ -54,43 +123,43 @@ const Fe = { class: "rc-desc-item__value" }, Ge = /* @__PURE__ */ B({
54
123
  span: { default: 1 }
55
124
  },
56
125
  setup(e) {
57
- const t = e;
58
- T("rcDescItemWidth", void 0), T("rcDescSingleWidth", ""), T("rcDescGap", "0px");
59
- const s = T("rcDescGapPx", 0), c = T("rcDescColCount", 1), f = T("rcDescLabelWidth", ""), d = g(() => {
60
- const l = typeof t.span == "string" ? parseInt(t.span, 10) : t.span, o = typeof (c == null ? void 0 : c.value) == "number" ? c.value : c, b = !Number.isNaN(l) && l > 0 ? l : 1;
61
- return Math.min(b, o || 1);
62
- }), v = g(() => {
63
- const l = typeof (c == null ? void 0 : c.value) == "number" ? c.value : c, o = typeof (s == null ? void 0 : s.value) == "number" ? s.value : s, b = d.value;
64
- if (!l || l <= 1 || b >= l) return "100%";
65
- const y = (l - 1) * o, _ = (b - 1) * o;
66
- return `calc((100% - ${y}px) * ${b} / ${l} + ${_}px)`;
67
- }), r = g(() => {
68
- const l = typeof (f == null ? void 0 : f.value) == "string" ? f.value : f, o = t.labelWidth !== "" ? t.labelWidth : l || "";
69
- return o ? { width: typeof o == "number" ? `${o}px` : String(o), flex: "0 0 auto" } : {};
126
+ const r = e;
127
+ Ce("rcDescItemWidth", void 0), Ce("rcDescSingleWidth", ""), Ce("rcDescGap", "0px");
128
+ const m = Ce("rcDescGapPx", 0), t = Ce("rcDescColCount", 1), g = Ce("rcDescLabelWidth", ""), k = R(() => {
129
+ const o = typeof r.span == "string" ? parseInt(r.span, 10) : r.span, p = typeof (t == null ? void 0 : t.value) == "number" ? t.value : t, B = !Number.isNaN(o) && o > 0 ? o : 1;
130
+ return Math.min(B, p || 1);
131
+ }), v = R(() => {
132
+ const o = typeof (t == null ? void 0 : t.value) == "number" ? t.value : t, p = typeof (m == null ? void 0 : m.value) == "number" ? m.value : m, B = k.value;
133
+ if (!o || o <= 1 || B >= o) return "100%";
134
+ const x = (o - 1) * p, _ = (B - 1) * p;
135
+ return `calc((100% - ${x}px) * ${B} / ${o} + ${_}px)`;
136
+ }), d = R(() => {
137
+ const o = typeof (g == null ? void 0 : g.value) == "string" ? g.value : g, p = r.labelWidth !== "" ? r.labelWidth : o || "";
138
+ return p ? { width: typeof p == "number" ? `${p}px` : String(p), flex: "0 0 auto" } : {};
70
139
  });
71
- return (l, o) => (u(), m("div", {
140
+ return (o, p) => (s(), f("div", {
72
141
  class: "rc-desc-item",
73
- style: A({ width: v.value, flex: `0 0 ${v.value}` })
142
+ style: le({ width: v.value, flex: `0 0 ${v.value}` })
74
143
  }, [
75
- k("div", {
144
+ C("div", {
76
145
  class: "rc-desc-item__label",
77
- style: A(r.value)
146
+ style: le(d.value)
78
147
  }, [
79
- w(l.$slots, "label", {}, () => [
80
- q(C(e.label), 1)
148
+ q(o.$slots, "label", {}, () => [
149
+ _e(P(e.label), 1)
81
150
  ], !0)
82
151
  ], 4),
83
- k("div", Fe, [
84
- w(l.$slots, "default", {}, () => [
85
- q(C(e.value), 1)
152
+ C("div", Ut, [
153
+ q(o.$slots, "default", {}, () => [
154
+ _e(P(e.value), 1)
86
155
  ], !0)
87
156
  ])
88
157
  ], 4));
89
158
  }
90
- }), P = /* @__PURE__ */ W(Ge, [["__scopeId", "data-v-970d0b99"]]), Oe = { class: "rc-descriptions" }, Pe = {
159
+ }), ze = /* @__PURE__ */ se(Kt, [["__scopeId", "data-v-970d0b99"]]), jt = { class: "rc-descriptions" }, Gt = {
91
160
  key: 0,
92
161
  class: "rc-descriptions__title"
93
- }, je = /* @__PURE__ */ B({
162
+ }, qt = /* @__PURE__ */ re({
94
163
  name: "rc-descriptions",
95
164
  __name: "index",
96
165
  props: {
@@ -102,66 +171,66 @@ const Fe = { class: "rc-desc-item__value" }, Ge = /* @__PURE__ */ B({
102
171
  keyMap: {}
103
172
  },
104
173
  setup(e) {
105
- const t = e, s = I(null), c = g(() => typeof t.gap == "number" ? `${t.gap}px` : String(t.gap)), f = g(() => {
106
- const o = typeof t.column == "string" ? Number.parseInt(t.column, 10) : t.column ?? 1;
107
- return !Number.isNaN(o) && o > 0 ? o : 1;
108
- }), d = I("100%"), v = I("100%");
109
- Le(() => {
110
- const o = f.value;
111
- if (o <= 1)
112
- d.value = "100%", v.value = "100%";
174
+ const r = e, m = E(null), t = R(() => typeof r.gap == "number" ? `${r.gap}px` : String(r.gap)), g = R(() => {
175
+ const p = typeof r.column == "string" ? Number.parseInt(r.column, 10) : r.column ?? 1;
176
+ return !Number.isNaN(p) && p > 0 ? p : 1;
177
+ }), k = E("100%"), v = E("100%");
178
+ Et(() => {
179
+ const p = g.value;
180
+ if (p <= 1)
181
+ k.value = "100%", v.value = "100%";
113
182
  else {
114
- const b = typeof t.gap == "number" ? t.gap : parseFloat(String(t.gap)) || 0, _ = `calc((100% - ${(o - 1) * b}px) / ${o})`;
115
- v.value = _, d.value = _;
116
- }
117
- }), U("rcDescItemWidth", d), U("rcDescSingleWidth", v), U("rcDescColCount", f), U("rcDescGapPx", g(() => typeof t.gap == "number" ? t.gap : parseFloat(String(t.gap)) || 0));
118
- const r = g(() => t.labelWidth === "" || t.labelWidth === void 0 ? "" : typeof t.labelWidth == "number" ? `${t.labelWidth}px` : String(t.labelWidth));
119
- U("rcDescLabelWidth", r), U("rcDescGap", g(() => typeof t.gap == "number" ? `${t.gap}px` : String(t.gap)));
120
- const l = g(() => {
121
- var y, _, h;
122
- const o = ((y = t.keyMap) == null ? void 0 : y.key) ?? "label", b = ((_ = t.keyMap) == null ? void 0 : _.value) ?? "value";
123
- return (h = t.data) != null && h.length ? t.data.map((D) => ({
124
- label: D == null ? void 0 : D[o],
125
- value: D == null ? void 0 : D[b]
183
+ const B = typeof r.gap == "number" ? r.gap : parseFloat(String(r.gap)) || 0, _ = `calc((100% - ${(p - 1) * B}px) / ${p})`;
184
+ v.value = _, k.value = _;
185
+ }
186
+ }), Ve("rcDescItemWidth", k), Ve("rcDescSingleWidth", v), Ve("rcDescColCount", g), Ve("rcDescGapPx", R(() => typeof r.gap == "number" ? r.gap : parseFloat(String(r.gap)) || 0));
187
+ const d = R(() => r.labelWidth === "" || r.labelWidth === void 0 ? "" : typeof r.labelWidth == "number" ? `${r.labelWidth}px` : String(r.labelWidth));
188
+ Ve("rcDescLabelWidth", d), Ve("rcDescGap", R(() => typeof r.gap == "number" ? `${r.gap}px` : String(r.gap)));
189
+ const o = R(() => {
190
+ var x, _, V;
191
+ const p = ((x = r.keyMap) == null ? void 0 : x.key) ?? "label", B = ((_ = r.keyMap) == null ? void 0 : _.value) ?? "value";
192
+ return (V = r.data) != null && V.length ? r.data.map((A) => ({
193
+ label: A == null ? void 0 : A[p],
194
+ value: A == null ? void 0 : A[B]
126
195
  })) : [];
127
196
  });
128
- return (o, b) => (u(), m("div", Oe, [
129
- o.$slots.title || e.title ? (u(), m("div", Pe, [
130
- w(o.$slots, "title", {}, () => [
131
- q(C(e.title), 1)
197
+ return (p, B) => (s(), f("div", jt, [
198
+ p.$slots.title || e.title ? (s(), f("div", Gt, [
199
+ q(p.$slots, "title", {}, () => [
200
+ _e(P(e.title), 1)
132
201
  ], !0)
133
- ])) : $("", !0),
134
- k("div", {
202
+ ])) : D("", !0),
203
+ C("div", {
135
204
  class: "rc-descriptions__body",
136
- style: A({ gap: c.value }),
205
+ style: le({ gap: t.value }),
137
206
  ref_key: "wrapEl",
138
- ref: s
207
+ ref: m
139
208
  }, [
140
- l.value.length ? (u(!0), m(O, { key: 0 }, K(l.value, (y, _) => (u(), te(P, {
209
+ o.value.length ? (s(!0), f(oe, { key: 0 }, fe(o.value, (x, _) => (s(), te(ze, {
141
210
  key: _,
142
- label: y.label,
143
- value: y.value,
211
+ label: x.label,
212
+ value: x.value,
144
213
  "label-width": e.labelWidth
145
- }, null, 8, ["label", "value", "label-width"]))), 128)) : w(o.$slots, "default", { key: 1 }, void 0, !0)
214
+ }, null, 8, ["label", "value", "label-width"]))), 128)) : q(p.$slots, "default", { key: 1 }, void 0, !0)
146
215
  ], 4)
147
216
  ]));
148
217
  }
149
- }), Y = /* @__PURE__ */ W(je, [["__scopeId", "data-v-5fcaa235"]]);
150
- Y.name = "rc-descriptions";
151
- P.name = "rc-descriptions-item";
152
- function fe(e) {
153
- return e.component(Y.name, Y), e.component("RcDescriptions", Y), e.component(P.name, P), e.component("RcDescriptionsItem", P), e;
218
+ }), Ne = /* @__PURE__ */ se(qt, [["__scopeId", "data-v-5fcaa235"]]);
219
+ Ne.name = "rc-descriptions";
220
+ ze.name = "rc-descriptions-item";
221
+ function pt(e) {
222
+ return e.component(Ne.name, Ne), e.component("RcDescriptions", Ne), e.component(ze.name, ze), e.component("RcDescriptionsItem", ze), e;
154
223
  }
155
- const Dt = Y, Et = P, qe = { class: "rc-card__title" }, He = { class: "rc-card__title-text" }, Ke = {
224
+ const Ya = Ne, La = ze, Jt = { class: "rc-card__title" }, Qt = { class: "rc-card__title-text" }, Xt = {
156
225
  key: 0,
157
226
  class: "rc-card__status"
158
- }, Ye = {
227
+ }, Zt = {
159
228
  key: 1,
160
229
  class: "rc-card__divider"
161
- }, Je = {
230
+ }, en = {
162
231
  key: 2,
163
232
  class: "rc-card__action"
164
- }, Qe = /* @__PURE__ */ B({
233
+ }, tn = /* @__PURE__ */ re({
165
234
  name: "rc-card",
166
235
  __name: "index",
167
236
  props: {
@@ -179,84 +248,84 @@ const Dt = Y, Et = P, qe = { class: "rc-card__title" }, He = { class: "rc-card__
179
248
  height: { default: "" }
180
249
  },
181
250
  setup(e) {
182
- const t = e, s = g(() => {
183
- const r = typeof t.round == "boolean" ? t.round ? "12px" : "0" : typeof t.round == "number" ? `${t.round}px` : String(t.round);
251
+ const r = e, m = R(() => {
252
+ const d = typeof r.round == "boolean" ? r.round ? "12px" : "0" : typeof r.round == "number" ? `${r.round}px` : String(r.round);
184
253
  return {
185
- backgroundColor: t.color || "var(--rc-white)",
186
- borderRadius: r,
187
- boxShadow: v(t.elevation),
188
- width: d(t.width),
189
- height: d(t.height)
254
+ backgroundColor: r.color || "var(--rc-white)",
255
+ borderRadius: d,
256
+ boxShadow: v(r.elevation),
257
+ width: k(r.width),
258
+ height: k(r.height)
190
259
  };
191
- }), c = g(() => t.padding || "16px"), f = g(
192
- () => typeof t.gap == "number" ? `${t.gap}px` : String(t.gap)
260
+ }), t = R(() => r.padding || "16px"), g = R(
261
+ () => typeof r.gap == "number" ? `${r.gap}px` : String(r.gap)
193
262
  );
194
- function d(r) {
195
- return r == null || r === "" ? "" : typeof r == "number" ? `${r}px` : String(r);
196
- }
197
- function v(r) {
198
- if (!r || r <= 0) return "none";
199
- const l = 4 * r;
200
- return `0 ${Math.round(l / 2)}px ${l}px rgba(0,0,0,0.06), 0 ${Math.round(
201
- l / 4
202
- )}px ${Math.round(l / 2)}px rgba(0,0,0,0.04)`;
203
- }
204
- return (r, l) => (u(), m("div", {
205
- class: V(["rc-card", [{ "rc-card--bordered": e.bordered }]]),
206
- style: A(s.value)
263
+ function k(d) {
264
+ return d == null || d === "" ? "" : typeof d == "number" ? `${d}px` : String(d);
265
+ }
266
+ function v(d) {
267
+ if (!d || d <= 0) return "none";
268
+ const o = 4 * d;
269
+ return `0 ${Math.round(o / 2)}px ${o}px rgba(0,0,0,0.06), 0 ${Math.round(
270
+ o / 4
271
+ )}px ${Math.round(o / 2)}px rgba(0,0,0,0.04)`;
272
+ }
273
+ return (d, o) => (s(), f("div", {
274
+ class: j(["rc-card", [{ "rc-card--bordered": e.bordered }]]),
275
+ style: le(m.value)
207
276
  }, [
208
- r.$slots.title || e.title || r.$slots.status || e.status ? (u(), m("div", {
277
+ d.$slots.title || e.title || d.$slots.status || e.status ? (s(), f("div", {
209
278
  key: 0,
210
279
  class: "rc-card__top",
211
- style: A({ backgroundColor: e.topBgColor || "rgba(29, 133, 252, 0.05)" })
280
+ style: le({ backgroundColor: e.topBgColor || "rgba(29, 133, 252, 0.05)" })
212
281
  }, [
213
- k("div", qe, [
214
- w(r.$slots, "title", {}, () => [
215
- k("span", He, C(e.title), 1)
282
+ C("div", Jt, [
283
+ q(d.$slots, "title", {}, () => [
284
+ C("span", Qt, P(e.title), 1)
216
285
  ], !0)
217
286
  ]),
218
- r.$slots.status || e.status ? (u(), m("div", Ke, [
219
- w(r.$slots, "status", {}, () => [
220
- k("span", {
287
+ d.$slots.status || e.status ? (s(), f("div", Xt, [
288
+ q(d.$slots, "status", {}, () => [
289
+ C("span", {
221
290
  class: "rc-card__status-text",
222
- style: A({ color: e.statusColor || "var(--rc-primary)" })
223
- }, C(e.status), 5)
291
+ style: le({ color: e.statusColor || "var(--rc-primary)" })
292
+ }, P(e.status), 5)
224
293
  ], !0)
225
- ])) : $("", !0)
226
- ], 4)) : $("", !0),
227
- k("div", {
294
+ ])) : D("", !0)
295
+ ], 4)) : D("", !0),
296
+ C("div", {
228
297
  class: "rc-card__body",
229
- style: A({ padding: c.value, gap: f.value })
298
+ style: le({ padding: t.value, gap: g.value })
230
299
  }, [
231
- w(r.$slots, "content", {}, () => [
232
- w(r.$slots, "default", {}, void 0, !0)
300
+ q(d.$slots, "content", {}, () => [
301
+ q(d.$slots, "default", {}, void 0, !0)
233
302
  ], !0)
234
303
  ], 4),
235
- r.$slots.action ? (u(), m("div", Ye)) : $("", !0),
236
- r.$slots.action ? (u(), m("div", Je, [
237
- w(r.$slots, "action", {}, void 0, !0)
238
- ])) : $("", !0)
304
+ d.$slots.action ? (s(), f("div", Zt)) : D("", !0),
305
+ d.$slots.action ? (s(), f("div", en, [
306
+ q(d.$slots, "action", {}, void 0, !0)
307
+ ])) : D("", !0)
239
308
  ], 6));
240
309
  }
241
- }), ee = /* @__PURE__ */ W(Qe, [["__scopeId", "data-v-a7b95214"]]);
242
- ee.name = "rc-card";
243
- const Xe = "RcCard";
244
- function ve(e) {
245
- return e.component(ee.name, ee), e.component(Xe, ee), e;
310
+ }), Ze = /* @__PURE__ */ se(tn, [["__scopeId", "data-v-a7b95214"]]);
311
+ Ze.name = "rc-card";
312
+ const nn = "RcCard";
313
+ function yt(e) {
314
+ return e.component(Ze.name, Ze), e.component(nn, Ze), e;
246
315
  }
247
- const Ze = {
316
+ const an = {
248
317
  key: 0,
249
318
  class: "rc-toast__mask"
250
- }, et = { class: "rc-toast__content" }, tt = {
319
+ }, ln = { class: "rc-toast__content" }, on = {
251
320
  key: 0,
252
321
  class: "rc-toast__spinner"
253
- }, nt = {
322
+ }, rn = {
254
323
  key: 1,
255
324
  class: "rc-toast__icon rc-toast__icon--success"
256
- }, at = {
325
+ }, sn = {
257
326
  key: 2,
258
327
  class: "rc-toast__icon rc-toast__icon--fail"
259
- }, st = { class: "rc-toast__text" }, lt = /* @__PURE__ */ B({
328
+ }, un = { class: "rc-toast__text" }, cn = /* @__PURE__ */ re({
260
329
  __name: "index",
261
330
  props: {
262
331
  message: { default: "" },
@@ -265,479 +334,2088 @@ const Ze = {
265
334
  mask: { type: Boolean, default: !1 },
266
335
  onAfterLeave: {}
267
336
  },
268
- setup(e, { expose: t }) {
269
- const s = e, c = I(!0);
270
- let f;
271
- function d() {
272
- f && (clearTimeout(f), f = null);
337
+ setup(e, { expose: r }) {
338
+ const m = e, t = E(!0);
339
+ let g;
340
+ function k() {
341
+ g && (clearTimeout(g), g = null);
273
342
  }
274
343
  function v() {
275
- d(), c.value = !1;
344
+ k(), t.value = !1;
276
345
  }
277
- return t({ close: v }), be(() => {
278
- s.duration && s.duration > 0 && (f = setTimeout(() => {
346
+ return r({ close: v }), nt(() => {
347
+ m.duration && m.duration > 0 && (g = setTimeout(() => {
279
348
  v();
280
- }, s.duration));
281
- }), ke(() => {
282
- d();
283
- }), (r, l) => (u(), m(O, null, [
284
- (u(), te(Ne, { to: "body" }, [
285
- E(le, {
349
+ }, m.duration));
350
+ }), at(() => {
351
+ k();
352
+ }), (d, o) => (s(), f(oe, null, [
353
+ (s(), te(it, { to: "body" }, [
354
+ G(Ee, {
286
355
  name: "rc-toast-fade",
287
356
  onAfterLeave: e.onAfterLeave
288
357
  }, {
289
- default: G(() => [
290
- c.value ? (u(), m("div", {
358
+ default: ae(() => [
359
+ t.value ? (s(), f("div", {
291
360
  key: 0,
292
- class: V(["rc-toast", [`rc-toast--${e.type}`]])
361
+ class: j(["rc-toast", [`rc-toast--${e.type}`]])
293
362
  }, [
294
- e.mask ? (u(), m("div", Ze)) : $("", !0),
295
- k("div", et, [
296
- e.type === "loading" ? (u(), m("div", tt)) : e.type === "success" ? (u(), m("div", nt)) : e.type === "fail" ? (u(), m("div", at)) : $("", !0),
297
- k("div", st, C(e.message), 1)
363
+ e.mask ? (s(), f("div", an)) : D("", !0),
364
+ C("div", ln, [
365
+ e.type === "loading" ? (s(), f("div", on)) : e.type === "success" ? (s(), f("div", rn)) : e.type === "fail" ? (s(), f("div", sn)) : D("", !0),
366
+ C("div", un, P(e.message), 1)
298
367
  ])
299
- ], 2)) : $("", !0)
368
+ ], 2)) : D("", !0)
300
369
  ]),
301
370
  _: 1
302
371
  }, 8, ["onAfterLeave"])
303
372
  ])),
304
- w(r.$slots, "default", {}, void 0, !0)
373
+ q(d.$slots, "default", {}, void 0, !0)
305
374
  ], 64));
306
375
  }
307
- }), ne = /* @__PURE__ */ W(lt, [["__scopeId", "data-v-d234c9c5"]]);
308
- let z = null, j = null;
309
- function me() {
310
- z && (z.unmount(), z = null), j && (document.body.removeChild(j), j = null);
376
+ }), et = /* @__PURE__ */ se(cn, [["__scopeId", "data-v-d234c9c5"]]);
377
+ let Te = null, Ye = null;
378
+ function ht() {
379
+ Te && (Te.unmount(), Te = null), Ye && (document.body.removeChild(Ye), Ye = null);
311
380
  }
312
- function Lt(e) {
313
- const t = typeof e == "string" ? { message: e } : e || {};
314
- me(), j = document.createElement("div"), document.body.appendChild(j);
315
- const s = {
316
- message: t.message,
317
- type: t.type ?? "text",
318
- duration: t.duration ?? 2e3,
319
- mask: t.mask ?? !1,
381
+ function Pa(e) {
382
+ const r = typeof e == "string" ? { message: e } : e || {};
383
+ ht(), Ye = document.createElement("div"), document.body.appendChild(Ye);
384
+ const m = {
385
+ message: r.message,
386
+ type: r.type ?? "text",
387
+ duration: r.duration ?? 2e3,
388
+ mask: r.mask ?? !1,
320
389
  onAfterLeave: () => {
321
- var c;
322
- me(), (c = t.onClose) == null || c.call(t);
390
+ var t;
391
+ ht(), (t = r.onClose) == null || t.call(r);
323
392
  }
324
393
  };
325
- return z = Be(ne, s), z.mount(j), {
326
- close: rt
394
+ return Te = Bt(et, m), Te.mount(Ye), {
395
+ close: dn
327
396
  };
328
397
  }
329
- function rt() {
330
- var e, t, s;
331
- z && ((s = (t = (e = z._instance) == null ? void 0 : e.exposed) == null ? void 0 : t.close) == null || s.call(t));
398
+ function dn() {
399
+ var e, r, m;
400
+ Te && ((m = (r = (e = Te._instance) == null ? void 0 : e.exposed) == null ? void 0 : r.close) == null || m.call(r));
332
401
  }
333
- ne.name = "rc-toast";
334
- function pe(e) {
335
- return e.component(ne.name, ne), e;
402
+ et.name = "rc-toast";
403
+ function gt(e) {
404
+ return e.component(et.name, et), e;
336
405
  }
337
- const ot = {
406
+ const fn = {
338
407
  class: "rc-message",
339
408
  role: "alert",
340
409
  "aria-live": "polite"
341
- }, ct = { class: "rc-message__content" }, it = /* @__PURE__ */ B({
410
+ }, vn = { class: "rc-message__content" }, mn = /* @__PURE__ */ re({
342
411
  __name: "index",
343
- setup(e, { expose: t }) {
344
- const s = We([]);
345
- let c = 1;
346
- function f(v) {
347
- const r = s.findIndex((l) => l.id === v);
348
- r >= 0 && s.splice(r, 1);
349
- }
350
- function d(v, r, l) {
351
- const o = c++;
352
- return s.push({ id: o, type: v, content: r, duration: l }), l > 0 && window.setTimeout(() => f(o), l), o;
353
- }
354
- return t({ add: d, remove: f }), (v, r) => (u(), m("div", ot, [
355
- E(Te, {
412
+ setup(e, { expose: r }) {
413
+ const m = At([]);
414
+ let t = 1;
415
+ function g(v) {
416
+ const d = m.findIndex((o) => o.id === v);
417
+ d >= 0 && m.splice(d, 1);
418
+ }
419
+ function k(v, d, o) {
420
+ const p = t++;
421
+ return m.push({ id: p, type: v, content: d, duration: o }), o > 0 && window.setTimeout(() => g(p), o), p;
422
+ }
423
+ return r({ add: k, remove: g }), (v, d) => (s(), f("div", fn, [
424
+ G(Ft, {
356
425
  name: "rc-message-fade",
357
426
  tag: "div"
358
427
  }, {
359
- default: G(() => [
360
- (u(!0), m(O, null, K(s, (l) => (u(), m("div", {
361
- key: l.id,
362
- class: V(["rc-message__item", `rc-message--${l.type}`])
428
+ default: ae(() => [
429
+ (s(!0), f(oe, null, fe(m, (o) => (s(), f("div", {
430
+ key: o.id,
431
+ class: j(["rc-message__item", `rc-message--${o.type}`])
363
432
  }, [
364
- k("span", ct, C(l.content), 1)
433
+ C("span", vn, P(o.content), 1)
365
434
  ], 2))), 128))
366
435
  ]),
367
436
  _: 1
368
437
  })
369
438
  ]));
370
439
  }
371
- }), ut = /* @__PURE__ */ W(it, [["__scopeId", "data-v-87811df0"]]);
372
- let N = null, L = null;
373
- function dt() {
374
- var t;
375
- if (N && L) return;
376
- N = document.createElement("div"), document.body.appendChild(N);
377
- const e = E(ut, {});
378
- $e(e, N), L = (t = e.component) == null ? void 0 : t.exposed;
440
+ }), pn = /* @__PURE__ */ se(mn, [["__scopeId", "data-v-87811df0"]]);
441
+ let Re = null, Me = null;
442
+ function yn() {
443
+ var r;
444
+ if (Re && Me) return;
445
+ Re = document.createElement("div"), document.body.appendChild(Re);
446
+ const e = G(pn, {});
447
+ It(e, Re), Me = (r = e.component) == null ? void 0 : r.exposed;
379
448
  }
380
- function F(e, t, s) {
381
- var f;
382
- dt();
383
- const c = typeof s == "number" ? s : e === "loading" ? 0 : 2e3;
384
- return (f = L == null ? void 0 : L.add) == null ? void 0 : f.call(L, e, t, c);
449
+ function Ae(e, r, m) {
450
+ var g;
451
+ yn();
452
+ const t = typeof m == "number" ? m : e === "loading" ? 0 : 2e3;
453
+ return (g = Me == null ? void 0 : Me.add) == null ? void 0 : g.call(Me, e, r, t);
385
454
  }
386
- const ft = {
455
+ const hn = {
387
456
  open(e) {
388
- return F(e.type || "info", e.content, e.duration);
457
+ return Ae(e.type || "info", e.content, e.duration);
389
458
  },
390
- info(e, t) {
391
- return F("info", e, t);
459
+ info(e, r) {
460
+ return Ae("info", e, r);
392
461
  },
393
- success(e, t) {
394
- return F("success", e, t);
462
+ success(e, r) {
463
+ return Ae("success", e, r);
395
464
  },
396
- warning(e, t) {
397
- return F("warning", e, t);
465
+ warning(e, r) {
466
+ return Ae("warning", e, r);
398
467
  },
399
- error(e, t) {
400
- return F("error", e, t);
468
+ error(e, r) {
469
+ return Ae("error", e, r);
401
470
  },
402
- loading(e, t) {
403
- return F("loading", e, t);
471
+ loading(e, r) {
472
+ return Ae("loading", e, r);
404
473
  },
405
474
  destroy() {
406
- N && ($e(null, N), N.remove(), N = null, L = null);
475
+ Re && (It(null, Re), Re.remove(), Re = null, Me = null);
407
476
  }
408
477
  };
409
- function ye(e) {
410
- return e.config.globalProperties.$message = ft, e;
478
+ function kt(e) {
479
+ return e.config.globalProperties.$message = hn, e;
411
480
  }
412
- const vt = {
413
- key: 0,
414
- class: "rc-icon__unicode"
415
- }, mt = /* @__PURE__ */ B({
416
- name: "rc-icon",
481
+ Z.name = "rc-icon";
482
+ function bt(e) {
483
+ return e.component(Z.name, Z), e.component("RcIcon", Z), e;
484
+ }
485
+ const gn = { class: "rc-popup__content" }, kn = /* @__PURE__ */ re({
486
+ name: "rc-popup",
417
487
  __name: "index",
418
488
  props: {
419
- name: {},
420
- size: { default: 16 },
421
- color: { default: "" },
422
- spin: { type: Boolean, default: !1 },
423
- code: { default: "" }
489
+ modelValue: { type: Boolean, default: !1 },
490
+ position: { default: "center" },
491
+ overlay: { type: Boolean, default: !0 },
492
+ overlayClass: { default: "" },
493
+ overlayStyle: { default: void 0 },
494
+ closeable: { type: Boolean, default: !1 },
495
+ closeIconPosition: { default: "top-right" },
496
+ closeIcon: { default: "icon_close" },
497
+ round: { type: Boolean, default: !1 },
498
+ popupStyle: { default: void 0 },
499
+ closeOnClickOverlay: { type: Boolean, default: !0 },
500
+ lockScroll: { type: Boolean, default: !0 }
424
501
  },
425
- setup(e) {
426
- const t = e, s = T(re, {}), c = g(() => (s == null ? void 0 : s.iconClass) || "iconfont"), f = g(() => t.name || ""), d = g(() => typeof t.size == "number" ? `${t.size}px` : t.size || "16px"), v = g(() => ({
427
- fontSize: d.value,
428
- color: t.color || void 0,
429
- lineHeight: 1,
430
- fontFamily: (s == null ? void 0 : s.iconClass) || "iconfont"
431
- })), r = g(() => {
432
- const l = t.code;
433
- if (l == null || l === "" || l === 0) return "";
434
- if (typeof l == "number")
435
- return String.fromCharCode(l);
436
- const o = String(l).replace(/^0x/i, ""), b = parseInt(o, 16);
437
- return Number.isNaN(b) ? "" : String.fromCharCode(b);
502
+ emits: ["update:modelValue", "open", "close", "click-overlay"],
503
+ setup(e, { expose: r, emit: m }) {
504
+ const t = e, g = m, k = E(), v = E(t.modelValue);
505
+ Se(
506
+ () => t.modelValue,
507
+ (u) => {
508
+ v.value = u, u ? (g("open"), t.lockScroll && B()) : (g("close"), t.lockScroll && x());
509
+ },
510
+ { immediate: !0 }
511
+ ), Se(v, (u) => {
512
+ u !== t.modelValue && g("update:modelValue", u);
438
513
  });
439
- return be(() => {
440
- if (typeof window > "u") return;
441
- const l = s && s.iconCssUrl || Ce.iconCssUrl;
442
- if (!l) return;
443
- const o = `link[rel="stylesheet"][data-rcui-icon="true"][href="${l}"]`;
444
- if (!document.head.querySelector(o)) {
445
- const y = document.createElement("link");
446
- y.rel = "stylesheet", y.href = l, y.setAttribute("data-rcui-icon", "true"), document.head.appendChild(y);
447
- }
448
- }), (l, o) => (u(), m("i", {
449
- class: V(["rc-icon", [c.value, f.value, { "rc-icon--spin": e.spin }]]),
450
- style: A(v.value),
451
- "aria-hidden": "true"
452
- }, [
453
- r.value ? (u(), m("span", vt, C(r.value), 1)) : $("", !0)
454
- ], 6));
514
+ const d = R(() => `rc-popup-slide-${t.position}`), o = R(() => ({ ...t.popupStyle || {} }));
515
+ let p = !1;
516
+ function B() {
517
+ p || (p = !0, document.body.style.overflow = "hidden");
518
+ }
519
+ function x() {
520
+ p && (p = !1, document.body.style.overflow = "");
521
+ }
522
+ function _() {
523
+ g("click-overlay"), t.closeOnClickOverlay && A();
524
+ }
525
+ function V() {
526
+ A();
527
+ }
528
+ function A() {
529
+ v.value = !1;
530
+ }
531
+ function I() {
532
+ v.value = !0;
533
+ }
534
+ return at(() => {
535
+ x();
536
+ }), r({
537
+ open: I,
538
+ close: A,
539
+ visible: v
540
+ }), (u, ve) => (s(), te(it, { to: "body" }, [
541
+ G(Ee, { name: "rc-popup-fade" }, {
542
+ default: ae(() => [
543
+ v.value && t.overlay ? (s(), f("div", {
544
+ key: 0,
545
+ class: j(["rc-popup__overlay", { "rc-popup__overlay--transparent": t.overlayClass === "transparent" }]),
546
+ style: le(t.overlayStyle),
547
+ onClick: _
548
+ }, null, 6)) : D("", !0)
549
+ ]),
550
+ _: 1
551
+ }),
552
+ G(Ee, { name: d.value }, {
553
+ default: ae(() => [
554
+ v.value ? (s(), f("div", {
555
+ key: 0,
556
+ ref_key: "popupRef",
557
+ ref: k,
558
+ class: j(["rc-popup", [
559
+ `rc-popup--${e.position}`,
560
+ { "rc-popup--round": e.round }
561
+ ]]),
562
+ style: le(o.value),
563
+ onClick: ve[0] || (ve[0] = Fe(() => {
564
+ }, ["stop"]))
565
+ }, [
566
+ e.closeable ? (s(), f("div", {
567
+ key: 0,
568
+ class: j(["rc-popup__close", `rc-popup__close--${e.closeIconPosition}`]),
569
+ onClick: V
570
+ }, [
571
+ G(Z, {
572
+ name: e.closeIcon,
573
+ class: "rc-popup__close-icon"
574
+ }, null, 8, ["name"])
575
+ ], 2)) : D("", !0),
576
+ C("div", gn, [
577
+ q(u.$slots, "default", {}, void 0, !0)
578
+ ])
579
+ ], 6)) : D("", !0)
580
+ ]),
581
+ _: 3
582
+ }, 8, ["name"])
583
+ ]));
455
584
  }
456
- }), M = /* @__PURE__ */ W(mt, [["__scopeId", "data-v-3857a892"]]);
457
- M.name = "rc-icon";
458
- function he(e) {
459
- return e.component(M.name, M), e.component("RcIcon", M), e;
585
+ }), We = /* @__PURE__ */ se(kn, [["__scopeId", "data-v-f1696784"]]);
586
+ We.name = "rc-popup";
587
+ const bn = "RcPopup";
588
+ function _t(e) {
589
+ return e.component(We.name, We), e.component(bn, We), e;
460
590
  }
461
- const pt = { class: "rc-search-area" }, yt = { class: "rc-search-area__bar" }, ht = ["onClick"], _t = { class: "rc-search-area__item-label" }, gt = { class: "rc-search-area__panel-content" }, bt = {
591
+ const _n = {
462
592
  key: 0,
463
- class: "rc-search-area__options-grid"
464
- }, kt = ["onClick"], $t = { class: "rc-search-area__option-label" }, Ct = {
593
+ class: "rc-calendar__header"
594
+ }, wn = { class: "rc-calendar__header-title" }, $n = {
465
595
  key: 1,
466
- class: "rc-search-area__options-grid"
467
- }, xt = ["onClick"], St = { class: "rc-search-area__option-label" }, wt = {
596
+ class: "rc-calendar__shortcuts"
597
+ }, xn = { class: "rc-calendar__shortcuts-scroll" }, Dn = ["onClick"], Cn = { class: "rc-calendar__month-title" }, Sn = { class: "rc-calendar__weekdays" }, In = { class: "rc-calendar__days" }, Mn = ["onClick"], Rn = { class: "rc-calendar__day-content" }, Vn = { class: "rc-calendar__day-text" }, Tn = {
598
+ key: 0,
599
+ class: "rc-calendar__day-bottom"
600
+ }, En = {
468
601
  key: 2,
602
+ class: "rc-calendar__footer"
603
+ }, Bn = {
604
+ key: 0,
605
+ class: "rc-calendar__month-picker-overlay"
606
+ }, An = { class: "rc-calendar__month-picker" }, Fn = { class: "rc-calendar__month-picker-header" }, zn = { class: "rc-calendar__month-picker-title" }, Yn = { key: 0 }, Ln = {
607
+ key: 0,
608
+ class: "rc-calendar__year-picker-content"
609
+ }, Pn = { class: "rc-calendar__year-picker-grid" }, Nn = ["onClick"], Wn = {
610
+ key: 1,
611
+ class: "rc-calendar__month-picker-content"
612
+ }, Hn = ["onClick"], Xe = 48, de = 3, ot = 7, On = /* @__PURE__ */ re({
613
+ __name: "panel-content",
614
+ props: {
615
+ showTitle: { type: Boolean },
616
+ title: {},
617
+ range: { type: Boolean },
618
+ selectedDate: {},
619
+ rangeStart: {},
620
+ rangeEnd: {},
621
+ minDate: {},
622
+ maxDate: {},
623
+ disabledDate: { type: Function },
624
+ formatter: { type: Function },
625
+ showFooter: { type: Boolean },
626
+ maxRangeDays: {}
627
+ },
628
+ emits: ["select-day", "clear", "confirm", "shortcut-select"],
629
+ setup(e, { expose: r, emit: m }) {
630
+ const t = e, g = m, k = ["日", "一", "二", "三", "四", "五", "六"];
631
+ function v(a) {
632
+ if (!a) return null;
633
+ const i = new Date(a);
634
+ return isNaN(i.getTime()) ? null : i;
635
+ }
636
+ function d(a) {
637
+ const i = a.getFullYear(), y = String(a.getMonth() + 1).padStart(2, "0"), z = String(a.getDate()).padStart(2, "0");
638
+ return `${i}-${y}-${z}`;
639
+ }
640
+ const o = E(/* @__PURE__ */ new Date());
641
+ Se(
642
+ () => [t.selectedDate, t.rangeStart],
643
+ () => {
644
+ if (t.range && t.rangeStart) {
645
+ const a = v(t.rangeStart);
646
+ a && (o.value = a);
647
+ } else if (!t.range && t.selectedDate) {
648
+ const a = v(t.selectedDate);
649
+ a && (o.value = a);
650
+ }
651
+ },
652
+ { immediate: !0 }
653
+ );
654
+ function p(a) {
655
+ const i = /* @__PURE__ */ new Date();
656
+ return a.getFullYear() === i.getFullYear() && a.getMonth() === i.getMonth() && a.getDate() === i.getDate();
657
+ }
658
+ function B(a) {
659
+ if (!t.rangeStart || !t.rangeEnd) return !1;
660
+ const i = d(a), y = t.rangeStart, z = t.rangeEnd;
661
+ return i > y && i < z;
662
+ }
663
+ function x(a) {
664
+ if (t.disabledDate && t.disabledDate(a))
665
+ return !0;
666
+ const i = d(a);
667
+ return !!(t.minDate && i < t.minDate || t.maxDate && i > t.maxDate);
668
+ }
669
+ function _(a, i) {
670
+ const y = new Date(a, i, 1), z = new Date(a, i + 1, 0), W = y.getDay(), ke = z.getDate(), be = [], dt = new Date(a, i, 0).getDate();
671
+ for (let ue = W - 1; ue >= 0; ue--) {
672
+ const ie = {
673
+ date: new Date(a, i - 1, dt - ue),
674
+ type: "prev-month",
675
+ text: String(dt - ue)
676
+ };
677
+ if (t.formatter) {
678
+ const ce = t.formatter(ie);
679
+ ce.text && (ie.text = ce.text), ce.bottomInfo && (ie.bottomInfo = ce.bottomInfo);
680
+ }
681
+ be.push(ie);
682
+ }
683
+ for (let ue = 1; ue <= ke; ue++) {
684
+ const ie = {
685
+ date: new Date(a, i, ue),
686
+ type: "current-month",
687
+ text: String(ue)
688
+ };
689
+ if (t.formatter) {
690
+ const ce = t.formatter(ie);
691
+ ce.text && (ie.text = ce.text), ce.bottomInfo && (ie.bottomInfo = ce.bottomInfo);
692
+ }
693
+ be.push(ie);
694
+ }
695
+ const Tt = 42 - be.length;
696
+ for (let ue = 1; ue <= Tt; ue++) {
697
+ const ie = {
698
+ date: new Date(a, i + 1, ue),
699
+ type: "next-month",
700
+ text: String(ue)
701
+ };
702
+ if (t.formatter) {
703
+ const ce = t.formatter(ie);
704
+ ce.text && (ie.text = ce.text), ce.bottomInfo && (ie.bottomInfo = ce.bottomInfo);
705
+ }
706
+ be.push(ie);
707
+ }
708
+ return be;
709
+ }
710
+ const V = R(() => {
711
+ const a = o.value.getFullYear(), i = o.value.getMonth();
712
+ return _(a, i);
713
+ }), A = R(() => {
714
+ const a = o.value.getFullYear(), i = o.value.getMonth() + 1;
715
+ return `${a}年${i}月`;
716
+ });
717
+ function I(a) {
718
+ const i = [];
719
+ if (a.type !== "current-month" && i.push("is-other-month"), p(a.date) && i.push("is-today"), x(a.date))
720
+ return i.push("is-disabled"), i;
721
+ const y = d(a.date);
722
+ return t.range ? (t.rangeStart === y && i.push("is-start"), t.rangeEnd === y && i.push("is-end"), B(a.date) && i.push("is-in-range")) : t.selectedDate === y && i.push("is-selected"), i;
723
+ }
724
+ const u = R(() => !!(t.rangeStart && t.rangeEnd)), ve = R(() => t.rangeStart && t.rangeEnd ? 2 : t.rangeStart || t.rangeEnd ? 1 : 0);
725
+ function ye(a) {
726
+ if (!t.minDate && !t.maxDate)
727
+ return !1;
728
+ const i = t.minDate ? v(t.minDate) : null, y = t.maxDate ? v(t.maxDate) : null;
729
+ return !!(i && a < i.getFullYear() || y && a > y.getFullYear());
730
+ }
731
+ function he(a, i) {
732
+ const y = t.minDate ? v(t.minDate) : null, z = t.maxDate ? v(t.maxDate) : null;
733
+ if (y) {
734
+ const W = y.getFullYear(), ke = y.getMonth() + 1;
735
+ if (a < W || a === W && i < ke)
736
+ return !0;
737
+ }
738
+ if (z) {
739
+ const W = z.getFullYear(), ke = z.getMonth() + 1;
740
+ if (a > W || a === W && i > ke)
741
+ return !0;
742
+ }
743
+ return !1;
744
+ }
745
+ const H = E(!1), N = E("year"), O = E(o.value.getFullYear()), F = E(o.value.getMonth() + 1), U = E(), S = E(1900), T = E(1920), M = E(1900), Y = E(2100), me = R(() => {
746
+ const a = [], y = Math.floor((S.value - M.value) / de) - 3, z = Math.ceil((T.value - M.value) / de) + 3, W = M.value + Math.max(0, y) * de, ke = M.value + z * de - 1;
747
+ for (let be = W; be <= ke; be++)
748
+ a.push(be);
749
+ return a;
750
+ });
751
+ Se(() => o.value, (a) => {
752
+ O.value = a.getFullYear(), F.value = a.getMonth() + 1;
753
+ }, { immediate: !0 });
754
+ function ge() {
755
+ if (!U.value) return;
756
+ const a = U.value.scrollTop, y = Math.max(0, Math.floor(a / Xe)), z = M.value + y * de, W = z + ot * de - 1;
757
+ z < M.value ? M.value = z - 100 : W > Y.value && (Y.value = W + 100), (z !== S.value || W !== T.value) && (S.value = z, T.value = W);
758
+ }
759
+ function we() {
760
+ O.value = o.value.getFullYear(), F.value = o.value.getMonth() + 1, N.value = "year", H.value = !0;
761
+ const a = O.value;
762
+ a < M.value ? M.value = Math.floor(a / 100) * 100 : a > Y.value && (Y.value = Math.ceil(a / 100) * 100 + 99), Be(() => {
763
+ if (U.value) {
764
+ const i = Math.floor((a - M.value) / de), y = Math.max(0, i - 2);
765
+ S.value = M.value + y * de, T.value = S.value + ot * de - 1, $e(a);
766
+ }
767
+ });
768
+ }
769
+ function $e(a) {
770
+ if (!U.value) return;
771
+ a < M.value ? M.value = Math.floor(a / 100) * 100 : a > Y.value && (Y.value = Math.ceil(a / 100) * 100 + 99);
772
+ const i = Math.floor((a - M.value) / de), y = i * Xe;
773
+ U.value.scrollTop = y;
774
+ const z = Math.max(0, i - 2);
775
+ S.value = M.value + z * de, T.value = S.value + ot * de - 1;
776
+ }
777
+ function b() {
778
+ const a = new Date(o.value);
779
+ a.setMonth(a.getMonth() - 1), o.value = a;
780
+ }
781
+ function w() {
782
+ const a = new Date(o.value);
783
+ a.setMonth(a.getMonth() + 1), o.value = a;
784
+ }
785
+ function L(a) {
786
+ ye(a) || (O.value = a, N.value = "month");
787
+ }
788
+ function ee(a) {
789
+ he(O.value, a) || (F.value = a, h());
790
+ }
791
+ function h() {
792
+ const a = new Date(o.value);
793
+ a.setFullYear(O.value), a.setMonth(F.value - 1), o.value = a, H.value = !1, N.value = "year";
794
+ }
795
+ function X(a) {
796
+ g("select-day", a);
797
+ }
798
+ function ne() {
799
+ g("clear");
800
+ }
801
+ function n() {
802
+ pe.value && ne();
803
+ }
804
+ function l() {
805
+ g("confirm");
806
+ }
807
+ function c() {
808
+ H.value = !1;
809
+ }
810
+ function $(a) {
811
+ N.value = a;
812
+ }
813
+ function J() {
814
+ const i = (/* @__PURE__ */ new Date()).getFullYear();
815
+ ye(i) || (O.value = i, N.value = "month");
816
+ }
817
+ function K() {
818
+ const i = (/* @__PURE__ */ new Date()).getMonth() + 1;
819
+ he(O.value, i) || (F.value = i, h());
820
+ }
821
+ const pe = R(() => t.range ? !!(t.rangeStart || t.rangeEnd) : !!t.selectedDate);
822
+ function Ie(a, i) {
823
+ const y = v(a), z = v(i);
824
+ if (!y || !z) return 0;
825
+ const W = Math.abs(z.getTime() - y.getTime());
826
+ return Math.ceil(W / (1e3 * 60 * 60 * 24)) + 1;
827
+ }
828
+ function De() {
829
+ return d(/* @__PURE__ */ new Date());
830
+ }
831
+ function Le() {
832
+ const a = /* @__PURE__ */ new Date(), i = a.getDay(), y = a.getDate() - i + (i === 0 ? -6 : 1);
833
+ return new Date(a.getFullYear(), a.getMonth(), y);
834
+ }
835
+ function Oe() {
836
+ const a = Le(), i = new Date(a);
837
+ return i.setDate(a.getDate() + 6), i;
838
+ }
839
+ function Ue() {
840
+ const a = /* @__PURE__ */ new Date();
841
+ return new Date(a.getFullYear(), a.getMonth(), 1);
842
+ }
843
+ function Pe() {
844
+ const a = /* @__PURE__ */ new Date();
845
+ return new Date(a.getFullYear(), a.getMonth() + 1, 0);
846
+ }
847
+ function Ke() {
848
+ const a = /* @__PURE__ */ new Date();
849
+ return new Date(a.getFullYear(), a.getMonth() - 2, 1);
850
+ }
851
+ function je() {
852
+ const a = /* @__PURE__ */ new Date();
853
+ return new Date(a.getFullYear(), 0, 1);
854
+ }
855
+ function Ge() {
856
+ const a = /* @__PURE__ */ new Date();
857
+ return new Date(a.getFullYear(), 11, 31);
858
+ }
859
+ const qe = [
860
+ {
861
+ key: "today",
862
+ label: "本日",
863
+ days: 1,
864
+ getRange: () => {
865
+ const a = De();
866
+ return [a, a];
867
+ }
868
+ },
869
+ {
870
+ key: "week",
871
+ label: "本周",
872
+ days: 7,
873
+ getRange: () => {
874
+ const a = d(Le()), i = d(Oe());
875
+ return [a, i];
876
+ }
877
+ },
878
+ {
879
+ key: "month",
880
+ label: "本月",
881
+ getRange: () => {
882
+ const a = d(Ue()), i = d(Pe());
883
+ return [a, i];
884
+ }
885
+ },
886
+ {
887
+ key: "threeMonths",
888
+ label: "近三月",
889
+ getRange: () => {
890
+ const a = d(Ke()), i = d(Pe());
891
+ return [a, i];
892
+ }
893
+ },
894
+ {
895
+ key: "year",
896
+ label: "本年",
897
+ getRange: () => {
898
+ const a = d(je()), i = d(Ge());
899
+ return [a, i];
900
+ }
901
+ },
902
+ {
903
+ key: "last7Days",
904
+ label: "近7天",
905
+ days: 7,
906
+ getRange: () => {
907
+ const a = /* @__PURE__ */ new Date(), i = new Date(a);
908
+ return i.setDate(a.getDate() - 6), [d(i), De()];
909
+ }
910
+ },
911
+ {
912
+ key: "last30Days",
913
+ label: "近30天",
914
+ days: 30,
915
+ getRange: () => {
916
+ const a = /* @__PURE__ */ new Date(), i = new Date(a);
917
+ return i.setDate(a.getDate() - 29), [d(i), De()];
918
+ }
919
+ }
920
+ ], Je = R(() => qe.filter((a) => {
921
+ if (t.maxRangeDays !== void 0) {
922
+ if (a.days !== void 0)
923
+ return a.days <= t.maxRangeDays;
924
+ {
925
+ const i = a.getRange();
926
+ if (i)
927
+ return Ie(i[0], i[1]) <= t.maxRangeDays;
928
+ }
929
+ }
930
+ return !0;
931
+ }));
932
+ function Qe(a) {
933
+ const i = a.getRange();
934
+ if (i) {
935
+ if (t.minDate && i[0] < t.minDate || t.maxDate && i[1] > t.maxDate)
936
+ return;
937
+ g("shortcut-select", i);
938
+ }
939
+ }
940
+ return r({
941
+ yearScrollRef: U
942
+ }), (a, i) => (s(), f("div", null, [
943
+ e.showTitle ? (s(), f("div", _n, [
944
+ C("div", wn, P(e.title), 1),
945
+ C("span", {
946
+ class: j(["rc-calendar__header-clear", { "is-disabled": !pe.value }]),
947
+ onClick: n
948
+ }, " 清空 ", 2)
949
+ ])) : D("", !0),
950
+ e.range ? (s(), f("div", $n, [
951
+ C("div", xn, [
952
+ (s(!0), f(oe, null, fe(Je.value, (y) => (s(), f("div", {
953
+ key: y.key,
954
+ class: "rc-calendar__shortcut-item",
955
+ onClick: (z) => Qe(y)
956
+ }, P(y.label), 9, Dn))), 128))
957
+ ])
958
+ ])) : D("", !0),
959
+ C("div", Cn, [
960
+ C("div", {
961
+ class: "rc-calendar__nav-button",
962
+ onClick: b
963
+ }, [
964
+ G(Q(Z), {
965
+ name: "icon_caret-left",
966
+ class: "rc-calendar__nav-icon"
967
+ })
968
+ ]),
969
+ C("div", {
970
+ class: "rc-calendar__month-text",
971
+ onClick: we
972
+ }, P(A.value), 1),
973
+ C("div", {
974
+ class: "rc-calendar__nav-button",
975
+ onClick: w
976
+ }, [
977
+ G(Q(Z), {
978
+ name: "icon_caret-right",
979
+ class: "rc-calendar__nav-icon"
980
+ })
981
+ ])
982
+ ]),
983
+ C("div", Sn, [
984
+ (s(), f(oe, null, fe(k, (y) => C("div", {
985
+ key: y,
986
+ class: "rc-calendar__weekday"
987
+ }, P(y), 1)), 64))
988
+ ]),
989
+ C("div", In, [
990
+ (s(!0), f(oe, null, fe(V.value, (y, z) => (s(), f("div", {
991
+ key: z,
992
+ class: j(["rc-calendar__day", I(y)]),
993
+ onClick: (W) => X(y)
994
+ }, [
995
+ C("div", Rn, [
996
+ C("span", Vn, P(y.text), 1),
997
+ y.bottomInfo ? (s(), f("span", Tn, P(y.bottomInfo), 1)) : D("", !0)
998
+ ])
999
+ ], 10, Mn))), 128))
1000
+ ]),
1001
+ e.range && e.showFooter ? (s(), f("div", En, [
1002
+ G(Q(xe), {
1003
+ type: "default",
1004
+ class: "rc-calendar__footer-reset",
1005
+ onClick: ne
1006
+ }, {
1007
+ default: ae(() => [...i[2] || (i[2] = [
1008
+ _e("取消", -1)
1009
+ ])]),
1010
+ _: 1
1011
+ }),
1012
+ G(Q(xe), {
1013
+ type: "primary",
1014
+ class: "rc-calendar__footer-confirm",
1015
+ disabled: !u.value,
1016
+ onClick: l
1017
+ }, {
1018
+ default: ae(() => [
1019
+ _e(P(u.value ? `确定(${ve.value}项)` : "确定"), 1)
1020
+ ]),
1021
+ _: 1
1022
+ }, 8, ["disabled"])
1023
+ ])) : D("", !0),
1024
+ G(Ee, { name: "rc-calendar-fade" }, {
1025
+ default: ae(() => [
1026
+ H.value ? (s(), f("div", Bn, [
1027
+ C("div", An, [
1028
+ C("div", Fn, [
1029
+ G(Q(xe), {
1030
+ type: "default",
1031
+ mode: "text",
1032
+ size: "small",
1033
+ onClick: c
1034
+ }, {
1035
+ default: ae(() => [...i[3] || (i[3] = [
1036
+ _e("取消", -1)
1037
+ ])]),
1038
+ _: 1
1039
+ }),
1040
+ C("div", zn, [
1041
+ C("span", {
1042
+ onClick: i[0] || (i[0] = (y) => $("year"))
1043
+ }, P(O.value) + "年", 1),
1044
+ N.value === "month" ? (s(), f("span", Yn, " - ")) : D("", !0),
1045
+ N.value === "month" ? (s(), f("span", {
1046
+ key: 1,
1047
+ onClick: i[1] || (i[1] = (y) => $("month"))
1048
+ }, P(F.value) + "月", 1)) : D("", !0)
1049
+ ]),
1050
+ N.value === "year" ? (s(), te(Q(xe), {
1051
+ key: 0,
1052
+ type: "primary",
1053
+ mode: "text",
1054
+ size: "small",
1055
+ onClick: J
1056
+ }, {
1057
+ default: ae(() => [...i[4] || (i[4] = [
1058
+ _e(" 本年 ", -1)
1059
+ ])]),
1060
+ _: 1
1061
+ })) : D("", !0),
1062
+ N.value === "month" ? (s(), te(Q(xe), {
1063
+ key: 1,
1064
+ type: "primary",
1065
+ mode: "text",
1066
+ size: "small",
1067
+ onClick: K
1068
+ }, {
1069
+ default: ae(() => [...i[5] || (i[5] = [
1070
+ _e(" 本月 ", -1)
1071
+ ])]),
1072
+ _: 1
1073
+ })) : D("", !0)
1074
+ ]),
1075
+ N.value === "year" ? (s(), f("div", Ln, [
1076
+ C("div", {
1077
+ class: "rc-calendar__year-picker-scroll",
1078
+ ref_key: "yearScrollRef",
1079
+ ref: U,
1080
+ onScroll: ge
1081
+ }, [
1082
+ C("div", {
1083
+ class: "rc-calendar__year-picker-spacer",
1084
+ style: le({ height: `${Math.floor((S.value - M.value) / de) * Xe}px` })
1085
+ }, null, 4),
1086
+ C("div", Pn, [
1087
+ (s(!0), f(oe, null, fe(me.value, (y) => (s(), f("div", {
1088
+ key: y,
1089
+ class: j(["rc-calendar__year-picker-item", {
1090
+ "is-selected": O.value === y,
1091
+ "is-disabled": ye(y)
1092
+ }]),
1093
+ onClick: (z) => L(y)
1094
+ }, P(y), 11, Nn))), 128))
1095
+ ]),
1096
+ C("div", {
1097
+ class: "rc-calendar__year-picker-spacer",
1098
+ style: le({ height: `${Math.ceil((Y.value - T.value) / de) * Xe}px` })
1099
+ }, null, 4)
1100
+ ], 544)
1101
+ ])) : D("", !0),
1102
+ N.value === "month" ? (s(), f("div", Wn, [
1103
+ (s(), f(oe, null, fe(12, (y) => C("div", {
1104
+ key: y,
1105
+ class: j(["rc-calendar__month-picker-item", {
1106
+ "is-selected": F.value === y,
1107
+ "is-disabled": he(O.value, y)
1108
+ }]),
1109
+ onClick: (z) => ee(y)
1110
+ }, P(y) + "月 ", 11, Hn)), 64))
1111
+ ])) : D("", !0)
1112
+ ])
1113
+ ])) : D("", !0)
1114
+ ]),
1115
+ _: 1
1116
+ })
1117
+ ]));
1118
+ }
1119
+ }), wt = /* @__PURE__ */ se(On, [["__scopeId", "data-v-0bf1834b"]]), Un = { class: "rc-calendar" }, Kn = ["placeholder"], jn = { class: "rc-calendar__input-actions" }, Gn = {
1120
+ key: 1,
1121
+ class: "rc-calendar__panel"
1122
+ }, qn = /* @__PURE__ */ re({
1123
+ name: "rc-calendar",
1124
+ __name: "index",
1125
+ props: {
1126
+ modelValue: { default: null },
1127
+ range: { type: [Boolean, Number], default: !1 },
1128
+ mode: { default: "default" },
1129
+ placeholder: { default: "请选择日期" },
1130
+ showTitle: { type: Boolean, default: !0 },
1131
+ title: { default: "选择日期" },
1132
+ minDate: { default: void 0 },
1133
+ maxDate: { default: void 0 },
1134
+ disabledDate: { type: Function, default: void 0 },
1135
+ formatter: { type: Function, default: void 0 },
1136
+ showFooter: { type: Boolean, default: !0 },
1137
+ endDateOffset: { type: Boolean, default: !1 }
1138
+ },
1139
+ emits: ["update:modelValue", "change", "confirm"],
1140
+ setup(e, { emit: r }) {
1141
+ const m = e, t = r, g = E(), k = E(), v = E(!1), d = E(""), o = R(() => m.range === !0 || typeof m.range == "number"), p = R(() => typeof m.range == "number" ? m.range : void 0), B = R(() => (b) => {
1142
+ if (m.disabledDate && m.disabledDate(b))
1143
+ return !0;
1144
+ if (p.value !== void 0 && _.value && !V.value) {
1145
+ const w = u(b);
1146
+ if (I(_.value) && ve(_.value, w) > p.value)
1147
+ return !0;
1148
+ }
1149
+ return !1;
1150
+ }), x = E(null), _ = E(null), V = E(null);
1151
+ Se(
1152
+ () => m.modelValue,
1153
+ (b) => {
1154
+ o.value ? Array.isArray(b) && b.length === 2 ? (_.value = b[0], V.value = N(b[1])) : (_.value = null, V.value = null) : x.value = typeof b == "string" ? b : null, A();
1155
+ },
1156
+ { immediate: !0 }
1157
+ );
1158
+ function A() {
1159
+ m.mode === "popup" && (o.value ? _.value && V.value ? d.value = `${_.value} ~ ${V.value}` : _.value ? d.value = `${_.value} ~ ` : d.value = "" : d.value = x.value || "");
1160
+ }
1161
+ function I(b) {
1162
+ if (!b) return null;
1163
+ const w = new Date(b);
1164
+ return isNaN(w.getTime()) ? null : w;
1165
+ }
1166
+ function u(b) {
1167
+ const w = b.getFullYear(), L = String(b.getMonth() + 1).padStart(2, "0"), ee = String(b.getDate()).padStart(2, "0");
1168
+ return `${w}-${L}-${ee}`;
1169
+ }
1170
+ function ve(b, w) {
1171
+ const L = I(b), ee = I(w);
1172
+ if (!L || !ee) return 0;
1173
+ const h = Math.abs(ee.getTime() - L.getTime());
1174
+ return Math.ceil(h / (1e3 * 60 * 60 * 24));
1175
+ }
1176
+ function ye(b) {
1177
+ const w = I(b);
1178
+ return w ? (w.setDate(w.getDate() + 1), u(w)) : b;
1179
+ }
1180
+ function he(b) {
1181
+ const w = I(b);
1182
+ return w ? (w.setDate(w.getDate() - 1), u(w)) : b;
1183
+ }
1184
+ function H(b) {
1185
+ return m.endDateOffset && o.value ? ye(b) : b;
1186
+ }
1187
+ function N(b) {
1188
+ return m.endDateOffset && o.value ? he(b) : b;
1189
+ }
1190
+ function O(b) {
1191
+ if (b.type !== "current-month" || m.disabledDate && m.disabledDate(b.date))
1192
+ return;
1193
+ const w = u(b.date);
1194
+ if (!(m.minDate && w < m.minDate) && !(m.maxDate && w > m.maxDate)) {
1195
+ if (o.value)
1196
+ if (!_.value || _.value && V.value)
1197
+ _.value = w, V.value = null;
1198
+ else {
1199
+ let L = _.value, ee = w;
1200
+ if (w < _.value && (ee = _.value, L = w), _.value = L, V.value = ee, _.value && V.value) {
1201
+ const h = H(V.value), X = [_.value, h];
1202
+ t("update:modelValue", X), t("change", X), m.showFooter || F();
1203
+ }
1204
+ }
1205
+ else {
1206
+ x.value = w;
1207
+ const L = w;
1208
+ t("update:modelValue", L), t("change", L), m.mode && M();
1209
+ }
1210
+ A();
1211
+ }
1212
+ }
1213
+ function F() {
1214
+ if (_.value && V.value) {
1215
+ const b = H(V.value), w = [_.value, b];
1216
+ t("update:modelValue", w), t("change", w), t("confirm", w), M();
1217
+ }
1218
+ }
1219
+ function U() {
1220
+ o.value ? (_.value = null, V.value = null) : x.value = null;
1221
+ const b = null;
1222
+ t("update:modelValue", b), t("change", b), A();
1223
+ }
1224
+ function S(b) {
1225
+ _.value = b[0], V.value = b[1];
1226
+ const w = H(b[1]), L = [b[0], w];
1227
+ t("update:modelValue", L), t("change", L), m.showFooter ? A() : F();
1228
+ }
1229
+ function T() {
1230
+ v.value = !0;
1231
+ }
1232
+ function M() {
1233
+ v.value = !1;
1234
+ }
1235
+ function Y(b) {
1236
+ v.value = b;
1237
+ }
1238
+ function me() {
1239
+ T();
1240
+ }
1241
+ function ge() {
1242
+ m.mode === "popup" && $e();
1243
+ }
1244
+ function we() {
1245
+ v.value || T();
1246
+ }
1247
+ function $e() {
1248
+ const b = d.value.trim();
1249
+ if (o.value) {
1250
+ const w = b.split("~").map((L) => L.trim());
1251
+ if (w.length === 2 && w[0] && w[1]) {
1252
+ const L = I(w[0]), ee = I(w[1]);
1253
+ if (L && ee && !isNaN(L.getTime()) && !isNaN(ee.getTime())) {
1254
+ _.value = u(L);
1255
+ const h = u(ee);
1256
+ V.value = N(h);
1257
+ const X = H(V.value), ne = [_.value, X];
1258
+ t("update:modelValue", ne), t("change", ne);
1259
+ return;
1260
+ }
1261
+ }
1262
+ } else {
1263
+ const w = I(b);
1264
+ if (w && !isNaN(w.getTime())) {
1265
+ x.value = u(w), t("update:modelValue", x.value), t("change", x.value);
1266
+ return;
1267
+ }
1268
+ }
1269
+ A();
1270
+ }
1271
+ return (b, w) => (s(), f("div", Un, [
1272
+ e.mode === "popup" ? (s(), f("div", {
1273
+ key: 0,
1274
+ class: "rc-calendar__input",
1275
+ onClick: T
1276
+ }, [
1277
+ Mt(C("input", {
1278
+ ref_key: "inputRef",
1279
+ ref: g,
1280
+ "onUpdate:modelValue": w[0] || (w[0] = (L) => d.value = L),
1281
+ type: "text",
1282
+ class: "rc-calendar__input-field",
1283
+ placeholder: e.placeholder,
1284
+ readonly: "",
1285
+ onFocus: me,
1286
+ onBlur: ge,
1287
+ onInput: we
1288
+ }, null, 40, Kn), [
1289
+ [Rt, d.value]
1290
+ ]),
1291
+ C("div", jn, [
1292
+ G(Q(Z), {
1293
+ name: "icon_a-rili",
1294
+ class: "rc-calendar__input-icon"
1295
+ })
1296
+ ])
1297
+ ])) : D("", !0),
1298
+ e.mode === "default" ? (s(), f("div", Gn, [
1299
+ G(wt, {
1300
+ "show-title": e.showTitle,
1301
+ title: e.title,
1302
+ range: o.value,
1303
+ "selected-date": x.value,
1304
+ "range-start": _.value,
1305
+ "range-end": V.value,
1306
+ "min-date": e.minDate,
1307
+ "max-date": e.maxDate,
1308
+ "disabled-date": B.value,
1309
+ formatter: e.formatter,
1310
+ "show-footer": !1,
1311
+ "max-range-days": p.value,
1312
+ onSelectDay: O,
1313
+ onClear: U,
1314
+ onConfirm: F,
1315
+ onShortcutSelect: S
1316
+ }, null, 8, ["show-title", "title", "range", "selected-date", "range-start", "range-end", "min-date", "max-date", "disabled-date", "formatter", "max-range-days"])
1317
+ ])) : D("", !0),
1318
+ e.mode === "popup" ? (s(), te(Q(We), {
1319
+ key: 2,
1320
+ modelValue: v.value,
1321
+ "onUpdate:modelValue": [
1322
+ w[1] || (w[1] = (L) => v.value = L),
1323
+ Y
1324
+ ],
1325
+ position: "bottom",
1326
+ overlay: !0,
1327
+ round: !0,
1328
+ "close-on-click-overlay": !0,
1329
+ "lock-scroll": !0
1330
+ }, {
1331
+ default: ae(() => [
1332
+ C("div", {
1333
+ ref_key: "popupPanelRef",
1334
+ ref: k,
1335
+ class: "rc-calendar__panel"
1336
+ }, [
1337
+ G(wt, {
1338
+ "show-title": e.showTitle,
1339
+ title: e.title,
1340
+ range: o.value,
1341
+ "selected-date": x.value,
1342
+ "range-start": _.value,
1343
+ "range-end": V.value,
1344
+ "min-date": e.minDate,
1345
+ "max-date": e.maxDate,
1346
+ "disabled-date": B.value,
1347
+ formatter: e.formatter,
1348
+ "show-footer": e.showFooter,
1349
+ "max-range-days": p.value,
1350
+ onSelectDay: O,
1351
+ onClear: U,
1352
+ onConfirm: F,
1353
+ onShortcutSelect: S
1354
+ }, null, 8, ["show-title", "title", "range", "selected-date", "range-start", "range-end", "min-date", "max-date", "disabled-date", "formatter", "show-footer", "max-range-days"])
1355
+ ], 512)
1356
+ ]),
1357
+ _: 1
1358
+ }, 8, ["modelValue"])) : D("", !0)
1359
+ ]));
1360
+ }
1361
+ }), He = /* @__PURE__ */ se(qn, [["__scopeId", "data-v-96b29c22"]]);
1362
+ He.name = "rc-calendar";
1363
+ const Jn = "RcCalendar";
1364
+ function $t(e) {
1365
+ return e.component(He.name, He), e.component(Jn, He), e;
1366
+ }
1367
+ const Qn = { class: "rc-search-area" }, Xn = { class: "rc-search-area__bar" }, Zn = ["onClick"], ea = { class: "rc-search-area__item-label" }, ta = { class: "rc-search-area__panel-content" }, na = {
1368
+ key: 1,
1369
+ class: "rc-search-area__input-wrapper"
1370
+ }, aa = ["placeholder"], la = {
1371
+ key: 2,
1372
+ class: "rc-search-area__calendar-wrapper"
1373
+ }, oa = {
1374
+ key: 3,
1375
+ class: "rc-search-area__tree-container"
1376
+ }, ra = { class: "rc-search-area__tree-group-title" }, sa = { class: "rc-search-area__tree-group-options" }, ua = ["onClick"], ia = { class: "rc-search-area__option-label" }, ca = {
1377
+ key: 4,
1378
+ class: "rc-search-area__tree-container"
1379
+ }, da = { class: "rc-search-area__tree-group-title" }, fa = { class: "rc-search-area__tree-group-options" }, va = ["onClick"], ma = { class: "rc-search-area__option-label" }, pa = {
1380
+ key: 5,
1381
+ class: "rc-search-area__options-grid"
1382
+ }, ya = ["onClick"], ha = { class: "rc-search-area__option-label" }, ga = {
1383
+ key: 6,
1384
+ class: "rc-search-area__options-grid"
1385
+ }, ka = ["onClick"], ba = { class: "rc-search-area__option-label" }, _a = {
1386
+ key: 7,
469
1387
  class: "rc-search-area__empty"
470
- }, It = { class: "rc-search-area__panel-footer" }, At = /* @__PURE__ */ B({
1388
+ }, wa = {
1389
+ key: 0,
1390
+ class: "rc-search-area__panel-footer"
1391
+ }, $a = /* @__PURE__ */ re({
471
1392
  name: "rc-search-area",
472
1393
  __name: "index",
473
1394
  props: {
474
1395
  items: { default: () => [] },
475
1396
  modelValue: { default: () => ({}) },
476
- showMask: { type: Boolean, default: !0 }
1397
+ showMask: { type: Boolean, default: !0 },
1398
+ autoConfirm: { type: Boolean, default: !1 }
477
1399
  },
478
- emits: ["update:modelValue", "change", "confirm", "reset", "item-change"],
479
- setup(e, { expose: t, emit: s }) {
480
- const c = e, f = s, d = I(null), v = I(null), r = I(null), l = I({ top: "0px" }), o = async () => {
481
- if (d.value === null || !v.value)
1400
+ emits: ["update:modelValue", "change"],
1401
+ setup(e, { expose: r, emit: m }) {
1402
+ const t = e, g = m, k = E(null), v = E(null), d = E(null), o = E({ top: "0px" }), p = async () => {
1403
+ if (k.value === null || !v.value)
482
1404
  return;
483
- await ue();
484
- const a = v.value.getBoundingClientRect().top;
485
- l.value = { top: `${a}px` };
486
- }, b = (n) => {
487
- if (d.value === null || !v.value)
1405
+ await Be();
1406
+ const l = v.value.getBoundingClientRect().top;
1407
+ o.value = { top: `${l}px` };
1408
+ }, B = (n) => {
1409
+ if (k.value === null || !v.value)
488
1410
  return;
489
- const a = n.target;
490
- if (v.value.contains(a))
1411
+ const l = n.target;
1412
+ if (v.value.contains(l))
491
1413
  return;
492
- const i = v.value.closest(".rc-search-area");
493
- if (i) {
494
- const p = i.querySelector(".rc-search-area__bar");
495
- if (p && p.contains(a))
1414
+ const c = v.value.closest(".rc-search-area");
1415
+ if (c) {
1416
+ const $ = c.querySelector(".rc-search-area__bar");
1417
+ if ($ && $.contains(l))
496
1418
  return;
497
1419
  }
498
- ae();
1420
+ H();
499
1421
  };
500
- ie(d, async (n) => {
501
- n !== null ? (await ue(), o(), window.addEventListener("resize", o), window.addEventListener("scroll", o, !0), document.addEventListener("click", b, !0)) : (window.removeEventListener("resize", o), window.removeEventListener("scroll", o, !0), document.removeEventListener("click", b, !0));
502
- }), ke(() => {
503
- window.removeEventListener("resize", o), window.removeEventListener("scroll", o, !0), document.removeEventListener("click", b, !0);
1422
+ Se(k, async (n) => {
1423
+ n !== null ? (await Be(), p(), window.addEventListener("resize", p), window.addEventListener("scroll", p, !0), document.addEventListener("click", B, !0)) : (window.removeEventListener("resize", p), window.removeEventListener("scroll", p, !0), document.removeEventListener("click", B, !0));
1424
+ }), at(() => {
1425
+ window.removeEventListener("resize", p), window.removeEventListener("scroll", p, !0), document.removeEventListener("click", B, !0);
504
1426
  });
505
- const y = I({}), _ = I({ ...c.modelValue });
506
- ie(() => c.modelValue, (n) => {
507
- _.value = { ...n || {} };
1427
+ const x = E({}), _ = E(""), V = E(null), A = E({}), I = E({ ...t.modelValue });
1428
+ Se(() => t.modelValue, (n) => {
1429
+ I.value = { ...n || {} };
508
1430
  }, { deep: !0, immediate: !0 });
509
- const h = g(() => d.value === null ? null : c.items[d.value]), D = g(() => {
510
- if (!h.value) return "";
511
- const n = De(h.value);
1431
+ const u = R(() => k.value === null ? null : t.items[k.value]), ve = R(() => {
1432
+ if (!u.value) return "";
1433
+ const n = ne(u.value);
512
1434
  return n > 0 ? `(${n}项)` : "";
513
- }), Se = (n) => {
514
- const a = _.value[n.key];
515
- if (a == null || a === "")
1435
+ }), ye = (n) => {
1436
+ const l = I.value[n.key];
1437
+ if (l == null || l === "" || n.slot)
516
1438
  return n.label;
517
- if (n.type === "single") {
518
- const i = oe(n, a);
519
- if (i)
520
- return `${n.label}: ${Q(i)}`;
1439
+ if (n.type === "input") {
1440
+ if (l && String(l).trim())
1441
+ return `${n.label}: ${l}`;
1442
+ } else if (n.type === "calendar") {
1443
+ if (l) {
1444
+ if (Array.isArray(l) && l.length === 2)
1445
+ return `${n.label}: ${l[0]} ~ ${l[1]}`;
1446
+ if (typeof l == "string")
1447
+ return `${n.label}: ${l}`;
1448
+ }
1449
+ } else if (n.type === "single" || n.type === "tree-single") {
1450
+ const c = U(n, l);
1451
+ if (c)
1452
+ return `${n.label}: ${F(c, n)}`;
521
1453
  } else {
522
- const i = Array.isArray(a) ? a : [a];
523
- if (i.length > 0) {
524
- const p = i.map((x) => {
525
- const S = oe(n, x);
526
- return S ? Q(S) : null;
527
- }).filter((x) => x !== null);
528
- if (p.length > 0)
529
- return `${n.label}: ${p.join("、")}`;
1454
+ const c = Array.isArray(l) ? l : [l];
1455
+ if (c.length > 0) {
1456
+ const $ = c.map((J) => {
1457
+ const K = U(n, J);
1458
+ return K ? F(K, n) : null;
1459
+ }).filter((J) => J !== null);
1460
+ if ($.length > 0)
1461
+ return `${n.label}: ${$.join("、")}`;
530
1462
  }
531
1463
  }
532
1464
  return n.label;
533
- }, we = (n) => {
534
- const a = c.items[n];
535
- if (!a) return;
536
- if (d.value === n) {
537
- d.value = null;
1465
+ }, he = (n) => {
1466
+ const l = t.items[n];
1467
+ if (!l) return;
1468
+ if (k.value === n) {
1469
+ k.value = null;
538
1470
  return;
539
1471
  }
540
- const i = _.value[a.key];
541
- a.type === "single" ? y.value[a.key] = i !== void 0 ? i : null : y.value[a.key] = i !== void 0 ? Array.isArray(i) ? [...i] : [i] : [], d.value = n;
542
- }, ae = () => {
543
- d.value = null;
544
- }, Q = (n) => typeof n == "string" ? n : n.label || String(n.value), X = (n) => typeof n == "string" ? n : n.value !== void 0 ? n.value : n, oe = (n, a) => n.options.find((i) => {
545
- const p = X(i);
546
- return p === a || String(p) === String(a);
547
- }) || null, Z = (n) => {
548
- if (!h.value) return !1;
549
- const a = h.value.key, i = y.value[a], p = X(n);
550
- return h.value.type === "single" ? i != null && i === p : (Array.isArray(i) ? i : []).some((S) => S === p || String(S) === String(p));
551
- }, Ie = (n) => {
552
- if (!h.value) return;
553
- const a = h.value.key, i = X(n);
554
- y.value[a] === i ? y.value[a] = null : y.value[a] = i;
555
- }, Ae = (n) => {
556
- if (!h.value) return;
557
- const a = h.value.key, i = X(n), p = Array.isArray(y.value[a]) ? [...y.value[a]] : [], x = p.findIndex(
558
- (S) => S === i || String(S) === String(i)
1472
+ const c = I.value[l.key];
1473
+ l.slot ? c != null ? Array.isArray(c) ? A.value[l.key] = [...c] : typeof c == "object" ? A.value[l.key] = { ...c } : A.value[l.key] = c : A.value[l.key] = void 0 : l.type === "input" ? _.value = c != null ? String(c) : "" : l.type === "calendar" ? V.value = c ?? null : l.type === "single" || l.type === "tree-single" ? x.value[l.key] = c !== void 0 ? c : null : x.value[l.key] = c !== void 0 ? Array.isArray(c) ? [...c] : [c] : [], k.value = n;
1474
+ }, H = () => {
1475
+ k.value = null;
1476
+ }, N = (n, l) => {
1477
+ if (!l)
1478
+ return typeof n == "string" ? n : n.label || String(n.value);
1479
+ const c = n;
1480
+ if (l.renderItem) {
1481
+ if (typeof l.renderItem == "string")
1482
+ return String(typeof c == "object" && c !== null ? c[l.renderItem] ?? "" : c);
1483
+ {
1484
+ const $ = l.renderItem(c);
1485
+ return $ != null ? String($) : "";
1486
+ }
1487
+ }
1488
+ return typeof n == "string" ? n : n.label || String(n.value);
1489
+ }, O = (n, l) => {
1490
+ if (!l)
1491
+ return typeof n == "string" ? n : n.value !== void 0 ? n.value : n;
1492
+ const c = n;
1493
+ return l.format ? typeof l.format == "string" ? typeof c == "object" && c !== null ? c[l.format] : c : l.format(c) : typeof n == "string" ? n : n.value !== void 0 ? n.value : n;
1494
+ }, F = (n, l) => {
1495
+ const c = n, $ = l.renderResult || l.renderItem;
1496
+ if ($) {
1497
+ if (typeof $ == "string")
1498
+ return String(typeof c == "object" && c !== null ? c[$] ?? "" : c);
1499
+ {
1500
+ const J = $(c);
1501
+ return J != null ? String(J) : "";
1502
+ }
1503
+ }
1504
+ return N(n, l);
1505
+ }, U = (n, l, c) => {
1506
+ const $ = c || n.options;
1507
+ if (!$) return null;
1508
+ const J = n.childrenKey || "children";
1509
+ for (const K of $) {
1510
+ const pe = O(K, n);
1511
+ if (pe === l || String(pe) === String(l))
1512
+ return K;
1513
+ if (typeof K == "object" && K !== null) {
1514
+ const Ie = K[J];
1515
+ if (Array.isArray(Ie) && Ie.length > 0) {
1516
+ const De = U(n, l, Ie);
1517
+ if (De) return De;
1518
+ }
1519
+ }
1520
+ }
1521
+ return null;
1522
+ }, S = (n, l) => {
1523
+ const c = l || n.options;
1524
+ if (!c) return [];
1525
+ const $ = n.childrenKey || "children", J = [];
1526
+ for (const K of c)
1527
+ if (J.push(K), typeof K == "object" && K !== null) {
1528
+ const pe = K[$];
1529
+ Array.isArray(pe) && pe.length > 0 && J.push(...S(n, pe));
1530
+ }
1531
+ return J;
1532
+ }, T = (n) => {
1533
+ if (!u.value) return !1;
1534
+ const l = u.value.key, c = x.value[l], $ = O(n, u.value);
1535
+ return u.value.type === "single" || u.value.type === "tree-single" ? c != null && c === $ : (Array.isArray(c) ? c : []).some((K) => K === $ || String(K) === String($));
1536
+ }, M = (n) => n ? n.childrenKey ? S(n) : n.options || [] : [], Y = (n) => {
1537
+ if (!n) return [];
1538
+ const l = n.childrenKey || "children";
1539
+ return (n.options || []).filter((c) => {
1540
+ if (typeof c == "string") return !1;
1541
+ const $ = c[l];
1542
+ return Array.isArray($) && $.length > 0;
1543
+ });
1544
+ }, me = (n, l) => {
1545
+ if (!l || typeof n == "string") return [];
1546
+ const c = l.childrenKey || "children", $ = n[c];
1547
+ return Array.isArray($) ? $ : [];
1548
+ }, ge = (n) => {
1549
+ if (n)
1550
+ return A.value[n.key] !== void 0 ? A.value[n.key] : I.value[n.key];
1551
+ }, we = (n, l) => {
1552
+ if (n && (A.value[n.key] = l, t.autoConfirm)) {
1553
+ const c = n.key;
1554
+ I.value[c] = l, g("update:modelValue", { ...I.value }), g("change", { ...I.value }, n), H();
1555
+ }
1556
+ }, $e = (n) => {
1557
+ if (!u.value) return;
1558
+ const l = u.value.key, c = O(n, u.value);
1559
+ I.value[l];
1560
+ let $;
1561
+ x.value[l] === c ? $ = void 0 : $ = c, I.value[l] = $, g("update:modelValue", { ...I.value }), g("change", { ...I.value }, u.value), H();
1562
+ }, b = (n) => {
1563
+ if (!u.value) return;
1564
+ const l = u.value.key, c = O(n, u.value), $ = Array.isArray(x.value[l]) ? [...x.value[l]] : [], J = $.findIndex(
1565
+ (K) => K === c || String(K) === String(c)
559
1566
  );
560
- x >= 0 ? p.splice(x, 1) : p.push(i), y.value[a] = p;
561
- }, Re = () => {
562
- if (!h.value) return;
563
- const n = h.value.key;
564
- h.value.type === "single" ? y.value[n] = null : y.value[n] = [];
565
- }, Ve = () => {
566
- if (!h.value) return;
567
- const n = h.value.key, a = y.value[n], i = _.value[n];
568
- let p;
569
- h.value.type === "single" ? (p = a ?? void 0, _.value[n] = p) : (p = Array.isArray(a) && a.length > 0 ? a : void 0, _.value[n] = p), f("update:modelValue", { ..._.value }), f("change", { ..._.value }, h.value), f("confirm", { ..._.value }, h.value), JSON.stringify(i) !== JSON.stringify(p) && f("item-change", n, p), ae();
570
- }, ce = (n) => {
571
- const a = _.value[n.key];
572
- return a == null || a === "" ? 0 : n.type === "single" ? 1 : Array.isArray(a) ? a.length : a ? 1 : 0;
573
- }, De = (n) => {
574
- const a = y.value[n.key];
575
- return a == null || a === "" ? 0 : n.type === "single" ? 1 : Array.isArray(a) ? a.length : 0;
1567
+ if (J >= 0 ? $.splice(J, 1) : $.push(c), x.value[l] = $, t.autoConfirm) {
1568
+ const K = $.length > 0 ? $ : void 0;
1569
+ I.value[l] = K, g("update:modelValue", { ...I.value }), g("change", { ...I.value }, u.value), H();
1570
+ }
1571
+ }, w = () => {
1572
+ if (!u.value) return;
1573
+ const n = u.value.key;
1574
+ u.value.slot ? A.value[n] = void 0 : u.value.type === "input" ? _.value = "" : u.value.type === "calendar" ? V.value = null : u.value.type === "single" || u.value.type === "tree-single" ? x.value[n] = null : x.value[n] = [];
1575
+ }, L = () => {
1576
+ if (t.autoConfirm && u.value) {
1577
+ const n = u.value.key, l = _.value.trim() || void 0;
1578
+ I.value[n] = l, g("update:modelValue", { ...I.value }), g("change", { ...I.value }, u.value), H();
1579
+ }
1580
+ }, ee = (n) => {
1581
+ if (V.value = n, t.autoConfirm && u.value) {
1582
+ const l = u.value.key, c = n ?? void 0;
1583
+ I.value[l] = c, g("update:modelValue", { ...I.value }), g("change", { ...I.value }, u.value), H();
1584
+ }
1585
+ }, h = () => {
1586
+ if (!u.value) return;
1587
+ const n = u.value.key;
1588
+ I.value[n];
1589
+ let l;
1590
+ if (u.value.slot)
1591
+ l = A.value[n], I.value[n] = l;
1592
+ else if (u.value.type === "input")
1593
+ l = _.value.trim() || void 0, I.value[n] = l;
1594
+ else if (u.value.type === "calendar")
1595
+ l = V.value !== null && V.value !== void 0 ? V.value : void 0, I.value[n] = l;
1596
+ else if (u.value.type === "single" || u.value.type === "tree-single") {
1597
+ const c = x.value[n];
1598
+ l = c ?? void 0, I.value[n] = l;
1599
+ } else {
1600
+ const c = x.value[n];
1601
+ l = Array.isArray(c) && c.length > 0 ? c : void 0, I.value[n] = l;
1602
+ }
1603
+ g("update:modelValue", { ...I.value }), g("change", { ...I.value }, u.value), H();
1604
+ }, X = (n) => {
1605
+ const l = I.value[n.key];
1606
+ return l == null || l === "" ? 0 : n.slot ? 1 : n.type === "input" ? String(l).trim() ? 1 : 0 : n.type === "single" || n.type === "tree-single" ? 1 : Array.isArray(l) ? l.length : l ? 1 : 0;
1607
+ }, ne = (n) => {
1608
+ if (n.slot) {
1609
+ const c = A.value[n.key];
1610
+ return c != null && c !== "" ? 1 : 0;
1611
+ } else {
1612
+ if (n.type === "input")
1613
+ return _.value.trim() ? 1 : 0;
1614
+ if (n.type === "calendar")
1615
+ return V.value !== null && V.value !== void 0 ? 1 : 0;
1616
+ }
1617
+ const l = x.value[n.key];
1618
+ return l == null || l === "" ? 0 : n.type === "single" || n.type === "tree-single" ? 1 : Array.isArray(l) ? l.length : 0;
576
1619
  };
577
- return t({
1620
+ return r({
578
1621
  /** 获取当前筛选值 */
579
- getValues: () => ({ ..._.value }),
1622
+ getValues: () => ({ ...I.value }),
580
1623
  /** 重置所有筛选 */
581
1624
  reset: () => {
582
- _.value = {}, y.value = {}, f("update:modelValue", {}), f("change", {}, null), f("reset");
583
- }
584
- }), (n, a) => (u(), m("div", pt, [
585
- k("div", yt, [
586
- (u(!0), m(O, null, K(c.items, (i, p) => (u(), m("div", {
587
- key: p,
588
- class: V(["rc-search-area__item", {
589
- "is-active": d.value === p,
590
- "has-value": ce(i) > 0
1625
+ I.value = {}, x.value = {}, A.value = {}, g("update:modelValue", {});
1626
+ }
1627
+ }), (n, l) => (s(), f("div", Qn, [
1628
+ C("div", Xn, [
1629
+ (s(!0), f(oe, null, fe(t.items, (c, $) => (s(), f("div", {
1630
+ key: $,
1631
+ class: j(["rc-search-area__item", {
1632
+ "is-active": k.value === $,
1633
+ "has-value": X(c) > 0
591
1634
  }]),
592
- onClick: (x) => we(p)
1635
+ onClick: (J) => he($)
593
1636
  }, [
594
- k("span", _t, C(Se(i)), 1),
595
- E(H(M), {
1637
+ C("span", ea, P(ye(c)), 1),
1638
+ G(Q(Z), {
596
1639
  name: "icon_a-xiala2",
597
- color: d.value !== p && ce(i) > 0 ? "#1677ff" : "#969799",
598
- class: V(["rc-search-area__item-arrow", { "is-up": d.value === p }])
1640
+ color: k.value !== $ && X(c) > 0 ? "#1677ff" : "#969799",
1641
+ class: j(["rc-search-area__item-arrow", { "is-up": k.value === $ }])
599
1642
  }, null, 8, ["color", "class"])
600
- ], 10, ht))), 128))
1643
+ ], 10, Zn))), 128))
601
1644
  ]),
602
- E(le, { name: "rc-search-area-fade" }, {
603
- default: G(() => [
604
- d.value !== null && c.showMask ? (u(), m("div", {
1645
+ G(Ee, { name: "rc-search-area-fade" }, {
1646
+ default: ae(() => [
1647
+ k.value !== null && t.showMask ? (s(), f("div", {
605
1648
  key: 0,
606
1649
  ref_key: "maskRef",
607
- ref: r,
1650
+ ref: d,
608
1651
  class: "rc-search-area__mask",
609
- style: A(l.value),
610
- onClick: ae
611
- }, null, 4)) : $("", !0)
1652
+ style: le(o.value),
1653
+ onClick: H
1654
+ }, null, 4)) : D("", !0)
612
1655
  ]),
613
1656
  _: 1
614
1657
  }),
615
- E(le, { name: "rc-search-area-slide" }, {
616
- default: G(() => {
617
- var i, p, x, S;
1658
+ G(Ee, { name: "rc-search-area-slide" }, {
1659
+ default: ae(() => {
1660
+ var c, $, J, K, pe, Ie, De, Le, Oe, Ue, Pe, Ke, je, Ge, qe, Je, Qe, a, i;
618
1661
  return [
619
- d.value !== null ? (u(), m("div", {
1662
+ k.value !== null ? (s(), f("div", {
620
1663
  key: 0,
621
1664
  ref_key: "panelRef",
622
1665
  ref: v,
623
1666
  class: "rc-search-area__panel"
624
1667
  }, [
625
- k("div", gt, [
626
- ((i = h.value) == null ? void 0 : i.type) === "single" ? (u(), m("div", bt, [
627
- (u(!0), m(O, null, K(h.value.options, (R, se) => (u(), m("div", {
628
- key: se,
629
- class: V(["rc-search-area__option", { "is-selected": Z(R) }]),
630
- onClick: (Ee) => Ie(R)
1668
+ C("div", ta, [
1669
+ (c = u.value) != null && c.slot && n.$slots[u.value.key] ? q(n.$slots, u.value.key, {
1670
+ key: 0,
1671
+ value: ge(u.value),
1672
+ "update:value": (y) => we(u.value, y)
1673
+ }, void 0, !0) : (($ = u.value) == null ? void 0 : $.type) === "input" ? (s(), f("div", na, [
1674
+ Mt(C("input", {
1675
+ "onUpdate:modelValue": l[0] || (l[0] = (y) => _.value = y),
1676
+ type: "text",
1677
+ class: "rc-search-area__input",
1678
+ placeholder: u.value.placeholder || "请输入",
1679
+ onInput: L
1680
+ }, null, 40, aa), [
1681
+ [Rt, _.value]
1682
+ ])
1683
+ ])) : ((J = u.value) == null ? void 0 : J.type) === "calendar" ? (s(), f("div", la, [
1684
+ G(Q(He), {
1685
+ modelValue: V.value,
1686
+ "onUpdate:modelValue": l[1] || (l[1] = (y) => V.value = y),
1687
+ range: ((K = u.value.calendarConfig) == null ? void 0 : K.range) || !1,
1688
+ mode: "default",
1689
+ "min-date": (pe = u.value.calendarConfig) == null ? void 0 : pe.minDate,
1690
+ "max-date": (Ie = u.value.calendarConfig) == null ? void 0 : Ie.maxDate,
1691
+ "disabled-date": (De = u.value.calendarConfig) == null ? void 0 : De.disabledDate,
1692
+ formatter: (Le = u.value.calendarConfig) == null ? void 0 : Le.formatter,
1693
+ "end-date-offset": ((Oe = u.value.calendarConfig) == null ? void 0 : Oe.endDateOffset) || !1,
1694
+ onChange: ee
1695
+ }, null, 8, ["modelValue", "range", "min-date", "max-date", "disabled-date", "formatter", "end-date-offset"])
1696
+ ])) : ((Ue = u.value) == null ? void 0 : Ue.type) === "tree-single" ? (s(), f("div", oa, [
1697
+ (s(!0), f(oe, null, fe(Y(u.value), (y, z) => (s(), f("div", {
1698
+ key: z,
1699
+ class: "rc-search-area__tree-group"
1700
+ }, [
1701
+ C("div", ra, P(N(y, u.value || void 0)), 1),
1702
+ C("div", sa, [
1703
+ (s(!0), f(oe, null, fe(me(y, u.value), (W, ke) => (s(), f("div", {
1704
+ key: ke,
1705
+ class: j(["rc-search-area__option", { "is-selected": T(W) }]),
1706
+ onClick: (be) => $e(W)
1707
+ }, [
1708
+ C("span", ia, P(N(W, u.value || void 0)), 1),
1709
+ T(W) ? (s(), te(Q(Z), {
1710
+ key: 0,
1711
+ name: "icon_check",
1712
+ class: "rc-search-area__option-check"
1713
+ })) : D("", !0)
1714
+ ], 10, ua))), 128))
1715
+ ])
1716
+ ]))), 128))
1717
+ ])) : ((Pe = u.value) == null ? void 0 : Pe.type) === "tree-multiple" ? (s(), f("div", ca, [
1718
+ (s(!0), f(oe, null, fe(Y(u.value), (y, z) => (s(), f("div", {
1719
+ key: z,
1720
+ class: "rc-search-area__tree-group"
1721
+ }, [
1722
+ C("div", da, P(N(y, u.value || void 0)), 1),
1723
+ C("div", fa, [
1724
+ (s(!0), f(oe, null, fe(me(y, u.value), (W, ke) => (s(), f("div", {
1725
+ key: ke,
1726
+ class: j(["rc-search-area__option", { "is-selected": T(W) }]),
1727
+ onClick: (be) => b(W)
1728
+ }, [
1729
+ C("span", ma, P(N(W, u.value || void 0)), 1),
1730
+ T(W) ? (s(), te(Q(Z), {
1731
+ key: 0,
1732
+ name: "icon_check",
1733
+ class: "rc-search-area__option-check"
1734
+ })) : D("", !0)
1735
+ ], 10, va))), 128))
1736
+ ])
1737
+ ]))), 128))
1738
+ ])) : ((Ke = u.value) == null ? void 0 : Ke.type) === "single" ? (s(), f("div", pa, [
1739
+ (s(!0), f(oe, null, fe(M(u.value), (y, z) => (s(), f("div", {
1740
+ key: z,
1741
+ class: j(["rc-search-area__option", { "is-selected": T(y) }]),
1742
+ onClick: (W) => $e(y)
631
1743
  }, [
632
- k("span", $t, C(Q(R)), 1),
633
- Z(R) ? (u(), te(H(M), {
1744
+ C("span", ha, P(N(y, u.value || void 0)), 1),
1745
+ T(y) ? (s(), te(Q(Z), {
634
1746
  key: 0,
635
- name: "icon_select",
1747
+ name: "icon_check",
636
1748
  class: "rc-search-area__option-check"
637
- })) : $("", !0)
638
- ], 10, kt))), 128))
639
- ])) : (u(), m("div", Ct, [
640
- (u(!0), m(O, null, K(((p = h.value) == null ? void 0 : p.options) || [], (R, se) => (u(), m("div", {
641
- key: se,
642
- class: V(["rc-search-area__option", { "is-selected": Z(R) }]),
643
- onClick: (Ee) => Ae(R)
1749
+ })) : D("", !0)
1750
+ ], 10, ya))), 128))
1751
+ ])) : (s(), f("div", ga, [
1752
+ (s(!0), f(oe, null, fe(M(u.value), (y, z) => (s(), f("div", {
1753
+ key: z,
1754
+ class: j(["rc-search-area__option", { "is-selected": T(y) }]),
1755
+ onClick: (W) => b(y)
644
1756
  }, [
645
- k("span", St, C(Q(R)), 1),
646
- Z(R) ? (u(), te(H(M), {
1757
+ C("span", ba, P(N(y, u.value || void 0)), 1),
1758
+ T(y) ? (s(), te(Q(Z), {
647
1759
  key: 0,
648
- name: "icon_select",
1760
+ name: "icon_check",
649
1761
  class: "rc-search-area__option-check"
650
- })) : $("", !0)
651
- ], 10, xt))), 128))
1762
+ })) : D("", !0)
1763
+ ], 10, ka))), 128))
652
1764
  ])),
653
- ((S = (x = h.value) == null ? void 0 : x.options) == null ? void 0 : S.length) === 0 ? (u(), m("div", wt, [...a[0] || (a[0] = [
654
- k("p", null, "暂无选项", -1)
655
- ])])) : $("", !0)
1765
+ ((je = u.value) == null ? void 0 : je.type) !== "input" && ((Ge = u.value) == null ? void 0 : Ge.type) !== "calendar" && !((qe = u.value) != null && qe.slot) && ((Qe = (Je = u.value) == null ? void 0 : Je.options) == null ? void 0 : Qe.length) === 0 ? (s(), f("div", _a, [...l[2] || (l[2] = [
1766
+ C("p", null, "暂无选项", -1)
1767
+ ])])) : D("", !0)
656
1768
  ]),
657
- k("div", It, [
658
- E(H(J), {
1769
+ !t.autoConfirm && ((a = u.value) == null ? void 0 : a.type) !== "single" && ((i = u.value) == null ? void 0 : i.type) !== "tree-single" ? (s(), f("div", wa, [
1770
+ G(Q(xe), {
659
1771
  block: "",
660
- onClick: Re
1772
+ onClick: w
661
1773
  }, {
662
- default: G(() => [...a[1] || (a[1] = [
663
- q(" 重置 ", -1)
1774
+ default: ae(() => [...l[3] || (l[3] = [
1775
+ _e(" 重置 ", -1)
664
1776
  ])]),
665
1777
  _: 1
666
1778
  }),
667
- E(H(J), {
1779
+ G(Q(xe), {
668
1780
  type: "primary",
669
1781
  block: "",
670
- onClick: Ve
1782
+ onClick: h
671
1783
  }, {
672
- default: G(() => [
673
- q(" 确定" + C(D.value), 1)
1784
+ default: ae(() => [
1785
+ _e(" 确定" + P(ve.value), 1)
674
1786
  ]),
675
1787
  _: 1
676
1788
  })
677
- ])
678
- ], 512)) : $("", !0)
1789
+ ])) : D("", !0)
1790
+ ], 512)) : D("", !0)
679
1791
  ];
680
1792
  }),
681
- _: 1
1793
+ _: 3
682
1794
  })
683
1795
  ]));
684
1796
  }
685
- }), _e = /* @__PURE__ */ W(At, [["__scopeId", "data-v-6a70650d"]]), ge = (e) => {
686
- e.component("RcSearchArea", _e), e.component("rc-search-area", _e);
687
- }, re = Symbol("RECYCLE_UI_CONFIG"), Ce = {
1797
+ }), xt = /* @__PURE__ */ se($a, [["__scopeId", "data-v-dd3a69e1"]]), Dt = (e) => {
1798
+ e.component("RcSearchArea", xt), e.component("rc-search-area", xt);
1799
+ }, xa = {
1800
+ key: 0,
1801
+ class: "rc-input__prepend"
1802
+ }, Da = {
1803
+ key: 0,
1804
+ class: "rc-input__prefix"
1805
+ }, Ca = {
1806
+ key: 1,
1807
+ class: "rc-input__textarea-wrapper"
1808
+ }, Sa = {
1809
+ key: 3,
1810
+ class: "rc-input__suffix"
1811
+ }, Ia = {
1812
+ key: 0,
1813
+ class: "rc-input__suffix-inner"
1814
+ }, Ma = {
1815
+ key: 4,
1816
+ class: "rc-input__count"
1817
+ }, Ra = {
1818
+ key: 1,
1819
+ class: "rc-input__append"
1820
+ }, Va = /* @__PURE__ */ re({
1821
+ __name: "index",
1822
+ props: {
1823
+ modelValue: { default: "" },
1824
+ type: { default: "text" },
1825
+ size: { default: "default" },
1826
+ placeholder: { default: "请输入" },
1827
+ disabled: { type: Boolean, default: !1 },
1828
+ clearable: { type: Boolean, default: !0 },
1829
+ showPassword: { type: Boolean, default: !1 },
1830
+ readonly: { type: Boolean, default: !1 },
1831
+ maxlength: { default: void 0 },
1832
+ minlength: { default: void 0 },
1833
+ showWordLimit: { type: Boolean, default: !1 },
1834
+ rows: { default: 2 },
1835
+ autosize: { type: [Boolean, Object], default: !1 },
1836
+ resize: { default: void 0 },
1837
+ prefixIcon: { default: "" },
1838
+ suffixIcon: { default: "" },
1839
+ autocomplete: { default: "off" },
1840
+ name: { default: void 0 },
1841
+ autofocus: { type: Boolean, default: !1 },
1842
+ form: { default: void 0 },
1843
+ tabindex: { default: void 0 },
1844
+ formatter: { type: Function, default: void 0 },
1845
+ parser: { type: Function, default: void 0 },
1846
+ deviceType: { default: void 0 }
1847
+ },
1848
+ emits: ["update:modelValue", "input", "change", "focus", "blur", "clear", "keydown", "mouseenter", "mouseleave", "compositionstart", "compositionupdate", "compositionend"],
1849
+ setup(e, { expose: r, emit: m }) {
1850
+ const t = e, g = Ce(lt, {}), k = R(() => t.deviceType || (g == null ? void 0 : g.inputDeviceType) || ct.inputDeviceType || "pc"), v = m, d = E(), o = E(t.modelValue ?? ""), p = E(!1), B = E(!1), x = E(!1);
1851
+ Se(
1852
+ () => t.modelValue,
1853
+ (h) => {
1854
+ o.value = h ?? "";
1855
+ }
1856
+ );
1857
+ const _ = R(() => t.type === "password" ? B.value ? "text" : "password" : t.type), V = R(() => {
1858
+ const h = String(o.value ?? "");
1859
+ return t.formatter && !x.value ? t.formatter(h) : h;
1860
+ }), A = R(() => {
1861
+ const h = o.value;
1862
+ return h !== "" && h !== null && h !== void 0;
1863
+ }), I = R(() => String(o.value ?? "").length), u = R(() => !t.clearable || !A.value || t.disabled || t.readonly ? !1 : (k.value === "mobile", !0)), ve = zt(), ye = R(() => !!(t.suffixIcon || t.showPassword && t.type === "password" || u.value && t.type !== "textarea" || ve.suffix)), he = R(() => {
1864
+ if (t.type !== "textarea") return {};
1865
+ const h = {};
1866
+ return t.autosize ? h.resize = "none" : t.resize !== void 0 ? h.resize = t.resize : h.resize = "vertical", h;
1867
+ });
1868
+ function H(h) {
1869
+ let ne = h.target.value;
1870
+ t.parser && !x.value && (ne = t.parser(ne));
1871
+ const n = ne === "" ? void 0 : ne;
1872
+ o.value = n, v("update:modelValue", n), v("input", n), t.type === "textarea" && t.autosize && Be(() => {
1873
+ $e();
1874
+ });
1875
+ }
1876
+ function N(h) {
1877
+ p.value = !0, v("focus", h);
1878
+ }
1879
+ function O(h) {
1880
+ p.value = !1;
1881
+ const X = o.value, ne = X === "" ? void 0 : X;
1882
+ v("blur", h), v("change", ne);
1883
+ }
1884
+ function F() {
1885
+ o.value = void 0, v("update:modelValue", void 0), v("input", void 0), v("change", void 0), v("clear"), Be(() => {
1886
+ var h;
1887
+ (h = d.value) == null || h.focus();
1888
+ });
1889
+ }
1890
+ function U() {
1891
+ B.value = !B.value;
1892
+ }
1893
+ function S(h) {
1894
+ if (v("keydown", h), h.key === "Enter" && t.type !== "textarea") {
1895
+ const X = o.value;
1896
+ v("change", X === "" ? void 0 : X);
1897
+ }
1898
+ }
1899
+ function T(h) {
1900
+ v("mouseenter", h);
1901
+ }
1902
+ function M(h) {
1903
+ v("mouseleave", h);
1904
+ }
1905
+ function Y(h) {
1906
+ x.value = !0, v("compositionstart", h);
1907
+ }
1908
+ function me(h) {
1909
+ v("compositionupdate", h);
1910
+ }
1911
+ function ge(h) {
1912
+ x.value = !1, v("compositionend", h), h.target && H(h);
1913
+ }
1914
+ function we() {
1915
+ var h;
1916
+ t.disabled || t.readonly || (h = d.value) == null || h.focus();
1917
+ }
1918
+ function $e() {
1919
+ if (t.type !== "textarea" || !d.value) return;
1920
+ const h = d.value;
1921
+ if (t.autosize) {
1922
+ h.style.height = "auto";
1923
+ const X = h.scrollHeight;
1924
+ if (typeof t.autosize == "object") {
1925
+ const { minRows: ne = 2, maxRows: n } = t.autosize, l = parseInt(getComputedStyle(h).lineHeight) || 20, c = ne * l, $ = n ? n * l : 1 / 0;
1926
+ h.style.height = `${Math.min(Math.max(X, c), $)}px`;
1927
+ } else
1928
+ h.style.height = `${X}px`;
1929
+ }
1930
+ }
1931
+ function b() {
1932
+ var h;
1933
+ (h = d.value) == null || h.focus();
1934
+ }
1935
+ function w() {
1936
+ var h;
1937
+ (h = d.value) == null || h.blur();
1938
+ }
1939
+ function L() {
1940
+ d.value && "select" in d.value && d.value.select();
1941
+ }
1942
+ function ee() {
1943
+ F();
1944
+ }
1945
+ return nt(() => {
1946
+ t.type === "textarea" && t.autosize && $e();
1947
+ }), r({
1948
+ focus: b,
1949
+ blur: w,
1950
+ select: L,
1951
+ clear: ee,
1952
+ resizeTextarea: $e,
1953
+ inputRef: d
1954
+ }), (h, X) => (s(), f("div", {
1955
+ class: j(["rc-input", [
1956
+ `rc-input--${e.size}`,
1957
+ {
1958
+ "is-disabled": e.disabled,
1959
+ "is-focused": p.value,
1960
+ "is-readonly": e.readonly,
1961
+ "rc-input--textarea": e.type === "textarea",
1962
+ "has-prepend": h.$slots.prepend,
1963
+ "has-append": h.$slots.append
1964
+ }
1965
+ ]]),
1966
+ onClick: we
1967
+ }, [
1968
+ h.$slots.prepend ? (s(), f("div", xa, [
1969
+ q(h.$slots, "prepend", {}, void 0, !0)
1970
+ ])) : D("", !0),
1971
+ C("div", {
1972
+ class: j(["rc-input__wrapper", {
1973
+ "has-clear": u.value && e.type !== "textarea",
1974
+ "has-clear-textarea": u.value && e.type === "textarea",
1975
+ "has-clear-mobile": u.value && k.value === "mobile" && e.type !== "textarea",
1976
+ "has-clear-textarea-mobile": u.value && k.value === "mobile" && e.type === "textarea"
1977
+ }])
1978
+ }, [
1979
+ e.prefixIcon || h.$slots.prefix ? (s(), f("div", Da, [
1980
+ q(h.$slots, "prefix", {}, () => [
1981
+ e.prefixIcon ? (s(), te(Q(Z), {
1982
+ key: 0,
1983
+ name: e.prefixIcon,
1984
+ class: "rc-input__prefix-icon"
1985
+ }, null, 8, ["name"])) : D("", !0)
1986
+ ], !0)
1987
+ ])) : D("", !0),
1988
+ e.type === "textarea" ? (s(), f("div", Ca, [
1989
+ (s(), te(vt("textarea"), {
1990
+ ref_key: "inputRef",
1991
+ ref: d,
1992
+ value: V.value,
1993
+ class: "rc-input__field rc-input__field--textarea",
1994
+ placeholder: e.placeholder,
1995
+ disabled: e.disabled,
1996
+ readonly: e.readonly,
1997
+ maxlength: e.maxlength,
1998
+ minlength: e.minlength,
1999
+ rows: e.rows,
2000
+ autocomplete: e.autocomplete,
2001
+ name: e.name,
2002
+ autofocus: e.autofocus,
2003
+ form: e.form,
2004
+ tabindex: e.tabindex,
2005
+ style: le(he.value),
2006
+ onInput: H,
2007
+ onFocus: N,
2008
+ onBlur: O,
2009
+ onKeydown: S,
2010
+ onMouseenter: T,
2011
+ onMouseleave: M,
2012
+ onCompositionstart: Y,
2013
+ onCompositionupdate: me,
2014
+ onCompositionend: ge
2015
+ }, null, 40, ["value", "placeholder", "disabled", "readonly", "maxlength", "minlength", "rows", "autocomplete", "name", "autofocus", "form", "tabindex", "style"])),
2016
+ u.value && e.type === "textarea" ? (s(), f("button", {
2017
+ key: 0,
2018
+ type: "button",
2019
+ class: j(["rc-input__clear rc-input__clear--textarea", { "rc-input__clear--mobile": k.value === "mobile" }]),
2020
+ onClick: Fe(F, ["stop"])
2021
+ }, [
2022
+ G(Q(Z), {
2023
+ name: "icon_close_circle",
2024
+ class: "rc-input__clear-icon"
2025
+ })
2026
+ ], 2)) : D("", !0)
2027
+ ])) : (s(), te(vt("input"), {
2028
+ key: 2,
2029
+ ref_key: "inputRef",
2030
+ ref: d,
2031
+ value: V.value,
2032
+ type: _.value,
2033
+ class: "rc-input__field",
2034
+ placeholder: e.placeholder,
2035
+ disabled: e.disabled,
2036
+ readonly: e.readonly,
2037
+ maxlength: e.maxlength,
2038
+ minlength: e.minlength,
2039
+ autocomplete: e.autocomplete,
2040
+ name: e.name,
2041
+ autofocus: e.autofocus,
2042
+ form: e.form,
2043
+ tabindex: e.tabindex,
2044
+ onInput: H,
2045
+ onFocus: N,
2046
+ onBlur: O,
2047
+ onKeydown: S,
2048
+ onMouseenter: T,
2049
+ onMouseleave: M,
2050
+ onCompositionstart: Y,
2051
+ onCompositionupdate: me,
2052
+ onCompositionend: ge
2053
+ }, null, 40, ["value", "type", "placeholder", "disabled", "readonly", "maxlength", "minlength", "autocomplete", "name", "autofocus", "form", "tabindex"])),
2054
+ ye.value ? (s(), f("div", Sa, [
2055
+ h.$slots.suffix ? (s(), f("div", Ia, [
2056
+ q(h.$slots, "suffix", {}, void 0, !0)
2057
+ ])) : D("", !0),
2058
+ e.showPassword && e.type === "password" && A.value ? (s(), f("button", {
2059
+ key: 1,
2060
+ type: "button",
2061
+ class: "rc-input__password-toggle",
2062
+ onClick: Fe(U, ["stop"])
2063
+ }, [
2064
+ G(Q(Z), {
2065
+ color: B.value ? "#1677ff" : "#999",
2066
+ name: B.value ? "icon_view" : "icon_view-off"
2067
+ }, null, 8, ["color", "name"])
2068
+ ])) : D("", !0),
2069
+ u.value && e.type !== "textarea" ? (s(), f("button", {
2070
+ key: 2,
2071
+ type: "button",
2072
+ class: j(["rc-input__clear", { "rc-input__clear--mobile": k.value === "mobile" }]),
2073
+ onClick: Fe(F, ["stop"])
2074
+ }, [
2075
+ G(Q(Z), {
2076
+ name: "icon_close_circle",
2077
+ class: "rc-input__clear-icon"
2078
+ })
2079
+ ], 2)) : D("", !0),
2080
+ e.suffixIcon && !e.clearable && !e.showPassword ? (s(), te(Q(Z), {
2081
+ key: 3,
2082
+ name: e.suffixIcon,
2083
+ class: "rc-input__suffix-icon"
2084
+ }, null, 8, ["name"])) : D("", !0)
2085
+ ])) : D("", !0),
2086
+ e.showWordLimit && e.maxlength ? (s(), f("span", Ma, P(I.value) + " / " + P(e.maxlength), 1)) : D("", !0)
2087
+ ], 2),
2088
+ h.$slots.append ? (s(), f("div", Ra, [
2089
+ q(h.$slots, "append", {}, void 0, !0)
2090
+ ])) : D("", !0)
2091
+ ], 2));
2092
+ }
2093
+ }), rt = /* @__PURE__ */ se(Va, [["__scopeId", "data-v-050956ab"]]);
2094
+ rt.name = "rc-input";
2095
+ function Ct(e) {
2096
+ return e.component(rt.name, rt), e;
2097
+ }
2098
+ const Ta = /* @__PURE__ */ re({
2099
+ name: "rc-dropdown-menu",
2100
+ __name: "menu",
2101
+ props: {
2102
+ visible: { type: Boolean, default: void 0 },
2103
+ effect: { default: "light" },
2104
+ maxHeight: { default: "" }
2105
+ },
2106
+ emits: ["mouseenter", "mouseleave"],
2107
+ setup(e, { expose: r, emit: m }) {
2108
+ const t = e, g = E(), k = R(() => t.visible === void 0 ? !0 : t.visible), v = R(() => t.visible !== void 0), d = R(() => {
2109
+ const o = {};
2110
+ return t.maxHeight && (o.maxHeight = typeof t.maxHeight == "number" ? `${t.maxHeight}px` : t.maxHeight, o.overflowY = "auto"), o;
2111
+ });
2112
+ return r({
2113
+ menuRef: g
2114
+ }), (o, p) => v.value ? (s(), te(it, {
2115
+ key: 0,
2116
+ to: "body"
2117
+ }, [
2118
+ G(Ee, { name: "rc-dropdown-fade" }, {
2119
+ default: ae(() => [
2120
+ k.value ? (s(), f("ul", {
2121
+ key: 0,
2122
+ ref_key: "menuRef",
2123
+ ref: g,
2124
+ class: j(["rc-dropdown-menu", [`rc-dropdown-menu--${e.effect}`]]),
2125
+ style: le(d.value),
2126
+ onClick: p[0] || (p[0] = Fe(() => {
2127
+ }, ["stop"])),
2128
+ onMouseenter: p[1] || (p[1] = (B) => o.$emit("mouseenter", B)),
2129
+ onMouseleave: p[2] || (p[2] = (B) => o.$emit("mouseleave", B))
2130
+ }, [
2131
+ q(o.$slots, "default", {}, void 0, !0)
2132
+ ], 38)) : D("", !0)
2133
+ ]),
2134
+ _: 3
2135
+ })
2136
+ ])) : (s(), f("ul", {
2137
+ key: 1,
2138
+ ref_key: "menuRef",
2139
+ ref: g,
2140
+ class: j(["rc-dropdown-menu rc-dropdown-menu--nested", [`rc-dropdown-menu--${e.effect}`]]),
2141
+ style: le(d.value),
2142
+ onClick: p[3] || (p[3] = Fe(() => {
2143
+ }, ["stop"])),
2144
+ onMouseenter: p[4] || (p[4] = (B) => o.$emit("mouseenter", B)),
2145
+ onMouseleave: p[5] || (p[5] = (B) => o.$emit("mouseleave", B))
2146
+ }, [
2147
+ q(o.$slots, "default", {}, void 0, !0)
2148
+ ], 38));
2149
+ }
2150
+ }), tt = /* @__PURE__ */ se(Ta, [["__scopeId", "data-v-288e2690"]]), Ea = /* @__PURE__ */ re({
2151
+ name: "rc-dropdown",
2152
+ __name: "index",
2153
+ props: {
2154
+ placement: { default: "bottom" },
2155
+ trigger: { default: "hover" },
2156
+ disabled: { type: Boolean, default: !1 },
2157
+ effect: { default: "light" },
2158
+ maxHeight: { default: "" },
2159
+ hideOnClick: { type: Boolean, default: !0 },
2160
+ showTimeout: { default: 150 },
2161
+ hideTimeout: { default: 150 }
2162
+ },
2163
+ emits: ["command", "visible-change"],
2164
+ setup(e, { expose: r, emit: m }) {
2165
+ const t = e, g = m, k = E(), v = E(), d = E(!1);
2166
+ let o = null, p = null;
2167
+ function B(F) {
2168
+ t.hideOnClick && (d.value = !1), F !== void 0 && g("command", F);
2169
+ }
2170
+ Ve("handleItemClick", B);
2171
+ function x() {
2172
+ t.disabled || (o && (clearTimeout(o), o = null), p && (clearTimeout(p), p = null), o = setTimeout(() => {
2173
+ d.value = !0, requestAnimationFrame(() => {
2174
+ Be(() => {
2175
+ H();
2176
+ });
2177
+ });
2178
+ }, t.showTimeout));
2179
+ }
2180
+ function _() {
2181
+ t.trigger === "hover" && u.value || (p && (clearTimeout(p), p = null), o && (clearTimeout(o), o = null), p = setTimeout(() => {
2182
+ d.value = !1, u.value = !1;
2183
+ }, t.hideTimeout));
2184
+ }
2185
+ function V() {
2186
+ t.disabled || (d.value ? _() : x());
2187
+ }
2188
+ function A() {
2189
+ t.trigger === "hover" && !t.disabled && x();
2190
+ }
2191
+ function I() {
2192
+ t.trigger === "hover" && setTimeout(() => {
2193
+ u.value || _();
2194
+ }, 50);
2195
+ }
2196
+ const u = E(!1);
2197
+ function ve() {
2198
+ t.trigger === "hover" && (u.value = !0, o && (clearTimeout(o), o = null), p && (clearTimeout(p), p = null));
2199
+ }
2200
+ function ye() {
2201
+ t.trigger === "hover" && (u.value = !1, _());
2202
+ }
2203
+ function he(F) {
2204
+ t.trigger === "click" && !t.disabled && (F.stopPropagation(), V());
2205
+ }
2206
+ function H() {
2207
+ var we;
2208
+ if (!k.value || !((we = v.value) != null && we.menuRef)) return;
2209
+ const F = k.value, U = v.value.menuRef;
2210
+ if (!F || !U) return;
2211
+ const S = F.getBoundingClientRect(), T = U.getBoundingClientRect();
2212
+ if (T.width === 0 || T.height === 0) {
2213
+ setTimeout(() => {
2214
+ d.value && H();
2215
+ }, 10);
2216
+ return;
2217
+ }
2218
+ let M = 0, Y = 0;
2219
+ switch (t.placement) {
2220
+ case "top":
2221
+ M = S.top - T.height, Y = S.left;
2222
+ break;
2223
+ case "top-start":
2224
+ M = S.top - T.height, Y = S.left;
2225
+ break;
2226
+ case "top-end":
2227
+ M = S.top - T.height, Y = S.left + S.width - T.width;
2228
+ break;
2229
+ case "bottom":
2230
+ M = S.bottom, Y = S.left + (S.width - T.width) / 2;
2231
+ break;
2232
+ case "bottom-start":
2233
+ M = S.bottom, Y = S.left;
2234
+ break;
2235
+ case "bottom-end":
2236
+ M = S.bottom, Y = S.left + S.width - T.width;
2237
+ break;
2238
+ case "left":
2239
+ M = S.top + (S.height - T.height) / 2, Y = S.left - T.width;
2240
+ break;
2241
+ case "left-start":
2242
+ M = S.top, Y = S.left - T.width;
2243
+ break;
2244
+ case "left-end":
2245
+ M = S.top + S.height - T.height, Y = S.left - T.width;
2246
+ break;
2247
+ case "right":
2248
+ M = S.top + (S.height - T.height) / 2, Y = S.right;
2249
+ break;
2250
+ case "right-start":
2251
+ M = S.top, Y = S.right;
2252
+ break;
2253
+ case "right-end":
2254
+ M = S.top + S.height - T.height, Y = S.right;
2255
+ break;
2256
+ }
2257
+ const me = window.innerWidth, ge = window.innerHeight;
2258
+ Y < 0 && (Y = 8), Y + T.width > me && (Y = me - T.width - 8), M < 0 && (M = 8), M + T.height > ge && (M = ge - T.height - 8), U.style.top = `${M}px`, U.style.left = `${Y}px`, U.style.position = "fixed", U.style.visibility = "visible", U.style.display = "block";
2259
+ }
2260
+ Se(d, (F) => {
2261
+ g("visible-change", F), F ? (requestAnimationFrame(() => {
2262
+ Be(() => {
2263
+ H();
2264
+ });
2265
+ }), document.addEventListener("click", N)) : document.removeEventListener("click", N);
2266
+ });
2267
+ function N(F) {
2268
+ if (t.trigger === "click" && !t.disabled) {
2269
+ const U = F.target;
2270
+ k.value && !k.value.contains(U) && _();
2271
+ }
2272
+ }
2273
+ function O() {
2274
+ d.value && H();
2275
+ }
2276
+ return nt(() => {
2277
+ window.addEventListener("resize", O), window.addEventListener("scroll", O, !0);
2278
+ }), at(() => {
2279
+ o && clearTimeout(o), p && clearTimeout(p), document.removeEventListener("click", N), window.removeEventListener("resize", O), window.removeEventListener("scroll", O, !0);
2280
+ }), r({
2281
+ show: x,
2282
+ hide: _,
2283
+ toggle: V,
2284
+ visible: d
2285
+ }), (F, U) => (s(), f("div", {
2286
+ ref_key: "dropdownRef",
2287
+ ref: k,
2288
+ class: j(["rc-dropdown", { "is-disabled": e.disabled }]),
2289
+ onMouseenter: A,
2290
+ onMouseleave: I,
2291
+ onClick: he
2292
+ }, [
2293
+ q(F.$slots, "default", {}, void 0, !0),
2294
+ G(tt, {
2295
+ ref_key: "menuRef",
2296
+ ref: v,
2297
+ visible: d.value,
2298
+ effect: e.effect,
2299
+ "max-height": e.maxHeight,
2300
+ onMouseenter: ve,
2301
+ onMouseleave: ye
2302
+ }, {
2303
+ default: ae(() => [
2304
+ q(F.$slots, "dropdown", {}, void 0, !0)
2305
+ ]),
2306
+ _: 3
2307
+ }, 8, ["visible", "effect", "max-height"])
2308
+ ], 34));
2309
+ }
2310
+ }), st = /* @__PURE__ */ se(Ea, [["__scopeId", "data-v-30feb4c4"]]), Ba = { class: "rc-dropdown-item__text" }, Aa = /* @__PURE__ */ re({
2311
+ name: "rc-dropdown-item",
2312
+ __name: "item",
2313
+ props: {
2314
+ command: { default: void 0 },
2315
+ disabled: { type: Boolean, default: !1 },
2316
+ divided: { type: Boolean, default: !1 },
2317
+ icon: { default: "" }
2318
+ },
2319
+ setup(e) {
2320
+ const r = e, m = Ce("handleItemClick", () => {
2321
+ });
2322
+ function t(g) {
2323
+ if (r.disabled) {
2324
+ g.stopPropagation();
2325
+ return;
2326
+ }
2327
+ m(r.command);
2328
+ }
2329
+ return (g, k) => (s(), f("li", {
2330
+ class: j(["rc-dropdown-item", {
2331
+ "is-disabled": e.disabled,
2332
+ "is-divided": e.divided
2333
+ }]),
2334
+ onClick: t
2335
+ }, [
2336
+ e.icon ? (s(), te(Z, {
2337
+ key: 0,
2338
+ name: e.icon,
2339
+ class: "rc-dropdown-item__icon"
2340
+ }, null, 8, ["name"])) : D("", !0),
2341
+ C("span", Ba, [
2342
+ q(g.$slots, "default", {}, void 0, !0)
2343
+ ])
2344
+ ], 2));
2345
+ }
2346
+ }), ut = /* @__PURE__ */ se(Aa, [["__scopeId", "data-v-7c739fdf"]]);
2347
+ st.name = "rc-dropdown";
2348
+ tt.name = "rc-dropdown-menu";
2349
+ ut.name = "rc-dropdown-item";
2350
+ function St(e) {
2351
+ return e.component(st.name, st), e.component(tt.name, tt), e.component(ut.name, ut), e;
2352
+ }
2353
+ const lt = Symbol("RECYCLE_UI_CONFIG"), ct = {
688
2354
  prefix: "rc",
689
2355
  autoRegister: !0,
690
- provideKey: re,
2356
+ provideKey: lt,
691
2357
  // 预留主题/其他全局配置
692
2358
  theme: {},
693
2359
  // IconFont 默认配置(可在 app.use 时覆盖)
694
- iconCssUrl: "//at.alicdn.com/t/c/font_4252799_9vcnw0pnmkh.css",
695
- iconClass: "iconfont"
2360
+ iconCssUrl: "//at.alicdn.com/t/c/font_4252799_2vm5jrrzfvq.css",
2361
+ iconClass: "iconfont",
2362
+ // 输入框设备类型默认配置
2363
+ inputDeviceType: "pc"
696
2364
  };
697
- function Rt(e, t) {
698
- t.autoRegister !== !1 && (typeof de == "function" && de(e), typeof fe == "function" && fe(e), typeof ve == "function" && ve(e), typeof pe == "function" && pe(e), typeof he == "function" && he(e), typeof ye == "function" && ye(e), typeof ge == "function" && ge(e));
2365
+ function Fa(e, r) {
2366
+ r.autoRegister !== !1 && (typeof mt == "function" && mt(e), typeof pt == "function" && pt(e), typeof yt == "function" && yt(e), typeof gt == "function" && gt(e), typeof bt == "function" && bt(e), typeof kt == "function" && kt(e), typeof Dt == "function" && Dt(e), typeof $t == "function" && $t(e), typeof _t == "function" && _t(e), typeof Ct == "function" && Ct(e), typeof St == "function" && St(e));
699
2367
  }
700
- const xe = (e, t) => {
701
- const s = { ...Ce, ...t || {} };
702
- if (e.provide(s.provideKey ?? re, s), e.config.globalProperties.$recycleUI = s, typeof window < "u" && s.iconCssUrl) {
703
- const c = `link[rel="stylesheet"][data-rcui-icon="true"][href="${s.iconCssUrl}"]`;
704
- if (!document.head.querySelector(c)) {
705
- const d = document.createElement("link");
706
- d.rel = "stylesheet", d.href = s.iconCssUrl, d.setAttribute("data-rcui-icon", "true"), document.head.appendChild(d);
2368
+ const Vt = (e, r) => {
2369
+ const m = { ...ct, ...r || {} };
2370
+ if (e.provide(m.provideKey ?? lt, m), e.config.globalProperties.$recycleUI = m, typeof window < "u" && m.iconCssUrl) {
2371
+ const t = `link[rel="stylesheet"][data-rcui-icon="true"][href="${m.iconCssUrl}"]`;
2372
+ if (!document.head.querySelector(t)) {
2373
+ const k = document.createElement("link");
2374
+ k.rel = "stylesheet", k.href = m.iconCssUrl, k.setAttribute("data-rcui-icon", "true"), document.head.appendChild(k);
707
2375
  }
708
2376
  }
709
- return Rt(e, s), e;
710
- }, Nt = { install: xe };
711
- function Bt(e) {
2377
+ return Fa(e, m), e;
2378
+ }, Na = { install: Vt };
2379
+ function Wa(e) {
712
2380
  return {
713
- install(t) {
714
- xe(t, e);
2381
+ install(r) {
2382
+ Vt(r, e);
715
2383
  }
716
2384
  };
717
2385
  }
718
2386
  export {
719
- re as RECYCLE_UI_SYMBOL,
720
- J as RcButton,
721
- ee as RcCard,
722
- Dt as RcDescriptions,
723
- Et as RcDescriptionsItem,
724
- M as RcIcon,
725
- _e as RcSearchArea,
726
- ne as RcToast,
727
- Bt as createRecycleUI,
728
- Nt as default,
729
- Ce as defaultRecycleUIConfig,
730
- rt as hideToast,
731
- xe as install,
732
- de as installButton,
733
- ve as installCard,
734
- fe as installDescriptions,
735
- he as installIcon,
736
- ye as installMessage,
737
- ge as installSearchArea,
738
- ft as message,
739
- Dt as rcDescriptions,
740
- Et as rcDescriptionsItem,
741
- Lt as showToast
2387
+ lt as RECYCLE_UI_SYMBOL,
2388
+ xe as RcButton,
2389
+ He as RcCalendar,
2390
+ Ze as RcCard,
2391
+ Ya as RcDescriptions,
2392
+ La as RcDescriptionsItem,
2393
+ st as RcDropdown,
2394
+ ut as RcDropdownItem,
2395
+ tt as RcDropdownMenu,
2396
+ Z as RcIcon,
2397
+ rt as RcInput,
2398
+ We as RcPopup,
2399
+ xt as RcSearchArea,
2400
+ et as RcToast,
2401
+ Wa as createRecycleUI,
2402
+ Na as default,
2403
+ ct as defaultRecycleUIConfig,
2404
+ dn as hideToast,
2405
+ Vt as install,
2406
+ mt as installButton,
2407
+ $t as installCalendar,
2408
+ yt as installCard,
2409
+ pt as installDescriptions,
2410
+ St as installDropdown,
2411
+ bt as installIcon,
2412
+ Ct as installInput,
2413
+ kt as installMessage,
2414
+ _t as installPopup,
2415
+ Dt as installSearchArea,
2416
+ hn as message,
2417
+ Ya as rcDescriptions,
2418
+ La as rcDescriptionsItem,
2419
+ Pa as showToast
742
2420
  };
743
2421
  //# sourceMappingURL=index.mjs.map