@tbox.cn/app-module-parking 1.0.0-alpha.1 → 1.0.0-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  cards,
3
3
  clientModule
4
- } from "../chunk-SI5NHAIK.js";
4
+ } from "../chunk-KT2OXQJ5.js";
5
5
  export {
6
6
  clientModule,
7
7
  cards as parkingClientCards
package/dist/index.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  import {
11
11
  cards,
12
12
  clientModule
13
- } from "./chunk-SI5NHAIK.js";
13
+ } from "./chunk-KT2OXQJ5.js";
14
14
  export {
15
15
  InMemoryParkingService,
16
16
  clientModule,
@@ -107,9 +107,9 @@ declare const parkingCards: {
107
107
  membership: zod.ZodOptional<zod.ZodObject<{
108
108
  state: zod.ZodEnum<["unauthenticated", "unknown", "active", "not_enrolled", "closed", "unavailable"]>;
109
109
  }, "strip", zod.ZodTypeAny, {
110
- state: "unknown" | "unavailable" | "unauthenticated" | "active" | "not_enrolled" | "closed";
110
+ state: "unknown" | "unavailable" | "active" | "unauthenticated" | "not_enrolled" | "closed";
111
111
  }, {
112
- state: "unknown" | "unavailable" | "unauthenticated" | "active" | "not_enrolled" | "closed";
112
+ state: "unknown" | "unavailable" | "active" | "unauthenticated" | "not_enrolled" | "closed";
113
113
  }>>;
114
114
  }, "strip", zod.ZodTypeAny, {
115
115
  bound: {
@@ -119,7 +119,7 @@ declare const parkingCards: {
119
119
  }[];
120
120
  message?: string | undefined;
121
121
  membership?: {
122
- state: "unknown" | "unavailable" | "unauthenticated" | "active" | "not_enrolled" | "closed";
122
+ state: "unknown" | "unavailable" | "active" | "unauthenticated" | "not_enrolled" | "closed";
123
123
  } | undefined;
124
124
  }, {
125
125
  bound: {
@@ -129,7 +129,7 @@ declare const parkingCards: {
129
129
  }[];
130
130
  message?: string | undefined;
131
131
  membership?: {
132
- state: "unknown" | "unavailable" | "unauthenticated" | "active" | "not_enrolled" | "closed";
132
+ state: "unknown" | "unavailable" | "active" | "unauthenticated" | "not_enrolled" | "closed";
133
133
  } | undefined;
134
134
  }>>;
135
135
  readonly 'parking-info': _tbox_cn_app_contracts.CardMeta<zod.ZodObject<{
@@ -182,10 +182,10 @@ declare const parkingCards: {
182
182
  state: zod.ZodEnum<["unauthenticated", "unknown", "active", "not_enrolled", "closed", "unavailable"]>;
183
183
  availablePoints: zod.ZodOptional<zod.ZodNumber>;
184
184
  }, "strip", zod.ZodTypeAny, {
185
- state: "unknown" | "unavailable" | "unauthenticated" | "active" | "not_enrolled" | "closed";
185
+ state: "unknown" | "unavailable" | "active" | "unauthenticated" | "not_enrolled" | "closed";
186
186
  availablePoints?: number | undefined;
187
187
  }, {
188
- state: "unknown" | "unavailable" | "unauthenticated" | "active" | "not_enrolled" | "closed";
188
+ state: "unknown" | "unavailable" | "active" | "unauthenticated" | "not_enrolled" | "closed";
189
189
  availablePoints?: number | undefined;
190
190
  }>>;
191
191
  paymentOptions: zod.ZodOptional<zod.ZodObject<{
@@ -403,7 +403,7 @@ declare const parkingCards: {
403
403
  durationText?: string | undefined;
404
404
  discountText?: string | undefined;
405
405
  membership?: {
406
- state: "unknown" | "unavailable" | "unauthenticated" | "active" | "not_enrolled" | "closed";
406
+ state: "unknown" | "unavailable" | "active" | "unauthenticated" | "not_enrolled" | "closed";
407
407
  availablePoints?: number | undefined;
408
408
  } | undefined;
409
409
  paymentOptions?: {
@@ -471,7 +471,7 @@ declare const parkingCards: {
471
471
  durationText?: string | undefined;
472
472
  discountText?: string | undefined;
473
473
  membership?: {
474
- state: "unknown" | "unavailable" | "unauthenticated" | "active" | "not_enrolled" | "closed";
474
+ state: "unknown" | "unavailable" | "active" | "unauthenticated" | "not_enrolled" | "closed";
475
475
  availablePoints?: number | undefined;
476
476
  } | undefined;
477
477
  paymentOptions?: {
@@ -607,7 +607,6 @@ declare const parkingCards: {
607
607
  message: zod.ZodOptional<zod.ZodString>;
608
608
  }, "strip", zod.ZodTypeAny, {
609
609
  total: number;
610
- hasMore: boolean;
611
610
  items: {
612
611
  status: "UNKNOWN" | "PAID" | "REFUNDED" | "CLOSED";
613
612
  plateNo: string;
@@ -624,11 +623,11 @@ declare const parkingCards: {
624
623
  invoiceEligible?: boolean | undefined;
625
624
  invoiceIssued?: boolean | undefined;
626
625
  }[];
626
+ hasMore: boolean;
627
627
  caveats: string[];
628
628
  message?: string | undefined;
629
629
  }, {
630
630
  total: number;
631
- hasMore: boolean;
632
631
  items: {
633
632
  status: "UNKNOWN" | "PAID" | "REFUNDED" | "CLOSED";
634
633
  plateNo: string;
@@ -645,6 +644,7 @@ declare const parkingCards: {
645
644
  invoiceEligible?: boolean | undefined;
646
645
  invoiceIssued?: boolean | undefined;
647
646
  }[];
647
+ hasMore: boolean;
648
648
  caveats: string[];
649
649
  message?: string | undefined;
650
650
  }>>;
@@ -678,10 +678,10 @@ declare const serverModule: {
678
678
  state: zod.ZodEnum<["unauthenticated", "unknown", "active", "not_enrolled", "closed", "unavailable"]>;
679
679
  availablePoints: zod.ZodOptional<zod.ZodNumber>;
680
680
  }, "strip", zod.ZodTypeAny, {
681
- state: "unknown" | "unavailable" | "unauthenticated" | "active" | "not_enrolled" | "closed";
681
+ state: "unknown" | "unavailable" | "active" | "unauthenticated" | "not_enrolled" | "closed";
682
682
  availablePoints?: number | undefined;
683
683
  }, {
684
- state: "unknown" | "unavailable" | "unauthenticated" | "active" | "not_enrolled" | "closed";
684
+ state: "unknown" | "unavailable" | "active" | "unauthenticated" | "not_enrolled" | "closed";
685
685
  availablePoints?: number | undefined;
686
686
  }>>;
687
687
  paymentOptions: zod.ZodOptional<zod.ZodObject<{
@@ -899,7 +899,7 @@ declare const serverModule: {
899
899
  durationText?: string | undefined;
900
900
  discountText?: string | undefined;
901
901
  membership?: {
902
- state: "unknown" | "unavailable" | "unauthenticated" | "active" | "not_enrolled" | "closed";
902
+ state: "unknown" | "unavailable" | "active" | "unauthenticated" | "not_enrolled" | "closed";
903
903
  availablePoints?: number | undefined;
904
904
  } | undefined;
905
905
  paymentOptions?: {
@@ -967,7 +967,7 @@ declare const serverModule: {
967
967
  durationText?: string | undefined;
968
968
  discountText?: string | undefined;
969
969
  membership?: {
970
- state: "unknown" | "unavailable" | "unauthenticated" | "active" | "not_enrolled" | "closed";
970
+ state: "unknown" | "unavailable" | "active" | "unauthenticated" | "not_enrolled" | "closed";
971
971
  availablePoints?: number | undefined;
972
972
  } | undefined;
973
973
  paymentOptions?: {
@@ -1103,7 +1103,6 @@ declare const serverModule: {
1103
1103
  message: zod.ZodOptional<zod.ZodString>;
1104
1104
  }, "strip", zod.ZodTypeAny, {
1105
1105
  total: number;
1106
- hasMore: boolean;
1107
1106
  items: {
1108
1107
  status: "UNKNOWN" | "PAID" | "REFUNDED" | "CLOSED";
1109
1108
  plateNo: string;
@@ -1120,11 +1119,11 @@ declare const serverModule: {
1120
1119
  invoiceEligible?: boolean | undefined;
1121
1120
  invoiceIssued?: boolean | undefined;
1122
1121
  }[];
1122
+ hasMore: boolean;
1123
1123
  caveats: string[];
1124
1124
  message?: string | undefined;
1125
1125
  }, {
1126
1126
  total: number;
1127
- hasMore: boolean;
1128
1127
  items: {
1129
1128
  status: "UNKNOWN" | "PAID" | "REFUNDED" | "CLOSED";
1130
1129
  plateNo: string;
@@ -1141,6 +1140,7 @@ declare const serverModule: {
1141
1140
  invoiceEligible?: boolean | undefined;
1142
1141
  invoiceIssued?: boolean | undefined;
1143
1142
  }[];
1143
+ hasMore: boolean;
1144
1144
  caveats: string[];
1145
1145
  message?: string | undefined;
1146
1146
  }>>;
@@ -1162,9 +1162,9 @@ declare const serverModule: {
1162
1162
  membership: zod.ZodOptional<zod.ZodObject<{
1163
1163
  state: zod.ZodEnum<["unauthenticated", "unknown", "active", "not_enrolled", "closed", "unavailable"]>;
1164
1164
  }, "strip", zod.ZodTypeAny, {
1165
- state: "unknown" | "unavailable" | "unauthenticated" | "active" | "not_enrolled" | "closed";
1165
+ state: "unknown" | "unavailable" | "active" | "unauthenticated" | "not_enrolled" | "closed";
1166
1166
  }, {
1167
- state: "unknown" | "unavailable" | "unauthenticated" | "active" | "not_enrolled" | "closed";
1167
+ state: "unknown" | "unavailable" | "active" | "unauthenticated" | "not_enrolled" | "closed";
1168
1168
  }>>;
1169
1169
  }, "strip", zod.ZodTypeAny, {
1170
1170
  bound: {
@@ -1174,7 +1174,7 @@ declare const serverModule: {
1174
1174
  }[];
1175
1175
  message?: string | undefined;
1176
1176
  membership?: {
1177
- state: "unknown" | "unavailable" | "unauthenticated" | "active" | "not_enrolled" | "closed";
1177
+ state: "unknown" | "unavailable" | "active" | "unauthenticated" | "not_enrolled" | "closed";
1178
1178
  } | undefined;
1179
1179
  }, {
1180
1180
  bound: {
@@ -1184,7 +1184,7 @@ declare const serverModule: {
1184
1184
  }[];
1185
1185
  message?: string | undefined;
1186
1186
  membership?: {
1187
- state: "unknown" | "unavailable" | "unauthenticated" | "active" | "not_enrolled" | "closed";
1187
+ state: "unknown" | "unavailable" | "active" | "unauthenticated" | "not_enrolled" | "closed";
1188
1188
  } | undefined;
1189
1189
  }>>;
1190
1190
  readonly 'parking-info': _tbox_cn_app_contracts.CardMeta<zod.ZodObject<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tbox.cn/app-module-parking",
3
- "version": "1.0.0-alpha.1",
3
+ "version": "1.0.0-alpha.7",
4
4
  "type": "module",
5
5
  "description": "商圈停车模块:计费支付、车辆寻车、缴费记录与开票(codegen 源)。",
6
6
  "exports": {
@@ -18,10 +18,10 @@
18
18
  }
19
19
  },
20
20
  "dependencies": {
21
- "@tbox.cn/app-contracts": "1.0.0-alpha.1",
22
- "@tbox.cn/app-contracts-mall": "1.0.0-alpha.1",
23
- "@tbox.cn/app-agent-sdk-client": "1.0.0-alpha.1",
24
- "@tbox.cn/app-agent-sdk-server": "1.0.0-alpha.1"
21
+ "@tbox.cn/app-contracts": "1.0.0-alpha.7",
22
+ "@tbox.cn/app-contracts-mall": "1.0.0-alpha.7",
23
+ "@tbox.cn/app-agent-sdk-client": "1.0.0-alpha.7",
24
+ "@tbox.cn/app-agent-sdk-server": "1.0.0-alpha.7"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "zod": "3.25.76",
@@ -59,9 +59,6 @@
59
59
  "access": "public"
60
60
  },
61
61
  "license": "MIT",
62
- "sideEffects": [
63
- "**/*.css"
64
- ],
65
62
  "scripts": {
66
63
  "typecheck": "tsc --noEmit",
67
64
  "test": "vitest run",
@@ -16,21 +16,21 @@ export function ParkingInfoCard(props: { data: ParkingInfoCardData }) {
16
16
  const { data } = props;
17
17
  const { subtitle, Icon } = KIND_META[data.kind];
18
18
  return (
19
- <section className="parking-info">
20
- <header className="parking-info__head">
21
- <span className="parking-info__head-icon">
19
+ <section className="parking-info w-full bg-card p-3.5 text-foreground">
20
+ <header className="parking-info__head mb-3 flex items-center gap-2">
21
+ <span className="parking-info__head-icon grid size-8 shrink-0 place-items-center rounded-md bg-primary-soft text-primary">
22
22
  <Icon weight="duotone" size={24} />
23
23
  </span>
24
- <div className="parking-info__heading">
25
- <h4>{data.title}</h4>
26
- <p>{subtitle}</p>
24
+ <div className="parking-info__heading flex min-w-0 flex-col">
25
+ <h4 className="truncate text-base font-bold leading-5.5 text-foreground">{data.title}</h4>
26
+ <p className="mt-1 text-xs leading-4 text-secondary-foreground">{subtitle}</p>
27
27
  </div>
28
28
  </header>
29
- <dl className="parking-info__entries">
29
+ <dl className="parking-info__entries grid gap-1.5">
30
30
  {data.entries.map((e) => (
31
- <div key={e.label} className="parking-info__entry">
32
- <dt>{e.label}</dt>
33
- <dd>{e.value}</dd>
31
+ <div key={e.label} className="parking-info__entry flex justify-between gap-2.5 rounded-md border-2 border-border bg-muted px-2.5 py-2.25 text-xs leading-4.5">
32
+ <dt className="shrink-0 text-secondary-foreground">{e.label}</dt>
33
+ <dd className="text-right font-medium break-words text-foreground">{e.value}</dd>
34
34
  </div>
35
35
  ))}
36
36
  </dl>
@@ -241,22 +241,22 @@ export function ParkingPaymentCard(props: {
241
241
  ].filter(Boolean).join(' · ');
242
242
 
243
243
  return (
244
- <section className="parking-payment">
245
- <header className="parking-payment__hero">
246
- <div className="parking-payment__hero-content">
247
- <div className="parking-payment__hero-eyebrow">
248
- <span>商场停车服务</span>
249
- {isHistory && <span className="parking-payment__status">历史报价</span>}
244
+ <section className="parking-payment w-full overflow-hidden bg-card text-foreground">
245
+ <header className="parking-payment__hero relative h-41.5 overflow-hidden bg-[#f9f0df] bg-parking-hero">
246
+ <div className="parking-payment__hero-content absolute inset-0 flex flex-col bg-white-soft p-3.5">
247
+ <div className="parking-payment__hero-eyebrow flex items-center justify-between gap-2 text-xs font-semibold leading-4 text-foreground">
248
+ <span className="truncate">商场停车服务</span>
249
+ {isHistory && <span className="parking-payment__status shrink-0 rounded-full border border-border bg-card px-1.5 py-0.5 text-xs leading-4">历史报价</span>}
250
250
  </div>
251
- <div className="parking-payment__hero-main">
252
- <strong>{data.plateNo}</strong>
253
- <span>{parkingMeta || '停车费用以商场系统实时结果为准'}</span>
251
+ <div className="parking-payment__hero-main flex min-w-0 flex-1 flex-col justify-center">
252
+ <strong className="truncate text-3xl font-bold leading-8 tracking-wide text-foreground">{data.plateNo}</strong>
253
+ <span className="mt-1 truncate text-xs leading-4 text-foreground">{parkingMeta || '停车费用以商场系统实时结果为准'}</span>
254
254
  </div>
255
255
  {/* 车辆管理独立成卡(缴费卡只管缴费),这里只发一句 query 把它唤起来 */}
256
256
  <div className="parking-payment__hero-actions">
257
257
  <button
258
258
  type="button"
259
- className="parking-payment__hero-action"
259
+ className="parking-payment__hero-action inline-flex cursor-pointer items-center gap-1.5 rounded-full border border-border bg-card px-2 py-1 text-xs font-medium leading-4 transition-colors hover:bg-muted disabled:cursor-default disabled:opacity-50"
260
260
  disabled={isHistory}
261
261
  onClick={() => sendCardAction(cardId, { type: 'sendMessage', value: VEHICLE_MANAGE_QUERY })}
262
262
  >
@@ -267,70 +267,70 @@ export function ParkingPaymentCard(props: {
267
267
  </div>
268
268
  </header>
269
269
 
270
- <div className="parking-payment__summary">
271
- <div className="parking-payment__summary-item">
272
- <small>已停时长</small>
273
- <strong>{data.durationText ?? '—'}</strong>
270
+ <div className="parking-payment__summary grid grid-cols-3 border-b-2 border-border bg-card px-1.5 py-2.75">
271
+ <div className="parking-payment__summary-item flex min-w-0 flex-col items-center justify-center border-l-2 border-border px-1 text-center first:border-l-0">
272
+ <small className="max-w-full truncate text-xs leading-4 text-muted-foreground">已停时长</small>
273
+ <strong className="mt-1 max-w-full truncate text-sm font-bold leading-4.5 text-foreground">{data.durationText ?? '—'}</strong>
274
274
  </div>
275
- <div className="parking-payment__summary-item parking-payment__summary-item--benefit">
276
- <small>优惠减免</small>
277
- <strong>{discountText ?? '—'}</strong>
275
+ <div className="parking-payment__summary-item parking-payment__summary-item--benefit flex min-w-0 flex-col items-center justify-center border-l-2 border-border px-1 text-center">
276
+ <small className="max-w-full truncate text-xs leading-4 text-muted-foreground">优惠减免</small>
277
+ <strong className="mt-1 max-w-full truncate text-sm font-bold leading-4.5 text-foreground">{discountText ?? '—'}</strong>
278
278
  </div>
279
- <div className="parking-payment__summary-item parking-payment__summary-item--amount">
280
- <small>当前应付</small>
281
- <strong>{data.payableText}</strong>
279
+ <div className="parking-payment__summary-item parking-payment__summary-item--amount flex min-w-0 flex-col items-center justify-center border-l-2 border-border px-1 text-center">
280
+ <small className="max-w-full truncate text-xs leading-4 text-muted-foreground">当前应付</small>
281
+ <strong className="mt-1 max-w-full truncate text-sm font-bold leading-4.5 text-warning">{data.payableText}</strong>
282
282
  </div>
283
283
  </div>
284
284
 
285
- <div className="parking-payment__body">
286
- <section className="parking-payment__billing">
287
- <header className="parking-payment__billing-head">
288
- <div>
289
- <span className="parking-payment__billing-icon">
285
+ <div className="parking-payment__body px-3 pb-2.75 pt-3">
286
+ <section className="parking-payment__billing rounded-xl border-2 border-border bg-card p-2.75">
287
+ <header className="parking-payment__billing-head flex items-center justify-between gap-2.25">
288
+ <div className="flex min-w-0 items-center gap-1.5">
289
+ <span className="parking-payment__billing-icon grid size-5.5 shrink-0 place-items-center rounded-md bg-primary-soft text-primary">
290
290
  <CurrencyCircleDollar weight="duotone" size={18} />
291
291
  </span>
292
- <h4>停车费用</h4>
292
+ <h4 className="text-sm font-semibold leading-5 text-foreground">停车费用</h4>
293
293
  </div>
294
294
  </header>
295
- <dl className="parking-payment__fees">
295
+ <dl className="parking-payment__fees m-0 mt-1.25">
296
296
  {data.feeItems.map((f) => (
297
- <div key={f.name} className="parking-payment__fee">
297
+ <div key={f.name} className="parking-payment__fee mt-1.75 flex items-center justify-between gap-2.25 text-xs leading-4.5 text-secondary-foreground">
298
298
  <dt>{f.name}</dt>
299
- <dd>{f.amountText}</dd>
299
+ <dd className="text-sm font-semibold text-foreground">{f.amountText}</dd>
300
300
  </div>
301
301
  ))}
302
- <div className="parking-payment__fee">
302
+ <div className="parking-payment__fee mt-1.75 flex items-center justify-between gap-2.25 text-xs leading-4.5 text-secondary-foreground">
303
303
  <dt>停车总费用</dt>
304
- <dd>{data.totalText}</dd>
304
+ <dd className="text-sm font-semibold text-foreground">{data.totalText}</dd>
305
305
  </div>
306
306
  {/* 自动生效的权益在这里陈述事实,不在「优惠」区当选项——用户对它没有决策权 */}
307
307
  {autoAppliedBenefits.map((benefit) => (
308
- <div key={benefit.benefitRef} className="parking-payment__fee parking-payment__fee--discount">
308
+ <div key={benefit.benefitRef} className="parking-payment__fee parking-payment__fee--discount mt-1.75 flex items-center justify-between gap-2.25 text-xs leading-4.5 text-secondary-foreground">
309
309
  <dt>{benefit.title}</dt>
310
- <dd>{formatDiscountText(benefit.discountText) ?? '已生效'}</dd>
310
+ <dd className="text-sm font-semibold text-foreground">{formatDiscountText(benefit.discountText) ?? '已生效'}</dd>
311
311
  </div>
312
312
  ))}
313
313
  {discountText && (
314
- <div className="parking-payment__fee parking-payment__fee--discount">
314
+ <div className="parking-payment__fee parking-payment__fee--discount mt-1.75 flex items-center justify-between gap-2.25 text-xs leading-4.5 text-secondary-foreground">
315
315
  <dt>优惠减免</dt>
316
- <dd>{discountText}</dd>
316
+ <dd className="text-sm font-semibold text-foreground">{discountText}</dd>
317
317
  </div>
318
318
  )}
319
319
  </dl>
320
- <div className="parking-payment__billing-total">
321
- <strong>当前应付</strong>
322
- <b>{data.payableText}</b>
320
+ <div className="parking-payment__billing-total mt-2.25 flex items-center justify-between gap-2.25 border-t-2 border-border pt-2">
321
+ <strong className="text-sm leading-5 text-foreground">当前应付</strong>
322
+ <b className="text-2xl font-bold leading-6 text-warning">{data.payableText}</b>
323
323
  </div>
324
324
  </section>
325
325
 
326
326
 
327
327
  {selectable.length > 0 && !isFreeOfCharge && (
328
- <section className="parking-payment__benefit-picker" aria-label="停车优惠选择">
329
- <div className="parking-payment__benefit-picker-head">
330
- <h4>优惠</h4>
331
- {repricing && <span className="parking-payment__benefit-repricing">重算中…</span>}
328
+ <section className="parking-payment__benefit-picker mt-2.25" aria-label="停车优惠选择">
329
+ <div className="parking-payment__benefit-picker-head mb-1.5 flex items-baseline justify-between">
330
+ <h4 className="m-0 text-xs font-semibold leading-4 text-secondary-foreground">优惠</h4>
331
+ {repricing && <span className="parking-payment__benefit-repricing text-xs text-primary">重算中…</span>}
332
332
  </div>
333
- <ul className="parking-payment__benefit-options">
333
+ <ul className="parking-payment__benefit-options m-0 flex list-none flex-col gap-1.5 p-0">
334
334
  {selectable.map((benefit) => {
335
335
  const checked = selectedRefs.includes(benefit.benefitRef);
336
336
  // 已生效项的减免金额是服务端权威值,优先于 selectableBenefits 上的本地预估
@@ -339,23 +339,24 @@ export function ParkingPaymentCard(props: {
339
339
  return (
340
340
  <li key={benefit.benefitRef}>
341
341
  <label
342
- className={`parking-payment__benefit-option${checked ? ' parking-payment__benefit-option--on' : ''}`}
342
+ className={`parking-payment__benefit-option relative flex items-center gap-1.75 rounded-xl border-2 bg-card px-2.75 py-2 transition-colors ${checked ? 'border-primary bg-primary-soft shadow-sm parking-payment__benefit-option--on' : 'border-border'} ${isHistory || repricing || !repriceToken ? 'cursor-default opacity-55' : 'cursor-pointer'}`}
343
343
  >
344
344
  {/* 原生 input 保留在无障碍树内,视觉由 __check 承担 */}
345
345
  <input
346
+ className="peer sr-only"
346
347
  type="checkbox"
347
348
  checked={checked}
348
349
  disabled={isHistory || repricing || !repriceToken}
349
350
  onChange={(e) => toggleBenefit(benefit.benefitRef, e.target.checked)}
350
351
  />
351
- <span className="parking-payment__benefit-check" aria-hidden="true">
352
+ <span className={`parking-payment__benefit-check inline-flex size-5 shrink-0 items-center justify-center rounded-full border-2 border-border-strong bg-card text-transparent transition-colors peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-primary ${checked ? 'border-primary bg-primary text-white' : ''}`} aria-hidden="true">
352
353
  <Check size={14} weight="bold" />
353
354
  </span>
354
- <span className="parking-payment__benefit-option-copy">
355
- <strong>{benefit.title}</strong>
355
+ <span className="parking-payment__benefit-option-copy min-w-0 flex-1">
356
+ <strong className="block truncate text-xs font-semibold leading-4.5 text-foreground">{benefit.title}</strong>
356
357
  </span>
357
358
  {amountText && (
358
- <span className="parking-payment__benefit-amount">
359
+ <span className="parking-payment__benefit-amount shrink-0 text-sm font-bold leading-4.5 tabular-nums text-warning">
359
360
  {amountText}
360
361
  </span>
361
362
  )}
@@ -364,18 +365,18 @@ export function ParkingPaymentCard(props: {
364
365
  );
365
366
  })}
366
367
  </ul>
367
- {dropNotice && <p className="parking-payment__benefit-notice">{dropNotice}</p>}
368
+ {dropNotice && <p className="parking-payment__benefit-notice mt-1.5 flex gap-1 rounded-md bg-warn-surface px-2 py-1.75 text-xs leading-4 text-warn-ink">{dropNotice}</p>}
368
369
  </section>
369
370
  )}
370
371
 
371
372
  {(membership?.state === 'not_enrolled' || membership?.state === 'unauthenticated') && (
372
- <div className="parking-payment__member-guide">
373
- <span className="parking-payment__member-guide-icon"><Sparkle weight="fill" size={20} /></span>
374
- <div>
375
- <strong>{membership.state === 'not_enrolled' ? '入会后可使用会员停车权益' : '登录后查看会员停车权益'}</strong>
376
- <small>权益以商场会员与停车系统实时结果为准</small>
373
+ <div className="parking-payment__member-guide mt-2.25 flex items-center gap-1.75 rounded-lg border-2 border-warn-border bg-warn-surface p-2.25">
374
+ <span className="parking-payment__member-guide-icon grid size-5.75 shrink-0 place-items-center rounded-md bg-warning text-white"><Sparkle weight="fill" size={20} /></span>
375
+ <div className="grid min-w-0 flex-1 gap-0.5">
376
+ <strong className="text-xs leading-4 text-warn-ink">{membership.state === 'not_enrolled' ? '入会后可使用会员停车权益' : '登录后查看会员停车权益'}</strong>
377
+ <small className="text-xs leading-3.5 text-warn-ink">权益以商场会员与停车系统实时结果为准</small>
377
378
  </div>
378
- <button type="button" disabled={isHistory} onClick={promptMembership}>
379
+ <button className="shrink-0 rounded-full border-0 bg-warning px-2.5 py-1.5 text-xs font-bold text-white" type="button" disabled={isHistory} onClick={promptMembership}>
379
380
  {membership.state === 'not_enrolled' ? '立即入会' : '去登录'}
380
381
  </button>
381
382
  </div>
@@ -386,10 +387,10 @@ export function ParkingPaymentCard(props: {
386
387
  服务端重算后报价与本按钮的金额随之刷新)。曾并列一个「不花积分直接支付」副入口,
387
388
  它是第二条并行路径——勾着积分却点它就是自相矛盾的状态,故收敛掉。
388
389
  */}
389
- <div className="parking-payment__actions">
390
+ <div className="parking-payment__actions mt-2.75 grid grid-cols-1 gap-1.5">
390
391
  <button
391
392
  type="button"
392
- className="parking-payment__action parking-payment__action--primary"
393
+ className="parking-payment__action parking-payment__action--primary flex min-h-9 items-center justify-center gap-1 whitespace-nowrap rounded-full border-2 border-primary bg-primary px-2.5 text-sm font-bold text-white shadow-md disabled:border-border disabled:bg-muted disabled:text-muted-foreground disabled:shadow-none"
393
394
  disabled={submitDisabled}
394
395
  title={submitTitle}
395
396
  onClick={() => submit(submitBenefitRefs)}
@@ -416,7 +417,7 @@ export function ParkingPaymentCard(props: {
416
417
  {/* 按钮为什么灰了必须说清楚,否则用户只会反复点。
417
418
  紧跟按钮下方而非浮在优惠区与按钮之间——它解释的是这颗按钮的状态。 */}
418
419
  {settlement && (
419
- <p className={`parking-payment__settlement parking-payment__settlement--${settlement.state}`}>
420
+ <p className={`parking-payment__settlement mt-2.75 flex items-center gap-1 rounded-md px-2.25 py-1.75 text-xs leading-4 ${settlement.state === 'paid' ? 'bg-success-soft text-success' : settlement.state === 'failed' ? 'bg-danger-soft text-destructive' : 'bg-muted text-secondary-foreground'}`}>
420
421
  {settlement.state === 'paid' ? (
421
422
  <CheckCircle size={16} weight="fill" />
422
423
  ) : (
@@ -427,7 +428,7 @@ export function ParkingPaymentCard(props: {
427
428
  )}
428
429
 
429
430
  {!confirmToken && !isHistory && !settlement && (
430
- <p className="parking-payment__token-expired">
431
+ <p className="parking-payment__token-expired mt-2.75 rounded-md border-2 border-danger-border bg-danger-soft px-2 py-1.75 text-xs leading-4 text-destructive">
431
432
  支付授权已过期,请重新查询停车费后再支付
432
433
  </p>
433
434
  )}
@@ -436,7 +437,7 @@ export function ParkingPaymentCard(props: {
436
437
  零费用时同样要出:「以出场实际计费为准」在此刻反而最要紧——现在免费不等于
437
438
  出场时免费,超时就开始计费。只有 caveats 为空才整块不出。 */}
438
439
  {data.caveats.length > 0 && (
439
- <footer className="parking-payment__foot">
440
+ <footer className="parking-payment__foot mt-2.5 flex items-start gap-1 border-t-2 border-border pt-2.25 text-xs leading-4 text-muted-foreground [&_svg]:shrink-0 [&_svg]:text-primary">
440
441
  <ShieldCheck size={14} />
441
442
  {data.caveats.join(';')}
442
443
  </footer>