@24city/web-console 0.3.6 → 0.3.7
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 +38 -0
- package/GUIDELINES.md +14 -2
- package/dist/chunks/waterfall-DOeGU8Zs.js +752 -0
- package/dist/index.js +157 -154
- package/dist/list/content-square.d.ts +36 -7
- package/dist/list/cover-tabs.d.ts +36 -0
- package/dist/list/filter-panel.d.ts +8 -5
- package/dist/list/index.d.ts +1 -0
- package/dist/list/index.js +26 -23
- package/dist/styles.css +653 -157
- package/package.json +1 -1
- package/dist/chunks/waterfall-ZMzEjGwK.js +0 -614
package/dist/index.js
CHANGED
|
@@ -1,235 +1,238 @@
|
|
|
1
|
-
import { A as s, a as o, c as r, b as t, h as n, j as i, k as
|
|
2
|
-
import { A as
|
|
3
|
-
import { A as aa, a as ea, b as sa, E as oa, F as ra, P as ta, c as na, d as ia, U as
|
|
4
|
-
import { A as
|
|
1
|
+
import { A as s, a as o, c as r, b as t, h as n, j as i, k as l, m as u, o as c, p, q as S, s as d, t as m, i as C, d as f, v as P, x as A, l as g, n as L, r as F, y as T, z as E, B as R, e as b, f as h, C as x, D as B, E as y, u as O, g as N, w as _ } from "./chunks/logout-signal-CiD_zY5M.js";
|
|
2
|
+
import { A as k, a as I, C as U, L as v, P as D, b as w, c as q, Q as W, R as K, S as Q, d as G, T as H, U as V, e as z, p as Y, f as j, g as X, h as Z, y as J } from "./chunks/upgrade-modal-DyPkV9OB.js";
|
|
3
|
+
import { A as aa, a as ea, b as sa, E as oa, F as ra, P as ta, c as na, d as ia, U as la, e as ua, W as ca, f as pa, g as Sa, h as da, i as ma, j as Ca, k as fa, l as Pa, m as Aa, n as ga, o as La, p as Fa, q as Ta, r as Ea, s as Ra, t as ba, u as ha, v as xa, w as Ba, x as ya, y as Oa, z as Na, B as _a, C as Ma, D as ka, G as Ia, H as Ua, I as va, J as Da, K as wa, L as qa, M as Wa, N as Ka, O as Qa, Q as Ga } from "./chunks/wallet-badge-Dt8fv-Du.js";
|
|
4
|
+
import { A as Va } from "./chunks/auth-provider-CqiyTeOt.js";
|
|
5
5
|
import { M as Ya, a as ja, S as Xa } from "./chunks/status-tag-BrLUhH6Z.js";
|
|
6
6
|
import { S as Ja } from "./chunks/status-text-CKFIzlND.js";
|
|
7
7
|
import { F as ae, a as ee, b as se, c as oe, d as re } from "./chunks/form-layout-BDOTSKaB.js";
|
|
8
|
-
import { ConsoleSemiProvider as ne, MODAL_BUTTON_PROPS as ie, modalButtonProps as
|
|
8
|
+
import { ConsoleSemiProvider as ne, MODAL_BUTTON_PROPS as ie, modalButtonProps as le } from "./semi.js";
|
|
9
9
|
import { B as ce, C as pe, f as Se, a as de, i as me } from "./chunks/console-layout-Os4sQzMP.js";
|
|
10
|
-
import { C as fe, a as Pe, b as
|
|
11
|
-
import { C as
|
|
12
|
-
import { E as
|
|
13
|
-
import { F as
|
|
14
|
-
import { L as
|
|
15
|
-
import { E as
|
|
16
|
-
import { C as
|
|
17
|
-
import { C as
|
|
18
|
-
import { c as
|
|
19
|
-
import { u as
|
|
20
|
-
import { BRAND_SOURCE_VARIABLES as
|
|
21
|
-
import { I as
|
|
22
|
-
import { B as
|
|
23
|
-
import { C as
|
|
24
|
-
import { notifyCustomerSessionChanged as
|
|
25
|
-
import { summarizeCustomerError as
|
|
10
|
+
import { C as fe, a as Pe, b as Ae, c as ge, d as Le, e as Fe, F as Te, f as Ee, g as Re, h as be, i as he, j as xe, k as Be, l as ye, m as Oe, n as Ne, L as _e, M as Me, S as ke, o as Ie, p as Ue, q as ve, r as De, T as we, W as qe, s as We, w as Ke } from "./chunks/waterfall-DOeGU8Zs.js";
|
|
11
|
+
import { C as Ge } from "./chunks/color-mode-switch-BinpVuZ0.js";
|
|
12
|
+
import { E as Ve, R as ze, U as Ye } from "./chunks/unsupported-browser-Dwq1mNRy.js";
|
|
13
|
+
import { F as Xe, a as Ze, b as Je, N as $e, S as as, c as es, T as ss, f as os } from "./chunks/text-link-Bb5f1eLW.js";
|
|
14
|
+
import { L as ts } from "./chunks/link-button-PqZcqU6s.js";
|
|
15
|
+
import { E as is, a as ls, b as us, F as cs, c as ps, L as Ss, d as ds, P as ms, S as Cs, e as fs, T as Ps } from "./chunks/page-YBG0dEN1.js";
|
|
16
|
+
import { C as gs, R as Ls, c as Fs, e as Ts, k as Es, l as Rs, p as bs, a as hs, r as xs, s as Bs } from "./chunks/stale-build-DG-Tb2RA.js";
|
|
17
|
+
import { C as Os, u as Ns, a as _s, b as Ms } from "./chunks/context-CaVim6ZO.js";
|
|
18
|
+
import { c as Is } from "./chunks/http-B3mTs9KZ.js";
|
|
19
|
+
import { u as vs } from "./chunks/use-media-query-DvyinWNg.js";
|
|
20
|
+
import { BRAND_SOURCE_VARIABLES as ws, BRAND_VARIABLES as qs, SEMI_BRAND_VARIABLES as Ws, applyBrand as Ks, brandDarkPalette as Qs, brandPalette as Gs } from "./theme/index.js";
|
|
21
|
+
import { I as Vs, K as zs, M as Ys, P as js, S as Xs, a as Zs, b as Js, W as $s, c as ao, d as eo, e as so, f as oo } from "./chunks/work-summary-DVmaOkCu.js";
|
|
22
|
+
import { B as to, D as no, F as io, b as lo, a as uo } from "./chunks/scale-smFifpMm.js";
|
|
23
|
+
import { C as po, g as So, i as mo, s as Co, u as fo } from "./chunks/color-mode-DC4KIKya.js";
|
|
24
|
+
import { notifyCustomerSessionChanged as Ao, subscribeCustomerSessionChanges as go } from "@24city/web-runtime/session-sync";
|
|
25
|
+
import { summarizeCustomerError as Fo } from "@24city/web-runtime/error-summary";
|
|
26
26
|
export {
|
|
27
27
|
aa as ACCOUNT_SECTIONS,
|
|
28
28
|
ea as AccountAvatar,
|
|
29
|
-
|
|
29
|
+
k as AccountCenterPage,
|
|
30
30
|
sa as AccountMenu,
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
I as AllowanceMeter,
|
|
32
|
+
Va as AuthProvider,
|
|
33
33
|
s as AuthStoreProvider,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
ws as BRAND_SOURCE_VARIABLES,
|
|
35
|
+
qs as BRAND_VARIABLES,
|
|
36
|
+
to as BREAKPOINTS,
|
|
37
37
|
ce as BrandMark,
|
|
38
|
-
|
|
38
|
+
po as COLOR_MODE_STORAGE_KEY,
|
|
39
|
+
fe as COVER_TAB_COVERS,
|
|
39
40
|
U as CenterLinkButton,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
Pe as ChoiceCards,
|
|
42
|
+
Ae as ChoiceCardsSkeleton,
|
|
43
|
+
Ge as ColorModeSwitch,
|
|
44
|
+
gs as ConsoleApp,
|
|
44
45
|
pe as ConsoleLayout,
|
|
45
|
-
|
|
46
|
+
Os as ConsoleRuntimeProvider,
|
|
46
47
|
ne as ConsoleSemiProvider,
|
|
47
48
|
ge as ContentSquare,
|
|
48
|
-
|
|
49
|
+
Le as CoverTabs,
|
|
50
|
+
Fe as CoverTabsSkeleton,
|
|
51
|
+
no as DISPLAY_SIZES,
|
|
49
52
|
oa as EXPIRING_SOON_DAYS,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
is as EmptyBlock,
|
|
54
|
+
ls as EmptyCard,
|
|
55
|
+
Ve as ErrorBoundary,
|
|
56
|
+
us as ErrorCard,
|
|
54
57
|
ra as FALLBACK_ACCOUNT_LABEL,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
io as FONT_SIZE_SCALE,
|
|
59
|
+
Xe as FeatureHero,
|
|
60
|
+
Ze as FeatureIndex,
|
|
61
|
+
Je as FeatureTitle,
|
|
59
62
|
ae as Field,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
63
|
+
Te as FilterCapsules,
|
|
64
|
+
Ee as FilterDropdown,
|
|
65
|
+
Re as FilterOptionButton,
|
|
66
|
+
be as FilterOptions,
|
|
67
|
+
he as FilterPanel,
|
|
68
|
+
xe as FilterRangeText,
|
|
69
|
+
Be as FilterRow,
|
|
70
|
+
ye as FilterSelectText,
|
|
71
|
+
Oe as FilterSelected,
|
|
72
|
+
Ne as FilterTrigger,
|
|
70
73
|
ee as FormActions,
|
|
71
74
|
se as FormGrid,
|
|
72
75
|
oe as FormSection,
|
|
73
76
|
re as FormStack,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
77
|
+
cs as FullPage,
|
|
78
|
+
ps as FullPageLoading,
|
|
79
|
+
Vs as InlineStats,
|
|
80
|
+
zs as KeyValueList,
|
|
81
|
+
ts as LinkButton,
|
|
82
|
+
_e as ListToolbar,
|
|
83
|
+
Ss as LoadingBlock,
|
|
84
|
+
ds as LoadingCard,
|
|
85
|
+
v as LoginPage,
|
|
86
|
+
Me as MAX_WATERFALL_COLUMNS,
|
|
84
87
|
ie as MODAL_BUTTON_PROPS,
|
|
85
|
-
|
|
88
|
+
Ys as MetaLine,
|
|
86
89
|
Ya as MetricCard,
|
|
87
90
|
ja as MetricGrid,
|
|
88
|
-
|
|
91
|
+
$e as NotFoundPage,
|
|
89
92
|
ta as PERSONAL_NAV_KEYS,
|
|
90
93
|
na as PERSONAL_SPACE_LABEL,
|
|
91
|
-
|
|
92
|
-
|
|
94
|
+
js as PanelHead,
|
|
95
|
+
D as PlanCards,
|
|
93
96
|
ia as PlanPanel,
|
|
94
97
|
w as PointsSection,
|
|
95
|
-
|
|
98
|
+
ms as ProductPage,
|
|
96
99
|
q as ProfileSection,
|
|
97
100
|
W as QuotaPill,
|
|
98
|
-
|
|
99
|
-
|
|
101
|
+
Ls as RUNTIME_CONFIG_URL,
|
|
102
|
+
ze as RouteErrorPage,
|
|
100
103
|
K as RouteGuard,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
104
|
+
Ws as SEMI_BRAND_VARIABLES,
|
|
105
|
+
as as SelectLabel,
|
|
106
|
+
ke as SelectionBar,
|
|
107
|
+
Cs as SessionUnavailable,
|
|
105
108
|
Q as SettingRow,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
109
|
+
Ie as SortBar,
|
|
110
|
+
Ue as SquareAccent,
|
|
111
|
+
ve as SquareFooter,
|
|
112
|
+
De as SquareSearch,
|
|
113
|
+
es as StartupError,
|
|
114
|
+
fs as StatusResult,
|
|
112
115
|
Xa as StatusTag,
|
|
113
116
|
Ja as StatusText,
|
|
114
|
-
|
|
115
|
-
|
|
117
|
+
Xs as StepTabs,
|
|
118
|
+
Zs as SubTabs,
|
|
116
119
|
G as SubscriptionSection,
|
|
117
|
-
|
|
118
|
-
|
|
120
|
+
Js as SummaryBar,
|
|
121
|
+
we as TableScroll,
|
|
119
122
|
H as TeamPromo,
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
ss as TextLink,
|
|
124
|
+
Ps as Toolbar,
|
|
125
|
+
la as UNLIMITED_QUOTA,
|
|
126
|
+
Ye as UnsupportedBrowser,
|
|
127
|
+
ua as UpgradeEntry,
|
|
128
|
+
V as UpgradeModal,
|
|
126
129
|
ca as WalletBadge,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
130
|
+
qe as Waterfall,
|
|
131
|
+
$s as WorkArt,
|
|
132
|
+
ao as WorkCanvas,
|
|
133
|
+
eo as WorkPanel,
|
|
134
|
+
so as WorkPlaceholder,
|
|
135
|
+
oo as WorkSection,
|
|
136
|
+
z as accountCenterPageUrl,
|
|
134
137
|
pa as accountQueryKeys,
|
|
135
138
|
Sa as accountSectionPath,
|
|
136
139
|
o as announceLogout,
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
Ks as applyBrand,
|
|
141
|
+
Qs as brandDarkPalette,
|
|
142
|
+
Gs as brandPalette,
|
|
143
|
+
lo as breakpointDown,
|
|
144
|
+
uo as breakpointUp,
|
|
142
145
|
da as buildPersonalNavigation,
|
|
143
146
|
ma as canBuyForSpace,
|
|
144
147
|
Ca as catalogPlanOf,
|
|
145
148
|
r as createAccountApi,
|
|
146
149
|
t as createAuthStore,
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
150
|
+
Fs as createConsoleQueryClient,
|
|
151
|
+
Is as createHttpRuntime,
|
|
152
|
+
We as distributeToColumns,
|
|
153
|
+
Ts as earlyRuntimeConfigFetcher,
|
|
151
154
|
fa as entryTeamPlan,
|
|
152
155
|
Pa as featureLines,
|
|
153
|
-
|
|
156
|
+
os as featureModalProps,
|
|
154
157
|
Se as findActiveModule,
|
|
155
158
|
de as findActiveNavItem,
|
|
156
159
|
n as formatChargePoints,
|
|
157
160
|
i as formatClock,
|
|
158
|
-
|
|
159
|
-
|
|
161
|
+
l as formatDate,
|
|
162
|
+
u as formatDateTime,
|
|
160
163
|
c as formatDuration,
|
|
161
164
|
p as formatNumber,
|
|
162
|
-
|
|
163
|
-
|
|
165
|
+
Aa as formatPlanAmount,
|
|
166
|
+
ga as formatPlanPrice,
|
|
164
167
|
S as formatPoints,
|
|
165
168
|
d as formatPrice,
|
|
166
|
-
|
|
169
|
+
So as getColorMode,
|
|
167
170
|
m as hasHttpStatus,
|
|
168
|
-
|
|
171
|
+
mo as initColorMode,
|
|
169
172
|
La as isAccountCenterPath,
|
|
170
173
|
Fa as isAccountSection,
|
|
171
174
|
C as isLeavingForLogout,
|
|
172
175
|
f as isLoggedOutElsewhere,
|
|
173
176
|
me as isPathUnder,
|
|
174
177
|
P as isPathWithin,
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
+
A as isSafeInternalPath,
|
|
179
|
+
Ta as isTeamSpace,
|
|
180
|
+
Ea as isTeamSubscriptionRequired,
|
|
178
181
|
Ra as isUnlimited,
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
182
|
+
Es as keepLoadingOnStaleBuild,
|
|
183
|
+
g as leaveForLogout,
|
|
184
|
+
Rs as loadRuntimeConfig,
|
|
185
|
+
le as modalButtonProps,
|
|
183
186
|
L as noteLogoutElsewhere,
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
187
|
+
Ao as notifySessionChanged,
|
|
188
|
+
ba as offerHighlights,
|
|
189
|
+
bs as parseRuntimeConfig,
|
|
190
|
+
ha as personalNavKey,
|
|
188
191
|
Y as planBenefitLines,
|
|
189
192
|
j as planCopy,
|
|
190
|
-
|
|
191
|
-
|
|
193
|
+
xa as planDaysLeft,
|
|
194
|
+
Ba as planFocusOf,
|
|
192
195
|
ya as planFocusState,
|
|
193
|
-
|
|
194
|
-
|
|
196
|
+
Oa as planPeriodText,
|
|
197
|
+
Na as planTitle,
|
|
195
198
|
X as plansUrl,
|
|
196
199
|
Z as priceFor,
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
200
|
+
_a as productAccountSections,
|
|
201
|
+
hs as productQueryKeys,
|
|
202
|
+
Ma as quotaCopy,
|
|
203
|
+
ka as quotaFull,
|
|
204
|
+
Ia as quotaText,
|
|
202
205
|
F as releaseLogoutHold,
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
+
xs as reloadOnStaleBuild,
|
|
207
|
+
T as requireNonNegativeInteger,
|
|
208
|
+
E as requireRecord,
|
|
206
209
|
R as requireString,
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
210
|
+
b as resetLogoutSignalForTest,
|
|
211
|
+
h as restoreIdentityContext,
|
|
212
|
+
x as sanitizeReturnPath,
|
|
213
|
+
Co as setColorModePreference,
|
|
211
214
|
Ua as spaceDisplayName,
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
215
|
+
va as spaceRoleLabel,
|
|
216
|
+
Da as startingPrice,
|
|
217
|
+
go as subscribeSessionChanged,
|
|
218
|
+
Fo as summarizeCustomerError,
|
|
219
|
+
B as summarizeError,
|
|
220
|
+
Bs as supportsCascadeLayers,
|
|
218
221
|
y as unwrapApiResponse,
|
|
219
222
|
wa as upgradeOffer,
|
|
220
223
|
qa as useAccountCenter,
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
224
|
+
O as useAuthState,
|
|
225
|
+
N as useAuthStore,
|
|
226
|
+
fo as useColorMode,
|
|
227
|
+
Ns as useConsoleBrand,
|
|
228
|
+
_s as useConsoleCustomization,
|
|
229
|
+
Ms as useConsoleRuntime,
|
|
227
230
|
Wa as useLogout,
|
|
228
|
-
|
|
231
|
+
vs as useMediaQuery,
|
|
229
232
|
Ka as useMembership,
|
|
230
233
|
Qa as usePlanCatalog,
|
|
231
234
|
Ga as useSpaceSwitch,
|
|
232
|
-
|
|
233
|
-
|
|
235
|
+
Ke as waterfallLayout,
|
|
236
|
+
_ as withdrawLogout,
|
|
234
237
|
J as yearlyNote
|
|
235
238
|
};
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { type ReactNode, type Ref } from 'react';
|
|
2
|
-
interface
|
|
2
|
+
export interface SquareSearchMode<T extends string> {
|
|
3
|
+
value: T;
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
interface SquareSearchProps<T extends string> {
|
|
3
7
|
ariaLabel: string;
|
|
4
8
|
placeholder: string;
|
|
5
9
|
value: string;
|
|
6
10
|
onChange: (value: string) => void;
|
|
7
11
|
onSearch: (value: string) => void;
|
|
8
12
|
inputRef?: Ref<HTMLInputElement>;
|
|
13
|
+
/** 聚焦搜索框的快捷键(如 `/`):写进 aria-keyshortcuts;深色描边的大框里空输入时还在框内显示按键标。 */
|
|
9
14
|
keyShortcut?: string;
|
|
10
15
|
/** 输入框为空时,在检索按钮前列出的快捷词(如最近搜索),点选即检索。 */
|
|
11
16
|
guide?: {
|
|
@@ -13,15 +18,38 @@ interface SquareSearchProps {
|
|
|
13
18
|
items: readonly string[];
|
|
14
19
|
onClear?: () => void;
|
|
15
20
|
};
|
|
16
|
-
/**
|
|
21
|
+
/** 框内最左侧的控件(如匹配方式下拉),用竖线与输入区隔开。用了 modes 就不要再放匹配方式。 */
|
|
17
22
|
prefix?: ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* 匹配方式页签(如“片段匹配 / 精准匹配”),贴在框的上沿,选中项深色底;单选,读屏是一组单选按钮。
|
|
25
|
+
* 在内容广场里,搜索条吸顶后页签收起。
|
|
26
|
+
*/
|
|
27
|
+
modes?: {
|
|
28
|
+
label: string;
|
|
29
|
+
value: T;
|
|
30
|
+
options: ReadonlyArray<SquareSearchMode<T>>;
|
|
31
|
+
onChange: (value: T) => void;
|
|
32
|
+
};
|
|
33
|
+
/** 主按钮上的字(如“搜索”):传了就换成带字的主按钮;不传是框内右侧只有图标的“检索”按钮。 */
|
|
34
|
+
buttonText?: string;
|
|
18
35
|
}
|
|
19
|
-
/**
|
|
20
|
-
|
|
36
|
+
/**
|
|
37
|
+
* 内容广场的大搜索框:60px 白底,检索按钮在框内右侧;空输入时可列出快捷词。
|
|
38
|
+
* 传了 modes 或 buttonText 是深色描边的大框(放在一块白画布里也看得清):上沿贴着匹配方式页签,右侧是带字的主按钮。
|
|
39
|
+
*/
|
|
40
|
+
export declare const SquareSearch: <T extends string = string>({ ariaLabel, placeholder, value, onChange, onSearch, inputRef, keyShortcut, guide, prefix, modes, buttonText, }: SquareSearchProps<T>) => import("react").JSX.Element;
|
|
21
41
|
interface ContentSquareProps {
|
|
22
42
|
testId?: string;
|
|
23
|
-
/**
|
|
24
|
-
|
|
43
|
+
/**
|
|
44
|
+
* 页面的一级标题。没有 nav 时是居中大标题(强调部分用 SquareAccent 包起来);传了 nav 时页面不显示大标题,
|
|
45
|
+
* 这里的文字只给读屏(页面仍有一个 h1)。
|
|
46
|
+
*/
|
|
47
|
+
title?: ReactNode;
|
|
48
|
+
/**
|
|
49
|
+
* 搜索上方的导航位(放 CoverTabs 这类分类入口)。传了它,导航、搜索条、分类和筛选面板合成同一块白画布,
|
|
50
|
+
* 页面不再显示大标题;搜索框随之换成深色描边,筛选面板去掉自己的投影和圆角,接在画布里。不传时保持原来的版式。
|
|
51
|
+
*/
|
|
52
|
+
nav?: ReactNode;
|
|
25
53
|
search: ReactNode;
|
|
26
54
|
categories?: ReactNode;
|
|
27
55
|
/** 平铺的筛选面板(FilterPanel),在分类卡片下方,随页面滚走;没有页内条件时不传。 */
|
|
@@ -43,8 +71,9 @@ export declare const SquareAccent: ({ children }: {
|
|
|
43
71
|
/**
|
|
44
72
|
* 内容广场版式(参照小红书聚光「创意 → 内容广场」):居中大标题 → 吸顶搜索条 → 分类卡片 →
|
|
45
73
|
* 平铺筛选面板(可没有)→ 吸顶排序条 → 结果。小红书内容广场与抖音广告素材、带货短视频共用。
|
|
74
|
+
* 传了 nav 是“一块画布”的版式:分类入口 → 搜索条 → 筛选面板连成一块白底,没有大标题。
|
|
46
75
|
*/
|
|
47
|
-
export declare const ContentSquare: ({ testId, title, search, categories, filters, toolbarLeft, toolbarRight, conditionKey, children, }: ContentSquareProps) => import("react").JSX.Element;
|
|
76
|
+
export declare const ContentSquare: ({ testId, title, nav, search, categories, filters, toolbarLeft, toolbarRight, conditionKey, children, }: ContentSquareProps) => import("react").JSX.Element;
|
|
48
77
|
/** 结果区底部居中的一行:续页状态、翻页按钮或“没有更多”。 */
|
|
49
78
|
export declare const SquareFooter: ({ children, footerRef }: {
|
|
50
79
|
children: ReactNode;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/** 每个入口最多叠几张封面。 */
|
|
2
|
+
export declare const COVER_TAB_COVERS = 3;
|
|
3
|
+
export interface CoverTabOption<T extends string> {
|
|
4
|
+
value: T;
|
|
5
|
+
label: string;
|
|
6
|
+
/** 这一类里排在前面的内容的封面地址,只用前三张;没有、还没取到或读不出来的位置显示灰色占位。 */
|
|
7
|
+
covers?: readonly string[];
|
|
8
|
+
/**
|
|
9
|
+
* 这一类当前没有内容时的提示(如“该行业无数据”):封面和名称变灰,名称下显示这句提示,读屏名称也带上它。
|
|
10
|
+
* 仍可点:点击照常触发 onChange,由页面决定是否切换、给什么提示。
|
|
11
|
+
*/
|
|
12
|
+
unavailable?: string;
|
|
13
|
+
}
|
|
14
|
+
interface CoverTabsProps<T extends string> {
|
|
15
|
+
/** 读屏名称,如“素材分类”。 */
|
|
16
|
+
ariaLabel: string;
|
|
17
|
+
value: T;
|
|
18
|
+
options: ReadonlyArray<CoverTabOption<T>>;
|
|
19
|
+
onChange: (value: T) => void;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* 图文入口:每一项是这一类里排在前面的三张封面(扇形叠放)加名称,不写说明;当前项名称加粗、下方压一条 3px 主色条。
|
|
23
|
+
* 用在内容广场的导航位(ContentSquare 的 nav),代替带说明的卡片式单选(ChoiceCards)切换榜单、分类。
|
|
24
|
+
* 读屏是一组页签:左右方向键(Home / End)在各项之间移动,回车或空格切换;宽屏等分一行,放不下时(手机)横向滑动,
|
|
25
|
+
* 切换后当前项滚进可见区。
|
|
26
|
+
*/
|
|
27
|
+
export declare const CoverTabs: <T extends string>({ ariaLabel, value, options, onChange }: CoverTabsProps<T>) => import("react").JSX.Element;
|
|
28
|
+
/**
|
|
29
|
+
* 入口还没取到(分类本身在加载)时的占位:与真实入口同高同列。分类读取失败时传 active={false},只留静态的灰色占位,
|
|
30
|
+
* 不再像在加载(出错的提示和重试由页面给出)。
|
|
31
|
+
*/
|
|
32
|
+
export declare const CoverTabsSkeleton: ({ count, active }: {
|
|
33
|
+
count: number;
|
|
34
|
+
active?: boolean;
|
|
35
|
+
}) => import("react").JSX.Element;
|
|
36
|
+
export {};
|
|
@@ -14,7 +14,7 @@ interface FilterRowProps {
|
|
|
14
14
|
/** 行尾靠右的操作。 */
|
|
15
15
|
extra?: ReactNode;
|
|
16
16
|
}
|
|
17
|
-
/**
|
|
17
|
+
/** 一行条件:左侧灰色条件名(不带冒号),右侧内容。 */
|
|
18
18
|
export declare const FilterRow: ({ label, children, extra }: FilterRowProps) => import("react").JSX.Element;
|
|
19
19
|
interface FilterOptionsProps<T extends string> {
|
|
20
20
|
label: string;
|
|
@@ -24,7 +24,7 @@ interface FilterOptionsProps<T extends string> {
|
|
|
24
24
|
}
|
|
25
25
|
/** 平铺单选:点未选项选中,点已选项取消(回到不限)。 */
|
|
26
26
|
export declare const FilterOptions: <T extends string>({ label, value, options, onChange }: FilterOptionsProps<T>) => import("react").JSX.Element;
|
|
27
|
-
/**
|
|
27
|
+
/** 平铺的单个可选项:胶囊,选中时浅主色底、主色字。 */
|
|
28
28
|
export declare const FilterOptionButton: ({ label, active, onClick, }: {
|
|
29
29
|
label: string;
|
|
30
30
|
active: boolean;
|
|
@@ -35,11 +35,14 @@ export interface SelectedCondition {
|
|
|
35
35
|
label: string;
|
|
36
36
|
onRemove: () => void;
|
|
37
37
|
}
|
|
38
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* 首行“已选条件”:每个生效条件一个浅主色小标签,可逐个移除;右侧一键清空。没有生效的条件时整行不渲染
|
|
40
|
+
* (不再写“未选择,点选下方条件即可筛选”这类提示句)。
|
|
41
|
+
*/
|
|
39
42
|
export declare const FilterSelected: ({ conditions, onClear, }: {
|
|
40
43
|
conditions: readonly SelectedCondition[];
|
|
41
44
|
onClear: () => void;
|
|
42
|
-
}) => import("react").JSX.Element;
|
|
45
|
+
}) => import("react").JSX.Element | null;
|
|
43
46
|
interface FilterSelectTextProps<T extends string> {
|
|
44
47
|
/** 未选值时显示的文字,如“全部素材类型”;也是读屏名称的前缀。 */
|
|
45
48
|
placeholder: string;
|
|
@@ -48,7 +51,7 @@ interface FilterSelectTextProps<T extends string> {
|
|
|
48
51
|
options: ReadonlyArray<PanelOption<T>>;
|
|
49
52
|
onChange: (value: T | '') => void;
|
|
50
53
|
}
|
|
51
|
-
/**
|
|
54
|
+
/** 行内文字下拉:深色字 + 灰箭头,选值后换成浅主色底胶囊里的所选项;菜单首项回到不限。 */
|
|
52
55
|
export declare const FilterSelectText: <T extends string>({ placeholder, label, value, options, onChange }: FilterSelectTextProps<T>) => import("react").JSX.Element;
|
|
53
56
|
export interface RangeValue {
|
|
54
57
|
min?: number;
|
package/dist/list/index.d.ts
CHANGED
package/dist/list/index.js
CHANGED
|
@@ -1,27 +1,30 @@
|
|
|
1
|
-
import { C as s, a as
|
|
1
|
+
import { C as s, a as r, b as t, c as l, d as o, e as i, F as S, f as n, g as C, h as F, i as T, j as c, k as u, l as b, m as d, n as p, L, M as q, S as A, o as O, p as R, q as f, r as g, T as h, W as w, s as B, w as _ } from "../chunks/waterfall-DOeGU8Zs.js";
|
|
2
2
|
export {
|
|
3
|
-
s as
|
|
3
|
+
s as COVER_TAB_COVERS,
|
|
4
|
+
r as ChoiceCards,
|
|
4
5
|
t as ChoiceCardsSkeleton,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
n as
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
d as
|
|
17
|
-
p as
|
|
18
|
-
L as
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
6
|
+
l as ContentSquare,
|
|
7
|
+
o as CoverTabs,
|
|
8
|
+
i as CoverTabsSkeleton,
|
|
9
|
+
S as FilterCapsules,
|
|
10
|
+
n as FilterDropdown,
|
|
11
|
+
C as FilterOptionButton,
|
|
12
|
+
F as FilterOptions,
|
|
13
|
+
T as FilterPanel,
|
|
14
|
+
c as FilterRangeText,
|
|
15
|
+
u as FilterRow,
|
|
16
|
+
b as FilterSelectText,
|
|
17
|
+
d as FilterSelected,
|
|
18
|
+
p as FilterTrigger,
|
|
19
|
+
L as ListToolbar,
|
|
20
|
+
q as MAX_WATERFALL_COLUMNS,
|
|
21
|
+
A as SelectionBar,
|
|
22
|
+
O as SortBar,
|
|
23
|
+
R as SquareAccent,
|
|
24
|
+
f as SquareFooter,
|
|
25
|
+
g as SquareSearch,
|
|
26
|
+
h as TableScroll,
|
|
24
27
|
w as Waterfall,
|
|
25
|
-
|
|
26
|
-
|
|
28
|
+
B as distributeToColumns,
|
|
29
|
+
_ as waterfallLayout
|
|
27
30
|
};
|