@fluid-topics/ft-filter 1.0.11 → 1.0.12
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-filter-level.js +1 -2
- package/build/ft-filter.js +1 -2
- package/build/ft-filter.light.js +121 -121
- package/build/ft-filter.min.js +153 -152
- package/package.json +10 -10
- package/build/utils.d.ts +0 -1
- package/build/utils.js +0 -3
package/build/ft-filter.light.js
CHANGED
|
@@ -112,7 +112,7 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
112
112
|
</${P(this.element)}>
|
|
113
113
|
`:G`
|
|
114
114
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
115
|
-
`}}
|
|
115
|
+
`}}li.styles=[qt,Xt,Yt,Jt,Qt,ti,ii,ei,oi,si,ri],ni([o.property()],li.prototype,"element",void 0),ni([o.property()],li.prototype,"variant",void 0),i.customElement("ft-typography")(li);const ai=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorContent),hi={color:ai,backgroundColor:i.FtCssVariableFactory.extend("--ft-ripple-background-color",ai),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")},pi=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorPrimary),fi=pi,ci=i.FtCssVariableFactory.extend("--ft-ripple-background-color",pi),di=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorSecondary),ui=di,vi=i.FtCssVariableFactory.extend("--ft-ripple-background-color",di),bi=e.css`
|
|
116
116
|
:host {
|
|
117
117
|
display: contents;
|
|
118
118
|
}
|
|
@@ -125,7 +125,7 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
125
125
|
|
|
126
126
|
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
127
127
|
overflow: hidden;
|
|
128
|
-
border-radius: ${
|
|
128
|
+
border-radius: ${hi.borderRadius};
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
.ft-ripple .ft-ripple--background,
|
|
@@ -135,27 +135,27 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
.ft-ripple .ft-ripple--background {
|
|
138
|
-
background-color: ${
|
|
138
|
+
background-color: ${hi.backgroundColor};
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
.ft-ripple .ft-ripple--effect {
|
|
142
|
-
background-color: ${
|
|
142
|
+
background-color: ${hi.color};
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
146
|
-
background-color: ${
|
|
146
|
+
background-color: ${vi};
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
150
|
-
background-color: ${
|
|
150
|
+
background-color: ${ui};
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
154
|
-
background-color: ${
|
|
154
|
+
background-color: ${ci};
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
158
|
-
background-color: ${
|
|
158
|
+
background-color: ${fi};
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
.ft-ripple .ft-ripple--background {
|
|
@@ -187,22 +187,22 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
190
|
-
opacity: ${
|
|
190
|
+
opacity: ${hi.opacityContentOnSurfaceHover};
|
|
191
191
|
}
|
|
192
192
|
|
|
193
193
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
194
|
-
opacity: ${
|
|
194
|
+
opacity: ${hi.opacityContentOnSurfaceSelected};
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
198
|
-
opacity: ${
|
|
198
|
+
opacity: ${hi.opacityContentOnSurfaceFocused};
|
|
199
199
|
}
|
|
200
200
|
|
|
201
201
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
202
|
-
opacity: ${
|
|
202
|
+
opacity: ${hi.opacityContentOnSurfacePressed};
|
|
203
203
|
transform: translate(-50%, -50%) scale(1);
|
|
204
204
|
}
|
|
205
|
-
`;var
|
|
205
|
+
`;var xi=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class gi extends i.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new i.Debouncer(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.setupDebouncer=new i.Debouncer(10),this.moveRipple=t=>{var i,e;let{x:o,y:s}=this.getCoordinates(t),r=null!==(e=null===(i=this.ripple)||void 0===i?void 0:i.getBoundingClientRect())&&void 0!==e?e:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-r.x:r.width/2),this.originY=Math.round(null!=s?s-r.y:r.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return e.html`
|
|
206
206
|
<style>
|
|
207
207
|
.ft-ripple .ft-ripple--effect,
|
|
208
208
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -219,7 +219,7 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
219
219
|
<div class="ft-ripple--background"></div>
|
|
220
220
|
<div class="ft-ripple--effect"></div>
|
|
221
221
|
</div>
|
|
222
|
-
`}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}}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()}}
|
|
222
|
+
`}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}}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()}}gi.elementDefinitions={},gi.styles=bi,xi([o.property({type:Boolean})],gi.prototype,"primary",void 0),xi([o.property({type:Boolean})],gi.prototype,"secondary",void 0),xi([o.property({type:Boolean})],gi.prototype,"unbounded",void 0),xi([o.property({type:Boolean})],gi.prototype,"activated",void 0),xi([o.property({type:Boolean})],gi.prototype,"selected",void 0),xi([o.property({type:Boolean})],gi.prototype,"disabled",void 0),xi([o.state()],gi.prototype,"hovered",void 0),xi([o.state()],gi.prototype,"focused",void 0),xi([o.state()],gi.prototype,"pressed",void 0),xi([o.state()],gi.prototype,"rippling",void 0),xi([o.state()],gi.prototype,"rippleSize",void 0),xi([o.state()],gi.prototype,"originX",void 0),xi([o.state()],gi.prototype,"originY",void 0),xi([o.query(".ft-ripple")],gi.prototype,"ripple",void 0),xi([o.query(".ft-ripple--effect")],gi.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(gi);const yi=i.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),mi=i.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),$i=i.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),ki=i.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","1"),wi=i.FtCssVariableFactory.external(i.designSystemVariables.borderRadiusS,"Design system"),zi=i.FtCssVariableFactory.create("--ft-tooltip-max-width","SIZE","150px"),Si=e.css`
|
|
223
223
|
.ft-tooltip--container {
|
|
224
224
|
display: block;
|
|
225
225
|
position: relative;
|
|
@@ -235,23 +235,23 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
235
235
|
box-sizing: border-box;
|
|
236
236
|
overflow: hidden;
|
|
237
237
|
width: max-content;
|
|
238
|
-
max-width: ${
|
|
238
|
+
max-width: ${zi};
|
|
239
239
|
text-align: center;
|
|
240
|
-
padding: ${
|
|
241
|
-
z-index: ${
|
|
240
|
+
padding: ${yi};
|
|
241
|
+
z-index: ${ki};
|
|
242
242
|
}
|
|
243
243
|
|
|
244
244
|
.ft-tooltip--content {
|
|
245
245
|
padding: 4px 8px;
|
|
246
|
-
border-radius: ${
|
|
247
|
-
background-color: ${
|
|
248
|
-
color: ${
|
|
246
|
+
border-radius: ${wi};
|
|
247
|
+
background-color: ${$i};
|
|
248
|
+
color: ${mi};
|
|
249
249
|
top: -500px;
|
|
250
250
|
left: -500px;
|
|
251
251
|
position: relative;
|
|
252
252
|
word-break: break-word;
|
|
253
253
|
}
|
|
254
|
-
`;var
|
|
254
|
+
`;var Oi=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class Ci 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`
|
|
255
255
|
<div part="container"
|
|
256
256
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
257
257
|
@mouseenter=${this.onHover}
|
|
@@ -269,7 +269,7 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
269
269
|
</div>
|
|
270
270
|
</div>
|
|
271
271
|
</div>
|
|
272
|
-
`}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,r=0;switch(this.validPosition){case"top":r=-this.tooltip.clientHeight,s=o;break;case"bottom":r=i.height,s=o;break;case"left":r=e,s=-this.tooltip.clientWidth;break;case"right":r=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 n=this.tooltip.style;n.left=s+"px",n.top=r+"px",n.maxWidth=`max(${i.width}px, ${
|
|
272
|
+
`}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,r=0;switch(this.validPosition){case"top":r=-this.tooltip.clientHeight,s=o;break;case"bottom":r=i.height,s=o;break;case"left":r=e,s=-this.tooltip.clientWidth;break;case"right":r=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 n=this.tooltip.style;n.left=s+"px",n.top=r+"px",n.maxWidth=`max(${i.width}px, ${zi})`}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())}}Ci.elementDefinitions={"ft-typography":li},Ci.styles=Si,Oi([o.property()],Ci.prototype,"text",void 0),Oi([o.property({type:Boolean})],Ci.prototype,"manual",void 0),Oi([o.property({type:Boolean})],Ci.prototype,"inline",void 0),Oi([o.property({type:Number})],Ci.prototype,"delay",void 0),Oi([o.property()],Ci.prototype,"position",void 0),Oi([o.queryAssignedNodes("",!0)],Ci.prototype,"slotNodes",void 0),Oi([o.query(".ft-tooltip--container")],Ci.prototype,"container",void 0),Oi([o.query("slot")],Ci.prototype,"target",void 0),Oi([o.query(".ft-tooltip")],Ci.prototype,"tooltip",void 0),Oi([o.query(".ft-tooltip--content")],Ci.prototype,"tooltipContent",void 0),Oi([o.state()],Ci.prototype,"visible",void 0),i.customElement("ft-tooltip")(Ci);const Bi={color:i.FtCssVariableFactory.extend("--ft-loader-color",i.designSystemVariables.colorPrimary),size:i.FtCssVariableFactory.create("--ft-loader-size","SIZE","80px")},ji=e.css`
|
|
273
273
|
:host {
|
|
274
274
|
line-height: 0;
|
|
275
275
|
}
|
|
@@ -278,8 +278,8 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
278
278
|
display: inline-block;
|
|
279
279
|
position: relative;
|
|
280
280
|
|
|
281
|
-
width: ${
|
|
282
|
-
height: ${
|
|
281
|
+
width: ${Bi.size};
|
|
282
|
+
height: ${Bi.size};
|
|
283
283
|
}
|
|
284
284
|
|
|
285
285
|
.ft-loader div {
|
|
@@ -288,7 +288,7 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
288
288
|
width: 25%;
|
|
289
289
|
height: 25%;
|
|
290
290
|
border-radius: 50%;
|
|
291
|
-
background: ${
|
|
291
|
+
background: ${Bi.color};
|
|
292
292
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
293
293
|
}
|
|
294
294
|
|
|
@@ -335,17 +335,17 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
335
335
|
transform: translate(0, 0);
|
|
336
336
|
}
|
|
337
337
|
100% {
|
|
338
|
-
transform: translate(calc(0.35 * ${
|
|
338
|
+
transform: translate(calc(0.35 * ${Bi.size}), 0);
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
|
-
`;class
|
|
341
|
+
`;class Ei extends i.FtLitElement{render(){return e.html`
|
|
342
342
|
<div class="ft-loader">
|
|
343
343
|
<div></div>
|
|
344
344
|
<div></div>
|
|
345
345
|
<div></div>
|
|
346
346
|
<div></div>
|
|
347
347
|
</div>
|
|
348
|
-
`}}var Ni
|
|
348
|
+
`}}var Ii,Ni;Ei.styles=ji,i.customElement("ft-loader")(Ei),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.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.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=""}(Ii||(Ii={})),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=""}(Ni||(Ni={})),new Map([...["abw"].map((t=>[t,Ni.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,Ni.AUDIO])),...["avi"].map((t=>[t,Ni.AVI])),...["chm","xhs"].map((t=>[t,Ni.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,Ni.CODE])),...["csv"].map((t=>[t,Ni.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Ni.DITA])),...["epub"].map((t=>[t,Ni.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Ni.EXCEL])),...["flac"].map((t=>[t,Ni.FLAC])),...["gif"].map((t=>[t,Ni.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Ni.GZIP])),...["html","htm","xhtml"].map((t=>[t,Ni.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,Ni.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Ni.JPEG])),...["json"].map((t=>[t,Ni.JSON])),...["m4a","m4p"].map((t=>[t,Ni.M4A])),...["mov","qt"].map((t=>[t,Ni.MOV])),...["mp3"].map((t=>[t,Ni.MP3])),...["mp4","m4v"].map((t=>[t,Ni.MP4])),...["ogg","oga"].map((t=>[t,Ni.OGG])),...["pdf","ps"].map((t=>[t,Ni.PDF])),...["png"].map((t=>[t,Ni.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Ni.POWERPOINT])),...["rar"].map((t=>[t,Ni.RAR])),...["stp"].map((t=>[t,Ni.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Ni.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,Ni.VIDEO])),...["wav"].map((t=>[t,Ni.WAV])),...["wma"].map((t=>[t,Ni.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Ni.WORD])),...["xml","xsl","rdf"].map((t=>[t,Ni.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Ni.YAML])),...["zip"].map((t=>[t,Ni.ZIP]))]);const Ti={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")},Di=e.css`
|
|
349
349
|
:host, i.ft-icon {
|
|
350
350
|
display: inline-flex;
|
|
351
351
|
align-items: center;
|
|
@@ -354,14 +354,14 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
354
354
|
}
|
|
355
355
|
|
|
356
356
|
:host {
|
|
357
|
-
width: ${
|
|
358
|
-
height: ${
|
|
357
|
+
width: ${Ti.size};
|
|
358
|
+
height: ${Ti.size};
|
|
359
359
|
}
|
|
360
360
|
|
|
361
361
|
i.ft-icon {
|
|
362
362
|
width: 100%;
|
|
363
363
|
height: 100%;
|
|
364
|
-
font-size: ${
|
|
364
|
+
font-size: ${Ti.size};
|
|
365
365
|
line-height: 1;
|
|
366
366
|
font-weight: normal;
|
|
367
367
|
text-transform: none;
|
|
@@ -372,33 +372,33 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
372
372
|
text-rendering: auto;
|
|
373
373
|
-webkit-font-smoothing: antialiased;
|
|
374
374
|
-moz-osx-font-smoothing: grayscale;
|
|
375
|
-
vertical-align: ${
|
|
375
|
+
vertical-align: ${Ti.verticalAlign};
|
|
376
376
|
}
|
|
377
377
|
|
|
378
378
|
i.ft-icon.ft-icon--fluid-topics {
|
|
379
|
-
font-family: ${
|
|
379
|
+
font-family: ${Ti.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
380
380
|
|
|
381
381
|
/* Ugly fix because font is broken */
|
|
382
|
-
font-size: calc(0.75 * ${
|
|
383
|
-
line-height: ${
|
|
382
|
+
font-size: calc(0.75 * ${Ti.size});
|
|
383
|
+
line-height: ${Ti.size};
|
|
384
384
|
position: relative;
|
|
385
385
|
top: -4%;
|
|
386
386
|
justify-content: center;
|
|
387
387
|
}
|
|
388
388
|
|
|
389
389
|
.ft-icon--file-format {
|
|
390
|
-
font-family: ${
|
|
390
|
+
font-family: ${Ti.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
391
391
|
}
|
|
392
392
|
|
|
393
393
|
.ft-icon--material {
|
|
394
|
-
font-family: ${
|
|
394
|
+
font-family: ${Ti.materialFontFamily}, "Material Icons", sans-serif;
|
|
395
395
|
}
|
|
396
|
-
`;var
|
|
396
|
+
`;var Ai;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Ai||(Ai={}));var Ri=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class Fi extends i.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=e.nothing}render(){const t=this.variant&&Object.values(Ai).includes(this.variant)?this.variant:Ai.fluid_topics,i=t!==Ai.material||!!this.value;return e.html`
|
|
397
397
|
<i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
|
|
398
398
|
${n.unsafeHTML(this.resolvedIcon)}
|
|
399
399
|
<slot ?hidden=${i}></slot>
|
|
400
400
|
</i>
|
|
401
|
-
`}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
|
|
401
|
+
`}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 Ai.file_format:this.resolvedIcon=null!==(t=Ni[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case Ai.material:this.resolvedIcon=this.value||e.nothing;break;default:this.resolvedIcon=null!==(i=Ii[o.replace("-","_").toUpperCase()])&&void 0!==i?i:o}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Fi.elementDefinitions={},Fi.styles=Di,Ri([o.property()],Fi.prototype,"variant",void 0),Ri([o.property()],Fi.prototype,"value",void 0),Ri([o.state()],Fi.prototype,"resolvedIcon",void 0),Ri([o.query("slot")],Fi.prototype,"slottedContent",void 0),i.customElement("ft-icon")(Fi);const Mi=i.FtCssVariableFactory.extend("--ft-button-color",i.designSystemVariables.colorPrimary),_i={backgroundColor:i.FtCssVariableFactory.extend("--ft-button-background-color",i.designSystemVariables.colorSurface),borderRadius:i.FtCssVariableFactory.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusL),color:Mi,fontSize:i.FtCssVariableFactory.extend("--ft-button-font-size",Gt.fontSize),iconSize:i.FtCssVariableFactory.create("--ft-button-icon-size","SIZE","24px"),rippleColor:i.FtCssVariableFactory.extend("--ft-button-ripple-color",Mi),verticalPadding:i.FtCssVariableFactory.create("--ft-button-vertical-padding","SIZE","6px"),horizontalPadding:i.FtCssVariableFactory.create("--ft-button-horizontal-padding","SIZE","8px"),iconPadding:i.FtCssVariableFactory.create("--ft-button-icon-padding","SIZE","8px"),opacityDisabled:i.FtCssVariableFactory.external(i.designSystemVariables.colorOpacityDisabled,"Design system")},Li=i.FtCssVariableFactory.extend("--ft-button-primary-color",i.FtCssVariableFactory.extend("--ft-button-color",i.designSystemVariables.colorOnPrimary)),Hi={backgroundColor:i.FtCssVariableFactory.extend("--ft-button-primary-background-color",i.FtCssVariableFactory.extend("--ft-button-background-color",i.designSystemVariables.colorPrimary)),color:Li,rippleColor:i.FtCssVariableFactory.extend("--ft-button-primary-ripple-color",Li)},Ui=i.FtCssVariableFactory.extend("--ft-button-dense-border-radius",i.FtCssVariableFactory.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusM)),Zi=i.FtCssVariableFactory.create("--ft-button-dense-vertical-padding","SIZE","2px"),Vi=i.FtCssVariableFactory.create("--ft-button-dense-horizontal-padding","SIZE","4px"),Wi=i.FtCssVariableFactory.create("--ft-button-dense-icon-padding","SIZE","4px"),Pi=[e.css`
|
|
402
402
|
:host {
|
|
403
403
|
display: inline-block;
|
|
404
404
|
max-width: 100%;
|
|
@@ -409,7 +409,7 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
409
409
|
box-shadow: 0px 0px 0px transparent;
|
|
410
410
|
border: 0px solid transparent;
|
|
411
411
|
text-shadow: 0px 0px 0px transparent;
|
|
412
|
-
font-size: ${
|
|
412
|
+
font-size: ${_i.fontSize};
|
|
413
413
|
}
|
|
414
414
|
|
|
415
415
|
button:hover {
|
|
@@ -438,31 +438,31 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
438
438
|
border: none;
|
|
439
439
|
pointer-events: auto;
|
|
440
440
|
|
|
441
|
-
--ft-button-internal-line-height: max(calc(${
|
|
442
|
-
--ft-button-internal-color: ${
|
|
443
|
-
${i.setVariable(
|
|
444
|
-
${i.setVariable(
|
|
441
|
+
--ft-button-internal-line-height: max(calc(${_i.fontSize} + 2px), ${_i.iconSize});
|
|
442
|
+
--ft-button-internal-color: ${_i.color};
|
|
443
|
+
${i.setVariable(Ti.size,_i.iconSize)};
|
|
444
|
+
${i.setVariable(hi.color,_i.rippleColor)};
|
|
445
445
|
|
|
446
|
-
border-radius: ${
|
|
447
|
-
padding: ${
|
|
448
|
-
background-color: ${
|
|
446
|
+
border-radius: ${_i.borderRadius};
|
|
447
|
+
padding: ${_i.verticalPadding} ${_i.horizontalPadding};
|
|
448
|
+
background-color: ${_i.backgroundColor};
|
|
449
449
|
color: var(--ft-button-internal-color);
|
|
450
450
|
-webkit-mask-image: radial-gradient(white, black);
|
|
451
451
|
}
|
|
452
452
|
|
|
453
453
|
.ft-button.ft-button--outlined {
|
|
454
454
|
border: 1px solid var(--ft-button-internal-color);
|
|
455
|
-
padding: calc(${
|
|
455
|
+
padding: calc(${_i.verticalPadding} - 1px) calc(${_i.horizontalPadding} - 1px);
|
|
456
456
|
}
|
|
457
457
|
|
|
458
458
|
.ft-button.ft-button--dense {
|
|
459
|
-
padding: ${
|
|
460
|
-
border-radius: ${
|
|
461
|
-
gap: ${
|
|
459
|
+
padding: ${Zi} ${Vi};
|
|
460
|
+
border-radius: ${Ui};
|
|
461
|
+
gap: ${Wi};
|
|
462
462
|
}
|
|
463
463
|
|
|
464
464
|
.ft-button.ft-button--dense.ft-button--outlined {
|
|
465
|
-
padding: calc(${
|
|
465
|
+
padding: calc(${Zi} - 1px) calc(${Vi} - 1px);
|
|
466
466
|
}
|
|
467
467
|
|
|
468
468
|
.ft-button:not([disabled]):hover {
|
|
@@ -470,22 +470,22 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
470
470
|
}
|
|
471
471
|
|
|
472
472
|
.ft-button--round {
|
|
473
|
-
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${
|
|
473
|
+
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${_i.verticalPadding});
|
|
474
474
|
}
|
|
475
475
|
|
|
476
476
|
.ft-button--round.ft-button--dense {
|
|
477
|
-
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${
|
|
477
|
+
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${Zi});
|
|
478
478
|
}
|
|
479
479
|
|
|
480
480
|
.ft-button[disabled] {
|
|
481
481
|
filter: grayscale(1);
|
|
482
|
-
opacity: ${
|
|
482
|
+
opacity: ${_i.opacityDisabled};
|
|
483
483
|
}
|
|
484
484
|
|
|
485
485
|
.ft-button.ft-button--primary {
|
|
486
|
-
background-color: ${
|
|
487
|
-
--ft-button-internal-color: ${
|
|
488
|
-
${i.setVariable(
|
|
486
|
+
background-color: ${Hi.backgroundColor};
|
|
487
|
+
--ft-button-internal-color: ${Hi.color};
|
|
488
|
+
${i.setVariable(hi.color,Hi.rippleColor)};
|
|
489
489
|
}
|
|
490
490
|
|
|
491
491
|
.ft-button:focus {
|
|
@@ -498,13 +498,13 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
498
498
|
white-space: nowrap;
|
|
499
499
|
text-overflow: ellipsis;
|
|
500
500
|
display: block;
|
|
501
|
-
margin: 0 ${
|
|
501
|
+
margin: 0 ${_i.iconPadding};
|
|
502
502
|
${i.setVariable(Gt.fontSize,"1em")};
|
|
503
503
|
${i.setVariable(Gt.lineHeight,"var(--ft-button-internal-line-height)")};
|
|
504
504
|
}
|
|
505
505
|
|
|
506
506
|
.ft-button--dense .ft-button--label {
|
|
507
|
-
margin: 0 ${
|
|
507
|
+
margin: 0 ${Wi};
|
|
508
508
|
}
|
|
509
509
|
|
|
510
510
|
.ft-button--label[hidden] {
|
|
@@ -517,13 +517,13 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
517
517
|
}
|
|
518
518
|
|
|
519
519
|
.ft-button--label[hidden] + ft-icon {
|
|
520
|
-
margin: 0 calc(${
|
|
521
|
-
padding: 0 ${
|
|
520
|
+
margin: 0 calc(${_i.horizontalPadding} * -1);
|
|
521
|
+
padding: 0 ${_i.verticalPadding};
|
|
522
522
|
}
|
|
523
523
|
|
|
524
524
|
.ft-button--dense .ft-button--label[hidden] + ft-icon {
|
|
525
|
-
margin: 0 calc(${
|
|
526
|
-
padding: 0 ${
|
|
525
|
+
margin: 0 calc(${Vi} * -1);
|
|
526
|
+
padding: 0 ${Zi};
|
|
527
527
|
}
|
|
528
528
|
|
|
529
529
|
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
@@ -532,10 +532,10 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
532
532
|
}
|
|
533
533
|
|
|
534
534
|
ft-loader {
|
|
535
|
-
${i.setVariable(
|
|
536
|
-
${i.setVariable(
|
|
535
|
+
${i.setVariable(Bi.size,_i.iconSize)};
|
|
536
|
+
${i.setVariable(Bi.color,"var(--ft-button-internal-color)")};
|
|
537
537
|
}
|
|
538
|
-
`,i.noTextSelect];var
|
|
538
|
+
`,i.noTextSelect];var Ki=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class Gi extends i.FtLitElement{constructor(){super(...arguments),this.role="button",this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0};return this.addTooltipIfNeeded(e.html`
|
|
539
539
|
<button part="button"
|
|
540
540
|
class="${r.classMap(t)}"
|
|
541
541
|
aria-label="${this.getLabel()}"
|
|
@@ -558,14 +558,14 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
558
558
|
</ft-tooltip>
|
|
559
559
|
`:t}resolveIcon(){return this.loading?e.html`
|
|
560
560
|
<ft-loader part="loader icon"></ft-loader> `:this.icon?e.html`
|
|
561
|
-
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:e.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}
|
|
561
|
+
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:e.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}Gi.elementDefinitions={"ft-ripple":gi,"ft-tooltip":Ci,"ft-typography":li,"ft-icon":Fi,"ft-loader":Ei},Gi.styles=[i.safariEllipsisFix,Pi],Ki([o.property({type:String,reflect:!0})],Gi.prototype,"role",void 0),Ki([o.property({type:Boolean})],Gi.prototype,"primary",void 0),Ki([o.property({type:Boolean})],Gi.prototype,"outlined",void 0),Ki([o.property({type:Boolean})],Gi.prototype,"disabled",void 0),Ki([o.property({type:Boolean})],Gi.prototype,"dense",void 0),Ki([o.property({type:Boolean})],Gi.prototype,"round",void 0),Ki([o.property()],Gi.prototype,"label",void 0),Ki([o.property()],Gi.prototype,"icon",void 0),Ki([o.property()],Gi.prototype,"iconVariant",void 0),Ki([o.property({type:Boolean})],Gi.prototype,"trailingIcon",void 0),Ki([o.property({type:Boolean})],Gi.prototype,"loading",void 0),Ki([o.property()],Gi.prototype,"tooltipPosition",void 0),Ki([o.property({type:Boolean})],Gi.prototype,"hideTooltip",void 0),Ki([o.property({type:Boolean})],Gi.prototype,"forceTooltip",void 0),Ki([o.query(".ft-button")],Gi.prototype,"button",void 0),Ki([o.query(".ft-button--label slot")],Gi.prototype,"slottedContent",void 0),i.customElement("ft-button")(Gi);const qi=i.FtCssVariableFactory.extend("--ft-checkbox-text-color",i.designSystemVariables.colorOnSurfaceHigh),Xi=i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),Yi=i.FtCssVariableFactory.external(i.designSystemVariables.colorOnPrimary,"Design system"),Ji=i.FtCssVariableFactory.extend("--ft-checkbox-border-color",i.designSystemVariables.colorOnSurfaceMedium),Qi=i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceDisabled,"Design system"),te=e.css`
|
|
562
562
|
* {
|
|
563
563
|
box-sizing: border-box;
|
|
564
564
|
}
|
|
565
565
|
|
|
566
566
|
.ft-checkbox {
|
|
567
567
|
box-sizing: border-box;
|
|
568
|
-
color: ${
|
|
568
|
+
color: ${qi};
|
|
569
569
|
|
|
570
570
|
display: inline-flex;
|
|
571
571
|
align-items: center;
|
|
@@ -573,7 +573,7 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
573
573
|
}
|
|
574
574
|
|
|
575
575
|
.ft-checkbox--disabled {
|
|
576
|
-
color: ${
|
|
576
|
+
color: ${Qi};
|
|
577
577
|
}
|
|
578
578
|
|
|
579
579
|
input {
|
|
@@ -597,26 +597,26 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
597
597
|
|
|
598
598
|
.ft-checkbox--box {
|
|
599
599
|
display: flex;
|
|
600
|
-
border: 2px solid ${
|
|
600
|
+
border: 2px solid ${Ji};
|
|
601
601
|
border-radius: 2px;
|
|
602
602
|
|
|
603
603
|
width: 18px;
|
|
604
604
|
height: 18px;
|
|
605
605
|
|
|
606
|
-
color: ${
|
|
606
|
+
color: ${Yi};
|
|
607
607
|
}
|
|
608
608
|
|
|
609
609
|
|
|
610
610
|
.ft-checkbox--checked .ft-checkbox--box,
|
|
611
611
|
.ft-checkbox--indeterminate .ft-checkbox--box {
|
|
612
|
-
border-color: ${
|
|
613
|
-
background-color: ${
|
|
612
|
+
border-color: ${Xi};
|
|
613
|
+
background-color: ${Xi};
|
|
614
614
|
}
|
|
615
615
|
|
|
616
616
|
.ft-checkbox--disabled .ft-checkbox--box {
|
|
617
|
-
border-color: ${
|
|
617
|
+
border-color: ${Qi};
|
|
618
618
|
background-color: transparent;
|
|
619
|
-
color: ${
|
|
619
|
+
color: ${Qi};
|
|
620
620
|
}
|
|
621
621
|
|
|
622
622
|
.ft-checkbox--checkmark {
|
|
@@ -635,7 +635,7 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
635
635
|
.ft-checkbox--indeterminate .ft-checkbox--checkmark {
|
|
636
636
|
opacity: 1;
|
|
637
637
|
}
|
|
638
|
-
`;var
|
|
638
|
+
`;var ie=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class ee extends i.FtLitElement{constructor(){super(...arguments),this.name="",this.checked=!1,this.indeterminate=!1,this.disabled=!1}render(){const t={"ft-checkbox":!0,"ft-checkbox--checked":this.checked,"ft-checkbox--indeterminate":this.indeterminate,"ft-checkbox--disabled":this.disabled};return e.html`
|
|
639
639
|
<label class="${r.classMap(t)}" for="checkbox-input">
|
|
640
640
|
<div class="ft-checkbox--box-container">
|
|
641
641
|
<ft-ripple
|
|
@@ -661,14 +661,14 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
661
661
|
<slot></slot>
|
|
662
662
|
</ft-typography>
|
|
663
663
|
</label>
|
|
664
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("change",{detail:this.checked}))}contentAvailableCallback(t){var i;super.contentAvailableCallback(t),null===(i=this.ripple)||void 0===i||i.setupFor(this.container)}}
|
|
664
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("change",{detail:this.checked}))}contentAvailableCallback(t){var i;super.contentAvailableCallback(t),null===(i=this.ripple)||void 0===i||i.setupFor(this.container)}}ee.elementDefinitions={"ft-ripple":gi,"ft-typography":li},ee.styles=te,ie([o.property()],ee.prototype,"name",void 0),ie([o.property({type:Boolean,reflect:!0})],ee.prototype,"checked",void 0),ie([o.property({type:Boolean})],ee.prototype,"indeterminate",void 0),ie([o.property({type:Boolean})],ee.prototype,"disabled",void 0),ie([o.query(".ft-checkbox")],ee.prototype,"container",void 0),ie([o.query("ft-ripple")],ee.prototype,"ripple",void 0),i.customElement("ft-checkbox")(ee);const oe=i.FtCssVariableFactory.extend("--ft-radio-text-color",i.designSystemVariables.colorOnSurfaceHigh),se=i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),re=(i.FtCssVariableFactory.external(i.designSystemVariables.colorOnPrimary,"Design system"),i.FtCssVariableFactory.extend("--ft-radio-border-color",i.designSystemVariables.colorOnSurfaceMedium)),ne=i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceDisabled,"Design system"),le=e.css`
|
|
665
665
|
* {
|
|
666
666
|
box-sizing: border-box;
|
|
667
667
|
}
|
|
668
668
|
|
|
669
669
|
.ft-radio {
|
|
670
670
|
box-sizing: border-box;
|
|
671
|
-
color: ${
|
|
671
|
+
color: ${oe};
|
|
672
672
|
|
|
673
673
|
display: inline-flex;
|
|
674
674
|
align-items: center;
|
|
@@ -676,7 +676,7 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
676
676
|
}
|
|
677
677
|
|
|
678
678
|
.ft-radio--disabled {
|
|
679
|
-
color: ${
|
|
679
|
+
color: ${ne};
|
|
680
680
|
}
|
|
681
681
|
|
|
682
682
|
input {
|
|
@@ -699,7 +699,7 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
699
699
|
}
|
|
700
700
|
|
|
701
701
|
.ft-radio--box {
|
|
702
|
-
border: 2px solid ${
|
|
702
|
+
border: 2px solid ${re};
|
|
703
703
|
border-radius: 50%;
|
|
704
704
|
|
|
705
705
|
display: flex;
|
|
@@ -712,7 +712,7 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
712
712
|
|
|
713
713
|
.ft-radio--box:after {
|
|
714
714
|
content: " ";
|
|
715
|
-
background-color: ${
|
|
715
|
+
background-color: ${se};
|
|
716
716
|
|
|
717
717
|
border-radius: 50%;
|
|
718
718
|
|
|
@@ -724,7 +724,7 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
724
724
|
}
|
|
725
725
|
|
|
726
726
|
.ft-radio--checked .ft-radio--box {
|
|
727
|
-
border-color: ${
|
|
727
|
+
border-color: ${se};
|
|
728
728
|
}
|
|
729
729
|
|
|
730
730
|
|
|
@@ -733,14 +733,14 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
733
733
|
}
|
|
734
734
|
|
|
735
735
|
.ft-radio--disabled .ft-radio--box {
|
|
736
|
-
border-color: ${
|
|
736
|
+
border-color: ${ne};
|
|
737
737
|
background-color: transparent;
|
|
738
738
|
}
|
|
739
739
|
|
|
740
740
|
.ft-radio--disabled .ft-radio--box:after {
|
|
741
|
-
background-color: ${
|
|
741
|
+
background-color: ${ne};
|
|
742
742
|
}
|
|
743
|
-
`;var
|
|
743
|
+
`;var ae=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class he extends CustomEvent{constructor(t,i){super("change",{detail:{value:t,checked:i},bubbles:!0,composed:!0})}}class pe extends i.FtLitElement{constructor(){super(...arguments),this.value="",this.name="",this.checked=!1,this.disabled=!1}render(){const t={"ft-radio":!0,"ft-radio--checked":this.checked,"ft-radio--disabled":this.disabled};return e.html`
|
|
744
744
|
<div class="${r.classMap(t)}">
|
|
745
745
|
<div class="ft-radio--box-container">
|
|
746
746
|
<ft-ripple
|
|
@@ -765,17 +765,17 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
765
765
|
</ft-typography>
|
|
766
766
|
</label>
|
|
767
767
|
</div>
|
|
768
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new
|
|
768
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new he(this.value,this.checked))}contentAvailableCallback(t){var i;super.contentAvailableCallback(t),null===(i=this.ripple)||void 0===i||i.setupFor(this.container)}select(){this.checked=!0,this.dispatchEvent(new he(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}pe.elementDefinitions={"ft-ripple":gi,"ft-typography":li},pe.styles=le,ae([o.property()],pe.prototype,"value",void 0),ae([o.property()],pe.prototype,"name",void 0),ae([o.property({type:Boolean,reflect:!0})],pe.prototype,"checked",void 0),ae([o.property({type:Boolean})],pe.prototype,"disabled",void 0),ae([o.query(".ft-radio")],pe.prototype,"container",void 0),ae([o.query("ft-ripple")],pe.prototype,"ripple",void 0),ae([o.query("input")],pe.prototype,"input",void 0);const fe=e.css`
|
|
769
769
|
:host {
|
|
770
770
|
display: contents;
|
|
771
771
|
}
|
|
772
|
-
`;var
|
|
772
|
+
`;var ce=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class de extends i.FtLitElement{constructor(){super(...arguments),this.name=""}render(){return e.html`
|
|
773
773
|
<slot @slotchange=${this.onSlotChange}
|
|
774
774
|
@change=${this.onChange}
|
|
775
775
|
@keydown=${this.onKeyDown}
|
|
776
776
|
@focusin=${this.focusCurrentValue}
|
|
777
777
|
></slot>
|
|
778
|
-
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((i=>i.checked=t.detail.value===i.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.focusCurrentValue()}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let i=this.findFtRadio(t),e=this.radioButtons.indexOf(i)-1;this.radioButtons[e<0?this.radioButtons.length-1:e].select();break}case"ArrowDown":case"ArrowRight":{let i=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[i>this.radioButtons.length-1?0:i].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}focusCurrentValue(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}
|
|
778
|
+
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((i=>i.checked=t.detail.value===i.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.focusCurrentValue()}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let i=this.findFtRadio(t),e=this.radioButtons.indexOf(i)-1;this.radioButtons[e<0?this.radioButtons.length-1:e].select();break}case"ArrowDown":case"ArrowRight":{let i=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[i>this.radioButtons.length-1?0:i].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}focusCurrentValue(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}de.elementDefinitions={},de.styles=fe,ce([o.property()],de.prototype,"name",void 0),ce([o.queryAssignedElements()],de.prototype,"radioButtons",void 0),i.customElement("ft-radio")(pe),i.customElement("ft-radio-group")(de);const ue={borderRadiusM:i.FtCssVariableFactory.external(i.designSystemVariables.borderRadiusM,"Design system"),colorOutline:i.FtCssVariableFactory.external(i.designSystemVariables.colorOutline,"Design system"),colorOnSurface:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceMedium:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceDisabled,"Design system"),colorPrimary:i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),colorOnPrimary:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnPrimary,"Design system"),fontFamily:i.FtCssVariableFactory.external(jt.fontFamily,"Body2 typography"),fontSize:i.FtCssVariableFactory.external(jt.fontSize,"Body2 typography"),fontWeight:i.FtCssVariableFactory.external(jt.fontWeight,"Body2 typography"),letterSpacing:i.FtCssVariableFactory.external(jt.letterSpacing,"Body2 typography"),lineHeight:i.FtCssVariableFactory.external(jt.lineHeight,"Body2 typography"),textTransform:i.FtCssVariableFactory.external(jt.textTransform,"Body2 typography")},ve=e.css`
|
|
779
779
|
.ft-filter-level--container {
|
|
780
780
|
display: flex;
|
|
781
781
|
flex-direction: column;
|
|
@@ -789,14 +789,14 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
789
789
|
flex-shrink: 0;
|
|
790
790
|
text-decoration: none;
|
|
791
791
|
position: relative;
|
|
792
|
-
border-radius: ${
|
|
792
|
+
border-radius: ${ue.borderRadiusM};
|
|
793
793
|
overflow: hidden;
|
|
794
794
|
display: flex;
|
|
795
795
|
align-items: center;
|
|
796
796
|
padding: 4px 4px;
|
|
797
797
|
gap: 4px;
|
|
798
798
|
cursor: pointer;
|
|
799
|
-
color: ${
|
|
799
|
+
color: ${ue.colorOnSurface};
|
|
800
800
|
}
|
|
801
801
|
|
|
802
802
|
.ft-filter-level--go-back:focus {
|
|
@@ -825,7 +825,7 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
825
825
|
}
|
|
826
826
|
|
|
827
827
|
ft-button {
|
|
828
|
-
${i.setVariable(
|
|
828
|
+
${i.setVariable(_i.color,ue.colorOnSurface)};
|
|
829
829
|
}
|
|
830
830
|
|
|
831
831
|
ft-radio, ft-checkbox {
|
|
@@ -839,9 +839,9 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
839
839
|
|
|
840
840
|
.ft-filter-level--no-values {
|
|
841
841
|
margin: 10px 0;
|
|
842
|
-
color: ${
|
|
842
|
+
color: ${ue.colorOnSurfaceMedium};
|
|
843
843
|
}
|
|
844
|
-
`;var
|
|
844
|
+
`;var be=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class xe extends i.FtLitElement{constructor(){super(...arguments),this.filterId="",this.options=[],this.multivalued=!1,this.disabled=!1,this.hideSelectedOptions=!1,this.preventNavigation=!1,this.filter="",this.moreValuesButtonLabel="More",this.displayedValuesLimit=0,this.displayedPages=1}get hasHiddenValues(){let t=this.limit;return null!=t&&t<this.options.length}get limit(){return this.displayedValuesLimit>0?this.displayedPages*this.displayedValuesLimit:void 0}get height(){var t,i;return null!==(i=null===(t=this.container)||void 0===t?void 0:t.scrollHeight)&&void 0!==i?i:0}render(){let t=[...this.options];this.hideSelectedOptions&&(t=t.filter((t=>!t.selected))),this.filter&&(t=t.filter((t=>t.label.toLowerCase().includes(this.filter.toLowerCase()))));const i=t.slice(0,this.limit);return e.html`
|
|
845
845
|
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
846
846
|
${null==this.parent?null:e.html`
|
|
847
847
|
<div tabindex="0"
|
|
@@ -884,13 +884,13 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
884
884
|
</ft-button>
|
|
885
885
|
`:e.nothing}
|
|
886
886
|
</div>
|
|
887
|
-
`}goBackOnKeyPress(t){"Enter"!==t.key&&" "!==t.key||this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}goBackOnClick(t){t.stopPropagation(),t.preventDefault(),this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}displayMore(){this.displayedPages++}buildMultiValuedOption(t){var
|
|
887
|
+
`}goBackOnKeyPress(t){"Enter"!==t.key&&" "!==t.key||this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}goBackOnClick(t){t.stopPropagation(),t.preventDefault(),this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}displayMore(){this.displayedPages++}buildMultiValuedOption(t){var o;return e.html`
|
|
888
888
|
<ft-checkbox name="${this.filterId}"
|
|
889
889
|
part="multivalued-option"
|
|
890
890
|
data-value="${t.value}"
|
|
891
891
|
.checked=${t.selected}
|
|
892
892
|
.disabled=${this.disabled}
|
|
893
|
-
.indeterminate=${
|
|
893
|
+
.indeterminate=${i.flatDeep(null!==(o=t.subOptions)&&void 0!==o?o:[],(t=>{var i;return null!==(i=t.subOptions)&&void 0!==i?i:[]})).some((t=>t.selected))}
|
|
894
894
|
@change=${i=>this.optionsChanged(i,t)}>
|
|
895
895
|
${t.renderOption?t.renderOption:t.label}
|
|
896
896
|
</ft-checkbox>
|
|
@@ -905,7 +905,7 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
905
905
|
@change=${t=>t.stopPropagation()}>
|
|
906
906
|
${t.renderOption?t.renderOption:t.label}
|
|
907
907
|
</ft-radio>
|
|
908
|
-
`}onRadioKeyUp(t,i){i.selected&&" "===t.key&&this.optionsChanged(t,i)}optionsChanged(t,i){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:i}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}}
|
|
908
|
+
`}onRadioKeyUp(t,i){i.selected&&" "===t.key&&this.optionsChanged(t,i)}optionsChanged(t,i){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:i}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}}xe.elementDefinitions={"ft-button":Gi,"ft-ripple":gi,"ft-typography":li,"ft-checkbox":ee,"ft-icon":Fi,"ft-radio":pe},xe.styles=ve,be([o.property({type:String})],xe.prototype,"filterId",void 0),be([o.property({type:Object})],xe.prototype,"parent",void 0),be([o.property({type:Array})],xe.prototype,"options",void 0),be([o.property({type:Boolean})],xe.prototype,"multivalued",void 0),be([o.property({type:Boolean})],xe.prototype,"disabled",void 0),be([o.property({type:Boolean})],xe.prototype,"hideSelectedOptions",void 0),be([o.property({type:Boolean})],xe.prototype,"preventNavigation",void 0),be([o.property({type:String})],xe.prototype,"filter",void 0),be([o.property({type:String})],xe.prototype,"moreValuesButtonLabel",void 0),be([o.property({type:String})],xe.prototype,"noValuesLabel",void 0),be([o.property({type:Number})],xe.prototype,"displayedValuesLimit",void 0),be([o.query(".ft-filter-level--container")],xe.prototype,"container",void 0),be([o.state()],xe.prototype,"displayedPages",void 0);const ge={buttonsColor:i.FtCssVariableFactory.extend("--ft-snap-scroll-buttons-color",i.designSystemVariables.colorPrimary),buttonsZIndex:i.FtCssVariableFactory.create("--ft-snap-scroll-buttons-z-index","COLOR","1"),gap:i.FtCssVariableFactory.create("--ft-snap-scroll-gap","SIZE","0"),colorSurface:i.FtCssVariableFactory.external(i.designSystemVariables.colorSurface,"Design system")},ye=e.css`
|
|
909
909
|
.ft-snap-scroll {
|
|
910
910
|
box-sizing: border-box;
|
|
911
911
|
position: relative;
|
|
@@ -940,7 +940,7 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
940
940
|
flex-wrap: nowrap;
|
|
941
941
|
align-items: flex-start;
|
|
942
942
|
justify-content: flex-start;
|
|
943
|
-
gap: ${
|
|
943
|
+
gap: ${ge.gap};
|
|
944
944
|
}
|
|
945
945
|
|
|
946
946
|
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
|
|
@@ -983,11 +983,11 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
983
983
|
.ft-snap-scroll--next {
|
|
984
984
|
position: absolute;
|
|
985
985
|
display: flex;
|
|
986
|
-
z-index: ${
|
|
986
|
+
z-index: ${ge.buttonsZIndex};
|
|
987
987
|
opacity: 1;
|
|
988
988
|
transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
|
|
989
|
-
${i.setVariable(
|
|
990
|
-
${i.setVariable(
|
|
989
|
+
${i.setVariable(_i.backgroundColor,"transparent")};
|
|
990
|
+
${i.setVariable(_i.color,ge.buttonsColor)};
|
|
991
991
|
}
|
|
992
992
|
|
|
993
993
|
.ft-snap-scroll--previous[hidden],
|
|
@@ -1000,37 +1000,37 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
1000
1000
|
top: 0;
|
|
1001
1001
|
left: -1px;
|
|
1002
1002
|
bottom: 0;
|
|
1003
|
-
background: linear-gradient(to right, ${
|
|
1003
|
+
background: linear-gradient(to right, ${ge.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1004
1004
|
}
|
|
1005
1005
|
|
|
1006
1006
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous {
|
|
1007
1007
|
top: -1px;
|
|
1008
1008
|
left: 0;
|
|
1009
1009
|
right: 0;
|
|
1010
|
-
background: linear-gradient(to bottom, ${
|
|
1010
|
+
background: linear-gradient(to bottom, ${ge.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1011
1011
|
}
|
|
1012
1012
|
|
|
1013
1013
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next {
|
|
1014
1014
|
top: 0;
|
|
1015
1015
|
right: -1px;
|
|
1016
1016
|
bottom: 0;
|
|
1017
|
-
background: linear-gradient(to left, ${
|
|
1017
|
+
background: linear-gradient(to left, ${ge.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1018
1018
|
}
|
|
1019
1019
|
|
|
1020
1020
|
.ft-snap-scroll--vertical .ft-snap-scroll--next {
|
|
1021
1021
|
left: 0;
|
|
1022
1022
|
right: 0;
|
|
1023
1023
|
bottom: -1px;
|
|
1024
|
-
background: linear-gradient(to top, ${
|
|
1024
|
+
background: linear-gradient(to top, ${ge.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1025
1025
|
}
|
|
1026
1026
|
|
|
1027
1027
|
.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
|
|
1028
1028
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
|
|
1029
1029
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
|
|
1030
1030
|
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1031
|
-
background-color: ${
|
|
1031
|
+
background-color: ${ge.colorSurface};
|
|
1032
1032
|
}
|
|
1033
|
-
`;var
|
|
1033
|
+
`;var me=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class $e extends CustomEvent{constructor(t,i){super("current-element-change",{detail:{index:t,element:i}})}}class ke extends i.FtLitElement{constructor(){super(...arguments),this.horizontal=!1,this.hideScrollbar=!1,this.controls=!1,this.limitSize=!1,this.elements=[],this.currentElement=0,this.withScroll=!1,this.startReached=!0,this.endReached=!0,this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight",this.updateScrollCallback=()=>this.onScroll(),this.resizeObserver=new ResizeObserver((()=>this.scheduleUpdateScroll())),this.scrollDebouncer=new i.Debouncer(200),this.updateScrollDebouncer=new i.Debouncer(100)}scrollToIndex(t){this.scrollToElement(this.elements[t])}scrollIndexIntoView(t){let i=this.elements[t];if(i){const t=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.nextSize,e=this.contentSlot[this.scrollAttribute]+this.prevSize;(i[this.offsetAttribute]<e||i[this.offsetAttribute]+i[this.sizeAttribute]>t)&&this.scrollToElement(i)}}previous(){this.scrollToElement(this.elements[Math.max(0,this.closestIndexFromStart()-1)])}next(){this.scrollToElement(this.elements[Math.min(this.closestIndexFromStart()+1,this.elements.length-1)])}render(){const t=r.classMap({"ft-snap-scroll":!0,"ft-snap-scroll--horizontal":this.horizontal,"ft-snap-scroll--vertical":!this.horizontal,"ft-snap-scroll--hide-scrollbar":this.hideScrollbar,"ft-snap-scroll--limit-size":this.limitSize,"ft-snap-scroll--safari-fix":i.isSafari}),o=this.controls&&this.withScroll;return e.html`
|
|
1034
1034
|
<div part="container" class="${t}">
|
|
1035
1035
|
<ft-button
|
|
1036
1036
|
class="ft-snap-scroll--previous"
|
|
@@ -1054,7 +1054,7 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
1054
1054
|
@click=${this.next}
|
|
1055
1055
|
></ft-button>
|
|
1056
1056
|
</div>
|
|
1057
|
-
`}updated(t){var i;super.updated(t),this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer!==this.contentSlot&&(this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(i=this.listenedContainer)||void 0===i||i.addEventListener("scroll",this.updateScrollCallback))),t.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),t.has("currentElement")&&this.dispatchEvent(new
|
|
1057
|
+
`}updated(t){var i;super.updated(t),this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer!==this.contentSlot&&(this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(i=this.listenedContainer)||void 0===i||i.addEventListener("scroll",this.updateScrollCallback))),t.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),t.has("currentElement")&&this.dispatchEvent(new $e(this.currentElement,this.elements[this.currentElement]))}onScroll(){this.scrollDebouncer.run((()=>this.snap())),this.scheduleUpdateScroll()}snap(){let t=this.closestElementFromStart();if(null!=t){const i=this.getDistanceFromStart(t);Math.abs(this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.contentSlot[this.scrollSizeAttribute])<i&&(t=this.lastElement),this.scrollToElement(t)}}scrollToElement(t){var i,e;t&&(this.horizontal?null===(i=this.contentSlot)||void 0===i||i.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(e=this.contentSlot)||void 0===e||e.scrollTo({top:this.getOffset(t)-this.controlsSize,behavior:"smooth"}),this.currentElement=this.elements.indexOf(t))}onSlotChange(){var t,i;this.elements=null!==(i=null===(t=this.contentSlot)||void 0===t?void 0:t.assignedElements().map((t=>t)))&&void 0!==i?i:[],this.scheduleUpdateScroll()}closestElementFromStart(){return this.elements[this.closestIndexFromStart()]}closestIndexFromStart(){let t=-1;for(let i=0;i<this.elements.length;i++)(t<0||this.getDistanceFromStart(this.elements[i])<this.getDistanceFromStart(this.elements[t]))&&(t=i);return t}scheduleUpdateScroll(){this.updateScrollDebouncer.run((()=>this.updateScroll()))}updateScroll(){null!=this.contentSlot?(this.withScroll=this.contentSlot[this.scrollSizeAttribute]>this.contentSlot[this.sizeAttribute],this.startReached=0===this.contentSlot[this.scrollAttribute],this.endReached=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]+1>=this.contentSlot[this.scrollSizeAttribute]):(this.withScroll=!1,this.startReached=!0,this.endReached=!0)}get lastElement(){return this.elements[this.elements.length-1]}get firstElementOffset(){let t=this.elements[0];return t?t[this.offsetAttribute]:0}get controlsSize(){return this.controls?36:0}get nextSize(){return this.endReached?0:this.controlsSize}get prevSize(){return this.startReached?0:this.controlsSize}getOffset(t){return t[this.offsetAttribute]-this.firstElementOffset}getDistanceFromStart(t){const i=t===this.elements[0]?0:this.controlsSize;return Math.abs(this.getOffset(t)-this.contentSlot[this.scrollAttribute]-i)}}ke.elementDefinitions={"ft-button":Gi},ke.styles=ye,me([o.property({type:Boolean})],ke.prototype,"horizontal",void 0),me([o.property({type:Boolean})],ke.prototype,"hideScrollbar",void 0),me([o.property({type:Boolean})],ke.prototype,"controls",void 0),me([o.property({type:Boolean})],ke.prototype,"limitSize",void 0),me([o.state()],ke.prototype,"elements",void 0),me([o.state()],ke.prototype,"currentElement",void 0),me([o.state()],ke.prototype,"withScroll",void 0),me([o.state()],ke.prototype,"startReached",void 0),me([o.state()],ke.prototype,"endReached",void 0),me([o.query(".ft-snap-scroll--content")],ke.prototype,"contentSlot",void 0),i.customElement("ft-snap-scroll")(ke);const we={colorOutline:i.FtCssVariableFactory.external(i.designSystemVariables.colorOutline,"Design system"),colorOnSurface:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceMedium:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceMedium,"Design system"),colorPrimary:i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),colorSurface:i.FtCssVariableFactory.external(i.designSystemVariables.colorSurface,"Design system"),transitionDuration:i.FtCssVariableFactory.external(i.designSystemVariables.transitionDuration,"Design system"),transitionTimingFunction:i.FtCssVariableFactory.external(i.designSystemVariables.transitionTimingFunction,"Design system")},ze=[ii,e.css`
|
|
1058
1058
|
:host {
|
|
1059
1059
|
display: flex;
|
|
1060
1060
|
max-height: 100%;
|
|
@@ -1067,7 +1067,7 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
1067
1067
|
flex-direction: column;
|
|
1068
1068
|
max-height: 100%;
|
|
1069
1069
|
max-width: 100%;
|
|
1070
|
-
color: ${
|
|
1070
|
+
color: ${we.colorOnSurface};
|
|
1071
1071
|
}
|
|
1072
1072
|
|
|
1073
1073
|
.ft-filter--header {
|
|
@@ -1083,7 +1083,7 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
1083
1083
|
.ft-filter--header ft-button {
|
|
1084
1084
|
flex-shrink: 0;
|
|
1085
1085
|
margin-left: auto;
|
|
1086
|
-
${i.setVariable(
|
|
1086
|
+
${i.setVariable(_i.iconSize,"18px")};
|
|
1087
1087
|
}
|
|
1088
1088
|
|
|
1089
1089
|
.ft-filter--label {
|
|
@@ -1103,8 +1103,8 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
1103
1103
|
padding: 0 10px;
|
|
1104
1104
|
overflow: hidden;
|
|
1105
1105
|
height: 32px;
|
|
1106
|
-
transition: height ${
|
|
1107
|
-
margin ${
|
|
1106
|
+
transition: height ${we.transitionDuration} ${we.transitionTimingFunction},
|
|
1107
|
+
margin ${we.transitionDuration} ${we.transitionTimingFunction};
|
|
1108
1108
|
transition-delay: 500ms;
|
|
1109
1109
|
}
|
|
1110
1110
|
|
|
@@ -1117,15 +1117,15 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
1117
1117
|
display: block;
|
|
1118
1118
|
width: 100%;
|
|
1119
1119
|
border-radius: 4px;
|
|
1120
|
-
border: 1px solid ${
|
|
1120
|
+
border: 1px solid ${we.colorOutline};
|
|
1121
1121
|
padding: 4px;
|
|
1122
|
-
background-color: ${
|
|
1123
|
-
color: ${
|
|
1124
|
-
outline-color: ${
|
|
1122
|
+
background-color: ${we.colorSurface};
|
|
1123
|
+
color: ${we.colorOnSurface};
|
|
1124
|
+
outline-color: ${we.colorPrimary};
|
|
1125
1125
|
}
|
|
1126
1126
|
|
|
1127
1127
|
input::placeholder {
|
|
1128
|
-
color: ${
|
|
1128
|
+
color: ${we.colorOnSurfaceMedium};
|
|
1129
1129
|
}
|
|
1130
1130
|
|
|
1131
1131
|
input:placeholder-shown {
|
|
@@ -1141,7 +1141,7 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
1141
1141
|
}
|
|
1142
1142
|
|
|
1143
1143
|
.ft-filter--separator {
|
|
1144
|
-
border-top: 1px solid ${
|
|
1144
|
+
border-top: 1px solid ${we.colorOutline};
|
|
1145
1145
|
margin: 4px 10px;
|
|
1146
1146
|
}
|
|
1147
1147
|
|
|
@@ -1166,7 +1166,7 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
1166
1166
|
slot:not([name]) {
|
|
1167
1167
|
display: none;
|
|
1168
1168
|
}
|
|
1169
|
-
`];var
|
|
1169
|
+
`];var Se=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class Oe extends CustomEvent{constructor(t){super("change",{detail:t})}}class Ce extends i.FtLitElement{constructor(){super(...arguments),this.id="",this.label="",this.filterPlaceHolder="Filter {0}",this.clearButtonLabel="Clear",this.moreValuesButtonLabel="More",this.noValuesLabel="No values available",this.options=[],this.multivalued=!1,this.disabled=!1,this.raiseSelectedOptions=!1,this.displayedValuesLimit=0,this.hideClearButton=!1,this.lastLevelHasHiddenvalues=!1,this.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver((()=>this.updateScroll())),this.levelsScrollDebouncer=new i.Debouncer(300),this.changeDebouncer=new i.Debouncer(10),this.lastDispatchedValues=[]}get flatOptions(){return i.flatDeep(this.options,(t=>{var i;return null!==(i=t.subOptions)&&void 0!==i?i:[]}))}get selectedValues(){return this.flatOptions.filter((t=>t.selected)).map((t=>t.value))}render(){const t=this.flatOptions.some((t=>t.selected)),i=this.withScroll||this.filter||this.lastLevelHasHiddenvalues,o=this.filterPlaceHolder.replace("{0}",this.label);return e.html`
|
|
1170
1170
|
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1171
1171
|
part="container">
|
|
1172
1172
|
${this.label||t?e.html`
|
|
@@ -1238,6 +1238,6 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
1238
1238
|
.exportpartsPrefixes=${["values","available-values"]}
|
|
1239
1239
|
noValuesLabel="${this.noValuesLabel}"
|
|
1240
1240
|
></ft-filter-level>
|
|
1241
|
-
`}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){var i;t.stopPropagation();const e=this.flatOptions.find((i=>i.value===t.detail.value));e.selected=!e.selected;const o=t=>{var i;t!==e&&(t.selected=!1),null===(i=t.subOptions)||void 0===i||i.forEach(o)};this.multivalued?null===(i=e.subOptions)||void 0===i||i.forEach(o):this.options.forEach(o),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;this.sendEventIfValuesChanged(),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}))}sendEventIfValuesChanged(){const t=this.selectedValues;i.deepEqual(this.lastDispatchedValues,t)||(this.dispatchEvent(new
|
|
1241
|
+
`}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){var i;t.stopPropagation();const e=this.flatOptions.find((i=>i.value===t.detail.value));e.selected=!e.selected;const o=t=>{var i;t!==e&&(t.selected=!1),null===(i=t.subOptions)||void 0===i||i.forEach(o)};this.multivalued?null===(i=e.subOptions)||void 0===i||i.forEach(o):this.options.forEach(o),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;this.sendEventIfValuesChanged(),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}))}sendEventIfValuesChanged(){const t=this.selectedValues;i.deepEqual(this.lastDispatchedValues,t)||(this.dispatchEvent(new Oe(t)),this.lastDispatchedValues=t)}updateOptionsFromSlot(t){t.stopPropagation(),this.options=this.slotElement.assignedElements().map((t=>t)),this.optionsChanged()}onFilterChange(){var t,i;this.filter=null!==(i=null===(t=this.filterInput)||void 0===t?void 0:t.value)&&void 0!==i?i:""}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}}Ce.elementDefinitions={"ft-button":Gi,"ft-filter-level":xe,"ft-snap-scroll":ke,"ft-typography":li},Ce.styles=ze,Se([o.property({type:String})],Ce.prototype,"id",void 0),Se([o.property({type:String})],Ce.prototype,"label",void 0),Se([o.property({type:String})],Ce.prototype,"filterPlaceHolder",void 0),Se([o.property({type:String})],Ce.prototype,"clearButtonLabel",void 0),Se([o.property({type:String})],Ce.prototype,"moreValuesButtonLabel",void 0),Se([o.property({type:String})],Ce.prototype,"noValuesLabel",void 0),Se([i.jsonProperty([])],Ce.prototype,"options",void 0),Se([o.property({type:Boolean})],Ce.prototype,"multivalued",void 0),Se([o.property({type:Boolean})],Ce.prototype,"disabled",void 0),Se([o.property({type:Boolean})],Ce.prototype,"raiseSelectedOptions",void 0),Se([o.property({type:Number})],Ce.prototype,"displayedValuesLimit",void 0),Se([o.property({type:Boolean})],Ce.prototype,"hideClearButton",void 0),Se([o.query(".ft-filter--slot")],Ce.prototype,"slotElement",void 0),Se([o.query(".ft-filter--container")],Ce.prototype,"container",void 0),Se([o.query(".ft-filter--values")],Ce.prototype,"valuesContainer",void 0),Se([o.query(".ft-filter--levels")],Ce.prototype,"levelsContainer",void 0),Se([o.state()],Ce.prototype,"lastLevelHasHiddenvalues",void 0),Se([o.query(".ft-filter--filter input")],Ce.prototype,"filterInput",void 0),Se([o.queryAll(".ft-filter--levels ft-filter-level")],Ce.prototype,"levels",void 0),Se([o.state()],Ce.prototype,"withScroll",void 0),Se([o.state()],Ce.prototype,"filter",void 0),Se([o.state()],Ce.prototype,"slideIn",void 0),Se([o.state()],Ce.prototype,"slideOut",void 0);var Be=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class je extends i.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return e.html`
|
|
1242
1242
|
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1243
|
-
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}
|
|
1243
|
+
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}je.elementDefinitions={},Be([o.property({type:String})],je.prototype,"label",void 0),Be([o.property({type:Object,converter:t=>t})],je.prototype,"value",void 0),Be([o.property({type:Boolean,reflect:!0})],je.prototype,"selected",void 0),Be([o.property({type:Object})],je.prototype,"subOptions",void 0),Be([i.jsonProperty({})],je.prototype,"renderOption",void 0),Be([o.query(".ft-filter-option--slot")],je.prototype,"slotElement",void 0),i.customElement("ft-filter")(Ce),i.customElement("ft-filter-option")(je),t.FtFilter=Ce,t.FtFilterChangeEvent=Oe,t.FtFilterCssVariables=we,t.FtFilterLevelCssVariables=ue,t.FtFilterOption=je,t.levelStyles=ve,t.styles=ze}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litRepeat,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|