bj-web-components 0.2.34 → 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.
- package/README.md +10 -1
- package/dist/index.js +58 -1
- package/dist/index.mjs +1 -29
- package/dist/miniapp.js +1 -1
- package/dist/miniapp.mjs +0 -1
- package/dist/mobile.js +1 -1
- package/dist/mobile.mjs +0 -1
- package/dist/react.js +1 -1
- package/dist/react.mjs +0 -1
- package/dist/shared.js +1 -1
- package/dist/shared.mjs +0 -1
- package/dist/style.css +1 -1
- package/dist/web/BasicInput/BInput.js +278 -1
- package/dist/web/BasicInput/BInput.mjs +263 -164
- package/dist/web/BasicInput/utils.js +47 -1
- package/dist/web/BasicInput/utils.mjs +22 -20
- package/dist/web/CategoryDropdown/CategoryDropdown.js +376 -1
- package/dist/web/CategoryDropdown/CategoryDropdown.mjs +355 -235
- package/dist/web/CheckBox/BCheckBox.js +176 -1
- package/dist/web/CheckBox/BCheckBox.mjs +169 -98
- package/dist/web/CheckBox/Group.js +111 -1
- package/dist/web/CheckBox/Group.mjs +104 -64
- package/dist/web/CheckBox/context.js +8 -1
- package/dist/web/CheckBox/context.mjs +2 -4
- package/dist/web/CheckBox/index.js +11 -1
- package/dist/web/CheckBox/index.mjs +2 -4
- package/dist/web/Dropdown/BDropdown.js +265 -1
- package/dist/web/Dropdown/BDropdown.mjs +234 -134
- package/dist/web/EmptyInputBox/EmptyInputBox.js +89 -1
- package/dist/web/EmptyInputBox/EmptyInputBox.mjs +85 -72
- package/dist/web/FileCard/FileCard.js +414 -1
- package/dist/web/FileCard/FileCard.mjs +400 -116
- package/dist/web/Icon/Icon.js +82 -1
- package/dist/web/Icon/Icon.mjs +78 -8
- package/dist/web/Input/Input.js +230 -1
- package/dist/web/Input/Input.mjs +219 -164
- package/dist/web/InputNumber/BInputNumber.js +271 -1
- package/dist/web/InputNumber/BInputNumber.mjs +254 -189
- package/dist/web/InputNumber/StepHandler.js +112 -1
- package/dist/web/InputNumber/StepHandler.mjs +102 -50
- package/dist/web/InputNumber/hooks/useCursor.js +38 -1
- package/dist/web/InputNumber/hooks/useCursor.mjs +31 -34
- package/dist/web/InputNumber/hooks/useFrame.js +15 -1
- package/dist/web/InputNumber/hooks/useFrame.mjs +8 -5
- package/dist/web/InputNumber/utils/decimal.js +163 -1
- package/dist/web/InputNumber/utils/decimal.mjs +114 -79
- package/dist/web/MobileDrawer/BMobileDrawer.js +238 -1
- package/dist/web/MobileDrawer/BMobileDrawer.mjs +221 -139
- package/dist/web/Modal/Modal.js +148 -1
- package/dist/web/Modal/Modal.mjs +143 -79
- package/dist/web/OverlayScrollbar/BOverlayScrollbar.js +273 -1
- package/dist/web/OverlayScrollbar/BOverlayScrollbar.mjs +262 -143
- package/dist/web/Pagination/Pagination.js +352 -1
- package/dist/web/Pagination/Pagination.mjs +342 -247
- package/dist/web/ProductField/ProductField.js +443 -1
- package/dist/web/ProductField/ProductField.mjs +423 -208
- package/dist/web/ProductField/arrow-up.svg.js +4 -1
- package/dist/web/ProductField/arrow-up.svg.mjs +2 -4
- package/dist/web/ProductField/checkbox-no.svg.js +4 -1
- package/dist/web/ProductField/checkbox-no.svg.mjs +2 -4
- package/dist/web/ProductField/checkbox-ok.svg.js +4 -1
- package/dist/web/ProductField/checkbox-ok.svg.mjs +2 -4
- package/dist/web/ProductField/no_data_light.svg.js +4 -1
- package/dist/web/ProductField/no_data_light.svg.mjs +2 -4
- package/dist/web/ProductField/search.svg.js +4 -1
- package/dist/web/ProductField/search.svg.mjs +2 -4
- package/dist/web/ProductField/sort.svg.js +4 -1
- package/dist/web/ProductField/sort.svg.mjs +2 -4
- package/dist/web/Radio/BRadio.js +151 -1
- package/dist/web/Radio/BRadio.mjs +147 -75
- package/dist/web/Radio/Button.js +54 -1
- package/dist/web/Radio/Button.mjs +51 -8
- package/dist/web/Radio/Group.js +97 -1
- package/dist/web/Radio/Group.mjs +92 -76
- package/dist/web/Radio/context.js +10 -1
- package/dist/web/Radio/context.mjs +3 -5
- package/dist/web/Radio/index.js +13 -1
- package/dist/web/Radio/index.mjs +2 -4
- package/dist/web/SkuInputCard/SkuInputCard.js +427 -1
- package/dist/web/SkuInputCard/SkuInputCard.mjs +414 -219
- package/dist/web/SkuInputCard/spin_loading_red.gif.js +4 -1
- package/dist/web/SkuInputCard/spin_loading_red.gif.mjs +2 -4
- package/dist/web/Switch/Switch.js +114 -1
- package/dist/web/Switch/Switch.mjs +109 -58
- package/dist/web/Table/BTable.js +1049 -1
- package/dist/web/Table/BTable.mjs +1011 -667
- package/dist/web/Table/Column.js +6 -1
- package/dist/web/Table/Column.mjs +1 -3
- package/dist/web/Table/ColumnGroup.js +6 -1
- package/dist/web/Table/ColumnGroup.mjs +1 -3
- package/dist/web/Table/utils/columns.js +116 -1
- package/dist/web/Table/utils/columns.mjs +103 -37
- package/dist/web/Table/utils/sortFilter.js +145 -1
- package/dist/web/Table/utils/sortFilter.mjs +129 -57
- package/dist/web/Tabs/BTabs.js +260 -1
- package/dist/web/Tabs/BTabs.mjs +239 -122
- package/dist/web/Tabs/TabPane.js +19 -1
- package/dist/web/Tabs/TabPane.mjs +1 -4
- package/dist/web/Tooltip/ConfirmTooltip.js +53 -1
- package/dist/web/Tooltip/ConfirmTooltip.mjs +47 -22
- package/dist/web/Tooltip/ContentTooltip.js +156 -1
- package/dist/web/Tooltip/ContentTooltip.mjs +145 -76
- package/dist/web/Tooltip/ProgressTooltip.js +56 -1
- package/dist/web/Tooltip/ProgressTooltip.mjs +50 -31
- package/dist/web/Tooltip/TooltipWrapper.js +19 -1
- package/dist/web/Tooltip/TooltipWrapper.mjs +13 -9
- package/dist/web/Tooltip/useAutoPlacement.js +65 -1
- package/dist/web/Tooltip/useAutoPlacement.mjs +52 -24
- package/dist/web.js +58 -1
- package/dist/web.mjs +1 -29
- package/package.json +97 -95
|
@@ -1 +1,352 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
4
|
+
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."); }
|
|
5
|
+
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; } }
|
|
6
|
+
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; }
|
|
7
|
+
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; } }
|
|
8
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
9
|
+
var t = require("react/jsx-runtime"),
|
|
10
|
+
r = require("react"),
|
|
11
|
+
le = require("react-dom");
|
|
12
|
+
; /* empty css */
|
|
13
|
+
function ae(_ref) {
|
|
14
|
+
var w = _ref.triggerRect,
|
|
15
|
+
c = _ref.dropdownHeight,
|
|
16
|
+
b = _ref.viewportHeight;
|
|
17
|
+
var m = b - w.bottom,
|
|
18
|
+
N = w.top;
|
|
19
|
+
return m < c && N >= c ? "top" : "bottom";
|
|
20
|
+
}
|
|
21
|
+
var re = function re(w) {
|
|
22
|
+
var c = w.current,
|
|
23
|
+
_w$defaultCurrent = w.defaultCurrent,
|
|
24
|
+
b = _w$defaultCurrent === void 0 ? 1 : _w$defaultCurrent,
|
|
25
|
+
m = w.pageSize,
|
|
26
|
+
_w$defaultPageSize = w.defaultPageSize,
|
|
27
|
+
N = _w$defaultPageSize === void 0 ? 10 : _w$defaultPageSize,
|
|
28
|
+
_w$total = w.total,
|
|
29
|
+
x = _w$total === void 0 ? 0 : _w$total,
|
|
30
|
+
j = w.onChange,
|
|
31
|
+
z = w.onShowSizeChange,
|
|
32
|
+
_w$showSizeChanger = w.showSizeChanger,
|
|
33
|
+
A = _w$showSizeChanger === void 0 ? !1 : _w$showSizeChanger,
|
|
34
|
+
_w$showQuickJumper = w.showQuickJumper,
|
|
35
|
+
q = _w$showQuickJumper === void 0 ? !1 : _w$showQuickJumper,
|
|
36
|
+
_w$pageSizeOptions = w.pageSizeOptions,
|
|
37
|
+
S = _w$pageSizeOptions === void 0 ? [10, 20, 50, 100] : _w$pageSizeOptions,
|
|
38
|
+
_w$disabled = w.disabled,
|
|
39
|
+
l = _w$disabled === void 0 ? !1 : _w$disabled,
|
|
40
|
+
_w$hideOnSinglePage = w.hideOnSinglePage,
|
|
41
|
+
T = _w$hideOnSinglePage === void 0 ? !1 : _w$hideOnSinglePage,
|
|
42
|
+
P = w.showTotal,
|
|
43
|
+
_w$size = w.size,
|
|
44
|
+
_ = _w$size === void 0 ? "medium" : _w$size,
|
|
45
|
+
_w$align = w.align,
|
|
46
|
+
H = _w$align === void 0 ? "start" : _w$align,
|
|
47
|
+
_w$simple = w.simple,
|
|
48
|
+
J = _w$simple === void 0 ? !1 : _w$simple,
|
|
49
|
+
a = w.popupPlacement,
|
|
50
|
+
y = w.resolvePopupPlacement,
|
|
51
|
+
$ = w.dropdownClassName,
|
|
52
|
+
_w$t = w.t,
|
|
53
|
+
L = _w$t === void 0 ? function (e) {
|
|
54
|
+
return e;
|
|
55
|
+
} : _w$t,
|
|
56
|
+
M = w.className,
|
|
57
|
+
E = w.style,
|
|
58
|
+
_r$useState = r.useState(b),
|
|
59
|
+
_r$useState2 = _slicedToArray(_r$useState, 2),
|
|
60
|
+
Q = _r$useState2[0],
|
|
61
|
+
R = _r$useState2[1],
|
|
62
|
+
_r$useState3 = r.useState(N),
|
|
63
|
+
_r$useState4 = _slicedToArray(_r$useState3, 2),
|
|
64
|
+
W = _r$useState4[0],
|
|
65
|
+
F = _r$useState4[1],
|
|
66
|
+
_r$useState5 = r.useState(!1),
|
|
67
|
+
_r$useState6 = _slicedToArray(_r$useState5, 2),
|
|
68
|
+
g = _r$useState6[0],
|
|
69
|
+
f = _r$useState6[1],
|
|
70
|
+
_r$useState7 = r.useState("bottom"),
|
|
71
|
+
_r$useState8 = _slicedToArray(_r$useState7, 2),
|
|
72
|
+
C = _r$useState8[0],
|
|
73
|
+
G = _r$useState8[1],
|
|
74
|
+
_r$useState9 = r.useState(null),
|
|
75
|
+
_r$useState0 = _slicedToArray(_r$useState9, 2),
|
|
76
|
+
k = _r$useState0[0],
|
|
77
|
+
K = _r$useState0[1],
|
|
78
|
+
d = r.useRef(null),
|
|
79
|
+
O = r.useRef(null),
|
|
80
|
+
s = c != null ? c : Q,
|
|
81
|
+
p = m != null ? m : W,
|
|
82
|
+
o = Math.ceil(x / p);
|
|
83
|
+
if (T && o <= 1) return null;
|
|
84
|
+
var u = function u(e) {
|
|
85
|
+
l || e < 1 || e > o || e === s || (c === void 0 && R(e), j == null || j(e, p));
|
|
86
|
+
},
|
|
87
|
+
U = function U(e) {
|
|
88
|
+
var i = Math.ceil(x / e),
|
|
89
|
+
n = Math.min(s, i) || 1;
|
|
90
|
+
m === void 0 && (F(e), c === void 0 && R(n)), z == null || z(n, e), j == null || j(n, e);
|
|
91
|
+
},
|
|
92
|
+
B = function B(e) {
|
|
93
|
+
if (!d.current) return;
|
|
94
|
+
var i = d.current.getBoundingClientRect();
|
|
95
|
+
K({
|
|
96
|
+
left: i.left + i.width / 2,
|
|
97
|
+
top: e === "bottom" ? i.bottom + 4 : i.top - 4
|
|
98
|
+
});
|
|
99
|
+
},
|
|
100
|
+
V = function V() {
|
|
101
|
+
var e;
|
|
102
|
+
if (l) return;
|
|
103
|
+
if (g) {
|
|
104
|
+
f(!1);
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
var i = C;
|
|
108
|
+
if (a === void 0 && d.current) {
|
|
109
|
+
var n = d.current.getBoundingClientRect(),
|
|
110
|
+
h = S.length * 40 + 8,
|
|
111
|
+
v = window.innerHeight;
|
|
112
|
+
i = (e = y == null ? void 0 : y({
|
|
113
|
+
triggerRect: n,
|
|
114
|
+
dropdownHeight: h,
|
|
115
|
+
viewportHeight: v
|
|
116
|
+
})) != null ? e : ae({
|
|
117
|
+
triggerRect: n,
|
|
118
|
+
dropdownHeight: h,
|
|
119
|
+
viewportHeight: v
|
|
120
|
+
}), G(i);
|
|
121
|
+
}
|
|
122
|
+
B(a != null ? a : i), f(!0);
|
|
123
|
+
},
|
|
124
|
+
X = function X(e) {
|
|
125
|
+
U(e), f(!1);
|
|
126
|
+
};
|
|
127
|
+
r.useEffect(function () {
|
|
128
|
+
var e = function e(h) {
|
|
129
|
+
var v, I;
|
|
130
|
+
var Z = h.target;
|
|
131
|
+
(v = d.current) != null && v.contains(Z) || (I = O.current) != null && I.contains(Z) || f(!1);
|
|
132
|
+
},
|
|
133
|
+
i = function i() {
|
|
134
|
+
return f(!1);
|
|
135
|
+
},
|
|
136
|
+
n = function n() {
|
|
137
|
+
return B(a != null ? a : C);
|
|
138
|
+
};
|
|
139
|
+
if (g) return document.addEventListener("mousedown", e), document.addEventListener("scroll", i, !0), window.addEventListener("resize", n), function () {
|
|
140
|
+
document.removeEventListener("mousedown", e), document.removeEventListener("scroll", i, !0), window.removeEventListener("resize", n);
|
|
141
|
+
};
|
|
142
|
+
}, [g, a, C]);
|
|
143
|
+
var Y = function Y(e) {
|
|
144
|
+
var i = parseInt(e.target.value);
|
|
145
|
+
!isNaN(i) && i >= 1 && i <= o && u(i);
|
|
146
|
+
},
|
|
147
|
+
ee = r.useMemo(function () {
|
|
148
|
+
var e = [];
|
|
149
|
+
if (o <= 7) for (var n = 1; n <= o; n++) e.push(n);else if (s <= 4) {
|
|
150
|
+
for (var _n = 1; _n <= 5; _n++) e.push(_n);
|
|
151
|
+
e.push("..."), e.push(o);
|
|
152
|
+
} else if (s >= o - 3) {
|
|
153
|
+
e.push(1), e.push("...");
|
|
154
|
+
for (var _n2 = o - 4; _n2 <= o; _n2++) e.push(_n2);
|
|
155
|
+
} else {
|
|
156
|
+
e.push(1), e.push("...");
|
|
157
|
+
for (var _n3 = s - 1; _n3 <= s + 1; _n3++) e.push(_n3);
|
|
158
|
+
e.push("..."), e.push(o);
|
|
159
|
+
}
|
|
160
|
+
return e;
|
|
161
|
+
}, [s, o]),
|
|
162
|
+
te = (s - 1) * p + 1,
|
|
163
|
+
ne = Math.min(s * p, x),
|
|
164
|
+
ie = "pagination-".concat(_),
|
|
165
|
+
se = "pagination-".concat(H),
|
|
166
|
+
D = l ? "pagination-disabled" : "",
|
|
167
|
+
oe = function oe(e, i) {
|
|
168
|
+
if (e === "...") return t.jsx("span", {
|
|
169
|
+
className: "pagination-item pagination-ellipsis",
|
|
170
|
+
children: "..."
|
|
171
|
+
}, "ellipsis-".concat(i));
|
|
172
|
+
var h = e === s ? "pagination-item-active" : "";
|
|
173
|
+
return t.jsx("button", {
|
|
174
|
+
type: "button",
|
|
175
|
+
className: "pagination-item ".concat(h),
|
|
176
|
+
onClick: function onClick() {
|
|
177
|
+
return u(e);
|
|
178
|
+
},
|
|
179
|
+
disabled: l,
|
|
180
|
+
children: e
|
|
181
|
+
}, e);
|
|
182
|
+
};
|
|
183
|
+
return J ? t.jsx("div", {
|
|
184
|
+
className: "pagination pagination-simple ".concat(D, " ").concat(M || ""),
|
|
185
|
+
style: E,
|
|
186
|
+
children: t.jsxs("div", {
|
|
187
|
+
className: "pagination-simple-list",
|
|
188
|
+
children: [t.jsx("button", {
|
|
189
|
+
type: "button",
|
|
190
|
+
className: "pagination-simple-item pagination-simple-prev",
|
|
191
|
+
onClick: function onClick() {
|
|
192
|
+
return u(s - 1);
|
|
193
|
+
},
|
|
194
|
+
disabled: l || s === 1,
|
|
195
|
+
children: t.jsx("svg", {
|
|
196
|
+
width: "12",
|
|
197
|
+
height: "12",
|
|
198
|
+
viewBox: "0 0 12 12",
|
|
199
|
+
fill: "none",
|
|
200
|
+
children: t.jsx("path", {
|
|
201
|
+
d: "M8 2L4 6L8 10",
|
|
202
|
+
stroke: "currentColor",
|
|
203
|
+
strokeWidth: "1.5",
|
|
204
|
+
strokeLinecap: "round",
|
|
205
|
+
strokeLinejoin: "round"
|
|
206
|
+
})
|
|
207
|
+
})
|
|
208
|
+
}), t.jsxs("span", {
|
|
209
|
+
className: "pagination-simple-text",
|
|
210
|
+
children: [s, " / ", o || 0]
|
|
211
|
+
}), t.jsx("button", {
|
|
212
|
+
type: "button",
|
|
213
|
+
className: "pagination-simple-item pagination-simple-next",
|
|
214
|
+
onClick: function onClick() {
|
|
215
|
+
return u(s + 1);
|
|
216
|
+
},
|
|
217
|
+
disabled: l || s === o,
|
|
218
|
+
children: t.jsx("svg", {
|
|
219
|
+
width: "12",
|
|
220
|
+
height: "12",
|
|
221
|
+
viewBox: "0 0 12 12",
|
|
222
|
+
fill: "none",
|
|
223
|
+
children: t.jsx("path", {
|
|
224
|
+
d: "M4 2L8 6L4 10",
|
|
225
|
+
stroke: "currentColor",
|
|
226
|
+
strokeWidth: "1.5",
|
|
227
|
+
strokeLinecap: "round",
|
|
228
|
+
strokeLinejoin: "round"
|
|
229
|
+
})
|
|
230
|
+
})
|
|
231
|
+
})]
|
|
232
|
+
})
|
|
233
|
+
}) : t.jsxs("div", {
|
|
234
|
+
className: "pagination ".concat(ie, " ").concat(se, " ").concat(D, " ").concat(M || ""),
|
|
235
|
+
style: E,
|
|
236
|
+
children: [typeof P == "function" && t.jsx("div", {
|
|
237
|
+
className: "pagination-total",
|
|
238
|
+
children: P(x, [te, ne])
|
|
239
|
+
}), t.jsxs("div", {
|
|
240
|
+
className: "pagination-list",
|
|
241
|
+
children: [t.jsx("button", {
|
|
242
|
+
type: "button",
|
|
243
|
+
className: "pagination-item pagination-prev",
|
|
244
|
+
onClick: function onClick() {
|
|
245
|
+
return u(s - 1);
|
|
246
|
+
},
|
|
247
|
+
disabled: l || s === 1,
|
|
248
|
+
children: t.jsxs("svg", {
|
|
249
|
+
width: "20",
|
|
250
|
+
height: "20",
|
|
251
|
+
viewBox: "0 0 20 20",
|
|
252
|
+
fill: "none",
|
|
253
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
254
|
+
children: [t.jsx("path", {
|
|
255
|
+
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",
|
|
256
|
+
fill: "#333333"
|
|
257
|
+
}), t.jsx("path", {
|
|
258
|
+
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",
|
|
259
|
+
fill: "black",
|
|
260
|
+
fillOpacity: "0.2"
|
|
261
|
+
})]
|
|
262
|
+
})
|
|
263
|
+
}), ee.map(function (e, i) {
|
|
264
|
+
return oe(e, i);
|
|
265
|
+
}), t.jsx("button", {
|
|
266
|
+
type: "button",
|
|
267
|
+
className: "pagination-item pagination-next",
|
|
268
|
+
onClick: function onClick() {
|
|
269
|
+
return u(s + 1);
|
|
270
|
+
},
|
|
271
|
+
disabled: l || s === o,
|
|
272
|
+
children: t.jsxs("svg", {
|
|
273
|
+
width: "20",
|
|
274
|
+
height: "20",
|
|
275
|
+
viewBox: "0 0 20 20",
|
|
276
|
+
fill: "none",
|
|
277
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
278
|
+
children: [t.jsx("path", {
|
|
279
|
+
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",
|
|
280
|
+
fill: "#333333"
|
|
281
|
+
}), t.jsx("path", {
|
|
282
|
+
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",
|
|
283
|
+
fill: "black",
|
|
284
|
+
fillOpacity: "0.2"
|
|
285
|
+
})]
|
|
286
|
+
})
|
|
287
|
+
})]
|
|
288
|
+
}), A && t.jsxs("div", {
|
|
289
|
+
className: "pagination-sizer",
|
|
290
|
+
ref: d,
|
|
291
|
+
children: [t.jsxs("button", {
|
|
292
|
+
type: "button",
|
|
293
|
+
className: "pagination-sizer-select",
|
|
294
|
+
onClick: V,
|
|
295
|
+
disabled: l,
|
|
296
|
+
children: [p, L("条/页"), t.jsxs("svg", {
|
|
297
|
+
className: "pagination-sizer-icon".concat(g ? " pagination-sizer-icon-open" : ""),
|
|
298
|
+
width: "20",
|
|
299
|
+
height: "20",
|
|
300
|
+
viewBox: "0 0 20 20",
|
|
301
|
+
fill: "none",
|
|
302
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
303
|
+
children: [t.jsx("path", {
|
|
304
|
+
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",
|
|
305
|
+
fill: "#333333"
|
|
306
|
+
}), t.jsx("path", {
|
|
307
|
+
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",
|
|
308
|
+
fill: "black",
|
|
309
|
+
fillOpacity: "0.2"
|
|
310
|
+
})]
|
|
311
|
+
})]
|
|
312
|
+
}), g && k && le.createPortal(t.jsx("div", {
|
|
313
|
+
ref: O,
|
|
314
|
+
className: "pagination-sizer-dropdown pagination-sizer-dropdown-".concat(a != null ? a : C).concat($ ? " ".concat($) : ""),
|
|
315
|
+
style: {
|
|
316
|
+
position: "fixed",
|
|
317
|
+
left: k.left,
|
|
318
|
+
top: k.top,
|
|
319
|
+
zIndex: 99999,
|
|
320
|
+
transform: (a != null ? a : C) === "bottom" ? "translate(-50%, 0)" : "translate(-50%, -100%)"
|
|
321
|
+
},
|
|
322
|
+
children: S.map(function (e) {
|
|
323
|
+
return t.jsxs("button", {
|
|
324
|
+
type: "button",
|
|
325
|
+
className: "pagination-sizer-option",
|
|
326
|
+
onClick: function onClick() {
|
|
327
|
+
return X(e);
|
|
328
|
+
},
|
|
329
|
+
"data-selected": e === p,
|
|
330
|
+
children: [e, L("条/页")]
|
|
331
|
+
}, e);
|
|
332
|
+
})
|
|
333
|
+
}), document.body)]
|
|
334
|
+
}), q && t.jsxs("div", {
|
|
335
|
+
className: "pagination-jumper",
|
|
336
|
+
children: [t.jsx("span", {
|
|
337
|
+
children: L("跳至")
|
|
338
|
+
}), t.jsx("input", {
|
|
339
|
+
type: "number",
|
|
340
|
+
className: "pagination-jumper-input",
|
|
341
|
+
min: 1,
|
|
342
|
+
max: o,
|
|
343
|
+
onChange: Y,
|
|
344
|
+
disabled: l,
|
|
345
|
+
placeholder: ""
|
|
346
|
+
}), t.jsx("span", {
|
|
347
|
+
children: L("页")
|
|
348
|
+
})]
|
|
349
|
+
})]
|
|
350
|
+
});
|
|
351
|
+
};
|
|
352
|
+
module.exports = re;
|