@q1travel/design-system 0.7.1 → 0.7.3
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/bin/q1-design.mjs +108 -15
- package/contracts/button-api-compatibility.md +29 -3
- package/contracts/overlay-foundation.md +219 -0
- package/contracts/status-chip-badge-migration.md +69 -0
- package/dist-pkg/design-system.d.ts +17 -7
- package/dist-pkg/design-system.js +3402 -3050
- package/dist-pkg/style.css +256 -47
- package/dist-pkg/tokens.css +4 -0
- package/package.json +2 -2
package/dist-pkg/style.css
CHANGED
|
@@ -207,6 +207,8 @@
|
|
|
207
207
|
--q1-shadow-popover: 0 8px 28px color-mix(in srgb, var(--q1-color-shadow) 16%, transparent);
|
|
208
208
|
--q1-shadow-modal: 0 16px 48px color-mix(in srgb, var(--q1-color-shadow) 32%, transparent);
|
|
209
209
|
--q1-z-popover: 1200;
|
|
210
|
+
--q1-z-overlay-root: 1300;
|
|
211
|
+
--q1-z-toast: 1400;
|
|
210
212
|
}
|
|
211
213
|
|
|
212
214
|
:root[data-theme='dark'] {
|
|
@@ -417,12 +419,47 @@
|
|
|
417
419
|
opacity: 0.48;
|
|
418
420
|
}
|
|
419
421
|
|
|
420
|
-
.button--loading
|
|
422
|
+
.button--loading,
|
|
423
|
+
.button--busy {
|
|
421
424
|
cursor: progress;
|
|
422
425
|
}
|
|
423
426
|
|
|
427
|
+
.button__spinner-slot {
|
|
428
|
+
display: inline-flex;
|
|
429
|
+
flex: none;
|
|
430
|
+
align-items: center;
|
|
431
|
+
}
|
|
432
|
+
|
|
424
433
|
.button__spinner {
|
|
425
|
-
animation:
|
|
434
|
+
animation: none;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
.button__label-slot {
|
|
438
|
+
display: inline-grid;
|
|
439
|
+
min-width: 0;
|
|
440
|
+
align-items: center;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
.button__label {
|
|
444
|
+
grid-area: 1 / 1;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
.button__label--original-hidden {
|
|
448
|
+
opacity: 0;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
.button__label--busy-hidden {
|
|
452
|
+
visibility: hidden;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
.button__label--busy-visible {
|
|
456
|
+
visibility: visible;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
460
|
+
.button__spinner {
|
|
461
|
+
animation: button-spin 0.7s linear infinite;
|
|
462
|
+
}
|
|
426
463
|
}
|
|
427
464
|
|
|
428
465
|
.button__affix {
|
|
@@ -1258,6 +1295,12 @@
|
|
|
1258
1295
|
|
|
1259
1296
|
/* 组件自身样式。发布进 npm 包,foundations.css 之后加载。 */
|
|
1260
1297
|
|
|
1298
|
+
[data-q1-portal='overlay'] {
|
|
1299
|
+
position: relative;
|
|
1300
|
+
z-index: var(--q1-z-overlay-root);
|
|
1301
|
+
isolation: isolate;
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1261
1304
|
@keyframes button-spin {
|
|
1262
1305
|
to {
|
|
1263
1306
|
transform: rotate(360deg);
|
|
@@ -2386,7 +2429,7 @@ a.breadcrumb__link:hover {
|
|
|
2386
2429
|
padding: var(--q1-space-6);
|
|
2387
2430
|
}
|
|
2388
2431
|
|
|
2389
|
-
/* 分段控件 Switch
|
|
2432
|
+
/* 分段控件 Switch:一组互斥选项,采用 radiogroup/radio 复合语义,选中段抬起。 */
|
|
2390
2433
|
.switch-control {
|
|
2391
2434
|
display: inline-flex;
|
|
2392
2435
|
align-items: center;
|
|
@@ -2411,6 +2454,9 @@ a.breadcrumb__link:hover {
|
|
|
2411
2454
|
padding: 0 var(--q1-space-3);
|
|
2412
2455
|
border-radius: var(--q1-radius-1);
|
|
2413
2456
|
color: var(--q1-color-text-secondary);
|
|
2457
|
+
border: 0;
|
|
2458
|
+
background: transparent;
|
|
2459
|
+
font: inherit;
|
|
2414
2460
|
font-size: var(--q1-font-size-label-14);
|
|
2415
2461
|
font-weight: var(--q1-font-weight-medium);
|
|
2416
2462
|
line-height: var(--q1-line-height-label-14);
|
|
@@ -2422,22 +2468,22 @@ a.breadcrumb__link:hover {
|
|
|
2422
2468
|
flex: 1 1 0;
|
|
2423
2469
|
}
|
|
2424
2470
|
|
|
2425
|
-
.switch-control__option:hover {
|
|
2471
|
+
.switch-control__option:hover:not(:disabled) {
|
|
2426
2472
|
color: var(--q1-color-text-primary);
|
|
2427
2473
|
}
|
|
2428
2474
|
|
|
2429
|
-
.switch-control__option
|
|
2475
|
+
.switch-control__option[aria-checked='true'] {
|
|
2430
2476
|
background: var(--q1-color-bg-subtle);
|
|
2431
2477
|
color: var(--q1-color-text-primary);
|
|
2432
2478
|
box-shadow: inset 0 0 0 1px var(--q1-color-gray-400);
|
|
2433
2479
|
}
|
|
2434
2480
|
|
|
2435
|
-
.switch-control__option:
|
|
2481
|
+
.switch-control__option:focus-visible {
|
|
2436
2482
|
outline: none;
|
|
2437
2483
|
box-shadow: var(--q1-shadow-focus);
|
|
2438
2484
|
}
|
|
2439
2485
|
|
|
2440
|
-
.switch-control__option:
|
|
2486
|
+
.switch-control__option:disabled {
|
|
2441
2487
|
cursor: not-allowed;
|
|
2442
2488
|
opacity: 0.5;
|
|
2443
2489
|
}
|
|
@@ -2457,6 +2503,16 @@ a.breadcrumb__link:hover {
|
|
|
2457
2503
|
align-items: center;
|
|
2458
2504
|
}
|
|
2459
2505
|
|
|
2506
|
+
.switch-control__meta {
|
|
2507
|
+
color: var(--q1-color-text-muted);
|
|
2508
|
+
font-size: var(--q1-font-size-label-13);
|
|
2509
|
+
font-weight: var(--q1-font-weight-regular);
|
|
2510
|
+
}
|
|
2511
|
+
|
|
2512
|
+
.switch-control__option[aria-checked='true'] .switch-control__meta {
|
|
2513
|
+
color: var(--q1-color-text-secondary);
|
|
2514
|
+
}
|
|
2515
|
+
|
|
2460
2516
|
.tabs-root {
|
|
2461
2517
|
display: grid;
|
|
2462
2518
|
gap: var(--q1-space-4);
|
|
@@ -5783,8 +5839,8 @@ a.q1-card:focus-visible {
|
|
|
5783
5839
|
position: fixed;
|
|
5784
5840
|
right: var(--q1-space-6);
|
|
5785
5841
|
bottom: var(--q1-space-6);
|
|
5786
|
-
/*
|
|
5787
|
-
z-index:
|
|
5842
|
+
/* 通知保持可见;blocking overlay 打开时由 ToastProvider 禁止 action/close 交互。 */
|
|
5843
|
+
z-index: var(--q1-z-toast);
|
|
5788
5844
|
width: min(420px, calc(100vw - 2 * var(--q1-space-6)));
|
|
5789
5845
|
height: var(--toast-stack-h, 0px);
|
|
5790
5846
|
}
|
|
@@ -6947,7 +7003,6 @@ a.q1-card:focus-visible {
|
|
|
6947
7003
|
.modal {
|
|
6948
7004
|
position: fixed;
|
|
6949
7005
|
inset: 0;
|
|
6950
|
-
z-index: 80;
|
|
6951
7006
|
display: flex;
|
|
6952
7007
|
align-items: center;
|
|
6953
7008
|
justify-content: center;
|
|
@@ -7125,7 +7180,6 @@ a.q1-card:focus-visible {
|
|
|
7125
7180
|
.drawer {
|
|
7126
7181
|
position: fixed;
|
|
7127
7182
|
inset: 0;
|
|
7128
|
-
z-index: 80;
|
|
7129
7183
|
display: flex;
|
|
7130
7184
|
flex-direction: column;
|
|
7131
7185
|
justify-content: flex-end;
|
|
@@ -7210,7 +7264,6 @@ a.q1-card:focus-visible {
|
|
|
7210
7264
|
.sheet__backdrop {
|
|
7211
7265
|
position: fixed;
|
|
7212
7266
|
inset: 0;
|
|
7213
|
-
z-index: 69;
|
|
7214
7267
|
background: color-mix(in srgb, var(--q1-color-shadow) 80%, transparent);
|
|
7215
7268
|
}
|
|
7216
7269
|
|
|
@@ -7229,7 +7282,6 @@ a.q1-card:focus-visible {
|
|
|
7229
7282
|
/* 悬浮圆角面板(对标外部参考形态):四边不贴屏,inset 12 + 圆角 + 全边框。 */
|
|
7230
7283
|
.sheet__panel {
|
|
7231
7284
|
position: fixed;
|
|
7232
|
-
z-index: 70;
|
|
7233
7285
|
display: flex;
|
|
7234
7286
|
flex-direction: column;
|
|
7235
7287
|
border: 1px solid var(--q1-color-border-overlay);
|
|
@@ -7706,14 +7758,14 @@ a.q1-navigation__item[aria-disabled='true'] {
|
|
|
7706
7758
|
border: 1px solid var(--q1-color-border);
|
|
7707
7759
|
border-radius: var(--q1-radius-3);
|
|
7708
7760
|
background: var(--q1-color-bg-panel);
|
|
7709
|
-
padding: var(--q1-space-
|
|
7761
|
+
padding: var(--q1-space-1) var(--q1-space-2);
|
|
7710
7762
|
color: var(--q1-color-text-primary);
|
|
7711
7763
|
font: inherit;
|
|
7712
7764
|
text-align: start;
|
|
7713
7765
|
cursor: pointer;
|
|
7766
|
+
transition: transform 100ms cubic-bezier(.23, 1, .32, 1);
|
|
7714
7767
|
}
|
|
7715
7768
|
|
|
7716
|
-
.q1-context-switcher__trigger:hover,
|
|
7717
7769
|
.q1-context-switcher__trigger[aria-expanded='true'] {
|
|
7718
7770
|
background: var(--q1-color-bg-subtle);
|
|
7719
7771
|
border-color: var(--q1-color-border-strong);
|
|
@@ -7728,6 +7780,10 @@ a.q1-navigation__item[aria-disabled='true'] {
|
|
|
7728
7780
|
box-shadow: var(--q1-shadow-focus);
|
|
7729
7781
|
}
|
|
7730
7782
|
|
|
7783
|
+
.q1-context-switcher__popup[role='dialog']:has(> .q1-sr-only:focus) {
|
|
7784
|
+
box-shadow: var(--q1-shadow-focus);
|
|
7785
|
+
}
|
|
7786
|
+
|
|
7731
7787
|
.q1-context-switcher__current,
|
|
7732
7788
|
.q1-context-switcher__item-content {
|
|
7733
7789
|
display: grid;
|
|
@@ -7746,16 +7802,16 @@ a.q1-navigation__item[aria-disabled='true'] {
|
|
|
7746
7802
|
.q1-context-switcher__current-label,
|
|
7747
7803
|
.q1-context-switcher__item-label {
|
|
7748
7804
|
color: var(--q1-color-text-primary);
|
|
7749
|
-
font-size: var(--q1-font-size-label-
|
|
7805
|
+
font-size: var(--q1-font-size-label-13);
|
|
7750
7806
|
font-weight: var(--q1-font-weight-medium);
|
|
7751
|
-
line-height: var(--q1-line-height-label-
|
|
7807
|
+
line-height: var(--q1-line-height-label-13);
|
|
7752
7808
|
}
|
|
7753
7809
|
|
|
7754
7810
|
.q1-context-switcher__description {
|
|
7755
7811
|
color: var(--q1-color-text-secondary);
|
|
7756
|
-
font-size:
|
|
7812
|
+
font-size: 11px;
|
|
7757
7813
|
font-weight: var(--q1-font-weight-regular);
|
|
7758
|
-
line-height:
|
|
7814
|
+
line-height: 14px;
|
|
7759
7815
|
}
|
|
7760
7816
|
|
|
7761
7817
|
.q1-context-switcher__avatar,
|
|
@@ -7769,9 +7825,24 @@ a.q1-navigation__item[aria-disabled='true'] {
|
|
|
7769
7825
|
justify-content: center;
|
|
7770
7826
|
}
|
|
7771
7827
|
|
|
7828
|
+
.q1-context-switcher__avatar {
|
|
7829
|
+
width: 24px;
|
|
7830
|
+
height: 24px;
|
|
7831
|
+
overflow: hidden;
|
|
7832
|
+
border-radius: var(--q1-radius-2);
|
|
7833
|
+
background: var(--q1-color-bg-subtle);
|
|
7834
|
+
color: var(--q1-color-text-secondary);
|
|
7835
|
+
font-size: var(--q1-font-size-label-13);
|
|
7836
|
+
font-weight: var(--q1-font-weight-semibold);
|
|
7837
|
+
}
|
|
7838
|
+
|
|
7839
|
+
.q1-context-switcher__trigger .q1-context-switcher__avatar {
|
|
7840
|
+
width: 28px;
|
|
7841
|
+
height: 28px;
|
|
7842
|
+
}
|
|
7843
|
+
|
|
7772
7844
|
.q1-context-switcher__chevron {
|
|
7773
7845
|
color: var(--q1-color-text-muted);
|
|
7774
|
-
transition: transform 160ms ease;
|
|
7775
7846
|
}
|
|
7776
7847
|
|
|
7777
7848
|
.q1-context-switcher__trigger[aria-expanded='true'] .q1-context-switcher__chevron {
|
|
@@ -7793,25 +7864,50 @@ a.q1-navigation__item[aria-disabled='true'] {
|
|
|
7793
7864
|
}
|
|
7794
7865
|
|
|
7795
7866
|
.q1-context-switcher__popup[role='dialog'] {
|
|
7867
|
+
width: min(17.5rem, calc(100vw - var(--q1-space-4)));
|
|
7796
7868
|
opacity: 1;
|
|
7797
7869
|
transform: translateY(0) scale(1);
|
|
7798
|
-
transform-origin: top center;
|
|
7799
|
-
transition:
|
|
7800
|
-
opacity 150ms ease,
|
|
7801
|
-
transform 150ms ease;
|
|
7802
7870
|
}
|
|
7803
7871
|
|
|
7804
|
-
.q1-context-switcher__popup[role='dialog'][data-
|
|
7805
|
-
|
|
7872
|
+
.q1-context-switcher__popup[role='dialog'][data-open-modality='pointer'] {
|
|
7873
|
+
transition-property: opacity, transform;
|
|
7874
|
+
transition-duration: 140ms;
|
|
7875
|
+
transition-timing-function: cubic-bezier(.23, 1, .32, 1);
|
|
7876
|
+
}
|
|
7877
|
+
|
|
7878
|
+
.q1-context-switcher__popup[role='dialog'][data-open-modality='keyboard'] {
|
|
7879
|
+
transition: none;
|
|
7880
|
+
}
|
|
7881
|
+
|
|
7882
|
+
.q1-context-switcher__popup[role='dialog'][data-side='bottom'][dir='ltr'][data-align='start'],
|
|
7883
|
+
.q1-context-switcher__popup[role='dialog'][data-side='bottom'][dir='rtl'][data-align='end'] {
|
|
7884
|
+
transform-origin: top left;
|
|
7885
|
+
}
|
|
7886
|
+
|
|
7887
|
+
.q1-context-switcher__popup[role='dialog'][data-side='bottom'][dir='ltr'][data-align='end'],
|
|
7888
|
+
.q1-context-switcher__popup[role='dialog'][data-side='bottom'][dir='rtl'][data-align='start'] {
|
|
7889
|
+
transform-origin: top right;
|
|
7890
|
+
}
|
|
7891
|
+
|
|
7892
|
+
.q1-context-switcher__popup[role='dialog'][data-side='top'][dir='ltr'][data-align='start'],
|
|
7893
|
+
.q1-context-switcher__popup[role='dialog'][data-side='top'][dir='rtl'][data-align='end'] {
|
|
7894
|
+
transform-origin: bottom left;
|
|
7895
|
+
}
|
|
7896
|
+
|
|
7897
|
+
.q1-context-switcher__popup[role='dialog'][data-side='top'][dir='ltr'][data-align='end'],
|
|
7898
|
+
.q1-context-switcher__popup[role='dialog'][data-side='top'][dir='rtl'][data-align='start'] {
|
|
7899
|
+
transform-origin: bottom right;
|
|
7806
7900
|
}
|
|
7807
7901
|
|
|
7808
7902
|
@starting-style {
|
|
7809
|
-
.q1-context-switcher__popup[role='dialog'] {
|
|
7903
|
+
.q1-context-switcher__popup[role='dialog'][data-open-modality='pointer'][data-side='bottom'] {
|
|
7810
7904
|
opacity: 0;
|
|
7905
|
+
transform: translateY(-2px) scale(.98);
|
|
7811
7906
|
}
|
|
7812
7907
|
|
|
7813
|
-
|
|
7814
|
-
|
|
7908
|
+
.q1-context-switcher__popup[role='dialog'][data-open-modality='pointer'][data-side='top'] {
|
|
7909
|
+
opacity: 0;
|
|
7910
|
+
transform: translateY(2px) scale(.98);
|
|
7815
7911
|
}
|
|
7816
7912
|
}
|
|
7817
7913
|
|
|
@@ -7819,7 +7915,7 @@ a.q1-navigation__item[aria-disabled='true'] {
|
|
|
7819
7915
|
min-height: 0;
|
|
7820
7916
|
overflow-y: auto;
|
|
7821
7917
|
overscroll-behavior: contain;
|
|
7822
|
-
padding: var(--q1-space-
|
|
7918
|
+
padding: var(--q1-space-1);
|
|
7823
7919
|
}
|
|
7824
7920
|
|
|
7825
7921
|
.q1-context-switcher__popup[role='dialog'] .q1-context-switcher__groups {
|
|
@@ -7827,17 +7923,58 @@ a.q1-navigation__item[aria-disabled='true'] {
|
|
|
7827
7923
|
overflow-y: hidden;
|
|
7828
7924
|
}
|
|
7829
7925
|
|
|
7926
|
+
.q1-context-switcher__search {
|
|
7927
|
+
position: relative;
|
|
7928
|
+
display: flex;
|
|
7929
|
+
align-items: center;
|
|
7930
|
+
margin-block: var(--q1-space-1);
|
|
7931
|
+
}
|
|
7932
|
+
|
|
7933
|
+
.q1-context-switcher__scope-summary {
|
|
7934
|
+
display: flex;
|
|
7935
|
+
min-width: 0;
|
|
7936
|
+
min-height: 40px;
|
|
7937
|
+
align-items: center;
|
|
7938
|
+
gap: var(--q1-space-2);
|
|
7939
|
+
padding: var(--q1-space-1) var(--q1-space-2);
|
|
7940
|
+
}
|
|
7941
|
+
|
|
7942
|
+
.q1-context-switcher__search-icon {
|
|
7943
|
+
position: absolute;
|
|
7944
|
+
inset-inline-start: var(--q1-space-2);
|
|
7945
|
+
z-index: 1;
|
|
7946
|
+
display: inline-flex;
|
|
7947
|
+
color: var(--q1-color-text-muted);
|
|
7948
|
+
pointer-events: none;
|
|
7949
|
+
}
|
|
7950
|
+
|
|
7830
7951
|
.q1-context-switcher__popup[role='dialog'] input[type='search'] {
|
|
7831
7952
|
width: 100%;
|
|
7832
7953
|
min-width: 0;
|
|
7833
|
-
min-height:
|
|
7834
|
-
|
|
7835
|
-
border: 1px solid var(--q1-color-border);
|
|
7954
|
+
min-height: 32px;
|
|
7955
|
+
border: 1px solid transparent;
|
|
7836
7956
|
border-radius: var(--q1-radius-2);
|
|
7837
|
-
background:
|
|
7838
|
-
padding: var(--q1-space-
|
|
7957
|
+
background: transparent;
|
|
7958
|
+
padding-block: var(--q1-space-1);
|
|
7959
|
+
padding-inline: calc(var(--q1-space-2) * 4);
|
|
7839
7960
|
color: var(--q1-color-text-primary);
|
|
7840
|
-
font:
|
|
7961
|
+
font-size: var(--q1-font-size-label-13);
|
|
7962
|
+
font-weight: var(--q1-font-weight-regular);
|
|
7963
|
+
line-height: var(--q1-line-height-label-13);
|
|
7964
|
+
}
|
|
7965
|
+
|
|
7966
|
+
.q1-context-switcher__search-shortcut {
|
|
7967
|
+
position: absolute;
|
|
7968
|
+
inset-inline-end: var(--q1-space-2);
|
|
7969
|
+
color: var(--q1-color-text-muted);
|
|
7970
|
+
font-size: var(--q1-font-size-label-13);
|
|
7971
|
+
font-weight: var(--q1-font-weight-medium);
|
|
7972
|
+
line-height: var(--q1-line-height-label-13);
|
|
7973
|
+
pointer-events: none;
|
|
7974
|
+
}
|
|
7975
|
+
|
|
7976
|
+
.q1-context-switcher__search:focus-within .q1-context-switcher__search-shortcut {
|
|
7977
|
+
visibility: hidden;
|
|
7841
7978
|
}
|
|
7842
7979
|
|
|
7843
7980
|
.q1-context-switcher__popup[role='dialog'] input[type='search']::placeholder {
|
|
@@ -7858,6 +7995,13 @@ a.q1-navigation__item[aria-disabled='true'] {
|
|
|
7858
7995
|
color: var(--q1-color-text-secondary);
|
|
7859
7996
|
}
|
|
7860
7997
|
|
|
7998
|
+
.q1-context-switcher__empty-description {
|
|
7999
|
+
color: var(--q1-color-text-secondary);
|
|
8000
|
+
font-size: var(--q1-font-size-label-13);
|
|
8001
|
+
font-weight: var(--q1-font-weight-regular);
|
|
8002
|
+
line-height: var(--q1-line-height-label-13);
|
|
8003
|
+
}
|
|
8004
|
+
|
|
7861
8005
|
.q1-context-switcher__group + .q1-context-switcher__group {
|
|
7862
8006
|
margin-top: var(--q1-space-2);
|
|
7863
8007
|
padding-top: var(--q1-space-2);
|
|
@@ -7870,9 +8014,9 @@ a.q1-navigation__item[aria-disabled='true'] {
|
|
|
7870
8014
|
gap: var(--q1-space-2);
|
|
7871
8015
|
padding: var(--q1-space-1) var(--q1-space-2);
|
|
7872
8016
|
color: var(--q1-color-text-muted);
|
|
7873
|
-
font-size:
|
|
7874
|
-
font-weight: var(--q1-font-weight-
|
|
7875
|
-
line-height:
|
|
8017
|
+
font-size: 11px;
|
|
8018
|
+
font-weight: var(--q1-font-weight-medium);
|
|
8019
|
+
line-height: 14px;
|
|
7876
8020
|
overflow: hidden;
|
|
7877
8021
|
text-overflow: ellipsis;
|
|
7878
8022
|
white-space: nowrap;
|
|
@@ -7887,30 +8031,57 @@ a.q1-navigation__item[aria-disabled='true'] {
|
|
|
7887
8031
|
display: flex;
|
|
7888
8032
|
width: 100%;
|
|
7889
8033
|
min-width: 0;
|
|
7890
|
-
min-height:
|
|
8034
|
+
min-height: 36px;
|
|
7891
8035
|
align-items: center;
|
|
7892
8036
|
gap: var(--q1-space-2);
|
|
7893
8037
|
border: 0;
|
|
7894
8038
|
border-radius: var(--q1-radius-2);
|
|
7895
8039
|
background: transparent;
|
|
7896
|
-
padding: var(--q1-space-2);
|
|
8040
|
+
padding: var(--q1-space-1) var(--q1-space-2);
|
|
7897
8041
|
color: var(--q1-color-text-primary);
|
|
7898
8042
|
font: inherit;
|
|
7899
8043
|
text-align: start;
|
|
7900
8044
|
}
|
|
7901
8045
|
|
|
8046
|
+
.q1-context-switcher__item:has(.q1-context-switcher__description) {
|
|
8047
|
+
min-height: 40px;
|
|
8048
|
+
}
|
|
8049
|
+
|
|
7902
8050
|
.q1-context-switcher__item:not([aria-disabled='true']),
|
|
7903
8051
|
.q1-context-switcher__action:not(:disabled) {
|
|
7904
8052
|
cursor: pointer;
|
|
7905
8053
|
}
|
|
7906
8054
|
|
|
7907
|
-
.q1-context-switcher__item:hover:not([aria-disabled='true']),
|
|
7908
|
-
.q1-context-switcher__action:hover:not(:disabled),
|
|
7909
8055
|
.q1-context-switcher__item:focus-visible,
|
|
7910
8056
|
.q1-context-switcher__action:focus-visible {
|
|
7911
8057
|
background: var(--q1-color-bg-subtle);
|
|
7912
8058
|
}
|
|
7913
8059
|
|
|
8060
|
+
.q1-context-switcher__item[role='option'][aria-selected='true'] {
|
|
8061
|
+
background: color-mix(in srgb, var(--q1-color-action-primary) 8%, var(--q1-color-bg-panel));
|
|
8062
|
+
}
|
|
8063
|
+
|
|
8064
|
+
.q1-context-switcher__item[role='option'][aria-selected='true']:focus-visible {
|
|
8065
|
+
background: color-mix(in srgb, var(--q1-color-action-primary) 12%, var(--q1-color-bg-panel));
|
|
8066
|
+
}
|
|
8067
|
+
|
|
8068
|
+
@media (hover: hover) and (pointer: fine) {
|
|
8069
|
+
.q1-context-switcher__trigger:hover {
|
|
8070
|
+
background: var(--q1-color-bg-subtle);
|
|
8071
|
+
border-color: var(--q1-color-border-strong);
|
|
8072
|
+
}
|
|
8073
|
+
|
|
8074
|
+
.q1-context-switcher__search:hover input[type='search'],
|
|
8075
|
+
.q1-context-switcher__item:hover:not([aria-disabled='true']),
|
|
8076
|
+
.q1-context-switcher__action:hover:not(:disabled) {
|
|
8077
|
+
background: var(--q1-color-bg-subtle);
|
|
8078
|
+
}
|
|
8079
|
+
|
|
8080
|
+
.q1-context-switcher__item[role='option'][aria-selected='true']:hover {
|
|
8081
|
+
background: color-mix(in srgb, var(--q1-color-action-primary) 12%, var(--q1-color-bg-panel));
|
|
8082
|
+
}
|
|
8083
|
+
}
|
|
8084
|
+
|
|
7914
8085
|
.q1-context-switcher__item[aria-disabled='true'],
|
|
7915
8086
|
.q1-context-switcher__action:disabled {
|
|
7916
8087
|
color: var(--q1-color-text-muted);
|
|
@@ -7918,8 +8089,16 @@ a.q1-navigation__item[aria-disabled='true'] {
|
|
|
7918
8089
|
opacity: 0.64;
|
|
7919
8090
|
}
|
|
7920
8091
|
|
|
8092
|
+
.q1-context-switcher__item[aria-disabled='true'] .q1-context-switcher__description {
|
|
8093
|
+
color: var(--q1-color-text-primary);
|
|
8094
|
+
}
|
|
8095
|
+
|
|
7921
8096
|
.q1-context-switcher__item[aria-checked='true'] .q1-context-switcher__item-label,
|
|
7922
|
-
.q1-context-switcher__item[aria-selected='true'] .q1-context-switcher__item-label
|
|
8097
|
+
.q1-context-switcher__item[aria-selected='true'] .q1-context-switcher__item-label {
|
|
8098
|
+
color: var(--q1-color-text-primary);
|
|
8099
|
+
font-weight: var(--q1-font-weight-semibold);
|
|
8100
|
+
}
|
|
8101
|
+
|
|
7923
8102
|
.q1-context-switcher__check {
|
|
7924
8103
|
color: var(--q1-color-action-primary);
|
|
7925
8104
|
}
|
|
@@ -7934,14 +8113,14 @@ a.q1-navigation__item[aria-disabled='true'] {
|
|
|
7934
8113
|
border-radius: var(--q1-radius-2);
|
|
7935
8114
|
background: color-mix(in srgb, var(--q1-color-status-danger) 10%, transparent);
|
|
7936
8115
|
padding: var(--q1-space-2) var(--q1-space-3);
|
|
7937
|
-
color: var(--q1-color-status-danger);
|
|
8116
|
+
color: color-mix(in srgb, var(--q1-color-status-danger) 70%, var(--q1-color-text-primary));
|
|
7938
8117
|
font-size: var(--q1-font-size-label-13);
|
|
7939
8118
|
line-height: var(--q1-line-height-label-13);
|
|
7940
8119
|
}
|
|
7941
8120
|
|
|
7942
8121
|
.q1-context-switcher__footer {
|
|
7943
8122
|
border-top: 1px solid var(--q1-color-border);
|
|
7944
|
-
padding: var(--q1-space-
|
|
8123
|
+
padding: var(--q1-space-1);
|
|
7945
8124
|
}
|
|
7946
8125
|
|
|
7947
8126
|
@keyframes q1-context-switcher-spin {
|
|
@@ -7949,10 +8128,15 @@ a.q1-navigation__item[aria-disabled='true'] {
|
|
|
7949
8128
|
}
|
|
7950
8129
|
|
|
7951
8130
|
@media (prefers-reduced-motion: reduce) {
|
|
7952
|
-
.q1-context-
|
|
8131
|
+
.q1-context-switcher__trigger,
|
|
8132
|
+
.q1-context-switcher__popup[role='dialog'][data-open-modality] {
|
|
7953
8133
|
transition: none;
|
|
7954
8134
|
}
|
|
7955
8135
|
|
|
8136
|
+
.q1-context-switcher__trigger:active {
|
|
8137
|
+
transform: none;
|
|
8138
|
+
}
|
|
8139
|
+
|
|
7956
8140
|
.q1-context-switcher__chevron {
|
|
7957
8141
|
transition: none;
|
|
7958
8142
|
}
|
|
@@ -7961,3 +8145,28 @@ a.q1-navigation__item[aria-disabled='true'] {
|
|
|
7961
8145
|
animation: none;
|
|
7962
8146
|
}
|
|
7963
8147
|
}
|
|
8148
|
+
|
|
8149
|
+
@media (pointer: fine) and (prefers-reduced-motion: no-preference) {
|
|
8150
|
+
.q1-context-switcher__trigger:active {
|
|
8151
|
+
transform: scale(.985);
|
|
8152
|
+
}
|
|
8153
|
+
}
|
|
8154
|
+
|
|
8155
|
+
@media (max-width: 48rem), (pointer: coarse), (any-pointer: coarse) {
|
|
8156
|
+
.q1-context-switcher__popup[role='dialog'] input[type='search'],
|
|
8157
|
+
.q1-context-switcher__item,
|
|
8158
|
+
.q1-context-switcher__scope-summary,
|
|
8159
|
+
.q1-context-switcher__action {
|
|
8160
|
+
min-height: 44px;
|
|
8161
|
+
}
|
|
8162
|
+
|
|
8163
|
+
.q1-context-switcher__popup[role='dialog'] input[type='search'] {
|
|
8164
|
+
font-size: var(--q1-font-size-copy-16);
|
|
8165
|
+
line-height: var(--q1-line-height-copy-16);
|
|
8166
|
+
}
|
|
8167
|
+
|
|
8168
|
+
.q1-context-switcher__scope-summary,
|
|
8169
|
+
.q1-context-switcher__item:has(.q1-context-switcher__description) {
|
|
8170
|
+
min-height: 48px;
|
|
8171
|
+
}
|
|
8172
|
+
}
|
package/dist-pkg/tokens.css
CHANGED
|
@@ -201,6 +201,8 @@
|
|
|
201
201
|
--q1-shadow-popover: 0 8px 28px color-mix(in srgb, var(--q1-color-shadow) 16%, transparent);
|
|
202
202
|
--q1-shadow-modal: 0 16px 48px color-mix(in srgb, var(--q1-color-shadow) 32%, transparent);
|
|
203
203
|
--q1-z-popover: 1200;
|
|
204
|
+
--q1-z-overlay-root: 1300;
|
|
205
|
+
--q1-z-toast: 1400;
|
|
204
206
|
}
|
|
205
207
|
|
|
206
208
|
:root[data-theme='dark'] {
|
|
@@ -406,4 +408,6 @@
|
|
|
406
408
|
--q1-shadow-popover: 0 8px 28px color-mix(in srgb, var(--q1-color-shadow) 16%, transparent);
|
|
407
409
|
--q1-shadow-modal: 0 16px 48px color-mix(in srgb, var(--q1-color-shadow) 32%, transparent);
|
|
408
410
|
--q1-z-popover: 1200;
|
|
411
|
+
--q1-z-overlay-root: 1300;
|
|
412
|
+
--q1-z-toast: 1400;
|
|
409
413
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@q1travel/design-system",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
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",
|
|
40
|
+
"check:package-api": "node scripts/check-package-api.mjs && node --test scripts/check-controls-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",
|