@24city/web-console 0.1.3 → 0.2.1
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 +58 -0
- package/GUIDELINES.md +223 -0
- package/README.md +42 -10
- package/dist/account/index.js +2 -2
- package/dist/chunks/console-layout-BWz1qRog.js +210 -0
- package/dist/chunks/page-YBG0dEN1.js +111 -0
- package/dist/chunks/scale-smFifpMm.js +26 -0
- package/dist/chunks/{stale-build-DUKkQHuu.js → stale-build-DG-Tb2RA.js} +24 -20
- package/dist/chunks/status-tag-BrLUhH6Z.js +87 -0
- package/dist/chunks/text-link-BAKoHe5o.js +64 -0
- package/dist/chunks/unsupported-browser-Dwq1mNRy.js +48 -0
- package/dist/chunks/upgrade-modal-DgChxbLm.js +667 -0
- package/dist/chunks/{wallet-badge-BXu-WxJa.js → wallet-badge-dVrO6py9.js} +136 -136
- package/dist/chunks/waterfall-CQG8aVdx.js +613 -0
- package/dist/data/index.d.ts +2 -0
- package/dist/data/index.js +6 -0
- package/dist/data/metric-card.d.ts +41 -0
- package/dist/data/status-tag.d.ts +18 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +160 -120
- package/dist/layout/index.js +1 -1
- package/dist/list/choice-cards.d.ts +29 -0
- package/dist/list/content-square.d.ts +50 -0
- package/dist/list/filter-dropdown.d.ts +43 -0
- package/dist/list/filter-panel.d.ts +94 -0
- package/dist/list/index.d.ts +7 -0
- package/dist/list/index.js +27 -0
- package/dist/list/list-toolbar.d.ts +56 -0
- package/dist/list/waterfall-layout.d.ts +11 -0
- package/dist/list/waterfall.d.ts +13 -0
- package/dist/page/index.d.ts +2 -0
- package/dist/page/index.js +19 -15
- package/dist/page/page.d.ts +21 -2
- package/dist/page/select-label.d.ts +11 -0
- package/dist/page/unsupported-browser.d.ts +2 -0
- package/dist/runtime/browser-support.d.ts +6 -0
- package/dist/runtime/index.d.ts +1 -0
- package/dist/runtime/index.js +38 -37
- package/dist/runtime/providers.d.ts +1 -1
- package/dist/styles.css +1973 -575
- package/dist/testing/guard.d.ts +20 -0
- package/dist/testing/guard.js +83 -36
- package/dist/theme/index.d.ts +1 -0
- package/dist/theme/index.js +29 -25
- package/dist/theme/scale.d.ts +34 -0
- package/package.json +13 -2
- package/dist/chunks/console-layout-D5YgsZYN.js +0 -208
- package/dist/chunks/error-boundary-D3qiD7ov.js +0 -35
- package/dist/chunks/page-BaitnD--.js +0 -89
- package/dist/chunks/text-link-FTsBp_QU.js +0 -54
- package/dist/chunks/upgrade-modal-J0X79nT2.js +0 -667
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,159 +1,199 @@
|
|
|
1
|
-
import { A as s, a as o, c as t, b as r, h as n, j as i, k as u, m as l, o as c, p, q as
|
|
2
|
-
import { A as
|
|
3
|
-
import { A as $, a as aa, b as ea, E as sa, F as oa, P as ta, c as ra, d as na, U as ia, e as ua, W as la, f as ca, g as pa, h as
|
|
1
|
+
import { A as s, a as o, c as t, b as r, h as n, j as i, k as u, m as l, o as c, p, q as S, s as m, t as d, i as C, d as f, v as g, x as P, l as A, n as L, r as E, y as T, z as h, B as R, e as B, f as F, C as y, D as x, E as N, u as b, g as O, w as _ } from "./chunks/logout-signal-CiD_zY5M.js";
|
|
2
|
+
import { A as I, C as M, L as v, P as D, a as k, b as w, Q as q, R as Q, S as K, c as z, T as W, U as G, d as H, p as j, e as V, f as Y, g as X, y as Z } from "./chunks/upgrade-modal-DgChxbLm.js";
|
|
3
|
+
import { A as $, a as aa, b as ea, E as sa, F as oa, P as ta, c as ra, d as na, U as ia, e as ua, W as la, f as ca, g as pa, h as Sa, i as ma, j as da, k as Ca, l as fa, m as ga, n as Pa, o as Aa, p as La, q as Ea, r as Ta, s as ha, t as Ra, u as Ba, v as Fa, w as ya, x as xa, y as Na, z as ba, B as Oa, C as _a, D as Ua, G as Ia, H as Ma, I as va, J as Da, K as ka, L as wa, M as qa, N as Qa, O as Ka, Q as za } from "./chunks/wallet-badge-dVrO6py9.js";
|
|
4
4
|
import { A as Ga } from "./chunks/auth-provider-CqiyTeOt.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { L as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { c as
|
|
13
|
-
import { C as
|
|
14
|
-
import { u as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
5
|
+
import { M as ja, a as Va, S as Ya } from "./chunks/status-tag-BrLUhH6Z.js";
|
|
6
|
+
import { ConsoleSemiProvider as Za, MODAL_BUTTON_PROPS as Ja, modalButtonProps as $a } from "./semi.js";
|
|
7
|
+
import { B as ee, C as se, f as oe, a as te, i as re } from "./chunks/console-layout-BWz1qRog.js";
|
|
8
|
+
import { C as ie, a as ue, b as le, F as ce, c as pe, d as Se, e as me, f as de, g as Ce, h as fe, i as ge, j as Pe, k as Ae, L as Le, M as Ee, S as Te, l as he, m as Re, n as Be, o as Fe, T as ye, W as xe, p as Ne, w as be } from "./chunks/waterfall-CQG8aVdx.js";
|
|
9
|
+
import { E as _e, R as Ue, U as Ie } from "./chunks/unsupported-browser-Dwq1mNRy.js";
|
|
10
|
+
import { L as ve } from "./chunks/link-button-giJEcTmG.js";
|
|
11
|
+
import { N as ke, S as we, a as qe, T as Qe } from "./chunks/text-link-BAKoHe5o.js";
|
|
12
|
+
import { E as ze, a as We, b as Ge, F as He, c as je, L as Ve, d as Ye, P as Xe, S as Ze, e as Je, T as $e } from "./chunks/page-YBG0dEN1.js";
|
|
13
|
+
import { C as es, R as ss, c as os, e as ts, k as rs, l as ns, p as is, a as us, r as ls, s as cs } from "./chunks/stale-build-DG-Tb2RA.js";
|
|
14
|
+
import { C as Ss, u as ms, a as ds, b as Cs } from "./chunks/context-CaVim6ZO.js";
|
|
15
|
+
import { c as gs } from "./chunks/http-B3mTs9KZ.js";
|
|
16
|
+
import { u as As } from "./chunks/use-media-query-DvyinWNg.js";
|
|
17
|
+
import { BRAND_VARIABLES as Es, SEMI_BRAND_VARIABLES as Ts, applyBrand as hs, brandPalette as Rs } from "./theme/index.js";
|
|
18
|
+
import { B as Fs, D as ys, F as xs, b as Ns, a as bs } from "./chunks/scale-smFifpMm.js";
|
|
19
|
+
import { notifyCustomerSessionChanged as _s, subscribeCustomerSessionChanges as Us } from "@24city/web-runtime/session-sync";
|
|
20
|
+
import { summarizeCustomerError as Ms } from "@24city/web-runtime/error-summary";
|
|
18
21
|
export {
|
|
19
22
|
$ as ACCOUNT_SECTIONS,
|
|
20
23
|
aa as AccountAvatar,
|
|
21
|
-
|
|
24
|
+
I as AccountCenterPage,
|
|
22
25
|
ea as AccountMenu,
|
|
23
26
|
Ga as AuthProvider,
|
|
24
27
|
s as AuthStoreProvider,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
Es as BRAND_VARIABLES,
|
|
29
|
+
Fs as BREAKPOINTS,
|
|
30
|
+
ee as BrandMark,
|
|
31
|
+
M as CenterLinkButton,
|
|
32
|
+
ie as ChoiceCards,
|
|
33
|
+
ue as ChoiceCardsSkeleton,
|
|
34
|
+
es as ConsoleApp,
|
|
35
|
+
se as ConsoleLayout,
|
|
36
|
+
Ss as ConsoleRuntimeProvider,
|
|
37
|
+
Za as ConsoleSemiProvider,
|
|
38
|
+
le as ContentSquare,
|
|
39
|
+
ys as DISPLAY_SIZES,
|
|
32
40
|
sa as EXPIRING_SOON_DAYS,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
41
|
+
ze as EmptyBlock,
|
|
42
|
+
We as EmptyCard,
|
|
43
|
+
_e as ErrorBoundary,
|
|
44
|
+
Ge as ErrorCard,
|
|
36
45
|
oa as FALLBACK_ACCOUNT_LABEL,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
46
|
+
xs as FONT_SIZE_SCALE,
|
|
47
|
+
ce as FilterCapsules,
|
|
48
|
+
pe as FilterDropdown,
|
|
49
|
+
Se as FilterOptionButton,
|
|
50
|
+
me as FilterOptions,
|
|
51
|
+
de as FilterPanel,
|
|
52
|
+
Ce as FilterRangeText,
|
|
53
|
+
fe as FilterRow,
|
|
54
|
+
ge as FilterSelectText,
|
|
55
|
+
Pe as FilterSelected,
|
|
56
|
+
Ae as FilterTrigger,
|
|
57
|
+
He as FullPage,
|
|
58
|
+
je as FullPageLoading,
|
|
59
|
+
ve as LinkButton,
|
|
60
|
+
Le as ListToolbar,
|
|
61
|
+
Ve as LoadingBlock,
|
|
62
|
+
Ye as LoadingCard,
|
|
63
|
+
v as LoginPage,
|
|
64
|
+
Ee as MAX_WATERFALL_COLUMNS,
|
|
65
|
+
Ja as MODAL_BUTTON_PROPS,
|
|
66
|
+
ja as MetricCard,
|
|
67
|
+
Va as MetricGrid,
|
|
68
|
+
ke as NotFoundPage,
|
|
44
69
|
ta as PERSONAL_NAV_KEYS,
|
|
45
70
|
ra as PERSONAL_SPACE_LABEL,
|
|
46
|
-
|
|
71
|
+
D as PlanCards,
|
|
47
72
|
na as PlanPanel,
|
|
48
73
|
k as PointsSection,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
74
|
+
Xe as ProductPage,
|
|
75
|
+
w as ProfileSection,
|
|
76
|
+
q as QuotaPill,
|
|
77
|
+
ss as RUNTIME_CONFIG_URL,
|
|
78
|
+
Ue as RouteErrorPage,
|
|
54
79
|
Q as RouteGuard,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
80
|
+
Ts as SEMI_BRAND_VARIABLES,
|
|
81
|
+
we as SelectLabel,
|
|
82
|
+
Te as SelectionBar,
|
|
83
|
+
Ze as SessionUnavailable,
|
|
84
|
+
K as SettingRow,
|
|
85
|
+
he as SortBar,
|
|
86
|
+
Re as SquareAccent,
|
|
87
|
+
Be as SquareFooter,
|
|
88
|
+
Fe as SquareSearch,
|
|
89
|
+
qe as StartupError,
|
|
90
|
+
Je as StatusResult,
|
|
91
|
+
Ya as StatusTag,
|
|
92
|
+
z as SubscriptionSection,
|
|
93
|
+
ye as TableScroll,
|
|
94
|
+
W as TeamPromo,
|
|
95
|
+
Qe as TextLink,
|
|
96
|
+
$e as Toolbar,
|
|
64
97
|
ia as UNLIMITED_QUOTA,
|
|
98
|
+
Ie as UnsupportedBrowser,
|
|
65
99
|
ua as UpgradeEntry,
|
|
66
100
|
G as UpgradeModal,
|
|
67
101
|
la as WalletBadge,
|
|
68
|
-
|
|
102
|
+
xe as Waterfall,
|
|
103
|
+
H as accountCenterPageUrl,
|
|
69
104
|
ca as accountQueryKeys,
|
|
70
105
|
pa as accountSectionPath,
|
|
71
106
|
o as announceLogout,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
107
|
+
hs as applyBrand,
|
|
108
|
+
Rs as brandPalette,
|
|
109
|
+
Ns as breakpointDown,
|
|
110
|
+
bs as breakpointUp,
|
|
111
|
+
Sa as buildPersonalNavigation,
|
|
112
|
+
ma as canBuyForSpace,
|
|
113
|
+
da as catalogPlanOf,
|
|
77
114
|
t as createAccountApi,
|
|
78
115
|
r as createAuthStore,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
Ca as
|
|
84
|
-
|
|
85
|
-
|
|
116
|
+
os as createConsoleQueryClient,
|
|
117
|
+
gs as createHttpRuntime,
|
|
118
|
+
Ne as distributeToColumns,
|
|
119
|
+
ts as earlyRuntimeConfigFetcher,
|
|
120
|
+
Ca as entryTeamPlan,
|
|
121
|
+
fa as featureLines,
|
|
122
|
+
oe as findActiveModule,
|
|
123
|
+
te as findActiveNavItem,
|
|
86
124
|
n as formatChargePoints,
|
|
87
125
|
i as formatClock,
|
|
88
126
|
u as formatDate,
|
|
89
127
|
l as formatDateTime,
|
|
90
128
|
c as formatDuration,
|
|
91
129
|
p as formatNumber,
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
130
|
+
ga as formatPlanAmount,
|
|
131
|
+
Pa as formatPlanPrice,
|
|
132
|
+
S as formatPoints,
|
|
133
|
+
m as formatPrice,
|
|
134
|
+
d as hasHttpStatus,
|
|
97
135
|
Aa as isAccountCenterPath,
|
|
98
136
|
La as isAccountSection,
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
137
|
+
C as isLeavingForLogout,
|
|
138
|
+
f as isLoggedOutElsewhere,
|
|
139
|
+
re as isPathUnder,
|
|
140
|
+
g as isPathWithin,
|
|
141
|
+
P as isSafeInternalPath,
|
|
142
|
+
Ea as isTeamSpace,
|
|
143
|
+
Ta as isTeamSubscriptionRequired,
|
|
144
|
+
ha as isUnlimited,
|
|
145
|
+
rs as keepLoadingOnStaleBuild,
|
|
108
146
|
A as leaveForLogout,
|
|
109
|
-
|
|
110
|
-
|
|
147
|
+
ns as loadRuntimeConfig,
|
|
148
|
+
$a as modalButtonProps,
|
|
111
149
|
L as noteLogoutElsewhere,
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
150
|
+
_s as notifySessionChanged,
|
|
151
|
+
Ra as offerHighlights,
|
|
152
|
+
is as parseRuntimeConfig,
|
|
153
|
+
Ba as personalNavKey,
|
|
154
|
+
j as planBenefitLines,
|
|
155
|
+
V as planCopy,
|
|
156
|
+
Fa as planDaysLeft,
|
|
157
|
+
ya as planFocusOf,
|
|
158
|
+
xa as planFocusState,
|
|
159
|
+
Na as planPeriodText,
|
|
122
160
|
ba as planTitle,
|
|
123
161
|
Y as plansUrl,
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
162
|
+
X as priceFor,
|
|
163
|
+
Oa as productAccountSections,
|
|
164
|
+
us as productQueryKeys,
|
|
165
|
+
_a as quotaCopy,
|
|
166
|
+
Ua as quotaFull,
|
|
167
|
+
Ia as quotaText,
|
|
168
|
+
E as releaseLogoutHold,
|
|
169
|
+
ls as reloadOnStaleBuild,
|
|
170
|
+
T as requireNonNegativeInteger,
|
|
171
|
+
h as requireRecord,
|
|
172
|
+
R as requireString,
|
|
173
|
+
B as resetLogoutSignalForTest,
|
|
174
|
+
F as restoreIdentityContext,
|
|
175
|
+
y as sanitizeReturnPath,
|
|
176
|
+
Ma as spaceDisplayName,
|
|
177
|
+
va as spaceRoleLabel,
|
|
178
|
+
Da as startingPrice,
|
|
179
|
+
Us as subscribeSessionChanged,
|
|
180
|
+
Ms as summarizeCustomerError,
|
|
181
|
+
x as summarizeError,
|
|
182
|
+
cs as supportsCascadeLayers,
|
|
183
|
+
N as unwrapApiResponse,
|
|
145
184
|
ka as upgradeOffer,
|
|
146
|
-
|
|
185
|
+
wa as useAccountCenter,
|
|
147
186
|
b as useAuthState,
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
187
|
+
O as useAuthStore,
|
|
188
|
+
ms as useConsoleBrand,
|
|
189
|
+
ds as useConsoleCustomization,
|
|
190
|
+
Cs as useConsoleRuntime,
|
|
191
|
+
qa as useLogout,
|
|
192
|
+
As as useMediaQuery,
|
|
154
193
|
Qa as useMembership,
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
194
|
+
Ka as usePlanCatalog,
|
|
195
|
+
za as useSpaceSwitch,
|
|
196
|
+
be as waterfallLayout,
|
|
197
|
+
_ as withdrawLogout,
|
|
198
|
+
Z as yearlyNote
|
|
159
199
|
};
|
package/dist/layout/index.js
CHANGED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface ChoiceCardOption<T extends string> {
|
|
2
|
+
value: T;
|
|
3
|
+
title: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
/**
|
|
6
|
+
* 这个选项当前没有内容时的灰色提示(如“该行业无数据”),代替说明显示。卡片整张变灰但仍可点:
|
|
7
|
+
* 点击照常触发 onChange,由页面决定是否切换、给什么提示。
|
|
8
|
+
*/
|
|
9
|
+
unavailable?: string;
|
|
10
|
+
}
|
|
11
|
+
interface ChoiceCardsProps<T extends string> {
|
|
12
|
+
ariaLabel: string;
|
|
13
|
+
value: T;
|
|
14
|
+
options: ReadonlyArray<ChoiceCardOption<T>>;
|
|
15
|
+
onChange: (value: T) => void;
|
|
16
|
+
/** 宽屏每行几张,默认 4。 */
|
|
17
|
+
columns?: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* 卡片式单选(如榜单分类、广告类型):Semi RadioGroup 的自定义渲染,保留单选语义与方向键切换。
|
|
21
|
+
* 宽屏按列网格,窄屏改为横向滑动的一行。没有内容的选项(unavailable)显示为灰卡。
|
|
22
|
+
*/
|
|
23
|
+
export declare const ChoiceCards: <T extends string>({ ariaLabel, value, options, onChange, columns, }: ChoiceCardsProps<T>) => import("react").JSX.Element;
|
|
24
|
+
/** 分类加载中的占位:与真实卡片同高同列。 */
|
|
25
|
+
export declare const ChoiceCardsSkeleton: ({ count, columns }: {
|
|
26
|
+
count: number;
|
|
27
|
+
columns?: number;
|
|
28
|
+
}) => import("react").JSX.Element;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type ReactNode, type Ref } from 'react';
|
|
2
|
+
interface SquareSearchProps {
|
|
3
|
+
ariaLabel: string;
|
|
4
|
+
placeholder: string;
|
|
5
|
+
value: string;
|
|
6
|
+
onChange: (value: string) => void;
|
|
7
|
+
onSearch: (value: string) => void;
|
|
8
|
+
inputRef?: Ref<HTMLInputElement>;
|
|
9
|
+
keyShortcut?: string;
|
|
10
|
+
/** 输入框为空时,在检索按钮前列出的快捷词(如最近搜索),点选即检索。 */
|
|
11
|
+
guide?: {
|
|
12
|
+
label: string;
|
|
13
|
+
items: readonly string[];
|
|
14
|
+
onClear?: () => void;
|
|
15
|
+
};
|
|
16
|
+
/** 框内最左侧的控件(如匹配方式),用竖线与输入区隔开。 */
|
|
17
|
+
prefix?: ReactNode;
|
|
18
|
+
}
|
|
19
|
+
/** 内容广场的大搜索框:60px 白底,最左侧可放匹配方式,检索按钮在框内右侧;空输入时可列出快捷词。 */
|
|
20
|
+
export declare const SquareSearch: ({ ariaLabel, placeholder, value, onChange, onSearch, inputRef, keyShortcut, guide, prefix, }: SquareSearchProps) => import("react").JSX.Element;
|
|
21
|
+
interface ContentSquareProps {
|
|
22
|
+
testId?: string;
|
|
23
|
+
/** 居中大标题,强调部分用 SquareAccent 包起来。 */
|
|
24
|
+
title: ReactNode;
|
|
25
|
+
search: ReactNode;
|
|
26
|
+
categories?: ReactNode;
|
|
27
|
+
/** 平铺的筛选面板(FilterPanel),在分类卡片下方,随页面滚走;没有页内条件时不传。 */
|
|
28
|
+
filters?: ReactNode;
|
|
29
|
+
/** 吸顶排序条:左侧文字排序,右侧收藏、最近查看、看法切换等。 */
|
|
30
|
+
toolbarLeft: ReactNode;
|
|
31
|
+
toolbarRight: ReactNode;
|
|
32
|
+
/** 查询条件的标识:变化时若结果区已滚过排序条,滚回结果顶部(紧贴吸顶排序条)。 */
|
|
33
|
+
conditionKey: string;
|
|
34
|
+
children: ReactNode;
|
|
35
|
+
}
|
|
36
|
+
/** 标题中用主色强调的部分。 */
|
|
37
|
+
export declare const SquareAccent: ({ children }: {
|
|
38
|
+
children: ReactNode;
|
|
39
|
+
}) => import("react").JSX.Element;
|
|
40
|
+
/**
|
|
41
|
+
* 内容广场版式(参照小红书聚光「创意 → 内容广场」):居中大标题 → 吸顶搜索条 → 分类卡片 →
|
|
42
|
+
* 平铺筛选面板(可没有)→ 吸顶排序条 → 结果。小红书内容广场与抖音广告素材、带货短视频共用。
|
|
43
|
+
*/
|
|
44
|
+
export declare const ContentSquare: ({ testId, title, search, categories, filters, toolbarLeft, toolbarRight, conditionKey, children, }: ContentSquareProps) => import("react").JSX.Element;
|
|
45
|
+
/** 结果区底部居中的一行:续页状态、翻页按钮或“没有更多”。 */
|
|
46
|
+
export declare const SquareFooter: ({ children, footerRef }: {
|
|
47
|
+
children: ReactNode;
|
|
48
|
+
footerRef?: Ref<HTMLDivElement>;
|
|
49
|
+
}) => import("react").JSX.Element;
|
|
50
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { Button } from '@douyinfe/semi-ui';
|
|
3
|
+
export interface FilterOption<T extends string> {
|
|
4
|
+
value: T;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
interface FilterTriggerProps {
|
|
8
|
+
/** 没有选值时显示的名称,如“内容类型”;选值后显示所选项。 */
|
|
9
|
+
text: ReactNode;
|
|
10
|
+
/** 读屏名称:筛选项名称 + 当前值。 */
|
|
11
|
+
ariaLabel: string;
|
|
12
|
+
active?: boolean;
|
|
13
|
+
empty?: boolean;
|
|
14
|
+
icon?: ReactNode;
|
|
15
|
+
arrow?: boolean;
|
|
16
|
+
/** 作开关用时(如“只看收藏”)的按下状态。 */
|
|
17
|
+
pressed?: boolean;
|
|
18
|
+
onClick?: () => void;
|
|
19
|
+
}
|
|
20
|
+
/** 筛选条上的文字触发器:灰字 + 下拉箭头,悬停浅灰底;不带边框,和结果区之间不抢视觉。 */
|
|
21
|
+
export declare const FilterTrigger: import("react").ForwardRefExoticComponent<FilterTriggerProps & import("react").RefAttributes<Button>>;
|
|
22
|
+
interface FilterDropdownProps<T extends string> {
|
|
23
|
+
/** 筛选项名称:读屏名称的前缀,也是未选值时显示的文字。 */
|
|
24
|
+
label: string;
|
|
25
|
+
/** 未选值时显示的文字,缺省用 label。 */
|
|
26
|
+
placeholder?: string;
|
|
27
|
+
value: T | '';
|
|
28
|
+
options: ReadonlyArray<FilterOption<T>>;
|
|
29
|
+
onChange: (value: T | '') => void;
|
|
30
|
+
/** 允许回到“不限”时,菜单首项为 allLabel。 */
|
|
31
|
+
allLabel?: string;
|
|
32
|
+
icon?: ReactNode;
|
|
33
|
+
arrow?: boolean;
|
|
34
|
+
/** 已选项前打勾(排序这类总有一个值的菜单)。 */
|
|
35
|
+
checkmark?: boolean;
|
|
36
|
+
position?: 'bottomLeft' | 'bottomRight';
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
/** 选值后文字加深;排序这类总有值的菜单关掉,保持灰字。 */
|
|
39
|
+
highlight?: boolean;
|
|
40
|
+
}
|
|
41
|
+
/** 单选下拉筛选:Semi Dropdown,触发器用 FilterTrigger。 */
|
|
42
|
+
export declare const FilterDropdown: <T extends string>({ label, placeholder, value, options, onChange, allLabel, icon, arrow, checkmark, position, disabled, highlight, }: FilterDropdownProps<T>) => import("react").JSX.Element;
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export interface PanelOption<T extends string> {
|
|
3
|
+
value: T;
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
/** 面板白底容器。 */
|
|
7
|
+
export declare const FilterPanel: ({ children, ariaLabel }: {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
ariaLabel?: string;
|
|
10
|
+
}) => import("react").JSX.Element;
|
|
11
|
+
interface FilterRowProps {
|
|
12
|
+
label: string;
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
/** 行尾靠右的操作。 */
|
|
15
|
+
extra?: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
/** 一行条件:左侧条件名 + 冒号,右侧内容;悬停时整行浅灰底。 */
|
|
18
|
+
export declare const FilterRow: ({ label, children, extra }: FilterRowProps) => import("react").JSX.Element;
|
|
19
|
+
interface FilterOptionsProps<T extends string> {
|
|
20
|
+
label: string;
|
|
21
|
+
value: T | '';
|
|
22
|
+
options: ReadonlyArray<PanelOption<T>>;
|
|
23
|
+
onChange: (value: T | '') => void;
|
|
24
|
+
}
|
|
25
|
+
/** 平铺单选:点未选项选中,点已选项取消(回到不限)。 */
|
|
26
|
+
export declare const FilterOptions: <T extends string>({ label, value, options, onChange }: FilterOptionsProps<T>) => import("react").JSX.Element;
|
|
27
|
+
/** 平铺的单个可选项:选中时主色描边、主色字。 */
|
|
28
|
+
export declare const FilterOptionButton: ({ label, active, onClick, }: {
|
|
29
|
+
label: string;
|
|
30
|
+
active: boolean;
|
|
31
|
+
onClick: () => void;
|
|
32
|
+
}) => import("react").JSX.Element;
|
|
33
|
+
export interface SelectedCondition {
|
|
34
|
+
key: string;
|
|
35
|
+
label: string;
|
|
36
|
+
onRemove: () => void;
|
|
37
|
+
}
|
|
38
|
+
/** 首行“已选条件”:每个生效条件一个小标签,可逐个移除;右侧一键清空。 */
|
|
39
|
+
export declare const FilterSelected: ({ conditions, onClear, }: {
|
|
40
|
+
conditions: readonly SelectedCondition[];
|
|
41
|
+
onClear: () => void;
|
|
42
|
+
}) => import("react").JSX.Element;
|
|
43
|
+
interface FilterSelectTextProps<T extends string> {
|
|
44
|
+
/** 未选值时显示的文字,如“全部素材类型”;也是读屏名称的前缀。 */
|
|
45
|
+
placeholder: string;
|
|
46
|
+
label: string;
|
|
47
|
+
value: T | '';
|
|
48
|
+
options: ReadonlyArray<PanelOption<T>>;
|
|
49
|
+
onChange: (value: T | '') => void;
|
|
50
|
+
}
|
|
51
|
+
/** 行内文字下拉:灰字 + 箭头,选值后换成主色的所选项;菜单首项回到不限。 */
|
|
52
|
+
export declare const FilterSelectText: <T extends string>({ placeholder, label, value, options, onChange }: FilterSelectTextProps<T>) => import("react").JSX.Element;
|
|
53
|
+
export interface RangeValue {
|
|
54
|
+
min?: number;
|
|
55
|
+
max?: number;
|
|
56
|
+
}
|
|
57
|
+
export interface RangePreset extends RangeValue {
|
|
58
|
+
label: string;
|
|
59
|
+
}
|
|
60
|
+
interface FilterRangeTextProps {
|
|
61
|
+
/** 条件名,如“视频时长”;未选值时显示。 */
|
|
62
|
+
label: string;
|
|
63
|
+
value: RangeValue;
|
|
64
|
+
presets: readonly RangePreset[];
|
|
65
|
+
onChange: (value: RangeValue) => void;
|
|
66
|
+
/** 自定义输入的上限与单位。 */
|
|
67
|
+
limit: number;
|
|
68
|
+
unit: string;
|
|
69
|
+
/** 只支持下限(如质量指数只按“不低于”查)时为 true,自定义只给一个输入框。 */
|
|
70
|
+
minOnly?: boolean;
|
|
71
|
+
/** 已选值的文字,如“16~30 秒”。 */
|
|
72
|
+
format: (value: RangeValue) => string;
|
|
73
|
+
}
|
|
74
|
+
/** 行内区间下拉:常用档位一键选,下面可自定义区间;选值后触发器显示所选区间。 */
|
|
75
|
+
export declare const FilterRangeText: ({ label, value, presets, onChange, limit, unit, minOnly, format }: FilterRangeTextProps) => import("react").JSX.Element;
|
|
76
|
+
interface FilterCapsulesProps<T extends string> {
|
|
77
|
+
label: string;
|
|
78
|
+
value: T;
|
|
79
|
+
options: ReadonlyArray<PanelOption<T>>;
|
|
80
|
+
onChange: (value: T) => void;
|
|
81
|
+
}
|
|
82
|
+
/** 胶囊单选(如“全部 / 图文素材 / 视频素材”),放在排序条左侧;选中浅主色底、主色字。 */
|
|
83
|
+
export declare const FilterCapsules: <T extends string>({ label, value, options, onChange }: FilterCapsulesProps<T>) => import("react").JSX.Element;
|
|
84
|
+
interface SortBarProps<T extends string> {
|
|
85
|
+
value: T;
|
|
86
|
+
options: ReadonlyArray<PanelOption<T>>;
|
|
87
|
+
onChange: (value: T) => void;
|
|
88
|
+
/** 不分升降的排序(如推荐),不画箭头。 */
|
|
89
|
+
plain?: ReadonlyArray<T>;
|
|
90
|
+
disabled?: boolean;
|
|
91
|
+
}
|
|
92
|
+
/** 文字排序条:选中项主色加箭头,其余灰色箭头;排序只有降序。 */
|
|
93
|
+
export declare const SortBar: <T extends string>({ value, options, onChange, plain, disabled }: SortBarProps<T>) => import("react").JSX.Element;
|
|
94
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { C as s, a as t, b as r, F as l, c as o, d as i, e as n, f as F, g as S, h as c, i as u, j as C, k as T, L as d, M as p, S as L, l as b, m as f, n as g, o as h, T as q, W as w, p as A, w as m } from "../chunks/waterfall-CQG8aVdx.js";
|
|
2
|
+
export {
|
|
3
|
+
s as ChoiceCards,
|
|
4
|
+
t as ChoiceCardsSkeleton,
|
|
5
|
+
r as ContentSquare,
|
|
6
|
+
l as FilterCapsules,
|
|
7
|
+
o as FilterDropdown,
|
|
8
|
+
i as FilterOptionButton,
|
|
9
|
+
n as FilterOptions,
|
|
10
|
+
F as FilterPanel,
|
|
11
|
+
S as FilterRangeText,
|
|
12
|
+
c as FilterRow,
|
|
13
|
+
u as FilterSelectText,
|
|
14
|
+
C as FilterSelected,
|
|
15
|
+
T as FilterTrigger,
|
|
16
|
+
d as ListToolbar,
|
|
17
|
+
p as MAX_WATERFALL_COLUMNS,
|
|
18
|
+
L as SelectionBar,
|
|
19
|
+
b as SortBar,
|
|
20
|
+
f as SquareAccent,
|
|
21
|
+
g as SquareFooter,
|
|
22
|
+
h as SquareSearch,
|
|
23
|
+
q as TableScroll,
|
|
24
|
+
w as Waterfall,
|
|
25
|
+
A as distributeToColumns,
|
|
26
|
+
m as waterfallLayout
|
|
27
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface ListToolbarSearch {
|
|
3
|
+
value: string;
|
|
4
|
+
onChange: (value: string) => void;
|
|
5
|
+
/** 回车或清空时触发;不传时由页面自己按 value 的变化查询 */
|
|
6
|
+
onSearch?: (value: string) => void;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
/** 读屏名称,默认与 placeholder 相同 */
|
|
9
|
+
ariaLabel?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ListToolbarProps {
|
|
12
|
+
search?: ListToolbarSearch;
|
|
13
|
+
/** 筛选控件(Select、DatePicker 等),排在搜索框后面;Select 默认 188px 宽 */
|
|
14
|
+
filters?: ReactNode;
|
|
15
|
+
/** 给了就显示“重置”,清掉搜索与全部筛选 */
|
|
16
|
+
onReset?: () => void;
|
|
17
|
+
/** 没有任何条件生效时置灰“重置” */
|
|
18
|
+
resetDisabled?: boolean;
|
|
19
|
+
/** 给了就显示“刷新” */
|
|
20
|
+
onRefresh?: () => void;
|
|
21
|
+
refreshing?: boolean;
|
|
22
|
+
/** 最右侧的操作(新建、导出……);主按钮最多一个 */
|
|
23
|
+
actions?: ReactNode;
|
|
24
|
+
/** 工具条下面的整行内容(已选条件、提示) */
|
|
25
|
+
extra?: ReactNode;
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* 列表工具条(由 jike-geo 的 TableToolbar 沉淀):左边搜索、筛选、重置,右边刷新与操作,窄屏自动换行。
|
|
30
|
+
* 表格、卡片列表上方统一用它;条件多到一行放不下的页面改用 FilterPanel。
|
|
31
|
+
*/
|
|
32
|
+
export declare const ListToolbar: ({ search, filters, onReset, resetDisabled, onRefresh, refreshing, actions, extra, className }: ListToolbarProps) => import("react").JSX.Element;
|
|
33
|
+
export interface SelectionBarProps {
|
|
34
|
+
/** 已选条数 */
|
|
35
|
+
count: number;
|
|
36
|
+
/** 量词,默认“项” */
|
|
37
|
+
unit?: string;
|
|
38
|
+
/** 批量操作按钮 */
|
|
39
|
+
actions?: ReactNode;
|
|
40
|
+
/** 右侧:合计说明、分页器 */
|
|
41
|
+
extra?: ReactNode;
|
|
42
|
+
className?: string;
|
|
43
|
+
}
|
|
44
|
+
/** 批量操作条(由 jike-geo 的 DataTableBulkBar 沉淀):左边“已选择 N 项”和批量操作,右边合计与分页;放在表格下方。 */
|
|
45
|
+
export declare const SelectionBar: ({ count, unit, actions, extra, className }: SelectionBarProps) => import("react").JSX.Element;
|
|
46
|
+
export interface TableScrollProps {
|
|
47
|
+
/** 表格保持的最小宽度(px):容器比它窄时横向滚动,而不是把列挤成一个字一行 */
|
|
48
|
+
minWidth: number;
|
|
49
|
+
children: ReactNode;
|
|
50
|
+
className?: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* 表格的横向滚动容器:列多的表格在窄屏上保持最小宽度、左右滑动。Semi Table 的 `scroll.x` 是定宽,宽屏上不会撑满,
|
|
54
|
+
* 所以用这层容器给最小宽度。列很少的表格不需要;手机上要逐项成卡片的列表由页面自己换成卡片。
|
|
55
|
+
*/
|
|
56
|
+
export declare const TableScroll: ({ minWidth, children, className }: TableScrollProps) => import("react").JSX.Element;
|