@tbox.cn/app-module-mall-core 1.0.0-alpha.1 → 1.0.0-alpha.11

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.
Files changed (33) hide show
  1. package/AGENTS.md +3 -3
  2. package/README.md +4 -4
  3. package/dist/{chunk-QPBYZO27.js → chunk-ZBHJWURF.js} +1399 -1611
  4. package/dist/{chunk-FIHBQMON.js → chunk-ZVXAPBVE.js} +1 -1
  5. package/dist/client/index.d.ts +0 -11
  6. package/dist/client/index.js +1 -1
  7. package/dist/index.js +2 -2
  8. package/dist/server/index.d.ts +16 -16
  9. package/dist/server/index.js +1 -1
  10. package/package.json +7 -7
  11. package/src/client/HomeActivityDetailDialog.tsx +21 -81
  12. package/src/client/MallHome.tsx +109 -54
  13. package/src/client/cards/overrides/BumpInActivityChatCard.tsx +1 -1
  14. package/src/client/components/ActivityDetailPresentation/index.tsx +102 -9
  15. package/src/client/components/MemberGateSheet/index.tsx +38 -92
  16. package/src/client/home-slot.tsx +8 -64
  17. package/src/client/index.ts +4 -3
  18. package/src/client/member-gate-overlay.tsx +89 -0
  19. package/src/server/module-ports.ts +1 -1
  20. package/tbox.module.json +1 -2
  21. package/tests/MemberGateSheet.test.tsx +9 -0
  22. package/tests/home-slot.test.tsx +110 -30
  23. package/tsup.config.ts +0 -1
  24. package/dist/HomeActivityDetailDialog-2GJFYSMZ.less +0 -178
  25. package/dist/MallHome-PABCNS6D.less +0 -623
  26. package/dist/home-slot-WBZ6ONDP.less +0 -4
  27. package/dist/index-ELJ55M66.less +0 -256
  28. package/dist/index-U5YRUY7P.less +0 -352
  29. package/src/client/HomeActivityDetailDialog.less +0 -178
  30. package/src/client/MallHome.less +0 -623
  31. package/src/client/components/ActivityDetailPresentation/index.less +0 -352
  32. package/src/client/components/MemberGateSheet/index.less +0 -256
  33. package/src/client/home-slot.less +0 -4
@@ -1,623 +0,0 @@
1
- /* 联单卡复用既有海报资产与 H5 固定构图;进度层只消费支付宝活动回执。 */
2
- .mall-home {
3
- /* 声明为尺寸容器,供下方 @container mall-home 查询——布局需响应内容区宽度而非视口 */
4
- container: mall-home / inline-size;
5
- --mall-surface-border: 0.5PX solid rgba(11, 15, 23, 0.12);
6
- --mall-surface-radius: 16PX;
7
- --mall-surface-shadow: 0 2PX 16PX rgba(106, 119, 137, 0.08);
8
- --mall-text-primary: rgba(11, 15, 23, 0.88);
9
- --mall-text-secondary: rgba(11, 15, 23, 0.45);
10
- width: 100%;
11
- padding: 8PX 0 34PX;
12
- color: var(--tbox-text-primary);
13
- box-sizing: border-box;
14
-
15
- &__welcome {
16
- padding: 4PX var(--tbox-page-gutter) 22PX;
17
-
18
- h1,
19
- p { margin: 0; }
20
-
21
- h1 {
22
- margin-top: 4PX;
23
- color: #10141c;
24
- font-size: 21PX;
25
- font-weight: 750;
26
- line-height: 29PX;
27
- letter-spacing: -0.5PX;
28
- }
29
-
30
- p {
31
- margin-top: 4PX;
32
- color: #5f6678;
33
- font-size: 12.5PX;
34
- font-weight: 400;
35
- line-height: 19PX;
36
- }
37
- }
38
-
39
- &__welcome-sparkle {
40
- display: block;
41
- width: 36PX;
42
- height: 25.5PX;
43
- object-fit: contain;
44
- }
45
-
46
- &__linked-order {
47
- position: relative;
48
- width: auto;
49
- height: 240PX;
50
- margin-right: var(--tbox-page-gutter);
51
- margin-left: var(--tbox-page-gutter);
52
- overflow: hidden;
53
- border-radius: 14PX;
54
- background: #fff8e9;
55
- box-shadow: 0 10PX 24PX rgba(47, 88, 121, 0.1);
56
- box-sizing: border-box;
57
- line-height: 0;
58
- }
59
-
60
- &__linked-order-poster {
61
- position: absolute;
62
- top: 0;
63
- left: 50%;
64
- display: block;
65
- width: 100%;
66
- height: 100%;
67
- transform: translateX(-50%);
68
- /* 素材变量链(主题品牌资产轨 A1 级联修复):stage 桌面默认 + compact 移动断点覆写;
69
- 元素只消费不声明(声明截断主题覆写继承),兜底 = 中立渐变(零品牌资产——B2),
70
- 主题包经 html[data-theme] 段覆写两语义位 */
71
- background-image: var(--tbox-asset-home-poster-stage, linear-gradient(135deg, #eaf3ff, #d7e7fd));
72
- background-size: cover;
73
- background-position: center;
74
- }
75
-
76
- &__linked-order-trigger {
77
- position: absolute;
78
- inset: 0;
79
- z-index: 3;
80
- width: 100%;
81
- height: 100%;
82
- padding: 0;
83
- background: transparent;
84
- border: 0;
85
- border-radius: inherit;
86
- outline: none;
87
- cursor: pointer;
88
- -webkit-tap-highlight-color: transparent;
89
-
90
- &:focus-visible {
91
- box-shadow: inset 0 0 0 3PX rgba(82, 126, 56, 0.5);
92
- }
93
- }
94
-
95
- &__progress {
96
- position: absolute;
97
- right: auto;
98
- bottom: 18PX;
99
- left: 50%;
100
- z-index: 2;
101
- width: 300PX;
102
- height: 32PX;
103
- transform: translateX(-50%);
104
- }
105
-
106
- &__progress-content,
107
- &__progress-message,
108
- &__nodes,
109
- &__node {
110
- display: flex;
111
- align-items: center;
112
- }
113
-
114
- &__progress-content,
115
- &__progress-message {
116
- width: 100%;
117
- height: 100%;
118
- box-sizing: border-box;
119
- }
120
-
121
- &__progress-content { justify-content: space-between; }
122
-
123
- &__progress-label,
124
- &__progress-value {
125
- flex-shrink: 0;
126
- color: #0a6eb8;
127
- font-size: 12PX;
128
- font-weight: 850;
129
- line-height: 1;
130
- text-shadow: 0 1PX 0 rgba(255, 255, 255, 0.72);
131
- white-space: nowrap;
132
- }
133
-
134
- &__nodes {
135
- position: relative;
136
- min-width: 0;
137
- margin: 0 10PX;
138
- flex: 1;
139
- justify-content: space-between;
140
-
141
- &--summary {
142
- height: 22PX;
143
- justify-content: center;
144
- }
145
- }
146
-
147
- &__nodes-summary {
148
- position: relative;
149
- z-index: 2;
150
- padding: 2PX 7PX;
151
- border-radius: 9PX;
152
- color: #0a6eb8;
153
- background: rgba(234, 248, 255, 0.94);
154
- font-size: 9PX;
155
- font-weight: 760;
156
- line-height: 1.2;
157
- }
158
-
159
- &__rail,
160
- &__rail-fill {
161
- position: absolute;
162
- top: 50%;
163
- left: 8PX;
164
- height: 3PX;
165
- border-radius: 2PX;
166
- transform: translateY(-50%);
167
- }
168
-
169
- &__rail {
170
- right: 8PX;
171
- background: rgba(22, 126, 194, 0.3);
172
- }
173
-
174
- &__rail-fill {
175
- z-index: 1;
176
- max-width: calc(100% - 16PX);
177
- background: #087dd0;
178
- box-shadow: 0 0 6PX rgba(0, 104, 190, 0.34);
179
- }
180
-
181
- &__node {
182
- position: relative;
183
- z-index: 2;
184
- width: 22PX;
185
- height: 22PX;
186
- justify-content: center;
187
- flex-shrink: 0;
188
- border: 1.5PX solid #1682cb;
189
- border-radius: 50%;
190
- color: #0d6fae;
191
- background: #eaf8ff;
192
- box-shadow: 0 2PX 5PX rgba(0, 83, 151, 0.22);
193
- box-sizing: border-box;
194
- font-size: 10PX;
195
- font-weight: 800;
196
- line-height: 1;
197
-
198
- &--milestone {
199
- border-color: #ffdc6a;
200
- color: #ffffff;
201
- background: #1475b6;
202
- }
203
-
204
- &--completed {
205
- border-color: #ffffff;
206
- color: #0068e8;
207
- background: #91dcf2;
208
- }
209
- }
210
-
211
- &__progress-message {
212
- padding: 0 10PX;
213
- justify-content: center;
214
- gap: 8PX;
215
- border-radius: var(--mall-surface-radius);
216
- color: #0a6eb8;
217
- background: rgba(244, 252, 255, 0.94);
218
- font-size: 11PX;
219
- font-weight: 760;
220
- line-height: 1.2;
221
- text-align: center;
222
-
223
- button {
224
- padding: 3PX 8PX;
225
- flex-shrink: 0;
226
- border: 0;
227
- border-radius: 10PX;
228
- color: #ffffff;
229
- background: #137dc4;
230
- font: inherit;
231
- font-size: 10PX;
232
- line-height: 1.2;
233
- }
234
- }
235
-
236
- &__service-pair {
237
- display: grid;
238
- margin: 16PX var(--tbox-page-gutter) 0;
239
- grid-template-columns: repeat(2, minmax(0, 1fr));
240
- align-items: stretch;
241
- gap: 12PX;
242
- }
243
-
244
- &__service-card {
245
- position: relative;
246
- min-width: 0;
247
- overflow: hidden;
248
- border: var(--mall-surface-border);
249
- border-radius: var(--mall-surface-radius);
250
- background: #ffffff;
251
- box-shadow: var(--mall-surface-shadow);
252
- box-sizing: border-box;
253
- }
254
-
255
- &__service-card-main {
256
- position: relative;
257
- display: flex;
258
- width: 100%;
259
- height: 100%;
260
- min-height: 95PX;
261
- padding: 12PX;
262
- align-items: stretch;
263
- flex-direction: column;
264
- gap: 6PX;
265
- border: 0;
266
- color: inherit;
267
- background: transparent;
268
- box-sizing: border-box;
269
- font: inherit;
270
- text-align: left;
271
- cursor: pointer;
272
-
273
- &:disabled {
274
- cursor: default;
275
- opacity: 0.72;
276
- }
277
- }
278
-
279
- &__service-card-icon {
280
- position: absolute;
281
- z-index: 1;
282
- top: 12PX;
283
- right: 12PX;
284
- display: block;
285
- width: 33.18PX;
286
- height: 32PX;
287
- object-fit: contain;
288
- }
289
-
290
- &__service-card-eyebrow {
291
- overflow: hidden;
292
- padding-right: 36PX;
293
- color: var(--mall-text-primary);
294
- font-family: 'PingFang SC', '苹方-简', sans-serif;
295
- font-size: 14PX;
296
- font-weight: 400;
297
- line-height: 20PX;
298
- text-overflow: ellipsis;
299
- white-space: nowrap;
300
- }
301
-
302
- &__service-card-value {
303
- display: flex;
304
- min-width: 0;
305
- min-height: 22PX;
306
- align-items: center;
307
-
308
- /**
309
- * 车牌等定宽:数字与字母同宽,避免「浙A · 12345」里 1 与 A 宽度不一造成的视觉跳动,
310
- * 也让不同车牌在同一列里长度可比。中文省份简称在等宽栈里回落到中文字体,本就等宽。
311
- * 必须挂在本层:外层单类选择器会被下面的 `strong` 规则(同为 0,1,1)压过。
312
- */
313
- strong.mall-home__plate {
314
- font-family: ui-monospace, 'SF Mono', 'SFMono-Regular', Menlo, 'Roboto Mono', monospace;
315
- font-variant-numeric: tabular-nums;
316
- letter-spacing: 0.02em;
317
- }
318
-
319
- strong {
320
- overflow: hidden;
321
- color: var(--mall-text-primary);
322
- font-family: 'PingFang SC', '苹方-简', sans-serif;
323
- font-size: 16PX;
324
- font-weight: 600;
325
- line-height: 22PX;
326
- display: -webkit-box;
327
- -webkit-box-orient: vertical;
328
- -webkit-line-clamp: 2;
329
- }
330
- }
331
-
332
- &__service-card-meta {
333
- overflow: hidden;
334
- min-height: 17PX;
335
- color: var(--mall-text-secondary);
336
- font-family: 'PingFang SC', '苹方-简', sans-serif;
337
- font-size: 12PX;
338
- font-weight: 400;
339
- line-height: 17PX;
340
- text-align: left;
341
- display: -webkit-box;
342
- -webkit-box-orient: vertical;
343
- -webkit-line-clamp: 2;
344
- }
345
-
346
- &__service-card-skeleton {
347
- display: block;
348
- flex-shrink: 0;
349
- border-radius: 5PX;
350
- background: linear-gradient(90deg, rgba(20, 50, 91, 0.08), rgba(20, 50, 91, 0.15), rgba(20, 50, 91, 0.08));
351
-
352
- &--value {
353
- width: 72%;
354
- height: 18PX;
355
- }
356
-
357
- &--meta {
358
- width: 88%;
359
- height: 13PX;
360
- }
361
- }
362
-
363
- &__service-card-loading-label {
364
- position: absolute;
365
- width: 1PX;
366
- height: 1PX;
367
- overflow: hidden;
368
- clip: rect(0 0 0 0);
369
- clip-path: inset(50%);
370
- white-space: nowrap;
371
- }
372
-
373
- @media (max-width: 360PX) {
374
- &__service-card-main {
375
- padding-right: 10PX;
376
- padding-left: 10PX;
377
- }
378
-
379
- &__service-card-icon {
380
- right: 10PX;
381
- }
382
-
383
- &__service-card-value strong {
384
- font-size: 15PX;
385
- line-height: 21PX;
386
- }
387
- }
388
-
389
- &__services {
390
- margin: 22PX var(--tbox-page-gutter) 0;
391
- }
392
-
393
- &__section-header {
394
- display: flex;
395
- margin-bottom: 12PX;
396
- align-items: flex-end;
397
- justify-content: space-between;
398
- gap: 16PX;
399
-
400
- h2 { margin: 0; }
401
-
402
- h2 {
403
- color: #151b26;
404
- font-size: 18PX;
405
- font-weight: 780;
406
- line-height: 24PX;
407
- }
408
-
409
- }
410
-
411
- /* 与动作卡描述(small)同款:次要灰、常规字重。它是说明而非强调,不该抢标题的注意力。 */
412
- &__section-kicker {
413
- display: block;
414
- margin-top: 2PX;
415
- color: var(--mall-text-secondary);
416
- font-size: 11.5PX;
417
- font-weight: 400;
418
- line-height: 16PX;
419
- }
420
-
421
- &__areas {
422
- display: grid;
423
- grid-template-columns: minmax(0, 1fr);
424
- gap: 12PX;
425
- }
426
-
427
- &__area {
428
- --area-color: #1679df;
429
- --area-soft: #edf6ff;
430
- min-width: 0;
431
- padding: 12PX;
432
- border: var(--mall-surface-border);
433
- border-radius: var(--mall-surface-radius);
434
- background: #ffffff;
435
- box-shadow: var(--mall-surface-shadow);
436
- box-sizing: border-box;
437
-
438
- &--member {
439
- --area-color: #bd7200;
440
- --area-soft: #fff7e7;
441
- }
442
-
443
- &--marketing {
444
- --area-color: #db4e45;
445
- --area-soft: #fff1ef;
446
- }
447
-
448
- &--parking {
449
- --area-color: #173e78;
450
- --area-soft: #edf3fb;
451
- }
452
- }
453
-
454
- &__area-header {
455
- display: flex;
456
- margin-bottom: 12PX;
457
- align-items: center;
458
- justify-content: space-between;
459
- gap: 8PX;
460
- }
461
-
462
- /* 当前未渲染(服务区已去图标);样式与 BUSINESS_AREAS 的 icon 字段一并保留,便于回退。 */
463
- &__area-icon,
464
- &__action-icon {
465
- display: flex;
466
- align-items: center;
467
- justify-content: center;
468
- flex-shrink: 0;
469
- color: var(--area-color);
470
- background: var(--area-soft);
471
- }
472
-
473
- &__area-icon {
474
- width: 32PX;
475
- height: 32PX;
476
- border-radius: 10PX;
477
- }
478
-
479
- &__area-copy {
480
- min-width: 0;
481
-
482
- h3,
483
- p {
484
- margin: 0;
485
- }
486
-
487
- h3 {
488
- color: var(--mall-text-primary);
489
- font-family: 'PingFang SC', '苹方-简', sans-serif;
490
- font-size: 14PX;
491
- font-weight: 600;
492
- line-height: 20PX;
493
- }
494
-
495
- p {
496
- color: var(--mall-text-secondary);
497
- font-family: 'PingFang SC', '苹方-简', sans-serif;
498
- font-size: 12PX;
499
- font-weight: 400;
500
- line-height: 17PX;
501
- }
502
- }
503
-
504
- &__action-grid {
505
- display: grid;
506
- /* 最小列宽 150PX 自然铺列:网格可用宽约 319PX(手机)→ 2 列,664PX(PC 内容区)→ 4 列。
507
- 取 150 而非 160 是留亚像素余量——160 时四列恰好等于容器宽,实测只排到 3 列。
508
- min() 那层是必要的:容器比最小列宽还窄时 grid 不会收缩,按钮会溢出。 */
509
- grid-template-columns: repeat(auto-fit, minmax(min(150PX, 100%), 1fr));
510
- gap: 8PX;
511
- }
512
-
513
- &__action {
514
- display: grid;
515
- width: 100%;
516
- min-width: 0;
517
- min-height: 72PX;
518
- padding: 10PX;
519
- /* 图标列已移除:文案 + 右箭头两列 */
520
- grid-template-columns: minmax(0, 1fr) 12PX;
521
- align-items: center;
522
- gap: 8PX;
523
- border: var(--mall-surface-border);
524
- border-radius: 14PX;
525
- color: var(--mall-text-primary);
526
- background: #ffffff;
527
- box-shadow: 0 2PX 12PX rgba(106, 119, 137, 0.05);
528
- box-sizing: border-box;
529
- font: inherit;
530
- text-align: left;
531
- cursor: pointer;
532
-
533
- &:active {
534
- background: rgba(11, 15, 23, 0.02);
535
- transform: scale(0.99);
536
- }
537
-
538
- &:focus-visible {
539
- outline: 2PX solid var(--area-color);
540
- outline-offset: 2PX;
541
- }
542
-
543
- > svg {
544
- flex-shrink: 0;
545
- color: var(--mall-text-secondary);
546
- }
547
- }
548
-
549
- &__action-icon {
550
- width: 28PX;
551
- height: 28PX;
552
- border-radius: 9PX;
553
- }
554
-
555
- &__action-copy {
556
- min-width: 0;
557
-
558
- strong,
559
- small {
560
- display: block;
561
- overflow-wrap: anywhere;
562
- }
563
-
564
- strong {
565
- color: var(--mall-text-primary);
566
- font-family: 'PingFang SC', '苹方-简', sans-serif;
567
- font-size: 13PX;
568
- font-weight: 600;
569
- line-height: 18PX;
570
- }
571
-
572
- small {
573
- margin-top: 3PX;
574
- color: var(--mall-text-secondary);
575
- font-family: 'PingFang SC', '苹方-简', sans-serif;
576
- font-size: 11.5PX;
577
- font-weight: 400;
578
- line-height: 16PX;
579
- }
580
- }
581
-
582
- }
583
-
584
- /*
585
- * 业务区块并排的门槛:640PX 视口下每块仅剩约 188PX,内部动作卡(最小 190PX)放不下,
586
- * 标题与描述会被压成逐字竖排。两块并排需各留约 330PX,故门槛提到 800PX。
587
- * 窄于此一律单列——一行一块,内部动作卡才有横排空间。
588
- */
589
- /*
590
- * 业务区块并排的门槛按**容器**宽度判定,不用视口。
591
- * 内容区被 --tbox-content-max-width 卡在 720PX,PC 上视口再宽也不会更宽——
592
- * 以视口判断会在 1470PX 视口下命中两列,而每块实际只有 338PX,内部动作卡(最小 190PX)
593
- * 放不下两列、标题与描述被压成逐字竖排。
594
- * 门槛 820PX:两块并排需各约 400PX 才够动作卡横排;720PX 的内容区因此保持单列。
595
- */
596
- @container mall-home (min-width: 820PX) {
597
- .mall-home__areas {
598
- grid-template-columns: repeat(2, minmax(0, 1fr));
599
- }
600
- }
601
-
602
- @media screen and (max-width: 392PX) {
603
- .mall-home {
604
- &__linked-order {
605
- height: auto;
606
- aspect-ratio: 353 / 240;
607
- }
608
-
609
- &__linked-order-poster {
610
- top: 0;
611
- width: 100%;
612
- height: 100%;
613
- transform: translateX(-50%);
614
- background-image: var(--tbox-asset-home-poster-compact, linear-gradient(135deg, #eaf3ff, #d7e7fd));
615
- }
616
-
617
- &__progress {
618
- bottom: 7%;
619
- width: 85%;
620
- height: 13.33%;
621
- }
622
- }
623
- }