@fluid-topics/ft-switch 1.0.44 → 1.0.46
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-switch-option.d.ts +5 -2
- package/build/ft-switch-option.js +9 -3
- package/build/ft-switch.d.ts +4 -0
- package/build/ft-switch.js +21 -4
- package/build/ft-switch.light.js +43 -41
- package/build/ft-switch.min.js +23 -21
- package/package.json +7 -7
|
@@ -3,8 +3,11 @@ import { ElementDefinitionsMap, FtLitElement } from "@fluid-topics/ft-wc-utils";
|
|
|
3
3
|
import { Position } from "@fluid-topics/ft-tooltip";
|
|
4
4
|
import { FtIconVariants } from "@fluid-topics/ft-icon";
|
|
5
5
|
import { FtSwitchOptionProperties } from "./ft-switch-option.properties";
|
|
6
|
-
export declare class
|
|
7
|
-
constructor();
|
|
6
|
+
export declare class SwitchOptionChangeByUser extends CustomEvent<boolean> {
|
|
7
|
+
constructor(selected: boolean);
|
|
8
|
+
}
|
|
9
|
+
export declare class SwitchOptionChange extends CustomEvent<boolean> {
|
|
10
|
+
constructor(selected: boolean);
|
|
8
11
|
}
|
|
9
12
|
export declare class FtSwitchOption extends FtLitElement implements FtSwitchOptionProperties {
|
|
10
13
|
static elementDefinitions: ElementDefinitionsMap;
|
|
@@ -13,9 +13,14 @@ import { classMap } from "lit/directives/class-map.js";
|
|
|
13
13
|
import { FtTooltip } from "@fluid-topics/ft-tooltip";
|
|
14
14
|
import { FtIcon } from "@fluid-topics/ft-icon";
|
|
15
15
|
import { optionStyles } from "./ft-switch-option.css";
|
|
16
|
+
export class SwitchOptionChangeByUser extends CustomEvent {
|
|
17
|
+
constructor(selected) {
|
|
18
|
+
super("option-change-by-user", { detail: selected, bubbles: true, composed: true });
|
|
19
|
+
}
|
|
20
|
+
}
|
|
16
21
|
export class SwitchOptionChange extends CustomEvent {
|
|
17
|
-
constructor() {
|
|
18
|
-
super("option-change", { bubbles: true, composed: true });
|
|
22
|
+
constructor(selected) {
|
|
23
|
+
super("option-change", { detail: selected, bubbles: true, composed: true });
|
|
19
24
|
}
|
|
20
25
|
}
|
|
21
26
|
class FtSwitchOption extends FtLitElement {
|
|
@@ -34,7 +39,7 @@ class FtSwitchOption extends FtLitElement {
|
|
|
34
39
|
updated(props) {
|
|
35
40
|
super.updated(props);
|
|
36
41
|
if (props.has("selected")) {
|
|
37
|
-
this.dispatchEvent(new SwitchOptionChange());
|
|
42
|
+
this.dispatchEvent(new SwitchOptionChange(this.selected));
|
|
38
43
|
}
|
|
39
44
|
}
|
|
40
45
|
render() {
|
|
@@ -72,6 +77,7 @@ class FtSwitchOption extends FtLitElement {
|
|
|
72
77
|
}
|
|
73
78
|
onChange() {
|
|
74
79
|
this.selected = this.unselectable ? !this.selected : true;
|
|
80
|
+
this.dispatchEvent(new SwitchOptionChangeByUser(this.selected));
|
|
75
81
|
}
|
|
76
82
|
getLabel() {
|
|
77
83
|
return this.label || this.textContent;
|
package/build/ft-switch.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PropertyValues } from "lit";
|
|
2
2
|
import { ElementDefinitionsMap, FtLitElement } from "@fluid-topics/ft-wc-utils";
|
|
3
|
+
import { FtSwitchOption } from "./ft-switch-option";
|
|
3
4
|
import { FtSwitchProperties } from "./ft-switch.properties";
|
|
4
5
|
export declare class FtSwitchChange extends CustomEvent<any> {
|
|
5
6
|
constructor(value: any);
|
|
@@ -20,7 +21,10 @@ export declare class FtSwitch extends FtLitElement implements FtSwitchProperties
|
|
|
20
21
|
private fixIndex;
|
|
21
22
|
private onSlotchange;
|
|
22
23
|
private registerOption;
|
|
24
|
+
private onOptionChangeByScript;
|
|
25
|
+
private onOptionChangeByUser;
|
|
23
26
|
private onOptionChange;
|
|
27
|
+
private(option: FtSwitchOption): void;
|
|
24
28
|
focus(): void;
|
|
25
29
|
private updateOptions;
|
|
26
30
|
}
|
package/build/ft-switch.js
CHANGED
|
@@ -28,11 +28,9 @@ class FtSwitch extends FtLitElement {
|
|
|
28
28
|
return (_a = this.selectedOption) === null || _a === void 0 ? void 0 : _a.value;
|
|
29
29
|
}
|
|
30
30
|
updated(props) {
|
|
31
|
-
var _a;
|
|
32
31
|
super.updated(props);
|
|
33
32
|
if (props.has("selectedOption")) {
|
|
34
33
|
this.updateOptions();
|
|
35
|
-
this.dispatchEvent(new FtSwitchChange((_a = this.selectedOption) === null || _a === void 0 ? void 0 : _a.value));
|
|
36
34
|
}
|
|
37
35
|
if (props.has("unselectable")) {
|
|
38
36
|
this.options.forEach(o => o.unselectable = this.unselectable);
|
|
@@ -46,7 +44,9 @@ class FtSwitch extends FtLitElement {
|
|
|
46
44
|
return html `
|
|
47
45
|
<div @keydown=${this.onKeyDown} tabindex="0" class="${classMap(classes)}">
|
|
48
46
|
<slot @slotchange=${this.onSlotchange}
|
|
49
|
-
@option-change=${this.
|
|
47
|
+
@option-change=${this.onOptionChangeByScript}
|
|
48
|
+
@option-change-by-user=${this.onOptionChangeByUser}
|
|
49
|
+
></slot>
|
|
50
50
|
</div>
|
|
51
51
|
`;
|
|
52
52
|
}
|
|
@@ -87,9 +87,26 @@ class FtSwitch extends FtLitElement {
|
|
|
87
87
|
option.unselectable = this.unselectable;
|
|
88
88
|
this.options.push(option);
|
|
89
89
|
}
|
|
90
|
-
|
|
90
|
+
onOptionChangeByScript(e) {
|
|
91
91
|
e.stopPropagation();
|
|
92
92
|
let option = e.target;
|
|
93
|
+
this.onOptionChange(option);
|
|
94
|
+
}
|
|
95
|
+
onOptionChangeByUser(e) {
|
|
96
|
+
var _a;
|
|
97
|
+
e.stopPropagation();
|
|
98
|
+
this.onOptionChange(e.target);
|
|
99
|
+
this.dispatchEvent(new FtSwitchChange((_a = this.selectedOption) === null || _a === void 0 ? void 0 : _a.value));
|
|
100
|
+
}
|
|
101
|
+
onOptionChange(option) {
|
|
102
|
+
if (option.selected) {
|
|
103
|
+
this.selectedOption = option;
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
this.selectedOption = this.options.find(option => option.selected);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
private(option) {
|
|
93
110
|
if (option.selected) {
|
|
94
111
|
this.selectedOption = option;
|
|
95
112
|
}
|
package/build/ft-switch.light.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(t,i,e,o,s,n){const r=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorContent),l={color:r,backgroundColor:i.FtCssVariableFactory.extend("--ft-ripple-background-color",r),opacityContentOnSurfacePressed:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:i.FtCssVariableFactory.create("--ft-ripple-border-radius","SIZE","0px")},
|
|
1
|
+
!function(t,i,e,o,s,n){const r=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorContent),l={color:r,backgroundColor:i.FtCssVariableFactory.extend("--ft-ripple-background-color",r),opacityContentOnSurfacePressed:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:i.FtCssVariableFactory.create("--ft-ripple-border-radius","SIZE","0px")},h=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorPrimary),p=h,a=i.FtCssVariableFactory.extend("--ft-ripple-background-color",h),f=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorSecondary),c=f,d=i.FtCssVariableFactory.extend("--ft-ripple-background-color",f),u=e.css`
|
|
2
2
|
:host {
|
|
3
3
|
display: contents;
|
|
4
4
|
}
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
44
|
-
background-color: ${
|
|
44
|
+
background-color: ${p};
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
.ft-ripple .ft-ripple--background {
|
|
@@ -105,15 +105,15 @@
|
|
|
105
105
|
<div class="ft-ripple--background"></div>
|
|
106
106
|
<div class="ft-ripple--effect"></div>
|
|
107
107
|
</div>
|
|
108
|
-
`}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(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,i;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(null!==(i=this.target)&&void 0!==i?i:e),this.setRippleSize()}setupFor(t){if(this.setupDebouncer.cancel(),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,this.target=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}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}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()}}y.elementDefinitions={},y.styles=u,g([o.property({type:Boolean})],y.prototype,"primary",void 0),g([o.property({type:Boolean})],y.prototype,"secondary",void 0),g([o.property({type:Boolean})],y.prototype,"unbounded",void 0),g([o.property({type:Boolean})],y.prototype,"activated",void 0),g([o.property({type:Boolean})],y.prototype,"selected",void 0),g([o.property({type:Boolean})],y.prototype,"disabled",void 0),g([o.state()],y.prototype,"hovered",void 0),g([o.state()],y.prototype,"focused",void 0),g([o.state()],y.prototype,"pressed",void 0),g([o.state()],y.prototype,"rippling",void 0),g([o.state()],y.prototype,"rippleSize",void 0),g([o.state()],y.prototype,"originX",void 0),g([o.state()],y.prototype,"originY",void 0),g([o.query(".ft-ripple")],y.prototype,"ripple",void 0),g([o.query(".ft-ripple--effect")],y.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(y);const v=window,b=v.trustedTypes,m=b?b.createPolicy("lit-html",{createHTML:t=>t}):void 0,$="$lit$",w=`lit$${(Math.random()+"").slice(9)}$`,k="?"+w,z=`<${k}>`,C=document,O=()=>C.createComment(""),S=t=>null===t||"object"!=typeof t&&"function"!=typeof t,j=Array.isArray,N="[ \t\n\f\r]",A=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,E=/-->/g,I=/>/g,F=RegExp(`>|${N}(?:([^\\s"'>=/]+)(${N}*=${N}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),R=/'/g,T=/"/g,_=/^(?:script|style|textarea|title)$/i,B=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),U=Symbol.for("lit-noChange"),M=Symbol.for("lit-nothing"),W=new WeakMap,Z=C.createTreeWalker(C,129,null,!1),D=(t,i)=>{const e=t.length-1,o=[];let s,n=2===i?"<svg>":"",r=A;for(let i=0;i<e;i++){const e=t[i];let l,p,h=-1,a=0;for(;a<e.length&&(r.lastIndex=a,p=r.exec(e),null!==p);)a=r.lastIndex,r===A?"!--"===p[1]?r=E:void 0!==p[1]?r=I:void 0!==p[2]?(_.test(p[2])&&(s=RegExp("</"+p[2],"g")),r=F):void 0!==p[3]&&(r=F):r===F?">"===p[0]?(r=null!=s?s:A,h=-1):void 0===p[1]?h=-2:(h=r.lastIndex-p[2].length,l=p[1],r=void 0===p[3]?F:'"'===p[3]?T:R):r===T||r===R?r=F:r===E||r===I?r=A:(r=F,s=void 0);const f=r===F&&t[i+1].startsWith("/>")?" ":"";n+=r===A?e+z:h>=0?(o.push(l),e.slice(0,h)+$+e.slice(h)+w+f):e+w+(-2===h?(o.push(void 0),i):f)}const l=n+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==m?m.createHTML(l):l,o]};class L{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let s=0,n=0;const r=t.length-1,l=this.parts,[p,h]=D(t,i);if(this.el=L.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())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith($)||i.startsWith(w)){const e=h[n++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+$).split(w),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?V:"?"===i[1]?X:"@"===i[1]?Y:P})}else l.push({type:6,index:s})}for(const i of t)o.removeAttribute(i)}if(_.test(o.tagName)){const t=o.textContent.split(w),i=t.length-1;if(i>0){o.textContent=b?b.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],O()),Z.nextNode(),l.push({type:2,index:++s});o.append(t[i],O())}}}else if(8===o.nodeType)if(o.data===k)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(w,t+1));)l.push({type:7,index:s}),t+=w.length-1}s++}}static createElement(t,i){const e=C.createElement("template");return e.innerHTML=t,e}}function K(t,i,e=t,o){var s,n,r,l;if(i===U)return i;let p=void 0!==o?null===(s=e._$Co)||void 0===s?void 0:s[o]:e._$Cl;const h=S(i)?void 0:i._$litDirective$;return(null==p?void 0:p.constructor)!==h&&(null===(n=null==p?void 0:p._$AO)||void 0===n||n.call(p,!1),void 0===h?p=void 0:(p=new h(t),p._$AT(t,e,o)),void 0!==o?(null!==(r=(l=e)._$Co)&&void 0!==r?r:l._$Co=[])[o]=p:e._$Cl=p),void 0!==p&&(i=K(t,p._$AS(t,i.values),p,o)),i}class H{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var i;const{el:{content:e},parts:o}=this._$AD,s=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:C).importNode(e,!0);Z.currentNode=s;let n=Z.nextNode(),r=0,l=0,p=o[0];for(;void 0!==p;){if(r===p.index){let i;2===p.type?i=new G(n,n.nextSibling,this,t):1===p.type?i=new p.ctor(n,p.name,p.strings,this,t):6===p.type&&(i=new J(n,this,t)),this._$AV.push(i),p=o[++l]}r!==(null==p?void 0:p.index)&&(n=Z.nextNode(),r++)}return s}v(t){let i=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class G{constructor(t,i,e,o){var s;this.type=2,this._$AH=M,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cp=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._$Cp}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0: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===M||null==t||""===t?(this._$AH!==M&&this._$AR(),this._$AH=M):t!==this._$AH&&t!==U&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>j(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==M&&S(this._$AH)?this._$AA.nextSibling.data=t:this.$(C.createTextNode(t)),this._$AH=t}g(t){var i;const{values:e,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=L.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===s)this._$AH.v(e);else{const t=new H(s,this),i=t.u(this.options);t.v(e),this.$(i),this._$AH=t}}_$AC(t){let i=W.get(t.strings);return void 0===i&&W.set(t.strings,i=new L(t)),i}T(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 G(this.k(O()),this.k(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._$Cp=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=M,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=M}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const s=this.strings;let n=!1;if(void 0===s)t=K(this,t,i,0),n=!S(t)||t!==this._$AH&&t!==U,n&&(this._$AH=t);else{const o=t;let r,l;for(t=s[0],r=0;r<s.length-1;r++)l=K(this,o[e+r],i,r),l===U&&(l=this._$AH[r]),n||(n=!S(l)||l!==this._$AH[r]),l===M?t=M:t!==M&&(t+=(null!=l?l:"")+s[r+1]),this._$AH[r]=l}n&&!o&&this.j(t)}j(t){t===M?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class V extends P{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===M?void 0:t}}const q=b?b.emptyScript:"";class X extends P{constructor(){super(...arguments),this.type=4}j(t){t&&t!==M?this.element.setAttribute(this.name,q):this.element.removeAttribute(this.name)}}class Y 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:M)===U)return;const o=this._$AH,s=t===M&&o!==M||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==M&&(o===M||s);s&&this.element.removeEventListener(this.name,this,o),n&&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 J{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 Q=v.litHtmlPolyfillSupport;null==Q||Q(L,G),(null!==(x=v.litHtmlVersions)&&void 0!==x?x:v.litHtmlVersions=[]).push("2.7.3");
|
|
108
|
+
`}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(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,i;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(null!==(i=this.target)&&void 0!==i?i:e),this.setRippleSize()}setupFor(t){if(this.setupDebouncer.cancel(),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,this.target=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}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}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()}}y.elementDefinitions={},y.styles=u,g([o.property({type:Boolean})],y.prototype,"primary",void 0),g([o.property({type:Boolean})],y.prototype,"secondary",void 0),g([o.property({type:Boolean})],y.prototype,"unbounded",void 0),g([o.property({type:Boolean})],y.prototype,"activated",void 0),g([o.property({type:Boolean})],y.prototype,"selected",void 0),g([o.property({type:Boolean})],y.prototype,"disabled",void 0),g([o.state()],y.prototype,"hovered",void 0),g([o.state()],y.prototype,"focused",void 0),g([o.state()],y.prototype,"pressed",void 0),g([o.state()],y.prototype,"rippling",void 0),g([o.state()],y.prototype,"rippleSize",void 0),g([o.state()],y.prototype,"originX",void 0),g([o.state()],y.prototype,"originY",void 0),g([o.query(".ft-ripple")],y.prototype,"ripple",void 0),g([o.query(".ft-ripple--effect")],y.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(y);const v=window,b=v.trustedTypes,m=b?b.createPolicy("lit-html",{createHTML:t=>t}):void 0,$="$lit$",w=`lit$${(Math.random()+"").slice(9)}$`,k="?"+w,z=`<${k}>`,C=document,O=()=>C.createComment(""),S=t=>null===t||"object"!=typeof t&&"function"!=typeof t,j=Array.isArray,N="[ \t\n\f\r]",E=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,A=/-->/g,I=/>/g,B=RegExp(`>|${N}(?:([^\\s"'>=/]+)(${N}*=${N}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),F=/'/g,R=/"/g,T=/^(?:script|style|textarea|title)$/i,_=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),U=Symbol.for("lit-noChange"),M=Symbol.for("lit-nothing"),W=new WeakMap,Z=C.createTreeWalker(C,129,null,!1),D=(t,i)=>{const e=t.length-1,o=[];let s,n=2===i?"<svg>":"",r=E;for(let i=0;i<e;i++){const e=t[i];let l,h,p=-1,a=0;for(;a<e.length&&(r.lastIndex=a,h=r.exec(e),null!==h);)a=r.lastIndex,r===E?"!--"===h[1]?r=A:void 0!==h[1]?r=I:void 0!==h[2]?(T.test(h[2])&&(s=RegExp("</"+h[2],"g")),r=B):void 0!==h[3]&&(r=B):r===B?">"===h[0]?(r=null!=s?s:E,p=-1):void 0===h[1]?p=-2:(p=r.lastIndex-h[2].length,l=h[1],r=void 0===h[3]?B:'"'===h[3]?R:F):r===R||r===F?r=B:r===A||r===I?r=E:(r=B,s=void 0);const f=r===B&&t[i+1].startsWith("/>")?" ":"";n+=r===E?e+z:p>=0?(o.push(l),e.slice(0,p)+$+e.slice(p)+w+f):e+w+(-2===p?(o.push(void 0),i):f)}const l=n+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==m?m.createHTML(l):l,o]};class L{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let s=0,n=0;const r=t.length-1,l=this.parts,[h,p]=D(t,i);if(this.el=L.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())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith($)||i.startsWith(w)){const e=p[n++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+$).split(w),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?V:"?"===i[1]?X:"@"===i[1]?Y:P})}else l.push({type:6,index:s})}for(const i of t)o.removeAttribute(i)}if(T.test(o.tagName)){const t=o.textContent.split(w),i=t.length-1;if(i>0){o.textContent=b?b.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],O()),Z.nextNode(),l.push({type:2,index:++s});o.append(t[i],O())}}}else if(8===o.nodeType)if(o.data===k)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(w,t+1));)l.push({type:7,index:s}),t+=w.length-1}s++}}static createElement(t,i){const e=C.createElement("template");return e.innerHTML=t,e}}function K(t,i,e=t,o){var s,n,r,l;if(i===U)return i;let h=void 0!==o?null===(s=e._$Co)||void 0===s?void 0:s[o]:e._$Cl;const p=S(i)?void 0:i._$litDirective$;return(null==h?void 0:h.constructor)!==p&&(null===(n=null==h?void 0:h._$AO)||void 0===n||n.call(h,!1),void 0===p?h=void 0:(h=new p(t),h._$AT(t,e,o)),void 0!==o?(null!==(r=(l=e)._$Co)&&void 0!==r?r:l._$Co=[])[o]=h:e._$Cl=h),void 0!==h&&(i=K(t,h._$AS(t,i.values),h,o)),i}class H{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var i;const{el:{content:e},parts:o}=this._$AD,s=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:C).importNode(e,!0);Z.currentNode=s;let n=Z.nextNode(),r=0,l=0,h=o[0];for(;void 0!==h;){if(r===h.index){let i;2===h.type?i=new G(n,n.nextSibling,this,t):1===h.type?i=new h.ctor(n,h.name,h.strings,this,t):6===h.type&&(i=new J(n,this,t)),this._$AV.push(i),h=o[++l]}r!==(null==h?void 0:h.index)&&(n=Z.nextNode(),r++)}return s}v(t){let i=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class G{constructor(t,i,e,o){var s;this.type=2,this._$AH=M,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cp=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._$Cp}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0: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===M||null==t||""===t?(this._$AH!==M&&this._$AR(),this._$AH=M):t!==this._$AH&&t!==U&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>j(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==M&&S(this._$AH)?this._$AA.nextSibling.data=t:this.$(C.createTextNode(t)),this._$AH=t}g(t){var i;const{values:e,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=L.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===s)this._$AH.v(e);else{const t=new H(s,this),i=t.u(this.options);t.v(e),this.$(i),this._$AH=t}}_$AC(t){let i=W.get(t.strings);return void 0===i&&W.set(t.strings,i=new L(t)),i}T(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 G(this.k(O()),this.k(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._$Cp=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=M,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=M}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const s=this.strings;let n=!1;if(void 0===s)t=K(this,t,i,0),n=!S(t)||t!==this._$AH&&t!==U,n&&(this._$AH=t);else{const o=t;let r,l;for(t=s[0],r=0;r<s.length-1;r++)l=K(this,o[e+r],i,r),l===U&&(l=this._$AH[r]),n||(n=!S(l)||l!==this._$AH[r]),l===M?t=M:t!==M&&(t+=(null!=l?l:"")+s[r+1]),this._$AH[r]=l}n&&!o&&this.j(t)}j(t){t===M?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class V extends P{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===M?void 0:t}}const q=b?b.emptyScript:"";class X extends P{constructor(){super(...arguments),this.type=4}j(t){t&&t!==M?this.element.setAttribute(this.name,q):this.element.removeAttribute(this.name)}}class Y 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:M)===U)return;const o=this._$AH,s=t===M&&o!==M||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==M&&(o===M||s);s&&this.element.removeEventListener(this.name,this,o),n&&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 J{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 Q=v.litHtmlPolyfillSupport;null==Q||Q(L,G),(null!==(x=v.litHtmlVersions)&&void 0!==x?x:v.litHtmlVersions=[]).push("2.7.3");
|
|
109
109
|
/**
|
|
110
110
|
* @license
|
|
111
111
|
* Copyright 2020 Google LLC
|
|
112
112
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
113
113
|
*/
|
|
114
|
-
const tt=Symbol.for(""),it=t=>{if((null==t?void 0:t.r)===tt)return null==t?void 0:t._$litStatic$},et=t=>({_$litStatic$:t,r:tt}),ot=new Map,st=(t=>(i,...e)=>{const o=e.length;let s,n;const r=[],l=[];let p
|
|
114
|
+
const tt=Symbol.for(""),it=t=>{if((null==t?void 0:t.r)===tt)return null==t?void 0:t._$litStatic$},et=t=>({_$litStatic$:t,r:tt}),ot=new Map,st=(t=>(i,...e)=>{const o=e.length;let s,n;const r=[],l=[];let h,p=0,a=!1;for(;p<o;){for(h=i[p];p<o&&void 0!==(n=e[p],s=it(n));)h+=s+i[++p],a=!0;p!==o&&l.push(n),r.push(h),p++}if(p===o&&r.push(i[o]),a){const t=r.join("$$lit$$");void 0===(i=ot.get(t))&&(r.raw=r,ot.set(t,i=r)),e=l}return t(i,...e)})(_);var nt;!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"}(nt||(nt={}));const rt=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),lt=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),ht={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")},pt=i.FtCssVariableFactory.extend("--ft-typography-title-font-family",rt),at=i.FtCssVariableFactory.extend("--ft-typography-title-font-size",ht.fontSize,"20px"),ft=i.FtCssVariableFactory.extend("--ft-typography-title-font-weight",ht.fontWeight,"normal"),ct=i.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",ht.letterSpacing,"0.15px"),dt=i.FtCssVariableFactory.extend("--ft-typography-title-line-height",ht.lineHeight,"1.2"),ut=i.FtCssVariableFactory.extend("--ft-typography-title-text-transform",ht.textTransform,"inherit"),xt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",rt),gt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",ht.fontSize,"14px"),yt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",ht.fontWeight,"normal"),vt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",ht.letterSpacing,"0.105px"),bt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",ht.lineHeight,"1.7"),mt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",ht.textTransform,"inherit"),$t=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",lt),wt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",ht.fontSize,"16px"),kt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",ht.fontWeight,"600"),zt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",ht.letterSpacing,"0.144px"),Ct=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",ht.lineHeight,"1.5"),Ot=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",ht.textTransform,"inherit"),St=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",lt),jt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",ht.fontSize,"14px"),Nt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",ht.fontWeight,"normal"),Et=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",ht.letterSpacing,"0.098px"),At=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",ht.lineHeight,"1.7"),It=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",ht.textTransform,"inherit"),Bt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-family",lt),Ft=i.FtCssVariableFactory.extend("--ft-typography-body1-font-size",ht.fontSize,"16px"),Rt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",ht.fontWeight,"normal"),Tt=i.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",ht.letterSpacing,"0.496px"),_t=i.FtCssVariableFactory.extend("--ft-typography-body1-line-height",ht.lineHeight,"1.5"),Ut=i.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",ht.textTransform,"inherit"),Mt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-family",lt),Wt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-size",ht.fontSize,"14px"),Zt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",ht.fontWeight,"normal"),Dt=i.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",ht.letterSpacing,"0.252px"),Lt=i.FtCssVariableFactory.extend("--ft-typography-body2-line-height",ht.lineHeight,"1.4"),Kt=i.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",ht.textTransform,"inherit"),Ht=i.FtCssVariableFactory.extend("--ft-typography-caption-font-family",lt),Gt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-size",ht.fontSize,"12px"),Pt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",ht.fontWeight,"normal"),Vt=i.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",ht.letterSpacing,"0.396px"),qt=i.FtCssVariableFactory.extend("--ft-typography-caption-line-height",ht.lineHeight,"1.33"),Xt=i.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",ht.textTransform,"inherit"),Yt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",lt),Jt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",ht.fontSize,"10px"),Qt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",ht.fontWeight,"normal"),ti=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",ht.letterSpacing,"0.33px"),ii=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",ht.lineHeight,"1.6"),ei=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",ht.textTransform,"inherit"),oi=i.FtCssVariableFactory.extend("--ft-typography-overline-font-family",lt),si=i.FtCssVariableFactory.extend("--ft-typography-overline-font-size",ht.fontSize,"10px"),ni=i.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",ht.fontWeight,"normal"),ri=i.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",ht.letterSpacing,"1.5px"),li=i.FtCssVariableFactory.extend("--ft-typography-overline-line-height",ht.lineHeight,"1.6"),hi=i.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",ht.textTransform,"uppercase"),pi={fontFamily:i.FtCssVariableFactory.extend("--ft-typography-button-font-family",lt),fontSize:i.FtCssVariableFactory.extend("--ft-typography-button-font-size",ht.fontSize,"14px"),fontWeight:i.FtCssVariableFactory.extend("--ft-typography-button-font-weight",ht.fontWeight,"600"),letterSpacing:i.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",ht.letterSpacing,"1.246px"),lineHeight:i.FtCssVariableFactory.extend("--ft-typography-button-line-height",ht.lineHeight,"1.15"),textTransform:i.FtCssVariableFactory.extend("--ft-typography-button-text-transform",ht.textTransform,"uppercase")},ai=e.css`
|
|
115
115
|
.ft-typography--title {
|
|
116
|
-
font-family: ${
|
|
116
|
+
font-family: ${pt};
|
|
117
117
|
font-size: ${at};
|
|
118
118
|
font-weight: ${ft};
|
|
119
119
|
letter-spacing: ${ct};
|
|
@@ -143,18 +143,18 @@ const tt=Symbol.for(""),it=t=>{if((null==t?void 0:t.r)===tt)return null==t?void
|
|
|
143
143
|
font-family: ${St};
|
|
144
144
|
font-size: ${jt};
|
|
145
145
|
font-weight: ${Nt};
|
|
146
|
-
letter-spacing: ${
|
|
147
|
-
line-height: ${
|
|
146
|
+
letter-spacing: ${Et};
|
|
147
|
+
line-height: ${At};
|
|
148
148
|
text-transform: ${It};
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
`,ui=e.css`
|
|
152
152
|
.ft-typography--body1 {
|
|
153
|
-
font-family: ${
|
|
154
|
-
font-size: ${
|
|
155
|
-
font-weight: ${
|
|
156
|
-
letter-spacing: ${
|
|
157
|
-
line-height: ${
|
|
153
|
+
font-family: ${Bt};
|
|
154
|
+
font-size: ${Ft};
|
|
155
|
+
font-weight: ${Rt};
|
|
156
|
+
letter-spacing: ${Tt};
|
|
157
|
+
line-height: ${_t};
|
|
158
158
|
text-transform: ${Ut};
|
|
159
159
|
}
|
|
160
160
|
`,xi=e.css`
|
|
@@ -191,16 +191,16 @@ const tt=Symbol.for(""),it=t=>{if((null==t?void 0:t.r)===tt)return null==t?void
|
|
|
191
191
|
font-weight: ${ni};
|
|
192
192
|
letter-spacing: ${ri};
|
|
193
193
|
line-height: ${li};
|
|
194
|
-
text-transform: ${
|
|
194
|
+
text-transform: ${hi};
|
|
195
195
|
}
|
|
196
196
|
`,bi=e.css`
|
|
197
197
|
.ft-typography--button {
|
|
198
|
-
font-family: ${
|
|
199
|
-
font-size: ${
|
|
200
|
-
font-weight: ${
|
|
201
|
-
letter-spacing: ${
|
|
202
|
-
line-height: ${
|
|
203
|
-
text-transform: ${
|
|
198
|
+
font-family: ${pi.fontFamily};
|
|
199
|
+
font-size: ${pi.fontSize};
|
|
200
|
+
font-weight: ${pi.fontWeight};
|
|
201
|
+
letter-spacing: ${pi.letterSpacing};
|
|
202
|
+
line-height: ${pi.lineHeight};
|
|
203
|
+
text-transform: ${pi.textTransform};
|
|
204
204
|
}
|
|
205
205
|
`,mi=e.css`
|
|
206
206
|
.ft-typography {
|
|
@@ -245,7 +245,7 @@ const tt=Symbol.for(""),it=t=>{if((null==t?void 0:t.r)===tt)return null==t?void
|
|
|
245
245
|
position: relative;
|
|
246
246
|
word-break: break-word;
|
|
247
247
|
}
|
|
248
|
-
`;var Ai,
|
|
248
|
+
`;var Ei,Ai,Ii=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class Bi extends i.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new i.Debouncer,this.revealDebouncer=new i.Debouncer}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return e.html`
|
|
249
249
|
<div part="container"
|
|
250
250
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
251
251
|
@mouseenter=${this.onHover}
|
|
@@ -263,7 +263,7 @@ const tt=Symbol.for(""),it=t=>{if((null==t?void 0:t.r)===tt)return null==t?void
|
|
|
263
263
|
</div>
|
|
264
264
|
</div>
|
|
265
265
|
</div>
|
|
266
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((i=>t.has(i)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2;let s=0,n=0;switch(this.validPosition){case"top":n=-this.tooltip.clientHeight,s=o;break;case"bottom":n=i.height,s=o;break;case"left":n=e,s=-this.tooltip.clientWidth;break;case"right":n=e,s=i.width}i.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-i.left),i.left+s<0&&(s=4-i.left);const r=this.tooltip.style;r.left=s+"px",r.top=n+"px",r.maxWidth=`max(${i.width}px, ${ji})`}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}
|
|
266
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((i=>t.has(i)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2;let s=0,n=0;switch(this.validPosition){case"top":n=-this.tooltip.clientHeight,s=o;break;case"bottom":n=i.height,s=o;break;case"left":n=e,s=-this.tooltip.clientWidth;break;case"right":n=e,s=i.width}i.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-i.left),i.left+s<0&&(s=4-i.left);const r=this.tooltip.style;r.left=s+"px",r.top=n+"px",r.maxWidth=`max(${i.width}px, ${ji})`}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}Bi.elementDefinitions={"ft-typography":wi},Bi.styles=Ni,Ii([o.property()],Bi.prototype,"text",void 0),Ii([o.property({type:Boolean})],Bi.prototype,"manual",void 0),Ii([o.property({type:Boolean})],Bi.prototype,"inline",void 0),Ii([o.property({type:Number})],Bi.prototype,"delay",void 0),Ii([o.property()],Bi.prototype,"position",void 0),Ii([o.queryAssignedNodes("",!0)],Bi.prototype,"slotNodes",void 0),Ii([o.query(".ft-tooltip--container")],Bi.prototype,"container",void 0),Ii([o.query("slot")],Bi.prototype,"target",void 0),Ii([o.query(".ft-tooltip")],Bi.prototype,"tooltip",void 0),Ii([o.query(".ft-tooltip--content")],Bi.prototype,"tooltipContent",void 0),Ii([o.state()],Bi.prototype,"visible",void 0),i.customElement("ft-tooltip")(Bi),function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.LINE_CHART="",t.STACKED_CHART="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.EYE_SLASH="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.PIP="",t.PIP_WIDE="",t.EXPAND_WIDE="",t.X_MARK=""}(Ei||(Ei={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(Ai||(Ai={})),new Map([...["abw"].map((t=>[t,Ai.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,Ai.AUDIO])),...["avi"].map((t=>[t,Ai.AVI])),...["chm","xhs"].map((t=>[t,Ai.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,Ai.CODE])),...["csv"].map((t=>[t,Ai.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Ai.DITA])),...["epub"].map((t=>[t,Ai.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Ai.EXCEL])),...["flac"].map((t=>[t,Ai.FLAC])),...["gif"].map((t=>[t,Ai.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Ai.GZIP])),...["html","htm","xhtml"].map((t=>[t,Ai.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,Ai.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Ai.JPEG])),...["json"].map((t=>[t,Ai.JSON])),...["m4a","m4p"].map((t=>[t,Ai.M4A])),...["mov","qt"].map((t=>[t,Ai.MOV])),...["mp3"].map((t=>[t,Ai.MP3])),...["mp4","m4v"].map((t=>[t,Ai.MP4])),...["ogg","oga"].map((t=>[t,Ai.OGG])),...["pdf","ps"].map((t=>[t,Ai.PDF])),...["png"].map((t=>[t,Ai.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Ai.POWERPOINT])),...["rar"].map((t=>[t,Ai.RAR])),...["stp"].map((t=>[t,Ai.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Ai.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,Ai.VIDEO])),...["wav"].map((t=>[t,Ai.WAV])),...["wma"].map((t=>[t,Ai.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Ai.WORD])),...["xml","xsl","rdf"].map((t=>[t,Ai.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Ai.YAML])),...["zip"].map((t=>[t,Ai.ZIP]))]);const Fi={size:i.FtCssVariableFactory.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:i.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:i.FtCssVariableFactory.extend("--ft-icon-file-format-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:i.FtCssVariableFactory.extend("--ft-icon-material-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:i.FtCssVariableFactory.create("--ft-icon-vertical-align","UNKNOWN","unset")},Ri=e.css`
|
|
267
267
|
:host, i.ft-icon {
|
|
268
268
|
display: inline-flex;
|
|
269
269
|
align-items: center;
|
|
@@ -272,14 +272,14 @@ const tt=Symbol.for(""),it=t=>{if((null==t?void 0:t.r)===tt)return null==t?void
|
|
|
272
272
|
}
|
|
273
273
|
|
|
274
274
|
:host {
|
|
275
|
-
width: ${
|
|
276
|
-
height: ${
|
|
275
|
+
width: ${Fi.size};
|
|
276
|
+
height: ${Fi.size};
|
|
277
277
|
}
|
|
278
278
|
|
|
279
279
|
i.ft-icon {
|
|
280
280
|
width: 100%;
|
|
281
281
|
height: 100%;
|
|
282
|
-
font-size: ${
|
|
282
|
+
font-size: ${Fi.size};
|
|
283
283
|
line-height: 1;
|
|
284
284
|
font-weight: normal;
|
|
285
285
|
text-transform: none;
|
|
@@ -290,33 +290,33 @@ const tt=Symbol.for(""),it=t=>{if((null==t?void 0:t.r)===tt)return null==t?void
|
|
|
290
290
|
text-rendering: auto;
|
|
291
291
|
-webkit-font-smoothing: antialiased;
|
|
292
292
|
-moz-osx-font-smoothing: grayscale;
|
|
293
|
-
vertical-align: ${
|
|
293
|
+
vertical-align: ${Fi.verticalAlign};
|
|
294
294
|
}
|
|
295
295
|
|
|
296
296
|
i.ft-icon.ft-icon--fluid-topics {
|
|
297
|
-
font-family: ${
|
|
297
|
+
font-family: ${Fi.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
298
298
|
|
|
299
299
|
/* Ugly fix because font is broken */
|
|
300
|
-
font-size: calc(0.75 * ${
|
|
301
|
-
line-height: ${
|
|
300
|
+
font-size: calc(0.75 * ${Fi.size});
|
|
301
|
+
line-height: ${Fi.size};
|
|
302
302
|
position: relative;
|
|
303
303
|
top: -4%;
|
|
304
304
|
justify-content: center;
|
|
305
305
|
}
|
|
306
306
|
|
|
307
307
|
.ft-icon--file-format {
|
|
308
|
-
font-family: ${
|
|
308
|
+
font-family: ${Fi.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
309
309
|
}
|
|
310
310
|
|
|
311
311
|
.ft-icon--material {
|
|
312
|
-
font-family: ${
|
|
312
|
+
font-family: ${Fi.materialFontFamily}, "Material Icons", sans-serif;
|
|
313
313
|
}
|
|
314
|
-
`;var
|
|
314
|
+
`;var Ti;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Ti||(Ti={}));var _i=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class Ui extends i.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=e.nothing}render(){const t=this.variant&&Object.values(Ti).includes(this.variant)?this.variant:Ti.fluid_topics,i=t!==Ti.material||!!this.value;return e.html`
|
|
315
315
|
<i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
|
|
316
316
|
${n.unsafeHTML(this.resolvedIcon)}
|
|
317
317
|
<slot ?hidden=${i}></slot>
|
|
318
318
|
</i>
|
|
319
|
-
`}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}update(t){super.update(t),["value","variant"].some((i=>t.has(i)))&&this.resolveIcon()}resolveIcon(){var t,i;let o=this.value||this.textContent;switch(this.variant){case
|
|
319
|
+
`}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}update(t){super.update(t),["value","variant"].some((i=>t.has(i)))&&this.resolveIcon()}resolveIcon(){var t,i;let o=this.value||this.textContent;switch(this.variant){case Ti.file_format:this.resolvedIcon=null!==(t=Ai[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case Ti.material:this.resolvedIcon=this.value||e.nothing;break;default:this.resolvedIcon=null!==(i=Ei[o.replace("-","_").toUpperCase()])&&void 0!==i?i:o}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Ui.elementDefinitions={},Ui.styles=Ri,_i([o.property()],Ui.prototype,"variant",void 0),_i([o.property()],Ui.prototype,"value",void 0),_i([o.state()],Ui.prototype,"resolvedIcon",void 0),_i([o.query("slot")],Ui.prototype,"slottedContent",void 0),i.customElement("ft-icon")(Ui);const Mi={textColor:i.FtCssVariableFactory.extend("--ft-switch-text-color",i.designSystemVariables.colorOnSurfaceHigh),backgroundColor:i.FtCssVariableFactory.extend("--ft-switch-background-color",i.designSystemVariables.colorSurface),selectedTextColor:i.FtCssVariableFactory.extend("--ft-switch-selected-text-color",i.designSystemVariables.colorPrimary),selectedBackgroundColor:i.FtCssVariableFactory.extend("--ft-switch-selected-background-color",i.designSystemVariables.colorPrimary),borderColor:i.FtCssVariableFactory.extend("--ft-switch-border-color",i.designSystemVariables.colorOutline),borderRadius:i.FtCssVariableFactory.extend("--ft-switch-border-radius",i.designSystemVariables.borderRadiusL),fontSize:i.FtCssVariableFactory.extend("--ft-switch-font-size",pi.fontSize),iconSize:i.FtCssVariableFactory.create("--ft-switch-icon-size","SIZE","24px"),iconColor:i.FtCssVariableFactory.extend("--ft-switch-text-color",i.designSystemVariables.colorOnSurfaceMedium),rippleColor:i.FtCssVariableFactory.extend("--ft-switch-ripple-color",i.designSystemVariables.colorPrimary),outlineColor:i.FtCssVariableFactory.extend("--ft-switch-outline-color",i.designSystemVariables.colorPrimary)},Wi={borderRadiusLeft:i.FtCssVariableFactory.extend("--ft-switch-option-border-radius-left",i.designSystemVariables.borderRadiusL),borderRadiusRight:i.FtCssVariableFactory.extend("--ft-switch-option-border-radius-right",i.designSystemVariables.borderRadiusL),borderWidthLeft:i.FtCssVariableFactory.create("--ft-switch-option-border-width-left","SIZE","1px"),borderWidthRight:i.FtCssVariableFactory.create("--ft-switch-option-border-width-right","SIZE","1px"),borderWidthVertical:i.FtCssVariableFactory.create("--ft-switch-option-border-width-vertical","SIZE","1px")},Zi=e.css`
|
|
320
320
|
.ft-switch-option {
|
|
321
321
|
position: relative;
|
|
322
322
|
display: inline-block;
|
|
@@ -341,7 +341,7 @@ const tt=Symbol.for(""),it=t=>{if((null==t?void 0:t.r)===tt)return null==t?void
|
|
|
341
341
|
align-items: center;
|
|
342
342
|
justify-content: center;
|
|
343
343
|
overflow: hidden;
|
|
344
|
-
${i.setVariable(
|
|
344
|
+
${i.setVariable(Fi.size,Mi.iconSize)};
|
|
345
345
|
padding: var(--ft-switch-internal-vertical-padding, 6px) var(--ft-switch-internal-horizontal-padding, 8px);
|
|
346
346
|
background-color: ${Mi.backgroundColor};
|
|
347
347
|
-webkit-mask-image: radial-gradient(white, black);
|
|
@@ -368,8 +368,8 @@ const tt=Symbol.for(""),it=t=>{if((null==t?void 0:t.r)===tt)return null==t?void
|
|
|
368
368
|
text-overflow: ellipsis;
|
|
369
369
|
display: block;
|
|
370
370
|
margin: 0 8px;
|
|
371
|
-
${i.setVariable(
|
|
372
|
-
${i.setVariable(
|
|
371
|
+
${i.setVariable(pi.fontSize,Mi.fontSize)};
|
|
372
|
+
${i.setVariable(pi.lineHeight,"var(--ft-switch-option-internal-content-height)")}
|
|
373
373
|
}
|
|
374
374
|
|
|
375
375
|
.ft-switch-option--selected .ft-switch-option--label {
|
|
@@ -400,7 +400,7 @@ const tt=Symbol.for(""),it=t=>{if((null==t?void 0:t.r)===tt)return null==t?void
|
|
|
400
400
|
.ft-switch-option--selected ft-icon {
|
|
401
401
|
color: ${Mi.selectedTextColor};
|
|
402
402
|
}
|
|
403
|
-
`;var Di=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class Li extends CustomEvent{constructor(){super("option-change",{bubbles:!0,composed:!0})}}class Ki extends i.FtLitElement{constructor(){super(...arguments),this.value="",this.label="",this.tooltipPosition="bottom",this.selected=!1,this.trailingIcon=!1,this.unselectable=!1}focus(){this.input.focus()}updated(t){super.updated(t),t.has("selected")&&this.dispatchEvent(new
|
|
403
|
+
`;var Di=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class Li extends CustomEvent{constructor(t){super("option-change-by-user",{detail:t,bubbles:!0,composed:!0})}}class Ki extends CustomEvent{constructor(t){super("option-change",{detail:t,bubbles:!0,composed:!0})}}class Hi extends i.FtLitElement{constructor(){super(...arguments),this.value="",this.label="",this.tooltipPosition="bottom",this.selected=!1,this.trailingIcon=!1,this.unselectable=!1}focus(){this.input.focus()}updated(t){super.updated(t),t.has("selected")&&this.dispatchEvent(new Ki(this.selected))}render(){const t={"ft-switch-option":!0,"ft-switch-option--trailing-icon":this.trailingIcon,"ft-switch-option--selected":this.selected};return this.addTooltip(e.html`
|
|
404
404
|
<label part="label" for="input" class=${s.classMap(t)}
|
|
405
405
|
@click=${this.onChange}>
|
|
406
406
|
<div class="ft-switch-option--content">
|
|
@@ -422,14 +422,16 @@ const tt=Symbol.for(""),it=t=>{if((null==t?void 0:t.r)===tt)return null==t?void
|
|
|
422
422
|
position="${this.tooltipPosition}">
|
|
423
423
|
${t}
|
|
424
424
|
</ft-tooltip>
|
|
425
|
-
`}onChange(){this.selected=!this.unselectable||!this.selected}getLabel(){return this.label||this.textContent}resolveIcon(){return this.icon?e.html`
|
|
425
|
+
`}onChange(){this.selected=!this.unselectable||!this.selected,this.dispatchEvent(new Li(this.selected))}getLabel(){return this.label||this.textContent}resolveIcon(){return this.icon?e.html`
|
|
426
426
|
<ft-icon part="icon" .variant=${this.iconVariant} .value=${this.icon}></ft-icon>
|
|
427
|
-
`:e.nothing}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}}
|
|
427
|
+
`:e.nothing}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}}Hi.elementDefinitions={"ft-ripple":y,"ft-typography":wi,"ft-tooltip":Bi,"ft-icon":Ui},Hi.styles=[i.safariEllipsisFix,Zi],Di([o.property()],Hi.prototype,"value",void 0),Di([o.property()],Hi.prototype,"icon",void 0),Di([o.property()],Hi.prototype,"iconVariant",void 0),Di([o.property()],Hi.prototype,"label",void 0),Di([o.property()],Hi.prototype,"tooltipPosition",void 0),Di([o.property({type:Boolean,reflect:!0})],Hi.prototype,"selected",void 0),Di([o.property({type:Boolean})],Hi.prototype,"trailingIcon",void 0),Di([o.property({type:Boolean})],Hi.prototype,"unselectable",void 0),Di([o.query(".ft-switch-option--content slot")],Hi.prototype,"slottedContent",void 0),Di([o.query(".ft-switch-option--input")],Hi.prototype,"input",void 0);var Gi=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class Pi extends CustomEvent{constructor(t){super("change",{detail:t})}}class Vi extends i.FtLitElement{constructor(){super(...arguments),this.dense=!1,this.unselectable=!1,this.options=[]}get value(){var t;return null===(t=this.selectedOption)||void 0===t?void 0:t.value}updated(t){super.updated(t),t.has("selectedOption")&&this.updateOptions(),t.has("unselectable")&&this.options.forEach((t=>t.unselectable=this.unselectable))}render(){const t={"ft-switch":!0,"ft-switch--dense":this.dense};return e.html`
|
|
428
428
|
<div @keydown=${this.onKeyDown} tabindex="0" class="${s.classMap(t)}">
|
|
429
429
|
<slot @slotchange=${this.onSlotchange}
|
|
430
|
-
@option-change=${this.
|
|
430
|
+
@option-change=${this.onOptionChangeByScript}
|
|
431
|
+
@option-change-by-user=${this.onOptionChangeByUser}
|
|
432
|
+
></slot>
|
|
431
433
|
</div>
|
|
432
|
-
`}onKeyDown(t){let i;"ArrowDown"!=t.key&&"ArrowRight"!=t.key||(i=this.selectedOption?this.options.indexOf(this.selectedOption)+1:0),"ArrowUp"!=t.key&&"ArrowLeft"!=t.key||(i=this.selectedOption?this.options.indexOf(this.selectedOption)-1:this.options.length-1),null!=i&&(t.preventDefault(),this.options[this.fixIndex(i)].selected=!0)}fixIndex(t){return t<0?this.options.length-1:t>this.options.length-1?0:t}onSlotchange(){var t;this.options=[],null===(t=this.slottedContent)||void 0===t||t.assignedElements().forEach((t=>{t instanceof
|
|
434
|
+
`}onKeyDown(t){let i;"ArrowDown"!=t.key&&"ArrowRight"!=t.key||(i=this.selectedOption?this.options.indexOf(this.selectedOption)+1:0),"ArrowUp"!=t.key&&"ArrowLeft"!=t.key||(i=this.selectedOption?this.options.indexOf(this.selectedOption)-1:this.options.length-1),null!=i&&(t.preventDefault(),this.options[this.fixIndex(i)].selected=!0)}fixIndex(t){return t<0?this.options.length-1:t>this.options.length-1?0:t}onSlotchange(){var t;this.options=[],null===(t=this.slottedContent)||void 0===t||t.assignedElements().forEach((t=>{t instanceof Hi&&this.registerOption(t)})),this.selectedOption=this.options.find((t=>t.selected))}registerOption(t){t.setAttribute("tabindex","-1"),t.unselectable=this.unselectable,this.options.push(t)}onOptionChangeByScript(t){t.stopPropagation();let i=t.target;this.onOptionChange(i)}onOptionChangeByUser(t){var i;t.stopPropagation(),this.onOptionChange(t.target),this.dispatchEvent(new Pi(null===(i=this.selectedOption)||void 0===i?void 0:i.value))}onOptionChange(t){t.selected?this.selectedOption=t:this.selectedOption=this.options.find((t=>t.selected))}private(t){t.selected?this.selectedOption=t:this.selectedOption=this.options.find((t=>t.selected))}focus(){this.ftSwitchDiv.focus()}updateOptions(){this.options.forEach((t=>{t.selected=t===this.selectedOption}))}}Vi.elementDefinitions={},Vi.styles=e.css`
|
|
433
435
|
:host {
|
|
434
436
|
display: inline-block;
|
|
435
437
|
}
|
|
@@ -463,4 +465,4 @@ const tt=Symbol.for(""),it=t=>{if((null==t?void 0:t.r)===tt)return null==t?void
|
|
|
463
465
|
--ft-switch-internal-vertical-padding: 2px;
|
|
464
466
|
--ft-switch-internal-horizontal-padding: 4px;
|
|
465
467
|
}
|
|
466
|
-
`,
|
|
468
|
+
`,Gi([o.property({type:Boolean})],Vi.prototype,"dense",void 0),Gi([o.property({type:Boolean})],Vi.prototype,"unselectable",void 0),Gi([o.query(".ft-switch slot")],Vi.prototype,"slottedContent",void 0),Gi([o.state()],Vi.prototype,"selectedOption",void 0),Gi([o.query(".ft-switch")],Vi.prototype,"ftSwitchDiv",void 0),i.customElement("ft-switch")(Vi),i.customElement("ft-switch-option")(Hi),t.FtSwitch=Vi,t.FtSwitchChange=Pi,t.FtSwitchCssVariables=Mi,t.FtSwitchOption=Hi,t.FtSwitchOptionCssVariables=Wi,t.SwitchOptionChange=Ki,t.SwitchOptionChangeByUser=Li,t.optionStyles=Zi}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|
package/build/ft-switch.min.js
CHANGED
|
@@ -56,7 +56,7 @@ const p=window,f=p.ShadowRoot&&(void 0===p.ShadyCSS||p.ShadyCSS.nativeShadow)&&"
|
|
|
56
56
|
* Copyright 2017 Google LLC
|
|
57
57
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
58
58
|
*/
|
|
59
|
-
var R;E.finalized=!0,E.elementProperties=new Map,E.elementStyles=[],E.shadowRootOptions={mode:"open"},null==S||S({ReactiveElement:E}),(null!==(m=w.reactiveElementVersions)&&void 0!==m?m:w.reactiveElementVersions=[]).push("1.6.1");const M=window,U=M.trustedTypes,F=U?U.createPolicy("lit-html",{createHTML:t=>t}):void 0,j="$lit$",z=`lit$${(Math.random()+"").slice(9)}$`,A="?"+z,
|
|
59
|
+
var R;E.finalized=!0,E.elementProperties=new Map,E.elementStyles=[],E.shadowRootOptions={mode:"open"},null==S||S({ReactiveElement:E}),(null!==(m=w.reactiveElementVersions)&&void 0!==m?m:w.reactiveElementVersions=[]).push("1.6.1");const M=window,U=M.trustedTypes,F=U?U.createPolicy("lit-html",{createHTML:t=>t}):void 0,j="$lit$",z=`lit$${(Math.random()+"").slice(9)}$`,A="?"+z,B=`<${A}>`,L=document,T=()=>L.createComment(""),P=t=>null===t||"object"!=typeof t&&"function"!=typeof t,_=Array.isArray,W="[ \t\n\f\r]",D=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,I=/-->/g,H=/>/g,K=RegExp(`>|${W}(?:([^\\s"'>=/]+)(${W}*=${W}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Z=/'/g,V=/"/g,J=/^(?:script|style|textarea|title)$/i,q=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),X=Symbol.for("lit-noChange"),Y=Symbol.for("lit-nothing"),G=new WeakMap,Q=L.createTreeWalker(L,129,null,!1),tt=(t,i)=>{const e=t.length-1,o=[];let s,n=2===i?"<svg>":"",r=D;for(let i=0;i<e;i++){const e=t[i];let l,a,h=-1,c=0;for(;c<e.length&&(r.lastIndex=c,a=r.exec(e),null!==a);)c=r.lastIndex,r===D?"!--"===a[1]?r=I:void 0!==a[1]?r=H:void 0!==a[2]?(J.test(a[2])&&(s=RegExp("</"+a[2],"g")),r=K):void 0!==a[3]&&(r=K):r===K?">"===a[0]?(r=null!=s?s:D,h=-1):void 0===a[1]?h=-2:(h=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?K:'"'===a[3]?V:Z):r===V||r===Z?r=K:r===I||r===H?r=D:(r=K,s=void 0);const p=r===K&&t[i+1].startsWith("/>")?" ":"";n+=r===D?e+B:h>=0?(o.push(l),e.slice(0,h)+j+e.slice(h)+z+p):e+z+(-2===h?(o.push(void 0),i):p)}const l=n+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==F?F.createHTML(l):l,o]};class it{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let s=0,n=0;const r=t.length-1,l=this.parts,[a,h]=tt(t,i);if(this.el=it.createElement(a,e),Q.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=Q.nextNode())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith(j)||i.startsWith(z)){const e=h[n++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+j).split(z),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?rt:"?"===i[1]?at:"@"===i[1]?ht:nt})}else l.push({type:6,index:s})}for(const i of t)o.removeAttribute(i)}if(J.test(o.tagName)){const t=o.textContent.split(z),i=t.length-1;if(i>0){o.textContent=U?U.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],T()),Q.nextNode(),l.push({type:2,index:++s});o.append(t[i],T())}}}else if(8===o.nodeType)if(o.data===A)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(z,t+1));)l.push({type:7,index:s}),t+=z.length-1}s++}}static createElement(t,i){const e=L.createElement("template");return e.innerHTML=t,e}}function et(t,i,e=t,o){var s,n,r,l;if(i===X)return i;let a=void 0!==o?null===(s=e._$Co)||void 0===s?void 0:s[o]:e._$Cl;const h=P(i)?void 0:i._$litDirective$;return(null==a?void 0:a.constructor)!==h&&(null===(n=null==a?void 0:a._$AO)||void 0===n||n.call(a,!1),void 0===h?a=void 0:(a=new h(t),a._$AT(t,e,o)),void 0!==o?(null!==(r=(l=e)._$Co)&&void 0!==r?r:l._$Co=[])[o]=a:e._$Cl=a),void 0!==a&&(i=et(t,a._$AS(t,i.values),a,o)),i}class ot{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var i;const{el:{content:e},parts:o}=this._$AD,s=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:L).importNode(e,!0);Q.currentNode=s;let n=Q.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let i;2===a.type?i=new st(n,n.nextSibling,this,t):1===a.type?i=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(i=new ct(n,this,t)),this._$AV.push(i),a=o[++l]}r!==(null==a?void 0:a.index)&&(n=Q.nextNode(),r++)}return s}v(t){let i=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class st{constructor(t,i,e,o){var s;this.type=2,this._$AH=Y,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cp=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._$Cp}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0:t.nodeType)&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=et(this,t,i),P(t)?t===Y||null==t||""===t?(this._$AH!==Y&&this._$AR(),this._$AH=Y):t!==this._$AH&&t!==X&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>_(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==Y&&P(this._$AH)?this._$AA.nextSibling.data=t:this.$(L.createTextNode(t)),this._$AH=t}g(t){var i;const{values:e,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=it.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===s)this._$AH.v(e);else{const t=new ot(s,this),i=t.u(this.options);t.v(e),this.$(i),this._$AH=t}}_$AC(t){let i=G.get(t.strings);return void 0===i&&G.set(t.strings,i=new it(t)),i}T(t){_(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 st(this.k(T()),this.k(T()),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._$Cp=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class nt{constructor(t,i,e,o,s){this.type=1,this._$AH=Y,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=Y}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const s=this.strings;let n=!1;if(void 0===s)t=et(this,t,i,0),n=!P(t)||t!==this._$AH&&t!==X,n&&(this._$AH=t);else{const o=t;let r,l;for(t=s[0],r=0;r<s.length-1;r++)l=et(this,o[e+r],i,r),l===X&&(l=this._$AH[r]),n||(n=!P(l)||l!==this._$AH[r]),l===Y?t=Y:t!==Y&&(t+=(null!=l?l:"")+s[r+1]),this._$AH[r]=l}n&&!o&&this.j(t)}j(t){t===Y?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class rt extends nt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Y?void 0:t}}const lt=U?U.emptyScript:"";class at extends nt{constructor(){super(...arguments),this.type=4}j(t){t&&t!==Y?this.element.setAttribute(this.name,lt):this.element.removeAttribute(this.name)}}class ht extends nt{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=et(this,t,i,0))&&void 0!==e?e:Y)===X)return;const o=this._$AH,s=t===Y&&o!==Y||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==Y&&(o===Y||s);s&&this.element.removeEventListener(this.name,this,o),n&&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 ct{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){et(this,t)}}const pt=M.litHtmlPolyfillSupport;null==pt||pt(it,st),(null!==(R=M.litHtmlVersions)&&void 0!==R?R:M.litHtmlVersions=[]).push("2.7.3");
|
|
60
60
|
/**
|
|
61
61
|
* @license
|
|
62
62
|
* Copyright 2017 Google LLC
|
|
@@ -104,7 +104,7 @@ var ft,dt;let ut=class extends E{constructor(){super(...arguments),this.renderOp
|
|
|
104
104
|
* @license
|
|
105
105
|
* Copyright 2018 Google LLC
|
|
106
106
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
107
|
-
*/const At=jt(class extends zt{constructor(t){var i;if(super(t),t.type!==Ut||"class"!==t.name||(null===(i=t.strings)||void 0===i?void 0:i.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((i=>t[i])).join(" ")+" "}update(t,[i]){var e,o;if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!(null===(e=this.nt)||void 0===e?void 0:e.has(t))&&this.it.add(t);return this.render(i)}const s=t.element.classList;this.it.forEach((t=>{t in i||(s.remove(t),this.it.delete(t))}));for(const t in i){const e=!!i[t];e===this.it.has(t)||(null===(o=this.nt)||void 0===o?void 0:o.has(t))||(e?(s.add(t),this.it.add(t)):(s.remove(t),this.it.delete(t)))}return X}}),
|
|
107
|
+
*/const At=jt(class extends zt{constructor(t){var i;if(super(t),t.type!==Ut||"class"!==t.name||(null===(i=t.strings)||void 0===i?void 0:i.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((i=>t[i])).join(" ")+" "}update(t,[i]){var e,o;if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!(null===(e=this.nt)||void 0===e?void 0:e.has(t))&&this.it.add(t);return this.render(i)}const s=t.element.classList;this.it.forEach((t=>{t in i||(s.remove(t),this.it.delete(t))}));for(const t in i){const e=!!i[t];e===this.it.has(t)||(null===(o=this.nt)||void 0===o?void 0:o.has(t))||(e?(s.add(t),this.it.add(t)):(s.remove(t),this.it.delete(t)))}return X}}),Bt=yt.extend("--ft-ripple-color",gt.colorContent),Lt={color:Bt,backgroundColor:yt.extend("--ft-ripple-background-color",Bt),opacityContentOnSurfacePressed:yt.external(gt.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:yt.external(gt.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:yt.external(gt.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:yt.external(gt.opacityContentOnSurfaceSelected,"Design system"),borderRadius:yt.create("--ft-ripple-border-radius","SIZE","0px")},Tt=yt.extend("--ft-ripple-color",gt.colorPrimary),Pt=Tt,_t=yt.extend("--ft-ripple-background-color",Tt),Wt=yt.extend("--ft-ripple-color",gt.colorSecondary),Dt=Wt,It=yt.extend("--ft-ripple-background-color",Wt),Ht=v`
|
|
108
108
|
:host {
|
|
109
109
|
display: contents;
|
|
110
110
|
}
|
|
@@ -117,7 +117,7 @@ var ft,dt;let ut=class extends E{constructor(){super(...arguments),this.renderOp
|
|
|
117
117
|
|
|
118
118
|
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
119
119
|
overflow: hidden;
|
|
120
|
-
border-radius: ${
|
|
120
|
+
border-radius: ${Lt.borderRadius};
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
.ft-ripple .ft-ripple--background,
|
|
@@ -127,11 +127,11 @@ var ft,dt;let ut=class extends E{constructor(){super(...arguments),this.renderOp
|
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
.ft-ripple .ft-ripple--background {
|
|
130
|
-
background-color: ${
|
|
130
|
+
background-color: ${Lt.backgroundColor};
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
.ft-ripple .ft-ripple--effect {
|
|
134
|
-
background-color: ${
|
|
134
|
+
background-color: ${Lt.color};
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
@@ -179,19 +179,19 @@ var ft,dt;let ut=class extends E{constructor(){super(...arguments),this.renderOp
|
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
182
|
-
opacity: ${
|
|
182
|
+
opacity: ${Lt.opacityContentOnSurfaceHover};
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
186
|
-
opacity: ${
|
|
186
|
+
opacity: ${Lt.opacityContentOnSurfaceSelected};
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
190
|
-
opacity: ${
|
|
190
|
+
opacity: ${Lt.opacityContentOnSurfaceFocused};
|
|
191
191
|
}
|
|
192
192
|
|
|
193
193
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
194
|
-
opacity: ${
|
|
194
|
+
opacity: ${Lt.opacityContentOnSurfacePressed};
|
|
195
195
|
transform: translate(-50%, -50%) scale(1);
|
|
196
196
|
}
|
|
197
197
|
`;var Kt=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class Zt extends kt{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(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.setupDebouncer=new i(10),this.moveRipple=t=>{var i,e;let{x:o,y:s}=this.getCoordinates(t),n=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-n.x:n.width/2),this.originY=Math.round(null!=s?s-n.y:n.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.isFocusVisible(null==t?void 0:t.target)&&!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 q`
|
|
@@ -217,7 +217,7 @@ var ft,dt;let ut=class extends E{constructor(){super(...arguments),this.renderOp
|
|
|
217
217
|
* Copyright 2020 Google LLC
|
|
218
218
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
219
219
|
*/
|
|
220
|
-
const Vt=Symbol.for(""),Jt=t=>{if((null==t?void 0:t.r)===Vt)return null==t?void 0:t._$litStatic$},qt=t=>({_$litStatic$:t,r:Vt}),Xt=new Map,Yt=(t=>(i,...e)=>{const o=e.length;let s,n;const r=[],l=[];let a,h=0,c=!1;for(;h<o;){for(a=i[h];h<o&&void 0!==(n=e[h],s=Jt(n));)a+=s+i[++h],c=!0;h!==o&&l.push(n),r.push(a),h++}if(h===o&&r.push(i[o]),c){const t=r.join("$$lit$$");void 0===(i=Xt.get(t))&&(r.raw=r,Xt.set(t,i=r)),e=l}return t(i,...e)})(q);var Gt;!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"}(Gt||(Gt={}));const Qt=yt.extend("--ft-typography-font-family",gt.titleFont),ti=yt.extend("--ft-typography-font-family",gt.contentFont),ii={fontFamily:ti,fontSize:yt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:yt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:yt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:yt.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:yt.create("--ft-typography-text-transform","UNKNOWN","inherit")},ei=yt.extend("--ft-typography-title-font-family",Qt),oi=yt.extend("--ft-typography-title-font-size",ii.fontSize,"20px"),si=yt.extend("--ft-typography-title-font-weight",ii.fontWeight,"normal"),ni=yt.extend("--ft-typography-title-letter-spacing",ii.letterSpacing,"0.15px"),ri=yt.extend("--ft-typography-title-line-height",ii.lineHeight,"1.2"),li=yt.extend("--ft-typography-title-text-transform",ii.textTransform,"inherit"),ai=yt.extend("--ft-typography-title-dense-font-family",Qt),hi=yt.extend("--ft-typography-title-dense-font-size",ii.fontSize,"14px"),ci=yt.extend("--ft-typography-title-dense-font-weight",ii.fontWeight,"normal"),pi=yt.extend("--ft-typography-title-dense-letter-spacing",ii.letterSpacing,"0.105px"),fi=yt.extend("--ft-typography-title-dense-line-height",ii.lineHeight,"1.7"),di=yt.extend("--ft-typography-title-dense-text-transform",ii.textTransform,"inherit"),ui=yt.extend("--ft-typography-subtitle1-font-family",ti),xi=yt.extend("--ft-typography-subtitle1-font-size",ii.fontSize,"16px"),yi=yt.extend("--ft-typography-subtitle1-font-weight",ii.fontWeight,"600"),vi=yt.extend("--ft-typography-subtitle1-letter-spacing",ii.letterSpacing,"0.144px"),gi=yt.extend("--ft-typography-subtitle1-line-height",ii.lineHeight,"1.5"),bi=yt.extend("--ft-typography-subtitle1-text-transform",ii.textTransform,"inherit"),mi=yt.extend("--ft-typography-subtitle2-font-family",ti),wi=yt.extend("--ft-typography-subtitle2-font-size",ii.fontSize,"14px"),$i=yt.extend("--ft-typography-subtitle2-font-weight",ii.fontWeight,"normal"),Oi=yt.extend("--ft-typography-subtitle2-letter-spacing",ii.letterSpacing,"0.098px"),Si=yt.extend("--ft-typography-subtitle2-line-height",ii.lineHeight,"1.7"),ki=yt.extend("--ft-typography-subtitle2-text-transform",ii.textTransform,"inherit"),Ci=yt.extend("--ft-typography-body1-font-family",ti),Ni=yt.extend("--ft-typography-body1-font-size",ii.fontSize,"16px"),Ei=yt.extend("--ft-typography-body1-font-weight",ii.fontWeight,"normal"),Ri=yt.extend("--ft-typography-body1-letter-spacing",ii.letterSpacing,"0.496px"),Mi=yt.extend("--ft-typography-body1-line-height",ii.lineHeight,"1.5"),Ui=yt.extend("--ft-typography-body1-text-transform",ii.textTransform,"inherit"),Fi=yt.extend("--ft-typography-body2-font-family",ti),ji=yt.extend("--ft-typography-body2-font-size",ii.fontSize,"14px"),zi=yt.extend("--ft-typography-body2-font-weight",ii.fontWeight,"normal"),Ai=yt.extend("--ft-typography-body2-letter-spacing",ii.letterSpacing,"0.252px"),
|
|
220
|
+
const Vt=Symbol.for(""),Jt=t=>{if((null==t?void 0:t.r)===Vt)return null==t?void 0:t._$litStatic$},qt=t=>({_$litStatic$:t,r:Vt}),Xt=new Map,Yt=(t=>(i,...e)=>{const o=e.length;let s,n;const r=[],l=[];let a,h=0,c=!1;for(;h<o;){for(a=i[h];h<o&&void 0!==(n=e[h],s=Jt(n));)a+=s+i[++h],c=!0;h!==o&&l.push(n),r.push(a),h++}if(h===o&&r.push(i[o]),c){const t=r.join("$$lit$$");void 0===(i=Xt.get(t))&&(r.raw=r,Xt.set(t,i=r)),e=l}return t(i,...e)})(q);var Gt;!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"}(Gt||(Gt={}));const Qt=yt.extend("--ft-typography-font-family",gt.titleFont),ti=yt.extend("--ft-typography-font-family",gt.contentFont),ii={fontFamily:ti,fontSize:yt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:yt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:yt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:yt.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:yt.create("--ft-typography-text-transform","UNKNOWN","inherit")},ei=yt.extend("--ft-typography-title-font-family",Qt),oi=yt.extend("--ft-typography-title-font-size",ii.fontSize,"20px"),si=yt.extend("--ft-typography-title-font-weight",ii.fontWeight,"normal"),ni=yt.extend("--ft-typography-title-letter-spacing",ii.letterSpacing,"0.15px"),ri=yt.extend("--ft-typography-title-line-height",ii.lineHeight,"1.2"),li=yt.extend("--ft-typography-title-text-transform",ii.textTransform,"inherit"),ai=yt.extend("--ft-typography-title-dense-font-family",Qt),hi=yt.extend("--ft-typography-title-dense-font-size",ii.fontSize,"14px"),ci=yt.extend("--ft-typography-title-dense-font-weight",ii.fontWeight,"normal"),pi=yt.extend("--ft-typography-title-dense-letter-spacing",ii.letterSpacing,"0.105px"),fi=yt.extend("--ft-typography-title-dense-line-height",ii.lineHeight,"1.7"),di=yt.extend("--ft-typography-title-dense-text-transform",ii.textTransform,"inherit"),ui=yt.extend("--ft-typography-subtitle1-font-family",ti),xi=yt.extend("--ft-typography-subtitle1-font-size",ii.fontSize,"16px"),yi=yt.extend("--ft-typography-subtitle1-font-weight",ii.fontWeight,"600"),vi=yt.extend("--ft-typography-subtitle1-letter-spacing",ii.letterSpacing,"0.144px"),gi=yt.extend("--ft-typography-subtitle1-line-height",ii.lineHeight,"1.5"),bi=yt.extend("--ft-typography-subtitle1-text-transform",ii.textTransform,"inherit"),mi=yt.extend("--ft-typography-subtitle2-font-family",ti),wi=yt.extend("--ft-typography-subtitle2-font-size",ii.fontSize,"14px"),$i=yt.extend("--ft-typography-subtitle2-font-weight",ii.fontWeight,"normal"),Oi=yt.extend("--ft-typography-subtitle2-letter-spacing",ii.letterSpacing,"0.098px"),Si=yt.extend("--ft-typography-subtitle2-line-height",ii.lineHeight,"1.7"),ki=yt.extend("--ft-typography-subtitle2-text-transform",ii.textTransform,"inherit"),Ci=yt.extend("--ft-typography-body1-font-family",ti),Ni=yt.extend("--ft-typography-body1-font-size",ii.fontSize,"16px"),Ei=yt.extend("--ft-typography-body1-font-weight",ii.fontWeight,"normal"),Ri=yt.extend("--ft-typography-body1-letter-spacing",ii.letterSpacing,"0.496px"),Mi=yt.extend("--ft-typography-body1-line-height",ii.lineHeight,"1.5"),Ui=yt.extend("--ft-typography-body1-text-transform",ii.textTransform,"inherit"),Fi=yt.extend("--ft-typography-body2-font-family",ti),ji=yt.extend("--ft-typography-body2-font-size",ii.fontSize,"14px"),zi=yt.extend("--ft-typography-body2-font-weight",ii.fontWeight,"normal"),Ai=yt.extend("--ft-typography-body2-letter-spacing",ii.letterSpacing,"0.252px"),Bi=yt.extend("--ft-typography-body2-line-height",ii.lineHeight,"1.4"),Li=yt.extend("--ft-typography-body2-text-transform",ii.textTransform,"inherit"),Ti=yt.extend("--ft-typography-caption-font-family",ti),Pi=yt.extend("--ft-typography-caption-font-size",ii.fontSize,"12px"),_i=yt.extend("--ft-typography-caption-font-weight",ii.fontWeight,"normal"),Wi=yt.extend("--ft-typography-caption-letter-spacing",ii.letterSpacing,"0.396px"),Di=yt.extend("--ft-typography-caption-line-height",ii.lineHeight,"1.33"),Ii=yt.extend("--ft-typography-caption-text-transform",ii.textTransform,"inherit"),Hi=yt.extend("--ft-typography-breadcrumb-font-family",ti),Ki=yt.extend("--ft-typography-breadcrumb-font-size",ii.fontSize,"10px"),Zi=yt.extend("--ft-typography-breadcrumb-font-weight",ii.fontWeight,"normal"),Vi=yt.extend("--ft-typography-breadcrumb-letter-spacing",ii.letterSpacing,"0.33px"),Ji=yt.extend("--ft-typography-breadcrumb-line-height",ii.lineHeight,"1.6"),qi=yt.extend("--ft-typography-breadcrumb-text-transform",ii.textTransform,"inherit"),Xi=yt.extend("--ft-typography-overline-font-family",ti),Yi=yt.extend("--ft-typography-overline-font-size",ii.fontSize,"10px"),Gi=yt.extend("--ft-typography-overline-font-weight",ii.fontWeight,"normal"),Qi=yt.extend("--ft-typography-overline-letter-spacing",ii.letterSpacing,"1.5px"),te=yt.extend("--ft-typography-overline-line-height",ii.lineHeight,"1.6"),ie=yt.extend("--ft-typography-overline-text-transform",ii.textTransform,"uppercase"),ee={fontFamily:yt.extend("--ft-typography-button-font-family",ti),fontSize:yt.extend("--ft-typography-button-font-size",ii.fontSize,"14px"),fontWeight:yt.extend("--ft-typography-button-font-weight",ii.fontWeight,"600"),letterSpacing:yt.extend("--ft-typography-button-letter-spacing",ii.letterSpacing,"1.246px"),lineHeight:yt.extend("--ft-typography-button-line-height",ii.lineHeight,"1.15"),textTransform:yt.extend("--ft-typography-button-text-transform",ii.textTransform,"uppercase")},oe=v`
|
|
221
221
|
.ft-typography--title {
|
|
222
222
|
font-family: ${ei};
|
|
223
223
|
font-size: ${oi};
|
|
@@ -269,8 +269,8 @@ const Vt=Symbol.for(""),Jt=t=>{if((null==t?void 0:t.r)===Vt)return null==t?void
|
|
|
269
269
|
font-size: ${ji};
|
|
270
270
|
font-weight: ${zi};
|
|
271
271
|
letter-spacing: ${Ai};
|
|
272
|
-
line-height: ${
|
|
273
|
-
text-transform: ${
|
|
272
|
+
line-height: ${Bi};
|
|
273
|
+
text-transform: ${Li};
|
|
274
274
|
}
|
|
275
275
|
`,he=v`
|
|
276
276
|
.ft-typography--caption {
|
|
@@ -381,7 +381,7 @@ function(t,i,e){let o,s=t;return"object"==typeof t?(s=t.slot,o=t):o={flatten:i},
|
|
|
381
381
|
* Copyright 2017 Google LLC
|
|
382
382
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
383
383
|
*/
|
|
384
|
-
class ke extends zt{constructor(t){if(super(t),this.et=Y,t.type!==Ft)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===Y||null==t)return this.ft=void 0,this.et=t;if(t===X)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.ft;this.et=t;const i=[t];return i.raw=i,this.ft={_$litType$:this.constructor.resultType,strings:i,values:[]}}}ke.directiveName="unsafeHTML",ke.resultType=1;const Ce=jt(ke);var Ne,Ee;!function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.LINE_CHART="",t.STACKED_CHART="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.EYE_SLASH="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.PIP="",t.PIP_WIDE="",t.EXPAND_WIDE="",t.X_MARK=""}(Ne||(Ne={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(Ee||(Ee={})),new Map([...["abw"].map((t=>[t,Ee.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,Ee.AUDIO])),...["avi"].map((t=>[t,Ee.AVI])),...["chm","xhs"].map((t=>[t,Ee.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,Ee.CODE])),...["csv"].map((t=>[t,Ee.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Ee.DITA])),...["epub"].map((t=>[t,Ee.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Ee.EXCEL])),...["flac"].map((t=>[t,Ee.FLAC])),...["gif"].map((t=>[t,Ee.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Ee.GZIP])),...["html","htm","xhtml"].map((t=>[t,Ee.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,Ee.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Ee.JPEG])),...["json"].map((t=>[t,Ee.JSON])),...["m4a","m4p"].map((t=>[t,Ee.M4A])),...["mov","qt"].map((t=>[t,Ee.MOV])),...["mp3"].map((t=>[t,Ee.MP3])),...["mp4","m4v"].map((t=>[t,Ee.MP4])),...["ogg","oga"].map((t=>[t,Ee.OGG])),...["pdf","ps"].map((t=>[t,Ee.PDF])),...["png"].map((t=>[t,Ee.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Ee.POWERPOINT])),...["rar"].map((t=>[t,Ee.RAR])),...["stp"].map((t=>[t,Ee.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Ee.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,Ee.VIDEO])),...["wav"].map((t=>[t,Ee.WAV])),...["wma"].map((t=>[t,Ee.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Ee.WORD])),...["xml","xsl","rdf"].map((t=>[t,Ee.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Ee.YAML])),...["zip"].map((t=>[t,Ee.ZIP]))]);const Re={size:yt.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:yt.extend("--ft-icon-fluid-topics-font-family",yt.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:yt.extend("--ft-icon-file-format-font-family",yt.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:yt.extend("--ft-icon-material-font-family",yt.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:yt.create("--ft-icon-vertical-align","UNKNOWN","unset")},Me=v`
|
|
384
|
+
class ke extends zt{constructor(t){if(super(t),this.et=Y,t.type!==Ft)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===Y||null==t)return this.ft=void 0,this.et=t;if(t===X)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.ft;this.et=t;const i=[t];return i.raw=i,this.ft={_$litType$:this.constructor.resultType,strings:i,values:[]}}}ke.directiveName="unsafeHTML",ke.resultType=1;const Ce=jt(ke);var Ne,Ee;!function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.LINE_CHART="",t.STACKED_CHART="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.EYE_SLASH="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.PIP="",t.PIP_WIDE="",t.EXPAND_WIDE="",t.X_MARK=""}(Ne||(Ne={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(Ee||(Ee={})),new Map([...["abw"].map((t=>[t,Ee.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,Ee.AUDIO])),...["avi"].map((t=>[t,Ee.AVI])),...["chm","xhs"].map((t=>[t,Ee.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,Ee.CODE])),...["csv"].map((t=>[t,Ee.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Ee.DITA])),...["epub"].map((t=>[t,Ee.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Ee.EXCEL])),...["flac"].map((t=>[t,Ee.FLAC])),...["gif"].map((t=>[t,Ee.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Ee.GZIP])),...["html","htm","xhtml"].map((t=>[t,Ee.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,Ee.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Ee.JPEG])),...["json"].map((t=>[t,Ee.JSON])),...["m4a","m4p"].map((t=>[t,Ee.M4A])),...["mov","qt"].map((t=>[t,Ee.MOV])),...["mp3"].map((t=>[t,Ee.MP3])),...["mp4","m4v"].map((t=>[t,Ee.MP4])),...["ogg","oga"].map((t=>[t,Ee.OGG])),...["pdf","ps"].map((t=>[t,Ee.PDF])),...["png"].map((t=>[t,Ee.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Ee.POWERPOINT])),...["rar"].map((t=>[t,Ee.RAR])),...["stp"].map((t=>[t,Ee.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Ee.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,Ee.VIDEO])),...["wav"].map((t=>[t,Ee.WAV])),...["wma"].map((t=>[t,Ee.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Ee.WORD])),...["xml","xsl","rdf"].map((t=>[t,Ee.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Ee.YAML])),...["zip"].map((t=>[t,Ee.ZIP]))]);const Re={size:yt.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:yt.extend("--ft-icon-fluid-topics-font-family",yt.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:yt.extend("--ft-icon-file-format-font-family",yt.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:yt.extend("--ft-icon-material-font-family",yt.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:yt.create("--ft-icon-vertical-align","UNKNOWN","unset")},Me=v`
|
|
385
385
|
:host, i.ft-icon {
|
|
386
386
|
display: inline-flex;
|
|
387
387
|
align-items: center;
|
|
@@ -434,7 +434,7 @@ class ke extends zt{constructor(t){if(super(t),this.et=Y,t.type!==Ft)throw Error
|
|
|
434
434
|
${Ce(this.resolvedIcon)}
|
|
435
435
|
<slot ?hidden=${i}></slot>
|
|
436
436
|
</i>
|
|
437
|
-
`}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}update(t){super.update(t),["value","variant"].some((i=>t.has(i)))&&this.resolveIcon()}resolveIcon(){var t,i;let e=this.value||this.textContent;switch(this.variant){case Ue.file_format:this.resolvedIcon=null!==(t=Ee[e.replace("-","_").toUpperCase()])&&void 0!==t?t:e;break;case Ue.material:this.resolvedIcon=this.value||Y;break;default:this.resolvedIcon=null!==(i=Ne[e.replace("-","_").toUpperCase()])&&void 0!==i?i:e}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}je.elementDefinitions={},je.styles=Me,Fe([o()],je.prototype,"variant",void 0),Fe([o()],je.prototype,"value",void 0),Fe([s()],je.prototype,"resolvedIcon",void 0),Fe([r("slot")],je.prototype,"slottedContent",void 0),c("ft-icon")(je);const ze={textColor:yt.extend("--ft-switch-text-color",gt.colorOnSurfaceHigh),backgroundColor:yt.extend("--ft-switch-background-color",gt.colorSurface),selectedTextColor:yt.extend("--ft-switch-selected-text-color",gt.colorPrimary),selectedBackgroundColor:yt.extend("--ft-switch-selected-background-color",gt.colorPrimary),borderColor:yt.extend("--ft-switch-border-color",gt.colorOutline),borderRadius:yt.extend("--ft-switch-border-radius",gt.borderRadiusL),fontSize:yt.extend("--ft-switch-font-size",ee.fontSize),iconSize:yt.create("--ft-switch-icon-size","SIZE","24px"),iconColor:yt.extend("--ft-switch-text-color",gt.colorOnSurfaceMedium),rippleColor:yt.extend("--ft-switch-ripple-color",gt.colorPrimary),outlineColor:yt.extend("--ft-switch-outline-color",gt.colorPrimary)},Ae={borderRadiusLeft:yt.extend("--ft-switch-option-border-radius-left",gt.borderRadiusL),borderRadiusRight:yt.extend("--ft-switch-option-border-radius-right",gt.borderRadiusL),borderWidthLeft:yt.create("--ft-switch-option-border-width-left","SIZE","1px"),borderWidthRight:yt.create("--ft-switch-option-border-width-right","SIZE","1px"),borderWidthVertical:yt.create("--ft-switch-option-border-width-vertical","SIZE","1px")},
|
|
437
|
+
`}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}update(t){super.update(t),["value","variant"].some((i=>t.has(i)))&&this.resolveIcon()}resolveIcon(){var t,i;let e=this.value||this.textContent;switch(this.variant){case Ue.file_format:this.resolvedIcon=null!==(t=Ee[e.replace("-","_").toUpperCase()])&&void 0!==t?t:e;break;case Ue.material:this.resolvedIcon=this.value||Y;break;default:this.resolvedIcon=null!==(i=Ne[e.replace("-","_").toUpperCase()])&&void 0!==i?i:e}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}je.elementDefinitions={},je.styles=Me,Fe([o()],je.prototype,"variant",void 0),Fe([o()],je.prototype,"value",void 0),Fe([s()],je.prototype,"resolvedIcon",void 0),Fe([r("slot")],je.prototype,"slottedContent",void 0),c("ft-icon")(je);const ze={textColor:yt.extend("--ft-switch-text-color",gt.colorOnSurfaceHigh),backgroundColor:yt.extend("--ft-switch-background-color",gt.colorSurface),selectedTextColor:yt.extend("--ft-switch-selected-text-color",gt.colorPrimary),selectedBackgroundColor:yt.extend("--ft-switch-selected-background-color",gt.colorPrimary),borderColor:yt.extend("--ft-switch-border-color",gt.colorOutline),borderRadius:yt.extend("--ft-switch-border-radius",gt.borderRadiusL),fontSize:yt.extend("--ft-switch-font-size",ee.fontSize),iconSize:yt.create("--ft-switch-icon-size","SIZE","24px"),iconColor:yt.extend("--ft-switch-text-color",gt.colorOnSurfaceMedium),rippleColor:yt.extend("--ft-switch-ripple-color",gt.colorPrimary),outlineColor:yt.extend("--ft-switch-outline-color",gt.colorPrimary)},Ae={borderRadiusLeft:yt.extend("--ft-switch-option-border-radius-left",gt.borderRadiusL),borderRadiusRight:yt.extend("--ft-switch-option-border-radius-right",gt.borderRadiusL),borderWidthLeft:yt.create("--ft-switch-option-border-width-left","SIZE","1px"),borderWidthRight:yt.create("--ft-switch-option-border-width-right","SIZE","1px"),borderWidthVertical:yt.create("--ft-switch-option-border-width-vertical","SIZE","1px")},Be=v`
|
|
438
438
|
.ft-switch-option {
|
|
439
439
|
position: relative;
|
|
440
440
|
display: inline-block;
|
|
@@ -499,7 +499,7 @@ class ke extends zt{constructor(t){if(super(t),this.et=Y,t.type!==Ft)throw Error
|
|
|
499
499
|
}
|
|
500
500
|
|
|
501
501
|
.ft-switch-option--ripple {
|
|
502
|
-
${vt(
|
|
502
|
+
${vt(Lt.color,ze.rippleColor)};
|
|
503
503
|
}
|
|
504
504
|
|
|
505
505
|
ft-icon, ft-ripple, ft-typography {
|
|
@@ -518,7 +518,7 @@ class ke extends zt{constructor(t){if(super(t),this.et=Y,t.type!==Ft)throw Error
|
|
|
518
518
|
.ft-switch-option--selected ft-icon {
|
|
519
519
|
color: ${ze.selectedTextColor};
|
|
520
520
|
}
|
|
521
|
-
`;var
|
|
521
|
+
`;var Le=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class Te extends CustomEvent{constructor(t){super("option-change-by-user",{detail:t,bubbles:!0,composed:!0})}}class Pe extends CustomEvent{constructor(t){super("option-change",{detail:t,bubbles:!0,composed:!0})}}class _e extends kt{constructor(){super(...arguments),this.value="",this.label="",this.tooltipPosition="bottom",this.selected=!1,this.trailingIcon=!1,this.unselectable=!1}focus(){this.input.focus()}updated(t){super.updated(t),t.has("selected")&&this.dispatchEvent(new Pe(this.selected))}render(){const t={"ft-switch-option":!0,"ft-switch-option--trailing-icon":this.trailingIcon,"ft-switch-option--selected":this.selected};return this.addTooltip(q`
|
|
522
522
|
<label part="label" for="input" class=${At(t)}
|
|
523
523
|
@click=${this.onChange}>
|
|
524
524
|
<div class="ft-switch-option--content">
|
|
@@ -540,14 +540,16 @@ class ke extends zt{constructor(t){if(super(t),this.et=Y,t.type!==Ft)throw Error
|
|
|
540
540
|
position="${this.tooltipPosition}">
|
|
541
541
|
${t}
|
|
542
542
|
</ft-tooltip>
|
|
543
|
-
`}onChange(){this.selected=!this.unselectable||!this.selected}getLabel(){return this.label||this.textContent}resolveIcon(){return this.icon?q`
|
|
543
|
+
`}onChange(){this.selected=!this.unselectable||!this.selected,this.dispatchEvent(new Te(this.selected))}getLabel(){return this.label||this.textContent}resolveIcon(){return this.icon?q`
|
|
544
544
|
<ft-icon part="icon" .variant=${this.iconVariant} .value=${this.icon}></ft-icon>
|
|
545
|
-
`:Y}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}}
|
|
545
|
+
`:Y}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}}_e.elementDefinitions={"ft-ripple":Zt,"ft-typography":xe,"ft-tooltip":Se,"ft-icon":je},_e.styles=[Ct,Be],Le([o()],_e.prototype,"value",void 0),Le([o()],_e.prototype,"icon",void 0),Le([o()],_e.prototype,"iconVariant",void 0),Le([o()],_e.prototype,"label",void 0),Le([o()],_e.prototype,"tooltipPosition",void 0),Le([o({type:Boolean,reflect:!0})],_e.prototype,"selected",void 0),Le([o({type:Boolean})],_e.prototype,"trailingIcon",void 0),Le([o({type:Boolean})],_e.prototype,"unselectable",void 0),Le([r(".ft-switch-option--content slot")],_e.prototype,"slottedContent",void 0),Le([r(".ft-switch-option--input")],_e.prototype,"input",void 0);var We=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class De extends CustomEvent{constructor(t){super("change",{detail:t})}}class Ie extends kt{constructor(){super(...arguments),this.dense=!1,this.unselectable=!1,this.options=[]}get value(){var t;return null===(t=this.selectedOption)||void 0===t?void 0:t.value}updated(t){super.updated(t),t.has("selectedOption")&&this.updateOptions(),t.has("unselectable")&&this.options.forEach((t=>t.unselectable=this.unselectable))}render(){const t={"ft-switch":!0,"ft-switch--dense":this.dense};return q`
|
|
546
546
|
<div @keydown=${this.onKeyDown} tabindex="0" class="${At(t)}">
|
|
547
547
|
<slot @slotchange=${this.onSlotchange}
|
|
548
|
-
@option-change=${this.
|
|
548
|
+
@option-change=${this.onOptionChangeByScript}
|
|
549
|
+
@option-change-by-user=${this.onOptionChangeByUser}
|
|
550
|
+
></slot>
|
|
549
551
|
</div>
|
|
550
|
-
`}onKeyDown(t){let i;"ArrowDown"!=t.key&&"ArrowRight"!=t.key||(i=this.selectedOption?this.options.indexOf(this.selectedOption)+1:0),"ArrowUp"!=t.key&&"ArrowLeft"!=t.key||(i=this.selectedOption?this.options.indexOf(this.selectedOption)-1:this.options.length-1),null!=i&&(t.preventDefault(),this.options[this.fixIndex(i)].selected=!0)}fixIndex(t){return t<0?this.options.length-1:t>this.options.length-1?0:t}onSlotchange(){var t;this.options=[],null===(t=this.slottedContent)||void 0===t||t.assignedElements().forEach((t=>{t instanceof
|
|
552
|
+
`}onKeyDown(t){let i;"ArrowDown"!=t.key&&"ArrowRight"!=t.key||(i=this.selectedOption?this.options.indexOf(this.selectedOption)+1:0),"ArrowUp"!=t.key&&"ArrowLeft"!=t.key||(i=this.selectedOption?this.options.indexOf(this.selectedOption)-1:this.options.length-1),null!=i&&(t.preventDefault(),this.options[this.fixIndex(i)].selected=!0)}fixIndex(t){return t<0?this.options.length-1:t>this.options.length-1?0:t}onSlotchange(){var t;this.options=[],null===(t=this.slottedContent)||void 0===t||t.assignedElements().forEach((t=>{t instanceof _e&&this.registerOption(t)})),this.selectedOption=this.options.find((t=>t.selected))}registerOption(t){t.setAttribute("tabindex","-1"),t.unselectable=this.unselectable,this.options.push(t)}onOptionChangeByScript(t){t.stopPropagation();let i=t.target;this.onOptionChange(i)}onOptionChangeByUser(t){var i;t.stopPropagation(),this.onOptionChange(t.target),this.dispatchEvent(new De(null===(i=this.selectedOption)||void 0===i?void 0:i.value))}onOptionChange(t){t.selected?this.selectedOption=t:this.selectedOption=this.options.find((t=>t.selected))}private(t){t.selected?this.selectedOption=t:this.selectedOption=this.options.find((t=>t.selected))}focus(){this.ftSwitchDiv.focus()}updateOptions(){this.options.forEach((t=>{t.selected=t===this.selectedOption}))}}Ie.elementDefinitions={},Ie.styles=v`
|
|
551
553
|
:host {
|
|
552
554
|
display: inline-block;
|
|
553
555
|
}
|
|
@@ -581,4 +583,4 @@ class ke extends zt{constructor(t){if(super(t),this.et=Y,t.type!==Ft)throw Error
|
|
|
581
583
|
--ft-switch-internal-vertical-padding: 2px;
|
|
582
584
|
--ft-switch-internal-horizontal-padding: 4px;
|
|
583
585
|
}
|
|
584
|
-
`,
|
|
586
|
+
`,We([o({type:Boolean})],Ie.prototype,"dense",void 0),We([o({type:Boolean})],Ie.prototype,"unselectable",void 0),We([r(".ft-switch slot")],Ie.prototype,"slottedContent",void 0),We([s()],Ie.prototype,"selectedOption",void 0),We([r(".ft-switch")],Ie.prototype,"ftSwitchDiv",void 0),c("ft-switch")(Ie),c("ft-switch-option")(_e),t.FtSwitch=Ie,t.FtSwitchChange=De,t.FtSwitchCssVariables=ze,t.FtSwitchOption=_e,t.FtSwitchOptionCssVariables=Ae,t.SwitchOptionChange=Pe,t.SwitchOptionChangeByUser=Te,t.optionStyles=Be}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-switch",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.46",
|
|
4
4
|
"description": "two-state",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-icon": "1.0.
|
|
23
|
-
"@fluid-topics/ft-ripple": "1.0.
|
|
24
|
-
"@fluid-topics/ft-tooltip": "1.0.
|
|
25
|
-
"@fluid-topics/ft-typography": "1.0.
|
|
26
|
-
"@fluid-topics/ft-wc-utils": "1.0.
|
|
22
|
+
"@fluid-topics/ft-icon": "1.0.46",
|
|
23
|
+
"@fluid-topics/ft-ripple": "1.0.46",
|
|
24
|
+
"@fluid-topics/ft-tooltip": "1.0.46",
|
|
25
|
+
"@fluid-topics/ft-typography": "1.0.46",
|
|
26
|
+
"@fluid-topics/ft-wc-utils": "1.0.46",
|
|
27
27
|
"lit": "2.7.2"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "870061f10866878a0c71b738ceeb3a41514e1b6f"
|
|
30
30
|
}
|