@ni/nimble-components 21.10.1 → 22.0.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.
- package/dist/all-components-bundle.js +67 -25
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +6 -6
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/banner/template.js +4 -4
- package/dist/esm/banner/template.js.map +1 -1
- package/dist/esm/combobox/index.d.ts +7 -2
- package/dist/esm/combobox/index.js +15 -0
- package/dist/esm/combobox/index.js.map +1 -1
- package/dist/esm/label-provider/core/index.d.ts +9 -9
- package/dist/esm/label-provider/core/index.js +10 -10
- package/dist/esm/label-provider/core/index.js.map +1 -1
- package/dist/esm/label-provider/core/label-token-defaults.js +3 -3
- package/dist/esm/label-provider/core/label-token-defaults.js.map +1 -1
- package/dist/esm/label-provider/core/label-tokens.d.ts +3 -3
- package/dist/esm/label-provider/core/label-tokens.js +9 -9
- package/dist/esm/label-provider/core/label-tokens.js.map +1 -1
- package/dist/esm/list-option/index.d.ts +2 -0
- package/dist/esm/list-option/index.js +12 -0
- package/dist/esm/list-option/index.js.map +1 -1
- package/dist/esm/patterns/dropdown/types.d.ts +14 -0
- package/dist/esm/patterns/dropdown/types.js.map +1 -1
- package/dist/esm/select/index.d.ts +7 -2
- package/dist/esm/select/index.js +15 -0
- package/dist/esm/select/index.js.map +1 -1
- package/dist/esm/select/testing/select.pageobject.d.ts +2 -2
- package/dist/esm/select/testing/select.pageobject.js +4 -5
- package/dist/esm/select/testing/select.pageobject.js.map +1 -1
- package/package.json +1 -1
|
@@ -2361,7 +2361,7 @@ const um="nimble-icon-info"
|
|
|
2361
2361
|
dm("icon-triangle-filled",class extends cm{constructor(){super(Bf)}})
|
|
2362
2362
|
const pm="nimble-icon-triangle-filled"
|
|
2363
2363
|
dm("icon-xmark",class extends cm{constructor(){super(rm)}})
|
|
2364
|
-
const fm="nimble-icon-xmark",mm={default:void 0,error:"error",warning:"warning",information:"information"},gm="Close",vm="Increment",bm="Decrement",ym="Error",wm="Warning",xm="Information",Cm="Search",km="No items found",Sm=ui.create({name:"popup-dismiss-label",cssCustomPropertyName:null}).withDefault(gm),$m=ui.create({name:"numeric-decrement-label",cssCustomPropertyName:null}).withDefault(bm),Mm=ui.create({name:"numeric-increment-label",cssCustomPropertyName:null}).withDefault(vm),_m=ui.create({name:"
|
|
2364
|
+
const fm="nimble-icon-xmark",mm={default:void 0,error:"error",warning:"warning",information:"information"},gm="Close",vm="Increment",bm="Decrement",ym="Error",wm="Warning",xm="Information",Cm="Search",km="No items found",Sm=ui.create({name:"popup-dismiss-label",cssCustomPropertyName:null}).withDefault(gm),$m=ui.create({name:"numeric-decrement-label",cssCustomPropertyName:null}).withDefault(bm),Mm=ui.create({name:"numeric-increment-label",cssCustomPropertyName:null}).withDefault(vm),_m=ui.create({name:"popup-icon-error-label",cssCustomPropertyName:null}).withDefault(ym),Em=ui.create({name:"popup-icon-warning-label",cssCustomPropertyName:null}).withDefault(wm),Im=ui.create({name:"popup-icon-information-label",cssCustomPropertyName:null}).withDefault(xm),Dm=ui.create({name:"filter-search-label",cssCustomPropertyName:null}).withDefault(Cm),Am=ui.create({name:"filter-no-results-label",cssCustomPropertyName:null}).withDefault(km),Tm=Z`
|
|
2365
2365
|
<div class="container"
|
|
2366
2366
|
role="status"
|
|
2367
2367
|
aria-atomic="${t=>t.ariaAtomic}"
|
|
@@ -3344,7 +3344,7 @@ break
|
|
|
3344
3344
|
case la:case da:this.open&&this.valueUpdatedByInput&&(this.valueUpdatedByInput=!1)
|
|
3345
3345
|
break
|
|
3346
3346
|
default:return e}return e}focusoutHandler(t){const e=super.focusoutHandler(t)
|
|
3347
|
-
return this.open=!1,this.emitChangeIfValueUpdated(),e}focusAndScrollOptionIntoView(){this.open&&super.focusAndScrollOptionIntoView()}openChanged(){super.openChanged(),this.dropdownButton&&(this.dropdownButton.checked=this.open)}regionChanged(t,e){this.region&&this.controlWrapper&&(this.region.anchorElement=this.controlWrapper)}controlWrapperChanged(t,e){this.region&&this.controlWrapper&&(this.region.anchorElement=this.controlWrapper)}ariaLabelChanged(t,e){this.updateInputAriaLabel()}maxHeightChanged(){this.updateListboxMaxHeightCssVariable()}updateListboxMaxHeightCssVariable(){this.listbox&&this.listbox.style.setProperty("--ni-private-select-max-height",`${this.maxHeight}px`)}updateInputAriaLabel(){const t=this.shadowRoot?.querySelector(".selected-value")
|
|
3347
|
+
return this.open=!1,this.emitChangeIfValueUpdated(),e}registerOption(t){this.options.includes(t)||this.options.push(t)}focusAndScrollOptionIntoView(){this.open&&super.focusAndScrollOptionIntoView()}openChanged(){super.openChanged(),this.dropdownButton&&(this.dropdownButton.checked=this.open)}regionChanged(t,e){this.region&&this.controlWrapper&&(this.region.anchorElement=this.controlWrapper)}controlWrapperChanged(t,e){this.region&&this.controlWrapper&&(this.region.anchorElement=this.controlWrapper)}ariaLabelChanged(t,e){this.updateInputAriaLabel()}maxHeightChanged(){this.updateListboxMaxHeightCssVariable()}updateListboxMaxHeightCssVariable(){this.listbox&&this.listbox.style.setProperty("--ni-private-select-max-height",`${this.maxHeight}px`)}updateInputAriaLabel(){const t=this.shadowRoot?.querySelector(".selected-value")
|
|
3348
3348
|
this.ariaLabel?t?.setAttribute("aria-label",this.ariaLabel):t?.removeAttribute("aria-label")}emitChangeIfValueUpdated(){this.valueUpdatedByInput&&(this.value!==this.valueBeforeTextUpdate&&this.$emit("change"),this.valueUpdatedByInput=!1)}}t([st],hg.prototype,"appearance",void 0),t([g],hg.prototype,"dropdownButton",void 0),t([st({attribute:"error-text"})],hg.prototype,"errorText",void 0),t([st({attribute:"error-visible",mode:"boolean"})],hg.prototype,"errorVisible",void 0),t([g],hg.prototype,"region",void 0),t([g],hg.prototype,"controlWrapper",void 0),t([g],hg.prototype,"hasOverflow",void 0)
|
|
3349
3349
|
const ug=hg.compose({baseName:"combobox",baseClass:Zn,template:(t,e)=>Z`
|
|
3350
3350
|
<template
|
|
@@ -3929,8 +3929,8 @@ dm("icon-xmark-check",class extends cm{constructor(){super(sm)}})
|
|
|
3929
3929
|
class Ng extends Le{constructor(){super(...arguments),this.propertyNotifier=m.getNotifier(this)}connectedCallback(){super.connectedCallback(),this.initializeThemeProvider(),this.propertyNotifier.subscribe(this)}disconnectedCallback(){if(super.disconnectedCallback(),this.propertyNotifier.unsubscribe(this),this.themeProvider){for(const t of Object.values(this.supportedLabels))t.deleteValueFor(this.themeProvider)
|
|
3930
3930
|
this.themeProvider=void 0}}handleChange(t,e){if(this.supportedLabels[e]){const t=this.supportedLabels[e],n=this[e]
|
|
3931
3931
|
this.themeProvider&&(null==n?t.deleteValueFor(this.themeProvider):t.setValueFor(this.themeProvider,n))}}initializeThemeProvider(){if(this.themeProvider=this.closest("nimble-theme-provider")??void 0,this.themeProvider)for(const[t,e]of Object.entries(this.supportedLabels)){const n=this[t]
|
|
3932
|
-
null==n?e.deleteValueFor(this.themeProvider):e.setValueFor(this.themeProvider,n)}}}const Pg={popupDismiss:Sm,numericDecrement:$m,numericIncrement:Mm,
|
|
3933
|
-
class Lg extends Ng{constructor(){super(...arguments),this.supportedLabels=Pg}}t([st({attribute:"popup-dismiss"})],Lg.prototype,"popupDismiss",void 0),t([st({attribute:"numeric-decrement"})],Lg.prototype,"numericDecrement",void 0),t([st({attribute:"numeric-increment"})],Lg.prototype,"numericIncrement",void 0),t([st({attribute:"
|
|
3932
|
+
null==n?e.deleteValueFor(this.themeProvider):e.setValueFor(this.themeProvider,n)}}}const Pg={popupDismiss:Sm,numericDecrement:$m,numericIncrement:Mm,popupIconError:_m,popupIconWarning:Em,popupIconInformation:Im,filterSearch:Dm,filterNoResults:Am}
|
|
3933
|
+
class Lg extends Ng{constructor(){super(...arguments),this.supportedLabels=Pg}}t([st({attribute:"popup-dismiss"})],Lg.prototype,"popupDismiss",void 0),t([st({attribute:"numeric-decrement"})],Lg.prototype,"numericDecrement",void 0),t([st({attribute:"numeric-increment"})],Lg.prototype,"numericIncrement",void 0),t([st({attribute:"popup-icon-error"})],Lg.prototype,"popupIconError",void 0),t([st({attribute:"popup-icon-warning"})],Lg.prototype,"popupIconWarning",void 0),t([st({attribute:"popup-icon-information"})],Lg.prototype,"popupIconInformation",void 0),t([st({attribute:"filter-search"})],Lg.prototype,"filterSearch",void 0),t([st({attribute:"filter-no-results"})],Lg.prototype,"filterNoResults",void 0)
|
|
3934
3934
|
const zg=Lg.compose({baseName:"label-provider-core"})
|
|
3935
3935
|
bi.getOrCreate().withPrefix("nimble").register(zg())
|
|
3936
3936
|
const Vg="Collapse group",Hg="Expand group",Bg="Collapse row",qg="Expand row",Ug="Collapse all",jg="Options",Wg="Grouped",Zg="Sorted ascending",Gg="Sorted descending",Kg="Select all rows",Jg="Select all rows in group",Xg="Select row",Yg="Row operations",Qg="Loading",tv=ui.create({name:"table-group-collapse-label",cssCustomPropertyName:null}).withDefault(Vg),ev=ui.create({name:"table-group-expand-label",cssCustomPropertyName:null}).withDefault(Hg),nv=ui.create({name:"table-row-collapse-label",cssCustomPropertyName:null}).withDefault(Bg),iv=ui.create({name:"table-row-expand-label",cssCustomPropertyName:null}).withDefault(qg),ov=ui.create({name:"table-collapse-all-label",cssCustomPropertyName:null}).withDefault(Ug),rv=ui.create({name:"table-cell-action-menu-label",cssCustomPropertyName:null}).withDefault(jg),sv=ui.create({name:"table-column-header-grouped-label",cssCustomPropertyName:null}).withDefault(Wg),av=ui.create({name:"table-column-header-sorted-ascending-label",cssCustomPropertyName:null}).withDefault(Zg),lv=ui.create({name:"table-column-header-sorted-descending-label",cssCustomPropertyName:null}).withDefault(Gg),cv=ui.create({name:"table-select-all-label",cssCustomPropertyName:null}).withDefault(Kg),dv=ui.create({name:"table-group-select-all-label",cssCustomPropertyName:null}).withDefault(Jg),hv=ui.create({name:"table-row-select-label",cssCustomPropertyName:null}).withDefault(Xg),uv=ui.create({name:"table-row-operation-column-label",cssCustomPropertyName:null}).withDefault(Yg),pv=ui.create({name:"table-row-loading-label",cssCustomPropertyName:null}).withDefault(Qg),fv={groupCollapse:tv,groupExpand:ev,rowCollapse:nv,rowExpand:iv,collapseAll:ov,cellActionMenu:rv,columnHeaderGrouped:sv,columnHeaderSortedAscending:av,columnHeaderSortedDescending:lv,selectAll:cv,groupSelectAll:dv,rowSelect:hv,rowOperationColumn:uv,rowLoading:pv}
|
|
@@ -4007,7 +4007,7 @@ const vv=yt`
|
|
|
4007
4007
|
display: none;
|
|
4008
4008
|
}
|
|
4009
4009
|
`
|
|
4010
|
-
class bv extends Fn{constructor(){super(...arguments),this.hidden=!1,this.visuallyHidden=!1,this.hasOverflow=!1}get elementTextContent(){return this.contentSlot.assignedNodes().map((t=>t.textContent?.trim())).join(" ")}}t([st({mode:"boolean"})],bv.prototype,"hidden",void 0),t([st({attribute:"visually-hidden",mode:"boolean"})],bv.prototype,"visuallyHidden",void 0),t([g],bv.prototype,"hasOverflow",void 0)
|
|
4010
|
+
class bv extends Fn{constructor(){super(...arguments),this.hidden=!1,this.visuallyHidden=!1,this.hasOverflow=!1}get elementTextContent(){return this.contentSlot.assignedNodes().map((t=>t.textContent?.trim())).join(" ")}connectedCallback(){super.connectedCallback(),this.isListOptionOwner(this.parentElement)&&this.parentElement.registerOption(this)}isListOptionOwner(t){return!!t&&"function"==typeof t.registerOption}}t([st({mode:"boolean"})],bv.prototype,"hidden",void 0),t([st({attribute:"visually-hidden",mode:"boolean"})],bv.prototype,"visuallyHidden",void 0),t([g],bv.prototype,"hasOverflow",void 0)
|
|
4011
4011
|
const yv=bv.compose({baseName:"list-option",baseClass:Fn,template:(t,e)=>Z`
|
|
4012
4012
|
<template
|
|
4013
4013
|
aria-checked="${t=>t.ariaChecked}"
|
|
@@ -8917,7 +8917,7 @@ this.collapsible&&this.open&&(t.preventDefault(),this.open=!1),this.selectedInde
|
|
|
8917
8917
|
break
|
|
8918
8918
|
case"Tab":return this.collapsible&&this.open&&(t.preventDefault(),this.open=!1),!0}return this.open||this.indexWhenOpened===this.selectedIndex||(this.updateValue(!0),this.indexWhenOpened=this.selectedIndex),!(e===la||e===da)}selectedIndexChanged(t,e){this.setSelectedOptions(),this.updateValue()}disabledChanged(t,e){super.disabledChanged&&super.disabledChanged(t,e),this.ariaDisabled=this.disabled?"true":"false"}formResetCallback(){this.setProxyOptions(),super.setDefaultSelectedOption(),-1===this.selectedIndex&&(this.selectedIndex=0)}selectNextOption(){for(let t=this.selectedIndex+1;t<this.options.length;t++)if(!this.options[t]?.disabled){this.selectedIndex=t
|
|
8919
8919
|
break}}selectPreviousOption(){for(let t=this.selectedIndex-1;t>=0;t--)if(!this.options[t]?.disabled){this.selectedIndex=t
|
|
8920
|
-
break}}setSelectedOptions(){this.open&&-1===this.selectedIndex||super.setSelectedOptions()}focusAndScrollOptionIntoView(){this.open&&(super.focusAndScrollOptionIntoView(),window.requestAnimationFrame((()=>{this.filterInput?.focus()})))}positionChanged(t,e){this.positionAttribute=e,this.setPositioning()}sizeChanged(t,e){super.sizeChanged(t,e),this.proxy&&(this.proxy.size=e)}openChanged(){if(this.collapsible){if(this.open)return this.initializeOpenState(),void(this.indexWhenOpened=this.selectedIndex)
|
|
8920
|
+
break}}registerOption(t){this.options.includes(t)||this.options.push(t)}setSelectedOptions(){this.open&&-1===this.selectedIndex||super.setSelectedOptions()}focusAndScrollOptionIntoView(){this.open&&(super.focusAndScrollOptionIntoView(),window.requestAnimationFrame((()=>{this.filterInput?.focus()})))}positionChanged(t,e){this.positionAttribute=e,this.setPositioning()}sizeChanged(t,e){super.sizeChanged(t,e),this.proxy&&(this.proxy.size=e)}openChanged(){if(this.collapsible){if(this.open)return this.initializeOpenState(),void(this.indexWhenOpened=this.selectedIndex)
|
|
8921
8921
|
this.filter="",this.filterInput&&(this.filterInput.value=""),this.ariaControls="",this.ariaExpanded="false"}}selectedOptionsChanged(t,e){this.options?.forEach(((t,n)=>{const i=m.getNotifier(t)
|
|
8922
8922
|
i.unsubscribe(this,"selected"),t.selected=e.includes(t),i.subscribe(this,"selected")
|
|
8923
8923
|
const o=this.proxy?.options.item(n)
|