ep-craft 0.1.26 → 0.1.27

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 (66) hide show
  1. package/dist/components/date-picker/src/date-picker.js +38 -34
  2. package/dist/components/date-picker/src/props.js +19 -7
  3. package/dist/components/form/src/types.d.ts +1 -1
  4. package/dist/components/scrollbar/index.d.ts +1 -0
  5. package/dist/components/scrollbar/src/util.d.ts +40 -0
  6. package/dist/components/scrollbar/src/util.js +25 -0
  7. package/dist/components/select/select.vue.d.ts +8 -8
  8. package/dist/components/select/src/useSelect.d.ts +2 -2
  9. package/dist/components/select-v2/index.d.ts +6 -2
  10. package/dist/components/select-v2/index.js +7 -4
  11. package/dist/components/select-v2/src/defaults.d.ts +258 -0
  12. package/dist/components/select-v2/src/defaults.js +359 -0
  13. package/dist/components/select-v2/src/group-item.vue.d.ts +40 -0
  14. package/dist/components/select-v2/src/group-item.vue.js +13 -0
  15. package/dist/components/select-v2/src/group-item2.vue.js +33 -0
  16. package/dist/components/select-v2/src/option-item.vue.d.ts +66 -0
  17. package/dist/components/select-v2/src/option-item.vue.js +37 -0
  18. package/dist/components/select-v2/src/option-item2.vue.js +46 -0
  19. package/dist/components/select-v2/src/select-dropdown.d.ts +53 -0
  20. package/dist/components/select-v2/src/select-dropdown.js +209 -0
  21. package/dist/components/select-v2/src/select.types.d.ts +2 -1
  22. package/dist/components/select-v2/src/select.vue.d.ts +918 -0
  23. package/dist/components/select-v2/src/select.vue.js +388 -0
  24. package/dist/components/select-v2/src/select2.vue.js +86 -0
  25. package/dist/components/select-v2/src/token.d.ts +16 -0
  26. package/dist/components/select-v2/src/token.js +6 -0
  27. package/dist/components/select-v2/src/useAllowCreate.d.ts +8 -0
  28. package/dist/components/select-v2/src/useAllowCreate.js +64 -0
  29. package/dist/components/select-v2/src/useOption.d.ts +7 -0
  30. package/dist/components/select-v2/src/useOption.js +13 -0
  31. package/dist/components/select-v2/src/useProps.d.ts +2 -3
  32. package/dist/components/select-v2/src/useSelect.d.ts +129 -0
  33. package/dist/components/select-v2/src/useSelect.js +501 -0
  34. package/dist/components/time-picker/index.js +10 -11
  35. package/dist/components/time-picker/src/common/picker.vue.d.ts +131 -125
  36. package/dist/components/time-picker/src/common/picker.vue.js +163 -160
  37. package/dist/components/time-picker/src/common/props.d.ts +0 -1
  38. package/dist/components/time-picker/src/common/props.js +13 -14
  39. package/dist/components/time-picker/src/time-picker.d.ts +0 -3
  40. package/dist/components/virtual-list/index.d.ts +8 -0
  41. package/dist/components/virtual-list/src/builders/build-list.d.ts +187 -0
  42. package/dist/components/virtual-list/src/builders/build-list.js +363 -0
  43. package/dist/components/virtual-list/src/components/dynamic-size-list.d.ts +186 -0
  44. package/dist/components/virtual-list/src/components/dynamic-size-list.js +112 -0
  45. package/dist/components/virtual-list/src/components/fixed-size-list.d.ts +185 -0
  46. package/dist/components/virtual-list/src/components/fixed-size-list.js +68 -0
  47. package/dist/components/virtual-list/src/components/scrollbar.d.ts +79 -0
  48. package/dist/components/virtual-list/src/components/scrollbar.js +134 -0
  49. package/dist/components/virtual-list/src/defaults.d.ts +27 -0
  50. package/dist/components/virtual-list/src/defaults.js +26 -0
  51. package/dist/components/virtual-list/src/hooks/use-cache.d.ts +1 -0
  52. package/dist/components/virtual-list/src/hooks/use-cache.js +13 -0
  53. package/dist/components/virtual-list/src/hooks/use-wheel.d.ts +13 -0
  54. package/dist/components/virtual-list/src/hooks/use-wheel.js +26 -0
  55. package/dist/components/virtual-list/src/props.d.ts +211 -0
  56. package/dist/components/virtual-list/src/props.js +151 -0
  57. package/dist/components/virtual-list/src/types.d.ts +152 -0
  58. package/dist/components/virtual-list/src/utils.d.ts +16 -0
  59. package/dist/components/virtual-list/src/utils.js +22 -0
  60. package/dist/hooks/use-float-label/index.d.ts +6 -2
  61. package/dist/hooks/use-float-label/index.js +11 -7
  62. package/dist/index.css +1 -1
  63. package/dist/vendored-components.d.ts +1 -1
  64. package/dist/vendored-components.js +1 -0
  65. package/package.json +2 -1
  66. package/theme-chalk/src/float-label.scss +57 -0
@@ -1,12 +1,12 @@
1
- import { defineComponent as He, useAttrs as Ge, inject as Qe, ref as K, computed as u, toRef as Xe, watch as Ze, nextTick as ee, unref as l, onBeforeUnmount as _e, provide as he, openBlock as i, createBlock as d, mergeProps as xe, withCtx as p, renderSlot as ye, withModifiers as O, normalizeStyle as ge, normalizeClass as h, createElementBlock as ea, toDisplayString as ke, createCommentVNode as V, resolveDynamicComponent as L, createElementVNode as aa } from "vue";
1
+ import { defineComponent as He, useAttrs as Ge, inject as Qe, ref as K, computed as u, toRef as Xe, watch as Ze, nextTick as ae, unref as l, onBeforeUnmount as xe, provide as ye, openBlock as i, createBlock as d, mergeProps as _e, withCtx as p, renderSlot as ge, withModifiers as V, normalizeStyle as ke, normalizeClass as h, createElementBlock as ea, toDisplayString as Pe, createCommentVNode as F, resolveDynamicComponent as $, createElementVNode as aa } from "vue";
2
2
  import { onClickOutside as la, unrefElement as oa } from "@vueuse/core";
3
- import { useNamespace as ae } from "../../../../hooks/use-namespace/index.js";
4
- import { NOOP as $, isArray as le } from "@vue/shared";
3
+ import { useNamespace as le } from "../../../../hooks/use-namespace/index.js";
4
+ import { NOOP as A, isArray as oe } from "@vue/shared";
5
5
  import "lodash-unified";
6
6
  import { getEventCode as na } from "../../../../utils/dom/event.js";
7
7
  import { Clock as ta, Calendar as ra } from "@element-plus/icons-vue";
8
- import { EVENT_CODE as F } from "../../../../constants/aria.js";
9
- import { UPDATE_MODEL_EVENT as sa, CHANGE_EVENT as Pe } from "../../../../constants/event.js";
8
+ import { EVENT_CODE as N } from "../../../../constants/aria.js";
9
+ import { UPDATE_MODEL_EVENT as sa, CHANGE_EVENT as Ce } from "../../../../constants/event.js";
10
10
  import "../../../../hooks/use-size/index.js";
11
11
  import "@popperjs/core";
12
12
  import "../../../../hooks/use-z-index/index.js";
@@ -15,25 +15,28 @@ import "../../../../hooks/use-aria/index.js";
15
15
  import "../../../../hooks/use-model-toggle/index.js";
16
16
  import { useEmptyValues as ua } from "../../../../hooks/use-empty-values/index.js";
17
17
  import { useFocusController as ia } from "../../../../hooks/use-focus-controller/index.js";
18
- import { useFloatLabel as pa } from "../../../../hooks/use-float-label/index.js";
18
+ import { floatLabelProp as pa, useFloatLabel as ca } from "../../../../hooks/use-float-label/index.js";
19
19
  import "../../../form/index.js";
20
- import { EpInput as ca } from "../../../input/index.js";
21
- import { EpIcon as A } from "../../../icon/index.js";
22
- import { EpTooltip as da } from "../../../tooltip/index.js";
23
- import { valueEquals as fa, dayOrDaysToDate as oe } from "../utils.js";
24
- import { PICKER_POPPER_OPTIONS_INJECTION_KEY as va, PICKER_BASE_INJECTION_KEY as ma, ROOT_COMMON_PICKER_INJECTION_KEY as ba } from "../constants.js";
25
- import { useCommonPicker as ha } from "../composables/use-common-picker.js";
26
- import { timePickerDefaultProps as ya } from "./props.js";
27
- import ga from "./picker-range-trigger.vue.js";
28
- import { useFormItem as ka } from "../../../form/src/hooks/use-form-item.js";
29
- import { useFormDisabled as Pa, useFormSize as Ca } from "../../../form/src/hooks/use-form-common-props.js";
20
+ import { EpInput as da } from "../../../input/index.js";
21
+ import { EpIcon as z } from "../../../icon/index.js";
22
+ import { EpTooltip as fa } from "../../../tooltip/index.js";
23
+ import { valueEquals as va, dayOrDaysToDate as ne } from "../utils.js";
24
+ import { PICKER_POPPER_OPTIONS_INJECTION_KEY as ma, PICKER_BASE_INJECTION_KEY as ba, ROOT_COMMON_PICKER_INJECTION_KEY as ha } from "../constants.js";
25
+ import { useCommonPicker as ya } from "../composables/use-common-picker.js";
26
+ import { timePickerDefaultProps as ga } from "./props.js";
27
+ import ka from "./picker-range-trigger.vue.js";
28
+ import { useFormItem as Pa } from "../../../form/src/hooks/use-form-item.js";
29
+ import { useFormDisabled as Ca, useFormSize as Ea } from "../../../form/src/hooks/use-form-common-props.js";
30
30
  const _a = /* @__PURE__ */ He({
31
31
  name: "Picker",
32
32
  __name: "picker",
33
- props: ya,
33
+ props: {
34
+ ...ga,
35
+ floatLabelEnabled: pa.floatLabel
36
+ },
34
37
  emits: [
35
38
  sa,
36
- Pe,
39
+ Ce,
37
40
  "focus",
38
41
  "blur",
39
42
  "clear",
@@ -42,25 +45,25 @@ const _a = /* @__PURE__ */ He({
42
45
  "visible-change",
43
46
  "keydown"
44
47
  ],
45
- setup(Ce, { expose: Ee, emit: we }) {
46
- const o = Ce, g = we, Ie = Ge(), f = ae("date"), C = ae("input"), k = ae("range"), { formItem: v } = ka(), Oe = Qe(
47
- va,
48
+ setup(C, { expose: Ee, emit: we }) {
49
+ const o = C, g = we, Ie = Ge(), f = le("date"), E = le("input"), k = le("range"), { formItem: v } = Pa(), Oe = Qe(
50
+ ma,
48
51
  {}
49
- ), E = ua(o, null), z = K(), b = K(), U = K(null);
50
- let J = !1;
51
- const c = Pa(), ne = ha(o, g), {
52
- parsedValue: N,
53
- pickerActualVisible: Y,
52
+ ), w = ua(o, null), U = K(), b = K(), J = K(null);
53
+ let Y = !1;
54
+ const c = Ca(), te = ya(o, g), {
55
+ parsedValue: S,
56
+ pickerActualVisible: j,
54
57
  userInput: n,
55
58
  pickerVisible: r,
56
59
  pickerOptions: m,
57
60
  valueIsEmpty: y,
58
- emitInput: w,
59
- onPick: j,
60
- onSetPickerOption: te,
61
- onCalendarChange: re,
62
- onPanelChange: se
63
- } = ne, { isFocused: S, handleFocus: ue, handleBlur: ie } = ia(b, {
61
+ emitInput: I,
62
+ onPick: W,
63
+ onSetPickerOption: re,
64
+ onCalendarChange: se,
65
+ onPanelChange: ue
66
+ } = te, { isFocused: T, handleFocus: ie, handleBlur: pe } = ia(b, {
64
67
  disabled: c,
65
68
  beforeFocus() {
66
69
  return o.readonly;
@@ -70,41 +73,41 @@ const _a = /* @__PURE__ */ He({
70
73
  },
71
74
  beforeBlur(e) {
72
75
  var a;
73
- return !J && ((a = z.value) == null ? void 0 : a.isFocusInsideContent(e));
76
+ return !Y && ((a = U.value) == null ? void 0 : a.isFocusInsideContent(e));
74
77
  },
75
78
  afterBlur() {
76
79
  var e, a, t, s;
77
- T.value && !o.saveOnBlur ? y.value || (a = (e = m.value).handleCancel) == null || a.call(e) : _(), r.value = !1, J = !1, o.validateEvent && ((s = (t = v == null ? void 0 : v.validate) == null ? void 0 : t.call(v, "blur")) == null || s.catch($));
80
+ D.value && !o.saveOnBlur ? y.value || (a = (e = m.value).handleCancel) == null || a.call(e) : _(), r.value = !1, Y = !1, o.validateEvent && ((s = (t = v == null ? void 0 : v.validate) == null ? void 0 : t.call(v, "blur")) == null || s.catch(A));
78
81
  }
79
- }), { floatLabelClass: Ve } = pa({
80
- floatLabel: Xe(o, "floatLabel"),
81
- isFocused: u(() => r.value || S.value),
82
+ }), { floatLabelClass: Ve } = ca({
83
+ floatLabel: Xe(o, "floatLabelEnabled"),
84
+ isFocused: u(() => r.value || T.value),
82
85
  hasValue: u(() => !y.value),
83
86
  isDisabled: c
84
- }), W = K(!1), Fe = u(() => [
87
+ }), q = K(!1), Fe = u(() => [
85
88
  f.b("editor"),
86
89
  f.bm("editor", o.type),
87
- C.e("wrapper"),
90
+ E.e("wrapper"),
88
91
  f.is("disabled", c.value),
89
92
  f.is("active", r.value),
90
93
  k.b("editor"),
91
- X ? k.bm("editor", X.value) : "",
94
+ Z ? k.bm("editor", Z.value) : "",
92
95
  Ie.class
93
96
  ]), Ne = u(() => [
94
- C.e("icon"),
97
+ E.e("icon"),
95
98
  k.e("close-icon"),
96
- H.value ? "" : k.em("close-icon", "hidden")
99
+ G.value ? "" : k.em("close-icon", "hidden")
97
100
  ]);
98
101
  Ze(r, (e) => {
99
- e ? ee(() => {
100
- e && (U.value = o.modelValue);
101
- }) : (n.value = null, ee(() => {
102
- q(o.modelValue);
102
+ e ? ae(() => {
103
+ e && (J.value = o.modelValue);
104
+ }) : (n.value = null, ae(() => {
105
+ H(o.modelValue);
103
106
  }));
104
107
  });
105
- const q = (e, a) => {
108
+ const H = (e, a) => {
106
109
  var t, s;
107
- (a || !fa(e, U.value)) && (g(Pe, e), a && (U.value = e), o.validateEvent && ((s = (t = v == null ? void 0 : v.validate) == null ? void 0 : t.call(v, "change")) == null || s.catch($)));
110
+ (a || !va(e, J.value)) && (g(Ce, e), a && (J.value = e), o.validateEvent && ((s = (t = v == null ? void 0 : v.validate) == null ? void 0 : t.call(v, "change")) == null || s.catch(A)));
108
111
  }, Se = (e) => {
109
112
  g("keydown", e);
110
113
  }, Te = u(() => b.value ? Array.from(
@@ -113,75 +116,75 @@ const _a = /* @__PURE__ */ He({
113
116
  const s = Te.value;
114
117
  s.length && (!t || t === "min" ? (s[0].setSelectionRange(e, a), s[0].focus()) : t === "max" && (s[1].setSelectionRange(e, a), s[1].focus()));
115
118
  }, Me = () => {
116
- Y.value = !0;
119
+ j.value = !0;
117
120
  }, Re = () => {
118
121
  g("visible-change", !0);
119
- }, pe = () => {
120
- Y.value = !1, r.value = !1, g("visible-change", !1);
122
+ }, ce = () => {
123
+ j.value = !1, r.value = !1, g("visible-change", !1);
121
124
  }, Be = () => {
122
125
  r.value = !0;
123
- }, Ke = () => {
126
+ }, Le = () => {
124
127
  r.value = !1;
125
128
  }, P = u(() => {
126
- const e = x(N.value);
127
- return le(n.value) ? [
129
+ const e = ee(S.value);
130
+ return oe(n.value) ? [
128
131
  n.value[0] ?? (e && e[0]) ?? "",
129
132
  n.value[1] ?? (e && e[1]) ?? ""
130
- ] : n.value !== null ? n.value : T.value && y.value && !o.saveOnBlur || !T.value && y.value || !r.value && y.value ? "" : e ? ce.value || de.value || fe.value ? e.join(", ") : e : "";
131
- }), Le = u(() => o.type.includes("time")), T = u(() => o.type.startsWith("time")), ce = u(() => o.type === "dates"), de = u(() => o.type === "months"), fe = u(() => o.type === "years"), D = u(
132
- () => o.prefixIcon || (Le.value ? ta : ra)
133
- ), H = u(
134
- () => o.clearable && !c.value && !o.readonly && !y.value && (W.value || S.value)
135
- ), G = (e) => {
136
- o.readonly || c.value || (H.value && (e == null || e.stopPropagation(), m.value.handleClear ? m.value.handleClear() : w(E.valueOnClear.value), q(E.valueOnClear.value, !0), pe()), g("clear"));
137
- }, M = async (e) => {
133
+ ] : n.value !== null ? n.value : D.value && y.value && !o.saveOnBlur || !D.value && y.value || !r.value && y.value ? "" : e ? de.value || fe.value || ve.value ? e.join(", ") : e : "";
134
+ }), Ke = u(() => o.type.includes("time")), D = u(() => o.type.startsWith("time")), de = u(() => o.type === "dates"), fe = u(() => o.type === "months"), ve = u(() => o.type === "years"), M = u(
135
+ () => o.prefixIcon || (Ke.value ? ta : ra)
136
+ ), G = u(
137
+ () => o.clearable && !c.value && !o.readonly && !y.value && (q.value || T.value)
138
+ ), Q = (e) => {
139
+ o.readonly || c.value || (G.value && (e == null || e.stopPropagation(), m.value.handleClear ? m.value.handleClear() : I(w.valueOnClear.value), H(w.valueOnClear.value, !0), ce()), g("clear"));
140
+ }, R = async (e) => {
138
141
  var a;
139
- o.readonly || c.value || (((a = e.target) == null ? void 0 : a.tagName) !== "INPUT" || S.value || !o.automaticDropdown) && (r.value = !0);
140
- }, ve = () => {
141
- o.readonly || c.value || !y.value && o.clearable && (W.value = !0);
142
+ o.readonly || c.value || (((a = e.target) == null ? void 0 : a.tagName) !== "INPUT" || T.value || !o.automaticDropdown) && (r.value = !0);
142
143
  }, me = () => {
143
- W.value = !1;
144
- }, Q = (e) => {
144
+ o.readonly || c.value || !y.value && o.clearable && (q.value = !0);
145
+ }, be = () => {
146
+ q.value = !1;
147
+ }, X = (e) => {
145
148
  var a;
146
- o.readonly || c.value || (((a = e.touches[0].target) == null ? void 0 : a.tagName) !== "INPUT" || S.value || !o.automaticDropdown) && (r.value = !0);
147
- }, $e = u(() => o.type.includes("range")), X = Ca(), Ae = u(() => {
149
+ o.readonly || c.value || (((a = e.touches[0].target) == null ? void 0 : a.tagName) !== "INPUT" || T.value || !o.automaticDropdown) && (r.value = !0);
150
+ }, $e = u(() => o.type.includes("range")), Z = Ea(), Ae = u(() => {
148
151
  var e, a;
149
- return (a = (e = l(z)) == null ? void 0 : e.popperRef) == null ? void 0 : a.contentRef;
150
- }), Z = la(
152
+ return (a = (e = l(U)) == null ? void 0 : e.popperRef) == null ? void 0 : a.contentRef;
153
+ }), x = la(
151
154
  b,
152
155
  (e) => {
153
156
  const a = l(Ae), t = oa(b);
154
157
  a && (e.target === a || e.composedPath().includes(a)) || e.target === t || t && e.composedPath().includes(t) || (r.value = !1);
155
158
  }
156
159
  );
157
- _e(() => {
158
- Z == null || Z();
160
+ xe(() => {
161
+ x == null || x();
159
162
  });
160
163
  const _ = () => {
161
- if (T.value && !o.saveOnBlur) return;
162
- const e = le(n.value) && n.value.every((a) => a === "");
164
+ if (D.value && !o.saveOnBlur) return;
165
+ const e = oe(n.value) && n.value.every((a) => a === "");
163
166
  if (n.value && !e) {
164
- const a = R(P.value);
165
- a && (B(a) && w(oe(a)), n.value = null);
167
+ const a = B(P.value);
168
+ a && (L(a) && I(ne(a)), n.value = null);
166
169
  }
167
- (n.value === "" || e) && (w(E.valueOnClear.value), q(E.valueOnClear.value, !0), n.value = null);
168
- }, R = (e) => e ? m.value.parseUserInput(e) : null, x = (e) => e ? le(e) ? e.map((t) => t.format(o.format)) : e.format(o.format) : null, B = (e) => m.value.isValidValue(e), be = async (e) => {
170
+ (n.value === "" || e) && (I(w.valueOnClear.value), H(w.valueOnClear.value, !0), n.value = null);
171
+ }, B = (e) => e ? m.value.parseUserInput(e) : null, ee = (e) => e ? oe(e) ? e.map((t) => t.format(o.format)) : e.format(o.format) : null, L = (e) => m.value.isValidValue(e), he = async (e) => {
169
172
  if (o.readonly || c.value) return;
170
173
  const a = na(e);
171
- if (Se(e), a === F.esc) {
174
+ if (Se(e), a === N.esc) {
172
175
  r.value === !0 && (r.value = !1, e.preventDefault(), e.stopPropagation());
173
176
  return;
174
177
  }
175
- if (a === F.down && (m.value.handleFocusPicker && (e.preventDefault(), e.stopPropagation()), r.value === !1 && (r.value = !0, await ee()), m.value.handleFocusPicker)) {
178
+ if (a === N.down && (m.value.handleFocusPicker && (e.preventDefault(), e.stopPropagation()), r.value === !1 && (r.value = !0, await ae()), m.value.handleFocusPicker)) {
176
179
  m.value.handleFocusPicker();
177
180
  return;
178
181
  }
179
- if (a === F.tab) {
180
- J = !0;
182
+ if (a === N.tab) {
183
+ Y = !0;
181
184
  return;
182
185
  }
183
- if (a === F.enter || a === F.numpadEnter) {
184
- r.value ? (n.value === null || n.value === "" || B(R(P.value))) && (_(), r.value = !1) : r.value = !0, e.preventDefault(), e.stopPropagation();
186
+ if (a === N.enter || a === N.numpadEnter) {
187
+ r.value ? (n.value === null || n.value === "" || L(B(P.value))) && (_(), r.value = !1) : r.value = !0, e.preventDefault(), e.stopPropagation();
185
188
  return;
186
189
  }
187
190
  if (n.value) {
@@ -199,25 +202,25 @@ const _a = /* @__PURE__ */ He({
199
202
  n.value ? n.value = [n.value[0], a.value] : n.value = [null, a.value];
200
203
  }, Ye = () => {
201
204
  var s;
202
- const e = n.value, a = R(e && e[0]), t = l(N);
205
+ const e = n.value, a = B(e && e[0]), t = l(S);
203
206
  if (a && a.isValid()) {
204
207
  n.value = [
205
- x(a),
208
+ ee(a),
206
209
  ((s = P.value) == null ? void 0 : s[1]) || null
207
210
  ];
208
- const I = [a, t && (t[1] || null)];
209
- B(I) && (w(oe(I)), n.value = null);
211
+ const O = [a, t && (t[1] || null)];
212
+ L(O) && (I(ne(O)), n.value = null);
210
213
  }
211
214
  }, je = () => {
212
215
  var s;
213
- const e = l(n), a = R(e && e[1]), t = l(N);
216
+ const e = l(n), a = B(e && e[1]), t = l(S);
214
217
  if (a && a.isValid()) {
215
218
  n.value = [
216
219
  ((s = l(P)) == null ? void 0 : s[0]) || null,
217
- x(a)
220
+ ee(a)
218
221
  ];
219
- const I = [t && t[0], a];
220
- B(I) && (w(oe(I)), n.value = null);
222
+ const O = [t && t[0], a];
223
+ L(O) && (I(ne(O)), n.value = null);
221
224
  }
222
225
  }, We = () => {
223
226
  var e;
@@ -226,10 +229,10 @@ const _a = /* @__PURE__ */ He({
226
229
  var e;
227
230
  (e = b.value) == null || e.blur();
228
231
  };
229
- return he(ma, {
232
+ return ye(ba, {
230
233
  props: o,
231
- emptyValues: E
232
- }), he(ba, ne), Ee({
234
+ emptyValues: w
235
+ }), ye(ha, te), Ee({
233
236
  /**
234
237
  * @description focus input box.
235
238
  */
@@ -245,14 +248,14 @@ const _a = /* @__PURE__ */ He({
245
248
  /**
246
249
  * @description closes picker
247
250
  */
248
- handleClose: Ke,
251
+ handleClose: Le,
249
252
  /**
250
253
  * @description pick item manually
251
254
  */
252
- onPick: j
253
- }), (e, a) => (i(), d(l(da), xe({
255
+ onPick: W
256
+ }), (e, a) => (i(), d(l(fa), _e({
254
257
  ref_key: "refPopper",
255
- ref: z,
258
+ ref: U,
256
259
  visible: l(r),
257
260
  effect: "light",
258
261
  pure: "",
@@ -272,10 +275,10 @@ const _a = /* @__PURE__ */ He({
272
275
  persistent: "",
273
276
  onBeforeShow: Me,
274
277
  onShow: Re,
275
- onHide: pe
278
+ onHide: ce
276
279
  }), {
277
280
  default: p(() => [
278
- $e.value ? (i(), d(ga, {
281
+ $e.value ? (i(), d(ka, {
279
282
  key: 1,
280
283
  id: (
281
284
  // https://github.com/vuejs/language-tools/issues/2104#issuecomment-3092541527
@@ -293,59 +296,59 @@ const _a = /* @__PURE__ */ He({
293
296
  "start-placeholder": e.startPlaceholder,
294
297
  "end-placeholder": e.endPlaceholder,
295
298
  placeholder: e.placeholder,
296
- "float-label": e.floatLabel,
299
+ "float-label": C.floatLabelEnabled,
297
300
  class: h(Fe.value),
298
- style: ge(e.$attrs.style),
301
+ style: ke(e.$attrs.style),
299
302
  "aria-label": e.ariaLabel,
300
303
  tabindex: e.tabindex,
301
304
  autocomplete: "off",
302
305
  role: "combobox",
303
- onClick: M,
304
- onFocus: l(ue),
305
- onBlur: l(ie),
306
+ onClick: R,
307
+ onFocus: l(ie),
308
+ onBlur: l(pe),
306
309
  onStartInput: Ue,
307
310
  onStartChange: Ye,
308
311
  onEndInput: Je,
309
312
  onEndChange: je,
310
- onMousedown: M,
311
- onMouseenter: ve,
312
- onMouseleave: me,
313
- onTouchstartPassive: Q,
314
- onKeydown: be
313
+ onMousedown: R,
314
+ onMouseenter: me,
315
+ onMouseleave: be,
316
+ onTouchstartPassive: X,
317
+ onKeydown: he
315
318
  }, {
316
319
  prefix: p(() => [
317
- D.value ? (i(), d(l(A), {
320
+ M.value ? (i(), d(l(z), {
318
321
  key: 0,
319
- class: h([l(C).e("icon"), l(k).e("icon")])
322
+ class: h([l(E).e("icon"), l(k).e("icon")])
320
323
  }, {
321
324
  default: p(() => [
322
- (i(), d(L(D.value)))
325
+ (i(), d($(M.value)))
323
326
  ]),
324
327
  _: 1
325
- }, 8, ["class"])) : V("", !0)
328
+ }, 8, ["class"])) : F("", !0)
326
329
  ]),
327
330
  "range-separator": p(() => [
328
- ye(e.$slots, "range-separator", {}, () => [
331
+ ge(e.$slots, "range-separator", {}, () => [
329
332
  aa("span", {
330
333
  class: h(l(k).b("separator"))
331
- }, ke(e.rangeSeparator), 3)
334
+ }, Pe(e.rangeSeparator), 3)
332
335
  ])
333
336
  ]),
334
337
  suffix: p(() => [
335
- e.clearIcon ? (i(), d(l(A), {
338
+ e.clearIcon ? (i(), d(l(z), {
336
339
  key: 0,
337
340
  class: h(Ne.value),
338
- onMousedown: O(l($), ["prevent"]),
339
- onClick: G
341
+ onMousedown: V(l(A), ["prevent"]),
342
+ onClick: Q
340
343
  }, {
341
344
  default: p(() => [
342
- (i(), d(L(e.clearIcon)))
345
+ (i(), d($(e.clearIcon)))
343
346
  ]),
344
347
  _: 1
345
- }, 8, ["class", "onMousedown"])) : V("", !0)
348
+ }, 8, ["class", "onMousedown"])) : F("", !0)
346
349
  ]),
347
350
  _: 3
348
- }, 8, ["id", "model-value", "name", "disabled", "readonly", "start-placeholder", "end-placeholder", "placeholder", "float-label", "class", "style", "aria-label", "tabindex", "onFocus", "onBlur"])) : (i(), d(l(ca), {
351
+ }, 8, ["id", "model-value", "name", "disabled", "readonly", "start-placeholder", "end-placeholder", "placeholder", "float-label", "class", "style", "aria-label", "tabindex", "onFocus", "onBlur"])) : (i(), d(l(da), {
349
352
  key: 0,
350
353
  id: (
351
354
  // https://github.com/vuejs/language-tools/issues/2104#issuecomment-3092541527
@@ -362,73 +365,73 @@ const _a = /* @__PURE__ */ He({
362
365
  // https://github.com/vuejs/language-tools/issues/2104#issuecomment-3092541527
363
366
  e.name
364
367
  ),
365
- size: l(X),
368
+ size: l(Z),
366
369
  disabled: l(c),
367
- placeholder: e.floatLabel ? void 0 : e.placeholder,
370
+ placeholder: C.floatLabelEnabled ? void 0 : e.placeholder,
368
371
  class: h([
369
372
  l(f).b("editor"),
370
373
  l(f).bm("editor", e.type),
371
374
  l(f).is("focus", l(r)),
372
- l(f).is("float-label", e.floatLabel),
375
+ l(f).is("float-label", C.floatLabelEnabled),
373
376
  e.$attrs.class
374
377
  ]),
375
- style: ge(e.$attrs.style),
376
- readonly: !e.editable || e.readonly || ce.value || de.value || fe.value || e.type === "week",
378
+ style: ke(e.$attrs.style),
379
+ readonly: !e.editable || e.readonly || de.value || fe.value || ve.value || e.type === "week",
377
380
  "aria-label": e.ariaLabel,
378
381
  tabindex: e.tabindex,
379
382
  "validate-event": !1,
380
383
  onInput: ze,
381
- onFocus: l(ue),
382
- onBlur: l(ie),
383
- onKeydown: be,
384
+ onFocus: l(ie),
385
+ onBlur: l(pe),
386
+ onKeydown: he,
384
387
  onChange: _,
385
- onMousedown: M,
386
- onMouseenter: ve,
387
- onMouseleave: me,
388
- onTouchstartPassive: Q,
389
- onClick: a[0] || (a[0] = O(() => {
388
+ onMousedown: R,
389
+ onMouseenter: me,
390
+ onMouseleave: be,
391
+ onTouchstartPassive: X,
392
+ onClick: a[0] || (a[0] = V(() => {
390
393
  }, ["stop"]))
391
394
  }, {
392
395
  prefix: p(() => [
393
- D.value ? (i(), d(l(A), {
396
+ M.value ? (i(), d(l(z), {
394
397
  key: 0,
395
- class: h(l(C).e("icon")),
396
- onMousedown: O(M, ["prevent"]),
397
- onTouchstartPassive: Q
398
+ class: h(l(E).e("icon")),
399
+ onMousedown: V(R, ["prevent"]),
400
+ onTouchstartPassive: X
398
401
  }, {
399
402
  default: p(() => [
400
- (i(), d(L(D.value)))
403
+ (i(), d($(M.value)))
401
404
  ]),
402
405
  _: 1
403
- }, 8, ["class"])) : V("", !0)
406
+ }, 8, ["class"])) : F("", !0)
404
407
  ]),
405
408
  suffix: p(() => [
406
- H.value && e.clearIcon ? (i(), d(l(A), {
409
+ G.value && e.clearIcon ? (i(), d(l(z), {
407
410
  key: 0,
408
- class: h(`${l(C).e("icon")} clear-icon`),
409
- onMousedown: O(l($), ["prevent"]),
410
- onClick: G
411
+ class: h(`${l(E).e("icon")} clear-icon`),
412
+ onMousedown: V(l(A), ["prevent"]),
413
+ onClick: Q
411
414
  }, {
412
415
  default: p(() => [
413
- (i(), d(L(e.clearIcon)))
416
+ (i(), d($(e.clearIcon)))
414
417
  ]),
415
418
  _: 1
416
- }, 8, ["class", "onMousedown"])) : V("", !0)
419
+ }, 8, ["class", "onMousedown"])) : F("", !0)
417
420
  ]),
418
421
  default: p(() => [
419
- e.floatLabel ? (i(), ea("span", {
422
+ C.floatLabelEnabled ? (i(), ea("span", {
420
423
  key: 0,
421
424
  class: h(["el-float-label", l(Ve)])
422
- }, ke(e.placeholder), 3)) : V("", !0)
425
+ }, Pe(e.placeholder), 3)) : F("", !0)
423
426
  ]),
424
427
  _: 1
425
428
  }, 8, ["id", "model-value", "name", "size", "disabled", "placeholder", "class", "style", "readonly", "aria-label", "tabindex", "onFocus", "onBlur"]))
426
429
  ]),
427
430
  content: p(() => [
428
- ye(e.$slots, "default", {
431
+ ge(e.$slots, "default", {
429
432
  visible: l(r),
430
- actualVisible: l(Y),
431
- parsedValue: l(N),
433
+ actualVisible: l(j),
434
+ parsedValue: l(S),
432
435
  format: e.format,
433
436
  dateFormat: e.dateFormat,
434
437
  timeFormat: e.timeFormat,
@@ -441,16 +444,16 @@ const _a = /* @__PURE__ */ He({
441
444
  showWeekNumber: e.showWeekNumber,
442
445
  singlePanel: e.singlePanel,
443
446
  onPick: a[1] || (a[1] = //@ts-ignore
444
- (...t) => l(j) && l(j)(...t)),
447
+ (...t) => l(W) && l(W)(...t)),
445
448
  onSelectRange: De,
446
449
  onSetPickerOption: a[2] || (a[2] = //@ts-ignore
447
- (...t) => l(te) && l(te)(...t)),
448
- onCalendarChange: a[3] || (a[3] = //@ts-ignore
449
450
  (...t) => l(re) && l(re)(...t)),
450
- onClear: G,
451
- onPanelChange: a[4] || (a[4] = //@ts-ignore
451
+ onCalendarChange: a[3] || (a[3] = //@ts-ignore
452
452
  (...t) => l(se) && l(se)(...t)),
453
- onMousedown: a[5] || (a[5] = O(() => {
453
+ onClear: Q,
454
+ onPanelChange: a[4] || (a[4] = //@ts-ignore
455
+ (...t) => l(ue) && l(ue)(...t)),
456
+ onMousedown: a[5] || (a[5] = V(() => {
454
457
  }, ["stop"]))
455
458
  })
456
459
  ]),
@@ -12,7 +12,6 @@ export type GetDisabledHours = (role: string, comparingDate?: Dayjs) => number[]
12
12
  export type GetDisabledMinutes = (hour: number, role: string, comparingDate?: Dayjs) => number[];
13
13
  export type GetDisabledSeconds = (hour: number, minute: number, role: string, comparingDate?: Dayjs) => number[];
14
14
  export declare const timePickerDefaultProps: {
15
- readonly floatLabel: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
16
15
  readonly showNow: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
17
16
  readonly showConfirm: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
18
17
  readonly showFooter: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
@@ -1,17 +1,17 @@
1
- import { placements as a } from "@popperjs/core";
1
+ import { placements as o } from "@popperjs/core";
2
2
  import "@vue/shared";
3
3
  import "lodash-unified";
4
4
  import "@vueuse/core";
5
- import { CircleClose as l } from "@element-plus/icons-vue";
5
+ import { CircleClose as a } from "@element-plus/icons-vue";
6
6
  import { buildProps as r, definePropType as e } from "../../../../utils/vue/props/runtime.js";
7
7
  import "vue";
8
- import { useSizeProp as p } from "../../../../hooks/use-size/index.js";
8
+ import { useSizeProp as l } from "../../../../hooks/use-size/index.js";
9
9
  import "../../../../hooks/use-z-index/index.js";
10
10
  import "../../../../hooks/use-delayed-toggle/index.js";
11
- import { useAriaProps as i } from "../../../../hooks/use-aria/index.js";
11
+ import { useAriaProps as p } from "../../../../hooks/use-aria/index.js";
12
12
  import "../../../../hooks/use-model-toggle/index.js";
13
- import { useEmptyValuesProps as n } from "../../../../hooks/use-empty-values/index.js";
14
- import { floatLabelProp as o } from "../../../../hooks/use-float-label/index.js";
13
+ import { useEmptyValuesProps as i } from "../../../../hooks/use-empty-values/index.js";
14
+ import { floatLabelProp as n } from "../../../../hooks/use-float-label/index.js";
15
15
  import "../../../tooltip/index.js";
16
16
  import { disabledTimeListsProps as d } from "../props/shared.js";
17
17
  import { useTooltipContentProps as t } from "../../../tooltip/src/content.js";
@@ -78,7 +78,7 @@ const F = r({
78
78
  */
79
79
  clearIcon: {
80
80
  type: e([String, Object]),
81
- default: l
81
+ default: a
82
82
  },
83
83
  /**
84
84
  * @description whether the input is editable
@@ -104,7 +104,7 @@ const F = r({
104
104
  /**
105
105
  * @description size of Input
106
106
  */
107
- size: p,
107
+ size: l,
108
108
  /**
109
109
  * @description whether TimePicker is read only
110
110
  */
@@ -219,7 +219,7 @@ const F = r({
219
219
  */
220
220
  placement: {
221
221
  type: e(String),
222
- values: a,
222
+ values: o,
223
223
  default: "bottom"
224
224
  },
225
225
  /**
@@ -229,8 +229,8 @@ const F = r({
229
229
  type: e(Array),
230
230
  default: ["bottom", "top", "right", "left"]
231
231
  },
232
- ...n,
233
- ...i(["ariaLabel"]),
232
+ ...i,
233
+ ...p(["ariaLabel"]),
234
234
  /**
235
235
  * @description whether to show the now button
236
236
  */
@@ -255,8 +255,7 @@ const F = r({
255
255
  /**
256
256
  * @description whether to show the number of the calendar week
257
257
  */
258
- showWeekNumber: Boolean,
259
- ...o
258
+ showWeekNumber: Boolean
260
259
  }), k = r({
261
260
  id: {
262
261
  type: e(Array)
@@ -274,7 +273,7 @@ const F = r({
274
273
  */
275
274
  placeholder: String,
276
275
  disabled: Boolean,
277
- ...o
276
+ ...n
278
277
  });
279
278
  export {
280
279
  F as timePickerDefaultProps,