x-next 1.3.1 → 1.5.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 (182) hide show
  1. package/AI_USAGE.md +2 -2
  2. package/CHANGELOG.md +71 -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/dropdown/DropdownButton.vue.d.ts +2 -1
  12. package/dist/components/dropdown/index.d.ts +3 -0
  13. package/dist/components/form-input-tag/index.d.ts +26 -25
  14. package/dist/components/form-input-tag/interface.d.ts +8 -0
  15. package/dist/components/link/Link.vue.d.ts +4 -4
  16. package/dist/components/link/index.d.ts +6 -6
  17. package/dist/components/message/index.d.ts +3 -3
  18. package/dist/components/message/message.vue.d.ts +1 -1
  19. package/dist/components/notification/Notification.d.ts +1 -1
  20. package/dist/components/notification/index.d.ts +3 -3
  21. package/dist/components/popconfirm/src/types.d.ts +1 -1
  22. package/dist/components/progress/Progress.vue.d.ts +3 -3
  23. package/dist/components/progress/index.d.ts +3 -3
  24. package/dist/components/steps/context.d.ts +9 -0
  25. package/dist/components/tabs/TabPane.vue.d.ts +2 -0
  26. package/dist/components/tabs/index.d.ts +6 -0
  27. package/dist/components/tabs/interface.d.ts +4 -0
  28. package/dist/components/tag/Tag.vue.d.ts +14 -0
  29. package/dist/components/tag/index.d.ts +9 -0
  30. package/dist/components/tag/interface.d.ts +5 -0
  31. package/dist/components/trend-chart/components/TrendChart.d.ts +127 -17
  32. package/dist/components/trend-chart/components/trend-chart-curve.d.ts +27 -7
  33. package/dist/components/trend-chart/components/trend-chart-labels.d.ts +4 -0
  34. package/dist/components/trend-chart/helpers/getPadding.d.ts +3 -2
  35. package/dist/components/trend-chart/index.d.ts +223 -28
  36. package/dist/components/trend-chart/props.d.ts +63 -5
  37. package/dist/es/_styles/palette-aliases.js +182 -127
  38. package/dist/es/_utils/palette.js +49 -43
  39. package/dist/es/components/_components/picker/input-range.vue2.js +10 -10
  40. package/dist/es/components/_components/picker/input.vue2.js +20 -20
  41. package/dist/es/components/_components/select-view/select-view.js +2 -2
  42. package/dist/es/components/alert/Alert.vue.js +2 -2
  43. package/dist/es/components/alert/Alert.vue2.js +21 -20
  44. package/dist/es/components/button/Button.js +17 -17
  45. package/dist/es/components/button/ButtonGroup.vue2.js +11 -9
  46. package/dist/es/components/date-picker/DatePanel.vue.js +71 -62
  47. package/dist/es/components/date-picker/DatePanel.vue2.js +50 -40
  48. package/dist/es/components/date-picker/DatePicker.vue2.js +1 -1
  49. package/dist/es/components/dropdown/Dropdown.vue2.js +11 -4
  50. package/dist/es/components/dropdown/DropdownButton.vue.js +8 -7
  51. package/dist/es/components/dropdown/DropdownButton.vue2.js +19 -17
  52. package/dist/es/components/dropdown/DropdownSubmenu.vue.js +18 -17
  53. package/dist/es/components/form/form-item-label.vue.js +25 -22
  54. package/dist/es/components/form/form-item-label.vue2.js +1 -1
  55. package/dist/es/components/form-checkbox/icon-check.js +12 -43
  56. package/dist/es/components/form-input/InputPassword.vue2.js +2 -2
  57. package/dist/es/components/form-input/InputSearch.js +1 -1
  58. package/dist/es/components/form-input-number/InputNumber.js +4 -4
  59. package/dist/es/components/form-input-tag/InputTag.js +168 -147
  60. package/dist/es/components/form-input-tag/utils.js +21 -19
  61. package/dist/es/components/form-textarea/Textarea.vue2.js +1 -1
  62. package/dist/es/components/link/Link.vue2.js +1 -1
  63. package/dist/es/components/menu/MenuSubMenu.js +50 -36
  64. package/dist/es/components/menu/sub-menu-pop.vue2.js +30 -30
  65. package/dist/es/components/pagination/Pagination.js +73 -70
  66. package/dist/es/components/popconfirm/src/popup.vue.js +1 -1
  67. package/dist/es/components/progress/Progress.vue2.js +1 -1
  68. package/dist/es/components/steps/Step.vue2.js +51 -47
  69. package/dist/es/components/steps/Steps.vue2.js +22 -19
  70. package/dist/es/components/table/Table.js +1 -1
  71. package/dist/es/components/table/table-th.js +2 -2
  72. package/dist/es/components/tabs/TabPane.vue.js +11 -9
  73. package/dist/es/components/tabs/TabPane.vue2.js +28 -24
  74. package/dist/es/components/tabs/tabs-button.js +2 -2
  75. package/dist/es/components/tabs/tabs-nav.js +21 -19
  76. package/dist/es/components/tabs/tabs-tab.vue.js +10 -8
  77. package/dist/es/components/tag/Tag.vue.js +20 -20
  78. package/dist/es/components/tag/Tag.vue2.js +35 -28
  79. package/dist/es/components/time-picker/TimePanel.vue.js +30 -29
  80. package/dist/es/components/time-picker/TimePicker.vue2.js +1 -1
  81. package/dist/es/components/time-picker/TimeRangePanel.js +26 -23
  82. package/dist/es/components/trend-chart/components/TrendChart.js +208 -142
  83. package/dist/es/components/trend-chart/components/trend-chart-curve.js +124 -59
  84. package/dist/es/components/trend-chart/components/trend-chart-labels.js +43 -41
  85. package/dist/es/components/trend-chart/helpers/getPadding.js +3 -3
  86. package/dist/es/components/trend-chart/props.js +101 -33
  87. package/dist/es/components/trend-chart/themes.js +15 -15
  88. package/dist/es/components/watermark/controller.js +40 -40
  89. package/dist/es/icons/default/calendar.js +15 -0
  90. package/dist/es/icons/default/clock-circle.js +15 -0
  91. package/dist/es/icons/default/double-left.js +15 -0
  92. package/dist/es/icons/default/double-right.js +15 -0
  93. package/dist/es/icons/default/down.js +16 -0
  94. package/dist/es/icons/default/eye-invisible.js +20 -0
  95. package/dist/es/icons/default/eye.js +18 -0
  96. package/dist/es/icons/default/left.js +15 -0
  97. package/dist/es/icons/default/minus.js +16 -0
  98. package/dist/es/icons/default/plus.js +16 -0
  99. package/dist/es/icons/default/question-circle.js +18 -0
  100. package/dist/es/icons/default/right.js +15 -0
  101. package/dist/es/icons/default/search.js +16 -0
  102. package/dist/es/icons/default/up.js +16 -0
  103. package/dist/es/icons/icon.js +26 -25
  104. package/dist/es/icons/public/boxicons/basic.js +1893 -0
  105. package/dist/es/icons/public/boxicons/brands.js +304 -0
  106. package/dist/es/icons/public/boxicons/filled.js +1893 -0
  107. package/dist/es/icons/public/boxicons/index.js +24 -0
  108. package/dist/es/icons/public/boxicons/names.js +4082 -0
  109. package/dist/es/icons/registry.js +15 -15
  110. package/dist/es/locale/en-US.js +2 -1
  111. package/dist/es/locale/zh-CN.js +2 -1
  112. package/dist/es/style.css +1 -1
  113. package/dist/icons/default/calendar.d.ts +93 -0
  114. package/dist/icons/default/clock-circle.d.ts +93 -0
  115. package/dist/icons/{_self/down.d.ts → default/double-left.d.ts} +6 -0
  116. package/dist/icons/{_self/eye-invisible.d.ts → default/double-right.d.ts} +6 -0
  117. package/dist/icons/default/down.d.ts +93 -0
  118. package/dist/icons/default/eye-invisible.d.ts +93 -0
  119. package/dist/icons/default/eye.d.ts +93 -0
  120. package/dist/icons/{_self/eye.d.ts → default/left.d.ts} +7 -0
  121. package/dist/icons/default/minus.d.ts +93 -0
  122. package/dist/icons/{_self → default}/plus.d.ts +7 -0
  123. package/dist/icons/default/question-circle.d.ts +93 -0
  124. package/dist/icons/{_self/minus.d.ts → default/right.d.ts} +7 -0
  125. package/dist/icons/{_self → default}/search.d.ts +7 -0
  126. package/dist/icons/{_self → default}/up.d.ts +7 -0
  127. package/dist/icons/public/boxicons/basic.cjs +1 -0
  128. package/dist/icons/public/boxicons/basic.d.ts +2 -0
  129. package/dist/icons/public/boxicons/brands.cjs +1 -0
  130. package/dist/icons/public/boxicons/brands.d.ts +2 -0
  131. package/dist/icons/public/boxicons/filled.cjs +1 -0
  132. package/dist/icons/public/boxicons/filled.d.ts +2 -0
  133. package/dist/icons/public/boxicons/index.cjs +1 -0
  134. package/dist/icons/public/boxicons/index.d.ts +10 -0
  135. package/dist/icons/public/boxicons/names.d.ts +10 -0
  136. package/dist/icons/registry.d.ts +5 -0
  137. package/dist/index.cjs +4 -4
  138. package/dist/index.umd.js +4 -4
  139. package/dist/locale/interface.d.ts +2 -0
  140. package/dist/style/alert.css +1 -1
  141. package/dist/style/base.css +1 -1
  142. package/dist/style/button.css +1 -1
  143. package/dist/style/date-picker.css +1 -1
  144. package/dist/style/dialog.css +1 -1
  145. package/dist/style/drawer.css +1 -1
  146. package/dist/style/dropdown.css +1 -1
  147. package/dist/style/form-input-number.css +1 -1
  148. package/dist/style/form-input-tag.css +1 -1
  149. package/dist/style/form-input.css +1 -1
  150. package/dist/style/form-radio.css +1 -1
  151. package/dist/style/form-select.css +1 -1
  152. package/dist/style/form-textarea.css +1 -1
  153. package/dist/style/form.css +1 -1
  154. package/dist/style/link.css +1 -1
  155. package/dist/style/menu.css +1 -1
  156. package/dist/style/message-box.css +1 -1
  157. package/dist/style/network.css +1 -1
  158. package/dist/style/pagination.css +1 -1
  159. package/dist/style/popconfirm.css +1 -1
  160. package/dist/style/popover.css +1 -1
  161. package/dist/style/popup.css +1 -1
  162. package/dist/style/progress.css +1 -1
  163. package/dist/style/rate.css +1 -1
  164. package/dist/style/spin.css +1 -1
  165. package/dist/style/steps.css +1 -1
  166. package/dist/style/table.css +1 -1
  167. package/dist/style/tabs.css +1 -1
  168. package/dist/style/tag.css +1 -1
  169. package/dist/style/time-picker.css +1 -1
  170. package/dist/style/time-range-selector.css +1 -1
  171. package/dist/style.css +1 -1
  172. package/package.json +31 -4
  173. package/dist/es/icons/_self/down.js +0 -16
  174. package/dist/es/icons/_self/eye-invisible.js +0 -13
  175. package/dist/es/icons/_self/eye.js +0 -13
  176. package/dist/es/icons/_self/minus.js +0 -13
  177. package/dist/es/icons/_self/plus.js +0 -12
  178. package/dist/es/icons/_self/question-message.js +0 -12
  179. package/dist/es/icons/_self/search.js +0 -13
  180. package/dist/es/icons/_self/up.js +0 -16
  181. package/dist/es/icons/_ui/calendar.js +0 -13
  182. package/dist/es/icons/_ui/time.js +0 -12
@@ -1,13 +1,14 @@
1
- import { defineComponent as x, createVNode as r, mergeProps as y, toRefs as M, computed as a, toRef as h } from "vue";
1
+ import { defineComponent as h, createVNode as s, mergeProps as y, toRefs as x, computed as a, provide as C, toRef as b } from "vue";
2
2
  import g from "./sub-menu-inline.vue.js";
3
- import C from "./sub-menu-pop.vue.js";
4
- import k from "./hooks/use-menu.js";
5
- import I from "./hooks/use-level.js";
6
- import v from "../../icons/_self/menu/down.js";
7
- import K from "../../icons/_self/dropdown/more.js";
8
- import P from "./hooks/use-menu-context.js";
9
- import _ from "./hooks/use-menu-data-collector.js";
10
- const w = {
3
+ import I from "./sub-menu-pop.vue.js";
4
+ import v from "./hooks/use-menu.js";
5
+ import k from "./hooks/use-level.js";
6
+ import K from "../../icons/_self/menu/down.js";
7
+ import _ from "../../icons/_self/dropdown/more.js";
8
+ import D from "./hooks/use-menu-context.js";
9
+ import P from "./hooks/use-menu-data-collector.js";
10
+ import { DataCollectorInjectionKey as w } from "./context.js";
11
+ const R = {
11
12
  /**
12
13
  * @zh 子菜单的标题
13
14
  * @en The title of the submenu
@@ -51,9 +52,9 @@ const w = {
51
52
  _internalSkipCollect: {
52
53
  type: Boolean
53
54
  }
54
- }, O = /* @__PURE__ */ x({
55
+ }, q = /* @__PURE__ */ h({
55
56
  name: "SubMenu",
56
- props: w,
57
+ props: R,
57
58
  slots: Object,
58
59
  /**
59
60
  * @zh 菜单的图标
@@ -81,47 +82,60 @@ const w = {
81
82
  }) {
82
83
  const {
83
84
  key: n
84
- } = k(), {
85
+ } = v(), {
85
86
  level: d
86
- } = I(), {
87
+ } = k(), {
87
88
  popup: o
88
- } = M(e), t = P(), s = a(() => {
89
+ } = x(e), t = D(), i = a(() => {
89
90
  const {
90
- mode: i,
91
- collapsed: p,
91
+ mode: p,
92
+ collapsed: c,
92
93
  inTrigger: m
93
94
  } = t;
94
- return !!(typeof o.value == "function" ? o.value(d.value) : o.value) || p || m || i !== "vertical";
95
+ return !!(typeof o.value == "function" ? o.value(d.value) : o.value) || c || m || p !== "vertical";
95
96
  }), {
96
97
  subMenuKeys: l,
97
98
  menuItemKeys: f
98
99
  } = e._internalSkipCollect ? {
99
100
  subMenuKeys: a(() => []),
100
101
  menuItemKeys: a(() => [])
101
- } : _({
102
+ } : P({
102
103
  key: n.value,
103
104
  type: "subMenu"
104
- }), b = a(() => {
105
- const i = t.selectedKeys || [], p = (m) => {
106
- for (let c = 0; c < i.length; c++) {
107
- const S = i[c];
105
+ });
106
+ e._internalSkipCollect && C(w, {
107
+ collectSubMenu: () => {
108
+ },
109
+ removeSubMenu: () => {
110
+ },
111
+ collectMenuItem: () => {
112
+ },
113
+ removeMenuItem: () => {
114
+ },
115
+ reportMenuData: () => {
116
+ }
117
+ });
118
+ const M = a(() => {
119
+ const p = t.selectedKeys || [], c = (m) => {
120
+ for (let r = 0; r < p.length; r++) {
121
+ const S = p[r];
108
122
  if (m.includes(S))
109
123
  return !0;
110
124
  }
111
125
  return !1;
112
126
  };
113
- return p(l.value) || p(f.value);
127
+ return c(l.value) || c(f.value);
114
128
  });
115
129
  return {
116
130
  subMenuKeys: l,
117
131
  menuItemKeys: f,
118
- isChildrenSelected: b,
132
+ isChildrenSelected: M,
119
133
  props: e,
120
134
  attrs: u,
121
135
  computedKey: n,
122
- computedPopup: s,
123
- expandIconDown: h(t, "expandIconDown"),
124
- expandIconRight: h(t, "expandIconRight")
136
+ computedPopup: i,
137
+ expandIconDown: b(t, "expandIconDown"),
138
+ expandIconRight: b(t, "expandIconRight")
125
139
  };
126
140
  },
127
141
  render() {
@@ -132,30 +146,30 @@ const w = {
132
146
  computedPopup: d,
133
147
  expandIconDown: o,
134
148
  expandIconRight: t,
135
- isChildrenSelected: s
149
+ isChildrenSelected: i
136
150
  } = this, l = {
137
151
  ...this.$slots,
138
- "expand-icon-down": this.$slots["expand-icon-down"] || o || (() => [r(v, null, null)]),
139
- "expand-icon-right": this.$slots["expand-icon-right"] || t || (() => [r(K, null, null)])
152
+ "expand-icon-down": this.$slots["expand-icon-down"] || o || (() => [s(K, null, null)]),
153
+ "expand-icon-right": this.$slots["expand-icon-right"] || t || (() => [s(_, null, null)])
140
154
  };
141
- return d ? r(C, y({
155
+ return d ? s(I, y({
142
156
  key: n,
143
157
  title: e.title,
144
158
  selectable: e.selectable,
145
159
  disabled: e.disabled,
146
- isChildrenSelected: s,
160
+ isChildrenSelected: i,
147
161
  popupMaxHeight: e.popupMaxHeight,
148
162
  _internalSkipCollect: e._internalSkipCollect
149
- }, u), l) : r(g, y({
163
+ }, u), l) : s(g, y({
150
164
  key: n,
151
165
  title: e.title,
152
166
  disabled: e.disabled,
153
- isChildrenSelected: s,
167
+ isChildrenSelected: i,
154
168
  _internalSkipCollect: e._internalSkipCollect
155
169
  }, u), l);
156
170
  }
157
171
  });
158
172
  export {
159
- O as default,
160
- w as menuSubMenuProps
173
+ q as default,
174
+ R as menuSubMenuProps
161
175
  };
@@ -2,10 +2,10 @@ import { defineComponent as S, toRefs as B, computed as o, ref as P } from "vue"
2
2
  import { Trigger as $ } from "../trigger/index.js";
3
3
  import H from "./base-menu.vue.js";
4
4
  import N from "./hooks/use-menu.js";
5
- import I from "./hooks/use-level.js";
6
- import { omit as K } from "../../_utils/omit.js";
7
- import V from "./indent.vue.js";
8
- import _ from "./hooks/use-menu-context.js";
5
+ import _ from "./hooks/use-level.js";
6
+ import { omit as I } from "../../_utils/omit.js";
7
+ import K from "./indent.vue.js";
8
+ import V from "./hooks/use-menu-context.js";
9
9
  import R from "../../_container/render-function.js";
10
10
  import { isNumber as T } from "../../_utils/is.js";
11
11
  import { getClassNameMixin as w } from "../../_utils/config.js";
@@ -14,7 +14,7 @@ const Q = S({
14
14
  components: {
15
15
  Menu: H,
16
16
  Trigger: $,
17
- MenuIndent: V,
17
+ MenuIndent: K,
18
18
  RenderFunction: R
19
19
  },
20
20
  inheritAttrs: !1,
@@ -39,57 +39,57 @@ const Q = S({
39
39
  type: Boolean
40
40
  }
41
41
  },
42
- setup(g) {
43
- const { key: l } = N(), { level: i } = I(), { selectable: a, disabled: u, isChildrenSelected: C, popupMaxHeight: x } = B(g), t = _(), { onSubMenuClick: r, onMenuItemClick: n } = t, p = o(() => t.prefixCls), m = o(() => t.mode), c = o(() => t.selectedKeys || []), s = o(() => `${p.value}-pop`), f = o(
44
- () => a.value && c.value.includes(l.value) || C.value
42
+ setup(s) {
43
+ const { key: l } = N(), { level: a } = _(), { selectable: u, disabled: p, isChildrenSelected: C, popupMaxHeight: x } = B(s), t = V(), { onSubMenuClick: r, onMenuItemClick: n } = t, m = o(() => t.prefixCls), c = o(() => t.mode), f = o(() => t.selectedKeys || []), i = o(() => `${m.value}-pop`), v = o(
44
+ () => u.value && f.value.includes(l.value) || C.value
45
45
  ), M = o(() => [
46
- `${s.value}`,
47
- `${s.value}-header`,
46
+ `${i.value}`,
47
+ `${i.value}-header`,
48
48
  {
49
- [`${p.value}-selected`]: f.value
49
+ [`${m.value}-selected`]: v.value
50
50
  }
51
- ]), h = o(() => m.value === "horizontal" && !t.inTrigger), v = P(!1), d = (e) => {
52
- v.value = e;
53
- }, y = w("trigger"), b = o(() => {
51
+ ]), h = o(() => c.value === "horizontal" && !t.inTrigger), d = P(!1), g = (e) => {
52
+ d.value = e;
53
+ }, y = w("trigger"), k = o(() => {
54
54
  var e;
55
55
  return [
56
- `${s.value}-trigger`,
56
+ `${i.value}-trigger`,
57
57
  {
58
- [`${s.value}-trigger-dark`]: t.theme === "dark"
58
+ [`${i.value}-trigger-dark`]: t.theme === "dark"
59
59
  },
60
60
  // @ts-ignore
61
61
  (e = t.triggerProps) == null ? void 0 : e.class
62
62
  ];
63
- }), k = o(() => K(t.triggerProps || {}, ["class"]));
63
+ }), b = o(() => I(t.triggerProps || {}, ["class"]));
64
64
  return {
65
- menuPrefixCls: p,
66
- mode: m,
67
- level: i,
65
+ menuPrefixCls: m,
66
+ mode: c,
67
+ level: a,
68
68
  classNames: M,
69
- isSelected: f,
70
- disabled: u,
71
- selectedKeys: c,
69
+ isSelected: v,
70
+ disabled: p,
71
+ selectedKeys: f,
72
72
  needPopOnBottom: h,
73
- popVisible: v,
73
+ popVisible: d,
74
74
  className: y,
75
- triggerClassNames: b,
76
- triggerProps: k,
75
+ triggerClassNames: k,
76
+ triggerProps: b,
77
77
  menuContext: t,
78
78
  popupMenuStyles: o(() => {
79
79
  const e = x.value ?? t.popupMaxHeight;
80
80
  return T(e) ? { maxHeight: `${e}px` } : e ? {} : { maxHeight: "unset" };
81
81
  }),
82
82
  onClick: () => {
83
- u.value || (r && r(l.value, i.value), a.value && n && n(l.value));
83
+ p.value || s._internalSkipCollect || (r && r(l.value, a.value), u.value && n && n(l.value));
84
84
  },
85
85
  onKeydown: (e) => {
86
- u.value || (e.key === "Enter" || e.key === " ") && (e.preventDefault(), r && r(l.value, i.value), a.value && n && n(l.value));
86
+ p.value || s._internalSkipCollect || (e.key === "Enter" || e.key === " ") && (e.preventDefault(), r && r(l.value, a.value), u.value && n && n(l.value));
87
87
  },
88
88
  onMenuItemClick: (e) => {
89
- n && n(e), d(!1);
89
+ n && n(e), g(!1);
90
90
  },
91
91
  onVisibleChange: (e) => {
92
- d(e);
92
+ g(e);
93
93
  }
94
94
  };
95
95
  }
@@ -1,10 +1,10 @@
1
- import { defineComponent as F, toRefs as $, ref as w, computed as m, reactive as D, watch as j, createVNode as i, mergeProps as b } from "vue";
1
+ import { defineComponent as F, toRefs as $, ref as M, computed as d, reactive as D, watch as j, createVNode as n, mergeProps as b } from "vue";
2
2
  import G from "./page-item.vue.js";
3
3
  import O from "./page-item-step.vue.js";
4
4
  import H from "./page-item-ellipsis.vue.js";
5
5
  import B from "./page-jumper.vue.js";
6
6
  import K from "./page-options.vue.js";
7
- import { isNumber as y } from "../../_utils/is.js";
7
+ import { isNumber as h } from "../../_utils/is.js";
8
8
  import { useSize as Q } from "../../_hooks/use-size.js";
9
9
  import { getClassNameMixin as U } from "../../_utils/config.js";
10
10
  import { useLocale as W } from "../../locale/index.js";
@@ -211,88 +211,88 @@ const ne = /* @__PURE__ */ F({
211
211
  * @binding {number} total
212
212
  */
213
213
  setup(e, {
214
- emit: f,
215
- slots: s
214
+ emit: o,
215
+ slots: f
216
216
  }) {
217
- const o = U("pagination"), {
217
+ const g = U("pagination"), {
218
218
  t: I
219
219
  } = W(), {
220
- disabled: z,
220
+ disabled: P,
221
221
  pageItemStyle: A,
222
222
  activePageItemStyle: E,
223
223
  size: L
224
224
  } = $(e), {
225
- mergedSize: c
226
- } = Q(L), p = w(e.defaultCurrent), P = w(e.defaultPageSize), C = (t) => y(t) && Number.isFinite(t) && t > 0, k = (t, a = 10) => C(t) ? t : a, N = m(() => e.current ?? p.value), h = m(() => k(e.pageSize ?? P.value, k(e.defaultPageSize))), u = m(() => Math.max(Math.ceil(e.total / h.value), 1)), l = m(() => y(N.value) ? Math.min(Math.max(N.value, 1), u.value) : 1), S = (t) => {
227
- if (t !== l.value && y(t) && !e.disabled) {
225
+ mergedSize: m
226
+ } = Q(L), p = M(e.defaultCurrent), C = M(e.defaultPageSize), k = (t) => h(t) && Number.isFinite(t) && t > 0, N = (t, a = 10) => k(t) ? t : a, S = d(() => e.current ?? p.value), y = d(() => N(e.pageSize ?? C.value, N(e.defaultPageSize))), u = d(() => Math.max(Math.ceil(e.total / y.value), 1)), l = d(() => h(S.value) ? Math.min(Math.max(S.value, 1), u.value) : 1), z = (t) => {
227
+ if (t !== l.value && h(t) && !e.disabled) {
228
228
  const a = Math.min(Math.max(t, 1), u.value);
229
- a !== l.value && (p.value = a, f("update:current", a), f("change", a));
229
+ a !== l.value && (p.value = a, o("update:current", a), o("change", a));
230
230
  }
231
231
  }, J = (t) => {
232
- C(t) && (P.value = t, f("update:pageSize", t), f("pageSizeChange", t));
233
- }, n = D({
232
+ k(t) && (C.value = t, o("update:pageSize", t), o("pageSizeChange", t));
233
+ }, s = D({
234
234
  current: l,
235
235
  style: A,
236
236
  activeStyle: E,
237
- onClick: S
237
+ onClick: z
238
238
  }), V = {
239
239
  get current() {
240
- return n.current;
240
+ return s.current;
241
241
  },
242
242
  get disabled() {
243
- return z.value;
243
+ return P.value;
244
244
  },
245
245
  get style() {
246
- return n.style;
246
+ return s.style;
247
247
  },
248
248
  get activeStyle() {
249
- return n.activeStyle;
249
+ return s.activeStyle;
250
250
  },
251
251
  get onClick() {
252
- return n.onClick;
252
+ return s.onClick;
253
253
  }
254
- }, x = {
254
+ }, w = {
255
255
  get current() {
256
- return n.current;
256
+ return s.current;
257
257
  },
258
258
  get disabled() {
259
- return z.value;
259
+ return P.value;
260
260
  },
261
261
  get style() {
262
- return n.style;
262
+ return s.style;
263
263
  },
264
264
  get onClick() {
265
- return n.onClick;
265
+ return s.onClick;
266
266
  },
267
267
  get pages() {
268
268
  return u.value;
269
269
  }
270
270
  }, _ = {
271
271
  get current() {
272
- return n.current;
272
+ return s.current;
273
273
  },
274
274
  get style() {
275
- return n.style;
275
+ return s.style;
276
276
  },
277
277
  get onClick() {
278
- return n.onClick;
278
+ return s.onClick;
279
279
  },
280
280
  get pages() {
281
281
  return u.value;
282
282
  }
283
- }, r = (t, a = {}) => t === "more" ? i(H, b(a, _), {
284
- default: s["page-item-ellipsis"]
285
- }) : t === "previous" ? i(O, b({
283
+ }, r = (t, a = {}) => t === "more" ? n(H, b(a, _), {
284
+ default: f["page-item-ellipsis"]
285
+ }) : t === "previous" ? n(O, b({
286
286
  type: "previous"
287
- }, a, x), {
288
- default: s["page-item-step"]
289
- }) : t === "next" ? i(O, b({
287
+ }, a, w), {
288
+ default: f["page-item-step"]
289
+ }) : t === "next" ? n(O, b({
290
290
  type: "next"
291
- }, a, x), {
292
- default: s["page-item-step"]
293
- }) : i(G, b(a, V), {
294
- default: s["page-item"]
295
- }), R = m(() => {
291
+ }, a, w), {
292
+ default: f["page-item-step"]
293
+ }) : n(G, b(a, V), {
294
+ default: f["page-item"]
295
+ }), R = d(() => {
296
296
  const t = [];
297
297
  if (u.value < e.baseSize + e.bufferSize * 2)
298
298
  for (let a = 1; a <= u.value; a++)
@@ -301,20 +301,20 @@ const ne = /* @__PURE__ */ F({
301
301
  pageNumber: a
302
302
  }));
303
303
  else {
304
- let a = 1, g = u.value, d = !1, M = !1;
305
- l.value > 2 + e.bufferSize && (d = !0, a = Math.min(l.value - e.bufferSize, u.value - 2 * e.bufferSize)), l.value < u.value - (e.bufferSize + 1) && (M = !0, g = Math.max(l.value + e.bufferSize, 2 * e.bufferSize + 1)), d && (t.push(r("page", {
304
+ let a = 1, c = u.value, i = !1, x = !1;
305
+ l.value > 2 + e.bufferSize && (i = !0, a = Math.min(l.value - e.bufferSize, u.value - 2 * e.bufferSize)), l.value < u.value - (e.bufferSize + 1) && (x = !0, c = Math.max(l.value + e.bufferSize, 2 * e.bufferSize + 1)), i && (t.push(r("page", {
306
306
  key: 1,
307
307
  pageNumber: 1
308
308
  })), t.push(r("more", {
309
309
  key: "left-ellipsis-pager",
310
310
  step: -(e.bufferSize * 2 + 1)
311
311
  })));
312
- for (let v = a; v <= g; v++)
312
+ for (let v = a; v <= c; v++)
313
313
  t.push(r("page", {
314
314
  key: v,
315
315
  pageNumber: v
316
316
  }));
317
- M && (t.push(r("more", {
317
+ x && (t.push(r("more", {
318
318
  key: "right-ellipsis-pager",
319
319
  step: e.bufferSize * 2 + 1
320
320
  })), t.push(r("page", {
@@ -323,66 +323,69 @@ const ne = /* @__PURE__ */ F({
323
323
  })));
324
324
  }
325
325
  return t;
326
- }), T = () => e.simple ? i("span", {
327
- class: o.element("simple")
326
+ }), T = () => e.simple ? n("span", {
327
+ class: g.element("simple")
328
328
  }, [r("previous", {
329
329
  simple: !0
330
- }), i(B, {
330
+ }), n(B, {
331
331
  disabled: e.disabled,
332
332
  current: l.value,
333
- size: c.value,
333
+ size: m.value,
334
334
  pages: u.value,
335
335
  simple: !0,
336
- onChange: S
336
+ onChange: z
337
337
  }, null), r("next", {
338
338
  simple: !0
339
- })]) : i("ul", {
340
- class: o.element("list")
339
+ })]) : n("ul", {
340
+ class: g.element("list")
341
341
  }, [r("previous"), R.value, e.showMore && r("more", {
342
342
  key: "more",
343
343
  step: e.bufferSize * 2 + 1
344
344
  }), r("next")]);
345
- j(h, (t, a) => {
345
+ j(y, (t, a) => {
346
346
  if (e.autoAdjust && t !== a && l.value > 1) {
347
- const g = a * (l.value - 1) + 1, d = Math.ceil(g / t);
348
- d !== l.value && (p.value = d, f("update:current", d), f("change", d));
347
+ const c = a * (l.value - 1) + 1, i = Math.ceil(c / t);
348
+ i !== l.value && (p.value = i, o("update:current", i), o("change", i));
349
349
  }
350
350
  }), j(u, (t, a) => {
351
- if (e.autoAdjust && t !== a && l.value > 1 && l.value > t) {
352
- const g = Math.max(t, 1);
353
- p.value = g, f("update:current", g), f("change", g);
354
- }
351
+ if (!e.autoAdjust || t === a)
352
+ return;
353
+ const c = S.value;
354
+ if (!h(c) || c <= t)
355
+ return;
356
+ const i = Math.max(t, 1);
357
+ p.value = i, o("update:current", i), o("change", i);
355
358
  });
356
- const q = m(() => [o.block, o.modifier(`size-${c.value}`), {
357
- [o.modifier("simple")]: e.simple,
358
- [o.modifier("disabled")]: e.disabled
359
+ const q = d(() => [g.block, g.modifier(`size-${m.value}`), {
360
+ [g.modifier("simple")]: e.simple,
361
+ [g.modifier("disabled")]: e.disabled
359
362
  }]);
360
363
  return () => {
361
364
  var t;
362
- return e.hideOnSinglePage && u.value <= 1 ? null : i("div", {
365
+ return e.hideOnSinglePage && u.value <= 1 ? null : n("div", {
363
366
  class: q.value
364
- }, [e.showTotal && i("span", {
365
- class: o.element("total")
366
- }, [((t = s.total) == null ? void 0 : t.call(s, {
367
+ }, [e.showTotal && n("span", {
368
+ class: g.element("total")
369
+ }, [((t = f.total) == null ? void 0 : t.call(f, {
367
370
  total: e.total
368
371
  })) ?? I("pagination.total", {
369
372
  total: e.total
370
- })]), T(), e.showPageSize && i(K, {
373
+ })]), T(), e.showPageSize && n(K, {
371
374
  disabled: e.disabled,
372
375
  sizeOptions: e.pageSizeOptions,
373
- pageSize: h.value,
374
- size: c.value,
376
+ pageSize: y.value,
377
+ size: m.value,
375
378
  onChange: J,
376
379
  selectProps: e.pageSizeProps
377
- }, null), !e.simple && e.showJumper && i(B, {
380
+ }, null), !e.simple && e.showJumper && n(B, {
378
381
  disabled: e.disabled,
379
382
  current: l.value,
380
383
  pages: u.value,
381
- size: c.value,
382
- onChange: S
384
+ size: m.value,
385
+ onChange: z
383
386
  }, {
384
- "jumper-prepend": s["jumper-prepend"],
385
- "jumper-append": s["jumper-append"]
387
+ "jumper-prepend": f["jumper-prepend"],
388
+ "jumper-append": f["jumper-append"]
386
389
  })]);
387
390
  };
388
391
  }
@@ -27,7 +27,7 @@ function C(o, $, B, v, z, T) {
27
27
  i("div", {
28
28
  class: e([`${o.ns}--footer`])
29
29
  }, [
30
- n(m, { size: 12 }, {
30
+ n(m, { size: 8 }, {
31
31
  default: a(() => [
32
32
  n(r, p({
33
33
  size: "mini",
@@ -94,7 +94,7 @@ const g = (e) => Number.isFinite(e) ? Math.min(1, Math.max(0, e)) : 0, C = c({
94
94
  /**
95
95
  * @zh 进度条状态
96
96
  * @en Progress bar status
97
- * @values 'normal', 'success', 'warning', 'danger'
97
+ * @values 'normal', 'success', 'warning', 'strong', 'danger'
98
98
  */
99
99
  status: {
100
100
  type: String