evui 3.5.0 → 3.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/dist/index.js +23148 -0
  2. package/dist/index.umd.cjs +28 -0
  3. package/package.json +5 -11
  4. package/dist/_virtual/_plugin-vue_export-helper.js +0 -9
  5. package/dist/common/utils.bignumber.js +0 -23
  6. package/dist/common/utils.debounce.js +0 -66
  7. package/dist/common/utils.js +0 -64
  8. package/dist/common/utils.throttle.js +0 -15
  9. package/dist/components/button/Button.vue.js +0 -65
  10. package/dist/components/button/index.js +0 -7
  11. package/dist/components/buttonGroup/ButtonGroup.vue.js +0 -14
  12. package/dist/components/buttonGroup/index.js +0 -7
  13. package/dist/components/calendar/Calendar.vue.js +0 -299
  14. package/dist/components/calendar/index.js +0 -7
  15. package/dist/components/calendar/uses.js +0 -579
  16. package/dist/components/chart/Chart.vue.js +0 -261
  17. package/dist/components/chart/ChartToolbar.vue.js +0 -32
  18. package/dist/components/chart/chart.core.js +0 -738
  19. package/dist/components/chart/chartZoom.core.js +0 -221
  20. package/dist/components/chart/element/element.bar.js +0 -358
  21. package/dist/components/chart/element/element.bar.time.js +0 -55
  22. package/dist/components/chart/element/element.heatmap.js +0 -403
  23. package/dist/components/chart/element/element.line.js +0 -292
  24. package/dist/components/chart/element/element.pie.js +0 -73
  25. package/dist/components/chart/element/element.scatter.js +0 -209
  26. package/dist/components/chart/element/element.tip.js +0 -312
  27. package/dist/components/chart/helpers/helpers.canvas.js +0 -141
  28. package/dist/components/chart/helpers/helpers.constant.js +0 -253
  29. package/dist/components/chart/helpers/helpers.util.js +0 -265
  30. package/dist/components/chart/index.js +0 -7
  31. package/dist/components/chart/model/index.js +0 -6
  32. package/dist/components/chart/model/model.series.js +0 -82
  33. package/dist/components/chart/model/model.store.js +0 -650
  34. package/dist/components/chart/plugins/plugins.interaction.js +0 -823
  35. package/dist/components/chart/plugins/plugins.legend.gradient.js +0 -281
  36. package/dist/components/chart/plugins/plugins.legend.js +0 -665
  37. package/dist/components/chart/plugins/plugins.pie.js +0 -86
  38. package/dist/components/chart/plugins/plugins.scrollbar.js +0 -345
  39. package/dist/components/chart/plugins/plugins.title.js +0 -43
  40. package/dist/components/chart/plugins/plugins.tooltip.js +0 -508
  41. package/dist/components/chart/scale/scale.js +0 -492
  42. package/dist/components/chart/scale/scale.linear.js +0 -248
  43. package/dist/components/chart/scale/scale.logarithmic.js +0 -82
  44. package/dist/components/chart/scale/scale.step.js +0 -227
  45. package/dist/components/chart/scale/scale.time.category.js +0 -148
  46. package/dist/components/chart/scale/scale.time.js +0 -95
  47. package/dist/components/chart/uses.js +0 -479
  48. package/dist/components/chartBrush/ChartBrush.vue.js +0 -198
  49. package/dist/components/chartBrush/chartBrush.core.js +0 -265
  50. package/dist/components/chartBrush/index.js +0 -7
  51. package/dist/components/chartBrush/uses.js +0 -18
  52. package/dist/components/chartGroup/ChartGroup.vue.js +0 -128
  53. package/dist/components/chartGroup/index.js +0 -7
  54. package/dist/components/chartGroup/uses.js +0 -47
  55. package/dist/components/checkbox/Checkbox.vue.js +0 -99
  56. package/dist/components/checkbox/index.js +0 -7
  57. package/dist/components/checkboxGroup/CheckboxGroup.vue.js +0 -40
  58. package/dist/components/checkboxGroup/index.js +0 -7
  59. package/dist/components/contextMenu/ContextMenu.vue.js +0 -70
  60. package/dist/components/contextMenu/MenuList.vue.js +0 -105
  61. package/dist/components/contextMenu/index.js +0 -7
  62. package/dist/components/contextMenu/uses.js +0 -79
  63. package/dist/components/datePicker/DatePicker.vue.js +0 -310
  64. package/dist/components/datePicker/index.js +0 -7
  65. package/dist/components/datePicker/uses.js +0 -190
  66. package/dist/components/grid/Grid.vue.js +0 -1261
  67. package/dist/components/grid/GridColumnSetting.vue.js +0 -212
  68. package/dist/components/grid/GridFilterSetting.vue.js +0 -222
  69. package/dist/components/grid/GridPagination.vue.js +0 -69
  70. package/dist/components/grid/GridSummary.vue.js +0 -186
  71. package/dist/components/grid/GridToolbar.vue.js +0 -15
  72. package/dist/components/grid/icon/icon-option-button.vue.js +0 -39
  73. package/dist/components/grid/icon/icon-sort-button.vue.js +0 -56
  74. package/dist/components/grid/index.js +0 -7
  75. package/dist/components/grid/uses.js +0 -697
  76. package/dist/components/icon/Icon.vue.js +0 -50
  77. package/dist/components/icon/index.js +0 -8
  78. package/dist/components/inputNumber/InputNumber.vue.js +0 -112
  79. package/dist/components/inputNumber/index.js +0 -7
  80. package/dist/components/inputNumber/uses.js +0 -76
  81. package/dist/components/loading/Loading.vue.js +0 -78
  82. package/dist/components/loading/index.js +0 -7
  83. package/dist/components/menu/Menu.vue.js +0 -66
  84. package/dist/components/menu/MenuItem.vue.js +0 -125
  85. package/dist/components/menu/index.js +0 -7
  86. package/dist/components/message/Message.vue.js +0 -122
  87. package/dist/components/message/index.js +0 -16
  88. package/dist/components/messageBox/MessageBox.vue.js +0 -216
  89. package/dist/components/messageBox/index.js +0 -13
  90. package/dist/components/notification/Notification.vue.js +0 -140
  91. package/dist/components/notification/index.js +0 -23
  92. package/dist/components/pagination/Pagination.vue.js +0 -215
  93. package/dist/components/pagination/index.js +0 -7
  94. package/dist/components/pagination/pageButton.vue.js +0 -35
  95. package/dist/components/progress/Progress.vue.js +0 -88
  96. package/dist/components/progress/index.js +0 -7
  97. package/dist/components/radio/Radio.vue.js +0 -75
  98. package/dist/components/radio/index.js +0 -7
  99. package/dist/components/radioGroup/RadioGroup.vue.js +0 -37
  100. package/dist/components/radioGroup/index.js +0 -7
  101. package/dist/components/scheduler/Scheduler.vue.js +0 -128
  102. package/dist/components/scheduler/index.js +0 -7
  103. package/dist/components/scheduler/uses.js +0 -73
  104. package/dist/components/select/Select.vue.js +0 -381
  105. package/dist/components/select/index.js +0 -7
  106. package/dist/components/select/uses.js +0 -147
  107. package/dist/components/slider/Slider.vue.js +0 -243
  108. package/dist/components/slider/index.js +0 -7
  109. package/dist/components/slider/uses.js +0 -188
  110. package/dist/components/tabPanel/TabPanel.vue.js +0 -39
  111. package/dist/components/tabPanel/index.js +0 -7
  112. package/dist/components/tabs/Tabs.vue.js +0 -220
  113. package/dist/components/tabs/index.js +0 -7
  114. package/dist/components/textField/TextField.vue.js +0 -209
  115. package/dist/components/textField/index.js +0 -7
  116. package/dist/components/timePicker/TimePicker.vue.js +0 -227
  117. package/dist/components/timePicker/index.js +0 -7
  118. package/dist/components/toggle/Toggle.vue.js +0 -66
  119. package/dist/components/toggle/index.js +0 -7
  120. package/dist/components/tree/Tree.vue.js +0 -220
  121. package/dist/components/tree/TreeNode.vue.js +0 -146
  122. package/dist/components/tree/index.js +0 -7
  123. package/dist/components/treeGrid/TreeGrid.vue.js +0 -898
  124. package/dist/components/treeGrid/TreeGridNode.vue.js +0 -274
  125. package/dist/components/treeGrid/TreeGridToolbar.vue.js +0 -15
  126. package/dist/components/treeGrid/index.js +0 -7
  127. package/dist/components/treeGrid/uses.js +0 -497
  128. package/dist/components/window/Window.vue.js +0 -211
  129. package/dist/components/window/index.js +0 -7
  130. package/dist/components/window/uses.js +0 -345
  131. package/dist/directives/clickoutside.js +0 -47
  132. package/dist/main.js +0 -142
  133. package/dist/package.json.js +0 -4
  134. package/dist/resolver.js +0 -17
@@ -1,243 +0,0 @@
1
- import { resolveComponent as H, openBlock as r, createElementBlock as i, normalizeClass as f, createElementVNode as s, Fragment as y, renderList as v, normalizeStyle as d, createCommentVNode as u, toDisplayString as I, withModifiers as c, createBlock as M, createVNode as V, toRefs as S } from "vue";
2
- import { useModel as A, useStyle as N, useEvent as E, useInit as x } from "./uses.js";
3
- /* empty css */
4
- import D from "../../_virtual/_plugin-vue_export-helper.js";
5
- const F = {
6
- name: "EvSlider",
7
- components: {},
8
- props: {
9
- modelValue: {
10
- type: [Number, Array],
11
- default: null
12
- },
13
- readonly: {
14
- type: Boolean,
15
- default: !1
16
- },
17
- disabled: {
18
- type: Boolean,
19
- default: !1
20
- },
21
- range: {
22
- type: Boolean,
23
- default: !1
24
- },
25
- max: {
26
- type: Number,
27
- default: 100
28
- },
29
- min: {
30
- type: Number,
31
- default: 0
32
- },
33
- step: {
34
- type: Number,
35
- default: 1,
36
- validator: (a) => a > 0
37
- },
38
- mark: {
39
- type: Object,
40
- default: () => {
41
- }
42
- },
43
- showStep: {
44
- type: Boolean,
45
- default: !1
46
- },
47
- showTooltip: {
48
- type: Boolean,
49
- default: !0
50
- },
51
- showInput: {
52
- type: Boolean,
53
- default: !1
54
- },
55
- color: {
56
- type: [String, Array],
57
- default: null
58
- },
59
- tooltipFormat: {
60
- type: Function,
61
- default: null
62
- }
63
- },
64
- emits: ["update:modelValue", "change"],
65
- setup() {
66
- const {
67
- currentValue: a,
68
- state: t,
69
- slider: l,
70
- formatValue: e,
71
- sliderLine: h,
72
- updateSliderInfo: g,
73
- setSliderValue: o
74
- } = A(), {
75
- isColorArray: n,
76
- leftHandleStyle: m,
77
- rightHandleStyle: p,
78
- handleBtnStyle: b,
79
- rangeThumbStyle: k,
80
- leftThumbStyle: w,
81
- rightThumbStyle: T
82
- } = N({
83
- state: t,
84
- slider: l
85
- }), { startDrag: B, clickSlider: C, changeInput: L } = E({
86
- currentValue: a,
87
- state: t,
88
- slider: l,
89
- updateSliderInfo: g,
90
- setSliderValue: o
91
- });
92
- return x({
93
- currentValue: a,
94
- state: t,
95
- slider: l,
96
- updateSliderInfo: g,
97
- setSliderValue: o
98
- }), {
99
- currentValue: a,
100
- isColorArray: n,
101
- leftHandleStyle: m,
102
- rightHandleStyle: p,
103
- handleBtnStyle: b,
104
- rangeThumbStyle: k,
105
- leftThumbStyle: w,
106
- rightThumbStyle: T,
107
- sliderLine: h,
108
- ...S(t),
109
- ...S(l),
110
- formatValue: e,
111
- startDrag: B,
112
- clickSlider: C,
113
- changeInput: L
114
- };
115
- }
116
- }, U = { class: "ev-slider-wrapper" }, z = {
117
- ref: "sliderLine",
118
- class: "ev-slider-line"
119
- }, _ = {
120
- key: 0,
121
- class: "ev-slider-step-wrapper"
122
- }, j = {
123
- key: 2,
124
- class: "ev-slider-mark-wrapper"
125
- }, O = { class: "ev-slider-mark-label" }, R = ["innerHTML"], X = ["innerHTML"];
126
- function q(a, t, l, e, h, g) {
127
- const o = H("ev-input-number");
128
- return r(), i("div", {
129
- class: f(["ev-slider", {
130
- readonly: l.readonly,
131
- disabled: l.disabled,
132
- "hide-tooltip": !l.showTooltip,
133
- "show-input": l.showInput,
134
- "color-range": e.isColorArray,
135
- "show-mark": a.markList.length
136
- }])
137
- }, [
138
- s("div", U, [
139
- s("div", z, [
140
- l.showStep && l.step ? (r(), i("div", _, [
141
- (r(!0), i(y, null, v(a.stepList, (n, m) => (r(), i("span", {
142
- key: `slider-step-${m}`,
143
- style: d({ left: `${n}%` }),
144
- class: "ev-slider-step"
145
- }, null, 4))), 128))
146
- ])) : u("", !0),
147
- e.isColorArray && l.color.length > 1 ? (r(), i(y, { key: 1 }, [
148
- l.range ? (r(), i("div", {
149
- key: 0,
150
- style: d(e.leftThumbStyle),
151
- class: "ev-slider-thumb left"
152
- }, null, 4)) : u("", !0),
153
- s("div", {
154
- style: d(e.rightThumbStyle),
155
- class: "ev-slider-thumb right"
156
- }, null, 4)
157
- ], 64)) : u("", !0),
158
- s("div", {
159
- class: "ev-slider-thumb",
160
- style: d(e.rangeThumbStyle)
161
- }, null, 4),
162
- a.markList.length > 0 ? (r(), i("div", j, [
163
- (r(!0), i(y, null, v(a.markList, (n, m) => (r(), i("div", {
164
- key: `slider-step-${m}`,
165
- style: d({
166
- ...n.style,
167
- left: `${n.posX}%`
168
- }),
169
- class: "ev-slider-mark"
170
- }, [
171
- s("span", O, I(n.label), 1)
172
- ], 4))), 128))
173
- ])) : u("", !0),
174
- s("span", {
175
- class: "ev-slider-line-layer",
176
- onClick: t[0] || (t[0] = (...n) => e.clickSlider && e.clickSlider(...n))
177
- })
178
- ], 512),
179
- l.range ? (r(), i("div", {
180
- key: 0,
181
- class: f(["ev-slider-handle", { dragging: a.dragging && a.handleType === "left" }]),
182
- style: d(e.leftHandleStyle),
183
- onMousedown: t[1] || (t[1] = c((n) => e.startDrag("left"), ["stop", "prevent"]))
184
- }, [
185
- s("span", {
186
- style: d(e.handleBtnStyle),
187
- class: "ev-slider-handle-btn"
188
- }, null, 4),
189
- s("div", {
190
- class: "ev-slider-tooltip",
191
- innerHTML: e.formatValue.left
192
- }, null, 8, R)
193
- ], 38)) : u("", !0),
194
- s("div", {
195
- class: f(["ev-slider-handle", { dragging: a.dragging && a.handleType === "right" }]),
196
- style: d(e.rightHandleStyle),
197
- onMousedown: t[2] || (t[2] = c((n) => e.startDrag("right"), ["stop", "prevent"]))
198
- }, [
199
- s("span", {
200
- style: d(e.handleBtnStyle),
201
- class: "ev-slider-handle-btn"
202
- }, null, 4),
203
- s("div", {
204
- class: "ev-slider-tooltip",
205
- innerHTML: e.formatValue.right
206
- }, null, 8, X)
207
- ], 38)
208
- ]),
209
- l.showInput && !l.range ? (r(), M(o, {
210
- key: 0,
211
- modelValue: e.currentValue,
212
- "onUpdate:modelValue": t[3] || (t[3] = (n) => e.currentValue = n),
213
- step: l.step,
214
- min: l.min,
215
- max: l.max,
216
- "step-strictly": "",
217
- onChange: e.changeInput
218
- }, null, 8, ["modelValue", "step", "min", "max", "onChange"])) : l.showInput && l.range && Array.isArray(l.modelValue) ? (r(), i(y, { key: 1 }, [
219
- V(o, {
220
- modelValue: e.currentValue[0],
221
- "onUpdate:modelValue": t[4] || (t[4] = (n) => e.currentValue[0] = n),
222
- step: l.step,
223
- min: l.min,
224
- max: e.currentValue[1],
225
- "step-strictly": "",
226
- onChange: t[5] || (t[5] = (n) => e.changeInput(n, "left"))
227
- }, null, 8, ["modelValue", "step", "min", "max"]),
228
- V(o, {
229
- modelValue: e.currentValue[1],
230
- "onUpdate:modelValue": t[6] || (t[6] = (n) => e.currentValue[1] = n),
231
- step: l.step,
232
- min: e.currentValue[0],
233
- max: l.max,
234
- "step-strictly": "",
235
- onChange: t[7] || (t[7] = (n) => e.changeInput(n, "right"))
236
- }, null, 8, ["modelValue", "step", "min", "max"])
237
- ], 64)) : u("", !0)
238
- ], 2);
239
- }
240
- const Q = /* @__PURE__ */ D(F, [["render", q]]);
241
- export {
242
- Q as default
243
- };
@@ -1,7 +0,0 @@
1
- import e from "./Slider.vue.js";
2
- e.install = (o) => {
3
- o.component(e.name, e);
4
- };
5
- export {
6
- e as default
7
- };
@@ -1,188 +0,0 @@
1
- import { getCurrentInstance as k, ref as S, reactive as L, computed as h, watch as A, onMounted as M } from "vue";
2
- import { isNumber as I, isEqual as T } from "lodash-es";
3
- import { convertToPercent as y } from "../../common/utils.js";
4
- import { getValueCloseToStep as w } from "../inputNumber/uses.js";
5
- const D = () => {
6
- const { props: l, emit: e } = k(), s = S(l.modelValue), n = () => {
7
- if (!l.showStep)
8
- return [];
9
- const t = l.max - l.min, r = t / l.step, a = y(l.step, t), o = [];
10
- for (let f = 1; f < r; f++)
11
- o.push(f * a);
12
- return o;
13
- }, m = () => {
14
- if (!l.mark || !Object.keys(l.mark).length)
15
- return [];
16
- const t = (a, o = "value") => {
17
- if (!a)
18
- return [];
19
- const f = l.mark.style && typeof l.mark.style == "object" ? l.mark.style : {}, c = Object.keys(a), b = [];
20
- let x;
21
- for (let R = 0; R < c.length; R++)
22
- x = +c[R], isNaN(x) || b.push({
23
- posX: o === "value" ? y(x, l.max - l.min) : x,
24
- label: a[x],
25
- style: f
26
- });
27
- return b;
28
- };
29
- return l.mark.value || l.mark.percent ? [...t(l.mark.value), ...t(l.mark.percent, "percent")] : [...t(l.mark)];
30
- }, i = L({
31
- isInit: !1,
32
- dragging: !1,
33
- handleType: null,
34
- // 'left', 'right', null
35
- leftValue: null,
36
- rightValue: null
37
- }), u = L({
38
- valueRange: 0,
39
- stepList: h(n),
40
- markList: h(m),
41
- offset: {
42
- left: 0,
43
- width: 0
44
- }
45
- }), V = S(), p = h(() => {
46
- const t = l.tooltipFormat, r = t instanceof Function;
47
- return {
48
- left: r ? t(i.leftValue) : i.leftValue,
49
- right: r ? t(i.rightValue) : i.rightValue
50
- };
51
- }), g = (t) => {
52
- const r = {
53
- min: l.min,
54
- max: l.max,
55
- step: l.step
56
- };
57
- let a, o;
58
- l.range && Array.isArray(t) ? (a = typeof t[0] == "number" && !isNaN(t[0]) ? t[0] : l.min, o = typeof t[1] == "number" && !isNaN(t[1]) ? t[1] : l.min, i.leftValue = w(a, r), i.rightValue = w(o, r)) : (a = l.min, o = typeof t == "number" && !isNaN(t) ? t : l.min, i.leftValue = w(a, r), i.rightValue = w(o, r));
59
- }, d = (t) => {
60
- if (u.valueRange <= 0)
61
- return;
62
- g(t);
63
- let r;
64
- if (l.range && Array.isArray(t)) {
65
- const a = Math.min(i.leftValue, i.rightValue), o = Math.max(i.leftValue, i.rightValue);
66
- r = [a, o];
67
- } else
68
- r = i.rightValue;
69
- s.value = r, e("update:modelValue", r), e("change", r);
70
- }, v = () => {
71
- const t = V.value.getBoundingClientRect();
72
- u.offset.left = t.left, u.offset.width = t.width, u.valueRange = l.max - l.min;
73
- };
74
- return A(
75
- () => l.modelValue,
76
- (t, r) => {
77
- I(t) && t >= 0 && !T(t, r) && !i.dragging && (g(t), s.value = t);
78
- }
79
- ), A(
80
- () => l.step,
81
- () => {
82
- d(s.value);
83
- }
84
- ), {
85
- currentValue: s,
86
- state: i,
87
- slider: u,
88
- formatValue: p,
89
- sliderLine: V,
90
- updateSliderInfo: v,
91
- setSliderValue: d
92
- };
93
- }, O = (l) => {
94
- const { props: e } = k(), { state: s, slider: n } = l, m = "transparent", i = h(() => ({
95
- left: n.valueRange > 0 ? `${y(s.leftValue - e.min, n.valueRange)}%` : 0
96
- })), u = h(() => ({
97
- left: n.valueRange > 0 ? `${y(s.rightValue - e.min, n.valueRange)}%` : 0
98
- })), V = h(() => !e.color || Array.isArray(e.color) && e.color.length !== 1 ? {} : {
99
- borderColor: (typeof e.color == "string" ? e.color : e.color[0]) || m
100
- }), p = h(() => e.color && Array.isArray(e.color)), g = h(() => {
101
- const t = Math.min(s.leftValue, s.rightValue), a = +(Math.max(s.leftValue, s.rightValue) - t).toFixed(2), o = n.valueRange > 0 && e.range ? y(+(t - e.min).toFixed(2), n.valueRange) : 0, f = a > 0 ? y(a, n.valueRange) : 0, c = {};
102
- return e.color && (typeof e.color == "string" || Array.isArray(e.color) && e.color.length === 1 ? c.backgroundColor = (typeof e.color == "string" ? e.color : e.color[0]) || m : Array.isArray(e.color) && e.color.length > 1 && (c.backgroundColor = (e.range ? e.color[1] : e.color[0]) || m)), {
103
- left: `${o}%`,
104
- width: `${f}%`,
105
- ...c
106
- };
107
- }), d = h(() => {
108
- if (!p.value || e.color.length < 2 || !e.range)
109
- return {};
110
- const t = Math.min(s.leftValue, s.rightValue);
111
- return {
112
- width: `${y(Math.abs(t - e.min), n.valueRange)}%`,
113
- backgroundColor: e.color[0] || m
114
- };
115
- }), v = h(() => {
116
- if (!p.value || e.color.length < 2)
117
- return {};
118
- const t = Math.max(s.leftValue, s.rightValue), r = y(+(t - e.min).toFixed(2), n.valueRange), a = y(+(e.max - t).toFixed(2), n.valueRange), o = e.range ? 2 : e.color.length - 1;
119
- return {
120
- left: `${r}%`,
121
- width: `${a}%`,
122
- backgroundColor: e.color[o] || m
123
- };
124
- });
125
- return {
126
- isColorArray: p,
127
- leftHandleStyle: i,
128
- rightHandleStyle: u,
129
- handleBtnStyle: V,
130
- rangeThumbStyle: g,
131
- leftThumbStyle: d,
132
- rightThumbStyle: v
133
- };
134
- }, $ = (l) => {
135
- const { props: e } = k(), { currentValue: s, state: n, slider: m, updateSliderInfo: i, setSliderValue: u } = l, V = (r) => {
136
- n.dragging || i();
137
- const a = r.type.indexOf("touch") !== -1 ? r.touches[0].clientX : r.clientX, { valueRange: o, offset: f } = m;
138
- let c = e.min + (a - f.left) * o / f.width;
139
- return c < e.min ? c = e.min : c > e.max && (c = e.max), c;
140
- }, p = (r) => {
141
- if (e.readonly || e.disabled || n.dragging)
142
- return;
143
- const a = V(r);
144
- let o;
145
- if (e.range) {
146
- const c = Math.min(n.leftValue, n.rightValue) + Math.abs((n.rightValue - n.leftValue) / 2), b = n.leftValue > n.rightValue;
147
- a < c ? n.handleType = b ? "right" : "left" : n.handleType = b ? "left" : "right", o = n.handleType === "left" ? [a, n.rightValue] : [n.leftValue, a];
148
- } else
149
- n.handleType = "right", o = a;
150
- u(o);
151
- }, g = (r) => {
152
- const a = V(r);
153
- n.dragging = !0;
154
- let o;
155
- e.range ? o = n.handleType === "left" ? [a, n.rightValue] : [n.leftValue, a] : o = a, u(o);
156
- }, d = () => {
157
- n.handleType = null, n.dragging = !1, document.body.style.cursor = "", window.removeEventListener("mousemove", g), window.removeEventListener("touchmove", g), window.removeEventListener("mouseup", d), window.removeEventListener("touchend", d);
158
- };
159
- return {
160
- startDrag: (r) => {
161
- e.readonly || e.disabled || (n.handleType = r, document.body.style.cursor = "grabbing", window.addEventListener("mousemove", g), window.addEventListener("touchmove", g), window.addEventListener("mouseup", d), window.addEventListener("touchend", d));
162
- },
163
- clickSlider: p,
164
- changeInput: (r, a) => {
165
- if (e.showInput && !n.dragging && n.isInit)
166
- if (e.range && Array.isArray(s.value)) {
167
- const o = a === "left" ? [r, s.value[1]] : [s.value[0], r];
168
- u(o);
169
- } else e.range || u(r);
170
- }
171
- };
172
- }, P = (l) => {
173
- const { props: e, emit: s } = k(), { currentValue: n, state: m, slider: i, updateSliderInfo: u, setSliderValue: V } = l, p = () => {
174
- const d = e.max || e.max === 0, v = e.min || e.min === 0;
175
- d && v && e.max <= e.min && console.warn("[EVUI][Slider] Max value must be greater than min value.");
176
- }, g = () => {
177
- u(), i.valueRange <= 0 && (n.value = e.range ? [e.min, e.min] : e.min, s("update:modelValue", n.value)), V(n.value), m.isInit = !0;
178
- };
179
- M(() => {
180
- p(), g();
181
- });
182
- };
183
- export {
184
- $ as useEvent,
185
- P as useInit,
186
- D as useModel,
187
- O as useStyle
188
- };
@@ -1,39 +0,0 @@
1
- import { withDirectives as a, openBlock as n, createElementBlock as o, renderSlot as s, vShow as c, inject as i, computed as u } from "vue";
2
- /* empty css */
3
- import d from "../../_virtual/_plugin-vue_export-helper.js";
4
- const p = {
5
- name: "EvTabPanel",
6
- props: {
7
- text: {
8
- type: [String, Number],
9
- default: null
10
- },
11
- value: {
12
- type: [String, Number],
13
- default: null,
14
- required: !0
15
- },
16
- disabled: {
17
- type: Boolean,
18
- default: !1
19
- }
20
- },
21
- emits: {},
22
- setup(e) {
23
- const t = i("evTabs", null);
24
- return {
25
- isSelected: u(() => e.value === t.value)
26
- };
27
- }
28
- }, f = { class: "ev-tab-panel" };
29
- function m(e, t, l, r, v, _) {
30
- return a((n(), o("article", f, [
31
- s(e.$slots, "default")
32
- ], 512)), [
33
- [c, r.isSelected]
34
- ]);
35
- }
36
- const T = /* @__PURE__ */ d(p, [["render", m]]);
37
- export {
38
- T as default
39
- };
@@ -1,7 +0,0 @@
1
- import a from "./TabPanel.vue.js";
2
- a.install = (e) => {
3
- e.component(a.name, a);
4
- };
5
- export {
6
- a as default
7
- };