@q1travel/design-system 0.7.1 → 0.7.2

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.
@@ -7706,14 +7706,14 @@ a.q1-navigation__item[aria-disabled='true'] {
7706
7706
  border: 1px solid var(--q1-color-border);
7707
7707
  border-radius: var(--q1-radius-3);
7708
7708
  background: var(--q1-color-bg-panel);
7709
- padding: var(--q1-space-2) var(--q1-space-3);
7709
+ padding: var(--q1-space-1) var(--q1-space-2);
7710
7710
  color: var(--q1-color-text-primary);
7711
7711
  font: inherit;
7712
7712
  text-align: start;
7713
7713
  cursor: pointer;
7714
+ transition: transform 100ms cubic-bezier(.23, 1, .32, 1);
7714
7715
  }
7715
7716
 
7716
- .q1-context-switcher__trigger:hover,
7717
7717
  .q1-context-switcher__trigger[aria-expanded='true'] {
7718
7718
  background: var(--q1-color-bg-subtle);
7719
7719
  border-color: var(--q1-color-border-strong);
@@ -7728,6 +7728,10 @@ a.q1-navigation__item[aria-disabled='true'] {
7728
7728
  box-shadow: var(--q1-shadow-focus);
7729
7729
  }
7730
7730
 
7731
+ .q1-context-switcher__popup[role='dialog']:has(> .q1-sr-only:focus) {
7732
+ box-shadow: var(--q1-shadow-focus);
7733
+ }
7734
+
7731
7735
  .q1-context-switcher__current,
7732
7736
  .q1-context-switcher__item-content {
7733
7737
  display: grid;
@@ -7746,16 +7750,16 @@ a.q1-navigation__item[aria-disabled='true'] {
7746
7750
  .q1-context-switcher__current-label,
7747
7751
  .q1-context-switcher__item-label {
7748
7752
  color: var(--q1-color-text-primary);
7749
- font-size: var(--q1-font-size-label-14);
7753
+ font-size: var(--q1-font-size-label-13);
7750
7754
  font-weight: var(--q1-font-weight-medium);
7751
- line-height: var(--q1-line-height-label-14);
7755
+ line-height: var(--q1-line-height-label-13);
7752
7756
  }
7753
7757
 
7754
7758
  .q1-context-switcher__description {
7755
7759
  color: var(--q1-color-text-secondary);
7756
- font-size: var(--q1-font-size-label-13);
7760
+ font-size: 11px;
7757
7761
  font-weight: var(--q1-font-weight-regular);
7758
- line-height: var(--q1-line-height-label-13);
7762
+ line-height: 14px;
7759
7763
  }
7760
7764
 
7761
7765
  .q1-context-switcher__avatar,
@@ -7769,9 +7773,24 @@ a.q1-navigation__item[aria-disabled='true'] {
7769
7773
  justify-content: center;
7770
7774
  }
7771
7775
 
7776
+ .q1-context-switcher__avatar {
7777
+ width: 24px;
7778
+ height: 24px;
7779
+ overflow: hidden;
7780
+ border-radius: var(--q1-radius-2);
7781
+ background: var(--q1-color-bg-subtle);
7782
+ color: var(--q1-color-text-secondary);
7783
+ font-size: var(--q1-font-size-label-13);
7784
+ font-weight: var(--q1-font-weight-semibold);
7785
+ }
7786
+
7787
+ .q1-context-switcher__trigger .q1-context-switcher__avatar {
7788
+ width: 28px;
7789
+ height: 28px;
7790
+ }
7791
+
7772
7792
  .q1-context-switcher__chevron {
7773
7793
  color: var(--q1-color-text-muted);
7774
- transition: transform 160ms ease;
7775
7794
  }
7776
7795
 
7777
7796
  .q1-context-switcher__trigger[aria-expanded='true'] .q1-context-switcher__chevron {
@@ -7793,25 +7812,50 @@ a.q1-navigation__item[aria-disabled='true'] {
7793
7812
  }
7794
7813
 
7795
7814
  .q1-context-switcher__popup[role='dialog'] {
7815
+ width: min(17.5rem, calc(100vw - var(--q1-space-4)));
7796
7816
  opacity: 1;
7797
7817
  transform: translateY(0) scale(1);
7798
- transform-origin: top center;
7799
- transition:
7800
- opacity 150ms ease,
7801
- transform 150ms ease;
7802
7818
  }
7803
7819
 
7804
- .q1-context-switcher__popup[role='dialog'][data-side='top'] {
7805
- transform-origin: bottom center;
7820
+ .q1-context-switcher__popup[role='dialog'][data-open-modality='pointer'] {
7821
+ transition-property: opacity, transform;
7822
+ transition-duration: 140ms;
7823
+ transition-timing-function: cubic-bezier(.23, 1, .32, 1);
7824
+ }
7825
+
7826
+ .q1-context-switcher__popup[role='dialog'][data-open-modality='keyboard'] {
7827
+ transition: none;
7828
+ }
7829
+
7830
+ .q1-context-switcher__popup[role='dialog'][data-side='bottom'][dir='ltr'][data-align='start'],
7831
+ .q1-context-switcher__popup[role='dialog'][data-side='bottom'][dir='rtl'][data-align='end'] {
7832
+ transform-origin: top left;
7833
+ }
7834
+
7835
+ .q1-context-switcher__popup[role='dialog'][data-side='bottom'][dir='ltr'][data-align='end'],
7836
+ .q1-context-switcher__popup[role='dialog'][data-side='bottom'][dir='rtl'][data-align='start'] {
7837
+ transform-origin: top right;
7838
+ }
7839
+
7840
+ .q1-context-switcher__popup[role='dialog'][data-side='top'][dir='ltr'][data-align='start'],
7841
+ .q1-context-switcher__popup[role='dialog'][data-side='top'][dir='rtl'][data-align='end'] {
7842
+ transform-origin: bottom left;
7843
+ }
7844
+
7845
+ .q1-context-switcher__popup[role='dialog'][data-side='top'][dir='ltr'][data-align='end'],
7846
+ .q1-context-switcher__popup[role='dialog'][data-side='top'][dir='rtl'][data-align='start'] {
7847
+ transform-origin: bottom right;
7806
7848
  }
7807
7849
 
7808
7850
  @starting-style {
7809
- .q1-context-switcher__popup[role='dialog'] {
7851
+ .q1-context-switcher__popup[role='dialog'][data-open-modality='pointer'][data-side='bottom'] {
7810
7852
  opacity: 0;
7853
+ transform: translateY(-2px) scale(.98);
7811
7854
  }
7812
7855
 
7813
- body:not(:has(.q1-context-switcher__trigger:focus-visible)) .q1-context-switcher__popup[role='dialog'] {
7814
- transform: translateY(-2px) scale(.98);
7856
+ .q1-context-switcher__popup[role='dialog'][data-open-modality='pointer'][data-side='top'] {
7857
+ opacity: 0;
7858
+ transform: translateY(2px) scale(.98);
7815
7859
  }
7816
7860
  }
7817
7861
 
@@ -7819,7 +7863,7 @@ a.q1-navigation__item[aria-disabled='true'] {
7819
7863
  min-height: 0;
7820
7864
  overflow-y: auto;
7821
7865
  overscroll-behavior: contain;
7822
- padding: var(--q1-space-2);
7866
+ padding: var(--q1-space-1);
7823
7867
  }
7824
7868
 
7825
7869
  .q1-context-switcher__popup[role='dialog'] .q1-context-switcher__groups {
@@ -7827,17 +7871,58 @@ a.q1-navigation__item[aria-disabled='true'] {
7827
7871
  overflow-y: hidden;
7828
7872
  }
7829
7873
 
7874
+ .q1-context-switcher__search {
7875
+ position: relative;
7876
+ display: flex;
7877
+ align-items: center;
7878
+ margin-block: var(--q1-space-1);
7879
+ }
7880
+
7881
+ .q1-context-switcher__scope-summary {
7882
+ display: flex;
7883
+ min-width: 0;
7884
+ min-height: 40px;
7885
+ align-items: center;
7886
+ gap: var(--q1-space-2);
7887
+ padding: var(--q1-space-1) var(--q1-space-2);
7888
+ }
7889
+
7890
+ .q1-context-switcher__search-icon {
7891
+ position: absolute;
7892
+ inset-inline-start: var(--q1-space-2);
7893
+ z-index: 1;
7894
+ display: inline-flex;
7895
+ color: var(--q1-color-text-muted);
7896
+ pointer-events: none;
7897
+ }
7898
+
7830
7899
  .q1-context-switcher__popup[role='dialog'] input[type='search'] {
7831
7900
  width: 100%;
7832
7901
  min-width: 0;
7833
- min-height: 44px;
7834
- margin-block: var(--q1-space-1);
7835
- border: 1px solid var(--q1-color-border);
7902
+ min-height: 32px;
7903
+ border: 1px solid transparent;
7836
7904
  border-radius: var(--q1-radius-2);
7837
- background: var(--q1-color-bg-panel);
7838
- padding: var(--q1-space-2) var(--q1-space-3);
7905
+ background: transparent;
7906
+ padding-block: var(--q1-space-1);
7907
+ padding-inline: calc(var(--q1-space-2) * 4);
7839
7908
  color: var(--q1-color-text-primary);
7840
- font: inherit;
7909
+ font-size: var(--q1-font-size-label-13);
7910
+ font-weight: var(--q1-font-weight-regular);
7911
+ line-height: var(--q1-line-height-label-13);
7912
+ }
7913
+
7914
+ .q1-context-switcher__search-shortcut {
7915
+ position: absolute;
7916
+ inset-inline-end: var(--q1-space-2);
7917
+ color: var(--q1-color-text-muted);
7918
+ font-size: var(--q1-font-size-label-13);
7919
+ font-weight: var(--q1-font-weight-medium);
7920
+ line-height: var(--q1-line-height-label-13);
7921
+ pointer-events: none;
7922
+ }
7923
+
7924
+ .q1-context-switcher__search:focus-within .q1-context-switcher__search-shortcut {
7925
+ visibility: hidden;
7841
7926
  }
7842
7927
 
7843
7928
  .q1-context-switcher__popup[role='dialog'] input[type='search']::placeholder {
@@ -7858,6 +7943,13 @@ a.q1-navigation__item[aria-disabled='true'] {
7858
7943
  color: var(--q1-color-text-secondary);
7859
7944
  }
7860
7945
 
7946
+ .q1-context-switcher__empty-description {
7947
+ color: var(--q1-color-text-secondary);
7948
+ font-size: var(--q1-font-size-label-13);
7949
+ font-weight: var(--q1-font-weight-regular);
7950
+ line-height: var(--q1-line-height-label-13);
7951
+ }
7952
+
7861
7953
  .q1-context-switcher__group + .q1-context-switcher__group {
7862
7954
  margin-top: var(--q1-space-2);
7863
7955
  padding-top: var(--q1-space-2);
@@ -7870,9 +7962,9 @@ a.q1-navigation__item[aria-disabled='true'] {
7870
7962
  gap: var(--q1-space-2);
7871
7963
  padding: var(--q1-space-1) var(--q1-space-2);
7872
7964
  color: var(--q1-color-text-muted);
7873
- font-size: var(--q1-font-size-label-13);
7874
- font-weight: var(--q1-font-weight-semibold);
7875
- line-height: var(--q1-line-height-label-13);
7965
+ font-size: 11px;
7966
+ font-weight: var(--q1-font-weight-medium);
7967
+ line-height: 14px;
7876
7968
  overflow: hidden;
7877
7969
  text-overflow: ellipsis;
7878
7970
  white-space: nowrap;
@@ -7887,30 +7979,57 @@ a.q1-navigation__item[aria-disabled='true'] {
7887
7979
  display: flex;
7888
7980
  width: 100%;
7889
7981
  min-width: 0;
7890
- min-height: 44px;
7982
+ min-height: 36px;
7891
7983
  align-items: center;
7892
7984
  gap: var(--q1-space-2);
7893
7985
  border: 0;
7894
7986
  border-radius: var(--q1-radius-2);
7895
7987
  background: transparent;
7896
- padding: var(--q1-space-2);
7988
+ padding: var(--q1-space-1) var(--q1-space-2);
7897
7989
  color: var(--q1-color-text-primary);
7898
7990
  font: inherit;
7899
7991
  text-align: start;
7900
7992
  }
7901
7993
 
7994
+ .q1-context-switcher__item:has(.q1-context-switcher__description) {
7995
+ min-height: 40px;
7996
+ }
7997
+
7902
7998
  .q1-context-switcher__item:not([aria-disabled='true']),
7903
7999
  .q1-context-switcher__action:not(:disabled) {
7904
8000
  cursor: pointer;
7905
8001
  }
7906
8002
 
7907
- .q1-context-switcher__item:hover:not([aria-disabled='true']),
7908
- .q1-context-switcher__action:hover:not(:disabled),
7909
8003
  .q1-context-switcher__item:focus-visible,
7910
8004
  .q1-context-switcher__action:focus-visible {
7911
8005
  background: var(--q1-color-bg-subtle);
7912
8006
  }
7913
8007
 
8008
+ .q1-context-switcher__item[role='option'][aria-selected='true'] {
8009
+ background: color-mix(in srgb, var(--q1-color-action-primary) 8%, var(--q1-color-bg-panel));
8010
+ }
8011
+
8012
+ .q1-context-switcher__item[role='option'][aria-selected='true']:focus-visible {
8013
+ background: color-mix(in srgb, var(--q1-color-action-primary) 12%, var(--q1-color-bg-panel));
8014
+ }
8015
+
8016
+ @media (hover: hover) and (pointer: fine) {
8017
+ .q1-context-switcher__trigger:hover {
8018
+ background: var(--q1-color-bg-subtle);
8019
+ border-color: var(--q1-color-border-strong);
8020
+ }
8021
+
8022
+ .q1-context-switcher__search:hover input[type='search'],
8023
+ .q1-context-switcher__item:hover:not([aria-disabled='true']),
8024
+ .q1-context-switcher__action:hover:not(:disabled) {
8025
+ background: var(--q1-color-bg-subtle);
8026
+ }
8027
+
8028
+ .q1-context-switcher__item[role='option'][aria-selected='true']:hover {
8029
+ background: color-mix(in srgb, var(--q1-color-action-primary) 12%, var(--q1-color-bg-panel));
8030
+ }
8031
+ }
8032
+
7914
8033
  .q1-context-switcher__item[aria-disabled='true'],
7915
8034
  .q1-context-switcher__action:disabled {
7916
8035
  color: var(--q1-color-text-muted);
@@ -7919,7 +8038,11 @@ a.q1-navigation__item[aria-disabled='true'] {
7919
8038
  }
7920
8039
 
7921
8040
  .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,
8041
+ .q1-context-switcher__item[aria-selected='true'] .q1-context-switcher__item-label {
8042
+ color: var(--q1-color-text-primary);
8043
+ font-weight: var(--q1-font-weight-semibold);
8044
+ }
8045
+
7923
8046
  .q1-context-switcher__check {
7924
8047
  color: var(--q1-color-action-primary);
7925
8048
  }
@@ -7941,7 +8064,7 @@ a.q1-navigation__item[aria-disabled='true'] {
7941
8064
 
7942
8065
  .q1-context-switcher__footer {
7943
8066
  border-top: 1px solid var(--q1-color-border);
7944
- padding: var(--q1-space-2);
8067
+ padding: var(--q1-space-1);
7945
8068
  }
7946
8069
 
7947
8070
  @keyframes q1-context-switcher-spin {
@@ -7949,10 +8072,15 @@ a.q1-navigation__item[aria-disabled='true'] {
7949
8072
  }
7950
8073
 
7951
8074
  @media (prefers-reduced-motion: reduce) {
7952
- .q1-context-switcher__popup[role='dialog'] {
8075
+ .q1-context-switcher__trigger,
8076
+ .q1-context-switcher__popup[role='dialog'][data-open-modality] {
7953
8077
  transition: none;
7954
8078
  }
7955
8079
 
8080
+ .q1-context-switcher__trigger:active {
8081
+ transform: none;
8082
+ }
8083
+
7956
8084
  .q1-context-switcher__chevron {
7957
8085
  transition: none;
7958
8086
  }
@@ -7961,3 +8089,28 @@ a.q1-navigation__item[aria-disabled='true'] {
7961
8089
  animation: none;
7962
8090
  }
7963
8091
  }
8092
+
8093
+ @media (pointer: fine) and (prefers-reduced-motion: no-preference) {
8094
+ .q1-context-switcher__trigger:active {
8095
+ transform: scale(.985);
8096
+ }
8097
+ }
8098
+
8099
+ @media (max-width: 48rem), (pointer: coarse), (any-pointer: coarse) {
8100
+ .q1-context-switcher__popup[role='dialog'] input[type='search'],
8101
+ .q1-context-switcher__item,
8102
+ .q1-context-switcher__scope-summary,
8103
+ .q1-context-switcher__action {
8104
+ min-height: 44px;
8105
+ }
8106
+
8107
+ .q1-context-switcher__popup[role='dialog'] input[type='search'] {
8108
+ font-size: var(--q1-font-size-copy-16);
8109
+ line-height: var(--q1-line-height-copy-16);
8110
+ }
8111
+
8112
+ .q1-context-switcher__scope-summary,
8113
+ .q1-context-switcher__item:has(.q1-context-switcher__description) {
8114
+ min-height: 48px;
8115
+ }
8116
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@q1travel/design-system",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist-pkg/design-system.js",