@ni/nimble-components 7.4.2 → 7.6.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.
@@ -998,7 +998,7 @@ var vh,gh
998
998
  !function(t){t.Left="left",t.Right="right"}(vh||(vh={})),function(t){t.Opening="opening",t.Opened="opened",t.Closing="closing",t.Closed="closed"}(gh||(gh={}))
999
999
  class mh extends Ds{constructor(){super(...arguments),this.location=vh.Left,this.state=gh.Closed,this.preventDismiss=!1,this.propertiesToWatch=["hidden","location","state"],this.animationDurationMilliseconds=.001}connectedCallback(){this.trapFocus=!1,super.connectedCallback(),this.updateAnimationDuration(),this.animationsEnabledChangedHandler=()=>this.updateAnimationDuration(),dh.addEventListener("change",this.animationsEnabledChangedHandler),this.onStateChanged()
1000
1000
  const t=f.getNotifier(this),e={handleChange:(t,e)=>this.onPropertyChange(e)}
1001
- this.propertiesToWatch.forEach((s=>t.subscribe(e,s))),this.propertyChangeSubscriber=e,this.propertyChangeNotifier=t}disconnectedCallback(){super.disconnectedCallback(),this.cancelCurrentAnimation(),this.propertyChangeNotifier&&this.propertyChangeSubscriber&&(this.propertiesToWatch.forEach((t=>this.propertyChangeNotifier.unsubscribe(this.propertyChangeSubscriber,t))),this.propertyChangeNotifier=void 0,this.propertyChangeSubscriber=void 0),this.animationsEnabledChangedHandler&&(dh.removeEventListener("change",this.animationsEnabledChangedHandler),this.animationsEnabledChangedHandler=void 0)}show(){this.state=gh.Opening}hide(){this.state=gh.Closing}dismiss(){this.preventDismiss||(super.dismiss(),this.hide())}onPropertyChange(t){switch(t){case"hidden":this.onHiddenChanged()
1001
+ this.propertiesToWatch.forEach((s=>t.subscribe(e,s))),this.propertyChangeSubscriber=e,this.propertyChangeNotifier=t}disconnectedCallback(){super.disconnectedCallback(),this.cancelCurrentAnimation(),this.propertyChangeNotifier&&this.propertyChangeSubscriber&&(this.propertiesToWatch.forEach((t=>this.propertyChangeNotifier.unsubscribe(this.propertyChangeSubscriber,t))),this.propertyChangeNotifier=void 0,this.propertyChangeSubscriber=void 0),this.animationsEnabledChangedHandler&&(dh.removeEventListener("change",this.animationsEnabledChangedHandler),this.animationsEnabledChangedHandler=void 0)}show(){this.state=gh.Opening}hide(){this.state=gh.Closing}dismiss(){this.$emit("cancel",{},{bubbles:!1,cancelable:!0,composed:!1})&&!this.preventDismiss&&(super.dismiss(),this.hide())}onPropertyChange(t){switch(t){case"hidden":this.onHiddenChanged()
1002
1002
  break
1003
1003
  case"location":this.onLocationChanged()
1004
1004
  break
@@ -1254,9 +1254,9 @@ const jh=class extends de{}.compose({baseName:"tabs-toolbar",template:Nh,styles:
1254
1254
  var qh
1255
1255
  Vs.getOrCreate().withPrefix("nimble").register(jh()),function(t){t.Outline="outline",t.Block="block"}(qh||(qh={}))
1256
1256
  const Uh=mt`
1257
- ${rs("inline-block")}
1257
+ ${rs("inline-flex")}
1258
1258
 
1259
- :host{font:${Mn};outline:none;user-select:none;color:${Vn}}:host([disabled]){color:${An}}.label{display:flex;color:${Wn};font:${Kn}}:host([disabled]) .label{color:${Yn}}.control{-webkit-appearance:none;font:inherit;outline:none;box-sizing:border-box;position:relative;color:inherit;border-radius:0px;align-items:flex-end;border:${sn} solid transparent;padding:8px;transition:box-shadow ${fr},border ${fr};resize:none}@media (prefers-reduced-motion){.control{transition-duration:0s}}.control:hover{border-color:${Yo};box-shadow:0px 0px 0px 1px ${Yo}}.control:focus-within{border-color:${Yo}}.control[readonly],.control[readonly]:hover,.control[readonly]:hover:focus-within,.control[disabled],.control[disabled]:hover{border-color:rgba(${qo},0.1);box-shadow:none}.control::selection{color:${Wn};background:rgba(${Fo},0.3)}.control::placeholder{color:${Wn}}.control[disabled]::placeholder{color:${Yn}}:host([resize='both']) .control{resize:both}:host([resize='horizontal']) .control{resize:horizontal}:host([resize='vertical']) .control{resize:vertical}`.withBehaviors(gc(qh.Outline,mt`
1259
+ :host{font:${Mn};outline:none;user-select:none;color:${Vn};flex-direction:column;vertical-align:top}:host([disabled]){color:${An}}.label{display:block;color:${Wn};font:${Kn}}:host([disabled]) .label{color:${Yn}}.control{-webkit-appearance:none;font:inherit;width:100%;flex-grow:1;outline:none;box-sizing:border-box;position:relative;color:inherit;border-radius:0px;align-items:flex-end;border:${sn} solid transparent;padding:8px;transition:box-shadow ${fr},border ${fr};resize:none}@media (prefers-reduced-motion){.control{transition-duration:0s}}.control:hover{border-color:${Yo};box-shadow:0px 0px 0px 1px ${Yo}}.control:focus-within{border-color:${Yo}}.control[readonly],.control[readonly]:hover,.control[readonly]:hover:focus-within,.control[disabled],.control[disabled]:hover{border-color:rgba(${qo},0.1);box-shadow:none}.control::selection{color:${Wn};background:rgba(${Fo},0.3)}.control::placeholder{color:${Wn}}.control[disabled]::placeholder{color:${Yn}}:host([cols]) .control{width:auto}:host([rows]) .control{flex:none}:host([resize='both']) .control{resize:both}:host([resize='horizontal']) .control{resize:horizontal}:host([resize='vertical']) .control{resize:vertical}`.withBehaviors(gc(qh.Outline,mt`
1260
1260
  .control{border-color:rgba(${qo},0.3);background-color:transparent}`),gc(qh.Block,mt`
1261
1261
  .control{background-color:rgba(${qo},0.1)}:host([readonly]) .control{background-color:transparent}:host([disabled]) .control{border-color:transparent;background-color:rgba(${qo},0.1)}`))
1262
1262
  class Kh extends vi{constructor(){super(...arguments),this.appearance=qh.Outline}}So([ot],Kh.prototype,"appearance",void 0)
@@ -1274,7 +1274,7 @@ const Xh=mt`
1274
1274
  );border-bottom-color:${Yo}}:host([disabled]) .root:hover{--ni-private-bottom-border-width:1px}.root:focus-within{border-bottom-color:${Yo}}[part='start']{display:none}.control{-webkit-appearance:none;font:inherit;background:transparent;color:inherit;padding-top:0px;padding-bottom:0px;height:calc(
1275
1275
  ${Jo} - ${sn} -
1276
1276
  var(--ni-private-hover-bottom-border-width)
1277
- );width:100%;margin-top:auto;margin-bottom:auto;padding-left:calc(${tn} / 2);padding-right:calc(${tn} / 2);border:none;text-overflow:ellipsis}.control:hover,.control:focus,.control:disabled,.control:active{outline:none}.control::selection{color:${Wn};background:rgba(${Fo},0.3)}.control::placeholder{color:${Wn}}.control:not([readonly]):focus-within::placeholder{opacity:1}.control[disabled]::placeholder{color:${An}}[part='end']{display:none}:host(.invalid) [part='end']{display:contents}:host(.invalid) [part='end'] svg{height:${on};width:${on};padding-right:8px;flex:none}:host(.invalid) [part='end'] path{fill:${Uo}}:host([disabled]) [part='end'] path{fill:${An}}.errortext{display:none}:host(.invalid) .errortext{display:block;font:${lr};color:${Uo};width:100%;position:absolute;top:${Jo};overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host(.invalid[readonly]:not([disabled])) .errortext{top:calc(${Jo} - ${sn})}:host(.invalid) .error-text:empty{display:none}:host([disabled]) .errortext{color:${An}}`.withBehaviors(gc(Yh.Underline,mt`
1277
+ );width:100%;margin-top:auto;margin-bottom:auto;padding-left:calc(${tn} / 2);padding-right:calc(${tn} / 2);border:none;text-overflow:ellipsis}.control:hover,.control:focus,.control:disabled,.control:active{outline:none}.control::selection{color:${Wn};background:rgba(${Fo},0.3)}.control::placeholder{color:${Wn}}.control:not([readonly]):focus-within::placeholder{opacity:1}.control[disabled]::placeholder{color:${An}}[part='end']{display:contents}.error-content{display:none}:host(.invalid) .error-content{display:contents}:host(.invalid) .error-content svg{height:${on};width:${on};padding-right:8px;flex:none}:host(.invalid) .error-content path{fill:${Uo}}:host([disabled]) .error-content path{fill:${An}}.errortext{display:none}:host(.invalid) .errortext{display:block;font:${lr};color:${Uo};width:100%;position:absolute;top:${Jo};overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host(.invalid[readonly]:not([disabled])) .errortext{top:calc(${Jo} - ${sn})}:host(.invalid) .error-text:empty{display:none}:host([disabled]) .errortext{color:${An}}[part='actions']{display:contents}slot[name='actions']::slotted(*){margin-right:8px;${Jo.cssCustomProperty}:24px}`.withBehaviors(gc(Yh.Underline,mt`
1278
1278
  .root{--ni-private-bottom-border-width:1px;padding-top:${sn};padding-left:${sn};padding-right:${sn}}`),gc(Yh.Block,mt`
1279
1279
  .root{background-color:rgba(${qo},0.1);--ni-private-bottom-border-width:0px;padding-top:${sn};padding-left:${sn};padding-right:${sn}}.root:focus-within{--ni-private-bottom-border-width:1px}.root:focus-within:hover{--ni-private-bottom-border-width:var(
1280
1280
  --ni-private-hover-bottom-border-width
@@ -1287,7 +1287,7 @@ const Xh=mt`
1287
1287
  ${""}
1288
1288
  .control::-ms-reveal{filter:invert(100%)}`,Li.Dark))
1289
1289
  class Gh extends Xs{constructor(){super(...arguments),this.appearance=Yh.Underline}connectedCallback(){super.connectedCallback(),this.control.setAttribute("aria-errormessage","errortext")}}So([ot],Gh.prototype,"appearance",void 0),So([ot({attribute:"error-text"})],Gh.prototype,"errorText",void 0)
1290
- const Qh=Gh.compose({baseName:"text-field",baseClass:Xs,template:(t,e)=>Y`<template class=" ${t=>t.readOnly?"readonly":""} "><label part="label" for="control" class="${t=>t.defaultSlottedNodes&&t.defaultSlottedNodes.length?"label":"label label__hidden"}"><slot ${Ct({property:"defaultSlottedNodes",filter:ls})}></slot></label><div class="root" part="root">${Ot(0,e)}<input class="control" part="control" id="control" @input="${t=>t.handleTextInput()}" @change="${t=>t.handleChange()}" ?autofocus="${t=>t.autofocus}" ?disabled="${t=>t.disabled}" list="${t=>t.list}" maxlength="${t=>t.maxlength}" minlength="${t=>t.minlength}" pattern="${t=>t.pattern}" placeholder="${t=>t.placeholder}" ?readonly="${t=>t.readOnly}" ?required="${t=>t.required}" size="${t=>t.size}" ?spellcheck="${t=>t.spellcheck}" :value="${t=>t.value}" type="${t=>t.type}" aria-atomic="${t=>t.ariaAtomic}" aria-busy="${t=>t.ariaBusy}" aria-controls="${t=>t.ariaControls}" aria-current="${t=>t.ariaCurrent}" aria-describedby="${t=>t.ariaDescribedby}" aria-details="${t=>t.ariaDetails}" aria-disabled="${t=>t.ariaDisabled}" aria-errormessage="${t=>t.ariaErrormessage}" aria-flowto="${t=>t.ariaFlowto}" aria-haspopup="${t=>t.ariaHaspopup}" aria-hidden="${t=>t.ariaHidden}" aria-invalid="${t=>t.ariaInvalid}" aria-keyshortcuts="${t=>t.ariaKeyshortcuts}" aria-label="${t=>t.ariaLabel}" aria-labelledby="${t=>t.ariaLabelledby}" aria-live="${t=>t.ariaLive}" aria-owns="${t=>t.ariaOwns}" aria-relevant="${t=>t.ariaRelevant}" aria-roledescription="${t=>t.ariaRoledescription}" ${bt("control")} />${zt(0,e)}</div></template>`,styles:Xh,shadowOptions:{delegatesFocus:!0},end:Y` ${Pa.data}<div id="errortext" class="errortext" title="${t=>t.errorText}" aria-live="polite">${t=>t.errorText}</div>`})
1290
+ const Qh=Gh.compose({baseName:"text-field",baseClass:Xs,template:(t,e)=>Y`<template class=" ${t=>t.readOnly?"readonly":""} "><label part="label" for="control" class="${t=>t.defaultSlottedNodes&&t.defaultSlottedNodes.length?"label":"label label__hidden"}"><slot ${Ct({property:"defaultSlottedNodes",filter:ls})}></slot></label><div class="root" part="root">${Ot(0,e)}<input class="control" part="control" id="control" @input="${t=>t.handleTextInput()}" @change="${t=>t.handleChange()}" ?autofocus="${t=>t.autofocus}" ?disabled="${t=>t.disabled}" list="${t=>t.list}" maxlength="${t=>t.maxlength}" minlength="${t=>t.minlength}" pattern="${t=>t.pattern}" placeholder="${t=>t.placeholder}" ?readonly="${t=>t.readOnly}" ?required="${t=>t.required}" size="${t=>t.size}" ?spellcheck="${t=>t.spellcheck}" :value="${t=>t.value}" type="${t=>t.type}" aria-atomic="${t=>t.ariaAtomic}" aria-busy="${t=>t.ariaBusy}" aria-controls="${t=>t.ariaControls}" aria-current="${t=>t.ariaCurrent}" aria-describedby="${t=>t.ariaDescribedby}" aria-details="${t=>t.ariaDetails}" aria-disabled="${t=>t.ariaDisabled}" aria-errormessage="${t=>t.ariaErrormessage}" aria-flowto="${t=>t.ariaFlowto}" aria-haspopup="${t=>t.ariaHaspopup}" aria-hidden="${t=>t.ariaHidden}" aria-invalid="${t=>t.ariaInvalid}" aria-keyshortcuts="${t=>t.ariaKeyshortcuts}" aria-label="${t=>t.ariaLabel}" aria-labelledby="${t=>t.ariaLabelledby}" aria-live="${t=>t.ariaLive}" aria-owns="${t=>t.ariaOwns}" aria-relevant="${t=>t.ariaRelevant}" aria-roledescription="${t=>t.ariaRoledescription}" ${bt("control")} />${zt(0,e)}</div></template>`,styles:Xh,shadowOptions:{delegatesFocus:!0},end:Y`<span class="error-content">${Pa.data}</span><span part="actions"><slot name="actions"></slot></span><div id="errortext" class="errortext error-content" title="${t=>t.errorText}" aria-live="polite">${t=>t.errorText}</div>`})
1291
1291
  Vs.getOrCreate().withPrefix("nimble").register(Qh())
1292
1292
  const Jh=mt`
1293
1293
  ${fc}