ep-craft 0.1.25 → 0.1.26

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 (147) hide show
  1. package/dist/_virtual/_commonjsHelpers.js +8 -0
  2. package/dist/_virtual/advancedFormat.js +4 -0
  3. package/dist/_virtual/customParseFormat.js +4 -0
  4. package/dist/_virtual/dayOfYear.js +4 -0
  5. package/dist/_virtual/isSameOrAfter.js +4 -0
  6. package/dist/_virtual/isSameOrBefore.js +4 -0
  7. package/dist/_virtual/localeData.js +4 -0
  8. package/dist/_virtual/weekOfYear.js +4 -0
  9. package/dist/_virtual/weekYear.js +4 -0
  10. package/dist/components/button/index.js +2 -1
  11. package/dist/components/date-picker/index.d.ts +4 -2
  12. package/dist/components/date-picker/index.js +9 -4
  13. package/dist/components/date-picker/src/date-picker.d.ts +435 -0
  14. package/dist/components/date-picker/src/date-picker.js +68 -0
  15. package/dist/components/date-picker/src/instance.d.ts +8 -0
  16. package/dist/components/date-picker/src/props.d.ts +205 -0
  17. package/dist/components/date-picker/src/props.js +21 -0
  18. package/dist/components/date-picker-panel/index.d.ts +8 -0
  19. package/dist/components/date-picker-panel/index.js +11 -0
  20. package/dist/components/date-picker-panel/src/composables/use-basic-date-table.d.ts +187 -0
  21. package/dist/components/date-picker-panel/src/composables/use-basic-date-table.js +195 -0
  22. package/dist/components/date-picker-panel/src/composables/use-month-range-header.d.ts +16 -0
  23. package/dist/components/date-picker-panel/src/composables/use-month-range-header.js +41 -0
  24. package/dist/components/date-picker-panel/src/composables/use-panel-date-range.d.ts +29 -0
  25. package/dist/components/date-picker-panel/src/composables/use-panel-date-range.js +86 -0
  26. package/dist/components/date-picker-panel/src/composables/use-range-picker.d.ts +209 -0
  27. package/dist/components/date-picker-panel/src/composables/use-range-picker.js +102 -0
  28. package/dist/components/date-picker-panel/src/composables/use-shortcut.d.ts +9 -0
  29. package/dist/components/date-picker-panel/src/composables/use-shortcut.js +27 -0
  30. package/dist/components/date-picker-panel/src/composables/use-year-range-header.d.ts +16 -0
  31. package/dist/components/date-picker-panel/src/composables/use-year-range-header.js +35 -0
  32. package/dist/components/date-picker-panel/src/constants.d.ts +9 -0
  33. package/dist/components/date-picker-panel/src/constants.js +5 -0
  34. package/dist/components/date-picker-panel/src/date-picker-com/basic-cell-render.d.ts +18 -0
  35. package/dist/components/date-picker-panel/src/date-picker-com/basic-cell-render.js +39 -0
  36. package/dist/components/date-picker-panel/src/date-picker-com/basic-date-table.vue.d.ts +100 -0
  37. package/dist/components/date-picker-panel/src/date-picker-com/basic-date-table.vue.js +92 -0
  38. package/dist/components/date-picker-panel/src/date-picker-com/basic-date-table2.vue.js +4 -0
  39. package/dist/components/date-picker-panel/src/date-picker-com/basic-month-table.vue.d.ts +106 -0
  40. package/dist/components/date-picker-panel/src/date-picker-com/basic-month-table.vue.js +164 -0
  41. package/dist/components/date-picker-panel/src/date-picker-com/basic-month-table2.vue.js +4 -0
  42. package/dist/components/date-picker-panel/src/date-picker-com/basic-year-table.vue.d.ts +106 -0
  43. package/dist/components/date-picker-panel/src/date-picker-com/basic-year-table.vue.js +153 -0
  44. package/dist/components/date-picker-panel/src/date-picker-com/basic-year-table2.vue.js +4 -0
  45. package/dist/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue.d.ts +89 -0
  46. package/dist/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue.js +550 -0
  47. package/dist/components/date-picker-panel/src/date-picker-com/panel-date-pick2.vue.js +4 -0
  48. package/dist/components/date-picker-panel/src/date-picker-com/panel-date-range.vue.d.ts +104 -0
  49. package/dist/components/date-picker-panel/src/date-picker-com/panel-date-range.vue.js +698 -0
  50. package/dist/components/date-picker-panel/src/date-picker-com/panel-date-range2.vue.js +4 -0
  51. package/dist/components/date-picker-panel/src/date-picker-com/panel-month-range.vue.d.ts +59 -0
  52. package/dist/components/date-picker-panel/src/date-picker-com/panel-month-range.vue.js +255 -0
  53. package/dist/components/date-picker-panel/src/date-picker-com/panel-month-range2.vue.js +4 -0
  54. package/dist/components/date-picker-panel/src/date-picker-com/panel-year-range.vue.d.ts +59 -0
  55. package/dist/components/date-picker-panel/src/date-picker-com/panel-year-range.vue.js +268 -0
  56. package/dist/components/date-picker-panel/src/date-picker-com/panel-year-range2.vue.js +4 -0
  57. package/dist/components/date-picker-panel/src/date-picker-panel.d.ts +143 -0
  58. package/dist/components/date-picker-panel/src/date-picker-panel.js +90 -0
  59. package/dist/components/date-picker-panel/src/instance.d.ts +2 -0
  60. package/dist/components/date-picker-panel/src/panel-utils.d.ts +414 -0
  61. package/dist/components/date-picker-panel/src/panel-utils.js +20 -0
  62. package/dist/components/date-picker-panel/src/props/basic-cell.d.ts +12 -0
  63. package/dist/components/date-picker-panel/src/props/basic-cell.js +14 -0
  64. package/dist/components/date-picker-panel/src/props/basic-date-table.d.ts +66 -0
  65. package/dist/components/date-picker-panel/src/props/basic-date-table.js +16 -0
  66. package/dist/components/date-picker-panel/src/props/basic-month-table.d.ts +47 -0
  67. package/dist/components/date-picker-panel/src/props/basic-month-table.js +14 -0
  68. package/dist/components/date-picker-panel/src/props/basic-year-table.d.ts +47 -0
  69. package/dist/components/date-picker-panel/src/props/basic-year-table.js +14 -0
  70. package/dist/components/date-picker-panel/src/props/date-picker-panel.d.ts +66 -0
  71. package/dist/components/date-picker-panel/src/props/date-picker-panel.js +129 -0
  72. package/dist/components/date-picker-panel/src/props/panel-date-pick.d.ts +29 -0
  73. package/dist/components/date-picker-panel/src/props/panel-date-pick.js +24 -0
  74. package/dist/components/date-picker-panel/src/props/panel-date-range.d.ts +29 -0
  75. package/dist/components/date-picker-panel/src/props/panel-date-range.js +14 -0
  76. package/dist/components/date-picker-panel/src/props/panel-month-range.d.ts +19 -0
  77. package/dist/components/date-picker-panel/src/props/panel-month-range.js +18 -0
  78. package/dist/components/date-picker-panel/src/props/panel-year-range.d.ts +19 -0
  79. package/dist/components/date-picker-panel/src/props/panel-year-range.js +18 -0
  80. package/dist/components/date-picker-panel/src/props/shared.d.ts +97 -0
  81. package/dist/components/date-picker-panel/src/props/shared.js +96 -0
  82. package/dist/components/date-picker-panel/src/types.d.ts +22 -0
  83. package/dist/components/date-picker-panel/src/utils.d.ts +38 -0
  84. package/dist/components/date-picker-panel/src/utils.js +84 -0
  85. package/dist/components/index.d.ts +1 -0
  86. package/dist/components/index.js +142 -140
  87. package/dist/components/input/EpInput.vue.d.ts +3 -1
  88. package/dist/components/input/EpInput.vue.js +79 -78
  89. package/dist/components/input/index.js +1 -0
  90. package/dist/components/tabs/tabs.d.ts +1 -1
  91. package/dist/components/time-picker/index.d.ts +15 -2
  92. package/dist/components/time-picker/index.js +32 -4
  93. package/dist/components/time-picker/src/common/picker-range-trigger.vue.d.ts +92 -0
  94. package/dist/components/time-picker/src/common/picker-range-trigger.vue.js +141 -0
  95. package/dist/components/time-picker/src/common/picker-range-trigger2.vue.js +4 -0
  96. package/dist/components/time-picker/src/common/picker.vue.d.ts +510 -0
  97. package/dist/components/time-picker/src/common/picker.vue.js +463 -0
  98. package/dist/components/time-picker/src/common/picker2.vue.js +4 -0
  99. package/dist/components/time-picker/src/common/props.d.ts +280 -0
  100. package/dist/components/time-picker/src/common/props.js +282 -0
  101. package/dist/components/time-picker/src/composables/use-common-picker.d.ts +42 -0
  102. package/dist/components/time-picker/src/composables/use-common-picker.js +62 -0
  103. package/dist/components/time-picker/src/composables/use-time-panel.d.ts +13 -0
  104. package/dist/components/time-picker/src/composables/use-time-panel.js +60 -0
  105. package/dist/components/time-picker/src/composables/use-time-picker.d.ts +300 -0
  106. package/dist/components/time-picker/src/composables/use-time-picker.js +45 -0
  107. package/dist/components/time-picker/src/constants.d.ts +23 -0
  108. package/dist/components/time-picker/src/constants.js +23 -0
  109. package/dist/components/time-picker/src/props/basic-time-spinner.d.ts +39 -0
  110. package/dist/components/time-picker/src/props/basic-time-spinner.js +31 -0
  111. package/dist/components/time-picker/src/props/panel-time-picker.d.ts +16 -0
  112. package/dist/components/time-picker/src/props/panel-time-picker.js +17 -0
  113. package/dist/components/time-picker/src/props/panel-time-range.d.ts +15 -0
  114. package/dist/components/time-picker/src/props/panel-time-range.js +16 -0
  115. package/dist/components/time-picker/src/props/shared.d.ts +31 -0
  116. package/dist/components/time-picker/src/props/shared.js +40 -0
  117. package/dist/components/time-picker/src/time-picker-com/basic-time-spinner.vue.d.ts +82 -0
  118. package/dist/components/time-picker/src/time-picker-com/basic-time-spinner.vue.js +253 -0
  119. package/dist/components/time-picker/src/time-picker-com/basic-time-spinner2.vue.js +4 -0
  120. package/dist/components/time-picker/src/time-picker-com/panel-time-pick.vue.d.ts +37 -0
  121. package/dist/components/time-picker/src/time-picker-com/panel-time-pick.vue.js +127 -0
  122. package/dist/components/time-picker/src/time-picker-com/panel-time-pick2.vue.js +4 -0
  123. package/dist/components/time-picker/src/time-picker-com/panel-time-range.vue.d.ts +35 -0
  124. package/dist/components/time-picker/src/time-picker-com/panel-time-range.vue.js +206 -0
  125. package/dist/components/time-picker/src/time-picker-com/panel-time-range2.vue.js +4 -0
  126. package/dist/components/time-picker/src/time-picker.d.ts +440 -0
  127. package/dist/components/time-picker/src/time-picker.js +68 -0
  128. package/dist/components/time-picker/src/utils.d.ts +14 -0
  129. package/dist/components/time-picker/src/utils.js +40 -0
  130. package/dist/constants/date.js +17 -0
  131. package/dist/directives/repeat-click/index.js +33 -0
  132. package/dist/ep-craft.js +150 -148
  133. package/dist/hooks/use-empty-values/index.js +14 -14
  134. package/dist/index.css +1 -1
  135. package/dist/node_modules/.pnpm/dayjs@1.11.21/node_modules/dayjs/plugin/advancedFormat.js +54 -0
  136. package/dist/node_modules/.pnpm/dayjs@1.11.21/node_modules/dayjs/plugin/customParseFormat.js +127 -0
  137. package/dist/node_modules/.pnpm/dayjs@1.11.21/node_modules/dayjs/plugin/dayOfYear.js +19 -0
  138. package/dist/node_modules/.pnpm/dayjs@1.11.21/node_modules/dayjs/plugin/isSameOrAfter.js +18 -0
  139. package/dist/node_modules/.pnpm/dayjs@1.11.21/node_modules/dayjs/plugin/isSameOrBefore.js +18 -0
  140. package/dist/node_modules/.pnpm/dayjs@1.11.21/node_modules/dayjs/plugin/localeData.js +82 -0
  141. package/dist/node_modules/.pnpm/dayjs@1.11.21/node_modules/dayjs/plugin/weekOfYear.js +29 -0
  142. package/dist/node_modules/.pnpm/dayjs@1.11.21/node_modules/dayjs/plugin/weekYear.js +19 -0
  143. package/dist/utils/arrays.js +5 -4
  144. package/dist/vendored-components.d.ts +1 -1
  145. package/dist/vendored-components.js +9 -5
  146. package/package.json +2 -1
  147. package/theme-chalk/src/float-label.scss +96 -2
@@ -0,0 +1,54 @@
1
+ import { commonjsGlobal as d, getDefaultExportFromCjs as l } from "../../../../../../_virtual/_commonjsHelpers.js";
2
+ import { __module as i } from "../../../../../../_virtual/advancedFormat.js";
3
+ (function(u, w) {
4
+ (function(f, t) {
5
+ u.exports = t();
6
+ })(d, function() {
7
+ return function(f, t) {
8
+ var o = t.prototype, s = o.format;
9
+ o.format = function(n) {
10
+ var e = this, c = this.$locale();
11
+ if (!this.isValid()) return s.bind(this)(n);
12
+ var a = this.$utils(), m = (n || "YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g, function(r) {
13
+ switch (r) {
14
+ case "Q":
15
+ return Math.ceil((e.$M + 1) / 3);
16
+ case "Do":
17
+ return c.ordinal(e.$D);
18
+ case "gggg":
19
+ return e.weekYear();
20
+ case "GGGG":
21
+ return e.isoWeekYear();
22
+ case "wo":
23
+ return c.ordinal(e.week(), "W");
24
+ case "w":
25
+ case "ww":
26
+ return a.s(e.week(), r === "w" ? 1 : 2, "0");
27
+ case "W":
28
+ case "WW":
29
+ return a.s(e.isoWeek(), r === "W" ? 1 : 2, "0");
30
+ case "k":
31
+ case "kk":
32
+ return a.s(String(e.$H === 0 ? 24 : e.$H), r === "k" ? 1 : 2, "0");
33
+ case "X":
34
+ return Math.floor(e.$d.getTime() / 1e3);
35
+ case "x":
36
+ return e.$d.getTime();
37
+ case "z":
38
+ return "[" + e.offsetName() + "]";
39
+ case "zzz":
40
+ return "[" + e.offsetName("long") + "]";
41
+ default:
42
+ return r;
43
+ }
44
+ });
45
+ return s.bind(this)(m);
46
+ };
47
+ };
48
+ });
49
+ })(i);
50
+ var g = i.exports;
51
+ const W = /* @__PURE__ */ l(g);
52
+ export {
53
+ W as default
54
+ };
@@ -0,0 +1,127 @@
1
+ import { commonjsGlobal as et, getDefaultExportFromCjs as nt } from "../../../../../../_virtual/_commonjsHelpers.js";
2
+ import { __module as B } from "../../../../../../_virtual/customParseFormat.js";
3
+ (function(I, at) {
4
+ (function(U, k) {
5
+ I.exports = k();
6
+ })(et, function() {
7
+ var U = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, k = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, j = /\d/, L = /\d\d/, s = /\d\d?/, x = /\d*[^-_:/,()\s\d]+/, m = {}, Q = function(t) {
8
+ return (t = +t) + (t > 68 ? 1900 : 2e3);
9
+ }, o = function(t) {
10
+ return function(r) {
11
+ this[t] = +r;
12
+ };
13
+ }, X = [/[+-]\d\d:?(\d\d)?|Z/, function(t) {
14
+ (this.zone || (this.zone = {})).offset = function(r) {
15
+ if (!r || r === "Z") return 0;
16
+ var e = r.match(/([+-]|\d\d)/g), n = 60 * e[1] + (+e[2] || 0);
17
+ return n === 0 ? 0 : e[0] === "+" ? -n : n;
18
+ }(t);
19
+ }], F = function(t) {
20
+ var r = m[t];
21
+ return r && (r.indexOf ? r : r.s.concat(r.f));
22
+ }, G = function(t, r) {
23
+ var e, n = m.meridiem;
24
+ if (n) {
25
+ for (var u = 1; u <= 24; u += 1) if (t.indexOf(n(u, 0, r)) > -1) {
26
+ e = u > 12;
27
+ break;
28
+ }
29
+ } else e = t === (r ? "pm" : "PM");
30
+ return e;
31
+ }, J = { A: [x, function(t) {
32
+ this.afternoon = G(t, !1);
33
+ }], a: [x, function(t) {
34
+ this.afternoon = G(t, !0);
35
+ }], Q: [j, function(t) {
36
+ this.month = 3 * (t - 1) + 1;
37
+ }], S: [j, function(t) {
38
+ this.milliseconds = 100 * +t;
39
+ }], SS: [L, function(t) {
40
+ this.milliseconds = 10 * +t;
41
+ }], SSS: [/\d{3}/, function(t) {
42
+ this.milliseconds = +t;
43
+ }], s: [s, o("seconds")], ss: [s, o("seconds")], m: [s, o("minutes")], mm: [s, o("minutes")], H: [s, o("hours")], h: [s, o("hours")], HH: [s, o("hours")], hh: [s, o("hours")], D: [s, o("day")], DD: [L, o("day")], Do: [x, function(t) {
44
+ var r = m.ordinal, e = t.match(/\d+/);
45
+ if (this.day = e[0], r) for (var n = 1; n <= 31; n += 1) r(n).replace(/\[|\]/g, "") === t && (this.day = n);
46
+ }], w: [s, o("week")], ww: [L, o("week")], M: [s, o("month")], MM: [L, o("month")], MMM: [x, function(t) {
47
+ var r = F("months"), e = (F("monthsShort") || r.map(function(n) {
48
+ return n.slice(0, 3);
49
+ })).indexOf(t) + 1;
50
+ if (e < 1) throw new Error();
51
+ this.month = e % 12 || e;
52
+ }], MMMM: [x, function(t) {
53
+ var r = F("months").indexOf(t) + 1;
54
+ if (r < 1) throw new Error();
55
+ this.month = r % 12 || r;
56
+ }], Y: [/[+-]?\d+/, o("year")], YY: [L, function(t) {
57
+ this.year = Q(t);
58
+ }], YYYY: [/\d{4}/, o("year")], Z: X, ZZ: X };
59
+ function K(t) {
60
+ var r, e;
61
+ r = t, e = m && m.formats;
62
+ for (var n = (t = r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(v, l, f) {
63
+ var i = f && f.toUpperCase();
64
+ return l || e[f] || U[f] || e[i].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(M, Y, D) {
65
+ return Y || D.slice(1);
66
+ });
67
+ })).match(k), u = n.length, h = 0; h < u; h += 1) {
68
+ var y = n[h], p = J[y], c = p && p[0], d = p && p[1];
69
+ n[h] = d ? { regex: c, parser: d } : y.replace(/^\[|\]$/g, "");
70
+ }
71
+ return function(v) {
72
+ for (var l = {}, f = 0, i = 0; f < u; f += 1) {
73
+ var M = n[f];
74
+ if (typeof M == "string") i += M.length;
75
+ else {
76
+ var Y = M.regex, D = M.parser, $ = v.slice(i), g = Y.exec($)[0];
77
+ D.call(l, g), v = v.replace(g, "");
78
+ }
79
+ }
80
+ return function(w) {
81
+ var S = w.afternoon;
82
+ if (S !== void 0) {
83
+ var a = w.hours;
84
+ S ? a < 12 && (w.hours += 12) : a === 12 && (w.hours = 0), delete w.afternoon;
85
+ }
86
+ }(l), l;
87
+ };
88
+ }
89
+ return function(t, r, e) {
90
+ e.p.customParseFormat = !0, t && t.parseTwoDigitYear && (Q = t.parseTwoDigitYear);
91
+ var n = r.prototype, u = n.parse;
92
+ n.parse = function(h) {
93
+ var y = h.date, p = h.utc, c = h.args;
94
+ this.$u = p;
95
+ var d = c[1];
96
+ if (typeof d == "string") {
97
+ var v = c[2] === !0, l = c[3] === !0, f = v || l, i = c[2];
98
+ l && (i = c[2]), m = this.$locale(), !v && i && (m = e.Ls[i]), this.$d = function($, g, w, S) {
99
+ try {
100
+ if (["x", "X"].indexOf(g) > -1) return new Date((g === "X" ? 1e3 : 1) * $);
101
+ var a = K(g)($), H = a.year, A = a.month, N = a.day, R = a.hours, W = a.minutes, tt = a.seconds, rt = a.milliseconds, V = a.zone, q = a.week, O = /* @__PURE__ */ new Date(), P = N || (H || A ? 1 : O.getDate()), z = H || O.getFullYear(), T = 0;
102
+ H && !A || (T = A > 0 ? A - 1 : O.getMonth());
103
+ var Z, C = R || 0, E = W || 0, _ = tt || 0, b = rt || 0;
104
+ return V ? new Date(Date.UTC(z, T, P, C, E, _, b + 60 * V.offset * 1e3)) : w ? new Date(Date.UTC(z, T, P, C, E, _, b)) : (Z = new Date(z, T, P, C, E, _, b), q && (Z = S(Z).week(q).toDate()), Z);
105
+ } catch {
106
+ return /* @__PURE__ */ new Date("");
107
+ }
108
+ }(y, d, p, e), this.init(), i && i !== !0 && (this.$L = this.locale(i).$L), f && y != this.format(d) && (this.$d = /* @__PURE__ */ new Date("")), m = {};
109
+ } else if (d instanceof Array) for (var M = d.length, Y = 1; Y <= M; Y += 1) {
110
+ c[1] = d[Y - 1];
111
+ var D = e.apply(this, c);
112
+ if (D.isValid()) {
113
+ this.$d = D.$d, this.$L = D.$L, this.init();
114
+ break;
115
+ }
116
+ Y === M && (this.$d = /* @__PURE__ */ new Date(""));
117
+ }
118
+ else u.call(this, h);
119
+ };
120
+ };
121
+ });
122
+ })(B);
123
+ var ot = B.exports;
124
+ const ut = /* @__PURE__ */ nt(ot);
125
+ export {
126
+ ut as default
127
+ };
@@ -0,0 +1,19 @@
1
+ import { commonjsGlobal as s, getDefaultExportFromCjs as u } from "../../../../../../_virtual/_commonjsHelpers.js";
2
+ import { __module as e } from "../../../../../../_virtual/dayOfYear.js";
3
+ (function(f, i) {
4
+ (function(n, t) {
5
+ f.exports = t();
6
+ })(s, function() {
7
+ return function(n, t, r) {
8
+ t.prototype.dayOfYear = function(o) {
9
+ var a = Math.round((r(this).startOf("day") - r(this).startOf("year")) / 864e5) + 1;
10
+ return o == null ? a : this.add(o - a, "day");
11
+ };
12
+ };
13
+ });
14
+ })(e);
15
+ var d = e.exports;
16
+ const y = /* @__PURE__ */ u(d);
17
+ export {
18
+ y as default
19
+ };
@@ -0,0 +1,18 @@
1
+ import { commonjsGlobal as f, getDefaultExportFromCjs as n } from "../../../../../../_virtual/_commonjsHelpers.js";
2
+ import { __module as e } from "../../../../../../_virtual/isSameOrAfter.js";
3
+ (function(s, a) {
4
+ (function(i, t) {
5
+ s.exports = t();
6
+ })(f, function() {
7
+ return function(i, t) {
8
+ t.prototype.isSameOrAfter = function(r, o) {
9
+ return this.isSame(r, o) || this.isAfter(r, o);
10
+ };
11
+ };
12
+ });
13
+ })(e);
14
+ var m = e.exports;
15
+ const c = /* @__PURE__ */ n(m);
16
+ export {
17
+ c as default
18
+ };
@@ -0,0 +1,18 @@
1
+ import { commonjsGlobal as i, getDefaultExportFromCjs as n } from "../../../../../../_virtual/_commonjsHelpers.js";
2
+ import { __module as t } from "../../../../../../_virtual/isSameOrBefore.js";
3
+ (function(s, a) {
4
+ (function(f, o) {
5
+ s.exports = o();
6
+ })(i, function() {
7
+ return function(f, o) {
8
+ o.prototype.isSameOrBefore = function(e, r) {
9
+ return this.isSame(e, r) || this.isBefore(e, r);
10
+ };
11
+ };
12
+ });
13
+ })(t);
14
+ var m = t.exports;
15
+ const c = /* @__PURE__ */ n(m);
16
+ export {
17
+ c as default
18
+ };
@@ -0,0 +1,82 @@
1
+ import { commonjsGlobal as v, getDefaultExportFromCjs as $ } from "../../../../../../_virtual/_commonjsHelpers.js";
2
+ import { __module as h } from "../../../../../../_virtual/localeData.js";
3
+ (function(k, F) {
4
+ (function(w, u) {
5
+ k.exports = u();
6
+ })(v, function() {
7
+ return function(w, u, r) {
8
+ var y = u.prototype, c = function(n) {
9
+ return n && (n.indexOf ? n : n.s);
10
+ }, e = function(n, t, i, m, s) {
11
+ var a = n.name ? n : n.$locale(), p = c(a[t]), S = c(a[i]), f = p || S.map(function(l) {
12
+ return l.slice(0, m);
13
+ });
14
+ if (!s) return f;
15
+ var D = a.weekStart;
16
+ return f.map(function(l, x) {
17
+ return f[(x + (D || 0)) % 7];
18
+ });
19
+ }, o = function() {
20
+ return r.Ls[r.locale()];
21
+ }, d = function(n, t) {
22
+ return n.formats[t] || function(i) {
23
+ return i.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(m, s, a) {
24
+ return s || a.slice(1);
25
+ });
26
+ }(n.formats[t.toUpperCase()]);
27
+ }, M = function() {
28
+ var n = this;
29
+ return { months: function(t) {
30
+ return t ? t.format("MMMM") : e(n, "months");
31
+ }, monthsShort: function(t) {
32
+ return t ? t.format("MMM") : e(n, "monthsShort", "months", 3);
33
+ }, firstDayOfWeek: function() {
34
+ return n.$locale().weekStart || 0;
35
+ }, weekdays: function(t) {
36
+ return t ? t.format("dddd") : e(n, "weekdays");
37
+ }, weekdaysMin: function(t) {
38
+ return t ? t.format("dd") : e(n, "weekdaysMin", "weekdays", 2);
39
+ }, weekdaysShort: function(t) {
40
+ return t ? t.format("ddd") : e(n, "weekdaysShort", "weekdays", 3);
41
+ }, longDateFormat: function(t) {
42
+ return d(n.$locale(), t);
43
+ }, meridiem: this.$locale().meridiem, ordinal: this.$locale().ordinal };
44
+ };
45
+ y.localeData = function() {
46
+ return M.bind(this)();
47
+ }, r.localeData = function() {
48
+ var n = o();
49
+ return { firstDayOfWeek: function() {
50
+ return n.weekStart || 0;
51
+ }, weekdays: function() {
52
+ return r.weekdays();
53
+ }, weekdaysShort: function() {
54
+ return r.weekdaysShort();
55
+ }, weekdaysMin: function() {
56
+ return r.weekdaysMin();
57
+ }, months: function() {
58
+ return r.months();
59
+ }, monthsShort: function() {
60
+ return r.monthsShort();
61
+ }, longDateFormat: function(t) {
62
+ return d(n, t);
63
+ }, meridiem: n.meridiem, ordinal: n.ordinal };
64
+ }, r.months = function() {
65
+ return e(o(), "months");
66
+ }, r.monthsShort = function() {
67
+ return e(o(), "monthsShort", "months", 3);
68
+ }, r.weekdays = function(n) {
69
+ return e(o(), "weekdays", null, null, n);
70
+ }, r.weekdaysShort = function(n) {
71
+ return e(o(), "weekdaysShort", "weekdays", 3, n);
72
+ }, r.weekdaysMin = function(n) {
73
+ return e(o(), "weekdaysMin", "weekdays", 2, n);
74
+ };
75
+ };
76
+ });
77
+ })(h);
78
+ var g = h.exports;
79
+ const j = /* @__PURE__ */ $(g);
80
+ export {
81
+ j as default
82
+ };
@@ -0,0 +1,29 @@
1
+ import { commonjsGlobal as c, getDefaultExportFromCjs as k } from "../../../../../../_virtual/_commonjsHelpers.js";
2
+ import { __module as n } from "../../../../../../_virtual/weekOfYear.js";
3
+ (function(f, p) {
4
+ (function(r, e) {
5
+ f.exports = e();
6
+ })(c, function() {
7
+ var r = "week", e = "year";
8
+ return function(w, u, a) {
9
+ var o = u.prototype;
10
+ o.week = function(t) {
11
+ if (t === void 0 && (t = null), t !== null) return this.add(7 * (t - this.week()), "day");
12
+ var s = this.$locale().yearStart || 1;
13
+ if (this.month() === 11 && this.date() > 25) {
14
+ var l = a(this).startOf(e).add(1, e).date(s), d = a(this).endOf(r);
15
+ if (l.isBefore(d)) return 1;
16
+ }
17
+ var h = a(this).startOf(e).date(s).startOf(r).subtract(1, "millisecond"), i = this.diff(h, r, !0);
18
+ return i < 0 ? a(this).startOf("week").week() : Math.ceil(i);
19
+ }, o.weeks = function(t) {
20
+ return t === void 0 && (t = null), this.week(t);
21
+ };
22
+ };
23
+ });
24
+ })(n);
25
+ var m = n.exports;
26
+ const x = /* @__PURE__ */ k(m);
27
+ export {
28
+ x as default
29
+ };
@@ -0,0 +1,19 @@
1
+ import { commonjsGlobal as i, getDefaultExportFromCjs as p } from "../../../../../../_virtual/_commonjsHelpers.js";
2
+ import { __module as n } from "../../../../../../_virtual/weekYear.js";
3
+ (function(a, f) {
4
+ (function(s, e) {
5
+ a.exports = e();
6
+ })(i, function() {
7
+ return function(s, e) {
8
+ e.prototype.weekYear = function() {
9
+ var o = this.month(), r = this.week(), t = this.year();
10
+ return r === 1 && o === 11 ? t + 1 : o === 0 && r >= 52 ? t - 1 : t;
11
+ };
12
+ };
13
+ });
14
+ })(n);
15
+ var u = n.exports;
16
+ const x = /* @__PURE__ */ p(u);
17
+ export {
18
+ x as default
19
+ };
@@ -1,7 +1,8 @@
1
- import { isArray as t } from "@vue/shared";
2
- import { castArray as y } from "lodash-unified";
3
- const o = (r) => !r && r !== 0 ? [] : t(r) ? r : [r];
1
+ import { isArray as r } from "@vue/shared";
2
+ import { castArray as i } from "lodash-unified";
3
+ const s = (t) => r(t) ? t[0] : t, o = (t) => !t && t !== 0 ? [] : r(t) ? t : [t];
4
4
  export {
5
5
  o as castArray,
6
- y as ensureArray
6
+ i as ensureArray,
7
+ s as extractFirst
7
8
  };
@@ -11,6 +11,6 @@
11
11
  * 2. 横切组件(icon/tooltip/collapse-transition/popper)由 vendor-cross-cutting
12
12
  * vendor 到本地,同样需跳过 gen 包装以免被覆盖为 wrapper。
13
13
  */
14
- export declare const vendoredComponents: readonly ["Affix", "Alert", "Anchor", "AnchorLink", "Button", "CheckTag", "Tag", "Menu", "MenuItem", "MenuItemGroup", "SubMenu", "Tabs", "TabPane", "Radio", "RadioButton", "RadioGroup", "Input", "Option", "OptionGroup", "Select", "CollapseTransition", "Form", "Icon", "Popper", "Tooltip"];
14
+ export declare const vendoredComponents: readonly ["Affix", "Alert", "Anchor", "AnchorLink", "Button", "CheckTag", "Tag", "Menu", "MenuItem", "MenuItemGroup", "SubMenu", "Tabs", "TabPane", "Radio", "RadioButton", "RadioGroup", "Input", "Option", "OptionGroup", "Select", "DatePicker", "DatePickerPanel", "TimePicker", "CollapseTransition", "Form", "Icon", "Popper", "Tooltip", "Scrollbar"];
15
15
  export type VendoredComponentName = (typeof vendoredComponents)[number];
16
16
  export declare const isVendored: (name: string) => boolean;
@@ -1,4 +1,4 @@
1
- const n = [
1
+ const o = [
2
2
  "Affix",
3
3
  "Alert",
4
4
  "Anchor",
@@ -19,14 +19,18 @@ const n = [
19
19
  "Option",
20
20
  "OptionGroup",
21
21
  "Select",
22
+ "DatePicker",
23
+ "DatePickerPanel",
24
+ "TimePicker",
22
25
  // 横切组件(vendor-cross-cutting 产出,跳过 gen 包装)
23
26
  "CollapseTransition",
24
27
  "Form",
25
28
  "Icon",
26
29
  "Popper",
27
- "Tooltip"
28
- ], e = (o) => n.includes(o);
30
+ "Tooltip",
31
+ "Scrollbar"
32
+ ], n = (e) => o.includes(e);
29
33
  export {
30
- e as isVendored,
31
- n as vendoredComponents
34
+ n as isVendored,
35
+ o as vendoredComponents
32
36
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ep-craft",
3
- "version": "0.1.25",
3
+ "version": "0.1.26",
4
4
  "description": "A Vue 3 component library based on element-plus with ep- prefix",
5
5
  "type": "module",
6
6
  "main": "./dist/ep-craft.js",
@@ -66,6 +66,7 @@
66
66
  "@vue/shared": "^3.5.40",
67
67
  "@vueuse/core": "14.3.0",
68
68
  "csstype": "^3.2.3",
69
+ "dayjs": "^1.11.20",
69
70
  "element-plus": "^2.9.0",
70
71
  "lodash-unified": "^1.0.3",
71
72
  "normalize-wheel-es": "^1.2.0",
@@ -37,7 +37,8 @@ $float-label-scale: 0.75 !default;
37
37
  transition:
38
38
  top $float-label-transition-duration $float-label-transition-easing,
39
39
  transform $float-label-transition-duration $float-label-transition-easing,
40
- color $float-label-transition-duration $float-label-transition-easing;
40
+ color $float-label-transition-duration $float-label-transition-easing,
41
+ opacity $float-label-transition-duration $float-label-transition-easing;
41
42
 
42
43
  &.is-floating {
43
44
  top: 0;
@@ -110,4 +111,97 @@ $float-label-scale: 0.75 !default;
110
111
  left: 8px; // $select-wrapper-padding(small) 水平值
111
112
  max-width: calc(100% - 16px);
112
113
  }
113
- }
114
+ }
115
+
116
+ // date-picker 单值形态:label 是 .el-input 根(.el-date-editor)的直接子节点(经 EpInput 根末尾
117
+ // <slot/> 注入),与 .el-input__wrapper 并列;.el-input 与 .el-date-editor 本就 position:relative,
118
+ // 此处显式声明作文档化与防回归。
119
+ //
120
+ // 水平对齐:date-picker 单值形态恒有 prefix 日历/时钟图标,输入文本起点被右移,label 必须
121
+ // 同步右移,否则会压在图标上。文本起点 = wrapper 水平内边距 + 图标宽 + 图标右间距:
122
+ // - wrapper 水平内边距:$input-padding-horizontal - $border-width(12-1 / 16-1 / 8-1)
123
+ // - 图标宽:1em(.el-icon { width: 1em; font-size: inherit }),随尺寸档位为 14px / 12px
124
+ // - 图标右间距:8px(.el-input__prefix-inner > :last-child { margin-right: 8px })
125
+ // label 自身 font-size 与 .el-input 根一致(default/large 14px、small 12px),故 1em 自动跟随
126
+ // 图标宽度与尺寸档位,一条 calc 覆盖三档尺寸;大/小尺寸仅需替换内边距基数。
127
+ //
128
+ // 注意:范围形态根节点同时带 .el-date-editor 与 .el-range-editor,也会命中本规则,
129
+ // 依赖下方 .el-range-editor 规则(同为 0,3,0)按源码顺序覆盖——请勿把范围规则移到本规则之前。
130
+ .#{$namespace}-date-editor.is-float-label {
131
+ position: relative;
132
+
133
+ > .#{$namespace}-float-label {
134
+ left: calc(
135
+ #{map.get($input-padding-horizontal, 'default') - $border-width} + 1em + 8px
136
+ );
137
+ max-width: calc(
138
+ 100% - #{2 * (map.get($input-padding-horizontal, 'default') - $border-width)} - 1em -
139
+ 8px
140
+ );
141
+ }
142
+ }
143
+
144
+ .#{$namespace}-input--large.#{$namespace}-date-editor.is-float-label {
145
+ > .#{$namespace}-float-label {
146
+ left: calc(
147
+ #{map.get($input-padding-horizontal, 'large') - $border-width} + 1em + 8px
148
+ );
149
+ max-width: calc(
150
+ 100% - #{2 * (map.get($input-padding-horizontal, 'large') - $border-width)} - 1em - 8px
151
+ );
152
+ }
153
+ }
154
+
155
+ .#{$namespace}-input--small.#{$namespace}-date-editor.is-float-label {
156
+ > .#{$namespace}-float-label {
157
+ left: calc(
158
+ #{map.get($input-padding-horizontal, 'small') - $border-width} + 1em + 8px
159
+ );
160
+ max-width: calc(
161
+ 100% - #{2 * (map.get($input-padding-horizontal, 'small') - $border-width)} - 1em - 8px
162
+ );
163
+ }
164
+ }
165
+
166
+ // date-picker 范围形态:单一整体 label 是 .el-range-editor(.el-date-editor.el-input__wrapper)
167
+ // 的直接子节点,位于 prefix icon 之后、两个原生 input 之前;.el-input__wrapper 自身无定位,
168
+ // 在此显式建立定位上下文。
169
+ //
170
+ // 水平对齐:同单值形态,label 须避开 prefix 日历图标,否则会压在图标上。文本起点 = 内边距 +
171
+ // 图标宽 + 图标右间距:
172
+ // - .el-range-editor.el-input__wrapper 水平内边距 0 10px(见 date-picker/picker.scss)
173
+ // - .el-range__icon 固定 font-size:14px(不随尺寸档位变化),width:1em => 14px;
174
+ // 根节点无 .el-input 祖先,故 .el-input .el-input__icon { margin-left: 8px } 不生效,
175
+ // 图标无左右间距
176
+ // - 右间距 8px:与单值形态的 .el-input__prefix-inner > :last-child { margin-right: 8px }
177
+ // 取齐,保证两种形态的图标-文案间距一致(范围图标自身无 margin,需在此显式补足)
178
+ // 内边距、图标宽与间距均不随尺寸档位变化,故 left/max-width 尺寸无关(仅 small 字号需适配,见下)。
179
+ // 另注:范围形态根节点带 .el-date-editor 但不带 .el-input/.el-input--*,故不会被上文
180
+ // .el-input--large/.el-input--small 规则命中;本规则(0,3,0)按源码顺序覆盖上文
181
+ // .el-date-editor.is-float-label 规则(同为 0,3,0)。
182
+ //
183
+ // 休息态隐藏:范围形态的占位由两个原生 input 各自的 start/end placeholder 承担(见
184
+ // picker-range-trigger.vue),整体浮标只负责「上浮后的统称」。若休息态仍显示,会与开始
185
+ // 占位符重叠。故用 opacity 而非 display 隐藏——保留元素参与布局,使上浮过渡(位置/透明度)
186
+ // 能连续播放,不产生跳变;`visibility` 会因继承与延迟问题更易出错,不采用。
187
+ .#{$namespace}-range-editor.is-float-label {
188
+ position: relative;
189
+
190
+ > .#{$namespace}-float-label {
191
+ left: 10px + 14px + 8px; // 内边距 10px + 日历图标 14px + 间距 8px
192
+ max-width: calc(100% - 10px - 14px - 8px - 10px); // 右侧仍留 10px 内边距
193
+ opacity: 0;
194
+
195
+ &.is-floating {
196
+ opacity: 1;
197
+ }
198
+ }
199
+ }
200
+
201
+ // 范围形态 small 仅字号/行高/高度变化(水平内边距恒 10px、图标恒 14px),label 字号对齐
202
+ // .el-range-input
203
+ .#{$namespace}-range-editor--small {
204
+ > .#{$namespace}-float-label {
205
+ font-size: map.get($input-font-size, 'small');
206
+ }
207
+ }