@tbox.cn/app-module-mall-core 0.4.4 → 1.0.0-alpha.6
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/AGENTS.md +2 -2
- package/README.md +1 -1
- package/dist/{chunk-QPBYZO27.js → chunk-DVEZRTKC.js} +295 -135
- package/dist/{chunk-FIHBQMON.js → chunk-ZVXAPBVE.js} +1 -1
- package/dist/client/index.js +1 -1
- package/dist/index.js +2 -2
- package/dist/server/index.js +1 -1
- package/package.json +6 -6
- package/src/client/HomeActivityDetailDialog.tsx +7 -9
- package/src/client/MallHome.tsx +109 -54
- package/src/client/cards/overrides/BumpInActivityChatCard.tsx +1 -1
- package/src/client/components/ActivityDetailPresentation/index.tsx +102 -9
- package/src/client/components/MemberGateSheet/index.tsx +12 -14
- package/src/client/home-slot.tsx +0 -2
- package/src/server/module-ports.ts +1 -1
- package/tbox.module.json +0 -1
- package/tests/home-slot.test.tsx +66 -14
- package/dist/HomeActivityDetailDialog-2GJFYSMZ.less +0 -178
- package/dist/MallHome-PABCNS6D.less +0 -623
- package/dist/home-slot-WBZ6ONDP.less +0 -4
- package/dist/index-ELJ55M66.less +0 -256
- package/dist/index-U5YRUY7P.less +0 -352
- package/src/client/HomeActivityDetailDialog.less +0 -178
- package/src/client/MallHome.less +0 -623
- package/src/client/components/ActivityDetailPresentation/index.less +0 -352
- package/src/client/components/MemberGateSheet/index.less +0 -256
- package/src/client/home-slot.less +0 -4
|
@@ -248,24 +248,116 @@ import { createPortal } from "react-dom";
|
|
|
248
248
|
import { X } from "@phosphor-icons/react";
|
|
249
249
|
|
|
250
250
|
// src/client/components/ActivityDetailPresentation/index.tsx
|
|
251
|
-
import "./index-U5YRUY7P.less";
|
|
252
251
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
252
|
+
var POSTER_BASE = "activity-detail-presentation__poster block h-full w-full bg-cover bg-center";
|
|
253
|
+
var POSTER_STAGE = "bg-[image:var(--tbox-asset-home-poster-stage,linear-gradient(135deg,#eaf3ff,#d7e7fd))]";
|
|
254
|
+
var POSTER_COMPACT = "max-[392px]:bg-[image:var(--tbox-asset-home-poster-compact,linear-gradient(135deg,#eaf3ff,#d7e7fd))]";
|
|
255
|
+
var EMBED_SKIN = [
|
|
256
|
+
// ① 卡框抹平:外边距/裁切/描边/圆角/阴影/入场动画全部让位
|
|
257
|
+
"[&_.tbox-card]:m-0 [&_.tbox-card]:animate-none [&_.tbox-card]:overflow-visible",
|
|
258
|
+
"[&_.tbox-card]:rounded-none [&_.tbox-card]:border-0 [&_.tbox-card]:bg-transparent [&_.tbox-card]:shadow-none",
|
|
259
|
+
// ② 头部:白底平铺,隐藏封面与遮罩伪元素,压掉深蓝渐变与最小高度
|
|
260
|
+
"[&_.promotion-bumpin]:m-0 [&_.promotion-bumpin]:overflow-visible [&_.promotion-bumpin]:rounded-none",
|
|
261
|
+
"[&_.promotion-bumpin]:border-0 [&_.promotion-bumpin]:bg-card [&_.promotion-bumpin]:shadow-none",
|
|
262
|
+
"[&_.promotion-bumpin__header]:block [&_.promotion-bumpin__header]:min-h-0",
|
|
263
|
+
"[&_.promotion-bumpin__header]:bg-card! [&_.promotion-bumpin__header]:bg-none!",
|
|
264
|
+
"[&_.promotion-bumpin__header]:px-[11px] [&_.promotion-bumpin__header]:pt-[10px] [&_.promotion-bumpin__header]:pb-[7px]",
|
|
265
|
+
"[&_.promotion-bumpin__header]:before:hidden",
|
|
266
|
+
"[&_.promotion-bumpin__cover]:hidden [&_.promotion-bumpin__cover-placeholder]:hidden",
|
|
267
|
+
"[&_.promotion-bumpin__header-copy]:relative [&_.promotion-bumpin__header-copy]:z-[1]",
|
|
268
|
+
"[&_.promotion-bumpin__header-copy]:grid [&_.promotion-bumpin__header-copy]:max-w-full [&_.promotion-bumpin__header-copy]:gap-[3.5px]",
|
|
269
|
+
// 标签 / 标题 / 时段:改浅底深字,与详情页正文同一套字号档位
|
|
270
|
+
"[&_.promotion-bumpin__tag]:justify-self-start [&_.promotion-bumpin__tag]:rounded-full",
|
|
271
|
+
"[&_.promotion-bumpin__tag]:border-0 [&_.promotion-bumpin__tag]:bg-[#edf8f1]",
|
|
272
|
+
"[&_.promotion-bumpin__tag]:px-[10px] [&_.promotion-bumpin__tag]:py-[3px]",
|
|
273
|
+
"[&_.promotion-bumpin__tag]:text-sm [&_.promotion-bumpin__tag]:leading-[19px] [&_.promotion-bumpin__tag]:text-[#19744a]",
|
|
274
|
+
"[&_.promotion-bumpin__title]:m-0 [&_.promotion-bumpin__title]:text-xl [&_.promotion-bumpin__title]:leading-[28px]",
|
|
275
|
+
"[&_.promotion-bumpin__title]:font-[750] [&_.promotion-bumpin__title]:text-[#263022]",
|
|
276
|
+
"[&_.promotion-bumpin__period]:justify-self-start [&_.promotion-bumpin__period]:bg-transparent [&_.promotion-bumpin__period]:px-0 [&_.promotion-bumpin__period]:py-0",
|
|
277
|
+
"[&_.promotion-bumpin__period]:text-sm [&_.promotion-bumpin__period]:leading-[21px] [&_.promotion-bumpin__period]:text-[#6f7969]",
|
|
278
|
+
"[&_.promotion-bumpin__subtitle]:justify-self-start [&_.promotion-bumpin__subtitle]:bg-transparent [&_.promotion-bumpin__subtitle]:px-0 [&_.promotion-bumpin__subtitle]:py-0",
|
|
279
|
+
"[&_.promotion-bumpin__subtitle]:text-sm [&_.promotion-bumpin__subtitle]:leading-[21px] [&_.promotion-bumpin__subtitle]:text-[#6f7969]",
|
|
280
|
+
// 进度:浅蓝底内嵌块 + 蓝系节点,与首页联单进度同一套色
|
|
281
|
+
"[&_.promotion-bumpin__progress]:mx-4 [&_.promotion-bumpin__progress]:gap-1 [&_.promotion-bumpin__progress]:overflow-hidden",
|
|
282
|
+
"[&_.promotion-bumpin__progress]:rounded-[14px] [&_.promotion-bumpin__progress]:border [&_.promotion-bumpin__progress]:border-[rgba(10,110,184,0.12)]",
|
|
283
|
+
"[&_.promotion-bumpin__progress]:bg-[#f2f8fc] [&_.promotion-bumpin__progress]:px-3.5 [&_.promotion-bumpin__progress]:pt-1.5 [&_.promotion-bumpin__progress]:pb-[5px]",
|
|
284
|
+
"[&_.promotion-bumpin__steps]:px-1.5 [&_.promotion-bumpin__step-item]:gap-0.5",
|
|
285
|
+
"[&_.promotion-bumpin__step-node]:size-[22px] [&_.promotion-bumpin__step-node]:text-xs",
|
|
286
|
+
"[&_.promotion-bumpin__step-node]:border-[#1682cb] [&_.promotion-bumpin__step-node]:bg-[#eaf8ff] [&_.promotion-bumpin__step-node]:text-[#0d6fae]",
|
|
287
|
+
"[&_.promotion-bumpin__step-node_svg]:size-3",
|
|
288
|
+
"[&_.promotion-bumpin__step-node--done]:border-[#0a6eb8] [&_.promotion-bumpin__step-node--done]:bg-[#0a6eb8] [&_.promotion-bumpin__step-node--done]:text-white",
|
|
289
|
+
"[&_.promotion-bumpin__step-node--done]:shadow-[0_3px_9px_rgba(10,110,184,0.22)]",
|
|
290
|
+
"[&_.promotion-bumpin__step-node--locked]:border-[#ffdc6a] [&_.promotion-bumpin__step-node--locked]:bg-[#1475b6] [&_.promotion-bumpin__step-node--locked]:text-white",
|
|
291
|
+
"[&_.promotion-bumpin__step-line]:top-[11px] [&_.promotion-bumpin__step-line]:h-[2px] [&_.promotion-bumpin__step-line]:bg-[rgba(22,126,194,0.22)]",
|
|
292
|
+
"[&_.promotion-bumpin__step-line--done]:bg-[#0a6eb8] [&_.promotion-bumpin__step-line--done]:shadow-none",
|
|
293
|
+
"[&_.promotion-bumpin__progress-fill]:bg-[#0a6eb8] [&_.promotion-bumpin__progress-fill]:shadow-none",
|
|
294
|
+
"[&_.promotion-bumpin__step-label]:text-xs [&_.promotion-bumpin__step-label]:leading-[13px] [&_.promotion-bumpin__step-label]:text-[#6f7969]",
|
|
295
|
+
"[&_.promotion-bumpin__progress-text]:text-xs [&_.promotion-bumpin__progress-text]:leading-[13px] [&_.promotion-bumpin__progress-text]:text-[#6f7969]",
|
|
296
|
+
"[&_.promotion-bumpin__progress-bar]:h-2 [&_.promotion-bumpin__progress-bar]:bg-[rgba(10,110,184,0.14)]",
|
|
297
|
+
// 奖励池 / 活动规则:白卡片 + 细描边,标题与条目按详情页正文排版
|
|
298
|
+
"[&_.promotion-bumpin__prizes]:mx-4 [&_.promotion-bumpin__prizes]:mt-4 [&_.promotion-bumpin__prizes]:overflow-hidden",
|
|
299
|
+
"[&_.promotion-bumpin__prizes]:rounded-[14px] [&_.promotion-bumpin__prizes]:border [&_.promotion-bumpin__prizes]:border-[rgba(106,119,137,0.16)]",
|
|
300
|
+
"[&_.promotion-bumpin__prizes]:bg-card [&_.promotion-bumpin__prizes]:shadow-[0_3px_12px_rgba(70,91,122,0.06)]",
|
|
301
|
+
"[&_.promotion-bumpin__rules]:mx-4 [&_.promotion-bumpin__rules]:mt-4 [&_.promotion-bumpin__rules]:overflow-hidden",
|
|
302
|
+
"[&_.promotion-bumpin__rules]:rounded-[14px] [&_.promotion-bumpin__rules]:border [&_.promotion-bumpin__rules]:border-[rgba(106,119,137,0.16)]",
|
|
303
|
+
"[&_.promotion-bumpin__rules]:bg-card [&_.promotion-bumpin__rules]:shadow-[0_3px_12px_rgba(70,91,122,0.06)]",
|
|
304
|
+
"[&_.promotion-bumpin__prizes-header]:gap-2 [&_.promotion-bumpin__prizes-header]:border-b [&_.promotion-bumpin__prizes-header]:border-[rgba(106,119,137,0.12)]",
|
|
305
|
+
"[&_.promotion-bumpin__prizes-header]:px-3.5 [&_.promotion-bumpin__prizes-header]:pt-3 [&_.promotion-bumpin__prizes-header]:pb-2.5",
|
|
306
|
+
"[&_.promotion-bumpin__prizes-header]:text-base [&_.promotion-bumpin__prizes-header]:font-semibold",
|
|
307
|
+
"[&_.promotion-bumpin__prizes-header]:leading-[22px] [&_.promotion-bumpin__prizes-header]:text-[#263022]",
|
|
308
|
+
"[&_.promotion-bumpin__rules-header]:border-b [&_.promotion-bumpin__rules-header]:border-[rgba(106,119,137,0.12)]",
|
|
309
|
+
"[&_.promotion-bumpin__rules-header]:px-3.5 [&_.promotion-bumpin__rules-header]:pt-3 [&_.promotion-bumpin__rules-header]:pb-2.5",
|
|
310
|
+
"[&_.promotion-bumpin__rules-header]:text-base [&_.promotion-bumpin__rules-header]:font-semibold",
|
|
311
|
+
"[&_.promotion-bumpin__rules-header]:leading-[22px] [&_.promotion-bumpin__rules-header]:text-[#263022]",
|
|
312
|
+
"[&_.promotion-bumpin__prizes-header_svg]:size-[26px] [&_.promotion-bumpin__prizes-header_svg]:rounded-[8px]",
|
|
313
|
+
"[&_.promotion-bumpin__prizes-header_svg]:bg-[#edf6ff] [&_.promotion-bumpin__prizes-header_svg]:p-1.5 [&_.promotion-bumpin__prizes-header_svg]:text-[#0a6eb8]",
|
|
314
|
+
"[&_.promotion-bumpin__prize-item]:gap-3 [&_.promotion-bumpin__prize-item]:border-b [&_.promotion-bumpin__prize-item]:border-[rgba(106,119,137,0.1)]",
|
|
315
|
+
"[&_.promotion-bumpin__prize-item]:bg-card [&_.promotion-bumpin__prize-item]:px-3.5 [&_.promotion-bumpin__prize-item]:py-3",
|
|
316
|
+
"[&_.promotion-bumpin__prize-logo]:size-[42px] [&_.promotion-bumpin__prize-logo]:rounded-[12px]",
|
|
317
|
+
"[&_.promotion-bumpin__prize-logo-placeholder]:size-[42px] [&_.promotion-bumpin__prize-logo-placeholder]:rounded-[12px]",
|
|
318
|
+
"[&_.promotion-bumpin__prize-copy_strong]:text-base [&_.promotion-bumpin__prize-copy_strong]:leading-[22px] [&_.promotion-bumpin__prize-copy_strong]:text-[#263022]",
|
|
319
|
+
"[&_.promotion-bumpin__prize-copy_small]:text-sm [&_.promotion-bumpin__prize-copy_small]:leading-5 [&_.promotion-bumpin__prize-copy_small]:text-[#6f7969]",
|
|
320
|
+
"[&_.promotion-bumpin__prize-amount]:text-sm [&_.promotion-bumpin__prize-amount]:leading-5 [&_.promotion-bumpin__prize-amount]:text-[#6f7969]",
|
|
321
|
+
"[&_.promotion-bumpin__prizes-toggle]:border-t [&_.promotion-bumpin__prizes-toggle]:border-[rgba(106,119,137,0.1)]",
|
|
322
|
+
"[&_.promotion-bumpin__prizes-toggle]:bg-[#f8fafc] [&_.promotion-bumpin__prizes-toggle]:px-3.5 [&_.promotion-bumpin__prizes-toggle]:py-[11px]",
|
|
323
|
+
"[&_.promotion-bumpin__prizes-toggle]:text-sm [&_.promotion-bumpin__prizes-toggle]:leading-5 [&_.promotion-bumpin__prizes-toggle]:text-[#6f7969]",
|
|
324
|
+
"[&_.promotion-bumpin__rules-content]:px-3.5 [&_.promotion-bumpin__rules-content]:pt-3 [&_.promotion-bumpin__rules-content]:pb-3.5",
|
|
325
|
+
"[&_.promotion-bumpin__rules-content]:text-sm [&_.promotion-bumpin__rules-content]:leading-6 [&_.promotion-bumpin__rules-content]:text-[#6f7969]"
|
|
326
|
+
].join(" ");
|
|
253
327
|
function ActivityDetailHero({ variant = "page" }) {
|
|
254
|
-
const className = variant === "strip" ?
|
|
328
|
+
const className = variant === "strip" ? `${POSTER_BASE} activity-detail-presentation__poster--stage ${POSTER_STAGE}` : `${POSTER_BASE} ${POSTER_STAGE} ${POSTER_COMPACT}`;
|
|
255
329
|
return /* @__PURE__ */ jsx("span", { className, role: "img", "aria-label": "\u53C2\u4E0E\u8054\u5355\uFF0C\u78B0\u51FA\u60CA\u559C" });
|
|
256
330
|
}
|
|
257
331
|
function ActivityDetailPresentation({
|
|
258
332
|
children,
|
|
259
333
|
variant
|
|
260
334
|
}) {
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
335
|
+
const isPage = variant === "page";
|
|
336
|
+
return /* @__PURE__ */ jsxs(
|
|
337
|
+
"div",
|
|
338
|
+
{
|
|
339
|
+
className: `activity-detail-presentation activity-detail-presentation--${variant} w-full min-w-0 overflow-hidden bg-card text-[#263022] ${isPage ? "" : "@container/activity rounded-[14px] [contain:layout_paint]"}`,
|
|
340
|
+
children: [
|
|
341
|
+
/* @__PURE__ */ jsx(
|
|
342
|
+
"div",
|
|
343
|
+
{
|
|
344
|
+
className: `activity-detail-presentation__hero activity-detail-presentation__hero--${variant} relative w-full overflow-hidden bg-[#fff8e9] ${isPage ? "aspect-[353/240]" : "aspect-auto h-[152px]"}`,
|
|
345
|
+
children: /* @__PURE__ */ jsx(ActivityDetailHero, { variant: isPage ? "page" : "strip" })
|
|
346
|
+
}
|
|
347
|
+
),
|
|
348
|
+
/* @__PURE__ */ jsx(
|
|
349
|
+
"div",
|
|
350
|
+
{
|
|
351
|
+
className: `activity-detail-presentation__body relative z-[1] min-w-0 bg-card [&>*]:w-full ${isPage ? "-mt-[50px] rounded-t-[22px] px-0 pt-1 pb-4.5 shadow-[0_-10px_28px_rgba(38,48,34,0.08)]" : "-mt-3.5 rounded-t-[16px] px-0 pt-0 pb-2 shadow-none"} ${EMBED_SKIN}`,
|
|
352
|
+
children
|
|
353
|
+
}
|
|
354
|
+
)
|
|
355
|
+
]
|
|
356
|
+
}
|
|
357
|
+
);
|
|
265
358
|
}
|
|
266
359
|
|
|
267
360
|
// src/client/HomeActivityDetailDialog.tsx
|
|
268
|
-
import "./HomeActivityDetailDialog-2GJFYSMZ.less";
|
|
269
361
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
270
362
|
var FOCUSABLE_SELECTOR = [
|
|
271
363
|
"button:not([disabled])",
|
|
@@ -427,28 +519,28 @@ function HomeActivityDetailDialog({
|
|
|
427
519
|
/* @__PURE__ */ jsxs2(
|
|
428
520
|
"div",
|
|
429
521
|
{
|
|
430
|
-
className: "home-activity-detail",
|
|
522
|
+
className: "home-activity-detail group/detail fixed inset-0 z-[1200]",
|
|
431
523
|
"data-motion": motion,
|
|
432
524
|
"data-phase": phase,
|
|
433
525
|
"data-return-origin": returnToOrigin ? "true" : "false",
|
|
434
526
|
children: [
|
|
435
|
-
/* @__PURE__ */ jsx2("button", { type: "button", className: "home-activity-detail__mask", "aria-label": "\u5173\u95ED\u6D3B\u52A8\u8BE6\u60C5", onClick: requestClose }),
|
|
527
|
+
/* @__PURE__ */ jsx2("button", { type: "button", className: "home-activity-detail__mask absolute inset-0 size-full border-0 bg-transparent p-0 transition-colors duration-200 group-data-[phase=open]/detail:bg-scrim", "aria-label": "\u5173\u95ED\u6D3B\u52A8\u8BE6\u60C5", onClick: requestClose }),
|
|
436
528
|
/* @__PURE__ */ jsxs2(
|
|
437
529
|
"section",
|
|
438
530
|
{
|
|
439
531
|
ref: panelRef,
|
|
440
532
|
id: getHomeActivityDialogId(card.id),
|
|
441
|
-
className: "home-activity-detail__surface",
|
|
533
|
+
className: "home-activity-detail__surface fixed z-10 min-h-0 min-w-0 overflow-hidden rounded-xl bg-card shadow-[0_20px_60px_rgba(22,42,30,0.22)] contain-[layout_paint] transition-all duration-300 will-change-[top,left,width,height,border-radius,transform] group-data-[phase=open]/detail:rounded-2xl group-data-[motion=fade]/detail:group-data-[phase=opening]/detail:scale-[0.985] group-data-[motion=fade]/detail:group-data-[phase=opening]/detail:opacity-0 group-data-[motion=fade]/detail:group-data-[phase=open]/detail:scale-100 group-data-[motion=fade]/detail:group-data-[phase=open]/detail:opacity-100 group-data-[phase=closing]/detail:group-data-[return-origin=false]/detail:scale-[0.98] group-data-[phase=closing]/detail:group-data-[return-origin=false]/detail:opacity-0 max-[600px]:h-dvh! max-[600px]:w-screen! max-[600px]:rounded-none! motion-reduce:transition-none",
|
|
442
534
|
style: surfaceStyle,
|
|
443
535
|
role: "dialog",
|
|
444
536
|
"aria-modal": "true",
|
|
445
537
|
"aria-labelledby": titleId,
|
|
446
538
|
tabIndex: -1,
|
|
447
539
|
children: [
|
|
448
|
-
/* @__PURE__ */ jsx2("h2", { id: titleId, className: "home-activity-detail__sr-title", children: title }),
|
|
449
|
-
transitionVisual && /* @__PURE__ */ jsx2("div", { className: "home-activity-detail__transition-visual", "aria-hidden": "true", children: transitionVisual }),
|
|
450
|
-
/* @__PURE__ */ jsx2("div", { className: "home-activity-detail__content", children: /* @__PURE__ */ jsx2(ActivityDetailPresentation, { variant: "page", children }) }),
|
|
451
|
-
/* @__PURE__ */ jsx2("button", { ref: closeRef, type: "button", className: "home-activity-detail__close", "aria-label": "\u5173\u95ED\u6D3B\u52A8\u8BE6\u60C5\uFF0C\u8FD4\u56DE\u9996\u9875", onClick: requestClose, children: /* @__PURE__ */ jsx2(X, { size: 21, weight: "bold", "aria-hidden": "true" }) })
|
|
540
|
+
/* @__PURE__ */ jsx2("h2", { id: titleId, className: "home-activity-detail__sr-title sr-only", children: title }),
|
|
541
|
+
transitionVisual && /* @__PURE__ */ jsx2("div", { className: "home-activity-detail__transition-visual absolute inset-0 z-20 overflow-hidden bg-warn-surface transition-opacity duration-150 group-data-[phase=open]/detail:pointer-events-none group-data-[phase=open]/detail:opacity-0 group-data-[phase=open]/detail:delay-150 [&_.mall-home__linked-order]:m-0 [&_.mall-home__linked-order]:aspect-[353/240] [&_.mall-home__linked-order]:h-auto [&_.mall-home__linked-order]:w-full [&_.mall-home__linked-order]:rounded-none [&_.mall-home__linked-order]:shadow-none", "aria-hidden": "true", children: transitionVisual }),
|
|
542
|
+
/* @__PURE__ */ jsx2("div", { className: "home-activity-detail__content absolute inset-0 z-10 min-h-0 translate-y-3 overflow-y-auto overscroll-contain bg-card pb-[env(safe-area-inset-bottom)] opacity-0 transition-[opacity,transform] duration-150 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden group-data-[phase=open]/detail:translate-y-0 group-data-[phase=open]/detail:opacity-100 group-data-[phase=open]/detail:delay-150 group-data-[motion=fade]/detail:group-data-[phase=open]/detail:delay-0 motion-reduce:transition-none", children: /* @__PURE__ */ jsx2(ActivityDetailPresentation, { variant: "page", children }) }),
|
|
543
|
+
/* @__PURE__ */ jsx2("button", { ref: closeRef, type: "button", className: "home-activity-detail__close absolute right-3.5 top-[max(14px,env(safe-area-inset-top))] z-30 grid size-10.5 place-items-center rounded-full border border-border bg-card p-0 text-foreground opacity-0 shadow-lg transition-opacity duration-150 group-data-[phase=open]/detail:opacity-100 group-data-[phase=open]/detail:delay-150 focus-visible:outline-3 focus-visible:outline-offset-2 focus-visible:outline-focus-ring motion-reduce:transition-none", "aria-label": "\u5173\u95ED\u6D3B\u52A8\u8BE6\u60C5\uFF0C\u8FD4\u56DE\u9996\u9875", onClick: requestClose, children: /* @__PURE__ */ jsx2(X, { size: 21, weight: "bold", "aria-hidden": "true" }) })
|
|
452
544
|
]
|
|
453
545
|
}
|
|
454
546
|
)
|
|
@@ -460,7 +552,6 @@ function HomeActivityDetailDialog({
|
|
|
460
552
|
}
|
|
461
553
|
|
|
462
554
|
// src/client/MallHome.tsx
|
|
463
|
-
import "./MallHome-PABCNS6D.less";
|
|
464
555
|
import { Fragment, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
465
556
|
function HomeServiceCard({
|
|
466
557
|
tone,
|
|
@@ -477,39 +568,60 @@ function HomeServiceCard({
|
|
|
477
568
|
const labelId = `mall-home-${tone}-label`;
|
|
478
569
|
const valueId = `mall-home-${tone}-value`;
|
|
479
570
|
const metaId = `mall-home-${tone}-meta`;
|
|
480
|
-
return /* @__PURE__ */ jsx3(
|
|
481
|
-
"
|
|
571
|
+
return /* @__PURE__ */ jsx3(
|
|
572
|
+
"section",
|
|
482
573
|
{
|
|
483
|
-
className:
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
className: "mall-home__service-card-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
574
|
+
className: `mall-home__service-card mall-home__service-card--${tone} relative min-w-0 overflow-hidden rounded-[16px] border-[0.5px] border-border bg-card shadow-[0_2px_16px_rgba(106,119,137,0.08)]`,
|
|
575
|
+
"aria-label": label,
|
|
576
|
+
children: /* @__PURE__ */ jsxs3(
|
|
577
|
+
"button",
|
|
578
|
+
{
|
|
579
|
+
className: "mall-home__service-card-main relative flex h-full min-h-[95px] w-full cursor-pointer flex-col gap-1.5 border-0 bg-transparent p-3 text-left text-inherit [font-family:inherit] disabled:cursor-default disabled:opacity-[0.72] max-[360px]:px-2.5",
|
|
580
|
+
type: "button",
|
|
581
|
+
disabled,
|
|
582
|
+
onClick,
|
|
583
|
+
"aria-busy": loading || void 0,
|
|
584
|
+
"aria-labelledby": `${labelId} ${valueId}`,
|
|
585
|
+
"aria-describedby": metaId,
|
|
586
|
+
children: [
|
|
587
|
+
/* @__PURE__ */ jsx3(
|
|
588
|
+
"img",
|
|
589
|
+
{
|
|
590
|
+
className: "mall-home__service-card-icon absolute top-3 right-3 z-[1] block h-8 w-[33.18px] object-contain max-[360px]:right-2.5",
|
|
591
|
+
src: iconSrc,
|
|
592
|
+
alt: "",
|
|
593
|
+
"aria-hidden": "true"
|
|
594
|
+
}
|
|
595
|
+
),
|
|
596
|
+
/* @__PURE__ */ jsx3("span", { id: labelId, className: "mall-home__service-card-eyebrow truncate pr-9 text-sm leading-5 text-foreground", children: label }),
|
|
597
|
+
/* @__PURE__ */ jsx3("span", { id: valueId, className: "mall-home__service-card-value flex min-h-[22px] min-w-0 items-center", "aria-live": "polite", children: loading ? /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
598
|
+
/* @__PURE__ */ jsx3(
|
|
599
|
+
"span",
|
|
600
|
+
{
|
|
601
|
+
className: "mall-home__service-card-skeleton mall-home__service-card-skeleton--value block h-[18px] w-[72%] shrink-0 rounded-[5px] bg-[linear-gradient(90deg,rgba(20,50,91,0.08),rgba(20,50,91,0.15),rgba(20,50,91,0.08))]",
|
|
602
|
+
"aria-hidden": "true"
|
|
603
|
+
}
|
|
604
|
+
),
|
|
605
|
+
/* @__PURE__ */ jsx3("span", { className: "sr-only", children: loadingLabel })
|
|
606
|
+
] }) : /* @__PURE__ */ jsx3(
|
|
607
|
+
"strong",
|
|
608
|
+
{
|
|
609
|
+
className: `line-clamp-2 text-base font-semibold leading-[22px] text-foreground ${primaryMonospace ? " mall-home__plate font-mono tracking-[0.02em] tabular-nums" : ""}`,
|
|
610
|
+
children: primary
|
|
611
|
+
}
|
|
612
|
+
) }),
|
|
613
|
+
/* @__PURE__ */ jsx3("span", { id: metaId, className: "mall-home__service-card-meta line-clamp-2 min-h-[17px] text-left text-xs leading-[17px] text-secondary-foreground", children: loading ? /* @__PURE__ */ jsx3(
|
|
614
|
+
"span",
|
|
615
|
+
{
|
|
616
|
+
className: "mall-home__service-card-skeleton mall-home__service-card-skeleton--meta block h-[13px] w-[88%] shrink-0 rounded-[5px] bg-[linear-gradient(90deg,rgba(20,50,91,0.08),rgba(20,50,91,0.15),rgba(20,50,91,0.08))]",
|
|
617
|
+
"aria-hidden": "true"
|
|
618
|
+
}
|
|
619
|
+
) : meta })
|
|
620
|
+
]
|
|
621
|
+
}
|
|
622
|
+
)
|
|
511
623
|
}
|
|
512
|
-
)
|
|
624
|
+
);
|
|
513
625
|
}
|
|
514
626
|
function MemberServiceCard({
|
|
515
627
|
member,
|
|
@@ -562,6 +674,13 @@ function openEnrollMiniProgram(enrollUrl) {
|
|
|
562
674
|
return false;
|
|
563
675
|
}
|
|
564
676
|
}
|
|
677
|
+
var AREA_TONE_CLASS = Object.freeze({
|
|
678
|
+
guide: Object.freeze({ icon: "bg-[#edf6ff] text-[#1679df]", focus: "focus-visible:outline-[#1679df]" }),
|
|
679
|
+
member: Object.freeze({ icon: "bg-[#fff7e7] text-[#bd7200]", focus: "focus-visible:outline-[#bd7200]" }),
|
|
680
|
+
marketing: Object.freeze({ icon: "bg-[#fff1ef] text-[#db4e45]", focus: "focus-visible:outline-[#db4e45]" }),
|
|
681
|
+
parking: Object.freeze({ icon: "bg-[#edf3fb] text-[#173e78]", focus: "focus-visible:outline-[#173e78]" })
|
|
682
|
+
});
|
|
683
|
+
var PROGRESS_MESSAGE_CLASS = "mall-home__progress-message flex h-full w-full items-center justify-center gap-2 rounded-[16px] bg-[rgba(244,252,255,0.94)] px-2.5 text-center text-xs font-bold leading-[1.2] text-[#0a6eb8]";
|
|
565
684
|
var BUSINESS_AREAS = Object.freeze([
|
|
566
685
|
Object.freeze({
|
|
567
686
|
moduleId: "shopping-guide",
|
|
@@ -632,59 +751,88 @@ function LinkedOrderStatus({
|
|
|
632
751
|
onReauthorizeLinkedOrder
|
|
633
752
|
}) {
|
|
634
753
|
if (linkedOrder.status === "loading") {
|
|
635
|
-
return /* @__PURE__ */ jsx3("div", { className:
|
|
754
|
+
return /* @__PURE__ */ jsx3("div", { className: PROGRESS_MESSAGE_CLASS, role: "status", children: "\u6B63\u5728\u540C\u6B65\u8054\u5355\u8FDB\u5EA6\u2026" });
|
|
636
755
|
}
|
|
637
756
|
if (linkedOrder.status === "unauthenticated") {
|
|
638
|
-
return /* @__PURE__ */ jsxs3("div", { className:
|
|
757
|
+
return /* @__PURE__ */ jsxs3("div", { className: PROGRESS_MESSAGE_CLASS, children: [
|
|
639
758
|
/* @__PURE__ */ jsx3("span", { children: "\u767B\u5F55\u652F\u4ED8\u5B9D\u540E\u67E5\u770B\u8054\u5355\u8FDB\u5EA6" }),
|
|
640
|
-
/* @__PURE__ */ jsx3(
|
|
759
|
+
/* @__PURE__ */ jsx3(
|
|
760
|
+
"button",
|
|
761
|
+
{
|
|
762
|
+
className: "shrink-0 cursor-pointer rounded-[10px] border-0 bg-[#137dc4] px-2 py-[3px] text-xs leading-[1.2] text-white [font-family:inherit]",
|
|
763
|
+
type: "button",
|
|
764
|
+
onClick: () => onReauthorizeLinkedOrder?.(),
|
|
765
|
+
children: "\u91CD\u65B0\u6388\u6743"
|
|
766
|
+
}
|
|
767
|
+
)
|
|
641
768
|
] });
|
|
642
769
|
}
|
|
643
770
|
if (linkedOrder.status === "forbidden") {
|
|
644
|
-
return /* @__PURE__ */ jsx3("div", { className:
|
|
771
|
+
return /* @__PURE__ */ jsx3("div", { className: PROGRESS_MESSAGE_CLASS, children: "\u5F53\u524D\u8D26\u53F7\u6682\u65F6\u65E0\u6CD5\u67E5\u770B\u8054\u5355\u8FDB\u5EA6" });
|
|
645
772
|
}
|
|
646
773
|
if (linkedOrder.status === "error") {
|
|
647
|
-
return /* @__PURE__ */ jsxs3("div", { className:
|
|
774
|
+
return /* @__PURE__ */ jsxs3("div", { className: PROGRESS_MESSAGE_CLASS, role: "alert", children: [
|
|
648
775
|
/* @__PURE__ */ jsx3("span", { children: "\u8054\u5355\u8FDB\u5EA6\u6682\u65F6\u65E0\u6CD5\u540C\u6B65" }),
|
|
649
|
-
/* @__PURE__ */ jsx3(
|
|
776
|
+
/* @__PURE__ */ jsx3(
|
|
777
|
+
"button",
|
|
778
|
+
{
|
|
779
|
+
className: "shrink-0 cursor-pointer rounded-[10px] border-0 bg-[#137dc4] px-2 py-[3px] text-xs leading-[1.2] text-white [font-family:inherit]",
|
|
780
|
+
type: "button",
|
|
781
|
+
onClick: () => onReloadLinkedOrder?.(),
|
|
782
|
+
children: "\u91CD\u65B0\u52A0\u8F7D"
|
|
783
|
+
}
|
|
784
|
+
)
|
|
650
785
|
] });
|
|
651
786
|
}
|
|
652
787
|
const progress = linkedOrder.status === "ready" ? deriveLinkedOrderProgress(linkedOrder.banner) : null;
|
|
653
788
|
if (!progress) {
|
|
654
|
-
return /* @__PURE__ */ jsx3("div", { className:
|
|
789
|
+
return /* @__PURE__ */ jsx3("div", { className: PROGRESS_MESSAGE_CLASS, children: "\u5F53\u524D\u6682\u65E0\u53EF\u67E5\u770B\u7684\u8054\u5355\u6D3B\u52A8" });
|
|
655
790
|
}
|
|
656
791
|
const nodes = progress.target <= 10 ? Array.from({ length: progress.target }, (_, index) => index + 1) : [];
|
|
657
792
|
const railFill = getLinkedOrderRailFill(progress.completed, progress.target);
|
|
658
793
|
return /* @__PURE__ */ jsxs3(
|
|
659
794
|
"div",
|
|
660
795
|
{
|
|
661
|
-
className: "mall-home__progress-content",
|
|
796
|
+
className: "mall-home__progress-content flex h-full w-full items-center justify-between",
|
|
662
797
|
"aria-label": `\u8054\u5355\u652F\u4ED8\u8FDB\u5EA6 ${progress.completed} / ${progress.target} ${progress.unit}`,
|
|
663
798
|
children: [
|
|
664
|
-
/* @__PURE__ */ jsx3("strong", { className: "mall-home__progress-label", children: "\u8054\u5355\u8FDB\u5EA6" }),
|
|
665
|
-
/* @__PURE__ */ jsxs3(
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
"
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
{
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
799
|
+
/* @__PURE__ */ jsx3("strong", { className: "mall-home__progress-label shrink-0 text-xs font-extrabold leading-none whitespace-nowrap text-[#0a6eb8] [text-shadow:0_1px_0_rgba(255,255,255,0.72)]", children: "\u8054\u5355\u8FDB\u5EA6" }),
|
|
800
|
+
/* @__PURE__ */ jsxs3(
|
|
801
|
+
"div",
|
|
802
|
+
{
|
|
803
|
+
className: `mall-home__nodes relative mx-2.5 flex min-w-0 flex-1 justify-between ${nodes.length === 0 ? " mall-home__nodes--summary h-[22px] justify-center" : ""}`,
|
|
804
|
+
"aria-hidden": "true",
|
|
805
|
+
children: [
|
|
806
|
+
/* @__PURE__ */ jsx3("span", { className: "mall-home__rail absolute top-1/2 right-2 left-2 h-[3px] -translate-y-1/2 rounded-[2px] bg-[rgba(22,126,194,0.3)]" }),
|
|
807
|
+
/* @__PURE__ */ jsx3(
|
|
808
|
+
"span",
|
|
809
|
+
{
|
|
810
|
+
className: "mall-home__rail-fill absolute top-1/2 left-2 z-[1] h-[3px] max-w-[calc(100%_-_16px)] -translate-y-1/2 rounded-[2px] bg-[#087dd0] shadow-[0_0_6px_rgba(0,104,190,0.34)]",
|
|
811
|
+
style: { width: railFill }
|
|
812
|
+
}
|
|
813
|
+
),
|
|
814
|
+
nodes.length === 0 && /* @__PURE__ */ jsxs3("span", { className: "mall-home__nodes-summary relative z-[2] rounded-[9px] bg-[rgba(234,248,255,0.94)] px-[7px] py-0.5 text-xs font-bold leading-[1.2] text-[#0a6eb8]", children: [
|
|
815
|
+
"\u5DF2\u5B8C\u6210 ",
|
|
816
|
+
progress.completed,
|
|
817
|
+
" ",
|
|
818
|
+
progress.unit
|
|
819
|
+
] }),
|
|
820
|
+
nodes.map((node) => {
|
|
821
|
+
const completed = node <= progress.completed;
|
|
822
|
+
const milestone = node === progress.target;
|
|
823
|
+
return /* @__PURE__ */ jsx3(
|
|
824
|
+
"span",
|
|
825
|
+
{
|
|
826
|
+
className: `mall-home__node relative z-[2] flex size-[22px] shrink-0 items-center justify-center rounded-full border-[1.5px] border-[#1682cb] bg-[#eaf8ff] text-xs font-extrabold leading-none text-[#0d6fae] shadow-[0_2px_5px_rgba(0,83,151,0.22)] ${completed ? " mall-home__node--completed border-white bg-[#91dcf2] text-[#0068e8]" : milestone ? " mall-home__node--milestone border-[#ffdc6a] bg-[#1475b6] text-white" : ""}`,
|
|
827
|
+
children: completed ? /* @__PURE__ */ jsx3(Check, { size: 15, weight: "bold" }) : milestone ? /* @__PURE__ */ jsx3(LockSimple, { size: 13, weight: "bold" }) : /* @__PURE__ */ jsx3("span", { children: node })
|
|
828
|
+
},
|
|
829
|
+
node
|
|
830
|
+
);
|
|
831
|
+
})
|
|
832
|
+
]
|
|
833
|
+
}
|
|
834
|
+
),
|
|
835
|
+
/* @__PURE__ */ jsxs3("strong", { className: "mall-home__progress-value shrink-0 text-xs font-extrabold leading-none whitespace-nowrap text-[#0a6eb8] [text-shadow:0_1px_0_rgba(255,255,255,0.72)]", children: [
|
|
688
836
|
progress.completed,
|
|
689
837
|
"/",
|
|
690
838
|
progress.target
|
|
@@ -786,11 +934,11 @@ function MallHome({
|
|
|
786
934
|
/* @__PURE__ */ jsx3(
|
|
787
935
|
"span",
|
|
788
936
|
{
|
|
789
|
-
className: "mall-home__linked-order-poster",
|
|
937
|
+
className: "mall-home__linked-order-poster absolute top-0 left-1/2 block h-full w-full -translate-x-1/2 bg-cover bg-center bg-[image:var(--tbox-asset-home-poster-stage,linear-gradient(135deg,#eaf3ff,#d7e7fd))] max-[392px]:bg-[image:var(--tbox-asset-home-poster-compact,linear-gradient(135deg,#eaf3ff,#d7e7fd))]",
|
|
790
938
|
...canOpenActivity ? { "aria-hidden": true } : { role: "img", "aria-label": "\u53C2\u4E0E\u8054\u5355\uFF0C\u78B0\u51FA\u60CA\u559C" }
|
|
791
939
|
}
|
|
792
940
|
),
|
|
793
|
-
/* @__PURE__ */ jsx3("div", { className: "mall-home__progress", children: /* @__PURE__ */ jsx3(
|
|
941
|
+
/* @__PURE__ */ jsx3("div", { className: "mall-home__progress absolute bottom-[18px] left-1/2 z-[2] h-8 w-[300px] -translate-x-1/2 max-[392px]:bottom-[7%] max-[392px]:h-[13.33%] max-[392px]:w-[85%]", children: /* @__PURE__ */ jsx3(
|
|
794
942
|
LinkedOrderStatus,
|
|
795
943
|
{
|
|
796
944
|
linkedOrder,
|
|
@@ -809,43 +957,50 @@ function MallHome({
|
|
|
809
957
|
setActivityDetail({
|
|
810
958
|
card: activityCard,
|
|
811
959
|
renderDetail: renderActivityDetail,
|
|
812
|
-
transitionVisual: /* @__PURE__ */ jsx3("section", { className: "mall-home__linked-order", "aria-hidden": "true", children: linkedOrderVisual }),
|
|
960
|
+
transitionVisual: /* @__PURE__ */ jsx3("section", { className: "mall-home__linked-order relative mx-page h-60 overflow-hidden rounded-[14px] bg-[#fff8e9] leading-[0] shadow-[0_10px_24px_rgba(47,88,121,0.1)] max-[392px]:aspect-[353/240] max-[392px]:h-auto", "aria-hidden": "true", children: linkedOrderVisual }),
|
|
813
961
|
origin: { top: rect.top, left: rect.left, width: rect.width, height: rect.height }
|
|
814
962
|
});
|
|
815
963
|
}, [activityCard, activityDetail, linkedOrderVisual, renderActivityDetail]);
|
|
816
|
-
return /* @__PURE__ */ jsxs3("main", { className: "mall-home", "aria-label": "\u5546\u573A\u667A\u80FD\u670D\u52A1\u9996\u9875", children: [
|
|
817
|
-
/* @__PURE__ */ jsxs3("header", { className: "mall-home__welcome", children: [
|
|
964
|
+
return /* @__PURE__ */ jsxs3("main", { className: "mall-home @container/mall-home w-full pt-2 pb-8.5 text-foreground", "aria-label": "\u5546\u573A\u667A\u80FD\u670D\u52A1\u9996\u9875", children: [
|
|
965
|
+
/* @__PURE__ */ jsxs3("header", { className: "mall-home__welcome px-page pb-5.5 pt-1", children: [
|
|
818
966
|
/* @__PURE__ */ jsx3(
|
|
819
967
|
"img",
|
|
820
968
|
{
|
|
821
|
-
className: "mall-home__welcome-sparkle",
|
|
969
|
+
className: "mall-home__welcome-sparkle block h-[25.5px] w-9 object-contain",
|
|
822
970
|
src: welcomeSparkle,
|
|
823
971
|
alt: "",
|
|
824
972
|
"aria-hidden": "true"
|
|
825
973
|
}
|
|
826
974
|
),
|
|
827
|
-
/* @__PURE__ */ jsxs3("h1", { children: [
|
|
975
|
+
/* @__PURE__ */ jsxs3("h1", { className: "mt-1 text-xl font-bold leading-7 tracking-tight text-foreground", children: [
|
|
828
976
|
"\u6B22\u8FCE\u6765\u5230",
|
|
829
977
|
displayMallName
|
|
830
978
|
] }),
|
|
831
|
-
/* @__PURE__ */ jsx3("p", { children: "\u6211\u53EF\u4EE5\u5E2E\u4F60\u770B\u8054\u5355\u8FDB\u5EA6\u3001\u67E5\u505C\u8F66\u3001\u770B\u4F1A\u5458\u4E0E\u6D3B\u52A8\u670D\u52A1" })
|
|
832
|
-
] }),
|
|
833
|
-
/* @__PURE__ */ jsxs3("section", { className: "mall-home__linked-order", "aria-label": "\u78B0\u4E00\u4E0B\u8054\u5355\u6D3B\u52A8", children: [
|
|
834
|
-
linkedOrderVisual,
|
|
835
|
-
canOpenActivity && activityCard && /* @__PURE__ */ jsx3(
|
|
836
|
-
"button",
|
|
837
|
-
{
|
|
838
|
-
ref: activityTriggerRef,
|
|
839
|
-
type: "button",
|
|
840
|
-
className: "mall-home__linked-order-trigger",
|
|
841
|
-
"aria-label": `\u67E5\u770B${linkedOrder.status === "ready" ? linkedOrder.banner.title || "\u8054\u5355\u6D3B\u52A8" : "\u8054\u5355\u6D3B\u52A8"}\u8BE6\u60C5`,
|
|
842
|
-
"aria-haspopup": "dialog",
|
|
843
|
-
"aria-expanded": Boolean(activityDetail),
|
|
844
|
-
"aria-controls": getHomeActivityDialogId(activityDetail?.card.id ?? activityCard.id),
|
|
845
|
-
onClick: openActivityDetail
|
|
846
|
-
}
|
|
847
|
-
)
|
|
979
|
+
/* @__PURE__ */ jsx3("p", { className: "mt-1 text-xs leading-4.75 text-secondary-foreground", children: "\u6211\u53EF\u4EE5\u5E2E\u4F60\u770B\u8054\u5355\u8FDB\u5EA6\u3001\u67E5\u505C\u8F66\u3001\u770B\u4F1A\u5458\u4E0E\u6D3B\u52A8\u670D\u52A1" })
|
|
848
980
|
] }),
|
|
981
|
+
/* @__PURE__ */ jsxs3(
|
|
982
|
+
"section",
|
|
983
|
+
{
|
|
984
|
+
className: "mall-home__linked-order relative mx-page h-60 overflow-hidden rounded-[14px] bg-[#fff8e9] leading-[0] shadow-[0_10px_24px_rgba(47,88,121,0.1)] max-[392px]:aspect-[353/240] max-[392px]:h-auto",
|
|
985
|
+
"aria-label": "\u78B0\u4E00\u4E0B\u8054\u5355\u6D3B\u52A8",
|
|
986
|
+
children: [
|
|
987
|
+
linkedOrderVisual,
|
|
988
|
+
canOpenActivity && activityCard && /* @__PURE__ */ jsx3(
|
|
989
|
+
"button",
|
|
990
|
+
{
|
|
991
|
+
ref: activityTriggerRef,
|
|
992
|
+
type: "button",
|
|
993
|
+
className: "mall-home__linked-order-trigger absolute inset-0 z-[3] h-full w-full cursor-pointer rounded-[inherit] border-0 bg-transparent p-0 outline-none focus-visible:shadow-[inset_0_0_0_3px_rgba(82,126,56,0.5)]",
|
|
994
|
+
"aria-label": `\u67E5\u770B${linkedOrder.status === "ready" ? linkedOrder.banner.title || "\u8054\u5355\u6D3B\u52A8" : "\u8054\u5355\u6D3B\u52A8"}\u8BE6\u60C5`,
|
|
995
|
+
"aria-haspopup": "dialog",
|
|
996
|
+
"aria-expanded": Boolean(activityDetail),
|
|
997
|
+
"aria-controls": getHomeActivityDialogId(activityDetail?.card.id ?? activityCard.id),
|
|
998
|
+
onClick: openActivityDetail
|
|
999
|
+
}
|
|
1000
|
+
)
|
|
1001
|
+
]
|
|
1002
|
+
}
|
|
1003
|
+
),
|
|
849
1004
|
activityDetail && /* @__PURE__ */ jsx3(
|
|
850
1005
|
HomeActivityDetailDialog,
|
|
851
1006
|
{
|
|
@@ -857,7 +1012,7 @@ function MallHome({
|
|
|
857
1012
|
children: activityDetail.renderDetail(activityDetail.card)
|
|
858
1013
|
}
|
|
859
1014
|
),
|
|
860
|
-
/* @__PURE__ */ jsxs3("div", { className: "mall-home__service-pair", children: [
|
|
1015
|
+
/* @__PURE__ */ jsxs3("div", { className: "mall-home__service-pair mx-page mt-4 grid grid-cols-2 items-stretch gap-3", children: [
|
|
861
1016
|
/* @__PURE__ */ jsx3(
|
|
862
1017
|
MemberServiceCard,
|
|
863
1018
|
{
|
|
@@ -881,42 +1036,49 @@ function MallHome({
|
|
|
881
1036
|
}
|
|
882
1037
|
)
|
|
883
1038
|
] }),
|
|
884
|
-
showDevServices && /* @__PURE__ */ jsxs3("section", { className: "mall-home__services", "aria-labelledby": "mall-home-services-title", children: [
|
|
885
|
-
/* @__PURE__ */ jsx3("header", { className: "mall-home__section-header", children: /* @__PURE__ */ jsxs3("div", { children: [
|
|
886
|
-
/* @__PURE__ */ jsx3("h2", { id: "mall-home-services-title", children: "\u5E38\u7528\u670D\u52A1" }),
|
|
887
|
-
/* @__PURE__ */ jsx3("span", { className: "mall-home__section-kicker", children: "\u4EE5\u4E0B\u90E8\u5206\u4E3A\u5F00\u53D1\u6D4B\u8BD5\u5165\u53E3\uFF0C\u4E0D\u5BF9\u6B63\u5F0F\u7528\u6237\u900F\u51FA" })
|
|
1039
|
+
showDevServices && /* @__PURE__ */ jsxs3("section", { className: "mall-home__services mx-page mt-5.5", "aria-labelledby": "mall-home-services-title", children: [
|
|
1040
|
+
/* @__PURE__ */ jsx3("header", { className: "mall-home__section-header mb-3 flex items-end justify-between gap-2", children: /* @__PURE__ */ jsxs3("div", { children: [
|
|
1041
|
+
/* @__PURE__ */ jsx3("h2", { id: "mall-home-services-title", className: "text-lg font-bold leading-6 text-foreground", children: "\u5E38\u7528\u670D\u52A1" }),
|
|
1042
|
+
/* @__PURE__ */ jsx3("span", { className: "mall-home__section-kicker mt-0.5 block text-xs leading-4 text-secondary-foreground", children: "\u4EE5\u4E0B\u90E8\u5206\u4E3A\u5F00\u53D1\u6D4B\u8BD5\u5165\u53E3\uFF0C\u4E0D\u5BF9\u6B63\u5F0F\u7528\u6237\u900F\u51FA" })
|
|
888
1043
|
] }) }),
|
|
889
|
-
/* @__PURE__ */ jsx3("div", { className: "mall-home__areas", children: BUSINESS_AREAS.map((area) => {
|
|
1044
|
+
/* @__PURE__ */ jsx3("div", { className: "mall-home__areas grid grid-cols-1 gap-3 @min-[820px]/mall-home:grid-cols-2", children: BUSINESS_AREAS.map((area) => {
|
|
890
1045
|
const AreaIcon = area.icon;
|
|
891
1046
|
return /* @__PURE__ */ jsxs3(
|
|
892
1047
|
"section",
|
|
893
1048
|
{
|
|
894
|
-
className: `mall-home__area mall-home__area--${area.tone}`,
|
|
1049
|
+
className: `mall-home__area mall-home__area--${area.tone} min-w-0 rounded-[16px] border-[0.5px] border-border bg-card p-3 shadow-[0_2px_16px_rgba(106,119,137,0.08)]`,
|
|
895
1050
|
"aria-labelledby": `mall-home-${area.moduleId}`,
|
|
896
1051
|
children: [
|
|
897
|
-
/* @__PURE__ */ jsxs3("header", { className: "mall-home__area-header", children: [
|
|
898
|
-
/* @__PURE__ */ jsxs3("span", { className: "mall-home__area-copy", children: [
|
|
899
|
-
/* @__PURE__ */ jsx3("h3", { id: `mall-home-${area.moduleId}`, children: area.title }),
|
|
900
|
-
/* @__PURE__ */ jsx3("p", { children: area.description })
|
|
1052
|
+
/* @__PURE__ */ jsxs3("header", { className: "mall-home__area-header mb-3 flex items-center justify-between gap-2", children: [
|
|
1053
|
+
/* @__PURE__ */ jsxs3("span", { className: "mall-home__area-copy min-w-0", children: [
|
|
1054
|
+
/* @__PURE__ */ jsx3("h3", { id: `mall-home-${area.moduleId}`, className: "text-sm font-semibold leading-5 text-foreground", children: area.title }),
|
|
1055
|
+
/* @__PURE__ */ jsx3("p", { className: "text-xs leading-[17px] text-secondary-foreground", children: area.description })
|
|
901
1056
|
] }),
|
|
902
|
-
/* @__PURE__ */ jsx3(
|
|
1057
|
+
/* @__PURE__ */ jsx3(
|
|
1058
|
+
"span",
|
|
1059
|
+
{
|
|
1060
|
+
className: `mall-home__area-icon flex size-8 shrink-0 items-center justify-center rounded-[10px] ${AREA_TONE_CLASS[area.tone].icon}`,
|
|
1061
|
+
"aria-hidden": "true",
|
|
1062
|
+
children: /* @__PURE__ */ jsx3(AreaIcon, { size: 22, weight: "regular" })
|
|
1063
|
+
}
|
|
1064
|
+
)
|
|
903
1065
|
] }),
|
|
904
|
-
/* @__PURE__ */ jsx3("div", { className: "mall-home__action-grid", children: area.actions.map((action) => {
|
|
1066
|
+
/* @__PURE__ */ jsx3("div", { className: "mall-home__action-grid grid grid-cols-[repeat(auto-fit,minmax(min(150px,100%),1fr))] gap-2", children: area.actions.map((action) => {
|
|
905
1067
|
return /* @__PURE__ */ jsxs3(
|
|
906
1068
|
"button",
|
|
907
1069
|
{
|
|
908
|
-
className:
|
|
1070
|
+
className: `mall-home__action grid min-h-[72px] w-full min-w-0 cursor-pointer grid-cols-[minmax(0,1fr)_12px] items-center gap-2 rounded-[14px] border-[0.5px] border-border bg-card p-2.5 text-left text-foreground shadow-[0_2px_12px_rgba(106,119,137,0.05)] [font-family:inherit] active:scale-[0.99] active:bg-[rgba(11,15,23,0.02)] focus-visible:outline-2 focus-visible:outline-offset-2 ${AREA_TONE_CLASS[area.tone].focus}`,
|
|
909
1071
|
type: "button",
|
|
910
1072
|
onClick: () => {
|
|
911
1073
|
if (action.enroll && openEnrollMiniProgram(enrollUrl)) return;
|
|
912
1074
|
onSend(action.query);
|
|
913
1075
|
},
|
|
914
1076
|
children: [
|
|
915
|
-
/* @__PURE__ */ jsxs3("span", { className: "mall-home__action-copy", children: [
|
|
916
|
-
/* @__PURE__ */ jsx3("strong", { children: action.label }),
|
|
917
|
-
/* @__PURE__ */ jsx3("small", { children: action.description })
|
|
1077
|
+
/* @__PURE__ */ jsxs3("span", { className: "mall-home__action-copy min-w-0", children: [
|
|
1078
|
+
/* @__PURE__ */ jsx3("strong", { className: "block text-sm font-semibold leading-[18px] [overflow-wrap:anywhere]", children: action.label }),
|
|
1079
|
+
/* @__PURE__ */ jsx3("small", { className: "mt-[3px] block text-xs leading-4 text-secondary-foreground [overflow-wrap:anywhere]", children: action.description })
|
|
918
1080
|
] }),
|
|
919
|
-
/* @__PURE__ */ jsx3(CaretRight, { size: 14, weight: "bold", "aria-hidden": "true" })
|
|
1081
|
+
/* @__PURE__ */ jsx3(CaretRight, { className: "shrink-0 text-secondary-foreground", size: 14, weight: "bold", "aria-hidden": "true" })
|
|
920
1082
|
]
|
|
921
1083
|
},
|
|
922
1084
|
action.label
|
|
@@ -935,7 +1097,6 @@ function MallHome({
|
|
|
935
1097
|
import { useEffect as useEffect3, useRef as useRef3 } from "react";
|
|
936
1098
|
import { createPortal as createPortal2 } from "react-dom";
|
|
937
1099
|
import { X as X2 } from "@phosphor-icons/react";
|
|
938
|
-
import "./index-ELJ55M66.less";
|
|
939
1100
|
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
940
1101
|
var FOCUSABLE_SELECTOR2 = [
|
|
941
1102
|
"button:not([disabled])",
|
|
@@ -1037,37 +1198,37 @@ function MemberGateSheet({
|
|
|
1037
1198
|
const confirmLabel = busy ? "\u56DE\u7B54\u751F\u6210\u4E2D\u2026" : phase === "opening" ? "\u6B63\u5728\u6253\u5F00\u5546\u573A\u5C0F\u7A0B\u5E8F\u2026" : CONFIRM_LABEL[context.kind];
|
|
1038
1199
|
const confirmDisabled = busy || phase !== "idle";
|
|
1039
1200
|
return createPortal2(
|
|
1040
|
-
/* @__PURE__ */ jsxs4("div", { className: "member-login-sheet", role: "presentation", children: [
|
|
1041
|
-
/* @__PURE__ */ jsx4("div", { className: "member-login-sheet__mask", "aria-hidden": "true", onClick: () => onDismiss() }),
|
|
1201
|
+
/* @__PURE__ */ jsxs4("div", { className: "member-login-sheet fixed inset-0 z-[1100]", role: "presentation", children: [
|
|
1202
|
+
/* @__PURE__ */ jsx4("div", { className: "member-login-sheet__mask absolute inset-0 bg-scrim animate-[member-login-mask-in_180ms_ease-out_both] motion-reduce:animate-none", "aria-hidden": "true", onClick: () => onDismiss() }),
|
|
1042
1203
|
/* @__PURE__ */ jsxs4(
|
|
1043
1204
|
"section",
|
|
1044
1205
|
{
|
|
1045
1206
|
ref: sheetRef,
|
|
1046
|
-
className: "member-login-sheet__panel",
|
|
1207
|
+
className: "member-login-sheet__panel absolute inset-x-0 bottom-0 mx-auto flex h-[58dvh] max-h-[calc(100dvh-env(safe-area-inset-top)-12px)] min-h-0 w-full max-w-[560px] overflow-hidden rounded-t-[28px] bg-card shadow-[0_-14px_44px_rgba(35,47,28,0.16)] animate-[member-login-sheet-in_260ms_cubic-bezier(0.22,0.72,0.24,1)_both] [@media(max-height:620px)]:h-[64dvh] landscape:[@media(max-height:500px)]:h-[88dvh] motion-reduce:animate-none",
|
|
1047
1208
|
role: "dialog",
|
|
1048
1209
|
"aria-modal": "true",
|
|
1049
1210
|
"aria-labelledby": titleId,
|
|
1050
1211
|
"aria-describedby": descriptionId,
|
|
1051
1212
|
children: [
|
|
1052
|
-
/* @__PURE__ */ jsx4("div", { className: "member-login-sheet__handle", "aria-hidden": "true" }),
|
|
1213
|
+
/* @__PURE__ */ jsx4("div", { className: "member-login-sheet__handle absolute left-1/2 top-2.25 z-10 h-1 w-9.5 -translate-x-1/2 rounded-full bg-neutral-soft", "aria-hidden": "true" }),
|
|
1053
1214
|
/* @__PURE__ */ jsx4(
|
|
1054
1215
|
"button",
|
|
1055
1216
|
{
|
|
1056
1217
|
ref: closeRef,
|
|
1057
1218
|
type: "button",
|
|
1058
|
-
className: "member-login-sheet__close",
|
|
1219
|
+
className: "member-login-sheet__close absolute right-4.5 top-4.5 z-20 grid size-9 place-items-center rounded-full border border-border bg-card p-0 text-foreground shadow-md outline-none focus-visible:ring-3 focus-visible:ring-focus-ring",
|
|
1059
1220
|
"aria-label": "\u5173\u95ED\u767B\u5F55\u63D0\u793A",
|
|
1060
1221
|
onClick: () => onDismiss(),
|
|
1061
1222
|
children: /* @__PURE__ */ jsx4(X2, { size: 18, weight: "bold", "aria-hidden": "true" })
|
|
1062
1223
|
}
|
|
1063
1224
|
),
|
|
1064
|
-
/* @__PURE__ */ jsxs4("div", { className: "member-login-sheet__scroll", children: [
|
|
1065
|
-
/* @__PURE__ */ jsx4("div", { className: "member-login-sheet__hero", "aria-hidden": "true" }),
|
|
1066
|
-
/* @__PURE__ */ jsx4("div", { className: "member-login-sheet__tear", "aria-hidden": "true" }),
|
|
1067
|
-
/* @__PURE__ */ jsxs4("div", { className: "member-login-sheet__content", children: [
|
|
1225
|
+
/* @__PURE__ */ jsxs4("div", { className: "member-login-sheet__scroll flex min-h-0 flex-1 flex-col overflow-y-auto overscroll-contain pb-[env(safe-area-inset-bottom)] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", children: [
|
|
1226
|
+
/* @__PURE__ */ jsx4("div", { className: "member-login-sheet__hero relative min-h-40 w-full flex-[1_1_190px] overflow-hidden member-hero [@media(max-height:620px)]:min-h-29 [@media(max-height:620px)]:flex-[0_0_116px]", "aria-hidden": "true" }),
|
|
1227
|
+
/* @__PURE__ */ jsx4("div", { className: "member-login-sheet__tear relative z-10 -mt-3.75 h-4 w-full shrink-0 bg-card [clip-path:polygon(0_70%,8%_28%,15%_72%,24%_22%,33%_66%,43%_18%,53%_72%,63%_25%,72%_68%,82%_20%,91%_64%,100%_32%,100%_100%,0_100%)]", "aria-hidden": "true" }),
|
|
1228
|
+
/* @__PURE__ */ jsxs4("div", { className: "member-login-sheet__content shrink-0 px-3 pb-[calc(14px+env(safe-area-inset-bottom))] pt-3 text-center [@media(max-height:620px)]:pt-2 [&_h2]:m-0 [&_h2]:text-xl [&_h2]:font-bold [&_h2]:leading-tight [&_h2]:text-foreground", children: [
|
|
1068
1229
|
/* @__PURE__ */ jsx4("h2", { id: titleId, children: heroTitle }),
|
|
1069
|
-
/* @__PURE__ */ jsx4("p", { id: descriptionId, className: "member-login-sheet__description", children: description }),
|
|
1070
|
-
isTerminal ? /* @__PURE__ */ jsxs4("div", { className: "member-login-sheet__status-actions", children: [
|
|
1230
|
+
/* @__PURE__ */ jsx4("p", { id: descriptionId, className: "member-login-sheet__description mt-1.5 text-sm leading-normal text-muted-foreground", children: description }),
|
|
1231
|
+
isTerminal ? /* @__PURE__ */ jsxs4("div", { className: "member-login-sheet__status-actions mx-auto mt-2 grid w-[min(100%,292px)] grid-cols-2 gap-2.5 [&_button]:min-h-11 [&_button]:rounded-xl [&_button]:border-0 [&_button]:bg-muted [&_button]:px-2.5 [&_button]:text-sm [&_button]:font-semibold [&_button]:text-secondary-foreground [&_button:last-child]:bg-member-accent [&_button:last-child]:text-white [&_button:disabled]:cursor-not-allowed [&_button:disabled]:opacity-68 [&_button:focus-visible]:ring-3 [&_button:focus-visible]:ring-focus-ring [&_button:active:not(:disabled)]:scale-98", children: [
|
|
1071
1232
|
/* @__PURE__ */ jsx4("button", { type: "button", onClick: () => onDismiss(), children: "\u6682\u4E0D" }),
|
|
1072
1233
|
/* @__PURE__ */ jsx4(
|
|
1073
1234
|
"button",
|
|
@@ -1084,7 +1245,7 @@ function MemberGateSheet({
|
|
|
1084
1245
|
{
|
|
1085
1246
|
ref: confirmButtonRef,
|
|
1086
1247
|
type: "button",
|
|
1087
|
-
className: "member-login-sheet__login",
|
|
1248
|
+
className: "member-login-sheet__login mx-auto mt-2 flex min-h-11 w-[min(100%,292px)] items-center justify-center rounded-xl border-0 bg-member-accent px-4 text-sm font-semibold leading-none text-white shadow-md transition active:scale-98 disabled:cursor-not-allowed disabled:opacity-68",
|
|
1088
1249
|
disabled: confirmDisabled,
|
|
1089
1250
|
onClick: performConfirm,
|
|
1090
1251
|
children: phase === "syncing" ? "\u8EAB\u4EFD\u540C\u6B65\u4E2D\u2026" : confirmLabel
|
|
@@ -1370,7 +1531,6 @@ async function directLoginGate() {
|
|
|
1370
1531
|
}
|
|
1371
1532
|
|
|
1372
1533
|
// src/client/home-slot.tsx
|
|
1373
|
-
import "./home-slot-WBZ6ONDP.less";
|
|
1374
1534
|
import { Fragment as Fragment2, jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1375
1535
|
var PARKING_FEE_QUERY = "\u67E5\u8BE2\u505C\u8F66\u8D39";
|
|
1376
1536
|
var PARKING_VEHICLE_QUERY = "\u6211\u7684\u8F66\u8F86";
|
|
@@ -1674,7 +1834,7 @@ var BumpInActivityChatCard = (props) => {
|
|
|
1674
1834
|
{
|
|
1675
1835
|
ref: triggerRef,
|
|
1676
1836
|
type: "button",
|
|
1677
|
-
className: "activity-detail-presentation__detail-trigger",
|
|
1837
|
+
className: "activity-detail-presentation__detail-trigger mt-2 mb-0 flex min-h-8 w-full cursor-pointer items-center justify-center gap-0.5 rounded-none border-0 bg-transparent p-0 text-xs font-normal leading-[18px] text-[#686d69] shadow-none [font-family:inherit] [&_svg]:shrink-0 active:opacity-[0.68] focus-visible:rounded-[5px] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[rgba(9,107,250,0.28)]",
|
|
1678
1838
|
"aria-haspopup": "dialog",
|
|
1679
1839
|
"aria-expanded": detailOrigin !== null,
|
|
1680
1840
|
"aria-controls": getHomeActivityDialogId(cardId),
|