y-design-ssr 0.2.1 → 0.2.2

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 (90) hide show
  1. package/libs/button/index.css +579 -1
  2. package/libs/button/index.mjs +111 -66
  3. package/libs/button/index.umd.js +203 -2
  4. package/libs/cell/index.css +1077 -1
  5. package/libs/cell/index.mjs +167 -104
  6. package/libs/cell/index.umd.js +300 -2
  7. package/libs/checkbox/index.css +1053 -1
  8. package/libs/checkbox/index.mjs +242 -127
  9. package/libs/checkbox/index.umd.js +369 -2
  10. package/libs/checkboxGroup/index.css +422 -1
  11. package/libs/checkboxGroup/index.mjs +173 -87
  12. package/libs/checkboxGroup/index.umd.js +265 -2
  13. package/libs/col/index.css +615 -1
  14. package/libs/col/index.mjs +246 -81
  15. package/libs/col/index.umd.js +305 -2
  16. package/libs/countdown/index.css +417 -1
  17. package/libs/countdown/index.mjs +179 -71
  18. package/libs/countdown/index.umd.js +231 -2
  19. package/libs/dialog/index.css +1405 -1
  20. package/libs/dialog/index.mjs +646 -476
  21. package/libs/dialog/index.umd.js +1128 -2
  22. package/libs/empty/index.css +457 -1
  23. package/libs/empty/index.mjs +91 -44
  24. package/libs/empty/index.umd.js +139 -2
  25. package/libs/form/index.css +477 -1
  26. package/libs/form/index.mjs +226 -126
  27. package/libs/form/index.umd.js +319 -2
  28. package/libs/formItem/index.css +477 -1
  29. package/libs/formItem/index.mjs +276 -126
  30. package/libs/formItem/index.umd.js +372 -2
  31. package/libs/icon/index.css +982 -1
  32. package/libs/icon/index.mjs +107 -58
  33. package/libs/icon/index.umd.js +186 -2
  34. package/libs/index.css +2902 -1
  35. package/libs/index.mjs +3785 -2344
  36. package/libs/index.umd.js +5509 -2
  37. package/libs/input/index.css +483 -1
  38. package/libs/input/index.mjs +183 -92
  39. package/libs/input/index.umd.js +274 -2
  40. package/libs/layout/index.css +684 -1
  41. package/libs/layout/index.mjs +230 -130
  42. package/libs/layout/index.umd.js +318 -2
  43. package/libs/list/index.css +440 -1
  44. package/libs/list/index.mjs +388 -207
  45. package/libs/list/index.umd.js +571 -2
  46. package/libs/loading/index.css +548 -1
  47. package/libs/loading/index.mjs +196 -118
  48. package/libs/loading/index.umd.js +321 -2
  49. package/libs/mask/index.css +426 -1
  50. package/libs/mask/index.mjs +131 -70
  51. package/libs/mask/index.umd.js +201 -2
  52. package/libs/popup/index.css +465 -1
  53. package/libs/popup/index.mjs +210 -134
  54. package/libs/popup/index.umd.js +358 -2
  55. package/libs/progress/index.css +488 -1
  56. package/libs/progress/index.mjs +200 -128
  57. package/libs/progress/index.umd.js +322 -2
  58. package/libs/pullrefresh/index.css +441 -1
  59. package/libs/pullrefresh/index.mjs +241 -111
  60. package/libs/pullrefresh/index.umd.js +302 -2
  61. package/libs/row/index.css +485 -1
  62. package/libs/row/index.mjs +181 -89
  63. package/libs/row/index.umd.js +237 -2
  64. package/libs/slider/index.css +558 -1
  65. package/libs/slider/index.mjs +356 -160
  66. package/libs/slider/index.umd.js +453 -2
  67. package/libs/stepper/index.css +489 -1
  68. package/libs/stepper/index.mjs +181 -101
  69. package/libs/stepper/index.umd.js +269 -2
  70. package/libs/swipe/index.css +506 -1
  71. package/libs/swipe/index.mjs +542 -259
  72. package/libs/swipe/index.umd.js +703 -2
  73. package/libs/swipeItem/index.css +424 -1
  74. package/libs/swipeItem/index.mjs +111 -52
  75. package/libs/swipeItem/index.umd.js +154 -2
  76. package/libs/switch/index.css +472 -1
  77. package/libs/switch/index.mjs +121 -62
  78. package/libs/switch/index.umd.js +200 -2
  79. package/libs/tab/index.mjs +131 -68
  80. package/libs/tab/index.umd.js +190 -1
  81. package/libs/tabs/index.css +514 -1
  82. package/libs/tabs/index.mjs +751 -410
  83. package/libs/tabs/index.umd.js +1020 -2
  84. package/libs/toast/index.css +1050 -1
  85. package/libs/toast/index.mjs +183 -114
  86. package/libs/toast/index.umd.js +306 -2
  87. package/libs/tooltip/index.css +514 -1
  88. package/libs/tooltip/index.mjs +293 -155
  89. package/libs/tooltip/index.umd.js +416 -2
  90. package/package.json +2 -2
@@ -1,11 +1,40 @@
1
- import { ref as s, reactive as E, defineComponent as H, computed as V, createVNode as g } from "vue";
2
- const $ = (e, a) => a ? typeof a == "string" ? ` ${e}--${a}` : Array.isArray(a) ? a.reduce((o, n) => o + $(e, n), "") : Object.keys(a).reduce(
3
- (o, n) => o + (a[n] ? $(e, n) : ""),
4
- ""
5
- ) : "", P = (e) => (a, o) => {
6
- let n = a, u = o;
7
- return n && typeof n != "string" && (u = n, n = ""), n = n ? `${e}__${n}` : e, `${n}${$(n, u)}`;
8
- }, G = () => (e, a) => a ? `${$(`y-${e}`, a)}` : `y-${e}`, J = {
1
+ import { ref, reactive, defineComponent, computed, createVNode } from "vue";
2
+ const getMods = (el, mods) => {
3
+ if (!mods) {
4
+ return "";
5
+ }
6
+ if (typeof mods === "string") {
7
+ return ` ${el}--${mods}`;
8
+ }
9
+ if (Array.isArray(mods)) {
10
+ return mods.reduce((acc, cur) => acc + getMods(el, cur), "");
11
+ }
12
+ return Object.keys(mods).reduce(
13
+ (acc, cur) => acc + (mods[cur] ? getMods(el, cur) : ""),
14
+ ""
15
+ );
16
+ };
17
+ const createBEM = (block) => {
18
+ return (el, mods) => {
19
+ let _el = el;
20
+ let _mods = mods;
21
+ if (_el && typeof _el !== "string") {
22
+ _mods = _el;
23
+ _el = "";
24
+ }
25
+ _el = _el ? `${block}__${_el}` : block;
26
+ return `${_el}${getMods(_el, _mods)}`;
27
+ };
28
+ };
29
+ const createGlobalBem = () => {
30
+ return (el, mods) => {
31
+ if (!mods) {
32
+ return `y-${el}`;
33
+ }
34
+ return `${getMods(`y-${el}`, mods)}`;
35
+ };
36
+ };
37
+ const defaultLang = {
9
38
  "pull-refresh": {
10
39
  pulling: "下拉刷新...",
11
40
  loosing: "释放刷新...",
@@ -17,39 +46,94 @@ const $ = (e, a) => a ? typeof a == "string" ? ` ${e}--${a}` : Array.isArray(a)
17
46
  validateMessage: "请输入正确内容"
18
47
  }
19
48
  };
20
- s("zh-CN");
21
- E({
22
- "zh-CN": J
49
+ ref("zh-CN");
50
+ reactive({
51
+ "zh-CN": defaultLang
23
52
  });
24
- const j = (e) => {
25
- const a = `y-${e}`;
26
- return [a, P(a), G()];
27
- }, L = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, _ = 10, U = (e, a) => e > a && e > _ ? "horizontal" : a > e && a > _ ? "vertical" : "", p = (e, a) => Math.abs(e) > Math.abs(a) ? e > 0 ? "right" : "left" : a > 0 ? "bottom" : "top", q = () => {
28
- const e = s(0), a = s(0), o = s(0), n = s(0), u = s(0), i = s(0), c = s(""), C = s(""), h = () => c.value === "vertical", b = () => c.value === "horizontal", N = () => {
29
- o.value = 0, n.value = 0, u.value = 0, i.value = 0, c.value = "", C.value = "";
53
+ const createNamespace = (name) => {
54
+ const prefixedName = `y-${name}`;
55
+ return [prefixedName, createBEM(prefixedName), createGlobalBem()];
56
+ };
57
+ const parseUnit = (val) => {
58
+ if (isNaN(Number(val)) && typeof val === "string") {
59
+ return val;
60
+ }
61
+ return `${val}px`;
62
+ };
63
+ const MIN_DISTANCE = 10;
64
+ const getDirection = (x, y) => {
65
+ if (x > y && x > MIN_DISTANCE) {
66
+ return "horizontal";
67
+ }
68
+ if (y > x && y > MIN_DISTANCE) {
69
+ return "vertical";
70
+ }
71
+ return "";
72
+ };
73
+ const getTouchDirection = (x, y) => {
74
+ if (Math.abs(x) > Math.abs(y)) {
75
+ if (x > 0)
76
+ return "right";
77
+ return "left";
78
+ }
79
+ if (y > 0)
80
+ return "bottom";
81
+ return "top";
82
+ };
83
+ const useTouch = () => {
84
+ const startX = ref(0);
85
+ const startY = ref(0);
86
+ const deltaX = ref(0);
87
+ const deltaY = ref(0);
88
+ const offsetX = ref(0);
89
+ const offsetY = ref(0);
90
+ const direction = ref("");
91
+ const touchDirection = ref("");
92
+ const isVertical = () => direction.value === "vertical";
93
+ const isHorizontal = () => direction.value === "horizontal";
94
+ const reset2 = () => {
95
+ deltaX.value = 0;
96
+ deltaY.value = 0;
97
+ offsetX.value = 0;
98
+ offsetY.value = 0;
99
+ direction.value = "";
100
+ touchDirection.value = "";
101
+ };
102
+ const start = (event) => {
103
+ reset2();
104
+ startX.value = event.touches[0].clientX;
105
+ startY.value = event.touches[0].clientY;
106
+ };
107
+ const move = (event) => {
108
+ const touch = event.touches[0];
109
+ deltaX.value = touch.clientX < 0 ? 0 : touch.clientX - startX.value;
110
+ deltaY.value = touch.clientY - startY.value;
111
+ offsetX.value = Math.abs(deltaX.value);
112
+ offsetY.value = Math.abs(deltaY.value);
113
+ if (!direction.value) {
114
+ direction.value = getDirection(offsetX.value, offsetY.value);
115
+ }
116
+ touchDirection.value = getTouchDirection(deltaX.value, deltaY.value);
30
117
  };
31
118
  return {
32
- move: (m) => {
33
- const y = m.touches[0];
34
- o.value = y.clientX < 0 ? 0 : y.clientX - e.value, n.value = y.clientY - a.value, u.value = Math.abs(o.value), i.value = Math.abs(n.value), c.value || (c.value = U(u.value, i.value)), C.value = p(o.value, n.value);
35
- },
36
- start: (m) => {
37
- N(), e.value = m.touches[0].clientX, a.value = m.touches[0].clientY;
38
- },
39
- reset: N,
40
- startX: e,
41
- startY: a,
42
- deltaX: o,
43
- deltaY: n,
44
- offsetX: u,
45
- offsetY: i,
46
- direction: c,
47
- touchDirection: C,
48
- isVertical: h,
49
- isHorizontal: b
119
+ move,
120
+ start,
121
+ reset: reset2,
122
+ startX,
123
+ startY,
124
+ deltaX,
125
+ deltaY,
126
+ offsetX,
127
+ offsetY,
128
+ direction,
129
+ touchDirection,
130
+ isVertical,
131
+ isHorizontal
50
132
  };
51
- }, [F, d] = j("slider"), R = /* @__PURE__ */ H({
52
- name: F,
133
+ };
134
+ const [cname, bem] = createNamespace("slider");
135
+ const Slider = /* @__PURE__ */ defineComponent({
136
+ name: cname,
53
137
  props: {
54
138
  modelValue: {
55
139
  type: [Number, Array],
@@ -81,11 +165,11 @@ const j = (e) => {
81
165
  },
82
166
  disabled: {
83
167
  type: Boolean,
84
- default: !1
168
+ default: false
85
169
  },
86
170
  showTooltip: {
87
171
  type: Boolean,
88
- default: !1
172
+ default: false
89
173
  },
90
174
  step: {
91
175
  type: Number,
@@ -105,147 +189,259 @@ const j = (e) => {
105
189
  }
106
190
  },
107
191
  emits: ["change", "drag-start", "drag-end", "update:modelValue"],
108
- setup(e, {
109
- emit: a,
110
- slots: o
192
+ setup(props, {
193
+ emit,
194
+ slots
111
195
  }) {
112
- const n = s(), u = s(0), i = s(0), c = s(""), C = q(), h = V(() => Array.isArray(e.modelValue)), b = (t) => {
196
+ const rootRef = ref();
197
+ const startRef = ref(0);
198
+ const curRef = ref(0);
199
+ const moveStatusRef = ref("");
200
+ const touch = useTouch();
201
+ const isRangeRef = computed(() => Array.isArray(props.modelValue));
202
+ const formatValue = (value) => {
113
203
  const {
114
- min: r,
115
- max: l,
116
- step: f
117
- } = e, v = Math.max(r, Math.min(t, l));
118
- return Math.round(v / f) * f;
119
- }, N = (t) => {
120
- if (t.stopPropagation(), e.disabled)
204
+ min,
205
+ max,
206
+ step
207
+ } = props;
208
+ const val = Math.max(min, Math.min(value, max));
209
+ return Math.round(val / step) * step;
210
+ };
211
+ const handleClick = (event) => {
212
+ event.stopPropagation();
213
+ if (props.disabled)
121
214
  return;
122
215
  const {
123
- min: r,
124
- modelValue: l
125
- } = e, {
126
- left: f,
127
- width: v
128
- } = n.value.getBoundingClientRect(), S = t.clientX - f, T = Math.floor(r + S / v * M.value);
129
- if (h.value) {
130
- const X = l[0], x = l[1], W = (X + x) / 2;
131
- T <= W ? m([T, x]) : m([X, T]);
132
- } else
133
- m(T);
134
- }, w = (t) => t[0] > t[1] ? [t[1], t[0]] : t, k = (t, r) => JSON.stringify(t) === JSON.stringify(r), m = (t, r) => {
135
- let l = 0;
136
- h.value ? l = w(t).map(b) : l = b(t), a("update:modelValue", l), typeof r > "u" && !k(u.value, i.value) && a("change", l);
137
- }, y = V(() => {
216
+ min,
217
+ modelValue
218
+ } = props;
138
219
  const {
139
- modelValue: t,
140
- min: r
141
- } = e;
142
- let l = null;
143
- return h.value ? l = Math.floor((b(t[1]) - b(t[0])) * 100 / M.value) : l = Math.floor((b(t) - r) * 100 / M.value), `${l}%`;
144
- }), A = V(() => {
220
+ left: rootLeft,
221
+ width: rootWidth
222
+ } = rootRef.value.getBoundingClientRect();
223
+ const delta = event.clientX - rootLeft;
224
+ const curValue = Math.floor(min + delta / rootWidth * numberGapRef.value);
225
+ if (isRangeRef.value) {
226
+ const left = modelValue[0];
227
+ const right = modelValue[1];
228
+ const middle = (left + right) / 2;
229
+ if (curValue <= middle) {
230
+ updateValue([curValue, right]);
231
+ } else {
232
+ updateValue([left, curValue]);
233
+ }
234
+ } else {
235
+ updateValue(curValue);
236
+ }
237
+ };
238
+ const handlePositionOrder = (value) => {
239
+ if (value[0] > value[1]) {
240
+ return [value[1], value[0]];
241
+ }
242
+ return value;
243
+ };
244
+ const isSameValue = (beforeValue, curValue) => JSON.stringify(beforeValue) === JSON.stringify(curValue);
245
+ const updateValue = (value, unfinished) => {
246
+ let newValue = 0;
247
+ if (isRangeRef.value) {
248
+ newValue = handlePositionOrder(value).map(formatValue);
249
+ } else {
250
+ newValue = formatValue(value);
251
+ }
252
+ emit("update:modelValue", newValue);
253
+ if (typeof unfinished === "undefined" && !isSameValue(startRef.value, curRef.value)) {
254
+ emit("change", newValue);
255
+ }
256
+ };
257
+ const getInnerLengthPercentRef = computed(() => {
145
258
  const {
146
- modelValue: t,
147
- min: r
148
- } = e;
149
- return h.value ? `${Math.floor((b(t[0]) - r) * 100 / M.value)}%` : "0%";
150
- }), z = V(() => ({
151
- left: y.value,
152
- transition: c.value === "moving" ? "none" : `${e.transitionTime}ms ease-in-out`
153
- })), M = V(() => e.max - e.min), D = (t) => {
154
- e.disabled || (C.start(t), c.value = "startMove", i.value = e.modelValue, h.value ? u.value = [...i.value] : u.value = i.value);
155
- }, I = (t, r) => {
156
- if (e.disabled)
259
+ modelValue,
260
+ min
261
+ } = props;
262
+ let tmpVal = null;
263
+ if (isRangeRef.value) {
264
+ tmpVal = Math.floor((formatValue(modelValue[1]) - formatValue(modelValue[0])) * 100 / numberGapRef.value);
265
+ } else {
266
+ tmpVal = Math.floor((formatValue(modelValue) - min) * 100 / numberGapRef.value);
267
+ }
268
+ return `${tmpVal}%`;
269
+ });
270
+ const getOffsetRef = computed(() => {
271
+ const {
272
+ modelValue,
273
+ min
274
+ } = props;
275
+ if (isRangeRef.value) {
276
+ return `${Math.floor((formatValue(modelValue[0]) - min) * 100 / numberGapRef.value)}%`;
277
+ }
278
+ return "0%";
279
+ });
280
+ const toolTipStyle = computed(() => {
281
+ return {
282
+ left: getInnerLengthPercentRef.value,
283
+ transition: moveStatusRef.value === "moving" ? "none" : `${props.transitionTime}ms ease-in-out`
284
+ };
285
+ });
286
+ const numberGapRef = computed(() => props.max - props.min);
287
+ const handleTouchStart = (event) => {
288
+ if (props.disabled)
289
+ return;
290
+ touch.start(event);
291
+ moveStatusRef.value = "startMove";
292
+ curRef.value = props.modelValue;
293
+ if (isRangeRef.value) {
294
+ startRef.value = [...curRef.value];
295
+ } else {
296
+ startRef.value = curRef.value;
297
+ }
298
+ };
299
+ const handleTouchMove = (event, pos) => {
300
+ if (props.disabled)
157
301
  return;
158
- C.move(t), c.value === "startMove" && a("drag-start"), c.value = "moving";
302
+ touch.move(event);
303
+ if (moveStatusRef.value === "startMove") {
304
+ emit("drag-start");
305
+ }
306
+ moveStatusRef.value = "moving";
159
307
  const {
160
- width: l
161
- } = n.value.getBoundingClientRect(), f = C.deltaX.value, v = Math.floor(f / l * M.value);
162
- Array.isArray(u.value) && Array.isArray(i.value) ? r === "left" ? i.value[0] = u.value[0] + v : i.value[1] = u.value[1] + v : i.value = u.value + v, m(i.value, !0);
163
- }, O = () => {
164
- e.disabled || (c.value === "moving" && (m(i.value), a("drag-end")), c.value = "endMove");
165
- }, B = (t) => {
166
- let r = "", l = {}, f = 0, v = d("button-wrapper");
167
- return t === 0 ? (r = "left", l = {
168
- left: A.value,
169
- backgroundColor: Array.isArray(e.buttonBgColor) ? e.buttonBgColor[0] : e.buttonBgColor
170
- }, f = e.modelValue[t], v = d("button-wrapper", "left")) : t === 1 ? (r = "right", f = e.modelValue[t], l = {
171
- left: `${parseInt(y.value) + parseInt(A.value)}%`,
172
- backgroundColor: Array.isArray(e.buttonBgColor) ? e.buttonBgColor[1] : e.buttonBgColor
173
- }, v = d("button-wrapper", "right")) : (f = e.modelValue, l = {
174
- left: y.value,
175
- backgroundColor: e.buttonBgColor
176
- }), g("div", {
177
- role: "slider",
178
- "aria-valuemin": e.min,
179
- "aria-valuemax": e.max,
180
- "aria-valuenow": f,
181
- class: v,
182
- onTouchstart: D,
183
- onTouchmove: (S) => I(S, r),
184
- onTouchend: O,
185
- style: {
186
- ...l,
187
- transition: c.value === "moving" ? "none" : `${e.transitionTime}ms ease-in-out`
308
+ width
309
+ } = rootRef.value.getBoundingClientRect();
310
+ const delta = touch.deltaX.value;
311
+ const diff = Math.floor(delta / width * numberGapRef.value);
312
+ if (Array.isArray(startRef.value) && Array.isArray(curRef.value)) {
313
+ if (pos === "left") {
314
+ curRef.value[0] = startRef.value[0] + diff;
315
+ } else {
316
+ curRef.value[1] = startRef.value[1] + diff;
188
317
  }
189
- }, [o.button ? o.button() : g("div", {
190
- class: d("inner-button"),
191
- style: l
318
+ } else {
319
+ curRef.value = startRef.value + diff;
320
+ }
321
+ updateValue(curRef.value, true);
322
+ };
323
+ const handleTouchEnd = () => {
324
+ if (props.disabled)
325
+ return;
326
+ if (moveStatusRef.value === "moving") {
327
+ updateValue(curRef.value);
328
+ emit("drag-end");
329
+ }
330
+ moveStatusRef.value = "endMove";
331
+ };
332
+ const renderButton = (index) => {
333
+ let pos = "";
334
+ let posStyle = {};
335
+ let curValue = 0;
336
+ let buttonWrapperClass = bem("button-wrapper");
337
+ if (index === 0) {
338
+ pos = "left";
339
+ posStyle = {
340
+ left: getOffsetRef.value,
341
+ backgroundColor: Array.isArray(props.buttonBgColor) ? props.buttonBgColor[0] : props.buttonBgColor
342
+ };
343
+ curValue = props.modelValue[index];
344
+ buttonWrapperClass = bem("button-wrapper", "left");
345
+ } else if (index === 1) {
346
+ pos = "right";
347
+ curValue = props.modelValue[index];
348
+ posStyle = {
349
+ left: `${parseInt(getInnerLengthPercentRef.value) + parseInt(getOffsetRef.value)}%`,
350
+ backgroundColor: Array.isArray(props.buttonBgColor) ? props.buttonBgColor[1] : props.buttonBgColor
351
+ };
352
+ buttonWrapperClass = bem("button-wrapper", "right");
353
+ } else {
354
+ curValue = props.modelValue;
355
+ posStyle = {
356
+ left: getInnerLengthPercentRef.value,
357
+ backgroundColor: props.buttonBgColor
358
+ };
359
+ }
360
+ return createVNode("div", {
361
+ "role": "slider",
362
+ "aria-valuemin": props.min,
363
+ "aria-valuemax": props.max,
364
+ "aria-valuenow": curValue,
365
+ "class": buttonWrapperClass,
366
+ "onTouchstart": handleTouchStart,
367
+ "onTouchmove": (e) => handleTouchMove(e, pos),
368
+ "onTouchend": handleTouchEnd,
369
+ "style": {
370
+ ...posStyle,
371
+ transition: moveStatusRef.value === "moving" ? "none" : `${props.transitionTime}ms ease-in-out`
372
+ }
373
+ }, [slots.button ? slots.button() : createVNode("div", {
374
+ "class": bem("inner-button"),
375
+ "style": posStyle
192
376
  }, null)]);
193
- }, Y = V(() => Array((e.max - e.min) / e.step).fill({}).map((r, l) => ({
194
- position: `${l * e.step}%`
195
- })));
377
+ };
378
+ const getDotListRef = computed(() => {
379
+ const arr = Array((props.max - props.min) / props.step).fill({});
380
+ return arr.map((_, index) => ({
381
+ position: `${index * props.step}%`
382
+ }));
383
+ });
196
384
  return () => {
197
- var t;
198
- return g("div", {
199
- class: d()
200
- }, [o.iconLeft && g("div", {
201
- class: d("icon", {
202
- left: !0
385
+ var _a;
386
+ return createVNode("div", {
387
+ "class": bem()
388
+ }, [slots.iconLeft && createVNode("div", {
389
+ "class": bem("icon", {
390
+ left: true
203
391
  })
204
- }, [o.iconLeft()]), g("div", {
205
- role: "presentation",
206
- ref: n,
207
- class: d("wrapper-main", {
208
- disabled: e.disabled
392
+ }, [slots.iconLeft()]), createVNode("div", {
393
+ "role": "presentation",
394
+ "ref": rootRef,
395
+ "class": bem("wrapper-main", {
396
+ disabled: props.disabled
209
397
  }),
210
- style: {
211
- background: e.inactiveColor,
212
- height: L(e.barHeight)
398
+ "style": {
399
+ background: props.inactiveColor,
400
+ height: parseUnit(props.barHeight)
213
401
  },
214
- onClick: N
215
- }, [e.step !== 1 && g("div", {
216
- class: d("dots")
217
- }, [Y.value.map((r) => g("div", {
218
- class: d("dot"),
219
- style: {
220
- left: r.position,
221
- background: e.gapColor,
222
- width: L(e.gapWidth)
223
- }
224
- }, null))]), e.showTooltip && g("div", {
225
- class: d("tooltip", {
226
- wrapper: o.toolTip
402
+ "onClick": handleClick
403
+ }, [props.step !== 1 && createVNode("div", {
404
+ "class": bem("dots")
405
+ }, [getDotListRef.value.map((item) => {
406
+ return createVNode("div", {
407
+ "class": bem("dot"),
408
+ "style": {
409
+ left: item.position,
410
+ background: props.gapColor,
411
+ width: parseUnit(props.gapWidth)
412
+ }
413
+ }, null);
414
+ })]), props.showTooltip && createVNode("div", {
415
+ "class": bem("tooltip", {
416
+ wrapper: slots.toolTip
227
417
  }),
228
- style: z.value
229
- }, [((t = o.toolTip) == null ? void 0 : t.call(o)) || e.modelValue]), g("div", {
230
- style: {
231
- left: A.value,
232
- width: y.value,
233
- background: e.activeColor,
234
- transition: c.value === "moving" ? "none" : `${e.transitionTime}ms ease-in-out`
418
+ "style": toolTipStyle.value
419
+ }, [((_a = slots.toolTip) == null ? void 0 : _a.call(slots)) || props.modelValue]), createVNode("div", {
420
+ "style": {
421
+ left: getOffsetRef.value,
422
+ width: getInnerLengthPercentRef.value,
423
+ background: props.activeColor,
424
+ transition: moveStatusRef.value === "moving" ? "none" : `${props.transitionTime}ms ease-in-out`
235
425
  },
236
- class: d("inner")
237
- }, null), h.value ? [B(0), B(1)] : B()]), o.iconRight && g("div", {
238
- class: d("icon", {
239
- right: !0
426
+ "class": bem("inner")
427
+ }, null), isRangeRef.value ? [renderButton(0), renderButton(1)] : renderButton()]), slots.iconRight && createVNode("div", {
428
+ "class": bem("icon", {
429
+ right: true
240
430
  })
241
- }, [o.iconRight()])]);
431
+ }, [slots.iconRight()])]);
242
432
  };
243
433
  }
244
434
  });
245
- R.install = (e) => {
246
- const { name: a } = R;
247
- e.component(a, R);
435
+ const reset = "";
436
+ const libs = "";
437
+ const font = "";
438
+ const animation = "";
439
+ const theme = "";
440
+ const style = "";
441
+ Slider.install = (Vue) => {
442
+ const { name } = Slider;
443
+ Vue.component(name, Slider);
248
444
  };
249
445
  export {
250
- R as default
446
+ Slider as default
251
447
  };