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