@ni/nimble-components 34.1.0 → 34.1.2
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.
|
@@ -871,9 +871,8 @@ 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&&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){
|
|
875
|
-
|
|
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
|
|
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)}limitPrecision(t){return parseFloat(t.toPrecision(15))}getValidValue(t){let e=this.limitPrecision(parseFloat(t))
|
|
875
|
+
return isNaN(e)?"":(void 0!==this.max&&(e=Math.min(e,this.limitPrecision(this.max))),void 0!==this.min&&(e=Math.max(e,this.limitPrecision(this.min))),e.toString())}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
876
|
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
877
|
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
878
|
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}}
|
|
@@ -1094,7 +1093,7 @@ return new Ys(Gs(Number(n[0]),0,255),Gs(Number(n[1]),0,255),Gs(Number(n[2]),0,25
|
|
|
1094
1093
|
if(null===e)return null
|
|
1095
1094
|
const n=e[1].split(",")
|
|
1096
1095
|
return 4===n.length?new Ys(Gs(Number(n[0]),0,255),Gs(Number(n[1]),0,255),Gs(Number(n[2]),0,255),Number(n[3])):null}(e):function(t){return Xs.hasOwnProperty(t)}(e)?function(t){const e=Xs[t.toLowerCase()]
|
|
1097
|
-
return e?new Ys(e.r,e.g,e.b,e.hasOwnProperty("a")?e.a:void 0):null}(e):null}const oo="#a46eff",ro="#804ad9",ao="#ff8126",lo="#009921",co="#00c12b",ho="#c4000c",uo="#
|
|
1096
|
+
return e?new Ys(e.r,e.g,e.b,e.hasOwnProperty("a")?e.a:void 0):null}(e):null}const oo="#a46eff",ro="#804ad9",ao="#ff8126",lo="#009921",co="#00c12b",ho="#c4000c",uo="#ff4663",po="#818386",fo="#f1f1f2",mo="#f5f5f5",go="#ffffff",vo="#252526",bo="#363738",yo="#505153",wo="#000000",xo="#161617",Co="#074023",ko="#009b65",So="#d63434",_o="#ff4b00",Io="#008557",Mo="#00734b",$o="#00613f",Do="#32eb96",Eo="#364941",Ao="#356d54",Oo="#98f5ca",To="#434445",Ro="#e54c8a",Fo="#8e78b7",No="Source Sans Pro",Lo="Source Sans Pro",Bo="400",Po="14px",Vo="14px",zo="18px",Ho="18px",Uo="14px",qo={light:"light",dark:"dark",color:"color"},jo="action-rgb-partial-color",Wo="application-background-color",Go="divider-background-color",Zo="header-background-color",Ko="section-background-color",Yo="section-background-image",Xo="button-fill-primary-color",Jo="button-primary-font-color",Qo="button-fill-accent-color",tr="button-accent-block-font-color",er="button-accent-outline-font-color",nr="button-border-accent-outline-color",ir="fill-selected-color",sr="fill-selected-rgb-partial-color",or="fill-hover-selected-color",rr="fill-hover-color",ar="fill-hover-rgb-partial-color",lr="fill-down-color",cr="border-color",dr="border-rgb-partial-color",hr="fail-color",ur="warning-color",pr="pass-color",fr="information-color",mr="border-hover-color",gr="icon-color",vr="modal-backdrop-color",br="popup-border-color",yr="card-border-color",wr="tag-fill-color",xr="control-height",Cr="control-slim-height",kr="small-padding",Sr="medium-padding",_r="standard-padding",Ir="large-padding",Mr="label-height",$r="border-width",Dr="divider-width",Er="icon-size",Ar="group-header-text-transform",Or="drawer-width",Tr="dialog-small-width",Rr="dialog-small-height",Fr="dialog-small-max-height",Nr="dialog-large-width",Lr="dialog-large-height",Br="dialog-large-max-height",Pr="menu-min-width",Vr="banner-gap-size",zr="spinner-small-height",Hr="spinner-medium-height",Ur="spinner-large-height",qr="table-fit-rows-height",jr="small-delay",Wr="medium-delay",Gr="large-delay",Zr="headline-plus-1-font",Kr="headline-font",Yr="table-header-font",Xr="title-plus-2-font",Jr="title-plus-1-font",Qr="title-font",ta="subtitle-plus-1-font",ea="subtitle-font",na="link-font",ia="link-active-font",sa="link-prominent-font",oa="link-active-prominent-font",ra="placeholder-font",aa="body-font",la="body-emphasized-font",ca="body-plus-1-font",da="body-plus-1-emphasized-font",ha="group-header-font",ua="control-label-font",pa="button-label-font",fa="tooltip-caption-font",ma="tooltip-background-color",ga="error-text-font",va="table-row-border-color",ba="elevation-1-box-shadow",ya="elevation-2-box-shadow",wa="elevation-3-box-shadow",xa="graph-gridline-color",Ca="graph-trace-1-color",ka="graph-trace-2-color",Sa="graph-trace-3-color",_a="graph-trace-4-color",Ia="graph-trace-5-color",Ma="graph-trace-6-color",$a="graph-trace-7-color",Da="graph-trace-8-color",Ea="mention-font",Aa="calendar-event-background-static-color",Oa="calendar-event-background-dynamic-color",Ta="calendar-event-background-transient-color",Ra="calendar-event-border-static-color",Fa="calendar-event-border-transient-color",Na="calendar-event-static-font-color",La="calendar-event-dynamic-font-color",Ba="calendar-event-transient-font-color",Pa="calendar-event-background-hover-static-color",Va="calendar-event-background-hover-dynamic-color",za="calendar-event-background-hover-transient-color",Ha="calendar-event-outer-border-highlighted-color",Ua="calendar-row-background-selected-color",qa="calendar-row-background-conflict-color",ja="calendar-event-fill-blocked-color",Wa="calendar-grab-handle-background-color",Ga="calendar-grid-border-color",Za="calendar-group-header-background-color",Ka=t=>`ni-nimble-${t}`,Ya=Q`<slot></slot>`,Xa=Mt`
|
|
1098
1097
|
${qs("contents")}
|
|
1099
1098
|
`
|
|
1100
1099
|
class Ja{constructor(){this.lang=document.documentElement.lang
|
|
@@ -5334,8 +5333,8 @@ return new Py(t,n,i)}}function Vy(t,e,n){let{index:i,offset:s}=t.findIndex(e),o=
|
|
|
5334
5333
|
if(s==e||o.isText){if(a!=n&&!t.child(r).isText)throw new RangeError("Removing non-flat range")
|
|
5335
5334
|
return t.cut(0,e).append(t.cut(n))}if(i!=r)throw new RangeError("Removing non-flat range")
|
|
5336
5335
|
return t.replaceChild(i,o.copy(Vy(o.content,e-s-1,n-s-1)))}function zy(t,e,n,i){let{index:s,offset:o}=t.findIndex(e),r=t.maybeChild(s)
|
|
5337
|
-
if(o==e||r.isText)return t.cut(0,e).append(n).append(t.cut(e))
|
|
5338
|
-
let a=zy(r.content,e-o-1,n)
|
|
5336
|
+
if(o==e||r.isText)return i&&!i.canReplace(s,s,n)?null:t.cut(0,e).append(n).append(t.cut(e))
|
|
5337
|
+
let a=zy(r.content,e-o-1,n,r)
|
|
5339
5338
|
return a&&t.replaceChild(s,r.copy(a))}function Hy(t,e,n){if(n.openStart>t.depth)throw new By("Inserted content deeper than insertion position")
|
|
5340
5339
|
if(t.depth-n.openStart!=e.depth-n.openEnd)throw new By("Inconsistent open depths")
|
|
5341
5340
|
return Uy(t,e,n,0)}function Uy(t,e,n,i){let s=t.index(i),o=t.node(i)
|