@fluid-topics/ft-ripple 2.2.41 → 2.2.42

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
- "use strict";(()=>{var T=Object.create;var y=Object.defineProperty;var I=Object.getOwnPropertyDescriptor;var M=Object.getOwnPropertyNames;var X=Object.getPrototypeOf,Y=Object.prototype.hasOwnProperty;var v=(l,e)=>()=>{try{return e||l((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}};var G=(l,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of M(e))!Y.call(l,r)&&r!==t&&y(l,r,{get:()=>e[r],enumerable:!(o=I(e,r))||o.enumerable});return l};var f=(l,e,t)=>(t=l!=null?T(X(l)):{},G(e||!l||!l.__esModule?y(t,"default",{value:l,enumerable:!0}):t,l));var m=v((N,g)=>{g.exports=ftGlobals.wcUtils});var b=v((U,E)=>{E.exports=ftGlobals.lit});var k=v((q,C)=>{C.exports=ftGlobals.litDecorators});var F=v((Z,x)=>{x.exports=ftGlobals.litClassMap});var V=f(m());var P=f(b()),a=f(k()),$=f(F()),h=f(m());var O=f(b()),s=f(m()),L=s.FtCssVariableFactory.extend("--ft-ripple-color","",s.designSystemVariables.colorContent),u={color:L,backgroundColor:s.FtCssVariableFactory.extend("--ft-ripple-background-color","",L),opacityContentOnSurfacePressed:s.FtCssVariableFactory.external(s.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:s.FtCssVariableFactory.external(s.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:s.FtCssVariableFactory.external(s.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:s.FtCssVariableFactory.external(s.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:s.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},S=s.FtCssVariableFactory.extend("--ft-ripple-color","",s.designSystemVariables.colorPrimary),w={color:S,backgroundColor:s.FtCssVariableFactory.extend("--ft-ripple-background-color","",S)},R=s.FtCssVariableFactory.extend("--ft-ripple-color","",s.designSystemVariables.colorSecondary),D={color:R,backgroundColor:s.FtCssVariableFactory.extend("--ft-ripple-background-color","",R)},H=O.css`
1
+ "use strict";(()=>{var T=Object.create;var y=Object.defineProperty;var I=Object.getOwnPropertyDescriptor;var M=Object.getOwnPropertyNames;var X=Object.getPrototypeOf,Y=Object.prototype.hasOwnProperty;var v=(l,e)=>()=>{try{return e||l((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}};var G=(l,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of M(e))!Y.call(l,r)&&r!==t&&y(l,r,{get:()=>e[r],enumerable:!(o=I(e,r))||o.enumerable});return l};var f=(l,e,t)=>(t=l!=null?T(X(l)):{},G(e||!l||!l.__esModule?y(t,"default",{value:l,enumerable:!0}):t,l));var b=v((U,g)=>{g.exports=ftGlobals.wcUtils});var m=v((N,E)=>{E.exports=ftGlobals.lit});var k=v((q,C)=>{C.exports=ftGlobals.litDecorators});var F=v((Z,x)=>{x.exports=ftGlobals.litClassMap});var V=f(b());var P=f(m()),a=f(k()),$=f(F()),h=f(b());var O=f(m()),s=f(b()),L=s.FtCssVariableFactory.extend("--ft-ripple-color","",s.designSystemVariables.colorContent),u={color:L,backgroundColor:s.FtCssVariableFactory.extend("--ft-ripple-background-color","",L),opacityContentOnSurfacePressed:s.FtCssVariableFactory.external(s.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:s.FtCssVariableFactory.external(s.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:s.FtCssVariableFactory.external(s.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:s.FtCssVariableFactory.external(s.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:s.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},S=s.FtCssVariableFactory.extend("--ft-ripple-color","",s.designSystemVariables.colorPrimary),w={color:S,backgroundColor:s.FtCssVariableFactory.extend("--ft-ripple-background-color","",S)},R=s.FtCssVariableFactory.extend("--ft-ripple-color","",s.designSystemVariables.colorSecondary),D={color:R,backgroundColor:s.FtCssVariableFactory.extend("--ft-ripple-background-color","",R)},H=O.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:r.extend("--ftds-con
84
84
  `}resolveStatus(){return this.forceStatus?this.forceStatus:this.errorMessages.length?Ae.error:this.warningMessages.length?Ae.warning:Ae.default}}return z([I()],e.prototype,"warningRules",void 0),z([I()],e.prototype,"errorRules",void 0),z([I()],e.prototype,"validateOn",void 0),z([I({type:Boolean})],e.prototype,"validateAtRender",void 0),z([I()],e.prototype,"label",void 0),z([I({type:Boolean})],e.prototype,"hideLabel",void 0),z([I()],e.prototype,"name",void 0),z([I({type:Boolean})],e.prototype,"disabled",void 0),z([I()],e.prototype,"helperText",void 0),z([I()],e.prototype,"forceStatus",void 0),z([I({reflect:!0})],e.prototype,"value",void 0),z([D()],e.prototype,"errorMessages",void 0),z([D()],e.prototype,"warningMessages",void 0),z([D()],e.prototype,"status",void 0),z([D()],e.prototype,"focused",void 0),z([D()],e.prototype,"additionalWarningRules",void 0),z([D()],e.prototype,"additionalErrorRules",void 0),z([D()],e.prototype,"forceErrorMessages",void 0),e});var Wt=(t,e)=>{let o=t._$AN;if(o===void 0)return!1;for(let n of o)n._$AO?.(e,!1),Wt(n,e);return!0},Fr=t=>{let e,o;do{if((e=t._$AM)===void 0)break;o=e._$AN,o.delete(t),t=e}while(o?.size===0)},cc=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),$u(e)}};function Uu(t){this._$AN!==void 0?(Fr(this),this._$AM=t,cc(this)):this._$AM=t}function Bu(t,e=!1,o=0){let n=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(e)if(Array.isArray(n))for(let a=o;a<n.length;a++)Wt(n[a],!1),Fr(n[a]);else n!=null&&(Wt(n,!1),Fr(n));else Wt(this,t)}var $u=t=>{t.type==ne.CHILD&&(t._$AP??=Bu,t._$AQ??=Uu)},ft=class extends J{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,o,n){super._$AT(e,o,n),cc(this),this.isConnected=e._$AU}_$AO(e,o=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),o&&(Wt(this,e),Fr(this))}setValue(e){if(mi(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 Vn=class extends ft{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 B}update(e){return this.part=e,this.ensureFocusTrap(e.element),B}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,i;(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(),(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 o=this.getChildren(e);for(let n=0;n<o.length;n++){let i=o[n];if(i instanceof HTMLElement&&(this.attemptFocus(i)||await this.focusFirstDescendant(i)))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 i=o[n];if(i instanceof HTMLElement&&(this.attemptFocus(i)||await this.focusLastDescendant(i)))return!0}return!1}async updateCompleteIfNecessary(e){e instanceof X&&await e.updateComplete}isInsideElement(e,o){return xe(e).includes(o)}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}},Fx=K(Vn);var lc;(function(t){t.sm="sm",t.md="md",t.lg="lg",t.xl="xl"})(lc||(lc={}));var zu={sm:640,md:768,lg:1024,xl:1280},Hn=class extends ft{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,i]){return this.lastArgs=[o,n,i],this.render(o,n,i)}render(e,o,n){let i=this.resolveThreshold(e),a=n??(()=>k);return this.size>i?o():a()}resolveThreshold(e){return typeof e=="number"?e:zu[e]}},Bx=K(Hn);var Gn,We=class{static compareDeepPosition(e,o){if(e===o)return 0;let n=xe(e).reverse(),i=xe(o).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,o){let n=Gn.compareDeepPosition(e,o);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 o=0;for(let n=1;n<e.length;n++)this.domOrderSorter(e[o],e[n])>0&&(o=n);return e[o]}static getDeepActiveElement(){var e;if(!document.activeElement)return null;let o=document.activeElement;for(;!((e=o.shadowRoot)===null||e===void 0)&&e.activeElement;)o=o.shadowRoot.activeElement;return o}};Gn=We;We.domOrderSorter=(t,e)=>{if(t===e||!t?.isConnected&&!e?.isConnected)return 0;if(!e?.isConnected)return-1;if(!t?.isConnected)return 1;let{preceding:o,following:n,contains:i,containedBy:a}=Gn.compareDocumentPosition(t,e);return o||i?1:n||a?-1:0};var Wn=class t{static autoFocus(e){t.allowAutoFocus(e)&&e.focus()}static allowAutoFocus(e){if(jn)return!1;let o=We.getDeepActiveElement();if(!o)return!0;let n=We.compareDocumentPosition(o,e);return n.disconnected||n.implementationSpecific?!1:n.preceding&&!n.contains||n.containedBy}};window.FluidTopicsFocusHelper=Wn;var Kn,Zn,qn,Yn,Vu=navigator.vendor&&!!navigator.vendor.match(/apple/i)||((qn=(Zn=(Kn=window.safari)===null||Kn===void 0?void 0:Kn.pushNotification)===null||Zn===void 0?void 0:Zn.toString())!==null&&qn!==void 0?qn:"")==="[object SafariRemoteNotification]",jn="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;window.ftGlobals=(Yn=window.ftGlobals)!==null&&Yn!==void 0?Yn:{lit:Kr,litDecorators:Zr,litRepeat:qr,litClassMap:Xr,litStyleMap:Jr,litUnsafeHTML:Qr,wcUtils:{...eo,...fo,...ro,...So,...In,...Oo,...oo,..._o,...uo,...$o,...kn,...nc,...An,...zo,...wo,...Ko,..._n,...Wo,...Pn,...Fn,...gs,...ao,...qo,...Bn,...Ro,...Yo,...ic,...xs,...Jo,...Sn,...Nn,...Vo,...Go,...yo,...xo,...Mn,isSafari:Vu,isTouchScreen:jn,setVariable:tt}};var dc=r.extend("--ft-ripple-color","",pe.colorContent),je={color:dc,backgroundColor:r.extend("--ft-ripple-background-color","",dc),opacityContentOnSurfacePressed:r.external(pe.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:r.external(pe.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:r.external(pe.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:r.external(pe.opacityContentOnSurfaceSelected,"Design system"),borderRadius:r.create("--ft-ripple-border-radius","","SIZE","0px")},uc=r.extend("--ft-ripple-color","",pe.colorPrimary),pc={color:uc,backgroundColor:r.extend("--ft-ripple-background-color","",uc)},fc=r.extend("--ft-ripple-color","",pe.colorSecondary),hc={color:fc,backgroundColor:r.extend("--ft-ripple-background-color","",fc)},mc=F`
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 {
@@ -24,6 +24,8 @@ export const FtRippleSecondaryCssVariables = {
24
24
  export const styles = css `
25
25
  :host {
26
26
  display: contents;
27
+ /* Chrome 153+ UA stylesheet hides [unbounded]:not(:unbounded) elements (crbug.com/579043456) */
28
+ visibility: inherit;
27
29
  }
28
30
 
29
31
  .ft-ripple {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-ripple",
3
- "version": "2.2.41",
3
+ "version": "2.2.42",
4
4
  "description": "A custom Fluid Topics ripple component",
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.2.41",
22
+ "@fluid-topics/ft-wc-utils": "2.2.42",
23
23
  "lit": "3.3.3"
24
24
  },
25
- "gitHead": "2651e9245c0e8fe0dcb2bc475ae6c91642746e55"
25
+ "gitHead": "f5637f426d465b9be9f8a4aa73c6f3016cbe748c"
26
26
  }