@ni/nimble-components 11.0.2 → 11.0.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.
@@ -2662,35 +2662,66 @@ const hd=mt`
2662
2662
  font: ${Jn};
2663
2663
  height: ${yn};
2664
2664
  position: relative;
2665
+ justify-content: center;
2665
2666
  user-select: none;
2666
2667
  min-width: 250px;
2667
2668
  outline: none;
2668
2669
  vertical-align: top;
2670
+ --ni-private-hover-indicator-width: 2px;
2671
+ --ni-private-focus-indicator-width: 1px;
2672
+ --ni-private-indicator-lines-gap: 1px;
2669
2673
  }
2670
2674
 
2671
- .listbox {
2672
- box-sizing: border-box;
2673
- display: inline-flex;
2674
- flex-direction: column;
2675
- left: 0;
2676
- overflow-y: auto;
2675
+ :host::before {
2676
+ content: '';
2677
2677
  position: absolute;
2678
- width: 100%;
2679
- --ni-private-listbox-padding: 4px;
2680
- max-height: calc(
2681
- var(--ni-private-select-max-height) - 2 *
2682
- var(--ni-private-listbox-padding)
2678
+ bottom: calc(
2679
+ var(--ni-private-hover-indicator-width) +
2680
+ var(--ni-private-indicator-lines-gap)
2683
2681
  );
2684
- z-index: 1;
2685
- padding: var(--ni-private-listbox-padding);
2686
- box-shadow: 0px 3px 3px ${wn};
2687
- border: 1px solid ${xn};
2688
- background-color: ${an};
2689
- background-clip: padding-box;
2682
+ width: 0px;
2683
+ height: 0px;
2684
+ justify-self: center;
2685
+ border-bottom: ${fn}
2686
+ var(--ni-private-focus-indicator-width) solid;
2687
+ transition: width ${Fr} ease-in;
2690
2688
  }
2691
2689
 
2692
- .listbox[hidden] {
2693
- display: none;
2690
+ @media (prefers-reduced-motion) {
2691
+ :host::before {
2692
+ transition-duration: 0s;
2693
+ }
2694
+ }
2695
+
2696
+ :host(${Hc})::before {
2697
+ width: 100%;
2698
+ }
2699
+
2700
+ :host::after {
2701
+ content: '';
2702
+ position: absolute;
2703
+ bottom: 0px;
2704
+ width: 0px;
2705
+ height: 0px;
2706
+ justify-self: center;
2707
+ border-bottom: ${fn}
2708
+ var(--ni-private-hover-indicator-width) solid;
2709
+ transition: width ${Fr} ease-in;
2710
+ }
2711
+
2712
+ @media (prefers-reduced-motion) {
2713
+ :host::after {
2714
+ transition-duration: 0s;
2715
+ }
2716
+ }
2717
+
2718
+ :host(:hover)::after,
2719
+ :host(${Hc})::after {
2720
+ width: 100%;
2721
+ }
2722
+
2723
+ :host([disabled]:hover)::after {
2724
+ width: 0px;
2694
2725
  }
2695
2726
 
2696
2727
  .control {
@@ -2711,23 +2742,40 @@ const hd=mt`
2711
2742
  }
2712
2743
 
2713
2744
  :host(.open:not(:hover)) .control {
2714
- border-bottom: ${_n} solid ${fn};
2715
- transition: border-bottom ${Fr}, padding-bottom ${Fr};
2716
- }
2717
-
2718
- :host(:hover) .control {
2719
- border-bottom: 2px solid ${fn};
2720
- padding-bottom: 0px;
2721
- transition: border-bottom ${Fr}, padding-bottom ${Fr};
2745
+ border-bottom-color: ${fn};
2722
2746
  }
2723
2747
 
2724
2748
  :host([disabled]) .control,
2725
2749
  :host([disabled]) .control:hover {
2726
- border-bottom: ${_n} solid ${tr};
2727
- padding-bottom: 1px;
2750
+ border-bottom-color: ${tr};
2728
2751
  color: ${tr};
2729
2752
  }
2730
2753
 
2754
+ .listbox {
2755
+ box-sizing: border-box;
2756
+ display: inline-flex;
2757
+ flex-direction: column;
2758
+ left: 0;
2759
+ overflow-y: auto;
2760
+ position: absolute;
2761
+ width: 100%;
2762
+ --ni-private-listbox-padding: ${$n};
2763
+ max-height: calc(
2764
+ var(--ni-private-select-max-height) - 2 *
2765
+ var(--ni-private-listbox-padding)
2766
+ );
2767
+ z-index: 1;
2768
+ padding: var(--ni-private-listbox-padding);
2769
+ box-shadow: 0px 3px 3px ${wn};
2770
+ border: 1px solid ${xn};
2771
+ background-color: ${an};
2772
+ background-clip: padding-box;
2773
+ }
2774
+
2775
+ .listbox[hidden] {
2776
+ display: none;
2777
+ }
2778
+
2731
2779
  :host([open][position='above']) .listbox {
2732
2780
  border-bottom-left-radius: 0;
2733
2781
  border-bottom-right-radius: 0;