@ni/nimble-components 33.12.0 → 33.12.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.
- package/dist/all-components-bundle.js +25 -5
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +4 -4
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/theme-provider/design-tokens.js +1 -1
- package/dist/esm/theme-provider/design-tokens.js.map +1 -1
- package/package.json +1 -1
|
@@ -871,12 +871,12 @@ const i=Math.min(this.min,this.max)
|
|
|
871
871
|
void 0!==this.min&&this.min!==i&&(this.min=i),this.value=this.getValidValue(this.value)}minChanged(t,e){var n
|
|
872
872
|
this.min=Math.min(e,null!==(n=this.max)&&void 0!==n?n:e)
|
|
873
873
|
const i=Math.max(this.min,this.max)
|
|
874
|
-
void 0!==this.max&&this.max!==i&&(this.max=i),this.value=this.getValidValue(this.value)}get valueAsNumber(){return parseFloat(super.value)}set valueAsNumber(t){this.value=t.toString()}valueChanged(t,e){this.value=this.getValidValue(e),e===this.value&&(this.control&&!this.isUserInput&&
|
|
874
|
+
void 0!==this.max&&this.max!==i&&(this.max=i),this.value=this.getValidValue(this.value)}get valueAsNumber(){return parseFloat(super.value)}set valueAsNumber(t){this.value=t.toString()}valueChanged(t,e){this.value=this.getValidValue(e),e===this.value&&(this.control&&!this.isUserInput&&this.syncValueToInnerControl(),super.valueChanged(t,this.value),void 0===t||this.isUserInput||(this.$emit("input"),this.$emit("change")),this.isUserInput=!1)}validate(){super.validate(this.control)}getValidValue(t){var e,n
|
|
875
875
|
let i=parseFloat(parseFloat(t).toPrecision(12))
|
|
876
876
|
return isNaN(i)?i="":(i=Math.min(i,null!==(e=this.max)&&void 0!==e?e:i),i=Math.max(i,null!==(n=this.min)&&void 0!==n?n:i).toString()),i}stepUp(){const t=parseFloat(this.value),e=isNaN(t)?this.min>0?this.min:this.max<0?this.max:this.min?0:this.step:t+this.step
|
|
877
877
|
this.value=e.toString()}stepDown(){const t=parseFloat(this.value),e=isNaN(t)?this.min>0?this.min:this.max<0?this.max:this.min?0:0-this.step:t-this.step
|
|
878
|
-
this.value=e.toString()}connectedCallback(){super.connectedCallback(),this.proxy.setAttribute("type","number"),this.validate(),this.
|
|
879
|
-
case rn:return this.stepDown(),!1}return!0}handleBlur(){this.control.value=this.value}}
|
|
878
|
+
this.value=e.toString()}connectedCallback(){super.connectedCallback(),this.proxy.setAttribute("type","number"),this.validate(),this.syncValueToInnerControl(),this.autofocus&&b.queueUpdate((()=>{this.focus()}))}select(){this.control.select(),this.$emit("select")}handleTextInput(){this.control.value=this.sanitizeInput(this.control.value),this.isUserInput=!0,this.syncValueFromInnerControl()}handleChange(){this.$emit("change")}handleKeyDown(t){switch(t.key){case cn:return this.stepUp(),!1
|
|
879
|
+
case rn:return this.stepDown(),!1}return!0}handleBlur(){this.syncValueToInnerControl()}sanitizeInput(t){return t.replace(/[^0-9\-+e.]/g,"")}syncValueFromInnerControl(){this.value=this.control.value}syncValueToInnerControl(){this.control.value=this.value}}
|
|
880
880
|
t([ft({attribute:"readonly",mode:"boolean"})],ts.prototype,"readOnly",void 0),t([ft({mode:"boolean"})],ts.prototype,"autofocus",void 0),t([ft({attribute:"hide-step",mode:"boolean"})],ts.prototype,"hideStep",void 0),t([ft],ts.prototype,"placeholder",void 0),t([ft],ts.prototype,"list",void 0),t([ft({converter:ut})],ts.prototype,"maxlength",void 0),t([ft({converter:ut})],ts.prototype,"minlength",void 0),t([ft({converter:ut})],ts.prototype,"size",void 0),t([ft({converter:ut})],ts.prototype,"step",void 0),t([ft({converter:ut})],ts.prototype,"max",void 0),t([ft({converter:ut})],ts.prototype,"min",void 0),t([C],ts.prototype,"defaultSlottedNodes",void 0),Ze(ts,re,Xi)
|
|
881
881
|
let es=class extends je{constructor(){super(...arguments),this.orientation=Ke,this.radioChangeHandler=t=>{const e=t.target
|
|
882
882
|
e.checked&&(this.slottedRadioButtons.forEach((t=>{t!==e&&(t.checked=!1,this.isInsideFoundationToolbar||t.setAttribute("tabindex","-1"))})),this.selectedRadio=e,this.value=e.value,e.setAttribute("tabindex","0"),this.focusedRadio=e),t.stopPropagation()},this.moveToRadioByIndex=(t,e)=>{const n=t[e]
|
|
@@ -1108,7 +1108,7 @@ Di.getOrCreate().withPrefix("nimble").register(il())
|
|
|
1108
1108
|
const sl="nimble-theme-provider"
|
|
1109
1109
|
function ol(t,e){const{r:n,g:i,b:s}=io(t)
|
|
1110
1110
|
return`rgba(${255*n}, ${255*i}, ${255*s}, ${e})`}const rl=ki.create(Ga(qo)).withDefault((t=>eh(ih(t,wo,po,mo)))),al=ki.create(Ga(jo)).withDefault((t=>ih(t,mo,vo,xo)))
|
|
1111
|
-
ki.create(Ga(Go)).withDefault((t=>ih(t,fo,go,xo))),ki.create(Ga(Zo)).withDefault((t=>ih(t,po,bo,xo))),ki.create(Ga(Ko)).withDefault((t=>`linear-gradient(${ih(t,po,Oo,xo)}, ${ih(t,ol(po,0),ol(Oo,0),ol(xo,0))})`)),ki.create(Ga(Wo)).withDefault((t=>ih(t,
|
|
1111
|
+
ki.create(Ga(Go)).withDefault((t=>ih(t,fo,go,xo))),ki.create(Ga(Zo)).withDefault((t=>ih(t,po,bo,xo))),ki.create(Ga(Ko)).withDefault((t=>`linear-gradient(${ih(t,po,Oo,xo)}, ${ih(t,ol(po,0),ol(Oo,0),ol(xo,0))})`)),ki.create(Ga(Wo)).withDefault((t=>ih(t,po,bo,xo)))
|
|
1112
1112
|
const ll=ki.create(Ga(nr)).withDefault((t=>ol(ah(t),.2))),cl=ki.create(Ga(ir)).withDefault((t=>eh(ah(t)))),dl=ki.create(Ga(sr)).withDefault((t=>ol(ah(t),.15))),hl=ki.create(Ga(or)).withDefault((t=>ol(lh(t),.1)))
|
|
1113
1113
|
ki.create(Ga(rr)).withDefault((t=>eh(lh(t)))),ki.create(Ga(ar)).withDefault((t=>ol(function(t){return ih(t,wo,po,mo)}(t),.15)))
|
|
1114
1114
|
const ul=ki.create(Ga(lr)).withDefault((t=>oh(t))),pl=ki.create(Ga(cr)).withDefault((t=>eh(oh(t)))),fl=ki.create(Ga(dr)).withDefault((t=>sh(t))),ml=ki.create(Ga(hr)).withDefault((t=>function(t){return ih(t,So,ao,mo)}(t))),gl=ki.create(Ga(ur)).withDefault((t=>function(t){return ih(t,lo,co,mo)}(t))),vl=ki.create(Ga(pr)).withDefault((t=>function(t){return ih(t,ro,oo,mo)}(t))),bl=ki.create(Ga(fr)).withDefault((t=>ih(t,Co,$o,mo))),yl=ki.create(Ga(mr)).withDefault((t=>ih(t,wo,po,mo))),wl=ki.create(Ga(gr)).withDefault((t=>function(t){switch(el.getValueFor(t)){case Uo.light:return ol(yo,.3)
|