@fluid-topics/ft-radio 0.2.3 → 0.2.4
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.inline-styles.js +132 -118
- package/build/ft-radio.light.js +69 -55
- package/build/ft-radio.min.js +130 -116
- package/package.json +5 -5
package/build/ft-radio.light.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(t,i,e,o,s){var r=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,
|
|
1
|
+
!function(t,i,e,o,s){var r=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,p=t.length-1;p>=0;p--)(s=t[p])&&(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};const n=i.FtCssVariable.extend("--ft-ripple-color",i.designSystemVariables.colorContent),p=n,h=i.FtCssVariable.extend("--ft-ripple-background-color",n),l=i.FtCssVariable.external(i.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),a=i.FtCssVariable.external(i.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),f=i.FtCssVariable.external(i.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),d=i.FtCssVariable.external(i.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),c=i.FtCssVariable.extend("--ft-ripple-color",i.designSystemVariables.colorPrimary),y=c,u=i.FtCssVariable.extend("--ft-ripple-background-color",c),g=i.FtCssVariable.extend("--ft-ripple-color",i.designSystemVariables.colorSecondary),v=g,b=i.FtCssVariable.extend("--ft-ripple-background-color",g);class $ 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`
|
|
2
2
|
<style>
|
|
3
3
|
.ft-ripple .ft-ripple--effect,
|
|
4
4
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
<div class="ft-ripple--background"></div>
|
|
16
16
|
<div class="ft-ripple--effect"></div>
|
|
17
17
|
</div>
|
|
18
|
-
`}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){super.updated(t),t.has("disabled")&&this.disabled
|
|
18
|
+
`}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()}}
|
|
19
19
|
/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
23
|
*/
|
|
24
|
-
var
|
|
24
|
+
var m;$.elementDefinitions={},$.styles=e.css`
|
|
25
25
|
:host {
|
|
26
26
|
display: contents;
|
|
27
27
|
}
|
|
@@ -40,17 +40,30 @@ var y;c.elementDefinitions={},c.styles=e.css`
|
|
|
40
40
|
.ft-ripple .ft-ripple--effect {
|
|
41
41
|
position: absolute;
|
|
42
42
|
opacity: 0;
|
|
43
|
-
background-color: ${n};
|
|
44
43
|
}
|
|
45
44
|
|
|
46
|
-
.ft-ripple
|
|
47
|
-
|
|
45
|
+
.ft-ripple .ft-ripple--background {
|
|
46
|
+
background-color: ${h};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.ft-ripple .ft-ripple--effect {
|
|
48
50
|
background-color: ${p};
|
|
49
51
|
}
|
|
50
52
|
|
|
51
|
-
.ft-ripple.ft-ripple--
|
|
53
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
54
|
+
background-color: ${b};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
58
|
+
background-color: ${v};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
62
|
+
background-color: ${u};
|
|
63
|
+
}
|
|
64
|
+
|
|
52
65
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
53
|
-
background-color: ${
|
|
66
|
+
background-color: ${y};
|
|
54
67
|
}
|
|
55
68
|
|
|
56
69
|
.ft-ripple .ft-ripple--background {
|
|
@@ -58,6 +71,7 @@ var y;c.elementDefinitions={},c.styles=e.css`
|
|
|
58
71
|
left: 0;
|
|
59
72
|
height: 100%;
|
|
60
73
|
width: 100%;
|
|
74
|
+
transition: opacity 75ms linear;
|
|
61
75
|
}
|
|
62
76
|
|
|
63
77
|
.ft-ripple .ft-ripple--effect,
|
|
@@ -96,32 +110,23 @@ var y;c.elementDefinitions={},c.styles=e.css`
|
|
|
96
110
|
opacity: ${l};
|
|
97
111
|
transform: translate(-50%, -50%) scale(1);
|
|
98
112
|
}
|
|
99
|
-
`,r([o.property({type:Boolean})]
|
|
113
|
+
`,r([o.property({type:Boolean})],$.prototype,"primary",void 0),r([o.property({type:Boolean})],$.prototype,"secondary",void 0),r([o.property({type:Boolean})],$.prototype,"unbounded",void 0),r([o.property({type:Boolean})],$.prototype,"activated",void 0),r([o.property({type:Boolean})],$.prototype,"selected",void 0),r([o.property({type:Boolean})],$.prototype,"disabled",void 0),r([o.state()],$.prototype,"hovered",void 0),r([o.state()],$.prototype,"focused",void 0),r([o.state()],$.prototype,"pressed",void 0),r([o.state()],$.prototype,"rippling",void 0),r([o.state()],$.prototype,"rippleSize",void 0),r([o.state()],$.prototype,"originX",void 0),r([o.state()],$.prototype,"originY",void 0),r([o.query(".ft-ripple")],$.prototype,"ripple",void 0),r([o.query(".ft-ripple--effect")],$.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")($);const x=globalThis.trustedTypes,w=x?x.createPolicy("lit-html",{createHTML:t=>t}):void 0,k=`lit$${(Math.random()+"").slice(9)}$`,z="?"+k,A=`<${z}>`,_=document,C=(t="")=>_.createComment(t),O=t=>null===t||"object"!=typeof t&&"function"!=typeof t,S=Array.isArray,j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,D=/-->/g,E=/>/g,N=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,T=/'/g,I=/"/g,B=/^(?:script|style|textarea|title)$/i,M=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),R=Symbol.for("lit-noChange"),U=Symbol.for("lit-nothing"),F=new WeakMap,Z=_.createTreeWalker(_,129,null,!1),G=(t,i)=>{const e=t.length-1,o=[];let s,r=2===i?"<svg>":"",n=j;for(let i=0;i<e;i++){const e=t[i];let p,h,l=-1,a=0;for(;a<e.length&&(n.lastIndex=a,h=n.exec(e),null!==h);)a=n.lastIndex,n===j?"!--"===h[1]?n=D:void 0!==h[1]?n=E:void 0!==h[2]?(B.test(h[2])&&(s=RegExp("</"+h[2],"g")),n=N):void 0!==h[3]&&(n=N):n===N?">"===h[0]?(n=null!=s?s:j,l=-1):void 0===h[1]?l=-2:(l=n.lastIndex-h[2].length,p=h[1],n=void 0===h[3]?N:'"'===h[3]?I:T):n===I||n===T?n=N:n===D||n===E?n=j:(n=N,s=void 0);const f=n===N&&t[i+1].startsWith("/>")?" ":"";r+=n===j?e+A:l>=0?(o.push(p),e.slice(0,l)+"$lit$"+e.slice(l)+k+f):e+k+(-2===l?(o.push(void 0),i):f)}const p=r+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==w?w.createHTML(p):p,o]};class W{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let s=0,r=0;const n=t.length-1,p=this.parts,[h,l]=G(t,i);if(this.el=W.createElement(h,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())&&p.length<n;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(k)){const e=l[r++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split(k),i=/([.?@])?(.*)/.exec(e);p.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?X:"?"===i[1]?q:"@"===i[1]?J:P})}else p.push({type:6,index:s})}for(const i of t)o.removeAttribute(i)}if(B.test(o.tagName)){const t=o.textContent.split(k),i=t.length-1;if(i>0){o.textContent=x?x.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],C()),Z.nextNode(),p.push({type:2,index:++s});o.append(t[i],C())}}}else if(8===o.nodeType)if(o.data===z)p.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(k,t+1));)p.push({type:7,index:s}),t+=k.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,p;if(i===R)return i;let h=void 0!==o?null===(s=e._$Cl)||void 0===s?void 0:s[o]:e._$Cu;const l=O(i)?void 0:i._$litDirective$;return(null==h?void 0:h.constructor)!==l&&(null===(r=null==h?void 0:h._$AO)||void 0===r||r.call(h,!1),void 0===l?h=void 0:(h=new l(t),h._$AT(t,e,o)),void 0!==o?(null!==(n=(p=e)._$Cl)&&void 0!==n?n:p._$Cl=[])[o]=h:e._$Cu=h),void 0!==h&&(i=K(t,h._$AS(t,i.values),h,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);Z.currentNode=s;let r=Z.nextNode(),n=0,p=0,h=o[0];for(;void 0!==h;){if(n===h.index){let i;2===h.type?i=new L(r,r.nextSibling,this,t):1===h.type?i=new h.ctor(r,h.name,h.strings,this,t):6===h.type&&(i=new Q(r,this,t)),this.v.push(i),h=o[++p]}n!==(null==h?void 0:h.index)&&(r=Z.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=U,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cg=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._$Cg}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),O(t)?t===U||null==t||""===t?(this._$AH!==U&&this._$AR(),this._$AH=U):t!==this._$AH&&t!==R&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):(t=>{var i;return S(t)||"function"==typeof(null===(i=t)||void 0===i?void 0:i[Symbol.iterator])})(t)?this.A(t):this.$(t)}M(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==U&&O(this._$AH)?this._$AA.nextSibling.data=t:this.S(_.createTextNode(t)),this._$AH=t}T(t){var i;const{values:e,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=W.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.S(i),this._$AH=t}}_$AC(t){let i=F.get(t.strings);return void 0===i&&F.set(t.strings,i=new W(t)),i}A(t){S(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.M(C()),this.M(C()),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._$Cg=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class P{constructor(t,i,e,o,s){this.type=1,this._$AH=U,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=U}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=!O(t)||t!==this._$AH&&t!==R,r&&(this._$AH=t);else{const o=t;let n,p;for(t=s[0],n=0;n<s.length-1;n++)p=K(this,o[e+n],i,n),p===R&&(p=this._$AH[n]),r||(r=!O(p)||p!==this._$AH[n]),p===U?t=U:t!==U&&(t+=(null!=p?p:"")+s[n+1]),this._$AH[n]=p}r&&!o&&this.k(t)}k(t){t===U?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class X extends P{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===U?void 0:t}}const Y=x?x.emptyScript:"";class q extends P{constructor(){super(...arguments),this.type=4}k(t){t&&t!==U?this.element.setAttribute(this.name,Y):this.element.removeAttribute(this.name)}}class J extends P{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:U)===R)return;const o=this._$AH,s=t===U&&o!==U||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==U&&(o===U||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 V=window.litHtmlPolyfillSupport;null==V||V(W,L),(null!==(m=globalThis.litHtmlVersions)&&void 0!==m?m:globalThis.litHtmlVersions=[]).push("2.1.3");
|
|
100
114
|
/**
|
|
101
115
|
* @license
|
|
102
116
|
* Copyright 2020 Google LLC
|
|
103
117
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
104
118
|
*/
|
|
105
|
-
const
|
|
119
|
+
const tt=t=>({_$litStatic$:t}),it=new Map,et=(t=>(i,...e)=>{var o;const s=e.length;let r,n;const p=[],h=[];let l,a=0,f=!1;for(;a<s;){for(l=i[a];a<s&&void 0!==(n=e[a],r=null===(o=n)||void 0===o?void 0:o._$litStatic$);)l+=r+i[++a],f=!0;h.push(n),p.push(l),a++}if(a===s&&p.push(i[s]),f){const t=p.join("$$lit$$");void 0===(i=it.get(t))&&(p.raw=p,it.set(t,i=p)),e=h}return t(i,...e)})(M);var ot,st=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,p=t.length-1;p>=0;p--)(s=t[p])&&(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};!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"}(ot||(ot={}));const rt=i.FtCssVariable.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),nt=i.FtCssVariable.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),pt={fontFamily:nt,fontSize:i.FtCssVariable.create("--ft-typography-font-size","SIZE","16px"),fontWeight:i.FtCssVariable.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:i.FtCssVariable.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:i.FtCssVariable.create("--ft-typography-line-height","SIZE","24px"),textTransform:i.FtCssVariable.create("--ft-typography-text-transform","UNKNOWN","inherit")},ht=i.FtCssVariable.extend("--ft-typography-title-font-family",rt),lt=i.FtCssVariable.extend("--ft-typography-title-font-size",pt.fontSize,"20px"),at=i.FtCssVariable.extend("--ft-typography-title-font-weight",pt.fontWeight,"normal"),ft=i.FtCssVariable.extend("--ft-typography-title-letter-spacing",pt.letterSpacing,"0.15px"),dt=i.FtCssVariable.extend("--ft-typography-title-line-height",pt.lineHeight,"24px"),ct=i.FtCssVariable.extend("--ft-typography-title-text-transform",pt.textTransform,"inherit"),yt=i.FtCssVariable.extend("--ft-typography-title-dense-font-family",rt),ut=i.FtCssVariable.extend("--ft-typography-title-dense-font-size",pt.fontSize,"14px"),gt=i.FtCssVariable.extend("--ft-typography-title-dense-font-weight",pt.fontWeight,"normal"),vt=i.FtCssVariable.extend("--ft-typography-title-dense-letter-spacing",pt.letterSpacing,"0.105px"),bt=i.FtCssVariable.extend("--ft-typography-title-dense-line-height",pt.lineHeight,"24px"),$t=i.FtCssVariable.extend("--ft-typography-title-dense-text-transform",pt.textTransform,"inherit"),mt=i.FtCssVariable.extend("--ft-typography-subtitle1-font-family",nt),xt=i.FtCssVariable.extend("--ft-typography-subtitle1-font-size",pt.fontSize,"16px"),wt=i.FtCssVariable.extend("--ft-typography-subtitle1-font-weight",pt.fontWeight,"600"),kt=i.FtCssVariable.extend("--ft-typography-subtitle1-letter-spacing",pt.letterSpacing,"0.144px"),zt=i.FtCssVariable.extend("--ft-typography-subtitle1-line-height",pt.lineHeight,"24px"),At=i.FtCssVariable.extend("--ft-typography-subtitle1-text-transform",pt.textTransform,"inherit"),_t=i.FtCssVariable.extend("--ft-typography-subtitle2-font-family",nt),Ct=i.FtCssVariable.extend("--ft-typography-subtitle2-font-size",pt.fontSize,"14px"),Ot=i.FtCssVariable.extend("--ft-typography-subtitle2-font-weight",pt.fontWeight,"normal"),St=i.FtCssVariable.extend("--ft-typography-subtitle2-letter-spacing",pt.letterSpacing,"0.098px"),jt=i.FtCssVariable.extend("--ft-typography-subtitle2-line-height",pt.lineHeight,"24px"),Dt=i.FtCssVariable.extend("--ft-typography-subtitle2-text-transform",pt.textTransform,"inherit"),Et=i.FtCssVariable.extend("--ft-typography-body1-font-family",nt),Nt=i.FtCssVariable.extend("--ft-typography-body1-font-size",pt.fontSize,"16px"),Tt=i.FtCssVariable.extend("--ft-typography-body1-font-weight",pt.fontWeight,"normal"),It=i.FtCssVariable.extend("--ft-typography-body1-letter-spacing",pt.letterSpacing,"0.496px"),Bt=i.FtCssVariable.extend("--ft-typography-body1-line-height",pt.lineHeight,"24px"),Mt=i.FtCssVariable.extend("--ft-typography-body1-text-transform",pt.textTransform,"inherit"),Rt=i.FtCssVariable.extend("--ft-typography-body2-font-family",nt),Ut=i.FtCssVariable.extend("--ft-typography-body2-font-size",pt.fontSize,"14px"),Ft=i.FtCssVariable.extend("--ft-typography-body2-font-weight",pt.fontWeight,"normal"),Zt=i.FtCssVariable.extend("--ft-typography-body2-letter-spacing",pt.letterSpacing,"0.252px"),Gt=i.FtCssVariable.extend("--ft-typography-body2-line-height",pt.lineHeight,"20px"),Wt=i.FtCssVariable.extend("--ft-typography-body2-text-transform",pt.textTransform,"inherit"),Kt=i.FtCssVariable.extend("--ft-typography-caption-font-family",nt),Ht=i.FtCssVariable.extend("--ft-typography-caption-font-size",pt.fontSize,"12px"),Lt=i.FtCssVariable.extend("--ft-typography-caption-font-weight",pt.fontWeight,"normal"),Pt=i.FtCssVariable.extend("--ft-typography-caption-letter-spacing",pt.letterSpacing,"0.396px"),Xt=i.FtCssVariable.extend("--ft-typography-caption-line-height",pt.lineHeight,"16px"),Yt=i.FtCssVariable.extend("--ft-typography-caption-text-transform",pt.textTransform,"inherit"),qt=i.FtCssVariable.extend("--ft-typography-breadcrumb-font-family",nt),Jt=i.FtCssVariable.extend("--ft-typography-breadcrumb-font-size",pt.fontSize,"10px"),Qt=i.FtCssVariable.extend("--ft-typography-breadcrumb-font-weight",pt.fontWeight,"normal"),Vt=i.FtCssVariable.extend("--ft-typography-breadcrumb-letter-spacing",pt.letterSpacing,"0.33px"),ti=i.FtCssVariable.extend("--ft-typography-breadcrumb-line-height",pt.lineHeight,"16px"),ii=i.FtCssVariable.extend("--ft-typography-breadcrumb-text-transform",pt.textTransform,"inherit"),ei=i.FtCssVariable.extend("--ft-typography-overline-font-family",nt),oi=i.FtCssVariable.extend("--ft-typography-overline-font-size",pt.fontSize,"10px"),si=i.FtCssVariable.extend("--ft-typography-overline-font-weight",pt.fontWeight,"normal"),ri=i.FtCssVariable.extend("--ft-typography-overline-letter-spacing",pt.letterSpacing,"1.5px"),ni=i.FtCssVariable.extend("--ft-typography-overline-line-height",pt.lineHeight,"16px"),pi=i.FtCssVariable.extend("--ft-typography-overline-text-transform",pt.textTransform,"uppercase"),hi=i.FtCssVariable.extend("--ft-typography-button-font-family",nt),li=i.FtCssVariable.extend("--ft-typography-button-font-size",pt.fontSize,"14px"),ai=i.FtCssVariable.extend("--ft-typography-button-font-weight",pt.fontWeight,"600"),fi=i.FtCssVariable.extend("--ft-typography-button-letter-spacing",pt.letterSpacing,"1.246px"),di=i.FtCssVariable.extend("--ft-typography-button-line-height",pt.lineHeight,"16px"),ci=i.FtCssVariable.extend("--ft-typography-button-text-transform",pt.textTransform,"uppercase"),yi=e.css`
|
|
106
120
|
.ft-typography--title {
|
|
107
|
-
font-family: ${
|
|
108
|
-
font-size: ${ot};
|
|
109
|
-
font-weight: ${st};
|
|
110
|
-
letter-spacing: ${rt};
|
|
111
|
-
line-height: ${nt};
|
|
112
|
-
text-transform: ${ht};
|
|
113
|
-
}
|
|
114
|
-
`,li=e.css`
|
|
115
|
-
.ft-typography--title-dense {
|
|
116
|
-
font-family: ${pt};
|
|
121
|
+
font-family: ${ht};
|
|
117
122
|
font-size: ${lt};
|
|
118
123
|
font-weight: ${at};
|
|
119
124
|
letter-spacing: ${ft};
|
|
120
125
|
line-height: ${dt};
|
|
121
126
|
text-transform: ${ct};
|
|
122
127
|
}
|
|
123
|
-
`,
|
|
124
|
-
.ft-typography--
|
|
128
|
+
`,ui=e.css`
|
|
129
|
+
.ft-typography--title-dense {
|
|
125
130
|
font-family: ${yt};
|
|
126
131
|
font-size: ${ut};
|
|
127
132
|
font-weight: ${gt};
|
|
@@ -129,8 +134,8 @@ const X=t=>({_$litStatic$:t}),Y=new Map,q=(t=>(i,...e)=>{var o;const s=e.length;
|
|
|
129
134
|
line-height: ${bt};
|
|
130
135
|
text-transform: ${$t};
|
|
131
136
|
}
|
|
132
|
-
`,
|
|
133
|
-
.ft-typography--
|
|
137
|
+
`,gi=e.css`
|
|
138
|
+
.ft-typography--subtitle1 {
|
|
134
139
|
font-family: ${mt};
|
|
135
140
|
font-size: ${xt};
|
|
136
141
|
font-weight: ${wt};
|
|
@@ -138,9 +143,8 @@ const X=t=>({_$litStatic$:t}),Y=new Map,q=(t=>(i,...e)=>{var o;const s=e.length;
|
|
|
138
143
|
line-height: ${zt};
|
|
139
144
|
text-transform: ${At};
|
|
140
145
|
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
.ft-typography--body1 {
|
|
146
|
+
`,vi=e.css`
|
|
147
|
+
.ft-typography--subtitle2 {
|
|
144
148
|
font-family: ${_t};
|
|
145
149
|
font-size: ${Ct};
|
|
146
150
|
font-weight: ${Ot};
|
|
@@ -148,8 +152,9 @@ const X=t=>({_$litStatic$:t}),Y=new Map,q=(t=>(i,...e)=>{var o;const s=e.length;
|
|
|
148
152
|
line-height: ${jt};
|
|
149
153
|
text-transform: ${Dt};
|
|
150
154
|
}
|
|
151
|
-
|
|
152
|
-
|
|
155
|
+
|
|
156
|
+
`,bi=e.css`
|
|
157
|
+
.ft-typography--body1 {
|
|
153
158
|
font-family: ${Et};
|
|
154
159
|
font-size: ${Nt};
|
|
155
160
|
font-weight: ${Tt};
|
|
@@ -157,8 +162,8 @@ const X=t=>({_$litStatic$:t}),Y=new Map,q=(t=>(i,...e)=>{var o;const s=e.length;
|
|
|
157
162
|
line-height: ${Bt};
|
|
158
163
|
text-transform: ${Mt};
|
|
159
164
|
}
|
|
160
|
-
|
|
161
|
-
.ft-typography--
|
|
165
|
+
`,$i=e.css`
|
|
166
|
+
.ft-typography--body2 {
|
|
162
167
|
font-family: ${Rt};
|
|
163
168
|
font-size: ${Ut};
|
|
164
169
|
font-weight: ${Ft};
|
|
@@ -166,8 +171,8 @@ const X=t=>({_$litStatic$:t}),Y=new Map,q=(t=>(i,...e)=>{var o;const s=e.length;
|
|
|
166
171
|
line-height: ${Gt};
|
|
167
172
|
text-transform: ${Wt};
|
|
168
173
|
}
|
|
169
|
-
`,
|
|
170
|
-
.ft-typography--
|
|
174
|
+
`,mi=e.css`
|
|
175
|
+
.ft-typography--caption {
|
|
171
176
|
font-family: ${Kt};
|
|
172
177
|
font-size: ${Ht};
|
|
173
178
|
font-weight: ${Lt};
|
|
@@ -175,8 +180,8 @@ const X=t=>({_$litStatic$:t}),Y=new Map,q=(t=>(i,...e)=>{var o;const s=e.length;
|
|
|
175
180
|
line-height: ${Xt};
|
|
176
181
|
text-transform: ${Yt};
|
|
177
182
|
}
|
|
178
|
-
`,
|
|
179
|
-
.ft-typography--
|
|
183
|
+
`,xi=e.css`
|
|
184
|
+
.ft-typography--breadcrumb {
|
|
180
185
|
font-family: ${qt};
|
|
181
186
|
font-size: ${Jt};
|
|
182
187
|
font-weight: ${Qt};
|
|
@@ -184,27 +189,36 @@ const X=t=>({_$litStatic$:t}),Y=new Map,q=(t=>(i,...e)=>{var o;const s=e.length;
|
|
|
184
189
|
line-height: ${ti};
|
|
185
190
|
text-transform: ${ii};
|
|
186
191
|
}
|
|
187
|
-
`,
|
|
188
|
-
.ft-typography--
|
|
192
|
+
`,wi=e.css`
|
|
193
|
+
.ft-typography--overline {
|
|
189
194
|
font-family: ${ei};
|
|
190
195
|
font-size: ${oi};
|
|
191
196
|
font-weight: ${si};
|
|
192
197
|
letter-spacing: ${ri};
|
|
193
198
|
line-height: ${ni};
|
|
194
|
-
text-transform: ${
|
|
199
|
+
text-transform: ${pi};
|
|
200
|
+
}
|
|
201
|
+
`,ki=e.css`
|
|
202
|
+
.ft-typography--button {
|
|
203
|
+
font-family: ${hi};
|
|
204
|
+
font-size: ${li};
|
|
205
|
+
font-weight: ${ai};
|
|
206
|
+
letter-spacing: ${fi};
|
|
207
|
+
line-height: ${di};
|
|
208
|
+
text-transform: ${ci};
|
|
195
209
|
}
|
|
196
|
-
`;class
|
|
197
|
-
<${
|
|
210
|
+
`;class zi extends i.FtLitElement{constructor(){super(...arguments),this.variant=ot.body1}render(){return this.element?et`
|
|
211
|
+
<${tt(this.element)}
|
|
198
212
|
class="ft-typography ft-typography--${this.variant}">
|
|
199
213
|
<slot></slot>
|
|
200
|
-
</${
|
|
201
|
-
`:
|
|
214
|
+
</${tt(this.element)}>
|
|
215
|
+
`:et`
|
|
202
216
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
203
|
-
`}}
|
|
217
|
+
`}}zi.styles=[yi,ui,gi,vi,bi,$i,mi,xi,wi,ki,e.css`
|
|
204
218
|
.ft-typography {
|
|
205
219
|
vertical-align: inherit;
|
|
206
220
|
}
|
|
207
|
-
`],
|
|
221
|
+
`],st([o.property()],zi.prototype,"element",void 0),st([o.property()],zi.prototype,"variant",void 0),i.customElement("ft-typography")(zi);var Ai=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,p=t.length-1;p>=0;p--)(s=t[p])&&(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};const _i={textColor:i.FtCssVariable.extend("--ft-radio-text-color",i.designSystemVariables.colorOnSurfaceHigh),colorPrimary:i.FtCssVariable.external(i.designSystemVariables.colorPrimary,"Design system"),colorOnPrimary:i.FtCssVariable.external(i.designSystemVariables.colorOnPrimary,"Design system"),borderColor:i.FtCssVariable.extend("--ft-radio-border-color",i.designSystemVariables.colorOnSurfaceMedium),colorOnSurfaceDisabled:i.FtCssVariable.external(i.designSystemVariables.colorOnSurfaceDisabled,"Design system")};class Ci extends CustomEvent{constructor(t,i){super("change",{detail:{value:t,checked:i},bubbles:!0,composed:!0})}}class Oi 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`
|
|
208
222
|
<div class="${s.classMap(t)}">
|
|
209
223
|
<div class="ft-radio--box-container">
|
|
210
224
|
<input id="radio-button"
|
|
@@ -229,14 +243,14 @@ const X=t=>({_$litStatic$:t}),Y=new Map,q=(t=>(i,...e)=>{var o;const s=e.length;
|
|
|
229
243
|
</ft-typography>
|
|
230
244
|
</label>
|
|
231
245
|
</div>
|
|
232
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new
|
|
246
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new Ci(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 Ci(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}Oi.elementDefinitions={"ft-ripple":$,"ft-typography":zi},Oi.styles=e.css`
|
|
233
247
|
* {
|
|
234
248
|
box-sizing: border-box;
|
|
235
249
|
}
|
|
236
250
|
|
|
237
251
|
.ft-radio {
|
|
238
252
|
box-sizing: border-box;
|
|
239
|
-
color: ${
|
|
253
|
+
color: ${_i.textColor};
|
|
240
254
|
|
|
241
255
|
display: inline-flex;
|
|
242
256
|
align-items: center;
|
|
@@ -244,7 +258,7 @@ const X=t=>({_$litStatic$:t}),Y=new Map,q=(t=>(i,...e)=>{var o;const s=e.length;
|
|
|
244
258
|
}
|
|
245
259
|
|
|
246
260
|
.ft-radio--disabled {
|
|
247
|
-
color: ${
|
|
261
|
+
color: ${_i.colorOnSurfaceDisabled};
|
|
248
262
|
}
|
|
249
263
|
|
|
250
264
|
input {
|
|
@@ -267,7 +281,7 @@ const X=t=>({_$litStatic$:t}),Y=new Map,q=(t=>(i,...e)=>{var o;const s=e.length;
|
|
|
267
281
|
}
|
|
268
282
|
|
|
269
283
|
.ft-radio--box {
|
|
270
|
-
border: 2px solid ${
|
|
284
|
+
border: 2px solid ${_i.borderColor};
|
|
271
285
|
border-radius: 50%;
|
|
272
286
|
|
|
273
287
|
display: flex;
|
|
@@ -280,7 +294,7 @@ const X=t=>({_$litStatic$:t}),Y=new Map,q=(t=>(i,...e)=>{var o;const s=e.length;
|
|
|
280
294
|
|
|
281
295
|
.ft-radio--box:after {
|
|
282
296
|
content: " ";
|
|
283
|
-
background-color: ${
|
|
297
|
+
background-color: ${_i.colorPrimary};
|
|
284
298
|
|
|
285
299
|
border-radius: 50%;
|
|
286
300
|
|
|
@@ -292,7 +306,7 @@ const X=t=>({_$litStatic$:t}),Y=new Map,q=(t=>(i,...e)=>{var o;const s=e.length;
|
|
|
292
306
|
}
|
|
293
307
|
|
|
294
308
|
.ft-radio--checked .ft-radio--box {
|
|
295
|
-
border-color: ${
|
|
309
|
+
border-color: ${_i.colorPrimary};
|
|
296
310
|
}
|
|
297
311
|
|
|
298
312
|
|
|
@@ -301,21 +315,21 @@ const X=t=>({_$litStatic$:t}),Y=new Map,q=(t=>(i,...e)=>{var o;const s=e.length;
|
|
|
301
315
|
}
|
|
302
316
|
|
|
303
317
|
.ft-radio--disabled .ft-radio--box {
|
|
304
|
-
border-color: ${
|
|
318
|
+
border-color: ${_i.colorOnSurfaceDisabled};
|
|
305
319
|
background-color: transparent;
|
|
306
320
|
}
|
|
307
321
|
|
|
308
322
|
.ft-radio--disabled .ft-radio--box:after {
|
|
309
|
-
background-color: ${
|
|
323
|
+
background-color: ${_i.colorOnSurfaceDisabled};
|
|
310
324
|
}
|
|
311
|
-
|
|
325
|
+
`,Ai([o.property()],Oi.prototype,"value",void 0),Ai([o.property()],Oi.prototype,"name",void 0),Ai([o.property({type:Boolean})],Oi.prototype,"checked",void 0),Ai([o.property({type:Boolean})],Oi.prototype,"disabled",void 0),Ai([o.query(".ft-radio")],Oi.prototype,"container",void 0),Ai([o.query("ft-ripple")],Oi.prototype,"ripple",void 0),Ai([o.query("input")],Oi.prototype,"input",void 0);var Si=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,p=t.length-1;p>=0;p--)(s=t[p])&&(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.name=""}render(){return e.html`
|
|
312
326
|
<slot @slotchange=${this.onSlotChange}
|
|
313
327
|
@change=${this.onChange}
|
|
314
328
|
@keydown=${this.onKeyDown}
|
|
315
329
|
@focusin=${this.onFocusIn}
|
|
316
330
|
></slot>
|
|
317
|
-
`}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}))}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))}onFocusIn(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}
|
|
331
|
+
`}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}))}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))}onFocusIn(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}ji.elementDefinitions={},ji.styles=e.css`
|
|
318
332
|
:host {
|
|
319
333
|
display: contents;
|
|
320
334
|
}
|
|
321
|
-
`,
|
|
335
|
+
`,Si([o.property()],ji.prototype,"name",void 0),Si([o.queryAssignedElements()],ji.prototype,"radioButtons",void 0),i.customElement("ft-radio")(Oi),i.customElement("ft-radio-group")(ji),t.FtRadio=Oi,t.FtRadioChangeEvent=Ci,t.FtRadioCssVariables=_i,t.FtRadioGroup=ji,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap);
|