@fluid-topics/ft-file-button 2.2.41 → 2.2.43

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.
@@ -1,6 +1,8 @@
1
1
  "use strict";(()=>{var kl=Object.create;var _i=Object.defineProperty;var Ml=Object.getOwnPropertyDescriptor;var Il=Object.getOwnPropertyNames;var Ul=Object.getPrototypeOf,$l=Object.prototype.hasOwnProperty;var kt=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var Bl=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Il(t))!$l.call(e,i)&&i!==r&&_i(e,i,{get:()=>t[i],enumerable:!(n=Ml(t,i))||n.enumerable});return e};var m=(e,t,r)=>(r=e!=null?kl(Ul(e)):{},Bl(t||!e||!e.__esModule?_i(r,"default",{value:e,enumerable:!0}):r,e));var w=kt((Au,Ci)=>{Ci.exports=ftGlobals.wcUtils});var H=kt((Su,wi)=>{wi.exports=ftGlobals.lit});var Y=kt((_u,Ti)=>{Ti.exports=ftGlobals.litDecorators});var xn=kt((Cu,Oi)=>{Oi.exports=ftGlobals.litClassMap});var ul=kt((my,cl)=>{cl.exports=ftGlobals.litUnsafeHTML});var Nl=m(w());var Ol=m(H()),we=m(Y()),Rl=m(w());var Ce=m(w());var Ii=m(H()),j=m(Y()),Ui=m(xn()),Mt=m(w());var ki=m(H()),M=m(w()),Ri=M.FtCssVariableFactory.extend("--ft-ripple-color","",M.designSystemVariables.colorContent),X={color:Ri,backgroundColor:M.FtCssVariableFactory.extend("--ft-ripple-background-color","",Ri),opacityContentOnSurfacePressed:M.FtCssVariableFactory.external(M.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:M.FtCssVariableFactory.external(M.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:M.FtCssVariableFactory.external(M.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:M.FtCssVariableFactory.external(M.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:M.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},Li=M.FtCssVariableFactory.extend("--ft-ripple-color","",M.designSystemVariables.colorPrimary),Ni={color:Li,backgroundColor:M.FtCssVariableFactory.extend("--ft-ripple-background-color","",Li)},Pi=M.FtCssVariableFactory.extend("--ft-ripple-color","",M.designSystemVariables.colorSecondary),Di={color:Pi,backgroundColor:M.FtCssVariableFactory.extend("--ft-ripple-background-color","",Pi)},Mi=ki.css`
2
2
  :host {
3
3
  display: contents;
4
+ /* Chrome 153+ UA stylesheet hides [unbounded]:not(:unbounded) elements (crbug.com/579043456) */
5
+ visibility: inherit;
4
6
  }
5
7
 
6
8
  .ft-ripple {
@@ -84,6 +84,8 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:o.extend("--ftds-con
84
84
  `}resolveStatus(){return this.forceStatus?this.forceStatus:this.errorMessages.length?rt.error:this.warningMessages.length?rt.warning:rt.default}}return te([x()],e.prototype,"warningRules",void 0),te([x()],e.prototype,"errorRules",void 0),te([x()],e.prototype,"validateOn",void 0),te([x({type:Boolean})],e.prototype,"validateAtRender",void 0),te([x()],e.prototype,"label",void 0),te([x({type:Boolean})],e.prototype,"hideLabel",void 0),te([x()],e.prototype,"name",void 0),te([x({type:Boolean})],e.prototype,"disabled",void 0),te([x()],e.prototype,"helperText",void 0),te([x()],e.prototype,"forceStatus",void 0),te([x({reflect:!0})],e.prototype,"value",void 0),te([$()],e.prototype,"errorMessages",void 0),te([$()],e.prototype,"warningMessages",void 0),te([$()],e.prototype,"status",void 0),te([$()],e.prototype,"focused",void 0),te([$()],e.prototype,"additionalWarningRules",void 0),te([$()],e.prototype,"additionalErrorRules",void 0),te([$()],e.prototype,"forceErrorMessages",void 0),e});var qr=(t,e)=>{let r=t._$AN;if(r===void 0)return!1;for(let n of r)n._$AO?.(e,!1),qr(n,e);return!0},qo=t=>{let e,r;do{if((e=t._$AM)===void 0)break;r=e._$AN,r.delete(t),t=e}while(r?.size===0)},Yl=t=>{for(let e;e=t._$AM;t=e){let r=e._$AN;if(r===void 0)e._$AN=r=new Set;else if(r.has(t))break;r.add(t),ch(e)}};function ah(t){this._$AN!==void 0?(qo(this),this._$AM=t,Yl(this)):this._$AM=t}function sh(t,e=!1,r=0){let n=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(e)if(Array.isArray(n))for(let a=r;a<n.length;a++)qr(n[a],!1),qo(n[a]);else n!=null&&(qr(n,!1),qo(n));else qr(this,t)}var ch=t=>{t.type==ke.CHILD&&(t._$AP??=sh,t._$AQ??=ah)},dr=class extends ve{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,r,n){super._$AT(e,r,n),Yl(this),this.isConnected=e._$AU}_$AO(e,r=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),r&&(qr(this,e),qo(this))}setValue(e){if(is(this._$Ct))this._$Ct._$AI(e,this);else{let r=[...this._$Ct._$AH];r[this._$Ci]=e,this._$Ct._$AI(r,this,0)}}disconnected(){}reconnected(){}};var ha=class extends dr{get element(){var e;return(e=this.part)===null||e===void 0?void 0:e.element}constructor(e){super(e),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 Y}update(e){return this.part=e,this.ensureFocusTrap(e.element),Y}reconnected(){var e;this.ensureFocusTrap((e=this.part)===null||e===void 0?void 0:e.element)}disconnected(){this.removeFocusTrap()}ensureFocusTrap(e){var r,n;this.isElementTrappable(e)&&(((r=this.firstTrap)===null||r===void 0?void 0:r.parentElement)===e&&((n=this.lastTrap)===null||n===void 0?void 0:n.parentElement)===e||(this.removeFocusTrap(),this.createFocusTrap(e)))}removeFocusTrap(){var e,r,n,i;(e=this.firstTrap)===null||e===void 0||e.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(),(i=this.lastTrap)===null||i===void 0||i.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 r=this.getChildren(e);for(let n=0;n<r.length;n++){let i=r[n];if(i instanceof HTMLElement&&(this.attemptFocus(i)||await this.focusFirstDescendant(i)))return!0}return!1}async focusLastDescendant(e){await this.updateCompleteIfNecessary(e);let r=this.getChildren(e);for(let n=r.length-1;n>=0;n--){let i=r[n];if(i instanceof HTMLElement&&(this.attemptFocus(i)||await this.focusLastDescendant(i)))return!0}return!1}async updateCompleteIfNecessary(e){e instanceof xe&&await e.updateComplete}isInsideElement(e,r){return Xe(e).includes(r)}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}},uS=fe(ha);var Xl;(function(t){t.sm="sm",t.md="md",t.lg="lg",t.xl="xl"})(Xl||(Xl={}));var lh={sm:640,md:768,lg:1024,xl:1280},ma=class extends dr{constructor(e){super(e),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(e,[r,n,i]){return this.lastArgs=[r,n,i],this.render(r,n,i)}render(e,r,n){let i=this.resolveThreshold(e),a=n??(()=>U);return this.size>i?r():a()}resolveThreshold(e){return typeof e=="number"?e:lh[e]}},mS=fe(ma);var ya,_t=class{static compareDeepPosition(e,r){if(e===r)return 0;let n=Xe(e).reverse(),i=Xe(r).reverse();if(n[0]!==i[0])return Node.DOCUMENT_POSITION_DISCONNECTED|Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|Node.DOCUMENT_POSITION_PRECEDING;let a=0;for(;(n[a]||i[a])&&n[a]===i[a];)a++;return n[a]==null?Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING:i[a]==null?Node.DOCUMENT_POSITION_CONTAINS|Node.DOCUMENT_POSITION_PRECEDING:n[a].compareDocumentPosition(i[a])}static compareDocumentPosition(e,r){let n=ya.compareDeepPosition(e,r);return{equal:n===0,disconnected:(n&Node.DOCUMENT_POSITION_DISCONNECTED)!==0,implementationSpecific:(n&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)!==0,preceding:(n&Node.DOCUMENT_POSITION_PRECEDING)!==0,following:(n&Node.DOCUMENT_POSITION_FOLLOWING)!==0,contains:(n&Node.DOCUMENT_POSITION_CONTAINS)!==0,containedBy:(n&Node.DOCUMENT_POSITION_CONTAINED_BY)!==0}}static findFirstInDOM(e){let r=0;for(let n=1;n<e.length;n++)this.domOrderSorter(e[r],e[n])>0&&(r=n);return e[r]}static getDeepActiveElement(){var e;if(!document.activeElement)return null;let r=document.activeElement;for(;!((e=r.shadowRoot)===null||e===void 0)&&e.activeElement;)r=r.shadowRoot.activeElement;return r}};ya=_t;_t.domOrderSorter=(t,e)=>{if(t===e||!t?.isConnected&&!e?.isConnected)return 0;if(!e?.isConnected)return-1;if(!t?.isConnected)return 1;let{preceding:r,following:n,contains:i,containedBy:a}=ya.compareDocumentPosition(t,e);return r||i?1:n||a?-1:0};var ga=class t{static autoFocus(e){t.allowAutoFocus(e)&&e.focus()}static allowAutoFocus(e){if(ba)return!1;let r=_t.getDeepActiveElement();if(!r)return!0;let n=_t.compareDocumentPosition(r,e);return n.disconnected||n.implementationSpecific?!1:n.preceding&&!n.contains||n.containedBy}};window.FluidTopicsFocusHelper=ga;var xa,va,Sa,Ea,Ca=navigator.vendor&&!!navigator.vendor.match(/apple/i)||((Sa=(va=(xa=window.safari)===null||xa===void 0?void 0:xa.pushNotification)===null||va===void 0?void 0:va.toString())!==null&&Sa!==void 0?Sa:"")==="[object SafariRemoteNotification]",ba="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;window.ftGlobals=(Ea=window.ftGlobals)!==null&&Ea!==void 0?Ea:{lit:En,litDecorators:On,litRepeat:An,litClassMap:wn,litStyleMap:_n,litUnsafeHTML:Tn,wcUtils:{...Ln,...$n,...Nn,...Yn,...ta,...Xn,...Pn,...ti,...Bn,...mi,...ia,...jl,...Xi,...yi,...ei,...Ei,...ea,...vi,...aa,...sa,...il,...Dn,...Ai,...ua,...ri,..._i,...Kl,...sl,...Ri,...Zi,...oa,...gi,...xi,...Gn,...Kn,...la,isSafari:Ca,isTouchScreen:ba,setVariable:ee}};var Jl=o.extend("--ft-ripple-color","",H.colorContent),de={color:Jl,backgroundColor:o.extend("--ft-ripple-background-color","",Jl),opacityContentOnSurfacePressed:o.external(H.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:o.external(H.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:o.external(H.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:o.external(H.opacityContentOnSurfaceSelected,"Design system"),borderRadius:o.create("--ft-ripple-border-radius","","SIZE","0px")},Ql=o.extend("--ft-ripple-color","",H.colorPrimary),ed={color:Ql,backgroundColor:o.extend("--ft-ripple-background-color","",Ql)},td=o.extend("--ft-ripple-color","",H.colorSecondary),rd={color:td,backgroundColor:o.extend("--ft-ripple-background-color","",td)},od=R`
85
85
  :host {
86
86
  display: contents;
87
+ /* Chrome 153+ UA stylesheet hides [unbounded]:not(:unbounded) elements (crbug.com/579043456) */
88
+ visibility: inherit;
87
89
  }
88
90
 
89
91
  .ft-ripple {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-file-button",
3
- "version": "2.2.41",
3
+ "version": "2.2.43",
4
4
  "description": "File",
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-button": "2.2.41",
23
- "@fluid-topics/ft-icon": "2.2.41",
24
- "@fluid-topics/ft-wc-utils": "2.2.41",
22
+ "@fluid-topics/ft-button": "2.2.43",
23
+ "@fluid-topics/ft-icon": "2.2.43",
24
+ "@fluid-topics/ft-wc-utils": "2.2.43",
25
25
  "lit": "3.3.3"
26
26
  },
27
- "gitHead": "2651e9245c0e8fe0dcb2bc475ae6c91642746e55"
27
+ "gitHead": "aeec4ca489c4004e09f3eec48d999e4199566f9a"
28
28
  }