@fluid-topics/ft-card 2.0.23 → 2.0.24

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.`,s.colorGray200),contentGlobalSubtle:o.extend("--ftds-con
82
82
  <li>${this.helperText}</li>
83
83
  `)}
84
84
  </ul>
85
- `}resolveStatus(){return this.forceStatus?this.forceStatus:this.errorMessages.length?It.error:this.warningMessages.length?It.warning:It.default}processRules(n){return n.map(a=>a(this.value)).filter(a=>a!==!0).map(a=>a)}}return ce([T()],t.prototype,"warningRules",void 0),ce([T()],t.prototype,"errorRules",void 0),ce([T()],t.prototype,"validateOn",void 0),ce([T({type:Boolean})],t.prototype,"validateAtRender",void 0),ce([T()],t.prototype,"label",void 0),ce([T({type:Boolean})],t.prototype,"hideLabel",void 0),ce([T()],t.prototype,"name",void 0),ce([T({type:Boolean})],t.prototype,"disabled",void 0),ce([T()],t.prototype,"helperText",void 0),ce([T()],t.prototype,"forceStatus",void 0),ce([T({reflect:!0})],t.prototype,"value",void 0),ce([q()],t.prototype,"errorMessages",void 0),ce([q()],t.prototype,"warningMessages",void 0),ce([q()],t.prototype,"status",void 0),ce([q()],t.prototype,"focused",void 0),ce([q()],t.prototype,"additionalWarningRules",void 0),ce([q()],t.prototype,"additionalErrorRules",void 0),t});var ro=(e,t)=>{let r=e._$AN;if(r===void 0)return!1;for(let n of r)n._$AO?.(t,!1),ro(n,t);return!0},jo=e=>{let t,r;do{if((t=e._$AM)===void 0)break;r=t._$AN,r.delete(e),e=t}while(r?.size===0)},f1=e=>{for(let t;t=e._$AM;e=t){let r=t._$AN;if(r===void 0)t._$AN=r=new Set;else if(r.has(e))break;r.add(e),cu(t)}};function au(e){this._$AN!==void 0?(jo(this),this._$AM=e,f1(this)):this._$AM=e}function iu(e,t=!1,r=0){let n=this._$AH,a=this._$AN;if(a!==void 0&&a.size!==0)if(t)if(Array.isArray(n))for(let i=r;i<n.length;i++)ro(n[i],!1),jo(n[i]);else n!=null&&(ro(n,!1),jo(n));else ro(this,e)}var cu=e=>{e.type==Pe.CHILD&&(e._$AP??=iu,e._$AQ??=au)},lr=class extends Ee{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,r,n){super._$AT(t,r,n),f1(this),this.isConnected=t._$AU}_$AO(t,r=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),r&&(ro(this,t),jo(this))}setValue(t){if(Fc(this._$Ct))this._$Ct._$AI(t,this);else{let r=[...this._$Ct._$AH];r[this._$Ci]=t,this._$Ct._$AI(r,this,0)}}disconnected(){}reconnected(){}};var Oi=class extends lr{get element(){var t;return(t=this.part)===null||t===void 0?void 0:t.element}constructor(t){super(t),this.onFirstTrapFocus=async r=>{if(!this.element||!r.relatedTarget)return;let n=r.relatedTarget;this.isInsideElement(n,this.element)?await this.focusLastDescendant(this.element):await this.focusFirstDescendant(this.element)},this.onLastTrapFocus=async r=>{if(!this.element||!r.relatedTarget)return;let n=r.relatedTarget;this.isInsideElement(n,this.element)?await this.focusFirstDescendant(this.element):await this.focusLastDescendant(this.element)}}render(){return ne}update(t){return this.part=t,this.isElementTrappable(t.element)&&this.createFocusTrap(t.element),ne}reconnected(){var t;this.isElementTrappable((t=this.part)===null||t===void 0?void 0:t.element)&&this.createFocusTrap(this.part.element)}disconnected(){var t,r,n,a;(t=this.firstTrap)===null||t===void 0||t.removeEventListener("focus",this.onFirstTrapFocus),(r=this.lastTrap)===null||r===void 0||r.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(t){return!!t&&t instanceof HTMLElement&&t.childElementCount>0}createFocusTrap(t){this.firstTrap=this.createTrap(),this.lastTrap=this.createTrap(),t.insertBefore(this.firstTrap,t.firstChild),t.appendChild(this.lastTrap),this.lastTrap.addEventListener("focus",this.onLastTrapFocus),this.firstTrap.addEventListener("focus",this.onFirstTrapFocus)}createTrap(){let t=document.createElement("div");return t.tabIndex=0,t}getChildren(t){return t instanceof HTMLSlotElement?t.assignedElements():t.shadowRoot?t.shadowRoot.children:t.children}async focusFirstDescendant(t){await this.updateCompleteIfNecessary(t);let r=this.getChildren(t);for(let n=0;n<r.length;n++){let a=r[n];if(a instanceof HTMLElement&&(this.attemptFocus(a)||await this.focusFirstDescendant(a)))return!0}return!1}async focusLastDescendant(t){await this.updateCompleteIfNecessary(t);let r=this.getChildren(t);for(let n=r.length-1;n>=0;n--){let a=r[n];if(a instanceof HTMLElement&&(this.attemptFocus(a)||await this.focusLastDescendant(a)))return!0}return!1}async updateCompleteIfNecessary(t){t instanceof Se&&await t.updateComplete}isInsideElement(t,r){for(let n=t;n;n=n.parentNode){if(n===r)return!0;n instanceof ShadowRoot?n=n.host:n.assignedSlot&&(n=n.assignedSlot)}return!1}attemptFocus(t){return t===this.firstTrap||t===this.lastTrap||!this.isFocusable(t)?!1:(t.focus(),!0)}isFocusable(t){return!t.checkVisibility()||this.isElementDisabled(t)?!1:t instanceof HTMLAnchorElement?!!t.href&&t.rel!=="ignore":t instanceof HTMLInputElement?t.type!=="hidden":t.tabIndex>=0}isElementDisabled(t){return"disabled"in t&&!!t.disabled}},Vv=me(Oi);var u1;(function(e){e.sm="sm",e.md="md",e.lg="lg",e.xl="xl"})(u1||(u1={}));var su={sm:640,md:768,lg:1024,xl:1280},Ri=class extends lr{constructor(t){super(t),this.size=0,this.onResize=()=>{let r=window.innerWidth;this.size!==r&&(this.size=r,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(t,[r,n,a]){return this.lastArgs=[r,n,a],this.render(r,n,a)}render(t,r,n){let a=this.resolveThreshold(t),i=n??(()=>V);return this.size>a?r():i()}resolveThreshold(t){return typeof t=="number"?t:su[t]}},Yv=me(Ri);var wi,_i,Ni,Ti,lu=navigator.vendor&&!!navigator.vendor.match(/apple/i)||((Ni=(_i=(wi=window.safari)===null||wi===void 0?void 0:wi.pushNotification)===null||_i===void 0?void 0:_i.toString())!==null&&Ni!==void 0?Ni:"")==="[object SafariRemoteNotification]",du="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;window.ftGlobals=(Ti=window.ftGlobals)!==null&&Ti!==void 0?Ti:{lit:En,litDecorators:Cn,litRepeat:An,litClassMap:Ln,litStyleMap:On,litUnsafeHTML:Rn,wcUtils:{...Dn,..._n,...$n,...xi,...Fn,...Vn,...fa,...zn,...La,...Ci,...l1,...pi,...Oa,...da,...Ma,...yi,...Na,...Ai,...Hs,...Mn,...ka,...ua,...za,...d1,...$s,...Da,...di,...Si,...Ra,..._a,...mi,...Bn,isSafari:lu,isTouchScreen:du,setVariable:Fe}};var p1=o.extend("--ft-ripple-color","",Q.colorContent),re={color:p1,backgroundColor:o.extend("--ft-ripple-background-color","",p1),opacityContentOnSurfacePressed:o.external(Q.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:o.external(Q.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:o.external(Q.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:o.external(Q.opacityContentOnSurfaceSelected,"Design system"),borderRadius:o.create("--ft-ripple-border-radius","","SIZE","0px")},h1=o.extend("--ft-ripple-color","",Q.colorPrimary),m1={color:h1,backgroundColor:o.extend("--ft-ripple-background-color","",h1)},g1=o.extend("--ft-ripple-color","",Q.colorSecondary),y1={color:g1,backgroundColor:o.extend("--ft-ripple-background-color","",g1)},b1=U`
85
+ `}resolveStatus(){return this.forceStatus?this.forceStatus:this.errorMessages.length?It.error:this.warningMessages.length?It.warning:It.default}processRules(n){return n.map(a=>a(this.value)).filter(a=>a!==!0).map(a=>a)}}return ce([T()],t.prototype,"warningRules",void 0),ce([T()],t.prototype,"errorRules",void 0),ce([T()],t.prototype,"validateOn",void 0),ce([T({type:Boolean})],t.prototype,"validateAtRender",void 0),ce([T()],t.prototype,"label",void 0),ce([T({type:Boolean})],t.prototype,"hideLabel",void 0),ce([T()],t.prototype,"name",void 0),ce([T({type:Boolean})],t.prototype,"disabled",void 0),ce([T()],t.prototype,"helperText",void 0),ce([T()],t.prototype,"forceStatus",void 0),ce([T({reflect:!0})],t.prototype,"value",void 0),ce([q()],t.prototype,"errorMessages",void 0),ce([q()],t.prototype,"warningMessages",void 0),ce([q()],t.prototype,"status",void 0),ce([q()],t.prototype,"focused",void 0),ce([q()],t.prototype,"additionalWarningRules",void 0),ce([q()],t.prototype,"additionalErrorRules",void 0),t});var ro=(e,t)=>{let r=e._$AN;if(r===void 0)return!1;for(let n of r)n._$AO?.(t,!1),ro(n,t);return!0},jo=e=>{let t,r;do{if((t=e._$AM)===void 0)break;r=t._$AN,r.delete(e),e=t}while(r?.size===0)},f1=e=>{for(let t;t=e._$AM;e=t){let r=t._$AN;if(r===void 0)t._$AN=r=new Set;else if(r.has(e))break;r.add(e),cu(t)}};function au(e){this._$AN!==void 0?(jo(this),this._$AM=e,f1(this)):this._$AM=e}function iu(e,t=!1,r=0){let n=this._$AH,a=this._$AN;if(a!==void 0&&a.size!==0)if(t)if(Array.isArray(n))for(let i=r;i<n.length;i++)ro(n[i],!1),jo(n[i]);else n!=null&&(ro(n,!1),jo(n));else ro(this,e)}var cu=e=>{e.type==Pe.CHILD&&(e._$AP??=iu,e._$AQ??=au)},lr=class extends Ee{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,r,n){super._$AT(t,r,n),f1(this),this.isConnected=t._$AU}_$AO(t,r=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),r&&(ro(this,t),jo(this))}setValue(t){if(Fc(this._$Ct))this._$Ct._$AI(t,this);else{let r=[...this._$Ct._$AH];r[this._$Ci]=t,this._$Ct._$AI(r,this,0)}}disconnected(){}reconnected(){}};var Oi=class extends lr{get element(){var t;return(t=this.part)===null||t===void 0?void 0:t.element}constructor(t){super(t),this.onFirstTrapFocus=async r=>{if(!this.element||!r.relatedTarget)return;let n=r.relatedTarget;this.isInsideElement(n,this.element)?await this.focusLastDescendant(this.element):await this.focusFirstDescendant(this.element)},this.onLastTrapFocus=async r=>{if(!this.element||!r.relatedTarget)return;let n=r.relatedTarget;this.isInsideElement(n,this.element)?await this.focusFirstDescendant(this.element):await this.focusLastDescendant(this.element)}}render(){return ne}update(t){return this.part=t,this.ensureFocusTrap(t.element),ne}reconnected(){var t;this.ensureFocusTrap((t=this.part)===null||t===void 0?void 0:t.element)}disconnected(){this.removeFocusTrap()}ensureFocusTrap(t){var r,n;this.isElementTrappable(t)&&(((r=this.firstTrap)===null||r===void 0?void 0:r.parentElement)===t&&((n=this.lastTrap)===null||n===void 0?void 0:n.parentElement)===t||(this.removeFocusTrap(),this.createFocusTrap(t)))}removeFocusTrap(){var t,r,n,a;(t=this.firstTrap)===null||t===void 0||t.removeEventListener("focus",this.onFirstTrapFocus),(r=this.lastTrap)===null||r===void 0||r.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(t){return!!t&&t instanceof HTMLElement&&t.childElementCount>0}createFocusTrap(t){this.firstTrap=this.createTrap(),this.lastTrap=this.createTrap(),t.insertBefore(this.firstTrap,t.firstChild),t.appendChild(this.lastTrap),this.lastTrap.addEventListener("focus",this.onLastTrapFocus),this.firstTrap.addEventListener("focus",this.onFirstTrapFocus)}createTrap(){let t=document.createElement("div");return t.tabIndex=0,t}getChildren(t){return t instanceof HTMLSlotElement?t.assignedElements():t.shadowRoot?t.shadowRoot.children:t.children}async focusFirstDescendant(t){await this.updateCompleteIfNecessary(t);let r=this.getChildren(t);for(let n=0;n<r.length;n++){let a=r[n];if(a instanceof HTMLElement&&(this.attemptFocus(a)||await this.focusFirstDescendant(a)))return!0}return!1}async focusLastDescendant(t){await this.updateCompleteIfNecessary(t);let r=this.getChildren(t);for(let n=r.length-1;n>=0;n--){let a=r[n];if(a instanceof HTMLElement&&(this.attemptFocus(a)||await this.focusLastDescendant(a)))return!0}return!1}async updateCompleteIfNecessary(t){t instanceof Se&&await t.updateComplete}isInsideElement(t,r){for(let n=t;n;n=n.parentNode){if(n===r)return!0;n instanceof ShadowRoot?n=n.host:n.assignedSlot&&(n=n.assignedSlot)}return!1}attemptFocus(t){return t===this.firstTrap||t===this.lastTrap||!this.isFocusable(t)?!1:(t.focus(),!0)}isFocusable(t){return!t.checkVisibility()||this.isElementDisabled(t)?!1:t instanceof HTMLAnchorElement?!!t.href&&t.rel!=="ignore":t instanceof HTMLInputElement?t.type!=="hidden":t.tabIndex>=0}isElementDisabled(t){return"disabled"in t&&!!t.disabled}},Vv=me(Oi);var u1;(function(e){e.sm="sm",e.md="md",e.lg="lg",e.xl="xl"})(u1||(u1={}));var su={sm:640,md:768,lg:1024,xl:1280},Ri=class extends lr{constructor(t){super(t),this.size=0,this.onResize=()=>{let r=window.innerWidth;this.size!==r&&(this.size=r,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(t,[r,n,a]){return this.lastArgs=[r,n,a],this.render(r,n,a)}render(t,r,n){let a=this.resolveThreshold(t),i=n??(()=>V);return this.size>a?r():i()}resolveThreshold(t){return typeof t=="number"?t:su[t]}},Yv=me(Ri);var wi,_i,Ni,Ti,lu=navigator.vendor&&!!navigator.vendor.match(/apple/i)||((Ni=(_i=(wi=window.safari)===null||wi===void 0?void 0:wi.pushNotification)===null||_i===void 0?void 0:_i.toString())!==null&&Ni!==void 0?Ni:"")==="[object SafariRemoteNotification]",du="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;window.ftGlobals=(Ti=window.ftGlobals)!==null&&Ti!==void 0?Ti:{lit:En,litDecorators:Cn,litRepeat:An,litClassMap:Ln,litStyleMap:On,litUnsafeHTML:Rn,wcUtils:{...Dn,..._n,...$n,...xi,...Fn,...Vn,...fa,...zn,...La,...Ci,...l1,...pi,...Oa,...da,...Ma,...yi,...Na,...Ai,...Hs,...Mn,...ka,...ua,...za,...d1,...$s,...Da,...di,...Si,...Ra,..._a,...mi,...Bn,isSafari:lu,isTouchScreen:du,setVariable:Fe}};var p1=o.extend("--ft-ripple-color","",Q.colorContent),re={color:p1,backgroundColor:o.extend("--ft-ripple-background-color","",p1),opacityContentOnSurfacePressed:o.external(Q.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:o.external(Q.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:o.external(Q.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:o.external(Q.opacityContentOnSurfaceSelected,"Design system"),borderRadius:o.create("--ft-ripple-border-radius","","SIZE","0px")},h1=o.extend("--ft-ripple-color","",Q.colorPrimary),m1={color:h1,backgroundColor:o.extend("--ft-ripple-background-color","",h1)},g1=o.extend("--ft-ripple-color","",Q.colorSecondary),y1={color:g1,backgroundColor:o.extend("--ft-ripple-background-color","",g1)},b1=U`
86
86
  :host {
87
87
  display: contents;
88
88
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-card",
3
- "version": "2.0.23",
3
+ "version": "2.0.24",
4
4
  "description": "A file uploader with drag and drop",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,10 +19,10 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-ripple": "2.0.23",
23
- "@fluid-topics/ft-typography": "2.0.23",
24
- "@fluid-topics/ft-wc-utils": "2.0.23",
22
+ "@fluid-topics/ft-ripple": "2.0.24",
23
+ "@fluid-topics/ft-typography": "2.0.24",
24
+ "@fluid-topics/ft-wc-utils": "2.0.24",
25
25
  "lit": "3.1.0"
26
26
  },
27
- "gitHead": "e441ae21f5027730992e39b7dc728ac0f7b17dc0"
27
+ "gitHead": "5407e83b63be10ccc5bdeb3551c9f798b9559ae0"
28
28
  }