@fluid-topics/ft-radio 0.3.19 → 0.3.20
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.
- package/build/ft-radio.light.js +83 -83
- package/build/ft-radio.min.js +122 -123
- package/package.json +5 -5
package/build/ft-radio.light.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(t,i,e,o,s){const r=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorContent),n=r,h=i.FtCssVariableFactory.extend("--ft-ripple-background-color",r),
|
|
1
|
+
!function(t,i,e,o,s){const r=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorContent),n=r,h=i.FtCssVariableFactory.extend("--ft-ripple-background-color",r),p=i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),l=i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),a=i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),f=i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),d=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorPrimary),c=d,y=i.FtCssVariableFactory.extend("--ft-ripple-background-color",d),u=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorSecondary),g=u,v=i.FtCssVariableFactory.extend("--ft-ripple-background-color",u),b=e.css`
|
|
2
2
|
:host {
|
|
3
3
|
display: contents;
|
|
4
4
|
}
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
75
|
-
opacity: ${
|
|
75
|
+
opacity: ${l};
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
87
|
-
opacity: ${
|
|
87
|
+
opacity: ${p};
|
|
88
88
|
transform: translate(-50%, -50%) scale(1);
|
|
89
89
|
}
|
|
90
90
|
`;var $,m=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,h=t.length-1;h>=0;h--)(s=t[h])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class x extends i.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new i.Debouncer(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var i,e;let{x:o,y:s}=this.getCoordinates(t),r=null!==(e=null===(i=this.ripple)||void 0===i?void 0:i.getBoundingClientRect())&&void 0!==e?e:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-r.x:r.width/2),this.originY=Math.round(null!=s?s-r.y:r.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return e.html`
|
|
@@ -104,115 +104,115 @@
|
|
|
104
104
|
<div class="ft-ripple--background"></div>
|
|
105
105
|
<div class="ft-ripple--effect"></div>
|
|
106
106
|
</div>
|
|
107
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var i,e;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(i=this.target)||void 0===i||i.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(i),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const i=(...t)=>i=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(i)},e=i("mouseup","contextmenu"),o=i("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&i("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",e),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",e),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const i=t,e=t;let o,s;return null!=i.x?({x:o,y:s}=i):null!=e.touches&&(o=e.touches[0].clientX,s=e.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let i of t.composedPath()){if(i===this.target)break;if("hasAttribute"in i&&i.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}x.elementDefinitions={},x.styles=b,m([o.property({type:Boolean})],x.prototype,"primary",void 0),m([o.property({type:Boolean})],x.prototype,"secondary",void 0),m([o.property({type:Boolean})],x.prototype,"unbounded",void 0),m([o.property({type:Boolean})],x.prototype,"activated",void 0),m([o.property({type:Boolean})],x.prototype,"selected",void 0),m([o.property({type:Boolean})],x.prototype,"disabled",void 0),m([o.state()],x.prototype,"hovered",void 0),m([o.state()],x.prototype,"focused",void 0),m([o.state()],x.prototype,"pressed",void 0),m([o.state()],x.prototype,"rippling",void 0),m([o.state()],x.prototype,"rippleSize",void 0),m([o.state()],x.prototype,"originX",void 0),m([o.state()],x.prototype,"originY",void 0),m([o.query(".ft-ripple")],x.prototype,"ripple",void 0),m([o.query(".ft-ripple--effect")],x.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(x);const w=globalThis.trustedTypes,k=w?w.createPolicy("lit-html",{createHTML:t=>t}):void 0,z=`lit$${(Math.random()+"").slice(9)}$`,A="?"+z,C=`<${A}>`,_=document,O=(t="")=>_.createComment(t),S=t=>null===t||"object"!=typeof t&&"function"!=typeof t,j=Array.isArray,E=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,N=/-->/g,D=/>/g,T=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),B=/'/g,R=/"/g,M=/^(?:script|style|textarea|title)$/i,I=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),U=Symbol.for("lit-noChange"),P=Symbol.for("lit-nothing"),F=new WeakMap,G=_.createTreeWalker(_,129,null,!1),W=(t,i)=>{const e=t.length-1,o=[];let s,r=2===i?"<svg>":"",n=E;for(let i=0;i<e;i++){const e=t[i];let h,l,p=-1,a=0;for(;a<e.length&&(n.lastIndex=a,l=n.exec(e),null!==l);)a=n.lastIndex,n===E?"!--"===l[1]?n=N:void 0!==l[1]?n=D:void 0!==l[2]?(M.test(l[2])&&(s=RegExp("</"+l[2],"g")),n=T):void 0!==l[3]&&(n=T):n===T?">"===l[0]?(n=null!=s?s:E,p=-1):void 0===l[1]?p=-2:(p=n.lastIndex-l[2].length,h=l[1],n=void 0===l[3]?T:'"'===l[3]?R:B):n===R||n===B?n=T:n===N||n===D?n=E:(n=T,s=void 0);const f=n===T&&t[i+1].startsWith("/>")?" ":"";r+=n===E?e+C:p>=0?(o.push(h),e.slice(0,p)+"$lit$"+e.slice(p)+z+f):e+z+(-2===p?(o.push(void 0),i):f)}const h=r+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==k?k.createHTML(h):h,o]};class Z{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let s=0,r=0;const n=t.length-1,h=this.parts,[l,p]=W(t,i);if(this.el=Z.createElement(l,e),G.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=G.nextNode())&&h.length<n;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(z)){const e=p[r++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split(z),i=/([.?@])?(.*)/.exec(e);h.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?X:"?"===i[1]?q:"@"===i[1]?J:V})}else h.push({type:6,index:s})}for(const i of t)o.removeAttribute(i)}if(M.test(o.tagName)){const t=o.textContent.split(z),i=t.length-1;if(i>0){o.textContent=w?w.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],O()),G.nextNode(),h.push({type:2,index:++s});o.append(t[i],O())}}}else if(8===o.nodeType)if(o.data===A)h.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(z,t+1));)h.push({type:7,index:s}),t+=z.length-1}s++}}static createElement(t,i){const e=_.createElement("template");return e.innerHTML=t,e}}function K(t,i,e=t,o){var s,r,n,h;if(i===U)return i;let l=void 0!==o?null===(s=e._$Cl)||void 0===s?void 0:s[o]:e._$Cu;const p=S(i)?void 0:i._$litDirective$;return(null==l?void 0:l.constructor)!==p&&(null===(r=null==l?void 0:l._$AO)||void 0===r||r.call(l,!1),void 0===p?l=void 0:(l=new p(t),l._$AT(t,e,o)),void 0!==o?(null!==(n=(h=e)._$Cl)&&void 0!==n?n:h._$Cl=[])[o]=l:e._$Cu=l),void 0!==l&&(i=K(t,l._$AS(t,i.values),l,o)),i}class H{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:e},parts:o}=this._$AD,s=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:_).importNode(e,!0);G.currentNode=s;let r=G.nextNode(),n=0,h=0,l=o[0];for(;void 0!==l;){if(n===l.index){let i;2===l.type?i=new L(r,r.nextSibling,this,t):1===l.type?i=new l.ctor(r,l.name,l.strings,this,t):6===l.type&&(i=new Q(r,this,t)),this.v.push(i),l=o[++h]}n!==(null==l?void 0:l.index)&&(r=G.nextNode(),n++)}return s}m(t){let i=0;for(const e of this.v)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class L{constructor(t,i,e,o){var s;this.type=2,this._$AH=P,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$C_=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$C_}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=K(this,t,i),S(t)?t===P||null==t||""===t?(this._$AH!==P&&this._$AR(),this._$AH=P):t!==this._$AH&&t!==U&&this.T(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.k(t):(t=>j(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.S(t):this.T(t)}j(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.j(t))}T(t){this._$AH!==P&&S(this._$AH)?this._$AA.nextSibling.data=t:this.k(_.createTextNode(t)),this._$AH=t}$(t){var i;const{values:e,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=Z.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===s)this._$AH.m(e);else{const t=new H(s,this),i=t.p(this.options);t.m(e),this.k(i),this._$AH=t}}_$AC(t){let i=F.get(t.strings);return void 0===i&&F.set(t.strings,i=new Z(t)),i}S(t){j(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const s of t)o===i.length?i.push(e=new L(this.j(O()),this.j(O()),this,this.options)):e=i[o],e._$AI(s),o++;o<i.length&&(this._$AR(e&&e._$AB.nextSibling,o),i.length=o)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$C_=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class V{constructor(t,i,e,o,s){this.type=1,this._$AH=P,this._$AN=void 0,this.element=t,this.name=i,this._$AM=o,this.options=s,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=P}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const s=this.strings;let r=!1;if(void 0===s)t=K(this,t,i,0),r=!S(t)||t!==this._$AH&&t!==U,r&&(this._$AH=t);else{const o=t;let n,h;for(t=s[0],n=0;n<s.length-1;n++)h=K(this,o[e+n],i,n),h===U&&(h=this._$AH[n]),r||(r=!S(h)||h!==this._$AH[n]),h===P?t=P:t!==P&&(t+=(null!=h?h:"")+s[n+1]),this._$AH[n]=h}r&&!o&&this.P(t)}P(t){t===P?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class X extends V{constructor(){super(...arguments),this.type=3}P(t){this.element[this.name]=t===P?void 0:t}}const Y=w?w.emptyScript:"";class q extends V{constructor(){super(...arguments),this.type=4}P(t){t&&t!==P?this.element.setAttribute(this.name,Y):this.element.removeAttribute(this.name)}}class J extends V{constructor(t,i,e,o,s){super(t,i,e,o,s),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=K(this,t,i,0))&&void 0!==e?e:P)===U)return;const o=this._$AH,s=t===P&&o!==P||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==P&&(o===P||s);s&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class Q{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){K(this,t)}}const tt=window.litHtmlPolyfillSupport;null==tt||tt(Z,L),(null!==($=globalThis.litHtmlVersions)&&void 0!==$?$:globalThis.litHtmlVersions=[]).push("2.2.7");
|
|
107
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var i,e;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(i=this.target)||void 0===i||i.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(i),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const i=(...t)=>i=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(i)},e=i("mouseup","contextmenu"),o=i("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&i("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",e),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",e),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const i=t,e=t;let o,s;return null!=i.x?({x:o,y:s}=i):null!=e.touches&&(o=e.touches[0].clientX,s=e.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let i of t.composedPath()){if(i===this.target)break;if("hasAttribute"in i&&i.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}x.elementDefinitions={},x.styles=b,m([o.property({type:Boolean})],x.prototype,"primary",void 0),m([o.property({type:Boolean})],x.prototype,"secondary",void 0),m([o.property({type:Boolean})],x.prototype,"unbounded",void 0),m([o.property({type:Boolean})],x.prototype,"activated",void 0),m([o.property({type:Boolean})],x.prototype,"selected",void 0),m([o.property({type:Boolean})],x.prototype,"disabled",void 0),m([o.state()],x.prototype,"hovered",void 0),m([o.state()],x.prototype,"focused",void 0),m([o.state()],x.prototype,"pressed",void 0),m([o.state()],x.prototype,"rippling",void 0),m([o.state()],x.prototype,"rippleSize",void 0),m([o.state()],x.prototype,"originX",void 0),m([o.state()],x.prototype,"originY",void 0),m([o.query(".ft-ripple")],x.prototype,"ripple",void 0),m([o.query(".ft-ripple--effect")],x.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(x);const w=window,k=w.trustedTypes,z=k?k.createPolicy("lit-html",{createHTML:t=>t}):void 0,A=`lit$${(Math.random()+"").slice(9)}$`,C="?"+A,O=`<${C}>`,_=document,j=(t="")=>_.createComment(t),S=t=>null===t||"object"!=typeof t&&"function"!=typeof t,E=Array.isArray,N=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,D=/-->/g,B=/>/g,R=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),M=/'/g,I=/"/g,T=/^(?:script|style|textarea|title)$/i,U=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),F=Symbol.for("lit-noChange"),G=Symbol.for("lit-nothing"),W=new WeakMap,Z=_.createTreeWalker(_,129,null,!1),K=(t,i)=>{const e=t.length-1,o=[];let s,r=2===i?"<svg>":"",n=N;for(let i=0;i<e;i++){const e=t[i];let h,p,l=-1,a=0;for(;a<e.length&&(n.lastIndex=a,p=n.exec(e),null!==p);)a=n.lastIndex,n===N?"!--"===p[1]?n=D:void 0!==p[1]?n=B:void 0!==p[2]?(T.test(p[2])&&(s=RegExp("</"+p[2],"g")),n=R):void 0!==p[3]&&(n=R):n===R?">"===p[0]?(n=null!=s?s:N,l=-1):void 0===p[1]?l=-2:(l=n.lastIndex-p[2].length,h=p[1],n=void 0===p[3]?R:'"'===p[3]?I:M):n===I||n===M?n=R:n===D||n===B?n=N:(n=R,s=void 0);const f=n===R&&t[i+1].startsWith("/>")?" ":"";r+=n===N?e+O:l>=0?(o.push(h),e.slice(0,l)+"$lit$"+e.slice(l)+A+f):e+A+(-2===l?(o.push(void 0),i):f)}const h=r+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==z?z.createHTML(h):h,o]};class H{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let s=0,r=0;const n=t.length-1,h=this.parts,[p,l]=K(t,i);if(this.el=H.createElement(p,e),Z.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=Z.nextNode())&&h.length<n;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(A)){const e=l[r++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split(A),i=/([.?@])?(.*)/.exec(e);h.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?Y:"?"===i[1]?J:"@"===i[1]?Q:X})}else h.push({type:6,index:s})}for(const i of t)o.removeAttribute(i)}if(T.test(o.tagName)){const t=o.textContent.split(A),i=t.length-1;if(i>0){o.textContent=k?k.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],j()),Z.nextNode(),h.push({type:2,index:++s});o.append(t[i],j())}}}else if(8===o.nodeType)if(o.data===C)h.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(A,t+1));)h.push({type:7,index:s}),t+=A.length-1}s++}}static createElement(t,i){const e=_.createElement("template");return e.innerHTML=t,e}}function L(t,i,e=t,o){var s,r,n,h;if(i===F)return i;let p=void 0!==o?null===(s=e._$Co)||void 0===s?void 0:s[o]:e._$Cl;const l=S(i)?void 0:i._$litDirective$;return(null==p?void 0:p.constructor)!==l&&(null===(r=null==p?void 0:p._$AO)||void 0===r||r.call(p,!1),void 0===l?p=void 0:(p=new l(t),p._$AT(t,e,o)),void 0!==o?(null!==(n=(h=e)._$Co)&&void 0!==n?n:h._$Co=[])[o]=p:e._$Cl=p),void 0!==p&&(i=L(t,p._$AS(t,i.values),p,o)),i}class P{constructor(t,i){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var i;const{el:{content:e},parts:o}=this._$AD,s=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:_).importNode(e,!0);Z.currentNode=s;let r=Z.nextNode(),n=0,h=0,p=o[0];for(;void 0!==p;){if(n===p.index){let i;2===p.type?i=new V(r,r.nextSibling,this,t):1===p.type?i=new p.ctor(r,p.name,p.strings,this,t):6===p.type&&(i=new tt(r,this,t)),this.u.push(i),p=o[++h]}n!==(null==p?void 0:p.index)&&(r=Z.nextNode(),n++)}return s}p(t){let i=0;for(const e of this.u)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class V{constructor(t,i,e,o){var s;this.type=2,this._$AH=G,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cm=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=L(this,t,i),S(t)?t===G||null==t||""===t?(this._$AH!==G&&this._$AR(),this._$AH=G):t!==this._$AH&&t!==F&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>E(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==G&&S(this._$AH)?this._$AA.nextSibling.data=t:this.T(_.createTextNode(t)),this._$AH=t}$(t){var i;const{values:e,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=H.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===s)this._$AH.p(e);else{const t=new P(s,this),i=t.v(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let i=W.get(t.strings);return void 0===i&&W.set(t.strings,i=new H(t)),i}k(t){E(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const s of t)o===i.length?i.push(e=new V(this.O(j()),this.O(j()),this,this.options)):e=i[o],e._$AI(s),o++;o<i.length&&(this._$AR(e&&e._$AB.nextSibling,o),i.length=o)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cm=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class X{constructor(t,i,e,o,s){this.type=1,this._$AH=G,this._$AN=void 0,this.element=t,this.name=i,this._$AM=o,this.options=s,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=G}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const s=this.strings;let r=!1;if(void 0===s)t=L(this,t,i,0),r=!S(t)||t!==this._$AH&&t!==F,r&&(this._$AH=t);else{const o=t;let n,h;for(t=s[0],n=0;n<s.length-1;n++)h=L(this,o[e+n],i,n),h===F&&(h=this._$AH[n]),r||(r=!S(h)||h!==this._$AH[n]),h===G?t=G:t!==G&&(t+=(null!=h?h:"")+s[n+1]),this._$AH[n]=h}r&&!o&&this.j(t)}j(t){t===G?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class Y extends X{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===G?void 0:t}}const q=k?k.emptyScript:"";class J extends X{constructor(){super(...arguments),this.type=4}j(t){t&&t!==G?this.element.setAttribute(this.name,q):this.element.removeAttribute(this.name)}}class Q extends X{constructor(t,i,e,o,s){super(t,i,e,o,s),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=L(this,t,i,0))&&void 0!==e?e:G)===F)return;const o=this._$AH,s=t===G&&o!==G||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==G&&(o===G||s);s&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class tt{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){L(this,t)}}const it=w.litHtmlPolyfillSupport;null==it||it(H,V),(null!==($=w.litHtmlVersions)&&void 0!==$?$:w.litHtmlVersions=[]).push("2.4.0");
|
|
108
108
|
/**
|
|
109
109
|
* @license
|
|
110
110
|
* Copyright 2020 Google LLC
|
|
111
111
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
112
112
|
*/
|
|
113
|
-
const
|
|
113
|
+
const et=Symbol.for(""),ot=t=>{if((null==t?void 0:t.r)===et)return null==t?void 0:t._$litStatic$},st=t=>({_$litStatic$:t,r:et}),rt=new Map,nt=(t=>(i,...e)=>{const o=e.length;let s,r;const n=[],h=[];let p,l=0,a=!1;for(;l<o;){for(p=i[l];l<o&&void 0!==(r=e[l],s=ot(r));)p+=s+i[++l],a=!0;h.push(r),n.push(p),l++}if(l===o&&n.push(i[o]),a){const t=n.join("$$lit$$");void 0===(i=rt.get(t))&&(n.raw=n,rt.set(t,i=n)),e=h}return t(i,...e)})(U);var ht;!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(ht||(ht={}));const pt=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),lt=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),at={fontFamily:lt,fontSize:i.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:i.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:i.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:i.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:i.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},ft=i.FtCssVariableFactory.extend("--ft-typography-title-font-family",pt),dt=i.FtCssVariableFactory.extend("--ft-typography-title-font-size",at.fontSize,"20px"),ct=i.FtCssVariableFactory.extend("--ft-typography-title-font-weight",at.fontWeight,"normal"),yt=i.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",at.letterSpacing,"0.15px"),ut=i.FtCssVariableFactory.extend("--ft-typography-title-line-height",at.lineHeight,"1.2"),gt=i.FtCssVariableFactory.extend("--ft-typography-title-text-transform",at.textTransform,"inherit"),vt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",pt),bt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",at.fontSize,"14px"),$t=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",at.fontWeight,"normal"),mt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",at.letterSpacing,"0.105px"),xt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",at.lineHeight,"1.7"),wt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",at.textTransform,"inherit"),kt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",lt),zt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",at.fontSize,"16px"),At=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",at.fontWeight,"600"),Ct=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",at.letterSpacing,"0.144px"),Ot=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",at.lineHeight,"1.5"),_t=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",at.textTransform,"inherit"),jt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",lt),St=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",at.fontSize,"14px"),Et=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",at.fontWeight,"normal"),Nt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",at.letterSpacing,"0.098px"),Dt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",at.lineHeight,"1.7"),Bt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",at.textTransform,"inherit"),Rt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-family",lt),Mt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-size",at.fontSize,"16px"),It=i.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",at.fontWeight,"normal"),Tt=i.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",at.letterSpacing,"0.496px"),Ut=i.FtCssVariableFactory.extend("--ft-typography-body1-line-height",at.lineHeight,"1.5"),Ft=i.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",at.textTransform,"inherit"),Gt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-family",lt),Wt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-size",at.fontSize,"14px"),Zt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",at.fontWeight,"normal"),Kt=i.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",at.letterSpacing,"0.252px"),Ht=i.FtCssVariableFactory.extend("--ft-typography-body2-line-height",at.lineHeight,"1.4"),Lt=i.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",at.textTransform,"inherit"),Pt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-family",lt),Vt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-size",at.fontSize,"12px"),Xt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",at.fontWeight,"normal"),Yt=i.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",at.letterSpacing,"0.396px"),qt=i.FtCssVariableFactory.extend("--ft-typography-caption-line-height",at.lineHeight,"1.33"),Jt=i.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",at.textTransform,"inherit"),Qt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",lt),ti=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",at.fontSize,"10px"),ii=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",at.fontWeight,"normal"),ei=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",at.letterSpacing,"0.33px"),oi=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",at.lineHeight,"1.6"),si=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",at.textTransform,"inherit"),ri=i.FtCssVariableFactory.extend("--ft-typography-overline-font-family",lt),ni=i.FtCssVariableFactory.extend("--ft-typography-overline-font-size",at.fontSize,"10px"),hi=i.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",at.fontWeight,"normal"),pi=i.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",at.letterSpacing,"1.5px"),li=i.FtCssVariableFactory.extend("--ft-typography-overline-line-height",at.lineHeight,"1.6"),ai=i.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",at.textTransform,"uppercase"),fi=i.FtCssVariableFactory.extend("--ft-typography-button-font-family",lt),di=i.FtCssVariableFactory.extend("--ft-typography-button-font-size",at.fontSize,"14px"),ci=i.FtCssVariableFactory.extend("--ft-typography-button-font-weight",at.fontWeight,"600"),yi=i.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",at.letterSpacing,"1.246px"),ui=i.FtCssVariableFactory.extend("--ft-typography-button-line-height",at.lineHeight,"1.15"),gi=i.FtCssVariableFactory.extend("--ft-typography-button-text-transform",at.textTransform,"uppercase"),vi=e.css`
|
|
114
114
|
.ft-typography--title {
|
|
115
|
-
font-family: ${
|
|
116
|
-
font-size: ${
|
|
117
|
-
font-weight: ${
|
|
118
|
-
letter-spacing: ${
|
|
119
|
-
line-height: ${
|
|
120
|
-
text-transform: ${
|
|
121
|
-
}
|
|
122
|
-
`,vi=e.css`
|
|
123
|
-
.ft-typography--title-dense {
|
|
124
|
-
font-family: ${gt};
|
|
125
|
-
font-size: ${vt};
|
|
126
|
-
font-weight: ${bt};
|
|
127
|
-
letter-spacing: ${$t};
|
|
128
|
-
line-height: ${mt};
|
|
129
|
-
text-transform: ${xt};
|
|
115
|
+
font-family: ${ft};
|
|
116
|
+
font-size: ${dt};
|
|
117
|
+
font-weight: ${ct};
|
|
118
|
+
letter-spacing: ${yt};
|
|
119
|
+
line-height: ${ut};
|
|
120
|
+
text-transform: ${gt};
|
|
130
121
|
}
|
|
131
122
|
`,bi=e.css`
|
|
123
|
+
.ft-typography--title-dense {
|
|
124
|
+
font-family: ${vt};
|
|
125
|
+
font-size: ${bt};
|
|
126
|
+
font-weight: ${$t};
|
|
127
|
+
letter-spacing: ${mt};
|
|
128
|
+
line-height: ${xt};
|
|
129
|
+
text-transform: ${wt};
|
|
130
|
+
}
|
|
131
|
+
`,$i=e.css`
|
|
132
132
|
.ft-typography--subtitle1 {
|
|
133
|
-
font-family: ${
|
|
134
|
-
font-size: ${
|
|
135
|
-
font-weight: ${
|
|
136
|
-
letter-spacing: ${
|
|
137
|
-
line-height: ${
|
|
133
|
+
font-family: ${kt};
|
|
134
|
+
font-size: ${zt};
|
|
135
|
+
font-weight: ${At};
|
|
136
|
+
letter-spacing: ${Ct};
|
|
137
|
+
line-height: ${Ot};
|
|
138
138
|
text-transform: ${_t};
|
|
139
139
|
}
|
|
140
|
-
|
|
140
|
+
`,mi=e.css`
|
|
141
141
|
.ft-typography--subtitle2 {
|
|
142
|
-
font-family: ${
|
|
142
|
+
font-family: ${jt};
|
|
143
143
|
font-size: ${St};
|
|
144
|
-
font-weight: ${
|
|
145
|
-
letter-spacing: ${
|
|
146
|
-
line-height: ${
|
|
147
|
-
text-transform: ${
|
|
144
|
+
font-weight: ${Et};
|
|
145
|
+
letter-spacing: ${Nt};
|
|
146
|
+
line-height: ${Dt};
|
|
147
|
+
text-transform: ${Bt};
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
`,
|
|
150
|
+
`,xi=e.css`
|
|
151
151
|
.ft-typography--body1 {
|
|
152
|
-
font-family: ${
|
|
153
|
-
font-size: ${
|
|
154
|
-
font-weight: ${
|
|
155
|
-
letter-spacing: ${
|
|
156
|
-
line-height: ${
|
|
157
|
-
text-transform: ${
|
|
152
|
+
font-family: ${Rt};
|
|
153
|
+
font-size: ${Mt};
|
|
154
|
+
font-weight: ${It};
|
|
155
|
+
letter-spacing: ${Tt};
|
|
156
|
+
line-height: ${Ut};
|
|
157
|
+
text-transform: ${Ft};
|
|
158
158
|
}
|
|
159
|
-
`,
|
|
159
|
+
`,wi=e.css`
|
|
160
160
|
.ft-typography--body2 {
|
|
161
|
-
font-family: ${
|
|
162
|
-
font-size: ${
|
|
163
|
-
font-weight: ${
|
|
164
|
-
letter-spacing: ${
|
|
165
|
-
line-height: ${
|
|
166
|
-
text-transform: ${
|
|
161
|
+
font-family: ${Gt};
|
|
162
|
+
font-size: ${Wt};
|
|
163
|
+
font-weight: ${Zt};
|
|
164
|
+
letter-spacing: ${Kt};
|
|
165
|
+
line-height: ${Ht};
|
|
166
|
+
text-transform: ${Lt};
|
|
167
167
|
}
|
|
168
|
-
`,
|
|
168
|
+
`,ki=e.css`
|
|
169
169
|
.ft-typography--caption {
|
|
170
|
-
font-family: ${
|
|
171
|
-
font-size: ${
|
|
172
|
-
font-weight: ${
|
|
173
|
-
letter-spacing: ${
|
|
174
|
-
line-height: ${
|
|
175
|
-
text-transform: ${
|
|
170
|
+
font-family: ${Pt};
|
|
171
|
+
font-size: ${Vt};
|
|
172
|
+
font-weight: ${Xt};
|
|
173
|
+
letter-spacing: ${Yt};
|
|
174
|
+
line-height: ${qt};
|
|
175
|
+
text-transform: ${Jt};
|
|
176
176
|
}
|
|
177
|
-
`,
|
|
177
|
+
`,zi=e.css`
|
|
178
178
|
.ft-typography--breadcrumb {
|
|
179
|
-
font-family: ${
|
|
180
|
-
font-size: ${
|
|
181
|
-
font-weight: ${
|
|
182
|
-
letter-spacing: ${
|
|
183
|
-
line-height: ${
|
|
184
|
-
text-transform: ${
|
|
179
|
+
font-family: ${Qt};
|
|
180
|
+
font-size: ${ti};
|
|
181
|
+
font-weight: ${ii};
|
|
182
|
+
letter-spacing: ${ei};
|
|
183
|
+
line-height: ${oi};
|
|
184
|
+
text-transform: ${si};
|
|
185
185
|
}
|
|
186
|
-
`,
|
|
186
|
+
`,Ai=e.css`
|
|
187
187
|
.ft-typography--overline {
|
|
188
|
-
font-family: ${
|
|
189
|
-
font-size: ${
|
|
190
|
-
font-weight: ${
|
|
191
|
-
letter-spacing: ${
|
|
188
|
+
font-family: ${ri};
|
|
189
|
+
font-size: ${ni};
|
|
190
|
+
font-weight: ${hi};
|
|
191
|
+
letter-spacing: ${pi};
|
|
192
192
|
line-height: ${li};
|
|
193
|
-
text-transform: ${
|
|
194
|
-
}
|
|
195
|
-
`,Ai=e.css`
|
|
196
|
-
.ft-typography--button {
|
|
197
|
-
font-family: ${ai};
|
|
198
|
-
font-size: ${fi};
|
|
199
|
-
font-weight: ${di};
|
|
200
|
-
letter-spacing: ${ci};
|
|
201
|
-
line-height: ${yi};
|
|
202
|
-
text-transform: ${ui};
|
|
193
|
+
text-transform: ${ai};
|
|
203
194
|
}
|
|
204
195
|
`,Ci=e.css`
|
|
196
|
+
.ft-typography--button {
|
|
197
|
+
font-family: ${fi};
|
|
198
|
+
font-size: ${di};
|
|
199
|
+
font-weight: ${ci};
|
|
200
|
+
letter-spacing: ${yi};
|
|
201
|
+
line-height: ${ui};
|
|
202
|
+
text-transform: ${gi};
|
|
203
|
+
}
|
|
204
|
+
`,Oi=e.css`
|
|
205
205
|
.ft-typography {
|
|
206
206
|
vertical-align: inherit;
|
|
207
207
|
}
|
|
208
|
-
`;var _i=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,h=t.length-1;h>=0;h--)(s=t[h])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class
|
|
209
|
-
<${
|
|
208
|
+
`;var _i=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,h=t.length-1;h>=0;h--)(s=t[h])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class ji extends i.FtLitElement{constructor(){super(...arguments),this.variant=ht.body1}render(){return this.element?nt`
|
|
209
|
+
<${st(this.element)}
|
|
210
210
|
class="ft-typography ft-typography--${this.variant}">
|
|
211
211
|
<slot></slot>
|
|
212
|
-
</${
|
|
213
|
-
`:
|
|
212
|
+
</${st(this.element)}>
|
|
213
|
+
`:nt`
|
|
214
214
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
215
|
-
`}}
|
|
215
|
+
`}}ji.styles=[vi,bi,$i,mi,xi,wi,ki,zi,Ai,Ci,Oi],_i([o.property()],ji.prototype,"element",void 0),_i([o.property()],ji.prototype,"variant",void 0),i.customElement("ft-typography")(ji);const Si={textColor:i.FtCssVariableFactory.extend("--ft-radio-text-color",i.designSystemVariables.colorOnSurfaceHigh),colorPrimary:i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),colorOnPrimary:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnPrimary,"Design system"),borderColor:i.FtCssVariableFactory.extend("--ft-radio-border-color",i.designSystemVariables.colorOnSurfaceMedium),colorOnSurfaceDisabled:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceDisabled,"Design system")},Ei=e.css`
|
|
216
216
|
* {
|
|
217
217
|
box-sizing: border-box;
|
|
218
218
|
}
|
|
@@ -291,7 +291,7 @@ const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void
|
|
|
291
291
|
.ft-radio--disabled .ft-radio--box:after {
|
|
292
292
|
background-color: ${Si.colorOnSurfaceDisabled};
|
|
293
293
|
}
|
|
294
|
-
`;var
|
|
294
|
+
`;var Ni=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,h=t.length-1;h>=0;h--)(s=t[h])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class Di extends CustomEvent{constructor(t,i){super("change",{detail:{value:t,checked:i},bubbles:!0,composed:!0})}}class Bi extends i.FtLitElement{constructor(){super(...arguments),this.value="",this.name="",this.checked=!1,this.disabled=!1}render(){const t={"ft-radio":!0,"ft-radio--checked":this.checked,"ft-radio--disabled":this.disabled};return e.html`
|
|
295
295
|
<div class="${s.classMap(t)}">
|
|
296
296
|
<div class="ft-radio--box-container">
|
|
297
297
|
<ft-ripple
|
|
@@ -316,14 +316,14 @@ const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void
|
|
|
316
316
|
</ft-typography>
|
|
317
317
|
</label>
|
|
318
318
|
</div>
|
|
319
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new
|
|
319
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new Di(this.value,this.checked))}contentAvailableCallback(t){var i;super.contentAvailableCallback(t),null===(i=this.ripple)||void 0===i||i.setupFor(this.container)}select(){this.checked=!0,this.dispatchEvent(new Di(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}Bi.elementDefinitions={"ft-ripple":x,"ft-typography":ji},Bi.styles=Ei,Ni([o.property()],Bi.prototype,"value",void 0),Ni([o.property()],Bi.prototype,"name",void 0),Ni([o.property({type:Boolean,reflect:!0})],Bi.prototype,"checked",void 0),Ni([o.property({type:Boolean})],Bi.prototype,"disabled",void 0),Ni([o.query(".ft-radio")],Bi.prototype,"container",void 0),Ni([o.query("ft-ripple")],Bi.prototype,"ripple",void 0),Ni([o.query("input")],Bi.prototype,"input",void 0);const Ri=e.css`
|
|
320
320
|
:host {
|
|
321
321
|
display: contents;
|
|
322
322
|
}
|
|
323
|
-
`;var
|
|
323
|
+
`;var Mi=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,h=t.length-1;h>=0;h--)(s=t[h])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class Ii extends i.FtLitElement{constructor(){super(...arguments),this.name=""}render(){return e.html`
|
|
324
324
|
<slot @slotchange=${this.onSlotChange}
|
|
325
325
|
@change=${this.onChange}
|
|
326
326
|
@keydown=${this.onKeyDown}
|
|
327
327
|
@focusin=${this.focusCurrentValue}
|
|
328
328
|
></slot>
|
|
329
|
-
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((i=>i.checked=t.detail.value===i.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.focusCurrentValue()}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let i=this.findFtRadio(t),e=this.radioButtons.indexOf(i)-1;this.radioButtons[e<0?this.radioButtons.length-1:e].select();break}case"ArrowDown":case"ArrowRight":{let i=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[i>this.radioButtons.length-1?0:i].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}focusCurrentValue(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}
|
|
329
|
+
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((i=>i.checked=t.detail.value===i.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.focusCurrentValue()}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let i=this.findFtRadio(t),e=this.radioButtons.indexOf(i)-1;this.radioButtons[e<0?this.radioButtons.length-1:e].select();break}case"ArrowDown":case"ArrowRight":{let i=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[i>this.radioButtons.length-1?0:i].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}focusCurrentValue(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}Ii.elementDefinitions={},Ii.styles=Ri,Mi([o.property()],Ii.prototype,"name",void 0),Mi([o.queryAssignedElements()],Ii.prototype,"radioButtons",void 0),i.customElement("ft-radio")(Bi),i.customElement("ft-radio-group")(Ii),t.FtRadio=Bi,t.FtRadioChangeEvent=Di,t.FtRadioCssVariables=Si,t.FtRadioGroup=Ii,t.FtRadioGroupCssVariables={},t.groupStyles=Ri,t.styles=Ei,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap);
|
package/build/ft-radio.min.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* @see https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry
|
|
16
16
|
*/
|
|
17
|
-
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,r=new WeakMap,s=new WeakMap,n=new WeakMap,a=new WeakMap;let l;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,r){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(r))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const a=r.prototype.attributeChangedCallback,l=new Set(r.observedAttributes||[]);
|
|
17
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,r=new WeakMap,s=new WeakMap,n=new WeakMap,a=new WeakMap;let l;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,r){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(r))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const a=r.prototype.attributeChangedCallback,l=new Set(r.observedAttributes||[]);f(r,l,a);const h={elementClass:r,connectedCallback:r.prototype.connectedCallback,disconnectedCallback:r.prototype.disconnectedCallback,adoptedCallback:r.prototype.adoptedCallback,attributeChangedCallback:a,formAssociated:r.formAssociated,formAssociatedCallback:r.prototype.formAssociatedCallback,formDisabledCallback:r.prototype.formDisabledCallback,formResetCallback:r.prototype.formResetCallback,formStateRestoreCallback:r.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,h),this._definitionsByClass.set(r,h);let p=i.call(o,t);p||(p=c(t),e.call(o,t,p)),this===window.customElements&&(n.set(r,h),h.standInClass=p);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)s.delete(t),u(t,h,!0)}const y=this._whenDefinedPromises.get(t);return void 0!==y&&(y.resolve(r),this._whenDefinedPromises.delete(t)),r}upgrade(){v.push(this),o.upgrade.apply(o,arguments),v.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let o=this._awaitingUpgrade.get(e);o||this._awaitingUpgrade.set(e,o=new Set),i?o.add(t):o.delete(t)}},window.HTMLElement=function(){let e=l;if(e)return l=void 0,e;const i=n.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),r.set(e,i),e},window.HTMLElement.prototype=t.prototype;const h=t=>t===document||t instanceof ShadowRoot,p=t=>{let e=t.getRootNode();if(!h(e)){const t=v[v.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),h(e)||(e=a.get(e)?.getRootNode()||document)}return e.customElements},c=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=p(i)||window.customElements,r=o._getDefinition(e);return r?u(i,r):s.set(i,o),i}connectedCallback(){const t=r.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):s.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=r.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):s.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){r.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=r.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=r.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=r.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=r.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},f=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,r){const s=t.toLowerCase();if(e.has(s)){const t=this.getAttribute(s);o.call(this,s,r),i.call(this,s,t,r)}else o.call(this,s,r)});const r=t.prototype.removeAttribute;r&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);r.call(this,o),i.call(this,o,t,null)}else r.call(this,o)})},d=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):d(i)},u=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),r.set(t,e),l=t;try{new e.elementClass}catch(t){d(e.elementClass),new e.elementClass}e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},y=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=y.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let v=[document];const g=(t,e,i)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){v.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&a.set(t,this),v.pop(),t}};g(ShadowRoot,"createElement",document),g(ShadowRoot,"importNode",document),g(Element,"insertAdjacentHTML");const b=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){v.push(this),i.set.call(this,t),v.pop()}})};if(b(Element,"innerHTML"),b(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const o=e.call(this,...i);return t.set(o,this),o},i.forEach((e=>{const i=window.ElementInternals.prototype,o=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==r.get(i).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...e)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class s{constructor(t){const e=new Map;t.forEach(((t,i)=>{const o=t.getAttribute("name"),r=e.get(o)||[];this[+i]=t,r.push(t),e.set(o,r)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new o(t))}))}namedItem(t){return this[t]}}const n=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=n.get.call(this,[]),e=[];for(const i of t){const t=r.get(i);t&&!0!==t.formAssociated||e.push(i)}return new s(e)}})}}try{window.customElements.define("custom-element",null)}catch(Dt){const t=window.customElements.define;window.customElements.define=(e,i,o)=>{try{t.bind(window.customElements)(e,i,o)}catch(t){console.warn(e,i,o,t)}}}class e{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){this.callbacks=[t],this.debounce(e)}queue(t,e){this.callbacks.push(t),this.debounce(e)}cancel(){null!=this._debounce&&window.clearTimeout(this._debounce)}debounce(t){this.cancel(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout)}runCallbacks(){for(let t of this.callbacks)t();this.callbacks=[]}}
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
@@ -45,34 +45,34 @@ if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.cust
|
|
|
45
45
|
* Copyright 2019 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
47
|
*/
|
|
48
|
-
const p=window.ShadowRoot&&(void 0===
|
|
48
|
+
const p=window,c=p.ShadowRoot&&(void 0===p.ShadyCSS||p.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,f=Symbol(),d=new WeakMap;class u{constructor(t,e,i){if(this._$cssResult$=!0,i!==f)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(c&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=d.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&d.set(e,t))}return t}toString(){return this.cssText}}const y=t=>new u("string"==typeof t?t:t+"",void 0,f),v=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1]),t[0]);return new u(i,t,f)},g=(t,e)=>{c?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),o=p.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,t.appendChild(i)}))},b=c?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return y(e)})(t):t
|
|
49
49
|
/**
|
|
50
50
|
* @license
|
|
51
51
|
* Copyright 2017 Google LLC
|
|
52
52
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
53
|
-
*/;var
|
|
53
|
+
*/;var m;const x=window,w=x.trustedTypes,$=w?w.emptyScript:"",O=x.reactiveElementPolyfillSupport,S={toAttribute(t,e){switch(e){case Boolean:t=t?$:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},k=(t,e)=>e!==t&&(e==e||t==t),C={attribute:!0,type:String,converter:S,reflect:!1,hasChanged:k};class N extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;null!==(e=this.h)&&void 0!==e||(this.h=[]),this.h.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const o=this._$Ep(i,e);void 0!==o&&(this._$Ev.set(o,i),t.push(o))})),t}static createProperty(t,e=C){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,o=this.getPropertyDescriptor(t,i,e);void 0!==o&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(o){const r=this[t];this[e]=o,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||C}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(b(t))}else void 0!==t&&e.push(b(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return g(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=C){var o;const r=this.constructor._$Ep(t,i);if(void 0!==r&&!0===i.reflect){const s=(void 0!==(null===(o=i.converter)||void 0===o?void 0:o.toAttribute)?i.converter:S).toAttribute(e,i.type);this._$El=t,null==s?this.removeAttribute(r):this.setAttribute(r,s),this._$El=null}}_$AK(t,e){var i;const o=this.constructor,r=o._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=o.getPropertyOptions(r),s="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:S;this._$El=r,this[r]=s.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let o=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||k)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}
|
|
54
54
|
/**
|
|
55
55
|
* @license
|
|
56
56
|
* Copyright 2017 Google LLC
|
|
57
57
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
58
58
|
*/
|
|
59
|
-
var
|
|
59
|
+
var R;N.finalized=!0,N.elementProperties=new Map,N.elementStyles=[],N.shadowRootOptions={mode:"open"},null==O||O({ReactiveElement:N}),(null!==(m=x.reactiveElementVersions)&&void 0!==m?m:x.reactiveElementVersions=[]).push("1.4.1");const E=window,M=E.trustedTypes,U=M?M.createPolicy("lit-html",{createHTML:t=>t}):void 0,F=`lit$${(Math.random()+"").slice(9)}$`,A="?"+F,j=`<${A}>`,L=document,B=(t="")=>L.createComment(t),z=t=>null===t||"object"!=typeof t&&"function"!=typeof t,D=Array.isArray,P=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_=/-->/g,T=/>/g,W=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),H=/'/g,K=/"/g,I=/^(?:script|style|textarea|title)$/i,V=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),Z=Symbol.for("lit-noChange"),J=Symbol.for("lit-nothing"),X=new WeakMap,q=L.createTreeWalker(L,129,null,!1),Y=(t,e)=>{const i=t.length-1,o=[];let r,s=2===e?"<svg>":"",n=P;for(let e=0;e<i;e++){const i=t[e];let a,l,h=-1,p=0;for(;p<i.length&&(n.lastIndex=p,l=n.exec(i),null!==l);)p=n.lastIndex,n===P?"!--"===l[1]?n=_:void 0!==l[1]?n=T:void 0!==l[2]?(I.test(l[2])&&(r=RegExp("</"+l[2],"g")),n=W):void 0!==l[3]&&(n=W):n===W?">"===l[0]?(n=null!=r?r:P,h=-1):void 0===l[1]?h=-2:(h=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?W:'"'===l[3]?K:H):n===K||n===H?n=W:n===_||n===T?n=P:(n=W,r=void 0);const c=n===W&&t[e+1].startsWith("/>")?" ":"";s+=n===P?i+j:h>=0?(o.push(a),i.slice(0,h)+"$lit$"+i.slice(h)+F+c):i+F+(-2===h?(o.push(void 0),e):c)}const a=s+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==U?U.createHTML(a):a,o]};class G{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let r=0,s=0;const n=t.length-1,a=this.parts,[l,h]=Y(t,e);if(this.el=G.createElement(l,i),q.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=q.nextNode())&&a.length<n;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(F)){const i=h[s++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(F),e=/([.?@])?(.*)/.exec(i);a.push({type:1,index:r,name:e[2],strings:t,ctor:"."===e[1]?ot:"?"===e[1]?st:"@"===e[1]?nt:it})}else a.push({type:6,index:r})}for(const e of t)o.removeAttribute(e)}if(I.test(o.tagName)){const t=o.textContent.split(F),e=t.length-1;if(e>0){o.textContent=M?M.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],B()),q.nextNode(),a.push({type:2,index:++r});o.append(t[e],B())}}}else if(8===o.nodeType)if(o.data===A)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=o.data.indexOf(F,t+1));)a.push({type:7,index:r}),t+=F.length-1}r++}}static createElement(t,e){const i=L.createElement("template");return i.innerHTML=t,i}}function Q(t,e,i=t,o){var r,s,n,a;if(e===Z)return e;let l=void 0!==o?null===(r=i._$Co)||void 0===r?void 0:r[o]:i._$Cl;const h=z(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==h&&(null===(s=null==l?void 0:l._$AO)||void 0===s||s.call(l,!1),void 0===h?l=void 0:(l=new h(t),l._$AT(t,i,o)),void 0!==o?(null!==(n=(a=i)._$Co)&&void 0!==n?n:a._$Co=[])[o]=l:i._$Cl=l),void 0!==l&&(e=Q(t,l._$AS(t,e.values),l,o)),e}class tt{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:i},parts:o}=this._$AD,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:L).importNode(i,!0);q.currentNode=r;let s=q.nextNode(),n=0,a=0,l=o[0];for(;void 0!==l;){if(n===l.index){let e;2===l.type?e=new et(s,s.nextSibling,this,t):1===l.type?e=new l.ctor(s,l.name,l.strings,this,t):6===l.type&&(e=new at(s,this,t)),this.u.push(e),l=o[++a]}n!==(null==l?void 0:l.index)&&(s=q.nextNode(),n++)}return r}p(t){let e=0;for(const i of this.u)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class et{constructor(t,e,i,o){var r;this.type=2,this._$AH=J,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cm=null===(r=null==o?void 0:o.isConnected)||void 0===r||r}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Q(this,t,e),z(t)?t===J||null==t||""===t?(this._$AH!==J&&this._$AR(),this._$AH=J):t!==this._$AH&&t!==Z&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>D(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==J&&z(this._$AH)?this._$AA.nextSibling.data=t:this.T(L.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:o}=t,r="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=G.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.p(i);else{const t=new tt(r,this),e=t.v(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=X.get(t.strings);return void 0===e&&X.set(t.strings,e=new G(t)),e}k(t){D(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const r of t)o===e.length?e.push(i=new et(this.O(B()),this.O(B()),this,this.options)):i=e[o],i._$AI(r),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class it{constructor(t,e,i,o,r){this.type=1,this._$AH=J,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=J}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const r=this.strings;let s=!1;if(void 0===r)t=Q(this,t,e,0),s=!z(t)||t!==this._$AH&&t!==Z,s&&(this._$AH=t);else{const o=t;let n,a;for(t=r[0],n=0;n<r.length-1;n++)a=Q(this,o[i+n],e,n),a===Z&&(a=this._$AH[n]),s||(s=!z(a)||a!==this._$AH[n]),a===J?t=J:t!==J&&(t+=(null!=a?a:"")+r[n+1]),this._$AH[n]=a}s&&!o&&this.j(t)}j(t){t===J?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class ot extends it{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===J?void 0:t}}const rt=M?M.emptyScript:"";class st extends it{constructor(){super(...arguments),this.type=4}j(t){t&&t!==J?this.element.setAttribute(this.name,rt):this.element.removeAttribute(this.name)}}class nt extends it{constructor(t,e,i,o,r){super(t,e,i,o,r),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=Q(this,t,e,0))&&void 0!==i?i:J)===Z)return;const o=this._$AH,r=t===J&&o!==J||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==J&&(o===J||r);r&&this.element.removeEventListener(this.name,this,o),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class at{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Q(this,t)}}const lt=E.litHtmlPolyfillSupport;null==lt||lt(G,et),(null!==(R=E.litHtmlVersions)&&void 0!==R?R:E.litHtmlVersions=[]).push("2.4.0");
|
|
60
60
|
/**
|
|
61
61
|
* @license
|
|
62
62
|
* Copyright 2017 Google LLC
|
|
63
63
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
64
64
|
*/
|
|
65
|
-
var
|
|
65
|
+
var ht,pt;class ct extends N{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{var o,r;const s=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:e;let n=s._$litPart$;if(void 0===n){const t=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:null;s._$litPart$=n=new et(e.insertBefore(B(),t),t,void 0,null!=i?i:{})}return n._$AI(t),n})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return Z}}ct.finalized=!0,ct._$litElement$=!0,null===(ht=globalThis.litElementHydrateSupport)||void 0===ht||ht.call(globalThis,{LitElement:ct});const ft=globalThis.litElementPolyfillSupport;null==ft||ft({LitElement:ct}),(null!==(pt=globalThis.litElementVersions)&&void 0!==pt?pt:globalThis.litElementVersions=[]).push("3.2.2");class dt{static create(t,e,i){let o=t=>y(null!=t?t:i),r=v`var(${y(t)}, ${o(i)})`;return r.name=t,r.category=e,r.defaultValue=i,r.defaultCssValue=o,r.get=e=>v`var(${y(t)}, ${o(e)})`,r.breadcrumb=()=>[],r.lastResortDefaultValue=()=>i,r}static extend(t,e,i){let o=t=>e.get(null!=t?t:i),r=v`var(${y(t)}, ${o(i)})`;return r.name=t,r.category=e.category,r.fallbackVariable=e,r.defaultValue=i,r.defaultCssValue=o,r.get=e=>v`var(${y(t)}, ${o(e)})`,r.breadcrumb=()=>[e.name,...e.breadcrumb()],r.lastResortDefaultValue=()=>i,r}static external(t,e){let i=e=>t.fallbackVariable?t.fallbackVariable.get(null!=e?e:t.defaultValue):y(null!=e?e:t.defaultValue),o=v`var(${y(t.name)}, ${i(t.defaultValue)})`;return o.name=t.name,o.category=t.category,o.fallbackVariable=t.fallbackVariable,o.defaultValue=t.defaultValue,o.context=e,o.defaultCssValue=i,o.get=e=>v`var(${y(t.name)}, ${i(e)})`,o.breadcrumb=()=>t.fallbackVariable?[t.fallbackVariable.name,...t.fallbackVariable.breadcrumb()]:[],o.lastResortDefaultValue=()=>{var e,i;return null!==(e=t.defaultValue)&&void 0!==e?e:null===(i=t.fallbackVariable)||void 0===i?void 0:i.lastResortDefaultValue()},o}}const ut={colorPrimary:dt.create("--ft-color-primary","COLOR","#2196F3"),colorPrimaryVariant:dt.create("--ft-color-primary-variant","COLOR","#1976D2"),colorSecondary:dt.create("--ft-color-secondary","COLOR","#FFCC80"),colorSecondaryVariant:dt.create("--ft-color-secondary-variant","COLOR","#F57C00"),colorSurface:dt.create("--ft-color-surface","COLOR","#FFFFFF"),colorContent:dt.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),colorError:dt.create("--ft-color-error","COLOR","#B00020"),colorOutline:dt.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),colorOpacityHigh:dt.create("--ft-color-opacity-high","NUMBER","1"),colorOpacityMedium:dt.create("--ft-color-opacity-medium","NUMBER","0.74"),colorOpacityDisabled:dt.create("--ft-color-opacity-disabled","NUMBER","0.38"),colorOnPrimary:dt.create("--ft-color-on-primary","COLOR","#FFFFFF"),colorOnPrimaryHigh:dt.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),colorOnPrimaryMedium:dt.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnPrimaryDisabled:dt.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSecondary:dt.create("--ft-color-on-secondary","COLOR","#FFFFFF"),colorOnSecondaryHigh:dt.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),colorOnSecondaryMedium:dt.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnSecondaryDisabled:dt.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSurface:dt.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceHigh:dt.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceMedium:dt.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),colorOnSurfaceDisabled:dt.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),opacityContentOnSurfaceDisabled:dt.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),opacityContentOnSurfaceEnable:dt.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),opacityContentOnSurfaceHover:dt.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),opacityContentOnSurfaceFocused:dt.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),opacityContentOnSurfacePressed:dt.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),opacityContentOnSurfaceSelected:dt.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),opacityContentOnSurfaceDragged:dt.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),opacityPrimaryOnSurfaceDisabled:dt.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),opacityPrimaryOnSurfaceEnable:dt.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),opacityPrimaryOnSurfaceHover:dt.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),opacityPrimaryOnSurfaceFocused:dt.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),opacityPrimaryOnSurfacePressed:dt.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),opacityPrimaryOnSurfaceSelected:dt.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),opacityPrimaryOnSurfaceDragged:dt.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),opacitySurfaceOnPrimaryDisabled:dt.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),opacitySurfaceOnPrimaryEnable:dt.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),opacitySurfaceOnPrimaryHover:dt.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),opacitySurfaceOnPrimaryFocused:dt.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),opacitySurfaceOnPrimaryPressed:dt.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),opacitySurfaceOnPrimarySelected:dt.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),opacitySurfaceOnPrimaryDragged:dt.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),elevation00:dt.create("--ft-elevation-00","UNKNOWN","0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0)"),elevation01:dt.create("--ft-elevation-01","UNKNOWN","0px 1px 4px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation02:dt.create("--ft-elevation-02","UNKNOWN","0px 4px 10px 0px rgba(0, 0, 0, 0.06), 0px 2px 5px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation03:dt.create("--ft-elevation-03","UNKNOWN","0px 6px 13px 0px rgba(0, 0, 0, 0.06), 0px 3px 7px 0px rgba(0, 0, 0, 0.14), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)"),elevation04:dt.create("--ft-elevation-04","UNKNOWN","0px 8px 16px 0px rgba(0, 0, 0, 0.06), 0px 4px 9px 0px rgba(0, 0, 0, 0.14), 0px 2px 3px 0px rgba(0, 0, 0, 0.06)"),elevation06:dt.create("--ft-elevation-06","UNKNOWN","0px 12px 22px 0px rgba(0, 0, 0, 0.06), 0px 6px 13px 0px rgba(0, 0, 0, 0.14), 0px 4px 5px 0px rgba(0, 0, 0, 0.06)"),elevation08:dt.create("--ft-elevation-08","UNKNOWN","0px 16px 28px 0px rgba(0, 0, 0, 0.06), 0px 8px 17px 0px rgba(0, 0, 0, 0.14), 0px 6px 7px 0px rgba(0, 0, 0, 0.06)"),elevation12:dt.create("--ft-elevation-12","UNKNOWN","0px 22px 40px 0px rgba(0, 0, 0, 0.06), 0px 12px 23px 0px rgba(0, 0, 0, 0.14), 0px 10px 11px 0px rgba(0, 0, 0, 0.06)"),elevation16:dt.create("--ft-elevation-16","UNKNOWN","0px 28px 52px 0px rgba(0, 0, 0, 0.06), 0px 16px 29px 0px rgba(0, 0, 0, 0.14), 0px 14px 15px 0px rgba(0, 0, 0, 0.06)"),elevation24:dt.create("--ft-elevation-24","UNKNOWN","0px 40px 76px 0px rgba(0, 0, 0, 0.06), 0px 24px 41px 0px rgba(0, 0, 0, 0.14), 0px 22px 23px 0px rgba(0, 0, 0, 0.06)"),borderRadiusS:dt.create("--ft-border-radius-S","SIZE","4px"),borderRadiusM:dt.create("--ft-border-radius-M","SIZE","8px"),borderRadiusL:dt.create("--ft-border-radius-L","SIZE","12px"),borderRadiusXL:dt.create("--ft-border-radius-XL","SIZE","16px"),titleFont:dt.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),contentFont:dt.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),transitionDuration:dt.create("--ft-transition-duration","UNKNOWN","250ms"),transitionTimingFunction:dt.create("--ft-transition-timing-function","UNKNOWN","ease-in-out")};
|
|
66
66
|
/**
|
|
67
67
|
* @license
|
|
68
68
|
* Copyright 2021 Google LLC
|
|
69
69
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
70
|
-
*/var
|
|
71
|
-
${t.map((t=>
|
|
70
|
+
*/var yt,vt,gt=function(t,e,i,o){for(var r,s=arguments.length,n=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(r=t[a])&&(n=(s<3?r(n):s>3?r(e,i,n):r(e,i))||n);return s>3&&n&&Object.defineProperty(e,i,n),n};class bt extends(function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:e,elementDefinitions:i,shadowRootOptions:o}=t;i&&!e&&(t.registry=new CustomElementRegistry,Object.entries(i).forEach((([e,i])=>t.registry.define(e,i))));const r=this.renderOptions.creationScope=this.attachShadow({...o,customElements:t.registry});return g(r,this.constructor.elementStyles),r}}}(ct)){getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),V`
|
|
71
|
+
${t.map((t=>V`
|
|
72
72
|
<style>${t}</style>
|
|
73
73
|
`))}
|
|
74
74
|
${this.getTemplate()}
|
|
75
|
-
`}updated(t){super.updated(t),setTimeout((()=>{var e;this.contentAvailableCallback(t),(null===(e=this.exportpartsPrefix)||void 0===e?void 0:e.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}),0)}setExportpartsAttribute(t){var e,i,o,r,s,n;const a=t=>null!=t&&t.trim().length>0,l=t.filter(a).map((t=>t.trim()));if(0===l.length)return void this.removeAttribute("exportparts");const h=new Set;for(let t of null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==i?i:[]){const e=null!==(r=null===(o=t.getAttribute("part"))||void 0===o?void 0:o.split(" "))&&void 0!==r?r:[],i=null!==(n=null===(s=t.getAttribute("exportparts"))||void 0===s?void 0:s.split(",").map((t=>t.split(":")[1])))&&void 0!==n?n:[];new Array(...e,...i).filter(a).map((t=>t.trim())).forEach((t=>h.add(t)))}if(0===h.size)return void this.removeAttribute("exportparts");const p=[...h.values()].flatMap((t=>l.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...p].join(", "))}contentAvailableCallback(t){}}
|
|
75
|
+
`}updated(t){super.updated(t),setTimeout((()=>{var e;this.contentAvailableCallback(t),(null===(e=this.exportpartsPrefix)||void 0===e?void 0:e.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}),0)}setExportpartsAttribute(t){var e,i,o,r,s,n;const a=t=>null!=t&&t.trim().length>0,l=t.filter(a).map((t=>t.trim()));if(0===l.length)return void this.removeAttribute("exportparts");const h=new Set;for(let t of null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==i?i:[]){const e=null!==(r=null===(o=t.getAttribute("part"))||void 0===o?void 0:o.split(" "))&&void 0!==r?r:[],i=null!==(n=null===(s=t.getAttribute("exportparts"))||void 0===s?void 0:s.split(",").map((t=>t.split(":")[1])))&&void 0!==n?n:[];new Array(...e,...i).filter(a).map((t=>t.trim())).forEach((t=>h.add(t)))}if(0===h.size)return void this.removeAttribute("exportparts");const p=[...h.values()].flatMap((t=>l.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...p].join(", "))}contentAvailableCallback(t){}}gt([o()],bt.prototype,"exportpartsPrefix",void 0),gt([function(t,e){const i=()=>JSON.parse(JSON.stringify(t));return o({type:Object,converter:{fromAttribute:t=>{if(null==t)return i();try{return JSON.parse(t)}catch{return i()}},toAttribute:t=>JSON.stringify(t)},...null!=e?e:{}})}([])],bt.prototype,"exportpartsPrefixes",void 0),v`
|
|
76
76
|
.ft-no-text-select {
|
|
77
77
|
-webkit-touch-callout: none;
|
|
78
78
|
-webkit-user-select: none;
|
|
@@ -81,7 +81,7 @@ var nt,at;null==st||st(X,G),(null!==(C=globalThis.litHtmlVersions)&&void 0!==C?C
|
|
|
81
81
|
-ms-user-select: none;
|
|
82
82
|
user-select: none;
|
|
83
83
|
}
|
|
84
|
-
`,
|
|
84
|
+
`,v`
|
|
85
85
|
.ft-word-wrap {
|
|
86
86
|
white-space: normal;
|
|
87
87
|
word-wrap: break-word;
|
|
@@ -93,19 +93,18 @@ var nt,at;null==st||st(X,G),(null!==(C=globalThis.litHtmlVersions)&&void 0!==C?C
|
|
|
93
93
|
-webkit-hyphens: auto;
|
|
94
94
|
hyphens: auto
|
|
95
95
|
}
|
|
96
|
-
`,navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(
|
|
96
|
+
`,navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(vt=null===(yt=window.safari)||void 0===yt?void 0:yt.pushNotification)||void 0===vt||vt.toString());
|
|
97
97
|
/**
|
|
98
98
|
* @license
|
|
99
99
|
* Copyright 2017 Google LLC
|
|
100
100
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
101
101
|
*/
|
|
102
|
-
const
|
|
102
|
+
const mt=1;class xt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
|
|
103
103
|
/**
|
|
104
104
|
* @license
|
|
105
105
|
* Copyright 2018 Google LLC
|
|
106
106
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
107
|
-
*/
|
|
108
|
-
const vt=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}{constructor(t){var e;if(super(t),t.type!==gt||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,o;if(void 0===this.nt){this.nt=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.st)||void 0===i?void 0:i.has(t))&&this.nt.add(t);return this.render(e)}const r=t.element.classList;this.nt.forEach((t=>{t in e||(r.remove(t),this.nt.delete(t))}));for(const t in e){const i=!!e[t];i===this.nt.has(t)||(null===(o=this.st)||void 0===o?void 0:o.has(t))||(i?(r.add(t),this.nt.add(t)):(r.remove(t),this.nt.delete(t)))}return K}}),bt=pt.extend("--ft-ripple-color",ct.colorContent),mt=bt,xt=pt.extend("--ft-ripple-background-color",bt),wt=pt.external(ct.opacityContentOnSurfacePressed,"Design system"),$t=pt.external(ct.opacityContentOnSurfaceHover,"Design system"),Ot=pt.external(ct.opacityContentOnSurfaceFocused,"Design system"),St=pt.external(ct.opacityContentOnSurfaceSelected,"Design system"),kt=pt.extend("--ft-ripple-color",ct.colorPrimary),Ct=kt,Nt=pt.extend("--ft-ripple-background-color",kt),Rt=pt.extend("--ft-ripple-color",ct.colorSecondary),Et=Rt,Mt=pt.extend("--ft-ripple-background-color",Rt),Ut=y`
|
|
107
|
+
*/const wt=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends xt{constructor(t){var e;if(super(t),t.type!==mt||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,o;if(void 0===this.nt){this.nt=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.st)||void 0===i?void 0:i.has(t))&&this.nt.add(t);return this.render(e)}const r=t.element.classList;this.nt.forEach((t=>{t in e||(r.remove(t),this.nt.delete(t))}));for(const t in e){const i=!!e[t];i===this.nt.has(t)||(null===(o=this.st)||void 0===o?void 0:o.has(t))||(i?(r.add(t),this.nt.add(t)):(r.remove(t),this.nt.delete(t)))}return Z}}),$t=dt.extend("--ft-ripple-color",ut.colorContent),Ot=$t,St=dt.extend("--ft-ripple-background-color",$t),kt=dt.external(ut.opacityContentOnSurfacePressed,"Design system"),Ct=dt.external(ut.opacityContentOnSurfaceHover,"Design system"),Nt=dt.external(ut.opacityContentOnSurfaceFocused,"Design system"),Rt=dt.external(ut.opacityContentOnSurfaceSelected,"Design system"),Et=dt.extend("--ft-ripple-color",ut.colorPrimary),Mt=Et,Ut=dt.extend("--ft-ripple-background-color",Et),Ft=dt.extend("--ft-ripple-color",ut.colorSecondary),At=Ft,jt=dt.extend("--ft-ripple-background-color",Ft),Lt=v`
|
|
109
108
|
:host {
|
|
110
109
|
display: contents;
|
|
111
110
|
}
|
|
@@ -127,27 +126,27 @@ const vt=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends class{constru
|
|
|
127
126
|
}
|
|
128
127
|
|
|
129
128
|
.ft-ripple .ft-ripple--background {
|
|
130
|
-
background-color: ${
|
|
129
|
+
background-color: ${St};
|
|
131
130
|
}
|
|
132
131
|
|
|
133
132
|
.ft-ripple .ft-ripple--effect {
|
|
134
|
-
background-color: ${
|
|
133
|
+
background-color: ${Ot};
|
|
135
134
|
}
|
|
136
135
|
|
|
137
136
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
138
|
-
background-color: ${
|
|
137
|
+
background-color: ${jt};
|
|
139
138
|
}
|
|
140
139
|
|
|
141
140
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
142
|
-
background-color: ${
|
|
141
|
+
background-color: ${At};
|
|
143
142
|
}
|
|
144
143
|
|
|
145
144
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
146
|
-
background-color: ${
|
|
145
|
+
background-color: ${Ut};
|
|
147
146
|
}
|
|
148
147
|
|
|
149
148
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
150
|
-
background-color: ${
|
|
149
|
+
background-color: ${Mt};
|
|
151
150
|
}
|
|
152
151
|
|
|
153
152
|
.ft-ripple .ft-ripple--background {
|
|
@@ -179,22 +178,22 @@ const vt=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends class{constru
|
|
|
179
178
|
}
|
|
180
179
|
|
|
181
180
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
182
|
-
opacity: ${
|
|
181
|
+
opacity: ${Ct};
|
|
183
182
|
}
|
|
184
183
|
|
|
185
184
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
186
|
-
opacity: ${
|
|
185
|
+
opacity: ${Rt};
|
|
187
186
|
}
|
|
188
187
|
|
|
189
188
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
190
|
-
opacity: ${
|
|
189
|
+
opacity: ${Nt};
|
|
191
190
|
}
|
|
192
191
|
|
|
193
192
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
194
|
-
opacity: ${
|
|
193
|
+
opacity: ${kt};
|
|
195
194
|
transform: translate(-50%, -50%) scale(1);
|
|
196
195
|
}
|
|
197
|
-
`;var
|
|
196
|
+
`;var Bt=function(t,e,i,o){for(var r,s=arguments.length,n=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(r=t[a])&&(n=(s<3?r(n):s>3?r(e,i,n):r(e,i))||n);return s>3&&n&&Object.defineProperty(e,i,n),n};class zt extends bt{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new e(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var e,i;let{x:o,y:r}=this.getCoordinates(t),s=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-s.x:s.width/2),this.originY=Math.round(null!=r?r-s.y:s.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return V`
|
|
198
197
|
<style>
|
|
199
198
|
.ft-ripple .ft-ripple--effect,
|
|
200
199
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -207,126 +206,126 @@ const vt=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends class{constru
|
|
|
207
206
|
top: ${this.originY}px;
|
|
208
207
|
}
|
|
209
208
|
</style>
|
|
210
|
-
<div class="${
|
|
209
|
+
<div class="${wt(t)}">
|
|
211
210
|
<div class="ft-ripple--background"></div>
|
|
212
211
|
<div class="ft-ripple--effect"></div>
|
|
213
212
|
</div>
|
|
214
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),r=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",r),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",r),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const e=t,i=t;let o,r;return null!=e.x?({x:o,y:r}=e):null!=i.touches&&(o=i.touches[0].clientX,r=i.touches[0].clientY),{x:o,y:r}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}
|
|
213
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),r=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",r),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",r),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const e=t,i=t;let o,r;return null!=e.x?({x:o,y:r}=e):null!=i.touches&&(o=i.touches[0].clientX,r=i.touches[0].clientY),{x:o,y:r}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}zt.elementDefinitions={},zt.styles=Lt,Bt([o({type:Boolean})],zt.prototype,"primary",void 0),Bt([o({type:Boolean})],zt.prototype,"secondary",void 0),Bt([o({type:Boolean})],zt.prototype,"unbounded",void 0),Bt([o({type:Boolean})],zt.prototype,"activated",void 0),Bt([o({type:Boolean})],zt.prototype,"selected",void 0),Bt([o({type:Boolean})],zt.prototype,"disabled",void 0),Bt([r()],zt.prototype,"hovered",void 0),Bt([r()],zt.prototype,"focused",void 0),Bt([r()],zt.prototype,"pressed",void 0),Bt([r()],zt.prototype,"rippling",void 0),Bt([r()],zt.prototype,"rippleSize",void 0),Bt([r()],zt.prototype,"originX",void 0),Bt([r()],zt.prototype,"originY",void 0),Bt([n(".ft-ripple")],zt.prototype,"ripple",void 0),Bt([n(".ft-ripple--effect")],zt.prototype,"rippleEffect",void 0),h("ft-ripple")(zt);
|
|
215
214
|
/**
|
|
216
215
|
* @license
|
|
217
216
|
* Copyright 2020 Google LLC
|
|
218
217
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
219
218
|
*/
|
|
220
|
-
const
|
|
219
|
+
const Dt=Symbol.for(""),Pt=t=>{if((null==t?void 0:t.r)===Dt)return null==t?void 0:t._$litStatic$},_t=t=>({_$litStatic$:t,r:Dt}),Tt=new Map,Wt=(t=>(e,...i)=>{const o=i.length;let r,s;const n=[],a=[];let l,h=0,p=!1;for(;h<o;){for(l=e[h];h<o&&void 0!==(s=i[h],r=Pt(s));)l+=r+e[++h],p=!0;a.push(s),n.push(l),h++}if(h===o&&n.push(e[o]),p){const t=n.join("$$lit$$");void 0===(e=Tt.get(t))&&(n.raw=n,Tt.set(t,e=n)),i=a}return t(e,...i)})(V);var Ht;!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(Ht||(Ht={}));const Kt=dt.extend("--ft-typography-font-family",ut.titleFont),It=dt.extend("--ft-typography-font-family",ut.contentFont),Vt={fontFamily:It,fontSize:dt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:dt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:dt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:dt.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:dt.create("--ft-typography-text-transform","UNKNOWN","inherit")},Zt=dt.extend("--ft-typography-title-font-family",Kt),Jt=dt.extend("--ft-typography-title-font-size",Vt.fontSize,"20px"),Xt=dt.extend("--ft-typography-title-font-weight",Vt.fontWeight,"normal"),qt=dt.extend("--ft-typography-title-letter-spacing",Vt.letterSpacing,"0.15px"),Yt=dt.extend("--ft-typography-title-line-height",Vt.lineHeight,"1.2"),Gt=dt.extend("--ft-typography-title-text-transform",Vt.textTransform,"inherit"),Qt=dt.extend("--ft-typography-title-dense-font-family",Kt),te=dt.extend("--ft-typography-title-dense-font-size",Vt.fontSize,"14px"),ee=dt.extend("--ft-typography-title-dense-font-weight",Vt.fontWeight,"normal"),ie=dt.extend("--ft-typography-title-dense-letter-spacing",Vt.letterSpacing,"0.105px"),oe=dt.extend("--ft-typography-title-dense-line-height",Vt.lineHeight,"1.7"),re=dt.extend("--ft-typography-title-dense-text-transform",Vt.textTransform,"inherit"),se=dt.extend("--ft-typography-subtitle1-font-family",It),ne=dt.extend("--ft-typography-subtitle1-font-size",Vt.fontSize,"16px"),ae=dt.extend("--ft-typography-subtitle1-font-weight",Vt.fontWeight,"600"),le=dt.extend("--ft-typography-subtitle1-letter-spacing",Vt.letterSpacing,"0.144px"),he=dt.extend("--ft-typography-subtitle1-line-height",Vt.lineHeight,"1.5"),pe=dt.extend("--ft-typography-subtitle1-text-transform",Vt.textTransform,"inherit"),ce=dt.extend("--ft-typography-subtitle2-font-family",It),fe=dt.extend("--ft-typography-subtitle2-font-size",Vt.fontSize,"14px"),de=dt.extend("--ft-typography-subtitle2-font-weight",Vt.fontWeight,"normal"),ue=dt.extend("--ft-typography-subtitle2-letter-spacing",Vt.letterSpacing,"0.098px"),ye=dt.extend("--ft-typography-subtitle2-line-height",Vt.lineHeight,"1.7"),ve=dt.extend("--ft-typography-subtitle2-text-transform",Vt.textTransform,"inherit"),ge=dt.extend("--ft-typography-body1-font-family",It),be=dt.extend("--ft-typography-body1-font-size",Vt.fontSize,"16px"),me=dt.extend("--ft-typography-body1-font-weight",Vt.fontWeight,"normal"),xe=dt.extend("--ft-typography-body1-letter-spacing",Vt.letterSpacing,"0.496px"),we=dt.extend("--ft-typography-body1-line-height",Vt.lineHeight,"1.5"),$e=dt.extend("--ft-typography-body1-text-transform",Vt.textTransform,"inherit"),Oe=dt.extend("--ft-typography-body2-font-family",It),Se=dt.extend("--ft-typography-body2-font-size",Vt.fontSize,"14px"),ke=dt.extend("--ft-typography-body2-font-weight",Vt.fontWeight,"normal"),Ce=dt.extend("--ft-typography-body2-letter-spacing",Vt.letterSpacing,"0.252px"),Ne=dt.extend("--ft-typography-body2-line-height",Vt.lineHeight,"1.4"),Re=dt.extend("--ft-typography-body2-text-transform",Vt.textTransform,"inherit"),Ee=dt.extend("--ft-typography-caption-font-family",It),Me=dt.extend("--ft-typography-caption-font-size",Vt.fontSize,"12px"),Ue=dt.extend("--ft-typography-caption-font-weight",Vt.fontWeight,"normal"),Fe=dt.extend("--ft-typography-caption-letter-spacing",Vt.letterSpacing,"0.396px"),Ae=dt.extend("--ft-typography-caption-line-height",Vt.lineHeight,"1.33"),je=dt.extend("--ft-typography-caption-text-transform",Vt.textTransform,"inherit"),Le=dt.extend("--ft-typography-breadcrumb-font-family",It),Be=dt.extend("--ft-typography-breadcrumb-font-size",Vt.fontSize,"10px"),ze=dt.extend("--ft-typography-breadcrumb-font-weight",Vt.fontWeight,"normal"),De=dt.extend("--ft-typography-breadcrumb-letter-spacing",Vt.letterSpacing,"0.33px"),Pe=dt.extend("--ft-typography-breadcrumb-line-height",Vt.lineHeight,"1.6"),_e=dt.extend("--ft-typography-breadcrumb-text-transform",Vt.textTransform,"inherit"),Te=dt.extend("--ft-typography-overline-font-family",It),We=dt.extend("--ft-typography-overline-font-size",Vt.fontSize,"10px"),He=dt.extend("--ft-typography-overline-font-weight",Vt.fontWeight,"normal"),Ke=dt.extend("--ft-typography-overline-letter-spacing",Vt.letterSpacing,"1.5px"),Ie=dt.extend("--ft-typography-overline-line-height",Vt.lineHeight,"1.6"),Ve=dt.extend("--ft-typography-overline-text-transform",Vt.textTransform,"uppercase"),Ze=dt.extend("--ft-typography-button-font-family",It),Je=dt.extend("--ft-typography-button-font-size",Vt.fontSize,"14px"),Xe=dt.extend("--ft-typography-button-font-weight",Vt.fontWeight,"600"),qe=dt.extend("--ft-typography-button-letter-spacing",Vt.letterSpacing,"1.246px"),Ye=dt.extend("--ft-typography-button-line-height",Vt.lineHeight,"1.15"),Ge=dt.extend("--ft-typography-button-text-transform",Vt.textTransform,"uppercase"),Qe=v`
|
|
221
220
|
.ft-typography--title {
|
|
222
|
-
font-family: ${
|
|
223
|
-
font-size: ${
|
|
224
|
-
font-weight: ${
|
|
225
|
-
letter-spacing: ${
|
|
226
|
-
line-height: ${
|
|
227
|
-
text-transform: ${
|
|
228
|
-
}
|
|
229
|
-
`,
|
|
221
|
+
font-family: ${Zt};
|
|
222
|
+
font-size: ${Jt};
|
|
223
|
+
font-weight: ${Xt};
|
|
224
|
+
letter-spacing: ${qt};
|
|
225
|
+
line-height: ${Yt};
|
|
226
|
+
text-transform: ${Gt};
|
|
227
|
+
}
|
|
228
|
+
`,ti=v`
|
|
230
229
|
.ft-typography--title-dense {
|
|
231
|
-
font-family: ${
|
|
232
|
-
font-size: ${
|
|
233
|
-
font-weight: ${
|
|
234
|
-
letter-spacing: ${
|
|
235
|
-
line-height: ${
|
|
236
|
-
text-transform: ${
|
|
237
|
-
}
|
|
238
|
-
`,
|
|
230
|
+
font-family: ${Qt};
|
|
231
|
+
font-size: ${te};
|
|
232
|
+
font-weight: ${ee};
|
|
233
|
+
letter-spacing: ${ie};
|
|
234
|
+
line-height: ${oe};
|
|
235
|
+
text-transform: ${re};
|
|
236
|
+
}
|
|
237
|
+
`,ei=v`
|
|
239
238
|
.ft-typography--subtitle1 {
|
|
240
|
-
font-family: ${
|
|
241
|
-
font-size: ${
|
|
242
|
-
font-weight: ${
|
|
243
|
-
letter-spacing: ${
|
|
244
|
-
line-height: ${
|
|
245
|
-
text-transform: ${
|
|
246
|
-
}
|
|
247
|
-
`,
|
|
239
|
+
font-family: ${se};
|
|
240
|
+
font-size: ${ne};
|
|
241
|
+
font-weight: ${ae};
|
|
242
|
+
letter-spacing: ${le};
|
|
243
|
+
line-height: ${he};
|
|
244
|
+
text-transform: ${pe};
|
|
245
|
+
}
|
|
246
|
+
`,ii=v`
|
|
248
247
|
.ft-typography--subtitle2 {
|
|
249
|
-
font-family: ${
|
|
250
|
-
font-size: ${
|
|
251
|
-
font-weight: ${
|
|
252
|
-
letter-spacing: ${
|
|
253
|
-
line-height: ${
|
|
254
|
-
text-transform: ${
|
|
248
|
+
font-family: ${ce};
|
|
249
|
+
font-size: ${fe};
|
|
250
|
+
font-weight: ${de};
|
|
251
|
+
letter-spacing: ${ue};
|
|
252
|
+
line-height: ${ye};
|
|
253
|
+
text-transform: ${ve};
|
|
255
254
|
}
|
|
256
255
|
|
|
257
|
-
`,
|
|
256
|
+
`,oi=v`
|
|
258
257
|
.ft-typography--body1 {
|
|
259
|
-
font-family: ${
|
|
260
|
-
font-size: ${
|
|
261
|
-
font-weight: ${
|
|
262
|
-
letter-spacing: ${
|
|
263
|
-
line-height: ${
|
|
264
|
-
text-transform: ${
|
|
265
|
-
}
|
|
266
|
-
`,
|
|
258
|
+
font-family: ${ge};
|
|
259
|
+
font-size: ${be};
|
|
260
|
+
font-weight: ${me};
|
|
261
|
+
letter-spacing: ${xe};
|
|
262
|
+
line-height: ${we};
|
|
263
|
+
text-transform: ${$e};
|
|
264
|
+
}
|
|
265
|
+
`,ri=v`
|
|
267
266
|
.ft-typography--body2 {
|
|
268
|
-
font-family: ${
|
|
269
|
-
font-size: ${
|
|
270
|
-
font-weight: ${
|
|
271
|
-
letter-spacing: ${
|
|
272
|
-
line-height: ${
|
|
273
|
-
text-transform: ${
|
|
274
|
-
}
|
|
275
|
-
`,
|
|
267
|
+
font-family: ${Oe};
|
|
268
|
+
font-size: ${Se};
|
|
269
|
+
font-weight: ${ke};
|
|
270
|
+
letter-spacing: ${Ce};
|
|
271
|
+
line-height: ${Ne};
|
|
272
|
+
text-transform: ${Re};
|
|
273
|
+
}
|
|
274
|
+
`,si=v`
|
|
276
275
|
.ft-typography--caption {
|
|
277
|
-
font-family: ${
|
|
278
|
-
font-size: ${
|
|
279
|
-
font-weight: ${
|
|
280
|
-
letter-spacing: ${
|
|
281
|
-
line-height: ${
|
|
282
|
-
text-transform: ${
|
|
283
|
-
}
|
|
284
|
-
`,
|
|
276
|
+
font-family: ${Ee};
|
|
277
|
+
font-size: ${Me};
|
|
278
|
+
font-weight: ${Ue};
|
|
279
|
+
letter-spacing: ${Fe};
|
|
280
|
+
line-height: ${Ae};
|
|
281
|
+
text-transform: ${je};
|
|
282
|
+
}
|
|
283
|
+
`,ni=v`
|
|
285
284
|
.ft-typography--breadcrumb {
|
|
286
|
-
font-family: ${
|
|
287
|
-
font-size: ${
|
|
288
|
-
font-weight: ${
|
|
289
|
-
letter-spacing: ${
|
|
290
|
-
line-height: ${
|
|
291
|
-
text-transform: ${
|
|
292
|
-
}
|
|
293
|
-
`,
|
|
285
|
+
font-family: ${Le};
|
|
286
|
+
font-size: ${Be};
|
|
287
|
+
font-weight: ${ze};
|
|
288
|
+
letter-spacing: ${De};
|
|
289
|
+
line-height: ${Pe};
|
|
290
|
+
text-transform: ${_e};
|
|
291
|
+
}
|
|
292
|
+
`,ai=v`
|
|
294
293
|
.ft-typography--overline {
|
|
295
|
-
font-family: ${
|
|
296
|
-
font-size: ${
|
|
297
|
-
font-weight: ${
|
|
298
|
-
letter-spacing: ${
|
|
299
|
-
line-height: ${
|
|
300
|
-
text-transform: ${
|
|
301
|
-
}
|
|
302
|
-
`,
|
|
294
|
+
font-family: ${Te};
|
|
295
|
+
font-size: ${We};
|
|
296
|
+
font-weight: ${He};
|
|
297
|
+
letter-spacing: ${Ke};
|
|
298
|
+
line-height: ${Ie};
|
|
299
|
+
text-transform: ${Ve};
|
|
300
|
+
}
|
|
301
|
+
`,li=v`
|
|
303
302
|
.ft-typography--button {
|
|
304
|
-
font-family: ${
|
|
305
|
-
font-size: ${
|
|
306
|
-
font-weight: ${
|
|
307
|
-
letter-spacing: ${
|
|
308
|
-
line-height: ${
|
|
309
|
-
text-transform: ${
|
|
310
|
-
}
|
|
311
|
-
`,
|
|
303
|
+
font-family: ${Ze};
|
|
304
|
+
font-size: ${Je};
|
|
305
|
+
font-weight: ${Xe};
|
|
306
|
+
letter-spacing: ${qe};
|
|
307
|
+
line-height: ${Ye};
|
|
308
|
+
text-transform: ${Ge};
|
|
309
|
+
}
|
|
310
|
+
`,hi=v`
|
|
312
311
|
.ft-typography {
|
|
313
312
|
vertical-align: inherit;
|
|
314
313
|
}
|
|
315
|
-
`;var
|
|
316
|
-
<${
|
|
314
|
+
`;var pi=function(t,e,i,o){for(var r,s=arguments.length,n=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(r=t[a])&&(n=(s<3?r(n):s>3?r(e,i,n):r(e,i))||n);return s>3&&n&&Object.defineProperty(e,i,n),n};class ci extends bt{constructor(){super(...arguments),this.variant=Ht.body1}render(){return this.element?Wt`
|
|
315
|
+
<${_t(this.element)}
|
|
317
316
|
class="ft-typography ft-typography--${this.variant}">
|
|
318
317
|
<slot></slot>
|
|
319
|
-
</${
|
|
320
|
-
`:
|
|
318
|
+
</${_t(this.element)}>
|
|
319
|
+
`:Wt`
|
|
321
320
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
322
|
-
`}}
|
|
321
|
+
`}}ci.styles=[Qe,ti,ei,ii,oi,ri,si,ni,ai,li,hi],pi([o()],ci.prototype,"element",void 0),pi([o()],ci.prototype,"variant",void 0),h("ft-typography")(ci);const fi={textColor:dt.extend("--ft-radio-text-color",ut.colorOnSurfaceHigh),colorPrimary:dt.external(ut.colorPrimary,"Design system"),colorOnPrimary:dt.external(ut.colorOnPrimary,"Design system"),borderColor:dt.extend("--ft-radio-border-color",ut.colorOnSurfaceMedium),colorOnSurfaceDisabled:dt.external(ut.colorOnSurfaceDisabled,"Design system")},di=v`
|
|
323
322
|
* {
|
|
324
323
|
box-sizing: border-box;
|
|
325
324
|
}
|
|
326
325
|
|
|
327
326
|
.ft-radio {
|
|
328
327
|
box-sizing: border-box;
|
|
329
|
-
color: ${
|
|
328
|
+
color: ${fi.textColor};
|
|
330
329
|
|
|
331
330
|
display: inline-flex;
|
|
332
331
|
align-items: center;
|
|
@@ -334,7 +333,7 @@ const jt=Symbol.for(""),Lt=t=>{if((null==t?void 0:t.r)===jt)return null==t?void
|
|
|
334
333
|
}
|
|
335
334
|
|
|
336
335
|
.ft-radio--disabled {
|
|
337
|
-
color: ${
|
|
336
|
+
color: ${fi.colorOnSurfaceDisabled};
|
|
338
337
|
}
|
|
339
338
|
|
|
340
339
|
input {
|
|
@@ -357,7 +356,7 @@ const jt=Symbol.for(""),Lt=t=>{if((null==t?void 0:t.r)===jt)return null==t?void
|
|
|
357
356
|
}
|
|
358
357
|
|
|
359
358
|
.ft-radio--box {
|
|
360
|
-
border: 2px solid ${
|
|
359
|
+
border: 2px solid ${fi.borderColor};
|
|
361
360
|
border-radius: 50%;
|
|
362
361
|
|
|
363
362
|
display: flex;
|
|
@@ -370,7 +369,7 @@ const jt=Symbol.for(""),Lt=t=>{if((null==t?void 0:t.r)===jt)return null==t?void
|
|
|
370
369
|
|
|
371
370
|
.ft-radio--box:after {
|
|
372
371
|
content: " ";
|
|
373
|
-
background-color: ${
|
|
372
|
+
background-color: ${fi.colorPrimary};
|
|
374
373
|
|
|
375
374
|
border-radius: 50%;
|
|
376
375
|
|
|
@@ -382,7 +381,7 @@ const jt=Symbol.for(""),Lt=t=>{if((null==t?void 0:t.r)===jt)return null==t?void
|
|
|
382
381
|
}
|
|
383
382
|
|
|
384
383
|
.ft-radio--checked .ft-radio--box {
|
|
385
|
-
border-color: ${
|
|
384
|
+
border-color: ${fi.colorPrimary};
|
|
386
385
|
}
|
|
387
386
|
|
|
388
387
|
|
|
@@ -391,15 +390,15 @@ const jt=Symbol.for(""),Lt=t=>{if((null==t?void 0:t.r)===jt)return null==t?void
|
|
|
391
390
|
}
|
|
392
391
|
|
|
393
392
|
.ft-radio--disabled .ft-radio--box {
|
|
394
|
-
border-color: ${
|
|
393
|
+
border-color: ${fi.colorOnSurfaceDisabled};
|
|
395
394
|
background-color: transparent;
|
|
396
395
|
}
|
|
397
396
|
|
|
398
397
|
.ft-radio--disabled .ft-radio--box:after {
|
|
399
|
-
background-color: ${
|
|
398
|
+
background-color: ${fi.colorOnSurfaceDisabled};
|
|
400
399
|
}
|
|
401
|
-
`;var
|
|
402
|
-
<div class="${
|
|
400
|
+
`;var ui=function(t,e,i,o){for(var r,s=arguments.length,n=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(r=t[a])&&(n=(s<3?r(n):s>3?r(e,i,n):r(e,i))||n);return s>3&&n&&Object.defineProperty(e,i,n),n};class yi extends CustomEvent{constructor(t,e){super("change",{detail:{value:t,checked:e},bubbles:!0,composed:!0})}}class vi extends bt{constructor(){super(...arguments),this.value="",this.name="",this.checked=!1,this.disabled=!1}render(){const t={"ft-radio":!0,"ft-radio--checked":this.checked,"ft-radio--disabled":this.disabled};return V`
|
|
401
|
+
<div class="${wt(t)}">
|
|
403
402
|
<div class="ft-radio--box-container">
|
|
404
403
|
<ft-ripple
|
|
405
404
|
?disabled=${this.disabled}
|
|
@@ -423,14 +422,14 @@ const jt=Symbol.for(""),Lt=t=>{if((null==t?void 0:t.r)===jt)return null==t?void
|
|
|
423
422
|
</ft-typography>
|
|
424
423
|
</label>
|
|
425
424
|
</div>
|
|
426
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new
|
|
425
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new yi(this.value,this.checked))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),null===(e=this.ripple)||void 0===e||e.setupFor(this.container)}select(){this.checked=!0,this.dispatchEvent(new yi(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}vi.elementDefinitions={"ft-ripple":zt,"ft-typography":ci},vi.styles=di,ui([o()],vi.prototype,"value",void 0),ui([o()],vi.prototype,"name",void 0),ui([o({type:Boolean,reflect:!0})],vi.prototype,"checked",void 0),ui([o({type:Boolean})],vi.prototype,"disabled",void 0),ui([n(".ft-radio")],vi.prototype,"container",void 0),ui([n("ft-ripple")],vi.prototype,"ripple",void 0),ui([n("input")],vi.prototype,"input",void 0);const gi=v`
|
|
427
426
|
:host {
|
|
428
427
|
display: contents;
|
|
429
428
|
}
|
|
430
|
-
`;var
|
|
429
|
+
`;var bi=function(t,e,i,o){for(var r,s=arguments.length,n=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(r=t[a])&&(n=(s<3?r(n):s>3?r(e,i,n):r(e,i))||n);return s>3&&n&&Object.defineProperty(e,i,n),n};class mi extends bt{constructor(){super(...arguments),this.name=""}render(){return V`
|
|
431
430
|
<slot @slotchange=${this.onSlotChange}
|
|
432
431
|
@change=${this.onChange}
|
|
433
432
|
@keydown=${this.onKeyDown}
|
|
434
433
|
@focusin=${this.focusCurrentValue}
|
|
435
434
|
></slot>
|
|
436
|
-
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((e=>e.checked=t.detail.value===e.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.focusCurrentValue()}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let e=this.findFtRadio(t),i=this.radioButtons.indexOf(e)-1;this.radioButtons[i<0?this.radioButtons.length-1:i].select();break}case"ArrowDown":case"ArrowRight":{let e=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[e>this.radioButtons.length-1?0:e].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}focusCurrentValue(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}
|
|
435
|
+
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((e=>e.checked=t.detail.value===e.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.focusCurrentValue()}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let e=this.findFtRadio(t),i=this.radioButtons.indexOf(e)-1;this.radioButtons[i<0?this.radioButtons.length-1:i].select();break}case"ArrowDown":case"ArrowRight":{let e=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[e>this.radioButtons.length-1?0:e].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}focusCurrentValue(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}mi.elementDefinitions={},mi.styles=gi,bi([o()],mi.prototype,"name",void 0),bi([function(t){const{slot:e,selector:i}=null!=t?t:{};return s({descriptor:o=>({get(){var o;const r="slot"+(e?`[name=${e}]`:":not([name])"),s=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(r),n=null!=s?l(s,t):[];return i?n.filter((t=>t.matches(i))):n},enumerable:!0,configurable:!0})})}()],mi.prototype,"radioButtons",void 0),h("ft-radio")(vi),h("ft-radio-group")(mi),t.FtRadio=vi,t.FtRadioChangeEvent=yi,t.FtRadioCssVariables=fi,t.FtRadioGroup=mi,t.FtRadioGroupCssVariables={},t.groupStyles=gi,t.styles=di,Object.defineProperty(t,"i",{value:!0})}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-radio",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.20",
|
|
4
4
|
"description": "A radio component",
|
|
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": "0.3.
|
|
23
|
-
"@fluid-topics/ft-typography": "0.3.
|
|
24
|
-
"@fluid-topics/ft-wc-utils": "0.3.
|
|
22
|
+
"@fluid-topics/ft-ripple": "0.3.20",
|
|
23
|
+
"@fluid-topics/ft-typography": "0.3.20",
|
|
24
|
+
"@fluid-topics/ft-wc-utils": "0.3.20",
|
|
25
25
|
"lit": "2.2.8"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "f06e98f4cd6c9f9ae741ca86f9a24cb84ce15ec5"
|
|
28
28
|
}
|