x-next 1.17.0 → 1.18.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 (189) hide show
  1. package/AI_USAGE/catalog.md +1 -1
  2. package/AI_USAGE/components/alert-api.md +1 -1
  3. package/AI_USAGE/components/alert.md +33 -1
  4. package/AI_USAGE/components/bar-chart-api.md +1 -1
  5. package/AI_USAGE/components/bar-chart.md +1 -1
  6. package/AI_USAGE/components/boxicons.md +1 -1
  7. package/AI_USAGE/components/button-api.md +13 -16
  8. package/AI_USAGE/components/button.md +245 -34
  9. package/AI_USAGE/components/charts.md +1 -1
  10. package/AI_USAGE/components/checkbox-api.md +1 -1
  11. package/AI_USAGE/components/checkbox.md +1 -1
  12. package/AI_USAGE/components/color-picker-api.md +1 -1
  13. package/AI_USAGE/components/color-picker.md +1 -1
  14. package/AI_USAGE/components/config-provider-api.md +1 -1
  15. package/AI_USAGE/components/config-provider.md +1 -1
  16. package/AI_USAGE/components/date-picker-api.md +44 -26
  17. package/AI_USAGE/components/date-picker.md +78 -3
  18. package/AI_USAGE/components/dialog-api.md +2 -2
  19. package/AI_USAGE/components/dialog.md +5 -1
  20. package/AI_USAGE/components/draggable-api.md +1 -1
  21. package/AI_USAGE/components/draggable.md +1 -1
  22. package/AI_USAGE/components/drawer-api.md +3 -3
  23. package/AI_USAGE/components/drawer.md +1 -1
  24. package/AI_USAGE/components/dropdown-api.md +8 -3
  25. package/AI_USAGE/components/dropdown.md +2 -2
  26. package/AI_USAGE/components/empty-api.md +1 -1
  27. package/AI_USAGE/components/empty.md +1 -1
  28. package/AI_USAGE/components/finicon.md +1 -1
  29. package/AI_USAGE/components/form-api.md +1 -1
  30. package/AI_USAGE/components/form.md +1 -1
  31. package/AI_USAGE/components/grid-api.md +1 -1
  32. package/AI_USAGE/components/grid.md +1 -1
  33. package/AI_USAGE/components/heatmap-api.md +1 -1
  34. package/AI_USAGE/components/heatmap.md +1 -1
  35. package/AI_USAGE/components/icon-api.md +1 -1
  36. package/AI_USAGE/components/icon.md +1 -1
  37. package/AI_USAGE/components/image-api.md +1 -1
  38. package/AI_USAGE/components/image.md +1 -1
  39. package/AI_USAGE/components/input-api.md +2 -2
  40. package/AI_USAGE/components/input-number-api.md +1 -1
  41. package/AI_USAGE/components/input-number.md +1 -1
  42. package/AI_USAGE/components/input-tag-api.md +1 -1
  43. package/AI_USAGE/components/input-tag.md +1 -1
  44. package/AI_USAGE/components/input.md +1 -1
  45. package/AI_USAGE/components/layout-api.md +1 -1
  46. package/AI_USAGE/components/layout.md +1 -1
  47. package/AI_USAGE/components/line-chart-api.md +1 -1
  48. package/AI_USAGE/components/line-chart.md +1 -1
  49. package/AI_USAGE/components/link-api.md +1 -1
  50. package/AI_USAGE/components/link.md +1 -1
  51. package/AI_USAGE/components/menu-api.md +1 -1
  52. package/AI_USAGE/components/menu.md +1 -1
  53. package/AI_USAGE/components/message-api.md +1 -1
  54. package/AI_USAGE/components/message-box-api.md +1 -1
  55. package/AI_USAGE/components/message-box.md +1 -1
  56. package/AI_USAGE/components/message.md +1 -1
  57. package/AI_USAGE/components/network-api.md +1 -1
  58. package/AI_USAGE/components/network.md +1 -1
  59. package/AI_USAGE/components/notification-api.md +1 -1
  60. package/AI_USAGE/components/notification.md +1 -1
  61. package/AI_USAGE/components/pagination-api.md +1 -1
  62. package/AI_USAGE/components/pagination.md +1 -1
  63. package/AI_USAGE/components/pie-chart-api.md +1 -1
  64. package/AI_USAGE/components/pie-chart.md +1 -1
  65. package/AI_USAGE/components/popconfirm-api.md +3 -3
  66. package/AI_USAGE/components/popconfirm.md +1 -1
  67. package/AI_USAGE/components/popover-api.md +1 -1
  68. package/AI_USAGE/components/popover.md +3 -1
  69. package/AI_USAGE/components/popup-api.md +1 -1
  70. package/AI_USAGE/components/popup.md +1 -1
  71. package/AI_USAGE/components/progress-api.md +1 -1
  72. package/AI_USAGE/components/progress.md +1 -1
  73. package/AI_USAGE/components/radio-api.md +1 -1
  74. package/AI_USAGE/components/radio.md +1 -1
  75. package/AI_USAGE/components/rate-api.md +1 -1
  76. package/AI_USAGE/components/rate.md +1 -1
  77. package/AI_USAGE/components/resize-box-api.md +1 -1
  78. package/AI_USAGE/components/resize-box.md +1 -1
  79. package/AI_USAGE/components/scrollbar-api.md +1 -1
  80. package/AI_USAGE/components/scrollbar.md +1 -1
  81. package/AI_USAGE/components/select-api.md +1 -1
  82. package/AI_USAGE/components/select.md +1 -1
  83. package/AI_USAGE/components/skeleton-api.md +1 -1
  84. package/AI_USAGE/components/skeleton.md +1 -1
  85. package/AI_USAGE/components/slider-api.md +1 -1
  86. package/AI_USAGE/components/slider.md +1 -1
  87. package/AI_USAGE/components/space-api.md +1 -1
  88. package/AI_USAGE/components/space.md +1 -1
  89. package/AI_USAGE/components/spin-api.md +1 -1
  90. package/AI_USAGE/components/spin.md +1 -1
  91. package/AI_USAGE/components/steps-api.md +1 -1
  92. package/AI_USAGE/components/steps.md +1 -1
  93. package/AI_USAGE/components/switch-api.md +1 -1
  94. package/AI_USAGE/components/switch.md +1 -1
  95. package/AI_USAGE/components/table-api.md +1 -1
  96. package/AI_USAGE/components/table.md +1 -1
  97. package/AI_USAGE/components/tabs-api.md +1 -1
  98. package/AI_USAGE/components/tabs.md +1 -1
  99. package/AI_USAGE/components/tag-api.md +1 -1
  100. package/AI_USAGE/components/tag.md +1 -1
  101. package/AI_USAGE/components/textarea-api.md +1 -1
  102. package/AI_USAGE/components/textarea.md +1 -1
  103. package/AI_USAGE/components/time-picker-api.md +1 -1
  104. package/AI_USAGE/components/time-picker.md +1 -1
  105. package/AI_USAGE/components/time-range-selector-api.md +1 -1
  106. package/AI_USAGE/components/time-range-selector.md +1 -1
  107. package/AI_USAGE/components/timeline-api.md +3 -3
  108. package/AI_USAGE/components/timeline.md +1 -1
  109. package/AI_USAGE/components/tooltip-api.md +1 -1
  110. package/AI_USAGE/components/tooltip.md +1 -1
  111. package/AI_USAGE/components/transfer-api.md +1 -1
  112. package/AI_USAGE/components/transfer.md +1 -1
  113. package/AI_USAGE/components/tree-select-api.md +1 -1
  114. package/AI_USAGE/components/tree-select.md +1 -1
  115. package/AI_USAGE/components/trend-chart-api.md +1 -1
  116. package/AI_USAGE/components/trend-chart.md +1 -1
  117. package/AI_USAGE/components/trigger-api.md +1 -1
  118. package/AI_USAGE/components/trigger.md +1 -1
  119. package/AI_USAGE/components/upload-api.md +1 -1
  120. package/AI_USAGE/components/upload.md +1 -1
  121. package/AI_USAGE/components/watermark-api.md +1 -1
  122. package/AI_USAGE/components/watermark.md +1 -1
  123. package/AI_USAGE/core.md +1 -1
  124. package/AI_USAGE/index.md +1 -1
  125. package/AI_USAGE/recipes/form-on-demand.md +1 -1
  126. package/AI_USAGE.md +432 -88
  127. package/CHANGELOG.md +36 -0
  128. package/dist/_container/render-function.d.ts +2 -2
  129. package/dist/_styles/palette-aliases.d.ts +1 -0
  130. package/dist/components/_components/picker/input-range.vue.d.ts +1 -1
  131. package/dist/components/button/Button.d.ts +0 -9
  132. package/dist/components/button/appearance.d.ts +7 -0
  133. package/dist/components/button/index.d.ts +0 -16
  134. package/dist/components/button/props.d.ts +2 -6
  135. package/dist/components/color-picker/panel.d.ts +0 -9
  136. package/dist/components/date-picker/DatePanel.vue.d.ts +10 -1
  137. package/dist/components/date-picker/DatePicker.vue.d.ts +22 -25
  138. package/dist/components/date-picker/index.d.ts +156 -84
  139. package/dist/components/date-picker/utils.d.ts +4 -4
  140. package/dist/components/drawer/index.d.ts +0 -30
  141. package/dist/components/drawer/src/Drawer.vue.d.ts +0 -15
  142. package/dist/components/dropdown/Dropdown.vue.d.ts +1 -0
  143. package/dist/components/dropdown/DropdownButton.vue.d.ts +1 -15
  144. package/dist/components/dropdown/DropdownSubmenu.vue.d.ts +1 -0
  145. package/dist/components/dropdown/context.d.ts +1 -0
  146. package/dist/components/dropdown/index.d.ts +8 -30
  147. package/dist/components/dropdown/use-keyboard.d.ts +1 -0
  148. package/dist/components/menu/MenuItem.d.ts +2 -2
  149. package/dist/components/menu/context.d.ts +3 -3
  150. package/dist/components/menu/index.d.ts +6 -6
  151. package/dist/components/menu/sub-menu-pop.vue.d.ts +2 -2
  152. package/dist/components/popconfirm/src/popup.vue.d.ts +0 -15
  153. package/dist/components/time-picker/TimePanel.vue.d.ts +0 -15
  154. package/dist/components/time-picker/TimePicker.vue.d.ts +1 -16
  155. package/dist/components/time-picker/index.d.ts +2 -32
  156. package/dist/es/_styles/palette-aliases.js +102 -17
  157. package/dist/es/_utils/palette.js +54 -54
  158. package/dist/es/components/_components/picker/input-range.vue.js +12 -12
  159. package/dist/es/components/_components/picker/input-range.vue2.js +45 -45
  160. package/dist/es/components/_components/picker/input.vue2.js +24 -24
  161. package/dist/es/components/button/Button.js +77 -49
  162. package/dist/es/components/button/appearance.js +7 -0
  163. package/dist/es/components/button/props.js +0 -4
  164. package/dist/es/components/date-picker/DatePanel.vue.js +47 -47
  165. package/dist/es/components/date-picker/DatePanel.vue2.js +68 -59
  166. package/dist/es/components/date-picker/DatePicker.vue.js +65 -59
  167. package/dist/es/components/date-picker/DatePicker.vue2.js +387 -284
  168. package/dist/es/components/date-picker/index.js +57 -36
  169. package/dist/es/components/date-picker/utils.js +132 -122
  170. package/dist/es/components/dialog/Dialog.js +43 -40
  171. package/dist/es/components/dialog/props.js +1 -1
  172. package/dist/es/components/dropdown/Dropdown.vue2.js +66 -50
  173. package/dist/es/components/dropdown/dropdown-panel.vue2.js +48 -43
  174. package/dist/es/components/dropdown/use-keyboard.js +36 -28
  175. package/dist/es/components/popover/Popover.js +72 -32
  176. package/dist/es/directives/wave.js +14 -8
  177. package/dist/es/style.css +1 -1
  178. package/dist/index.cjs +3 -3
  179. package/dist/index.umd.js +3 -3
  180. package/dist/style/alert.css +1 -1
  181. package/dist/style/base.css +1 -1
  182. package/dist/style/button.css +1 -1
  183. package/dist/style/color-picker.css +1 -1
  184. package/dist/style/date-picker.css +1 -1
  185. package/dist/style/dialog.css +1 -1
  186. package/dist/style/link.css +1 -1
  187. package/dist/style/message-box.css +1 -1
  188. package/dist/style.css +1 -1
  189. package/package.json +2 -1
@@ -1,16 +1,16 @@
1
1
  import v from "./input-range.vue2.js";
2
- import { resolveComponent as a, openBlock as r, createElementBlock as i, mergeProps as d, normalizeClass as l, renderSlot as p, createCommentVNode as u, createElementVNode as s, withKeys as t, createTextVNode as k, createBlock as m, withCtx as I, createVNode as b } from "vue";
2
+ import { resolveComponent as a, openBlock as r, createElementBlock as u, mergeProps as d, normalizeClass as l, renderSlot as p, createCommentVNode as i, createElementVNode as s, withKeys as t, createTextVNode as k, createBlock as m, withCtx as I, createVNode as b } from "vue";
3
3
  import g from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const N = ["disabled", "placeholder", "value", "readonly"], F = ["disabled", "placeholder", "value", "readonly"];
5
- function B(e, o, $, w, E, V) {
4
+ const N = ["disabled", "placeholder", "value", "readonly"], B = ["disabled", "placeholder", "value", "readonly"];
5
+ function F(e, o, $, w, E, V) {
6
6
  const f = a("IconClose"), C = a("IconHover"), y = a("FeedbackIcon");
7
- return r(), i("div", d(e.wrapperAttrs, { class: e.classNames }), [
8
- e.$slots.prefix ? (r(), i("div", {
7
+ return r(), u("div", d(e.wrapperAttrs, { class: e.classNames }), [
8
+ e.$slots.prefix ? (r(), u("div", {
9
9
  key: 0,
10
10
  class: l(e.className.element("prefix"))
11
11
  }, [
12
12
  p(e.$slots, "prefix")
13
- ], 2)) : u("", !0),
13
+ ], 2)) : i("", !0),
14
14
  s("div", {
15
15
  class: l(e.getInputWrapClassName(0))
16
16
  }, [
@@ -20,7 +20,7 @@ function B(e, o, $, w, E, V) {
20
20
  value: e.displayValue0,
21
21
  readonly: e.readonly || void 0,
22
22
  onInput: o[0] || (o[0] = (...n) => e.onChange && e.onChange(...n)),
23
- onFocus: o[1] || (o[1] = (...n) => e.onFocus && e.onFocus(...n)),
23
+ onFocus: o[1] || (o[1] = (n) => e.onFocus(n, 0)),
24
24
  onBlur: o[2] || (o[2] = (...n) => e.onBlur && e.onBlur(...n)),
25
25
  onKeydown: o[3] || (o[3] = t((...n) => e.onPressEnter && e.onPressEnter(...n), ["enter"])),
26
26
  onClick: o[4] || (o[4] = () => e.changeFocusedInput(0))
@@ -42,11 +42,11 @@ function B(e, o, $, w, E, V) {
42
42
  value: e.displayValue1,
43
43
  readonly: e.readonly || void 0,
44
44
  onInput: o[5] || (o[5] = (...n) => e.onChange && e.onChange(...n)),
45
- onFocus: o[6] || (o[6] = (...n) => e.onFocus && e.onFocus(...n)),
45
+ onFocus: o[6] || (o[6] = (n) => e.onFocus(n, 1)),
46
46
  onBlur: o[7] || (o[7] = (...n) => e.onBlur && e.onBlur(...n)),
47
47
  onKeydown: o[8] || (o[8] = t((...n) => e.onPressEnter && e.onPressEnter(...n), ["enter"])),
48
48
  onClick: o[9] || (o[9] = () => e.changeFocusedInput(1))
49
- }), null, 16, F)
49
+ }), null, 16, B)
50
50
  ], 2),
51
51
  s("div", {
52
52
  class: l(e.className.element("suffix"))
@@ -63,7 +63,7 @@ function B(e, o, $, w, E, V) {
63
63
  b(f)
64
64
  ]),
65
65
  _: 1
66
- }, 8, ["aria-label", "class", "onClick"])) : u("", !0),
66
+ }, 8, ["aria-label", "class", "onClick"])) : i("", !0),
67
67
  s("span", {
68
68
  class: l(e.className.element("suffix-icon"))
69
69
  }, [
@@ -72,11 +72,11 @@ function B(e, o, $, w, E, V) {
72
72
  e.feedback ? (r(), m(y, {
73
73
  key: 1,
74
74
  type: e.feedback
75
- }, null, 8, ["type"])) : u("", !0)
75
+ }, null, 8, ["type"])) : i("", !0)
76
76
  ], 2)
77
77
  ], 16);
78
78
  }
79
- const T = /* @__PURE__ */ g(v, [["render", B]]);
79
+ const T = /* @__PURE__ */ g(v, [["render", F]]);
80
80
  export {
81
81
  T as default
82
82
  };
@@ -1,12 +1,12 @@
1
- import { defineComponent as J, toRefs as Q, computed as i, ref as x } from "vue";
1
+ import { defineComponent as J, toRefs as Q, computed as s, ref as N } from "vue";
2
2
  import X from "../feedback-icon/index.vue.js";
3
3
  import { isNumber as Y, isUndefined as Z, isArray as ee, isDayjs as re, isFunction as oe } from "../../../_utils/is.js";
4
4
  import te from "../../../icons/default/close.js";
5
5
  import ae from "../icon-hover/index.vue.js";
6
- import { useFormItem as ne, useFormItemControl as N } from "../../../_hooks/use-form-item.js";
6
+ import { useFormItem as ne, useFormItemControl as S } from "../../../_hooks/use-form-item.js";
7
7
  import { useLocale as ie } from "../../../locale/index.js";
8
8
  import { useSize as se } from "../../../_hooks/use-size.js";
9
- import { INPUT_EVENTS as S } from "../../../_utils/constant.js";
9
+ import { INPUT_EVENTS as z } from "../../../_utils/constant.js";
10
10
  import le from "../../../_utils/pick.js";
11
11
  import { omit as ue } from "../../../_utils/omit.js";
12
12
  import { getClassNameMixin as ce } from "../../../_utils/config.js";
@@ -73,12 +73,12 @@ const xe = J({
73
73
  "focus",
74
74
  "blur"
75
75
  ],
76
- setup(a, { emit: r, slots: s, attrs: o }) {
77
- const { t: z } = ie(), {
78
- error: E,
79
- focused: F,
76
+ setup(a, { emit: r, slots: l, attrs: o }) {
77
+ const { t: E } = ie(), {
78
+ error: F,
79
+ focused: B,
80
80
  disabled: u,
81
- size: B,
81
+ size: D,
82
82
  value: c,
83
83
  format: f,
84
84
  focusedIndex: d,
@@ -86,43 +86,43 @@ const xe = J({
86
86
  placeholder: g
87
87
  } = Q(a), {
88
88
  formItemCtx: b,
89
- mergedSize: D,
89
+ mergedSize: $,
90
90
  mergedDisabled: m,
91
- mergedError: $,
92
- feedback: j
93
- } = ne({ size: B, error: E }), { mergedSize: k } = se(D), _ = i(() => ue(o, [
94
- ...S,
91
+ mergedError: j,
92
+ feedback: k
93
+ } = ne({ size: D, error: F }), { mergedSize: _ } = se($), O = s(() => ue(o, [
94
+ ...z,
95
95
  ...Object.keys(o).filter((e) => e.startsWith("aria-") || e === "role")
96
96
  ])), v = () => ({
97
- ...le(o, S),
97
+ ...le(o, z),
98
98
  ...Object.fromEntries(
99
99
  Object.entries(o).filter(([e]) => e.startsWith("aria-") || e === "role")
100
100
  )
101
- }), O = N(b, () => {
101
+ }), P = S(b, () => {
102
102
  var e;
103
103
  return {
104
104
  ...v(),
105
105
  "aria-label": o["aria-label"] ? `${o["aria-label"]} ${((e = g.value) == null ? void 0 : e[0]) ?? ""}` : void 0
106
106
  };
107
- }), P = N(b, () => {
107
+ }), R = S(b, () => {
108
108
  var e;
109
109
  return {
110
110
  ...v(),
111
111
  id: o.id ? `${o.id}-end` : void 0,
112
112
  "aria-label": o["aria-label"] ? `${o["aria-label"]} ${((e = g.value) == null ? void 0 : e[1]) ?? ""}` : void 0
113
113
  };
114
- }), R = x(), T = x(), p = (e) => m.value ? m.value : ee(u.value) ? u.value[e] : u.value, y = i(() => p(0)), I = i(() => p(1)), t = ce("picker"), V = i(() => [
114
+ }), T = N(), V = N(), p = (e) => m.value ? m.value : ee(u.value) ? u.value[e] : u.value, y = s(() => p(0)), I = s(() => p(1)), t = ce("picker"), W = s(() => [
115
115
  t.block,
116
116
  t.modifier("range"),
117
- t.modifier(`size-${k.value}`),
117
+ t.modifier(`size-${_.value}`),
118
118
  {
119
- [t.modifier("focused")]: F.value,
119
+ [t.modifier("focused")]: B.value,
120
120
  [t.modifier("disabled")]: y.value && I.value,
121
- [t.modifier("error")]: $.value,
122
- [t.modifier("has-prefix")]: s.prefix
121
+ [t.modifier("error")]: j.value,
122
+ [t.modifier("has-prefix")]: l.prefix
123
123
  }
124
124
  ]);
125
- function W(e) {
125
+ function w(e) {
126
126
  return [
127
127
  t.element("input"),
128
128
  {
@@ -131,15 +131,15 @@ const xe = J({
131
131
  ];
132
132
  }
133
133
  function h(e) {
134
- var C, A;
134
+ var A, x;
135
135
  if (n != null && n.value)
136
- return (C = n == null ? void 0 : n.value) == null ? void 0 : C[e];
137
- const l = (A = c == null ? void 0 : c.value) == null ? void 0 : A[e];
138
- if (l && re(l))
139
- return oe(f.value) ? f.value(l) : l.format(f.value);
136
+ return (A = n == null ? void 0 : n.value) == null ? void 0 : A[e];
137
+ const i = (x = c == null ? void 0 : c.value) == null ? void 0 : x[e];
138
+ if (i && re(i))
139
+ return oe(f.value) ? f.value(i) : i.format(f.value);
140
140
  }
141
- const w = i(() => h(0)), U = i(() => h(1));
142
- function q(e) {
141
+ const U = s(() => h(0)), q = s(() => h(1));
142
+ function C(e) {
143
143
  r("focused-index-change", e), r("update:focusedIndex", e);
144
144
  }
145
145
  function H(e) {
@@ -148,8 +148,8 @@ const xe = J({
148
148
  function K() {
149
149
  r("press-enter");
150
150
  }
151
- function L(e) {
152
- r("focus", e);
151
+ function L(e, i) {
152
+ C(i), r("focus", e);
153
153
  }
154
154
  function M(e) {
155
155
  r("blur", e);
@@ -158,34 +158,34 @@ const xe = J({
158
158
  r("clear", e);
159
159
  }
160
160
  return {
161
- wrapperAttrs: _,
162
- formControlAttrs0: O,
163
- formControlAttrs1: P,
164
- t: z,
161
+ wrapperAttrs: O,
162
+ formControlAttrs0: P,
163
+ formControlAttrs1: R,
164
+ t: E,
165
165
  className: t,
166
- classNames: V,
167
- refInput0: R,
168
- refInput1: T,
166
+ classNames: W,
167
+ refInput0: T,
168
+ refInput1: V,
169
169
  disabled0: y,
170
170
  disabled1: I,
171
171
  mergedDisabled: m,
172
172
  getDisabled: p,
173
- getInputWrapClassName: W,
174
- displayValue0: w,
175
- displayValue1: U,
176
- changeFocusedInput: q,
173
+ getInputWrapClassName: w,
174
+ displayValue0: U,
175
+ displayValue1: q,
176
+ changeFocusedInput: C,
177
177
  onChange: H,
178
178
  onFocus: L,
179
179
  onBlur: M,
180
180
  onPressEnter: K,
181
181
  onClear: G,
182
- feedback: j
182
+ feedback: k
183
183
  };
184
184
  },
185
185
  methods: {
186
186
  focus(a) {
187
- const r = Y(a) ? a : this.focusedIndex, s = r === 0 ? this.refInput0 : this.refInput1;
188
- !Z(r) && !this.getDisabled(r) && s && s.focus && s.focus();
187
+ const r = Y(a) ? a : this.focusedIndex, l = r === 0 ? this.refInput0 : this.refInput1;
188
+ !Z(r) && !this.getDisabled(r) && l && l.focus && l.focus();
189
189
  },
190
190
  blur() {
191
191
  const a = this.focusedIndex === 0 ? this.refInput0 : this.refInput1;
@@ -5,18 +5,18 @@ import _ from "../icon-hover/index.vue.js";
5
5
  import { useFormItem as D, useFormItemControl as T } from "../../../_hooks/use-form-item.js";
6
6
  import { useLocale as w } from "../../../locale/index.js";
7
7
  import { useSize as P } from "../../../_hooks/use-size.js";
8
- import { INPUT_EVENTS as l } from "../../../_utils/constant.js";
9
- import W from "../../../_utils/pick.js";
10
- import { omit as q } from "../../../_utils/omit.js";
11
- import H from "../feedback-icon/index.vue.js";
12
- import { getClassNameMixin as K } from "../../../_utils/config.js";
8
+ import { INPUT_EVENTS as m } from "../../../_utils/constant.js";
9
+ import V from "../../../_utils/pick.js";
10
+ import { omit as W } from "../../../_utils/omit.js";
11
+ import q from "../feedback-icon/index.vue.js";
12
+ import { getClassNameMixin as H } from "../../../_utils/config.js";
13
13
  const re = j({
14
14
  name: "DateInput",
15
15
  inheritAttrs: !1,
16
16
  components: {
17
17
  IconHover: _,
18
18
  IconClose: O,
19
- FeedbackIcon: H
19
+ FeedbackIcon: q
20
20
  },
21
21
  props: {
22
22
  size: {
@@ -59,32 +59,32 @@ const re = j({
59
59
  }
60
60
  },
61
61
  emits: ["clear", "press-enter", "change", "focus", "blur"],
62
- setup(f, { emit: s, slots: u, attrs: i }) {
63
- const { t: c } = w(), { error: p, focused: d, disabled: g, size: v, value: o, format: n, inputValue: t } = x(f), {
62
+ setup(u, { emit: t, slots: f, attrs: s }) {
63
+ const { t: c } = w(), { error: p, focused: d, disabled: v, size: g, value: o, format: n, inputValue: i } = x(u), {
64
64
  formItemCtx: b,
65
65
  mergedSize: h,
66
- mergedDisabled: m,
66
+ mergedDisabled: l,
67
67
  mergedError: I,
68
68
  feedback: y
69
- } = D({ size: v, disabled: g, error: p }), { mergedSize: S } = P(h), C = a(() => q(i, [
70
- ...l,
71
- ...Object.keys(i).filter((e) => e.startsWith("aria-") || e === "role")
69
+ } = D({ size: g, disabled: v, error: p }), { mergedSize: S } = P(h), C = a(() => W(s, [
70
+ ...m,
71
+ ...Object.keys(s).filter((e) => e.startsWith("aria-") || e === "role")
72
72
  ])), z = T(b, () => ({
73
- ...W(i, l),
73
+ ...V(s, m),
74
74
  ...Object.fromEntries(
75
- Object.entries(i).filter(([e]) => e.startsWith("aria-") || e === "role")
75
+ Object.entries(s).filter(([e]) => e.startsWith("aria-") || e === "role")
76
76
  )
77
- })), r = K("picker"), N = a(() => [
77
+ })), r = H("picker"), N = a(() => [
78
78
  r.block,
79
79
  r.modifier(`size-${S.value}`),
80
80
  {
81
81
  [r.modifier("focused")]: d.value,
82
- [r.modifier("disabled")]: m.value,
82
+ [r.modifier("disabled")]: l.value,
83
83
  [r.modifier("error")]: I.value,
84
- [r.modifier("has-prefix")]: u.prefix
84
+ [r.modifier("has-prefix")]: f.prefix
85
85
  }
86
86
  ]), B = a(() => {
87
- if (t != null && t.value) return t == null ? void 0 : t.value;
87
+ if ((i == null ? void 0 : i.value) !== void 0) return i.value;
88
88
  if (o != null && o.value && E(o.value))
89
89
  return k(n.value) ? n.value(o.value) : o.value.format(n.value);
90
90
  }), F = A();
@@ -96,22 +96,22 @@ const re = j({
96
96
  className: r,
97
97
  classNames: N,
98
98
  displayValue: B,
99
- mergedDisabled: m,
99
+ mergedDisabled: l,
100
100
  refInput: F,
101
101
  onPressEnter() {
102
- s("press-enter");
102
+ t("press-enter");
103
103
  },
104
104
  onChange(e) {
105
- s("change", e);
105
+ t("change", e);
106
106
  },
107
107
  onFocus(e) {
108
- s("focus", e);
108
+ t("focus", e);
109
109
  },
110
110
  onClear(e) {
111
- s("clear", e);
111
+ t("clear", e);
112
112
  },
113
113
  onBlur(e) {
114
- s("blur", e);
114
+ t("blur", e);
115
115
  }
116
116
  };
117
117
  },
@@ -1,84 +1,112 @@
1
- import { defineComponent as C, getCurrentInstance as E, inject as M, reactive as R, computed as r, withDirectives as Z, createVNode as d, resolveDirective as $, isVNode as q, Comment as H, Fragment as J, Text as Q } from "vue";
2
- import { getClassNameMixin as U } from "../../_utils/config.js";
3
- import { buttonProps as W } from "./props.js";
4
- import X from "../../icons/animation/animation-loading.js";
5
- import Y from "../../directives/wave.js";
6
- import { buttonGroupInjectionKey as _ } from "./context.js";
7
- import { useSize as G } from "../../_hooks/use-size.js";
8
- const o = (e) => {
9
- if (Array.isArray(e)) return e.some(o);
1
+ import { defineComponent as M, getCurrentInstance as R, inject as U, reactive as Z, computed as c, onBeforeUnmount as q, withDirectives as H, createVNode as u, resolveDirective as J, isVNode as Q, Comment as W, Fragment as X, Text as Y } from "vue";
2
+ import { getClassNameMixin as _ } from "../../_utils/config.js";
3
+ import { buttonProps as G } from "./props.js";
4
+ import ee from "../../icons/animation/animation-loading.js";
5
+ import ie from "../../directives/wave.js";
6
+ import { buttonGroupInjectionKey as ae } from "./context.js";
7
+ import { useSize as te } from "../../_hooks/use-size.js";
8
+ import { resolveButtonAppearance as ne } from "./appearance.js";
9
+ const d = (e) => {
10
+ if (Array.isArray(e)) return e.some(d);
10
11
  if (e == null || typeof e == "boolean") return !1;
11
12
  if (typeof e == "string") return e.trim().length > 0;
12
- if (q(e)) {
13
- if (e.type === H) return !1;
14
- if (e.type === J || e.type === Q)
15
- return o(e.children);
13
+ if (Q(e)) {
14
+ if (e.type === W) return !1;
15
+ if (e.type === X || e.type === Y)
16
+ return d(e.children);
16
17
  }
17
18
  return !0;
18
- }, re = /* @__PURE__ */ C({
19
+ }, se = /* @__PURE__ */ M({
19
20
  name: "Button",
20
- props: W,
21
+ props: G,
21
22
  // 显式导入插槽
22
23
  slots: Object,
23
24
  directives: {
24
- wave: Y
25
+ wave: ie
25
26
  },
26
27
  emits: ["click"],
27
28
  setup(e, {
28
- slots: n,
29
- emit: T
29
+ slots: t,
30
+ emit: F
30
31
  }) {
31
- const v = E(), a = M(_, void 0), {
32
- mergedSize: F
33
- } = G(void 0, {
32
+ const b = R(), a = U(ae, void 0), {
33
+ mergedSize: L
34
+ } = te(void 0, {
34
35
  defaultValue: "medium"
35
- }), u = R({
36
- clicked: !1,
37
- isDebounce: !1
38
- }), i = U("button"), A = (t) => t.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`), f = (t) => {
39
- const c = (v == null ? void 0 : v.vnode.props) ?? {};
40
- return Object.prototype.hasOwnProperty.call(c, t) || Object.prototype.hasOwnProperty.call(c, A(t));
41
- }, s = r(() => f("type") ? e.type : (a == null ? void 0 : a.type) ?? e.type), w = r(() => f("size") ? e.size : (a == null ? void 0 : a.size) ?? F.value), D = r(() => f("status") ? e.status : (a == null ? void 0 : a.status) ?? e.status), y = r(() => f("shape") ? e.shape : (a == null ? void 0 : a.shape) ?? e.shape), m = r(() => f("disabled") ? e.disabled : (a == null ? void 0 : a.disabled) ?? e.disabled), L = r(() => [i.block, s.value && s.value !== "default" && i.modifier(s.value), w.value && i.modifier(w.value), D.value && i.modifier(D.value), m.value && i.is("disabled"), e.block && i.modifier("block"), e.plain && i.modifier("plain"), y.value && i.modifier(y.value), e.link && i.modifier("link"), !e.border && i.modifier("hide-border"), l.value && i.modifier("loading"), e.narrow && i.modifier("narrow")]), N = () => {
42
- e.debounce > 0 && !u.isDebounce && (u.isDebounce = !0, setTimeout(() => {
43
- u.isDebounce = !1;
36
+ }), o = Z({
37
+ isDebounce: !1,
38
+ nativeActivation: !1
39
+ }), i = _("button"), N = (n) => n.replace(/[A-Z]/g, (r) => `-${r.toLowerCase()}`), f = (n) => {
40
+ const r = (b == null ? void 0 : b.vnode.props) ?? {};
41
+ return Object.prototype.hasOwnProperty.call(r, n) || Object.prototype.hasOwnProperty.call(r, N(n));
42
+ }, m = c(() => f("type") ? e.type : (a == null ? void 0 : a.type) ?? e.type), S = c(() => f("size") ? e.size : (a == null ? void 0 : a.size) ?? L.value), y = c(() => f("status") ? e.status : (a == null ? void 0 : a.status) ?? e.status), h = c(() => f("shape") ? e.shape : (a == null ? void 0 : a.shape) ?? e.shape), s = c(() => f("disabled") ? e.disabled : (a == null ? void 0 : a.disabled) ?? e.disabled), v = c(() => ne(m.value, y.value, e.plain)), V = c(() => [
43
+ i.block,
44
+ m.value && m.value !== "default" && i.modifier(m.value),
45
+ S.value && i.modifier(S.value),
46
+ // Keep legacy semantic classes, but use separate namespaces for style decisions.
47
+ y.value !== "primary" && i.modifier(y.value),
48
+ i.modifier(`appearance-${v.value.appearance}`),
49
+ i.modifier(`color-${v.value.color}`),
50
+ s.value && i.is("disabled"),
51
+ e.block && i.modifier("block"),
52
+ e.plain && i.modifier("plain"),
53
+ h.value && i.modifier(h.value),
54
+ e.border && ["default", "solid", "outline", "dashed"].includes(v.value.appearance) && i.modifier("has-border"),
55
+ !e.border && i.modifier("hide-border"),
56
+ l.value && i.modifier("loading"),
57
+ e.narrow && i.modifier("narrow")
58
+ ]);
59
+ let k, p;
60
+ q(() => {
61
+ clearTimeout(k), clearTimeout(p);
62
+ });
63
+ const $ = () => {
64
+ e.debounce > 0 && !o.isDebounce && (o.isDebounce = !0, k = setTimeout(() => {
65
+ o.isDebounce = !1;
44
66
  }, e.debounce));
45
- }, l = r(() => e.loading || u.clicked || u.isDebounce), V = r(() => m.value || l.value || e.link || s.value === "text"), B = (t) => {
46
- var c;
47
- t.detail > 0 && ((c = t.currentTarget) == null || c.blur()), !(m.value || l.value) && (N(), T("click", t));
67
+ }, l = c(() => e.loading || o.isDebounce), K = c(() => s.value || l.value || v.value.appearance === "text"), C = (n) => {
68
+ var r;
69
+ if (n.detail > 0 && ((r = n.currentTarget) == null || r.blur()), s.value || l.value) {
70
+ n.preventDefault();
71
+ return;
72
+ }
73
+ e.htmlType !== "button" && (o.nativeActivation = !0, clearTimeout(p), p = setTimeout(() => {
74
+ o.nativeActivation = !1;
75
+ }, 0)), $(), F("click", n);
48
76
  };
49
77
  return () => {
50
- var P, j, I, O;
51
- const t = (P = n.default) == null ? void 0 : P.call(n), c = (j = n.prefix) == null ? void 0 : j.call(n), S = (I = n.icon) == null ? void 0 : I.call(n), x = (O = n.suffix) == null ? void 0 : O.call(n), b = o(t), g = o(c), h = o(S), p = o(x), z = !b && !g && h && !p, k = e.loadingFill || l.value && (y.value === "circle" || z), K = l.value && !k && (b || g || h || p);
52
- return Z(d("button", {
53
- class: [L.value, !b && i.modifier("empty-content"), z && i.modifier("only-icon"), k && i.modifier("loading-fill")],
78
+ var j, I, O, B;
79
+ const n = (j = t.default) == null ? void 0 : j.call(t), r = (I = t.prefix) == null ? void 0 : I.call(t), x = (O = t.icon) == null ? void 0 : O.call(t), z = (B = t.suffix) == null ? void 0 : B.call(t), g = d(n), w = d(r), T = d(x), D = d(z), P = !g && !w && T && !D, A = e.loadingFill || l.value && (h.value === "circle" || P), E = l.value && !A && (g || w || T || D);
80
+ return H(u("button", {
81
+ class: [V.value, !g && i.modifier("empty-content"), P && i.modifier("only-icon"), A && i.modifier("loading-fill")],
54
82
  type: e.htmlType,
55
- disabled: m.value || l.value,
83
+ disabled: s.value || l.value && !o.nativeActivation,
56
84
  "aria-busy": l.value || void 0,
57
- onClick: B
58
- }, [d("span", {
85
+ onClick: C
86
+ }, [u("span", {
59
87
  class: i.element("loading"),
60
88
  "aria-hidden": "true",
61
89
  style: {
62
90
  display: "flex",
63
91
  opacity: l.value ? 1 : 0,
64
- width: k ? void 0 : l.value ? "1em" : 0,
65
- marginRight: K ? "4px" : "0",
92
+ width: A ? void 0 : l.value ? "1em" : 0,
93
+ marginRight: E ? "4px" : "0",
66
94
  overflow: "hidden"
67
95
  }
68
- }, [l.value && d(X, null, null)]), g && d("span", {
96
+ }, [l.value && u(ee, null, null)]), w && u("span", {
69
97
  class: i.element("prefix")
70
- }, [c]), h && d("span", {
98
+ }, [r]), T && u("span", {
71
99
  class: i.element("prefix")
72
- }, [S]), d("span", {
100
+ }, [x]), u("span", {
73
101
  class: i.element("content")
74
- }, [t]), p && d("span", {
102
+ }, [n]), D && u("span", {
75
103
  class: i.element("suffix")
76
- }, [x])]), [[$("wave"), {
77
- disabled: V.value
104
+ }, [z])]), [[J("wave"), {
105
+ disabled: K.value
78
106
  }]]);
79
107
  };
80
108
  }
81
109
  });
82
110
  export {
83
- re as default
111
+ se as default
84
112
  };
@@ -0,0 +1,7 @@
1
+ function c(r, e, o) {
2
+ const a = r === "primary" && e === "default" ? "primary" : e, n = r === "primary" ? "solid" : r;
3
+ return o && ["default", "solid"].includes(n) ? { appearance: "subtle", color: a } : { appearance: n, color: a };
4
+ }
5
+ export {
6
+ c as resolveButtonAppearance
7
+ };
@@ -21,10 +21,6 @@ const e = {
21
21
  type: String,
22
22
  default: void 0
23
23
  },
24
- link: {
25
- type: Boolean,
26
- default: !1
27
- },
28
24
  type: {
29
25
  type: String,
30
26
  default: "default"