@ni/nimble-components 14.0.0 → 15.1.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.
@@ -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;
@@ -3509,7 +3506,7 @@ const Uh=pt`
3509
3506
  fill: rgba(${Un}, 0.3);
3510
3507
  }
3511
3508
  `
3512
- const jh=class extends vi{}.compose({baseName:"radio-button",baseClass:vi,template:(t,e)=>U`
3509
+ const jh=class extends vi{}.compose({baseName:"radio",baseClass:vi,template:(t,e)=>U`
3513
3510
  <template
3514
3511
  role="radio"
3515
3512
  class="${t=>t.checked?"checked":""} ${t=>t.readOnly?"readonly":""}"
@@ -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")}