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.
Files changed (188) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/_hooks/use-form-item.d.ts +5 -0
  3. package/dist/_hooks/use-picker-focus.d.ts +17 -0
  4. package/dist/components/_components/feedback-icon/index.vue.d.ts +4 -4
  5. package/dist/components/_components/picker/input-range.vue.d.ts +10 -6
  6. package/dist/components/_components/picker/input.vue.d.ts +9 -5
  7. package/dist/components/alert/Alert.vue.d.ts +5 -5
  8. package/dist/components/alert/index.d.ts +10 -10
  9. package/dist/components/date-picker/DatePanel.vue.d.ts +5 -0
  10. package/dist/components/date-picker/DatePicker.vue.d.ts +36 -16
  11. package/dist/components/date-picker/index.d.ts +77 -33
  12. package/dist/components/dialog/Dialog.d.ts +1 -1
  13. package/dist/components/dialog/index.d.ts +3 -3
  14. package/dist/components/drawer/index.d.ts +3 -3
  15. package/dist/components/drawer/src/Drawer.vue.d.ts +1 -1
  16. package/dist/components/dropdown/Dropdown.vue.d.ts +3 -3
  17. package/dist/components/dropdown/DropdownButton.vue.d.ts +4 -4
  18. package/dist/components/dropdown/DropdownSubmenu.vue.d.ts +4 -4
  19. package/dist/components/dropdown/index.d.ts +22 -22
  20. package/dist/components/form/FormItem.vue.d.ts +12 -4
  21. package/dist/components/form/context.d.ts +6 -0
  22. package/dist/components/form/form-item-label.vue.d.ts +4 -4
  23. package/dist/components/form/form-item-message.vue.d.ts +2 -0
  24. package/dist/components/form/index.d.ts +30 -8
  25. package/dist/components/form/interface.d.ts +2 -2
  26. package/dist/components/form-input/InputPassword.vue.d.ts +20 -2
  27. package/dist/components/form-input/index.d.ts +22 -4
  28. package/dist/components/form-select/Select.d.ts +3 -3
  29. package/dist/components/form-select/index.d.ts +6 -6
  30. package/dist/components/form-slider/Slider.vue.d.ts +10 -3
  31. package/dist/components/form-slider/index.d.ts +26 -6
  32. package/dist/components/form-slider/slider-button.vue.d.ts +4 -3
  33. package/dist/components/form-switch/Switch.vue.d.ts +2 -1
  34. package/dist/components/form-switch/index.d.ts +5 -2
  35. package/dist/components/form-textarea/Textarea.vue.d.ts +2 -2
  36. package/dist/components/form-textarea/index.d.ts +5 -5
  37. package/dist/components/image/Image.vue.d.ts +10 -9
  38. package/dist/components/image/ImagePreview.vue.d.ts +8 -7
  39. package/dist/components/image/ImagePreviewAction.d.ts +3 -3
  40. package/dist/components/image/ImagePreviewGroup.vue.d.ts +8 -7
  41. package/dist/components/image/index.d.ts +59 -52
  42. package/dist/components/image/preview-arrow.vue.d.ts +2 -2
  43. package/dist/components/image/preview-toolbar.vue.d.ts +3 -3
  44. package/dist/components/layout/LayoutSidebar.vue.d.ts +2 -2
  45. package/dist/components/layout/index.d.ts +4 -4
  46. package/dist/components/link/Link.vue.d.ts +2 -2
  47. package/dist/components/link/index.d.ts +4 -4
  48. package/dist/components/menu/Menu.d.ts +2 -2
  49. package/dist/components/menu/base-menu.vue.d.ts +2 -2
  50. package/dist/components/menu/index.d.ts +4 -4
  51. package/dist/components/menu/sub-menu-pop.vue.d.ts +5 -5
  52. package/dist/components/message/index.d.ts +17 -17
  53. package/dist/components/message/message.vue.d.ts +8 -8
  54. package/dist/components/notification/Notification.d.ts +1 -1
  55. package/dist/components/notification/index.d.ts +3 -3
  56. package/dist/components/pagination/page-item-ellipsis.vue.d.ts +1 -1
  57. package/dist/components/pagination/page-item-step.vue.d.ts +2 -2
  58. package/dist/components/pagination/page-options.vue.d.ts +6 -6
  59. package/dist/components/popconfirm/src/popup.vue.d.ts +1 -1
  60. package/dist/components/popover/Popover.d.ts +1 -1
  61. package/dist/components/popover/index.d.ts +3 -3
  62. package/dist/components/popup/Popup.d.ts +1 -1
  63. package/dist/components/popup/index.d.ts +3 -3
  64. package/dist/components/progress/Progress.vue.d.ts +4 -4
  65. package/dist/components/progress/circle.vue.d.ts +2 -2
  66. package/dist/components/progress/index.d.ts +8 -8
  67. package/dist/components/progress/line.vue.d.ts +1 -1
  68. package/dist/components/progress/steps.vue.d.ts +1 -1
  69. package/dist/components/steps/Step.vue.d.ts +2 -2
  70. package/dist/components/steps/index.d.ts +4 -4
  71. package/dist/components/tabs/Tabs.d.ts +1 -1
  72. package/dist/components/tabs/index.d.ts +3 -3
  73. package/dist/components/tabs/tabs-tab.vue.d.ts +1 -1
  74. package/dist/components/tag/Tag.vue.d.ts +2 -2
  75. package/dist/components/tag/index.d.ts +4 -4
  76. package/dist/components/time-picker/TimeColumn.vue.d.ts +3 -0
  77. package/dist/components/time-picker/TimePanel.vue.d.ts +3 -0
  78. package/dist/components/time-picker/TimePicker.vue.d.ts +33 -17
  79. package/dist/components/time-picker/index.d.ts +73 -36
  80. package/dist/components/time-range-selector/TimeRangeSelector.vue.d.ts +8 -0
  81. package/dist/components/time-range-selector/index.d.ts +22 -0
  82. package/dist/components/tooltip/Tooltip.vue.d.ts +1 -1
  83. package/dist/components/tooltip/index.d.ts +3 -3
  84. package/dist/components/trigger/Trigger.d.ts +1 -1
  85. package/dist/components/trigger/index.d.ts +3 -3
  86. package/dist/es/_hooks/use-form-item.js +36 -10
  87. package/dist/es/_hooks/use-picker-focus.js +57 -0
  88. package/dist/es/_utils/constant.js +17 -5
  89. package/dist/es/components/_components/picker/input-range.vue.js +45 -55
  90. package/dist/es/components/_components/picker/input-range.vue2.js +105 -70
  91. package/dist/es/components/_components/picker/input.vue.js +22 -25
  92. package/dist/es/components/_components/picker/input.vue2.js +58 -43
  93. package/dist/es/components/_components/select-view/select-view.js +67 -66
  94. package/dist/es/components/date-picker/DatePanel.vue.js +102 -94
  95. package/dist/es/components/date-picker/DatePanel.vue2.js +97 -44
  96. package/dist/es/components/date-picker/DatePicker.vue.js +71 -58
  97. package/dist/es/components/date-picker/DatePicker.vue2.js +285 -231
  98. package/dist/es/components/dialog/Dialog.js +154 -132
  99. package/dist/es/components/form/Form.vue2.js +113 -101
  100. package/dist/es/components/form/FormItem.vue.js +26 -22
  101. package/dist/es/components/form/FormItem.vue2.js +162 -125
  102. package/dist/es/components/form/form-item-message.vue.js +31 -24
  103. package/dist/es/components/form/form-item-message.vue2.js +4 -2
  104. package/dist/es/components/form-checkbox/Checkbox.js +75 -71
  105. package/dist/es/components/form-checkbox/CheckboxGroup.js +43 -38
  106. package/dist/es/components/form-input/Input.js +83 -79
  107. package/dist/es/components/form-input/InputPassword.vue.js +19 -16
  108. package/dist/es/components/form-input/InputPassword.vue2.js +39 -29
  109. package/dist/es/components/form-input/InputSearch.js +47 -37
  110. package/dist/es/components/form-input-number/InputNumber.js +134 -133
  111. package/dist/es/components/form-input-tag/InputTag.js +173 -162
  112. package/dist/es/components/form-radio/Radio.js +74 -71
  113. package/dist/es/components/form-radio/RadioGroup.js +55 -49
  114. package/dist/es/components/form-select/Select.js +99 -98
  115. package/dist/es/components/form-slider/Slider.vue.js +28 -28
  116. package/dist/es/components/form-slider/Slider.vue2.js +139 -132
  117. package/dist/es/components/form-slider/slider-button.vue.js +6 -6
  118. package/dist/es/components/form-slider/slider-button.vue2.js +39 -34
  119. package/dist/es/components/form-switch/Switch.vue.js +9 -9
  120. package/dist/es/components/form-switch/Switch.vue2.js +81 -74
  121. package/dist/es/components/form-textarea/Textarea.vue2.js +123 -108
  122. package/dist/es/components/image/Image.vue2.js +77 -76
  123. package/dist/es/components/image/ImagePreview.vue.js +13 -12
  124. package/dist/es/components/image/ImagePreview.vue2.js +141 -136
  125. package/dist/es/components/image/ImagePreviewGroup.vue.js +1 -1
  126. package/dist/es/components/image/ImagePreviewGroup.vue2.js +82 -83
  127. package/dist/es/components/rate/Rate.js +106 -103
  128. package/dist/es/components/time-picker/TimeColumn.vue.js +34 -23
  129. package/dist/es/components/time-picker/TimeColumn.vue2.js +37 -28
  130. package/dist/es/components/time-picker/TimePicker.vue.js +83 -64
  131. package/dist/es/components/time-picker/TimePicker.vue2.js +192 -156
  132. package/dist/es/components/time-range-selector/TimeRangeSelector.vue.js +327 -193
  133. package/dist/es/locale/en-US.js +6 -0
  134. package/dist/es/locale/zh-CN.js +6 -0
  135. package/dist/es/style.css +1 -1
  136. package/dist/icons/_self/down.d.ts +1 -1
  137. package/dist/icons/_self/dropdown/more.d.ts +1 -1
  138. package/dist/icons/_self/empty-better.d.ts +1 -1
  139. package/dist/icons/_self/empty.d.ts +1 -1
  140. package/dist/icons/_self/eye-invisible.d.ts +1 -1
  141. package/dist/icons/_self/eye.d.ts +1 -1
  142. package/dist/icons/_self/full-screen.d.ts +1 -1
  143. package/dist/icons/_self/left.d.ts +1 -1
  144. package/dist/icons/_self/menu/down.d.ts +1 -1
  145. package/dist/icons/_self/minus.d.ts +1 -1
  146. package/dist/icons/_self/more-dot.d.ts +1 -1
  147. package/dist/icons/_self/next.d.ts +1 -1
  148. package/dist/icons/_self/original-size.d.ts +1 -1
  149. package/dist/icons/_self/plus.d.ts +1 -1
  150. package/dist/icons/_self/prev.d.ts +1 -1
  151. package/dist/icons/_self/question-message.d.ts +1 -1
  152. package/dist/icons/_self/right.d.ts +1 -1
  153. package/dist/icons/_self/rotate-left.d.ts +1 -1
  154. package/dist/icons/_self/rotate-right.d.ts +1 -1
  155. package/dist/icons/_self/search.d.ts +1 -1
  156. package/dist/icons/_self/up.d.ts +1 -1
  157. package/dist/icons/_self/zoom-in.d.ts +1 -1
  158. package/dist/icons/_self/zoom-out.d.ts +1 -1
  159. package/dist/icons/_ui/alone-left.d.ts +1 -1
  160. package/dist/icons/_ui/alone-margin-left.d.ts +1 -1
  161. package/dist/icons/_ui/alone-margin-right.d.ts +1 -1
  162. package/dist/icons/_ui/alone-right.d.ts +1 -1
  163. package/dist/icons/_ui/calendar.d.ts +1 -1
  164. package/dist/icons/_ui/time.d.ts +1 -1
  165. package/dist/icons/animation/animation-loading.d.ts +1 -1
  166. package/dist/icons/default/check-circle-fill.d.ts +1 -1
  167. package/dist/icons/default/check.d.ts +1 -1
  168. package/dist/icons/default/close-circle-fill.d.ts +1 -1
  169. package/dist/icons/default/close.d.ts +1 -1
  170. package/dist/icons/default/exclamation-circle-fill.d.ts +1 -1
  171. package/dist/icons/default/exclamation.d.ts +1 -1
  172. package/dist/icons/default/filter.d.ts +1 -1
  173. package/dist/icons/default/info-circle-fill.d.ts +1 -1
  174. package/dist/icons/default/link.d.ts +1 -1
  175. package/dist/icons/default/logo-simple.d.ts +1 -1
  176. package/dist/icons/default/minus-circle-fill.d.ts +1 -1
  177. package/dist/icons/icon.d.ts +2 -2
  178. package/dist/icons/index.d.ts +3 -3
  179. package/dist/index.cjs +4 -4
  180. package/dist/index.umd.js +4 -4
  181. package/dist/locale/interface.d.ts +6 -0
  182. package/dist/style/base.css +1 -1
  183. package/dist/style/date-picker.css +1 -1
  184. package/dist/style/form.css +1 -1
  185. package/dist/style/image.css +1 -1
  186. package/dist/style/time-range-selector.css +1 -1
  187. package/dist/style.css +1 -1
  188. package/package.json +2 -2
@@ -1,12 +1,12 @@
1
- import { defineComponent as C, toRefs as G, ref as _, computed as d, provide as A, reactive as k, watch as v, createVNode as g, mergeProps as x } from "vue";
2
- import { radioGroupKey as F } from "./context.js";
3
- import { isString as L, isNumber as w, isBoolean as D, isUndefined as H, isNull as I, isFunction as K } from "../../_utils/is.js";
4
- import { useFormItem as M } from "../../_hooks/use-form-item.js";
5
- import O from "./Radio.js";
6
- import { useSize as P } from "../../_hooks/use-size.js";
7
- import { getClassNameMixin as U } from "../../_utils/config.js";
8
- import { omit as X } from "../../_utils/omit.js";
9
- const Z = /* @__PURE__ */ C({
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, i) => !0
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: i,
113
- emit: o,
114
- slots: l
112
+ attrs: l,
113
+ emit: n,
114
+ slots: t
115
115
  }) {
116
- const t = U("radio--group"), {
116
+ const r = Q("radio--group"), {
117
117
  size: p,
118
- type: y,
119
- disabled: S,
120
- modelValue: h
121
- } = G(a), {
122
- mergedDisabled: n,
123
- mergedSize: z,
124
- eventHandlers: V
125
- } = M({
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: S
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
- } = P(z), r = _(a.defaultValue), s = d(() => a.modelValue ?? r.value), f = d(() => (a.options ?? []).map((e) => L(e) || w(e) || D(e) ? {
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)), N = (e, c) => {
134
- var u, b;
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: y,
142
- disabled: n,
143
- inputName: a.name,
144
- slots: l,
145
- handleChange: N
146
- })), v(s, (e) => {
147
- r.value !== e && (r.value = e);
148
- }), v(h, (e) => {
149
- (H(e) || I(e)) && (r.value = "");
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 R = d(() => [`${a.type === "button" ? t.element("button") : t.block}`, t.modifier(`size-${m.value}`), t.modifier(`direction-${a.direction}`), i.class, {
152
- [t.modifier("disabled")]: n.value
153
- }]), $ = d(() => X(i, ["class", "style"])), B = () => f.value.map((e) => g(O, {
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: () => [l.label ? l.label({
164
+ default: () => [t.label ? t.label({
159
165
  data: e
160
- }) : K(e.label) ? e.label() : e.label]
166
+ }) : X(e.label) ? e.label() : e.label]
161
167
  }));
162
168
  return () => {
163
169
  var e;
164
- return g("span", x({
170
+ return v("span", D({
165
171
  role: "radiogroup",
166
172
  "aria-label": a.ariaLabel,
167
- "aria-disabled": n.value,
168
- class: R.value,
169
- style: i.style
170
- }, $.value), [f.value.length > 0 ? B() : (e = l.default) == null ? void 0 : e.call(l)]);
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
- Z as default
181
+ ie as default
176
182
  };
@@ -1,30 +1,30 @@
1
- import { defineComponent as Ae, toRefs as Ne, useId as je, computed as i, ref as f, watch as H, nextTick as De, watchEffect as Re, createVNode as m, mergeProps as A, isVNode as Te } from "vue";
2
- import { isObject as N, isFunction as y, isArray as _e, isNumber as Ke, isString as Ie, isBoolean as $e, isUndefined as S, isNull as ze, isEmptyObject as He } from "../../_utils/is.js";
3
- import { getKeyFromValue as M, isGroupOptionInfo as Me, isValidOption as Ue, hasEmptyStringKey as Ge } from "./utils.js";
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 We from "./SelectDropdown.vue.js";
7
- import Ye from "./SelectOption.vue.js";
8
- import qe from "./SelectOptionGroup.vue.js";
9
- import Je from "../virtual-list-v2/virtual-list.vue.js";
10
- import { useSelect as Qe } from "./hooks/use-select.js";
11
- import { useTrigger as Xe } from "../../_hooks/use-trigger.js";
12
- import { useFormItem as Ze } from "../../_hooks/use-form-item.js";
13
- import { useLocale as et } from "../../locale/index.js";
14
- import { debounce as tt } from "../../_utils/debounce.js";
15
- import { getClassNameMixin as at } from "../../_utils/config.js";
16
- import { omit as lt } from "../../_utils/omit.js";
17
- import nt from "../../_utils/pick.js";
18
- function ot(t) {
19
- return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !Te(t);
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"], ut = {
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
- }, Ct = /* @__PURE__ */ Ae({
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: p,
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
- } = Ne(t), ne = at("select"), D = je(), B = `${D}-listbox`, x = (e) => `${D}-option-${encodeURIComponent(e)}`, {
460
- mergedSize: oe,
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: ue,
463
- eventHandlers: re
464
- } = Ze({
463
+ mergedError: re,
464
+ eventHandlers: ie
465
+ } = et({
465
466
  size: Y,
466
467
  disabled: q,
467
468
  error: J
468
469
  }), {
469
- t: ie
470
- } = et(), ce = i(() => t.virtualListProps ? "div" : "li"), P = i(() => N(t.allowSearch) && !!t.allowSearch.retainInputValue);
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 = f(), T = f({}), _ = f(), {
479
+ const R = p(), T = p({}), _ = p(), {
479
480
  computedPopupVisible: c,
480
481
  handlePopupVisibleChange: w
481
- } = Xe({
482
+ } = Ze({
482
483
  popupVisible: X,
483
484
  defaultPopupVisible: Z,
484
485
  emit: r
485
- }), k = f(t.defaultValue), E = i(() => {
486
+ }), k = p(t.defaultValue), E = i(() => {
486
487
  const e = t.modelValue ?? k.value;
487
- return (_e(e) ? e : e || Ke(e) || Ie(e) || $e(e) ? [e] : []).map((a) => ({
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) || ze(e)) && (k.value = j.value ? [] : e);
494
+ (S(e) || He(e)) && (k.value = j.value ? [] : e);
494
495
  });
495
- const d = i(() => E.value.map((e) => e.key)), K = i(() => ({
496
- ...ut,
496
+ const d = i(() => E.value.map((e) => e.key)), I = i(() => ({
497
+ ...rt,
497
498
  ...V == null ? void 0 : V.value
498
- })), I = f(), de = (e) => {
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
- }, se = (e) => {
504
- I.value = de(e);
504
+ }, fe = (e) => {
505
+ K.value = se(e);
505
506
  }, pe = (e) => y(t.fallbackOption) ? t.fallbackOption(e) : {
506
- [K.value.value]: e,
507
- [K.value.label]: String(N(e) ? e[p == null ? void 0 : p.value] : e)
508
- }, fe = () => {
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 = f([]), me = i(() => v.value.map((e) => {
529
+ }, v = p([]), ve = i(() => v.value.map((e) => {
529
530
  var n;
530
531
  let l = pe(e.value);
531
- const a = (n = I.value) == null ? void 0 : n[e.key];
532
- return !S(a) && !He(a) && (l = {
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
- De(() => {
538
- Re(() => {
538
+ Re(() => {
539
+ Te(() => {
539
540
  var l;
540
- const e = fe();
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 $ = f(t.defaultInputValue), s = i(() => t.inputValue ?? $.value);
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 ve = (e) => {
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) ?? (Ge(u) ? void 0 : "");
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 = ve(e);
565
- k.value = l, r("update:modelValue", l), r("change", l), (n = (a = re.value) == null ? void 0 : a.onChange) == null || n.call(a), se(e);
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
- }, be = (e, l) => {
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 (Ce.value.includes(e))
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
- }, ge = tt((e) => {
590
+ }, ye = at((e) => {
590
591
  r("search", e);
591
- }, t.searchDelay), ye = (e) => {
592
- e !== s.value && (c.value || w(!0), g(e), t.allowSearch && ge(e));
593
- }, he = (e) => {
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
- }, Ve = (e) => {
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: Se,
611
- enabledOptionKeys: Ce,
611
+ validOptionInfos: Ce,
612
+ enabledOptionKeys: Be,
612
613
  activeKey: O,
613
- handleKeyDown: Be
614
- } = Qe({
614
+ handleKeyDown: xe
615
+ } = Xe({
615
616
  multiple: j,
616
617
  options: Q,
617
- extraOptions: me,
618
+ extraOptions: ve,
618
619
  inputValue: s,
619
620
  filterOption: h,
620
621
  showExtraOptions: ee,
621
- component: ce,
622
- valueKey: p,
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: be,
632
+ onSelect: ge,
632
633
  onPopupVisibleChange: w,
633
634
  getOptionId: x
634
- }), xe = i(() => lt(C, [...W])), Fe = i(() => ({
635
- ...nt(C, [...W]),
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 ?? ie("common.select")
643
- })), Pe = i(() => {
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[p == null ? void 0 : p.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
- }), ke = (e) => {
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 (Me(e)) {
666
+ if (Ue(e)) {
666
667
  let l;
667
- return m(qe, {
668
+ return m(Je, {
668
669
  key: e.key,
669
670
  label: e.label
670
- }, ot(l = e.options.map((a) => L(a))) ? l : {
671
+ }, ut(l = e.options.map((a) => L(a))) ? l : {
671
672
  default: () => [l]
672
673
  });
673
674
  }
674
- return Ue(e, {
675
+ return Ge(e, {
675
676
  inputValue: s.value,
676
677
  filterOption: h == null ? void 0 : h.value
677
- }) ? m(Ye, {
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: ke(e)
688
+ default: Ee(e)
688
689
  }) : null;
689
- }, Ee = () => m(We, {
690
+ }, Le = () => m(Ye, {
690
691
  ref: R,
691
692
  id: B,
692
693
  multiple: t.multiple,
693
694
  loading: t.loading,
694
- empty: Se.value.length === 0,
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: we,
700
- onReachBottom: Oe
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(Je, A(t.virtualListProps, {
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
- }), Le = ({
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: Pe.value,
767
+ modelValue: ke.value,
767
768
  inputValue: s.value,
768
769
  multiple: t.multiple,
769
770
  disabled: F.value,
770
- error: ue.value,
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: oe.value,
780
+ size: ue.value,
780
781
  tagNowrap: t.tagNowrap,
781
- inputAttrs: Fe.value
782
- }, xe.value, {
783
- onInputValueChange: ye,
784
- onRemove: he,
785
- onClear: Ve,
786
- onKeydown: Be
782
+ inputAttrs: Pe.value
783
+ }, Fe.value, {
784
+ onInputValueChange: he,
785
+ onRemove: Ve,
786
+ onClear: we,
787
+ onKeydown: xe
787
788
  }), {
788
- label: Le,
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: Ee
796
+ content: Le
796
797
  });
797
798
  }
798
799
  });
799
800
  export {
800
- Ct as default
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, normalizeClass as l, createElementVNode as s, normalizeStyle as d, createBlock as i, createCommentVNode as a, createVNode as y } from "vue";
3
- import M from "../../_virtual/_plugin-vue_export-helper.js";
4
- function f(o, t, w, C, b, B) {
5
- const m = n("slider-ticks"), u = n("slider-dots"), p = n("slider-marks"), r = n("slider-button"), v = n("slider-input");
6
- return e(), k("div", {
7
- class: l(o.cls)
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: l(o.trackCls),
12
- onClick: t[0] || (t[0] = (...h) => o.handleClick && o.handleClick(...h))
9
+ class: s(o.trackCls),
10
+ onClick: r[0] || (r[0] = (...h) => o.handleClick && o.handleClick(...h))
13
11
  }, [
14
- s("div", {
15
- class: l(o.className.element("bar")),
16
- style: d(o.getBarStyle(o.computedValue))
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"])) : a("", !0),
26
- o.marks ? (e(), i(u, {
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"])) : a("", !0),
33
- o.marks ? (e(), i(p, {
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"])) : a("", !0),
40
- o.range ? (e(), i(r, {
41
- key: 3,
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, 8, ["style", "value", "direction", "disabled", "min", "max", "format-tooltip", "show-tooltip", "tooltip-position", "onMovestart", "onMoving", "onMoveend", "onKeydown", "onFocus", "onBlur"])) : a("", !0),
58
- y(r, {
59
- style: d(o.getBtnStyle(o.computedValue[1])),
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, 8, ["style", "value", "direction", "disabled", "min", "max", "format-tooltip", "show-tooltip", "tooltip-position", "onMovestart", "onMoving", "onMoveend", "onKeydown", "onFocus", "onBlur"])
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"])) : a("", !0)
87
- ], 2);
86
+ }, null, 8, ["model-value", "min", "max", "step", "range", "disabled", "onStartChange", "onEndChange"])) : l("", !0)
87
+ ], 16);
88
88
  }
89
- const F = /* @__PURE__ */ M(g, [["render", f]]);
89
+ const F = /* @__PURE__ */ f(g, [["render", w]]);
90
90
  export {
91
91
  F as default
92
92
  };