@fluid-topics/ft-checkbox 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-checkbox.inline-styles.js +130 -116
- package/build/ft-checkbox.light.js +68 -54
- package/build/ft-checkbox.min.js +128 -114
- package/package.json +5 -5
|
@@ -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,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};const n=i.FtCssVariable.extend("--ft-ripple-color",i.designSystemVariables.colorContent),h=i.FtCssVariable.extend("--ft-ripple-
|
|
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,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};const n=i.FtCssVariable.extend("--ft-ripple-color",i.designSystemVariables.colorContent),h=n,p=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"),c=i.FtCssVariable.external(i.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),d=i.FtCssVariable.extend("--ft-ripple-color",i.designSystemVariables.colorPrimary),y=d,g=i.FtCssVariable.extend("--ft-ripple-background-color",d),u=i.FtCssVariable.extend("--ft-ripple-color",i.designSystemVariables.colorSecondary),b=u,v=i.FtCssVariable.extend("--ft-ripple-background-color",u);class m 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 x;m.elementDefinitions={},m.styles=e.css`
|
|
25
25
|
:host {
|
|
26
26
|
display: contents;
|
|
27
27
|
}
|
|
@@ -40,24 +40,38 @@ var d;y.elementDefinitions={},y.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
|
-
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
45
|
+
.ft-ripple .ft-ripple--background {
|
|
48
46
|
background-color: ${p};
|
|
49
47
|
}
|
|
50
48
|
|
|
51
|
-
.ft-ripple.ft-ripple--
|
|
52
|
-
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
49
|
+
.ft-ripple .ft-ripple--effect {
|
|
53
50
|
background-color: ${h};
|
|
54
51
|
}
|
|
55
52
|
|
|
53
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
54
|
+
background-color: ${v};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
58
|
+
background-color: ${b};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
62
|
+
background-color: ${g};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
66
|
+
background-color: ${y};
|
|
67
|
+
}
|
|
68
|
+
|
|
56
69
|
.ft-ripple .ft-ripple--background {
|
|
57
70
|
top: 0;
|
|
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,41 +110,32 @@ var d;y.elementDefinitions={},y.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})],m.prototype,"primary",void 0),r([o.property({type:Boolean})],m.prototype,"secondary",void 0),r([o.property({type:Boolean})],m.prototype,"unbounded",void 0),r([o.property({type:Boolean})],m.prototype,"activated",void 0),r([o.property({type:Boolean})],m.prototype,"selected",void 0),r([o.property({type:Boolean})],m.prototype,"disabled",void 0),r([o.state()],m.prototype,"hovered",void 0),r([o.state()],m.prototype,"focused",void 0),r([o.state()],m.prototype,"pressed",void 0),r([o.state()],m.prototype,"rippling",void 0),r([o.state()],m.prototype,"rippleSize",void 0),r([o.state()],m.prototype,"originX",void 0),r([o.state()],m.prototype,"originY",void 0),r([o.query(".ft-ripple")],m.prototype,"ripple",void 0),r([o.query(".ft-ripple--effect")],m.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(m);const $=globalThis.trustedTypes,k=$?$.createPolicy("lit-html",{createHTML:t=>t}):void 0,w=`lit$${(Math.random()+"").slice(9)}$`,z="?"+w,A=`<${z}>`,_=document,S=(t="")=>_.createComment(t),C=t=>null===t||"object"!=typeof t&&"function"!=typeof t,O=Array.isArray,M=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,N=/-->/g,B=/>/g,E=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,j=/'/g,T=/"/g,D=/^(?:script|style|textarea|title)$/i,I=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),U=Symbol.for("lit-noChange"),R=Symbol.for("lit-nothing"),Z=new WeakMap,G=_.createTreeWalker(_,129,null,!1),W=(t,i)=>{const e=t.length-1,o=[];let s,r=2===i?"<svg>":"",n=M;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===M?"!--"===p[1]?n=N:void 0!==p[1]?n=B:void 0!==p[2]?(D.test(p[2])&&(s=RegExp("</"+p[2],"g")),n=E):void 0!==p[3]&&(n=E):n===E?">"===p[0]?(n=null!=s?s:M,l=-1):void 0===p[1]?l=-2:(l=n.lastIndex-p[2].length,h=p[1],n=void 0===p[3]?E:'"'===p[3]?T:j):n===T||n===j?n=E:n===N||n===B?n=M:(n=E,s=void 0);const f=n===E&&t[i+1].startsWith("/>")?" ":"";r+=n===M?e+A:l>=0?(o.push(h),e.slice(0,l)+"$lit$"+e.slice(l)+w+f):e+w+(-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!==k?k.createHTML(h):h,o]};class F{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]=W(t,i);if(this.el=F.createElement(p,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(w)){const e=l[r++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split(w),i=/([.?@])?(.*)/.exec(e);h.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?X:"?"===i[1]?q:"@"===i[1]?J:L})}else h.push({type:6,index:s})}for(const i of t)o.removeAttribute(i)}if(D.test(o.tagName)){const t=o.textContent.split(w),i=t.length-1;if(i>0){o.textContent=$?$.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],S()),G.nextNode(),h.push({type:2,index:++s});o.append(t[i],S())}}}else if(8===o.nodeType)if(o.data===z)h.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(w,t+1));)h.push({type:7,index:s}),t+=w.length-1}s++}}static createElement(t,i){const e=_.createElement("template");return e.innerHTML=t,e}}function H(t,i,e=t,o){var s,r,n,h;if(i===U)return i;let p=void 0!==o?null===(s=e._$Cl)||void 0===s?void 0:s[o]:e._$Cu;const l=C(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)._$Cl)&&void 0!==n?n:h._$Cl=[])[o]=p:e._$Cu=p),void 0!==p&&(i=H(t,p._$AS(t,i.values),p,o)),i}class K{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,p=o[0];for(;void 0!==p;){if(n===p.index){let i;2===p.type?i=new P(r,r.nextSibling,this,t):1===p.type?i=new p.ctor(r,p.name,p.strings,this,t):6===p.type&&(i=new Q(r,this,t)),this.v.push(i),p=o[++h]}n!==(null==p?void 0:p.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 P{constructor(t,i,e,o){var s;this.type=2,this._$AH=R,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=H(this,t,i),C(t)?t===R||null==t||""===t?(this._$AH!==R&&this._$AR(),this._$AH=R):t!==this._$AH&&t!==U&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):(t=>{var i;return O(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!==R&&C(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=F.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 K(s,this),i=t.p(this.options);t.m(e),this.S(i),this._$AH=t}}_$AC(t){let i=Z.get(t.strings);return void 0===i&&Z.set(t.strings,i=new F(t)),i}A(t){O(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 P(this.M(S()),this.M(S()),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 L{constructor(t,i,e,o,s){this.type=1,this._$AH=R,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=R}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=H(this,t,i,0),r=!C(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=H(this,o[e+n],i,n),h===U&&(h=this._$AH[n]),r||(r=!C(h)||h!==this._$AH[n]),h===R?t=R:t!==R&&(t+=(null!=h?h:"")+s[n+1]),this._$AH[n]=h}r&&!o&&this.k(t)}k(t){t===R?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class X extends L{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===R?void 0:t}}const Y=$?$.emptyScript:"";class q extends L{constructor(){super(...arguments),this.type=4}k(t){t&&t!==R?this.element.setAttribute(this.name,Y):this.element.removeAttribute(this.name)}}class J extends L{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=H(this,t,i,0))&&void 0!==e?e:R)===U)return;const o=this._$AH,s=t===R&&o!==R||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==R&&(o===R||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){H(this,t)}}const V=window.litHtmlPolyfillSupport;null==V||V(F,P),(null!==(x=globalThis.litHtmlVersions)&&void 0!==x?x: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 h=[],p=[];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;p.push(n),h.push(l),a++}if(a===s&&h.push(i[s]),f){const t=h.join("$$lit$$");void 0===(i=it.get(t))&&(h.raw=h,it.set(t,i=h)),e=p}return t(i,...e)})(I);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,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};!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),ht={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")},pt=i.FtCssVariable.extend("--ft-typography-title-font-family",rt),lt=i.FtCssVariable.extend("--ft-typography-title-font-size",ht.fontSize,"20px"),at=i.FtCssVariable.extend("--ft-typography-title-font-weight",ht.fontWeight,"normal"),ft=i.FtCssVariable.extend("--ft-typography-title-letter-spacing",ht.letterSpacing,"0.15px"),ct=i.FtCssVariable.extend("--ft-typography-title-line-height",ht.lineHeight,"24px"),dt=i.FtCssVariable.extend("--ft-typography-title-text-transform",ht.textTransform,"inherit"),yt=i.FtCssVariable.extend("--ft-typography-title-dense-font-family",rt),gt=i.FtCssVariable.extend("--ft-typography-title-dense-font-size",ht.fontSize,"14px"),ut=i.FtCssVariable.extend("--ft-typography-title-dense-font-weight",ht.fontWeight,"normal"),bt=i.FtCssVariable.extend("--ft-typography-title-dense-letter-spacing",ht.letterSpacing,"0.105px"),vt=i.FtCssVariable.extend("--ft-typography-title-dense-line-height",ht.lineHeight,"24px"),mt=i.FtCssVariable.extend("--ft-typography-title-dense-text-transform",ht.textTransform,"inherit"),xt=i.FtCssVariable.extend("--ft-typography-subtitle1-font-family",nt),$t=i.FtCssVariable.extend("--ft-typography-subtitle1-font-size",ht.fontSize,"16px"),kt=i.FtCssVariable.extend("--ft-typography-subtitle1-font-weight",ht.fontWeight,"600"),wt=i.FtCssVariable.extend("--ft-typography-subtitle1-letter-spacing",ht.letterSpacing,"0.144px"),zt=i.FtCssVariable.extend("--ft-typography-subtitle1-line-height",ht.lineHeight,"24px"),At=i.FtCssVariable.extend("--ft-typography-subtitle1-text-transform",ht.textTransform,"inherit"),_t=i.FtCssVariable.extend("--ft-typography-subtitle2-font-family",nt),St=i.FtCssVariable.extend("--ft-typography-subtitle2-font-size",ht.fontSize,"14px"),Ct=i.FtCssVariable.extend("--ft-typography-subtitle2-font-weight",ht.fontWeight,"normal"),Ot=i.FtCssVariable.extend("--ft-typography-subtitle2-letter-spacing",ht.letterSpacing,"0.098px"),Mt=i.FtCssVariable.extend("--ft-typography-subtitle2-line-height",ht.lineHeight,"24px"),Nt=i.FtCssVariable.extend("--ft-typography-subtitle2-text-transform",ht.textTransform,"inherit"),Bt=i.FtCssVariable.extend("--ft-typography-body1-font-family",nt),Et=i.FtCssVariable.extend("--ft-typography-body1-font-size",ht.fontSize,"16px"),jt=i.FtCssVariable.extend("--ft-typography-body1-font-weight",ht.fontWeight,"normal"),Tt=i.FtCssVariable.extend("--ft-typography-body1-letter-spacing",ht.letterSpacing,"0.496px"),Dt=i.FtCssVariable.extend("--ft-typography-body1-line-height",ht.lineHeight,"24px"),It=i.FtCssVariable.extend("--ft-typography-body1-text-transform",ht.textTransform,"inherit"),Ut=i.FtCssVariable.extend("--ft-typography-body2-font-family",nt),Rt=i.FtCssVariable.extend("--ft-typography-body2-font-size",ht.fontSize,"14px"),Zt=i.FtCssVariable.extend("--ft-typography-body2-font-weight",ht.fontWeight,"normal"),Gt=i.FtCssVariable.extend("--ft-typography-body2-letter-spacing",ht.letterSpacing,"0.252px"),Wt=i.FtCssVariable.extend("--ft-typography-body2-line-height",ht.lineHeight,"20px"),Ft=i.FtCssVariable.extend("--ft-typography-body2-text-transform",ht.textTransform,"inherit"),Ht=i.FtCssVariable.extend("--ft-typography-caption-font-family",nt),Kt=i.FtCssVariable.extend("--ft-typography-caption-font-size",ht.fontSize,"12px"),Pt=i.FtCssVariable.extend("--ft-typography-caption-font-weight",ht.fontWeight,"normal"),Lt=i.FtCssVariable.extend("--ft-typography-caption-letter-spacing",ht.letterSpacing,"0.396px"),Xt=i.FtCssVariable.extend("--ft-typography-caption-line-height",ht.lineHeight,"16px"),Yt=i.FtCssVariable.extend("--ft-typography-caption-text-transform",ht.textTransform,"inherit"),qt=i.FtCssVariable.extend("--ft-typography-breadcrumb-font-family",nt),Jt=i.FtCssVariable.extend("--ft-typography-breadcrumb-font-size",ht.fontSize,"10px"),Qt=i.FtCssVariable.extend("--ft-typography-breadcrumb-font-weight",ht.fontWeight,"normal"),Vt=i.FtCssVariable.extend("--ft-typography-breadcrumb-letter-spacing",ht.letterSpacing,"0.33px"),ti=i.FtCssVariable.extend("--ft-typography-breadcrumb-line-height",ht.lineHeight,"16px"),ii=i.FtCssVariable.extend("--ft-typography-breadcrumb-text-transform",ht.textTransform,"inherit"),ei=i.FtCssVariable.extend("--ft-typography-overline-font-family",nt),oi=i.FtCssVariable.extend("--ft-typography-overline-font-size",ht.fontSize,"10px"),si=i.FtCssVariable.extend("--ft-typography-overline-font-weight",ht.fontWeight,"normal"),ri=i.FtCssVariable.extend("--ft-typography-overline-letter-spacing",ht.letterSpacing,"1.5px"),ni=i.FtCssVariable.extend("--ft-typography-overline-line-height",ht.lineHeight,"16px"),hi=i.FtCssVariable.extend("--ft-typography-overline-text-transform",ht.textTransform,"uppercase"),pi=i.FtCssVariable.extend("--ft-typography-button-font-family",nt),li=i.FtCssVariable.extend("--ft-typography-button-font-size",ht.fontSize,"14px"),ai=i.FtCssVariable.extend("--ft-typography-button-font-weight",ht.fontWeight,"600"),fi=i.FtCssVariable.extend("--ft-typography-button-letter-spacing",ht.letterSpacing,"1.246px"),ci=i.FtCssVariable.extend("--ft-typography-button-line-height",ht.lineHeight,"16px"),di=i.FtCssVariable.extend("--ft-typography-button-text-transform",ht.textTransform,"uppercase"),yi=e.css`
|
|
106
120
|
.ft-typography--title {
|
|
107
|
-
font-family: ${et};
|
|
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
121
|
font-family: ${pt};
|
|
117
122
|
font-size: ${lt};
|
|
118
123
|
font-weight: ${at};
|
|
119
124
|
letter-spacing: ${ft};
|
|
120
125
|
line-height: ${ct};
|
|
121
|
-
text-transform: ${
|
|
126
|
+
text-transform: ${dt};
|
|
122
127
|
}
|
|
123
|
-
`,
|
|
124
|
-
.ft-typography--
|
|
125
|
-
font-family: ${
|
|
128
|
+
`,gi=e.css`
|
|
129
|
+
.ft-typography--title-dense {
|
|
130
|
+
font-family: ${yt};
|
|
126
131
|
font-size: ${gt};
|
|
127
132
|
font-weight: ${ut};
|
|
128
133
|
letter-spacing: ${bt};
|
|
129
134
|
line-height: ${vt};
|
|
130
135
|
text-transform: ${mt};
|
|
131
136
|
}
|
|
132
|
-
`,
|
|
133
|
-
.ft-typography--
|
|
137
|
+
`,ui=e.css`
|
|
138
|
+
.ft-typography--subtitle1 {
|
|
134
139
|
font-family: ${xt};
|
|
135
140
|
font-size: ${$t};
|
|
136
141
|
font-weight: ${kt};
|
|
@@ -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
|
+
`,bi=e.css`
|
|
147
|
+
.ft-typography--subtitle2 {
|
|
144
148
|
font-family: ${_t};
|
|
145
149
|
font-size: ${St};
|
|
146
150
|
font-weight: ${Ct};
|
|
@@ -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: ${Mt};
|
|
149
153
|
text-transform: ${Nt};
|
|
150
154
|
}
|
|
151
|
-
|
|
152
|
-
|
|
155
|
+
|
|
156
|
+
`,vi=e.css`
|
|
157
|
+
.ft-typography--body1 {
|
|
153
158
|
font-family: ${Bt};
|
|
154
159
|
font-size: ${Et};
|
|
155
160
|
font-weight: ${jt};
|
|
@@ -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: ${Dt};
|
|
158
163
|
text-transform: ${It};
|
|
159
164
|
}
|
|
160
|
-
`,
|
|
161
|
-
.ft-typography--
|
|
165
|
+
`,mi=e.css`
|
|
166
|
+
.ft-typography--body2 {
|
|
162
167
|
font-family: ${Ut};
|
|
163
168
|
font-size: ${Rt};
|
|
164
169
|
font-weight: ${Zt};
|
|
@@ -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: ${Wt};
|
|
167
172
|
text-transform: ${Ft};
|
|
168
173
|
}
|
|
169
|
-
`,
|
|
170
|
-
.ft-typography--
|
|
174
|
+
`,xi=e.css`
|
|
175
|
+
.ft-typography--caption {
|
|
171
176
|
font-family: ${Ht};
|
|
172
177
|
font-size: ${Kt};
|
|
173
178
|
font-weight: ${Pt};
|
|
@@ -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
|
+
`,$i=e.css`
|
|
184
|
+
.ft-typography--breadcrumb {
|
|
180
185
|
font-family: ${qt};
|
|
181
186
|
font-size: ${Jt};
|
|
182
187
|
font-weight: ${Qt};
|
|
@@ -184,8 +189,8 @@ 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
|
+
`,ki=e.css`
|
|
193
|
+
.ft-typography--overline {
|
|
189
194
|
font-family: ${ei};
|
|
190
195
|
font-size: ${oi};
|
|
191
196
|
font-weight: ${si};
|
|
@@ -193,18 +198,27 @@ const X=t=>({_$litStatic$:t}),Y=new Map,q=(t=>(i,...e)=>{var o;const s=e.length;
|
|
|
193
198
|
line-height: ${ni};
|
|
194
199
|
text-transform: ${hi};
|
|
195
200
|
}
|
|
196
|
-
|
|
197
|
-
|
|
201
|
+
`,wi=e.css`
|
|
202
|
+
.ft-typography--button {
|
|
203
|
+
font-family: ${pi};
|
|
204
|
+
font-size: ${li};
|
|
205
|
+
font-weight: ${ai};
|
|
206
|
+
letter-spacing: ${fi};
|
|
207
|
+
line-height: ${ci};
|
|
208
|
+
text-transform: ${di};
|
|
209
|
+
}
|
|
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,gi,ui,bi,vi,mi,xi,$i,ki,wi,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,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};const _i={textColor:i.FtCssVariable.extend("--ft-checkbox-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-checkbox-border-color",i.designSystemVariables.colorOnSurfaceMedium),colorOnSurfaceDisabled:i.FtCssVariable.external(i.designSystemVariables.colorOnSurfaceDisabled,"Design system")};class Si extends i.FtLitElement{constructor(){super(...arguments),this.name="",this.checked=!1,this.indeterminate=!1,this.disabled=!1}render(){const t={"ft-checkbox":!0,"ft-checkbox--checked":this.checked,"ft-checkbox--indeterminate":this.indeterminate,"ft-checkbox--disabled":this.disabled};return e.html`
|
|
208
222
|
<label class="${s.classMap(t)}">
|
|
209
223
|
<div class="ft-checkbox--box-container">
|
|
210
224
|
<input type="checkbox"
|
|
@@ -229,14 +243,14 @@ const X=t=>({_$litStatic$:t}),Y=new Map,q=(t=>(i,...e)=>{var o;const s=e.length;
|
|
|
229
243
|
<slot></slot>
|
|
230
244
|
</ft-typography>
|
|
231
245
|
</label>
|
|
232
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("change",{detail:this.checked}))}contentAvailableCallback(t){var i;super.contentAvailableCallback(t),null===(i=this.ripple)||void 0===i||i.setupFor(this.container)}}
|
|
246
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("change",{detail:this.checked}))}contentAvailableCallback(t){var i;super.contentAvailableCallback(t),null===(i=this.ripple)||void 0===i||i.setupFor(this.container)}}Si.elementDefinitions={"ft-ripple":m,"ft-typography":zi},Si.styles=e.css`
|
|
233
247
|
* {
|
|
234
248
|
box-sizing: border-box;
|
|
235
249
|
}
|
|
236
250
|
|
|
237
251
|
.ft-checkbox {
|
|
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-checkbox--disabled {
|
|
247
|
-
color: ${
|
|
261
|
+
color: ${_i.colorOnSurfaceDisabled};
|
|
248
262
|
}
|
|
249
263
|
|
|
250
264
|
input {
|
|
@@ -267,26 +281,26 @@ 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-checkbox--box {
|
|
270
|
-
border: 2px solid ${
|
|
284
|
+
border: 2px solid ${_i.borderColor};
|
|
271
285
|
border-radius: 2px;
|
|
272
286
|
|
|
273
287
|
width: 18px;
|
|
274
288
|
height: 18px;
|
|
275
289
|
|
|
276
|
-
color: ${
|
|
290
|
+
color: ${_i.colorOnPrimary};
|
|
277
291
|
}
|
|
278
292
|
|
|
279
293
|
|
|
280
294
|
.ft-checkbox--checked .ft-checkbox--box,
|
|
281
295
|
.ft-checkbox--indeterminate .ft-checkbox--box {
|
|
282
|
-
border-color: ${
|
|
283
|
-
background-color: ${
|
|
296
|
+
border-color: ${_i.colorPrimary};
|
|
297
|
+
background-color: ${_i.colorPrimary};
|
|
284
298
|
}
|
|
285
299
|
|
|
286
300
|
.ft-checkbox--disabled .ft-checkbox--box {
|
|
287
|
-
border-color: ${
|
|
301
|
+
border-color: ${_i.colorOnSurfaceDisabled};
|
|
288
302
|
background-color: transparent;
|
|
289
|
-
color: ${
|
|
303
|
+
color: ${_i.colorOnSurfaceDisabled};
|
|
290
304
|
}
|
|
291
305
|
|
|
292
306
|
.ft-checkbox--checkmark {
|
|
@@ -305,4 +319,4 @@ const X=t=>({_$litStatic$:t}),Y=new Map,q=(t=>(i,...e)=>{var o;const s=e.length;
|
|
|
305
319
|
.ft-checkbox--indeterminate .ft-checkbox--checkmark {
|
|
306
320
|
opacity: 1;
|
|
307
321
|
}
|
|
308
|
-
`,
|
|
322
|
+
`,Ai([o.property()],Si.prototype,"name",void 0),Ai([o.property({type:Boolean})],Si.prototype,"checked",void 0),Ai([o.property({type:Boolean})],Si.prototype,"indeterminate",void 0),Ai([o.property({type:Boolean})],Si.prototype,"disabled",void 0),Ai([o.query(".ft-checkbox")],Si.prototype,"container",void 0),Ai([o.query("ft-ripple")],Si.prototype,"ripple",void 0),i.customElement("ft-checkbox")(Si),t.FtCheckbox=Si,t.FtCheckboxCssVariables=_i,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap);
|