@navikt/ds-css 5.15.1 → 5.16.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.
@@ -3548,7 +3548,6 @@
3548
3548
  }
3549
3549
 
3550
3550
  .navds-combobox__input {
3551
- z-index: 1;
3552
3551
  flex: 1;
3553
3552
  border: none;
3554
3553
  padding: 0;
@@ -3682,7 +3681,7 @@
3682
3681
  height: 1.25rem;
3683
3682
  }
3684
3683
 
3685
- /* dropdown list */
3684
+ /* dropdown & non selectable dropdown items */
3686
3685
 
3687
3686
  .navds-combobox__list {
3688
3687
  max-height: 290px;
@@ -3690,20 +3689,16 @@
3690
3689
  position: absolute;
3691
3690
  left: 0;
3692
3691
  right: 0;
3693
- z-index: 9999;
3692
+ z-index: var(--a-z-index-popover);
3694
3693
  top: calc(100% + var(--a-spacing-2));
3695
- list-style: none;
3696
- margin: 0;
3697
3694
  border: 1px solid var(--ac-combobox-list-border-color, var(--a-border-divider));
3698
3695
  display: flex;
3699
3696
  flex-direction: column;
3700
- align-items: flex-start;
3701
- padding: 0;
3702
3697
  box-shadow: var(--a-shadow-small);
3703
3698
  border-radius: var(--a-border-radius-medium);
3704
- gap: var(--a-spacing-1) 0;
3705
3699
  background-color: var(--ac-combobox-list-bg, var(--a-surface-default));
3706
3700
  color: var(--ac-combobox-list-text, var(--a-text-default));
3701
+ gap: var(--a-spacing-1) 0;
3707
3702
  }
3708
3703
 
3709
3704
  .navds-combobox__list--closed {
@@ -3715,34 +3710,70 @@
3715
3710
  width: 1.5rem;
3716
3711
  }
3717
3712
 
3713
+ .navds-combobox__list_non-selectables {
3714
+ position: sticky;
3715
+ top: 0;
3716
+ left: 0;
3717
+ right: 0;
3718
+ z-index: 1;
3719
+ }
3720
+
3718
3721
  .navds-combobox__list-item,
3719
- .navds-combobox__list-item__no-options,
3720
- .navds-combobox__list-item__new-option {
3722
+ .navds-combobox__list-item--loading,
3723
+ .navds-combobox__list-item--no-options,
3724
+ .navds-combobox__list-item--new-option,
3725
+ .navds-combobox__list-item--max-selected {
3721
3726
  display: flex;
3722
3727
  flex-direction: row;
3723
3728
  justify-content: space-between;
3724
- align-items: center;
3725
3729
  padding: var(--a-spacing-3);
3726
3730
  width: 100%;
3727
3731
  background-color: var(--ac-combobox-list-item-bg, var(--a-surface-default));
3732
+ scroll-margin-top: 50px;
3728
3733
  }
3729
3734
 
3730
3735
  .navds-form-field--small .navds-combobox__list-item,
3731
- .navds-form-field--small .navds-combobox__list-item__no-options,
3732
- .navds-form-field--small .navds-combobox__list-item__new-option {
3736
+ .navds-form-field--small .navds-combobox__list-item--loading,
3737
+ .navds-form-field--small .navds-combobox__list-item--no-options,
3738
+ .navds-form-field--small .navds-combobox__list-item--new-option,
3739
+ .navds-form-field--small .navds-combobox__list-item--max-selected {
3733
3740
  padding: calc(var(--a-spacing-3) / 2) var(--a-spacing-2);
3734
3741
  }
3735
3742
 
3736
3743
  .navds-combobox__list-item--loading {
3737
- display: flex;
3738
3744
  justify-content: center;
3739
- padding: var(--a-spacing-3);
3740
3745
  background-color: var(--ac-combobox-list-item-loading-bg, var(--a-surface-default));
3746
+ }
3747
+
3748
+ .navds-combobox__list-item--max-selected {
3749
+ background: var(--ac-combobox-list-item-max-selected-bg, var(--a-surface-info-subtle));
3750
+ border-start-start-radius: calc(var(--a-border-radius-medium) - 1px);
3751
+ border-start-end-radius: calc(var(--a-border-radius-medium) - 1px);
3752
+ border: 1px solid var(--ac-combobox-list-item-max-selected-border, var(--a-border-info));
3753
+ margin-bottom: calc(var(--a-spacing-1) * -1);
3754
+ }
3755
+
3756
+ .navds-combobox__list_non-selectables:hover {
3757
+ cursor: default;
3758
+ }
3759
+
3760
+ /* ul-list and selectable li-items */
3761
+
3762
+ .navds-combobox__list-options {
3763
+ list-style: none;
3764
+ margin: 0;
3765
+ padding: 0;
3741
3766
  width: 100%;
3767
+ display: inherit;
3768
+ flex-direction: inherit;
3769
+ gap: inherit;
3770
+ background-color: inherit;
3771
+ align-items: flex-start;
3742
3772
  }
3743
3773
 
3744
3774
  .navds-combobox__list-item--focus,
3745
- .navds-combobox__list--with-hover .navds-combobox__list-item:hover {
3775
+ .navds-combobox__list--with-hover
3776
+ .navds-combobox__list-item:not([data-no-focus="true"], .navds-combobox__list-item--new-option):hover {
3746
3777
  background-color: var(--ac-combobox-list-item-hover-bg, var(--a-surface-hover));
3747
3778
  cursor: pointer;
3748
3779
  border-left: 4px solid var(--ac-combobox-list-item-hover-border-left, var(--a-border-strong));
@@ -3754,6 +3785,11 @@
3754
3785
  padding-left: calc(var(--a-spacing-2) - 4px);
3755
3786
  }
3756
3787
 
3788
+ .navds-combobox__list-item[data-no-focus="true"] {
3789
+ cursor: not-allowed;
3790
+ opacity: 0.4;
3791
+ }
3792
+
3757
3793
  .navds-combobox__list-item--selected {
3758
3794
  background-color: var(--ac-combobox-list-item-selected-bg, var(--a-surface-selected));
3759
3795
  }
@@ -3769,7 +3805,7 @@
3769
3805
  padding-left: calc(var(--a-spacing-3) - 4px);
3770
3806
  }
3771
3807
 
3772
- .navds-combobox__list-item__new-option {
3808
+ .navds-combobox__list-item--new-option {
3773
3809
  border-bottom: 1px solid var(--a-border-divider);
3774
3810
  background: var(--a-surface-neutral-subtle);
3775
3811
  cursor: pointer;
@@ -3777,12 +3813,12 @@
3777
3813
  gap: 0.25rem;
3778
3814
  }
3779
3815
 
3780
- .navds-combobox__list--with-hover .navds-combobox__list-item__new-option:hover {
3816
+ .navds-combobox__list--with-hover .navds-combobox__list-item--new-option:hover {
3781
3817
  border-bottom: 1px solid var(--a-border-divider);
3782
3818
  background: var(--a-surface-neutral-subtle-hover);
3783
3819
  }
3784
3820
 
3785
- .navds-combobox__list-item__new-option--focus {
3821
+ .navds-combobox__list-item--new-option--focus {
3786
3822
  box-shadow:
3787
3823
  var(--a-shadow-focus) inset,
3788
3824
  var(--a-border-action) 0 0 0 5px inset;