@fluid-topics/ftds-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 S4=Object.create;var ri=Object.defineProperty;var C4=Object.getOwnPropertyDescriptor;var E4=Object.getOwnPropertyNames;var A4=Object.getPrototypeOf,L4=Object.prototype.hasOwnProperty;var fr=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}};var O4=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of E4(t))!L4.call(e,a)&&a!==n&&ri(e,a,{get:()=>t[a],enumerable:!(o=C4(t,a))||o.enumerable});return e};var E=(e,t,n)=>(n=e!=null?S4(A4(e)):{},O4(t||!e||!e.__esModule?ri(n,"default",{value:e,enumerable:!0}):n,e));var P=fr((W3,ni)=>{ni.exports=ftGlobals.wcUtils});var j=fr((V3,oi)=>{oi.exports=ftGlobals.lit});var oe=fr((l5,Pi)=>{Pi.exports=ftGlobals.litDecorators});var Qr=fr((v5,$i)=>{$i.exports=ftGlobals.litClassMap});var b1=fr(($b,y1)=>{y1.exports=ftGlobals.litUnsafeHTML});var b4=E(P());var ai=E(j()),ii=ai.css``;var Ii=E(j()),S=E(P());var ui=E(j()),q=E(P()),si=q.FtCssVariableFactory.extend("--ft-ripple-color","",q.designSystemVariables.colorContent),A={color:si,backgroundColor:q.FtCssVariableFactory.extend("--ft-ripple-background-color","",si),opacityContentOnSurfacePressed:q.FtCssVariableFactory.external(q.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:q.FtCssVariableFactory.external(q.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:q.FtCssVariableFactory.external(q.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:q.FtCssVariableFactory.external(q.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:q.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},ci=q.FtCssVariableFactory.extend("--ft-ripple-color","",q.designSystemVariables.colorPrimary),li={color:ci,backgroundColor:q.FtCssVariableFactory.extend("--ft-ripple-background-color","",ci)},di=q.FtCssVariableFactory.extend("--ft-ripple-color","",q.designSystemVariables.colorSecondary),fi={color:di,backgroundColor:q.FtCssVariableFactory.extend("--ft-ripple-background-color","",di)},pi=ui.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.`,l.colorGray200),contentGlobalSubtle:o.extend("--ftds-con
84
84
  `}resolveStatus(){return this.forceStatus?this.forceStatus:this.errorMessages.length?bt.error:this.warningMessages.length?bt.warning:bt.default}}return se([A()],e.prototype,"warningRules",void 0),se([A()],e.prototype,"errorRules",void 0),se([A()],e.prototype,"validateOn",void 0),se([A({type:Boolean})],e.prototype,"validateAtRender",void 0),se([A()],e.prototype,"label",void 0),se([A({type:Boolean})],e.prototype,"hideLabel",void 0),se([A()],e.prototype,"name",void 0),se([A({type:Boolean})],e.prototype,"disabled",void 0),se([A()],e.prototype,"helperText",void 0),se([A()],e.prototype,"forceStatus",void 0),se([A({reflect:!0})],e.prototype,"value",void 0),se([Y()],e.prototype,"errorMessages",void 0),se([Y()],e.prototype,"warningMessages",void 0),se([Y()],e.prototype,"status",void 0),se([Y()],e.prototype,"focused",void 0),se([Y()],e.prototype,"additionalWarningRules",void 0),se([Y()],e.prototype,"additionalErrorRules",void 0),se([Y()],e.prototype,"forceErrorMessages",void 0),e});var En=(t,e)=>{let r=t._$AN;if(r===void 0)return!1;for(let n of r)n._$AO?.(e,!1),En(n,e);return!0},No=t=>{let e,r;do{if((e=t._$AM)===void 0)break;r=e._$AN,r.delete(t),t=e}while(r?.size===0)},v2=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),vp(e)}};function yp(t){this._$AN!==void 0?(No(this),this._$AM=t,v2(this)):this._$AM=t}function bp(t,e=!1,r=0){let n=this._$AH,a=this._$AN;if(a!==void 0&&a.size!==0)if(e)if(Array.isArray(n))for(let i=r;i<n.length;i++)En(n[i],!1),No(n[i]);else n!=null&&(En(n,!1),No(n));else En(this,t)}var vp=t=>{t.type==$e.CHILD&&(t._$AP??=bp,t._$AQ??=yp)},Ir=class extends we{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,r,n){super._$AT(e,r,n),v2(this),this.isConnected=e._$AU}_$AO(e,r=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),r&&(En(this,e),No(this))}setValue(e){if(Vc(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 As=class extends Ir{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 oe}update(e){return this.part=e,this.ensureFocusTrap(e.element),oe}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,a;(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(),(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 r=this.getChildren(e);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(e){await this.updateCompleteIfNecessary(e);let r=this.getChildren(e);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(e){e instanceof Oe&&await e.updateComplete}isInsideElement(e,r){return pt(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}},tv=xe(As);var x2;(function(t){t.sm="sm",t.md="md",t.lg="lg",t.xl="xl"})(x2||(x2={}));var xp={sm:640,md:768,lg:1024,xl:1280},Ls=class extends Ir{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,a]){return this.lastArgs=[r,n,a],this.render(r,n,a)}render(e,r,n){let a=this.resolveThreshold(e),i=n??(()=>K);return this.size>a?r():i()}resolveThreshold(e){return typeof e=="number"?e:xp[e]}},av=xe(Ls);var Os,Vt=class{static compareDeepPosition(e,r){if(e===r)return 0;let n=pt(e).reverse(),a=pt(r).reverse();if(n[0]!==a[0])return Node.DOCUMENT_POSITION_DISCONNECTED|Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|Node.DOCUMENT_POSITION_PRECEDING;let i=0;for(;(n[i]||a[i])&&n[i]===a[i];)i++;return n[i]==null?Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING:a[i]==null?Node.DOCUMENT_POSITION_CONTAINS|Node.DOCUMENT_POSITION_PRECEDING:n[i].compareDocumentPosition(a[i])}static compareDocumentPosition(e,r){let n=Os.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}};Os=Vt;Vt.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:a,containedBy:i}=Os.compareDocumentPosition(t,e);return r||a?1:n||i?-1:0};var ws=class t{static autoFocus(e){t.allowAutoFocus(e)&&e.focus()}static allowAutoFocus(e){if(Rs)return!1;let r=Vt.getDeepActiveElement();if(!r)return!0;let n=Vt.compareDocumentPosition(r,e);return n.disconnected||n.implementationSpecific?!1:n.preceding&&!n.contains||n.containedBy}};window.FluidTopicsFocusHelper=ws;var _s,Ns,Ms,Is,Ts=navigator.vendor&&!!navigator.vendor.match(/apple/i)||((Ms=(Ns=(_s=window.safari)===null||_s===void 0?void 0:_s.pushNotification)===null||Ns===void 0?void 0:Ns.toString())!==null&&Ms!==void 0?Ms:"")==="[object SafariRemoteNotification]",Rs="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;window.ftGlobals=(Is=window.ftGlobals)!==null&&Is!==void 0?Is:{lit:ya,litDecorators:va,litRepeat:xa,litClassMap:Sa,litStyleMap:Ea,litUnsafeHTML:Aa,wcUtils:{...La,...za,...wa,...Va,...us,...ja,...Ra,...ui,...ka,...Li,...ms,...m2,...ss,...Oi,...di,...Ii,...ds,...Ni,...gs,...ys,...R1,...Na,...zi,...Ss,...fi,...Di,...g2,...N1,...Fi,...os,...ps,...wi,..._i,...Ua,...Ha,...vs,isSafari:Ts,isTouchScreen:Rs,setVariable:O}};var S2=P``;var E2=o.extend("--ft-ripple-color","",ae.colorContent),N={color:E2,backgroundColor:o.extend("--ft-ripple-background-color","",E2),opacityContentOnSurfacePressed:o.external(ae.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:o.external(ae.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:o.external(ae.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:o.external(ae.opacityContentOnSurfaceSelected,"Design system"),borderRadius:o.create("--ft-ripple-border-radius","","SIZE","0px")},C2=o.extend("--ft-ripple-color","",ae.colorPrimary),A2={color:C2,backgroundColor:o.extend("--ft-ripple-background-color","",C2)},L2=o.extend("--ft-ripple-color","",ae.colorSecondary),O2={color:L2,backgroundColor:o.extend("--ft-ripple-background-color","",L2)},w2=P`
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/ftds-file-button",
3
- "version": "2.2.41",
3
+ "version": "2.2.43",
4
4
  "description": "The design system file button component",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,13 +19,13 @@
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.2.41",
23
- "@fluid-topics/ftds-button": "2.2.41",
24
- "@fluid-topics/ftds-icon": "2.2.41",
22
+ "@fluid-topics/ft-wc-utils": "2.2.43",
23
+ "@fluid-topics/ftds-button": "2.2.43",
24
+ "@fluid-topics/ftds-icon": "2.2.43",
25
25
  "lit": "3.3.3"
26
26
  },
27
27
  "devDependencies": {
28
- "@fluid-topics/ft-wc-test-utils": "2.2.41"
28
+ "@fluid-topics/ft-wc-test-utils": "2.2.43"
29
29
  },
30
- "gitHead": "2651e9245c0e8fe0dcb2bc475ae6c91642746e55"
30
+ "gitHead": "aeec4ca489c4004e09f3eec48d999e4199566f9a"
31
31
  }