@ni/nimble-components 29.2.2 → 29.2.4
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.
- package/dist/all-components-bundle.js +11 -6
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +9 -8
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/banner/styles.js +1 -1
- package/dist/esm/banner/styles.js.map +1 -1
- package/dist/esm/select/index.js +9 -4
- package/dist/esm/select/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -2150,6 +2150,7 @@ t&&_a.unsubscribe(t)}}const mh=(e,t)=>new fh(e,t),gh=xe`
|
|
|
2150
2150
|
font-size: 12.8px;
|
|
2151
2151
|
align-items: top;
|
|
2152
2152
|
overflow: hidden;
|
|
2153
|
+
overflow-wrap: anywhere;
|
|
2153
2154
|
}
|
|
2154
2155
|
|
|
2155
2156
|
:host(:not([open])) {
|
|
@@ -2181,7 +2182,6 @@ t&&_a.unsubscribe(t)}}const mh=(e,t)=>new fh(e,t),gh=xe`
|
|
|
2181
2182
|
display: inline;
|
|
2182
2183
|
font-weight: bold;
|
|
2183
2184
|
padding-right: 8px;
|
|
2184
|
-
white-space: nowrap;
|
|
2185
2185
|
}
|
|
2186
2186
|
|
|
2187
2187
|
:host([title-hidden]) slot[name='title'] {
|
|
@@ -9044,15 +9044,14 @@ let uT=class extends Ii{}
|
|
|
9044
9044
|
class pT extends($n(uT)){constructor(){super(...arguments),this.proxy=document.createElement("select")}}const fT=e=>!e.visuallyHidden&&!e.disabled&&!e.hidden,mT=e=>!e.visuallyHidden&&!e.hidden
|
|
9045
9045
|
class gT extends pT{constructor(){super(...arguments),this.appearance=Hm,this.errorVisible=!1,this.filterMode=Wm.none,this.clearable=!1,this.displayPlaceholder=!1,this.open=!1,this.listboxId=wa("listbox-"),this.hasOverflow=!1,this.filteredOptions=[],this.filter="",this.maxHeight=0,this._value="",this.forcedPosition=!1}get collapsible(){return!(this.multiple||"number"==typeof this.size)}connectedCallback(){super.connectedCallback(),this.forcedPosition=!!this.positionAttribute,this.open&&this.initializeOpenState()}get value(){return m.track(this,"value"),this._value}set value(e){const t=this._value
|
|
9046
9046
|
let n=e
|
|
9047
|
-
if(this.options?.length){const e=this.options.findIndex((e=>e.value===n)),t=this.options[this.selectedIndex]?.value??null,i=this.options[e]?.value??null;-1!==e&&t===i||(n="",this.selectedIndex=e),n=this.firstSelectedOption?.value??n}t===n||this.open&&this.selectedIndex<0||(this._value=n,super.valueChanged(t,n),m.notify(this,"value"),this.updateDisplayValue())}get displayValue(){return m.track(this,"displayValue"),this.firstSelectedOption?.text??""}anchoredRegionChanged(e,t){this.anchoredRegion&&this.control&&(this.anchoredRegion.anchorElement=this.control)}controlChanged(e,t){this.anchoredRegion&&this.control&&(this.anchoredRegion.anchorElement=this.control)}slottedOptionsChanged(e,t){const
|
|
9048
|
-
this.options.forEach((e=>{const t=m.getNotifier(e)
|
|
9047
|
+
if(this.options?.length){const e=this.options.findIndex((e=>e.value===n)),t=this.options[this.selectedIndex]?.value??null,i=this.options[e]?.value??null;-1!==e&&t===i||(n="",this.selectedIndex=e),n=this.firstSelectedOption?.value??n}t===n||this.open&&this.selectedIndex<0||(this._value=n,super.valueChanged(t,n),m.notify(this,"value"),this.updateDisplayValue())}get displayValue(){return m.track(this,"displayValue"),this.firstSelectedOption?.text??""}anchoredRegionChanged(e,t){this.anchoredRegion&&this.control&&(this.anchoredRegion.anchorElement=this.control)}controlChanged(e,t){this.anchoredRegion&&this.control&&(this.anchoredRegion.anchorElement=this.control)}slottedOptionsChanged(e,t){this.options.forEach((e=>{const t=m.getNotifier(e)
|
|
9049
9048
|
t.unsubscribe(this,"value"),t.unsubscribe(this,"hidden"),t.unsubscribe(this,"disabled")})),e?.filter(hT).forEach((e=>{const t=m.getNotifier(e)
|
|
9050
|
-
t.unsubscribe(this,"hidden"),t.unsubscribe(this,"visuallyHidden")}))
|
|
9051
|
-
const
|
|
9052
|
-
super.slottedOptionsChanged(e,
|
|
9049
|
+
t.unsubscribe(this,"hidden"),t.unsubscribe(this,"visuallyHidden"),t.unsubscribe(this,"listOptions")}))
|
|
9050
|
+
const n=this.getSlottedOptions(t)
|
|
9051
|
+
this.selectedIndex=n.findIndex((e=>e.selected)),super.slottedOptionsChanged(e,n),n.forEach((e=>{const t=m.getNotifier(e)
|
|
9053
9052
|
t.subscribe(this,"value"),t.subscribe(this,"hidden"),t.subscribe(this,"disabled")})),t?.filter(hT).forEach((e=>{this.updateAdjacentSeparatorState(e)
|
|
9054
9053
|
const t=m.getNotifier(e)
|
|
9055
|
-
t.subscribe(this,"hidden"),t.subscribe(this,"visuallyHidden")})),this.setProxyOptions(),this.updateValue(),this.filterOptions()
|
|
9054
|
+
t.subscribe(this,"hidden"),t.subscribe(this,"visuallyHidden"),t.subscribe(this,"listOptions")})),this.setProxyOptions(),this.updateValue(),this.filterOptions()}clickHandler(e){if(this.disabled)return
|
|
9056
9055
|
let t=!1
|
|
9057
9056
|
if(this.open){const n=e.target.closest("option,[role=option]")
|
|
9058
9057
|
if(t=null!==n,n?.disabled)return}const n=this.selectedIndex
|
|
@@ -9065,7 +9064,9 @@ case"hidden":dT(n)?(n.visuallyHidden=n.hidden,this.updateAdjacentSeparatorState(
|
|
|
9065
9064
|
break
|
|
9066
9065
|
case"visuallyHidden":(hT(n)||dT(n))&&this.updateAdjacentSeparatorState(n)
|
|
9067
9066
|
break
|
|
9068
|
-
case"disabled":this.updateDisplayValue()
|
|
9067
|
+
case"disabled":this.updateDisplayValue()
|
|
9068
|
+
break
|
|
9069
|
+
case"listOptions":this.slottedOptionsChanged(this.slottedOptions,this.slottedOptions)}}mousedownHandler(e){return e.offsetX>=0&&e.offsetX<=this.listbox?.scrollWidth?super.mousedownHandler(e):this.collapsible}regionLoadedHandler(){this.focusAndScrollOptionIntoView()}multipleChanged(e,t){super.multipleChanged(e,t),this.proxy&&(this.proxy.multiple=t)}inputClickHandler(e){e.stopPropagation()}clearClickHandler(e){this.open=!1,this.clearSelect(),this.updateValue(!0),e.stopPropagation()}updateDisplayValue(){const e=this.getPlaceholderOption()
|
|
9069
9070
|
e&&this.firstSelectedOption===e?this.displayPlaceholder=!0:this.displayPlaceholder=!1,m.notify(this,"displayValue")}inputHandler(e){this.filter=this.filterInput?.value??"",this.filterOptions()
|
|
9070
9071
|
const t=this.filteredOptions.filter((e=>!e.disabled))
|
|
9071
9072
|
let n=""!==this.filter?this.openActiveIndex??this.selectedIndex:this.selectedIndex
|