@tbox.cn/app-module-mall-core 0.2.0 → 0.3.0
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/README.md +12 -3
- package/dist/HomeActivityDetailDialog-2GJFYSMZ.less +178 -0
- package/dist/MallHome-PABCNS6D.less +623 -0
- package/dist/chunk-LJJTKND6.js +722 -0
- package/dist/chunk-VA2ROMX7.js +1723 -0
- package/dist/client/index.d.ts +22 -0
- package/dist/client/index.js +8 -0
- package/dist/home-slot-WBZ6ONDP.less +4 -0
- package/dist/index-ELJ55M66.less +256 -0
- package/dist/index-U5YRUY7P.less +352 -0
- package/dist/index.d.ts +8 -2
- package/dist/index.js +7 -1
- package/dist/member-service-icon-SIGSRKE3.svg +1 -0
- package/dist/parking-service-icon-3A2TGUUM.svg +1 -0
- package/dist/server/index.d.ts +348 -10
- package/dist/server/index.js +3 -1
- package/dist/welcome-sparkle-transparent-v07-75RL4QUU.png +0 -0
- package/package.json +25 -6
- package/src/client/HomeActivityDetailDialog.less +178 -0
- package/src/client/HomeActivityDetailDialog.tsx +256 -0
- package/src/client/MallHome.less +623 -0
- package/src/client/MallHome.tsx +667 -0
- package/src/client/assets/home/member-service-icon.svg +1 -0
- package/src/client/assets/home/parking-service-icon.svg +1 -0
- package/src/client/assets/home/welcome-sparkle-transparent-v07.png +0 -0
- package/src/client/assets.d.ts +13 -0
- package/src/client/cards/mall-home/index.tsx +32 -0
- package/src/client/cards/overrides/BumpInActivityChatCard.tsx +81 -0
- package/src/client/components/ActivityDetailPresentation/index.less +352 -0
- package/src/client/components/ActivityDetailPresentation/index.tsx +31 -0
- package/src/client/components/MemberGateSheet/index.less +256 -0
- package/src/client/components/MemberGateSheet/index.tsx +211 -0
- package/src/client/components/MemberGateSheet/model.ts +42 -0
- package/src/client/home-runtime.ts +493 -0
- package/src/client/home-slot.less +4 -0
- package/src/client/home-slot.tsx +345 -0
- package/src/client/index.ts +32 -0
- package/src/client/member-gate.ts +337 -0
- package/src/client/mock-direct-gate.ts +46 -0
- package/src/index.ts +2 -2
- package/src/server/assembly.ts +4 -4
- package/src/server/cards/mall-home/meta.ts +61 -0
- package/src/server/cards/mall-home/schema.ts +73 -0
- package/src/server/home-config.ts +36 -0
- package/src/server/index.ts +46 -5
- package/src/server/linked-panel-member.ts +65 -0
- package/src/server/linked-panel-parking.ts +124 -0
- package/src/server/mall-info-cache.ts +1 -1
- package/src/server/mall-info-tool.ts +2 -2
- package/src/server/module-ports.ts +67 -0
- package/src/server/pre-tools.ts +2 -2
- package/src/server/routes.ts +282 -0
- package/src/vite-env.d.ts +1 -0
- package/tbox.module.json +36 -15
- package/tests/BumpInActivityChatCard.test.tsx +214 -0
- package/tests/MallHome.test.tsx +481 -0
- package/tests/MemberGateSheet-model.test.ts +65 -0
- package/tests/MemberGateSheet.test.tsx +173 -0
- package/tests/assembly.test.ts +3 -3
- package/tests/cache-service.test.ts +1 -1
- package/tests/home-config.test.ts +43 -0
- package/tests/home-runtime.test.ts +545 -0
- package/tests/home-slot.test.tsx +718 -0
- package/tests/linked-panel-member.test.ts +78 -0
- package/tests/linked-panel-parking-presence.test.ts +117 -0
- package/tests/linked-panel-privacy.test.ts +79 -0
- package/tests/mall-home-preview.test.tsx +71 -0
- package/tests/mall-info-cache.test.ts +1 -1
- package/tests/mall-info-tool.test.ts +2 -2
- package/tests/member-gate.test.ts +384 -0
- package/tests/mock-direct-gate.test.ts +137 -0
- package/tests/module-ports.test.ts +18 -0
- package/tests/route-paths.test.ts +70 -0
- package/tests/usePullDownHistory.test.tsx +191 -0
- package/tsconfig.json +1 -0
- package/tsup.config.ts +22 -1
- package/dist/chunk-FBL6MHK5.js +0 -267
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 首页预览卡组件(dev 预览专用;chat 视图零出场——无工具出卡路径)。
|
|
3
|
+
*
|
|
4
|
+
* 适配器三行赋值 = 编译期漂移锁:schema(推断类型)⊆ MallHome 生产 props——
|
|
5
|
+
* 生产字段改名/删除当场编译错;新增可选字段自动流过;新增状态变体需显式扩
|
|
6
|
+
* schema 才可预览(样本策展的期望语义,见 meta.ts)。
|
|
7
|
+
*/
|
|
8
|
+
import type { MemberLoadState, ParkingLoadState, LinkedOrderLoadState } from '../../home-runtime.js';
|
|
9
|
+
import { MallHome } from '../../MallHome.js';
|
|
10
|
+
import type { MallHomePreviewData } from '../../../server/cards/mall-home/schema.js';
|
|
11
|
+
|
|
12
|
+
export function MallHomePreviewCard({ data }: {
|
|
13
|
+
data: MallHomePreviewData;
|
|
14
|
+
cardId: string;
|
|
15
|
+
isHistory: boolean;
|
|
16
|
+
}) {
|
|
17
|
+
const member: MemberLoadState = data.member;
|
|
18
|
+
const parking: ParkingLoadState = data.parking;
|
|
19
|
+
const linkedOrder: LinkedOrderLoadState = data.linkedOrder;
|
|
20
|
+
return (
|
|
21
|
+
<MallHome
|
|
22
|
+
mallName={data.mallName}
|
|
23
|
+
linkedOrder={linkedOrder}
|
|
24
|
+
member={member}
|
|
25
|
+
parking={parking}
|
|
26
|
+
showDevServices={data.showDevServices}
|
|
27
|
+
onSend={() => undefined}
|
|
28
|
+
/>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export default MallHomePreviewCard;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 联单详情的聊天摘要容器:与首页全屏详情共享正文主题,
|
|
3
|
+
* 摘要隐藏规则,通过本地只读入口复用全屏详情 Dialog。
|
|
4
|
+
*/
|
|
5
|
+
import { useCallback, useRef, useState } from 'react';
|
|
6
|
+
import { CaretRight } from '@phosphor-icons/react';
|
|
7
|
+
import type { CardComponent } from '@tbox.cn/app-contracts';
|
|
8
|
+
import { ActivityDetailPresentation } from '../../components/ActivityDetailPresentation';
|
|
9
|
+
import {
|
|
10
|
+
getHomeActivityDialogId,
|
|
11
|
+
HomeActivityDetailDialog,
|
|
12
|
+
type SurfaceRect,
|
|
13
|
+
} from '../../HomeActivityDetailDialog';
|
|
14
|
+
import { useChatRawCards } from '@tbox.cn/app-agent-ui-kit';
|
|
15
|
+
|
|
16
|
+
const BUMPIN_CARD_TYPE = 'promotion-bumpin-activity';
|
|
17
|
+
|
|
18
|
+
export const BumpInActivityChatCard: CardComponent = (props) => {
|
|
19
|
+
const triggerRef = useRef<HTMLButtonElement>(null);
|
|
20
|
+
const [detailOrigin, setDetailOrigin] = useState<SurfaceRect | null>(null);
|
|
21
|
+
// W3-2:原始注册表经 kit context 读取(组合层覆盖 → 原始形态单向,防嵌套)
|
|
22
|
+
const rawCards = useChatRawCards();
|
|
23
|
+
const Base = (rawCards as Record<string, CardComponent | undefined>)[BUMPIN_CARD_TYPE];
|
|
24
|
+
const { data, cardId, isHistory, actionTokens } = props;
|
|
25
|
+
const closeDetail = useCallback(() => setDetailOrigin(null), []);
|
|
26
|
+
|
|
27
|
+
if (!Base) return null;
|
|
28
|
+
|
|
29
|
+
// Banner 只属于首页轻量概览;组合层只包装对话域的 detail 卡,避免错误放大未知模式。
|
|
30
|
+
const mode = data && typeof data === 'object' && !Array.isArray(data)
|
|
31
|
+
? (data as Record<string, unknown>)['mode']
|
|
32
|
+
: undefined;
|
|
33
|
+
if (mode !== 'detail') {
|
|
34
|
+
return <Base data={data} cardId={cardId} isHistory={isHistory} actionTokens={actionTokens} />;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const detailData = data as Record<string, unknown>;
|
|
38
|
+
const inlineData = { ...detailData };
|
|
39
|
+
delete inlineData['description'];
|
|
40
|
+
delete inlineData['tagLabel'];
|
|
41
|
+
if (Array.isArray(detailData['vouchers'])) inlineData['vouchers'] = [];
|
|
42
|
+
|
|
43
|
+
const openDetail = () => {
|
|
44
|
+
const trigger = triggerRef.current;
|
|
45
|
+
if (!trigger || detailOrigin) return;
|
|
46
|
+
const rect = trigger.getBoundingClientRect();
|
|
47
|
+
setDetailOrigin({ top: rect.top, left: rect.left, width: rect.width, height: rect.height });
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<>
|
|
52
|
+
<ActivityDetailPresentation variant="inline">
|
|
53
|
+
<Base data={inlineData} cardId={cardId} isHistory={isHistory} actionTokens={actionTokens} />
|
|
54
|
+
<button
|
|
55
|
+
ref={triggerRef}
|
|
56
|
+
type="button"
|
|
57
|
+
className="activity-detail-presentation__detail-trigger"
|
|
58
|
+
aria-haspopup="dialog"
|
|
59
|
+
aria-expanded={detailOrigin !== null}
|
|
60
|
+
aria-controls={getHomeActivityDialogId(cardId)}
|
|
61
|
+
onClick={openDetail}
|
|
62
|
+
>
|
|
63
|
+
<span>查看活动详情</span>
|
|
64
|
+
<CaretRight size={17} aria-hidden="true" />
|
|
65
|
+
</button>
|
|
66
|
+
</ActivityDetailPresentation>
|
|
67
|
+
|
|
68
|
+
{detailOrigin && (
|
|
69
|
+
<HomeActivityDetailDialog
|
|
70
|
+
card={{ id: cardId, data: detailData }}
|
|
71
|
+
origin={detailOrigin}
|
|
72
|
+
triggerRef={triggerRef}
|
|
73
|
+
motion="fade"
|
|
74
|
+
onClosed={closeDetail}
|
|
75
|
+
>
|
|
76
|
+
<Base data={detailData} cardId={cardId} isHistory={isHistory} actionTokens={actionTokens} />
|
|
77
|
+
</HomeActivityDetailDialog>
|
|
78
|
+
)}
|
|
79
|
+
</>
|
|
80
|
+
);
|
|
81
|
+
};
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
.activity-detail-presentation {
|
|
2
|
+
--activity-detail-ink: #263022;
|
|
3
|
+
--activity-detail-muted: #6f7969;
|
|
4
|
+
--activity-detail-accent: #0a6eb8;
|
|
5
|
+
width: 100%;
|
|
6
|
+
min-width: 0;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
color: var(--activity-detail-ink);
|
|
9
|
+
background: #ffffff;
|
|
10
|
+
|
|
11
|
+
&__poster {
|
|
12
|
+
display: block;
|
|
13
|
+
width: 100%;
|
|
14
|
+
height: 100%;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&__hero {
|
|
18
|
+
position: relative;
|
|
19
|
+
width: 100%;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
aspect-ratio: 353 / 240;
|
|
22
|
+
background: #fff8e9;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&__hero--inline {
|
|
26
|
+
height: 152PX;
|
|
27
|
+
aspect-ratio: auto;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* 素材变量链(主题品牌资产轨 A1 级联修复):stage 桌面默认 + compact 移动断点覆写;
|
|
31
|
+
元素只消费不声明(声明截断主题覆写继承),兜底 = 中立渐变(零品牌资产——B2),
|
|
32
|
+
主题包经 html[data-theme] 段覆写两语义位 */
|
|
33
|
+
&__poster {
|
|
34
|
+
background-image: var(--tbox-asset-home-poster-stage, linear-gradient(135deg, #eaf3ff, #d7e7fd));
|
|
35
|
+
background-size: cover;
|
|
36
|
+
background-position: center;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@media screen and (max-width: 392PX) {
|
|
40
|
+
/* page 变体移动断点切 compact 裁切(strip 变体恒 stage——原 picture/source 语义保持) */
|
|
41
|
+
.activity-detail-presentation__poster:not(.activity-detail-presentation__poster--stage) {
|
|
42
|
+
background-image: var(--tbox-asset-home-poster-compact, linear-gradient(135deg, #eaf3ff, #d7e7fd));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&__body {
|
|
47
|
+
position: relative;
|
|
48
|
+
z-index: 1;
|
|
49
|
+
min-width: 0;
|
|
50
|
+
margin-top: -50PX;
|
|
51
|
+
padding: 4PX 0 18PX;
|
|
52
|
+
background: #ffffff;
|
|
53
|
+
border-radius: 22PX 22PX 0 0;
|
|
54
|
+
box-shadow: 0 -10PX 28PX rgba(38, 48, 34, 0.08);
|
|
55
|
+
|
|
56
|
+
> * {
|
|
57
|
+
width: 100%;
|
|
58
|
+
box-sizing: border-box;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// 首页详情通过 RawCardRenderer 渲染,SDK 会额外包一层通用卡框。
|
|
62
|
+
// 详情页本身已经是完整表面,这里只保留该层的渲染职责,避免卡片套卡片;
|
|
63
|
+
// 对话流的通用卡框位于整个 presentation 外部,不会命中此规则。
|
|
64
|
+
> .tbox-card {
|
|
65
|
+
margin: 0;
|
|
66
|
+
overflow: visible;
|
|
67
|
+
background: transparent;
|
|
68
|
+
border: 0;
|
|
69
|
+
border-radius: 0;
|
|
70
|
+
box-shadow: none;
|
|
71
|
+
animation: none;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.promotion-bumpin {
|
|
75
|
+
margin: 0;
|
|
76
|
+
overflow: visible;
|
|
77
|
+
background: #ffffff;
|
|
78
|
+
border: 0;
|
|
79
|
+
border-radius: 0;
|
|
80
|
+
box-shadow: none;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.promotion-bumpin__header,
|
|
84
|
+
.promotion-bumpin__header--bg {
|
|
85
|
+
display: block;
|
|
86
|
+
min-height: 0;
|
|
87
|
+
padding: 20PX 22PX 14PX;
|
|
88
|
+
background: #ffffff !important;
|
|
89
|
+
background-image: none !important;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.promotion-bumpin__header--bg::before,
|
|
93
|
+
.promotion-bumpin__cover,
|
|
94
|
+
.promotion-bumpin__cover-placeholder {
|
|
95
|
+
display: none;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.promotion-bumpin__header-copy {
|
|
99
|
+
position: relative;
|
|
100
|
+
z-index: 1;
|
|
101
|
+
display: grid;
|
|
102
|
+
max-width: 100%;
|
|
103
|
+
gap: 7PX;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.promotion-bumpin__tag {
|
|
107
|
+
justify-self: start;
|
|
108
|
+
padding: 3PX 10PX;
|
|
109
|
+
color: #19744a;
|
|
110
|
+
font-size: 13PX;
|
|
111
|
+
line-height: 19PX;
|
|
112
|
+
background: #edf8f1;
|
|
113
|
+
border: 0;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.promotion-bumpin__title {
|
|
117
|
+
margin: 0;
|
|
118
|
+
color: var(--activity-detail-ink);
|
|
119
|
+
font-size: 20PX;
|
|
120
|
+
font-weight: 750;
|
|
121
|
+
line-height: 28PX;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.promotion-bumpin__period,
|
|
125
|
+
.promotion-bumpin__subtitle {
|
|
126
|
+
justify-self: start;
|
|
127
|
+
padding: 0;
|
|
128
|
+
color: var(--activity-detail-muted);
|
|
129
|
+
font-size: 14PX;
|
|
130
|
+
line-height: 21PX;
|
|
131
|
+
background: transparent;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.promotion-bumpin__progress {
|
|
135
|
+
gap: 4PX;
|
|
136
|
+
margin: 0 16PX;
|
|
137
|
+
padding: 6PX 14PX 5PX;
|
|
138
|
+
overflow: hidden;
|
|
139
|
+
background: #f2f8fc;
|
|
140
|
+
border: 1PX solid rgba(10, 110, 184, 0.12);
|
|
141
|
+
border-radius: 14PX;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.promotion-bumpin__steps {
|
|
145
|
+
padding: 0 6PX;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.promotion-bumpin__step-item {
|
|
149
|
+
gap: 2PX;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.promotion-bumpin__step-node {
|
|
153
|
+
width: 22PX;
|
|
154
|
+
height: 22PX;
|
|
155
|
+
color: #0d6fae;
|
|
156
|
+
font-size: 11PX;
|
|
157
|
+
background: #eaf8ff;
|
|
158
|
+
border-color: #1682cb;
|
|
159
|
+
|
|
160
|
+
svg {
|
|
161
|
+
width: 12PX;
|
|
162
|
+
height: 12PX;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.promotion-bumpin__step-node--done {
|
|
167
|
+
color: #ffffff;
|
|
168
|
+
background: var(--activity-detail-accent);
|
|
169
|
+
border-color: var(--activity-detail-accent);
|
|
170
|
+
box-shadow: 0 3PX 9PX rgba(10, 110, 184, 0.22);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.promotion-bumpin__step-node--locked {
|
|
174
|
+
color: #ffffff;
|
|
175
|
+
background: #1475b6;
|
|
176
|
+
border-color: #ffdc6a;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.promotion-bumpin__step-line {
|
|
180
|
+
top: 11PX;
|
|
181
|
+
height: 2PX;
|
|
182
|
+
background: rgba(22, 126, 194, 0.22);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.promotion-bumpin__step-line--done,
|
|
186
|
+
.promotion-bumpin__progress-fill {
|
|
187
|
+
background: var(--activity-detail-accent);
|
|
188
|
+
box-shadow: none;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.promotion-bumpin__step-label,
|
|
192
|
+
.promotion-bumpin__progress-text {
|
|
193
|
+
color: var(--activity-detail-muted);
|
|
194
|
+
font-size: 10.5PX;
|
|
195
|
+
line-height: 13PX;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.promotion-bumpin__progress-bar {
|
|
199
|
+
height: 8PX;
|
|
200
|
+
background: rgba(10, 110, 184, 0.14);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.promotion-bumpin__prizes,
|
|
204
|
+
.promotion-bumpin__rules {
|
|
205
|
+
margin: 16PX 16PX 0;
|
|
206
|
+
overflow: hidden;
|
|
207
|
+
background: #ffffff;
|
|
208
|
+
border: 1PX solid rgba(106, 119, 137, 0.16);
|
|
209
|
+
border-radius: 14PX;
|
|
210
|
+
box-shadow: 0 3PX 12PX rgba(70, 91, 122, 0.06);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.promotion-bumpin__prizes-header,
|
|
214
|
+
.promotion-bumpin__rules-header {
|
|
215
|
+
padding: 12PX 14PX 10PX;
|
|
216
|
+
color: var(--activity-detail-ink);
|
|
217
|
+
font-size: 16PX;
|
|
218
|
+
font-weight: 650;
|
|
219
|
+
line-height: 22PX;
|
|
220
|
+
border-bottom: 1PX solid rgba(106, 119, 137, 0.12);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.promotion-bumpin__prizes-header {
|
|
224
|
+
gap: 8PX;
|
|
225
|
+
|
|
226
|
+
svg {
|
|
227
|
+
width: 26PX;
|
|
228
|
+
height: 26PX;
|
|
229
|
+
padding: 6PX;
|
|
230
|
+
flex-shrink: 0;
|
|
231
|
+
color: var(--activity-detail-accent);
|
|
232
|
+
background: #edf6ff;
|
|
233
|
+
border-radius: 8PX;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.promotion-bumpin__rules-header {
|
|
238
|
+
padding-bottom: 10PX;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.promotion-bumpin__prize-item {
|
|
242
|
+
gap: 12PX;
|
|
243
|
+
padding: 12PX 14PX;
|
|
244
|
+
background: #ffffff;
|
|
245
|
+
border-bottom: 1PX solid rgba(106, 119, 137, 0.1);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.promotion-bumpin__prize-logo,
|
|
249
|
+
.promotion-bumpin__prize-logo-placeholder {
|
|
250
|
+
width: 42PX;
|
|
251
|
+
height: 42PX;
|
|
252
|
+
border-radius: 12PX;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.promotion-bumpin__prize-copy strong {
|
|
256
|
+
color: var(--activity-detail-ink);
|
|
257
|
+
font-size: 16PX;
|
|
258
|
+
line-height: 22PX;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.promotion-bumpin__prize-copy small,
|
|
262
|
+
.promotion-bumpin__prize-amount {
|
|
263
|
+
color: var(--activity-detail-muted);
|
|
264
|
+
font-size: 13.5PX;
|
|
265
|
+
line-height: 20PX;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.promotion-bumpin__prizes-toggle {
|
|
269
|
+
padding: 11PX 14PX;
|
|
270
|
+
color: var(--activity-detail-muted);
|
|
271
|
+
font-size: 14PX;
|
|
272
|
+
line-height: 20PX;
|
|
273
|
+
background: #f8fafc;
|
|
274
|
+
border-top: 1PX solid rgba(106, 119, 137, 0.1);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.promotion-bumpin__rules-content {
|
|
278
|
+
padding: 12PX 14PX 14PX;
|
|
279
|
+
color: var(--activity-detail-muted);
|
|
280
|
+
font-size: 14.5PX;
|
|
281
|
+
line-height: 24PX;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
&--inline {
|
|
286
|
+
container-type: inline-size;
|
|
287
|
+
border-radius: 14PX;
|
|
288
|
+
contain: layout paint;
|
|
289
|
+
|
|
290
|
+
.activity-detail-presentation__body {
|
|
291
|
+
margin-top: -14PX;
|
|
292
|
+
padding: 0 0 8PX;
|
|
293
|
+
border-radius: 16PX 16PX 0 0;
|
|
294
|
+
box-shadow: none;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.activity-detail-presentation__body .promotion-bumpin__title {
|
|
298
|
+
font-size: 20PX;
|
|
299
|
+
line-height: 28PX;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.activity-detail-presentation__detail-trigger {
|
|
303
|
+
display: flex;
|
|
304
|
+
width: 100%;
|
|
305
|
+
min-height: 32PX;
|
|
306
|
+
margin: 8PX 0 0;
|
|
307
|
+
padding: 0;
|
|
308
|
+
align-items: center;
|
|
309
|
+
justify-content: center;
|
|
310
|
+
gap: 2PX;
|
|
311
|
+
color: #686d69;
|
|
312
|
+
font: inherit;
|
|
313
|
+
font-size: 12PX;
|
|
314
|
+
font-weight: 400;
|
|
315
|
+
line-height: 18PX;
|
|
316
|
+
background: transparent;
|
|
317
|
+
border: 0;
|
|
318
|
+
border-radius: 0;
|
|
319
|
+
box-shadow: none;
|
|
320
|
+
cursor: pointer;
|
|
321
|
+
|
|
322
|
+
svg {
|
|
323
|
+
flex-shrink: 0;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
&:active {
|
|
327
|
+
opacity: 0.68;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
&:focus-visible {
|
|
331
|
+
outline: 2PX solid rgba(9, 107, 250, 0.28);
|
|
332
|
+
outline-offset: 2PX;
|
|
333
|
+
border-radius: 5PX;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
@container (max-width: 340PX) {
|
|
340
|
+
.activity-detail-presentation--inline {
|
|
341
|
+
.activity-detail-presentation__body .promotion-bumpin__title {
|
|
342
|
+
font-size: 19PX;
|
|
343
|
+
line-height: 27PX;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.activity-detail-presentation__body .promotion-bumpin__header,
|
|
347
|
+
.activity-detail-presentation__body .promotion-bumpin__header--bg {
|
|
348
|
+
padding-right: 18PX;
|
|
349
|
+
padding-left: 18PX;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 联单主视觉(素材变量链,主题轨 T-2.3):img/picture → CSS background。
|
|
6
|
+
* page 变体在移动断点(≤392px)切 compact 裁切;strip 恒定 stage(原实现语义保持)。
|
|
7
|
+
*/
|
|
8
|
+
export function ActivityDetailHero({ variant = 'page' }: { readonly variant?: 'page' | 'strip' }) {
|
|
9
|
+
const className =
|
|
10
|
+
variant === 'strip'
|
|
11
|
+
? 'activity-detail-presentation__poster activity-detail-presentation__poster--stage'
|
|
12
|
+
: 'activity-detail-presentation__poster';
|
|
13
|
+
return <span className={className} role="img" aria-label="参与联单,碰出惊喜" />;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function ActivityDetailPresentation({
|
|
17
|
+
children,
|
|
18
|
+
variant,
|
|
19
|
+
}: {
|
|
20
|
+
readonly children: ReactNode;
|
|
21
|
+
readonly variant: 'page' | 'inline';
|
|
22
|
+
}) {
|
|
23
|
+
return (
|
|
24
|
+
<div className={`activity-detail-presentation activity-detail-presentation--${variant}`}>
|
|
25
|
+
<div className={`activity-detail-presentation__hero activity-detail-presentation__hero--${variant}`}>
|
|
26
|
+
<ActivityDetailHero variant={variant === 'inline' ? 'strip' : 'page'} />
|
|
27
|
+
</div>
|
|
28
|
+
<div className="activity-detail-presentation__body">{children}</div>
|
|
29
|
+
</div>
|
|
30
|
+
);
|
|
31
|
+
}
|