@ni/ok-components 1.18.3 → 1.18.4

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.
@@ -593,7 +593,7 @@ case"insetStart":return r+i
593
593
  case"insetEnd":return a+i
594
594
  case"end":return a
595
595
  case"center":return 2*Math.min(r,a)+i}},this.getNextRegionDimension=(t,e)=>{const n={height:void 0!==this.regionRect?this.regionRect.height:0,width:void 0!==this.regionRect?this.regionRect.width:0}
596
- return void 0!==t&&"fill"===this.horizontalScaling?n.width=this.getAvailableSpace(t,void 0!==this.anchorRect?this.anchorRect.left:0,void 0!==this.anchorRect?this.anchorRect.right:0,void 0!==this.anchorRect?this.anchorRect.width:0,void 0!==this.viewportRect?this.viewportRect.left:0,void 0!==this.viewportRect?this.viewportRect.right:0):"anchor"===this.horizontalScaling&&(n.width=void 0!==this.anchorRect?this.anchorRect.width:0),void 0!==e&&"fill"===this.verticalScaling?n.height=this.getAvailableSpace(e,void 0!==this.anchorRect?this.anchorRect.top:0,void 0!==this.anchorRect?this.anchorRect.bottom:0,void 0!==this.anchorRect?this.anchorRect.height:0,void 0!==this.viewportRect?this.viewportRect.top:0,void 0!==this.viewportRect?this.viewportRect.bottom:0):"anchor"===this.verticalScaling&&(n.height=void 0!==this.anchorRect?this.anchorRect.height:0),n},this.startAutoUpdateEventListeners=()=>{window.addEventListener(tn,this.update,{passive:!0}),window.addEventListener(en,this.update,{passive:!0,capture:!0}),null!==this.resizeDetector&&null!==this.viewportElement&&this.resizeDetector.observe(this.viewportElement)},this.stopAutoUpdateEventListeners=()=>{window.removeEventListener(tn,this.update),window.removeEventListener(en,this.update),null!==this.resizeDetector&&null!==this.viewportElement&&this.resizeDetector.unobserve(this.viewportElement)}}anchorChanged(){this.initialLayoutComplete&&(this.anchorElement=this.getAnchor())}viewportChanged(){this.initialLayoutComplete&&(this.viewportElement=this.getViewport())}horizontalPositioningModeChanged(){this.requestReset()}horizontalDefaultPositionChanged(){this.updateForAttributeChange()}horizontalViewportLockChanged(){this.updateForAttributeChange()}horizontalInsetChanged(){this.updateForAttributeChange()}horizontalThresholdChanged(){this.updateForAttributeChange()}horizontalScalingChanged(){this.updateForAttributeChange()}verticalPositioningModeChanged(){this.requestReset()}verticalDefaultPositionChanged(){this.updateForAttributeChange()}verticalViewportLockChanged(){this.updateForAttributeChange()}verticalInsetChanged(){this.updateForAttributeChange()}verticalThresholdChanged(){this.updateForAttributeChange()}verticalScalingChanged(){this.updateForAttributeChange()}fixedPlacementChanged(){this.$fastController.isConnected&&this.initialLayoutComplete&&this.initialize()}autoUpdateModeChanged(t,e){this.$fastController.isConnected&&this.initialLayoutComplete&&("auto"===t&&this.stopAutoUpdateEventListeners(),"auto"===e&&this.startAutoUpdateEventListeners())}anchorElementChanged(){this.requestReset()}viewportElementChanged(){this.$fastController.isConnected&&this.initialLayoutComplete&&this.initialize()}static{this.intersectionService=new Mn}connectedCallback(){super.connectedCallback(),"auto"===this.autoUpdateMode&&this.startAutoUpdateEventListeners(),this.initialize()}disconnectedCallback(){super.disconnectedCallback(),"auto"===this.autoUpdateMode&&this.stopAutoUpdateEventListeners(),this.stopObservers(),this.disconnectResizeDetector()}adoptedCallback(){this.initialize()}disconnectResizeDetector(){null!==this.resizeDetector&&(this.resizeDetector.disconnect(),this.resizeDetector=null)}initializeResizeDetector(){this.disconnectResizeDetector(),this.resizeDetector=new window.ResizeObserver(this.handleResize)}updateForAttributeChange(){this.$fastController.isConnected&&this.initialLayoutComplete&&(this.forceUpdate=!0,this.update())}initialize(){this.initializeResizeDetector(),null===this.anchorElement&&(this.anchorElement=this.getAnchor()),this.requestReset()}requestReset(){this.$fastController.isConnected&&!1===this.pendingReset&&(this.setInitialState(),y.queueUpdate(()=>this.reset()),this.pendingReset=!0)}setInitialState(){this.initialLayoutComplete=!1,this.regionVisible=!1,this.translateX=0,this.translateY=0,this.baseHorizontalOffset=0,this.baseVerticalOffset=0,this.viewportRect=void 0,this.regionRect=void 0,this.anchorRect=void 0,this.verticalPosition=void 0,this.horizontalPosition=void 0,this.style.opacity="0",this.style.pointerEvents="none",this.forceUpdate=!1,this.style.position=this.fixedPlacement?"fixed":"absolute",this.updatePositionClasses(),this.updateRegionStyle()}}
596
+ return void 0!==t&&"fill"===this.horizontalScaling?n.width=this.getAvailableSpace(t,void 0!==this.anchorRect?this.anchorRect.left:0,void 0!==this.anchorRect?this.anchorRect.right:0,void 0!==this.anchorRect?this.anchorRect.width:0,void 0!==this.viewportRect?this.viewportRect.left:0,void 0!==this.viewportRect?this.viewportRect.right:0):"anchor"===this.horizontalScaling&&(n.width=void 0!==this.anchorRect?this.anchorRect.width:0),void 0!==e&&"fill"===this.verticalScaling?n.height=this.getAvailableSpace(e,void 0!==this.anchorRect?this.anchorRect.top:0,void 0!==this.anchorRect?this.anchorRect.bottom:0,void 0!==this.anchorRect?this.anchorRect.height:0,void 0!==this.viewportRect?this.viewportRect.top:0,void 0!==this.viewportRect?this.viewportRect.bottom:0):"anchor"===this.verticalScaling&&(n.height=void 0!==this.anchorRect?this.anchorRect.height:0),n},this.startAutoUpdateEventListeners=()=>{window.addEventListener(tn,this.update,{passive:!0}),window.addEventListener(en,this.update,{passive:!0,capture:!0}),null!==this.resizeDetector&&null!==this.viewportElement&&this.resizeDetector.observe(this.viewportElement)},this.stopAutoUpdateEventListeners=()=>{window.removeEventListener(tn,this.update),window.removeEventListener(en,this.update,{capture:!0}),null!==this.resizeDetector&&null!==this.viewportElement&&this.resizeDetector.unobserve(this.viewportElement)}}anchorChanged(){this.initialLayoutComplete&&(this.anchorElement=this.getAnchor())}viewportChanged(){this.initialLayoutComplete&&(this.viewportElement=this.getViewport())}horizontalPositioningModeChanged(){this.requestReset()}horizontalDefaultPositionChanged(){this.updateForAttributeChange()}horizontalViewportLockChanged(){this.updateForAttributeChange()}horizontalInsetChanged(){this.updateForAttributeChange()}horizontalThresholdChanged(){this.updateForAttributeChange()}horizontalScalingChanged(){this.updateForAttributeChange()}verticalPositioningModeChanged(){this.requestReset()}verticalDefaultPositionChanged(){this.updateForAttributeChange()}verticalViewportLockChanged(){this.updateForAttributeChange()}verticalInsetChanged(){this.updateForAttributeChange()}verticalThresholdChanged(){this.updateForAttributeChange()}verticalScalingChanged(){this.updateForAttributeChange()}fixedPlacementChanged(){this.$fastController.isConnected&&this.initialLayoutComplete&&this.initialize()}autoUpdateModeChanged(t,e){this.$fastController.isConnected&&this.initialLayoutComplete&&("auto"===t&&this.stopAutoUpdateEventListeners(),"auto"===e&&this.startAutoUpdateEventListeners())}anchorElementChanged(){this.requestReset()}viewportElementChanged(){this.$fastController.isConnected&&this.initialLayoutComplete&&this.initialize()}static{this.intersectionService=new Mn}connectedCallback(){super.connectedCallback(),"auto"===this.autoUpdateMode&&this.startAutoUpdateEventListeners(),this.initialize()}disconnectedCallback(){super.disconnectedCallback(),"auto"===this.autoUpdateMode&&this.stopAutoUpdateEventListeners(),this.stopObservers(),this.disconnectResizeDetector()}adoptedCallback(){this.initialize()}disconnectResizeDetector(){null!==this.resizeDetector&&(this.resizeDetector.disconnect(),this.resizeDetector=null)}initializeResizeDetector(){this.disconnectResizeDetector(),this.resizeDetector=new window.ResizeObserver(this.handleResize)}updateForAttributeChange(){this.$fastController.isConnected&&this.initialLayoutComplete&&(this.forceUpdate=!0,this.update())}initialize(){this.initializeResizeDetector(),null===this.anchorElement&&(this.anchorElement=this.getAnchor()),this.requestReset()}requestReset(){this.$fastController.isConnected&&!1===this.pendingReset&&(this.setInitialState(),y.queueUpdate(()=>this.reset()),this.pendingReset=!0)}setInitialState(){this.initialLayoutComplete=!1,this.regionVisible=!1,this.translateX=0,this.translateY=0,this.baseHorizontalOffset=0,this.baseVerticalOffset=0,this.viewportRect=void 0,this.regionRect=void 0,this.anchorRect=void 0,this.verticalPosition=void 0,this.horizontalPosition=void 0,this.style.opacity="0",this.style.pointerEvents="none",this.forceUpdate=!1,this.style.position=this.fixedPlacement?"fixed":"absolute",this.updatePositionClasses(),this.updateRegionStyle()}}
597
597
  t([ft],In.prototype,"anchor",void 0),t([ft],In.prototype,"viewport",void 0),t([ft({attribute:"horizontal-positioning-mode"})],In.prototype,"horizontalPositioningMode",void 0),t([ft({attribute:"horizontal-default-position"})],In.prototype,"horizontalDefaultPosition",void 0),t([ft({attribute:"horizontal-viewport-lock",mode:"boolean"})],In.prototype,"horizontalViewportLock",void 0),t([ft({attribute:"horizontal-inset",mode:"boolean"})],In.prototype,"horizontalInset",void 0),t([ft({attribute:"horizontal-threshold"})],In.prototype,"horizontalThreshold",void 0),t([ft({attribute:"horizontal-scaling"})],In.prototype,"horizontalScaling",void 0),t([ft({attribute:"vertical-positioning-mode"})],In.prototype,"verticalPositioningMode",void 0),t([ft({attribute:"vertical-default-position"})],In.prototype,"verticalDefaultPosition",void 0),t([ft({attribute:"vertical-viewport-lock",mode:"boolean"})],In.prototype,"verticalViewportLock",void 0),t([ft({attribute:"vertical-inset",mode:"boolean"})],In.prototype,"verticalInset",void 0),t([ft({attribute:"vertical-threshold"})],In.prototype,"verticalThreshold",void 0),t([ft({attribute:"vertical-scaling"})],In.prototype,"verticalScaling",void 0),t([ft({attribute:"fixed-placement",mode:"boolean"})],In.prototype,"fixedPlacement",void 0),t([ft({attribute:"auto-update-mode"})],In.prototype,"autoUpdateMode",void 0),t([k],In.prototype,"anchorElement",void 0),t([k],In.prototype,"viewportElement",void 0),t([k],In.prototype,"initialLayoutComplete",void 0)
598
598
  let _n=class extends kn{constructor(){super(...arguments),this.separator=!0}}
599
599
  t([k],_n.prototype,"separator",void 0),Ke(_n,ie,Sn)
@@ -5504,7 +5504,7 @@ const xw="nimble-menu",Cw="above",kw="auto",Sw=It`
5504
5504
  `)}
5505
5505
  </template>
5506
5506
  `
5507
- class Mw extends qe{constructor(){super(...arguments),this.appearance=mh,this.disabled=!1,this.contentHidden=!1,this.open=!1,this.position=kw,this.focusLastItemWhenOpened=!1,this.menuChangeHandler=()=>{this.setOpen(!1),this.toggleButton.focus()}}disconnectedCallback(){super.disconnectedCallback(),this.region&&this.region.removeEventListener(Qe,this.menuChangeHandler)}toggleButtonChanged(t,e){this.region&&this.toggleButton&&(this.region.anchorElement=this.toggleButton)}regionChanged(t,e){t&&t.removeEventListener(Qe,this.menuChangeHandler),this.region&&(this.toggleButton&&(this.region.anchorElement=this.toggleButton),this.region.addEventListener(Qe,this.menuChangeHandler,{capture:!0}))}openChanged(t,e){if(this.toggleButton&&(this.toggleButton.checked=this.open),!this.open){const t={oldState:!0,newState:!1}
5507
+ class Mw extends qe{constructor(){super(...arguments),this.appearance=mh,this.disabled=!1,this.contentHidden=!1,this.open=!1,this.position=kw,this.focusLastItemWhenOpened=!1,this.menuChangeHandler=()=>{this.setOpen(!1),this.toggleButton.focus()}}connectedCallback(){super.connectedCallback(),this.region&&this.region.addEventListener(Qe,this.menuChangeHandler,{capture:!0})}disconnectedCallback(){super.disconnectedCallback(),this.region&&this.region.removeEventListener(Qe,this.menuChangeHandler,{capture:!0})}toggleButtonChanged(t,e){this.region&&this.toggleButton&&(this.region.anchorElement=this.toggleButton)}regionChanged(t,e){t&&t.removeEventListener(Qe,this.menuChangeHandler,{capture:!0}),this.region&&(this.toggleButton&&(this.region.anchorElement=this.toggleButton),this.region.addEventListener(Qe,this.menuChangeHandler,{capture:!0}))}openChanged(t,e){if(this.toggleButton&&(this.toggleButton.checked=this.open),!this.open){const t={oldState:!0,newState:!1}
5508
5508
  this.$emit("toggle",t)}}regionLoadedHandler(){this.focusLastItemWhenOpened?(this.focusLastMenuItem(),this.focusLastItemWhenOpened=!1):this.focusMenu()
5509
5509
  this.$emit("toggle",{oldState:!1,newState:!0})}focusoutHandler(t){if(!this.open)return!0
5510
5510
  const e=t.relatedTarget
@@ -21898,7 +21898,7 @@ const Vtt=It`
21898
21898
  </${Av}>
21899
21899
  `)}
21900
21900
  `,Htt="outline",Utt="default"
21901
- class qtt extends qe{constructor(){super(...arguments),this.label="Primary function",this.disabled=!1,this.open=!1,this.appearance=Htt,this.appearanceVariant=Utt,this.documentClickHandler=t=>{this.open&&(t.composedPath().includes(this)||this.setOpen(!1))},this.keydownHandler=t=>{"Escape"===t.key&&this.setOpen(!1)},this.menuChangeHandler=()=>{this.handleMenuChange()}}disabledChanged(){this.disabled&&this.setOpen(!1)}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.documentClickHandler),document.addEventListener("keydown",this.keydownHandler)}disconnectedCallback(){document.removeEventListener("click",this.documentClickHandler),document.removeEventListener("keydown",this.keydownHandler),super.disconnectedCallback()}handlePrimaryClick(){this.disabled||this.dispatchEvent(new CustomEvent("trigger",{bubbles:!0,composed:!0}))}handleToggleClick(){this.disabled||this.setOpen(!this.open)}handleMenuChange(){this.setOpen(!1)}regionChanged(t,e){t&&t.removeEventListener("change",this.menuChangeHandler),this.region&&(this.region.anchorElement=this.toggleButton??this,this.region.addEventListener("change",this.menuChangeHandler,{capture:!0}))}toggleButtonChanged(){this.region&&(this.region.anchorElement=this.toggleButton??this)}setOpen(t){this.open!==t&&(this.open=t,this.dispatchEvent(new CustomEvent("toggle",{bubbles:!0,composed:!0,detail:{open:this.open}})))}}t([ft],qtt.prototype,"label",void 0),t([ft({mode:"boolean"})],qtt.prototype,"disabled",void 0),t([ft({mode:"boolean"})],qtt.prototype,"open",void 0),t([ft()],qtt.prototype,"appearance",void 0),t([ft({attribute:"appearance-variant"})],qtt.prototype,"appearanceVariant",void 0),t([k],qtt.prototype,"toggleButton",void 0),t([k],qtt.prototype,"region",void 0)
21901
+ class qtt extends qe{constructor(){super(...arguments),this.label="Primary function",this.disabled=!1,this.open=!1,this.appearance=Htt,this.appearanceVariant=Utt,this.documentClickHandler=t=>{this.open&&(t.composedPath().includes(this)||this.setOpen(!1))},this.keydownHandler=t=>{"Escape"===t.key&&this.setOpen(!1)},this.menuChangeHandler=()=>{this.handleMenuChange()}}disabledChanged(){this.disabled&&this.setOpen(!1)}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.documentClickHandler),document.addEventListener("keydown",this.keydownHandler)}disconnectedCallback(){document.removeEventListener("click",this.documentClickHandler),document.removeEventListener("keydown",this.keydownHandler),super.disconnectedCallback()}handlePrimaryClick(){this.disabled||this.dispatchEvent(new CustomEvent("trigger",{bubbles:!0,composed:!0}))}handleToggleClick(){this.disabled||this.setOpen(!this.open)}handleMenuChange(){this.setOpen(!1)}regionChanged(t,e){t&&t.removeEventListener("change",this.menuChangeHandler,{capture:!0}),this.region&&(this.region.anchorElement=this.toggleButton??this,this.region.addEventListener("change",this.menuChangeHandler,{capture:!0}))}toggleButtonChanged(){this.region&&(this.region.anchorElement=this.toggleButton??this)}setOpen(t){this.open!==t&&(this.open=t,this.dispatchEvent(new CustomEvent("toggle",{bubbles:!0,composed:!0,detail:{open:this.open}})))}}t([ft],qtt.prototype,"label",void 0),t([ft({mode:"boolean"})],qtt.prototype,"disabled",void 0),t([ft({mode:"boolean"})],qtt.prototype,"open",void 0),t([ft()],qtt.prototype,"appearance",void 0),t([ft({attribute:"appearance-variant"})],qtt.prototype,"appearanceVariant",void 0),t([k],qtt.prototype,"toggleButton",void 0),t([k],qtt.prototype,"region",void 0)
21902
21902
  const jtt=qtt.compose({baseName:"fv-split-button",template:ztt,styles:Vtt})
21903
21903
  Ei.getOrCreate().withPrefix("ok").register(jtt())
21904
21904
  const Wtt=Q`
@@ -21959,7 +21959,7 @@ const Wtt=Q`
21959
21959
  </${Av}>
21960
21960
  `)}
21961
21961
  `,Ztt="outline",Gtt="default"
21962
- class Ytt extends qe{constructor(){super(...arguments),this.label="Primary function",this.href="",this.target="",this.rel="",this.download="",this.disabled=!1,this.open=!1,this.appearance=Ztt,this.appearanceVariant=Gtt,this.documentClickHandler=t=>{this.open&&(t.composedPath().includes(this)||this.setOpen(!1))},this.keydownHandler=t=>{"Escape"===t.key&&this.setOpen(!1)},this.menuChangeHandler=()=>{this.handleMenuChange()}}disabledChanged(){this.disabled&&this.setOpen(!1)}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.documentClickHandler),document.addEventListener("keydown",this.keydownHandler)}disconnectedCallback(){document.removeEventListener("click",this.documentClickHandler),document.removeEventListener("keydown",this.keydownHandler),super.disconnectedCallback()}handlePrimaryClick(){this.disabled||this.dispatchEvent(new CustomEvent("trigger",{bubbles:!0,composed:!0}))}handleToggleClick(){this.disabled||this.setOpen(!this.open)}handleMenuChange(){this.setOpen(!1)}regionChanged(t,e){t&&t.removeEventListener("change",this.menuChangeHandler),this.region&&(this.region.anchorElement=this.toggleButton??this,this.region.addEventListener("change",this.menuChangeHandler,{capture:!0}))}toggleButtonChanged(){this.region&&(this.region.anchorElement=this.toggleButton??this)}setOpen(t){this.open!==t&&(this.open=t,this.dispatchEvent(new CustomEvent("toggle",{bubbles:!0,composed:!0,detail:{open:this.open}})))}}t([ft],Ytt.prototype,"label",void 0),t([ft],Ytt.prototype,"href",void 0),t([ft],Ytt.prototype,"target",void 0),t([ft],Ytt.prototype,"rel",void 0),t([ft],Ytt.prototype,"download",void 0),t([ft({mode:"boolean"})],Ytt.prototype,"disabled",void 0),t([ft({mode:"boolean"})],Ytt.prototype,"open",void 0),t([ft()],Ytt.prototype,"appearance",void 0),t([ft({attribute:"appearance-variant"})],Ytt.prototype,"appearanceVariant",void 0),t([k],Ytt.prototype,"toggleButton",void 0),t([k],Ytt.prototype,"region",void 0)
21962
+ class Ytt extends qe{constructor(){super(...arguments),this.label="Primary function",this.href="",this.target="",this.rel="",this.download="",this.disabled=!1,this.open=!1,this.appearance=Ztt,this.appearanceVariant=Gtt,this.documentClickHandler=t=>{this.open&&(t.composedPath().includes(this)||this.setOpen(!1))},this.keydownHandler=t=>{"Escape"===t.key&&this.setOpen(!1)},this.menuChangeHandler=()=>{this.handleMenuChange()}}disabledChanged(){this.disabled&&this.setOpen(!1)}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.documentClickHandler),document.addEventListener("keydown",this.keydownHandler)}disconnectedCallback(){document.removeEventListener("click",this.documentClickHandler),document.removeEventListener("keydown",this.keydownHandler),super.disconnectedCallback()}handlePrimaryClick(){this.disabled||this.dispatchEvent(new CustomEvent("trigger",{bubbles:!0,composed:!0}))}handleToggleClick(){this.disabled||this.setOpen(!this.open)}handleMenuChange(){this.setOpen(!1)}regionChanged(t,e){t&&t.removeEventListener("change",this.menuChangeHandler,{capture:!0}),this.region&&(this.region.anchorElement=this.toggleButton??this,this.region.addEventListener("change",this.menuChangeHandler,{capture:!0}))}toggleButtonChanged(){this.region&&(this.region.anchorElement=this.toggleButton??this)}setOpen(t){this.open!==t&&(this.open=t,this.dispatchEvent(new CustomEvent("toggle",{bubbles:!0,composed:!0,detail:{open:this.open}})))}}t([ft],Ytt.prototype,"label",void 0),t([ft],Ytt.prototype,"href",void 0),t([ft],Ytt.prototype,"target",void 0),t([ft],Ytt.prototype,"rel",void 0),t([ft],Ytt.prototype,"download",void 0),t([ft({mode:"boolean"})],Ytt.prototype,"disabled",void 0),t([ft({mode:"boolean"})],Ytt.prototype,"open",void 0),t([ft()],Ytt.prototype,"appearance",void 0),t([ft({attribute:"appearance-variant"})],Ytt.prototype,"appearanceVariant",void 0),t([k],Ytt.prototype,"toggleButton",void 0),t([k],Ytt.prototype,"region",void 0)
21963
21963
  const Xtt=Ytt.compose({baseName:"fv-split-button-anchor",template:Ktt,styles:Vtt})
21964
21964
  Ei.getOrCreate().withPrefix("ok").register(Xtt())
21965
21965
  const Jtt=It`