@24city/web-console 0.3.6 → 0.3.8
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 +65 -0
- package/GUIDELINES.md +29 -2
- package/README.md +3 -3
- package/dist/account/account-api.d.ts +7 -0
- package/dist/account/index.d.ts +1 -0
- package/dist/account/index.js +60 -59
- package/dist/account/use-show-once.d.ts +26 -0
- package/dist/chunks/{auth-provider-CqiyTeOt.js → auth-provider-7FOj7Y84.js} +1 -1
- package/dist/chunks/{console-layout-Os4sQzMP.js → console-layout-B4OlW1IZ.js} +1 -1
- package/dist/chunks/logout-signal-CLdquzzn.js +378 -0
- package/dist/chunks/{stale-build-DG-Tb2RA.js → stale-build-DwUlkKYm.js} +2 -2
- package/dist/chunks/text-link-WWzQqJ14.js +196 -0
- package/dist/chunks/use-show-once-Bz1ojVqb.js +768 -0
- package/dist/chunks/{wallet-badge-Dt8fv-Du.js → wallet-badge-COpdEDYI.js} +1 -1
- package/dist/chunks/waterfall-DOeGU8Zs.js +752 -0
- package/dist/index.js +197 -192
- package/dist/layout/index.js +1 -1
- 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/page/guide-modal.d.ts +37 -0
- package/dist/page/index.d.ts +1 -0
- package/dist/page/index.js +22 -21
- package/dist/runtime/index.js +2 -2
- package/dist/styles.css +820 -157
- package/dist/testing/fixtures.js +33 -27
- package/package.json +1 -1
- package/dist/chunks/logout-signal-CiD_zY5M.js +0 -365
- package/dist/chunks/text-link-Bb5f1eLW.js +0 -106
- package/dist/chunks/upgrade-modal-DyPkV9OB.js +0 -713
- package/dist/chunks/waterfall-ZMzEjGwK.js +0 -614
package/dist/index.js
CHANGED
|
@@ -1,235 +1,240 @@
|
|
|
1
|
-
import { A as s, a as o, c as r, b as t, 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
|
|
4
|
-
import { A as za } from "./chunks/auth-provider-
|
|
5
|
-
import { M as
|
|
6
|
-
import { S as
|
|
7
|
-
import { F as
|
|
8
|
-
import { ConsoleSemiProvider as
|
|
9
|
-
import { B as
|
|
10
|
-
import { C 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
|
|
1
|
+
import { A as s, a as o, c as r, b as t, h as n, j as i, k as u, m as l, o as c, p as S, q as p, 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 h, f as b, C as x, D as B, E as y, u as O, g as N, w as _ } from "./chunks/logout-signal-CLdquzzn.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 G, d as Q, T as H, U as V, e as z, p as Y, f as j, g as X, h as Z, u as J, y as $ } from "./chunks/use-show-once-Bz1ojVqb.js";
|
|
3
|
+
import { A as ea, a as sa, b as oa, E as ra, F as ta, P as na, c as ia, d as ua, U as la, e as ca, W as Sa, f as pa, g as da, h as ma, i as Ca, j as fa, k as Pa, l as Aa, m as ga, n as La, o as Fa, p as Ta, q as Ea, r as Ra, s as ha, t as ba, u as xa, v as Ba, w as ya, x as Oa, y as Na, z as _a, B as Ma, C as ka, D as Ia, G as Ua, H as va, I as Da, J as wa, K as qa, L as Wa, M as Ka, N as Ga, O as Qa, Q as Ha } from "./chunks/wallet-badge-COpdEDYI.js";
|
|
4
|
+
import { A as za } from "./chunks/auth-provider-7FOj7Y84.js";
|
|
5
|
+
import { M as ja, a as Xa, S as Za } from "./chunks/status-tag-BrLUhH6Z.js";
|
|
6
|
+
import { S as $a } from "./chunks/status-text-CKFIzlND.js";
|
|
7
|
+
import { F as ee, a as se, b as oe, c as re, d as te } from "./chunks/form-layout-BDOTSKaB.js";
|
|
8
|
+
import { ConsoleSemiProvider as ie, MODAL_BUTTON_PROPS as ue, modalButtonProps as le } from "./semi.js";
|
|
9
|
+
import { B as Se, C as pe, f as de, a as me, i as Ce } from "./chunks/console-layout-B4OlW1IZ.js";
|
|
10
|
+
import { C as Pe, a as Ae, b as ge, c as Le, d as Fe, e as Te, F as Ee, f as Re, g as he, h as be, i as xe, j as Be, k as ye, l as Oe, m as Ne, n as _e, L as Me, M as ke, S as Ie, o as Ue, p as ve, q as De, r as we, T as qe, W as We, s as Ke, w as Ge } from "./chunks/waterfall-DOeGU8Zs.js";
|
|
11
|
+
import { C as He } from "./chunks/color-mode-switch-BinpVuZ0.js";
|
|
12
|
+
import { E as ze, R as Ye, U as je } from "./chunks/unsupported-browser-Dwq1mNRy.js";
|
|
13
|
+
import { F as Ze, a as Je, b as $e, G as as, N as es, S as ss, c as os, T as rs, f as ts } from "./chunks/text-link-WWzQqJ14.js";
|
|
14
|
+
import { L as is } from "./chunks/link-button-PqZcqU6s.js";
|
|
15
|
+
import { E as ls, a as cs, b as Ss, F as ps, c as ds, L as ms, d as Cs, P as fs, S as Ps, e as As, T as gs } from "./chunks/page-YBG0dEN1.js";
|
|
16
|
+
import { C as Fs, R as Ts, c as Es, e as Rs, k as hs, l as bs, p as xs, a as Bs, r as ys, s as Os } from "./chunks/stale-build-DwUlkKYm.js";
|
|
17
|
+
import { C as _s, u as Ms, a as ks, b as Is } from "./chunks/context-CaVim6ZO.js";
|
|
18
|
+
import { c as vs } from "./chunks/http-B3mTs9KZ.js";
|
|
19
|
+
import { u as ws } from "./chunks/use-media-query-DvyinWNg.js";
|
|
20
|
+
import { BRAND_SOURCE_VARIABLES as Ws, BRAND_VARIABLES as Ks, SEMI_BRAND_VARIABLES as Gs, applyBrand as Qs, brandDarkPalette as Hs, brandPalette as Vs } from "./theme/index.js";
|
|
21
|
+
import { I as Ys, K as js, M as Xs, P as Zs, S as Js, a as $s, b as ao, W as eo, c as so, d as oo, e as ro, f as to } from "./chunks/work-summary-DVmaOkCu.js";
|
|
22
|
+
import { B as io, D as uo, F as lo, b as co, a as So } from "./chunks/scale-smFifpMm.js";
|
|
23
|
+
import { C as mo, g as Co, i as fo, s as Po, u as Ao } from "./chunks/color-mode-DC4KIKya.js";
|
|
24
|
+
import { notifyCustomerSessionChanged as Lo, subscribeCustomerSessionChanges as Fo } from "@24city/web-runtime/session-sync";
|
|
25
|
+
import { summarizeCustomerError as Eo } from "@24city/web-runtime/error-summary";
|
|
26
26
|
export {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
ea as ACCOUNT_SECTIONS,
|
|
28
|
+
sa as AccountAvatar,
|
|
29
|
+
k as AccountCenterPage,
|
|
30
|
+
oa as AccountMenu,
|
|
31
|
+
I as AllowanceMeter,
|
|
32
32
|
za as AuthProvider,
|
|
33
33
|
s as AuthStoreProvider,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
Ws as BRAND_SOURCE_VARIABLES,
|
|
35
|
+
Ks as BRAND_VARIABLES,
|
|
36
|
+
io as BREAKPOINTS,
|
|
37
|
+
Se as BrandMark,
|
|
38
|
+
mo as COLOR_MODE_STORAGE_KEY,
|
|
39
|
+
Pe as COVER_TAB_COVERS,
|
|
39
40
|
U as CenterLinkButton,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
Ae as ChoiceCards,
|
|
42
|
+
ge as ChoiceCardsSkeleton,
|
|
43
|
+
He as ColorModeSwitch,
|
|
44
|
+
Fs as ConsoleApp,
|
|
44
45
|
pe as ConsoleLayout,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
ia as
|
|
46
|
+
_s as ConsoleRuntimeProvider,
|
|
47
|
+
ie as ConsoleSemiProvider,
|
|
48
|
+
Le as ContentSquare,
|
|
49
|
+
Fe as CoverTabs,
|
|
50
|
+
Te as CoverTabsSkeleton,
|
|
51
|
+
uo as DISPLAY_SIZES,
|
|
52
|
+
ra as EXPIRING_SOON_DAYS,
|
|
53
|
+
ls as EmptyBlock,
|
|
54
|
+
cs as EmptyCard,
|
|
55
|
+
ze as ErrorBoundary,
|
|
56
|
+
Ss as ErrorCard,
|
|
57
|
+
ta as FALLBACK_ACCOUNT_LABEL,
|
|
58
|
+
lo as FONT_SIZE_SCALE,
|
|
59
|
+
Ze as FeatureHero,
|
|
60
|
+
Je as FeatureIndex,
|
|
61
|
+
$e as FeatureTitle,
|
|
62
|
+
ee as Field,
|
|
63
|
+
Ee as FilterCapsules,
|
|
64
|
+
Re as FilterDropdown,
|
|
65
|
+
he as FilterOptionButton,
|
|
66
|
+
be as FilterOptions,
|
|
67
|
+
xe as FilterPanel,
|
|
68
|
+
Be as FilterRangeText,
|
|
69
|
+
ye as FilterRow,
|
|
70
|
+
Oe as FilterSelectText,
|
|
71
|
+
Ne as FilterSelected,
|
|
72
|
+
_e as FilterTrigger,
|
|
73
|
+
se as FormActions,
|
|
74
|
+
oe as FormGrid,
|
|
75
|
+
re as FormSection,
|
|
76
|
+
te as FormStack,
|
|
77
|
+
ps as FullPage,
|
|
78
|
+
ds as FullPageLoading,
|
|
79
|
+
as as GuideModal,
|
|
80
|
+
Ys as InlineStats,
|
|
81
|
+
js as KeyValueList,
|
|
82
|
+
is as LinkButton,
|
|
83
|
+
Me as ListToolbar,
|
|
84
|
+
ms as LoadingBlock,
|
|
85
|
+
Cs as LoadingCard,
|
|
86
|
+
v as LoginPage,
|
|
87
|
+
ke as MAX_WATERFALL_COLUMNS,
|
|
88
|
+
ue as MODAL_BUTTON_PROPS,
|
|
89
|
+
Xs as MetaLine,
|
|
90
|
+
ja as MetricCard,
|
|
91
|
+
Xa as MetricGrid,
|
|
92
|
+
es as NotFoundPage,
|
|
93
|
+
na as PERSONAL_NAV_KEYS,
|
|
94
|
+
ia as PERSONAL_SPACE_LABEL,
|
|
95
|
+
Zs as PanelHead,
|
|
96
|
+
D as PlanCards,
|
|
97
|
+
ua as PlanPanel,
|
|
94
98
|
w as PointsSection,
|
|
95
|
-
|
|
99
|
+
fs as ProductPage,
|
|
96
100
|
q as ProfileSection,
|
|
97
101
|
W as QuotaPill,
|
|
98
|
-
|
|
99
|
-
|
|
102
|
+
Ts as RUNTIME_CONFIG_URL,
|
|
103
|
+
Ye as RouteErrorPage,
|
|
100
104
|
K as RouteGuard,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
105
|
+
Gs as SEMI_BRAND_VARIABLES,
|
|
106
|
+
ss as SelectLabel,
|
|
107
|
+
Ie as SelectionBar,
|
|
108
|
+
Ps as SessionUnavailable,
|
|
109
|
+
G as SettingRow,
|
|
110
|
+
Ue as SortBar,
|
|
111
|
+
ve as SquareAccent,
|
|
112
|
+
De as SquareFooter,
|
|
113
|
+
we as SquareSearch,
|
|
114
|
+
os as StartupError,
|
|
115
|
+
As as StatusResult,
|
|
116
|
+
Za as StatusTag,
|
|
117
|
+
$a as StatusText,
|
|
118
|
+
Js as StepTabs,
|
|
119
|
+
$s as SubTabs,
|
|
120
|
+
Q as SubscriptionSection,
|
|
121
|
+
ao as SummaryBar,
|
|
122
|
+
qe as TableScroll,
|
|
119
123
|
H as TeamPromo,
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
124
|
+
rs as TextLink,
|
|
125
|
+
gs as Toolbar,
|
|
126
|
+
la as UNLIMITED_QUOTA,
|
|
127
|
+
je as UnsupportedBrowser,
|
|
128
|
+
ca as UpgradeEntry,
|
|
129
|
+
V as UpgradeModal,
|
|
130
|
+
Sa as WalletBadge,
|
|
131
|
+
We as Waterfall,
|
|
132
|
+
eo as WorkArt,
|
|
133
|
+
so as WorkCanvas,
|
|
134
|
+
oo as WorkPanel,
|
|
135
|
+
ro as WorkPlaceholder,
|
|
136
|
+
to as WorkSection,
|
|
137
|
+
z as accountCenterPageUrl,
|
|
134
138
|
pa as accountQueryKeys,
|
|
135
|
-
|
|
139
|
+
da as accountSectionPath,
|
|
136
140
|
o as announceLogout,
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
141
|
+
Qs as applyBrand,
|
|
142
|
+
Hs as brandDarkPalette,
|
|
143
|
+
Vs as brandPalette,
|
|
144
|
+
co as breakpointDown,
|
|
145
|
+
So as breakpointUp,
|
|
146
|
+
ma as buildPersonalNavigation,
|
|
147
|
+
Ca as canBuyForSpace,
|
|
148
|
+
fa as catalogPlanOf,
|
|
145
149
|
r as createAccountApi,
|
|
146
150
|
t as createAuthStore,
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
151
|
+
Es as createConsoleQueryClient,
|
|
152
|
+
vs as createHttpRuntime,
|
|
153
|
+
Ke as distributeToColumns,
|
|
154
|
+
Rs as earlyRuntimeConfigFetcher,
|
|
155
|
+
Pa as entryTeamPlan,
|
|
156
|
+
Aa as featureLines,
|
|
157
|
+
ts as featureModalProps,
|
|
158
|
+
de as findActiveModule,
|
|
159
|
+
me as findActiveNavItem,
|
|
156
160
|
n as formatChargePoints,
|
|
157
161
|
i as formatClock,
|
|
158
162
|
u as formatDate,
|
|
159
163
|
l as formatDateTime,
|
|
160
164
|
c as formatDuration,
|
|
161
|
-
|
|
165
|
+
S as formatNumber,
|
|
162
166
|
ga as formatPlanAmount,
|
|
163
|
-
|
|
164
|
-
|
|
167
|
+
La as formatPlanPrice,
|
|
168
|
+
p as formatPoints,
|
|
165
169
|
d as formatPrice,
|
|
166
|
-
|
|
170
|
+
Co as getColorMode,
|
|
167
171
|
m as hasHttpStatus,
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
172
|
+
fo as initColorMode,
|
|
173
|
+
Fa as isAccountCenterPath,
|
|
174
|
+
Ta as isAccountSection,
|
|
171
175
|
C as isLeavingForLogout,
|
|
172
176
|
f as isLoggedOutElsewhere,
|
|
173
|
-
|
|
177
|
+
Ce as isPathUnder,
|
|
174
178
|
P as isPathWithin,
|
|
175
|
-
|
|
179
|
+
A as isSafeInternalPath,
|
|
176
180
|
Ea as isTeamSpace,
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
181
|
+
Ra as isTeamSubscriptionRequired,
|
|
182
|
+
ha as isUnlimited,
|
|
183
|
+
hs as keepLoadingOnStaleBuild,
|
|
184
|
+
g as leaveForLogout,
|
|
185
|
+
bs as loadRuntimeConfig,
|
|
186
|
+
le as modalButtonProps,
|
|
183
187
|
L as noteLogoutElsewhere,
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
188
|
+
Lo as notifySessionChanged,
|
|
189
|
+
ba as offerHighlights,
|
|
190
|
+
xs as parseRuntimeConfig,
|
|
187
191
|
xa as personalNavKey,
|
|
188
192
|
Y as planBenefitLines,
|
|
189
193
|
j as planCopy,
|
|
190
194
|
Ba as planDaysLeft,
|
|
191
|
-
|
|
192
|
-
|
|
195
|
+
ya as planFocusOf,
|
|
196
|
+
Oa as planFocusState,
|
|
193
197
|
Na as planPeriodText,
|
|
194
|
-
|
|
198
|
+
_a as planTitle,
|
|
195
199
|
X as plansUrl,
|
|
196
200
|
Z as priceFor,
|
|
197
201
|
Ma as productAccountSections,
|
|
198
|
-
|
|
199
|
-
|
|
202
|
+
Bs as productQueryKeys,
|
|
203
|
+
ka as quotaCopy,
|
|
200
204
|
Ia as quotaFull,
|
|
201
|
-
|
|
205
|
+
Ua as quotaText,
|
|
202
206
|
F as releaseLogoutHold,
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
207
|
+
ys as reloadOnStaleBuild,
|
|
208
|
+
T as requireNonNegativeInteger,
|
|
209
|
+
E as requireRecord,
|
|
206
210
|
R as requireString,
|
|
207
211
|
h as resetLogoutSignalForTest,
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
+
b as restoreIdentityContext,
|
|
213
|
+
x as sanitizeReturnPath,
|
|
214
|
+
Po as setColorModePreference,
|
|
215
|
+
va as spaceDisplayName,
|
|
212
216
|
Da as spaceRoleLabel,
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
217
|
+
wa as startingPrice,
|
|
218
|
+
Fo as subscribeSessionChanged,
|
|
219
|
+
Eo as summarizeCustomerError,
|
|
220
|
+
B as summarizeError,
|
|
221
|
+
Os as supportsCascadeLayers,
|
|
218
222
|
y as unwrapApiResponse,
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
223
|
+
qa as upgradeOffer,
|
|
224
|
+
Wa as useAccountCenter,
|
|
225
|
+
O as useAuthState,
|
|
226
|
+
N as useAuthStore,
|
|
227
|
+
Ao as useColorMode,
|
|
228
|
+
Ms as useConsoleBrand,
|
|
229
|
+
ks as useConsoleCustomization,
|
|
230
|
+
Is as useConsoleRuntime,
|
|
231
|
+
Ka as useLogout,
|
|
232
|
+
ws as useMediaQuery,
|
|
233
|
+
Ga as useMembership,
|
|
230
234
|
Qa as usePlanCatalog,
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
+
J as useShowOnce,
|
|
236
|
+
Ha as useSpaceSwitch,
|
|
237
|
+
Ge as waterfallLayout,
|
|
238
|
+
_ as withdrawLogout,
|
|
239
|
+
$ as yearlyNote
|
|
235
240
|
};
|
package/dist/layout/index.js
CHANGED
|
@@ -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;
|