@q1travel/design-system 0.7.3 → 0.8.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.
@@ -5262,52 +5262,124 @@ a.q1-card:focus-visible {
5262
5262
  .choicebox--checkbox:has(.choicebox__input:disabled:checked) .choicebox__indicator {
5263
5263
  background: var(--q1-color-gray-500);
5264
5264
  }
5265
- /* 实测外部参考:裸轨(无外框/无背景/无 padding),图标抽离文字块、绝对定位在 28px 凹槽外;
5266
- 悬停只把文字/图标从 text-secondary 加深到 text-primary,无背景浸染、无品牌色——
5267
- 这是页面间的纯导航链(chrome),不是行动号召,indigo 只守「动作」。 */
5265
+ /* 数据集分页:数字页码、已知总数与未知尾页。数据请求和 URL 状态由消费方控制。 */
5268
5266
  .pagination {
5267
+ display: flex;
5268
+ flex-wrap: wrap;
5269
+ align-items: center;
5270
+ justify-content: space-between;
5271
+ gap: var(--q1-space-3);
5272
+ width: 100%;
5273
+ }
5274
+ .pagination__summary {
5275
+ min-width: 0;
5276
+ font-size: 13px;
5277
+ line-height: 20px;
5278
+ color: var(--q1-color-text-secondary);
5279
+ }
5280
+ .pagination__controls {
5281
+ display: inline-flex;
5282
+ align-items: center;
5283
+ flex-wrap: wrap;
5284
+ gap: var(--q1-space-1);
5285
+ }
5286
+ .pagination__page-size {
5287
+ display: inline-flex;
5288
+ align-items: center;
5289
+ margin-right: var(--q1-space-2);
5290
+ }
5291
+ .pagination__button {
5292
+ display: inline-flex;
5293
+ align-items: center;
5294
+ justify-content: center;
5295
+ min-width: 32px;
5296
+ min-height: 32px;
5297
+ padding: 4px 8px;
5298
+ border: 1px solid transparent;
5299
+ border-radius: var(--q1-radius-2);
5300
+ background: transparent;
5301
+ color: var(--q1-color-text-secondary);
5302
+ font: inherit;
5303
+ font-size: 14px;
5304
+ line-height: 20px;
5305
+ font-variant-numeric: tabular-nums;
5306
+ cursor: pointer;
5307
+ }
5308
+ .pagination__button:hover:not(:disabled) {
5309
+ background: var(--q1-color-bg-subtle);
5310
+ color: var(--q1-color-text-primary);
5311
+ }
5312
+ .pagination__button:focus-visible {
5313
+ outline: none;
5314
+ box-shadow: var(--q1-shadow-focus);
5315
+ }
5316
+ .pagination__button--nav {
5317
+ border-color: var(--q1-color-border);
5318
+ }
5319
+ .pagination__button--current {
5320
+ color: var(--q1-color-text-primary);
5321
+ background: var(--q1-color-bg-subtle);
5322
+ font-weight: var(--q1-font-weight-medium);
5323
+ }
5324
+ .pagination__button:disabled {
5325
+ border-color: var(--q1-color-border);
5326
+ background: var(--q1-color-bg-subtle);
5327
+ color: var(--q1-color-text-muted);
5328
+ cursor: not-allowed;
5329
+ }
5330
+ .pagination__ellipsis {
5331
+ min-width: 24px;
5332
+ color: var(--q1-color-text-muted);
5333
+ text-align: center;
5334
+ }
5335
+ @media (pointer: coarse) {
5336
+ .pagination__button {
5337
+ min-width: 44px;
5338
+ min-height: 44px;
5339
+ }
5340
+ }
5341
+
5342
+ /* 文档顺序导航:裸轨,无外框/背景;图标锚在标题文字块内。 */
5343
+ .docs-pagination {
5269
5344
  display: flex;
5270
5345
  flex-wrap: wrap;
5271
5346
  align-items: flex-start;
5272
5347
  justify-content: space-between;
5273
5348
  width: 100%;
5274
5349
  }
5275
- .pagination__link {
5350
+ .docs-pagination__link {
5276
5351
  display: block;
5277
5352
  padding: 4px var(--q1-space-2);
5278
5353
  border-radius: var(--q1-radius-2);
5279
5354
  text-decoration: none;
5280
5355
  }
5281
- .pagination__link--prev {
5356
+ .docs-pagination__link--prev {
5282
5357
  padding-left: 28px;
5283
5358
  }
5284
- .pagination__link--next {
5359
+ .docs-pagination__link--next {
5285
5360
  padding-right: 28px;
5286
5361
  margin-left: auto;
5287
5362
  text-align: right;
5288
5363
  }
5289
- .pagination__link:focus-visible {
5364
+ .docs-pagination__link:focus-visible {
5290
5365
  outline: none;
5291
5366
  box-shadow: var(--q1-shadow-focus);
5292
5367
  }
5293
- .pagination__label {
5368
+ .docs-pagination__label {
5294
5369
  display: block;
5295
5370
  margin-bottom: 2px;
5296
5371
  font-size: 13px;
5297
5372
  color: var(--q1-color-text-secondary);
5298
- transition: color 0.2s ease-in-out;
5299
5373
  }
5300
- .pagination__link:hover .pagination__label {
5374
+ .docs-pagination__link:hover .docs-pagination__label {
5301
5375
  color: var(--q1-color-text-primary);
5302
5376
  }
5303
- /* 定位上下文钉在标题文字块(实测外部参考:图标是标题块的子节点,随文字宽度走,
5304
- 而不是钉在整条链接上)——否则图标会漂出链接可点/可聚焦的框外。 */
5305
- .pagination__title-frame {
5377
+ .docs-pagination__title-frame {
5306
5378
  position: relative;
5307
5379
  display: inline-block;
5308
5380
  max-width: 20em;
5309
5381
  }
5310
- .pagination__title {
5382
+ .docs-pagination__title {
5311
5383
  display: block;
5312
5384
  overflow: hidden;
5313
5385
  white-space: nowrap;
@@ -5317,28 +5389,27 @@ a.q1-card:focus-visible {
5317
5389
  font-weight: var(--q1-font-weight-medium);
5318
5390
  color: var(--q1-color-text-primary);
5319
5391
  }
5320
- .pagination__chevron-slot {
5392
+ .docs-pagination__chevron-slot {
5321
5393
  position: absolute;
5322
5394
  top: 2px;
5323
5395
  display: block;
5324
5396
  color: var(--q1-color-text-secondary);
5325
- transition: color 0.2s ease-in-out;
5326
5397
  }
5327
- .pagination__link--prev .pagination__chevron-slot {
5398
+ .docs-pagination__link--prev .docs-pagination__chevron-slot {
5328
5399
  left: -26px;
5329
5400
  }
5330
- .pagination__link--next .pagination__chevron-slot {
5401
+ .docs-pagination__link--next .docs-pagination__chevron-slot {
5331
5402
  right: -26px;
5332
5403
  }
5333
- .pagination__link:hover .pagination__chevron-slot {
5404
+ .docs-pagination__link:hover .docs-pagination__chevron-slot {
5334
5405
  color: var(--q1-color-text-primary);
5335
5406
  }
5336
- .pagination__chevron {
5407
+ .docs-pagination__chevron {
5337
5408
  display: block;
5338
5409
  width: 20px;
5339
5410
  height: 20px;
5340
5411
  }
5341
- .pagination__slot {
5412
+ .docs-pagination__slot {
5342
5413
  display: block;
5343
5414
  }
5344
5415
  .feedback {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@q1travel/design-system",
3
- "version": "0.7.3",
3
+ "version": "0.8.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist-pkg/design-system.js",
@@ -37,7 +37,7 @@
37
37
  "check:shell": "npm run sync:contracts && node scripts/check-shell.mjs && node scripts/check-token-package.mjs && npm run check:release-provenance",
38
38
  "check:browser:strictmode": "node scripts/check-browser.mjs --strictmode-ref",
39
39
  "check:browser": "npm run check:browser:strictmode && node scripts/check-browser.mjs",
40
- "check:package-api": "node scripts/check-package-api.mjs && node --test scripts/check-controls-contract.test.mjs",
40
+ "check:package-api": "node scripts/check-package-api.mjs && node --test scripts/check-controls-contract.test.mjs && node --test scripts/check-pagination-contract.test.mjs",
41
41
  "check:release-provenance": "node --test scripts/check-release-provenance.test.mjs && node scripts/check-release-provenance.mjs",
42
42
  "check": "npm run build && npm run check:shell && npm run check:browser",
43
43
  "build:lib": "vite build --config vite.lib.config.ts",