@24city/web-console 0.3.9 → 0.3.10
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/CHANGELOG.md +24 -0
- package/GUIDELINES.md +5 -2
- package/dist/chunks/{waterfall-Cyw5kl43.js → waterfall-D4dghcC4.js} +277 -276
- package/dist/index.js +1 -1
- package/dist/list/cover-tabs.d.ts +11 -3
- package/dist/list/index.js +1 -1
- package/dist/styles.css +85 -59
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as a, jsxs as m, Fragment as
|
|
2
|
-
import { RadioGroup as Q, Radio as Z, Typography as I, Skeleton as $, Input as
|
|
3
|
-
import { useRef as k, useLayoutEffect as O, useEffect as
|
|
4
|
-
import { IconClose as G, IconSearch as z, IconTick as ae, IconChevronDown as V, IconDelete as te, IconArrowDown as re, IconUndo as
|
|
1
|
+
import { jsx as a, jsxs as m, Fragment as W } from "react/jsx-runtime";
|
|
2
|
+
import { RadioGroup as Q, Radio as Z, Typography as I, Skeleton as $, Input as j, Button as N, Dropdown as S, Popover as ee, InputNumber as D } from "@douyinfe/semi-ui";
|
|
3
|
+
import { useRef as k, useLayoutEffect as O, useEffect as M, useState as A, forwardRef as H } from "react";
|
|
4
|
+
import { IconClose as G, IconSearch as z, IconTick as ae, IconChevronDown as V, IconDelete as te, IconArrowDown as re, IconUndo as se, IconRefresh as le } from "@douyinfe/semi-icons";
|
|
5
5
|
import { B as ne } from "./scale-smFifpMm.js";
|
|
6
6
|
const ce = "_group_1f0zj_3", oe = "_loading_1f0zj_4", ie = "_skeleton_1f0zj_11", de = "_radio_1f0zj_28", ue = "_card_1f0zj_62", _e = "_title_1f0zj_90", me = "_description_1f0zj_101", B = {
|
|
7
7
|
group: ce,
|
|
@@ -11,32 +11,32 @@ const ce = "_group_1f0zj_3", oe = "_loading_1f0zj_4", ie = "_skeleton_1f0zj_11",
|
|
|
11
11
|
card: ue,
|
|
12
12
|
title: _e,
|
|
13
13
|
description: me
|
|
14
|
-
}, K = (e) => ({ "--choice-columns": e }),
|
|
14
|
+
}, K = (e) => ({ "--choice-columns": e }), st = ({
|
|
15
15
|
ariaLabel: e,
|
|
16
16
|
value: r,
|
|
17
17
|
options: t,
|
|
18
18
|
onChange: n,
|
|
19
|
-
columns:
|
|
19
|
+
columns: l = 4
|
|
20
20
|
}) => /* @__PURE__ */ a("div", { role: "radiogroup", "aria-label": e, children: /* @__PURE__ */ a(
|
|
21
21
|
Q,
|
|
22
22
|
{
|
|
23
23
|
name: e,
|
|
24
24
|
className: B.group,
|
|
25
|
-
style: K(
|
|
25
|
+
style: K(l),
|
|
26
26
|
value: r,
|
|
27
27
|
onChange: (c) => n(c.target.value),
|
|
28
28
|
children: t.map((c) => {
|
|
29
|
-
const u = c.unavailable ?? c.description,
|
|
30
|
-
return /* @__PURE__ */ a(Z, { value: c.value, className: B.radio, children: /* @__PURE__ */ m("span", { className: B.card, "data-checked":
|
|
29
|
+
const u = c.unavailable ?? c.description, i = c.value === r;
|
|
30
|
+
return /* @__PURE__ */ a(Z, { value: c.value, className: B.radio, children: /* @__PURE__ */ m("span", { className: B.card, "data-checked": i ? "true" : "false", "data-unavailable": c.unavailable ? "true" : void 0, children: [
|
|
31
31
|
/* @__PURE__ */ a(I.Text, { className: B.title, children: c.title }),
|
|
32
32
|
u ? /* @__PURE__ */ a(I.Text, { className: B.description, ellipsis: !0, children: u }) : null
|
|
33
33
|
] }) }, c.value || "all");
|
|
34
34
|
})
|
|
35
35
|
}
|
|
36
|
-
) }),
|
|
36
|
+
) }), lt = ({ count: e, columns: r = 4 }) => /* @__PURE__ */ a("div", { className: B.loading, style: K(r), "aria-busy": "true", children: Array.from({ length: e }, (t, n) => /* @__PURE__ */ a($, { loading: !0, active: !0, className: B.skeleton, placeholder: /* @__PURE__ */ a($.Paragraph, { rows: 2 }) }, n)) }), he = "_square_p43r8_9", ge = "_hiddenTitle_p43r8_28", pe = "_heroTitle_p43r8_40", fe = "_heroAccent_p43r8_52", be = "_searchBar_p43r8_60", ve = "_searchBox_p43r8_74", ye = "_searchInput_p43r8_80", Ne = "_searchPrefix_p43r8_116", we = "_searchButton_p43r8_125", Ce = "_searchTextButton_p43r8_137", xe = "_guide_p43r8_142", Te = "_guideLabel_p43r8_150", ke = "_guideTag_p43r8_156", Le = "_guideClear_p43r8_176", Be = "_stage_p43r8_5", Ae = "_modeTabs_p43r8_190", Se = "_modeTab_p43r8_190", Ie = "_keycap_p43r8_295", $e = "_categories_p43r8_318", Fe = "_panel_p43r8_323", Ee = "_nav_p43r8_330", Re = "_filters_p43r8_373", Pe = "_toolbarStart_p43r8_393", ze = "_filtersGroup_p43r8_400", Me = "_results_p43r8_408", qe = "_footer_p43r8_417", p = {
|
|
37
37
|
square: he,
|
|
38
|
-
hiddenTitle:
|
|
39
|
-
heroTitle:
|
|
38
|
+
hiddenTitle: ge,
|
|
39
|
+
heroTitle: pe,
|
|
40
40
|
heroAccent: fe,
|
|
41
41
|
searchBar: be,
|
|
42
42
|
searchBox: ve,
|
|
@@ -58,24 +58,24 @@ const ce = "_group_1f0zj_3", oe = "_loading_1f0zj_4", ie = "_skeleton_1f0zj_11",
|
|
|
58
58
|
filters: Re,
|
|
59
59
|
toolbarStart: Pe,
|
|
60
60
|
filtersGroup: ze,
|
|
61
|
-
results:
|
|
62
|
-
footer:
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
const n = e.current,
|
|
66
|
-
if (!n || !
|
|
61
|
+
results: Me,
|
|
62
|
+
footer: qe
|
|
63
|
+
}, De = (e, r, t) => {
|
|
64
|
+
M(() => {
|
|
65
|
+
const n = e.current, l = r.current, c = t.current;
|
|
66
|
+
if (!n || !l || !c) return;
|
|
67
67
|
let u = 0;
|
|
68
|
-
const
|
|
68
|
+
const i = () => {
|
|
69
69
|
u = 0;
|
|
70
|
-
const
|
|
70
|
+
const _ = Number.parseFloat(getComputedStyle(n).getPropertyValue("--app-header-height")) || 0, s = l.getBoundingClientRect().top, h = s + window.scrollY - _, g = h > 0 ? Math.min(1, Math.max(0, window.scrollY / h)) : 1;
|
|
71
71
|
n.style.setProperty("--hero-progress", g.toFixed(3));
|
|
72
|
-
const
|
|
73
|
-
n.dataset.stuck = Number.isFinite(
|
|
74
|
-
},
|
|
75
|
-
u || (u = window.requestAnimationFrame(
|
|
72
|
+
const b = Number.parseFloat(getComputedStyle(c).top);
|
|
73
|
+
n.dataset.stuck = Number.isFinite(b) && s < b - 0.5 ? "true" : "false";
|
|
74
|
+
}, o = () => {
|
|
75
|
+
u || (u = window.requestAnimationFrame(i));
|
|
76
76
|
};
|
|
77
|
-
return
|
|
78
|
-
window.removeEventListener("scroll",
|
|
77
|
+
return i(), window.addEventListener("scroll", o, { passive: !0 }), window.addEventListener("resize", o), () => {
|
|
78
|
+
window.removeEventListener("scroll", o), window.removeEventListener("resize", o), window.cancelAnimationFrame(u);
|
|
79
79
|
};
|
|
80
80
|
}, [e, r, t]);
|
|
81
81
|
}, nt = ({
|
|
@@ -83,20 +83,20 @@ const ce = "_group_1f0zj_3", oe = "_loading_1f0zj_4", ie = "_skeleton_1f0zj_11",
|
|
|
83
83
|
placeholder: r,
|
|
84
84
|
value: t,
|
|
85
85
|
onChange: n,
|
|
86
|
-
onSearch:
|
|
86
|
+
onSearch: l,
|
|
87
87
|
inputRef: c,
|
|
88
88
|
keyShortcut: u,
|
|
89
|
-
guide:
|
|
90
|
-
prefix:
|
|
91
|
-
modes:
|
|
92
|
-
buttonText:
|
|
89
|
+
guide: i,
|
|
90
|
+
prefix: o,
|
|
91
|
+
modes: _,
|
|
92
|
+
buttonText: s
|
|
93
93
|
}) => {
|
|
94
|
-
var
|
|
95
|
-
const
|
|
96
|
-
|
|
94
|
+
var C;
|
|
95
|
+
const h = !t && i && i.items.length > 0, g = !!(_ || s), b = /* @__PURE__ */ a(
|
|
96
|
+
j,
|
|
97
97
|
{
|
|
98
98
|
ref: c,
|
|
99
|
-
className:
|
|
99
|
+
className: p.searchInput,
|
|
100
100
|
"aria-label": e,
|
|
101
101
|
"aria-keyshortcuts": u,
|
|
102
102
|
showClear: !0,
|
|
@@ -104,127 +104,127 @@ const ce = "_group_1f0zj_3", oe = "_loading_1f0zj_4", ie = "_skeleton_1f0zj_11",
|
|
|
104
104
|
placeholder: r,
|
|
105
105
|
value: t,
|
|
106
106
|
onChange: n,
|
|
107
|
-
onEnterPress: () =>
|
|
108
|
-
onClear: () =>
|
|
109
|
-
prefix:
|
|
110
|
-
suffix: /* @__PURE__ */ m(
|
|
111
|
-
|
|
112
|
-
/* @__PURE__ */ a(I.Text, { className:
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
107
|
+
onEnterPress: () => l(t),
|
|
108
|
+
onClear: () => l(""),
|
|
109
|
+
prefix: o ? /* @__PURE__ */ a("span", { className: p.searchPrefix, children: o }) : void 0,
|
|
110
|
+
suffix: /* @__PURE__ */ m(W, { children: [
|
|
111
|
+
h ? /* @__PURE__ */ m("span", { className: p.guide, role: "group", "aria-label": i.label, children: [
|
|
112
|
+
/* @__PURE__ */ a(I.Text, { className: p.guideLabel, children: i.label }),
|
|
113
|
+
i.items.map((y) => /* @__PURE__ */ a(N, { theme: "light", type: "tertiary", size: "small", className: p.guideTag, onClick: () => l(y), children: y }, y)),
|
|
114
|
+
i.onClear ? /* @__PURE__ */ a(
|
|
115
|
+
N,
|
|
116
116
|
{
|
|
117
117
|
theme: "borderless",
|
|
118
118
|
type: "primary",
|
|
119
119
|
size: "small",
|
|
120
|
-
className:
|
|
120
|
+
className: p.guideClear,
|
|
121
121
|
icon: /* @__PURE__ */ a(G, { "aria-hidden": "true" }),
|
|
122
|
-
"aria-label": `清空${
|
|
123
|
-
onClick:
|
|
122
|
+
"aria-label": `清空${i.label}`,
|
|
123
|
+
onClick: i.onClear
|
|
124
124
|
}
|
|
125
125
|
) : null
|
|
126
126
|
] }) : null,
|
|
127
|
-
g && u && !t ? /* @__PURE__ */ a("span", { className:
|
|
128
|
-
|
|
129
|
-
|
|
127
|
+
g && u && !t ? /* @__PURE__ */ a("span", { className: p.keycap, "aria-hidden": "true", children: u }) : null,
|
|
128
|
+
s ? /* @__PURE__ */ a(
|
|
129
|
+
N,
|
|
130
130
|
{
|
|
131
131
|
theme: "solid",
|
|
132
132
|
type: "primary",
|
|
133
|
-
className:
|
|
133
|
+
className: p.searchTextButton,
|
|
134
134
|
icon: /* @__PURE__ */ a(z, { "aria-hidden": "true" }),
|
|
135
|
-
onClick: () =>
|
|
136
|
-
children:
|
|
135
|
+
onClick: () => l(t),
|
|
136
|
+
children: s
|
|
137
137
|
}
|
|
138
138
|
) : /* @__PURE__ */ a(
|
|
139
|
-
|
|
139
|
+
N,
|
|
140
140
|
{
|
|
141
141
|
theme: "solid",
|
|
142
142
|
type: "primary",
|
|
143
|
-
className:
|
|
143
|
+
className: p.searchButton,
|
|
144
144
|
icon: /* @__PURE__ */ a(z, { "aria-hidden": "true" }),
|
|
145
145
|
"aria-label": "检索",
|
|
146
|
-
onClick: () =>
|
|
146
|
+
onClick: () => l(t)
|
|
147
147
|
}
|
|
148
148
|
)
|
|
149
149
|
] })
|
|
150
150
|
}
|
|
151
151
|
);
|
|
152
|
-
if (!g) return
|
|
153
|
-
const
|
|
154
|
-
return /* @__PURE__ */ m("div", { className:
|
|
155
|
-
|
|
156
|
-
const d =
|
|
152
|
+
if (!g) return b;
|
|
153
|
+
const v = _ !== void 0 && ((C = _.options[0]) == null ? void 0 : C.value) === _.value;
|
|
154
|
+
return /* @__PURE__ */ m("div", { className: p.stage, "data-modes": _ ? "true" : void 0, "data-first-mode": v ? "true" : void 0, children: [
|
|
155
|
+
_ ? /* @__PURE__ */ a("div", { className: p.modeTabs, role: "radiogroup", "aria-label": _.label, "data-square-modes": "", children: _.options.map((y) => {
|
|
156
|
+
const d = y.value === _.value;
|
|
157
157
|
return /* @__PURE__ */ a(
|
|
158
|
-
|
|
158
|
+
N,
|
|
159
159
|
{
|
|
160
160
|
theme: "borderless",
|
|
161
161
|
type: "tertiary",
|
|
162
162
|
role: "radio",
|
|
163
163
|
"aria-checked": d,
|
|
164
|
-
className:
|
|
164
|
+
className: p.modeTab,
|
|
165
165
|
"data-active": d ? "true" : "false",
|
|
166
|
-
onClick: () =>
|
|
167
|
-
children:
|
|
166
|
+
onClick: () => _.onChange(y.value),
|
|
167
|
+
children: y.label
|
|
168
168
|
},
|
|
169
|
-
|
|
169
|
+
y.value
|
|
170
170
|
);
|
|
171
171
|
}) }) : null,
|
|
172
|
-
|
|
172
|
+
b
|
|
173
173
|
] });
|
|
174
|
-
}, ct = ({ children: e }) => /* @__PURE__ */ a("span", { className:
|
|
174
|
+
}, ct = ({ children: e }) => /* @__PURE__ */ a("span", { className: p.heroAccent, children: e }), ot = ({
|
|
175
175
|
testId: e,
|
|
176
176
|
title: r,
|
|
177
177
|
nav: t,
|
|
178
178
|
search: n,
|
|
179
|
-
categories:
|
|
179
|
+
categories: l,
|
|
180
180
|
filters: c,
|
|
181
181
|
toolbarLeft: u,
|
|
182
|
-
toolbarRight:
|
|
183
|
-
conditionKey:
|
|
184
|
-
children:
|
|
182
|
+
toolbarRight: i,
|
|
183
|
+
conditionKey: o,
|
|
184
|
+
children: _
|
|
185
185
|
}) => {
|
|
186
|
-
const
|
|
187
|
-
|
|
188
|
-
const
|
|
189
|
-
if (!
|
|
190
|
-
const
|
|
191
|
-
|
|
186
|
+
const s = k(null), h = k(null), g = k(null), b = k(null), v = k(null);
|
|
187
|
+
De(s, h, g), O(() => {
|
|
188
|
+
const y = s.current, d = g.current;
|
|
189
|
+
if (!y || !d) return;
|
|
190
|
+
const x = d.querySelector("[data-square-modes]") ? "true" : "false";
|
|
191
|
+
y.dataset.modes !== x && (y.dataset.modes = x);
|
|
192
192
|
});
|
|
193
|
-
const
|
|
194
|
-
return
|
|
195
|
-
if (
|
|
196
|
-
|
|
197
|
-
const
|
|
198
|
-
if (!
|
|
199
|
-
const
|
|
200
|
-
|
|
201
|
-
}, [
|
|
193
|
+
const C = k(o);
|
|
194
|
+
return M(() => {
|
|
195
|
+
if (C.current === o) return;
|
|
196
|
+
C.current = o;
|
|
197
|
+
const y = v.current, d = b.current;
|
|
198
|
+
if (!y || !d) return;
|
|
199
|
+
const x = y.getBoundingClientRect().top - d.getBoundingClientRect().bottom;
|
|
200
|
+
x < 0 && window.scrollBy({ top: x });
|
|
201
|
+
}, [o]), /* @__PURE__ */ m(
|
|
202
202
|
"section",
|
|
203
203
|
{
|
|
204
|
-
ref:
|
|
205
|
-
className:
|
|
204
|
+
ref: s,
|
|
205
|
+
className: p.square,
|
|
206
206
|
"data-testid": e,
|
|
207
|
-
"data-categories":
|
|
207
|
+
"data-categories": l ? "true" : "false",
|
|
208
208
|
"data-filters": c ? "true" : "false",
|
|
209
209
|
"data-nav": t ? "true" : "false",
|
|
210
210
|
children: [
|
|
211
|
-
r ? /* @__PURE__ */ a(I.Title, { heading: 1, className: t ?
|
|
212
|
-
t ? /* @__PURE__ */ a("div", { className:
|
|
213
|
-
/* @__PURE__ */ a("div", { ref:
|
|
214
|
-
/* @__PURE__ */ a("div", { ref: g, className:
|
|
215
|
-
|
|
216
|
-
c ? /* @__PURE__ */ a("div", { className:
|
|
217
|
-
/* @__PURE__ */ m("div", { ref:
|
|
218
|
-
/* @__PURE__ */ a("div", { className:
|
|
219
|
-
/* @__PURE__ */ a("div", { className:
|
|
211
|
+
r ? /* @__PURE__ */ a(I.Title, { heading: 1, className: t ? p.hiddenTitle : p.heroTitle, children: r }) : null,
|
|
212
|
+
t ? /* @__PURE__ */ a("div", { className: p.nav, children: t }) : null,
|
|
213
|
+
/* @__PURE__ */ a("div", { ref: h, "aria-hidden": "true" }),
|
|
214
|
+
/* @__PURE__ */ a("div", { ref: g, className: p.searchBar, children: /* @__PURE__ */ a("div", { className: p.searchBox, children: n }) }),
|
|
215
|
+
l ? /* @__PURE__ */ a("div", { className: p.categories, children: l }) : null,
|
|
216
|
+
c ? /* @__PURE__ */ a("div", { className: p.panel, children: c }) : null,
|
|
217
|
+
/* @__PURE__ */ m("div", { ref: b, className: p.filters, role: "toolbar", "aria-label": "排序与视图", children: [
|
|
218
|
+
/* @__PURE__ */ a("div", { className: p.toolbarStart, children: u }),
|
|
219
|
+
/* @__PURE__ */ a("div", { className: p.filtersGroup, children: i })
|
|
220
220
|
] }),
|
|
221
|
-
/* @__PURE__ */ a("div", { ref:
|
|
221
|
+
/* @__PURE__ */ a("div", { ref: v, className: p.results, children: _ })
|
|
222
222
|
]
|
|
223
223
|
}
|
|
224
224
|
);
|
|
225
|
-
}, it = ({ children: e, footerRef: r }) => /* @__PURE__ */ a("div", { ref: r, className:
|
|
226
|
-
tabs:
|
|
227
|
-
tab:
|
|
225
|
+
}, it = ({ children: e, footerRef: r }) => /* @__PURE__ */ a("div", { ref: r, className: p.footer, children: e }), We = "_tabs_d9vgt_7", je = "_tab_d9vgt_7", Oe = "_fan_d9vgt_114", He = "_cover_d9vgt_122", Ge = "_coverImage_d9vgt_155", Ve = "_text_d9vgt_190", Ke = "_label_d9vgt_197", Ye = "_hint_d9vgt_222", Ue = "_skeletonLabel_d9vgt_262", T = {
|
|
226
|
+
tabs: We,
|
|
227
|
+
tab: je,
|
|
228
228
|
fan: Oe,
|
|
229
229
|
cover: He,
|
|
230
230
|
coverImage: Ge,
|
|
@@ -233,98 +233,99 @@ const ce = "_group_1f0zj_3", oe = "_loading_1f0zj_4", ie = "_skeleton_1f0zj_11",
|
|
|
233
233
|
hint: Ye,
|
|
234
234
|
skeletonLabel: Ue
|
|
235
235
|
}, Xe = 3, Y = (e) => ({ "--cover-tab-count": e }), Je = ({ src: e }) => {
|
|
236
|
-
const [r, t] = A(), [n,
|
|
237
|
-
return /* @__PURE__ */ a("span", { className:
|
|
236
|
+
const [r, t] = A(), [n, l] = A();
|
|
237
|
+
return /* @__PURE__ */ a("span", { className: T.cover, "data-loaded": e && r === e ? "true" : void 0, children: e && n !== e ? /* @__PURE__ */ a(
|
|
238
238
|
"img",
|
|
239
239
|
{
|
|
240
|
-
className:
|
|
240
|
+
className: T.coverImage,
|
|
241
241
|
src: e,
|
|
242
242
|
alt: "",
|
|
243
243
|
loading: "lazy",
|
|
244
244
|
decoding: "async",
|
|
245
245
|
draggable: !1,
|
|
246
246
|
onLoad: () => t(e),
|
|
247
|
-
onError: () =>
|
|
247
|
+
onError: () => l(e)
|
|
248
248
|
}
|
|
249
249
|
) : null });
|
|
250
|
-
}, U = ({ covers: e }) => /* @__PURE__ */ a("span", { className:
|
|
251
|
-
var
|
|
252
|
-
const
|
|
253
|
-
|
|
254
|
-
const
|
|
255
|
-
!
|
|
250
|
+
}, U = ({ covers: e }) => /* @__PURE__ */ a("span", { className: T.fan, "aria-hidden": "true", children: Array.from({ length: Xe }, (r, t) => /* @__PURE__ */ a(Je, { src: e == null ? void 0 : e[t] }, t)) }), dt = ({ ariaLabel: e, value: r, options: t, onChange: n }) => {
|
|
251
|
+
var _;
|
|
252
|
+
const l = k(null);
|
|
253
|
+
M(() => {
|
|
254
|
+
const s = l.current, h = s == null ? void 0 : s.querySelector('[aria-selected="true"]');
|
|
255
|
+
!s || !h || s.scrollWidth <= s.clientWidth || (s.scrollLeft = h.offsetLeft - (s.clientWidth - h.offsetWidth) / 2);
|
|
256
256
|
}, [r]);
|
|
257
|
-
const c = t.some((
|
|
258
|
-
var
|
|
259
|
-
const
|
|
260
|
-
b < 0 || (
|
|
257
|
+
const c = t.some((s) => s.value === r) ? r : (_ = t[0]) == null ? void 0 : _.value, u = (s) => s.unavailable || s.description, i = t.some((s) => s.description) ? "2" : t.some((s) => s.unavailable) ? "1" : void 0, o = (s, h) => {
|
|
258
|
+
var v, C;
|
|
259
|
+
const g = t.length - 1, b = s.key === "ArrowRight" || s.key === "ArrowDown" ? h === g ? 0 : h + 1 : s.key === "ArrowLeft" || s.key === "ArrowUp" ? h === 0 ? g : h - 1 : s.key === "Home" ? 0 : s.key === "End" ? g : -1;
|
|
260
|
+
b < 0 || (s.preventDefault(), (C = (v = l.current) == null ? void 0 : v.querySelectorAll('[role="tab"]')[b]) == null || C.focus());
|
|
261
261
|
};
|
|
262
262
|
return /* @__PURE__ */ a(
|
|
263
263
|
"div",
|
|
264
264
|
{
|
|
265
|
-
ref:
|
|
265
|
+
ref: l,
|
|
266
266
|
role: "tablist",
|
|
267
267
|
"aria-label": e,
|
|
268
|
-
className:
|
|
268
|
+
className: T.tabs,
|
|
269
269
|
"data-dense": t.length > 4 ? "true" : void 0,
|
|
270
|
+
"data-note-lines": i,
|
|
270
271
|
style: Y(t.length),
|
|
271
|
-
children: t.map((
|
|
272
|
-
const
|
|
272
|
+
children: t.map((s, h) => {
|
|
273
|
+
const g = s.value === r, b = u(s);
|
|
273
274
|
return /* @__PURE__ */ m(
|
|
274
|
-
|
|
275
|
+
N,
|
|
275
276
|
{
|
|
276
277
|
theme: "borderless",
|
|
277
278
|
type: "tertiary",
|
|
278
279
|
role: "tab",
|
|
279
|
-
"aria-selected":
|
|
280
|
-
"aria-label":
|
|
281
|
-
tabIndex:
|
|
282
|
-
className:
|
|
283
|
-
"data-active":
|
|
284
|
-
"data-unavailable":
|
|
285
|
-
onClick: () => n(
|
|
286
|
-
onKeyDown: (
|
|
280
|
+
"aria-selected": g,
|
|
281
|
+
"aria-label": b ? `${s.label},${b}` : void 0,
|
|
282
|
+
tabIndex: s.value === c ? 0 : -1,
|
|
283
|
+
className: T.tab,
|
|
284
|
+
"data-active": g ? "true" : "false",
|
|
285
|
+
"data-unavailable": s.unavailable ? "true" : void 0,
|
|
286
|
+
onClick: () => n(s.value),
|
|
287
|
+
onKeyDown: (v) => o(v, h),
|
|
287
288
|
children: [
|
|
288
|
-
/* @__PURE__ */ a(U, { covers:
|
|
289
|
-
/* @__PURE__ */ m("span", { className:
|
|
290
|
-
/* @__PURE__ */ a("span", { className:
|
|
291
|
-
|
|
289
|
+
/* @__PURE__ */ a(U, { covers: s.covers }),
|
|
290
|
+
/* @__PURE__ */ m("span", { className: T.text, children: [
|
|
291
|
+
/* @__PURE__ */ a("span", { className: T.label, children: s.label }),
|
|
292
|
+
b ? /* @__PURE__ */ a("span", { className: T.hint, title: s.unavailable ? void 0 : s.description, children: b }) : null
|
|
292
293
|
] })
|
|
293
294
|
]
|
|
294
295
|
},
|
|
295
|
-
|
|
296
|
+
s.value
|
|
296
297
|
);
|
|
297
298
|
})
|
|
298
299
|
}
|
|
299
300
|
);
|
|
300
|
-
}, ut = ({ count: e, active: r = !0 }) => /* @__PURE__ */ a("div", { className:
|
|
301
|
+
}, ut = ({ count: e, active: r = !0 }) => /* @__PURE__ */ a("div", { className: T.tabs, "data-dense": e > 4 ? "true" : void 0, style: Y(e), "aria-busy": r ? "true" : void 0, children: Array.from({ length: e }, (t, n) => /* @__PURE__ */ m("span", { className: T.tab, "data-skeleton": "true", children: [
|
|
301
302
|
/* @__PURE__ */ a(U, {}),
|
|
302
|
-
/* @__PURE__ */ a($, { loading: !0, active: r, placeholder: /* @__PURE__ */ a($.Title, { className:
|
|
303
|
-
] }, n)) }), Qe = "_trigger_iy209_3", Ze = "_text_iy209_27", ea = "_prefix_iy209_32", aa = "_arrow_iy209_50", ta = "_menu_iy209_60", ra = "_checkItem_iy209_64",
|
|
303
|
+
/* @__PURE__ */ a($, { loading: !0, active: r, placeholder: /* @__PURE__ */ a($.Title, { className: T.skeletonLabel }) })
|
|
304
|
+
] }, n)) }), Qe = "_trigger_iy209_3", Ze = "_text_iy209_27", ea = "_prefix_iy209_32", aa = "_arrow_iy209_50", ta = "_menu_iy209_60", ra = "_checkItem_iy209_64", sa = "_check_iy209_64", la = "_checkHidden_iy209_75", L = {
|
|
304
305
|
trigger: Qe,
|
|
305
306
|
text: Ze,
|
|
306
307
|
prefix: ea,
|
|
307
308
|
arrow: aa,
|
|
308
309
|
menu: ta,
|
|
309
310
|
checkItem: ra,
|
|
310
|
-
check:
|
|
311
|
-
checkHidden:
|
|
311
|
+
check: sa,
|
|
312
|
+
checkHidden: la
|
|
312
313
|
}, X = H(
|
|
313
|
-
({ text: e, ariaLabel: r, active: t = !1, empty: n = !1, icon:
|
|
314
|
-
|
|
314
|
+
({ text: e, ariaLabel: r, active: t = !1, empty: n = !1, icon: l, arrow: c = !0, pressed: u, onClick: i, ...o }, _) => /* @__PURE__ */ m(
|
|
315
|
+
N,
|
|
315
316
|
{
|
|
316
317
|
theme: "borderless",
|
|
317
318
|
type: "primary",
|
|
318
|
-
...
|
|
319
|
-
ref:
|
|
319
|
+
...o,
|
|
320
|
+
ref: _,
|
|
320
321
|
className: L.trigger,
|
|
321
322
|
"data-active": t ? "true" : "false",
|
|
322
323
|
"data-empty": n ? "true" : "false",
|
|
323
324
|
"aria-label": r,
|
|
324
325
|
"aria-pressed": u,
|
|
325
|
-
onClick:
|
|
326
|
+
onClick: i,
|
|
326
327
|
children: [
|
|
327
|
-
|
|
328
|
+
l ? /* @__PURE__ */ a("span", { className: L.prefix, children: l }) : null,
|
|
328
329
|
/* @__PURE__ */ a("span", { className: L.text, children: e }),
|
|
329
330
|
c ? /* @__PURE__ */ a(V, { className: L.arrow, "aria-hidden": "true" }) : null
|
|
330
331
|
]
|
|
@@ -337,33 +338,33 @@ const F = "__all__", _t = ({
|
|
|
337
338
|
placeholder: r,
|
|
338
339
|
value: t,
|
|
339
340
|
options: n,
|
|
340
|
-
onChange:
|
|
341
|
+
onChange: l,
|
|
341
342
|
allLabel: c,
|
|
342
343
|
icon: u,
|
|
343
|
-
arrow:
|
|
344
|
-
checkmark:
|
|
345
|
-
position:
|
|
346
|
-
disabled:
|
|
347
|
-
highlight:
|
|
344
|
+
arrow: i = !0,
|
|
345
|
+
checkmark: o = !1,
|
|
346
|
+
position: _ = "bottomLeft",
|
|
347
|
+
disabled: s = !1,
|
|
348
|
+
highlight: h = !0
|
|
348
349
|
}) => {
|
|
349
|
-
const [g,
|
|
350
|
+
const [g, b] = A(!1), v = n.find((d) => d.value === t), C = c ? [{ value: F, label: c }, ...n] : n, y = t || (c ? F : "");
|
|
350
351
|
return /* @__PURE__ */ a(
|
|
351
352
|
S,
|
|
352
353
|
{
|
|
353
|
-
trigger:
|
|
354
|
-
position:
|
|
355
|
-
visible:
|
|
356
|
-
onVisibleChange:
|
|
357
|
-
render: /* @__PURE__ */ a(S.Menu, { className: L.menu, children:
|
|
354
|
+
trigger: s ? "custom" : "click",
|
|
355
|
+
position: _,
|
|
356
|
+
visible: s ? !1 : g,
|
|
357
|
+
onVisibleChange: b,
|
|
358
|
+
render: /* @__PURE__ */ a(S.Menu, { className: L.menu, children: C.map((d) => /* @__PURE__ */ m(
|
|
358
359
|
S.Item,
|
|
359
360
|
{
|
|
360
|
-
active: d.value ===
|
|
361
|
-
className:
|
|
361
|
+
active: d.value === y,
|
|
362
|
+
className: o ? L.checkItem : void 0,
|
|
362
363
|
onClick: () => {
|
|
363
|
-
|
|
364
|
+
b(!1), l(d.value === F ? "" : d.value);
|
|
364
365
|
},
|
|
365
366
|
children: [
|
|
366
|
-
|
|
367
|
+
o ? /* @__PURE__ */ a(ae, { className: d.value === y ? L.check : L.checkHidden, "aria-hidden": "true" }) : null,
|
|
367
368
|
d.label
|
|
368
369
|
]
|
|
369
370
|
},
|
|
@@ -372,17 +373,17 @@ const F = "__all__", _t = ({
|
|
|
372
373
|
children: /* @__PURE__ */ a(
|
|
373
374
|
X,
|
|
374
375
|
{
|
|
375
|
-
text: (
|
|
376
|
-
ariaLabel: `${e}:${(
|
|
376
|
+
text: (v == null ? void 0 : v.label) ?? r ?? e,
|
|
377
|
+
ariaLabel: `${e}:${(v == null ? void 0 : v.label) ?? c ?? "未选择"}`,
|
|
377
378
|
active: g,
|
|
378
|
-
empty: !
|
|
379
|
+
empty: !v || !h,
|
|
379
380
|
icon: u,
|
|
380
|
-
arrow:
|
|
381
|
+
arrow: i
|
|
381
382
|
}
|
|
382
383
|
)
|
|
383
384
|
}
|
|
384
385
|
);
|
|
385
|
-
}, na = "_panel_1rhpy_7", ca = "_row_1rhpy_18", oa = "_rowLabel_1rhpy_27", ia = "_rowContent_1rhpy_38", da = "_rowExtra_1rhpy_48", ua = "_option_1rhpy_58", _a = "_selectedTag_1rhpy_85", ma = "_selectedText_1rhpy_99", ha = "_selectedRemove_1rhpy_106",
|
|
386
|
+
}, na = "_panel_1rhpy_7", ca = "_row_1rhpy_18", oa = "_rowLabel_1rhpy_27", ia = "_rowContent_1rhpy_38", da = "_rowExtra_1rhpy_48", ua = "_option_1rhpy_58", _a = "_selectedTag_1rhpy_85", ma = "_selectedText_1rhpy_99", ha = "_selectedRemove_1rhpy_106", ga = "_clearButton_1rhpy_120", pa = "_selectText_1rhpy_135", fa = "_selectTextLabel_1rhpy_163", ba = "_selectTextArrow_1rhpy_170", va = "_menu_1rhpy_186", ya = "_rangePanel_1rhpy_192", Na = "_rangePresets_1rhpy_199", wa = "_rangePreset_1rhpy_199", Ca = "_rangeCustom_1rhpy_229", xa = "_rangeDash_1rhpy_237", Ta = "_rangeFooter_1rhpy_241", ka = "_capsules_1rhpy_249", La = "_capsule_1rhpy_249", Ba = "_sortBar_1rhpy_289", Aa = "_sortLabel_1rhpy_303", Sa = "_sortItem_1rhpy_311", Ia = "_sortArrow_1rhpy_334", f = {
|
|
386
387
|
panel: na,
|
|
387
388
|
row: ca,
|
|
388
389
|
rowLabel: oa,
|
|
@@ -392,8 +393,8 @@ const F = "__all__", _t = ({
|
|
|
392
393
|
selectedTag: _a,
|
|
393
394
|
selectedText: ma,
|
|
394
395
|
selectedRemove: ha,
|
|
395
|
-
clearButton:
|
|
396
|
-
selectText:
|
|
396
|
+
clearButton: ga,
|
|
397
|
+
selectText: pa,
|
|
397
398
|
selectTextLabel: fa,
|
|
398
399
|
selectTextArrow: ba,
|
|
399
400
|
menu: va,
|
|
@@ -409,55 +410,55 @@ const F = "__all__", _t = ({
|
|
|
409
410
|
sortLabel: Aa,
|
|
410
411
|
sortItem: Sa,
|
|
411
412
|
sortArrow: Ia
|
|
412
|
-
}, mt = ({ children: e, ariaLabel: r = "筛选条件" }) => /* @__PURE__ */ a("div", { className:
|
|
413
|
-
/* @__PURE__ */ a("div", { className:
|
|
414
|
-
/* @__PURE__ */ a("div", { className:
|
|
415
|
-
t ? /* @__PURE__ */ a("div", { className:
|
|
416
|
-
] }), ht = ({ label: e, value: r, options: t, onChange: n }) => /* @__PURE__ */ a(J, { label: e, children: t.map((
|
|
413
|
+
}, mt = ({ children: e, ariaLabel: r = "筛选条件" }) => /* @__PURE__ */ a("div", { className: f.panel, role: "group", "aria-label": r, children: e }), J = ({ label: e, children: r, extra: t }) => /* @__PURE__ */ m("div", { className: f.row, role: "group", "aria-label": e, children: [
|
|
414
|
+
/* @__PURE__ */ a("div", { className: f.rowLabel, "aria-hidden": "true", children: e }),
|
|
415
|
+
/* @__PURE__ */ a("div", { className: f.rowContent, children: r }),
|
|
416
|
+
t ? /* @__PURE__ */ a("div", { className: f.rowExtra, children: t }) : null
|
|
417
|
+
] }), ht = ({ label: e, value: r, options: t, onChange: n }) => /* @__PURE__ */ a(J, { label: e, children: t.map((l) => /* @__PURE__ */ a(
|
|
417
418
|
$a,
|
|
418
419
|
{
|
|
419
|
-
label:
|
|
420
|
-
active:
|
|
421
|
-
onClick: () => n(
|
|
420
|
+
label: l.label,
|
|
421
|
+
active: l.value === r,
|
|
422
|
+
onClick: () => n(l.value === r ? "" : l.value)
|
|
422
423
|
},
|
|
423
|
-
|
|
424
|
+
l.value
|
|
424
425
|
)) }), $a = ({
|
|
425
426
|
label: e,
|
|
426
427
|
active: r,
|
|
427
428
|
onClick: t
|
|
428
429
|
}) => /* @__PURE__ */ a(
|
|
429
|
-
|
|
430
|
+
N,
|
|
430
431
|
{
|
|
431
432
|
theme: "borderless",
|
|
432
433
|
type: "primary",
|
|
433
|
-
className:
|
|
434
|
+
className: f.option,
|
|
434
435
|
"data-active": r ? "true" : "false",
|
|
435
436
|
"aria-pressed": r,
|
|
436
437
|
onClick: t,
|
|
437
438
|
children: e
|
|
438
439
|
}
|
|
439
|
-
),
|
|
440
|
+
), gt = ({
|
|
440
441
|
conditions: e,
|
|
441
442
|
onClear: r
|
|
442
443
|
}) => e.length === 0 ? null : /* @__PURE__ */ m(J, { label: "已选条件", children: [
|
|
443
|
-
e.map((t) => /* @__PURE__ */ m("span", { className:
|
|
444
|
-
/* @__PURE__ */ a("span", { className:
|
|
444
|
+
e.map((t) => /* @__PURE__ */ m("span", { className: f.selectedTag, children: [
|
|
445
|
+
/* @__PURE__ */ a("span", { className: f.selectedText, children: t.label }),
|
|
445
446
|
/* @__PURE__ */ a(
|
|
446
|
-
|
|
447
|
+
N,
|
|
447
448
|
{
|
|
448
449
|
theme: "borderless",
|
|
449
450
|
type: "primary",
|
|
450
451
|
size: "small",
|
|
451
|
-
className:
|
|
452
|
+
className: f.selectedRemove,
|
|
452
453
|
icon: /* @__PURE__ */ a(G, { "aria-hidden": "true" }),
|
|
453
454
|
"aria-label": `移除 ${t.label}`,
|
|
454
455
|
onClick: t.onRemove
|
|
455
456
|
}
|
|
456
457
|
)
|
|
457
458
|
] }, t.key)),
|
|
458
|
-
/* @__PURE__ */ a(
|
|
459
|
-
] }), E = "__all__",
|
|
460
|
-
const [c, u] = A(!1),
|
|
459
|
+
/* @__PURE__ */ a(N, { theme: "borderless", type: "primary", size: "small", className: f.clearButton, icon: /* @__PURE__ */ a(te, { "aria-hidden": "true" }), onClick: r, children: "清空" })
|
|
460
|
+
] }), E = "__all__", pt = ({ placeholder: e, label: r, value: t, options: n, onChange: l }) => {
|
|
461
|
+
const [c, u] = A(!1), i = n.find((o) => o.value === t);
|
|
461
462
|
return /* @__PURE__ */ a(
|
|
462
463
|
S,
|
|
463
464
|
{
|
|
@@ -465,129 +466,129 @@ const F = "__all__", _t = ({
|
|
|
465
466
|
position: "bottomLeft",
|
|
466
467
|
visible: c,
|
|
467
468
|
onVisibleChange: u,
|
|
468
|
-
render: /* @__PURE__ */ a(S.Menu, { className:
|
|
469
|
+
render: /* @__PURE__ */ a(S.Menu, { className: f.menu, children: [{ value: E, label: e }, ...n].map((o) => /* @__PURE__ */ a(
|
|
469
470
|
S.Item,
|
|
470
471
|
{
|
|
471
|
-
active:
|
|
472
|
+
active: o.value === (t || E),
|
|
472
473
|
onClick: () => {
|
|
473
|
-
u(!1),
|
|
474
|
+
u(!1), l(o.value === E ? "" : o.value);
|
|
474
475
|
},
|
|
475
|
-
children:
|
|
476
|
+
children: o.label
|
|
476
477
|
},
|
|
477
|
-
|
|
478
|
+
o.value
|
|
478
479
|
)) }),
|
|
479
480
|
children: /* @__PURE__ */ a(
|
|
480
|
-
|
|
481
|
+
q,
|
|
481
482
|
{
|
|
482
|
-
text: (
|
|
483
|
-
ariaLabel: `${r}:${(
|
|
484
|
-
active: !!
|
|
483
|
+
text: (i == null ? void 0 : i.label) ?? e,
|
|
484
|
+
ariaLabel: `${r}:${(i == null ? void 0 : i.label) ?? "不限"}`,
|
|
485
|
+
active: !!i,
|
|
485
486
|
open: c
|
|
486
487
|
}
|
|
487
488
|
)
|
|
488
489
|
}
|
|
489
490
|
);
|
|
490
|
-
},
|
|
491
|
-
({ text: e, ariaLabel: r, active: t, open: n, ...
|
|
492
|
-
|
|
491
|
+
}, q = H(
|
|
492
|
+
({ text: e, ariaLabel: r, active: t, open: n, ...l }, c) => /* @__PURE__ */ m(
|
|
493
|
+
N,
|
|
493
494
|
{
|
|
494
495
|
theme: "borderless",
|
|
495
496
|
type: "primary",
|
|
496
|
-
...
|
|
497
|
+
...l,
|
|
497
498
|
ref: c,
|
|
498
|
-
className:
|
|
499
|
+
className: f.selectText,
|
|
499
500
|
"data-active": t ? "true" : "false",
|
|
500
501
|
"data-open": n ? "true" : "false",
|
|
501
502
|
"aria-label": r,
|
|
502
503
|
children: [
|
|
503
|
-
/* @__PURE__ */ a("span", { className:
|
|
504
|
-
/* @__PURE__ */ a(V, { className:
|
|
504
|
+
/* @__PURE__ */ a("span", { className: f.selectTextLabel, children: e }),
|
|
505
|
+
/* @__PURE__ */ a(V, { className: f.selectTextArrow, "aria-hidden": "true" })
|
|
505
506
|
]
|
|
506
507
|
}
|
|
507
508
|
)
|
|
508
509
|
);
|
|
509
|
-
|
|
510
|
-
const R = (e, r) => e.min === r.min && e.max === r.max, ft = ({ label: e, value: r, presets: t, onChange: n, limit:
|
|
511
|
-
const [
|
|
512
|
-
|
|
513
|
-
},
|
|
514
|
-
const
|
|
515
|
-
return Number.isFinite(
|
|
510
|
+
q.displayName = "SelectTextTrigger";
|
|
511
|
+
const R = (e, r) => e.min === r.min && e.max === r.max, ft = ({ label: e, value: r, presets: t, onChange: n, limit: l, unit: c, minOnly: u = !1, format: i }) => {
|
|
512
|
+
const [o, _] = A(!1), [s, h] = A(r), g = r.min !== void 0 || r.max !== void 0, b = g ? i(r) : e, v = (d) => {
|
|
513
|
+
_(!1), n(d);
|
|
514
|
+
}, C = s.min === void 0 && s.max === void 0 || s.min !== void 0 && s.max !== void 0 && s.min > s.max, y = (d) => {
|
|
515
|
+
const x = typeof d == "number" ? d : typeof d == "string" && d.trim() !== "" ? Number(d) : NaN;
|
|
516
|
+
return Number.isFinite(x) ? Math.round(x) : void 0;
|
|
516
517
|
};
|
|
517
518
|
return /* @__PURE__ */ a(
|
|
518
519
|
ee,
|
|
519
520
|
{
|
|
520
521
|
trigger: "click",
|
|
521
522
|
position: "bottomLeft",
|
|
522
|
-
visible:
|
|
523
|
+
visible: o,
|
|
523
524
|
onVisibleChange: (d) => {
|
|
524
|
-
|
|
525
|
+
_(d), d && h(r);
|
|
525
526
|
},
|
|
526
|
-
content: /* @__PURE__ */ m("div", { className:
|
|
527
|
-
/* @__PURE__ */ a("div", { className:
|
|
528
|
-
|
|
527
|
+
content: /* @__PURE__ */ m("div", { className: f.rangePanel, role: "group", "aria-label": e, children: [
|
|
528
|
+
/* @__PURE__ */ a("div", { className: f.rangePresets, children: t.map((d) => /* @__PURE__ */ a(
|
|
529
|
+
N,
|
|
529
530
|
{
|
|
530
531
|
theme: "borderless",
|
|
531
532
|
type: "primary",
|
|
532
|
-
className:
|
|
533
|
+
className: f.rangePreset,
|
|
533
534
|
"data-active": R(d, r) ? "true" : "false",
|
|
534
535
|
"aria-pressed": R(d, r),
|
|
535
|
-
onClick: () =>
|
|
536
|
+
onClick: () => v(R(d, r) ? {} : { min: d.min, max: d.max }),
|
|
536
537
|
children: d.label
|
|
537
538
|
},
|
|
538
539
|
d.label
|
|
539
540
|
)) }),
|
|
540
|
-
/* @__PURE__ */ m("div", { className:
|
|
541
|
+
/* @__PURE__ */ m("div", { className: f.rangeCustom, children: [
|
|
541
542
|
/* @__PURE__ */ a(
|
|
542
|
-
|
|
543
|
+
D,
|
|
543
544
|
{
|
|
544
545
|
size: "small",
|
|
545
546
|
"aria-label": u ? `${e}不低于` : `${e}最小值`,
|
|
546
547
|
placeholder: u ? "不低于" : "最小",
|
|
547
548
|
min: 0,
|
|
548
|
-
max:
|
|
549
|
+
max: l,
|
|
549
550
|
precision: 0,
|
|
550
551
|
suffix: c,
|
|
551
|
-
value:
|
|
552
|
-
onChange: (d) =>
|
|
552
|
+
value: s.min,
|
|
553
|
+
onChange: (d) => h((x) => ({ ...x, min: y(d) }))
|
|
553
554
|
}
|
|
554
555
|
),
|
|
555
|
-
u ? null : /* @__PURE__ */ m(
|
|
556
|
-
/* @__PURE__ */ a("span", { className:
|
|
556
|
+
u ? null : /* @__PURE__ */ m(W, { children: [
|
|
557
|
+
/* @__PURE__ */ a("span", { className: f.rangeDash, children: "–" }),
|
|
557
558
|
/* @__PURE__ */ a(
|
|
558
|
-
|
|
559
|
+
D,
|
|
559
560
|
{
|
|
560
561
|
size: "small",
|
|
561
562
|
"aria-label": `${e}最大值`,
|
|
562
563
|
placeholder: "最大",
|
|
563
564
|
min: 0,
|
|
564
|
-
max:
|
|
565
|
+
max: l,
|
|
565
566
|
precision: 0,
|
|
566
567
|
suffix: c,
|
|
567
|
-
value:
|
|
568
|
-
onChange: (d) =>
|
|
568
|
+
value: s.max,
|
|
569
|
+
onChange: (d) => h((x) => ({ ...x, max: y(d) }))
|
|
569
570
|
}
|
|
570
571
|
)
|
|
571
572
|
] })
|
|
572
573
|
] }),
|
|
573
|
-
/* @__PURE__ */ m("div", { className:
|
|
574
|
-
/* @__PURE__ */ a(
|
|
575
|
-
/* @__PURE__ */ a(
|
|
574
|
+
/* @__PURE__ */ m("div", { className: f.rangeFooter, children: [
|
|
575
|
+
/* @__PURE__ */ a(N, { theme: "light", type: "tertiary", size: "small", disabled: !g, onClick: () => v({}), children: "清除" }),
|
|
576
|
+
/* @__PURE__ */ a(N, { theme: "solid", type: "primary", size: "small", disabled: C, onClick: () => v(s), children: "确定" })
|
|
576
577
|
] })
|
|
577
578
|
] }),
|
|
578
|
-
children: /* @__PURE__ */ a(
|
|
579
|
+
children: /* @__PURE__ */ a(q, { text: b, ariaLabel: `${e}:${g ? b : "不限"}`, active: g, open: o })
|
|
579
580
|
}
|
|
580
581
|
);
|
|
581
|
-
}, bt = ({ label: e, value: r, options: t, onChange: n, size:
|
|
582
|
+
}, bt = ({ label: e, value: r, options: t, onChange: n, size: l = "default" }) => /* @__PURE__ */ a("div", { className: f.capsules, role: "radiogroup", "aria-label": e, "data-size": l, children: t.map((c) => {
|
|
582
583
|
const u = c.value === r;
|
|
583
584
|
return /* @__PURE__ */ a(
|
|
584
|
-
|
|
585
|
+
N,
|
|
585
586
|
{
|
|
586
587
|
theme: "borderless",
|
|
587
588
|
type: "primary",
|
|
588
589
|
role: "radio",
|
|
589
590
|
"aria-checked": u,
|
|
590
|
-
className:
|
|
591
|
+
className: f.capsule,
|
|
591
592
|
"data-active": u ? "true" : "false",
|
|
592
593
|
"data-danger": c.danger ? "true" : void 0,
|
|
593
594
|
onClick: () => n(c.value),
|
|
@@ -595,47 +596,47 @@ const R = (e, r) => e.min === r.min && e.max === r.max, ft = ({ label: e, value:
|
|
|
595
596
|
},
|
|
596
597
|
c.value
|
|
597
598
|
);
|
|
598
|
-
}) }), vt = ({ value: e, options: r, onChange: t, plain: n = [], disabled:
|
|
599
|
-
/* @__PURE__ */ a("span", { className:
|
|
599
|
+
}) }), vt = ({ value: e, options: r, onChange: t, plain: n = [], disabled: l = !1 }) => /* @__PURE__ */ m("div", { className: f.sortBar, role: "radiogroup", "aria-label": "排序", children: [
|
|
600
|
+
/* @__PURE__ */ a("span", { className: f.sortLabel, "aria-hidden": "true", children: "排序:" }),
|
|
600
601
|
r.map((c) => {
|
|
601
602
|
const u = c.value === e;
|
|
602
603
|
return /* @__PURE__ */ m(
|
|
603
|
-
|
|
604
|
+
N,
|
|
604
605
|
{
|
|
605
606
|
theme: "borderless",
|
|
606
607
|
type: "primary",
|
|
607
608
|
role: "radio",
|
|
608
609
|
"aria-checked": u,
|
|
609
|
-
disabled:
|
|
610
|
-
className:
|
|
610
|
+
disabled: l,
|
|
611
|
+
className: f.sortItem,
|
|
611
612
|
"data-active": u ? "true" : "false",
|
|
612
613
|
onClick: () => t(c.value),
|
|
613
614
|
children: [
|
|
614
615
|
c.label,
|
|
615
|
-
n.includes(c.value) ? null : /* @__PURE__ */ a(re, { className:
|
|
616
|
+
n.includes(c.value) ? null : /* @__PURE__ */ a(re, { className: f.sortArrow, "aria-hidden": "true" })
|
|
616
617
|
]
|
|
617
618
|
},
|
|
618
619
|
c.value
|
|
619
620
|
);
|
|
620
621
|
})
|
|
621
|
-
] }), Fa = "_toolbar_o0ggg_3", Ea = "_row_o0ggg_9", Ra = "_controls_o0ggg_17", Pa = "_search_o0ggg_25", za = "_filters_o0ggg_30",
|
|
622
|
+
] }), Fa = "_toolbar_o0ggg_3", Ea = "_row_o0ggg_9", Ra = "_controls_o0ggg_17", Pa = "_search_o0ggg_25", za = "_filters_o0ggg_30", Ma = "_actions_o0ggg_42", qa = "_selection_o0ggg_50", Da = "_selectionMain_o0ggg_59", Wa = "_selectionExtra_o0ggg_60", ja = "_selectionCount_o0ggg_67", Oa = "_selectionNumber_o0ggg_72", Ha = "_tableScroll_o0ggg_78", w = {
|
|
622
623
|
toolbar: Fa,
|
|
623
624
|
row: Ea,
|
|
624
625
|
controls: Ra,
|
|
625
626
|
search: Pa,
|
|
626
627
|
filters: za,
|
|
627
|
-
actions:
|
|
628
|
-
selection:
|
|
629
|
-
selectionMain:
|
|
630
|
-
selectionExtra:
|
|
631
|
-
selectionCount:
|
|
628
|
+
actions: Ma,
|
|
629
|
+
selection: qa,
|
|
630
|
+
selectionMain: Da,
|
|
631
|
+
selectionExtra: Wa,
|
|
632
|
+
selectionCount: ja,
|
|
632
633
|
selectionNumber: Oa,
|
|
633
634
|
tableScroll: Ha
|
|
634
|
-
}, yt = ({ search: e, filters: r, onReset: t, resetDisabled: n = !1, onRefresh:
|
|
635
|
+
}, yt = ({ search: e, filters: r, onReset: t, resetDisabled: n = !1, onRefresh: l, refreshing: c = !1, actions: u, extra: i, className: o }) => /* @__PURE__ */ m("div", { className: o ? `${w.toolbar} ${o}` : w.toolbar, children: [
|
|
635
636
|
/* @__PURE__ */ m("div", { className: w.row, role: "toolbar", "aria-label": "搜索与筛选", children: [
|
|
636
637
|
/* @__PURE__ */ m("div", { className: w.controls, children: [
|
|
637
638
|
e ? /* @__PURE__ */ a(
|
|
638
|
-
|
|
639
|
+
j,
|
|
639
640
|
{
|
|
640
641
|
className: w.search,
|
|
641
642
|
prefix: /* @__PURE__ */ a(z, { "aria-hidden": "true" }),
|
|
@@ -645,25 +646,25 @@ const R = (e, r) => e.min === r.min && e.max === r.max, ft = ({ label: e, value:
|
|
|
645
646
|
value: e.value,
|
|
646
647
|
onChange: e.onChange,
|
|
647
648
|
onEnterPress: () => {
|
|
648
|
-
var
|
|
649
|
-
return (
|
|
649
|
+
var _;
|
|
650
|
+
return (_ = e.onSearch) == null ? void 0 : _.call(e, e.value);
|
|
650
651
|
},
|
|
651
652
|
onClear: () => {
|
|
652
|
-
var
|
|
653
|
-
return (
|
|
653
|
+
var _;
|
|
654
|
+
return (_ = e.onSearch) == null ? void 0 : _.call(e, "");
|
|
654
655
|
}
|
|
655
656
|
}
|
|
656
657
|
) : null,
|
|
657
658
|
r ? /* @__PURE__ */ a("div", { className: w.filters, children: r }) : null,
|
|
658
|
-
t ? /* @__PURE__ */ a(
|
|
659
|
+
t ? /* @__PURE__ */ a(N, { theme: "light", type: "tertiary", icon: /* @__PURE__ */ a(se, { "aria-hidden": "true" }), disabled: n, onClick: t, children: "重置" }) : null
|
|
659
660
|
] }),
|
|
660
|
-
|
|
661
|
-
|
|
661
|
+
l || u ? /* @__PURE__ */ m("div", { className: w.actions, children: [
|
|
662
|
+
l ? /* @__PURE__ */ a(N, { theme: "light", type: "tertiary", icon: /* @__PURE__ */ a(le, { "aria-hidden": "true" }), loading: c, onClick: l, children: "刷新" }) : null,
|
|
662
663
|
u
|
|
663
664
|
] }) : null
|
|
664
665
|
] }),
|
|
665
|
-
|
|
666
|
-
] }), Nt = ({ count: e, unit: r = "项", actions: t, extra: n, className:
|
|
666
|
+
i
|
|
667
|
+
] }), Nt = ({ count: e, unit: r = "项", actions: t, extra: n, className: l }) => /* @__PURE__ */ m("div", { className: l ? `${w.selection} ${l}` : w.selection, children: [
|
|
667
668
|
/* @__PURE__ */ m("div", { className: w.selectionMain, children: [
|
|
668
669
|
/* @__PURE__ */ m("span", { className: w.selectionCount, "aria-live": "polite", children: [
|
|
669
670
|
"已选择 ",
|
|
@@ -679,12 +680,12 @@ const R = (e, r) => e.min === r.min && e.max === r.max, ft = ({ label: e, value:
|
|
|
679
680
|
column: Va,
|
|
680
681
|
item: Ka
|
|
681
682
|
}, Ya = (e, r) => {
|
|
682
|
-
const t = Math.max(1, Math.floor(r)), n = Array.from({ length: t }, () => []),
|
|
683
|
+
const t = Math.max(1, Math.floor(r)), n = Array.from({ length: t }, () => []), l = new Array(t).fill(0);
|
|
683
684
|
return e.forEach((c, u) => {
|
|
684
|
-
let
|
|
685
|
-
for (let
|
|
686
|
-
|
|
687
|
-
n[
|
|
685
|
+
let i = 0;
|
|
686
|
+
for (let o = 1; o < t; o += 1)
|
|
687
|
+
l[o] < l[i] && (i = o);
|
|
688
|
+
n[i].push(u), l[i] += c;
|
|
688
689
|
}), n;
|
|
689
690
|
}, Ua = 5, Xa = (e, r) => {
|
|
690
691
|
const t = e <= ne.phone ? 10 : 20, n = Math.min(Ua, Math.max(2, Math.floor((e + t) / (r + t))));
|
|
@@ -694,20 +695,20 @@ const R = (e, r) => e.min === r.min && e.max === r.max, ft = ({ label: e, value:
|
|
|
694
695
|
return O(() => {
|
|
695
696
|
const n = e.current;
|
|
696
697
|
if (!n || (t(n.clientWidth), typeof ResizeObserver > "u")) return;
|
|
697
|
-
const
|
|
698
|
-
return
|
|
698
|
+
const l = new ResizeObserver(([c]) => t(Math.round(c.contentRect.width)));
|
|
699
|
+
return l.observe(n), () => l.disconnect();
|
|
699
700
|
}, []), [e, r];
|
|
700
701
|
}, Ct = ({
|
|
701
702
|
items: e,
|
|
702
703
|
getKey: r,
|
|
703
704
|
estimateHeight: t,
|
|
704
705
|
renderItem: n,
|
|
705
|
-
minColumnWidth:
|
|
706
|
+
minColumnWidth: l = 184,
|
|
706
707
|
ariaLabel: c
|
|
707
708
|
}) => {
|
|
708
|
-
const [u,
|
|
709
|
-
e.map((
|
|
710
|
-
|
|
709
|
+
const [u, i] = Qa(), o = Xa(i || Ja, l), _ = Ya(
|
|
710
|
+
e.map((s) => t(s, o.columnWidth)),
|
|
711
|
+
o.columns
|
|
711
712
|
);
|
|
712
713
|
return /* @__PURE__ */ a(
|
|
713
714
|
"div",
|
|
@@ -716,8 +717,8 @@ const R = (e, r) => e.min === r.min && e.max === r.max, ft = ({ label: e, value:
|
|
|
716
717
|
className: P.waterfall,
|
|
717
718
|
role: "list",
|
|
718
719
|
"aria-label": c,
|
|
719
|
-
style: { "--waterfall-gap": `${
|
|
720
|
-
children:
|
|
720
|
+
style: { "--waterfall-gap": `${o.gap}px` },
|
|
721
|
+
children: _.map((s, h) => /* @__PURE__ */ a("div", { className: P.column, children: s.map((g) => /* @__PURE__ */ a("div", { role: "listitem", className: P.item, children: n(e[g]) }, r(e[g]))) }, h))
|
|
721
722
|
}
|
|
722
723
|
);
|
|
723
724
|
};
|
|
@@ -729,8 +730,8 @@ export {
|
|
|
729
730
|
Nt as S,
|
|
730
731
|
wt as T,
|
|
731
732
|
Ct as W,
|
|
732
|
-
|
|
733
|
-
|
|
733
|
+
st as a,
|
|
734
|
+
lt as b,
|
|
734
735
|
ot as c,
|
|
735
736
|
dt as d,
|
|
736
737
|
ut as e,
|
|
@@ -740,8 +741,8 @@ export {
|
|
|
740
741
|
mt as i,
|
|
741
742
|
ft as j,
|
|
742
743
|
J as k,
|
|
743
|
-
|
|
744
|
-
|
|
744
|
+
pt as l,
|
|
745
|
+
gt as m,
|
|
745
746
|
X as n,
|
|
746
747
|
vt as o,
|
|
747
748
|
ct as p,
|