@24city/web-console 0.3.0 → 0.3.1

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/dist/styles.css CHANGED
@@ -180,10 +180,11 @@
180
180
  }
181
181
  /*
182
182
  * 右上角账号入口,参照蝉镜:顶栏只放 34px 头像(昵称首字的主色渐变圆,会员加金边和小皇冠),
183
- * 展开 344px 白色卡片:12px 圆角、柔和投影,身份行 → 套餐区(plan-panel.module.css)→ 个人中心 → 退出登录。
183
+ * 展开 344px 白色卡片:12px 圆角、柔和投影,身份行 → 套餐区(plan-panel.module.css)→ 产品额度(可选,allowance-meter.module.css)
184
+ * → 个人中心 → 退出登录。
184
185
  */
185
186
 
186
- ._trigger_i8lt2_6.semi-button {
187
+ ._trigger_w6k09_7.semi-button {
187
188
  display: inline-flex;
188
189
  width: 40px;
189
190
  height: 40px;
@@ -196,48 +197,48 @@
196
197
  }
197
198
 
198
199
  /* 文字按钮的悬停、按下和展开态:比 Semi 的悬停规则多一个类。 */
199
- ._trigger_i8lt2_6.semi-button.semi-button-borderless:not(.semi-button-disabled):hover,
200
- ._trigger_i8lt2_6.semi-button.semi-button-borderless:not(.semi-button-disabled):active,
201
- ._trigger_i8lt2_6.semi-button[aria-expanded='true'] {
200
+ ._trigger_w6k09_7.semi-button.semi-button-borderless:not(.semi-button-disabled):hover,
201
+ ._trigger_w6k09_7.semi-button.semi-button-borderless:not(.semi-button-disabled):active,
202
+ ._trigger_w6k09_7.semi-button[aria-expanded='true'] {
202
203
  background: rgba(var(--app-brand-6), 0.08);
203
204
  }
204
205
 
205
206
  /* ---------- 头像 ---------- */
206
207
 
207
- ._avatarWrap_i8lt2_27 {
208
+ ._avatarWrap_w6k09_28 {
208
209
  position: relative;
209
210
  display: inline-flex;
210
211
  flex: none;
211
212
  border-radius: 50%;
212
213
  }
213
214
 
214
- ._avatar_i8lt2_27.semi-avatar {
215
+ ._avatar_w6k09_28.semi-avatar {
215
216
  background: linear-gradient(135deg, rgb(var(--app-brand-4)) 0%, rgb(var(--app-brand-6)) 100%);
216
217
  color: var(--semi-color-white);
217
218
  font-weight: 600;
218
219
  }
219
220
 
220
221
  /* Semi 在头像里的文字上写死了字号(small 是 12px),字号由头像本身决定。 */
221
- ._avatar_i8lt2_27 .semi-avatar-label {
222
+ ._avatar_w6k09_28 .semi-avatar-label {
222
223
  font-size: inherit;
223
224
  line-height: 1;
224
225
  }
225
226
 
226
- ._avatarWrap_i8lt2_27[data-size='large'] ._avatar_i8lt2_27.semi-avatar {
227
+ ._avatarWrap_w6k09_28[data-size='large'] ._avatar_w6k09_28.semi-avatar {
227
228
  box-shadow: 0 0 0 2px var(--semi-color-bg-1), 0 0 0 3px rgb(var(--semi-grey-2));
228
229
  font-size: 20px;
229
230
  }
230
231
 
231
- ._avatarWrap_i8lt2_27[data-size='small'] ._avatar_i8lt2_27.semi-avatar {
232
+ ._avatarWrap_w6k09_28[data-size='small'] ._avatar_w6k09_28.semi-avatar {
232
233
  font-size: 15px;
233
234
  }
234
235
 
235
236
  /* 会员:金色描边 + 右下角小皇冠。 */
236
- ._avatarWrap_i8lt2_27[data-member='true'] ._avatar_i8lt2_27.semi-avatar {
237
+ ._avatarWrap_w6k09_28[data-member='true'] ._avatar_w6k09_28.semi-avatar {
237
238
  box-shadow: 0 0 0 2px var(--semi-color-bg-1), 0 0 0 3.5px rgb(var(--semi-amber-4));
238
239
  }
239
240
 
240
- ._avatarWrap_i8lt2_27[data-member='true']::after {
241
+ ._avatarWrap_w6k09_28[data-member='true']::after {
241
242
  position: absolute;
242
243
  right: -3px;
243
244
  bottom: -2px;
@@ -249,7 +250,7 @@
249
250
  content: '';
250
251
  }
251
252
 
252
- ._avatarWrap_i8lt2_27[data-size='large'][data-member='true']::after {
253
+ ._avatarWrap_w6k09_28[data-size='large'][data-member='true']::after {
253
254
  width: 20px;
254
255
  height: 20px;
255
256
  background-size: 14px;
@@ -257,7 +258,7 @@
257
258
 
258
259
  /* ---------- 卡片 ---------- */
259
260
 
260
- ._card_i8lt2_80 {
261
+ ._card_w6k09_81 {
261
262
  width: 344px;
262
263
  max-height: calc(100dvh - 76px);
263
264
  overflow-y: auto;
@@ -267,7 +268,7 @@
267
268
  box-shadow: 0 0 1px rgba(var(--app-shadow-color), 0.2), 0 12px 32px rgba(var(--app-shadow-color), 0.12);
268
269
  }
269
270
 
270
- ._identity_i8lt2_90 {
271
+ ._identity_w6k09_91 {
271
272
  display: flex;
272
273
  min-width: 0;
273
274
  align-items: center;
@@ -275,7 +276,7 @@
275
276
  padding: 0 4px;
276
277
  }
277
278
 
278
- ._who_i8lt2_98 {
279
+ ._who_w6k09_99 {
279
280
  display: flex;
280
281
  min-width: 0;
281
282
  flex: 1;
@@ -284,14 +285,14 @@
284
285
  gap: 4px;
285
286
  }
286
287
 
287
- ._nameRow_i8lt2_107 {
288
+ ._nameRow_w6k09_108 {
288
289
  display: flex;
289
290
  max-width: 100%;
290
291
  align-items: center;
291
292
  gap: 6px;
292
293
  }
293
294
 
294
- ._name_i8lt2_107 {
295
+ ._name_w6k09_108 {
295
296
  overflow: hidden;
296
297
  color: var(--semi-color-text-0);
297
298
  font-size: var(--app-font-size-h6);
@@ -301,7 +302,7 @@
301
302
  white-space: nowrap;
302
303
  }
303
304
 
304
- ._planChip_i8lt2_124 {
305
+ ._planChip_w6k09_125 {
305
306
  display: inline-flex;
306
307
  height: 20px;
307
308
  flex: none;
@@ -315,23 +316,23 @@
315
316
  white-space: nowrap;
316
317
  }
317
318
 
318
- ._planChip_i8lt2_124[data-tone='free'] {
319
+ ._planChip_w6k09_125[data-tone='free'] {
319
320
  background: var(--semi-color-fill-1);
320
321
  color: var(--semi-color-text-2);
321
322
  }
322
323
 
323
- ._planChip_i8lt2_124[data-tone='member'] {
324
+ ._planChip_w6k09_125[data-tone='member'] {
324
325
  padding-left: 4px;
325
326
  background: linear-gradient(90deg, rgb(var(--semi-amber-1)), rgb(var(--semi-amber-3)));
326
327
  color: rgb(var(--semi-amber-9));
327
328
  }
328
329
 
329
- ._planChip_i8lt2_124[data-tone='warning'] {
330
+ ._planChip_w6k09_125[data-tone='warning'] {
330
331
  background: rgb(var(--semi-orange-0));
331
332
  color: rgb(var(--semi-orange-6));
332
333
  }
333
334
 
334
- ._diamond_i8lt2_154 {
335
+ ._diamond_w6k09_155 {
335
336
  width: 14px;
336
337
  height: 14px;
337
338
  background: url('./assets/diamond-BuDSsnw-.webp') center / contain no-repeat;
@@ -339,8 +340,8 @@
339
340
 
340
341
  /* 当前空间:一行小字,多个空间时整行是按钮,点开在下面列出空间。
341
342
  卡片里的文字按钮都写成“.card .x:global(.semi-button.semi-button-borderless)”,悬停时比 Semi 文字按钮的悬停规则多一个类。 */
342
- ._card_i8lt2_80 ._spaceToggle_i8lt2_162.semi-button.semi-button-borderless,
343
- ._spaceStatic_i8lt2_163 {
343
+ ._card_w6k09_81 ._spaceToggle_w6k09_163.semi-button.semi-button-borderless,
344
+ ._spaceStatic_w6k09_164 {
344
345
  display: inline-flex;
345
346
  max-width: 100%;
346
347
  height: 22px;
@@ -354,26 +355,26 @@
354
355
  font-weight: 400;
355
356
  }
356
357
 
357
- ._card_i8lt2_80 ._spaceToggle_i8lt2_162.semi-button.semi-button-borderless:hover,
358
- ._card_i8lt2_80 ._spaceToggle_i8lt2_162.semi-button.semi-button-borderless:active,
359
- ._card_i8lt2_80 ._spaceToggle_i8lt2_162.semi-button.semi-button-borderless[aria-expanded='true'] {
358
+ ._card_w6k09_81 ._spaceToggle_w6k09_163.semi-button.semi-button-borderless:hover,
359
+ ._card_w6k09_81 ._spaceToggle_w6k09_163.semi-button.semi-button-borderless:active,
360
+ ._card_w6k09_81 ._spaceToggle_w6k09_163.semi-button.semi-button-borderless[aria-expanded='true'] {
360
361
  background: var(--semi-color-fill-1);
361
362
  color: var(--semi-color-text-1);
362
363
  }
363
364
 
364
- ._spaceSwitchText_i8lt2_184 {
365
+ ._spaceSwitchText_w6k09_185 {
365
366
  flex: none;
366
367
  margin-left: 2px;
367
368
  color: rgb(var(--app-brand-6));
368
369
  }
369
370
 
370
- ._spaceName_i8lt2_190 {
371
+ ._spaceName_w6k09_191 {
371
372
  overflow: hidden;
372
373
  text-overflow: ellipsis;
373
374
  white-space: nowrap;
374
375
  }
375
376
 
376
- ._spaceType_i8lt2_196 {
377
+ ._spaceType_w6k09_197 {
377
378
  flex: none;
378
379
  padding: 0 5px;
379
380
  border-radius: 4px;
@@ -383,7 +384,7 @@
383
384
  line-height: 16px;
384
385
  }
385
386
 
386
- ._spaceList_i8lt2_206 {
387
+ ._spaceList_w6k09_207 {
387
388
  display: flex;
388
389
  flex-direction: column;
389
390
  margin-top: 12px;
@@ -392,7 +393,7 @@
392
393
  border-radius: 10px;
393
394
  }
394
395
 
395
- ._card_i8lt2_80 ._spaceOption_i8lt2_215.semi-button.semi-button-borderless {
396
+ ._card_w6k09_81 ._spaceOption_w6k09_216.semi-button.semi-button-borderless {
396
397
  display: flex;
397
398
  height: 36px;
398
399
  align-items: center;
@@ -404,35 +405,44 @@
404
405
  font-weight: 400;
405
406
  }
406
407
 
407
- ._card_i8lt2_80 ._spaceOption_i8lt2_215.semi-button.semi-button-borderless:hover,
408
- ._card_i8lt2_80 ._spaceOption_i8lt2_215.semi-button.semi-button-borderless:active {
408
+ ._card_w6k09_81 ._spaceOption_w6k09_216.semi-button.semi-button-borderless:hover,
409
+ ._card_w6k09_81 ._spaceOption_w6k09_216.semi-button.semi-button-borderless:active {
409
410
  background: var(--semi-color-fill-1);
410
411
  color: var(--semi-color-text-0);
411
412
  }
412
413
 
413
- ._card_i8lt2_80 ._spaceOption_i8lt2_215.semi-button.semi-button-borderless[aria-current='true'] {
414
+ ._card_w6k09_81 ._spaceOption_w6k09_216.semi-button.semi-button-borderless[aria-current='true'] {
414
415
  color: rgb(var(--app-brand-6));
415
416
  }
416
417
 
417
- ._spaceCheck_i8lt2_237 {
418
+ ._spaceCheck_w6k09_238 {
418
419
  display: inline-flex;
419
420
  width: 20px;
420
421
  flex: none;
421
422
  }
422
423
 
423
- ._plan_i8lt2_124 {
424
+ ._plan_w6k09_125 {
424
425
  margin-top: 16px;
425
426
  }
426
427
 
428
+ /* 产品额度:产品组件返回 null 时这一格是空的,不留间距。 */
429
+ ._allowance_w6k09_249 {
430
+ margin-top: 8px;
431
+ }
432
+
433
+ ._allowance_w6k09_249:empty {
434
+ display: none;
435
+ }
436
+
427
437
  /* ---------- 个人中心与退出 ---------- */
428
438
 
429
- ._links_i8lt2_249 {
439
+ ._links_w6k09_259 {
430
440
  display: flex;
431
441
  flex-direction: column;
432
442
  margin-top: 8px;
433
443
  }
434
444
 
435
- ._card_i8lt2_80 ._link_i8lt2_249.semi-button.semi-button-borderless {
445
+ ._card_w6k09_81 ._link_w6k09_259.semi-button.semi-button-borderless {
436
446
  display: flex;
437
447
  height: 44px;
438
448
  align-items: center;
@@ -445,49 +455,49 @@
445
455
  font-weight: 400;
446
456
  }
447
457
 
448
- ._card_i8lt2_80 ._link_i8lt2_249 .semi-button-content {
458
+ ._card_w6k09_81 ._link_w6k09_259 .semi-button-content {
449
459
  display: flex;
450
460
  width: 100%;
451
461
  align-items: center;
452
462
  gap: 10px;
453
463
  }
454
464
 
455
- ._card_i8lt2_80 ._link_i8lt2_249.semi-button.semi-button-borderless:hover,
456
- ._card_i8lt2_80 ._link_i8lt2_249.semi-button.semi-button-borderless:active {
465
+ ._card_w6k09_81 ._link_w6k09_259.semi-button.semi-button-borderless:hover,
466
+ ._card_w6k09_81 ._link_w6k09_259.semi-button.semi-button-borderless:active {
457
467
  background: var(--semi-color-fill-1);
458
468
  color: var(--semi-color-text-0);
459
469
  }
460
470
 
461
- ._card_i8lt2_80 ._link_i8lt2_249.semi-button.semi-button-borderless[aria-current='page'],
462
- ._card_i8lt2_80 ._link_i8lt2_249.semi-button.semi-button-borderless[aria-current='page']:hover {
471
+ ._card_w6k09_81 ._link_w6k09_259.semi-button.semi-button-borderless[aria-current='page'],
472
+ ._card_w6k09_81 ._link_w6k09_259.semi-button.semi-button-borderless[aria-current='page']:hover {
463
473
  background: rgb(var(--app-brand-1));
464
474
  color: rgb(var(--app-brand-6));
465
475
  }
466
476
 
467
- ._linkIcon_i8lt2_287 {
477
+ ._linkIcon_w6k09_297 {
468
478
  display: inline-flex;
469
479
  flex: none;
470
480
  color: var(--semi-color-text-2);
471
481
  font-size: 16px;
472
482
  }
473
483
 
474
- ._card_i8lt2_80 ._link_i8lt2_249.semi-button.semi-button-borderless[aria-current='page'] ._linkIcon_i8lt2_287 {
484
+ ._card_w6k09_81 ._link_w6k09_259.semi-button.semi-button-borderless[aria-current='page'] ._linkIcon_w6k09_297 {
475
485
  color: rgb(var(--app-brand-6));
476
486
  }
477
487
 
478
- ._linkLabel_i8lt2_298 {
488
+ ._linkLabel_w6k09_308 {
479
489
  flex: 1;
480
490
  text-align: left;
481
491
  }
482
492
 
483
- ._linkArrow_i8lt2_303 {
493
+ ._linkArrow_w6k09_313 {
484
494
  flex: none;
485
495
  color: var(--semi-color-text-3);
486
496
  font-size: 12px;
487
497
  }
488
498
 
489
499
  /* 外观(颜色模式)一行:与上面的菜单项同高同边距,右侧是分段选择;产品没开放暗色时不出现。 */
490
- ._appearance_i8lt2_310 {
500
+ ._appearance_w6k09_320 {
491
501
  display: flex;
492
502
  height: 44px;
493
503
  align-items: center;
@@ -497,13 +507,13 @@
497
507
  font-size: var(--app-font-size-body);
498
508
  }
499
509
 
500
- ._divider_i8lt2_320 {
510
+ ._divider_w6k09_330 {
501
511
  height: 1px;
502
512
  margin: 4px 0;
503
513
  background: var(--semi-color-fill-1);
504
514
  }
505
515
 
506
- ._card_i8lt2_80 ._logout_i8lt2_326.semi-button.semi-button-borderless {
516
+ ._card_w6k09_81 ._logout_w6k09_336.semi-button.semi-button-borderless {
507
517
  height: 44px;
508
518
  border-radius: 8px;
509
519
  color: rgb(var(--semi-red-5));
@@ -511,14 +521,14 @@
511
521
  font-weight: 400;
512
522
  }
513
523
 
514
- ._card_i8lt2_80 ._logout_i8lt2_326.semi-button.semi-button-borderless:hover,
515
- ._card_i8lt2_80 ._logout_i8lt2_326.semi-button.semi-button-borderless:active {
524
+ ._card_w6k09_81 ._logout_w6k09_336.semi-button.semi-button-borderless:hover,
525
+ ._card_w6k09_81 ._logout_w6k09_336.semi-button.semi-button-borderless:active {
516
526
  background: rgb(var(--semi-red-0));
517
527
  color: rgb(var(--semi-red-5));
518
528
  }
519
529
 
520
530
  @media (max-width: 576px) {
521
- ._card_i8lt2_80 {
531
+ ._card_w6k09_81 {
522
532
  width: calc(100vw - 24px);
523
533
  }
524
534
  }
@@ -2173,6 +2183,67 @@
2173
2183
  justify-content: space-between;
2174
2184
  }
2175
2185
  }
2186
+ /*
2187
+ * 账号卡片里的一条额度(AllowanceMeter):浅灰圆角块,名称与“已用 80/120 秒”一行,下面是 6px 进度条和一句说明。
2188
+ * 进度条平时用强调色(--app-strong-bg,与卡片里的黑色主按钮同一套),用满或先用不了时进度条和数字变橙色;不用品牌主色,
2189
+ * 否则橙色系品牌(如 AdFlow)的“还有”和“用完”分不出来。读不到时数字变灰。两种颜色模式下都成立。
2190
+ */
2191
+
2192
+ ._meter_o7x3q_7 {
2193
+ display: flex;
2194
+ flex-direction: column;
2195
+ gap: 8px;
2196
+ padding: 12px 16px;
2197
+ border-radius: 12px;
2198
+ background: var(--semi-color-fill-0);
2199
+ }
2200
+
2201
+ ._head_o7x3q_16 {
2202
+ display: flex;
2203
+ min-width: 0;
2204
+ align-items: baseline;
2205
+ justify-content: space-between;
2206
+ gap: 12px;
2207
+ }
2208
+
2209
+ ._label_o7x3q_24 {
2210
+ overflow: hidden;
2211
+ color: var(--semi-color-text-1);
2212
+ font-size: var(--app-font-size-compact);
2213
+ line-height: 20px;
2214
+ text-overflow: ellipsis;
2215
+ white-space: nowrap;
2216
+ }
2217
+
2218
+ ._value_o7x3q_33 {
2219
+ flex: none;
2220
+ color: var(--semi-color-text-0);
2221
+ font-size: var(--app-font-size-compact);
2222
+ font-variant-numeric: tabular-nums;
2223
+ font-weight: 500;
2224
+ line-height: 20px;
2225
+ white-space: nowrap;
2226
+ }
2227
+
2228
+ ._value_o7x3q_33[data-tone='warning'] {
2229
+ color: var(--semi-color-warning);
2230
+ }
2231
+
2232
+ ._value_o7x3q_33[data-tone='muted'] {
2233
+ color: var(--semi-color-text-2);
2234
+ font-weight: 400;
2235
+ }
2236
+
2237
+ /* Semi 的横向进度条自带上下 4px 外边距,间距由 .meter 的 gap 统一给。 */
2238
+ ._meter_o7x3q_7 ._bar_o7x3q_53.semi-progress-horizontal {
2239
+ margin: 0;
2240
+ }
2241
+
2242
+ ._note_o7x3q_57 {
2243
+ color: var(--semi-color-text-2);
2244
+ font-size: var(--app-font-size-caption);
2245
+ line-height: 18px;
2246
+ }
2176
2247
  /* 套餐数量胶囊:白底细边,满了换成暖金底并带“升级”文字按钮。 */
2177
2248
  ._pill_1hckq_2 {
2178
2249
  display: inline-flex;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@24city/web-console",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "24.city 产品用户端的界面底座:Semi Design 主题与设计变量、控制台外壳、账号与会员界面、列表与数据组件、界面规范与守卫",
5
5
  "license": "MIT",
6
6
  "type": "module",