x-next 1.3.1 → 1.4.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 (159) hide show
  1. package/AI_USAGE.md +2 -2
  2. package/CHANGELOG.md +36 -0
  3. package/dist/_utils/constant.d.ts +1 -1
  4. package/dist/_utils/palette.d.ts +6 -14
  5. package/dist/components/alert/Alert.vue.d.ts +9 -9
  6. package/dist/components/alert/index.d.ts +6 -6
  7. package/dist/components/button/ButtonGroup.vue.d.ts +22 -18
  8. package/dist/components/date-picker/DatePanel.vue.d.ts +342 -1
  9. package/dist/components/date-picker/DatePicker.vue.d.ts +343 -2
  10. package/dist/components/date-picker/index.d.ts +1765 -1083
  11. package/dist/components/form-input-tag/index.d.ts +26 -25
  12. package/dist/components/form-input-tag/interface.d.ts +8 -0
  13. package/dist/components/link/Link.vue.d.ts +4 -4
  14. package/dist/components/link/index.d.ts +6 -6
  15. package/dist/components/message/index.d.ts +3 -3
  16. package/dist/components/message/message.vue.d.ts +1 -1
  17. package/dist/components/notification/Notification.d.ts +1 -1
  18. package/dist/components/notification/index.d.ts +3 -3
  19. package/dist/components/popconfirm/src/types.d.ts +1 -1
  20. package/dist/components/progress/Progress.vue.d.ts +3 -3
  21. package/dist/components/progress/index.d.ts +3 -3
  22. package/dist/components/tag/Tag.vue.d.ts +14 -0
  23. package/dist/components/tag/index.d.ts +9 -0
  24. package/dist/components/tag/interface.d.ts +5 -0
  25. package/dist/components/trend-chart/components/TrendChart.d.ts +127 -17
  26. package/dist/components/trend-chart/components/trend-chart-curve.d.ts +27 -7
  27. package/dist/components/trend-chart/components/trend-chart-labels.d.ts +4 -0
  28. package/dist/components/trend-chart/helpers/getPadding.d.ts +3 -2
  29. package/dist/components/trend-chart/index.d.ts +223 -28
  30. package/dist/components/trend-chart/props.d.ts +63 -5
  31. package/dist/es/_styles/palette-aliases.js +182 -127
  32. package/dist/es/_utils/palette.js +49 -43
  33. package/dist/es/components/_components/picker/input-range.vue2.js +10 -10
  34. package/dist/es/components/_components/picker/input.vue2.js +20 -20
  35. package/dist/es/components/_components/select-view/select-view.js +2 -2
  36. package/dist/es/components/alert/Alert.vue.js +2 -2
  37. package/dist/es/components/alert/Alert.vue2.js +21 -20
  38. package/dist/es/components/button/Button.js +17 -17
  39. package/dist/es/components/button/ButtonGroup.vue2.js +11 -9
  40. package/dist/es/components/date-picker/DatePanel.vue.js +71 -62
  41. package/dist/es/components/date-picker/DatePanel.vue2.js +50 -40
  42. package/dist/es/components/date-picker/DatePicker.vue2.js +1 -1
  43. package/dist/es/components/form/form-item-label.vue.js +25 -22
  44. package/dist/es/components/form/form-item-label.vue2.js +1 -1
  45. package/dist/es/components/form-checkbox/icon-check.js +12 -43
  46. package/dist/es/components/form-input/InputPassword.vue2.js +2 -2
  47. package/dist/es/components/form-input/InputSearch.js +1 -1
  48. package/dist/es/components/form-input-number/InputNumber.js +4 -4
  49. package/dist/es/components/form-input-tag/InputTag.js +168 -147
  50. package/dist/es/components/form-input-tag/utils.js +21 -19
  51. package/dist/es/components/form-textarea/Textarea.vue2.js +1 -1
  52. package/dist/es/components/link/Link.vue2.js +1 -1
  53. package/dist/es/components/popconfirm/src/popup.vue.js +1 -1
  54. package/dist/es/components/progress/Progress.vue2.js +1 -1
  55. package/dist/es/components/table/Table.js +1 -1
  56. package/dist/es/components/table/table-th.js +2 -2
  57. package/dist/es/components/tabs/tabs-button.js +2 -2
  58. package/dist/es/components/tabs/tabs-nav.js +1 -1
  59. package/dist/es/components/tag/Tag.vue.js +20 -20
  60. package/dist/es/components/tag/Tag.vue2.js +35 -28
  61. package/dist/es/components/time-picker/TimePanel.vue.js +30 -29
  62. package/dist/es/components/time-picker/TimePicker.vue2.js +1 -1
  63. package/dist/es/components/time-picker/TimeRangePanel.js +26 -23
  64. package/dist/es/components/trend-chart/components/TrendChart.js +208 -142
  65. package/dist/es/components/trend-chart/components/trend-chart-curve.js +124 -59
  66. package/dist/es/components/trend-chart/components/trend-chart-labels.js +43 -41
  67. package/dist/es/components/trend-chart/helpers/getPadding.js +3 -3
  68. package/dist/es/components/trend-chart/props.js +101 -33
  69. package/dist/es/components/trend-chart/themes.js +15 -15
  70. package/dist/es/components/watermark/controller.js +40 -40
  71. package/dist/es/icons/default/calendar.js +15 -0
  72. package/dist/es/icons/default/clock-circle.js +15 -0
  73. package/dist/es/icons/default/double-left.js +15 -0
  74. package/dist/es/icons/default/double-right.js +15 -0
  75. package/dist/es/icons/default/down.js +16 -0
  76. package/dist/es/icons/default/eye-invisible.js +20 -0
  77. package/dist/es/icons/default/eye.js +18 -0
  78. package/dist/es/icons/default/left.js +15 -0
  79. package/dist/es/icons/default/minus.js +16 -0
  80. package/dist/es/icons/default/plus.js +16 -0
  81. package/dist/es/icons/default/question-circle.js +18 -0
  82. package/dist/es/icons/default/right.js +15 -0
  83. package/dist/es/icons/default/search.js +16 -0
  84. package/dist/es/icons/default/up.js +16 -0
  85. package/dist/es/icons/icon.js +26 -25
  86. package/dist/es/icons/public/boxicons/basic.js +1893 -0
  87. package/dist/es/icons/public/boxicons/brands.js +304 -0
  88. package/dist/es/icons/public/boxicons/filled.js +1893 -0
  89. package/dist/es/icons/public/boxicons/index.js +24 -0
  90. package/dist/es/icons/public/boxicons/names.js +4082 -0
  91. package/dist/es/icons/registry.js +15 -15
  92. package/dist/es/style.css +1 -1
  93. package/dist/icons/default/calendar.d.ts +93 -0
  94. package/dist/icons/default/clock-circle.d.ts +93 -0
  95. package/dist/icons/{_self/down.d.ts → default/double-left.d.ts} +6 -0
  96. package/dist/icons/{_self/eye-invisible.d.ts → default/double-right.d.ts} +6 -0
  97. package/dist/icons/default/down.d.ts +93 -0
  98. package/dist/icons/default/eye-invisible.d.ts +93 -0
  99. package/dist/icons/default/eye.d.ts +93 -0
  100. package/dist/icons/{_self/eye.d.ts → default/left.d.ts} +7 -0
  101. package/dist/icons/default/minus.d.ts +93 -0
  102. package/dist/icons/{_self → default}/plus.d.ts +7 -0
  103. package/dist/icons/default/question-circle.d.ts +93 -0
  104. package/dist/icons/{_self/minus.d.ts → default/right.d.ts} +7 -0
  105. package/dist/icons/{_self → default}/search.d.ts +7 -0
  106. package/dist/icons/{_self → default}/up.d.ts +7 -0
  107. package/dist/icons/public/boxicons/basic.cjs +1 -0
  108. package/dist/icons/public/boxicons/basic.d.ts +2 -0
  109. package/dist/icons/public/boxicons/brands.cjs +1 -0
  110. package/dist/icons/public/boxicons/brands.d.ts +2 -0
  111. package/dist/icons/public/boxicons/filled.cjs +1 -0
  112. package/dist/icons/public/boxicons/filled.d.ts +2 -0
  113. package/dist/icons/public/boxicons/index.cjs +1 -0
  114. package/dist/icons/public/boxicons/index.d.ts +10 -0
  115. package/dist/icons/public/boxicons/names.d.ts +10 -0
  116. package/dist/icons/registry.d.ts +5 -0
  117. package/dist/index.cjs +4 -4
  118. package/dist/index.umd.js +4 -4
  119. package/dist/style/alert.css +1 -1
  120. package/dist/style/base.css +1 -1
  121. package/dist/style/button.css +1 -1
  122. package/dist/style/date-picker.css +1 -1
  123. package/dist/style/dialog.css +1 -1
  124. package/dist/style/drawer.css +1 -1
  125. package/dist/style/dropdown.css +1 -1
  126. package/dist/style/form-input-number.css +1 -1
  127. package/dist/style/form-input-tag.css +1 -1
  128. package/dist/style/form-input.css +1 -1
  129. package/dist/style/form-radio.css +1 -1
  130. package/dist/style/form-select.css +1 -1
  131. package/dist/style/form-textarea.css +1 -1
  132. package/dist/style/form.css +1 -1
  133. package/dist/style/link.css +1 -1
  134. package/dist/style/menu.css +1 -1
  135. package/dist/style/message-box.css +1 -1
  136. package/dist/style/network.css +1 -1
  137. package/dist/style/popconfirm.css +1 -1
  138. package/dist/style/popover.css +1 -1
  139. package/dist/style/popup.css +1 -1
  140. package/dist/style/progress.css +1 -1
  141. package/dist/style/rate.css +1 -1
  142. package/dist/style/spin.css +1 -1
  143. package/dist/style/steps.css +1 -1
  144. package/dist/style/table.css +1 -1
  145. package/dist/style/tag.css +1 -1
  146. package/dist/style/time-picker.css +1 -1
  147. package/dist/style/time-range-selector.css +1 -1
  148. package/dist/style.css +1 -1
  149. package/package.json +30 -4
  150. package/dist/es/icons/_self/down.js +0 -16
  151. package/dist/es/icons/_self/eye-invisible.js +0 -13
  152. package/dist/es/icons/_self/eye.js +0 -13
  153. package/dist/es/icons/_self/minus.js +0 -13
  154. package/dist/es/icons/_self/plus.js +0 -12
  155. package/dist/es/icons/_self/question-message.js +0 -12
  156. package/dist/es/icons/_self/search.js +0 -13
  157. package/dist/es/icons/_self/up.js +0 -16
  158. package/dist/es/icons/_ui/calendar.js +0 -13
  159. package/dist/es/icons/_ui/time.js +0 -12
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as j, toRefs as x, computed as a, ref as A } from "vue";
2
2
  import { isDayjs as E, isFunction as k } from "../../../_utils/is.js";
3
- import O from "../../../icons/default/close-circle-fill.js";
3
+ import O from "../../../icons/default/close.js";
4
4
  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 m } from "../../../_utils/constant.js";
8
+ import { INPUT_EVENTS as l } from "../../../_utils/constant.js";
9
9
  import W from "../../../_utils/pick.js";
10
10
  import { omit as q } from "../../../_utils/omit.js";
11
11
  import H from "../feedback-icon/index.vue.js";
@@ -59,45 +59,45 @@ const re = j({
59
59
  }
60
60
  },
61
61
  emits: ["clear", "press-enter", "change", "focus", "blur"],
62
- setup(f, { emit: s, slots: c, attrs: i }) {
63
- const { t: u } = w(), { error: p, focused: d, disabled: g, size: v, value: o, format: n, inputValue: t } = x(f), {
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), {
64
64
  formItemCtx: b,
65
65
  mergedSize: h,
66
- mergedDisabled: l,
66
+ mergedDisabled: m,
67
67
  mergedError: I,
68
68
  feedback: y
69
- } = D({ size: v, disabled: g, error: p }), { mergedSize: C } = P(h), S = a(() => q(i, [
70
- ...m,
69
+ } = D({ size: v, disabled: g, error: p }), { mergedSize: S } = P(h), C = a(() => q(i, [
70
+ ...l,
71
71
  ...Object.keys(i).filter((e) => e.startsWith("aria-") || e === "role")
72
72
  ])), z = T(b, () => ({
73
- ...W(i, m),
73
+ ...W(i, l),
74
74
  ...Object.fromEntries(
75
75
  Object.entries(i).filter(([e]) => e.startsWith("aria-") || e === "role")
76
76
  )
77
- })), r = K("picker"), F = a(() => [
77
+ })), r = K("picker"), N = a(() => [
78
78
  r.block,
79
- r.modifier(`size-${C.value}`),
79
+ r.modifier(`size-${S.value}`),
80
80
  {
81
81
  [r.modifier("focused")]: d.value,
82
- [r.modifier("disabled")]: l.value,
82
+ [r.modifier("disabled")]: m.value,
83
83
  [r.modifier("error")]: I.value,
84
- [r.modifier("has-prefix")]: c.prefix
84
+ [r.modifier("has-prefix")]: u.prefix
85
85
  }
86
- ]), N = a(() => {
86
+ ]), B = a(() => {
87
87
  if (t != null && t.value) return t == null ? void 0 : t.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
- }), B = A();
90
+ }), F = A();
91
91
  return {
92
- wrapperAttrs: S,
92
+ wrapperAttrs: C,
93
93
  formControlAttrs: z,
94
- t: u,
94
+ t: c,
95
95
  feedback: y,
96
96
  className: r,
97
- classNames: F,
98
- displayValue: N,
99
- mergedDisabled: l,
100
- refInput: B,
97
+ classNames: N,
98
+ displayValue: B,
99
+ mergedDisabled: m,
100
+ refInput: F,
101
101
  onPressEnter() {
102
102
  s("press-enter");
103
103
  },
@@ -4,10 +4,10 @@ import q from "../feedback-icon/index.vue.js";
4
4
  import O from "../input-label/input-label.js";
5
5
  import { InputTag as _ } from "../../form-input-tag/index.js";
6
6
  import $ from "../icon-hover/index.vue.js";
7
- import G from "../../../icons/_self/down.js";
7
+ import G from "../../../icons/default/down.js";
8
8
  import J from "../../../icons/animation/animation-loading.js";
9
9
  import Q from "../../../icons/default/close.js";
10
- import U from "../../../icons/_self/search.js";
10
+ import U from "../../../icons/default/search.js";
11
11
  import { useFormItem as W, useFormItemControl as X } from "../../../_hooks/use-form-item.js";
12
12
  import { useLocale as Y } from "../../../locale/index.js";
13
13
  import { useSize as Z } from "../../../_hooks/use-size.js";
@@ -2,7 +2,7 @@ import h from "./Alert.vue2.js";
2
2
  import { resolveComponent as l, openBlock as o, createBlock as t, Transition as N, withCtx as c, createElementBlock as i, mergeProps as L, normalizeClass as n, renderSlot as a, createCommentVNode as s, createElementVNode as m, createTextVNode as C, toDisplayString as b, createVNode as f } from "vue";
3
3
  import B from "../../_virtual/_plugin-vue_export-helper.js";
4
4
  function A(e, r, V, g, w, S) {
5
- const d = l("icon-info-circle-fill"), p = l("icon-check-circle-fill"), y = l("icon-exclamation-circle-fill"), u = l("icon-close-circle-fill"), v = l("icon-close"), k = l("icon-hover");
5
+ const p = l("icon-info-circle-fill"), d = l("icon-check-circle-fill"), y = l("icon-exclamation-circle-fill"), u = l("icon-close-circle-fill"), v = l("icon-close"), k = l("icon-hover");
6
6
  return o(), t(N, {
7
7
  name: "x-alert-slide",
8
8
  onBeforeLeave: e.handleBeforeLeave,
@@ -20,7 +20,7 @@ function A(e, r, V, g, w, S) {
20
20
  class: n(e.className.element("icon"))
21
21
  }, [
22
22
  a(e.$slots, "icon", {}, () => [
23
- e.type === "info" ? (o(), t(d, { key: 0 })) : e.type === "success" ? (o(), t(p, { key: 1 })) : e.type === "warning" ? (o(), t(y, { key: 2 })) : e.type === "error" ? (o(), t(u, { key: 3 })) : s("", !0)
23
+ e.type === "info" ? (o(), t(p, { key: 0 })) : e.type === "success" ? (o(), t(d, { key: 1 })) : e.type === "warning" || e.type === "strong" ? (o(), t(y, { key: 2 })) : e.type === "error" ? (o(), t(u, { key: 3 })) : s("", !0)
24
24
  ])
25
25
  ], 2)) : s("", !0),
26
26
  m("div", {
@@ -2,8 +2,8 @@ import { defineComponent as v, ref as h, computed as i } from "vue";
2
2
  import { MESSAGE_TYPES as I } from "../../_utils/constant.js";
3
3
  import B from "../_components/icon-hover/index.vue.js";
4
4
  import F from "../../icons/default/close.js";
5
- import x from "../../icons/default/info-circle-fill.js";
6
- import g from "../../icons/default/check-circle-fill.js";
5
+ import g from "../../icons/default/info-circle-fill.js";
6
+ import x from "../../icons/default/check-circle-fill.js";
7
7
  import S from "../../icons/default/exclamation-circle-fill.js";
8
8
  import A from "../../icons/default/close-circle-fill.js";
9
9
  import { getClassNameMixin as E } from "../../_utils/config.js";
@@ -13,21 +13,22 @@ const G = v({
13
13
  components: {
14
14
  IconHover: B,
15
15
  IconClose: F,
16
- IconInfoCircleFill: x,
17
- IconCheckCircleFill: g,
16
+ IconInfoCircleFill: g,
17
+ IconCheckCircleFill: x,
18
18
  IconExclamationCircleFill: S,
19
19
  IconCloseCircleFill: A
20
20
  },
21
21
  props: {
22
22
  /**
23
- * @zh 警告提示的类型。2.41.0 新增 `normal` 类型
24
- * @en Type of the alert. 2.41.0 Added `normal` type
25
- * @values info, success, warning, error, normal
23
+ * @zh 警告提示的类型
24
+ * @en Type of the alert
25
+ * @values info, success, warning, strong, error, normal
26
26
  */
27
27
  type: {
28
+ // strong 是 x-next 扩展的品牌强调族,与 Message 的 strong 保持一致
28
29
  type: String,
29
30
  default: "info",
30
- validator: (e) => [...I, "normal"].includes(e)
31
+ validator: (e) => [...I, "normal", "strong"].includes(e)
31
32
  },
32
33
  /**
33
34
  * @zh 是否展示图标
@@ -122,31 +123,31 @@ const G = v({
122
123
  * @version 2.36.0
123
124
  */
124
125
  setup(e, { attrs: n, slots: r, emit: s }) {
125
- const t = E("alert"), a = h(e.defaultVisible), c = i(() => e.visible ?? a.value), f = (o) => {
126
+ const l = E("alert"), a = h(e.defaultVisible), c = i(() => e.visible ?? a.value), f = (o) => {
126
127
  a.value = !1, s("update:visible", !1), s("close", o);
127
128
  }, m = (o) => {
128
- const l = o;
129
- l.style.maxHeight = `${l.offsetHeight}px`, l.style.opacity = "1";
129
+ const t = o;
130
+ t.style.maxHeight = `${t.offsetHeight}px`, t.style.opacity = "1";
130
131
  }, d = (o) => {
131
- const l = o;
132
- l.style.maxHeight = "0", l.style.opacity = "0";
132
+ const t = o;
133
+ t.style.maxHeight = "0", t.style.opacity = "0";
133
134
  }, u = () => {
134
135
  s("afterClose");
135
136
  }, p = i(() => [
136
- t.block,
137
- t.modifier(e.type),
137
+ l.block,
138
+ l.modifier(e.type),
138
139
  n.class,
139
140
  {
140
- [t.modifier("with-title")]: !!(e.title || r.title),
141
- [t.modifier("banner")]: e.banner,
142
- [t.modifier("center")]: e.center
141
+ [l.modifier("with-title")]: !!(e.title || r.title),
142
+ [l.modifier("banner")]: e.banner,
143
+ [l.modifier("center")]: e.center
143
144
  }
144
145
  ]), y = i(() => n.style), C = i(() => {
145
- const { class: o, style: l, ...b } = n;
146
+ const { class: o, style: t, ...b } = n;
146
147
  return b;
147
148
  });
148
149
  return {
149
- className: t,
150
+ className: l,
150
151
  cls: p,
151
152
  rootAttrs: C,
152
153
  rootStyle: y,
@@ -1,5 +1,5 @@
1
- import { defineComponent as O, getCurrentInstance as P, inject as p, reactive as x, computed as c, withDirectives as F, createVNode as o, resolveDirective as L } from "vue";
2
- import { getClassNameMixin as T } from "../../_utils/config.js";
1
+ import { defineComponent as O, getCurrentInstance as P, inject as p, reactive as x, computed as c, withDirectives as T, createVNode as o, resolveDirective as F } from "vue";
2
+ import { getClassNameMixin as L } from "../../_utils/config.js";
3
3
  import { buttonProps as A } from "./props.js";
4
4
  import B from "../../icons/animation/animation-loading.js";
5
5
  import I from "../../directives/wave.js";
@@ -18,30 +18,30 @@ const q = /* @__PURE__ */ O({
18
18
  slots: l,
19
19
  emit: h
20
20
  }) {
21
- const v = P(), a = p(K, void 0), {
21
+ const f = P(), a = p(K, void 0), {
22
22
  mergedSize: k
23
23
  } = N(void 0, {
24
24
  defaultValue: "medium"
25
- }), u = x({
25
+ }), r = x({
26
26
  clicked: !1,
27
27
  isDebounce: !1
28
- }), i = T("button"), w = (n) => n.replace(/[A-Z]/g, (d) => `-${d.toLowerCase()}`), r = (n) => {
29
- const d = (v == null ? void 0 : v.vnode.props) ?? {};
28
+ }), i = L("button"), w = (n) => n.replace(/[A-Z]/g, (d) => `-${d.toLowerCase()}`), u = (n) => {
29
+ const d = (f == null ? void 0 : f.vnode.props) ?? {};
30
30
  return Object.prototype.hasOwnProperty.call(d, n) || Object.prototype.hasOwnProperty.call(d, w(n));
31
- }, m = c(() => r("type") ? e.type : (a == null ? void 0 : a.type) ?? e.type), b = c(() => r("size") ? e.size : (a == null ? void 0 : a.size) ?? k.value), g = c(() => r("status") ? e.status : (a == null ? void 0 : a.status) ?? e.status), y = c(() => r("shape") ? e.shape : (a == null ? void 0 : a.shape) ?? e.shape), f = c(() => r("disabled") ? e.disabled : (a == null ? void 0 : a.disabled) ?? e.disabled), D = c(() => [i.block, m.value && m.value !== "default" && i.modifier(m.value), b.value && i.modifier(b.value), g.value && i.modifier(g.value), f.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"), t.value && i.modifier("loading"), e.loadingFill && i.modifier("loading-fill"), e.narrow && i.modifier("narrow")]), z = () => {
32
- e.debounce > 0 && !u.isDebounce && (u.isDebounce = !0, setTimeout(() => {
33
- u.isDebounce = !1;
31
+ }, s = c(() => u("type") ? e.type : (a == null ? void 0 : a.type) ?? e.type), v = c(() => u("size") ? e.size : (a == null ? void 0 : a.size) ?? k.value), b = c(() => u("status") ? e.status : (a == null ? void 0 : a.status) ?? e.status), g = c(() => u("shape") ? e.shape : (a == null ? void 0 : a.shape) ?? e.shape), m = c(() => u("disabled") ? e.disabled : (a == null ? void 0 : a.disabled) ?? e.disabled), D = c(() => [i.block, s.value && s.value !== "default" && i.modifier(s.value), v.value && i.modifier(v.value), b.value && i.modifier(b.value), m.value && i.is("disabled"), e.block && i.modifier("block"), e.plain && i.modifier("plain"), g.value && i.modifier(g.value), e.link && i.modifier("link"), !e.border && i.modifier("hide-border"), t.value && i.modifier("loading"), e.loadingFill && i.modifier("loading-fill"), e.narrow && i.modifier("narrow")]), z = () => {
32
+ e.debounce > 0 && !r.isDebounce && (r.isDebounce = !0, setTimeout(() => {
33
+ r.isDebounce = !1;
34
34
  }, e.debounce));
35
- }, t = c(() => e.loading || u.clicked || u.isDebounce), S = c(() => f.value || t.value || e.link || m.value === "text"), j = (n) => {
36
- var d, s;
37
- (s = (d = n.target).blur) == null || s.call(d), !(f.value || t.value) && (z(), h("click", n));
35
+ }, t = c(() => e.loading || r.clicked || r.isDebounce), S = c(() => m.value || t.value || e.link || s.value === "text"), j = (n) => {
36
+ var d;
37
+ n.detail > 0 && ((d = n.currentTarget) == null || d.blur()), !(m.value || t.value) && (z(), h("click", n));
38
38
  };
39
39
  return () => {
40
- var n, d, s;
41
- return F(o("button", {
40
+ var n, d, y;
41
+ return T(o("button", {
42
42
  class: D.value,
43
43
  type: e.htmlType,
44
- disabled: f.value || t.value,
44
+ disabled: m.value || t.value,
45
45
  "aria-busy": t.value || void 0,
46
46
  onClick: j
47
47
  }, [o("span", {
@@ -60,9 +60,9 @@ const q = /* @__PURE__ */ O({
60
60
  class: i.element("prefix")
61
61
  }, [(d = l.icon) == null ? void 0 : d.call(l)]), o("span", {
62
62
  class: i.element("content")
63
- }, [(s = l.default) == null ? void 0 : s.call(l)]), l.suffix && o("span", {
63
+ }, [(y = l.default) == null ? void 0 : y.call(l)]), l.suffix && o("span", {
64
64
  class: i.element("suffix")
65
- }, [l.suffix()])]), [[L("wave"), {
65
+ }, [l.suffix()])]), [[F("wave"), {
66
66
  disabled: S.value
67
67
  }]]);
68
68
  };
@@ -5,31 +5,33 @@ const l = i({
5
5
  name: "ButtonGroup",
6
6
  props: {
7
7
  /**
8
- * @zh 按钮的类型,分为五种:次要按钮、主要按钮、虚框按钮、线性按钮、文字按钮。
9
- * @en Children button types are divided into five types: secondary, primary, dashed, outline and text.
8
+ * @zh 子按钮默认类型:默认、主要、虚框、线性、文字
9
+ * @en Children button type: default, primary, dashed, outline and text
10
+ * @values 'default','primary','dashed','outline','text'
10
11
  */
11
12
  type: {
12
13
  type: String
13
14
  },
14
15
  /**
15
- * @zh 按钮的状态
16
- * @en Children button state
17
- * @values 'normal','warning','success','danger'
16
+ * @zh 子按钮默认状态
17
+ * @en Children button status
18
+ * @values 'default','success','warning','strong','danger','info'
18
19
  */
19
20
  status: {
20
21
  type: String
21
22
  },
22
23
  /**
23
- * @zh 按钮的形状
24
- * @en Button shape
24
+ * @zh 子按钮默认形状
25
+ * @en Children button shape
26
+ * @values 'round','circle','square'
25
27
  */
26
28
  shape: {
27
29
  type: String
28
30
  },
29
31
  /**
30
- * @zh 按钮的尺寸
32
+ * @zh 子按钮默认尺寸
31
33
  * @en Children button size
32
- * @values 'mini','small','medium','large'
34
+ * @values 'mini','small','medium','large','huge'
33
35
  */
34
36
  size: {
35
37
  type: String
@@ -1,71 +1,80 @@
1
- import p from "./DatePanel.vue2.js";
2
- import { openBlock as s, createElementBlock as n, withKeys as w, normalizeClass as l, createElementVNode as m, createCommentVNode as r, toDisplayString as i, Fragment as u, renderList as b, renderSlot as N, createTextVNode as v } from "vue";
3
- import $ from "../../_virtual/_plugin-vue_export-helper.js";
4
- const g = ["aria-label"], C = ["aria-label"], f = ["aria-label"], P = ["aria-label"], h = { key: 0 }, L = ["title", "aria-label", "role", "tabindex", "disabled", "aria-selected", "onMouseenter", "onFocus", "onKeydown", "onClick"], S = ["onClick"];
5
- function E(e, t, M, T, R, K) {
1
+ import C from "./DatePanel.vue2.js";
2
+ import { resolveComponent as u, openBlock as s, createElementBlock as n, withKeys as h, normalizeClass as o, createElementVNode as d, createVNode as b, createCommentVNode as r, toDisplayString as i, Fragment as k, renderList as p, renderSlot as v, createTextVNode as P } from "vue";
3
+ import L from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const I = ["aria-label"], R = ["aria-label"], S = ["aria-label"], E = ["aria-label"], D = { key: 0 }, M = ["title", "aria-label", "role", "tabindex", "disabled", "aria-selected", "onMouseenter", "onFocus", "onKeydown", "onClick"], T = ["onClick"];
5
+ function V(e, t, K, B, W, z) {
6
+ const w = u("IconDoubleLeft"), g = u("IconLeft"), $ = u("IconRight"), f = u("IconDoubleRight");
6
7
  return s(), n("div", {
7
8
  ref: "panelRef",
8
- class: l([
9
+ class: o([
9
10
  e.className.element("panel"),
10
11
  e.className.modifier(`mode-${e.mode}`),
11
12
  { [e.className.is("show-lunar")]: e.showLunar && e.mode === "date" }
12
13
  ]),
13
- onKeydown: t[8] || (t[8] = w((o) => e.$emit("cancel"), ["esc"]))
14
+ onKeydown: t[8] || (t[8] = h((l) => e.$emit("cancel"), ["esc"]))
14
15
  }, [
15
- m("div", {
16
- class: l([e.className.element("header"), e.className.element(`header-${e.panelPosition}`)])
16
+ d("div", {
17
+ class: o([e.className.element("header"), e.className.element(`header-${e.panelPosition}`)])
17
18
  }, [
18
19
  e.panelPosition !== "right" ? (s(), n("button", {
19
20
  key: 0,
20
21
  type: "button",
21
- class: l(e.className.element("header-btn")),
22
+ class: o(e.className.element("header-btn")),
22
23
  "aria-label": e.t("datePicker.prevPage"),
23
- onClick: t[0] || (t[0] = (o) => e.movePanel(-1, !0))
24
- }, " « ", 10, g)) : r("", !0),
24
+ onClick: t[0] || (t[0] = (l) => e.movePanel(-1, !0))
25
+ }, [
26
+ b(w)
27
+ ], 10, I)) : r("", !0),
25
28
  e.panelPosition !== "right" ? (s(), n("button", {
26
29
  key: 1,
27
30
  type: "button",
28
- class: l(e.className.element("header-btn")),
31
+ class: o(e.className.element("header-btn")),
29
32
  "aria-label": e.t("datePicker.prevItem"),
30
- onClick: t[1] || (t[1] = (o) => e.movePanel(-1))
31
- }, " ‹ ", 10, C)) : r("", !0),
32
- m("button", {
33
+ onClick: t[1] || (t[1] = (l) => e.movePanel(-1))
34
+ }, [
35
+ b(g)
36
+ ], 10, R)) : r("", !0),
37
+ d("button", {
33
38
  type: "button",
34
- class: l(e.className.element("header-label")),
35
- onClick: t[2] || (t[2] = (...o) => e.zoomHeader && e.zoomHeader(...o))
39
+ class: o(e.className.element("header-label")),
40
+ onClick: t[2] || (t[2] = (...l) => e.zoomHeader && e.zoomHeader(...l))
36
41
  }, i(e.headerLabel), 3),
37
42
  e.panelPosition !== "left" ? (s(), n("button", {
38
43
  key: 2,
39
44
  type: "button",
40
- class: l(e.className.element("header-btn")),
45
+ class: o(e.className.element("header-btn")),
41
46
  "aria-label": e.t("datePicker.nextItem"),
42
- onClick: t[3] || (t[3] = (o) => e.movePanel(1))
43
- }, " › ", 10, f)) : r("", !0),
47
+ onClick: t[3] || (t[3] = (l) => e.movePanel(1))
48
+ }, [
49
+ b($)
50
+ ], 10, S)) : r("", !0),
44
51
  e.panelPosition !== "left" ? (s(), n("button", {
45
52
  key: 3,
46
53
  type: "button",
47
- class: l(e.className.element("header-btn")),
54
+ class: o(e.className.element("header-btn")),
48
55
  "aria-label": e.t("datePicker.nextPage"),
49
- onClick: t[4] || (t[4] = (o) => e.movePanel(1, !0))
50
- }, " » ", 10, P)) : r("", !0)
56
+ onClick: t[4] || (t[4] = (l) => e.movePanel(1, !0))
57
+ }, [
58
+ b(f)
59
+ ], 10, E)) : r("", !0)
51
60
  ], 2),
52
61
  e.mode === "date" || e.mode === "week" ? (s(), n("div", {
53
62
  key: 0,
54
- class: l([e.className.element("weekdays"), { [e.className.is("week-mode")]: e.mode === "week" }])
63
+ class: o([e.className.element("weekdays"), { [e.className.is("week-mode")]: e.mode === "week" }])
55
64
  }, [
56
- e.mode === "week" ? (s(), n("span", h, i(e.t("datePicker.weekColumn")), 1)) : r("", !0),
57
- (s(!0), n(u, null, b(e.weekdayLabels, (o) => (s(), n("span", { key: o }, i(o), 1))), 128))
65
+ e.mode === "week" ? (s(), n("span", D, i(e.t("datePicker.weekColumn")), 1)) : r("", !0),
66
+ (s(!0), n(k, null, p(e.weekdayLabels, (l) => (s(), n("span", { key: l }, i(l), 1))), 128))
58
67
  ], 2)) : r("", !0),
59
- m("div", {
60
- class: l([e.className.element("body"), e.className.element(`body-${e.mode}`)]),
68
+ d("div", {
69
+ class: o([e.className.element("body"), e.className.element(`body-${e.mode}`)]),
61
70
  role: "grid"
62
71
  }, [
63
- (s(!0), n(u, null, b(e.cellRows, (o, k) => (s(), n("div", {
64
- key: k,
72
+ (s(!0), n(k, null, p(e.cellRows, (l, N) => (s(), n("div", {
73
+ key: N,
65
74
  role: "row",
66
- class: l(e.className.element("row"))
75
+ class: o(e.className.element("row"))
67
76
  }, [
68
- (s(!0), n(u, null, b(o, (a) => {
77
+ (s(!0), n(k, null, p(l, (a) => {
69
78
  var y;
70
79
  return s(), n("button", {
71
80
  key: a.title,
@@ -76,13 +85,13 @@ function E(e, t, M, T, R, K) {
76
85
  tabindex: a.title === ((y = e.activeCell) == null ? void 0 : y.title) ? 0 : -1,
77
86
  disabled: a.isWeekLabel || a.disabled || !a.inView,
78
87
  "aria-selected": !a.isWeekLabel && (a.selected || a.rangeStart || a.rangeEnd),
79
- onMouseenter: (d) => e.handleCellMouseEnter(a),
80
- onMouseleave: t[5] || (t[5] = (...d) => e.handleCellMouseLeave && e.handleCellMouseLeave(...d)),
81
- onFocus: (d) => {
88
+ onMouseenter: (m) => e.handleCellMouseEnter(a),
89
+ onMouseleave: t[5] || (t[5] = (...m) => e.handleCellMouseLeave && e.handleCellMouseLeave(...m)),
90
+ onFocus: (m) => {
82
91
  e.activeTitle = a.title, e.handleCellMouseEnter(a);
83
92
  },
84
- onKeydown: (d) => e.handleCellKeydown(d, a),
85
- class: l([
93
+ onKeydown: (m) => e.handleCellKeydown(m, a),
94
+ class: o([
86
95
  e.className.element("cell"),
87
96
  {
88
97
  [e.className.is("out-view")]: a.outView,
@@ -101,67 +110,67 @@ function E(e, t, M, T, R, K) {
101
110
  [e.className.is("week-selected")]: a.weekSelected
102
111
  }
103
112
  ]),
104
- onClick: (d) => e.handleSelect(a)
113
+ onClick: (m) => e.handleSelect(a)
105
114
  }, [
106
- m("span", {
107
- class: l(e.className.element("cell-date"))
115
+ d("span", {
116
+ class: o(e.className.element("cell-date"))
108
117
  }, [
109
- m("span", {
110
- class: l(e.className.element("cell-inner"))
118
+ d("span", {
119
+ class: o(e.className.element("cell-inner"))
111
120
  }, [
112
- N(e.$slots, "cell", {
121
+ v(e.$slots, "cell", {
113
122
  date: a.value.toDate(),
114
123
  label: a.label
115
124
  }, () => [
116
- v(i(a.label), 1)
125
+ P(i(a.label), 1)
117
126
  ])
118
127
  ], 2)
119
128
  ], 2),
120
129
  a.lunar && !e.$slots.cell ? (s(), n("span", {
121
130
  key: 0,
122
- class: l(e.className.element("cell-lunar"))
131
+ class: o(e.className.element("cell-lunar"))
123
132
  }, i(a.lunar.displayText), 3)) : r("", !0)
124
- ], 42, L);
133
+ ], 42, M);
125
134
  }), 128))
126
135
  ], 2))), 128))
127
136
  ], 2),
128
137
  e.shortcuts.length || e.$slots.extra ? (s(), n("div", {
129
138
  key: 1,
130
- class: l(e.className.element("shortcuts"))
139
+ class: o(e.className.element("shortcuts"))
131
140
  }, [
132
- (s(!0), n(u, null, b(e.shortcuts, (o) => (s(), n("button", {
133
- key: String(o.label),
141
+ (s(!0), n(k, null, p(e.shortcuts, (l) => (s(), n("button", {
142
+ key: String(l.label),
134
143
  type: "button",
135
- class: l(e.className.element("shortcut")),
136
- onClick: (k) => e.$emit("shortcut", o)
137
- }, i(o.label), 11, S))), 128)),
144
+ class: o(e.className.element("shortcut")),
145
+ onClick: (N) => e.$emit("shortcut", l)
146
+ }, i(l.label), 11, T))), 128)),
138
147
  e.$slots.extra ? (s(), n("div", {
139
148
  key: 0,
140
- class: l(e.className.element("extra"))
149
+ class: o(e.className.element("extra"))
141
150
  }, [
142
- N(e.$slots, "extra")
151
+ v(e.$slots, "extra")
143
152
  ], 2)) : r("", !0)
144
153
  ], 2)) : r("", !0),
145
154
  e.showToday || e.showConfirmBtn ? (s(), n("div", {
146
155
  key: 2,
147
- class: l(e.className.element("footer"))
156
+ class: o(e.className.element("footer"))
148
157
  }, [
149
158
  e.showToday ? (s(), n("button", {
150
159
  key: 0,
151
160
  type: "button",
152
- class: l([e.className.element("footer-btn"), e.className.element("today")]),
153
- onClick: t[6] || (t[6] = (...o) => e.selectToday && e.selectToday(...o))
161
+ class: o([e.className.element("footer-btn"), e.className.element("today")]),
162
+ onClick: t[6] || (t[6] = (...l) => e.selectToday && e.selectToday(...l))
154
163
  }, i(e.todayLabel), 3)) : r("", !0),
155
164
  e.showConfirmBtn ? (s(), n("button", {
156
165
  key: 1,
157
166
  type: "button",
158
- class: l([e.className.element("footer-btn"), e.className.element("confirm")]),
159
- onClick: t[7] || (t[7] = (o) => e.$emit("confirm"))
167
+ class: o([e.className.element("footer-btn"), e.className.element("confirm")]),
168
+ onClick: t[7] || (t[7] = (l) => e.$emit("confirm"))
160
169
  }, i(e.t("datePicker.ok")), 3)) : r("", !0)
161
170
  ], 2)) : r("", !0)
162
171
  ], 34);
163
172
  }
164
- const z = /* @__PURE__ */ $(p, [["render", E]]);
173
+ const q = /* @__PURE__ */ L(C, [["render", V]]);
165
174
  export {
166
- z as default
175
+ q as default
167
176
  };