x-next 1.1.0 → 1.2.0
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.
- package/CHANGELOG.md +26 -0
- package/dist/_hooks/use-form-item.d.ts +5 -0
- package/dist/_hooks/use-picker-focus.d.ts +17 -0
- package/dist/components/_components/feedback-icon/index.vue.d.ts +4 -4
- package/dist/components/_components/picker/input-range.vue.d.ts +10 -6
- package/dist/components/_components/picker/input.vue.d.ts +9 -5
- package/dist/components/alert/Alert.vue.d.ts +5 -5
- package/dist/components/alert/index.d.ts +10 -10
- package/dist/components/date-picker/DatePanel.vue.d.ts +5 -0
- package/dist/components/date-picker/DatePicker.vue.d.ts +36 -16
- package/dist/components/date-picker/index.d.ts +77 -33
- package/dist/components/dialog/Dialog.d.ts +1 -1
- package/dist/components/dialog/index.d.ts +3 -3
- package/dist/components/drawer/index.d.ts +3 -3
- package/dist/components/drawer/src/Drawer.vue.d.ts +1 -1
- package/dist/components/dropdown/Dropdown.vue.d.ts +3 -3
- package/dist/components/dropdown/DropdownButton.vue.d.ts +4 -4
- package/dist/components/dropdown/DropdownSubmenu.vue.d.ts +4 -4
- package/dist/components/dropdown/index.d.ts +22 -22
- package/dist/components/form/FormItem.vue.d.ts +12 -4
- package/dist/components/form/context.d.ts +6 -0
- package/dist/components/form/form-item-label.vue.d.ts +4 -4
- package/dist/components/form/form-item-message.vue.d.ts +2 -0
- package/dist/components/form/index.d.ts +30 -8
- package/dist/components/form/interface.d.ts +2 -2
- package/dist/components/form-input/InputPassword.vue.d.ts +20 -2
- package/dist/components/form-input/index.d.ts +22 -4
- package/dist/components/form-select/Select.d.ts +3 -3
- package/dist/components/form-select/index.d.ts +6 -6
- package/dist/components/form-slider/Slider.vue.d.ts +10 -3
- package/dist/components/form-slider/index.d.ts +26 -6
- package/dist/components/form-slider/slider-button.vue.d.ts +4 -3
- package/dist/components/form-switch/Switch.vue.d.ts +2 -1
- package/dist/components/form-switch/index.d.ts +5 -2
- package/dist/components/form-textarea/Textarea.vue.d.ts +2 -2
- package/dist/components/form-textarea/index.d.ts +5 -5
- package/dist/components/image/Image.vue.d.ts +10 -9
- package/dist/components/image/ImagePreview.vue.d.ts +8 -7
- package/dist/components/image/ImagePreviewAction.d.ts +3 -3
- package/dist/components/image/ImagePreviewGroup.vue.d.ts +8 -7
- package/dist/components/image/index.d.ts +59 -52
- package/dist/components/image/preview-arrow.vue.d.ts +2 -2
- package/dist/components/image/preview-toolbar.vue.d.ts +3 -3
- package/dist/components/layout/LayoutSidebar.vue.d.ts +2 -2
- package/dist/components/layout/index.d.ts +4 -4
- package/dist/components/link/Link.vue.d.ts +2 -2
- package/dist/components/link/index.d.ts +4 -4
- package/dist/components/menu/Menu.d.ts +2 -2
- package/dist/components/menu/base-menu.vue.d.ts +2 -2
- package/dist/components/menu/index.d.ts +4 -4
- package/dist/components/menu/sub-menu-pop.vue.d.ts +5 -5
- package/dist/components/message/index.d.ts +17 -17
- package/dist/components/message/message.vue.d.ts +8 -8
- package/dist/components/notification/Notification.d.ts +1 -1
- package/dist/components/notification/index.d.ts +3 -3
- package/dist/components/pagination/page-item-ellipsis.vue.d.ts +1 -1
- package/dist/components/pagination/page-item-step.vue.d.ts +2 -2
- package/dist/components/pagination/page-options.vue.d.ts +6 -6
- package/dist/components/popconfirm/src/popup.vue.d.ts +1 -1
- package/dist/components/popover/Popover.d.ts +1 -1
- package/dist/components/popover/index.d.ts +3 -3
- package/dist/components/popup/Popup.d.ts +1 -1
- package/dist/components/popup/index.d.ts +3 -3
- package/dist/components/progress/Progress.vue.d.ts +4 -4
- package/dist/components/progress/circle.vue.d.ts +2 -2
- package/dist/components/progress/index.d.ts +8 -8
- package/dist/components/progress/line.vue.d.ts +1 -1
- package/dist/components/progress/steps.vue.d.ts +1 -1
- package/dist/components/steps/Step.vue.d.ts +2 -2
- package/dist/components/steps/index.d.ts +4 -4
- package/dist/components/tabs/Tabs.d.ts +1 -1
- package/dist/components/tabs/index.d.ts +3 -3
- package/dist/components/tabs/tabs-tab.vue.d.ts +1 -1
- package/dist/components/tag/Tag.vue.d.ts +2 -2
- package/dist/components/tag/index.d.ts +4 -4
- package/dist/components/time-picker/TimeColumn.vue.d.ts +3 -0
- package/dist/components/time-picker/TimePanel.vue.d.ts +3 -0
- package/dist/components/time-picker/TimePicker.vue.d.ts +33 -17
- package/dist/components/time-picker/index.d.ts +73 -36
- package/dist/components/time-range-selector/TimeRangeSelector.vue.d.ts +8 -0
- package/dist/components/time-range-selector/index.d.ts +22 -0
- package/dist/components/tooltip/Tooltip.vue.d.ts +1 -1
- package/dist/components/tooltip/index.d.ts +3 -3
- package/dist/components/trigger/Trigger.d.ts +1 -1
- package/dist/components/trigger/index.d.ts +3 -3
- package/dist/es/_hooks/use-form-item.js +36 -10
- package/dist/es/_hooks/use-picker-focus.js +57 -0
- package/dist/es/_utils/constant.js +17 -5
- package/dist/es/components/_components/picker/input-range.vue.js +45 -55
- package/dist/es/components/_components/picker/input-range.vue2.js +105 -70
- package/dist/es/components/_components/picker/input.vue.js +22 -25
- package/dist/es/components/_components/picker/input.vue2.js +58 -43
- package/dist/es/components/_components/select-view/select-view.js +67 -66
- package/dist/es/components/date-picker/DatePanel.vue.js +102 -94
- package/dist/es/components/date-picker/DatePanel.vue2.js +97 -44
- package/dist/es/components/date-picker/DatePicker.vue.js +71 -58
- package/dist/es/components/date-picker/DatePicker.vue2.js +285 -231
- package/dist/es/components/dialog/Dialog.js +154 -132
- package/dist/es/components/form/Form.vue2.js +113 -101
- package/dist/es/components/form/FormItem.vue.js +26 -22
- package/dist/es/components/form/FormItem.vue2.js +162 -125
- package/dist/es/components/form/form-item-message.vue.js +31 -24
- package/dist/es/components/form/form-item-message.vue2.js +4 -2
- package/dist/es/components/form-checkbox/Checkbox.js +75 -71
- package/dist/es/components/form-checkbox/CheckboxGroup.js +43 -38
- package/dist/es/components/form-input/Input.js +83 -79
- package/dist/es/components/form-input/InputPassword.vue.js +19 -16
- package/dist/es/components/form-input/InputPassword.vue2.js +39 -29
- package/dist/es/components/form-input/InputSearch.js +47 -37
- package/dist/es/components/form-input-number/InputNumber.js +134 -133
- package/dist/es/components/form-input-tag/InputTag.js +173 -162
- package/dist/es/components/form-radio/Radio.js +74 -71
- package/dist/es/components/form-radio/RadioGroup.js +55 -49
- package/dist/es/components/form-select/Select.js +99 -98
- package/dist/es/components/form-slider/Slider.vue.js +28 -28
- package/dist/es/components/form-slider/Slider.vue2.js +139 -132
- package/dist/es/components/form-slider/slider-button.vue.js +6 -6
- package/dist/es/components/form-slider/slider-button.vue2.js +39 -34
- package/dist/es/components/form-switch/Switch.vue.js +9 -9
- package/dist/es/components/form-switch/Switch.vue2.js +81 -74
- package/dist/es/components/form-textarea/Textarea.vue2.js +123 -108
- package/dist/es/components/image/Image.vue2.js +77 -76
- package/dist/es/components/image/ImagePreview.vue.js +13 -12
- package/dist/es/components/image/ImagePreview.vue2.js +141 -136
- package/dist/es/components/image/ImagePreviewGroup.vue.js +1 -1
- package/dist/es/components/image/ImagePreviewGroup.vue2.js +82 -83
- package/dist/es/components/rate/Rate.js +106 -103
- package/dist/es/components/time-picker/TimeColumn.vue.js +34 -23
- package/dist/es/components/time-picker/TimeColumn.vue2.js +37 -28
- package/dist/es/components/time-picker/TimePicker.vue.js +83 -64
- package/dist/es/components/time-picker/TimePicker.vue2.js +192 -156
- package/dist/es/components/time-range-selector/TimeRangeSelector.vue.js +327 -193
- package/dist/es/locale/en-US.js +6 -0
- package/dist/es/locale/zh-CN.js +6 -0
- package/dist/es/style.css +1 -1
- package/dist/icons/_self/down.d.ts +1 -1
- package/dist/icons/_self/dropdown/more.d.ts +1 -1
- package/dist/icons/_self/empty-better.d.ts +1 -1
- package/dist/icons/_self/empty.d.ts +1 -1
- package/dist/icons/_self/eye-invisible.d.ts +1 -1
- package/dist/icons/_self/eye.d.ts +1 -1
- package/dist/icons/_self/full-screen.d.ts +1 -1
- package/dist/icons/_self/left.d.ts +1 -1
- package/dist/icons/_self/menu/down.d.ts +1 -1
- package/dist/icons/_self/minus.d.ts +1 -1
- package/dist/icons/_self/more-dot.d.ts +1 -1
- package/dist/icons/_self/next.d.ts +1 -1
- package/dist/icons/_self/original-size.d.ts +1 -1
- package/dist/icons/_self/plus.d.ts +1 -1
- package/dist/icons/_self/prev.d.ts +1 -1
- package/dist/icons/_self/question-message.d.ts +1 -1
- package/dist/icons/_self/right.d.ts +1 -1
- package/dist/icons/_self/rotate-left.d.ts +1 -1
- package/dist/icons/_self/rotate-right.d.ts +1 -1
- package/dist/icons/_self/search.d.ts +1 -1
- package/dist/icons/_self/up.d.ts +1 -1
- package/dist/icons/_self/zoom-in.d.ts +1 -1
- package/dist/icons/_self/zoom-out.d.ts +1 -1
- package/dist/icons/_ui/alone-left.d.ts +1 -1
- package/dist/icons/_ui/alone-margin-left.d.ts +1 -1
- package/dist/icons/_ui/alone-margin-right.d.ts +1 -1
- package/dist/icons/_ui/alone-right.d.ts +1 -1
- package/dist/icons/_ui/calendar.d.ts +1 -1
- package/dist/icons/_ui/time.d.ts +1 -1
- package/dist/icons/animation/animation-loading.d.ts +1 -1
- package/dist/icons/default/check-circle-fill.d.ts +1 -1
- package/dist/icons/default/check.d.ts +1 -1
- package/dist/icons/default/close-circle-fill.d.ts +1 -1
- package/dist/icons/default/close.d.ts +1 -1
- package/dist/icons/default/exclamation-circle-fill.d.ts +1 -1
- package/dist/icons/default/exclamation.d.ts +1 -1
- package/dist/icons/default/filter.d.ts +1 -1
- package/dist/icons/default/info-circle-fill.d.ts +1 -1
- package/dist/icons/default/link.d.ts +1 -1
- package/dist/icons/default/logo-simple.d.ts +1 -1
- package/dist/icons/default/minus-circle-fill.d.ts +1 -1
- package/dist/icons/icon.d.ts +2 -2
- package/dist/icons/index.d.ts +3 -3
- package/dist/index.cjs +4 -4
- package/dist/index.umd.js +4 -4
- package/dist/locale/interface.d.ts +6 -0
- package/dist/style/base.css +1 -1
- package/dist/style/date-picker.css +1 -1
- package/dist/style/form.css +1 -1
- package/dist/style/image.css +1 -1
- package/dist/style/time-range-selector.css +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { radioGroupKey as
|
|
3
|
-
import { isString as
|
|
4
|
-
import { useFormItem as
|
|
5
|
-
import
|
|
6
|
-
import { useSize as
|
|
7
|
-
import { getClassNameMixin as
|
|
8
|
-
import { omit as
|
|
9
|
-
const
|
|
1
|
+
import { defineComponent as I, toRefs as _, useId as F, computed as u, ref as L, provide as k, reactive as w, watch as g, createVNode as v, mergeProps as D } from "vue";
|
|
2
|
+
import { radioGroupKey as H } from "./context.js";
|
|
3
|
+
import { isString as K, isNumber as M, isBoolean as O, isUndefined as P, isNull as U, isFunction as X } from "../../_utils/is.js";
|
|
4
|
+
import { useFormItem as j, useFormItemControl as q } from "../../_hooks/use-form-item.js";
|
|
5
|
+
import E from "./Radio.js";
|
|
6
|
+
import { useSize as J } from "../../_hooks/use-size.js";
|
|
7
|
+
import { getClassNameMixin as Q } from "../../_utils/config.js";
|
|
8
|
+
import { omit as y } from "../../_utils/omit.js";
|
|
9
|
+
const ie = /* @__PURE__ */ I({
|
|
10
10
|
name: "RadioGroup",
|
|
11
11
|
inheritAttrs: !1,
|
|
12
12
|
props: {
|
|
@@ -91,7 +91,7 @@ const Z = /* @__PURE__ */ C({
|
|
|
91
91
|
* @en Trigger when the value changes
|
|
92
92
|
* @property { RadioValue } value
|
|
93
93
|
*/
|
|
94
|
-
change: (a,
|
|
94
|
+
change: (a, l) => !0
|
|
95
95
|
},
|
|
96
96
|
/**
|
|
97
97
|
* @zh radio 文案内容
|
|
@@ -109,68 +109,74 @@ const Z = /* @__PURE__ */ C({
|
|
|
109
109
|
* @version 2.27.0
|
|
110
110
|
*/
|
|
111
111
|
setup(a, {
|
|
112
|
-
attrs:
|
|
113
|
-
emit:
|
|
114
|
-
slots:
|
|
112
|
+
attrs: l,
|
|
113
|
+
emit: n,
|
|
114
|
+
slots: t
|
|
115
115
|
}) {
|
|
116
|
-
const
|
|
116
|
+
const r = Q("radio--group"), {
|
|
117
117
|
size: p,
|
|
118
|
-
type:
|
|
119
|
-
disabled:
|
|
120
|
-
modelValue:
|
|
121
|
-
} =
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
118
|
+
type: S,
|
|
119
|
+
disabled: h,
|
|
120
|
+
modelValue: z
|
|
121
|
+
} = _(a), N = `x-radio-group-${F()}`, V = u(() => a.name ?? N), {
|
|
122
|
+
formItemCtx: C,
|
|
123
|
+
mergedDisabled: o,
|
|
124
|
+
mergedSize: $,
|
|
125
|
+
eventHandlers: R
|
|
126
|
+
} = j({
|
|
126
127
|
size: p,
|
|
127
|
-
disabled:
|
|
128
|
+
disabled: h
|
|
129
|
+
}), x = q(C, () => ({
|
|
130
|
+
...y(l, ["class", "style"]),
|
|
131
|
+
"aria-label": a.ariaLabel ?? l["aria-label"]
|
|
132
|
+
}), {
|
|
133
|
+
labelable: !1
|
|
128
134
|
}), {
|
|
129
135
|
mergedSize: m
|
|
130
|
-
} =
|
|
136
|
+
} = J($), i = L(a.defaultValue), s = u(() => a.modelValue ?? i.value), f = u(() => (a.options ?? []).map((e) => K(e) || M(e) || O(e) ? {
|
|
131
137
|
label: e,
|
|
132
138
|
value: e
|
|
133
|
-
} : e))
|
|
134
|
-
|
|
135
|
-
r.value = e, o("update:modelValue", e), o("change", e, c), (b = (u = V.value) == null ? void 0 : u.onChange) == null || b.call(u, c);
|
|
136
|
-
};
|
|
137
|
-
A(F, k({
|
|
139
|
+
} : e));
|
|
140
|
+
k(H, w({
|
|
138
141
|
name: "XRadioGroup",
|
|
139
142
|
value: s,
|
|
140
143
|
size: m,
|
|
141
|
-
type:
|
|
142
|
-
disabled:
|
|
143
|
-
inputName:
|
|
144
|
-
slots:
|
|
145
|
-
handleChange:
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
144
|
+
type: S,
|
|
145
|
+
disabled: o,
|
|
146
|
+
inputName: V,
|
|
147
|
+
slots: t,
|
|
148
|
+
handleChange: (e, c) => {
|
|
149
|
+
var d, b;
|
|
150
|
+
i.value = e, n("update:modelValue", e), n("change", e, c), (b = (d = R.value) == null ? void 0 : d.onChange) == null || b.call(d, c);
|
|
151
|
+
}
|
|
152
|
+
})), g(s, (e) => {
|
|
153
|
+
i.value !== e && (i.value = e);
|
|
154
|
+
}), g(z, (e) => {
|
|
155
|
+
(P(e) || U(e)) && (i.value = "");
|
|
150
156
|
});
|
|
151
|
-
const
|
|
152
|
-
[
|
|
153
|
-
}]),
|
|
157
|
+
const A = u(() => [`${a.type === "button" ? r.element("button") : r.block}`, r.modifier(`size-${m.value}`), r.modifier(`direction-${a.direction}`), l.class, {
|
|
158
|
+
[r.modifier("disabled")]: o.value
|
|
159
|
+
}]), B = u(() => y(l, ["class", "style"])), G = () => f.value.map((e) => v(E, {
|
|
154
160
|
key: `${typeof e.value}-${String(e.value)}`,
|
|
155
161
|
value: e.value,
|
|
156
162
|
disabled: e.disabled
|
|
157
163
|
}, {
|
|
158
|
-
default: () => [
|
|
164
|
+
default: () => [t.label ? t.label({
|
|
159
165
|
data: e
|
|
160
|
-
}) :
|
|
166
|
+
}) : X(e.label) ? e.label() : e.label]
|
|
161
167
|
}));
|
|
162
168
|
return () => {
|
|
163
169
|
var e;
|
|
164
|
-
return
|
|
170
|
+
return v("span", D({
|
|
165
171
|
role: "radiogroup",
|
|
166
172
|
"aria-label": a.ariaLabel,
|
|
167
|
-
"aria-disabled":
|
|
168
|
-
class:
|
|
169
|
-
style:
|
|
170
|
-
},
|
|
173
|
+
"aria-disabled": o.value,
|
|
174
|
+
class: A.value,
|
|
175
|
+
style: l.style
|
|
176
|
+
}, B.value, x.value), [f.value.length > 0 ? G() : (e = t.default) == null ? void 0 : e.call(t)]);
|
|
171
177
|
};
|
|
172
178
|
}
|
|
173
179
|
});
|
|
174
180
|
export {
|
|
175
|
-
|
|
181
|
+
ie as default
|
|
176
182
|
};
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { isObject as N, isFunction as y, isArray as
|
|
3
|
-
import { getKeyFromValue as M, isGroupOptionInfo as
|
|
1
|
+
import { defineComponent as Ne, toRefs as je, useId as De, computed as i, ref as p, watch as H, nextTick as Re, watchEffect as Te, createVNode as m, mergeProps as A, isVNode as _e } from "vue";
|
|
2
|
+
import { isObject as N, isFunction as y, isArray as Ie, isNumber as Ke, isString as $e, isBoolean as ze, isUndefined as S, isNull as He, isEmptyObject as Me } from "../../_utils/is.js";
|
|
3
|
+
import { getKeyFromValue as M, isGroupOptionInfo as Ue, isValidOption as Ge, hasEmptyStringKey as We } from "./utils.js";
|
|
4
4
|
import { Trigger as U } from "../trigger/index.js";
|
|
5
5
|
import G from "../_components/select-view/select-view.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { useSelect as
|
|
11
|
-
import { useTrigger as
|
|
12
|
-
import { useFormItem as
|
|
13
|
-
import { useLocale as
|
|
14
|
-
import { debounce as
|
|
15
|
-
import { getClassNameMixin as
|
|
16
|
-
import { omit as
|
|
17
|
-
import
|
|
18
|
-
function
|
|
19
|
-
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !
|
|
6
|
+
import Ye from "./SelectDropdown.vue.js";
|
|
7
|
+
import qe from "./SelectOption.vue.js";
|
|
8
|
+
import Je from "./SelectOptionGroup.vue.js";
|
|
9
|
+
import Qe from "../virtual-list-v2/virtual-list.vue.js";
|
|
10
|
+
import { useSelect as Xe } from "./hooks/use-select.js";
|
|
11
|
+
import { useTrigger as Ze } from "../../_hooks/use-trigger.js";
|
|
12
|
+
import { useFormItem as et } from "../../_hooks/use-form-item.js";
|
|
13
|
+
import { useLocale as tt } from "../../locale/index.js";
|
|
14
|
+
import { debounce as at } from "../../_utils/debounce.js";
|
|
15
|
+
import { getClassNameMixin as lt } from "../../_utils/config.js";
|
|
16
|
+
import { omit as nt } from "../../_utils/omit.js";
|
|
17
|
+
import ot from "../../_utils/pick.js";
|
|
18
|
+
function ut(t) {
|
|
19
|
+
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !_e(t);
|
|
20
20
|
}
|
|
21
|
-
const W = ["id", "aria-label", "aria-labelledby", "aria-describedby"],
|
|
21
|
+
const W = ["id", "aria-label", "aria-labelledby", "aria-describedby"], rt = {
|
|
22
22
|
value: "value",
|
|
23
23
|
label: "label",
|
|
24
24
|
disabled: "disabled",
|
|
25
25
|
tagProps: "tagProps",
|
|
26
26
|
render: "render"
|
|
27
|
-
},
|
|
27
|
+
}, Bt = /* @__PURE__ */ Ne({
|
|
28
28
|
name: "Select",
|
|
29
29
|
components: {
|
|
30
30
|
Trigger: U,
|
|
@@ -447,7 +447,7 @@ const W = ["id", "aria-label", "aria-labelledby", "aria-describedby"], ut = {
|
|
|
447
447
|
error: J,
|
|
448
448
|
options: Q,
|
|
449
449
|
filterOption: h,
|
|
450
|
-
valueKey:
|
|
450
|
+
valueKey: f,
|
|
451
451
|
multiple: j,
|
|
452
452
|
popupVisible: X,
|
|
453
453
|
defaultPopupVisible: Z,
|
|
@@ -456,18 +456,19 @@ const W = ["id", "aria-label", "aria-labelledby", "aria-describedby"], ut = {
|
|
|
456
456
|
fieldNames: V,
|
|
457
457
|
loading: ae,
|
|
458
458
|
defaultActiveFirstOption: le
|
|
459
|
-
} =
|
|
460
|
-
|
|
459
|
+
} = je(t), ne = lt("select"), D = De(), B = `${D}-listbox`, x = (e) => `${D}-option-${encodeURIComponent(e)}`, {
|
|
460
|
+
formItemCtx: oe,
|
|
461
|
+
mergedSize: ue,
|
|
461
462
|
mergedDisabled: F,
|
|
462
|
-
mergedError:
|
|
463
|
-
eventHandlers:
|
|
464
|
-
} =
|
|
463
|
+
mergedError: re,
|
|
464
|
+
eventHandlers: ie
|
|
465
|
+
} = et({
|
|
465
466
|
size: Y,
|
|
466
467
|
disabled: q,
|
|
467
468
|
error: J
|
|
468
469
|
}), {
|
|
469
|
-
t:
|
|
470
|
-
} =
|
|
470
|
+
t: ce
|
|
471
|
+
} = tt(), de = i(() => t.virtualListProps ? "div" : "li"), P = i(() => N(t.allowSearch) && !!t.allowSearch.retainInputValue);
|
|
471
472
|
i(() => {
|
|
472
473
|
if (y(t.formatLabel))
|
|
473
474
|
return (e) => {
|
|
@@ -475,37 +476,37 @@ const W = ["id", "aria-label", "aria-labelledby", "aria-describedby"], ut = {
|
|
|
475
476
|
return t.formatLabel(l);
|
|
476
477
|
};
|
|
477
478
|
});
|
|
478
|
-
const R =
|
|
479
|
+
const R = p(), T = p({}), _ = p(), {
|
|
479
480
|
computedPopupVisible: c,
|
|
480
481
|
handlePopupVisibleChange: w
|
|
481
|
-
} =
|
|
482
|
+
} = Ze({
|
|
482
483
|
popupVisible: X,
|
|
483
484
|
defaultPopupVisible: Z,
|
|
484
485
|
emit: r
|
|
485
|
-
}), k =
|
|
486
|
+
}), k = p(t.defaultValue), E = i(() => {
|
|
486
487
|
const e = t.modelValue ?? k.value;
|
|
487
|
-
return (
|
|
488
|
+
return (Ie(e) ? e : e || Ke(e) || $e(e) || ze(e) ? [e] : []).map((a) => ({
|
|
488
489
|
value: a,
|
|
489
490
|
key: M(a, t.valueKey)
|
|
490
491
|
}));
|
|
491
492
|
});
|
|
492
493
|
H(te, (e) => {
|
|
493
|
-
(S(e) ||
|
|
494
|
+
(S(e) || He(e)) && (k.value = j.value ? [] : e);
|
|
494
495
|
});
|
|
495
|
-
const d = i(() => E.value.map((e) => e.key)),
|
|
496
|
-
...
|
|
496
|
+
const d = i(() => E.value.map((e) => e.key)), I = i(() => ({
|
|
497
|
+
...rt,
|
|
497
498
|
...V == null ? void 0 : V.value
|
|
498
|
-
})),
|
|
499
|
+
})), K = p(), se = (e) => {
|
|
499
500
|
const l = {};
|
|
500
501
|
return e.forEach((a) => {
|
|
501
502
|
l[a] = u.get(a);
|
|
502
503
|
}), l;
|
|
503
|
-
},
|
|
504
|
-
|
|
504
|
+
}, fe = (e) => {
|
|
505
|
+
K.value = se(e);
|
|
505
506
|
}, pe = (e) => y(t.fallbackOption) ? t.fallbackOption(e) : {
|
|
506
|
-
[
|
|
507
|
-
[
|
|
508
|
-
},
|
|
507
|
+
[I.value.value]: e,
|
|
508
|
+
[I.value.label]: String(N(e) ? e[f == null ? void 0 : f.value] : e)
|
|
509
|
+
}, me = () => {
|
|
509
510
|
const e = [], l = [];
|
|
510
511
|
if (t.allowCreate || t.fallbackOption) {
|
|
511
512
|
for (const a of E.value)
|
|
@@ -525,19 +526,19 @@ const W = ["id", "aria-label", "aria-labelledby", "aria-describedby"], ut = {
|
|
|
525
526
|
}
|
|
526
527
|
}
|
|
527
528
|
return e;
|
|
528
|
-
}, v =
|
|
529
|
+
}, v = p([]), ve = i(() => v.value.map((e) => {
|
|
529
530
|
var n;
|
|
530
531
|
let l = pe(e.value);
|
|
531
|
-
const a = (n =
|
|
532
|
-
return !S(a) && !
|
|
532
|
+
const a = (n = K.value) == null ? void 0 : n[e.key];
|
|
533
|
+
return !S(a) && !Me(a) && (l = {
|
|
533
534
|
...l,
|
|
534
535
|
...a
|
|
535
536
|
}), l;
|
|
536
537
|
}));
|
|
537
|
-
|
|
538
|
-
|
|
538
|
+
Re(() => {
|
|
539
|
+
Te(() => {
|
|
539
540
|
var l;
|
|
540
|
-
const e =
|
|
541
|
+
const e = me();
|
|
541
542
|
if (e.length !== v.value.length)
|
|
542
543
|
v.value = e;
|
|
543
544
|
else if (e.length > 0) {
|
|
@@ -549,28 +550,28 @@ const W = ["id", "aria-label", "aria-labelledby", "aria-describedby"], ut = {
|
|
|
549
550
|
}
|
|
550
551
|
});
|
|
551
552
|
});
|
|
552
|
-
const $ =
|
|
553
|
+
const $ = p(t.defaultInputValue), s = i(() => t.inputValue ?? $.value);
|
|
553
554
|
H(c, (e) => {
|
|
554
555
|
!e && !P.value && s.value && g("");
|
|
555
556
|
});
|
|
556
|
-
const
|
|
557
|
+
const be = (e) => {
|
|
557
558
|
var l;
|
|
558
559
|
return t.multiple ? e.map((a) => {
|
|
559
560
|
var n;
|
|
560
561
|
return ((n = u.get(a)) == null ? void 0 : n.value) ?? "";
|
|
561
|
-
}) : ((l = u.get(e[0])) == null ? void 0 : l.value) ?? (
|
|
562
|
+
}) : ((l = u.get(e[0])) == null ? void 0 : l.value) ?? (We(u) ? void 0 : "");
|
|
562
563
|
}, b = (e) => {
|
|
563
564
|
var a, n;
|
|
564
|
-
const l =
|
|
565
|
-
k.value = l, r("update:modelValue", l), r("change", l), (n = (a =
|
|
565
|
+
const l = be(e);
|
|
566
|
+
k.value = l, r("update:modelValue", l), r("change", l), (n = (a = ie.value) == null ? void 0 : a.onChange) == null || n.call(a), fe(e);
|
|
566
567
|
}, g = (e) => {
|
|
567
568
|
$.value = e, r("update:inputValue", e), r("inputValueChange", e);
|
|
568
|
-
},
|
|
569
|
+
}, ge = (e, l) => {
|
|
569
570
|
if (t.multiple) {
|
|
570
571
|
if (d.value.includes(e)) {
|
|
571
572
|
const a = d.value.filter((n) => n !== e);
|
|
572
573
|
b(a);
|
|
573
|
-
} else if (
|
|
574
|
+
} else if (Be.value.includes(e))
|
|
574
575
|
if (t.limit > 0 && d.value.length >= t.limit) {
|
|
575
576
|
const a = u.get(e);
|
|
576
577
|
r("exceedLimit", a == null ? void 0 : a.value, l);
|
|
@@ -586,40 +587,40 @@ const W = ["id", "aria-label", "aria-labelledby", "aria-describedby"], ut = {
|
|
|
586
587
|
}
|
|
587
588
|
w(!1);
|
|
588
589
|
}
|
|
589
|
-
},
|
|
590
|
+
}, ye = at((e) => {
|
|
590
591
|
r("search", e);
|
|
591
|
-
}, t.searchDelay),
|
|
592
|
-
e !== s.value && (c.value || w(!0), g(e), t.allowSearch &&
|
|
593
|
-
},
|
|
592
|
+
}, t.searchDelay), he = (e) => {
|
|
593
|
+
e !== s.value && (c.value || w(!0), g(e), t.allowSearch && ye(e));
|
|
594
|
+
}, Ve = (e) => {
|
|
594
595
|
const l = u.get(e), a = d.value.filter((n) => n !== e);
|
|
595
596
|
b(a), r("remove", l == null ? void 0 : l.value);
|
|
596
|
-
},
|
|
597
|
+
}, we = (e) => {
|
|
597
598
|
e == null || e.stopPropagation();
|
|
598
599
|
const l = d.value.filter((a) => {
|
|
599
600
|
var n;
|
|
600
601
|
return (n = u.get(a)) == null ? void 0 : n.disabled;
|
|
601
602
|
});
|
|
602
603
|
b(l), g(""), r("clear", e);
|
|
603
|
-
}, we = (e) => {
|
|
604
|
-
r("dropdownScroll", e);
|
|
605
604
|
}, Oe = (e) => {
|
|
605
|
+
r("dropdownScroll", e);
|
|
606
|
+
}, Se = (e) => {
|
|
606
607
|
r("dropdownReachBottom", e);
|
|
607
608
|
}, {
|
|
608
609
|
validOptions: z,
|
|
609
610
|
optionInfoMap: u,
|
|
610
|
-
validOptionInfos:
|
|
611
|
-
enabledOptionKeys:
|
|
611
|
+
validOptionInfos: Ce,
|
|
612
|
+
enabledOptionKeys: Be,
|
|
612
613
|
activeKey: O,
|
|
613
|
-
handleKeyDown:
|
|
614
|
-
} =
|
|
614
|
+
handleKeyDown: xe
|
|
615
|
+
} = Xe({
|
|
615
616
|
multiple: j,
|
|
616
617
|
options: Q,
|
|
617
|
-
extraOptions:
|
|
618
|
+
extraOptions: ve,
|
|
618
619
|
inputValue: s,
|
|
619
620
|
filterOption: h,
|
|
620
621
|
showExtraOptions: ee,
|
|
621
|
-
component:
|
|
622
|
-
valueKey:
|
|
622
|
+
component: de,
|
|
623
|
+
valueKey: f,
|
|
623
624
|
fieldNames: V,
|
|
624
625
|
loading: ae,
|
|
625
626
|
popupVisible: c,
|
|
@@ -628,32 +629,32 @@ const W = ["id", "aria-label", "aria-labelledby", "aria-describedby"], ut = {
|
|
|
628
629
|
optionRefs: T,
|
|
629
630
|
virtualListRef: _,
|
|
630
631
|
defaultActiveFirstOption: le,
|
|
631
|
-
onSelect:
|
|
632
|
+
onSelect: ge,
|
|
632
633
|
onPopupVisibleChange: w,
|
|
633
634
|
getOptionId: x
|
|
634
|
-
}),
|
|
635
|
-
...
|
|
635
|
+
}), Fe = i(() => nt(C, [...W])), Pe = i(() => ({
|
|
636
|
+
...ot(C, [...W]),
|
|
636
637
|
role: "combobox",
|
|
637
638
|
"aria-haspopup": "listbox",
|
|
638
639
|
"aria-expanded": String(c.value),
|
|
639
640
|
"aria-controls": B,
|
|
640
641
|
"aria-activedescendant": c.value && !S(O.value) ? x(O.value) : void 0,
|
|
641
642
|
"aria-autocomplete": t.allowSearch || t.allowCreate ? "list" : "none",
|
|
642
|
-
"aria-label": C["aria-label"] ?? t.placeholder ??
|
|
643
|
-
})),
|
|
643
|
+
"aria-label": C["aria-label"] ?? (oe.labelId ? void 0 : t.placeholder ?? ce("common.select"))
|
|
644
|
+
})), ke = i(() => {
|
|
644
645
|
const e = [];
|
|
645
646
|
for (const l of E.value) {
|
|
646
647
|
const a = u.get(l.key);
|
|
647
648
|
a && e.push({
|
|
648
649
|
...a,
|
|
649
650
|
value: l.key,
|
|
650
|
-
label: (a == null ? void 0 : a.label) ?? String(N(l.value) ? l.value[
|
|
651
|
+
label: (a == null ? void 0 : a.label) ?? String(N(l.value) ? l.value[f == null ? void 0 : f.value] : l.value),
|
|
651
652
|
closable: !(a != null && a.disabled),
|
|
652
653
|
tagProps: a == null ? void 0 : a.tagProps
|
|
653
654
|
});
|
|
654
655
|
}
|
|
655
656
|
return e;
|
|
656
|
-
}),
|
|
657
|
+
}), Ee = (e) => {
|
|
657
658
|
if (y(o.option)) {
|
|
658
659
|
const l = o.option;
|
|
659
660
|
return () => l({
|
|
@@ -662,19 +663,19 @@ const W = ["id", "aria-label", "aria-labelledby", "aria-describedby"], ut = {
|
|
|
662
663
|
}
|
|
663
664
|
return y(e.render) ? e.render : () => e.label;
|
|
664
665
|
}, L = (e) => {
|
|
665
|
-
if (
|
|
666
|
+
if (Ue(e)) {
|
|
666
667
|
let l;
|
|
667
|
-
return m(
|
|
668
|
+
return m(Je, {
|
|
668
669
|
key: e.key,
|
|
669
670
|
label: e.label
|
|
670
|
-
},
|
|
671
|
+
}, ut(l = e.options.map((a) => L(a))) ? l : {
|
|
671
672
|
default: () => [l]
|
|
672
673
|
});
|
|
673
674
|
}
|
|
674
|
-
return
|
|
675
|
+
return Ge(e, {
|
|
675
676
|
inputValue: s.value,
|
|
676
677
|
filterOption: h == null ? void 0 : h.value
|
|
677
|
-
}) ? m(
|
|
678
|
+
}) ? m(qe, {
|
|
678
679
|
ref: (l) => {
|
|
679
680
|
l != null && l.$el && (T.value[e.key] = l.$el);
|
|
680
681
|
},
|
|
@@ -684,20 +685,20 @@ const W = ["id", "aria-label", "aria-labelledby", "aria-describedby"], ut = {
|
|
|
684
685
|
disabled: e.disabled,
|
|
685
686
|
internal: !0
|
|
686
687
|
}, {
|
|
687
|
-
default:
|
|
688
|
+
default: Ee(e)
|
|
688
689
|
}) : null;
|
|
689
|
-
},
|
|
690
|
+
}, Le = () => m(Ye, {
|
|
690
691
|
ref: R,
|
|
691
692
|
id: B,
|
|
692
693
|
multiple: t.multiple,
|
|
693
694
|
loading: t.loading,
|
|
694
|
-
empty:
|
|
695
|
+
empty: Ce.value.length === 0,
|
|
695
696
|
virtualList: !!t.virtualListProps,
|
|
696
697
|
scrollbar: t.scrollbar,
|
|
697
698
|
showHeaderOnEmpty: t.showHeaderOnEmpty,
|
|
698
699
|
showFooterOnEmpty: t.showFooterOnEmpty,
|
|
699
|
-
onScroll:
|
|
700
|
-
onReachBottom:
|
|
700
|
+
onScroll: Oe,
|
|
701
|
+
onReachBottom: Se
|
|
701
702
|
}, {
|
|
702
703
|
default: () => {
|
|
703
704
|
var e;
|
|
@@ -705,7 +706,7 @@ const W = ["id", "aria-label", "aria-labelledby", "aria-describedby"], ut = {
|
|
|
705
706
|
},
|
|
706
707
|
"virtual-list": () => (
|
|
707
708
|
// @ts-ignore
|
|
708
|
-
m(
|
|
709
|
+
m(Qe, A(t.virtualListProps, {
|
|
709
710
|
ref: _,
|
|
710
711
|
data: z.value
|
|
711
712
|
}), {
|
|
@@ -725,7 +726,7 @@ const W = ["id", "aria-label", "aria-labelledby", "aria-describedby"], ut = {
|
|
|
725
726
|
...o.footer ? {
|
|
726
727
|
footer: o.footer
|
|
727
728
|
} : {}
|
|
728
|
-
}),
|
|
729
|
+
}), Ae = ({
|
|
729
730
|
data: e
|
|
730
731
|
}) => {
|
|
731
732
|
var l, a;
|
|
@@ -763,11 +764,11 @@ const W = ["id", "aria-label", "aria-labelledby", "aria-describedby"], ut = {
|
|
|
763
764
|
activeDescendant: c.value && !S(O.value) ? x(O.value) : void 0
|
|
764
765
|
})) ?? m(G, A({
|
|
765
766
|
class: ne.block,
|
|
766
|
-
modelValue:
|
|
767
|
+
modelValue: ke.value,
|
|
767
768
|
inputValue: s.value,
|
|
768
769
|
multiple: t.multiple,
|
|
769
770
|
disabled: F.value,
|
|
770
|
-
error:
|
|
771
|
+
error: re.value,
|
|
771
772
|
loading: t.loading,
|
|
772
773
|
allowClear: t.allowClear,
|
|
773
774
|
allowCreate: t.allowCreate,
|
|
@@ -776,26 +777,26 @@ const W = ["id", "aria-label", "aria-labelledby", "aria-describedby"], ut = {
|
|
|
776
777
|
maxTagCount: t.maxTagCount,
|
|
777
778
|
placeholder: t.placeholder,
|
|
778
779
|
bordered: t.bordered,
|
|
779
|
-
size:
|
|
780
|
+
size: ue.value,
|
|
780
781
|
tagNowrap: t.tagNowrap,
|
|
781
|
-
inputAttrs:
|
|
782
|
-
},
|
|
783
|
-
onInputValueChange:
|
|
784
|
-
onRemove:
|
|
785
|
-
onClear:
|
|
786
|
-
onKeydown:
|
|
782
|
+
inputAttrs: Pe.value
|
|
783
|
+
}, Fe.value, {
|
|
784
|
+
onInputValueChange: he,
|
|
785
|
+
onRemove: Ve,
|
|
786
|
+
onClear: we,
|
|
787
|
+
onKeydown: xe
|
|
787
788
|
}), {
|
|
788
|
-
label:
|
|
789
|
+
label: Ae,
|
|
789
790
|
prefix: o.prefix,
|
|
790
791
|
"arrow-icon": o["arrow-icon"],
|
|
791
792
|
"loading-icon": o["loading-icon"],
|
|
792
793
|
"search-icon": o["search-icon"]
|
|
793
794
|
})];
|
|
794
795
|
},
|
|
795
|
-
content:
|
|
796
|
+
content: Le
|
|
796
797
|
});
|
|
797
798
|
}
|
|
798
799
|
});
|
|
799
800
|
export {
|
|
800
|
-
|
|
801
|
+
Bt as default
|
|
801
802
|
};
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import g from "./Slider.vue2.js";
|
|
2
|
-
import { resolveComponent as n, openBlock as e, createElementBlock as k,
|
|
3
|
-
import
|
|
4
|
-
function
|
|
5
|
-
const m = n("slider-ticks"),
|
|
6
|
-
return e(), k("div", {
|
|
7
|
-
|
|
8
|
-
}, [
|
|
9
|
-
s("div", {
|
|
2
|
+
import { resolveComponent as n, openBlock as e, createElementBlock as k, mergeProps as a, createElementVNode as d, normalizeClass as s, normalizeStyle as y, createBlock as i, createCommentVNode as l, createVNode as M } from "vue";
|
|
3
|
+
import f from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
function w(o, r, C, b, B, S) {
|
|
5
|
+
const m = n("slider-ticks"), p = n("slider-dots"), u = n("slider-marks"), t = n("slider-button"), v = n("slider-input");
|
|
6
|
+
return e(), k("div", a(o.wrapperAttrs, { class: o.cls }), [
|
|
7
|
+
d("div", {
|
|
10
8
|
ref: "trackRef",
|
|
11
|
-
class:
|
|
12
|
-
onClick:
|
|
9
|
+
class: s(o.trackCls),
|
|
10
|
+
onClick: r[0] || (r[0] = (...h) => o.handleClick && o.handleClick(...h))
|
|
13
11
|
}, [
|
|
14
|
-
|
|
15
|
-
class:
|
|
16
|
-
style:
|
|
12
|
+
d("div", {
|
|
13
|
+
class: s(o.className.element("bar")),
|
|
14
|
+
style: y(o.getBarStyle(o.computedValue))
|
|
17
15
|
}, null, 6),
|
|
18
16
|
o.showTicks ? (e(), i(m, {
|
|
19
17
|
key: 0,
|
|
@@ -22,24 +20,23 @@ function f(o, t, w, C, b, B) {
|
|
|
22
20
|
min: o.min,
|
|
23
21
|
max: o.max,
|
|
24
22
|
direction: o.direction
|
|
25
|
-
}, null, 8, ["value", "step", "min", "max", "direction"])) :
|
|
26
|
-
o.marks ? (e(), i(
|
|
23
|
+
}, null, 8, ["value", "step", "min", "max", "direction"])) : l("", !0),
|
|
24
|
+
o.marks ? (e(), i(p, {
|
|
27
25
|
key: 1,
|
|
28
26
|
data: o.markList,
|
|
29
27
|
min: o.min,
|
|
30
28
|
max: o.max,
|
|
31
29
|
direction: o.direction
|
|
32
|
-
}, null, 8, ["data", "min", "max", "direction"])) :
|
|
33
|
-
o.marks ? (e(), i(
|
|
30
|
+
}, null, 8, ["data", "min", "max", "direction"])) : l("", !0),
|
|
31
|
+
o.marks ? (e(), i(u, {
|
|
34
32
|
key: 2,
|
|
35
33
|
data: o.markList,
|
|
36
34
|
min: o.min,
|
|
37
35
|
max: o.max,
|
|
38
36
|
direction: o.direction
|
|
39
|
-
}, null, 8, ["data", "min", "max", "direction"])) :
|
|
40
|
-
o.range ? (e(), i(
|
|
41
|
-
|
|
42
|
-
style: d(o.getBtnStyle(o.computedValue[0])),
|
|
37
|
+
}, null, 8, ["data", "min", "max", "direction"])) : l("", !0),
|
|
38
|
+
o.range ? (e(), i(t, a({ key: 3 }, o.controlAttrs, {
|
|
39
|
+
style: o.getBtnStyle(o.computedValue[0]),
|
|
43
40
|
value: o.computedValue[0],
|
|
44
41
|
direction: o.direction,
|
|
45
42
|
disabled: o.mergedDisabled,
|
|
@@ -54,9 +51,12 @@ function f(o, t, w, C, b, B) {
|
|
|
54
51
|
onKeydown: o.handleStartKeyDown,
|
|
55
52
|
onFocus: o.handleFocus,
|
|
56
53
|
onBlur: o.handleBlur
|
|
57
|
-
}, null,
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
}), null, 16, ["style", "value", "direction", "disabled", "min", "max", "format-tooltip", "show-tooltip", "tooltip-position", "onMovestart", "onMoving", "onMoveend", "onKeydown", "onFocus", "onBlur"])) : l("", !0),
|
|
55
|
+
M(t, a({
|
|
56
|
+
...o.controlAttrs,
|
|
57
|
+
id: o.range && o.controlAttrs.id ? `${o.controlAttrs.id}-end` : o.controlAttrs.id
|
|
58
|
+
}, {
|
|
59
|
+
style: o.getBtnStyle(o.computedValue[1]),
|
|
60
60
|
value: o.computedValue[1],
|
|
61
61
|
direction: o.direction,
|
|
62
62
|
disabled: o.mergedDisabled,
|
|
@@ -71,7 +71,7 @@ function f(o, t, w, C, b, B) {
|
|
|
71
71
|
onKeydown: o.handleEndKeyDown,
|
|
72
72
|
onFocus: o.handleFocus,
|
|
73
73
|
onBlur: o.handleBlur
|
|
74
|
-
}, null,
|
|
74
|
+
}), null, 16, ["style", "value", "direction", "disabled", "min", "max", "format-tooltip", "show-tooltip", "tooltip-position", "onMovestart", "onMoving", "onMoveend", "onKeydown", "onFocus", "onBlur"])
|
|
75
75
|
], 2),
|
|
76
76
|
o.showInput ? (e(), i(v, {
|
|
77
77
|
key: 0,
|
|
@@ -83,10 +83,10 @@ function f(o, t, w, C, b, B) {
|
|
|
83
83
|
disabled: o.mergedDisabled,
|
|
84
84
|
onStartChange: o.handleStartChange,
|
|
85
85
|
onEndChange: o.handleEndChange
|
|
86
|
-
}, null, 8, ["model-value", "min", "max", "step", "range", "disabled", "onStartChange", "onEndChange"])) :
|
|
87
|
-
],
|
|
86
|
+
}, null, 8, ["model-value", "min", "max", "step", "range", "disabled", "onStartChange", "onEndChange"])) : l("", !0)
|
|
87
|
+
], 16);
|
|
88
88
|
}
|
|
89
|
-
const F = /* @__PURE__ */
|
|
89
|
+
const F = /* @__PURE__ */ f(g, [["render", w]]);
|
|
90
90
|
export {
|
|
91
91
|
F as default
|
|
92
92
|
};
|