@ni/nimble-components 11.0.1 → 11.0.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.
@@ -18561,6 +18561,7 @@
18561
18561
  user-select: none;
18562
18562
  color: ${bodyFontColor};
18563
18563
  height: calc(${labelHeight} + ${controlHeight});
18564
+ --ni-private-hover-indicator-width: calc(${borderWidth} + 1px);
18564
18565
  }
18565
18566
 
18566
18567
  :host([disabled]) {
@@ -18568,32 +18569,71 @@
18568
18569
  cursor: default;
18569
18570
  }
18570
18571
 
18572
+ .label {
18573
+ display: flex;
18574
+ color: ${controlLabelFontColor};
18575
+ font: ${controlLabelFont};
18576
+ }
18577
+
18571
18578
  .root {
18572
18579
  box-sizing: border-box;
18573
18580
  position: relative;
18574
18581
  display: flex;
18575
18582
  flex-direction: row;
18583
+ justify-content: center;
18576
18584
  border-radius: 0px;
18577
18585
  border-bottom: ${borderWidth} solid rgba(${borderRgbPartialColor}, 0.3);
18578
- padding-bottom: 1px;
18579
- transition: border-bottom ${smallDelay}, padding-bottom ${smallDelay};
18586
+ gap: calc(${standardPadding} / 2);
18587
+ }
18588
+
18589
+ .root:focus-within {
18590
+ border-bottom-color: ${borderHoverColor};
18591
+ }
18592
+
18593
+ :host([disabled]) .root,
18594
+ :host([disabled]) .root:hover {
18595
+ border-bottom: ${borderWidth} solid ${bodyDisabledFontColor};
18596
+ }
18597
+
18598
+ .root::before {
18599
+ ${ /* Empty string causes alignment issue */''}
18600
+ content: ' ';
18601
+ color: transparent;
18602
+ width: 0px;
18603
+ user-select: none;
18604
+ }
18605
+
18606
+ .root::after {
18607
+ content: '';
18608
+ position: absolute;
18609
+ bottom: calc(-1 * ${borderWidth});
18610
+ width: 0px;
18611
+ height: 0px;
18612
+ border-bottom: ${borderHoverColor}
18613
+ var(--ni-private-hover-indicator-width) solid;
18614
+ transition: width ${smallDelay} ease-in;
18580
18615
  }
18581
18616
 
18582
18617
  @media (prefers-reduced-motion) {
18583
- .root {
18618
+ .root::after {
18584
18619
  transition-duration: 0s;
18585
18620
  }
18586
18621
  }
18587
18622
 
18588
- .root:hover {
18589
- border-bottom: 2px solid ${borderHoverColor};
18590
- padding-bottom: 0px;
18623
+ :host(.invalid) .root::after {
18624
+ border-bottom-color: ${failColor};
18591
18625
  }
18592
18626
 
18593
- :host([disabled]) .root,
18594
- :host([disabled]) .root:hover {
18595
- border-bottom: ${borderWidth} solid ${bodyDisabledFontColor};
18596
- padding-bottom: 1px;
18627
+ :host(:hover) .root::after {
18628
+ width: 100%;
18629
+ }
18630
+
18631
+ :host([disabled]:hover) .root::after {
18632
+ width: 0px;
18633
+ }
18634
+
18635
+ [part='start'] {
18636
+ display: contents;
18597
18637
  }
18598
18638
 
18599
18639
  .control {
@@ -18601,11 +18641,10 @@
18601
18641
  font: inherit;
18602
18642
  background: transparent;
18603
18643
  color: inherit;
18604
- height: 28px;
18644
+ height: calc(${controlHeight} - ${borderWidth});
18605
18645
  width: 100%;
18606
- margin-top: auto;
18607
- margin-bottom: auto;
18608
18646
  border: none;
18647
+ padding: 0px;
18609
18648
  }
18610
18649
 
18611
18650
  .control:hover,
@@ -18632,12 +18671,6 @@
18632
18671
  color: ${bodyDisabledFontColor};
18633
18672
  }
18634
18673
 
18635
- .label {
18636
- display: flex;
18637
- color: ${controlLabelFontColor};
18638
- font: ${controlLabelFont};
18639
- }
18640
-
18641
18674
  .controls {
18642
18675
  display: flex;
18643
18676
  flex-direction: column;
@@ -19472,6 +19505,10 @@
19472
19505
  --webkit-user-select: none;
19473
19506
  color: ${bodyFontColor};
19474
19507
  height: calc(${labelHeight} + ${controlHeight});
19508
+ --ni-private-hover-indicator-width: calc(${borderWidth} + 1px);
19509
+ --ni-private-height-within-border: calc(
19510
+ ${controlHeight} - 2 * ${borderWidth}
19511
+ );
19475
19512
  }
19476
19513
 
19477
19514
  :host([disabled]) {
@@ -19495,22 +19532,10 @@
19495
19532
  flex-direction: row;
19496
19533
  border-radius: 0px;
19497
19534
  font: inherit;
19498
- transition: border-bottom ${smallDelay}, padding-bottom ${smallDelay};
19499
19535
  align-items: center;
19500
- --ni-private-hover-bottom-border-width: 2px;
19536
+ justify-content: center;
19501
19537
  border: 0px solid rgba(${borderRgbPartialColor}, 0.3);
19502
- border-bottom-width: var(--ni-private-bottom-border-width);
19503
19538
  gap: calc(${standardPadding} / 2);
19504
- padding-bottom: calc(
19505
- var(--ni-private-hover-bottom-border-width) -
19506
- var(--ni-private-bottom-border-width)
19507
- );
19508
- }
19509
-
19510
- @media (prefers-reduced-motion) {
19511
- .root {
19512
- transition-duration: 0s;
19513
- }
19514
19539
  }
19515
19540
 
19516
19541
  :host(.invalid) .root {
@@ -19525,21 +19550,6 @@
19525
19550
  border-color: rgba(${borderRgbPartialColor}, 0.1);
19526
19551
  }
19527
19552
 
19528
- .root:hover {
19529
- --ni-private-bottom-border-width: var(
19530
- --ni-private-hover-bottom-border-width
19531
- );
19532
- border-bottom-color: ${borderHoverColor};
19533
- }
19534
-
19535
- :host([readonly]) .root:hover {
19536
- --ni-private-bottom-border-width: 1px;
19537
- }
19538
-
19539
- :host([disabled]) .root:hover {
19540
- --ni-private-bottom-border-width: 1px;
19541
- }
19542
-
19543
19553
  .root:focus-within {
19544
19554
  border-bottom-color: ${borderHoverColor};
19545
19555
  }
@@ -19587,10 +19597,7 @@
19587
19597
  background: transparent;
19588
19598
  color: inherit;
19589
19599
  padding: 0px;
19590
- height: calc(
19591
- ${controlHeight} - ${borderWidth} -
19592
- var(--ni-private-hover-bottom-border-width)
19593
- );
19600
+ height: ${controlHeight};
19594
19601
  width: 100%;
19595
19602
  margin-top: auto;
19596
19603
  margin-bottom: auto;
@@ -19634,6 +19641,36 @@
19634
19641
  display: contents;
19635
19642
  }
19636
19643
 
19644
+ [part='end']::after {
19645
+ content: '';
19646
+ position: absolute;
19647
+ bottom: calc(-1 * ${borderWidth});
19648
+ width: 0px;
19649
+ height: 0px;
19650
+ border-bottom: ${borderHoverColor}
19651
+ var(--ni-private-hover-indicator-width) solid;
19652
+ transition: width ${smallDelay} ease-in;
19653
+ }
19654
+
19655
+ @media (prefers-reduced-motion) {
19656
+ [part='end']::after {
19657
+ transition-duration: 0s;
19658
+ }
19659
+ }
19660
+
19661
+ :host(.invalid) [part='end']::after {
19662
+ border-bottom-color: ${failColor};
19663
+ }
19664
+
19665
+ :host(:hover) [part='end']::after {
19666
+ width: 100%;
19667
+ }
19668
+
19669
+ :host([disabled]:hover) [part='end']::after,
19670
+ :host([readonly]:hover) [part='end']::after {
19671
+ width: 0px;
19672
+ }
19673
+
19637
19674
  .error-content {
19638
19675
  display: none;
19639
19676
  }
@@ -19689,46 +19726,33 @@
19689
19726
  }
19690
19727
  `.withBehaviors(appearanceBehavior(TextFieldAppearance.underline, css `
19691
19728
  .root {
19692
- --ni-private-bottom-border-width: 1px;
19729
+ border-bottom-width: ${borderWidth};
19730
+ }
19731
+
19732
+ .control {
19733
+ height: var(--ni-private-height-within-border);
19693
19734
  padding-top: ${borderWidth};
19694
19735
  padding-left: ${borderWidth};
19695
19736
  padding-right: ${borderWidth};
19696
19737
  }
19697
-
19698
- :host([disabled]) .root {
19699
- border-color: rgba(${borderRgbPartialColor}, 0.1);
19700
- }
19701
-
19702
- :host([disabled]) .root:hover {
19703
- --ni-private-bottom-border-width: 1px;
19704
- }
19705
19738
  `), appearanceBehavior(TextFieldAppearance.block, css `
19706
19739
  .root {
19707
19740
  background-color: rgba(${borderRgbPartialColor}, 0.1);
19708
- --ni-private-bottom-border-width: 0px;
19709
- padding-top: ${borderWidth};
19710
- padding-left: ${borderWidth};
19711
- padding-right: ${borderWidth};
19712
19741
  }
19713
19742
 
19714
- .root:focus-within {
19715
- --ni-private-bottom-border-width: 1px;
19716
- }
19717
-
19718
- .root:focus-within:hover {
19719
- --ni-private-bottom-border-width: var(
19720
- --ni-private-hover-bottom-border-width
19721
- );
19743
+ .control {
19744
+ padding-left: ${borderWidth};
19745
+ padding-right: ${borderWidth};
19722
19746
  }
19723
19747
 
19748
+ .root:focus-within,
19724
19749
  :host(.invalid) .root {
19725
- --ni-private-bottom-border-width: 1px;
19750
+ border-bottom-width: ${borderWidth};
19726
19751
  }
19727
19752
 
19728
- :host(.invalid) .root:hover {
19729
- --ni-private-bottom-border-width: var(
19730
- --ni-private-hover-bottom-border-width
19731
- );
19753
+ .root:focus-within .control,
19754
+ :host(.invalid) .control {
19755
+ height: calc(${controlHeight} - ${borderWidth});
19732
19756
  }
19733
19757
 
19734
19758
  :host([readonly]) .root {
@@ -19739,28 +19763,20 @@
19739
19763
  :host([disabled]) .root {
19740
19764
  background-color: rgba(${borderRgbPartialColor}, 0.07);
19741
19765
  }
19742
-
19743
- :host([disabled]) .root:hover {
19744
- --ni-private-bottom-border-width: 0px;
19745
- }
19746
-
19747
- :host(.invalid[disabled]) .root {
19748
- --ni-private-bottom-border-width: 1px;
19749
- }
19750
19766
  `), appearanceBehavior(TextFieldAppearance.outline, css `
19751
19767
  .root {
19752
- --ni-private-bottom-border-width: 1px;
19753
19768
  border-width: ${borderWidth};
19754
- border-bottom-width: var(--ni-private-bottom-border-width);
19769
+ }
19770
+
19771
+ .control {
19772
+ height: var(--ni-private-height-within-border);
19755
19773
  }
19756
19774
 
19757
19775
  :host(.invalid) .errortext {
19758
19776
  top: calc(${controlHeight} - ${borderWidth});
19759
19777
  }
19760
19778
  `), appearanceBehavior(TextFieldAppearance.frameless, css `
19761
- .root {
19762
- --ni-private-bottom-border-width: 0px;
19763
- padding-top: ${borderWidth};
19779
+ .control {
19764
19780
  padding-left: ${borderWidth};
19765
19781
  padding-right: ${borderWidth};
19766
19782
  }
@@ -19768,10 +19784,6 @@
19768
19784
  :host([readonly]) .root {
19769
19785
  border-color: transparent;
19770
19786
  }
19771
-
19772
- .root:hover {
19773
- --ni-private-bottom-border-width: 0px;
19774
- }
19775
19787
  `), themeBehavior(css `
19776
19788
  ${'' /* Light theme */}
19777
19789
  .control::-ms-reveal {