@fluid-topics/ft-infinite-scroll 2.0.23 → 2.0.25

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.
@@ -82,7 +82,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ftds-con
82
82
  <li>${this.helperText}</li>
83
83
  `)}
84
84
  </ul>
85
- `}resolveStatus(){return this.forceStatus?this.forceStatus:this.errorMessages.length?Ye.error:this.warningMessages.length?Ye.warning:Ye.default}processRules(n){return n.map(a=>a(this.value)).filter(a=>a!==!0).map(a=>a)}}return V([P()],e.prototype,"warningRules",void 0),V([P()],e.prototype,"errorRules",void 0),V([P()],e.prototype,"validateOn",void 0),V([P({type:Boolean})],e.prototype,"validateAtRender",void 0),V([P()],e.prototype,"label",void 0),V([P({type:Boolean})],e.prototype,"hideLabel",void 0),V([P()],e.prototype,"name",void 0),V([P({type:Boolean})],e.prototype,"disabled",void 0),V([P()],e.prototype,"helperText",void 0),V([P()],e.prototype,"forceStatus",void 0),V([P({reflect:!0})],e.prototype,"value",void 0),V([Y()],e.prototype,"errorMessages",void 0),V([Y()],e.prototype,"warningMessages",void 0),V([Y()],e.prototype,"status",void 0),V([Y()],e.prototype,"focused",void 0),V([Y()],e.prototype,"additionalWarningRules",void 0),V([Y()],e.prototype,"additionalErrorRules",void 0),e});var Xt=(t,e)=>{let o=t._$AN;if(o===void 0)return!1;for(let n of o)n._$AO?.(e,!1),Xt(n,e);return!0},Ir=t=>{let e,o;do{if((e=t._$AM)===void 0)break;o=e._$AN,o.delete(t),t=e}while(o?.size===0)},Ws=t=>{for(let e;e=t._$AM;t=e){let o=e._$AN;if(o===void 0)e._$AN=o=new Set;else if(o.has(t))break;o.add(t),Jd(e)}};function Yd(t){this._$AN!==void 0?(Ir(this),this._$AM=t,Ws(this)):this._$AM=t}function Xd(t,e=!1,o=0){let n=this._$AH,a=this._$AN;if(a!==void 0&&a.size!==0)if(e)if(Array.isArray(n))for(let i=o;i<n.length;i++)Xt(n[i],!1),Ir(n[i]);else n!=null&&(Xt(n,!1),Ir(n));else Xt(this,t)}var Jd=t=>{t.type==fe.CHILD&&(t._$AP??=Xd,t._$AQ??=Yd)},Et=class extends oe{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,o,n){super._$AT(e,o,n),Ws(this),this.isConnected=e._$AU}_$AO(e,o=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),o&&(Xt(this,e),Ir(this))}setValue(e){if(ia(this._$Ct))this._$Ct._$AI(e,this);else{let o=[...this._$Ct._$AH];o[this._$Ci]=e,this._$Ct._$AI(o,this,0)}}disconnected(){}reconnected(){}};var Nn=class extends Et{get element(){var e;return(e=this.part)===null||e===void 0?void 0:e.element}constructor(e){super(e),this.onFirstTrapFocus=async o=>{if(!this.element||!o.relatedTarget)return;let n=o.relatedTarget;this.isInsideElement(n,this.element)?await this.focusLastDescendant(this.element):await this.focusFirstDescendant(this.element)},this.onLastTrapFocus=async o=>{if(!this.element||!o.relatedTarget)return;let n=o.relatedTarget;this.isInsideElement(n,this.element)?await this.focusFirstDescendant(this.element):await this.focusLastDescendant(this.element)}}render(){return W}update(e){return this.part=e,this.isElementTrappable(e.element)&&this.createFocusTrap(e.element),W}reconnected(){var e;this.isElementTrappable((e=this.part)===null||e===void 0?void 0:e.element)&&this.createFocusTrap(this.part.element)}disconnected(){var e,o,n,a;(e=this.firstTrap)===null||e===void 0||e.removeEventListener("focus",this.onFirstTrapFocus),(o=this.lastTrap)===null||o===void 0||o.removeEventListener("focus",this.onLastTrapFocus),(n=this.firstTrap)===null||n===void 0||n.remove(),(a=this.lastTrap)===null||a===void 0||a.remove(),this.firstTrap=void 0,this.lastTrap=void 0}isElementTrappable(e){return!!e&&e instanceof HTMLElement&&e.childElementCount>0}createFocusTrap(e){this.firstTrap=this.createTrap(),this.lastTrap=this.createTrap(),e.insertBefore(this.firstTrap,e.firstChild),e.appendChild(this.lastTrap),this.lastTrap.addEventListener("focus",this.onLastTrapFocus),this.firstTrap.addEventListener("focus",this.onFirstTrapFocus)}createTrap(){let e=document.createElement("div");return e.tabIndex=0,e}getChildren(e){return e instanceof HTMLSlotElement?e.assignedElements():e.shadowRoot?e.shadowRoot.children:e.children}async focusFirstDescendant(e){await this.updateCompleteIfNecessary(e);let o=this.getChildren(e);for(let n=0;n<o.length;n++){let a=o[n];if(a instanceof HTMLElement&&(this.attemptFocus(a)||await this.focusFirstDescendant(a)))return!0}return!1}async focusLastDescendant(e){await this.updateCompleteIfNecessary(e);let o=this.getChildren(e);for(let n=o.length-1;n>=0;n--){let a=o[n];if(a instanceof HTMLElement&&(this.attemptFocus(a)||await this.focusLastDescendant(a)))return!0}return!1}async updateCompleteIfNecessary(e){e instanceof re&&await e.updateComplete}isInsideElement(e,o){for(let n=e;n;n=n.parentNode){if(n===o)return!0;n instanceof ShadowRoot?n=n.host:n.assignedSlot&&(n=n.assignedSlot)}return!1}attemptFocus(e){return e===this.firstTrap||e===this.lastTrap||!this.isFocusable(e)?!1:(e.focus(),!0)}isFocusable(e){return!e.checkVisibility()||this.isElementDisabled(e)?!1:e instanceof HTMLAnchorElement?!!e.href&&e.rel!=="ignore":e instanceof HTMLInputElement?e.type!=="hidden":e.tabIndex>=0}isElementDisabled(e){return"disabled"in e&&!!e.disabled}},Mb=Q(Nn);var Gs;(function(t){t.sm="sm",t.md="md",t.lg="lg",t.xl="xl"})(Gs||(Gs={}));var Qd={sm:640,md:768,lg:1024,xl:1280},kn=class extends Et{constructor(e){super(e),this.size=0,this.onResize=()=>{let o=window.innerWidth;this.size!==o&&(this.size=o,this.lastArgs&&this.setValue(this.render(...this.lastArgs)))},this.size=window.innerWidth,window.addEventListener("resize",this.onResize)}disconnected(){window.removeEventListener("resize",this.onResize)}reconnected(){window.addEventListener("resize",this.onResize)}update(e,[o,n,a]){return this.lastArgs=[o,n,a],this.render(o,n,a)}render(e,o,n){let a=this.resolveThreshold(e),i=n??(()=>B);return this.size>a?o():i()}resolveThreshold(e){return typeof e=="number"?e:Qd[e]}},$b=Q(kn);var Dn,Fn,Mn,Un,eu=navigator.vendor&&!!navigator.vendor.match(/apple/i)||((Mn=(Fn=(Dn=window.safari)===null||Dn===void 0?void 0:Dn.pushNotification)===null||Fn===void 0?void 0:Fn.toString())!==null&&Mn!==void 0?Mn:"")==="[object SafariRemoteNotification]",tu="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;window.ftGlobals=(Un=window.ftGlobals)!==null&&Un!==void 0?Un:{lit:$r,litDecorators:zr,litRepeat:Wr,litClassMap:Gr,litStyleMap:jr,litUnsafeHTML:Kr,wcUtils:{...oo,...Zr,...co,...wn,...lo,...po,...go,...to,...Po,..._n,...Hs,...vn,...Lo,...mo,...Uo,...Cn,...Fo,...Pn,...gi,...Jr,...Ho,...bo,...$o,...$s,...xi,...Wo,...gn,...In,...No,...Do,...On,...ao,isSafari:eu,isTouchScreen:tu,setVariable:nt}};var Bn={padding:r.create("--ft-infinite-scroll-padding","","SIZE","0"),itemsGap:r.create("--ft-infinite-scroll-items-gap","","SIZE","4px"),itemContainerMinHeight:r.create("--ft-infinite-scroll-item-container-min-height","","SIZE",".1px")},js=$`
85
+ `}resolveStatus(){return this.forceStatus?this.forceStatus:this.errorMessages.length?Ye.error:this.warningMessages.length?Ye.warning:Ye.default}processRules(n){return n.map(a=>a(this.value)).filter(a=>a!==!0).map(a=>a)}}return V([P()],e.prototype,"warningRules",void 0),V([P()],e.prototype,"errorRules",void 0),V([P()],e.prototype,"validateOn",void 0),V([P({type:Boolean})],e.prototype,"validateAtRender",void 0),V([P()],e.prototype,"label",void 0),V([P({type:Boolean})],e.prototype,"hideLabel",void 0),V([P()],e.prototype,"name",void 0),V([P({type:Boolean})],e.prototype,"disabled",void 0),V([P()],e.prototype,"helperText",void 0),V([P()],e.prototype,"forceStatus",void 0),V([P({reflect:!0})],e.prototype,"value",void 0),V([Y()],e.prototype,"errorMessages",void 0),V([Y()],e.prototype,"warningMessages",void 0),V([Y()],e.prototype,"status",void 0),V([Y()],e.prototype,"focused",void 0),V([Y()],e.prototype,"additionalWarningRules",void 0),V([Y()],e.prototype,"additionalErrorRules",void 0),e});var Xt=(t,e)=>{let o=t._$AN;if(o===void 0)return!1;for(let n of o)n._$AO?.(e,!1),Xt(n,e);return!0},Ir=t=>{let e,o;do{if((e=t._$AM)===void 0)break;o=e._$AN,o.delete(t),t=e}while(o?.size===0)},Ws=t=>{for(let e;e=t._$AM;t=e){let o=e._$AN;if(o===void 0)e._$AN=o=new Set;else if(o.has(t))break;o.add(t),Jd(e)}};function Yd(t){this._$AN!==void 0?(Ir(this),this._$AM=t,Ws(this)):this._$AM=t}function Xd(t,e=!1,o=0){let n=this._$AH,a=this._$AN;if(a!==void 0&&a.size!==0)if(e)if(Array.isArray(n))for(let i=o;i<n.length;i++)Xt(n[i],!1),Ir(n[i]);else n!=null&&(Xt(n,!1),Ir(n));else Xt(this,t)}var Jd=t=>{t.type==fe.CHILD&&(t._$AP??=Xd,t._$AQ??=Yd)},Et=class extends oe{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,o,n){super._$AT(e,o,n),Ws(this),this.isConnected=e._$AU}_$AO(e,o=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),o&&(Xt(this,e),Ir(this))}setValue(e){if(ia(this._$Ct))this._$Ct._$AI(e,this);else{let o=[...this._$Ct._$AH];o[this._$Ci]=e,this._$Ct._$AI(o,this,0)}}disconnected(){}reconnected(){}};var Nn=class extends Et{get element(){var e;return(e=this.part)===null||e===void 0?void 0:e.element}constructor(e){super(e),this.onFirstTrapFocus=async o=>{if(!this.element||!o.relatedTarget)return;let n=o.relatedTarget;this.isInsideElement(n,this.element)?await this.focusLastDescendant(this.element):await this.focusFirstDescendant(this.element)},this.onLastTrapFocus=async o=>{if(!this.element||!o.relatedTarget)return;let n=o.relatedTarget;this.isInsideElement(n,this.element)?await this.focusFirstDescendant(this.element):await this.focusLastDescendant(this.element)}}render(){return W}update(e){return this.part=e,this.ensureFocusTrap(e.element),W}reconnected(){var e;this.ensureFocusTrap((e=this.part)===null||e===void 0?void 0:e.element)}disconnected(){this.removeFocusTrap()}ensureFocusTrap(e){var o,n;this.isElementTrappable(e)&&(((o=this.firstTrap)===null||o===void 0?void 0:o.parentElement)===e&&((n=this.lastTrap)===null||n===void 0?void 0:n.parentElement)===e||(this.removeFocusTrap(),this.createFocusTrap(e)))}removeFocusTrap(){var e,o,n,a;(e=this.firstTrap)===null||e===void 0||e.removeEventListener("focus",this.onFirstTrapFocus),(o=this.lastTrap)===null||o===void 0||o.removeEventListener("focus",this.onLastTrapFocus),(n=this.firstTrap)===null||n===void 0||n.remove(),(a=this.lastTrap)===null||a===void 0||a.remove(),this.firstTrap=void 0,this.lastTrap=void 0}isElementTrappable(e){return!!e&&e instanceof HTMLElement&&e.childElementCount>0}createFocusTrap(e){this.firstTrap=this.createTrap(),this.lastTrap=this.createTrap(),e.insertBefore(this.firstTrap,e.firstChild),e.appendChild(this.lastTrap),this.lastTrap.addEventListener("focus",this.onLastTrapFocus),this.firstTrap.addEventListener("focus",this.onFirstTrapFocus)}createTrap(){let e=document.createElement("div");return e.tabIndex=0,e}getChildren(e){return e instanceof HTMLSlotElement?e.assignedElements():e.shadowRoot?e.shadowRoot.children:e.children}async focusFirstDescendant(e){await this.updateCompleteIfNecessary(e);let o=this.getChildren(e);for(let n=0;n<o.length;n++){let a=o[n];if(a instanceof HTMLElement&&(this.attemptFocus(a)||await this.focusFirstDescendant(a)))return!0}return!1}async focusLastDescendant(e){await this.updateCompleteIfNecessary(e);let o=this.getChildren(e);for(let n=o.length-1;n>=0;n--){let a=o[n];if(a instanceof HTMLElement&&(this.attemptFocus(a)||await this.focusLastDescendant(a)))return!0}return!1}async updateCompleteIfNecessary(e){e instanceof re&&await e.updateComplete}isInsideElement(e,o){for(let n=e;n;n=n.parentNode){if(n===o)return!0;n instanceof ShadowRoot?n=n.host:n.assignedSlot&&(n=n.assignedSlot)}return!1}attemptFocus(e){return e===this.firstTrap||e===this.lastTrap||!this.isFocusable(e)?!1:(e.focus(),!0)}isFocusable(e){return!e.checkVisibility()||this.isElementDisabled(e)?!1:e instanceof HTMLAnchorElement?!!e.href&&e.rel!=="ignore":e instanceof HTMLInputElement?e.type!=="hidden":e.tabIndex>=0}isElementDisabled(e){return"disabled"in e&&!!e.disabled}},Mb=Q(Nn);var Gs;(function(t){t.sm="sm",t.md="md",t.lg="lg",t.xl="xl"})(Gs||(Gs={}));var Qd={sm:640,md:768,lg:1024,xl:1280},kn=class extends Et{constructor(e){super(e),this.size=0,this.onResize=()=>{let o=window.innerWidth;this.size!==o&&(this.size=o,this.lastArgs&&this.setValue(this.render(...this.lastArgs)))},this.size=window.innerWidth,window.addEventListener("resize",this.onResize)}disconnected(){window.removeEventListener("resize",this.onResize)}reconnected(){window.addEventListener("resize",this.onResize)}update(e,[o,n,a]){return this.lastArgs=[o,n,a],this.render(o,n,a)}render(e,o,n){let a=this.resolveThreshold(e),i=n??(()=>B);return this.size>a?o():i()}resolveThreshold(e){return typeof e=="number"?e:Qd[e]}},$b=Q(kn);var Dn,Fn,Mn,Un,eu=navigator.vendor&&!!navigator.vendor.match(/apple/i)||((Mn=(Fn=(Dn=window.safari)===null||Dn===void 0?void 0:Dn.pushNotification)===null||Fn===void 0?void 0:Fn.toString())!==null&&Mn!==void 0?Mn:"")==="[object SafariRemoteNotification]",tu="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;window.ftGlobals=(Un=window.ftGlobals)!==null&&Un!==void 0?Un:{lit:$r,litDecorators:zr,litRepeat:Wr,litClassMap:Gr,litStyleMap:jr,litUnsafeHTML:Kr,wcUtils:{...oo,...Zr,...co,...wn,...lo,...po,...go,...to,...Po,..._n,...Hs,...vn,...Lo,...mo,...Uo,...Cn,...Fo,...Pn,...gi,...Jr,...Ho,...bo,...$o,...$s,...xi,...Wo,...gn,...In,...No,...Do,...On,...ao,isSafari:eu,isTouchScreen:tu,setVariable:nt}};var Bn={padding:r.create("--ft-infinite-scroll-padding","","SIZE","0"),itemsGap:r.create("--ft-infinite-scroll-items-gap","","SIZE","4px"),itemContainerMinHeight:r.create("--ft-infinite-scroll-item-container-min-height","","SIZE",".1px")},js=$`
86
86
  .items-container {
87
87
  padding: ${Bn.padding};
88
88
  outline: none;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-infinite-scroll",
3
- "version": "2.0.23",
3
+ "version": "2.0.25",
4
4
  "description": "An infinite scroller.",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,8 +19,8 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-wc-utils": "2.0.23",
22
+ "@fluid-topics/ft-wc-utils": "2.0.25",
23
23
  "lit": "3.1.0"
24
24
  },
25
- "gitHead": "e441ae21f5027730992e39b7dc728ac0f7b17dc0"
25
+ "gitHead": "f7582c9f28ac8fb59807834b4cbdcf09144478cf"
26
26
  }