bj-web-components 0.2.33 → 0.2.35

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 (113) hide show
  1. package/README.md +10 -1
  2. package/dist/index.d.ts +160 -15
  3. package/dist/index.js +58 -1
  4. package/dist/index.mjs +15 -39
  5. package/dist/miniapp.js +1 -1
  6. package/dist/miniapp.mjs +0 -1
  7. package/dist/mobile.js +1 -1
  8. package/dist/mobile.mjs +0 -1
  9. package/dist/react.js +1 -1
  10. package/dist/react.mjs +0 -1
  11. package/dist/shared.js +1 -1
  12. package/dist/shared.mjs +0 -1
  13. package/dist/style.css +1 -1
  14. package/dist/web/BasicInput/BInput.js +278 -1
  15. package/dist/web/BasicInput/BInput.mjs +263 -164
  16. package/dist/web/BasicInput/utils.js +47 -1
  17. package/dist/web/BasicInput/utils.mjs +22 -20
  18. package/dist/web/CategoryDropdown/CategoryDropdown.js +376 -1
  19. package/dist/web/CategoryDropdown/CategoryDropdown.mjs +355 -235
  20. package/dist/web/CheckBox/BCheckBox.js +176 -1
  21. package/dist/web/CheckBox/BCheckBox.mjs +169 -96
  22. package/dist/web/CheckBox/Group.js +111 -1
  23. package/dist/web/CheckBox/Group.mjs +106 -64
  24. package/dist/web/CheckBox/context.js +8 -1
  25. package/dist/web/CheckBox/context.mjs +2 -4
  26. package/dist/web/CheckBox/index.js +11 -1
  27. package/dist/web/CheckBox/index.mjs +2 -4
  28. package/dist/web/Dropdown/BDropdown.js +265 -1
  29. package/dist/web/Dropdown/BDropdown.mjs +234 -134
  30. package/dist/web/EmptyInputBox/EmptyInputBox.js +89 -1
  31. package/dist/web/EmptyInputBox/EmptyInputBox.mjs +85 -72
  32. package/dist/web/FileCard/FileCard.js +414 -1
  33. package/dist/web/FileCard/FileCard.mjs +400 -116
  34. package/dist/web/Icon/Icon.js +82 -1
  35. package/dist/web/Icon/Icon.mjs +78 -8
  36. package/dist/web/Input/Input.js +230 -1
  37. package/dist/web/Input/Input.mjs +219 -164
  38. package/dist/web/InputNumber/BInputNumber.js +271 -1
  39. package/dist/web/InputNumber/BInputNumber.mjs +254 -189
  40. package/dist/web/InputNumber/StepHandler.js +112 -1
  41. package/dist/web/InputNumber/StepHandler.mjs +102 -50
  42. package/dist/web/InputNumber/hooks/useCursor.js +38 -1
  43. package/dist/web/InputNumber/hooks/useCursor.mjs +31 -34
  44. package/dist/web/InputNumber/hooks/useFrame.js +15 -1
  45. package/dist/web/InputNumber/hooks/useFrame.mjs +8 -5
  46. package/dist/web/InputNumber/utils/decimal.js +163 -1
  47. package/dist/web/InputNumber/utils/decimal.mjs +114 -79
  48. package/dist/web/MobileDrawer/BMobileDrawer.js +238 -0
  49. package/dist/web/MobileDrawer/BMobileDrawer.mjs +233 -0
  50. package/dist/web/Modal/Modal.js +148 -1
  51. package/dist/web/Modal/Modal.mjs +143 -79
  52. package/dist/web/OverlayScrollbar/BOverlayScrollbar.js +273 -1
  53. package/dist/web/OverlayScrollbar/BOverlayScrollbar.mjs +262 -143
  54. package/dist/web/Pagination/Pagination.js +352 -1
  55. package/dist/web/Pagination/Pagination.mjs +342 -247
  56. package/dist/web/ProductField/ProductField.js +443 -1
  57. package/dist/web/ProductField/ProductField.mjs +423 -208
  58. package/dist/web/ProductField/arrow-up.svg.js +4 -1
  59. package/dist/web/ProductField/arrow-up.svg.mjs +2 -4
  60. package/dist/web/ProductField/checkbox-no.svg.js +4 -1
  61. package/dist/web/ProductField/checkbox-no.svg.mjs +2 -4
  62. package/dist/web/ProductField/checkbox-ok.svg.js +4 -1
  63. package/dist/web/ProductField/checkbox-ok.svg.mjs +2 -4
  64. package/dist/web/ProductField/no_data_light.svg.js +4 -1
  65. package/dist/web/ProductField/no_data_light.svg.mjs +2 -4
  66. package/dist/web/ProductField/search.svg.js +4 -1
  67. package/dist/web/ProductField/search.svg.mjs +2 -4
  68. package/dist/web/ProductField/sort.svg.js +4 -1
  69. package/dist/web/ProductField/sort.svg.mjs +2 -4
  70. package/dist/web/Radio/BRadio.js +151 -0
  71. package/dist/web/Radio/BRadio.mjs +151 -0
  72. package/dist/web/Radio/Button.js +54 -0
  73. package/dist/web/Radio/Button.mjs +52 -0
  74. package/dist/web/Radio/Group.js +97 -0
  75. package/dist/web/Radio/Group.mjs +96 -0
  76. package/dist/web/Radio/context.js +10 -0
  77. package/dist/web/Radio/context.mjs +4 -0
  78. package/dist/web/Radio/index.js +13 -0
  79. package/dist/web/Radio/index.mjs +8 -0
  80. package/dist/web/SkuInputCard/SkuInputCard.js +427 -1
  81. package/dist/web/SkuInputCard/SkuInputCard.mjs +414 -219
  82. package/dist/web/SkuInputCard/spin_loading_red.gif.js +4 -1
  83. package/dist/web/SkuInputCard/spin_loading_red.gif.mjs +2 -4
  84. package/dist/web/Switch/Switch.js +114 -1
  85. package/dist/web/Switch/Switch.mjs +109 -58
  86. package/dist/web/Table/BTable.js +1049 -1
  87. package/dist/web/Table/BTable.mjs +1011 -667
  88. package/dist/web/Table/Column.js +6 -1
  89. package/dist/web/Table/Column.mjs +1 -3
  90. package/dist/web/Table/ColumnGroup.js +6 -1
  91. package/dist/web/Table/ColumnGroup.mjs +1 -3
  92. package/dist/web/Table/utils/columns.js +116 -1
  93. package/dist/web/Table/utils/columns.mjs +103 -37
  94. package/dist/web/Table/utils/sortFilter.js +145 -1
  95. package/dist/web/Table/utils/sortFilter.mjs +129 -57
  96. package/dist/web/Tabs/BTabs.js +260 -1
  97. package/dist/web/Tabs/BTabs.mjs +239 -122
  98. package/dist/web/Tabs/TabPane.js +19 -1
  99. package/dist/web/Tabs/TabPane.mjs +1 -4
  100. package/dist/web/Tooltip/ConfirmTooltip.js +53 -1
  101. package/dist/web/Tooltip/ConfirmTooltip.mjs +47 -22
  102. package/dist/web/Tooltip/ContentTooltip.js +156 -1
  103. package/dist/web/Tooltip/ContentTooltip.mjs +145 -76
  104. package/dist/web/Tooltip/ProgressTooltip.js +56 -1
  105. package/dist/web/Tooltip/ProgressTooltip.mjs +50 -31
  106. package/dist/web/Tooltip/TooltipWrapper.js +19 -1
  107. package/dist/web/Tooltip/TooltipWrapper.mjs +13 -9
  108. package/dist/web/Tooltip/useAutoPlacement.js +65 -1
  109. package/dist/web/Tooltip/useAutoPlacement.mjs +52 -24
  110. package/dist/web.d.ts +160 -15
  111. package/dist/web.js +58 -1
  112. package/dist/web.mjs +15 -39
  113. package/package.json +97 -94
@@ -1,253 +1,348 @@
1
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
2
- import { useState as w, useRef as T, useEffect as rt, useMemo as ct } from "react";
3
- import { createPortal as dt } from "react-dom";
1
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
2
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
4
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
5
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
7
+ import { jsx as i, jsxs as s } from "react/jsx-runtime";
8
+ import { useState as w, useRef as T, useEffect as re, useMemo as ce } from "react";
9
+ import { createPortal as de } from "react-dom";
4
10
  /* empty css */
5
- function pt({
6
- triggerRect: v,
7
- dropdownHeight: r,
8
- viewportHeight: k
9
- }) {
10
- const L = k - v.bottom, z = v.top;
11
- return L < r && z >= r ? "top" : "bottom";
11
+ function pe(_ref) {
12
+ var L = _ref.triggerRect,
13
+ c = _ref.dropdownHeight,
14
+ z = _ref.viewportHeight;
15
+ var h = z - L.bottom,
16
+ P = L.top;
17
+ return h < c && P >= c ? "top" : "bottom";
12
18
  }
13
- const ft = (v) => {
14
- const {
15
- current: r,
16
- defaultCurrent: k = 1,
17
- pageSize: L,
18
- defaultPageSize: z = 10,
19
- total: b = 0,
20
- onChange: c,
21
- onShowSizeChange: x,
22
- showSizeChanger: H = !1,
23
- showQuickJumper: J = !1,
24
- pageSizeOptions: $ = [10, 20, 50, 100],
25
- disabled: l = !1,
26
- hideOnSinglePage: Q = !1,
27
- showTotal: M,
28
- size: W = "medium",
29
- align: q = "start",
30
- simple: F = !1,
31
- popupPlacement: d,
32
- resolvePopupPlacement: y,
33
- dropdownClassName: S,
34
- t: N = (t) => t,
35
- className: E,
36
- style: B
37
- } = v, [G, O] = w(k), [K, U] = w(z), [m, g] = w(!1), [f, V] = w("bottom"), [P, X] = w(null), p = T(null), R = T(null), o = r ?? G, u = L ?? K, s = Math.ceil(b / u);
38
- if (Q && s <= 1)
39
- return null;
40
- const h = (t) => {
41
- l || t < 1 || t > s || t === o || (r === void 0 && O(t), c == null || c(t, u));
42
- }, Y = (t) => {
43
- const n = Math.ceil(b / t), e = Math.min(o, n) || 1;
44
- L === void 0 && (U(t), r === void 0 && O(e)), x == null || x(e, t), c == null || c(e, t);
45
- }, D = (t) => {
46
- if (!p.current) return;
47
- const n = p.current.getBoundingClientRect();
48
- X({
49
- left: n.left + n.width / 2,
50
- top: t === "bottom" ? n.bottom + 4 : n.top - 4
51
- });
52
- }, _ = () => {
53
- if (l) return;
54
- if (m) {
55
- g(!1);
56
- return;
57
- }
58
- let t = f;
59
- if (d === void 0 && p.current) {
60
- const n = p.current.getBoundingClientRect(), e = $.length * 40 + 8, C = window.innerHeight;
61
- t = (y == null ? void 0 : y({ triggerRect: n, dropdownHeight: e, viewportHeight: C })) ?? pt({ triggerRect: n, dropdownHeight: e, viewportHeight: C }), V(t);
62
- }
63
- D(d ?? t), g(!0);
64
- }, tt = (t) => {
65
- Y(t), g(!1);
66
- };
67
- rt(() => {
68
- const t = (C) => {
69
- var Z, A;
70
- const I = C.target;
71
- (Z = p.current) != null && Z.contains(I) || (A = R.current) != null && A.contains(I) || g(!1);
72
- }, n = () => g(!1), e = () => D(d ?? f);
73
- if (m)
74
- return document.addEventListener("mousedown", t), document.addEventListener("scroll", n, !0), window.addEventListener("resize", e), () => {
75
- document.removeEventListener("mousedown", t), document.removeEventListener("scroll", n, !0), window.removeEventListener("resize", e);
19
+ var fe = function fe(L) {
20
+ var c = L.current,
21
+ _L$defaultCurrent = L.defaultCurrent,
22
+ z = _L$defaultCurrent === void 0 ? 1 : _L$defaultCurrent,
23
+ h = L.pageSize,
24
+ _L$defaultPageSize = L.defaultPageSize,
25
+ P = _L$defaultPageSize === void 0 ? 10 : _L$defaultPageSize,
26
+ _L$total = L.total,
27
+ b = _L$total === void 0 ? 0 : _L$total,
28
+ N = L.onChange,
29
+ S = L.onShowSizeChange,
30
+ _L$showSizeChanger = L.showSizeChanger,
31
+ _ = _L$showSizeChanger === void 0 ? !1 : _L$showSizeChanger,
32
+ _L$showQuickJumper = L.showQuickJumper,
33
+ H = _L$showQuickJumper === void 0 ? !1 : _L$showQuickJumper,
34
+ _L$pageSizeOptions = L.pageSizeOptions,
35
+ y = _L$pageSizeOptions === void 0 ? [10, 20, 50, 100] : _L$pageSizeOptions,
36
+ _L$disabled = L.disabled,
37
+ a = _L$disabled === void 0 ? !1 : _L$disabled,
38
+ _L$hideOnSinglePage = L.hideOnSinglePage,
39
+ J = _L$hideOnSinglePage === void 0 ? !1 : _L$hideOnSinglePage,
40
+ $ = L.showTotal,
41
+ _L$size = L.size,
42
+ Q = _L$size === void 0 ? "medium" : _L$size,
43
+ _L$align = L.align,
44
+ W = _L$align === void 0 ? "start" : _L$align,
45
+ _L$simple = L.simple,
46
+ q = _L$simple === void 0 ? !1 : _L$simple,
47
+ r = L.popupPlacement,
48
+ M = L.resolvePopupPlacement,
49
+ E = L.dropdownClassName,
50
+ _L$t = L.t,
51
+ k = _L$t === void 0 ? function (e) {
52
+ return e;
53
+ } : _L$t,
54
+ O = L.className,
55
+ B = L.style,
56
+ _w = w(z),
57
+ _w2 = _slicedToArray(_w, 2),
58
+ F = _w2[0],
59
+ R = _w2[1],
60
+ _w3 = w(P),
61
+ _w4 = _slicedToArray(_w3, 2),
62
+ G = _w4[0],
63
+ K = _w4[1],
64
+ _w5 = w(!1),
65
+ _w6 = _slicedToArray(_w5, 2),
66
+ m = _w6[0],
67
+ g = _w6[1],
68
+ _w7 = w("bottom"),
69
+ _w8 = _slicedToArray(_w7, 2),
70
+ f = _w8[0],
71
+ U = _w8[1],
72
+ _w9 = w(null),
73
+ _w0 = _slicedToArray(_w9, 2),
74
+ x = _w0[0],
75
+ V = _w0[1],
76
+ d = T(null),
77
+ D = T(null),
78
+ o = c != null ? c : F,
79
+ p = h != null ? h : G,
80
+ l = Math.ceil(b / p);
81
+ if (J && l <= 1) return null;
82
+ var u = function u(e) {
83
+ a || e < 1 || e > l || e === o || (c === void 0 && R(e), N == null || N(e, p));
84
+ },
85
+ X = function X(e) {
86
+ var t = Math.ceil(b / e),
87
+ n = Math.min(o, t) || 1;
88
+ h === void 0 && (K(e), c === void 0 && R(n)), S == null || S(n, e), N == null || N(n, e);
89
+ },
90
+ j = function j(e) {
91
+ if (!d.current) return;
92
+ var t = d.current.getBoundingClientRect();
93
+ V({
94
+ left: t.left + t.width / 2,
95
+ top: e === "bottom" ? t.bottom + 4 : t.top - 4
96
+ });
97
+ },
98
+ Y = function Y() {
99
+ var e;
100
+ if (a) return;
101
+ if (m) {
102
+ g(!1);
103
+ return;
104
+ }
105
+ var t = f;
106
+ if (r === void 0 && d.current) {
107
+ var n = d.current.getBoundingClientRect(),
108
+ C = y.length * 40 + 8,
109
+ v = window.innerHeight;
110
+ t = (e = M == null ? void 0 : M({
111
+ triggerRect: n,
112
+ dropdownHeight: C,
113
+ viewportHeight: v
114
+ })) != null ? e : pe({
115
+ triggerRect: n,
116
+ dropdownHeight: C,
117
+ viewportHeight: v
118
+ }), U(t);
119
+ }
120
+ j(r != null ? r : t), g(!0);
121
+ },
122
+ ee = function ee(e) {
123
+ X(e), g(!1);
124
+ };
125
+ re(function () {
126
+ var e = function e(C) {
127
+ var v, Z;
128
+ var A = C.target;
129
+ (v = d.current) != null && v.contains(A) || (Z = D.current) != null && Z.contains(A) || g(!1);
130
+ },
131
+ t = function t() {
132
+ return g(!1);
133
+ },
134
+ n = function n() {
135
+ return j(r != null ? r : f);
76
136
  };
77
- }, [m, d, f]);
78
- const et = (t) => {
79
- const n = parseInt(t.target.value);
80
- !isNaN(n) && n >= 1 && n <= s && h(n);
81
- }, nt = ct(() => {
82
- const t = [];
83
- if (s <= 7)
84
- for (let e = 1; e <= s; e++)
85
- t.push(e);
86
- else if (o <= 4) {
87
- for (let e = 1; e <= 5; e++)
88
- t.push(e);
89
- t.push("..."), t.push(s);
90
- } else if (o >= s - 3) {
91
- t.push(1), t.push("...");
92
- for (let e = s - 4; e <= s; e++)
93
- t.push(e);
94
- } else {
95
- t.push(1), t.push("...");
96
- for (let e = o - 1; e <= o + 1; e++)
97
- t.push(e);
98
- t.push("..."), t.push(s);
99
- }
100
- return t;
101
- }, [o, s]), it = (o - 1) * u + 1, ot = Math.min(o * u, b), st = `pagination-${W}`, at = `pagination-${q}`, j = l ? "pagination-disabled" : "", lt = (t, n) => t === "..." ? /* @__PURE__ */ i("span", { className: "pagination-item pagination-ellipsis", children: "..." }, `ellipsis-${n}`) : /* @__PURE__ */ i(
102
- "button",
103
- {
104
- type: "button",
105
- className: `pagination-item ${t === o ? "pagination-item-active" : ""}`,
106
- onClick: () => h(t),
107
- disabled: l,
108
- children: t
137
+ if (m) return document.addEventListener("mousedown", e), document.addEventListener("scroll", t, !0), window.addEventListener("resize", n), function () {
138
+ document.removeEventListener("mousedown", e), document.removeEventListener("scroll", t, !0), window.removeEventListener("resize", n);
139
+ };
140
+ }, [m, r, f]);
141
+ var ne = function ne(e) {
142
+ var t = parseInt(e.target.value);
143
+ !isNaN(t) && t >= 1 && t <= l && u(t);
109
144
  },
110
- t
111
- );
112
- return F ? /* @__PURE__ */ i(
113
- "div",
114
- {
115
- className: `pagination pagination-simple ${j} ${E || ""}`,
116
- style: B,
117
- children: /* @__PURE__ */ a("div", { className: "pagination-simple-list", children: [
118
- /* @__PURE__ */ i(
119
- "button",
120
- {
121
- type: "button",
122
- className: "pagination-simple-item pagination-simple-prev",
123
- onClick: () => h(o - 1),
124
- disabled: l || o === 1,
125
- children: /* @__PURE__ */ i("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ i("path", { d: "M8 2L4 6L8 10", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
126
- }
127
- ),
128
- /* @__PURE__ */ a("span", { className: "pagination-simple-text", children: [
129
- o,
130
- " / ",
131
- s || 0
132
- ] }),
133
- /* @__PURE__ */ i(
134
- "button",
135
- {
145
+ te = ce(function () {
146
+ var e = [];
147
+ if (l <= 7) for (var n = 1; n <= l; n++) e.push(n);else if (o <= 4) {
148
+ for (var _n = 1; _n <= 5; _n++) e.push(_n);
149
+ e.push("..."), e.push(l);
150
+ } else if (o >= l - 3) {
151
+ e.push(1), e.push("...");
152
+ for (var _n2 = l - 4; _n2 <= l; _n2++) e.push(_n2);
153
+ } else {
154
+ e.push(1), e.push("...");
155
+ for (var _n3 = o - 1; _n3 <= o + 1; _n3++) e.push(_n3);
156
+ e.push("..."), e.push(l);
157
+ }
158
+ return e;
159
+ }, [o, l]),
160
+ ie = (o - 1) * p + 1,
161
+ oe = Math.min(o * p, b),
162
+ le = "pagination-".concat(Q),
163
+ se = "pagination-".concat(W),
164
+ I = a ? "pagination-disabled" : "",
165
+ ae = function ae(e, t) {
166
+ return e === "..." ? /* @__PURE__ */i("span", {
167
+ className: "pagination-item pagination-ellipsis",
168
+ children: "..."
169
+ }, "ellipsis-".concat(t)) : /* @__PURE__ */i("button", {
170
+ type: "button",
171
+ className: "pagination-item ".concat(e === o ? "pagination-item-active" : ""),
172
+ onClick: function onClick() {
173
+ return u(e);
174
+ },
175
+ disabled: a,
176
+ children: e
177
+ }, e);
178
+ };
179
+ return q ? /* @__PURE__ */i("div", {
180
+ className: "pagination pagination-simple ".concat(I, " ").concat(O || ""),
181
+ style: B,
182
+ children: /* @__PURE__ */s("div", {
183
+ className: "pagination-simple-list",
184
+ children: [/* @__PURE__ */i("button", {
185
+ type: "button",
186
+ className: "pagination-simple-item pagination-simple-prev",
187
+ onClick: function onClick() {
188
+ return u(o - 1);
189
+ },
190
+ disabled: a || o === 1,
191
+ children: /* @__PURE__ */i("svg", {
192
+ width: "12",
193
+ height: "12",
194
+ viewBox: "0 0 12 12",
195
+ fill: "none",
196
+ children: /* @__PURE__ */i("path", {
197
+ d: "M8 2L4 6L8 10",
198
+ stroke: "currentColor",
199
+ strokeWidth: "1.5",
200
+ strokeLinecap: "round",
201
+ strokeLinejoin: "round"
202
+ })
203
+ })
204
+ }), /* @__PURE__ */s("span", {
205
+ className: "pagination-simple-text",
206
+ children: [o, " / ", l || 0]
207
+ }), /* @__PURE__ */i("button", {
208
+ type: "button",
209
+ className: "pagination-simple-item pagination-simple-next",
210
+ onClick: function onClick() {
211
+ return u(o + 1);
212
+ },
213
+ disabled: a || o === l,
214
+ children: /* @__PURE__ */i("svg", {
215
+ width: "12",
216
+ height: "12",
217
+ viewBox: "0 0 12 12",
218
+ fill: "none",
219
+ children: /* @__PURE__ */i("path", {
220
+ d: "M4 2L8 6L4 10",
221
+ stroke: "currentColor",
222
+ strokeWidth: "1.5",
223
+ strokeLinecap: "round",
224
+ strokeLinejoin: "round"
225
+ })
226
+ })
227
+ })]
228
+ })
229
+ }) : /* @__PURE__ */s("div", {
230
+ className: "pagination ".concat(le, " ").concat(se, " ").concat(I, " ").concat(O || ""),
231
+ style: B,
232
+ children: [typeof $ == "function" && /* @__PURE__ */i("div", {
233
+ className: "pagination-total",
234
+ children: $(b, [ie, oe])
235
+ }), /* @__PURE__ */s("div", {
236
+ className: "pagination-list",
237
+ children: [/* @__PURE__ */i("button", {
238
+ type: "button",
239
+ className: "pagination-item pagination-prev",
240
+ onClick: function onClick() {
241
+ return u(o - 1);
242
+ },
243
+ disabled: a || o === 1,
244
+ children: /* @__PURE__ */s("svg", {
245
+ width: "20",
246
+ height: "20",
247
+ viewBox: "0 0 20 20",
248
+ fill: "none",
249
+ xmlns: "http://www.w3.org/2000/svg",
250
+ children: [/* @__PURE__ */i("path", {
251
+ d: "M11.1749 5.57516C11.3377 5.41245 11.6014 5.41245 11.7641 5.57516C11.9268 5.73788 11.9268 6.00164 11.7641 6.16436L7.8945 10.034L11.7617 13.8366C11.9257 13.998 11.9279 14.2617 11.7666 14.4258C11.6052 14.5899 11.3414 14.592 11.1774 14.4307L7.2105 10.5299C6.93541 10.2594 6.93349 9.81648 7.20629 9.54367L11.1749 5.57516Z",
252
+ fill: "#333333"
253
+ }), /* @__PURE__ */i("path", {
254
+ d: "M11.1749 5.57516C11.3377 5.41245 11.6014 5.41245 11.7641 5.57516C11.9268 5.73788 11.9268 6.00164 11.7641 6.16436L7.8945 10.034L11.7617 13.8366C11.9257 13.998 11.9279 14.2617 11.7666 14.4258C11.6052 14.5899 11.3414 14.592 11.1774 14.4307L7.2105 10.5299C6.93541 10.2594 6.93349 9.81648 7.20629 9.54367L11.1749 5.57516Z",
255
+ fill: "black",
256
+ fillOpacity: "0.2"
257
+ })]
258
+ })
259
+ }), te.map(function (e, t) {
260
+ return ae(e, t);
261
+ }), /* @__PURE__ */i("button", {
262
+ type: "button",
263
+ className: "pagination-item pagination-next",
264
+ onClick: function onClick() {
265
+ return u(o + 1);
266
+ },
267
+ disabled: a || o === l,
268
+ children: /* @__PURE__ */s("svg", {
269
+ width: "20",
270
+ height: "20",
271
+ viewBox: "0 0 20 20",
272
+ fill: "none",
273
+ xmlns: "http://www.w3.org/2000/svg",
274
+ children: [/* @__PURE__ */i("path", {
275
+ d: "M8.82507 5.57516C8.66235 5.41245 8.39859 5.41245 8.23587 5.57516C8.07315 5.73788 8.07315 6.00164 8.23587 6.16436L12.1055 10.034L8.23831 13.8366C8.07427 13.998 8.0721 14.2617 8.23343 14.4258C8.39478 14.5899 8.65856 14.592 8.82262 14.4307L12.7895 10.5299C13.0646 10.2594 13.0665 9.81648 12.7937 9.54367L8.82507 5.57516Z",
276
+ fill: "#333333"
277
+ }), /* @__PURE__ */i("path", {
278
+ d: "M8.82507 5.57516C8.66235 5.41245 8.39859 5.41245 8.23587 5.57516C8.07315 5.73788 8.07315 6.00164 8.23587 6.16436L12.1055 10.034L8.23831 13.8366C8.07427 13.998 8.0721 14.2617 8.23343 14.4258C8.39478 14.5899 8.65856 14.592 8.82262 14.4307L12.7895 10.5299C13.0646 10.2594 13.0665 9.81648 12.7937 9.54367L8.82507 5.57516Z",
279
+ fill: "black",
280
+ fillOpacity: "0.2"
281
+ })]
282
+ })
283
+ })]
284
+ }), _ && /* @__PURE__ */s("div", {
285
+ className: "pagination-sizer",
286
+ ref: d,
287
+ children: [/* @__PURE__ */s("button", {
288
+ type: "button",
289
+ className: "pagination-sizer-select",
290
+ onClick: Y,
291
+ disabled: a,
292
+ children: [p, k("条/页"), /* @__PURE__ */s("svg", {
293
+ className: "pagination-sizer-icon".concat(m ? " pagination-sizer-icon-open" : ""),
294
+ width: "20",
295
+ height: "20",
296
+ viewBox: "0 0 20 20",
297
+ fill: "none",
298
+ xmlns: "http://www.w3.org/2000/svg",
299
+ children: [/* @__PURE__ */i("path", {
300
+ d: "M5.57321 8.828C5.41049 8.66528 5.41049 8.40152 5.57321 8.2388C5.73593 8.07608 5.99969 8.07608 6.1624 8.2388L10.032 12.1084L13.8347 8.24124C13.996 8.0772 14.2598 8.07503 14.4239 8.23636C14.5879 8.39771 14.5901 8.66149 14.4287 8.82555L10.5279 12.7924C10.2574 13.0675 9.81452 13.0694 9.54172 12.7966L5.57321 8.828Z",
301
+ fill: "#333333"
302
+ }), /* @__PURE__ */i("path", {
303
+ d: "M5.57321 8.828C5.41049 8.66528 5.41049 8.40152 5.57321 8.2388C5.73593 8.07608 5.99969 8.07608 6.1624 8.2388L10.032 12.1084L13.8347 8.24124C13.996 8.0772 14.2598 8.07503 14.4239 8.23636C14.5879 8.39771 14.5901 8.66149 14.4287 8.82555L10.5279 12.7924C10.2574 13.0675 9.81452 13.0694 9.54172 12.7966L5.57321 8.828Z",
304
+ fill: "black",
305
+ fillOpacity: "0.2"
306
+ })]
307
+ })]
308
+ }), m && x && de(/* @__PURE__ */i("div", {
309
+ ref: D,
310
+ className: "pagination-sizer-dropdown pagination-sizer-dropdown-".concat(r != null ? r : f).concat(E ? " ".concat(E) : ""),
311
+ style: {
312
+ position: "fixed",
313
+ left: x.left,
314
+ top: x.top,
315
+ zIndex: 99999,
316
+ transform: (r != null ? r : f) === "bottom" ? "translate(-50%, 0)" : "translate(-50%, -100%)"
317
+ },
318
+ children: y.map(function (e) {
319
+ return /* @__PURE__ */s("button", {
136
320
  type: "button",
137
- className: "pagination-simple-item pagination-simple-next",
138
- onClick: () => h(o + 1),
139
- disabled: l || o === s,
140
- children: /* @__PURE__ */ i("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ i("path", { d: "M4 2L8 6L4 10", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
141
- }
142
- )
143
- ] })
144
- }
145
- ) : /* @__PURE__ */ a(
146
- "div",
147
- {
148
- className: `pagination ${st} ${at} ${j} ${E || ""}`,
149
- style: B,
150
- children: [
151
- M && /* @__PURE__ */ i("div", { className: "pagination-total", children: M(b, [it, ot]) }),
152
- /* @__PURE__ */ a("div", { className: "pagination-list", children: [
153
- /* @__PURE__ */ i(
154
- "button",
155
- {
156
- type: "button",
157
- className: "pagination-item pagination-prev",
158
- onClick: () => h(o - 1),
159
- disabled: l || o === 1,
160
- children: /* @__PURE__ */ a("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
161
- /* @__PURE__ */ i("path", { d: "M11.1749 5.57516C11.3377 5.41245 11.6014 5.41245 11.7641 5.57516C11.9268 5.73788 11.9268 6.00164 11.7641 6.16436L7.8945 10.034L11.7617 13.8366C11.9257 13.998 11.9279 14.2617 11.7666 14.4258C11.6052 14.5899 11.3414 14.592 11.1774 14.4307L7.2105 10.5299C6.93541 10.2594 6.93349 9.81648 7.20629 9.54367L11.1749 5.57516Z", fill: "#333333" }),
162
- /* @__PURE__ */ i("path", { d: "M11.1749 5.57516C11.3377 5.41245 11.6014 5.41245 11.7641 5.57516C11.9268 5.73788 11.9268 6.00164 11.7641 6.16436L7.8945 10.034L11.7617 13.8366C11.9257 13.998 11.9279 14.2617 11.7666 14.4258C11.6052 14.5899 11.3414 14.592 11.1774 14.4307L7.2105 10.5299C6.93541 10.2594 6.93349 9.81648 7.20629 9.54367L11.1749 5.57516Z", fill: "black", fillOpacity: "0.2" })
163
- ] })
164
- }
165
- ),
166
- nt.map((t, n) => lt(t, n)),
167
- /* @__PURE__ */ i(
168
- "button",
169
- {
170
- type: "button",
171
- className: "pagination-item pagination-next",
172
- onClick: () => h(o + 1),
173
- disabled: l || o === s,
174
- children: /* @__PURE__ */ a("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
175
- /* @__PURE__ */ i("path", { d: "M8.82507 5.57516C8.66235 5.41245 8.39859 5.41245 8.23587 5.57516C8.07315 5.73788 8.07315 6.00164 8.23587 6.16436L12.1055 10.034L8.23831 13.8366C8.07427 13.998 8.0721 14.2617 8.23343 14.4258C8.39478 14.5899 8.65856 14.592 8.82262 14.4307L12.7895 10.5299C13.0646 10.2594 13.0665 9.81648 12.7937 9.54367L8.82507 5.57516Z", fill: "#333333" }),
176
- /* @__PURE__ */ i("path", { d: "M8.82507 5.57516C8.66235 5.41245 8.39859 5.41245 8.23587 5.57516C8.07315 5.73788 8.07315 6.00164 8.23587 6.16436L12.1055 10.034L8.23831 13.8366C8.07427 13.998 8.0721 14.2617 8.23343 14.4258C8.39478 14.5899 8.65856 14.592 8.82262 14.4307L12.7895 10.5299C13.0646 10.2594 13.0665 9.81648 12.7937 9.54367L8.82507 5.57516Z", fill: "black", "fill-opacity": "0.2" })
177
- ] })
178
- }
179
- )
180
- ] }),
181
- H && /* @__PURE__ */ a("div", { className: "pagination-sizer", ref: p, children: [
182
- /* @__PURE__ */ a(
183
- "button",
184
- {
185
- type: "button",
186
- className: "pagination-sizer-select",
187
- onClick: _,
188
- disabled: l,
189
- children: [
190
- u,
191
- N("条/页"),
192
- /* @__PURE__ */ a("svg", { className: `pagination-sizer-icon${m ? " pagination-sizer-icon-open" : ""}`, width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
193
- /* @__PURE__ */ i("path", { d: "M5.57321 8.828C5.41049 8.66528 5.41049 8.40152 5.57321 8.2388C5.73593 8.07608 5.99969 8.07608 6.1624 8.2388L10.032 12.1084L13.8347 8.24124C13.996 8.0772 14.2598 8.07503 14.4239 8.23636C14.5879 8.39771 14.5901 8.66149 14.4287 8.82555L10.5279 12.7924C10.2574 13.0675 9.81452 13.0694 9.54172 12.7966L5.57321 8.828Z", fill: "#333333" }),
194
- /* @__PURE__ */ i("path", { d: "M5.57321 8.828C5.41049 8.66528 5.41049 8.40152 5.57321 8.2388C5.73593 8.07608 5.99969 8.07608 6.1624 8.2388L10.032 12.1084L13.8347 8.24124C13.996 8.0772 14.2598 8.07503 14.4239 8.23636C14.5879 8.39771 14.5901 8.66149 14.4287 8.82555L10.5279 12.7924C10.2574 13.0675 9.81452 13.0694 9.54172 12.7966L5.57321 8.828Z", fill: "black", fillOpacity: "0.2" })
195
- ] })
196
- ]
197
- }
198
- ),
199
- m && P && dt(
200
- /* @__PURE__ */ i(
201
- "div",
202
- {
203
- ref: R,
204
- className: `pagination-sizer-dropdown pagination-sizer-dropdown-${d ?? f}${S ? ` ${S}` : ""}`,
205
- style: {
206
- position: "fixed",
207
- left: P.left,
208
- top: P.top,
209
- zIndex: 99999,
210
- transform: (d ?? f) === "bottom" ? "translate(-50%, 0)" : "translate(-50%, -100%)"
211
- },
212
- children: $.map((t) => /* @__PURE__ */ a(
213
- "button",
214
- {
215
- type: "button",
216
- className: "pagination-sizer-option",
217
- onClick: () => tt(t),
218
- "data-selected": t === u,
219
- children: [
220
- t,
221
- N("条/页")
222
- ]
223
- },
224
- t
225
- ))
226
- }
227
- ),
228
- document.body
229
- )
230
- ] }),
231
- J && /* @__PURE__ */ a("div", { className: "pagination-jumper", children: [
232
- /* @__PURE__ */ i("span", { children: N("跳至") }),
233
- /* @__PURE__ */ i(
234
- "input",
235
- {
236
- type: "number",
237
- className: "pagination-jumper-input",
238
- min: 1,
239
- max: s,
240
- onChange: et,
241
- disabled: l,
242
- placeholder: ""
243
- }
244
- ),
245
- /* @__PURE__ */ i("span", { children: N("页") })
246
- ] })
247
- ]
248
- }
249
- );
250
- };
251
- export {
252
- ft as default
321
+ className: "pagination-sizer-option",
322
+ onClick: function onClick() {
323
+ return ee(e);
324
+ },
325
+ "data-selected": e === p,
326
+ children: [e, k("条/页")]
327
+ }, e);
328
+ })
329
+ }), document.body)]
330
+ }), H && /* @__PURE__ */s("div", {
331
+ className: "pagination-jumper",
332
+ children: [/* @__PURE__ */i("span", {
333
+ children: k("跳至")
334
+ }), /* @__PURE__ */i("input", {
335
+ type: "number",
336
+ className: "pagination-jumper-input",
337
+ min: 1,
338
+ max: l,
339
+ onChange: ne,
340
+ disabled: a,
341
+ placeholder: ""
342
+ }), /* @__PURE__ */i("span", {
343
+ children: k("页")
344
+ })]
345
+ })]
346
+ });
253
347
  };
348
+ export { fe as default };