@web-utils/form-ui 1.0.0-beta71 → 1.0.0-beta73

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 (270) hide show
  1. package/address-input/index.mjs +1 -1
  2. package/affix/index.d.ts +0 -2
  3. package/affix/index.mjs +2 -3
  4. package/capsule-tab/index.mjs +1 -1
  5. package/card/index.mjs +15 -14
  6. package/chunks/-fXBgN9b2.mjs +37 -0
  7. package/chunks/{B3d4fdGH.mjs → -yfgKY3g.mjs} +1 -1
  8. package/chunks/{BeWNlclr.mjs → -zgWD713.mjs} +44 -40
  9. package/chunks/{5itVLmv82.mjs → 8A7LSgb4.mjs} +26 -25
  10. package/chunks/{DoOkwYtO.mjs → Apjns0ZM.mjs} +72 -67
  11. package/chunks/B0BOjeph2.mjs +108 -0
  12. package/chunks/BD6_5FSI.mjs +178 -0
  13. package/chunks/BE4V5Vf5.mjs +133 -0
  14. package/chunks/{DfJJr053.mjs → BGJjAw5E.mjs} +1 -1
  15. package/chunks/{DhQF2ZlD.mjs → BH7VEktl.mjs} +19 -17
  16. package/chunks/{CjmfMN1X2.mjs → BI6kCG2j2.mjs} +2 -2
  17. package/chunks/{6kdakei5.mjs → BYtFzO-8.mjs} +138 -133
  18. package/chunks/{CaRunrOV2.mjs → B_AUZSOW.mjs} +589 -760
  19. package/chunks/BctSGDgW2.mjs +29 -0
  20. package/chunks/{B5voIv4_.mjs → Bes1uXng.mjs} +28 -24
  21. package/chunks/BhIWiH5R.mjs +661 -0
  22. package/chunks/BhzlH7Az.mjs +90 -0
  23. package/chunks/{D6vTCC1Z2.mjs → BrelfRGo2.mjs} +14 -13
  24. package/chunks/{Z0BPDZlb.mjs → BsqIRxSS.mjs} +6 -5
  25. package/chunks/{TtxSplBB.mjs → C--HDCqy.mjs} +13 -10
  26. package/chunks/{DTUh8o0p2.mjs → C6mb7Nru2.mjs} +4 -4
  27. package/chunks/{CIybFvu92.mjs → CFoSvMJ-2.mjs} +1 -1
  28. package/chunks/{Ch_zaHx9.mjs → CO3taG7t2.mjs} +1 -1
  29. package/chunks/{DNSPORak.mjs → CZUhA3sf.mjs} +298 -4
  30. package/chunks/Ccxbv7uz2.mjs +34 -0
  31. package/chunks/Ce4tNNzg2.mjs +63 -0
  32. package/chunks/{B1GA44yT2.mjs → CelJ2L8A2.mjs} +2 -2
  33. package/chunks/CjYOitzM2.mjs +31 -0
  34. package/chunks/Cknuquqx.mjs +32 -0
  35. package/chunks/ClVh1Lek.mjs +130 -0
  36. package/chunks/CwyebsNL2.mjs +39 -0
  37. package/chunks/{9rQitPz7.mjs → D6DYxngS.mjs} +132 -127
  38. package/chunks/D6YM84Pf2.mjs +29 -0
  39. package/chunks/{BkEMJ725.mjs → DTq5QLoT.mjs} +43 -39
  40. package/chunks/{BvcK4D8A2.mjs → DVMfVn-M.mjs} +14 -10
  41. package/chunks/DVdQHb_v.mjs +50 -0
  42. package/chunks/{BaLjN8Ow.mjs → Daa7nl7U.mjs} +19 -15
  43. package/chunks/{D9qn1x3X2.mjs → Dh_BQpvC2.mjs} +2 -2
  44. package/chunks/DizOY5i8.mjs +69 -0
  45. package/chunks/{BQNqBw8h2.mjs → DjaV6_cg2.mjs} +2 -2
  46. package/chunks/{CbbjpJFg2.mjs → Dm3gQGoV2.mjs} +2 -2
  47. package/chunks/DqW9QtF3.mjs +68 -0
  48. package/chunks/{DbtlO6wD.mjs → DqWJCka8.mjs} +9 -7
  49. package/chunks/{BI-ZFlSw2.mjs → DrWUdRj32.mjs} +2 -2
  50. package/chunks/Dv7YRB2U2.mjs +25 -0
  51. package/chunks/DyLQsqWJ.mjs +61 -0
  52. package/chunks/HsHwYW1a.mjs +99 -0
  53. package/chunks/KDVLIvaS.mjs +30 -0
  54. package/chunks/{DxL9oojv2.mjs → Lkg7bYLD2.mjs} +73 -74
  55. package/chunks/{T_jwNKBr.mjs → Opn85Hlx2.mjs} +1 -1
  56. package/chunks/{BoId6V9J.mjs → YdNYH25C.mjs} +1 -1
  57. package/chunks/{BvbjlaN02.mjs → gTgPZrgY2.mjs} +119 -120
  58. package/chunks/{3gUkQF12.mjs → jsgk7Yse2.mjs} +2 -2
  59. package/chunks/nL59ZuIk.mjs +58 -0
  60. package/chunks/{CDqVJ7U3.mjs → neuEq1De.mjs} +70 -67
  61. package/chunks/{B8wGY5Hs2.mjs → sWVkgzQt2.mjs} +2 -2
  62. package/chunks/{Wl17p0C82.mjs → tjwOOiNr2.mjs} +31 -30
  63. package/code-mirror-editor/index.mjs +1 -1
  64. package/confirm-button/index.mjs +1 -1
  65. package/confirmable/index.mjs +1 -1
  66. package/context-menu/index.mjs +1 -1
  67. package/count-up/index.mjs +1 -1
  68. package/custom-scrollbar/index.mjs +1 -1
  69. package/data-box/index.mjs +9 -8
  70. package/data-card/index.mjs +8 -7
  71. package/data-card-text/index.mjs +8 -7
  72. package/data-display/index.mjs +9 -8
  73. package/data-icons/index.mjs +9 -8
  74. package/data-imgtext/index.mjs +9 -8
  75. package/data-operatext/index.mjs +8 -7
  76. package/data-panel/index.mjs +9 -8
  77. package/data-pay/index.mjs +10 -9
  78. package/data-price/index.mjs +8 -7
  79. package/data-progress/index.mjs +10 -9
  80. package/data-rotate/index.mjs +9 -8
  81. package/data-table-picker/index.mjs +11 -10
  82. package/data-tabs/index.mjs +9 -8
  83. package/dict-render/index.mjs +1 -1
  84. package/e-charts/index.mjs +2 -2
  85. package/easy-popup/index.mjs +1 -1
  86. package/editable-progress/index.mjs +8 -7
  87. package/editable-tree/index.mjs +595 -2
  88. package/element-dialog/index.mjs +1 -1
  89. package/element-resize-observer/index.mjs +1 -1
  90. package/flex-box/index.mjs +1 -1
  91. package/flex-column/index.mjs +1 -1
  92. package/flex-item/index.mjs +1 -1
  93. package/flex-row/index.mjs +1 -1
  94. package/flex-scroller/index.mjs +1 -1
  95. package/flow-designer/index.mjs +1 -1
  96. package/flow-viewer/index.mjs +1 -1
  97. package/form-cascader/index.mjs +1 -1
  98. package/form-checkbox/index.mjs +1 -1
  99. package/form-checkbox-group/index.mjs +1 -1
  100. package/form-date-picker/index.mjs +1 -1
  101. package/form-holder/index.mjs +1 -1
  102. package/form-image/index.mjs +1 -1
  103. package/form-input/index.mjs +1 -1
  104. package/form-input-cron-expression/index.mjs +1 -1
  105. package/form-input-email/index.mjs +1 -1
  106. package/form-input-id-card/index.mjs +1 -1
  107. package/form-input-number/index.mjs +1 -1
  108. package/form-input-phone-number/index.mjs +1 -1
  109. package/form-input-tag/index.mjs +1 -1
  110. package/form-input-time/index.mjs +1 -1
  111. package/form-item-group/index.mjs +1 -1
  112. package/form-item-x/index.mjs +1 -1
  113. package/form-radio-group/index.mjs +1 -1
  114. package/form-rate/index.mjs +1 -1
  115. package/form-row/index.mjs +1 -1
  116. package/form-select/index.mjs +1 -1
  117. package/form-slider/index.mjs +1 -1
  118. package/form-switch/index.mjs +1 -1
  119. package/form-table/index.mjs +1 -1
  120. package/form-table-plus/index.mjs +1 -1
  121. package/form-text/index.mjs +1 -1
  122. package/form-textarea/index.mjs +1 -1
  123. package/form-time-select/index.mjs +1 -1
  124. package/form-tree-select/index.mjs +1 -1
  125. package/form-tree-select-multiple/index.mjs +1 -1
  126. package/form-view/index.mjs +3 -3
  127. package/guide-steps/index.mjs +77 -2
  128. package/helper/dictionary.mjs +1 -1
  129. package/helper/input.mjs +1 -1
  130. package/highlight-j-s/index.mjs +1 -1
  131. package/iframe-window/index.mjs +1 -1
  132. package/image-cropper/index.mjs +12 -11
  133. package/image-preview/index.d.ts +1 -153
  134. package/image-preview/index.mjs +201 -2
  135. package/image-viewer/index.mjs +1 -1
  136. package/index.css +1 -1
  137. package/index.mjs +101 -101
  138. package/input-number-range/index.mjs +7 -6
  139. package/keyboard/index.mjs +1 -1
  140. package/loading-view/index.mjs +1 -1
  141. package/name-avatar/index.mjs +1 -1
  142. package/nav-bar/index.mjs +3 -2
  143. package/package.json +5 -1
  144. package/page-index/index.mjs +14 -13
  145. package/page-index-top/index.mjs +12 -10
  146. package/pageable-table/index.mjs +1 -1
  147. package/photo-swipe/index.mjs +1 -1
  148. package/props/col.mjs +1 -1
  149. package/props/form-item.mjs +1 -1
  150. package/sign-panel/index.mjs +1 -1
  151. package/skeleton-panel/index.mjs +3 -2
  152. package/split-pane/index.mjs +1 -1
  153. package/sub-table/index.mjs +1 -1
  154. package/sub-table-plus/index.mjs +1 -1
  155. package/swiper/index.mjs +2 -2
  156. package/table-column/index.mjs +1 -1
  157. package/table-column-def/index.mjs +1 -1
  158. package/table-view/index.mjs +108 -106
  159. package/tag-render/index.mjs +21 -20
  160. package/text-ellipsis/index.d.ts +1 -1
  161. package/text-ellipsis/index.mjs +1 -1
  162. package/toolbar/index.mjs +1 -1
  163. package/toolbar-button/index.mjs +1 -1
  164. package/vue-cron/index.mjs +1 -1
  165. package/vue-tags-input/index.mjs +1 -1
  166. package/vue-tree-select/index.mjs +1 -1
  167. package/vue-video-player/index.d.ts +1 -1
  168. package/vue-video-player/index.mjs +1 -1
  169. package/watermark/index.mjs +1 -1
  170. package/web-types.json +1 -1
  171. package/x-input-tag/index.mjs +47 -46
  172. package/year-calendar/index.mjs +1 -1
  173. package/chunks/49634Q2N2.mjs +0 -936
  174. package/chunks/77cFhiAz.mjs +0 -13
  175. package/chunks/7JVbVOff2.mjs +0 -46
  176. package/chunks/B1ATN2my.mjs +0 -26
  177. package/chunks/B7O8aGqC2.mjs +0 -58
  178. package/chunks/BBPczt0U.mjs +0 -4
  179. package/chunks/BBqq6o072.mjs +0 -243
  180. package/chunks/BCVhSMZN.mjs +0 -1328
  181. package/chunks/BDVLN2ly.mjs +0 -105
  182. package/chunks/BEysX5TF2.mjs +0 -1038
  183. package/chunks/BIj6pa8Z.mjs +0 -15
  184. package/chunks/BJby9uHB2.mjs +0 -233
  185. package/chunks/BUAQybGW.mjs +0 -230
  186. package/chunks/BVIHqL6g.mjs +0 -17
  187. package/chunks/BVSQ6DfJ.mjs +0 -17
  188. package/chunks/B__5L22p2.mjs +0 -346
  189. package/chunks/Baam4z-g.mjs +0 -275
  190. package/chunks/Bdeug17L.mjs +0 -42
  191. package/chunks/BecO0t0_2.mjs +0 -2430
  192. package/chunks/BffxPn8a.mjs +0 -34
  193. package/chunks/Bgw_3soo.mjs +0 -35
  194. package/chunks/BjCfQFUL.mjs +0 -54
  195. package/chunks/BjWs-r2V.mjs +0 -25
  196. package/chunks/BlB1fEo92.mjs +0 -8
  197. package/chunks/BrYtAPbN2.mjs +0 -161
  198. package/chunks/BsKwchVA.mjs +0 -14
  199. package/chunks/BsM0L7CS.mjs +0 -132
  200. package/chunks/C5f3Xfsc2.mjs +0 -36
  201. package/chunks/C7l9aZGE.mjs +0 -577
  202. package/chunks/CFvkR9Ze2.mjs +0 -31
  203. package/chunks/CGM03LI5.mjs +0 -588
  204. package/chunks/CPejK_GQ2.mjs +0 -383
  205. package/chunks/CQSTyCVP.mjs +0 -6
  206. package/chunks/CQxz8uUc.mjs +0 -454
  207. package/chunks/CR29QUwT2.mjs +0 -28
  208. package/chunks/CWvo-ucD.mjs +0 -446
  209. package/chunks/C_eGir-J.mjs +0 -17
  210. package/chunks/Calzy0Az.mjs +0 -1275
  211. package/chunks/CbgD7y-5.mjs +0 -5
  212. package/chunks/CbsGuLZz2.mjs +0 -105
  213. package/chunks/CcT5SsZk.mjs +0 -48
  214. package/chunks/CdBytH8S.mjs +0 -266
  215. package/chunks/CiFlMt6Z.mjs +0 -41
  216. package/chunks/Cjkq49252.mjs +0 -60
  217. package/chunks/CnCSm3LY2.mjs +0 -4
  218. package/chunks/CsLrkldT2.mjs +0 -225
  219. package/chunks/Csiz_xCa2.mjs +0 -273
  220. package/chunks/Ctd3_wOH2.mjs +0 -6
  221. package/chunks/Cu2A_1vk2.mjs +0 -106
  222. package/chunks/CuoF9V8s.mjs +0 -3091
  223. package/chunks/CwBq1JZV.mjs +0 -250
  224. package/chunks/CwWfRmD3.mjs +0 -57
  225. package/chunks/CwqeV7002.mjs +0 -67
  226. package/chunks/Cy8jqgun2.mjs +0 -41
  227. package/chunks/D-hj62se2.mjs +0 -525
  228. package/chunks/D3Xixh5v.mjs +0 -5
  229. package/chunks/D4oNQiIK.mjs +0 -461
  230. package/chunks/D8r81QxD.mjs +0 -732
  231. package/chunks/DL0o_C092.mjs +0 -1093
  232. package/chunks/DLgn1tQG2.mjs +0 -60
  233. package/chunks/DStwh2ne.mjs +0 -281
  234. package/chunks/DXiLi19u2.mjs +0 -33
  235. package/chunks/DZ0frL1U.mjs +0 -69
  236. package/chunks/D_qwjNah.mjs +0 -1094
  237. package/chunks/Dg9Q-Tbi2.mjs +0 -299
  238. package/chunks/Dls3rTka2.mjs +0 -24
  239. package/chunks/DnBzQ-xh.mjs +0 -4
  240. package/chunks/DoNfjRR1.mjs +0 -68
  241. package/chunks/DrKq_frR.mjs +0 -98
  242. package/chunks/DsYXqJLZ.mjs +0 -641
  243. package/chunks/DsZznbt2.mjs +0 -208
  244. package/chunks/Dsd58O0g.mjs +0 -25
  245. package/chunks/Dtq1xYk8.mjs +0 -47
  246. package/chunks/EA6hte7s2.mjs +0 -49
  247. package/chunks/FeuisuNY2.mjs +0 -88
  248. package/chunks/GEtlriHC.mjs +0 -188
  249. package/chunks/GsvG1yFW.mjs +0 -1919
  250. package/chunks/KGmxNbpi.mjs +0 -21
  251. package/chunks/Q2Mal3Qn2.mjs +0 -439
  252. package/chunks/akEzJ4kG.mjs +0 -18
  253. package/chunks/cMuWbLPt.mjs +0 -196
  254. package/chunks/gh52LMTG.mjs +0 -12
  255. package/chunks/hgAOQY9a.mjs +0 -406
  256. package/chunks/lGc5ksPb.mjs +0 -279
  257. package/chunks/mD3gmiOy2.mjs +0 -96
  258. package/chunks/nLBvkerV2.mjs +0 -621
  259. package/chunks/pZQfJv282.mjs +0 -4
  260. package/chunks/qrHhuZXg.mjs +0 -465
  261. package/chunks/uqKZ4RIo.mjs +0 -222
  262. /package/chunks/{B31ub5xS.mjs → BBvIPqcc.mjs} +0 -0
  263. /package/chunks/{e70aZf3z.mjs → BoCxKwBf.mjs} +0 -0
  264. /package/chunks/{h-Uhst9y.mjs → CE67pCwD.mjs} +0 -0
  265. /package/chunks/{BMTtnkb7.mjs → CQeEP_Tl.mjs} +0 -0
  266. /package/chunks/{BwYEpK-u.mjs → CaczibeD.mjs} +0 -0
  267. /package/chunks/{BPpMbPS8.mjs → DZCryyFG.mjs} +0 -0
  268. /package/chunks/{BVuwiZGi.mjs → Dq63V0CC.mjs} +0 -0
  269. /package/chunks/{C1RsHtGI.mjs → OEBJ-trG.mjs} +0 -0
  270. /package/chunks/{7Cv9Cq-02.mjs → fjtZc9Rq2.mjs} +0 -0
@@ -1,641 +0,0 @@
1
- import { i as e, n as t } from "./Bdeug17L.mjs";
2
- import { n, r, t as i } from "./DnBzQ-xh.mjs";
3
- import { r as a } from "./akEzJ4kG.mjs";
4
- import { _ as o, n as s, t as c } from "./hgAOQY9a.mjs";
5
- import { E as l, M as u, g as d, l as f, s as p, t as m, u as h } from "./DrKq_frR.mjs";
6
- import { n as g } from "./GEtlriHC.mjs";
7
- import { a as _, t as v } from "./GsvG1yFW.mjs";
8
- import { i as y, n as b, r as x, t as S } from "./CcT5SsZk.mjs";
9
- import { t as C } from "./BVIHqL6g.mjs";
10
- import { t as w } from "./Baam4z-g.mjs";
11
- import { Fragment as T, computed as E, createBlock as D, createCommentVNode as O, createElementBlock as k, createElementVNode as A, createVNode as j, defineComponent as M, h as N, inject as ee, nextTick as P, normalizeClass as F, normalizeStyle as I, onMounted as L, openBlock as R, provide as te, reactive as z, ref as B, renderList as V, shallowRef as ne, toDisplayString as re, toRefs as H, unref as U, watch as W, watchEffect as G, withCtx as K, withModifiers as q } from "vue";
12
- import { clamp as J, debounce as ie } from "lodash-unified";
13
- //#region node_modules/.pnpm/element-plus@2.13.7_typescr_0fa4751f8fa020301a8746973788e8b7/node_modules/element-plus/es/components/slider/src/constants.mjs
14
- var ae = Symbol("sliderContextKey"), Y = f({
15
- modelValue: {
16
- type: h([Number, Array]),
17
- default: 0
18
- },
19
- id: {
20
- type: String,
21
- default: void 0
22
- },
23
- min: {
24
- type: Number,
25
- default: 0
26
- },
27
- max: {
28
- type: Number,
29
- default: 100
30
- },
31
- step: {
32
- type: h([Number, String]),
33
- default: 1
34
- },
35
- showInput: Boolean,
36
- showInputControls: {
37
- type: Boolean,
38
- default: !0
39
- },
40
- size: a,
41
- inputSize: a,
42
- showStops: Boolean,
43
- showTooltip: {
44
- type: Boolean,
45
- default: !0
46
- },
47
- formatTooltip: {
48
- type: h(Function),
49
- default: void 0
50
- },
51
- disabled: {
52
- type: Boolean,
53
- default: void 0
54
- },
55
- range: Boolean,
56
- vertical: Boolean,
57
- height: String,
58
- rangeStartLabel: {
59
- type: String,
60
- default: void 0
61
- },
62
- rangeEndLabel: {
63
- type: String,
64
- default: void 0
65
- },
66
- formatValueText: {
67
- type: h(Function),
68
- default: void 0
69
- },
70
- tooltipClass: {
71
- type: String,
72
- default: void 0
73
- },
74
- placement: {
75
- type: String,
76
- values: _,
77
- default: "top"
78
- },
79
- marks: { type: h(Object) },
80
- validateEvent: {
81
- type: Boolean,
82
- default: !0
83
- },
84
- persistent: {
85
- type: Boolean,
86
- default: !0
87
- },
88
- ...C(["ariaLabel"])
89
- }), X = (e) => d(e) || l(e) && e.every(d), oe = {
90
- [r]: X,
91
- [n]: X,
92
- [i]: X
93
- }, se = (e, t, n) => {
94
- let r = B();
95
- return L(async () => {
96
- e.range ? (l(e.modelValue) ? (t.firstValue = Math.max(e.min, e.modelValue[0]), t.secondValue = Math.min(e.max, e.modelValue[1])) : (t.firstValue = e.min, t.secondValue = e.max), t.oldValue = [t.firstValue, t.secondValue]) : (!d(e.modelValue) || Number.isNaN(e.modelValue) ? t.firstValue = e.min : t.firstValue = Math.min(e.max, Math.max(e.min, e.modelValue)), t.oldValue = t.firstValue), o(window, "resize", n), await P(), n();
97
- }), { sliderWrapper: r };
98
- }, ce = (e) => {
99
- let t = E(() => e.marks ? Object.keys(e.marks).map(Number.parseFloat).sort((e, t) => e - t).filter((t) => t <= e.max && t >= e.min).map((t) => ({
100
- point: t,
101
- position: (t - e.min) * 100 / (e.max - e.min),
102
- mark: e.marks[t]
103
- })) : []);
104
- return G(() => {
105
- if (e.step === "mark" && !e.marks && c("ElSlider", "marks prop must be provided when step is mark"), e.marks) {
106
- let n = Object.keys(e.marks), r = t.value.map((e) => e.point), i = n.filter((e) => {
107
- let t = Number.parseFloat(e);
108
- return Number.isNaN(t) || !r.includes(t);
109
- });
110
- i.length > 0 && c("ElSlider", `Some marks keys are invalid (not a number or out of [min, max]): [${i.map((e) => `'${e}'`).join(", ")}] and will be ignored.`);
111
- }
112
- }), t;
113
- }, le = (e, t, a) => {
114
- let { formItem: o } = S(), s = ne(), c = B(), l = B(), u = {
115
- firstButton: c,
116
- secondButton: l
117
- }, d = x(), f = E(() => Math.min(t.firstValue, t.secondValue)), p = E(() => Math.max(t.firstValue, t.secondValue)), m = E(() => e.range ? `${100 * (p.value - f.value) / (e.max - e.min)}%` : `${100 * (t.firstValue - e.min) / (e.max - e.min)}%`), h = E(() => e.range ? `${100 * (f.value - e.min) / (e.max - e.min)}%` : "0%"), g = E(() => e.vertical ? { height: e.height } : {}), _ = E(() => e.vertical ? {
118
- height: m.value,
119
- bottom: h.value
120
- } : {
121
- width: m.value,
122
- left: h.value
123
- }), v = () => {
124
- s.value && (t.sliderSize = s.value.getBoundingClientRect()[e.vertical ? "height" : "width"]);
125
- }, y = (n) => {
126
- let r = e.min + n * (e.max - e.min) / 100;
127
- if (!e.range) return c;
128
- let i;
129
- return i = Math.abs(f.value - r) < Math.abs(p.value - r) ? t.firstValue < t.secondValue ? "firstButton" : "secondButton" : t.firstValue > t.secondValue ? "firstButton" : "secondButton", u[i];
130
- }, b = (e) => {
131
- let t = y(e);
132
- return t.value.setPosition(e), t;
133
- }, C = (n) => {
134
- t.firstValue = n ?? e.min, T(e.range ? [f.value, p.value] : n ?? e.min);
135
- }, w = (n) => {
136
- t.secondValue = n, e.range && T([f.value, p.value]);
137
- }, T = (e) => {
138
- a(r, e), a(n, e);
139
- }, D = async () => {
140
- await P(), a(i, e.range ? [f.value, p.value] : e.modelValue);
141
- }, O = (n) => {
142
- var r;
143
- if (d.value || t.dragging) return;
144
- v();
145
- let i = 0;
146
- if (e.vertical) {
147
- var a;
148
- let e = ((a = n.touches) == null || (a = a.item(0)) == null ? void 0 : a.clientY) ?? n.clientY;
149
- i = (s.value.getBoundingClientRect().bottom - e) / t.sliderSize * 100;
150
- } else i = ((((r = n.touches) == null || (r = r.item(0)) == null ? void 0 : r.clientX) ?? n.clientX) - s.value.getBoundingClientRect().left) / t.sliderSize * 100;
151
- if (!(i < 0 || i > 100)) return b(i);
152
- };
153
- return {
154
- elFormItem: o,
155
- slider: s,
156
- firstButton: c,
157
- secondButton: l,
158
- sliderDisabled: d,
159
- minValue: f,
160
- maxValue: p,
161
- runwayStyle: g,
162
- barStyle: _,
163
- resetSize: v,
164
- setPosition: b,
165
- emitChange: D,
166
- onSliderWrapperPrevent: (e) => {
167
- var t, n;
168
- ((t = u.firstButton.value) != null && t.dragging || (n = u.secondButton.value) != null && n.dragging) && e.preventDefault();
169
- },
170
- onSliderClick: (e) => {
171
- O(e) && D();
172
- },
173
- onSliderDown: async (e) => {
174
- let t = O(e);
175
- t && (await P(), t.value.onButtonDown(e));
176
- },
177
- onSliderMarkerDown: (e) => {
178
- d.value || t.dragging || b(e) && D();
179
- },
180
- setFirstValue: C,
181
- setSecondValue: w
182
- };
183
- }, ue = (e, t, n, r) => ({
184
- stops: E(() => {
185
- if (!e.showStops || e.min > e.max) return [];
186
- if (e.step === "mark" || e.step === 0) return e.step === 0 && c("ElSlider", "step should not be 0."), [];
187
- let i = Math.ceil((e.max - e.min) / e.step), a = 100 * e.step / (e.max - e.min), o = Array.from({ length: i - 1 }).map((e, t) => (t + 1) * a);
188
- return e.range ? o.filter((t) => t < 100 * (n.value - e.min) / (e.max - e.min) || t > 100 * (r.value - e.min) / (e.max - e.min)) : o.filter((n) => n > 100 * (t.firstValue - e.min) / (e.max - e.min));
189
- }),
190
- getStopStyle: (t) => e.vertical ? { bottom: `${t}%` } : { left: `${t}%` }
191
- }), de = (e, t, i, a, o, u) => {
192
- let f = (e) => {
193
- o(r, e), o(n, e);
194
- }, p = () => e.range ? ![i.value, a.value].every((e, n) => e === t.oldValue[n]) : e.modelValue !== t.oldValue, m = () => {
195
- e.min > e.max && s("Slider", "min should not be greater than max.");
196
- let n = e.modelValue;
197
- if (e.range && l(n)) {
198
- if (n[1] < e.min) f([e.min, e.min]);
199
- else if (n[0] > e.max) f([e.max, e.max]);
200
- else if (n[0] < e.min) f([e.min, n[1]]);
201
- else if (n[1] > e.max) f([n[0], e.max]);
202
- else if (t.firstValue = n[0], t.secondValue = n[1], p()) {
203
- var r;
204
- e.validateEvent && (u == null || (r = u.validate) == null || r.call(u, "change").catch((e) => c(e))), t.oldValue = n.slice();
205
- }
206
- } else if (!e.range && d(n) && !Number.isNaN(n)) {
207
- if (n < e.min) f(e.min);
208
- else if (n > e.max) f(e.max);
209
- else if (t.firstValue = n, p()) {
210
- var i;
211
- e.validateEvent && (u == null || (i = u.validate) == null || i.call(u, "change").catch((e) => c(e))), t.oldValue = n;
212
- }
213
- }
214
- };
215
- m(), W(() => t.dragging, (e) => {
216
- e || m();
217
- }), W(() => e.modelValue, (e, n) => {
218
- t.dragging || l(e) && l(n) && e.every((e, t) => e === n[t]) && t.firstValue === e[0] && t.secondValue === e[1] || m();
219
- }, { deep: !0 }), W(() => [e.min, e.max], () => {
220
- m();
221
- });
222
- }, fe = (e, t, n) => {
223
- let r = B(), i = B(!1), a = E(() => t.value instanceof Function);
224
- return {
225
- tooltip: r,
226
- tooltipVisible: i,
227
- formatValue: E(() => a.value && t.value(e.modelValue) || e.modelValue),
228
- displayTooltip: ie(() => {
229
- n.value && (i.value = !0);
230
- }, 50),
231
- hideTooltip: ie(() => {
232
- n.value && (i.value = !1);
233
- }, 50)
234
- };
235
- }, pe = (n, i, a) => {
236
- let { disabled: s, min: c, max: l, step: u, showTooltip: f, persistent: p, precision: m, sliderSize: h, formatTooltip: g, emitChange: _, resetSize: v, updateDragging: y, markList: b } = ee(ae), { tooltip: x, tooltipVisible: S, formatValue: C, displayTooltip: w, hideTooltip: T } = fe(n, g, f), D = B(), O = E(() => `${(n.modelValue - c.value) / (l.value - c.value) * 100}%`), k = E(() => n.vertical ? { bottom: O.value } : { left: O.value }), A = E(() => u.value === "mark" && b.value.length > 0), j = () => {
237
- i.hovering = !0, w();
238
- }, M = () => {
239
- i.hovering = !1, i.dragging || T();
240
- }, N = (e) => {
241
- s.value || (e.preventDefault(), U(e), window.addEventListener("mousemove", G), window.addEventListener("touchmove", G), window.addEventListener("mouseup", K), window.addEventListener("touchend", K), window.addEventListener("contextmenu", K), D.value.focus());
242
- }, F = (e) => {
243
- s.value || (i.newPosition = Number.parseFloat(O.value) + e / (l.value - c.value) * 100, q(i.newPosition), _());
244
- }, I = (e) => {
245
- if (s.value || !b.value.length) return;
246
- let t = n.modelValue, r = 2 ** -52, i = Math.abs(e), a;
247
- if (e > 0) {
248
- let e = b.value.findIndex((e) => e.point > t + r);
249
- if (e !== -1) {
250
- let t = Math.min(e + i - 1, b.value.length - 1);
251
- a = b.value[t].point;
252
- }
253
- } else {
254
- let e = -1;
255
- for (let n = b.value.length - 1; n >= 0; n--) if (b.value[n].point < t - r) {
256
- e = n;
257
- break;
258
- }
259
- if (e !== -1) {
260
- let t = Math.max(e - (i - 1), 0);
261
- a = b.value[t].point;
262
- }
263
- }
264
- a !== void 0 && a !== t && (q((a - c.value) / (l.value - c.value) * 100), _());
265
- }, L = () => {
266
- A.value ? I(-1) : d(u.value) && F(-u.value);
267
- }, R = () => {
268
- A.value ? I(1) : d(u.value) && F(u.value);
269
- }, te = () => {
270
- A.value ? I(-4) : d(u.value) && F(-u.value * 4);
271
- }, z = () => {
272
- A.value ? I(4) : d(u.value) && F(u.value * 4);
273
- }, V = () => {
274
- s.value || (q(0), _());
275
- }, ne = () => {
276
- s.value || (q(100), _());
277
- }, re = (n) => {
278
- let r = t(n), i = !0;
279
- switch (r) {
280
- case e.left:
281
- case e.down:
282
- L();
283
- break;
284
- case e.right:
285
- case e.up:
286
- R();
287
- break;
288
- case e.home:
289
- V();
290
- break;
291
- case e.end:
292
- ne();
293
- break;
294
- case e.pageDown:
295
- te();
296
- break;
297
- case e.pageUp:
298
- z();
299
- break;
300
- default:
301
- i = !1;
302
- break;
303
- }
304
- i && n.preventDefault();
305
- }, H = (e) => {
306
- let t, n;
307
- return e.type.startsWith("touch") ? (n = e.touches[0].clientY, t = e.touches[0].clientX) : (n = e.clientY, t = e.clientX), {
308
- clientX: t,
309
- clientY: n
310
- };
311
- }, U = (e) => {
312
- i.dragging = !0, i.isClick = !0;
313
- let { clientX: t, clientY: r } = H(e);
314
- n.vertical ? i.startY = r : i.startX = t, i.startPosition = Number.parseFloat(O.value), i.newPosition = i.startPosition;
315
- }, G = (e) => {
316
- if (i.dragging) {
317
- i.isClick = !1, w(), v();
318
- let t, { clientX: r, clientY: a } = H(e);
319
- n.vertical ? (i.currentY = a, t = (i.startY - i.currentY) / h.value * 100) : (i.currentX = r, t = (i.currentX - i.startX) / h.value * 100), i.newPosition = i.startPosition + t, q(i.newPosition);
320
- }
321
- }, K = () => {
322
- i.dragging && (setTimeout(() => {
323
- i.dragging = !1, i.hovering || T(), i.isClick || q(i.newPosition), _();
324
- }, 0), window.removeEventListener("mousemove", G), window.removeEventListener("touchmove", G), window.removeEventListener("mouseup", K), window.removeEventListener("touchend", K), window.removeEventListener("contextmenu", K));
325
- }, q = async (e) => {
326
- if (e === null || Number.isNaN(+e)) return;
327
- e = J(e, 0, 100);
328
- let t;
329
- if (u.value === "mark") t = b.value.length === 0 ? e <= 50 ? c.value : l.value : b.value.reduce((t, n) => Math.abs(n.position - e) < Math.abs(t.position - e) ? n : t).point;
330
- else {
331
- let n = Math.floor((l.value - c.value) / u.value), r = n * u.value / (l.value - c.value) * 100, i = r + (100 - r) / 2;
332
- if (e < r) {
333
- let i = r / n, a = Math.round(e / i);
334
- t = c.value + a * u.value;
335
- } else t = e < i ? c.value + n * u.value : l.value;
336
- t = Number.parseFloat(t.toFixed(m.value));
337
- }
338
- t !== n.modelValue && a(r, t), !i.dragging && n.modelValue !== i.oldValue && (i.oldValue = n.modelValue), await P(), i.dragging && w(), x.value.updatePopper();
339
- };
340
- return W(() => i.dragging, (e) => {
341
- y(e);
342
- }), o(D, "touchstart", N, { passive: !1 }), {
343
- disabled: s,
344
- button: D,
345
- tooltip: x,
346
- tooltipVisible: S,
347
- showTooltip: f,
348
- persistent: p,
349
- wrapperStyle: k,
350
- formatValue: C,
351
- handleMouseEnter: j,
352
- handleMouseLeave: M,
353
- onButtonDown: N,
354
- onKeyDown: re,
355
- setPosition: q
356
- };
357
- }, me = f({
358
- modelValue: {
359
- type: Number,
360
- default: 0
361
- },
362
- vertical: Boolean,
363
- tooltipClass: String,
364
- placement: {
365
- type: String,
366
- values: _,
367
- default: "top"
368
- }
369
- }), he = { [r]: (e) => d(e) }, Z = ["tabindex"], ge = /* @__PURE__ */ M({
370
- name: "ElSliderButton",
371
- __name: "button",
372
- props: me,
373
- emits: he,
374
- setup(e, { expose: t, emit: n }) {
375
- let r = e, i = n, a = p("slider"), o = z({
376
- hovering: !1,
377
- dragging: !1,
378
- isClick: !1,
379
- startX: 0,
380
- currentX: 0,
381
- startY: 0,
382
- currentY: 0,
383
- startPosition: 0,
384
- newPosition: 0,
385
- oldValue: r.modelValue
386
- }), s = E(() => d.value ? f.value : !1), { disabled: c, button: l, tooltip: u, showTooltip: d, persistent: f, tooltipVisible: m, wrapperStyle: h, formatValue: g, handleMouseEnter: _, handleMouseLeave: y, onButtonDown: b, onKeyDown: x, setPosition: S } = pe(r, o, i), { hovering: C, dragging: w } = H(o);
387
- return t({
388
- onButtonDown: b,
389
- onKeyDown: x,
390
- setPosition: S,
391
- hovering: C,
392
- dragging: w
393
- }), (e, t) => (R(), k("div", {
394
- ref_key: "button",
395
- ref: l,
396
- class: F([U(a).e("button-wrapper"), {
397
- hover: U(C),
398
- dragging: U(w)
399
- }]),
400
- style: I(U(h)),
401
- tabindex: U(c) ? void 0 : 0,
402
- onMouseenter: t[0] || (t[0] = (...e) => U(_) && U(_)(...e)),
403
- onMouseleave: t[1] || (t[1] = (...e) => U(y) && U(y)(...e)),
404
- onMousedown: t[2] || (t[2] = (...e) => U(b) && U(b)(...e)),
405
- onFocus: t[3] || (t[3] = (...e) => U(_) && U(_)(...e)),
406
- onBlur: t[4] || (t[4] = (...e) => U(y) && U(y)(...e)),
407
- onKeydown: t[5] || (t[5] = (...e) => U(x) && U(x)(...e))
408
- }, [j(U(v), {
409
- ref_key: "tooltip",
410
- ref: u,
411
- visible: U(m),
412
- placement: e.placement,
413
- "fallback-placements": [
414
- "top",
415
- "bottom",
416
- "right",
417
- "left"
418
- ],
419
- "stop-popper-mouse-event": !1,
420
- "popper-class": e.tooltipClass,
421
- disabled: !U(d),
422
- persistent: s.value
423
- }, {
424
- content: K(() => [A("span", null, re(U(g)), 1)]),
425
- default: K(() => [A("div", { class: F([U(a).e("button"), {
426
- hover: U(C),
427
- dragging: U(w)
428
- }]) }, null, 2)]),
429
- _: 1
430
- }, 8, [
431
- "visible",
432
- "placement",
433
- "popper-class",
434
- "disabled",
435
- "persistent"
436
- ])], 46, Z));
437
- }
438
- }), _e = M({
439
- name: "ElSliderMarker",
440
- props: f({ mark: {
441
- type: h([String, Object]),
442
- default: void 0
443
- } }),
444
- setup(e) {
445
- let t = p("slider"), n = E(() => u(e.mark) ? e.mark : e.mark.label), r = E(() => u(e.mark) ? void 0 : e.mark.style);
446
- return () => N("div", {
447
- class: t.e("marks-text"),
448
- style: r.value
449
- }, n.value);
450
- }
451
- }), ve = [
452
- "id",
453
- "role",
454
- "aria-label",
455
- "aria-labelledby"
456
- ], ye = { key: 1 }, be = m(/* @__PURE__ */ M({
457
- name: "ElSlider",
458
- __name: "slider",
459
- props: Y,
460
- emits: oe,
461
- setup(e, { expose: t, emit: n }) {
462
- let r = e, i = n, a = p("slider"), { t: s } = g(), c = z({
463
- firstValue: 0,
464
- secondValue: 0,
465
- oldValue: 0,
466
- dragging: !1,
467
- sliderSize: 1
468
- }), { elFormItem: l, slider: u, firstButton: f, secondButton: m, sliderDisabled: h, minValue: _, maxValue: v, runwayStyle: x, barStyle: S, resetSize: C, emitChange: M, onSliderWrapperPrevent: N, onSliderClick: ee, onSliderDown: P, onSliderMarkerDown: L, setFirstValue: B, setSecondValue: ne } = le(r, c, i), { stops: re, getStopStyle: W } = ue(r, c, _, v), { inputId: G, isLabeledByFormItem: K } = b(r, { formItemContext: l }), J = y(), ie = E(() => r.inputSize || J.value), Y = E(() => r.showInput && !r.range && r.step !== "mark"), X = E(() => r.ariaLabel || s("el.slider.defaultLabel", {
469
- min: r.min,
470
- max: r.max
471
- })), oe = E(() => r.range ? r.rangeStartLabel || s("el.slider.defaultRangeStartLabel") : X.value), fe = E(() => r.formatValueText ? r.formatValueText(Q.value) : `${Q.value}`), pe = E(() => r.rangeEndLabel || s("el.slider.defaultRangeEndLabel")), me = E(() => r.formatValueText ? r.formatValueText($.value) : `${$.value}`), he = E(() => [
472
- a.b(),
473
- a.m(J.value),
474
- a.is("vertical", r.vertical),
475
- { [a.m("with-input")]: Y.value }
476
- ]), Z = ce(r);
477
- de(r, c, _, v, i, l);
478
- let be = E(() => d(r.step) ? r.step : 1), xe = E(() => {
479
- let e = d(r.step) ? r.step : 1, t = [
480
- r.min,
481
- r.max,
482
- e
483
- ].map((e) => {
484
- let t = `${e}`.split(".")[1];
485
- return t ? t.length : 0;
486
- });
487
- return Math.max.apply(null, t);
488
- }), { sliderWrapper: Se } = se(r, c, C), { firstValue: Q, secondValue: $, sliderSize: Ce } = H(c), we = (e) => {
489
- c.dragging = e;
490
- };
491
- return o(Se, "touchstart", N, { passive: !1 }), o(Se, "touchmove", N, { passive: !1 }), te(ae, {
492
- ...H(r),
493
- sliderSize: Ce,
494
- disabled: h,
495
- precision: xe,
496
- markList: Z,
497
- emitChange: M,
498
- resetSize: C,
499
- updateDragging: we
500
- }), t({ onSliderClick: ee }), (e, t) => {
501
- var n, r;
502
- return R(), k("div", {
503
- id: e.range ? U(G) : void 0,
504
- ref_key: "sliderWrapper",
505
- ref: Se,
506
- class: F(he.value),
507
- role: e.range ? "group" : void 0,
508
- "aria-label": e.range && !U(K) ? X.value : void 0,
509
- "aria-labelledby": e.range && U(K) ? (n = U(l)) == null ? void 0 : n.labelId : void 0
510
- }, [A("div", {
511
- ref_key: "slider",
512
- ref: u,
513
- class: F([
514
- U(a).e("runway"),
515
- { "show-input": Y.value },
516
- U(a).is("disabled", U(h))
517
- ]),
518
- style: I(U(x)),
519
- onMousedown: t[0] || (t[0] = (...e) => U(P) && U(P)(...e)),
520
- onTouchstartPassive: t[1] || (t[1] = (...e) => U(P) && U(P)(...e))
521
- }, [
522
- A("div", {
523
- class: F(U(a).e("bar")),
524
- style: I(U(S))
525
- }, null, 6),
526
- j(ge, {
527
- id: e.range ? void 0 : U(G),
528
- ref_key: "firstButton",
529
- ref: f,
530
- "model-value": U(Q),
531
- vertical: e.vertical,
532
- "tooltip-class": e.tooltipClass,
533
- placement: e.placement,
534
- role: "slider",
535
- "aria-label": e.range || !U(K) ? oe.value : void 0,
536
- "aria-labelledby": !e.range && U(K) ? (r = U(l)) == null ? void 0 : r.labelId : void 0,
537
- "aria-valuemin": e.min,
538
- "aria-valuemax": e.range ? U($) : e.max,
539
- "aria-valuenow": U(Q),
540
- "aria-valuetext": fe.value,
541
- "aria-orientation": e.vertical ? "vertical" : "horizontal",
542
- "aria-disabled": U(h),
543
- "onUpdate:modelValue": U(B)
544
- }, null, 8, [
545
- "id",
546
- "model-value",
547
- "vertical",
548
- "tooltip-class",
549
- "placement",
550
- "aria-label",
551
- "aria-labelledby",
552
- "aria-valuemin",
553
- "aria-valuemax",
554
- "aria-valuenow",
555
- "aria-valuetext",
556
- "aria-orientation",
557
- "aria-disabled",
558
- "onUpdate:modelValue"
559
- ]),
560
- e.range ? (R(), D(ge, {
561
- key: 0,
562
- ref_key: "secondButton",
563
- ref: m,
564
- "model-value": U($),
565
- vertical: e.vertical,
566
- "tooltip-class": e.tooltipClass,
567
- placement: e.placement,
568
- role: "slider",
569
- "aria-label": pe.value,
570
- "aria-valuemin": U(Q),
571
- "aria-valuemax": e.max,
572
- "aria-valuenow": U($),
573
- "aria-valuetext": me.value,
574
- "aria-orientation": e.vertical ? "vertical" : "horizontal",
575
- "aria-disabled": U(h),
576
- "onUpdate:modelValue": U(ne)
577
- }, null, 8, [
578
- "model-value",
579
- "vertical",
580
- "tooltip-class",
581
- "placement",
582
- "aria-label",
583
- "aria-valuemin",
584
- "aria-valuemax",
585
- "aria-valuenow",
586
- "aria-valuetext",
587
- "aria-orientation",
588
- "aria-disabled",
589
- "onUpdate:modelValue"
590
- ])) : O("v-if", !0),
591
- e.showStops ? (R(), k("div", ye, [(R(!0), k(T, null, V(U(re), (e, t) => (R(), k("div", {
592
- key: t,
593
- class: F(U(a).e("stop")),
594
- style: I(U(W)(e))
595
- }, null, 6))), 128))])) : O("v-if", !0),
596
- U(Z).length > 0 ? (R(), k(T, { key: 2 }, [A("div", null, [(R(!0), k(T, null, V(U(Z), (e, t) => (R(), k("div", {
597
- key: t,
598
- style: I(U(W)(e.position)),
599
- class: F([U(a).e("stop"), U(a).e("marks-stop")])
600
- }, null, 6))), 128))]), A("div", { class: F(U(a).e("marks")) }, [(R(!0), k(T, null, V(U(Z), (e, t) => (R(), D(U(_e), {
601
- key: t,
602
- mark: e.mark,
603
- style: I(U(W)(e.position)),
604
- onMousedown: q((t) => U(L)(e.position), ["stop"])
605
- }, null, 8, [
606
- "mark",
607
- "style",
608
- "onMousedown"
609
- ]))), 128))], 2)], 64)) : O("v-if", !0)
610
- ], 38), Y.value ? (R(), D(U(w), {
611
- key: 0,
612
- ref: "input",
613
- "model-value": U(Q),
614
- class: F(U(a).e("input")),
615
- step: be.value,
616
- disabled: U(h),
617
- controls: e.showInputControls,
618
- min: e.min,
619
- max: e.max,
620
- precision: xe.value,
621
- size: ie.value,
622
- "onUpdate:modelValue": U(B),
623
- onChange: U(M)
624
- }, null, 8, [
625
- "model-value",
626
- "class",
627
- "step",
628
- "disabled",
629
- "controls",
630
- "min",
631
- "max",
632
- "precision",
633
- "size",
634
- "onUpdate:modelValue",
635
- "onChange"
636
- ])) : O("v-if", !0)], 10, ve);
637
- };
638
- }
639
- }));
640
- //#endregion
641
- export { be as t };