@ni/nimble-components 15.0.0 → 15.1.1

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.
@@ -1064,7 +1064,7 @@ const[rr,ar,lr,cr,dr,hr,pr,ur]=La(bn,(t=>Da(t)),(t=>Oo(Da(t),.3)),"Source Sans P
1064
1064
  La(fn,(t=>Da(t)),(t=>Oo(Da(t),.3)),"Source Sans Pro","400","19px","24px","sans-serif"),La(xn,(t=>Da(t)),(t=>Oo(Da(t),.3)),"Source Sans Pro","300","16px","20px","sans-serif")
1065
1065
  const[vr,gr,mr,br,fr,xr,wr,yr]=La(wn,(t=>Da(t)),(t=>Oo(Da(t),.3)),"Source Sans Pro","300","12.800000190734863px","16px","sans-serif")
1066
1066
  La(yn,(t=>Da(t)),(t=>Oo(Da(t),.3)),"Source Sans Pro","400","14px","18px","sans-serif")
1067
- const[$r,kr,Cr,_r,zr,Ir,Or,Hr]=La($n,(t=>Oo(Da(t),.6)),(t=>Oo(Da(t),.3)),"Source Sans Pro","400","14px","18px","sans-serif"),[Ar,Sr,Er,Rr,Mr,Vr,Lr,Tr]=La(kn,(t=>Da(t)),(t=>Oo(Da(t),.3)),"Source Sans Pro","600","14px","18px","sans-serif"),[Pr,Br,Dr,Fr,Nr,qr,Ur,jr]=La(Cn,(t=>Da(t)),(t=>Oo(Da(t),.3)),"Source Sans Pro","400","14px","18px","sans-serif"),[Wr,Kr,Xr,Gr,Yr,Qr,Jr,Zr]=La(_n,(t=>Da(t)),(t=>Oo(Da(t),.3)),"Source Sans Pro","600","11px","16px","sans-serif"),[ta,ea,sa,ia,oa,na,ra,aa]=La(zn,(t=>Oo(Da(t),.6)),(t=>Oo(Da(t),.3)),"Source Sans Pro","600","11px","16px","sans-serif"),[la,ca,da,ha,pa,ua,va,ga]=La(In,(t=>Da(t)),(t=>Oo(Da(t),.3)),"Source Sans Pro","400","12.800000190734863px","16px","sans-serif"),[ma,ba,fa,xa,wa,ya,$a,ka]=La(On,(t=>Da(t)),(t=>Oo(Da(t),.3)),"Source Sans Pro","400","11px",ko,"sans-serif"),[Ca,_a,za,Ia,Oa,Ha,Aa,Sa]=La(An,(t=>Pa(t)),(t=>Oo(Pa(t),.3)),"Source Sans Pro","400","9px",ko,"sans-serif"),Ea=Ls.create(Sn(cn)).withDefault("uppercase"),Ra=Ls.create(Sn(hn)).withDefault("0.075s")
1067
+ const[$r,kr,Cr,_r,zr,Ir,Or,Hr]=La($n,(t=>Oo(Da(t),.6)),(t=>Oo(Da(t),.3)),"Source Sans Pro","400","14px","18px","sans-serif"),[Ar,Sr,Er,Rr,Mr,Vr,Lr,Tr]=La(kn,(t=>Da(t)),(t=>Oo(Da(t),.3)),"Source Sans Pro","600","14px","18px","sans-serif"),[Pr,Br,Dr,Fr,Nr,qr,Ur,jr]=La(Cn,(t=>Da(t)),(t=>Oo(Da(t),.3)),"Source Sans Pro","400","14px","18px","sans-serif"),[Wr,Kr,Xr,Gr,Yr,Qr,Jr,Zr]=La(_n,(t=>Da(t)),(t=>Oo(Da(t),.3)),"Source Sans Pro","600","11px","16px","sans-serif"),[ta,ea,sa,ia,oa,na,ra,aa]=La(zn,(t=>Oo(Da(t),.6)),(t=>Oo(Da(t),.3)),"Source Sans Pro","600","11px","16px","sans-serif"),[la,ca,da,ha,pa,ua,va,ga]=La(In,(t=>Da(t)),(t=>Oo(Da(t),.3)),"Source Sans Pro","400","12.800000190734863px","16px","sans-serif"),[ma,ba,fa,xa,wa,ya,$a,ka]=La(On,(t=>Da(t)),(t=>Oo(Da(t),.3)),"Source Sans Pro","400","11px",ko,"sans-serif"),[Ca,_a,za,Ia,Oa,Ha,Aa,Sa]=La(An,(t=>Pa(t)),(t=>Oo(Pa(t),.3)),"Source Sans Pro","400","11px",ko,"sans-serif"),Ea=Ls.create(Sn(cn)).withDefault("uppercase"),Ra=Ls.create(Sn(hn)).withDefault("0.075s")
1068
1068
  Ls.create(Sn(pn)).withDefault("0.15s")
1069
1069
  const Ma=Ls.create(Sn(un)).withDefault(Co)
1070
1070
  function Va(t){const{red:e,green:s,blue:i}=Io(t)
@@ -1962,6 +1962,10 @@ const rh="underline",ah="outline",lh="block",ch=pt`
1962
1962
  width: calc(100% - 8px);
1963
1963
  }
1964
1964
 
1965
+ :host([error-visible]):before {
1966
+ border-bottom-color: ${jn};
1967
+ }
1968
+
1965
1969
  :host::after {
1966
1970
  content: '';
1967
1971
  position: absolute;
@@ -1985,6 +1989,10 @@ const rh="underline",ah="outline",lh="block",ch=pt`
1985
1989
  width: 100%;
1986
1990
  }
1987
1991
 
1992
+ :host([error-visible]):after {
1993
+ border-bottom-color: ${jn};
1994
+ }
1995
+
1988
1996
  :host([disabled]:hover)::after {
1989
1997
  width: 0px;
1990
1998
  }
@@ -2011,6 +2019,12 @@ const rh="underline",ah="outline",lh="block",ch=pt`
2011
2019
  border-color: rgba(${Un}, 0.1);
2012
2020
  }
2013
2021
 
2022
+ :host([error-visible]) .control,
2023
+ :host([error-visible][open]) .control,
2024
+ :host([error-visible][disabled]) .control {
2025
+ border-bottom-color: ${jn};
2026
+ }
2027
+
2014
2028
  .listbox {
2015
2029
  box-sizing: border-box;
2016
2030
  display: inline-flex;
@@ -2187,10 +2201,6 @@ const rh="underline",ah="outline",lh="block",ch=pt`
2187
2201
  color: ${Dr};
2188
2202
  }
2189
2203
 
2190
- :host([error-visible])::after {
2191
- border-bottom-color: ${jn};
2192
- }
2193
-
2194
2204
  .control {
2195
2205
  bottom-border-width: var(--ni-private-bottom-border-width);
2196
2206
  }
@@ -2199,19 +2209,6 @@ const rh="underline",ah="outline",lh="block",ch=pt`
2199
2209
  border-bottom-color: ${Gn};
2200
2210
  }
2201
2211
 
2202
- :host([error-visible]) .control {
2203
- border-bottom: var(--ni-private-bottom-border-width) solid ${jn};
2204
- }
2205
-
2206
- :host([disabled]) .control {
2207
- border-color: rgba(${Un}, 0.1);
2208
- }
2209
-
2210
- :host([error-visible][disabled]) .control,
2211
- :host([error-visible][open]) .control {
2212
- border-bottom-color: ${jn};
2213
- }
2214
-
2215
2212
  .selected-value {
2216
2213
  -webkit-appearance: none;
2217
2214
  background: transparent;
@@ -3582,9 +3579,32 @@ const Kh=class extends hi{}.compose({baseName:"radio-group",baseClass:hi,templat
3582
3579
  Ns.getOrCreate().withPrefix("nimble").register(Kh())
3583
3580
  const Xh=pt`
3584
3581
  ${ch}
3585
- `
3586
- class Gh extends fi{constructor(){super(...arguments),this.appearance=rh}setPositioning(){this.$fastController.isConnected&&(super.setPositioning(),this.updateListboxMaxHeightCssVariable())}slottedOptionsChanged(t,e){const s=this.value
3587
- super.slottedOptionsChanged(t,e),s&&(this.value=s)}maxHeightChanged(){this.updateListboxMaxHeightCssVariable()}updateListboxMaxHeightCssVariable(){this.listbox&&this.listbox.style.setProperty("--ni-private-select-max-height",`${this.maxHeight}px`)}}io([tt],Gh.prototype,"appearance",void 0)
3582
+ ${dh}
3583
+
3584
+ ${""}
3585
+ [part='selected-value'] {
3586
+ order: 1;
3587
+ }
3588
+
3589
+ [part='indicator'] {
3590
+ order: 3;
3591
+ }
3592
+
3593
+ .error-icon {
3594
+ order: 2;
3595
+ }
3596
+
3597
+ .end {
3598
+ display: contents;
3599
+ }
3600
+ `.withBehaviors(Td(lh,pt`
3601
+ :host([error-visible]) .control {
3602
+ border-bottom-width: ${ir};
3603
+ padding-bottom: 0;
3604
+ }
3605
+ `))
3606
+ class Gh extends fi{constructor(){super(...arguments),this.appearance=rh,this.errorVisible=!1}setPositioning(){this.$fastController.isConnected&&(super.setPositioning(),this.updateListboxMaxHeightCssVariable())}slottedOptionsChanged(t,e){const s=this.value
3607
+ super.slottedOptionsChanged(t,e),s&&(this.value=s)}maxHeightChanged(){this.updateListboxMaxHeightCssVariable()}updateListboxMaxHeightCssVariable(){this.listbox&&this.listbox.style.setProperty("--ni-private-select-max-height",`${this.maxHeight}px`)}}io([tt],Gh.prototype,"appearance",void 0),io([tt({attribute:"error-text"})],Gh.prototype,"errorText",void 0),io([tt({attribute:"error-visible",mode:"boolean"})],Gh.prototype,"errorVisible",void 0)
3588
3608
  const Yh=Gh.compose({baseName:"select",baseClass:fi,template:(t,e)=>U`
3589
3609
  <template
3590
3610
  class="${t=>[t.collapsible&&"collapsible",t.collapsible&&t.open&&"open",t.disabled&&"disabled",t.collapsible&&t.position].filter(Boolean).join(" ")}"
@@ -3638,7 +3658,13 @@ const Yh=Gh.compose({baseName:"select",baseClass:fi,template:(t,e)=>U`
3638
3658
  ></slot>
3639
3659
  </div>
3640
3660
  </template>
3641
- `,styles:Xh,indicator:Ya.data})
3661
+ `,styles:Xh,indicator:Ya.data,end:U`
3662
+ <${Ns.tagFor(nh)}
3663
+ severity="error"
3664
+ class="error-icon"
3665
+ ></${Ns.tagFor(nh)}>
3666
+ ${Zd}
3667
+ `})
3642
3668
  Ns.getOrCreate().withPrefix("nimble").register(Yh())
3643
3669
  const Qh=pt`
3644
3670
  ${Ji("inline-flex")}