x-next 1.5.0 → 1.7.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 (171) hide show
  1. package/AI_USAGE.md +57 -4
  2. package/CHANGELOG.md +72 -0
  3. package/dist/_utils/color.d.ts +53 -0
  4. package/dist/components/color-picker/ColorPicker.d.ts +239 -0
  5. package/dist/components/color-picker/gradient-slider.d.ts +52 -0
  6. package/dist/components/color-picker/index.d.ts +238 -0
  7. package/dist/components/color-picker/panel.d.ts +721 -0
  8. package/dist/components/color-picker/sv-panel.d.ts +48 -0
  9. package/dist/components/date-picker/DatePicker.vue.d.ts +3 -3
  10. package/dist/components/date-picker/index.d.ts +6 -6
  11. package/dist/components/draggable/Draggable.d.ts +1 -1
  12. package/dist/components/draggable/index.d.ts +2 -2
  13. package/dist/components/drawer/index.d.ts +6 -6
  14. package/dist/components/drawer/src/Drawer.vue.d.ts +3 -3
  15. package/dist/components/dropdown/Dropdown.vue.d.ts +34 -4
  16. package/dist/components/dropdown/DropdownButton.vue.d.ts +35 -5
  17. package/dist/components/dropdown/DropdownSubmenu.vue.d.ts +34 -4
  18. package/dist/components/dropdown/dropdown-panel.vue.d.ts +30 -0
  19. package/dist/components/dropdown/index.d.ts +209 -29
  20. package/dist/components/form/FormItem.vue.d.ts +12 -12
  21. package/dist/components/form/form-item-label.vue.d.ts +3 -3
  22. package/dist/components/form/index.d.ts +24 -24
  23. package/dist/components/form-select/Select.d.ts +3 -3
  24. package/dist/components/form-select/SelectDropdown.vue.d.ts +30 -0
  25. package/dist/components/form-select/index.d.ts +66 -6
  26. package/dist/components/form-slider/Slider.vue.d.ts +3 -3
  27. package/dist/components/form-slider/index.d.ts +6 -6
  28. package/dist/components/form-slider/slider-button.vue.d.ts +3 -3
  29. package/dist/components/grid/Row.vue.d.ts +3 -3
  30. package/dist/components/grid/index.d.ts +9 -9
  31. package/dist/components/heatmap/Heatmap.d.ts +311 -0
  32. package/dist/components/heatmap/helpers/matrix.d.ts +58 -0
  33. package/dist/components/heatmap/index.d.ts +372 -0
  34. package/dist/components/heatmap/interface.d.ts +57 -0
  35. package/dist/components/image/Image.vue.d.ts +125 -17
  36. package/dist/components/image/ImagePreview.vue.d.ts +97 -7
  37. package/dist/components/image/ImagePreviewAction.d.ts +3 -3
  38. package/dist/components/image/ImagePreviewGroup.vue.d.ts +100 -7
  39. package/dist/components/image/hooks/use-image-drag.d.ts +2 -2
  40. package/dist/components/image/index.d.ts +712 -124
  41. package/dist/components/image/interface.d.ts +9 -1
  42. package/dist/components/image/preview-toolbar.vue.d.ts +3 -3
  43. package/dist/components/index.d.ts +3 -0
  44. package/dist/components/menu/sub-menu-pop.vue.d.ts +3 -3
  45. package/dist/components/network/Network.vue.d.ts +1 -1
  46. package/dist/components/network/index.d.ts +3 -3
  47. package/dist/components/network/utils.d.ts +2 -0
  48. package/dist/components/pagination/page-item-ellipsis.vue.d.ts +9 -0
  49. package/dist/components/pagination/page-jumper.vue.d.ts +6 -0
  50. package/dist/components/pagination/page-options.vue.d.ts +6 -6
  51. package/dist/components/popconfirm/src/popup.vue.d.ts +3 -3
  52. package/dist/components/popover/Popover.d.ts +1 -1
  53. package/dist/components/popover/index.d.ts +3 -3
  54. package/dist/components/popup/Popup.d.ts +1 -1
  55. package/dist/components/popup/index.d.ts +3 -3
  56. package/dist/components/skeleton/SkeletonShape.vue.d.ts +3 -3
  57. package/dist/components/skeleton/index.d.ts +6 -6
  58. package/dist/components/space/Space.d.ts +1 -1
  59. package/dist/components/space/index.d.ts +3 -3
  60. package/dist/components/spin/Spin.d.ts +38 -0
  61. package/dist/components/spin/index.d.ts +30 -0
  62. package/dist/components/table/Table.d.ts +1 -1
  63. package/dist/components/table/index.d.ts +3 -3
  64. package/dist/components/tabs/Tabs.d.ts +1 -1
  65. package/dist/components/tabs/index.d.ts +3 -3
  66. package/dist/components/time-picker/TimePicker.vue.d.ts +3 -3
  67. package/dist/components/time-picker/index.d.ts +6 -6
  68. package/dist/components/tooltip/Tooltip.vue.d.ts +1 -1
  69. package/dist/components/tooltip/index.d.ts +3 -3
  70. package/dist/components/trigger/Trigger.d.ts +1 -1
  71. package/dist/components/trigger/index.d.ts +3 -3
  72. package/dist/components/upload/Upload.d.ts +372 -0
  73. package/dist/components/upload/context.d.ts +28 -0
  74. package/dist/components/upload/index.d.ts +656 -0
  75. package/dist/components/upload/interface.d.ts +110 -0
  76. package/dist/components/upload/props.d.ts +321 -0
  77. package/dist/components/upload/upload-list-item.d.ts +15 -0
  78. package/dist/components/upload/upload-list.d.ts +11 -0
  79. package/dist/components/upload/upload-picture-item.d.ts +20 -0
  80. package/dist/components/upload/upload-trigger.d.ts +8 -0
  81. package/dist/components/upload/utils.d.ts +48 -0
  82. package/dist/components/watermark/Watermark.d.ts +1 -1
  83. package/dist/components/watermark/index.d.ts +3 -3
  84. package/dist/es/_styles/palette-aliases.js +10 -4
  85. package/dist/es/_utils/color.js +73 -0
  86. package/dist/es/components/button/Button.js +2 -2
  87. package/dist/es/components/color-picker/ColorPicker.js +239 -0
  88. package/dist/es/components/color-picker/gradient-slider.js +79 -0
  89. package/dist/es/components/color-picker/index.js +8 -0
  90. package/dist/es/components/color-picker/panel.js +307 -0
  91. package/dist/es/components/color-picker/sv-panel.js +99 -0
  92. package/dist/es/components/dropdown/dropdown-panel.vue.js +17 -17
  93. package/dist/es/components/form-input/Input.js +7 -7
  94. package/dist/es/components/form-input/InputPassword.vue2.js +2 -2
  95. package/dist/es/components/form-input/InputSearch.js +2 -2
  96. package/dist/es/components/form-input-number/InputNumber.js +12 -12
  97. package/dist/es/components/heatmap/Heatmap.js +334 -0
  98. package/dist/es/components/heatmap/helpers/matrix.js +106 -0
  99. package/dist/es/components/heatmap/index.js +8 -0
  100. package/dist/es/components/image/Image.vue.js +55 -45
  101. package/dist/es/components/image/Image.vue2.js +113 -92
  102. package/dist/es/components/image/ImagePreview.vue.js +66 -53
  103. package/dist/es/components/image/ImagePreview.vue2.js +219 -171
  104. package/dist/es/components/image/ImagePreviewAction.js +12 -15
  105. package/dist/es/components/image/ImagePreviewGroup.vue.js +21 -20
  106. package/dist/es/components/image/ImagePreviewGroup.vue2.js +45 -39
  107. package/dist/es/components/image/hooks/use-image-drag.js +16 -14
  108. package/dist/es/components/index.js +123 -117
  109. package/dist/es/components/menu/sub-menu-pop.vue2.js +12 -12
  110. package/dist/es/components/network/Network.vue2.js +72 -72
  111. package/dist/es/components/network/utils.js +44 -35
  112. package/dist/es/components/pagination/Pagination.js +113 -104
  113. package/dist/es/components/pagination/page-item-ellipsis.vue.js +13 -12
  114. package/dist/es/components/pagination/page-item-ellipsis.vue2.js +19 -15
  115. package/dist/es/components/pagination/page-jumper.vue.js +13 -12
  116. package/dist/es/components/pagination/page-jumper.vue2.js +7 -4
  117. package/dist/es/components/pagination/page-options.vue.js +4 -3
  118. package/dist/es/components/pagination/page-options.vue2.js +17 -15
  119. package/dist/es/components/skeleton/Skeleton.vue.js +11 -9
  120. package/dist/es/components/skeleton/SkeletonLine.vue.js +9 -8
  121. package/dist/es/components/skeleton/SkeletonShape.vue.js +8 -7
  122. package/dist/es/components/spin/Spin.js +124 -60
  123. package/dist/es/components/table/Table.js +3 -1
  124. package/dist/es/components/trigger/Trigger.js +19 -19
  125. package/dist/es/components/upload/Upload.js +420 -0
  126. package/dist/es/components/upload/context.js +4 -0
  127. package/dist/es/components/upload/index.js +8 -0
  128. package/dist/es/components/upload/props.js +321 -0
  129. package/dist/es/components/upload/upload-list-item.js +138 -0
  130. package/dist/es/components/upload/upload-list.js +48 -0
  131. package/dist/es/components/upload/upload-picture-item.js +109 -0
  132. package/dist/es/components/upload/upload-trigger.js +89 -0
  133. package/dist/es/components/upload/utils.js +195 -0
  134. package/dist/es/icons/_self/empty-better.js +25 -8
  135. package/dist/es/icons/_self/upload-icons.js +103 -0
  136. package/dist/es/index.js +168 -162
  137. package/dist/es/locale/en-US.js +39 -1
  138. package/dist/es/locale/zh-CN.js +39 -1
  139. package/dist/es/style.css +1 -1
  140. package/dist/icons/_self/upload-icons.d.ts +523 -0
  141. package/dist/index.cjs +4 -4
  142. package/dist/index.umd.js +4 -4
  143. package/dist/locale/interface.d.ts +60 -0
  144. package/dist/style/base.css +1 -1
  145. package/dist/style/button.css +1 -1
  146. package/dist/style/color-picker.css +1 -0
  147. package/dist/style/color-picker.js +2 -0
  148. package/dist/style/date-picker.css +1 -1
  149. package/dist/style/empty.css +1 -1
  150. package/dist/style/form-checkbox.css +1 -1
  151. package/dist/style/form-input-tag.css +1 -1
  152. package/dist/style/form-input.css +1 -1
  153. package/dist/style/form-radio.css +1 -1
  154. package/dist/style/form-textarea.css +1 -1
  155. package/dist/style/form.css +1 -1
  156. package/dist/style/heatmap.css +1 -0
  157. package/dist/style/heatmap.js +2 -0
  158. package/dist/style/image.css +1 -1
  159. package/dist/style/menu.css +1 -1
  160. package/dist/style/pagination.css +1 -1
  161. package/dist/style/skeleton.css +1 -1
  162. package/dist/style/spin.css +1 -1
  163. package/dist/style/steps.css +1 -1
  164. package/dist/style/table.css +1 -1
  165. package/dist/style/upload.css +1 -0
  166. package/dist/style/upload.js +2 -0
  167. package/dist/style.css +1 -1
  168. package/dist/types.d.ts +3 -0
  169. package/package.json +1 -1
  170. package/volar.d.ts +3 -0
  171. package/dist/es/_hooks/use-popup-overflow-hidden.js +0 -29
@@ -1,14 +1,14 @@
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
- import G from "./page-item.vue.js";
3
- import O from "./page-item-step.vue.js";
4
- import H from "./page-item-ellipsis.vue.js";
5
- import B from "./page-jumper.vue.js";
6
- import K from "./page-options.vue.js";
1
+ import { defineComponent as D, toRefs as G, ref as O, computed as g, reactive as H, watch as B, createVNode as n, mergeProps as b } from "vue";
2
+ import K from "./page-item.vue.js";
3
+ import L from "./page-item-step.vue.js";
4
+ import Q from "./page-item-ellipsis.vue.js";
5
+ import I from "./page-jumper.vue.js";
6
+ import U from "./page-options.vue.js";
7
7
  import { isNumber as h } from "../../_utils/is.js";
8
- import { useSize as Q } from "../../_hooks/use-size.js";
9
- import { getClassNameMixin as U } from "../../_utils/config.js";
10
- import { useLocale as W } from "../../locale/index.js";
11
- const ne = /* @__PURE__ */ F({
8
+ import { useSize as W } from "../../_hooks/use-size.js";
9
+ import { getClassNameMixin as X } from "../../_utils/config.js";
10
+ import { useLocale as Y } from "../../locale/index.js";
11
+ const oe = /* @__PURE__ */ D({
12
12
  name: "Pagination",
13
13
  props: {
14
14
  /**
@@ -168,20 +168,20 @@ const ne = /* @__PURE__ */ F({
168
168
  }
169
169
  },
170
170
  emits: {
171
- "update:current": (e) => !0,
172
- "update:pageSize": (e) => !0,
171
+ "update:current": (t) => !0,
172
+ "update:pageSize": (t) => !0,
173
173
  /**
174
174
  * @zh 页码改变时触发
175
175
  * @en Triggered when page number changes
176
176
  * @param {number} current
177
177
  */
178
- change: (e) => !0,
178
+ change: (t) => !0,
179
179
  /**
180
180
  * @zh 数据条数改变时触发
181
181
  * @en Triggered when the number of data items changes
182
182
  * @param {number} pageSize
183
183
  */
184
- pageSizeChange: (e) => !0
184
+ pageSizeChange: (t) => !0
185
185
  },
186
186
  /**
187
187
  * @zh 分页按钮
@@ -210,37 +210,43 @@ const ne = /* @__PURE__ */ F({
210
210
  * @slot total
211
211
  * @binding {number} total
212
212
  */
213
- setup(e, {
214
- emit: o,
215
- slots: f
213
+ setup(t, {
214
+ emit: f,
215
+ slots: o
216
216
  }) {
217
- const g = U("pagination"), {
218
- t: I
219
- } = W(), {
220
- disabled: P,
217
+ const c = X("pagination"), {
218
+ t: S
219
+ } = Y(), {
220
+ disabled: y,
221
221
  pageItemStyle: A,
222
222
  activePageItemStyle: E,
223
- size: L
224
- } = $(e), {
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
- const a = Math.min(Math.max(t, 1), u.value);
229
- a !== l.value && (p.value = a, o("update:current", a), o("change", a));
223
+ size: T
224
+ } = G(t), {
225
+ mergedSize: d
226
+ } = W(T), p = O(t.defaultCurrent), N = O(t.defaultPageSize), k = (e) => h(e) && Number.isFinite(e) && e > 0, w = (e, a = 10) => k(e) ? e : a, F = g(() => t.current ?? p.value), z = g(() => w(t.pageSize ?? N.value, w(t.defaultPageSize))), P = g(() => {
227
+ const e = t.total;
228
+ return h(e) && Number.isFinite(e) && e > 0 ? e : 0;
229
+ }), x = g(() => {
230
+ const e = F.value;
231
+ return h(e) && Number.isFinite(e) ? e : 1;
232
+ }), u = g(() => Math.max(Math.ceil(P.value / z.value), 1)), l = g(() => Math.min(Math.max(x.value, 1), u.value)), C = (e) => {
233
+ if (e !== l.value && h(e) && !t.disabled) {
234
+ const a = Math.min(Math.max(e, 1), u.value);
235
+ a !== l.value && (p.value = a, f("update:current", a), f("change", a));
230
236
  }
231
- }, J = (t) => {
232
- k(t) && (C.value = t, o("update:pageSize", t), o("pageSizeChange", t));
233
- }, s = D({
237
+ }, J = (e) => {
238
+ k(e) && (N.value = e, f("update:pageSize", e), f("pageSizeChange", e));
239
+ }, s = H({
234
240
  current: l,
235
241
  style: A,
236
242
  activeStyle: E,
237
- onClick: z
243
+ onClick: C
238
244
  }), V = {
239
245
  get current() {
240
246
  return s.current;
241
247
  },
242
248
  get disabled() {
243
- return P.value;
249
+ return y.value;
244
250
  },
245
251
  get style() {
246
252
  return s.style;
@@ -251,12 +257,12 @@ const ne = /* @__PURE__ */ F({
251
257
  get onClick() {
252
258
  return s.onClick;
253
259
  }
254
- }, w = {
260
+ }, M = {
255
261
  get current() {
256
262
  return s.current;
257
263
  },
258
264
  get disabled() {
259
- return P.value;
265
+ return y.value;
260
266
  },
261
267
  get style() {
262
268
  return s.style;
@@ -271,6 +277,9 @@ const ne = /* @__PURE__ */ F({
271
277
  get current() {
272
278
  return s.current;
273
279
  },
280
+ get disabled() {
281
+ return y.value;
282
+ },
274
283
  get style() {
275
284
  return s.style;
276
285
  },
@@ -280,116 +289,116 @@ const ne = /* @__PURE__ */ F({
280
289
  get pages() {
281
290
  return u.value;
282
291
  }
283
- }, r = (t, a = {}) => t === "more" ? n(H, b(a, _), {
284
- default: f["page-item-ellipsis"]
285
- }) : t === "previous" ? n(O, b({
292
+ }, r = (e, a = {}) => e === "more" ? n(Q, b(a, _), {
293
+ default: o["page-item-ellipsis"]
294
+ }) : e === "previous" ? n(L, b({
286
295
  type: "previous"
287
- }, a, w), {
288
- default: f["page-item-step"]
289
- }) : t === "next" ? n(O, b({
296
+ }, a, M), {
297
+ default: o["page-item-step"]
298
+ }) : e === "next" ? n(L, b({
290
299
  type: "next"
291
- }, a, w), {
292
- default: f["page-item-step"]
293
- }) : n(G, b(a, V), {
294
- default: f["page-item"]
295
- }), R = d(() => {
296
- const t = [];
297
- if (u.value < e.baseSize + e.bufferSize * 2)
300
+ }, a, M), {
301
+ default: o["page-item-step"]
302
+ }) : n(K, b(a, V), {
303
+ default: o["page-item"]
304
+ }), R = g(() => {
305
+ const e = [];
306
+ if (u.value < t.baseSize + t.bufferSize * 2)
298
307
  for (let a = 1; a <= u.value; a++)
299
- t.push(r("page", {
308
+ e.push(r("page", {
300
309
  key: a,
301
310
  pageNumber: a
302
311
  }));
303
312
  else {
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", {
313
+ let a = 1, m = u.value, i = !1, j = !1;
314
+ l.value > 2 + t.bufferSize && (i = !0, a = Math.min(l.value - t.bufferSize, u.value - 2 * t.bufferSize)), l.value < u.value - (t.bufferSize + 1) && (j = !0, m = Math.max(l.value + t.bufferSize, 2 * t.bufferSize + 1)), i && (e.push(r("page", {
306
315
  key: 1,
307
316
  pageNumber: 1
308
- })), t.push(r("more", {
317
+ })), e.push(r("more", {
309
318
  key: "left-ellipsis-pager",
310
- step: -(e.bufferSize * 2 + 1)
319
+ step: -(t.bufferSize * 2 + 1)
311
320
  })));
312
- for (let v = a; v <= c; v++)
313
- t.push(r("page", {
321
+ for (let v = a; v <= m; v++)
322
+ e.push(r("page", {
314
323
  key: v,
315
324
  pageNumber: v
316
325
  }));
317
- x && (t.push(r("more", {
326
+ j && (e.push(r("more", {
318
327
  key: "right-ellipsis-pager",
319
- step: e.bufferSize * 2 + 1
320
- })), t.push(r("page", {
328
+ step: t.bufferSize * 2 + 1
329
+ })), e.push(r("page", {
321
330
  key: u.value,
322
331
  pageNumber: u.value
323
332
  })));
324
333
  }
325
- return t;
326
- }), T = () => e.simple ? n("span", {
327
- class: g.element("simple")
334
+ return e;
335
+ }), q = () => t.simple ? n("span", {
336
+ class: c.element("simple")
328
337
  }, [r("previous", {
329
338
  simple: !0
330
- }), n(B, {
331
- disabled: e.disabled,
339
+ }), n(I, {
340
+ disabled: t.disabled,
332
341
  current: l.value,
333
- size: m.value,
342
+ size: d.value,
334
343
  pages: u.value,
335
344
  simple: !0,
336
- onChange: z
345
+ onChange: C
337
346
  }, null), r("next", {
338
347
  simple: !0
339
348
  })]) : n("ul", {
340
- class: g.element("list")
341
- }, [r("previous"), R.value, e.showMore && r("more", {
349
+ class: c.element("list")
350
+ }, [r("previous"), R.value, t.showMore && r("more", {
342
351
  key: "more",
343
- step: e.bufferSize * 2 + 1
352
+ step: t.bufferSize * 2 + 1
344
353
  }), r("next")]);
345
- j(y, (t, a) => {
346
- if (e.autoAdjust && t !== a && l.value > 1) {
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));
354
+ B(z, (e, a) => {
355
+ if (t.autoAdjust && e !== a && l.value > 1) {
356
+ const m = a * (l.value - 1) + 1, i = Math.ceil(m / e);
357
+ i !== l.value && (p.value = i, f("update:current", i), f("change", i));
349
358
  }
350
- }), j(u, (t, a) => {
351
- if (!e.autoAdjust || t === a)
352
- return;
353
- const c = S.value;
354
- if (!h(c) || c <= t)
359
+ }), B(u, (e, a) => {
360
+ if (!t.autoAdjust || e === a || x.value <= e)
355
361
  return;
356
- const i = Math.max(t, 1);
357
- p.value = i, o("update:current", i), o("change", i);
362
+ const i = Math.max(e, 1);
363
+ p.value = i, f("update:current", i), f("change", i);
358
364
  });
359
- const q = d(() => [g.block, g.modifier(`size-${m.value}`), {
360
- [g.modifier("simple")]: e.simple,
361
- [g.modifier("disabled")]: e.disabled
365
+ const $ = g(() => [c.block, c.modifier(`size-${d.value}`), {
366
+ [c.modifier("simple")]: t.simple,
367
+ [c.modifier("disabled")]: t.disabled
362
368
  }]);
363
369
  return () => {
364
- var t;
365
- return e.hideOnSinglePage && u.value <= 1 ? null : n("div", {
366
- class: q.value
367
- }, [e.showTotal && n("span", {
368
- class: g.element("total")
369
- }, [((t = f.total) == null ? void 0 : t.call(f, {
370
- total: e.total
371
- })) ?? I("pagination.total", {
372
- total: e.total
373
- })]), T(), e.showPageSize && n(K, {
374
- disabled: e.disabled,
375
- sizeOptions: e.pageSizeOptions,
376
- pageSize: y.value,
377
- size: m.value,
370
+ var e;
371
+ return t.hideOnSinglePage && u.value <= 1 ? null : n("div", {
372
+ class: $.value,
373
+ role: "navigation",
374
+ "aria-label": S("pagination.ariaLabel")
375
+ }, [t.showTotal && n("span", {
376
+ class: c.element("total")
377
+ }, [((e = o.total) == null ? void 0 : e.call(o, {
378
+ total: P.value
379
+ })) ?? S("pagination.total", {
380
+ total: P.value
381
+ })]), q(), t.showPageSize && n(U, {
382
+ disabled: t.disabled,
383
+ sizeOptions: t.pageSizeOptions,
384
+ pageSize: z.value,
385
+ size: d.value,
378
386
  onChange: J,
379
- selectProps: e.pageSizeProps
380
- }, null), !e.simple && e.showJumper && n(B, {
381
- disabled: e.disabled,
387
+ selectProps: t.pageSizeProps
388
+ }, null), !t.simple && t.showJumper && n(I, {
389
+ disabled: t.disabled,
382
390
  current: l.value,
383
391
  pages: u.value,
384
- size: m.value,
385
- onChange: z
392
+ size: d.value,
393
+ ariaLabel: S("pagination.jumpTo"),
394
+ onChange: C
386
395
  }, {
387
- "jumper-prepend": f["jumper-prepend"],
388
- "jumper-append": f["jumper-append"]
396
+ "jumper-prepend": o["jumper-prepend"],
397
+ "jumper-append": o["jumper-append"]
389
398
  })]);
390
399
  };
391
400
  }
392
401
  });
393
402
  export {
394
- ne as default
403
+ oe as default
395
404
  };
@@ -1,23 +1,24 @@
1
- import r from "./page-item-ellipsis.vue2.js";
2
- import { resolveComponent as a, openBlock as t, createElementBlock as i, normalizeClass as s, renderSlot as p, createVNode as d } from "vue";
1
+ import l from "./page-item-ellipsis.vue2.js";
2
+ import { resolveComponent as i, openBlock as r, createElementBlock as s, normalizeClass as d, renderSlot as t, createVNode as p } from "vue";
3
3
  import m from "../../_virtual/_plugin-vue_export-helper.js";
4
- const f = ["aria-label"];
5
- function u(e, o, c, g, k, C) {
6
- const l = a("icon-more");
7
- return t(), i("li", {
8
- class: s(e.cls),
4
+ const b = ["tabindex", "aria-label", "aria-disabled"];
5
+ function f(e, o, u, g, k, C) {
6
+ const a = i("icon-more");
7
+ return r(), s("li", {
8
+ class: d(e.cls),
9
9
  role: "button",
10
- tabindex: "0",
10
+ tabindex: e.disabled ? -1 : 0,
11
11
  "aria-label": e.t("pagination.jumpToPage", { page: e.nextPage }),
12
+ "aria-disabled": e.disabled || void 0,
12
13
  onClick: o[0] || (o[0] = (...n) => e.handleClick && e.handleClick(...n)),
13
14
  onKeydown: o[1] || (o[1] = (...n) => e.handleKeyDown && e.handleKeyDown(...n))
14
15
  }, [
15
- p(e.$slots, "default", {}, () => [
16
- d(l)
16
+ t(e.$slots, "default", {}, () => [
17
+ p(a)
17
18
  ])
18
- ], 42, f);
19
+ ], 42, b);
19
20
  }
20
- const y = /* @__PURE__ */ m(r, [["render", u]]);
21
+ const y = /* @__PURE__ */ m(l, [["render", f]]);
21
22
  export {
22
23
  y as default
23
24
  };
@@ -1,9 +1,9 @@
1
- import { defineComponent as l, computed as i } from "vue";
1
+ import { defineComponent as c, computed as i } from "vue";
2
2
  import p from "../../icons/_self/more-dot.js";
3
3
  import { getLegalPage as u } from "./utils.js";
4
4
  import { getClassNameMixin as f } from "../../_utils/config.js";
5
5
  import { useLocale as d } from "../../locale/index.js";
6
- const x = l({
6
+ const x = c({
7
7
  name: "EllipsisPager",
8
8
  components: {
9
9
  IconMore: p
@@ -20,28 +20,32 @@ const x = l({
20
20
  pages: {
21
21
  type: Number,
22
22
  required: !0
23
+ },
24
+ disabled: {
25
+ type: Boolean,
26
+ default: !1
23
27
  }
24
28
  },
25
29
  emits: ["click"],
26
- setup(t, { emit: m }) {
27
- const o = f("pagination--item"), { t: s } = d(), r = i(
28
- () => u(t.current + t.step, {
30
+ setup(e, { emit: a }) {
31
+ const o = f("pagination--item"), { t: s } = d(), n = i(
32
+ () => u(e.current + e.step, {
29
33
  min: 1,
30
- max: t.pages
34
+ max: e.pages
31
35
  })
32
- ), n = (e) => {
33
- m("click", r.value);
34
- }, a = (e) => {
35
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), n());
36
- }, c = i(() => [o.block, o.modifier("ellipsis")]);
36
+ ), r = (t) => {
37
+ e.disabled || a("click", n.value);
38
+ }, m = (t) => {
39
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), r());
40
+ }, l = i(() => [o.block, o.modifier("ellipsis")]);
37
41
  return {
38
42
  t: s,
39
43
  className: o,
40
- cls: c,
44
+ cls: l,
41
45
  // 模板的 aria-label 需要它(点击后真正跳转到的页码)
42
- nextPage: r,
43
- handleClick: n,
44
- handleKeyDown: a
46
+ nextPage: n,
47
+ handleClick: r,
48
+ handleKeyDown: m
45
49
  };
46
50
  }
47
51
  });
@@ -1,7 +1,7 @@
1
- import i from "./page-jumper.vue2.js";
2
- import { resolveComponent as u, openBlock as s, createElementBlock as n, normalizeClass as a, renderSlot as p, createTextVNode as f, toDisplayString as r, createCommentVNode as l, createVNode as g, Fragment as N, createElementVNode as m } from "vue";
3
- import V from "../../_virtual/_plugin-vue_export-helper.js";
4
- function $(e, o, b, c, C, h) {
1
+ import d from "./page-jumper.vue2.js";
2
+ import { resolveComponent as u, openBlock as s, createElementBlock as n, normalizeClass as a, renderSlot as r, createTextVNode as g, toDisplayString as p, createCommentVNode as l, createVNode as f, Fragment as N, createElementVNode as m } from "vue";
3
+ import b from "../../_virtual/_plugin-vue_export-helper.js";
4
+ function V(e, o, $, C, h, j) {
5
5
  const t = u("input-number");
6
6
  return s(), n("span", {
7
7
  class: a(e.cls)
@@ -10,13 +10,13 @@ function $(e, o, b, c, C, h) {
10
10
  key: 0,
11
11
  class: a([e.className.element("prepend"), e.className.modifier("text-goto")])
12
12
  }, [
13
- p(e.$slots, "jumper-prepend", {}, () => [
14
- f(r(e.t("pagination.jumpTo")), 1)
13
+ r(e.$slots, "jumper-prepend", {}, () => [
14
+ g(p(e.t("pagination.jumpTo")), 1)
15
15
  ])
16
16
  ], 2)),
17
- g(t, {
17
+ f(t, {
18
18
  modelValue: e.inputValue,
19
- "onUpdate:modelValue": o[0] || (o[0] = (d) => e.inputValue = d),
19
+ "onUpdate:modelValue": o[0] || (o[0] = (i) => e.inputValue = i),
20
20
  class: a(e.className.element("input")),
21
21
  min: 1,
22
22
  max: e.pages,
@@ -24,13 +24,14 @@ function $(e, o, b, c, C, h) {
24
24
  disabled: e.disabled,
25
25
  "hide-button": "",
26
26
  formatter: e.handleFormatter,
27
+ "aria-label": e.ariaLabel || e.t("pagination.jumpTo"),
27
28
  onChange: e.handleChange
28
- }, null, 8, ["modelValue", "class", "max", "size", "disabled", "formatter", "onChange"]),
29
+ }, null, 8, ["modelValue", "class", "max", "size", "disabled", "formatter", "aria-label", "onChange"]),
29
30
  e.$slots["jumper-append"] ? (s(), n("span", {
30
31
  key: 1,
31
32
  class: a(e.className.element("append"))
32
33
  }, [
33
- p(e.$slots, "jumper-append")
34
+ r(e.$slots, "jumper-append")
34
35
  ], 2)) : l("", !0),
35
36
  e.simple ? (s(), n(N, { key: 2 }, [
36
37
  m("span", {
@@ -38,11 +39,11 @@ function $(e, o, b, c, C, h) {
38
39
  }, "/", 2),
39
40
  m("span", {
40
41
  class: a(e.className.element("total-page"))
41
- }, r(e.pages), 3)
42
+ }, p(e.pages), 3)
42
43
  ], 64)) : l("", !0)
43
44
  ], 2);
44
45
  }
45
- const z = /* @__PURE__ */ V(i, [["render", $]]);
46
+ const z = /* @__PURE__ */ b(d, [["render", V]]);
46
47
  export {
47
48
  z as default
48
49
  };
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as l, ref as c, watch as p, computed as d, nextTick as f } from "vue";
2
2
  import { InputNumber as g } from "../form-input-number/index.js";
3
3
  import { getClassNameMixin as N } from "../../_utils/config.js";
4
- import { useLocale as h } from "../../locale/index.js";
5
- const x = l({
4
+ import { useLocale as b } from "../../locale/index.js";
5
+ const S = l({
6
6
  name: "PageJumper",
7
7
  components: {
8
8
  InputNumber: g
@@ -27,13 +27,16 @@ const x = l({
27
27
  size: {
28
28
  type: String
29
29
  },
30
+ ariaLabel: {
31
+ type: String
32
+ },
30
33
  onChange: {
31
34
  type: Function
32
35
  }
33
36
  },
34
37
  emits: ["change"],
35
38
  setup(e, { emit: i }) {
36
- const a = N("pagination--jumper"), { t: o } = h(), t = c(e.simple ? e.current : void 0), m = (n) => {
39
+ const a = N("pagination--jumper"), { t: o } = b(), t = c(e.simple ? e.current : void 0), m = (n) => {
37
40
  const r = parseInt(n.toString(), 10);
38
41
  return Number.isNaN(r) ? void 0 : String(r);
39
42
  }, s = (n) => {
@@ -64,5 +67,5 @@ const x = l({
64
67
  }
65
68
  });
66
69
  export {
67
- x as default
70
+ S as default
68
71
  };
@@ -6,12 +6,13 @@ function m(e, d, c, f, u, g) {
6
6
  return a(), l("span", {
7
7
  class: r(e.className.block)
8
8
  }, [
9
- p(o, t({
9
+ p(o, t(e.selectProps, {
10
10
  "model-value": e.pageSize,
11
11
  options: e.options,
12
12
  size: e.size,
13
- disabled: e.disabled
14
- }, e.selectProps, { onChange: e.handleChange }), null, 16, ["model-value", "options", "size", "disabled", "onChange"])
13
+ disabled: e.disabled,
14
+ onChange: e.handleChange
15
+ }), null, 16, ["model-value", "options", "size", "disabled", "onChange"])
15
16
  ], 2);
16
17
  }
17
18
  const b = /* @__PURE__ */ i(s, [["render", m]]);
@@ -1,11 +1,12 @@
1
- import { defineComponent as p, computed as a } from "vue";
2
- import { Select as r } from "../form-select/index.js";
3
- import { getClassNameMixin as m } from "../../_utils/config.js";
4
- import { useLocale as c } from "../../locale/index.js";
5
- const u = p({
1
+ import { defineComponent as r, computed as m } from "vue";
2
+ import { Select as c } from "../form-select/index.js";
3
+ import { getClassNameMixin as g } from "../../_utils/config.js";
4
+ import { useLocale as f } from "../../locale/index.js";
5
+ import { isNumber as u } from "../../_utils/is.js";
6
+ const y = r({
6
7
  name: "PageOptions",
7
8
  components: {
8
- Select: r
9
+ Select: c
9
10
  },
10
11
  props: {
11
12
  sizeOptions: {
@@ -25,16 +26,17 @@ const u = p({
25
26
  }
26
27
  },
27
28
  emits: ["change"],
28
- setup(t, { emit: n }) {
29
- const o = m("pagination--options"), { t: i } = c(), s = a(
30
- () => t.sizeOptions.map((e) => ({
31
- value: e,
32
- label: i("pagination.pageSizeOption", { size: e })
33
- }))
34
- );
29
+ setup(i, { emit: n }) {
30
+ const o = g("pagination--options"), { t: s } = f(), a = m(() => {
31
+ const e = i.sizeOptions.slice();
32
+ return u(i.pageSize) && i.pageSize > 0 && !e.includes(i.pageSize) && (e.push(i.pageSize), e.sort((t, p) => t - p)), e.map((t) => ({
33
+ value: t,
34
+ label: s("pagination.pageSizeOption", { size: t })
35
+ }));
36
+ });
35
37
  return {
36
38
  className: o,
37
- options: s,
39
+ options: a,
38
40
  handleChange: (e) => {
39
41
  typeof e == "number" && Number.isFinite(e) && e > 0 && n("change", e);
40
42
  }
@@ -42,5 +44,5 @@ const u = p({
42
44
  }
43
45
  });
44
46
  export {
45
- u as default
47
+ y as default
46
48
  };
@@ -1,14 +1,16 @@
1
1
  import r from "./Skeleton.vue2.js";
2
- import { openBlock as t, createElementBlock as s, normalizeClass as n, renderSlot as o } from "vue";
3
- import l from "../../_virtual/_plugin-vue_export-helper.js";
4
- function a(e, c, p, f, i, m) {
5
- return t(), s("div", {
6
- class: n(e.cls)
2
+ import { openBlock as s, createElementBlock as t, normalizeClass as n, renderSlot as e } from "vue";
3
+ import a from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const l = ["aria-busy"];
5
+ function i(o, d, c, p, f, m) {
6
+ return s(), t("div", {
7
+ class: n(o.cls),
8
+ "aria-busy": o.loading ? "true" : void 0
7
9
  }, [
8
- e.loading ? o(e.$slots, "default", { key: 0 }) : o(e.$slots, "content", { key: 1 })
9
- ], 2);
10
+ o.loading ? e(o.$slots, "default", { key: 0 }) : e(o.$slots, "content", { key: 1 })
11
+ ], 10, l);
10
12
  }
11
- const u = /* @__PURE__ */ l(r, [["render", a]]);
13
+ const k = /* @__PURE__ */ a(r, [["render", i]]);
12
14
  export {
13
- u as default
15
+ k as default
14
16
  };
@@ -1,18 +1,19 @@
1
1
  import t from "./SkeletonLine.vue2.js";
2
- import { openBlock as r, createElementBlock as l, normalizeClass as n, Fragment as a, renderList as m, normalizeStyle as c } from "vue";
3
- import i from "../../_virtual/_plugin-vue_export-helper.js";
4
- function p(e, u, f, _, d, k) {
2
+ import { openBlock as r, createElementBlock as l, normalizeClass as n, Fragment as a, renderList as i, normalizeStyle as m } from "vue";
3
+ import c from "../../_virtual/_plugin-vue_export-helper.js";
4
+ function p(e, u, f, d, _, k) {
5
5
  return r(), l("ul", {
6
- class: n(e.className.block)
6
+ class: n(e.className.block),
7
+ "aria-hidden": "true"
7
8
  }, [
8
- (r(!0), l(a, null, m(e.lines, (o, s) => (r(), l("li", {
9
+ (r(!0), l(a, null, i(e.lines, (o, s) => (r(), l("li", {
9
10
  key: s,
10
11
  class: n(e.className.element("row")),
11
- style: c(o)
12
+ style: m(o)
12
13
  }, null, 6))), 128))
13
14
  ], 2);
14
15
  }
15
- const B = /* @__PURE__ */ i(t, [["render", p]]);
16
+ const z = /* @__PURE__ */ c(t, [["render", p]]);
16
17
  export {
17
- B as default
18
+ z as default
18
19
  };